From 9228ece476cfb7f9102ad84427f2c565e1614e10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Mayer?= Date: Tue, 12 Jun 2012 10:38:22 +0000 Subject: Manually revert r41953 BACKPORT to 1.8 svn path=/trunk/; revision=43221 --- epan/dissectors/packet-ip.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'epan/dissectors/packet-ip.c') 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, -- cgit v1.2.3