Commit d13da6c4 authored by Jan Spevak's avatar Jan Spevak Committed by Anders Broman

diameter_3gpp: added decoding of TWAN-Identifier AVP

Change-Id: Ib3adec4f7abbdd0313e0017f540044ac45a8883a
Reviewed-on: https://code.wireshark.org/review/19930
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: 's avatarPetri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: 's avatarAnders Broman <a.broman58@gmail.com>
parent 0bf7ba3d
......@@ -100,10 +100,11 @@
<!--
<avp name="Reserved" code="28" mandatory="must" may-encrypt="yes" protected="may" vendor-bit="must" vendor-id="TGPP">
<type type-name="OctetString"/>
</avp>
<avp name="Reserved" code="29" mandatory="must" may-encrypt="yes" protected="may" vendor-bit="must" vendor-id="TGPP">
</avp> -->
<avp name="3GPP-TWAN-Identifier" code="29" mandatory="must" may-encrypt="yes" protected="may" vendor-bit="must" vendor-id="TGPP">
<type type-name="OctetString"/>
</avp>
<!--
<avp name="Reserved" code="30" mandatory="must" may-encrypt="yes" protected="may" vendor-bit="must" vendor-id="TGPP">
<type type-name="OctetString"/>
</avp>
......
......@@ -35,6 +35,7 @@
#include "packet-diameter.h"
#include "packet-diameter_3gpp.h"
#include "packet-gsm_a_common.h"
#include "packet-gtpv2.h"
#include "packet-e164.h"
#include "packet-e212.h"
#include "packet-ntp.h"
......@@ -562,6 +563,19 @@ dissect_diameter_3gpp_ms_timezone(tvbuff_t *tvb, packet_info *pinfo _U_, proto_t
return offset;
}
/* AVP Code: 29 3GPP-TWAN-Identifier
* 3GPP TS 29.061 V14.2.0 (2016-12)
*/
static int
dissect_diameter_3gpp_twan_identifier(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
{
int length = tvb_reported_length(tvb);
dissect_gtpv2_twan_identifier(tvb, pinfo, tree, NULL, length, 0, 0, NULL);
return length;
}
/*
* AVP Code: 504 AF-Application-Identifier
*/
......@@ -2067,6 +2081,9 @@ proto_reg_handoff_diameter_3gpp(void)
/* AVP Code: 23 3GPP-MS-TimeZone */
dissector_add_uint("diameter.3gpp", 23, create_dissector_handle(dissect_diameter_3gpp_ms_timezone, proto_diameter_3gpp));
/* AVP Code: 29 3GPP-TWAN-Identifier */
dissector_add_uint("diameter.3gpp", 29, create_dissector_handle(dissect_diameter_3gpp_twan_identifier, proto_diameter_3gpp));
/* AVP Code: 504 AF-Application-Identifier */
dissector_add_uint("diameter.3gpp", 504, create_dissector_handle(dissect_diameter_3gpp_af_application_identifier, proto_diameter_3gpp));
......@@ -4073,8 +4090,9 @@ proto_register_diameter_3gpp(void)
{ &hf_diameter_3gpp_emergency_ind_flags_spare_bits,
{ "Spare", "diameter.3gpp.emergency_ind_flags_spare",
FT_UINT32, BASE_HEX, NULL, 0xFFFFFFFE,
NULL, HFILL}
NULL, HFILL }
},
};
......
......@@ -90,6 +90,6 @@ static const value_string diameter_3gpp_termination_cause_vals[] = {
* indent-tabs-mode: nil
* End:
*
* ex: set shiftwidt=4 tabstop=8 expandtab:
* ex: set shiftwidth=4 tabstop=8 expandtab:
* :indentSize=4:tabSize=8:noTabs=true:
*/
......@@ -5827,7 +5827,8 @@ static const value_string gtpv2_twan_relay_id_type_vals[] = {
{ 1, "FQDN" },
{ 0, NULL }
};
static void
void
dissect_gtpv2_twan_identifier(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 message_type _U_, guint8 instance _U_, session_args_t * args _U_)
{
int offset = 0;
......
......@@ -27,6 +27,7 @@ extern void dissect_gtpv2_arp(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree
extern void dissect_gtpv2_fq_csid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 message_type _U_, guint8 instance _U_, session_args_t * args _U_);
extern void dissect_gtpv2_selec_mode(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item, guint16 length _U_, guint8 message_type _U_, guint8 instance _U_, session_args_t * args _U_);
extern void dissect_gtpv2_epc_timer(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 message_type _U_, guint8 instance _U_, session_args_t * args _U_);
extern void dissect_gtpv2_twan_identifier(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 message_type _U_, guint8 instance _U_, session_args_t * args _U_);
/*Used by custom dissector*/
extern gchar* dissect_gtpv2_tai(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int *offset);
extern value_string_ext gtpv2_cause_vals_ext;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment