aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2019-09-06 22:02:33 +0200
committerHarald Welte <laforge@gnumonks.org>2019-09-07 11:34:25 +0200
commitf6162faebcb95490749db8ce25e68b5b54ed4b06 (patch)
tree94044d9aa77df920ae41d07913da6122d23d948d
parent6f77a0ad9063e696962cfa4fbc22254553afe5dc (diff)
gsm_a_rr: Support for APDU ID ETWSlaforge/etws
According to 3GPP TS 44.018 V15.3.0 APDU ID 1 is ETWS. Change-Id: I6dceeb45c82f4f5c75fc46fea85d22ec9c4855e6 Note: ETWS is the Earthquake and Tsunami Warning System.
-rw-r--r--epan/dissectors/packet-gsm_a_rr.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/epan/dissectors/packet-gsm_a_rr.c b/epan/dissectors/packet-gsm_a_rr.c
index fcc714e2b4..d92018bcce 100644
--- a/epan/dissectors/packet-gsm_a_rr.c
+++ b/epan/dissectors/packet-gsm_a_rr.c
@@ -40,6 +40,7 @@
#include <epan/packet.h>
#include <epan/tap.h>
#include <epan/expert.h>
+#include <epan/proto_data.h>
#include "packet-ber.h"
#include "packet-gsm_a_common.h"
#include "packet-ppp.h"
@@ -556,6 +557,7 @@ static int hf_gsm_a_rr_apdu_id = -1;
static int hf_gsm_a_rr_apdu_flags_cr = -1;
static int hf_gsm_a_rr_apdu_flags_fs = -1;
static int hf_gsm_a_rr_apdu_flags_ls = -1;
+static int hf_gsm_a_rr_apdu_data = -1;
static int hf_gsm_a_rr_set_of_amr_codec_modes_v1_b8 = -1;
static int hf_gsm_a_rr_set_of_amr_codec_modes_v1_b7 = -1;
static int hf_gsm_a_rr_set_of_amr_codec_modes_v1_b6 = -1;
@@ -8779,12 +8781,15 @@ de_rr_sus_cau(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 o
*/
static const value_string gsm_a_rr_apdu_id_vals[] = {
{ 0, "RRLP (GSM 04.31) LCS" },
+ { 1, "ETWS (3GPP TS 23.041)" },
{ 0, NULL },
};
static guint16
de_rr_apdu_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
{
- proto_tree_add_item(tree, hf_gsm_a_rr_apdu_id, tvb, offset, 1, ENC_BIG_ENDIAN);
+ guint32 *ppi = wmem_new(wmem_file_scope(), guint32);
+ proto_tree_add_item_ret_uint(tree, hf_gsm_a_rr_apdu_id, tvb, offset, 1, ENC_BIG_ENDIAN, ppi);
+ p_add_proto_data(wmem_file_scope(), pinfo, proto_a_rr, 23, ppi);
return 0;
}
@@ -8823,10 +8828,13 @@ static guint16
de_rr_apdu_data(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
{
tvbuff_t *sub_tvb;
+ guint32 *ppi;
+ proto_tree_add_item(tree, hf_gsm_a_rr_apdu_data, tvb, offset, len, ENC_NA);
sub_tvb = tvb_new_subset_length(tvb, offset, len);
- if (rrlp_dissector)
+ ppi = (guint32 *) p_get_proto_data(wmem_file_scope(), pinfo, proto_a_rr, 23);
+ if (ppi && *ppi == 0 && rrlp_dissector)
call_dissector(rrlp_dissector, sub_tvb,pinfo, tree);
return len;
@@ -12660,6 +12668,11 @@ proto_register_gsm_a_rr(void)
FT_BOOLEAN, 8, TFS(&gsm_a_rr_apdu_flags_ls_value), 0x40,
NULL, HFILL }
},
+ { &hf_gsm_a_rr_apdu_data,
+ { "APDU Data","gsm_a.rr.apdu_data",
+ FT_BYTES, BASE_NONE, NULL, 0,
+ NULL, HFILL }
+ },
{ &hf_gsm_a_rr_set_of_amr_codec_modes_v1_b8,
{ "12,2 kbit/s codec rate", "gsm_a.rr.set_of_amr_codec_modes_v1b8",
FT_BOOLEAN,8, TFS(&gsm_a_rr_set_of_amr_codec_modes), 0x80,