aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-mip6.c
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2012-10-26 15:35:41 +0000
committerAnders Broman <anders.broman@ericsson.com>2012-10-26 15:35:41 +0000
commita579e9875bf08e0c41c1a7f58a7a3c50ebff8a13 (patch)
treed39a047a840dde6357397c30efee64b7c8f0c5be /epan/dissectors/packet-mip6.c
parentb3572877dad38a561a8360f3c7b71043faf43573 (diff)
Prepare to dissect 3GPP options.
svn path=/trunk/; revision=45797
Diffstat (limited to 'epan/dissectors/packet-mip6.c')
-rw-r--r--epan/dissectors/packet-mip6.c100
1 files changed, 89 insertions, 11 deletions
diff --git a/epan/dissectors/packet-mip6.c b/epan/dissectors/packet-mip6.c
index bcd6200bc8..26c3767548 100644
--- a/epan/dissectors/packet-mip6.c
+++ b/epan/dissectors/packet-mip6.c
@@ -967,6 +967,9 @@ static int hf_mip6_hb_u_flag = -1;
static int hf_mip6_hb_r_flag = -1;
static int hf_mip6_hb_seqnr = -1;
+static int hf_mip6_opt_3gpp_reserved = -1;
+static int hf_mip6_opt_3gpp_flag_m = -1;
+
static int hf_mip6_bra_interval = -1;
static int hf_mip6_acoa_acoa = -1;
@@ -1554,6 +1557,70 @@ dissect_pmip6_bri(tvbuff_t *tvb, proto_tree *mip6_tree, packet_info *pinfo)
}
/* Functions to dissect the mobility options */
+/*Dissect vendor option 3GPP
+ * Ref Mobile IPv6 vendor specific option format and usage within 3GPP
+ * (3GPP TS 29.282 version 10.2.0 Release 10)
+ */
+
+/*
+
+ 0 1 2 3
+ 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | Type | Length |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | Vendor ID |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | Sub-Type | Reserved |M| 3GPP Specific IE Data Fragment
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+*/
+static void
+dissect_mip6_opt_vsm_3gpp(const mip6_opt *optp _U_, tvbuff_t *tvb, int offset,
+ guint optlen, packet_info *pinfo _U_, proto_tree *opt_tree, proto_item *hdr_item _U_ )
+{
+ int len = optlen;
+ guint8 sub_type;
+
+ /* offset points to the sub type */
+ sub_type = tvb_get_guint8(tvb,offset);
+ proto_tree_add_item(opt_tree, hf_mip6_vsm_subtype_3gpp, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_item_append_text(hdr_item, " %s", val_to_str_const(sub_type, mip6_vsm_subtype_3gpp_value, "<unknown>"));
+ offset++;
+ proto_tree_add_item(opt_tree, hf_mip6_opt_3gpp_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(opt_tree, hf_mip6_opt_3gpp_flag_m, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset++;
+
+ /* set len to the lenght of the data section */
+ len = optlen - 8;
+ switch(sub_type){
+ /* 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 */
+ /* 18, "PGW Back-Off Time */
+ /* 19, "Signalling Priority Indication */
+ /* 20, "Additional Protocol Configuration Options */
+ default:
+ proto_tree_add_text(opt_tree, tvb, offset, len, "Data(Not dissected yet)");
+ break;
+ }
+
+
+}
/* 1 PadN [RFC3775] */
static void
dissect_mip6_opt_padn(const mip6_opt *optp, tvbuff_t *tvb, int offset,
@@ -1887,7 +1954,6 @@ dissect_mip6_opt_vsm(const mip6_opt *optp _U_, tvbuff_t *tvb, int offset,
{
int len;
guint32 vendorid;
- int hf_mip6_vsm_subtype_local;
/* offset points to tag(opt) */
offset++;
@@ -1898,18 +1964,17 @@ dissect_mip6_opt_vsm(const mip6_opt *optp _U_, tvbuff_t *tvb, int offset,
offset, MIP6_VSM_VID_LEN, ENC_BIG_ENDIAN);
vendorid = tvb_get_ntohl(tvb, offset);
proto_item_append_text(hdr_item, ": %s", val_to_str_ext_const(vendorid, &sminmpec_values_ext, "<unknown>"));
-
+ offset+=4;
switch (vendorid) {
case VENDOR_THE3GPP:
- hf_mip6_vsm_subtype_local = hf_mip6_vsm_subtype_3gpp;
- break;
+
+ dissect_mip6_opt_vsm_3gpp(optp, tvb, offset, optlen, pinfo, opt_tree, hdr_item);
+ return;
default:
- hf_mip6_vsm_subtype_local = hf_mip6_vsm_subtype;
break;
}
- offset+=4;
-
- proto_tree_add_item(opt_tree, hf_mip6_vsm_subtype_local, tvb,
+
+ proto_tree_add_item(opt_tree, hf_mip6_vsm_subtype, tvb,
offset, MIP6_VSM_SUBTYPE_LEN, ENC_BIG_ENDIAN);
offset++;
@@ -3472,9 +3537,22 @@ proto_register_mip6(void)
FT_UINT32, BASE_DEC, NULL, 0,
NULL, HFILL }},
- { &hf_mip6_bra_interval, { "Refresh interval", "mip6.bra.interval",
- FT_UINT16, BASE_DEC, NULL, 0,
- NULL, HFILL }},
+ { &hf_mip6_opt_3gpp_reserved,
+ { "Reserved", "mip6.3gpp.reserved",
+ FT_UINT8, BASE_DEC, NULL, 0xfe,
+ NULL, HFILL }
+ },
+ { &hf_mip6_opt_3gpp_flag_m,
+ { "M flag", "mip6.3gpp.flag.m",
+ FT_BOOLEAN, 8, NULL, 0x01,
+ NULL, HFILL }
+ },
+
+ { &hf_mip6_bra_interval,
+ { "Refresh interval", "mip6.bra.interval",
+ FT_UINT16, BASE_DEC, NULL, 0,
+ NULL, HFILL }
+ },
{ &hf_mip6_acoa_acoa, { "Alternate care-of address", "mip6.acoa.acoa",
FT_IPv6, BASE_NONE, NULL, 0,