summaryrefslogtreecommitdiff
path: root/epan
diff options
context:
space:
mode:
authorJan Spevak <jan.spevak@nokia.com>2017-02-03 11:07:12 +0100
committerAnders Broman <a.broman58@gmail.com>2017-02-10 20:27:02 +0000
commitd13da6c408bd3b8fe908bc90ea2b60f6059c388d (patch)
treeceaa186f0c277e42ac604e4833b36fddffd1f241 /epan
parent0bf7ba3de5a3d3b9de81506820dc3301cb96be0f (diff)
downloadwireshark-d13da6c408bd3b8fe908bc90ea2b60f6059c388d.tar.gz
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: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-diameter_3gpp.c20
-rw-r--r--epan/dissectors/packet-diameter_3gpp.h2
-rw-r--r--epan/dissectors/packet-gtpv2.c3
-rw-r--r--epan/dissectors/packet-gtpv2.h1
4 files changed, 23 insertions, 3 deletions
diff --git a/epan/dissectors/packet-diameter_3gpp.c b/epan/dissectors/packet-diameter_3gpp.c
index c2d7b3ca4e..f4e8ffed7e 100644
--- a/epan/dissectors/packet-diameter_3gpp.c
+++ b/epan/dissectors/packet-diameter_3gpp.c
@@ -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 }
},
+
};
diff --git a/epan/dissectors/packet-diameter_3gpp.h b/epan/dissectors/packet-diameter_3gpp.h
index 44f4b90af6..e4a7fe3271 100644
--- a/epan/dissectors/packet-diameter_3gpp.h
+++ b/epan/dissectors/packet-diameter_3gpp.h
@@ -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:
*/
diff --git a/epan/dissectors/packet-gtpv2.c b/epan/dissectors/packet-gtpv2.c
index 41bfd28aca..cd5a7ad5a6 100644
--- a/epan/dissectors/packet-gtpv2.c
+++ b/epan/dissectors/packet-gtpv2.c
@@ -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;
diff --git a/epan/dissectors/packet-gtpv2.h b/epan/dissectors/packet-gtpv2.h
index 6e6d55fb4b..08f6fc790d 100644
--- a/epan/dissectors/packet-gtpv2.h
+++ b/epan/dissectors/packet-gtpv2.h
@@ -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;