aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/gsm_map
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2011-09-29 15:23:23 +0000
committerAnders Broman <anders.broman@ericsson.com>2011-09-29 15:23:23 +0000
commit00077754649517487c25e97e9c662810e12c938a (patch)
tree68036ec46fdaa48299fcc3dc8a47a6ef26885c26 /asn1/gsm_map
parentd406b805a16e28fe566ed9c1349ded1de724df91 (diff)
Make it possible to dissect proprietarry Opcodes.
svn path=/trunk/; revision=39183
Diffstat (limited to 'asn1/gsm_map')
-rw-r--r--asn1/gsm_map/GSMMAP.asn24
-rw-r--r--asn1/gsm_map/gsm_map.cnf6
-rw-r--r--asn1/gsm_map/packet-gsm_map-template.c44
3 files changed, 60 insertions, 14 deletions
diff --git a/asn1/gsm_map/GSMMAP.asn b/asn1/gsm_map/GSMMAP.asn
index 6599ec4fa9..47e7399a2a 100644
--- a/asn1/gsm_map/GSMMAP.asn
+++ b/asn1/gsm_map/GSMMAP.asn
@@ -137,6 +137,7 @@ GSMMAPOperationLocalvalue ::= INTEGER{
sendRoutingInfoForGprs (24),
failureReport (25),
noteMsPresentForGprs (26),
+ unAllocated (27),
performHandover (28),
sendEndSignal (29),
performSubsequentHandover (30),
@@ -145,6 +146,7 @@ GSMMAPOperationLocalvalue ::= INTEGER{
processAccessSignalling (33),
forwardAccessSignalling (34),
noteInternalHandover (35),
+ unAllocated (36),
reset (37),
forwardCheckSS (38),
prepareGroupCall (39),
@@ -161,6 +163,7 @@ GSMMAPOperationLocalvalue ::= INTEGER{
activateTraceMode (50),
deactivateTraceMode (51),
traceSubscriberActivity (52),
+ unAllocated (53),
beginSubscriberActivity (54),
sendIdentification (55),
sendAuthenticationInfo (56),
@@ -189,6 +192,7 @@ GSMMAPOperationLocalvalue ::= INTEGER{
secureTransportClass2 (79),
secureTransportClass3 (80),
secureTransportClass4 (81),
+ unAllocated (82),
provideSubscriberLocation (83),
sendGroupCallInfo (84),
sendRoutingInfoForLCS (85),
@@ -196,6 +200,26 @@ GSMMAPOperationLocalvalue ::= INTEGER{
ist-Alert (87),
ist-Command (88),
noteMM-Event (89),
+ unAllocated (90),
+ unAllocated (91),
+ unAllocated (92),
+ unAllocated (93),
+ unAllocated (94),
+ unAllocated (95),
+ unAllocated (96),
+ unAllocated (97),
+ unAllocated (98),
+ unAllocated (99),
+ unAllocated (100),
+ unAllocated (101),
+ unAllocated (102),
+ unAllocated (103),
+ unAllocated (104),
+ unAllocated (105),
+ unAllocated (106),
+ unAllocated (107),
+ unAllocated (108),
+ unAllocated (109),
lcs-PeriodicLocationCancellation (109),
lcs-LocationUpdate (110),
lcs-PeriodicLocationRequest (111),
diff --git a/asn1/gsm_map/gsm_map.cnf b/asn1/gsm_map/gsm_map.cnf
index 35dac7fe00..dfc1b3a6cd 100644
--- a/asn1/gsm_map/gsm_map.cnf
+++ b/asn1/gsm_map/gsm_map.cnf
@@ -52,6 +52,9 @@ SS-InfoList
LCS-ClientID
ISDN-AddressString
+#.USE_VALS_EXT
+GSMMAPOperationLocalvalue
+
#.EXPORTS
AddressString
Add-GeographicalInformation
@@ -111,6 +114,7 @@ LocationMethod
LocationType
LSAIdentity
MS-Classmark2
+NetworkResource
NewPassword
NotificationToMSUser
O-CSI
@@ -122,6 +126,8 @@ QoS-Subscribed
RAIdentity
RegisterCC-EntryRes
RegisterSS-Arg
+SM-RP-DA
+SM-RP-OA
SubscriberState
SecurityHeader
ServiceKey
diff --git a/asn1/gsm_map/packet-gsm_map-template.c b/asn1/gsm_map/packet-gsm_map-template.c
index 5eeb817ed2..79963bbaa5 100644
--- a/asn1/gsm_map/packet-gsm_map-template.c
+++ b/asn1/gsm_map/packet-gsm_map-template.c
@@ -175,7 +175,9 @@ static dissector_handle_t data_handle;
static dissector_handle_t ranap_handle;
static dissector_handle_t dtap_handle;
static dissector_handle_t map_handle;
-
+static dissector_table_t map_prop_arg_opcode_table; /* prorietary operation codes */
+static dissector_table_t map_prop_res_opcode_table; /* prorietary operation codes */
+static dissector_table_t map_prop_err_opcode_table; /* prorietary operation codes */
/* Preferenc settings default */
#define MAX_SSN 254
static range_t *global_ssn_range;
@@ -838,11 +840,11 @@ const gchar* gsm_map_opr_code(guint32 val) {
case 46: /*mo-forwardSM*/
/* FALLTHRU */
if (application_context_version < 3) {
- return val_to_str(val, gsm_map_V1V2_opr_code_strings, "Unknown GSM-MAP (%u)");
+ return val_to_str_const(val, gsm_map_V1V2_opr_code_strings, "Unknown GSM-MAP opcode");
}
/* Else use the default map operation translation */
default:
- return val_to_str(val, gsm_old_GSMMAPOperationLocalvalue_vals, "Unknown GSM-MAP opcode (%u)");
+ return val_to_str_ext_const(val, &gsm_old_GSMMAPOperationLocalvalue_vals_ext, "Unknown GSM-MAP opcode");
break;
}
}
@@ -1264,9 +1266,13 @@ static int dissect_invokeData(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_
case 126: /*SS-protocol explicitCT no Argument*/
break;
default:
- cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown invokeData blob");
- proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN);
- expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN, "Unknown invokeData %d",opcode);
+ if(!dissector_try_uint(map_prop_arg_opcode_table, (guint8)opcode, tvb, actx->pinfo, tree)){
+ cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown invokeData blob");
+ proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN);
+ expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN, "Unknown invokeData %d",opcode);
+ }
+ offset+= tvb_length_remaining(tvb,offset);
+ break;
}
return offset;
}
@@ -1568,9 +1574,13 @@ static int dissect_returnResultData(proto_tree *tree, tvbuff_t *tvb, int offset,
break;
default:
- cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown returnResultData blob");
- proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN);
- expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN, "Unknown invokeData %d",opcode);
+ if(!dissector_try_uint(map_prop_res_opcode_table, (guint8)opcode, tvb, actx->pinfo, tree)){
+ cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown returnResultData blob");
+ proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN);
+ expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN, "Unknown invokeData %d",opcode);
+ }
+ offset+= tvb_length_remaining(tvb,offset);
+ break;
}
return offset;
}
@@ -1729,9 +1739,12 @@ static int dissect_returnErrorData(proto_tree *tree, tvbuff_t *tvb, int offset,
offset=dissect_gsm_map_er_InformationNotAvailableParam(FALSE, tvb, offset, actx, tree, -1);
break;
default:
- cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown returnErrorData blob");
- proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN);
- expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN, "Unknown invokeData %d",errorCode);
+ if(!dissector_try_uint(map_prop_err_opcode_table, (guint8)opcode, tvb, actx->pinfo, tree)){
+ cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown returnErrorData blob");
+ proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN);
+ expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN, "Unknown invokeData %d",errorCode);
+ }
+ offset+= tvb_length_remaining(tvb,offset);
break;
}
return offset;
@@ -1777,7 +1790,7 @@ dissect_gsm_map_GSMMAPPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset,
/* Get the length and add 2 */
gsm_map_pdu_size = tvb_get_guint8(tvb, offset+1)+2;
- col_add_str(actx->pinfo->cinfo, COL_INFO, val_to_str(gsmmap_pdu_type, gsm_old_Component_vals, "Unknown GSM-MAP PDU (%u)"));
+ col_add_str(actx->pinfo->cinfo, COL_INFO, val_to_str_const(gsmmap_pdu_type, gsm_old_Component_vals, "Unknown GSM-MAP Component"));
col_append_fstr(actx->pinfo->cinfo, COL_INFO, " ");
offset = dissect_gsm_old_Component(FALSE, tvb, 0, actx, tree, hf_gsm_map_old_Component_PDU);
/*
@@ -1800,7 +1813,6 @@ dissect_gsm_map(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
-
col_set_str(pinfo->cinfo, COL_PROTOCOL, "GSM MAP");
top_tree = parent_tree;
@@ -2512,6 +2524,10 @@ void proto_register_gsm_map(void) {
"GSM SMS TPDU", FT_UINT8,
BASE_DEC);
+ map_prop_arg_opcode_table = register_dissector_table("gsm_map.prop.arg.opcode", "Proprietary Opcodes", FT_UINT8, BASE_DEC);
+ map_prop_res_opcode_table = register_dissector_table("gsm_map.prop.res.opcode", "Proprietary Opcodes", FT_UINT8, BASE_DEC);
+ map_prop_err_opcode_table = register_dissector_table("gsm_map.prop.err.opcode", "Proprietary Opcodes", FT_UINT8, BASE_DEC);
+
gsm_map_tap = register_tap("gsm_map");
#include "packet-gsm_map-dis-tab.c" */