diff options
author | Anders Broman <anders.broman@ericsson.com> | 2007-12-05 20:16:02 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2007-12-05 20:16:02 +0000 |
commit | d639aace724b07b9e66325d15d44f802199b1b67 (patch) | |
tree | b7e70cb7c1baeb6e9f0042b56d34bc2f52475cf4 | |
parent | 20a98a36f37cce4ca1651b204eb80a45f754d8e4 (diff) |
Insert asn1 code for SendRoutingInfov2 and update template
Partly fixes http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2064 GSM_MAP decodes SendRoutingInfov2 incorrectly
svn path=/trunk/; revision=23774
-rw-r--r-- | asn1/gsmmap/GSMMAP.asn | 24 | ||||
-rw-r--r-- | asn1/gsmmap/packet-gsmmap-template.c | 16 | ||||
-rw-r--r-- | epan/dissectors/packet-gsm_map.c | 143 |
3 files changed, 137 insertions, 46 deletions
diff --git a/asn1/gsmmap/GSMMAP.asn b/asn1/gsmmap/GSMMAP.asn index 8044fec213..d20c794b3c 100644 --- a/asn1/gsmmap/GSMMAP.asn +++ b/asn1/gsmmap/GSMMAP.asn @@ -35,6 +35,13 @@ FROM MAP-CommonDataTypes { FROM MAP-ExtensionDataTypes { itu-t identified-organization (4) etsi (0) mobileDomain (0) gsm-Network (1) modules (3) map-ExtensionDataTypes (21) version11 (11)} + + CUG-CheckInfo, + NumberOfForwarding, + RoutingInfo +FROM MAP-CH-DataTypes { + itu-t identified-organization (4) etsi (0) mobileDomain (0) + gsm-Network (1) modules (3) map-CH-DataTypes (13) version11 (11)} ; -- ROS def's @@ -584,7 +591,22 @@ accessTypeNotAllowed-id OBJECT IDENTIFIER ::= --proprietary-extensions (1) --accessTypeNotAllowed (2) - +SendRoutingInfoArgV2 ::= SEQUENCE { + msisdn [0] ISDN-AddressString, + cug-CheckInfo [1] CUG-CheckInfo OPTIONAL, +-- cug-CheckInfo must be absent in version 1 + numberOfForwarding [2] NumberOfForwarding OPTIONAL, + networkSignalInfo [10] ExternalSignalInfo OPTIONAL, + ... + } + +SendRoutingInfoResV2 ::= SEQUENCE { + imsi IMSI, + routingInfo RoutingInfo, + cug-CheckInfo CUG-CheckInfo OPTIONAL, +-- cug-CheckInfo must be absent in version 1 + ... + } END diff --git a/asn1/gsmmap/packet-gsmmap-template.c b/asn1/gsmmap/packet-gsmmap-template.c index d14624b429..28215223c4 100644 --- a/asn1/gsmmap/packet-gsmmap-template.c +++ b/asn1/gsmmap/packet-gsmmap-template.c @@ -703,7 +703,7 @@ static int dissect_mc_message(tvbuff_t *tvb, } } else if (octet == 0x30) { if (sequence != NULL) { - offset= (sequence) (implicit_seq, tvb, offset, actx, tree, hf_index_seq); + offset= (sequence) (implicit_seq, tvb, 0, actx, tree, hf_index_seq); } else { cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown or not implemented sequence"); proto_item_set_expert_flags(cause, PI_UNDECODED, PI_ERROR); @@ -789,7 +789,11 @@ static int dissect_invokeData(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ offset=dissect_gsm_map_sm_MT_ForwardSM_VGCS_Arg(FALSE, tvb, offset, actx, tree, -1); break; case 22: /*sendRoutingInfo*/ - offset=dissect_gsm_map_ch_SendRoutingInfoArg(FALSE, tvb, offset, actx, tree, -1); + if (application_context_version == 3){ + offset=dissect_gsm_map_ch_SendRoutingInfoArg(FALSE, tvb, offset, actx, tree, -1); + }else{ + offset=dissect_gsm_old_SendRoutingInfoArgV2(FALSE, tvb, offset, actx, tree, -1); + } break; case 23: /*updateGprsLocation*/ offset=dissect_gsm_map_ms_UpdateGprsLocationArg(FALSE, tvb, offset, actx, tree, -1); @@ -1129,7 +1133,7 @@ static int dissect_returnResultData(proto_tree *tree, tvbuff_t *tvb, int offset, case 22: /*sendRoutingInfo*/ offset=dissect_mc_message(tvb, offset, actx, tree, FALSE, dissect_gsm_map_IMSI, hf_gsm_map_imsi, - FALSE, NULL, -1, + FALSE, dissect_gsm_old_SendRoutingInfoResV2, -1, TRUE , dissect_gsm_map_ch_SendRoutingInfoRes, -1); break; case 23: /*updateGprsLocation*/ @@ -1538,8 +1542,10 @@ dissect_gsm_map_GSMMAPPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, p_private_tcap=actx->pinfo->private_data; if (p_private_tcap->acv==TRUE ){ version_ptr = strrchr(p_private_tcap->oid,'.'); - if (version_ptr) - application_context_version = atoi(version_ptr+1); + if (version_ptr){ + application_context_version = atoi(version_ptr+1); + } + g_warning("AppCtx %u",application_context_version); } } diff --git a/epan/dissectors/packet-gsm_map.c b/epan/dissectors/packet-gsm_map.c index 00113f3c61..7ae823349b 100644 --- a/epan/dissectors/packet-gsm_map.c +++ b/epan/dissectors/packet-gsm_map.c @@ -1271,6 +1271,10 @@ static int hf_gsm_old_noSM_RP_DA = -1; /* NULL */ static int hf_gsm_old_msisdn_01 = -1; /* T_msisdn */ static int hf_gsm_old_serviceCentreAddressOA = -1; /* T_serviceCentreAddressOA */ static int hf_gsm_old_noSM_RP_OA = -1; /* NULL */ +static int hf_gsm_old_cug_CheckInfo = -1; /* CUG_CheckInfo */ +static int hf_gsm_old_numberOfForwarding = -1; /* NumberOfForwarding */ +static int hf_gsm_old_networkSignalInfo = -1; /* ExternalSignalInfo */ +static int hf_gsm_old_routingInfo = -1; /* RoutingInfo */ /* --- Module SS-DataTypes --- --- --- */ @@ -1896,6 +1900,8 @@ static gint ett_gsm_old_T_operatorSS_Code = -1; static gint ett_gsm_old_ForwardSM_Arg = -1; static gint ett_gsm_old_SM_RP_DAold = -1; static gint ett_gsm_old_SM_RP_OAold = -1; +static gint ett_gsm_old_SendRoutingInfoArgV2 = -1; +static gint ett_gsm_old_SendRoutingInfoResV2 = -1; /* --- Module SS-DataTypes --- --- --- */ @@ -2495,7 +2501,7 @@ dissect_gsm_map_T_extId(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset static int dissect_gsm_map_T_extType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 161 "gsmmap.cnf" +#line 158 "gsmmap.cnf" proto_tree_add_text(tree, tvb, offset, -1, "Extension Data"); if (obj_id){ offset=call_ber_oid_callback(obj_id, tvb, offset, actx->pinfo, tree); @@ -2610,7 +2616,7 @@ dissect_gsm_map_SLR_ArgExtensionContainer(gboolean implicit_tag _U_, tvbuff_t *t static int dissect_gsm_map_TBCD_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 200 "gsmmap.cnf" +#line 197 "gsmmap.cnf" tvbuff_t *parameter_tvb; char *digit_str; @@ -2633,7 +2639,7 @@ dissect_gsm_map_TBCD_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int of int dissect_gsm_map_AddressString(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 170 "gsmmap.cnf" +#line 167 "gsmmap.cnf" tvbuff_t *parameter_tvb; char *digit_str; @@ -2720,7 +2726,7 @@ dissect_gsm_map_ProtocolId(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int off static int dissect_gsm_map_SignalInfo(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 272 "gsmmap.cnf" +#line 269 "gsmmap.cnf" tvbuff_t *parameter_tvb; offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, @@ -2800,7 +2806,7 @@ dissect_gsm_map_AccessNetworkProtocolId(gboolean implicit_tag _U_, tvbuff_t *tvb static int dissect_gsm_map_LongSignalInfo(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 219 "gsmmap.cnf" +#line 216 "gsmmap.cnf" tvbuff_t *parameter_tvb; guint8 octet; @@ -3252,7 +3258,7 @@ dissect_gsm_map_CellGlobalIdOrServiceAreaIdFixedLength(gboolean implicit_tag _U_ int dissect_gsm_map_LAIFixedLength(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 487 "gsmmap.cnf" +#line 484 "gsmmap.cnf" tvbuff_t *parameter_tvb; proto_item *item; @@ -3380,7 +3386,7 @@ dissect_gsm_map_EMLPP_Info(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int off static int dissect_gsm_map_Ext_SS_Status(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 325 "gsmmap.cnf" +#line 322 "gsmmap.cnf" /* Note Ext-SS-Status can have more than one byte */ tvbuff_t *parameter_tvb; @@ -3503,7 +3509,7 @@ dissect_gsm_map_ss_RegisterSS_Arg(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int dissect_gsm_map_ss_SS_Status(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 305 "gsmmap.cnf" +#line 302 "gsmmap.cnf" tvbuff_t *parameter_tvb; guint8 octet; @@ -3537,7 +3543,7 @@ dissect_gsm_map_ss_ForwardingOptions(gboolean implicit_tag _U_, tvbuff_t *tvb _U offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, NULL); -#line 390 "gsmmap.cnf" +#line 387 "gsmmap.cnf" proto_tree_add_item(tree, hf_gsm_map_notification_to_forwarding_party, tvb, 0,1,FALSE); proto_tree_add_item(tree, hf_gsm_map_redirecting_presentation, tvb, 0,1,FALSE); @@ -3856,7 +3862,7 @@ dissect_gsm_map_ss_InterrogateSS_Res(gboolean implicit_tag _U_, tvbuff_t *tvb _U int dissect_gsm_map_ss_USSD_DataCodingScheme(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 352 "gsmmap.cnf" +#line 349 "gsmmap.cnf" /*The structure of the USSD-DataCodingScheme is defined by * the Cell Broadcast Data Coding Scheme as described in * TS 3GPP TS 23.038 @@ -3880,7 +3886,7 @@ dissect_gsm_map_ss_USSD_DataCodingScheme(gboolean implicit_tag _U_, tvbuff_t *tv int dissect_gsm_map_ss_USSD_String(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 365 "gsmmap.cnf" +#line 362 "gsmmap.cnf" tvbuff_t *parameter_tvb; int length; @@ -5219,7 +5225,7 @@ dissect_gsm_map_sm_SM_RP_DA(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int of static int dissect_gsm_map_sm_T_msisdn(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 268 "gsmmap.cnf" +#line 265 "gsmmap.cnf" actx->pinfo->p2p_dir = P2P_DIR_RECV; offset = dissect_gsm_map_ISDN_AddressString(implicit_tag, tvb, offset, actx, tree, hf_index); @@ -5233,7 +5239,7 @@ actx->pinfo->p2p_dir = P2P_DIR_RECV; static int dissect_gsm_map_sm_T_serviceCentreAddressOA(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 260 "gsmmap.cnf" +#line 257 "gsmmap.cnf" actx->pinfo->p2p_dir = P2P_DIR_SENT; offset = dissect_gsm_map_AddressString(implicit_tag, tvb, offset, actx, tree, hf_index); @@ -5279,7 +5285,7 @@ static const ber_sequence_t gsm_map_sm_MO_ForwardSM_Arg_sequence[] = { static int dissect_gsm_map_sm_MO_ForwardSM_Arg(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 287 "gsmmap.cnf" +#line 284 "gsmmap.cnf" /* dissect_gsm_map_SignalInfo will return parameter_tvb in actx */ offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, @@ -5322,7 +5328,7 @@ static const ber_sequence_t gsm_map_sm_MT_ForwardSM_Arg_sequence[] = { static int dissect_gsm_map_sm_MT_ForwardSM_Arg(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 296 "gsmmap.cnf" +#line 293 "gsmmap.cnf" /* dissect_gsm_map_SignalInfo will return parameter_tvb in actx */ offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, @@ -6148,7 +6154,7 @@ dissect_gsm_map_ms_VLR_Capability(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int dissect_gsm_map_ms_GSN_Address(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 447 "gsmmap.cnf" +#line 444 "gsmmap.cnf" tvbuff_t *parameter_tvb; guint8 octet; @@ -6785,7 +6791,7 @@ dissect_gsm_map_ms_UpdateGprsLocationRes(gboolean implicit_tag _U_, tvbuff_t *tv static int dissect_gsm_map_ms_IntegrityProtectionInformation(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 527 "gsmmap.cnf" +#line 524 "gsmmap.cnf" tvbuff_t *parameter_tvb; asn1_ctx_t asn1_ctx; @@ -6808,7 +6814,7 @@ dissect_gsm_map_ms_IntegrityProtectionInformation(gboolean implicit_tag _U_, tvb static int dissect_gsm_map_ms_EncryptionInformation(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 539 "gsmmap.cnf" +#line 536 "gsmmap.cnf" tvbuff_t *parameter_tvb; asn1_ctx_t asn1_ctx; @@ -6893,7 +6899,7 @@ dissect_gsm_map_ms_AllowedUMTS_Algorithms(gboolean implicit_tag _U_, tvbuff_t *t static int dissect_gsm_map_ms_RadioResourceInformation(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 501 "gsmmap.cnf" +#line 498 "gsmmap.cnf" tvbuff_t *parameter_tvb; proto_item *item; proto_tree *subtree; @@ -6966,7 +6972,7 @@ dissect_gsm_map_ms_BSSMAP_ServiceHandover(gboolean implicit_tag _U_, tvbuff_t *t static int dissect_gsm_map_ms_RANAP_ServiceHandover(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 515 "gsmmap.cnf" +#line 512 "gsmmap.cnf" tvbuff_t *parameter_tvb; asn1_ctx_t asn1_ctx; @@ -7700,7 +7706,7 @@ static int dissect_gsm_map_ms_T_forwardingOptions(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_gsm_map_ms_Ext_ForwOptions(implicit_tag, tvb, offset, actx, tree, hf_index); -#line 396 "gsmmap.cnf" +#line 393 "gsmmap.cnf" proto_tree_add_item(tree, hf_gsm_map_notification_to_forwarding_party, tvb, 0,1,FALSE); proto_tree_add_item(tree, hf_gsm_map_redirecting_presentation, tvb, 0,1,FALSE); @@ -8895,7 +8901,7 @@ dissect_gsm_map_ms_ContextId(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int o static int dissect_gsm_map_ms_PDP_Type(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 404 "gsmmap.cnf" +#line 401 "gsmmap.cnf" guint8 pdp_type_org; tvbuff_t *parameter_tvb; @@ -8938,7 +8944,7 @@ dissect_gsm_map_ms_PDP_Address(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int int dissect_gsm_map_ms_QoS_Subscribed(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 426 "gsmmap.cnf" +#line 423 "gsmmap.cnf" tvbuff_t *parameter_tvb; @@ -8970,7 +8976,7 @@ dissect_gsm_map_ms_APN(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset int dissect_gsm_map_ms_Ext_QoS_Subscribed(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 437 "gsmmap.cnf" +#line 434 "gsmmap.cnf" tvbuff_t *parameter_tvb; @@ -10125,7 +10131,7 @@ dissect_gsm_map_ms_SubscriberState(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int dissect_gsm_map_ms_RAIdentity(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 473 "gsmmap.cnf" +#line 470 "gsmmap.cnf" tvbuff_t *parameter_tvb; proto_item *item; @@ -13315,7 +13321,7 @@ static const value_string gsm_old_GSMMAPOperationLocalvalue_vals[] = { static int dissect_gsm_old_GSMMAPOperationLocalvalue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 146 "gsmmap.cnf" +#line 143 "gsmmap.cnf" offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index, &opcode); @@ -13373,7 +13379,7 @@ dissect_gsm_old_MAP_OPERATION(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int static int dissect_gsm_old_InvokeParameter(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 133 "gsmmap.cnf" +#line 130 "gsmmap.cnf" offset = dissect_invokeData(tree, tvb, offset, actx); @@ -13402,7 +13408,7 @@ dissect_gsm_old_Invoke(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset static int dissect_gsm_old_ReturnResultParameter(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 136 "gsmmap.cnf" +#line 133 "gsmmap.cnf" offset = dissect_returnResultData(tree, tvb, offset, actx); @@ -13545,7 +13551,7 @@ dissect_gsm_old_MAP_ERROR(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offs static int dissect_gsm_old_ReturnErrorParameter(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 139 "gsmmap.cnf" +#line 136 "gsmmap.cnf" offset = dissect_returnErrorData(tree, tvb, offset, actx); @@ -14284,7 +14290,7 @@ dissect_gsm_old_SM_RP_DAold(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int of static int dissect_gsm_old_T_msisdn(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 264 "gsmmap.cnf" +#line 261 "gsmmap.cnf" actx->pinfo->p2p_dir = P2P_DIR_RECV; offset = dissect_gsm_map_ISDN_AddressString(implicit_tag, tvb, offset, actx, tree, hf_index); @@ -14298,7 +14304,7 @@ actx->pinfo->p2p_dir = P2P_DIR_RECV; static int dissect_gsm_old_T_serviceCentreAddressOA(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 256 "gsmmap.cnf" +#line 253 "gsmmap.cnf" actx->pinfo->p2p_dir = P2P_DIR_SENT; offset = dissect_gsm_map_AddressString(implicit_tag, tvb, offset, actx, tree, hf_index); @@ -14343,7 +14349,7 @@ static const ber_sequence_t gsm_old_ForwardSM_Arg_sequence[] = { static int dissect_gsm_old_ForwardSM_Arg(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 278 "gsmmap.cnf" +#line 275 "gsmmap.cnf" /* dissect_gsm_map_SignalInfo will return parameter_tvb in actx */ offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, @@ -14360,6 +14366,39 @@ dissect_gsm_old_ForwardSM_Arg(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int } +static const ber_sequence_t gsm_old_SendRoutingInfoArgV2_sequence[] = { + { &hf_gsm_old_msisdn , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_gsm_map_ISDN_AddressString }, + { &hf_gsm_old_cug_CheckInfo, BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_gsm_map_ch_CUG_CheckInfo }, + { &hf_gsm_old_numberOfForwarding, BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_gsm_map_ch_NumberOfForwarding }, + { &hf_gsm_old_networkSignalInfo, BER_CLASS_CON, 10, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_gsm_map_ExternalSignalInfo }, + { NULL, 0, 0, 0, NULL } +}; + +static int +dissect_gsm_old_SendRoutingInfoArgV2(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + gsm_old_SendRoutingInfoArgV2_sequence, hf_index, ett_gsm_old_SendRoutingInfoArgV2); + + return offset; +} + + +static const ber_sequence_t gsm_old_SendRoutingInfoResV2_sequence[] = { + { &hf_gsm_old_imsi , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_gsm_map_IMSI }, + { &hf_gsm_old_routingInfo , -1 /*imported*/, -1 /*imported*/, BER_FLAGS_NOOWNTAG, dissect_gsm_map_ch_RoutingInfo }, + { &hf_gsm_old_cug_CheckInfo, -1 /*imported*/, -1 /*imported*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_gsm_map_ch_CUG_CheckInfo }, + { NULL, 0, 0, 0, NULL } +}; + +static int +dissect_gsm_old_SendRoutingInfoResV2(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + gsm_old_SendRoutingInfoResV2_sequence, hf_index, ett_gsm_old_SendRoutingInfoResV2); + + return offset; +} + + /* --- Module SS-DataTypes --- --- --- */ @@ -15631,7 +15670,7 @@ static int dissect_mc_message(tvbuff_t *tvb, } } else if (octet == 0x30) { if (sequence != NULL) { - offset= (sequence) (implicit_seq, tvb, offset, actx, tree, hf_index_seq); + offset= (sequence) (implicit_seq, tvb, 0, actx, tree, hf_index_seq); } else { cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown or not implemented sequence"); proto_item_set_expert_flags(cause, PI_UNDECODED, PI_ERROR); @@ -15717,7 +15756,11 @@ static int dissect_invokeData(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ offset=dissect_gsm_map_sm_MT_ForwardSM_VGCS_Arg(FALSE, tvb, offset, actx, tree, -1); break; case 22: /*sendRoutingInfo*/ - offset=dissect_gsm_map_ch_SendRoutingInfoArg(FALSE, tvb, offset, actx, tree, -1); + if (application_context_version == 3){ + offset=dissect_gsm_map_ch_SendRoutingInfoArg(FALSE, tvb, offset, actx, tree, -1); + }else{ + offset=dissect_gsm_old_SendRoutingInfoArgV2(FALSE, tvb, offset, actx, tree, -1); + } break; case 23: /*updateGprsLocation*/ offset=dissect_gsm_map_ms_UpdateGprsLocationArg(FALSE, tvb, offset, actx, tree, -1); @@ -16057,7 +16100,7 @@ static int dissect_returnResultData(proto_tree *tree, tvbuff_t *tvb, int offset, case 22: /*sendRoutingInfo*/ offset=dissect_mc_message(tvb, offset, actx, tree, FALSE, dissect_gsm_map_IMSI, hf_gsm_map_imsi, - FALSE, NULL, -1, + FALSE, dissect_gsm_old_SendRoutingInfoResV2, -1, TRUE , dissect_gsm_map_ch_SendRoutingInfoRes, -1); break; case 23: /*updateGprsLocation*/ @@ -16466,8 +16509,10 @@ dissect_gsm_map_GSMMAPPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, p_private_tcap=actx->pinfo->private_data; if (p_private_tcap->acv==TRUE ){ version_ptr = strrchr(p_private_tcap->oid,'.'); - if (version_ptr) - application_context_version = atoi(version_ptr+1); + if (version_ptr){ + application_context_version = atoi(version_ptr+1); + } + g_warning("AppCtx %u",application_context_version); } } @@ -21545,6 +21590,22 @@ void proto_register_gsm_map(void) { { "noSM-RP-OA", "gsm_old.noSM_RP_OA", FT_NONE, BASE_NONE, NULL, 0, "gsm_old.NULL", HFILL }}, + { &hf_gsm_old_cug_CheckInfo, + { "cug-CheckInfo", "gsm_old.cug_CheckInfo", + FT_NONE, BASE_NONE, NULL, 0, + "gsm_map_ch.CUG_CheckInfo", HFILL }}, + { &hf_gsm_old_numberOfForwarding, + { "numberOfForwarding", "gsm_old.numberOfForwarding", + FT_UINT32, BASE_DEC, NULL, 0, + "gsm_map_ch.NumberOfForwarding", HFILL }}, + { &hf_gsm_old_networkSignalInfo, + { "networkSignalInfo", "gsm_old.networkSignalInfo", + FT_NONE, BASE_NONE, NULL, 0, + "gsm_map.ExternalSignalInfo", HFILL }}, + { &hf_gsm_old_routingInfo, + { "routingInfo", "gsm_old.routingInfo", + FT_NONE, BASE_NONE, NULL, 0, + "gsm_map_ch.RoutingInfo", HFILL }}, /* --- Module SS-DataTypes --- --- --- */ @@ -21842,7 +21903,7 @@ void proto_register_gsm_map(void) { "gsm_map_lcs.LCS_QoS", HFILL }}, /*--- End of included file: packet-gsm_map-hfarr.c ---*/ -#line 2247 "packet-gsmmap-template.c" +#line 2253 "packet-gsmmap-template.c" }; /* List of subtrees */ @@ -22391,6 +22452,8 @@ void proto_register_gsm_map(void) { &ett_gsm_old_ForwardSM_Arg, &ett_gsm_old_SM_RP_DAold, &ett_gsm_old_SM_RP_OAold, + &ett_gsm_old_SendRoutingInfoArgV2, + &ett_gsm_old_SendRoutingInfoResV2, /* --- Module SS-DataTypes --- --- --- */ @@ -22424,7 +22487,7 @@ void proto_register_gsm_map(void) { /*--- End of included file: packet-gsm_map-ettarr.c ---*/ -#line 2271 "packet-gsmmap-template.c" +#line 2277 "packet-gsmmap-template.c" }; /* Register protocol */ @@ -22500,7 +22563,7 @@ void proto_register_gsm_map(void) { /*--- End of included file: packet-gsm_map-dis-tab.c ---*/ -#line 2289 "packet-gsmmap-template.c" +#line 2295 "packet-gsmmap-template.c" oid_add_from_string("ericsson-gsm-Map-Ext","1.2.826.0.1249.58.1.0" ); oid_add_from_string("accessTypeNotAllowed-id","1.3.12.2.1107.3.66.1.2"); /*oid_add_from_string("map-ac networkLocUp(1) version3(3)","0.4.0.0.1.0.1.3" ); |