aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ipv6.c
diff options
context:
space:
mode:
authorJames Ko <jck@exegin.com>2019-03-26 13:41:04 -0700
committerAnders Broman <a.broman58@gmail.com>2019-03-27 06:10:09 +0000
commit45a8c2dbf4e15cb6874549f34bf616a4754d6645 (patch)
treeaf3fbfc62a3216bd15f0b959236eb5bf4d994294 /epan/dissectors/packet-ipv6.c
parentaa39ca68ae3dec1c36a3df3675a0a85e0a4ca7a9 (diff)
Decode IPv6 MPL Option Seed ID Length Enumerations
2-bit S field in MPL Option identifies the length of the seed-id. 0 indicates seed-id is the IPv6 Source Address and the seed-id field is elided. 1, 2, & 3 indicate the seed-id field contains 16-bit, 64-bit, & 128-bit unsigned integers respectively. Change-Id: I3360fff2f66089a5fa98d6fc0cabd077993afd5b Reviewed-on: https://code.wireshark.org/review/32593 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-ipv6.c')
-rw-r--r--epan/dissectors/packet-ipv6.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/epan/dissectors/packet-ipv6.c b/epan/dissectors/packet-ipv6.c
index 128955569f..3ad61fcec9 100644
--- a/epan/dissectors/packet-ipv6.c
+++ b/epan/dissectors/packet-ipv6.c
@@ -326,6 +326,7 @@ static expert_field ei_ipv6_opt_jumbo_fragment = EI_INIT;
static expert_field ei_ipv6_opt_invalid_len = EI_INIT;
static expert_field ei_ipv6_opt_unknown_data = EI_INIT;
static expert_field ei_ipv6_opt_deprecated = EI_INIT;
+static expert_field ei_ipv6_opt_mpl_ipv6_src_seed_id = EI_INIT;
static expert_field ei_ipv6_hopopts_not_first = EI_INIT;
static expert_field ei_ipv6_plen_exceeds_framing = EI_INIT;
static expert_field ei_ipv6_plen_zero = EI_INIT;
@@ -665,6 +666,14 @@ static const value_string routing_header_type[] = {
{ 0, NULL }
};
+static const value_string mpl_seed_id_len_vals[] = {
+ { 0, "0" },
+ { 1, "16-bit unsigned integer" },
+ { 2, "64-bit unsigned integer" },
+ { 3, "128-bit unsigned integer" },
+ { 0, NULL }
+};
+
static gboolean
capture_ipv6(const guchar *pd, int offset, int len, capture_packet_info_t *cpinfo, const union wtap_pseudo_header *pseudo_header)
{
@@ -1769,6 +1778,9 @@ dissect_opt_mpl(tvbuff_t *tvb, gint offset, packet_info *pinfo _U_, proto_tree *
proto_tree_add_item(opt_tree, hf_ipv6_opt_mpl_seed_id, tvb, offset, seed_id_len, ENC_NA);
offset += seed_id_len;
}
+ else {
+ expert_add_info(pinfo, opt_ti->type, &ei_ipv6_opt_mpl_ipv6_src_seed_id);
+ }
return offset;
}
@@ -3017,7 +3029,7 @@ proto_register_ipv6(void)
},
{ &hf_ipv6_opt_mpl_flag_s,
{ "Seed ID Length", "ipv6.opt.mpl.flag.s",
- FT_UINT8, BASE_DEC, NULL, 0xC0,
+ FT_UINT8, BASE_DEC, VALS(mpl_seed_id_len_vals), 0xC0,
"Identifies the length of Seed ID", HFILL }
},
{ &hf_ipv6_opt_mpl_flag_m,
@@ -3442,6 +3454,10 @@ proto_register_ipv6(void)
{ &ei_ipv6_opt_deprecated,
{ "ipv6.opt.deprecated", PI_DEPRECATED, PI_NOTE,
"Option type is deprecated", EXPFILL }
+ },
+ { &ei_ipv6_opt_mpl_ipv6_src_seed_id,
+ { "ipv6.opt.mpl.ipv6_src_seed_id", PI_PROTOCOL, PI_COMMENT,
+ "Seed ID is the IPv6 Source Address", EXPFILL }
}
};