diff options
author | gerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7> | 2010-06-02 18:13:00 +0000 |
---|---|---|
committer | gerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7> | 2010-06-02 18:13:00 +0000 |
commit | 98adcb1882600e5450295092ccc6ed16d1789f1d (patch) | |
tree | 30698e9b454012fbed0a1b6bf198f8fe644d8dca /epan/dissectors | |
parent | 773f7fbd5f13147aa27d8db12285056af62413c3 (diff) |
From Chris Maynard via bug 4014:
This trivial patch merely displays the ICMP ID and sequence # in the Info
column.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@33056 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors')
-rw-r--r-- | epan/dissectors/packet-icmp.c | 11 | ||||
-rw-r--r-- | epan/dissectors/packet-ip.c | 1 |
2 files changed, 11 insertions, 1 deletions
diff --git a/epan/dissectors/packet-icmp.c b/epan/dissectors/packet-icmp.c index ac32b3691c..e6dc91320e 100644 --- a/epan/dissectors/packet-icmp.c +++ b/epan/dissectors/packet-icmp.c @@ -53,6 +53,7 @@ static int hf_icmp_checksum = -1; static int hf_icmp_checksum_bad = -1; static int hf_icmp_ident = -1; static int hf_icmp_seq_num = -1; +static int hf_icmp_seq_num_le = -1; static int hf_icmp_mtu = -1; static int hf_icmp_redir_gw = -1; @@ -731,7 +732,7 @@ dissect_icmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) break; } - col_set_str(pinfo->cinfo, COL_INFO, type_str); + col_add_fstr(pinfo->cinfo, COL_INFO, "%-20s", type_str); if (code_str) col_append_fstr(pinfo->cinfo, COL_INFO, " (%s)", code_str); @@ -783,6 +784,10 @@ dissect_icmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) 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); + col_append_fstr(pinfo->cinfo, COL_INFO, + " (id=0x%04x, seq(be/le)=%u/%u, ttl=%u)", tvb_get_ntohs(tvb, 4), + tvb_get_ntohs(tvb, 6), tvb_get_letohs(tvb, 6), pinfo->ip_ttl); break; case ICMP_UNREACH: @@ -929,6 +934,10 @@ proto_register_icmp(void) { "Sequence number", "icmp.seq", FT_UINT16, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL }}, + { &hf_icmp_seq_num_le, + {"Sequence number (LE)", "icmp.seq_le", FT_UINT16, BASE_DEC_HEX, NULL, 0x0, + "", HFILL }}, + { &hf_icmp_mtu, { "MTU of next hop", "icmp.mtu", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}}, diff --git a/epan/dissectors/packet-ip.c b/epan/dissectors/packet-ip.c index 2fcac7a670..5e6caf41cf 100644 --- a/epan/dissectors/packet-ip.c +++ b/epan/dissectors/packet-ip.c @@ -1469,6 +1469,7 @@ dissect_ip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) } iph->ip_ttl = tvb_get_guint8(tvb, offset + 8); + pinfo->ip_ttl = iph->ip_ttl; if (tree) { ttl_item = proto_tree_add_item(ip_tree, hf_ip_ttl, tvb, offset + 8, 1, FALSE); } else { |