aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/s1ap
diff options
context:
space:
mode:
authorAndersBroman <anders.broman@ericsson.com>2014-10-22 16:14:03 +0200
committerAnders Broman <a.broman58@gmail.com>2014-10-22 14:17:37 +0000
commit58304b9e3e2b742a01df164303c7d797cd6d498d (patch)
treec9832ede6e49dba9947cd22f4e09c445ea480f15 /asn1/s1ap
parent589db1c35be9fad3b3ae9e4ab5957154b39e15ad (diff)
S1AP: Add an S1AP context to be able to determine which message and
message type an IE was sent in. Needed to dissect proprietarry data. Change-Id: Ie75a2f6a544cb33e22c42457b0edd83e6456bfe5 Reviewed-on: https://code.wireshark.org/review/4910 Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'asn1/s1ap')
-rw-r--r--asn1/s1ap/packet-s1ap-template.c30
-rw-r--r--asn1/s1ap/packet-s1ap-template.h8
2 files changed, 30 insertions, 8 deletions
diff --git a/asn1/s1ap/packet-s1ap-template.c b/asn1/s1ap/packet-s1ap-template.c
index 23739213fa..f7d4c49f1c 100644
--- a/asn1/s1ap/packet-s1ap-template.c
+++ b/asn1/s1ap/packet-s1ap-template.c
@@ -136,7 +136,14 @@ static int dissect_TargetBSS_ToSourceBSS_TransparentContainer_PDU(tvbuff_t *tvb,
static int dissect_ProtocolIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
{
- return (dissector_try_uint(s1ap_ies_dissector_table, ProtocolIE_ID, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0;
+ s1ap_ctx_t s1ap_ctx;
+
+ s1ap_ctx.message_type = message_type;
+ s1ap_ctx.ProcedureCode = ProcedureCode;
+ s1ap_ctx.ProtocolIE_ID = ProtocolIE_ID;
+ s1ap_ctx.ProtocolExtensionID = ProtocolExtensionID;
+
+ return (dissector_try_uint_new(s1ap_ies_dissector_table, ProtocolIE_ID, tvb, pinfo, tree, TRUE, &s1ap_ctx)) ? tvb_captured_length(tvb) : 0;
}
/* Currently not used
static int dissect_ProtocolIEFieldPairFirstValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
@@ -152,22 +159,29 @@ static int dissect_ProtocolIEFieldPairSecondValue(tvbuff_t *tvb, packet_info *pi
static int dissect_ProtocolExtensionFieldExtensionValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
{
- return (dissector_try_uint(s1ap_extension_dissector_table, ProtocolExtensionID, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0;
+ s1ap_ctx_t s1ap_ctx;
+
+ s1ap_ctx.message_type = message_type;
+ s1ap_ctx.ProcedureCode = ProcedureCode;
+ s1ap_ctx.ProtocolIE_ID = ProtocolIE_ID;
+ s1ap_ctx.ProtocolExtensionID = ProtocolExtensionID;
+
+ return (dissector_try_uint_new(s1ap_extension_dissector_table, ProtocolExtensionID, tvb, pinfo, tree, TRUE, &s1ap_ctx)) ? tvb_captured_length(tvb) : 0;
}
-static int dissect_InitiatingMessageValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
+static int dissect_InitiatingMessageValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
- return (dissector_try_uint(s1ap_proc_imsg_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0;
+ return (dissector_try_uint_new(s1ap_proc_imsg_dissector_table, ProcedureCode, tvb, pinfo, tree, TRUE, data)) ? tvb_captured_length(tvb) : 0;
}
-static int dissect_SuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
+static int dissect_SuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
- return (dissector_try_uint(s1ap_proc_sout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0;
+ return (dissector_try_uint_new(s1ap_proc_sout_dissector_table, ProcedureCode, tvb, pinfo, tree, TRUE, data)) ? tvb_captured_length(tvb) : 0;
}
-static int dissect_UnsuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
+static int dissect_UnsuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
- return (dissector_try_uint(s1ap_proc_uout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0;
+ return (dissector_try_uint_new(s1ap_proc_uout_dissector_table, ProcedureCode, tvb, pinfo, tree, TRUE, data)) ? tvb_captured_length(tvb) : 0;
}
diff --git a/asn1/s1ap/packet-s1ap-template.h b/asn1/s1ap/packet-s1ap-template.h
index 6ff4bfcdde..badaea0e68 100644
--- a/asn1/s1ap/packet-s1ap-template.h
+++ b/asn1/s1ap/packet-s1ap-template.h
@@ -23,6 +23,14 @@
#ifndef PACKET_S1AP_H
#define PACKET_S1AP_H
+typedef struct _s1ap_ctx_t {
+ guint32 message_type;
+ guint32 ProcedureCode;
+ guint32 ProtocolIE_ID;
+ guint32 ProtocolExtensionID;
+} s1ap_ctx_t;
+
+
#include "packet-s1ap-exp.h"
#endif /* PACKET_S1AP_H */