aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/gsmmap
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2007-04-23 21:26:27 +0000
committerAnders Broman <anders.broman@ericsson.com>2007-04-23 21:26:27 +0000
commitc0dc340d5d35e53f9d0db1e02e70551b64c649a7 (patch)
tree44371952c073b077c46e1289b24952371b4356fd /asn1/gsmmap
parentd6fc852779ce0014dd5323d41eea8be3ba0909a7 (diff)
From Florent DROUIN:
I have made some changes to the final patch to have the operation code decoded as ForwardSM. A change for TCAP is included too, to be sure that the application context is not overwritten by the User Info OID (this was the case, when a MAP open dialog was included in the request). Fix bug: http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1498 svn path=/trunk/; revision=21543
Diffstat (limited to 'asn1/gsmmap')
-rw-r--r--asn1/gsmmap/GSMMAP.asn10
-rw-r--r--asn1/gsmmap/gsmmap.cnf2
-rw-r--r--asn1/gsmmap/packet-gsm_map-template.c49
3 files changed, 51 insertions, 10 deletions
diff --git a/asn1/gsmmap/GSMMAP.asn b/asn1/gsmmap/GSMMAP.asn
index 606a6a0438..ff50ffd96e 100644
--- a/asn1/gsmmap/GSMMAP.asn
+++ b/asn1/gsmmap/GSMMAP.asn
@@ -3542,6 +3542,16 @@ Mt-forwardSM-Res ::= SEQUENCE {
-- absentsubscriberSM localValue : 6}
-- ::= localValue : 44
+--ForwardSM OPERATION
+-- ARGUMENT
+ForwardSM-Arg ::= SEQUENCE {
+ sm-RP-DA Sm-RP-DA,
+ sm-RP-OA Sm-RP-OA,
+ sm-RP-UI Sm-RP-UI,
+ moreMessagesToSend NULL OPTIONAL,
+ ... }
+-- RESULT
+
-- not used
-- StoredMSISDN ::= ISDN-AddressString
diff --git a/asn1/gsmmap/gsmmap.cnf b/asn1/gsmmap/gsmmap.cnf
index ffb306205c..de30fea4dc 100644
--- a/asn1/gsmmap/gsmmap.cnf
+++ b/asn1/gsmmap/gsmmap.cnf
@@ -142,7 +142,7 @@ Component
%(DEFAULT_BODY)s
if (check_col(pinfo->cinfo, COL_INFO)){
- col_append_fstr(pinfo->cinfo, COL_INFO, val_to_str(opcode, gsm_map_opr_code_strings, "Unknown GSM-MAP (%%u)"));
+ col_append_fstr(pinfo->cinfo, COL_INFO, gsm_map_opr_code(opcode));
}
#.FN_PARS GSMMAPLocalErrorcode
diff --git a/asn1/gsmmap/packet-gsm_map-template.c b/asn1/gsmmap/packet-gsm_map-template.c
index 3ae2b276e6..bbb3f17c4d 100644
--- a/asn1/gsmmap/packet-gsm_map-template.c
+++ b/asn1/gsmmap/packet-gsm_map-template.c
@@ -172,6 +172,7 @@ static int gsm_map_tap = -1;
static int dissect_invokeData(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset);
static int dissect_returnResultData(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset);
static int dissect_returnErrorData(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset);
+const gchar* gsm_map_opr_code(guint32 val);
/* Value strings */
@@ -556,6 +557,13 @@ dissect_geographical_description(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tr
}
#include "packet-gsm_map-fn.c"
+/* Specific translation for MAP V3 */
+const value_string gsm_map_V3_opr_code_strings[] = {
+ { 44, "mt-forwardSM" },
+ { 46, "mo-forwardSM" },
+ { 0, NULL }
+};
+/* Generic translation for MAP operation */
const value_string gsm_map_opr_code_strings[] = {
{ 2, "updateLocation" },
{ 3, "cancelLocation" },
@@ -596,9 +604,9 @@ const value_string gsm_map_opr_code_strings[] = {
{ 41, "processGroupCallSignalling" },
{ 42, "forwardGroupCallSignalling" },
{ 43, "checkIMEI" },
- { 44, "mt-forwardSM" },
+ { 44, "forwardSM" },
{ 45, "sendRoutingInfoForSM" },
- { 46, "mo-forwardSM" },
+ { 46, "forwardSM" },
{ 47, "reportSM-DeliveryStatus" },
{ 48, "noteSubscriberPresent" }, /* map-ac mwdMngt (24) version1 (1) */
{ 49, "alertServiceCentreWithoutResult" }, /* map-ac shortMsgAlert (23) version1 (1) */
@@ -755,6 +763,24 @@ static const true_false_string gsm_map_Ss_Status_a_values = {
"not Active"
};
+/*
+ * Translate the MAP operation code value to a text string
+ * Take into account the MAP version for ForwardSM
+ */
+const gchar* gsm_map_opr_code(guint32 val) {
+ switch (val) {
+ case 44: /*mt-forwardSM*/
+ case 46: /*mo-forwardSM*/
+ if (application_context_version == 3) {
+ return val_to_str(val, gsm_map_V3_opr_code_strings, "Unknown GSM-MAP (%%u)");
+ }
+ /* Else use the default map operation translation */
+ default:
+ return val_to_str(val, gsm_map_opr_code_strings, "Unknown GSM-MAP (%%u)");
+ break;
+ }
+}
+
/* Prototype for a decoding function */
typedef int (* dissect_function_t)( gboolean,
tvbuff_t *,
@@ -961,14 +987,22 @@ static int dissect_invokeData(packet_info *pinfo, proto_tree *tree, tvbuff_t *tv
FALSE, dissect_gsm_map_CheckIMEIArgV3, -1,
TRUE , NULL, -1); /* no [3] SEQUENCE */
break;
- case 44: /*mt-forwardSM*/
- offset=dissect_gsm_map_Mt_forwardSM_Arg(FALSE, tvb, offset, pinfo, tree, -1);
+ case 44: /*mt-forwardSM(v3) or ForwardSM(v1/v2)*/
+ if (application_context_version == 3)
+ offset=dissect_gsm_map_Mt_forwardSM_Arg(FALSE, tvb, offset, pinfo, tree, -1);
+ else {
+ offset=dissect_gsm_map_ForwardSM_Arg(FALSE, tvb, offset, pinfo, tree, -1);
+ }
break;
case 45: /*sendRoutingInfoForSM*/
offset=dissect_gsm_map_RoutingInfoForSMArg(FALSE, tvb, offset, pinfo, tree, -1);
break;
- case 46: /*mo-forwardSM*/
- offset=dissect_gsm_map_Mo_forwardSM_Arg(FALSE, tvb, offset, pinfo, tree, -1);
+ case 46: /*mo-forwardSM(v3) or ForwardSM(v1/v2)*/
+ if (application_context_version == 3)
+ offset=dissect_gsm_map_Mo_forwardSM_Arg(FALSE, tvb, offset, pinfo, tree, -1);
+ else {
+ offset=dissect_gsm_map_ForwardSM_Arg(FALSE, tvb, offset, pinfo, tree, -1);
+ }
break;
case 47: /*reportSM-DeliveryStatus*/
offset=dissect_gsm_map_ReportSM_DeliveryStatusArg(FALSE, tvb, offset, pinfo, tree, -1);
@@ -1561,9 +1595,6 @@ dissect_gsm_map_GSMMAPPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset,
return offset;
}
-
-
-
static void
dissect_gsm_map(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
{