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>
This commit is contained in:
Binh Trinh 2016-06-16 23:51:14 -04:00 committed by Anders Broman
parent e912db4546
commit ecd4120934
1 changed files with 42 additions and 0 deletions

View File

@ -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,