aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-icmp.c
diff options
context:
space:
mode:
authorUli Heilmeier <uh@heilmeier.eu>2018-01-01 17:22:25 +0100
committerMichael Mann <mmann78@netscape.net>2018-01-01 17:42:26 +0000
commit077124097d457514fdffa77209e6615b97dc6753 (patch)
treec475ee167f5996bafb1ba9a8a39b2bc8aec99e49 /epan/dissectors/packet-icmp.c
parent564a3fae124afaaf6b2d7f2b9cda716fbd7f6f14 (diff)
ICMP: Resolve Extension Object Class value
Resolve ICMP Extension Object Class value to name as defined at https://www.iana.org/assignments/icmp-parameters/icmp-parameters.xhtml#icmp-parameters-ext-classes Ping-Bug: 6632 Change-Id: I73ce9dbef5b09aa49f16c73a04ce474cd46f5695 Reviewed-on: https://code.wireshark.org/review/25098 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-icmp.c')
-rw-r--r--epan/dissectors/packet-icmp.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/epan/dissectors/packet-icmp.c b/epan/dissectors/packet-icmp.c
index 0dd9d565a9..670640ab21 100644
--- a/epan/dissectors/packet-icmp.c
+++ b/epan/dissectors/packet-icmp.c
@@ -330,6 +330,12 @@ static const value_string mip_extensions[] = {
{0, NULL}
};
+static const value_string icmp_ext_class_str[] = {
+ {1, "MPLS Label Stack Class"},
+ {2, "Interface Information Object"},
+ {0, NULL}
+};
+
/* RFC 5837 ICMP extension - Interface Information Object
* Interface Role
*/
@@ -891,8 +897,8 @@ dissect_extensions(tvbuff_t * tvb, packet_info *pinfo, gint offset, proto_tree *
/* Class */
class_num = tvb_get_guint8(tvb, offset + 2);
- proto_tree_add_uint(ext_object_tree, hf_icmp_ext_class,
- tvb, offset + 2, 1, class_num);
+ proto_tree_add_item(ext_object_tree, hf_icmp_ext_class,
+ tvb, offset + 2, 1, ENC_BIG_ENDIAN);
/* C-Type */
c_type = tvb_get_guint8(tvb, offset + 3);
@@ -1899,8 +1905,8 @@ void proto_register_icmp(void)
NULL, HFILL}},
{&hf_icmp_ext_class,
- {"Class", "icmp.ext.class", FT_UINT8, BASE_DEC, NULL, 0x0,
- NULL, HFILL}},
+ {"Class", "icmp.ext.class", FT_UINT8, BASE_DEC,
+ VALS(icmp_ext_class_str), 0x0, NULL, HFILL}},
{&hf_icmp_ext_c_type,
{"C-Type", "icmp.ext.ctype", FT_UINT8, BASE_DEC, NULL,