aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ip.c
diff options
context:
space:
mode:
authorJörg Mayer <jmayer@loplof.de>2012-06-12 10:44:57 +0000
committerJörg Mayer <jmayer@loplof.de>2012-06-12 10:44:57 +0000
commitf679b8964994e015f01b1f9d3ee4b1a569e469c1 (patch)
tree6f5c87ad0d25f6c98808d9de3a0a8f3b05cc2e31 /epan/dissectors/packet-ip.c
parent9228ece476cfb7f9102ad84427f2c565e1614e10 (diff)
Revert r41952
BACKPORT to 1.8 svn path=/trunk/; revision=43222
Diffstat (limited to 'epan/dissectors/packet-ip.c')
-rw-r--r--epan/dissectors/packet-ip.c12
1 files changed, 4 insertions, 8 deletions
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,