aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-icmp.c
diff options
context:
space:
mode:
authorStephen Fisher <steve@stephen-fisher.com>2010-09-14 21:38:54 +0000
committerStephen Fisher <steve@stephen-fisher.com>2010-09-14 21:38:54 +0000
commit0583c64d8f51575502b519e3b854b0383cad3a48 (patch)
tree9a8991de75ec61ba475f0d712756ae19e7d1687f /epan/dissectors/packet-icmp.c
parent31cf5ad2372f3a9f79de8bddff5fa2e7861f80d8 (diff)
Clean up the icmp info column per discussion in bug #4014.
Change to using new ENC_[BIG|LITTLE]_ENDIAN instead of FALSE and TRUE in the proto_tree_add_item() calls for the identifier and sequence numbers. svn path=/trunk/; revision=34119
Diffstat (limited to 'epan/dissectors/packet-icmp.c')
-rw-r--r--epan/dissectors/packet-icmp.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/epan/dissectors/packet-icmp.c b/epan/dissectors/packet-icmp.c
index 809a5715ba..d6fb3b8625 100644
--- a/epan/dissectors/packet-icmp.c
+++ b/epan/dissectors/packet-icmp.c
@@ -52,6 +52,7 @@ static int hf_icmp_code = -1;
static int hf_icmp_checksum = -1;
static int hf_icmp_checksum_bad = -1;
static int hf_icmp_ident = -1;
+static int hf_icmp_ident_le = -1;
static int hf_icmp_seq_num = -1;
static int hf_icmp_seq_num_le = -1;
static int hf_icmp_mtu = -1;
@@ -782,11 +783,16 @@ dissect_icmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
case ICMP_IREQREPLY:
case ICMP_MASKREQ:
case ICMP_MASKREPLY:
- proto_tree_add_item(icmp_tree, hf_icmp_ident, tvb, 4, 2, FALSE);
- proto_tree_add_item(icmp_tree, hf_icmp_seq_num, tvb, 6, 2, FALSE);
- proto_tree_add_item(icmp_tree, hf_icmp_seq_num_le, tvb, 6, 2, TRUE);
+ proto_tree_add_item(icmp_tree, hf_icmp_ident, tvb, 4, 2,
+ ENC_BIG_ENDIAN);
+ proto_tree_add_item(icmp_tree, hf_icmp_ident_le, tvb, 4, 2,
+ ENC_LITTLE_ENDIAN);
+ proto_tree_add_item(icmp_tree, hf_icmp_seq_num, tvb, 6, 2,
+ ENC_BIG_ENDIAN);
+ proto_tree_add_item(icmp_tree, hf_icmp_seq_num_le, tvb, 6, 2,
+ ENC_LITTLE_ENDIAN);
col_append_fstr(pinfo->cinfo, COL_INFO,
- " (id=0x%04x, seq(be/le)=%u/%u, ttl=%u)", tvb_get_ntohs(tvb, 4),
+ " id=0x%04x, seq=%u/%u, ttl=%u", tvb_get_ntohs(tvb, 4),
tvb_get_ntohs(tvb, 6), tvb_get_letohs(tvb, 6), pinfo->ip_ttl);
break;
@@ -927,8 +933,12 @@ proto_register_icmp(void)
NULL, HFILL }},
{ &hf_icmp_ident,
- { "Identifier", "icmp.ident", FT_UINT16, BASE_HEX, NULL, 0x0,
- NULL, HFILL }},
+ { "Identifier", "icmp.ident", FT_UINT16, BASE_DEC_HEX, NULL, 0x0,
+ "Identifier (big endian representation)", HFILL }},
+
+ { &hf_icmp_ident_le,
+ { "Identifier (LE)", "icmp.ident", FT_UINT16, BASE_DEC_HEX, NULL, 0x0,
+ "Identifier (little endian representation)", HFILL }},
{ &hf_icmp_seq_num,
{ "Sequence number", "icmp.seq", FT_UINT16, BASE_DEC_HEX, NULL, 0x0, "Sequence number (big endian representation)", HFILL }},