aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-diameter_3gpp.c
diff options
context:
space:
mode:
authorBinh Trinh <beango@gmail.com>2016-06-16 23:51:14 -0400
committerAnders Broman <a.broman58@gmail.com>2016-06-17 17:24:57 +0000
commitecd4120934b09d7f28fc3c96ed4c7b47aa7d3de6 (patch)
treeb9cbbdec8e6502598ad5bd31d61d34f6d428108c /epan/dissectors/packet-diameter_3gpp.c
parente912db4546cba128d7283304ed2f9f0a271a257e (diff)
Diameter-3GPP: add AVP 21 RAT-Type decoding
Change-Id: Ibede796a52bb382525bc1f430d5fdecd555c233f Reviewed-on: https://code.wireshark.org/review/15993 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-diameter_3gpp.c')
-rw-r--r--epan/dissectors/packet-diameter_3gpp.c42
1 files changed, 42 insertions, 0 deletions
diff --git a/epan/dissectors/packet-diameter_3gpp.c b/epan/dissectors/packet-diameter_3gpp.c
index 84ad88b7ff..abe7f0bb39 100644
--- a/epan/dissectors/packet-diameter_3gpp.c
+++ b/epan/dissectors/packet-diameter_3gpp.c
@@ -48,6 +48,7 @@ static int proto_diameter_3gpp = -1;
static int hf_diameter_3gpp_timezone = -1;
static int hf_diameter_3gpp_timezone_adjustment = -1;
+static int hf_diameter_3gpp_rat_type = -1;
static int hf_diameter_3gpp_visited_nw_id = -1;
static int hf_diameter_3gpp_path = -1;
static int hf_diameter_3gpp_contact = -1;
@@ -350,6 +351,38 @@ dissect_diameter_3gpp_imeisv(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *
return length;
}
+/* AVP Code: 21 3GPP-RAT-Type
+* 3GPP TS 29.061, 29.274
+*/
+static const value_string diameter_3gpp_rat_type_vals[] = {
+ { 0, "Reserved" },
+ { 1, "UTRAN" },
+ { 2, "GERAN" },
+ { 3, "WLAN" },
+ { 4, "GAN" },
+ { 5, "HSPA Evolution" },
+ { 6, "EUTRAN (WB-E-UTRAN)" },
+ { 7, "Virtual" },
+ { 8, "EUTRAN-NB-IoT" },
+ { 101, "IEEE 802.16e" },
+ { 102, "3GPP2 eHRPD" },
+ { 103, "3GPP2 HRPD" },
+ { 104, "3GPP2 1xRTT" },
+ { 105, "3GPP2 UMB" },
+ { 0, NULL }
+};
+
+static int
+dissect_diameter_3gpp_rat_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
+{
+ int offset = 0;
+ int length = tvb_reported_length(tvb);
+
+ proto_tree_add_item(tree, hf_diameter_3gpp_rat_type, tvb, offset, 1, ENC_BIG_ENDIAN);
+
+ return length;
+}
+
/* AVP Code: 23 3GPP-MS-TimeZone
* 3GPP TS 29.061
*/
@@ -1787,6 +1820,10 @@ proto_reg_handoff_diameter_3gpp(void)
/* AVP Code: 20 3GPP-IMEISV */
dissector_add_uint("diameter.3gpp", 20, create_dissector_handle(dissect_diameter_3gpp_imeisv, proto_diameter_3gpp));
+ /* AVP Code: 21 3GPP-RAT-Access-Type */
+ dissector_add_uint("diameter.3gpp", 21, create_dissector_handle(dissect_diameter_3gpp_rat_type, proto_diameter_3gpp));
+
+
/* AVP Code: 22 3GPP-User-Location-Info
* Registered by packet-gtpv2.c
*/
@@ -2082,6 +2119,11 @@ proto_register_diameter_3gpp(void)
FT_UINT8, BASE_DEC, VALS(daylight_saving_time_vals), 0x03,
NULL, HFILL }
},
+ { &hf_diameter_3gpp_rat_type,
+ { "RAT Type", "diameter.3gpp.rat-type",
+ FT_UINT8, BASE_DEC, VALS(diameter_3gpp_rat_type_vals), 0x00,
+ NULL, HFILL }
+ },
{ &hf_diameter_3gpp_path,
{ "Path", "diameter.3gpp.path",
FT_STRING, BASE_NONE, NULL, 0x0,