aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>2007-02-19 06:09:33 +0000
committeretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>2007-02-19 06:09:33 +0000
commit266936a2d2dba14ac7bf615f820a64ef6dd7f247 (patch)
treee893732e49c435dfcd3cc9f2c2fbc8f5ee082c7b
parentb4e9714856d47a1d7440e935a74593461c4fff26 (diff)
Decode some RANAP elements.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@20854 f5534014-38df-0310-8fa8-9805f1628bb7
-rw-r--r--asn1/gsmmap/gsmmap.cnf36
-rw-r--r--asn1/gsmmap/packet-gsm_map-template.c18
-rw-r--r--asn1/ranap/ranap-exp.cnf3
-rw-r--r--asn1/ranap/ranap.cnf3
-rw-r--r--epan/dissectors/packet-gsm_map.c73
-rw-r--r--epan/dissectors/packet-ranap.c26
-rw-r--r--epan/dissectors/packet-ranap.h4
7 files changed, 142 insertions, 21 deletions
diff --git a/asn1/gsmmap/gsmmap.cnf b/asn1/gsmmap/gsmmap.cnf
index d9e47d3ccc..ffb306205c 100644
--- a/asn1/gsmmap/gsmmap.cnf
+++ b/asn1/gsmmap/gsmmap.cnf
@@ -679,6 +679,42 @@ Component
subtree = proto_item_add_subtree(item, ett_gsm_map_RadioResourceInformation);
be_chan_type(tvb, subtree, 0, tvb_length_remaining(tvb,0), NULL, 0);
+#.FN_BODY RANAP-ServiceHandover VAL_PTR = &parameter_tvb
+ tvbuff_t *parameter_tvb;
+ asn1_ctx_t asn1_ctx;
+
+%(DEFAULT_BODY)s
+
+ if (!parameter_tvb)
+ return offset;
+
+ asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo);
+ dissect_ranap_Service_Handover(parameter_tvb, 0, &asn1_ctx, tree, hf_gsm_map_ranap_service_Handover);
+
+#.FN_BODY IntegrityProtectionInformation VAL_PTR = &parameter_tvb
+ tvbuff_t *parameter_tvb;
+ asn1_ctx_t asn1_ctx;
+
+%(DEFAULT_BODY)s
+
+ if (!parameter_tvb)
+ return offset;
+
+ asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo);
+ dissect_ranap_IntegrityProtectionInformation(parameter_tvb, 0, &asn1_ctx, tree, hf_gsm_mapIntegrityProtectionInformation);
+
+#.FN_BODY EncryptionInformation VAL_PTR = &parameter_tvb
+ tvbuff_t *parameter_tvb;
+ asn1_ctx_t asn1_ctx;
+
+%(DEFAULT_BODY)s
+
+ if (!parameter_tvb)
+ return offset;
+
+ asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo);
+ dissect_ranap_EncryptionInformation(parameter_tvb, 0, &asn1_ctx, tree, hf_gsm_mapEncryptionInformation);
+
#----------------------------------------------------------------------------------------
#.TYPE_ATTR
SS-Code TYPE = FT_UINT8 DISPLAY = BASE_DEC STRINGS = VALS(ssCode_vals)
diff --git a/asn1/gsmmap/packet-gsm_map-template.c b/asn1/gsmmap/packet-gsm_map-template.c
index 0cebe542fe..6c3f617238 100644
--- a/asn1/gsmmap/packet-gsm_map-template.c
+++ b/asn1/gsmmap/packet-gsm_map-template.c
@@ -45,6 +45,7 @@
#include <string.h>
#include "packet-ber.h"
+#include "packet-per.h"
#include "packet-q931.h"
#include "packet-gsm_map.h"
#include "packet-gsm_a.h"
@@ -53,6 +54,7 @@
#include "packet-e212.h"
#include "packet-smpp.h"
#include "packet-gsm_sms.h"
+#include "packet-ranap.h"
#define PNAME "GSM Mobile Application"
#define PSNAME "GSM_MAP"
@@ -132,6 +134,9 @@ static int hf_geo_loc_inner_radius = -1;
static int hf_geo_loc_uncertainty_radius = -1;
static int hf_geo_loc_offset_angle = -1;
static int hf_geo_loc_included_angle = -1;
+static int hf_gsm_map_ranap_service_Handover = -1;
+static int hf_gsm_mapIntegrityProtectionInformation = -1;
+static int hf_gsm_mapEncryptionInformation = -1;
#include "packet-gsm_map-hf.c"
@@ -2277,6 +2282,19 @@ void proto_register_gsm_map(void) {
"Included angle", HFILL }
},
+ { &hf_gsm_map_ranap_service_Handover,
+ { "service-Handover", "gsm_map.ranap.service_Handover",
+ FT_UINT32, BASE_DEC, VALS(ranap_Service_Handover_vals), 0,
+ "gsm_map.ranap.Service_Handover", HFILL }},
+ { &hf_gsm_mapIntegrityProtectionInformation,
+ { "IntegrityProtectionInformation", "gsm_map.ranap.IntegrityProtectionInformation",
+ FT_NONE, BASE_NONE, NULL, 0,
+ "gsm_map.ranap.IntegrityProtectionInformation", HFILL }},
+ { &hf_gsm_mapEncryptionInformation,
+ { "EncryptionInformation", "gsm_map.ranap.EncryptionInformation",
+ FT_NONE, BASE_NONE, NULL, 0,
+ "gsm_map.ranap.EncryptionInformation", HFILL }},
+
#include "packet-gsm_map-hfarr.c"
};
diff --git a/asn1/ranap/ranap-exp.cnf b/asn1/ranap/ranap-exp.cnf
index 1dcb0185f2..fdf70d024f 100644
--- a/asn1/ranap/ranap-exp.cnf
+++ b/asn1/ranap/ranap-exp.cnf
@@ -8,6 +8,9 @@ RANAP-PDU-Descriptions ranap
#.END
#.TYPE_ATTR
+EncryptionInformation TYPE = FT_NONE DISPLAY = BASE_NONE STRINGS = NULL BITMASK = 0
+IntegrityProtectionInformation TYPE = FT_NONE DISPLAY = BASE_NONE STRINGS = NULL BITMASK = 0
+Service-Handover TYPE = FT_UINT32 DISPLAY = BASE_DEC STRINGS = VALS(ranap_Service_Handover_vals) BITMASK = 0
TargetID TYPE = FT_UINT32 DISPLAY = BASE_DEC STRINGS = VALS(ranap_TargetID_vals) BITMASK = 0
#.END
diff --git a/asn1/ranap/ranap.cnf b/asn1/ranap/ranap.cnf
index f822d238fb..4c2efba880 100644
--- a/asn1/ranap/ranap.cnf
+++ b/asn1/ranap/ranap.cnf
@@ -5,6 +5,9 @@
#.EXPORTS
TargetID
+Service-Handover
+IntegrityProtectionInformation
+EncryptionInformation
#.PDU_NEW
RANAP-PDU
diff --git a/epan/dissectors/packet-gsm_map.c b/epan/dissectors/packet-gsm_map.c
index c842499e01..21233b18de 100644
--- a/epan/dissectors/packet-gsm_map.c
+++ b/epan/dissectors/packet-gsm_map.c
@@ -53,6 +53,7 @@
#include <string.h>
#include "packet-ber.h"
+#include "packet-per.h"
#include "packet-q931.h"
#include "packet-gsm_map.h"
#include "packet-gsm_a.h"
@@ -61,6 +62,7 @@
#include "packet-e212.h"
#include "packet-smpp.h"
#include "packet-gsm_sms.h"
+#include "packet-ranap.h"
#define PNAME "GSM Mobile Application"
#define PSNAME "GSM_MAP"
@@ -140,6 +142,9 @@ static int hf_geo_loc_inner_radius = -1;
static int hf_geo_loc_uncertainty_radius = -1;
static int hf_geo_loc_offset_angle = -1;
static int hf_geo_loc_included_angle = -1;
+static int hf_gsm_map_ranap_service_Handover = -1;
+static int hf_gsm_mapIntegrityProtectionInformation = -1;
+static int hf_gsm_mapEncryptionInformation = -1;
/*--- Included file: packet-gsm_map-hf.c ---*/
@@ -1085,7 +1090,7 @@ static int hf_gsm_map_SupportedGADShapes_ellipsoidPointWithAltitudeAndUncertaint
static int hf_gsm_map_SupportedGADShapes_ellipsoidArc = -1;
/*--- End of included file: packet-gsm_map-hf.c ---*/
-#line 137 "packet-gsm_map-template.c"
+#line 142 "packet-gsm_map-template.c"
/* Initialize the subtree pointers */
static gint ett_gsm_map = -1;
@@ -1534,7 +1539,7 @@ static gint ett_gsm_map_SecureTransportErrorParam = -1;
static gint ett_gsm_map_ExtensionContainer = -1;
/*--- End of included file: packet-gsm_map-ett.c ---*/
-#line 157 "packet-gsm_map-template.c"
+#line 162 "packet-gsm_map-template.c"
static dissector_table_t sms_dissector_table; /* SMS TPDU */
static dissector_handle_t data_handle;
@@ -4453,8 +4458,21 @@ static int dissect_an_APDU_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *
static int
dissect_gsm_map_IntegrityProtectionInformation(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
+#line 695 "gsmmap.cnf"
+ tvbuff_t *parameter_tvb;
+ asn1_ctx_t asn1_ctx;
+
offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index,
- NULL);
+ &parameter_tvb);
+
+
+ if (!parameter_tvb)
+ return offset;
+
+ asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo);
+ dissect_ranap_IntegrityProtectionInformation(parameter_tvb, 0, &asn1_ctx, tree, hf_gsm_mapIntegrityProtectionInformation);
+
+
return offset;
}
@@ -4466,8 +4484,21 @@ static int dissect_integrityProtectionInfo_impl(packet_info *pinfo, proto_tree *
static int
dissect_gsm_map_EncryptionInformation(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
+#line 707 "gsmmap.cnf"
+ tvbuff_t *parameter_tvb;
+ asn1_ctx_t asn1_ctx;
+
offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index,
- NULL);
+ &parameter_tvb);
+
+
+ if (!parameter_tvb)
+ return offset;
+
+ asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo);
+ dissect_ranap_EncryptionInformation(parameter_tvb, 0, &asn1_ctx, tree, hf_gsm_mapEncryptionInformation);
+
+
return offset;
}
@@ -4640,8 +4671,21 @@ static int dissect_bssmap_ServiceHandover_impl(packet_info *pinfo, proto_tree *t
static int
dissect_gsm_map_RANAP_ServiceHandover(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
+#line 683 "gsmmap.cnf"
+ tvbuff_t *parameter_tvb;
+ asn1_ctx_t asn1_ctx;
+
offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index,
- NULL);
+ &parameter_tvb);
+
+
+ if (!parameter_tvb)
+ return offset;
+
+ asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo);
+ dissect_ranap_Service_Handover(parameter_tvb, 0, &asn1_ctx, tree, hf_gsm_map_ranap_service_Handover);
+
+
return offset;
}
@@ -15615,7 +15659,7 @@ static void dissect_Component_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree
/*--- End of included file: packet-gsm_map-fn.c ---*/
-#line 566 "packet-gsm_map-template.c"
+#line 571 "packet-gsm_map-template.c"
const value_string gsm_map_opr_code_strings[] = {
{ 2, "updateLocation" },
@@ -17330,6 +17374,19 @@ void proto_register_gsm_map(void) {
"Included angle", HFILL }
},
+ { &hf_gsm_map_ranap_service_Handover,
+ { "service-Handover", "gsm_map.ranap.service_Handover",
+ FT_UINT32, BASE_DEC, VALS(ranap_Service_Handover_vals), 0,
+ "gsm_map.ranap.Service_Handover", HFILL }},
+ { &hf_gsm_mapIntegrityProtectionInformation,
+ { "IntegrityProtectionInformation", "gsm_map.ranap.IntegrityProtectionInformation",
+ FT_NONE, BASE_NONE, NULL, 0,
+ "gsm_map.ranap.IntegrityProtectionInformation", HFILL }},
+ { &hf_gsm_mapEncryptionInformation,
+ { "EncryptionInformation", "gsm_map.ranap.EncryptionInformation",
+ FT_NONE, BASE_NONE, NULL, 0,
+ "gsm_map.ranap.EncryptionInformation", HFILL }},
+
/*--- Included file: packet-gsm_map-hfarr.c ---*/
#line 1 "packet-gsm_map-hfarr.c"
@@ -21087,7 +21144,7 @@ void proto_register_gsm_map(void) {
"", HFILL }},
/*--- End of included file: packet-gsm_map-hfarr.c ---*/
-#line 2281 "packet-gsm_map-template.c"
+#line 2299 "packet-gsm_map-template.c"
};
/* List of subtrees */
@@ -21538,7 +21595,7 @@ void proto_register_gsm_map(void) {
&ett_gsm_map_ExtensionContainer,
/*--- End of included file: packet-gsm_map-ettarr.c ---*/
-#line 2303 "packet-gsm_map-template.c"
+#line 2321 "packet-gsm_map-template.c"
};
/* Register protocol */
diff --git a/epan/dissectors/packet-ranap.c b/epan/dissectors/packet-ranap.c
index b2fc420556..732437d24e 100644
--- a/epan/dissectors/packet-ranap.c
+++ b/epan/dissectors/packet-ranap.c
@@ -931,7 +931,7 @@ dissect_ranap_ProcedureCode(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, pro
offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
0U, 255U, &ProcedureCode, FALSE);
-#line 36 "ranap.cnf"
+#line 39 "ranap.cnf"
if (check_col(actx->pinfo->cinfo, COL_INFO))
col_add_fstr(actx->pinfo->cinfo, COL_INFO, "%s ",
val_to_str(ProcedureCode, ranap_ProcedureCode_vals,
@@ -979,7 +979,7 @@ static int dissect_secondCriticality(tvbuff_t *tvb, int offset, asn1_ctx_t *actx
static int
dissect_ranap_Value(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
-#line 49 "ranap.cnf"
+#line 52 "ranap.cnf"
offset = dissect_ranap_messages(tvb, offset, actx, tree);
@@ -1271,7 +1271,7 @@ static int dissect_id(tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *t
static int
dissect_ranap_RANAP_PROTOCOL_IES_Value(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
-#line 53 "ranap.cnf"
+#line 56 "ranap.cnf"
offset = dissect_ranap_ies(tvb, offset, actx, tree);
@@ -1348,7 +1348,7 @@ static int dissect_ext_id(tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tre
static int
dissect_ranap_Extension(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
-#line 72 "ranap.cnf"
+#line 75 "ranap.cnf"
offset = dissect_ranap_ies(tvb, offset, actx, tree);
@@ -1906,7 +1906,7 @@ static int dissect_private_id(tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto
static int
dissect_ranap_RANAP_PRIVATE_IES_Value(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
-#line 76 "ranap.cnf"
+#line 79 "ranap.cnf"
/* FIX ME */
@@ -3055,7 +3055,7 @@ static int dissect_aPN(tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *
static int
dissect_ranap_PLMNidentity(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
-#line 79 "ranap.cnf"
+#line 82 "ranap.cnf"
tvbuff_t *parameter_tvb=NULL;
@@ -4572,7 +4572,7 @@ static int dissect_id_DRX_CycleLengthCoefficient(tvbuff_t *tvb, int offset, asn1
static int
dissect_ranap_NAS_PDU(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
-#line 57 "ranap.cnf"
+#line 60 "ranap.cnf"
tvbuff_t *nas_pdu_tvb=NULL;
@@ -4731,7 +4731,7 @@ static const per_sequence_t EncryptionInformation_sequence[] = {
{ NULL, 0, 0, NULL }
};
-static int
+int
dissect_ranap_EncryptionInformation(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
ett_ranap_EncryptionInformation, EncryptionInformation_sequence);
@@ -5455,7 +5455,7 @@ static const per_sequence_t IntegrityProtectionInformation_sequence[] = {
{ NULL, 0, 0, NULL }
};
-static int
+int
dissect_ranap_IntegrityProtectionInformation(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
ett_ranap_IntegrityProtectionInformation, IntegrityProtectionInformation_sequence);
@@ -8070,7 +8070,7 @@ static int dissect_userPlaneInformation(tvbuff_t *tvb, int offset, asn1_ctx_t *a
}
-static const value_string ranap_Service_Handover_vals[] = {
+const value_string ranap_Service_Handover_vals[] = {
{ 0, "handover-to-GSM-should-be-performed" },
{ 1, "handover-to-GSM-should-not-be-performed" },
{ 2, "handover-to-GSM-shall-not-be-performed" },
@@ -8078,7 +8078,7 @@ static const value_string ranap_Service_Handover_vals[] = {
};
-static int
+int
dissect_ranap_Service_Handover(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index,
3, NULL, TRUE, 0, NULL);
@@ -8196,7 +8196,7 @@ static int dissect_id_RAB_SetupOrModifiedList(tvbuff_t *tvb, int offset, asn1_ct
static int
dissect_ranap_FirstValue(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
-#line 69 "ranap.cnf"
+#line 72 "ranap.cnf"
offset = dissect_ranap_FirstValue_ies(tvb, offset, actx, tree);
@@ -8211,7 +8211,7 @@ static int dissect_firstValue(tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto
static int
dissect_ranap_SecondValue(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
-#line 66 "ranap.cnf"
+#line 69 "ranap.cnf"
offset = dissect_ranap_SecondValue_ies(tvb, offset, actx, tree);
diff --git a/epan/dissectors/packet-ranap.h b/epan/dissectors/packet-ranap.h
index fb830eddab..cbfd88a0cd 100644
--- a/epan/dissectors/packet-ranap.h
+++ b/epan/dissectors/packet-ranap.h
@@ -34,7 +34,11 @@
/*--- Included file: packet-ranap-exp.h ---*/
#line 1 "packet-ranap-exp.h"
+extern const value_string ranap_Service_Handover_vals[];
extern const value_string ranap_TargetID_vals[];
+int dissect_ranap_EncryptionInformation(tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index);
+int dissect_ranap_IntegrityProtectionInformation(tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index);
+int dissect_ranap_Service_Handover(tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index);
int dissect_ranap_TargetID(tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index);
/*--- End of included file: packet-ranap-exp.h ---*/