aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorjake <jake@f5534014-38df-0310-8fa8-9805f1628bb7>2010-07-17 07:55:28 +0000
committerjake <jake@f5534014-38df-0310-8fa8-9805f1628bb7>2010-07-17 07:55:28 +0000
commita74213a5e690b1884b3731f887e65f8c143c79dd (patch)
tree8fca6db90269033ab5e7fcaf8c2d097ad00728e4 /epan
parent34dd868cc6bc2fe45104d920fb311193595cfdad (diff)
From KATAOKA Toshihiro:
I've made some update for MIPv6 Mobility Options according to the IETF RFCs. See also: http://www.iana.org/assignments/mobility-parameters/mobility-parameters.xhtml#mobility-parameters-2 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@33558 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-mip6.c359
-rw-r--r--epan/dissectors/packet-mip6.h235
2 files changed, 494 insertions, 100 deletions
diff --git a/epan/dissectors/packet-mip6.c b/epan/dissectors/packet-mip6.c
index edd3f6590d..b460754533 100644
--- a/epan/dissectors/packet-mip6.c
+++ b/epan/dissectors/packet-mip6.c
@@ -38,6 +38,7 @@
#include <epan/ipproto.h>
#include <epan/ip_opts.h>
+#include <epan/sminmpec.h>
#include "packet-mip6.h"
#include "packet-ntp.h"
@@ -72,12 +73,15 @@ static int hf_mip6_bu_k_flag = -1;
static int hf_mip6_bu_m_flag = -1;
static int hf_nemo_bu_r_flag = -1;
static int hf_proxy_bu_p_flag = -1;
+static int hf_proxy_bu_f_flag = -1;
+static int hf_proxy_bu_t_flag = -1;
static int hf_mip6_bu_lifetime = -1;
static int hf_mip6_ba_status = -1;
static int hf_mip6_ba_k_flag = -1;
static int hf_nemo_ba_r_flag = -1;
static int hf_proxy_ba_p_flag = -1;
+static int hf_proxy_ba_t_flag = -1;
static int hf_mip6_ba_seqnr = -1;
static int hf_mip6_ba_lifetime = -1;
@@ -114,8 +118,20 @@ static int hf_mip6_bad_auth = -1;
static int hf_fmip6_lla_optcode = -1;
static int hf_mip6_mnid_subtype = -1;
+static int hf_mip6_vsm_vid = -1;
+static int hf_mip6_vsm_subtype = -1;
+static int hf_mip6_vsm_subtype_3gpp = -1;
+
+static int hf_pmip6_hi_opttype = -1;
+static int hf_pmip6_att_opttype = -1;
static int hf_pmip6_timestamp = -1;
+static int hf_mip6_ipv4ha_preflen = -1;
+static int hf_mip6_ipv4ha_p_flag = -1;
+static int hf_mip6_ipv4ha_ha = -1;
+static int hf_mip6_ipv4aa_status = -1;
+static int hf_mip6_ipv4aa_ha = -1;
+static int hf_pmip6_gre_key = -1;
static int hf_mip6_mobility_opt = -1;
/* Initialize the subtree pointers */
@@ -128,8 +144,15 @@ static gint ett_mip6_opt_bad = -1;
static gint ett_nemo_opt_mnp = -1;
static gint ett_fmip6_opt_lla = -1;
static gint ett_mip6_opt_mnid = -1;
+static gint ett_mip6_opt_vsm = -1;
+static gint ett_mip6_opt_ssm = -1;
static gint ett_pmip6_opt_hnp = -1;
+static gint ett_pmip6_opt_hi = -1;
+static gint ett_pmip6_opt_att = -1;
static gint ett_pmip6_opt_ts = -1;
+static gint ett_mip6_opt_ipv4ha = -1;
+static gint ett_mip6_opt_ipv4aa = -1;
+static gint ett_pmip6_opt_grek = -1;
/* Functions to dissect the mobility headers */
@@ -269,6 +292,10 @@ dissect_mip6_bu(tvbuff_t *tvb, proto_tree *mip6_tree, packet_info *pinfo)
MIP6_BU_FLAGS_OFF, MIP6_BU_FLAGS_LEN, FALSE);
proto_tree_add_item(data_tree, hf_proxy_bu_p_flag, tvb,
MIP6_BU_FLAGS_OFF, MIP6_BU_FLAGS_LEN, FALSE);
+ proto_tree_add_item(data_tree, hf_proxy_bu_f_flag, tvb,
+ MIP6_BU_FLAGS_OFF, MIP6_BU_FLAGS_LEN, FALSE);
+ proto_tree_add_item(data_tree, hf_proxy_bu_t_flag, tvb,
+ MIP6_BU_FLAGS_OFF, MIP6_BU_FLAGS_LEN, FALSE);
if ((tvb_get_guint8(tvb, MIP6_BU_FLAGS_OFF) & 0x0004 ) == 0x0004)
proto_nemo = 1;
@@ -306,7 +333,8 @@ dissect_mip6_ba(tvbuff_t *tvb, proto_tree *mip6_tree, packet_info *pinfo)
MIP6_BA_FLAGS_OFF, MIP6_BA_FLAGS_LEN, FALSE);
proto_tree_add_item(data_tree, hf_proxy_ba_p_flag, tvb,
MIP6_BA_FLAGS_OFF, MIP6_BA_FLAGS_LEN, FALSE);
-
+ proto_tree_add_item(data_tree, hf_proxy_ba_t_flag, tvb,
+ MIP6_BA_FLAGS_OFF, MIP6_BA_FLAGS_LEN, FALSE);
if ((tvb_get_guint8(tvb, MIP6_BA_FLAGS_OFF) & 0x0040 ) == 0x0040)
proto_nemo = 1;
@@ -629,6 +657,72 @@ dissect_mip6_opt_mnid(const ip_tcp_opt *optp _U_, tvbuff_t *tvb, int offset,
}
static void
+dissect_mip6_opt_vsm(const ip_tcp_opt *optp _U_, tvbuff_t *tvb, int offset,
+ guint optlen, packet_info *pinfo _U_, proto_tree *opt_tree)
+{
+ proto_tree *field_tree = NULL;
+ proto_item *tf;
+ int len, p;
+ guint32 vendorid;
+ int hf_mip6_vsm_subtype_local;
+
+ tf = proto_tree_add_text(opt_tree, tvb, offset, optlen, "%s", optp->name);
+ field_tree = proto_item_add_subtree(tf, *optp->subtree_index);
+
+ proto_tree_add_item(field_tree, hf_mip6_vsm_vid, tvb,
+ offset + MIP6_VSM_VID_OFF, MIP6_VSM_VID_LEN, FALSE);
+
+ vendorid = tvb_get_ntohl(tvb, offset+MIP6_VSM_VID_OFF);
+ switch (vendorid) {
+ case VENDOR_THE3GPP:
+ hf_mip6_vsm_subtype_local = hf_mip6_vsm_subtype_3gpp;
+ break;
+ default:
+ hf_mip6_vsm_subtype_local = hf_mip6_vsm_subtype;
+ break;
+ }
+ proto_tree_add_item(field_tree, hf_mip6_vsm_subtype_local, tvb,
+ offset + MIP6_VSM_SUBTYPE_OFF, MIP6_VSM_SUBTYPE_LEN, FALSE);
+
+ p = offset + MIP6_VSM_DATA_OFF;
+ len = optlen - MIP6_VSM_DATA_OFF;
+ if (len > 0)
+ proto_tree_add_text(field_tree, tvb, p, len, "Data");
+
+}
+
+static void
+dissect_mip6_opt_ssm(const ip_tcp_opt *optp _U_, tvbuff_t *tvb, int offset,
+ guint optlen, packet_info *pinfo _U_, proto_tree *opt_tree)
+{
+ int len, p;
+
+ p = offset + MIP6_SSM_SSM_OFF;
+ len = optlen - MIP6_SSM_SSM_OFF;
+
+ if (len > 0)
+ proto_tree_add_text(opt_tree, tvb, p, len, "Identifier: %s", tvb_format_text(tvb, p, len));
+}
+
+static void
+dissect_pmip6_opt_hi(const ip_tcp_opt *optp _U_, tvbuff_t *tvb, int offset,
+ guint optlen _U_, packet_info *pinfo _U_, proto_tree *opt_tree)
+{
+
+ proto_tree_add_item(opt_tree, hf_pmip6_hi_opttype, tvb,
+ offset + PMIP6_HI_HI_OFF, PMIP6_HI_HI_LEN, FALSE);
+}
+
+static void
+dissect_pmip6_opt_att(const ip_tcp_opt *optp _U_, tvbuff_t *tvb, int offset,
+ guint optlen _U_, packet_info *pinfo _U_, proto_tree *opt_tree)
+{
+
+ proto_tree_add_item(opt_tree, hf_pmip6_att_opttype, tvb,
+ offset + PMIP6_ATT_ATT_OFF, PMIP6_ATT_ATT_LEN, FALSE);
+}
+
+static void
dissect_pmip6_opt_ts(const ip_tcp_opt *optp _U_, tvbuff_t *tvb, int offset,
guint optlen, packet_info *pinfo _U_, proto_tree *opt_tree)
{
@@ -639,6 +733,61 @@ dissect_pmip6_opt_ts(const ip_tcp_opt *optp _U_, tvbuff_t *tvb, int offset,
reftime, "Timestamp: %s", ntp_fmt_ts(reftime));
}
+static void
+dissect_pmip6_opt_ipv4ha(const ip_tcp_opt *optp _U_, tvbuff_t *tvb, int offset,
+ guint optlen, packet_info *pinfo _U_, proto_tree *opt_tree)
+{
+ proto_tree *field_tree = NULL;
+ proto_item *tf;
+ int len, p;
+
+ tf = proto_tree_add_text(opt_tree, tvb, offset, optlen, "%s", optp->name);
+ field_tree = proto_item_add_subtree(tf, *optp->subtree_index);
+
+ p = offset + MIP6_IPV4HA_PREFIXL_OFF;
+ len = MIP6_IPV4HA_PREFIXL_LEN;
+
+ proto_tree_add_item(field_tree, hf_mip6_ipv4ha_preflen, tvb, p, len, FALSE);
+ proto_tree_add_item(field_tree, hf_mip6_ipv4ha_p_flag, tvb, p, len+1, FALSE);
+
+ proto_tree_add_item(field_tree, hf_mip6_ipv4ha_ha, tvb,
+ offset + MIP6_IPV4HA_HA_OFF, MIP6_IPV4HA_HA_LEN, FALSE);
+
+}
+
+static void
+dissect_pmip6_opt_ipv4aa(const ip_tcp_opt *optp _U_, tvbuff_t *tvb, int offset,
+ guint optlen, packet_info *pinfo _U_, proto_tree *opt_tree)
+{
+ proto_tree *field_tree = NULL;
+ proto_item *tf;
+ int len, p;
+
+ tf = proto_tree_add_text(opt_tree, tvb, offset, optlen, "%s", optp->name);
+ field_tree = proto_item_add_subtree(tf, *optp->subtree_index);
+
+ proto_tree_add_item(field_tree, hf_mip6_ipv4aa_status, tvb,
+ offset + MIP6_IPV4AA_STATUS_OFF, MIP6_IPV4AA_STATUS_LEN, FALSE);
+
+ p = offset + MIP6_IPV4AA_PREFIXL_OFF;
+ len = MIP6_IPV4AA_PREFIXL_LEN;
+
+ proto_tree_add_item(field_tree, hf_mip6_ipv4ha_preflen, tvb, p, len, FALSE);
+
+ proto_tree_add_item(field_tree, hf_mip6_ipv4aa_ha, tvb,
+ offset + MIP6_IPV4AA_HA_OFF, MIP6_IPV4AA_HA_LEN, FALSE);
+
+}
+
+static void
+dissect_pmip6_opt_grek(const ip_tcp_opt *optp _U_, tvbuff_t *tvb, int offset,
+ guint optlen _U_, packet_info *pinfo _U_, proto_tree *opt_tree)
+{
+ proto_tree_add_item(opt_tree, hf_pmip6_gre_key, tvb,
+ offset + PMIP6_GREK_ID_OFF, PMIP6_GREK_ID_LEN, FALSE);
+
+}
+
static const ip_tcp_opt mip6_opts[] = {
{
PAD1, /* 0 Pad1 [RFC3775] */
@@ -713,6 +862,22 @@ static const ip_tcp_opt mip6_opts[] = {
dissect_mip6_opt_mnid
},
{
+ VSM, /* 19 Vendor Specific Mobility Option [RFC5094] */
+ "Vendor Specific Mobility",
+ &ett_mip6_opt_vsm,
+ VARIABLE_LENGTH,
+ MIP6_VSM_MINLEN,
+ dissect_mip6_opt_vsm
+},
+{
+ SSM, /* 20 Service Selection Mobility Option [RFC5149] */
+ "Service Selection Mobility",
+ &ett_mip6_opt_ssm,
+ VARIABLE_LENGTH,
+ MIP6_SSM_MINLEN,
+ dissect_mip6_opt_ssm
+},
+{
HNP,
"Home Network Prefix",
&ett_pmip6_opt_hnp,
@@ -721,6 +886,22 @@ static const ip_tcp_opt mip6_opts[] = {
dissect_nemo_opt_mnp
},
{
+ MOHI,
+ "Handoff Indicator Option",
+ &ett_pmip6_opt_hi,
+ FIXED_LENGTH,
+ PMIP6_HI_LEN,
+ dissect_pmip6_opt_hi
+},
+{
+ ATT,
+ "Access Technology Type Option",
+ &ett_pmip6_opt_att,
+ FIXED_LENGTH,
+ PMIP6_ATT_LEN,
+ dissect_pmip6_opt_att
+},
+{
TS,
"Timestamp",
&ett_pmip6_opt_ts,
@@ -728,53 +909,34 @@ static const ip_tcp_opt mip6_opts[] = {
PMIP6_TS_LEN,
dissect_pmip6_opt_ts
},
+{
+ IPV4HA,
+ "IPv4 Home Address",
+ &ett_mip6_opt_ipv4ha,
+ FIXED_LENGTH,
+ MIP6_IPV4HA_LEN,
+ dissect_pmip6_opt_ipv4ha
+},
+{
+ IPV4AA,
+ "IPv4 Address Acknowledgement",
+ &ett_mip6_opt_ipv4aa,
+ FIXED_LENGTH,
+ MIP6_IPV4AA_LEN,
+ dissect_pmip6_opt_ipv4aa
+},
+{
+ GREK,
+ "GRE Key",
+ &ett_pmip6_opt_grek,
+ FIXED_LENGTH,
+ PMIP6_GREK_LEN,
+ dissect_pmip6_opt_grek
+},
};
#define N_MIP6_OPTS (sizeof mip6_opts / sizeof mip6_opts[0])
-/* Mobility Option types
- * http://www.iana.org/assignments/mobility-parameters/mobility-parameters.xhtml
- */
-
-static const value_string nas_eps_emm_lcs_ind_vals[] = {
- { 0, "Pad1"}, /* RFC3775 */
- { 1, "PadN"}, /* RFC3775 */
- { 2, "Binding Refresh Advice"}, /* RFC3775 */
- { 3, "Alternate Care-of Address"}, /* RFC3775 */
- { 4, "Nonce Indices"}, /* RFC3775 */
- { 5, "Authorization Data"}, /* RFC3775 */
- { 6, "Mobile Network Prefix Option"}, /* RFC3963 */
- { 7, "Mobility Header Link-Layer Address option"}, /* RFC5568 */
- { 8, "MN-ID-OPTION-TYPE"}, /* RFC4283 */
- { 9, "AUTH-OPTION-TYPE"}, /* RFC4285 */
- { 10, "MESG-ID-OPTION-TYPE"}, /* RFC4285 */
- { 11, "CGA Parameters Request"}, /* RFC4866 */
- { 12, "CGA Parameters"}, /* RFC4866 */
- { 13, "Signature"}, /* RFC4866 */
- { 14, "Permanent Home Keygen Token"}, /* RFC4866 */
- { 15, "Care-of Test Init"}, /* RFC4866 */
- { 16, "Care-of Test"}, /* RFC4866 */
- { 17, "DNS-UPDATE-TYPE"}, /* RFC5026 */
- { 18, "Experimental Mobility Option"}, /* RFC5096 */
- { 19, "Vendor Specific Mobility Option"}, /* RFC5094 */
- { 20, "Service Selection Mobility Option"}, /* RFC5149 */
- { 21, "Binding Authorization Data for FMIPv6 (BADF)"}, /* RFC5568 */
- { 22, "Home Network Prefix Option"}, /* RFC5213 */
- { 23, "Handoff Indicator Option"}, /* RFC5213 */
- { 24, "Access Technology Type Option"}, /* RFC5213 */
- { 25, "Mobile Node Link-layer Identifier Option"}, /* RFC5213 */
- { 26, "Link-local Address Option"}, /* RFC5213 */
- { 27, "Timestamp Option"}, /* RFC5213 */
- { 28, "Restart Counter"}, /* RFC-ietf-netlmm-pmipv6-heartbeat-07 */
- { 29, "IPv4 Home Address"}, /* RFC5555 */
- { 30, "IPv4 Address Acknowledgement"}, /* RFC5555 */
- { 31, "NAT Detection"}, /* RFC5555 */
- { 32, "IPv4 Care-of Address"}, /* RFC5555 */
- { 33, "GRE Key Option"}, /* RFC-ietf-netlmm-grekey-option-09 */
- { 34, "Mobility Header IPv6 Address/Prefix"}, /* RFC5568 */
- { 35, "Binding Identifier"}, /* RFC-ietf-monami6-multiplecoa-14 */
- { 0, NULL }
-};
/* Like "dissect_ip_tcp_options()", but assumes the length of an option
* *doesn't* include the type and length bytes. The option parsers,
@@ -963,13 +1125,13 @@ dissect_mip6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
case HOTI:
offset = dissect_mip6_hoti(tvb, mip6_tree, pinfo);
break;
- case COTI:
+ case MHCOTI:
offset = dissect_mip6_coti(tvb, mip6_tree, pinfo);
break;
case HOT:
offset = dissect_mip6_hot(tvb, mip6_tree, pinfo);
break;
- case COT:
+ case MHCOT:
offset = dissect_mip6_cot(tvb, mip6_tree, pinfo);
break;
case BU:
@@ -1082,35 +1244,45 @@ proto_register_mip6(void)
FT_UINT16, BASE_DEC, NULL, 0,
NULL, HFILL }},
{ &hf_mip6_bu_a_flag, { "Acknowledge (A) flag", "mip6.bu.a_flag",
- FT_BOOLEAN, 8, TFS(&mip6_bu_a_flag_value),
- 0x80, NULL, HFILL }},
+ FT_BOOLEAN, 16, TFS(&mip6_bu_a_flag_value),
+ 0x8000, NULL, HFILL }},
{ &hf_mip6_bu_h_flag, { "Home Registration (H) flag",
"mip6.bu.h_flag",
- FT_BOOLEAN, 8, TFS(&mip6_bu_h_flag_value),
- 0x40, NULL, HFILL }},
+ FT_BOOLEAN, 16, TFS(&mip6_bu_h_flag_value),
+ 0x4000, NULL, HFILL }},
{ &hf_mip6_bu_l_flag, { "Link-Local Compatibility (L) flag",
"mip6.bu.l_flag",
- FT_BOOLEAN, 8, TFS(&mip6_bu_l_flag_value),
- 0x20, "Home Registration (H) flag", HFILL }},
+ FT_BOOLEAN, 16, TFS(&mip6_bu_l_flag_value),
+ 0x2000, "Home Registration (H) flag", HFILL }},
{ &hf_mip6_bu_k_flag, { "Key Management Compatibility (K) flag",
"mip6.bu.k_flag",
- FT_BOOLEAN, 8, TFS(&mip6_bu_k_flag_value),
- 0x10, NULL,
+ FT_BOOLEAN, 16, TFS(&mip6_bu_k_flag_value),
+ 0x1000, NULL,
HFILL }},
{ &hf_mip6_bu_m_flag, { "MAP Registration Compatibility (M) flag",
"mip6.bu.m_flag",
- FT_BOOLEAN, 8, TFS(&mip6_bu_m_flag_value),
- 0x08, NULL,
+ FT_BOOLEAN, 16, TFS(&mip6_bu_m_flag_value),
+ 0x0800, NULL,
HFILL }},
{ &hf_nemo_bu_r_flag, { "Mobile Router (R) flag",
"nemo.bu.r_flag",
- FT_BOOLEAN, 8, TFS(&nemo_bu_r_flag_value),
- 0x04, NULL,
+ FT_BOOLEAN, 16, TFS(&nemo_bu_r_flag_value),
+ 0x0400, NULL,
HFILL }},
{ &hf_proxy_bu_p_flag, { "Proxy Registration (P) flag",
"mip6.bu.p_flag",
- FT_BOOLEAN, 8, TFS(&proxy_bu_p_flag_value),
- 0x02, NULL,
+ FT_BOOLEAN, 16, TFS(&proxy_bu_p_flag_value),
+ 0x0200, NULL,
+ HFILL }},
+ { &hf_proxy_bu_f_flag, { "Forcing UDP encapsulation (F) flag",
+ "mip6.bu.f_flag",
+ FT_BOOLEAN, 16, TFS(&proxy_bu_f_flag_value),
+ 0x0100, NULL,
+ HFILL }},
+ { &hf_proxy_bu_t_flag, { "TLV-header format (T) flag",
+ "mip6.bu.t_flag",
+ FT_BOOLEAN, 16, TFS(&proxy_bu_t_flag_value),
+ 0x0080, NULL,
HFILL }},
{ &hf_mip6_bu_lifetime, { "Lifetime", "mip6.bu.lifetime",
FT_UINT16, BASE_DEC, NULL, 0,
@@ -1135,6 +1307,11 @@ proto_register_mip6(void)
FT_BOOLEAN, 8, TFS(&proxy_bu_p_flag_value),
0x20, NULL,
HFILL }},
+ { &hf_proxy_ba_t_flag, { "TLV-header format (T) flag",
+ "proxy.ba.t_flag",
+ FT_BOOLEAN, 8, TFS(&proxy_bu_t_flag_value),
+ 0x10, NULL,
+ HFILL }},
{ &hf_mip6_ba_seqnr, { "Sequence number", "mip6.ba.seqnr",
FT_UINT16, BASE_DEC, NULL, 0,
@@ -1220,7 +1397,7 @@ proto_register_mip6(void)
NULL, HFILL }},
{ &hf_fmip6_lla_optcode, { "Option-Code", "mip6.lla.optcode",
- FT_UINT8, BASE_DEC, VALS(&fmip6_lla_optcode_value), 0,
+ FT_UINT8, BASE_DEC, VALS(fmip6_lla_optcode_value), 0,
NULL, HFILL }},
{ &hf_nemo_mnp_pfl, { "Mobile Network Prefix Length", "nemo.mnp.pfl",
@@ -1232,14 +1409,59 @@ proto_register_mip6(void)
NULL, HFILL }},
{ &hf_mip6_mnid_subtype, { "Subtype", "mip6.mnid.subtype",
- FT_UINT8, BASE_DEC, VALS(&mip6_mnid_subtype_value), 0,
+ FT_UINT8, BASE_DEC, VALS(mip6_mnid_subtype_value), 0,
+ NULL, HFILL }},
+
+ { &hf_mip6_vsm_vid, { "VendorId", "mip6.vsm.vendorId",
+ FT_UINT32, BASE_DEC, VALS(sminmpec_values), 0x0,
+ NULL, HFILL }},
+
+ { &hf_mip6_vsm_subtype, { "Subtype", "mip6.vsm.subtype",
+ FT_UINT8, BASE_DEC, VALS(mip6_vsm_subtype_value), 0,
+ NULL, HFILL }},
+
+ { &hf_mip6_vsm_subtype_3gpp, { "Subtype", "mip6.vsm.subtype",
+ FT_UINT8, BASE_DEC, VALS(mip6_vsm_subtype_3gpp_value), 0,
+ NULL, HFILL }},
+
+ { &hf_pmip6_hi_opttype, { "Handoff Indicator Option type", "pmip6.hi",
+ FT_UINT8, BASE_DEC, VALS(pmip6_hi_opttype_value), 0,
+ NULL, HFILL }},
+
+ { &hf_pmip6_att_opttype, { "Access Technology Type Option type", "pmip6.att",
+ FT_UINT8, BASE_DEC, VALS(pmip6_att_opttype_value), 0,
NULL, HFILL }},
{ &hf_pmip6_timestamp, { "Timestamp", "pmip6.timestamp",
FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
- { &hf_mip6_mobility_opt, { "Mobility Options", "pmip6.mobility_opt",
- FT_UINT8, BASE_DEC, VALS(nas_eps_emm_lcs_ind_vals), 0, NULL, HFILL }},
+ { &hf_mip6_ipv4ha_preflen, { "Prefix-len", "mip6.ipv4ha.preflen",
+ FT_UINT8, BASE_DEC, NULL, 0xfc,
+ NULL, HFILL}},
+
+ { &hf_mip6_ipv4ha_p_flag, { "mobile network prefix (P) flag", "mip6.ipv4ha.p_flag",
+ FT_BOOLEAN, 16, TFS(&mip6_ipv4ha_p_flag_value), 0x0200,
+ NULL, HFILL }},
+
+ { &hf_mip6_ipv4ha_ha, { "IPv4 Home Address", "mip6.ipv4ha.ha",
+ FT_IPv4, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }},
+
+ { &hf_mip6_ipv4aa_status, { "Status", "mip6.ipv4aa.sts",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
+ { &hf_mip6_ipv4aa_ha, { "IPv4 Address Acknowledgement", "mip6.ipv4aa.ha",
+ FT_IPv4, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }},
+
+ { &hf_pmip6_gre_key, { "GRE Key", "pmip6.gre_key",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
+ { &hf_mip6_mobility_opt, { "Mobility Options", "pmip6.mobility_opt",
+ FT_UINT8, BASE_DEC, VALS(mip6_mobility_options), 0,
+ NULL, HFILL }},
};
/* Setup protocol subtree array */
@@ -1253,8 +1475,15 @@ proto_register_mip6(void)
&ett_fmip6_opt_lla,
&ett_nemo_opt_mnp,
&ett_mip6_opt_mnid,
+ &ett_mip6_opt_vsm,
+ &ett_mip6_opt_ssm,
&ett_pmip6_opt_hnp,
- &ett_pmip6_opt_ts
+ &ett_pmip6_opt_hi,
+ &ett_pmip6_opt_att,
+ &ett_pmip6_opt_ts,
+ &ett_mip6_opt_ipv4ha,
+ &ett_mip6_opt_ipv4aa,
+ &ett_pmip6_opt_grek,
};
/* Register the protocol name and description */
diff --git a/epan/dissectors/packet-mip6.h b/epan/dissectors/packet-mip6.h
index 3b70ebf337..88d4174446 100644
--- a/epan/dissectors/packet-mip6.h
+++ b/epan/dissectors/packet-mip6.h
@@ -38,9 +38,9 @@
typedef enum {
BRR = 0,
HOTI = 1,
- COTI = 2,
+ MHCOTI = 2,
HOT = 3,
- COT = 4,
+ MHCOT = 4,
BU = 5,
BA = 6,
BE = 7,
@@ -58,9 +58,9 @@ typedef enum {
static const value_string mip6_mh_types[] = {
{BRR, "Binding Refresh Request"},
{HOTI, "Home Test Init"},
- {COTI, "Care-of Test Init"},
+ {MHCOTI, "Care-of Test Init"},
{HOT, "Home Test"},
- {COT, "Care-of Test"},
+ {MHCOT, "Care-of Test"},
{BU, "Binding Update"},
{BA, "Binding Acknowledgement"},
{BE, "Binding Error"},
@@ -89,35 +89,40 @@ typedef enum {
MNP = 6, /* 6 Mobile Network Prefix Option */
MHLLA = 7, /* 7 Mobility Header Link-Layer Address option [RFC5568] */
MNID = 8, /* 8 MN-ID-OPTION-TYPE */
- /* 9 AUTH-OPTION-TYPE */
- /* 10 MESG-ID-OPTION-TYPE [RFC4285] */
- /* 11 CGA Parameters Request [RFC4866] */
- /* 12 CGA Parameters [RFC4866] */
- /* 13 Signature [RFC4866] */
- /* 14 Permanent Home Keygen Token [RFC4866] */
- /* 15 Care-of Test Init [RFC4866] */
- /* 16 Care-of Test [RFC4866] */
- /* 17 DNS-UPDATE-TYPE [RFC5026] */
- /* 18 Experimental Mobility Option [RFC5096] */
- /* 19 Vendor Specific Mobility Option [RFC5094] */
- /* 20 Service Selection Mobility Option [RFC5149] */
- /* 21 Binding Authorization Data for FMIPv6 (BADF) [RFC5568] */
- HNP = 22, /* Home Network Prefix */
- /* 22 Home Network Prefix Option [RFC5213] */
- /* 23 Handoff Indicator Option [RFC5213] */
- /* 24 Access Technology Type Option [RFC5213] */
- /* 25 Mobile Node Link-layer Identifier Option [RFC5213] */
- /* 26 Link-local Address Option [RFC5213 */
- TS = 27 /* Timestamp */
- /* 28 Restart Counter [RFC-ietf-netlmm-pmipv6-heartbeat-07] */
- /* 29 IPv4 Home Address [RFC5555] */
- /* 30 IPv4 Address Acknowledgement [RFC5555] */
- /* 31 NAT Detection [RFC5555] */
- /* 32 IPv4 Care-of Address [RFC5555] */
- /* 33 GRE Key Option [RFC-ietf-netlmm-grekey-option-09] */
- /* 34 Mobility Header IPv6 Address/Prefix [RFC5568] */
- /* 35 Binding Identifier [RFC-ietf-monami6-multiplecoa-14] */
-
+ AUTH = 9, /* 9 AUTH-OPTION-TYPE */
+ MESGID = 10, /* 10 MESG-ID-OPTION-TYPE [RFC4285] */
+ CGAPR = 11, /* 11 CGA Parameters Request [RFC4866] */
+ CGAR = 12, /* 12 CGA Parameters [RFC4866] */
+ SIGN = 13, /* 13 Signature [RFC4866] */
+ PHKT = 14, /* 14 Permanent Home Keygen Token [RFC4866] */
+ MOCOTI = 15, /* 15 Care-of Test Init [RFC4866] */
+ MOCOT = 16, /* 16 Care-of Test [RFC4866] */
+ DNSU = 17, /* 17 DNS-UPDATE-TYPE [RFC5026] */
+ EM = 18, /* 18 Experimental Mobility Option [RFC5096] */
+ VSM = 19, /* 19 Vendor Specific Mobility Option [RFC5094] */
+ SSM = 20, /* 20 Service Selection Mobility Option [RFC5149] */
+ BADFF = 21, /* 21 Binding Authorization Data for FMIPv6 (BADF) [RFC5568] */
+ HNP = 22, /* 22 Home Network Prefix Option [RFC5213] */
+ MOHI = 23, /* 23 Handoff Indicator Option [RFC5213] */
+ ATT = 24, /* 24 Access Technology Type Option [RFC5213] */
+ MNLLI = 25, /* 25 Mobile Node Link-layer Identifier Option [RFC5213] */
+ LLA = 26, /* 26 Link-local Address Option [RFC5213 */
+ TS = 27, /* 27 Timestamp */
+ RC = 28, /* 28 Restart Counter [RFC-ietf-netlmm-pmipv6-heartbeat-07] */
+ IPV4HA = 29, /* 29 IPv4 Home Address [RFC5555] */
+ IPV4AA = 30, /* 30 IPv4 Address Acknowledgement [RFC5555] */
+ NATD = 31, /* 31 NAT Detection [RFC5555] */
+ IPV4COA = 32, /* 32 IPv4 Care-of Address [RFC5555] */
+ GREK = 33, /* 33 GRE Key Option [RFC-ietf-netlmm-grekey-option-09] */
+ MHIPV6AP = 34, /* 34 Mobility Header IPv6 Address/Prefix [RFC5568] */
+ BI = 35, /* 35 Binding Identifier [RFC-ietf-monami6-multiplecoa-14] */
+ IPV4HAREQ = 36, /* 36 IPv4 Home Address Request [RFC5844] */
+ IPV4HAREP = 37, /* 37 IPv4 Home Address Reply [RFC5844] */
+ IPV4DRA = 38, /* 38 IPv4 Default-Router Address [RFC5844] */
+ IPV4DSM = 39, /* 39 IPv4 DHCP Support Mode [RFC5844] */
+ CR = 40, /* 40 Context Request Option [RFC-ietf-mipshop-pfmipv6-14] */
+ LMAA = 41, /* 41 Local Mobility Anchor Address Option [RFC-ietf-mipshop-pfmipv6-14] */
+ MNLLAII = 42, /* 42 Mobile Node Link-local Address Interface Identifier Option [RFC-ietf-mipshop-pfmipv6-14] */
} optTypes;
/* Binding Update flag description */
@@ -156,6 +161,16 @@ static const true_false_string proxy_bu_p_flag_value = {
"No Proxy Registration"
};
+static const true_false_string proxy_bu_f_flag_value = {
+ "Forcing UDP encapsulation used",
+ "No Forcing UDP encapsulation"
+};
+
+static const true_false_string proxy_bu_t_flag_value = {
+ "TLV-header format used",
+ "No TLV-header format"
+};
+
/* Binding Acknowledgement status values */
static const value_string mip6_ba_status_value[] = {
{ 0, "Binding Update accepted" },
@@ -245,6 +260,119 @@ static const value_string mip6_mnid_subtype_value[] = {
{ 0, NULL }
};
+/* mobile network prefix flag description */
+static const true_false_string mip6_ipv4ha_p_flag_value = {
+ "mobile network prefixt requested",
+ "mobile network prefix not requested"
+};
+
+/* Vendor-Specific Mobility Option */
+static const value_string mip6_vsm_subtype_value[] = {
+ { 0, NULL }
+};
+
+/* Vendor-Specific Mobility Option (3GPP TS29.282) */
+static const value_string mip6_vsm_subtype_3gpp_value[] = {
+ { 1, "Protocol Configuration Options" },
+ { 2, "3GPP Specific PMIPv6 Error Code" },
+ { 3, "PMIPv6 PDN GW IP Address" },
+ { 4, "PMIPv6 DHCPv4 Address Allocation Procedure Indication" },
+ { 5, "PMIPv6 Fully Qualified PDN Connection Set Identifier" },
+ { 6, "PMIPv6 PDN type indication" },
+ { 7, "Charging ID" },
+ { 8, "Selection Mode" },
+ { 9, "I-WLAN Mobility Access Point Name (APN)" },
+ { 10, "Charging Characteristics" },
+ { 11, "Mobile Equipment Identity (MEI)" },
+ { 12, "MSISDN" },
+ { 13, "Serving Network" },
+ { 14, "APN Restriction" },
+ { 15, "Maximum APN Restriction" },
+ { 16, "Unauthenticated IMSI" },
+ { 17, "PDN Connection ID" },
+ { 0, NULL }
+};
+
+/* Handoff Indicator Option type */
+static const value_string pmip6_hi_opttype_value[] = {
+ { 0, "Reserved" },
+ { 1, "Attachment over a new interface" },
+ { 2, "Handoff between two different interfaces of the mobile node" },
+ { 3, "Handoff between mobile access gateways for the same interface" },
+ { 4, "Handoff state unknown" },
+ { 5, "Handoff state not changed (Re-registration)" },
+ { 0, NULL }
+};
+
+/* Access Technology Type Option type */
+static const value_string pmip6_att_opttype_value[] = {
+ { 0, "Reserved" },
+ { 1, "Virtual" },
+ { 2, "PPP" },
+ { 3, "IEEE 802.3" },
+ { 4, "IEEE 802.11a/b/g" },
+ { 5, "IEEE 802.16e" },
+ { 6, "3GPP GERAN" },
+ { 7, "3GPP UTRAN" },
+ { 8, "3GPP E-UTRAN" },
+ { 9, "3GPP2 eHRPD" },
+ { 10, "3GPP2 HRPD" },
+ { 11, "3GPP2 1xRTT" },
+ { 12, "3GPP2 UMB" },
+ { 0, NULL }
+};
+
+/* Mobility Option types
+ * http://www.iana.org/assignments/mobility-parameters/mobility-parameters.xhtml
+ */
+
+static const value_string mip6_mobility_options[] = {
+ { PAD1, "Pad1"}, /* RFC3775 */
+ { PADN, "PadN"}, /* RFC3775 */
+ { BRA, "Binding Refresh Advice"}, /* RFC3775 */
+ { ACOA, "Alternate Care-of Address"}, /* RFC3775 */
+ { NI, "Nonce Indices"}, /* RFC3775 */
+ { AUTD, "Authorization Data"}, /* RFC3775 */
+ { MNP, "Mobile Network Prefix Option"}, /* RFC3963 */
+ { MHLLA, "Mobility Header Link-Layer Address option"}, /* RFC5568 */
+ { MNID, "MN-ID-OPTION-TYPE"}, /* RFC4283 */
+ { AUTH, "AUTH-OPTION-TYPE"}, /* RFC4285 */
+ { MESGID, "MESG-ID-OPTION-TYPE"}, /* RFC4285 */
+ { CGAPR, "CGA Parameters Request"}, /* RFC4866 */
+ { CGAR, "CGA Parameters"}, /* RFC4866 */
+ { SIGN, "Signature"}, /* RFC4866 */
+ { PHKT, "Permanent Home Keygen Token"}, /* RFC4866 */
+ { MOCOTI, "Care-of Test Init"}, /* RFC4866 */
+ { MOCOT, "Care-of Test"}, /* RFC4866 */
+ { DNSU, "DNS-UPDATE-TYPE"}, /* RFC5026 */
+ { EM, "Experimental Mobility Option"}, /* RFC5096 */
+ { VSM, "Vendor Specific Mobility Option"}, /* RFC5094 */
+ { SSM, "Service Selection Mobility Option"}, /* RFC5149 */
+ { BADFF, "Binding Authorization Data for FMIPv6 (BADF)"}, /* RFC5568 */
+ { HNP, "Home Network Prefix Option"}, /* RFC5213 */
+ { MOHI, "Handoff Indicator Option"}, /* RFC5213 */
+ { ATT, "Access Technology Type Option"}, /* RFC5213 */
+ { MNLLI, "Mobile Node Link-layer Identifier Option"}, /* RFC5213 */
+ { LLA, "Link-local Address Option"}, /* RFC5213 */
+ { TS, "Timestamp Option"}, /* RFC5213 */
+ { RC, "Restart Counter"}, /* RFC5847 */
+ { IPV4HA, "IPv4 Home Address"}, /* RFC5555 */
+ { IPV4AA, "IPv4 Address Acknowledgement"}, /* RFC5555 */
+ { NATD, "NAT Detection"}, /* RFC5555 */
+ { IPV4COA, "IPv4 Care-of Address"}, /* RFC5555 */
+ { GREK, "GRE Key Option"}, /* RFC5845 */
+ { MHIPV6AP, "Mobility Header IPv6 Address/Prefix"}, /* RFC5568 */
+ { BI, "Binding Identifier"}, /* RFC5648 */
+ { IPV4HAREQ, "IPv4 Home Address Request"}, /* RFC5844 */
+ { IPV4HAREP, "IPv4 Home Address Reply"}, /* RFC5844 */
+ { IPV4DRA, "IPv4 Default-Router Address"}, /* RFC5844 */
+ { IPV4DSM, "IPv4 DHCP Support Mode"}, /* RFC5844 */
+ { CR, "Context Request Option"}, /* RFC-ietf-mipshop-pfmipv6-14 */
+ { LMAA, "Local Mobility Anchor Address Option"}, /* RFC-ietf-mipshop-pfmipv6-14 */
+ { MNLLAII, "Mobile Node Link-local Address Interface Identifier Option"}, /* RFC-ietf-mipshop-pfmipv6-14 */
+ { 0, NULL }
+};
+
/* Message lengths */
#define MIP6_BRR_LEN 2
#define MIP6_HOTI_LEN 10
@@ -315,8 +443,8 @@ static const value_string mip6_mnid_subtype_value[] = {
#define MIP6_BU_LIFETIME_OFF 10
#define MIP6_BU_OPTS_OFF 12
#define MIP6_BU_SEQNR_LEN 2
-#define MIP6_BU_FLAGS_LEN 1
-#define MIP6_BU_RES_LEN 1
+#define MIP6_BU_FLAGS_LEN 2
+#define MIP6_BU_RES_LEN 0
#define MIP6_BU_LIFETIME_LEN 2
#define MIP6_BA_STATUS_OFF 6
@@ -441,6 +569,43 @@ static const value_string mip6_mnid_subtype_value[] = {
#define MIP6_MNID_SUBTYPE_LEN 1
#define MIP6_MNID_MNID_OFF 3
+#define MIP6_VSM_MINLEN 2
+#define MIP6_VSM_VID_OFF 2
+#define MIP6_VSM_VID_LEN 4
+#define MIP6_VSM_SUBTYPE_OFF 6
+#define MIP6_VSM_SUBTYPE_LEN 1
+#define MIP6_VSM_DATA_OFF 7
+
+
+#define MIP6_SSM_MINLEN 2
+#define MIP6_SSM_SSM_OFF 2
+
+#define PMIP6_HI_LEN 2
+#define PMIP6_HI_HI_OFF 3
+#define PMIP6_HI_HI_LEN 1
+
+#define PMIP6_ATT_LEN 2
+#define PMIP6_ATT_ATT_OFF 3
+#define PMIP6_ATT_ATT_LEN 1
+
#define PMIP6_TS_LEN 8
+#define MIP6_IPV4HA_LEN 6
+#define MIP6_IPV4HA_PREFIXL_OFF 2
+#define MIP6_IPV4HA_PREFIXL_LEN 1
+#define MIP6_IPV4HA_HA_OFF 4
+#define MIP6_IPV4HA_HA_LEN 4
+
+#define MIP6_IPV4AA_LEN 6
+#define MIP6_IPV4AA_STATUS_OFF 2
+#define MIP6_IPV4AA_STATUS_LEN 1
+#define MIP6_IPV4AA_PREFIXL_OFF 3
+#define MIP6_IPV4AA_PREFIXL_LEN 1
+#define MIP6_IPV4AA_HA_OFF 4
+#define MIP6_IPV4AA_HA_LEN 4
+
+#define PMIP6_GREK_LEN 6
+#define PMIP6_GREK_ID_OFF 4
+#define PMIP6_GREK_ID_LEN 4
+
#endif /* __PACKET_MIP6_H_DEFINED__ */