aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ip.c
diff options
context:
space:
mode:
authorJörg Mayer <jmayer@loplof.de>2012-06-12 10:38:22 +0000
committerJörg Mayer <jmayer@loplof.de>2012-06-12 10:38:22 +0000
commit9228ece476cfb7f9102ad84427f2c565e1614e10 (patch)
tree2818f23e07d741ee22c22e425db9a43d5874a26b /epan/dissectors/packet-ip.c
parent4f47eefa79dd75ba8d8455f21429fd49a8b25b1a (diff)
Manually revert r41953
BACKPORT to 1.8 svn path=/trunk/; revision=43221
Diffstat (limited to 'epan/dissectors/packet-ip.c')
-rw-r--r--epan/dissectors/packet-ip.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/epan/dissectors/packet-ip.c b/epan/dissectors/packet-ip.c
index 5d25732782..feeef94ff5 100644
--- a/epan/dissectors/packet-ip.c
+++ b/epan/dissectors/packet-ip.c
@@ -1916,15 +1916,6 @@ add_ip_version_to_tree(proto_tree *tree, tvbuff_t *tvb, int offset)
return proto_tree_add_item(tree, hf_ip_version, tvb, offset, 1, ENC_BIG_ENDIAN);
}
-/*
- * Note boffset is offset in BITS to ba able to use the function in both IPv4 and IPv6
- */
-proto_item *
-add_ip_dscp_to_tree(proto_tree *tree, tvbuff_t *tvb, int boffset)
-{
- return proto_tree_add_bits_item(tree, hf_ip_dsfield_dscp, tvb, boffset, 6, ENC_BIG_ENDIAN);
-}
-
static void
dissect_ip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
{
@@ -2013,8 +2004,7 @@ dissect_ip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
ecn_vals, "Unknown ECN"));
field_tree = proto_item_add_subtree(tf, ett_ip_dsfield);
- /* Add DSCP using bit offset to be able to use the same hf field in IPv6 */
- add_ip_dscp_to_tree(field_tree, tvb, (offset+1)<<3);
+ proto_tree_add_item(field_tree, hf_ip_dsfield_dscp, tvb, offset + 1, 1, ENC_NA);
proto_tree_add_item(field_tree, hf_ip_dsfield_ecn, tvb, offset + 1, 1, ENC_NA);
} else {
tf = proto_tree_add_uint_format(ip_tree, hf_ip_tos, tvb, offset + 1, 1,
@@ -2443,7 +2433,7 @@ proto_register_ip(void)
{ &hf_ip_dsfield_dscp,
{ "Differentiated Services Codepoint", "ip.dsfield.dscp", FT_UINT8, BASE_HEX | BASE_EXT_STRING,
- &dscp_vals_ext, 0, NULL, HFILL }},
+ &dscp_vals_ext, IPDSFIELD_DSCP_MASK, NULL, HFILL }},
{ &hf_ip_dsfield_ecn,
{ "Explicit Congestion Notification", "ip.dsfield.ecn", FT_UINT8, BASE_HEX,