diff options
author | Pascal Quantin <pascal.quantin@gmail.com> | 2012-08-21 09:32:04 +0000 |
---|---|---|
committer | Pascal Quantin <pascal.quantin@gmail.com> | 2012-08-21 09:32:04 +0000 |
commit | 91a531739f3f8cbd7b6950429a3ad6be052af70a (patch) | |
tree | 06dcb31e3f98d7112b96f8e14c8905d35da20b6a /asn1 | |
parent | da27acaa27272d86eb2e5d4aa54158cabff31e66 (diff) |
Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7648 :
Add support for Ericsson proprietary extensions to GSM MAP dissector
svn path=/trunk/; revision=44603
Diffstat (limited to 'asn1')
-rw-r--r-- | asn1/gsm_map/Ericsson.asn | 43 | ||||
-rw-r--r-- | asn1/gsm_map/MAP-MS-DataTypes.asn | 4 | ||||
-rw-r--r-- | asn1/gsm_map/Makefile.common | 6 | ||||
-rw-r--r-- | asn1/gsm_map/packet-gsm_map-template.c | 20 |
4 files changed, 68 insertions, 5 deletions
diff --git a/asn1/gsm_map/Ericsson.asn b/asn1/gsm_map/Ericsson.asn new file mode 100644 index 0000000000..772c4fd35d --- /dev/null +++ b/asn1/gsm_map/Ericsson.asn @@ -0,0 +1,43 @@ +-- Ericsson proprietary extensions +-- $Id$ + +EricssonMAP{ 0 identified-organization (4) etsi (0) mobileDomain (0) gsm-Network (1) modules (3) map-Protocol (4) version13 (13) } + +DEFINITIONS + +IMPLICIT TAGS + +::= + +BEGIN + +IMPORTS + + IMSI, + IMEI +FROM MAP-CommonDataTypes { + itu-t identified-organization (4) etsi (0) mobileDomain (0) + gsm-Network (1) modules (3) map-CommonDataTypes (18) version13 (13)} + + RequestedEquipmentInfo +FROM MAP-MS-DataTypes { + itu-t identified-organization (4) etsi (0) mobileDomain (0) + gsm-Network (1) modules (3) map-MS-DataTypes (11) version13 (13)} + + ExtensionContainer +FROM MAP-ExtensionDataTypes { + itu-t identified-organization (4) etsi (0) mobileDomain (0) + gsm-Network (1) modules (3) map-ExtensionDataTypes (21) version13 (13)} +; + +-- non 3GPP standard compliant extension used by Ericsson (see https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7648) +EnhancedCheckIMEI-Arg ::= SEQUENCE { + imei IMEI, + requestedEquipmentInfo RequestedEquipmentInfo OPTIONAL, + imsi [PRIVATE 1] IMSI OPTIONAL, + locationInformat [PRIVATE 3] OCTET STRING (SIZE (1..7)) OPTIONAL, + extensionContainer ExtensionContainer OPTIONAL, + ...} + +END + diff --git a/asn1/gsm_map/MAP-MS-DataTypes.asn b/asn1/gsm_map/MAP-MS-DataTypes.asn index 4df7fa7ae1..60274d696c 100644 --- a/asn1/gsm_map/MAP-MS-DataTypes.asn +++ b/asn1/gsm_map/MAP-MS-DataTypes.asn @@ -16,6 +16,10 @@ BEGIN EXPORTS + -- WS modification: for Ericsson proprietary extensions + RequestedEquipmentInfo, + -- End WS modification + -- location registration types UpdateLocationArg, UpdateLocationRes, diff --git a/asn1/gsm_map/Makefile.common b/asn1/gsm_map/Makefile.common index f73cacd090..294aa38550 100644 --- a/asn1/gsm_map/Makefile.common +++ b/asn1/gsm_map/Makefile.common @@ -55,6 +55,9 @@ SS_ASN_FILES = \ SS-DataTypes.asn \ SS-Operations.asn +PROPRIETARY_ASN_FILES = \ + Ericsson.asn + ASN_FILE_LIST = \ MobileDomainDefinitions.asn \ MAP-ApplicationContexts.asn \ @@ -67,7 +70,8 @@ ASN_FILE_LIST = \ MAP-Errors.asn \ MAP-Protocol.asn \ GSMMAP.asn \ - $(SS_ASN_FILES) + $(SS_ASN_FILES) \ + $(PROPRIETARY_ASN_FILES) # The packet-$(PROTOCOL_NAME)-template.h and $(PROTOCOL_NAME).asn diff --git a/asn1/gsm_map/packet-gsm_map-template.c b/asn1/gsm_map/packet-gsm_map-template.c index 5ee2afb88c..25cfafd2e2 100644 --- a/asn1/gsm_map/packet-gsm_map-template.c +++ b/asn1/gsm_map/packet-gsm_map-template.c @@ -190,6 +190,7 @@ static dissector_table_t map_prop_err_opcode_table; /* prorietary operation code static range_t *global_ssn_range; #define APPLICATON_CONTEXT_FROM_TRACE 0 static gint pref_application_context_version = APPLICATON_CONTEXT_FROM_TRACE; +static gboolean pref_ericsson_proprietary_ext = FALSE; /* Global variables */ static guint32 opcode=0; @@ -1117,10 +1118,17 @@ static int dissect_invokeData(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ offset=dissect_gsm_map_gr_ForwardGroupCallSignallingArg(FALSE, tvb, offset, actx, tree, -1); break; case 43: /*checkIMEI*/ - offset=dissect_mc_message(tvb, offset, actx, tree, - FALSE, dissect_gsm_map_IMEI, hf_gsm_map_ms_imei, - FALSE, dissect_gsm_map_ms_CheckIMEI_Arg, -1, - TRUE , NULL, -1); /* no [3] SEQUENCE */ + if (pref_ericsson_proprietary_ext) { + offset=dissect_mc_message(tvb, offset, actx, tree, + FALSE, dissect_gsm_map_IMEI, hf_gsm_map_ms_imei, + FALSE, dissect_EricssonMAP_EnhancedCheckIMEI_Arg, -1, + TRUE , NULL, -1); /* no [3] SEQUENCE */ + } else { + offset=dissect_mc_message(tvb, offset, actx, tree, + FALSE, dissect_gsm_map_IMEI, hf_gsm_map_ms_imei, + FALSE, dissect_gsm_map_ms_CheckIMEI_Arg, -1, + TRUE , NULL, -1); /* no [3] SEQUENCE */ + } break; case 44: /*mt-forwardSM(v3) or ForwardSM(v1/v2)*/ if (application_context_version == 3) @@ -2648,4 +2656,8 @@ void proto_register_gsm_map(void) { "How to treat Application context", &pref_application_context_version, application_context_modes, APPLICATON_CONTEXT_FROM_TRACE); + prefs_register_bool_preference(gsm_map_module, "ericsson.proprietary.extensions", + "Dissect Ericsson proprietary extensions", + "When enabled, dissector will use the non 3GPP standard extensions from Ericsson (that can override the standard ones)", + &pref_ericsson_proprietary_ext); } |