From f679b8964994e015f01b1f9d3ee4b1a569e469c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Mayer?= Date: Tue, 12 Jun 2012 10:44:57 +0000 Subject: Revert r41952 BACKPORT to 1.8 svn path=/trunk/; revision=43222 --- epan/dissectors/packet-ip.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'epan/dissectors/packet-ip.c') diff --git a/epan/dissectors/packet-ip.c b/epan/dissectors/packet-ip.c index feeef94ff5..092487d062 100644 --- a/epan/dissectors/packet-ip.c +++ b/epan/dissectors/packet-ip.c @@ -1910,12 +1910,6 @@ ip_checksum(const guint8 *ptr, int len) return in_cksum(&cksum_vec[0], 1); } -proto_item * -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); -} - static void dissect_ip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) { @@ -1956,7 +1950,9 @@ dissect_ip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) if (tree) { ti = proto_tree_add_item(tree, proto_ip, tvb, offset, hlen, ENC_NA); ip_tree = proto_item_add_subtree(ti, ett_ip); - add_ip_version_to_tree(ip_tree, tvb, offset); + + proto_tree_add_uint(ip_tree, hf_ip_version, tvb, offset, 1, + hi_nibble(iph->ip_v_hl)); } /* if IP is not referenced from any filters we don't need to worry about @@ -2421,7 +2417,7 @@ proto_register_ip(void) static hf_register_info hf[] = { { &hf_ip_version, { "Version", "ip.version", FT_UINT8, BASE_DEC, - NULL, 0xf0, NULL, HFILL }}, + NULL, 0x0, NULL, HFILL }}, { &hf_ip_hdr_len, { "Header Length", "ip.hdr_len", FT_UINT8, BASE_DEC, -- cgit v1.2.3