diff options
author | AndersBroman <anders.broman@ericsson.com> | 2014-08-19 14:24:13 +0200 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2014-08-19 12:27:29 +0000 |
commit | 1cdef1d98aac306932dc599d427a3e1191d48a44 (patch) | |
tree | ad618708ac4a6dbefa1f66e38100adb656bab44e /epan/dissectors | |
parent | fc43a8c933dca46dd591523dac1eed4f5c2adcbb (diff) |
Implement a common function to dissect IMSI and use it GSM MAP as a start.
- remove soft deprecated APIs and unused hf.
Change-Id: Id00c3dd35f3fc65f543bc29df6d35515c45fe7e1
Reviewed-on: https://code.wireshark.org/review/3715
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors')
-rw-r--r-- | epan/dissectors/packet-e212.c | 34 | ||||
-rw-r--r-- | epan/dissectors/packet-e212.h | 16 | ||||
-rw-r--r-- | epan/dissectors/packet-gsm_map.c | 161 |
3 files changed, 128 insertions, 83 deletions
diff --git a/epan/dissectors/packet-e212.c b/epan/dissectors/packet-e212.c index 782ff155bf..06a8d9c120 100644 --- a/epan/dissectors/packet-e212.c +++ b/epan/dissectors/packet-e212.c @@ -2532,9 +2532,12 @@ static value_string_ext mcc_mnc_codes_ext = VALUE_STRING_EXT_INIT(mcc_mnc_codes) static int proto_e212 = -1; +static int hf_E212_imsi = -1; static int hf_E212_mcc = -1; static int hf_E212_mnc = -1; +static int ett_e212_imsi = -1; + static expert_field ei_E212_mcc_non_decimal = EI_INIT; static expert_field ei_E212_mnc_non_decimal = EI_INIT; @@ -2780,6 +2783,26 @@ dissect_e212_mcc_mnc_in_address(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t return 5; } +const gchar * +dissect_e212_imsi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, int length, gboolean skip_first) +{ + proto_item *item; + proto_tree *subtree; + const gchar *imsi_str; + + /* Fetch the BCD encoded digits from tvb indicated half byte, formating the digits according to + * a default digit set of 0-9 returning "?" for overdecadic digits a pointer to the wmem + * allocated string will be returned. + */ + imsi_str = tvb_bcd_dig_to_wmem_packet_str( tvb, offset, length, NULL, skip_first); + item = proto_tree_add_string(tree, hf_E212_imsi, tvb, offset, length, imsi_str); + + subtree = proto_item_add_subtree(item, ett_e212_imsi); + + dissect_e212_mcc_mnc_in_address(tvb, pinfo, subtree, 0); + + return imsi_str; +} /* * Register the protocol with Wireshark. * @@ -2794,6 +2817,11 @@ proto_register_e212(void) /* Setup list of header fields See Section 1.6.1 for details */ static hf_register_info hf[] = { + { &hf_E212_imsi, + { "IMSI","e212.mcc", + FT_STRING, BASE_NONE, NULL, 0x0, + "International mobile subscriber identity(IMSI)", HFILL } + }, { &hf_E212_mcc, { "Mobile Country Code (MCC)","e212.mcc", FT_UINT16, BASE_DEC|BASE_EXT_STRING, &E212_codes_ext, 0x0, @@ -2812,6 +2840,11 @@ proto_register_e212(void) #endif }; + + static gint *ett_e212_array[] = { + &ett_e212_imsi, + }; + static ei_register_info ei[] = { { &ei_E212_mcc_non_decimal, { "e212.mcc.non_decimal", PI_MALFORMED, PI_WARN, "MCC contains non-decimal digits", EXPFILL }}, { &ei_E212_mnc_non_decimal, { "e212.mnc.non_decimal", PI_MALFORMED, PI_WARN, "MNC contains non-decimal digits", EXPFILL }}, @@ -2832,6 +2865,7 @@ proto_register_e212(void) * the header fields and subtrees used. */ proto_register_field_array(proto_e212, hf, array_length(hf)); + proto_register_subtree_array(ett_e212_array, array_length(ett_e212_array)); expert_e212 = expert_register_protocol(proto_e212); expert_register_field_array(expert_e212, ei, array_length(ei)); diff --git a/epan/dissectors/packet-e212.h b/epan/dissectors/packet-e212.h index 0b0aefd145..ec865cde25 100644 --- a/epan/dissectors/packet-e212.h +++ b/epan/dissectors/packet-e212.h @@ -30,10 +30,26 @@ extern value_string_ext E212_codes_ext; gchar* dissect_e212_mcc_mnc_wmem_packet_str(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, gboolean little_endian); + WS_DLL_PUBLIC int dissect_e212_mcc_mnc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, gboolean little_endian); + WS_DLL_PUBLIC int dissect_e212_mcc_mnc_in_address(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset); +/** + * + * Given a tvbuff, an offset into the tvbuff, and a length that starts + * at that offset, fetch BCD encoded digits from a tvbuff starting from either + * the low or high half byte, formatting the digits according to a digit + * set of 0-9 returning "?" for overdecadic digits create a string in the tree and a corresponding filter + * + * Note a tvbuff content of 0xf is considered a 'filler' and will end the + * conversion. + * the wmem allocated string will be returned. + */ +WS_DLL_PUBLIC +const gchar * dissect_e212_imsi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, int length, gboolean skip_first); + #endif /* __PACKET_E212_H__ */ diff --git a/epan/dissectors/packet-gsm_map.c b/epan/dissectors/packet-gsm_map.c index c088555138..46782b7dc5 100644 --- a/epan/dissectors/packet-gsm_map.c +++ b/epan/dissectors/packet-gsm_map.c @@ -93,9 +93,7 @@ static int hf_gsm_map_currentPassword = -1; static int hf_gsm_map_extension = -1; static int hf_gsm_map_nature_of_number = -1; static int hf_gsm_map_number_plan = -1; -static int hf_gsm_map_isdn_address_digits = -1; static int hf_gsm_map_address_digits = -1; -static int hf_gsm_map_servicecentreaddress_digits = -1; static int hf_gsm_map_TBCD_digits = -1; static int hf_gsm_map_Ss_Status_unused = -1; static int hf_gsm_map_Ss_Status_q_bit = -1; @@ -124,11 +122,9 @@ static int hf_gsm_map_qos_transfer_delay = -1; static int hf_gsm_map_guaranteed_max_brate_ulink = -1; static int hf_gsm_map_guaranteed_max_brate_dlink = -1; static int hf_gsm_map_GSNAddress_IPv4 = -1; -static int hf_gsm_map_GSNAddress_IPv6 = -1; static int hf_gsm_map_ranap_service_Handover = -1; static int hf_gsm_map_IntegrityProtectionInformation = -1; static int hf_gsm_map_EncryptionInformation = -1; -static int hf_gsm_map_PlmnContainer_PDU = -1; static int hf_gsm_map_ss_SS_UserData = -1; static int hf_gsm_map_cbs_coding_grp = -1; static int hf_gsm_map_cbs_coding_grp0_lang = -1; @@ -1897,7 +1893,7 @@ static int hf_NokiaMAP_Extensions_AccessSubscriptionListExt_item = -1; /* Acces static int hf_NokiaMAP_Extensions_AllowedServiceData_amr_wb_allowed = -1; /*--- End of included file: packet-gsm_map-hf.c ---*/ -#line 156 "../../asn1/gsm_map/packet-gsm_map-template.c" +#line 152 "../../asn1/gsm_map/packet-gsm_map-template.c" /* Initialize the subtree pointers */ static gint ett_gsm_map = -1; @@ -2604,7 +2600,7 @@ static gint ett_NokiaMAP_Extensions_AccessSubscriptionListExt = -1; static gint ett_NokiaMAP_Extensions_AllowedServiceData = -1; /*--- End of included file: packet-gsm_map-ett.c ---*/ -#line 186 "../../asn1/gsm_map/packet-gsm_map-template.c" +#line 182 "../../asn1/gsm_map/packet-gsm_map-template.c" static expert_field ei_gsm_map_unknown_sequence3 = EI_INIT; static expert_field ei_gsm_map_unknown_sequence = EI_INIT; @@ -3353,7 +3349,7 @@ dissect_gsm_map_T_extType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offs offset=call_ber_oid_callback(obj_id, tvb, offset, actx->pinfo, ext_tree, NULL); }else{ call_dissector(data_handle, tvb, actx->pinfo, ext_tree); - offset = tvb_length_remaining(tvb,offset); + offset = tvb_reported_length_remaining(tvb,offset); } @@ -3462,7 +3458,7 @@ dissect_gsm_map_SLR_ArgExtensionContainer(gboolean implicit_tag _U_, tvbuff_t *t 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 258 "../../asn1/gsm_map/gsm_map.cnf" +#line 273 "../../asn1/gsm_map/gsm_map.cnf" tvbuff_t *parameter_tvb; const char *digit_str; @@ -3472,7 +3468,7 @@ dissect_gsm_map_TBCD_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int of if (!parameter_tvb) return offset; - if(tvb_length(parameter_tvb)==0) + if(tvb_reported_length(parameter_tvb)==0) return offset; digit_str = unpack_digits(parameter_tvb, 0); @@ -3567,7 +3563,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 362 "../../asn1/gsm_map/gsm_map.cnf" +#line 377 "../../asn1/gsm_map/gsm_map.cnf" tvbuff_t *parameter_tvb; offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, @@ -3591,7 +3587,7 @@ static const ber_sequence_t gsm_map_ExternalSignalInfo_sequence[] = { int dissect_gsm_map_ExternalSignalInfo(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 786 "../../asn1/gsm_map/gsm_map.cnf" +#line 801 "../../asn1/gsm_map/gsm_map.cnf" /* -- Information about the internal structure is given in -- clause 7.6.9. @@ -3729,7 +3725,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 279 "../../asn1/gsm_map/gsm_map.cnf" +#line 294 "../../asn1/gsm_map/gsm_map.cnf" tvbuff_t *parameter_tvb; guint8 octet; @@ -3807,7 +3803,7 @@ dissect_gsm_map_AlertingPattern(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, in int dissect_gsm_map_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 611 "../../asn1/gsm_map/gsm_map.cnf" +#line 626 "../../asn1/gsm_map/gsm_map.cnf" tvbuff_t *parameter_tvb; guint8 octet; @@ -3824,10 +3820,10 @@ dissect_gsm_map_GSN_Address(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int of octet = tvb_get_guint8(parameter_tvb,0); switch(octet){ case 0x04: /* IPv4 */ - proto_tree_add_item(subtree, hf_gsm_map_GSNAddress_IPv4, parameter_tvb, 1, tvb_length_remaining(parameter_tvb, 1), ENC_BIG_ENDIAN); + proto_tree_add_item(subtree, hf_gsm_map_GSNAddress_IPv4, parameter_tvb, 1, tvb_reported_length_remaining(parameter_tvb, 1), ENC_BIG_ENDIAN); break; case 0x50: /* IPv4 */ - proto_tree_add_item(subtree, hf_gsm_map_GSNAddress_IPv4, parameter_tvb, 1, tvb_length_remaining(parameter_tvb, 1), ENC_BIG_ENDIAN); + proto_tree_add_item(subtree, hf_gsm_map_GSNAddress_IPv4, parameter_tvb, 1, tvb_reported_length_remaining(parameter_tvb, 1), ENC_BIG_ENDIAN); break; default: break; @@ -3852,7 +3848,22 @@ dissect_gsm_map_Time(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U int dissect_gsm_map_IMSI(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_TBCD_STRING(implicit_tag, tvb, offset, actx, tree, hf_index); +#line 258 "../../asn1/gsm_map/gsm_map.cnf" + tvbuff_t *parameter_tvb; + + offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, ¶meter_tvb); + + if (!parameter_tvb) + return offset; + if(tvb_reported_length(parameter_tvb)==0) + return offset; + + /* Hide the octet string dfault printout */ + PROTO_ITEM_SET_HIDDEN(actx->created_item); + dissect_e212_imsi(parameter_tvb, actx->pinfo, tree, 0, tvb_reported_length(parameter_tvb), FALSE); + + + return offset; } @@ -3958,7 +3969,7 @@ dissect_gsm_map_HLR_List(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offse int dissect_gsm_map_GlobalCellId(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 866 "../../asn1/gsm_map/gsm_map.cnf" +#line 881 "../../asn1/gsm_map/gsm_map.cnf" tvbuff_t *parameter_tvb; proto_tree *subtree; @@ -3970,7 +3981,7 @@ dissect_gsm_map_GlobalCellId(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int o return offset; subtree = proto_item_add_subtree(actx->created_item, ett_gsm_map_GlobalCellId); - be_cell_id_aux(parameter_tvb, subtree, actx->pinfo, 0, tvb_length_remaining(tvb,0), NULL, 0, 0); + be_cell_id_aux(parameter_tvb, subtree, actx->pinfo, 0, tvb_reported_length_remaining(tvb,0), NULL, 0, 0); @@ -4235,7 +4246,7 @@ dissect_gsm_map_TA_Id(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _ int dissect_gsm_map_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 635 "../../asn1/gsm_map/gsm_map.cnf" +#line 650 "../../asn1/gsm_map/gsm_map.cnf" tvbuff_t *parameter_tvb; proto_tree *subtree; @@ -4283,7 +4294,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 647 "../../asn1/gsm_map/gsm_map.cnf" +#line 662 "../../asn1/gsm_map/gsm_map.cnf" tvbuff_t *parameter_tvb; proto_tree *subtree; @@ -4409,7 +4420,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 489 "../../asn1/gsm_map/gsm_map.cnf" +#line 504 "../../asn1/gsm_map/gsm_map.cnf" /* Note Ext-SS-Status can have more than one byte */ tvbuff_t *parameter_tvb; @@ -4542,7 +4553,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 469 "../../asn1/gsm_map/gsm_map.cnf" +#line 484 "../../asn1/gsm_map/gsm_map.cnf" tvbuff_t *parameter_tvb; guint8 octet; @@ -4576,7 +4587,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 554 "../../asn1/gsm_map/gsm_map.cnf" +#line 569 "../../asn1/gsm_map/gsm_map.cnf" proto_tree_add_item(tree, hf_gsm_map_notification_to_forwarding_party, tvb, 0,1,ENC_BIG_ENDIAN); proto_tree_add_item(tree, hf_gsm_map_redirecting_presentation, tvb, 0,1,ENC_BIG_ENDIAN); @@ -4895,7 +4906,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 512 "../../asn1/gsm_map/gsm_map.cnf" +#line 527 "../../asn1/gsm_map/gsm_map.cnf" /*The structure of the USSD-DataCodingScheme is defined by * the Cell Broadcast Data Coding Scheme as described in * TS 3GPP TS 23.038 @@ -4921,7 +4932,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 527 "../../asn1/gsm_map/gsm_map.cnf" +#line 542 "../../asn1/gsm_map/gsm_map.cnf" tvbuff_t *parameter_tvb; guint length; @@ -5370,7 +5381,7 @@ static const ber_sequence_t gsm_map_er_SM_DeliveryFailureCause_sequence[] = { static int dissect_gsm_map_er_SM_DeliveryFailureCause(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 369 "../../asn1/gsm_map/gsm_map.cnf" +#line 384 "../../asn1/gsm_map/gsm_map.cnf" /* dissect_gsm_map_SignalInfo will return parameter_tvb in actx */ guint8 oct; offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, @@ -6301,7 +6312,7 @@ dissect_gsm_map_sm_RoutingInfoForSM_Res(gboolean implicit_tag _U_, tvbuff_t *tvb static int dissect_gsm_map_sm_T_imsi(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 338 "../../asn1/gsm_map/gsm_map.cnf" +#line 353 "../../asn1/gsm_map/gsm_map.cnf" actx->pinfo->p2p_dir = P2P_DIR_SENT; offset = dissect_gsm_map_IMSI(implicit_tag, tvb, offset, actx, tree, hf_index); @@ -6315,7 +6326,7 @@ dissect_gsm_map_sm_T_imsi(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offs static int dissect_gsm_map_sm_T_lmsi(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 342 "../../asn1/gsm_map/gsm_map.cnf" +#line 357 "../../asn1/gsm_map/gsm_map.cnf" actx->pinfo->p2p_dir = P2P_DIR_SENT; offset = dissect_gsm_map_LMSI(implicit_tag, tvb, offset, actx, tree, hf_index); @@ -6329,7 +6340,7 @@ dissect_gsm_map_sm_T_lmsi(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offs static int dissect_gsm_map_sm_T_serviceCentreAddressDA(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 358 "../../asn1/gsm_map/gsm_map.cnf" +#line 373 "../../asn1/gsm_map/gsm_map.cnf" actx->pinfo->p2p_dir = P2P_DIR_RECV; offset = dissect_gsm_map_AddressString(implicit_tag, tvb, offset, actx, tree, hf_index); @@ -6369,7 +6380,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 350 "../../asn1/gsm_map/gsm_map.cnf" +#line 365 "../../asn1/gsm_map/gsm_map.cnf" actx->pinfo->p2p_dir = P2P_DIR_RECV; offset = dissect_gsm_map_ISDN_AddressString(implicit_tag, tvb, offset, actx, tree, hf_index); @@ -6383,7 +6394,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 326 "../../asn1/gsm_map/gsm_map.cnf" +#line 341 "../../asn1/gsm_map/gsm_map.cnf" actx->pinfo->p2p_dir = P2P_DIR_SENT; offset = dissect_gsm_map_AddressString(implicit_tag, tvb, offset, actx, tree, hf_index); @@ -6448,7 +6459,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 397 "../../asn1/gsm_map/gsm_map.cnf" +#line 412 "../../asn1/gsm_map/gsm_map.cnf" /* dissect_gsm_map_SignalInfo will return parameter_tvb in actx */ offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, @@ -6476,7 +6487,7 @@ static const ber_sequence_t gsm_map_sm_MO_ForwardSM_Res_sequence[] = { static int dissect_gsm_map_sm_MO_ForwardSM_Res(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 409 "../../asn1/gsm_map/gsm_map.cnf" +#line 424 "../../asn1/gsm_map/gsm_map.cnf" /* dissect_gsm_map_SignalInfo will return parameter_tvb in actx */ offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, @@ -6511,7 +6522,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 421 "../../asn1/gsm_map/gsm_map.cnf" +#line 436 "../../asn1/gsm_map/gsm_map.cnf" /* dissect_gsm_map_SignalInfo will return parameter_tvb in actx */ offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, @@ -6539,7 +6550,7 @@ static const ber_sequence_t gsm_map_sm_MT_ForwardSM_Res_sequence[] = { static int dissect_gsm_map_sm_MT_ForwardSM_Res(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 433 "../../asn1/gsm_map/gsm_map.cnf" +#line 448 "../../asn1/gsm_map/gsm_map.cnf" /* dissect_gsm_map_SignalInfo will return parameter_tvb in actx */ offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, @@ -6713,7 +6724,7 @@ static const ber_sequence_t gsm_map_sm_MT_ForwardSM_VGCS_Arg_sequence[] = { static int dissect_gsm_map_sm_MT_ForwardSM_VGCS_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 445 "../../asn1/gsm_map/gsm_map.cnf" +#line 460 "../../asn1/gsm_map/gsm_map.cnf" /* dissect_gsm_map_SignalInfo will return parameter_tvb in actx */ offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, @@ -6770,7 +6781,7 @@ static const ber_sequence_t gsm_map_sm_MT_ForwardSM_VGCS_Res_sequence[] = { static int dissect_gsm_map_sm_MT_ForwardSM_VGCS_Res(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 457 "../../asn1/gsm_map/gsm_map.cnf" +#line 472 "../../asn1/gsm_map/gsm_map.cnf" /* dissect_gsm_map_SignalInfo will return parameter_tvb in actx */ offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, @@ -8149,7 +8160,7 @@ dissect_gsm_map_ms_GeographicalInformation(gboolean implicit_tag _U_, tvbuff_t * static int dissect_gsm_map_ms_LocationNumber(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 927 "../../asn1/gsm_map/gsm_map.cnf" +#line 942 "../../asn1/gsm_map/gsm_map.cnf" tvbuff_t *parameter_tvb; proto_tree *subtree; const char *digit_str; @@ -8833,7 +8844,7 @@ dissect_gsm_map_ms_SGSN_Capability(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, static int dissect_gsm_map_ms_APN(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 900 "../../asn1/gsm_map/gsm_map.cnf" +#line 915 "../../asn1/gsm_map/gsm_map.cnf" tvbuff_t *parameter_tvb; proto_tree *subtree; int length, name_len, tmp; @@ -8845,7 +8856,7 @@ dissect_gsm_map_ms_APN(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset if (!parameter_tvb) return offset; - length = tvb_length(parameter_tvb); + length = tvb_reported_length(parameter_tvb); name_len = tvb_get_guint8(parameter_tvb, 0); apn_str = tvb_get_string_enc(wmem_packet_scope(), parameter_tvb, 1, length - 1, ENC_ASCII|ENC_NA); if (name_len < length-1) { @@ -9084,7 +9095,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 683 "../../asn1/gsm_map/gsm_map.cnf" +#line 698 "../../asn1/gsm_map/gsm_map.cnf" tvbuff_t *parameter_tvb; asn1_ctx_t asn1_ctx; @@ -9107,7 +9118,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 695 "../../asn1/gsm_map/gsm_map.cnf" +#line 710 "../../asn1/gsm_map/gsm_map.cnf" tvbuff_t *parameter_tvb; asn1_ctx_t asn1_ctx; @@ -9192,7 +9203,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 659 "../../asn1/gsm_map/gsm_map.cnf" +#line 674 "../../asn1/gsm_map/gsm_map.cnf" tvbuff_t *parameter_tvb; proto_tree *subtree; @@ -9204,7 +9215,7 @@ dissect_gsm_map_ms_RadioResourceInformation(gboolean implicit_tag _U_, tvbuff_t return offset; subtree = proto_item_add_subtree(actx->created_item, ett_gsm_map_RadioResourceInformation); - be_chan_type(parameter_tvb, subtree, actx->pinfo, 0, tvb_length_remaining(tvb,0), NULL, 0); + be_chan_type(parameter_tvb, subtree, actx->pinfo, 0, tvb_reported_length_remaining(tvb,0), NULL, 0); @@ -9263,7 +9274,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 671 "../../asn1/gsm_map/gsm_map.cnf" +#line 686 "../../asn1/gsm_map/gsm_map.cnf" tvbuff_t *parameter_tvb; asn1_ctx_t asn1_ctx; @@ -10198,7 +10209,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 560 "../../asn1/gsm_map/gsm_map.cnf" +#line 575 "../../asn1/gsm_map/gsm_map.cnf" proto_tree_add_item(tree, hf_gsm_map_notification_to_forwarding_party, tvb, 0,1,ENC_BIG_ENDIAN); proto_tree_add_item(tree, hf_gsm_map_redirecting_presentation, tvb, 0,1,ENC_BIG_ENDIAN); @@ -11361,7 +11372,7 @@ dissect_gsm_map_ms_VlrCamelSubscriptionInfo(gboolean implicit_tag _U_, tvbuff_t 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 568 "../../asn1/gsm_map/gsm_map.cnf" +#line 583 "../../asn1/gsm_map/gsm_map.cnf" guint8 pdp_type_org; tvbuff_t *parameter_tvb; @@ -11394,7 +11405,7 @@ dissect_gsm_map_ms_PDP_Type(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int of 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 590 "../../asn1/gsm_map/gsm_map.cnf" +#line 605 "../../asn1/gsm_map/gsm_map.cnf" tvbuff_t *parameter_tvb; @@ -11416,7 +11427,7 @@ dissect_gsm_map_ms_QoS_Subscribed(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, 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 601 "../../asn1/gsm_map/gsm_map.cnf" +#line 616 "../../asn1/gsm_map/gsm_map.cnf" tvbuff_t *parameter_tvb; @@ -15611,7 +15622,7 @@ dissect_gsm_map_lcs_ProvideSubscriberLocation_Arg(gboolean implicit_tag _U_, tvb int dissect_gsm_map_lcs_Ext_GeographicalInformation(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 878 "../../asn1/gsm_map/gsm_map.cnf" +#line 893 "../../asn1/gsm_map/gsm_map.cnf" tvbuff_t *parameter_tvb; proto_tree *subtree; @@ -17040,7 +17051,7 @@ static const ber_sequence_t gsm_old_Bss_APDU_sequence[] = { static int dissect_gsm_old_Bss_APDU(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 708 "../../asn1/gsm_map/gsm_map.cnf" +#line 723 "../../asn1/gsm_map/gsm_map.cnf" guint8 octet; guint8 length; tvbuff_t *next_tvb; @@ -17623,7 +17634,7 @@ dissect_gsm_old_PlmnContainer(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int static int dissect_gsm_old_T_imsi(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 330 "../../asn1/gsm_map/gsm_map.cnf" +#line 345 "../../asn1/gsm_map/gsm_map.cnf" actx->pinfo->p2p_dir = P2P_DIR_SENT; offset = dissect_gsm_map_IMSI(implicit_tag, tvb, offset, actx, tree, hf_index); @@ -17637,7 +17648,7 @@ dissect_gsm_old_T_imsi(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset static int dissect_gsm_old_T_lmsi(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 334 "../../asn1/gsm_map/gsm_map.cnf" +#line 349 "../../asn1/gsm_map/gsm_map.cnf" actx->pinfo->p2p_dir = P2P_DIR_SENT; offset = dissect_gsm_map_LMSI(implicit_tag, tvb, offset, actx, tree, hf_index); @@ -17651,7 +17662,7 @@ dissect_gsm_old_T_lmsi(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset static int dissect_gsm_old_T_serviceCentreAddressDA(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 354 "../../asn1/gsm_map/gsm_map.cnf" +#line 369 "../../asn1/gsm_map/gsm_map.cnf" actx->pinfo->p2p_dir = P2P_DIR_RECV; offset = dissect_gsm_map_AddressString(implicit_tag, tvb, offset, actx, tree, hf_index); @@ -17691,7 +17702,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 346 "../../asn1/gsm_map/gsm_map.cnf" +#line 361 "../../asn1/gsm_map/gsm_map.cnf" actx->pinfo->p2p_dir = P2P_DIR_RECV; offset = dissect_gsm_map_ISDN_AddressString(implicit_tag, tvb, offset, actx, tree, hf_index); @@ -17705,7 +17716,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 322 "../../asn1/gsm_map/gsm_map.cnf" +#line 337 "../../asn1/gsm_map/gsm_map.cnf" actx->pinfo->p2p_dir = P2P_DIR_SENT; offset = dissect_gsm_map_AddressString(implicit_tag, tvb, offset, actx, tree, hf_index); @@ -17750,7 +17761,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 381 "../../asn1/gsm_map/gsm_map.cnf" +#line 396 "../../asn1/gsm_map/gsm_map.cnf" /* dissect_gsm_map_SignalInfo will return parameter_tvb in actx */ offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, @@ -18621,7 +18632,7 @@ dissect_gsm_ss_LCS_PeriodicLocationCancellationArg(gboolean implicit_tag _U_, tv static int dissect_gsm_map_ericsson_T_locationInformation(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 956 "../../asn1/gsm_map/gsm_map.cnf" +#line 971 "../../asn1/gsm_map/gsm_map.cnf" tvbuff_t *parameter_tvb; proto_tree *subtree; guint8 rat; @@ -20270,7 +20281,7 @@ dissect_NokiaMAP_Extensions_AllowedServiceData(gboolean implicit_tag _U_, tvbuff /*--- End of included file: packet-gsm_map-fn.c ---*/ -#line 850 "../../asn1/gsm_map/packet-gsm_map-template.c" +#line 846 "../../asn1/gsm_map/packet-gsm_map-template.c" /* Specific translation for MAP V3 */ const value_string gsm_map_V1V2_opr_code_strings[] = { @@ -20492,7 +20503,7 @@ const value_string gsm_map_opr_code_strings[] = { /* Unknown or empty loop list OPERATION */ /*--- End of included file: packet-gsm_map-table.c ---*/ -#line 861 "../../asn1/gsm_map/packet-gsm_map-template.c" +#line 857 "../../asn1/gsm_map/packet-gsm_map-template.c" { 0, NULL } }; @@ -20709,7 +20720,7 @@ static const value_string gsm_map_err_code_string_vals[] = { /* Unknown or empty loop list OPERATION */ /*--- End of included file: packet-gsm_map-table.c ---*/ -#line 867 "../../asn1/gsm_map/packet-gsm_map-template.c" +#line 863 "../../asn1/gsm_map/packet-gsm_map-template.c" { 0, NULL } }; #endif @@ -21218,7 +21229,7 @@ static int dissect_invokeData(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ proto_tree_add_expert_format(tree, actx->pinfo, &ei_gsm_map_unknown_invokeData, tvb, offset, -1, "Unknown invokeData %d", opcode); } - offset+= tvb_length_remaining(tvb,offset); + offset+= tvb_reported_length_remaining(tvb,offset); break; } return offset; @@ -21528,7 +21539,7 @@ static int dissect_returnResultData(proto_tree *tree, tvbuff_t *tvb, int offset, proto_tree_add_expert_format(tree, actx->pinfo, &ei_gsm_map_unknown_invokeData, tvb, offset, -1, "Unknown returnResultData %d", opcode); } - offset+= tvb_length_remaining(tvb,offset); + offset+= tvb_reported_length_remaining(tvb,offset); break; } return offset; @@ -21691,7 +21702,7 @@ static int dissect_returnErrorData(proto_tree *tree, tvbuff_t *tvb, int offset, proto_tree_add_expert_format(tree, actx->pinfo, &ei_gsm_map_unknown_invokeData, tvb, offset, -1, "Unknown returnErrorData %d", opcode); } - offset+= tvb_length_remaining(tvb,offset); + offset+= tvb_reported_length_remaining(tvb,offset); break; } return offset; @@ -22468,18 +22479,10 @@ void proto_register_gsm_map(void) { { "Number plan", "gsm_map.number_plan", FT_UINT8, BASE_HEX|BASE_EXT_STRING, &gsm_map_number_plan_values_ext, 0x0f, NULL, HFILL }}, - { &hf_gsm_map_isdn_address_digits, - { "ISDN Address digits", "gsm_map.isdn.address.digits", - FT_STRING, BASE_NONE, NULL, 0, - NULL, HFILL }}, { &hf_gsm_map_address_digits, { "Address digits", "gsm_map.address.digits", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }}, - { &hf_gsm_map_servicecentreaddress_digits, - { "ServiceCentreAddress digits", "gsm_map.servicecentreaddress_digits", - FT_STRING, BASE_NONE, NULL, 0, - NULL, HFILL }}, { &hf_gsm_map_TBCD_digits, { "TBCD digits", "gsm_map.tbcd_digits", FT_STRING, BASE_NONE, NULL, 0, @@ -22589,10 +22592,6 @@ void proto_register_gsm_map(void) { { "GSN-Address IPv4", "gsm_map.gsnaddress_ipv4", FT_IPv4, BASE_NONE, NULL, 0, "IPAddress IPv4", HFILL }}, - { &hf_gsm_map_GSNAddress_IPv6, - { "GSN Address IPv6", "gsm_map.gsnaddress_ipv6", - FT_IPv4, BASE_NONE, NULL, 0, - "IPAddress IPv6", HFILL }}, { &hf_gsm_map_ranap_service_Handover, { "service-Handover", "gsm_map.ranap.service_Handover", FT_UINT32, BASE_DEC, VALS(ranap_Service_Handover_vals), 0, @@ -22605,10 +22604,6 @@ void proto_register_gsm_map(void) { { "EncryptionInformation", "gsm_map.ranap.EncryptionInformation", FT_NONE, BASE_NONE, NULL, 0, "gsm_map.ranap.EncryptionInformation", HFILL }}, - { &hf_gsm_map_PlmnContainer_PDU, - { "PlmnContainer", "gsm_map.PlmnContainer", - FT_NONE, BASE_NONE, NULL, 0, - "gsm_map.PlmnContainer", HFILL }}, { &hf_gsm_map_ss_SS_UserData, { "SS-UserData", "gsm_ss.SS_UserData", FT_STRING, BASE_NONE, NULL, 0, @@ -29513,7 +29508,7 @@ void proto_register_gsm_map(void) { NULL, HFILL }}, /*--- End of included file: packet-gsm_map-hfarr.c ---*/ -#line 2901 "../../asn1/gsm_map/packet-gsm_map-template.c" +#line 2881 "../../asn1/gsm_map/packet-gsm_map-template.c" }; /* List of subtrees */ @@ -30222,7 +30217,7 @@ void proto_register_gsm_map(void) { &ett_NokiaMAP_Extensions_AllowedServiceData, /*--- End of included file: packet-gsm_map-ettarr.c ---*/ -#line 2933 "../../asn1/gsm_map/packet-gsm_map-template.c" +#line 2913 "../../asn1/gsm_map/packet-gsm_map-template.c" }; static ei_register_info ei[] = { @@ -30325,7 +30320,7 @@ void proto_register_gsm_map(void) { /*--- End of included file: packet-gsm_map-dis-tab.c ---*/ -#line 2970 "../../asn1/gsm_map/packet-gsm_map-template.c" +#line 2950 "../../asn1/gsm_map/packet-gsm_map-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" ); |