aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/x2ap
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2009-11-20 21:41:51 +0000
committerAnders Broman <anders.broman@ericsson.com>2009-11-20 21:41:51 +0000
commita3839c2a85234bd39ad4650b27b8b4baa844c772 (patch)
tree8a1d34ac509390681fa312ce8a2e7a4bd7e8180b /asn1/x2ap
parent9aa6257ddea31e2ac827f0192b0842a2312b2d88 (diff)
Dissect transportLayerAddress and rrc-context
svn path=/trunk/; revision=31035
Diffstat (limited to 'asn1/x2ap')
-rw-r--r--asn1/x2ap/packet-x2ap-template.c15
-rw-r--r--asn1/x2ap/x2ap.cnf40
2 files changed, 53 insertions, 2 deletions
diff --git a/asn1/x2ap/packet-x2ap-template.c b/asn1/x2ap/packet-x2ap-template.c
index 03efecf1c0..433662230a 100644
--- a/asn1/x2ap/packet-x2ap-template.c
+++ b/asn1/x2ap/packet-x2ap-template.c
@@ -61,12 +61,13 @@
/* Initialize the protocol and registered fields */
static int proto_x2ap = -1;
-
+static int hf_x2ap_transportLayerAddressIPv4 = -1;
+static int hf_x2ap_transportLayerAddressIPv6 = -1;
#include "packet-x2ap-hf.c"
/* Initialize the subtree pointers */
static int ett_x2ap = -1;
-
+static int ett_x2ap_TransportLayerAddress = -1;
#include "packet-x2ap-ett.c"
/* Global variables */
@@ -135,12 +136,22 @@ void proto_register_x2ap(void) {
/* List of fields */
static hf_register_info hf[] = {
+ { &hf_x2ap_transportLayerAddressIPv4,
+ { "transportLayerAddress(IPv4)", "x2ap.transportLayerAddressIPv4",
+ FT_IPv4, BASE_NONE, NULL, 0,
+ NULL, HFILL }},
+ { &hf_x2ap_transportLayerAddressIPv6,
+ { "transportLayerAddress(IPv6)", "x2ap.transportLayerAddressIPv6",
+ FT_IPv4, BASE_NONE, NULL, 0,
+ NULL, HFILL }},
+
#include "packet-x2ap-hfarr.c"
};
/* List of subtrees */
static gint *ett[] = {
&ett_x2ap,
+ &ett_x2ap_TransportLayerAddress,
#include "packet-x2ap-ettarr.c"
};
diff --git a/asn1/x2ap/x2ap.cnf b/asn1/x2ap/x2ap.cnf
index 61ea15d692..b7dd8210da 100644
--- a/asn1/x2ap/x2ap.cnf
+++ b/asn1/x2ap/x2ap.cnf
@@ -103,6 +103,46 @@ ProtocolExtensionID TYPE = FT_UINT8 DISPLAY = BASE_DEC STRINGS = VALS(x2ap_Prot
# Handle 64 bit constraint
#.FN_PARS BitRate FN_VARIANT = _64b
+#.FN_BODY TransportLayerAddress VAL_PTR = &parameter_tvb
+# For details on the Transport Layer Address, see
+# ref. [8], [19]
+# [8] 3GPP TS 36.424: "Evolved Universal Terrestrial Radio Access Network (E-UTRAN); X2 data transport".
+# [19] 3GPP TS 36.414: "Evolved Universal Terrestrial Radio Access Network (E-UTRAN); S1 data transport".
+ tvbuff_t *parameter_tvb=NULL;
+ proto_tree *subtree;
+ gint tvb_len;
+
+%(DEFAULT_BODY)s
+ if (!parameter_tvb)
+ return offset;
+ /* Get the length */
+ tvb_len = tvb_length(parameter_tvb);
+ subtree = proto_item_add_subtree(actx->created_item, ett_x2ap_TransportLayerAddress);
+ if (tvb_len==4){
+ /* IPv4 */
+ proto_tree_add_item(subtree, hf_x2ap_transportLayerAddressIPv4, parameter_tvb, 0, tvb_len, FALSE);
+ }
+ if (tvb_len==16){
+ /* IPv6 */
+ proto_tree_add_item(subtree, hf_x2ap_transportLayerAddressIPv6, parameter_tvb, 0, tvb_len, FALSE);
+ }
+
+#.FN_BODY RRC-Context
+#VAL_PTR = &parameter_tvb
+# Includes the RRC Handover Preparation Information message as defined in
+# subclause 10.2.2 of [9].
+# [9] 3GPP TS 36.331: "Evolved Universal Terrestrial Radio Access (E-UTRAN); Radio Resource
+# Control (RRC) Protocol Specification".
+ tvbuff_t *parameter_tvb=NULL;
+ gint32 start_offset;
+
+ start_offset = offset;
+%(DEFAULT_BODY)s
+ parameter_tvb = tvb_new_subset(tvb, start_offset>>3, -1, -1);
+ if (!parameter_tvb)
+ return offset;
+ dissect_lte_rrc_HandoverCommand_PDU(parameter_tvb, actx->pinfo, tree);
+
#.ASSIGN_VALUE_TO_TYPE # X2AP does not have constants assigned to types, they are pure INTEGER
# ProcedureCode