3 * packet-gsm_map.c: There are 1174 display filter fields registered. Most are
4 * prefixed appropriately as "gsm_map", but many others are prefixed as
5 * "gsm_old", or even "gad", "gsm_ss", or with no prefix at all. I don't know
6 * if the ones with "gsm_old" are simply obsolete display filter fields or if
7 * they should be prefixed as "gsm_map.old." or what. Similar uncertainties
8 * for the others. Someone more knowledgeable than I am with respect to this
9 * dissector should provide a patch for it.
12 /* packet-gsm_map-template.c
13 * Routines for GSM MobileApplication packet dissection
15 * Copyright 2004 - 2010 , Anders Broman <anders.broman [AT] ericsson.com>
16 * Based on the dissector by:
17 * Felix Fei <felix.fei [AT] utstar.com>
18 * and Michael Lum <mlum [AT] telostech.com>
22 * Wireshark - Network traffic analyzer
23 * By Gerald Combs <gerald@wireshark.org>
24 * Copyright 1998 Gerald Combs
26 * This program is free software; you can redistribute it and/or
27 * modify it under the terms of the GNU General Public License
28 * as published by the Free Software Foundation; either version 2
29 * of the License, or (at your option) any later version.
31 * This program is distributed in the hope that it will be useful,
32 * but WITHOUT ANY WARRANTY; without even the implied warranty of
33 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34 * GNU General Public License for more details.
36 * You should have received a copy of the GNU General Public License
37 * along with this program; if not, write to the Free Software
38 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
41 * Updated to ETSI TS 129 002 V7.5.0 (3GPP TS 29.002 V7.5.0 (2006-09) Release 7)
42 * Updated to ETSI TS 129 002 V8.4.0 (3GPP TS 29.002 V8.1.0 (2007-06) Release 8)
44 * References: 3GPP TS 24.080
50 #include <epan/packet.h>
51 #include <epan/prefs.h>
53 #include <epan/wmem/wmem.h>
54 #include <epan/oids.h>
55 #include <epan/expert.h>
59 #include <epan/asn1.h>
60 #include "packet-ber.h"
61 #include "packet-per.h"
62 #include "packet-q931.h"
63 #include "packet-gsm_map.h"
64 #include "packet-gsm_a_common.h"
65 #include "packet-tcap.h"
66 #include "packet-e164.h"
67 #include "packet-e212.h"
68 #include "packet-smpp.h"
69 #include "packet-gsm_sms.h"
70 #include "packet-ranap.h"
72 #define PNAME "GSM Mobile Application"
73 #define PSNAME "GSM_MAP"
74 #define PFNAME "gsm_map"
76 void proto_register_gsm_map(void);
77 void proto_reg_handoff_gsm_map(void);
79 /* Initialize the protocol and registered fields */
80 static int proto_gsm_map
= -1;
81 static int proto_gsm_map_dialogue
= -1;
83 static int hf_gsm_map_old_Component_PDU
= -1;
84 static int hf_gsm_map_getPassword
= -1;
85 static int hf_gsm_map_currentPassword
= -1;
86 static int hf_gsm_map_extension
= -1;
87 static int hf_gsm_map_nature_of_number
= -1;
88 static int hf_gsm_map_number_plan
= -1;
89 static int hf_gsm_map_isdn_address_digits
= -1;
90 static int hf_gsm_map_address_digits
= -1;
91 static int hf_gsm_map_servicecentreaddress_digits
= -1;
92 static int hf_gsm_map_TBCD_digits
= -1;
93 static int hf_gsm_map_Ss_Status_unused
= -1;
94 static int hf_gsm_map_Ss_Status_q_bit
= -1;
95 static int hf_gsm_map_Ss_Status_p_bit
= -1;
96 static int hf_gsm_map_Ss_Status_r_bit
= -1;
97 static int hf_gsm_map_Ss_Status_a_bit
= -1;
98 static int hf_gsm_map_notification_to_forwarding_party
= -1;
99 static int hf_gsm_map_redirecting_presentation
= -1;
100 static int hf_gsm_map_notification_to_calling_party
= -1;
101 static int hf_gsm_map_forwarding_reason
= -1;
102 static int hf_gsm_map_pdp_type_org
= -1;
103 static int hf_gsm_map_etsi_pdp_type_number
= -1;
104 static int hf_gsm_map_ietf_pdp_type_number
= -1;
105 static int hf_gsm_map_ext_qos_subscribed_pri
= -1;
107 static int hf_gsm_map_qos_traffic_cls
= -1;
108 static int hf_gsm_map_qos_del_order
= -1;
109 static int hf_gsm_map_qos_del_of_err_sdu
= -1;
110 static int hf_gsm_map_qos_ber
= -1;
111 static int hf_gsm_map_qos_sdu_err_rat
= -1;
112 static int hf_gsm_map_qos_traff_hdl_pri
= -1;
113 static int hf_gsm_map_qos_max_sdu
= -1;
114 static int hf_gsm_map_max_brate_ulink
= -1;
115 static int hf_gsm_map_max_brate_dlink
= -1;
116 static int hf_gsm_map_qos_transfer_delay
= -1;
117 static int hf_gsm_map_guaranteed_max_brate_ulink
= -1;
118 static int hf_gsm_map_guaranteed_max_brate_dlink
= -1;
119 static int hf_gsm_map_GSNAddress_IPv4
= -1;
120 static int hf_gsm_map_GSNAddress_IPv6
= -1;
121 static int hf_gsm_map_ranap_service_Handover
= -1;
122 static int hf_gsm_map_IntegrityProtectionInformation
= -1;
123 static int hf_gsm_map_EncryptionInformation
= -1;
124 static int hf_gsm_map_PlmnContainer_PDU
= -1;
125 static int hf_gsm_map_ss_SS_UserData
= -1;
126 static int hf_gsm_map_cbs_coding_grp
= -1;
127 static int hf_gsm_map_cbs_coding_grp0_lang
= -1;
128 static int hf_gsm_map_cbs_coding_grp1_lang
= -1;
129 static int hf_gsm_map_cbs_coding_grp2_lang
= -1;
130 static int hf_gsm_map_cbs_coding_grp3_lang
= -1;
131 static int hf_gsm_map_cbs_coding_grp4_7_comp
= -1;
132 static int hf_gsm_map_cbs_coding_grp4_7_class_ind
= -1;
133 static int hf_gsm_map_cbs_coding_grp4_7_char_set
= -1;
134 static int hf_gsm_map_cbs_coding_grp4_7_class
= -1;
135 static int hf_gsm_map_cbs_coding_grp15_mess_code
= -1;
136 static int hf_gsm_map_cbs_coding_grp15_class
= -1;
137 static int hf_gsm_map_tmsi
= -1;
138 static int hf_gsm_map_ie_tag
= -1;
139 static int hf_gsm_map_len
= -1;
140 static int hf_gsm_map_disc_par
= -1;
141 static int hf_gsm_map_dlci
= -1;
142 static int hf_gsm_apn_str
= -1;
143 static int hf_gsm_map_locationnumber_odd_even
= -1;
144 static int hf_gsm_map_locationnumber_nai
= -1;
145 static int hf_gsm_map_locationnumber_inn
= -1;
146 static int hf_gsm_map_locationnumber_npi
= -1;
147 static int hf_gsm_map_locationnumber_apri
= -1;
148 static int hf_gsm_map_locationnumber_screening_ind
= -1;
149 static int hf_gsm_map_locationnumber_digits
= -1;
150 static int hf_gsm_map_ericsson_locationInformation_rat
= -1;
151 static int hf_gsm_map_ericsson_locationInformation_lac
= -1;
152 static int hf_gsm_map_ericsson_locationInformation_ci
= -1;
153 static int hf_gsm_map_ericsson_locationInformation_sac
= -1;
155 #include "packet-gsm_map-hf.c"
157 /* Initialize the subtree pointers */
158 static gint ett_gsm_map
= -1;
159 static gint ett_gsm_map_InvokeId
= -1;
160 static gint ett_gsm_map_InvokePDU
= -1;
161 static gint ett_gsm_map_ReturnResultPDU
= -1;
162 static gint ett_gsm_map_ReturnErrorPDU
= -1;
163 static gint ett_gsm_map_ReturnResult_result
= -1;
164 static gint ett_gsm_map_ReturnError_result
= -1;
165 static gint ett_gsm_map_GSMMAPPDU
= -1;
166 static gint ett_gsm_map_ext_qos_subscribed
= -1;
167 static gint ett_gsm_map_pdptypenumber
= -1;
168 static gint ett_gsm_map_RAIdentity
= -1;
169 static gint ett_gsm_map_LAIFixedLength
= -1;
170 static gint ett_gsm_map_isdn_address_string
= -1;
171 static gint ett_gsm_map_geo_desc
= -1;
172 static gint ett_gsm_map_LongSignalInfo
= -1;
173 static gint ett_gsm_map_RadioResourceInformation
=-1;
174 static gint ett_gsm_map_MSNetworkCapability
=-1;
175 static gint ett_gsm_map_MSRadioAccessCapability
= -1;
176 static gint ett_gsm_map_externalsignalinfo
= -1;
177 static gint ett_gsm_map_cbs_data_coding
= -1;
178 static gint ett_gsm_map_GlobalCellId
= -1;
179 static gint ett_gsm_map_GeographicalInformation
= -1;
180 static gint ett_gsm_map_apn_str
= -1;
181 static gint ett_gsm_map_LocationNumber
= -1;
182 static gint ett_gsm_map_ericsson_locationInformation
= -1;
184 #include "packet-gsm_map-ett.c"
186 static expert_field ei_gsm_map_unknown_sequence3
= EI_INIT
;
187 static expert_field ei_gsm_map_unknown_sequence
= EI_INIT
;
188 static expert_field ei_gsm_map_unknown_parameter
= EI_INIT
;
189 static expert_field ei_gsm_map_unknown_invokeData
= EI_INIT
;
191 static dissector_handle_t gsm_sms_handle
; /* SMS TPDU */
192 static dissector_handle_t data_handle
;
193 static dissector_handle_t ranap_handle
;
194 static dissector_handle_t dtap_handle
;
195 static dissector_handle_t map_handle
;
196 static dissector_table_t map_prop_arg_opcode_table
; /* prorietary operation codes */
197 static dissector_table_t map_prop_res_opcode_table
; /* prorietary operation codes */
198 static dissector_table_t map_prop_err_opcode_table
; /* prorietary operation codes */
199 /* Preferenc settings default */
201 static range_t
*global_ssn_range
;
202 #define APPLICATON_CONTEXT_FROM_TRACE 0
203 static gint pref_application_context_version
= APPLICATON_CONTEXT_FROM_TRACE
;
204 static gboolean pref_ericsson_proprietary_ext
= FALSE
;
206 /* Global variables */
207 static guint32 opcode
=0;
208 static guint32 errorCode
;
209 static proto_tree
*top_tree
;
210 static int application_context_version
;
211 static guint ProtocolId
;
212 static guint AccessNetworkProtocolId
;
213 static const char *obj_id
= NULL
;
214 static int gsm_map_tap
= -1;
216 #define SMS_ENCODING_NOT_SET 0
217 #define SMS_ENCODING_7BIT 1
218 #define SMS_ENCODING_8BIT 2
219 #define SMS_ENCODING_UCS2 3
220 #define SMS_ENCODING_7BIT_LANG 4
221 #define SMS_ENCODING_UCS2_LANG 5
223 static guint8 sms_encoding
;
225 /* Forward declarations */
226 static int dissect_invokeData(proto_tree
*tree
, tvbuff_t
*tvb
, int offset
, asn1_ctx_t
*actx
);
227 static int dissect_returnResultData(proto_tree
*tree
, tvbuff_t
*tvb
, int offset
, asn1_ctx_t
*actx
);
228 static int dissect_returnErrorData(proto_tree
*tree
, tvbuff_t
*tvb
, int offset
, asn1_ctx_t
*actx
);
229 const gchar
* gsm_map_opr_code(guint32 val
);
233 const value_string gsm_map_PDP_Type_Organisation_vals
[] = {
239 const value_string gsm_map_ietf_defined_pdp_vals
[] = {
240 { 0x21, "IPv4 Address" },
241 { 0x57, "IPv6 Address" },
245 const value_string gsm_map_etsi_defined_pdp_vals
[] = {
250 static const value_string gsm_map_tag_vals
[] = {
251 { 0x4, "Bearer Capability" },
255 static const value_string gsm_map_disc_par_vals
[] = {
256 { 0, "Not Transparent" },
257 { 1, "Transparent" },
261 static const value_string gsm_map_ericsson_locationInformation_rat_vals
[] = {
265 { 0xf, "No information" },
269 /* ITU-T Q.763 (12/1999)
270 * 3.30 Location number
272 /* b) Nature of address indicator */
273 static const range_string gsm_map_na_vals
[] = {
275 { 1, 1, "reserved for subscriber number (national use)" },
276 { 2, 2, "reserved for unknown (national use)" },
277 { 3, 3, "national (significant) number (national use)" },
278 { 4, 4, "international number" },
279 { 5, 0x6f, "spare" },
280 { 0x70, 0x7e, "spare" },
281 { 0x70, 0x7e, "reserved for national use" },
282 { 0x7f, 0x7f, "spare" },
286 /* d) Numbering plan indicator */
287 static const value_string gsm_map_np_vals
[] = {
289 { 1, "ISDN (telephony) numbering plan (ITU-T Recommendation E.164)" },
291 { 3, "Data numbering plan (ITU-T Recommendation X.121) (national use)" },
292 { 4, "Telex numbering plan (ITU-T Recommendation F.69) (national use)" },
293 { 5, "private numbering plan" },
294 { 6, "reserved for national use" },
299 * e) Address presentation restricted indicator
301 static const value_string gsm_map_addr_pres_rest_vals
[] = {
302 { 0, "presentation allowed" },
303 { 1, "presentation restricted" },
304 { 2, "address not available (national use)" },
309 /* f) Screening indicator */
310 static const value_string gsm_map_screening_ind_vals
[] = {
312 { 1, "user provided, verified and passed" },
314 { 3, "network provided" },
319 unpack_digits(tvbuff_t
*tvb
, int offset
) {
326 length
= tvb_length(tvb
);
329 digit_str
= (char *)wmem_alloc(wmem_packet_scope(), (length
- offset
)*2+1);
331 while ( offset
< length
){
333 octet
= tvb_get_guint8(tvb
,offset
);
334 digit_str
[i
] = ((octet
& 0x0f) + '0');
338 * unpack second value in byte
342 if (octet
== 0x0f) /* odd number bytes - hit filler */
345 digit_str
[i
] = ((octet
& 0x0f) + '0');
354 /* returns value in kb/s */
356 gsm_map_calc_bitrate(guint8 value
){
364 granularity
= value
>> 6;
365 returnvalue
= value
& 0x7f;
366 switch (granularity
){
370 returnvalue
= ((returnvalue
- 0x40) << 3)+64;
373 returnvalue
= (returnvalue
<< 6)+576;
376 returnvalue
= (returnvalue
<< 6)+576;
384 dissect_gsm_map_ext_qos_subscribed(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree _U_
, asn1_ctx_t
*actx
){
390 subtree
= proto_item_add_subtree(actx
->created_item
, ett_gsm_map_ext_qos_subscribed
);
392 Allocation/Retention Priority (This octet encodes each priority level defined in
393 23.107 as the binary value of the priority level, declaration in 29.060)
394 Octets 2-9 are coded according to 3GPP TS 24.008[35] Quality of Service Octets
397 /* Allocation/Retention Priority */
398 proto_tree_add_item(subtree
, hf_gsm_map_ext_qos_subscribed_pri
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
401 /* Quality of Service Octets 6-13.( Octet 2 - 9 Here) */
403 /* Traffic class, octet 6 (see 3GPP TS 23.107) Bits 8 7 6 */
404 proto_tree_add_item(subtree
, hf_gsm_map_qos_traffic_cls
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
405 /* Delivery order, octet 6 (see 3GPP TS 23.107) Bits 5 4 */
406 proto_tree_add_item(subtree
, hf_gsm_map_qos_del_order
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
407 /* Delivery of erroneous SDUs, octet 6 (see 3GPP TS 23.107) Bits 3 2 1 */
408 proto_tree_add_item(subtree
, hf_gsm_map_qos_del_of_err_sdu
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
411 /* Maximum SDU size, octet 7 (see 3GPP TS 23.107) */
412 octet
= tvb_get_guint8(tvb
,offset
);
415 proto_tree_add_text(subtree
, tvb
, offset
, 1, "Subscribed Maximum SDU size/Reserved");
419 proto_tree_add_uint(subtree
, hf_gsm_map_qos_max_sdu
, tvb
, offset
, 1, value
);
423 proto_tree_add_uint(subtree
, hf_gsm_map_qos_max_sdu
, tvb
, offset
, 1, value
);
427 proto_tree_add_uint(subtree
, hf_gsm_map_qos_max_sdu
, tvb
, offset
, 1, value
);
432 proto_tree_add_uint(subtree
, hf_gsm_map_qos_max_sdu
, tvb
, offset
, 1, value
);
434 proto_tree_add_text(subtree
, tvb
, offset
, 1, "Maximum SDU size value 0x%x not defined in TS 24.008",octet
);
439 /* Maximum bit rate for uplink, octet 8 */
440 octet
= tvb_get_guint8(tvb
,offset
);
442 proto_tree_add_text(subtree
, tvb
, offset
, 1, "Subscribed Maximum bit rate for uplink/Reserved" );
444 proto_tree_add_uint(subtree
, hf_gsm_map_max_brate_ulink
, tvb
, offset
, 1, gsm_map_calc_bitrate(octet
));
447 /* Maximum bit rate for downlink, octet 9 (see 3GPP TS 23.107) */
448 octet
= tvb_get_guint8(tvb
,offset
);
450 proto_tree_add_text(subtree
, tvb
, offset
, 1, "Subscribed Maximum bit rate for downlink/Reserved" );
452 proto_tree_add_uint(subtree
, hf_gsm_map_max_brate_dlink
, tvb
, offset
, 1, gsm_map_calc_bitrate(octet
));
455 /* Residual Bit Error Rate (BER), octet 10 (see 3GPP TS 23.107) Bits 8 7 6 5 */
456 proto_tree_add_item(subtree
, hf_gsm_map_qos_ber
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
457 /* SDU error ratio, octet 10 (see 3GPP TS 23.107) */
458 proto_tree_add_item(subtree
, hf_gsm_map_qos_sdu_err_rat
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
461 /* Transfer delay, octet 11 (See 3GPP TS 23.107) Bits 8 7 6 5 4 3 */
462 proto_tree_add_item(subtree
, hf_gsm_map_qos_transfer_delay
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
463 /* Traffic handling priority, octet 11 (see 3GPP TS 23.107) Bits 2 1 */
464 proto_tree_add_item(subtree
, hf_gsm_map_qos_traff_hdl_pri
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
467 /* Guaranteed bit rate for uplink, octet 12 (See 3GPP TS 23.107)
468 Coding is identical to that of Maximum bit rate for uplink.
470 octet
= tvb_get_guint8(tvb
,offset
);
472 proto_tree_add_text(subtree
, tvb
, offset
, 1, "Subscribed Guaranteed bit rate for uplink/Reserved" );
474 proto_tree_add_uint(subtree
, hf_gsm_map_guaranteed_max_brate_ulink
, tvb
, offset
, 1, gsm_map_calc_bitrate(octet
));
478 /* Guaranteed bit rate for downlink, octet 13(See 3GPP TS 23.107)
479 Coding is identical to that of Maximum bit rate for uplink.
481 octet
= tvb_get_guint8(tvb
,offset
);
483 proto_tree_add_text(subtree
, tvb
, offset
, 1, "Subscribed Guaranteed bit rate for downlink/Reserved" );
485 proto_tree_add_uint(subtree
, hf_gsm_map_guaranteed_max_brate_dlink
, tvb
, offset
, 1, gsm_map_calc_bitrate(octet
));
490 #define ELLIPSOID_POINT 0
491 #define ELLIPSOID_POINT_WITH_UNCERT_CIRC 1
492 #define ELLIPSOID_POINT_WITH_UNCERT_ELLIPSE 3
494 #define ELLIPSOID_POINT_WITH_ALT 8
495 #define ELLIPSOID_POINT_WITH_ALT_AND_UNCERT_ELLIPSOID 9
496 #define ELLIPSOID_ARC 10
499 0 0 0 0 Ellipsoid Point
500 0 0 0 1 Ellipsoid point with uncertainty Circle
501 0 0 1 1 Ellipsoid point with uncertainty Ellipse
503 1 0 0 0 Ellipsoid point with altitude
504 1 0 0 1 Ellipsoid point with altitude and uncertainty Ellipsoid
505 1 0 1 0 Ellipsoid Arc
506 other values reserved for future use
509 /* TS 23 032 Table 2a: Coding of Type of Shape */
510 static const value_string type_of_shape_vals
[] = {
511 { ELLIPSOID_POINT
, "Ellipsoid Point"},
512 { ELLIPSOID_POINT_WITH_UNCERT_CIRC
, "Ellipsoid point with uncertainty Circle"},
513 { ELLIPSOID_POINT_WITH_UNCERT_ELLIPSE
, "Ellipsoid point with uncertainty Ellipse"},
514 { POLYGON
, "Polygon"},
515 { ELLIPSOID_POINT_WITH_ALT
, "Ellipsoid point with altitude"},
516 { ELLIPSOID_POINT_WITH_ALT_AND_UNCERT_ELLIPSOID
, "Ellipsoid point with altitude and uncertainty Ellipsoid"},
517 { ELLIPSOID_ARC
, "Ellipsoid Arc"},
521 /* 3GPP TS 23.032 7.3.1 */
522 static const value_string sign_of_latitude_vals
[] = {
528 static const value_string dir_of_alt_vals
[] = {
529 { 0, "Altitude expresses height"},
530 { 1, "Altitude expresses depth"},
534 static const value_string gsm_map_cbs_data_coding_scheme_coding_grp_vals
[] = {
535 { 0, "Coding Group 0(Language using the GSM 7 bit default alphabet)" },
536 { 1, "Coding Group 1" },
537 { 2, "Coding Group 2" },
538 { 3, "Coding Group 3" },
539 { 4, "General Data Coding indication" },
540 { 5, "General Data Coding indication" },
541 { 6, "General Data Coding indication" },
542 { 7, "General Data Coding indication" },
544 { 9, "Message with User Data Header (UDH) structure" },
549 { 14,"Defined by the WAP Forum" },
550 { 15,"Data coding / message handling" },
553 static value_string_ext gsm_map_cbs_data_coding_scheme_coding_grp_vals_ext
= VALUE_STRING_EXT_INIT(gsm_map_cbs_data_coding_scheme_coding_grp_vals
);
556 * Bits 3..0 indicate the language:
558 static const value_string gsm_map_cbs_coding_grp0_lang_vals
[] = {
574 { 15, "Language unspecified"},
577 static value_string_ext gsm_map_cbs_coding_grp0_lang_vals_ext
= VALUE_STRING_EXT_INIT(gsm_map_cbs_coding_grp0_lang_vals
);
579 static const value_string gsm_map_cbs_coding_grp1_lang_vals
[] = {
580 { 0, "GSM 7 bit default alphabet; message preceded by language indication"},
581 { 1, "UCS2; message preceded by language indication"},
598 static value_string_ext gsm_map_cbs_coding_grp1_lang_vals_ext
= VALUE_STRING_EXT_INIT(gsm_map_cbs_coding_grp1_lang_vals
);
600 static const value_string gsm_map_cbs_coding_grp2_lang_vals
[] = {
606 { 5, "Reserved for other languages using the GSM 7 bit default alphabet, with unspecified handling at the MS"},
607 { 6, "Reserved for other languages using the GSM 7 bit default alphabet, with unspecified handling at the MS"},
608 { 7, "Reserved for other languages using the GSM 7 bit default alphabet, with unspecified handling at the MS"},
609 { 8, "Reserved for other languages using the GSM 7 bit default alphabet, with unspecified handling at the MS"},
610 { 9, "Reserved for other languages using the GSM 7 bit default alphabet, with unspecified handling at the MS"},
611 { 10, "Reserved for other languages using the GSM 7 bit default alphabet, with unspecified handling at the MS"},
612 { 11, "Reserved for other languages using the GSM 7 bit default alphabet, with unspecified handling at the MS"},
613 { 12, "Reserved for other languages using the GSM 7 bit default alphabet, with unspecified handling at the MS"},
614 { 13, "Reserved for other languages using the GSM 7 bit default alphabet, with unspecified handling at the MS"},
615 { 14, "Reserved for other languages using the GSM 7 bit default alphabet, with unspecified handling at the MS"},
616 { 15, "Reserved for other languages using the GSM 7 bit default alphabet, with unspecified handling at the MS"},
619 static value_string_ext gsm_map_cbs_coding_grp2_lang_vals_ext
= VALUE_STRING_EXT_INIT(gsm_map_cbs_coding_grp2_lang_vals
);
621 static const value_string gsm_map_cbs_coding_grp3_lang_vals
[] = {
622 { 0, "Reserved for other languages using the GSM 7 bit default alphabet, with unspecified handling at the MS"},
623 { 1, "Reserved for other languages using the GSM 7 bit default alphabet, with unspecified handling at the MS"},
624 { 2, "Reserved for other languages using the GSM 7 bit default alphabet, with unspecified handling at the MS"},
625 { 3, "Reserved for other languages using the GSM 7 bit default alphabet, with unspecified handling at the MS"},
626 { 4, "Reserved for other languages using the GSM 7 bit default alphabet, with unspecified handling at the MS"},
627 { 5, "Reserved for other languages using the GSM 7 bit default alphabet, with unspecified handling at the MS"},
628 { 6, "Reserved for other languages using the GSM 7 bit default alphabet, with unspecified handling at the MS"},
629 { 7, "Reserved for other languages using the GSM 7 bit default alphabet, with unspecified handling at the MS"},
630 { 8, "Reserved for other languages using the GSM 7 bit default alphabet, with unspecified handling at the MS"},
631 { 9, "Reserved for other languages using the GSM 7 bit default alphabet, with unspecified handling at the MS"},
632 { 10, "Reserved for other languages using the GSM 7 bit default alphabet, with unspecified handling at the MS"},
633 { 11, "Reserved for other languages using the GSM 7 bit default alphabet, with unspecified handling at the MS"},
634 { 12, "Reserved for other languages using the GSM 7 bit default alphabet, with unspecified handling at the MS"},
635 { 13, "Reserved for other languages using the GSM 7 bit default alphabet, with unspecified handling at the MS"},
636 { 14, "Reserved for other languages using the GSM 7 bit default alphabet, with unspecified handling at the MS"},
637 { 15, "Reserved for other languages using the GSM 7 bit default alphabet, with unspecified handling at the MS"},
640 static value_string_ext gsm_map_cbs_coding_grp3_lang_vals_ext
= VALUE_STRING_EXT_INIT(gsm_map_cbs_coding_grp3_lang_vals
);
642 static const true_false_string gsm_map_cbs_coding_grp4_7_comp_vals
= {
643 "The text is compressed using the compression algorithm defined in 3GPP TS 23.042",
644 "The text is uncompressed"
647 static const true_false_string gsm_map_cbs_coding_grp4_7_class_ind_vals
= {
648 "Bits 1 to 0 have a message class meaning",
649 "Bits 1 to 0 are reserved and have no message class meaning"
652 /* Bits 3 and 2 indicate the character set being used, as follows: */
654 static const value_string gsm_map_cbs_coding_grp4_7_char_set_vals
[] = {
655 { 0, "GSM 7 bit default alphabet"},
657 { 2, "UCS2 (16 bit)"},
662 static const value_string gsm_map_cbs_coding_grp4_7_class_vals
[] = {
664 { 1, "Class 1 Default meaning: ME-specific"},
665 { 2, "Class 2 (U)SIM specific message"},
666 { 3, "Class 3 Default meaning: TE-specific (see 3GPP TS 27.005"},
670 static const value_string gsm_map_cbs_coding_grp15_mess_code_vals
[] = {
671 { 0, "GSM 7 bit default alphabet"},
676 static const value_string gsm_map_cbs_coding_grp15_class_vals
[] = {
677 { 0, "GSM 7 bit default alphabet"},
683 /* 3GPP TS 23.038 version 7.0.0 Release 7 */
685 dissect_cbs_data_coding_scheme(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint16 offset
)
689 guint8 character_set
;
691 octet
= tvb_get_guint8(tvb
,offset
);
692 coding_grp
= octet
>>4;
693 proto_tree_add_item(tree
, hf_gsm_map_cbs_coding_grp
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
695 sms_encoding
= SMS_ENCODING_NOT_SET
;
698 proto_tree_add_item(tree
, hf_gsm_map_cbs_coding_grp0_lang
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
699 sms_encoding
= SMS_ENCODING_7BIT
;
702 proto_tree_add_item(tree
, hf_gsm_map_cbs_coding_grp1_lang
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
703 if ((octet
& 0x0f)== 0){
704 sms_encoding
= SMS_ENCODING_7BIT_LANG
;
706 sms_encoding
= SMS_ENCODING_UCS2_LANG
;
710 proto_tree_add_item(tree
, hf_gsm_map_cbs_coding_grp2_lang
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
711 sms_encoding
= SMS_ENCODING_7BIT
;
714 proto_tree_add_item(tree
, hf_gsm_map_cbs_coding_grp3_lang
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
715 sms_encoding
= SMS_ENCODING_7BIT
;
717 /* Coding_grp 01xx */
726 proto_tree_add_item(tree
, hf_gsm_map_cbs_coding_grp4_7_comp
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
727 proto_tree_add_item(tree
, hf_gsm_map_cbs_coding_grp4_7_class_ind
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
728 proto_tree_add_item(tree
, hf_gsm_map_cbs_coding_grp4_7_char_set
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
729 if ((octet
& 0x10)== 0x10){
730 proto_tree_add_item(tree
, hf_gsm_map_cbs_coding_grp4_7_class
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
732 /* Bits 3 and 2 indicate the character set being used, */
733 character_set
= (octet
&0x0c)>>2;
734 switch (character_set
){
736 /* GSM 7 bit default alphabet */
737 sms_encoding
= SMS_ENCODING_7BIT
;
741 sms_encoding
= SMS_ENCODING_8BIT
;
745 sms_encoding
= SMS_ENCODING_UCS2
;
749 sms_encoding
= SMS_ENCODING_NOT_SET
;
756 /* Reserved coding groups */
759 /* Message with User Data Header (UDH) structure:*/
760 proto_tree_add_item(tree
, hf_gsm_map_cbs_coding_grp4_7_char_set
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
761 proto_tree_add_item(tree
, hf_gsm_map_cbs_coding_grp4_7_class
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
762 character_set
= (octet
&0x0c)>>2;
763 switch (character_set
){
765 /* GSM 7 bit default alphabet */
766 sms_encoding
= SMS_ENCODING_7BIT
;
770 sms_encoding
= SMS_ENCODING_8BIT
;
774 sms_encoding
= SMS_ENCODING_UCS2
;
778 sms_encoding
= SMS_ENCODING_NOT_SET
;
792 /* 1010..1101 Reserved coding groups */
795 /* Defined by the WAP Forum
796 * "Wireless Datagram Protocol Specification", Wireless Application Protocol Forum Ltd.
800 /* Data coding / message handling */
801 proto_tree_add_item(tree
, hf_gsm_map_cbs_coding_grp15_mess_code
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
802 proto_tree_add_item(tree
, hf_gsm_map_cbs_coding_grp15_class
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
803 character_set
= (octet
&0x04)>>2;
804 if (character_set
== 0){
805 sms_encoding
= SMS_ENCODING_7BIT
;
807 sms_encoding
= SMS_ENCODING_8BIT
;
817 dissect_gsm_map_msisdn(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
819 const char *digit_str
;
824 proto_tree_add_item(tree
, hf_gsm_map_extension
, tvb
, 0,1,ENC_BIG_ENDIAN
);
825 proto_tree_add_item(tree
, hf_gsm_map_nature_of_number
, tvb
, 0,1,ENC_BIG_ENDIAN
);
826 proto_tree_add_item(tree
, hf_gsm_map_number_plan
, tvb
, 0,1,ENC_BIG_ENDIAN
);
828 if(tvb_length(tvb
)==1)
831 digit_str
= unpack_digits(tvb
, 1);
833 proto_tree_add_string(tree
, hf_gsm_map_address_digits
, tvb
, 1, -1, digit_str
);
835 octet
= tvb_get_guint8(tvb
,0);
836 na
= (octet
& 0x70)>>4;
838 if ((na
== 1) && (np
==1))/*International Number & E164*/
839 dissect_e164_cc(tvb
, tree
, 1, TRUE
);
841 dissect_e212_mcc_mnc_in_address(tvb
, pinfo
, tree
, 1);
845 #include "packet-gsm_map-fn.c"
847 /* Specific translation for MAP V3 */
848 const value_string gsm_map_V1V2_opr_code_strings
[] = {
850 { 45, "sendRoutingInfoForSM" },
854 /* Generic translation for MAP operation */
855 const value_string gsm_map_opr_code_strings
[] = {
856 #include "packet-gsm_map-table.c"
859 static const value_string gsm_map_err_code_string_vals
[] = {
860 #include "packet-gsm_map-table.c"
863 static const true_false_string gsm_map_extension_value
= {
867 static const value_string gsm_map_nature_of_number_values
[] = {
869 { 0x01, "International Number" },
870 { 0x02, "National Significant Number" },
871 { 0x03, "Network Specific Number" },
872 { 0x04, "Subscriber Number" },
873 { 0x05, "Reserved" },
874 { 0x06, "Abbreviated Number" },
875 { 0x07, "Reserved for extension" },
878 static value_string_ext gsm_map_nature_of_number_values_ext
= VALUE_STRING_EXT_INIT(gsm_map_nature_of_number_values
);
880 static const value_string gsm_map_number_plan_values
[] = {
882 { 0x01, "ISDN/Telephony Numbering (Rec ITU-T E.164)" },
884 { 0x03, "Data Numbering (ITU-T Rec. X.121)" },
885 { 0x04, "Telex Numbering (ITU-T Rec. F.69)" },
887 { 0x06, "Land Mobile Numbering (ITU-T Rec. E.212)" },
889 { 0x08, "National Numbering" },
890 { 0x09, "Private Numbering" },
896 { 0x0f, "Reserved for extension" },
899 static value_string_ext gsm_map_number_plan_values_ext
= VALUE_STRING_EXT_INIT(gsm_map_number_plan_values
);
901 static const true_false_string gsm_map_Ss_Status_q_bit_values
= {
905 static const true_false_string gsm_map_Ss_Status_p_values
= {
909 static const true_false_string gsm_map_Ss_Status_r_values
= {
913 static const true_false_string gsm_map_Ss_Status_a_values
= {
919 * Translate the MAP operation code value to a text string
920 * Take into account the MAP version for ForwardSM
922 const gchar
* gsm_map_opr_code(guint32 val
) {
924 case 44: /*mt-forwardSM*/
926 case 46: /*mo-forwardSM*/
928 if (application_context_version
< 3) {
929 return val_to_str_const(val
, gsm_map_V1V2_opr_code_strings
, "Unknown GSM-MAP opcode");
931 /* Else use the default map operation translation */
933 return val_to_str_ext_const(val
, &gsm_old_GSMMAPOperationLocalvalue_vals_ext
, "Unknown GSM-MAP opcode");
938 /* Prototype for a decoding function */
939 typedef int (* dissect_function_t
)( gboolean
,
947 * Dissect Multiple Choice Message
948 * This function is used to decode a message, when several encoding may be used.
949 * For exemple, in the last MAP version, the Cancel Location is defined like this:
950 * CancelLocationArg ::= [3] IMPLICIT SEQUENCE
951 * But in the previous MAP version, it was a CHOICE between a SEQUENCE and an IMSI
952 * As ASN1 encoders (or software) still uses the old encoding, this function allows
953 * the decoding of both versions.
954 * Moreover, some optimizations (or bad practice ?) in ASN1 encoder, removes the
955 * SEQUENCE tag, when only one parameter is present in the SEQUENCE.
956 * This explain why the function expects 3 parameters:
957 * - a [3] SEQUENCE corresponding the recent ASN1 MAP encoding
958 * - a SEQUENCE for old style
959 * - and a single parameter, for old version or optimizations
961 * The analyze of the first ASN1 tag, indicate what kind of decoding should be used,
962 * if the decoding function is provided (so not a NULL function)
964 static int dissect_mc_message(tvbuff_t
*tvb
,
968 gboolean implicit_param _U_
, dissect_function_t parameter
, int hf_index_param _U_
,
969 gboolean implicit_seq _U_
, dissect_function_t sequence
, int hf_index_seq _U_
,
970 gboolean implicit_seq3 _U_
, dissect_function_t sequence3
, int hf_index_seq3 _U_
)
974 gboolean bug_pc
, bug_ind_field
;
978 octet
= tvb_get_guint8(tvb
,0);
979 if ( (octet
& 0xf) == 3) {
980 /* XXX asn2wrs can not yet handle tagged assignment yes so this
981 * XXX is some conformance file magic to work around that bug
983 offset
= get_ber_identifier(tvb
, offset
, &bug_class
, &bug_pc
, &bug_tag
);
984 offset
= get_ber_length(tvb
, offset
, &bug_len
, &bug_ind_field
);
985 if (sequence3
!= NULL
) {
986 offset
= (sequence3
) (implicit_seq3
, tvb
, offset
, actx
, tree
, hf_index_seq3
);
988 proto_tree_add_expert(tree
, actx
->pinfo
, &ei_gsm_map_unknown_sequence3
, tvb
, offset
, -1);
990 } else if (octet
== 0x30) {
991 if (sequence
!= NULL
) {
992 offset
= (sequence
) (implicit_seq
, tvb
, 0, actx
, tree
, hf_index_seq
);
994 proto_tree_add_expert(tree
, actx
->pinfo
, &ei_gsm_map_unknown_sequence
, tvb
, offset
, -1);
997 if (parameter
!= NULL
) {
998 offset
= (parameter
) (implicit_param
, tvb
, offset
, actx
, tree
, hf_index_param
);
1000 proto_tree_add_expert(tree
, actx
->pinfo
, &ei_gsm_map_unknown_parameter
, tvb
, offset
, -1);
1006 static int dissect_invokeData(proto_tree
*tree
, tvbuff_t
*tvb
, int offset
, asn1_ctx_t
*actx
) {
1009 case 2: /*updateLocation*/
1010 offset
=dissect_gsm_map_ms_UpdateLocationArg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1012 case 3: /*cancelLocation*/
1013 offset
=dissect_mc_message(tvb
, offset
, actx
, tree
,
1014 FALSE
, dissect_gsm_map_Identity
, hf_gsm_map_ms_identity
,
1015 FALSE
, dissect_gsm_map_Identity
, hf_gsm_map_ms_identity
,
1016 TRUE
, dissect_gsm_map_ms_CancelLocationArg
, -1);/*undefined*/
1018 case 4: /*provideRoamingNumber*/
1019 offset
=dissect_gsm_map_ch_ProvideRoamingNumberArg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1021 case 5: /*noteSubscriberDataModified*/
1022 offset
=dissect_gsm_map_ms_NoteSubscriberDataModifiedArg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1024 case 6: /*resumeCallHandling*/
1025 offset
=dissect_gsm_map_ch_ResumeCallHandlingArg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1027 case 7: /*insertSubscriberData*/
1028 offset
=dissect_gsm_map_ms_InsertSubscriberDataArg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1030 case 8: /*deleteSubscriberData*/
1031 offset
=dissect_gsm_map_ms_DeleteSubscriberDataArg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1033 /* TODO find out why this isn't in the ASN1 file */
1034 /* reserved sendParameters (9) */
1035 case 10: /*registerSS*/
1036 offset
=dissect_gsm_map_ss_RegisterSS_Arg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1038 case 11: /*eraseSS*/
1039 offset
=dissect_gsm_map_ss_SS_ForBS_Code(FALSE
, tvb
, offset
, actx
, tree
, -1);
1041 case 12: /*activateSS*/
1042 offset
=dissect_gsm_map_ss_SS_ForBS_Code(FALSE
, tvb
, offset
, actx
, tree
, -1);
1044 case 13: /*deactivateSS*/
1045 offset
=dissect_gsm_map_ss_SS_ForBS_Code(FALSE
, tvb
, offset
, actx
, tree
, -1);
1047 case 14: /*interrogateSS*/
1048 offset
=dissect_gsm_map_ss_SS_ForBS_Code(FALSE
, tvb
, offset
, actx
, tree
, -1);
1050 case 15: /*authenticationFailureReport*/
1051 offset
=dissect_gsm_map_ms_AuthenticationFailureReportArg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1053 case 16: /*SS-protocol notifySS*/
1054 offset
=dissect_gsm_ss_NotifySS_Arg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1056 case 17: /*registerPassword*/
1057 offset
=dissect_gsm_map_SS_Code(FALSE
, tvb
, offset
, actx
, tree
, hf_gsm_map_ss_Code
);
1059 case 18: /*getPassword*/
1060 offset
=dissect_gsm_old_GetPasswordArg(FALSE
, tvb
, offset
, actx
, tree
, hf_gsm_map_getPassword
);
1062 case 19: /* SS-Protocol processUnstructuredSS-Data (19) */
1063 offset
=dissect_gsm_ss_SS_UserData(FALSE
, tvb
, offset
, actx
, tree
, hf_gsm_map_ss_SS_UserData
);
1065 case 20: /*releaseResources*/
1066 offset
=dissect_gsm_map_ch_ReleaseResourcesArg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1068 case 21: /*mt-ForwardSM-VGCS*/
1069 offset
=dissect_gsm_map_sm_MT_ForwardSM_VGCS_Arg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1071 case 22: /*sendRoutingInfo*/
1072 if (application_context_version
== 3){
1073 offset
=dissect_gsm_map_ch_SendRoutingInfoArg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1075 offset
=dissect_gsm_old_SendRoutingInfoArgV2(FALSE
, tvb
, offset
, actx
, tree
, -1);
1078 case 23: /*updateGprsLocation*/
1079 offset
=dissect_gsm_map_ms_UpdateGprsLocationArg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1081 case 24: /*sendRoutingInfoForGprs*/
1082 offset
=dissect_gsm_map_ms_SendRoutingInfoForGprsArg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1084 case 25: /*failureReport*/
1085 offset
=dissect_gsm_map_ms_FailureReportArg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1087 case 26: /*noteMsPresentForGprs*/
1088 offset
=dissect_gsm_map_ms_NoteMsPresentForGprsArg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1091 /* reserved performHandover (28) */
1092 case 29: /*sendEndSignal*/
1093 offset
=dissect_mc_message(tvb
, offset
, actx
, tree
,
1095 FALSE
, dissect_gsm_old_Bss_APDU
, -1,
1096 TRUE
, dissect_gsm_map_ms_SendEndSignal_Arg
, -1);
1098 /* reserved performSubsequentHandover (30) */
1099 case 31: /*provideSIWFSNumber*/
1100 offset
=dissect_gsm_old_ProvideSIWFSNumberArg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1102 case 32: /*sIWFSSignallingModify*/
1103 offset
=dissect_gsm_old_SIWFSSignallingModifyArg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1105 case 33: /*processAccessSignalling*/
1106 offset
=dissect_mc_message(tvb
, offset
, actx
, tree
,
1108 FALSE
, dissect_gsm_old_Bss_APDU
, -1,
1109 TRUE
, dissect_gsm_map_ms_ProcessAccessSignalling_Arg
, -1);
1111 case 34: /*forwardAccessSignalling*/
1112 offset
=dissect_mc_message(tvb
, offset
, actx
, tree
,
1114 FALSE
, dissect_gsm_old_Bss_APDU
, -1,
1115 TRUE
, dissect_gsm_map_ms_ForwardAccessSignalling_Arg
, -1);
1117 /* reserved noteInternalHandover (35) */
1120 offset
=dissect_gsm_map_ms_ResetArg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1122 case 38: /*forwardCheckSS-Indication*/
1125 case 39: /*prepareGroupCall*/
1126 offset
=dissect_gsm_map_gr_PrepareGroupCallArg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1128 case 40: /*sendGroupCallEndSignal*/
1129 offset
= dissect_gsm_map_gr_SendGroupCallEndSignalArg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1131 case 41: /*processGroupCallSignalling*/
1132 offset
= dissect_gsm_map_gr_ProcessGroupCallSignallingArg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1134 case 42: /*forwardGroupCallSignalling*/
1135 offset
=dissect_gsm_map_gr_ForwardGroupCallSignallingArg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1137 case 43: /*checkIMEI*/
1138 if (pref_ericsson_proprietary_ext
) {
1139 offset
=dissect_mc_message(tvb
, offset
, actx
, tree
,
1140 FALSE
, dissect_gsm_map_IMEI
, hf_gsm_map_ms_imei
,
1141 FALSE
, dissect_gsm_map_ericsson_EnhancedCheckIMEI_Arg
, -1,
1142 TRUE
, NULL
, -1); /* no [3] SEQUENCE */
1144 offset
=dissect_mc_message(tvb
, offset
, actx
, tree
,
1145 FALSE
, dissect_gsm_map_IMEI
, hf_gsm_map_ms_imei
,
1146 FALSE
, dissect_gsm_map_ms_CheckIMEI_Arg
, -1,
1147 TRUE
, NULL
, -1); /* no [3] SEQUENCE */
1150 case 44: /*mt-forwardSM(v3) or ForwardSM(v1/v2)*/
1151 if (application_context_version
== 3)
1152 offset
=dissect_gsm_map_sm_MT_ForwardSM_Arg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1154 offset
=dissect_gsm_old_ForwardSM_Arg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1157 case 45: /*sendRoutingInfoForSM*/
1158 offset
=dissect_gsm_map_sm_RoutingInfoForSM_Arg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1160 case 46: /*mo-forwardSM(v3) or ForwardSM(v1/v2)*/
1161 if (application_context_version
== 3)
1162 offset
=dissect_gsm_map_sm_MO_ForwardSM_Arg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1164 offset
=dissect_gsm_old_ForwardSM_Arg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1167 case 47: /*reportSM-DeliveryStatus*/
1168 offset
=dissect_gsm_map_sm_ReportSM_DeliveryStatusArg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1170 /* reserved noteSubscriberPresent (48) */
1171 /* reserved alertServiceCentreWithoutResult (49)
1172 * ETS 300 599: December 2000 (GSM 09.02 version 4.19.1)
1173 * -- alertServiceCentreWithoutResult must not be used in
1174 * -- version greater 1
1177 offset
= dissect_gsm_map_sm_AlertServiceCentreArg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1179 case 50: /*activateTraceMode*/
1180 offset
=dissect_gsm_map_om_ActivateTraceModeArg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1182 case 51: /*deactivateTraceMode*/
1183 offset
=dissect_gsm_map_om_DeactivateTraceModeArg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1185 /* reserved traceSubscriberActivity (52) */
1187 case 54: /*beginSubscriberActivity*/
1188 offset
=dissect_gsm_old_BeginSubscriberActivityArg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1190 case 55: /*sendIdentification*/
1191 offset
=dissect_mc_message(tvb
, offset
, actx
, tree
,
1192 FALSE
, dissect_gsm_map_TMSI
, hf_gsm_map_tmsi
,
1193 FALSE
, dissect_gsm_map_ms_SendIdentificationArg
, -1,
1196 case 56: /*sendAuthenticationInfo*/
1197 offset
=dissect_mc_message(tvb
, offset
, actx
, tree
,
1198 FALSE
, dissect_gsm_map_IMSI
, hf_gsm_map_imsi
,
1199 FALSE
, dissect_gsm_map_ms_SendAuthenticationInfoArg
, -1,
1202 case 57: /*restoreData*/
1203 offset
=dissect_gsm_map_ms_RestoreDataArg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1205 case 58: /*sendIMSI*/
1206 offset
= dissect_gsm_map_ISDN_AddressString(FALSE
, tvb
, offset
, actx
, tree
, hf_gsm_map_msisdn
);
1208 case 59: /*processUnstructuredSS-Request*/
1209 offset
=dissect_gsm_map_ss_USSD_Arg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1211 case 60: /*unstructuredSS-Request*/
1212 offset
=dissect_gsm_map_ss_USSD_Arg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1214 case 61: /*unstructuredSS-Notify*/
1215 offset
=dissect_gsm_map_ss_USSD_Arg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1217 case 62: /*AnyTimeSubscriptionInterrogation*/
1218 offset
=dissect_gsm_map_ms_AnyTimeSubscriptionInterrogationArg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1220 case 63: /*informServiceCentre*/
1221 offset
=dissect_gsm_map_sm_InformServiceCentreArg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1223 case 64: /*alertServiceCentre*/
1224 offset
=dissect_gsm_map_sm_AlertServiceCentreArg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1226 case 65: /*AnyTimeModification*/
1227 offset
=dissect_gsm_map_ms_AnyTimeModificationArg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1229 case 66: /*readyForSM*/
1230 offset
=dissect_gsm_map_sm_ReadyForSM_Arg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1232 case 67: /*purgeMS*/
1233 offset
=dissect_mc_message(tvb
, offset
, actx
, tree
,
1234 FALSE
, dissect_gsm_map_IMSI
, hf_gsm_map_imsi
,
1235 FALSE
, dissect_gsm_old_PurgeMSArgV2
, -1, /*undefined*/
1236 TRUE
, dissect_gsm_map_ms_PurgeMS_Arg
, -1);
1238 case 68: /*prepareHandover*/
1239 offset
=dissect_mc_message(tvb
, offset
, actx
, tree
,
1241 FALSE
, dissect_gsm_old_PrepareHO_ArgOld
, -1,
1242 TRUE
, dissect_gsm_map_ms_PrepareHO_Arg
, -1);
1244 case 69: /*prepareSubsequentHandover*/
1245 offset
=dissect_mc_message(tvb
, offset
, actx
, tree
,
1248 TRUE
, dissect_gsm_map_ms_PrepareSubsequentHO_Arg
, -1);
1250 case 70: /*provideSubscriberInfo*/
1251 offset
=dissect_gsm_map_ms_ProvideSubscriberInfoArg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1253 case 71: /*anyTimeInterrogation*/
1254 offset
=dissect_gsm_map_ms_AnyTimeInterrogationArg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1256 case 72: /*ss-InvocationNotificatio*/
1257 offset
=dissect_gsm_map_ss_SS_InvocationNotificationArg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1259 case 73: /*setReportingState*/
1260 offset
=dissect_gsm_map_ch_SetReportingStateArg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1262 case 74: /*statusReport*/
1263 offset
=dissect_gsm_map_ch_StatusReportArg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1265 case 75: /*remoteUserFree*/
1266 offset
=dissect_gsm_map_ch_RemoteUserFreeArg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1268 case 76: /*registerCC-Entry*/
1269 offset
=dissect_gsm_map_ss_RegisterCC_EntryArg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1271 case 77: /*eraseCC-Entry*/
1272 offset
=dissect_gsm_map_ss_EraseCC_EntryArg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1274 case 78: /*secureTransportClass1*/
1275 case 79: /*secureTransportClass1*/
1276 case 80: /*secureTransportClass1*/
1277 case 81: /*secureTransportClass1*/
1278 offset
=dissect_gsm_old_SecureTransportArg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1281 case 83: /*provideSubscriberLocation*/
1282 offset
=dissect_gsm_map_lcs_ProvideSubscriberLocation_Arg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1284 case 84: /*sendGroupCallInfo*/
1285 offset
=dissect_gsm_map_gr_SendGroupCallInfoArg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1287 case 85: /*sendRoutingInfoForLCS*/
1288 offset
=dissect_gsm_map_lcs_RoutingInfoForLCS_Arg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1290 case 86: /*subscriberLocationReport*/
1291 offset
=dissect_gsm_map_lcs_SubscriberLocationReport_Arg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1293 case 87: /*ist-Alert*/
1294 offset
=dissect_gsm_map_ch_IST_AlertArg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1296 case 88: /*ist-Command*/
1297 offset
=dissect_gsm_map_ch_IST_CommandArg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1299 case 89: /*noteMM-Event*/
1300 offset
=dissect_gsm_map_ms_NoteMM_EventArg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1302 case 109: /*SS-protocol lcs-PeriodicLocationCancellation*/
1303 offset
=dissect_gsm_ss_LCS_PeriodicLocationCancellationArg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1305 case 110: /*SS-protocol lcs-LocationUpdate*/
1306 offset
=dissect_gsm_ss_LCS_LocationUpdateArg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1308 case 111: /*SS-protocol lcs-PeriodicLocationRequest*/
1309 offset
=dissect_gsm_ss_LCS_PeriodicLocationRequestArg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1311 case 112: /*SS-protocol lcs-AreaEventCancellation*/
1312 offset
=dissect_gsm_ss_LCS_AreaEventCancellationArg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1314 case 113: /*SS-protocol lcs-AreaEventReport*/
1315 offset
=dissect_gsm_ss_LCS_AreaEventReportArg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1317 case 114: /*SS-protocol lcs-AreaEventRequest*/
1318 offset
=dissect_gsm_ss_LCS_AreaEventRequestArg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1320 case 115: /*SS-protocol lcs-MOLR*/
1321 offset
=dissect_gsm_ss_LCS_MOLRArg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1323 case 116: /*SS-protocol lcs-LocationNotification*/
1324 offset
=dissect_gsm_ss_LocationNotificationArg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1326 case 117: /*SS-protocol callDeflection*/
1327 offset
=dissect_gsm_ss_CallDeflectionArg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1329 case 118: /*SS-protocol userUserService*/
1330 offset
=dissect_gsm_ss_UserUserServiceArg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1332 case 119: /*SS-protocol accessRegisterCCEntry*/
1333 offset
=dissect_gsm_ss_AccessRegisterCCEntryArg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1335 case 120: /*SS-protocol forwardCUG-Info*/
1336 application_context_version
= 3;
1337 offset
=dissect_gsm_ss_ForwardCUG_InfoArg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1339 case 121: /*SS-protocol splitMPTY no Argument*/
1341 case 122: /*SS-protocol retrieveMPTY no Argument*/
1343 case 123: /*SS-protocol holdMPTY no Argument*/
1345 case 124: /*SS-protocol buildMPTY no Argument*/
1347 case 125: /*SS-protocol forwardChargeAdvice*/
1348 offset
=dissect_gsm_ss_ForwardChargeAdviceArg(FALSE
, tvb
, offset
, actx
, tree
, -1);
1350 case 126: /*SS-protocol explicitCT no Argument*/
1353 if(!dissector_try_uint(map_prop_arg_opcode_table
, (guint8
)opcode
, tvb
, actx
->pinfo
, tree
)){
1354 proto_tree_add_expert_format(tree
, actx
->pinfo
, &ei_gsm_map_unknown_invokeData
,
1355 tvb
, offset
, -1, "Unknown invokeData %d", opcode
);
1357 offset
+= tvb_length_remaining(tvb
,offset
);
1364 static int dissect_returnResultData(proto_tree
*tree
, tvbuff_t
*tvb
, int offset
, asn1_ctx_t
*actx
) {
1367 case 2: /*updateLocation*/
1368 offset
=dissect_mc_message(tvb
, offset
, actx
, tree
,
1369 FALSE
, dissect_gsm_map_IMSI
, hf_gsm_map_imsi
,
1370 FALSE
, dissect_gsm_map_ms_UpdateLocationRes
, -1,
1373 case 3: /*cancelLocation*/
1374 offset
=dissect_gsm_map_ms_CancelLocationRes(FALSE
, tvb
, offset
, actx
, tree
, -1);
1376 case 4: /*provideRoamingNumber*/
1377 offset
=dissect_mc_message(tvb
, offset
, actx
, tree
,
1378 FALSE
, dissect_gsm_map_ISDN_AddressString
, hf_gsm_map_msisdn
,
1379 FALSE
, dissect_gsm_map_ch_ProvideRoamingNumberRes
, -1,
1380 TRUE
, NULL
, -1);/*undefined*/
1382 case 5: /*noteSubscriberDataModified*/
1383 offset
=dissect_gsm_map_ms_NoteSubscriberDataModifiedRes(FALSE
, tvb
, offset
, actx
, tree
, -1);
1385 case 6: /*resumeCallHandling*/
1386 offset
=dissect_gsm_map_ch_ResumeCallHandlingRes(FALSE
, tvb
, offset
, actx
, tree
, -1);
1388 case 7: /*insertSubscriberData*/
1389 offset
=dissect_gsm_map_ms_InsertSubscriberDataRes(FALSE
, tvb
, offset
, actx
, tree
, -1);
1391 case 8: /*deleteSubscriberData*/
1392 offset
=dissect_gsm_map_ms_DeleteSubscriberDataRes(FALSE
, tvb
, offset
, actx
, tree
, -1);
1394 /* TODO find out why this isn't in the ASN1 file
1395 case 9: sendParameters
1396 offset=dissect_gsm_map_DeleteSubscriberDataArg(FALSE, tvb, offset, actx, tree, -1);
1399 case 10: /*registerSS*/
1400 offset
=dissect_gsm_map_ss_SS_Info(FALSE
, tvb
, offset
, actx
, tree
, -1);
1402 case 11: /*eraseSS*/
1403 offset
=dissect_gsm_map_ss_SS_Info(FALSE
, tvb
, offset
, actx
, tree
, -1);
1405 case 12: /*activateSS*/
1406 offset
=dissect_gsm_map_ss_SS_Info(FALSE
, tvb
, offset
, actx
, tree
, -1);
1408 case 13: /*deactivateSS*/
1409 offset
=dissect_gsm_map_ss_SS_Info(FALSE
, tvb
, offset
, actx
, tree
, -1);
1411 case 14: /*interrogateSS*/
1412 offset
=dissect_gsm_map_ss_InterrogateSS_Res(FALSE
, tvb
, offset
, actx
, tree
, -1);
1414 case 15: /*authenticationFailureReport*/
1415 offset
=dissect_gsm_map_ms_AuthenticationFailureReportRes(FALSE
, tvb
, offset
, actx
, tree
, -1);
1417 case 17: /*registerPassword*/
1418 /* change hf_gsm_map_ss_Code to something with password */
1419 offset
=dissect_gsm_old_NewPassword(FALSE
, tvb
, offset
, actx
, tree
, hf_gsm_map_ss_Code
);
1421 case 18: /*getPassword*/
1422 offset
=dissect_gsm_old_CurrentPassword(FALSE
, tvb
, offset
, actx
, tree
, hf_gsm_map_currentPassword
);
1424 case 19: /* SS-Protocol processUnstructuredSS-Data (19) */
1425 offset
=dissect_gsm_ss_SS_UserData(FALSE
, tvb
, offset
, actx
, tree
, hf_gsm_map_ss_SS_UserData
);
1427 case 20: /*releaseResources*/
1428 offset
=dissect_gsm_map_ch_ReleaseResourcesRes(FALSE
, tvb
, offset
, actx
, tree
, -1);
1430 case 21: /*mt-ForwardSM-VGCS*/
1431 offset
=dissect_gsm_map_sm_MT_ForwardSM_VGCS_Res(FALSE
, tvb
, offset
, actx
, tree
, -1);
1433 case 22: /*sendRoutingInfo*/
1434 if (application_context_version
== 3){
1435 /* If the tag is missing use SendRoutingInfoRes_U */
1436 offset
=dissect_mc_message(tvb
, offset
, actx
, tree
,
1438 FALSE
, dissect_gsm_map_ch_SendRoutingInfoRes_U
, -1,
1439 TRUE
, dissect_gsm_map_ch_SendRoutingInfoRes
, -1);
1441 offset
=dissect_mc_message(tvb
, offset
, actx
, tree
,
1442 FALSE
, dissect_gsm_map_IMSI
, hf_gsm_map_imsi
,
1443 FALSE
, dissect_gsm_old_SendRoutingInfoResV2
, -1,
1444 TRUE
, dissect_gsm_map_ch_SendRoutingInfoRes
, -1);
1447 case 23: /*updateGprsLocation*/
1448 offset
=dissect_gsm_map_ms_UpdateGprsLocationRes(FALSE
, tvb
, offset
, actx
, tree
, -1);
1450 case 24: /*sendRoutingInfoForGprs*/
1451 offset
=dissect_gsm_map_ms_SendRoutingInfoForGprsRes(FALSE
, tvb
, offset
, actx
, tree
, -1);
1453 case 25: /*failureReport*/
1454 offset
=dissect_gsm_map_ms_FailureReportRes(FALSE
, tvb
, offset
, actx
, tree
, -1);
1456 case 26: /*noteMsPresentForGprs*/
1457 offset
=dissect_gsm_map_ms_NoteMsPresentForGprsRes(FALSE
, tvb
, offset
, actx
, tree
, -1);
1459 case 29: /*sendEndSignal*/
1460 /* Taken from MAP-MobileServiceOperations{ 0 identified-organization (4) etsi (0) mobileDomain
1461 * (0) gsm-Network (1) modules (3) map-MobileServiceOperations (5) version9 (9) }
1463 offset
=dissect_gsm_map_ms_SendEndSignal_Res(FALSE
, tvb
, offset
, actx
, tree
, -1);
1465 case 31: /*provideSIWFSNumber*/
1466 offset
=dissect_gsm_old_ProvideSIWFSNumberRes(FALSE
, tvb
, offset
, actx
, tree
, -1);
1468 case 32: /*provideSIWFSSignallingModify*/
1469 offset
=dissect_gsm_old_SIWFSSignallingModifyRes(FALSE
, tvb
, offset
, actx
, tree
, -1);
1471 case 39: /*prepareGroupCall*/
1472 offset
=dissect_gsm_map_gr_PrepareGroupCallRes(FALSE
, tvb
, offset
, actx
, tree
, -1);
1474 case 40: /*sendGroupCallEndSignal*/
1475 offset
=dissect_gsm_map_gr_SendGroupCallEndSignalRes(FALSE
, tvb
, offset
, actx
, tree
, -1);
1477 case 43: /*checkIMEI*/
1478 offset
=dissect_mc_message(tvb
, offset
, actx
, tree
,
1479 FALSE
, dissect_gsm_map_ms_EquipmentStatus
, hf_gsm_map_ms_equipmentStatus
,
1480 FALSE
, dissect_gsm_map_ms_CheckIMEI_Res
, -1,
1483 case 44: /*mt-forwardSM*/
1484 offset
=dissect_gsm_map_sm_MT_ForwardSM_Res(FALSE
, tvb
, offset
, actx
, tree
, -1);
1486 case 45: /*sendRoutingInfoForSM*/
1487 offset
=dissect_gsm_map_sm_RoutingInfoForSM_Res(FALSE
, tvb
, offset
, actx
, tree
, -1);
1489 case 46: /*mo-forwardSM*/
1490 offset
=dissect_gsm_map_sm_MO_ForwardSM_Res(FALSE
, tvb
, offset
, actx
, tree
, -1);
1492 case 47: /*reportSM-DeliveryStatus*/
1493 offset
=dissect_mc_message(tvb
, offset
, actx
, tree
,
1494 FALSE
, dissect_gsm_map_ISDN_AddressString
, hf_gsm_map_sm_storedMSISDN
,
1495 FALSE
, dissect_gsm_map_sm_ReportSM_DeliveryStatusRes
, -1,
1496 FALSE
, NULL
, -1);/*undefined*/
1499 case 48: /*noteSubscriberPresent*/
1501 case 50: /*activateTraceMode*/
1502 offset
=dissect_gsm_map_om_ActivateTraceModeRes(FALSE
, tvb
, offset
, actx
, tree
, -1);
1504 case 51: /*deactivateTraceMode*/
1505 offset
=dissect_gsm_map_om_DeactivateTraceModeRes(FALSE
, tvb
, offset
, actx
, tree
, -1);
1507 case 55: /*sendIdentification */
1508 offset
=dissect_mc_message(tvb
, offset
, actx
, tree
,
1509 FALSE
, dissect_gsm_map_IMSI
, hf_gsm_map_imsi
,
1510 FALSE
, dissect_gsm_old_SendIdentificationResV2
, -1,/*undefined*/
1511 TRUE
, dissect_gsm_map_ms_SendIdentificationRes
, -1);
1513 case 56: /*sendAuthenticationInfo*/
1514 offset
=dissect_mc_message(tvb
, offset
, actx
, tree
,
1516 FALSE
, dissect_gsm_old_SendAuthenticationInfoResOld
, -1,
1517 TRUE
, dissect_gsm_map_ms_SendAuthenticationInfoRes
, -1);
1519 case 57: /*restoreData*/
1520 offset
=dissect_gsm_map_ms_RestoreDataRes(FALSE
, tvb
, offset
, actx
, tree
, -1);
1522 case 58: /*sendIMSI*/
1523 offset
=dissect_gsm_map_IMSI(FALSE
, tvb
, offset
, actx
, tree
, hf_gsm_map_ms_imsi
);
1525 case 59: /*unstructuredSS-Request*/
1526 offset
=dissect_gsm_map_ss_USSD_Res(FALSE
, tvb
, offset
, actx
, tree
, -1);
1528 case 60: /*unstructuredSS-Request*/
1529 offset
=dissect_gsm_map_ss_USSD_Res(FALSE
, tvb
, offset
, actx
, tree
, -1);
1531 case 61: /*unstructuredSS-Notify*/
1533 proto_tree_add_text(tree
, tvb
, offset
, -1, "Unknown returnResultData blob");
1535 case 62: /*AnyTimeSubscriptionInterrogation*/
1536 offset
=dissect_gsm_map_ms_AnyTimeSubscriptionInterrogationRes(FALSE
, tvb
, offset
, actx
, tree
, -1);
1538 case 64: /*alertServiceCentre*/
1541 case 65: /*AnyTimeModification*/
1542 offset
=dissect_gsm_map_ms_AnyTimeModificationRes(FALSE
, tvb
, offset
, actx
, tree
, -1);
1544 case 66: /*readyForSM*/
1545 offset
=dissect_gsm_map_sm_ReadyForSM_Res(FALSE
, tvb
, offset
, actx
, tree
, -1);
1547 case 67: /*purgeMS*/
1548 offset
=dissect_gsm_map_ms_PurgeMS_Res(FALSE
, tvb
, offset
, actx
, tree
, -1);
1550 case 68: /*prepareHandover*/
1551 offset
=dissect_mc_message(tvb
, offset
, actx
, tree
,
1553 FALSE
, dissect_gsm_old_PrepareHO_ResOld
, -1,
1554 TRUE
, dissect_gsm_map_ms_PrepareHO_Res
, -1);
1556 case 69: /*prepareSubsequentHandover*/
1557 offset
=dissect_mc_message(tvb
, offset
, actx
, tree
,
1560 TRUE
, dissect_gsm_map_ms_PrepareSubsequentHO_Res
, -1);
1562 case 70: /*provideSubscriberInfo*/
1563 offset
=dissect_gsm_map_ms_ProvideSubscriberInfoRes(FALSE
, tvb
, offset
, actx
, tree
, -1);
1565 case 71: /*anyTimeInterrogation*/
1566 offset
=dissect_gsm_map_ms_AnyTimeInterrogationRes(FALSE
, tvb
, offset
, actx
, tree
, -1);
1568 case 72: /*ss-InvocationNotificatio*/
1569 offset
=dissect_gsm_map_ss_SS_InvocationNotificationRes(FALSE
, tvb
, offset
, actx
, tree
, -1);
1571 case 73: /*setReportingState*/
1572 offset
=dissect_gsm_map_ch_SetReportingStateRes(FALSE
, tvb
, offset
, actx
, tree
, -1);
1574 case 74: /*statusReport*/
1575 offset
=dissect_gsm_map_ch_StatusReportRes(FALSE
, tvb
, offset
, actx
, tree
, -1);
1577 case 75: /*remoteUserFree*/
1578 offset
=dissect_gsm_map_ch_RemoteUserFreeRes(FALSE
, tvb
, offset
, actx
, tree
, -1);
1580 case 76: /*registerCC-Entry*/
1581 offset
=dissect_gsm_map_ss_RegisterCC_EntryRes(FALSE
, tvb
, offset
, actx
, tree
, -1);
1583 case 77: /*eraseCC-Entry*/
1584 offset
=dissect_gsm_map_ss_EraseCC_EntryRes(FALSE
, tvb
, offset
, actx
, tree
, -1);
1586 case 78: /*secureTransportClass1*/
1587 case 79: /*secureTransportClass2*/
1588 case 80: /*secureTransportClass3*/
1589 case 81: /*secureTransportClass4*/
1590 offset
=dissect_gsm_old_SecureTransportRes(FALSE
, tvb
, offset
, actx
, tree
, -1);
1592 case 83: /*provideSubscriberLocation*/
1593 offset
=dissect_gsm_map_lcs_ProvideSubscriberLocation_Res(FALSE
, tvb
, offset
, actx
, tree
, -1);
1595 case 84: /*sendGroupCallInfo*/
1596 offset
=dissect_gsm_map_gr_SendGroupCallInfoRes(FALSE
, tvb
, offset
, actx
, tree
, -1);
1598 case 85: /*sendRoutingInfoForLCS*/
1599 offset
=dissect_gsm_map_lcs_RoutingInfoForLCS_Res(FALSE
, tvb
, offset
, actx
, tree
, -1);
1601 case 86: /*subscriberLocationReport*/
1602 offset
=dissect_gsm_map_lcs_SubscriberLocationReport_Res(FALSE
, tvb
, offset
, actx
, tree
, -1);
1604 case 87: /*ist-Alert*/
1605 offset
=dissect_gsm_map_ch_IST_AlertRes(FALSE
, tvb
, offset
, actx
, tree
, -1);
1607 case 88: /*ist-Command*/
1608 offset
=dissect_gsm_map_ch_IST_CommandRes(FALSE
, tvb
, offset
, actx
, tree
, -1);
1610 case 89: /*noteMM-Event*/
1611 offset
=dissect_gsm_map_ms_NoteMM_EventRes(FALSE
, tvb
, offset
, actx
, tree
, -1);
1613 case 109: /*SS-protocol lcs-PeriodicLocationCancellation*/
1616 case 110: /*SS-protocol lcs-LocationUpdate*/
1617 offset
=dissect_gsm_ss_LCS_LocationUpdateRes(FALSE
, tvb
, offset
, actx
, tree
, -1);
1619 case 111: /*SS-protocol lcs-PeriodicLocationRequest*/
1620 offset
=dissect_gsm_ss_LCS_PeriodicLocationRequestRes(FALSE
, tvb
, offset
, actx
, tree
, -1);
1622 case 112: /*SS-protocol lcs-AreaEventCancellation*/
1624 case 113: /*SS-protocol lcs-AreaEventReport*/
1626 case 114: /*SS-protocol lcs-AreaEventRequest No RESULT data*/
1628 case 115: /*SS-protocol lcs-MOLR*/
1629 offset
=dissect_gsm_ss_LCS_MOLRRes(FALSE
, tvb
, offset
, actx
, tree
, -1);
1631 case 116: /*SS-protocol lcs-LocationNotification*/
1632 offset
=dissect_gsm_ss_LocationNotificationRes(FALSE
, tvb
, offset
, actx
, tree
, -1);
1634 case 117: /*SS-protocol callDeflection no RESULT*/
1636 case 118: /*SS-protocol userUserService no RESULT*/
1638 case 119: /*SS-protocol accessRegisterCCEntry*/
1639 offset
=dissect_gsm_map_ss_RegisterCC_EntryRes(FALSE
, tvb
, offset
, actx
, tree
, -1);
1641 case 120: /*SS-protocol forwardCUG-Info*/
1642 /* No RETURN RESULT*/
1644 case 121: /*SS-protocol splitMPTY no RESULT*/
1646 case 122: /*SS-protocol retrieveMPTY no RESULT*/
1648 case 123: /*SS-protocol holdMPTY no RESULT*/
1650 case 124: /*SS-protocol buildMPTY no RESULT*/
1652 case 125: /*SS-protocol forwardChargeAdvice no RESULT*/
1654 case 126: /*SS-protocol explicitCT no RESULT*/
1658 if(!dissector_try_uint(map_prop_res_opcode_table
, (guint8
)opcode
, tvb
, actx
->pinfo
, tree
)){
1659 proto_tree_add_expert_format(tree
, actx
->pinfo
, &ei_gsm_map_unknown_invokeData
,
1660 tvb
, offset
, -1, "Unknown returnResultData %d", opcode
);
1662 offset
+= tvb_length_remaining(tvb
,offset
);
1670 static int dissect_returnErrorData(proto_tree
*tree
, tvbuff_t
*tvb
, int offset
, asn1_ctx_t
*actx
) {
1673 case 1: /* UnknownSubscriberParam */
1674 offset
=dissect_gsm_map_er_UnknownSubscriberParam(FALSE
, tvb
, offset
, actx
, tree
, -1);
1676 case 4: /* SecureTransportErrorParam */
1677 offset
=dissect_gsm_old_SecureTransportErrorParam(FALSE
, tvb
, offset
, actx
, tree
, -1);
1679 case 5: /* UnidentifiedSubParam */
1680 offset
=dissect_gsm_map_er_UnidentifiedSubParam(FALSE
, tvb
, offset
, actx
, tree
, -1);
1682 case 6: /* AbsentSubscriberSM-Param */
1683 offset
=dissect_gsm_map_er_AbsentSubscriberSM_Param(FALSE
, tvb
, offset
, actx
, tree
, -1);
1685 case 8: /* RoamingNotAllowedParam */
1686 offset
=dissect_gsm_map_er_RoamingNotAllowedParam(FALSE
, tvb
, offset
, actx
, tree
, -1);
1688 case 9: /* IllegalSubscriberParam */
1689 offset
=dissect_gsm_map_er_IllegalSubscriberParam(FALSE
, tvb
, offset
, actx
, tree
, -1);
1691 case 10: /* BearerServNotProvParam */
1692 offset
=dissect_gsm_map_er_BearerServNotProvParam(FALSE
, tvb
, offset
, actx
, tree
, -1);
1694 case 11: /* TeleservNotProvParam */
1695 offset
=dissect_gsm_map_er_TeleservNotProvParam(FALSE
, tvb
, offset
, actx
, tree
, -1);
1697 case 12: /* IllegalEquipmentParam */
1698 offset
=dissect_gsm_map_er_IllegalEquipmentParam(FALSE
, tvb
, offset
, actx
, tree
, -1);
1700 case 13: /* CallBarredParam */
1701 offset
=dissect_gsm_map_er_CallBarredParam(FALSE
, tvb
, offset
, actx
, tree
, -1);
1703 case 14: /* ForwardingViolationParam */
1704 offset
=dissect_gsm_map_er_ForwardingViolationParam(FALSE
, tvb
, offset
, actx
, tree
, -1);
1706 case 15: /* CUG-RejectParam */
1707 offset
=dissect_gsm_map_er_CUG_RejectParam(FALSE
, tvb
, offset
, actx
, tree
, -1);
1709 case 16: /* IllegalSS-OperationParam */
1710 offset
=dissect_gsm_map_er_IllegalSS_OperationParam(FALSE
, tvb
, offset
, actx
, tree
, -1);
1712 case 17: /* SS-ErrorStatus */
1713 offset
=dissect_gsm_map_ss_SS_Status(FALSE
, tvb
, offset
, actx
, tree
, hf_gsm_map_ss_ss_Status
);
1715 case 18: /* SS-NotAvailableParam */
1716 offset
=dissect_gsm_map_er_SS_NotAvailableParam(FALSE
, tvb
, offset
, actx
, tree
, -1);
1718 case 19: /* SS-SubscriptionViolationParam */
1719 offset
=dissect_gsm_map_er_SS_SubscriptionViolationParam(FALSE
, tvb
, offset
, actx
, tree
, -1);
1721 case 20: /* SS-IncompatibilityCause */
1722 offset
=dissect_gsm_map_er_SS_IncompatibilityCause(FALSE
, tvb
, offset
, actx
, tree
, -1);
1724 case 21: /* FacilityNotSupParam */
1725 offset
=dissect_gsm_map_er_FacilityNotSupParam(FALSE
, tvb
, offset
, actx
, tree
, -1);
1727 case 22: /* OngoingGroupCallParam */
1728 offset
=dissect_gsm_map_er_OngoingGroupCallParam(FALSE
, tvb
, offset
, actx
, tree
, -1);
1730 case 27: /* AbsentSubscriberParam */
1731 offset
=dissect_gsm_map_er_AbsentSubscriberParam(FALSE
, tvb
, offset
, actx
, tree
, -1);
1733 case 28: /* IncompatibleTerminalParam */
1734 offset
=dissect_gsm_map_er_IncompatibleTerminalParam(FALSE
, tvb
, offset
, actx
, tree
, -1);
1736 case 29: /* ShortTermDenialParam */
1737 offset
=dissect_gsm_map_er_ShortTermDenialParam(FALSE
, tvb
, offset
, actx
, tree
, -1);
1739 case 30: /* LongTermDenialParam */
1740 offset
=dissect_gsm_map_er_LongTermDenialParam(FALSE
, tvb
, offset
, actx
, tree
, -1);
1742 case 31: /* SubBusyForMT-SMS-Param */
1743 offset
=dissect_gsm_map_er_SubBusyForMT_SMS_Param(FALSE
, tvb
, offset
, actx
, tree
, -1);
1745 case 32: /* SM-DeliveryFailureCause */
1746 offset
=dissect_gsm_map_er_SM_DeliveryFailureCause(FALSE
, tvb
, offset
, actx
, tree
, -1);
1748 case 33: /* MessageWaitListFullParam */
1749 offset
=dissect_gsm_map_er_MessageWaitListFullParam(FALSE
, tvb
, offset
, actx
, tree
, -1);
1751 case 34: /* SystemFailureParam */
1752 offset
=dissect_gsm_map_er_SystemFailureParam(FALSE
, tvb
, offset
, actx
, tree
, -1);
1754 case 35: /* DataMissingParam */
1755 offset
=dissect_gsm_map_er_DataMissingParam(FALSE
, tvb
, offset
, actx
, tree
, -1);
1757 case 36: /* UnexpectedDataParam */
1758 offset
=dissect_gsm_map_er_UnexpectedDataParam(FALSE
, tvb
, offset
, actx
, tree
, -1);
1760 case 37: /* PW-RegistrationFailureCause */
1761 offset
=dissect_gsm_map_er_PW_RegistrationFailureCause(FALSE
, tvb
, offset
, actx
, tree
, -1);
1763 case 39: /* NoRoamingNbParam */
1764 offset
=dissect_gsm_map_er_NoRoamingNbParam(FALSE
, tvb
, offset
, actx
, tree
, -1);
1766 case 40: /* TracingBufferFullParam */
1767 offset
=dissect_gsm_map_er_TracingBufferFullParam(FALSE
, tvb
, offset
, actx
, tree
, -1);
1769 case 42: /* TargetCellOutsideGCA-Param */
1770 offset
=dissect_gsm_map_er_TargetCellOutsideGCA_Param(FALSE
, tvb
, offset
, actx
, tree
, -1);
1772 case 44: /* NumberChangedParam */
1773 offset
=dissect_gsm_map_er_NumberChangedParam(FALSE
, tvb
, offset
, actx
, tree
, -1);
1775 case 45: /* BusySubscriberParam */
1776 offset
=dissect_gsm_map_er_BusySubscriberParam(FALSE
, tvb
, offset
, actx
, tree
, -1);
1778 case 46: /* NoSubscriberReplyParam */
1779 offset
=dissect_gsm_map_er_NoSubscriberReplyParam(FALSE
, tvb
, offset
, actx
, tree
, -1);
1781 case 47: /* ForwardingFailedParam */
1782 offset
=dissect_gsm_map_er_ForwardingFailedParam(FALSE
, tvb
, offset
, actx
, tree
, -1);
1784 case 48: /* OR-NotAllowedParam */
1785 offset
=dissect_gsm_map_er_OR_NotAllowedParam(FALSE
, tvb
, offset
, actx
, tree
, -1);
1787 case 49: /* ATI-NotAllowedParam */
1788 offset
=dissect_gsm_map_er_ATI_NotAllowedParam(FALSE
, tvb
, offset
, actx
, tree
, -1);
1790 case 50: /* NoGroupCallNbParam */
1791 offset
=dissect_gsm_map_er_NoGroupCallNbParam(FALSE
, tvb
, offset
, actx
, tree
, -1);
1793 case 51: /* ResourceLimitationParam */
1794 offset
=dissect_gsm_map_er_ResourceLimitationParam(FALSE
, tvb
, offset
, actx
, tree
, -1);
1796 case 52: /* UnauthorizedRequestingNetwork-Param */
1797 offset
=dissect_gsm_map_er_UnauthorizedRequestingNetwork_Param(FALSE
, tvb
, offset
, actx
, tree
, -1);
1799 case 53: /* UnauthorizedLCSClient-Param */
1800 offset
=dissect_gsm_map_er_UnauthorizedLCSClient_Param(FALSE
, tvb
, offset
, actx
, tree
, -1);
1802 case 54: /* PositionMethodFailure-Param */
1803 offset
=dissect_gsm_map_er_PositionMethodFailure_Param(FALSE
, tvb
, offset
, actx
, tree
, -1);
1805 case 58: /* UnknownOrUnreachableLCSClient-Param */
1806 offset
=dissect_gsm_map_er_UnknownOrUnreachableLCSClient_Param(FALSE
, tvb
, offset
, actx
, tree
, -1);
1808 case 59: /* MM-EventNotSupported-Param */
1809 offset
=dissect_gsm_map_er_MM_EventNotSupported_Param(FALSE
, tvb
, offset
, actx
, tree
, -1);
1811 case 60: /* ATSI-NotAllowedParam */
1812 offset
=dissect_gsm_map_er_ATSI_NotAllowedParam(FALSE
, tvb
, offset
, actx
, tree
, -1);
1814 case 61: /* ATM-NotAllowedParam */
1815 offset
=dissect_gsm_map_er_ATM_NotAllowedParam(FALSE
, tvb
, offset
, actx
, tree
, -1);
1817 case 62: /* InformationNotAvailableParam */
1818 offset
=dissect_gsm_map_er_InformationNotAvailableParam(FALSE
, tvb
, offset
, actx
, tree
, -1);
1821 if(!dissector_try_uint(map_prop_err_opcode_table
, (guint8
)opcode
, tvb
, actx
->pinfo
, tree
)){
1822 proto_tree_add_expert_format(tree
, actx
->pinfo
, &ei_gsm_map_unknown_invokeData
,
1823 tvb
, offset
, -1, "Unknown returnErrorData %d", opcode
);
1825 offset
+= tvb_length_remaining(tvb
,offset
);
1831 /* Private extension container for PLMN Data */
1832 static void dissect_gsm_mapext_PlmnContainer(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*parent_tree
) {
1833 proto_item
*item
=NULL
;
1834 proto_tree
*tree
=NULL
;
1835 asn1_ctx_t asn1_ctx
;
1836 asn1_ctx_init(&asn1_ctx
, ASN1_ENC_BER
, TRUE
, pinfo
);
1837 /* create display subtree for the protocol */
1839 item
= proto_tree_add_text(parent_tree
, tvb
, 0, -1, "MAP Ext. Plmn Container");
1840 tree
= proto_item_add_subtree(item
, ett_gsm_old_PlmnContainer_U
);
1842 dissect_gsm_old_PlmnContainer(FALSE
, tvb
, 0, &asn1_ctx
, tree
, -1);
1846 static guint8 gsmmap_pdu_type
= 0;
1847 static guint8 gsm_map_pdu_size
= 0;
1850 dissect_gsm_map_GSMMAPPDU(gboolean implicit_tag _U_
, tvbuff_t
*tvb
, int offset
, asn1_ctx_t
*actx
, proto_tree
*tree
,
1851 int hf_index _U_
, struct tcap_private_t
* p_private_tcap
) {
1856 if (pref_application_context_version
== APPLICATON_CONTEXT_FROM_TRACE
) {
1857 application_context_version
= 0;
1858 if (p_private_tcap
!= NULL
){
1859 if (p_private_tcap
->acv
==TRUE
){
1860 version_ptr
= strrchr((const char*)p_private_tcap
->oid
,'.');
1862 application_context_version
= atoi(version_ptr
+1);
1867 application_context_version
= pref_application_context_version
;
1870 gsmmap_pdu_type
= tvb_get_guint8(tvb
, offset
)&0x0f;
1871 /* Get the length and add 2 */
1872 gsm_map_pdu_size
= tvb_get_guint8(tvb
, offset
+1)+2;
1874 col_set_str(actx
->pinfo
->cinfo
, COL_INFO
, val_to_str_const(gsmmap_pdu_type
, gsm_old_Component_vals
, "Unknown GSM-MAP Component"));
1875 col_append_str(actx
->pinfo
->cinfo
, COL_INFO
, " ");
1876 offset
= dissect_gsm_old_Component(FALSE
, tvb
, 0, actx
, tree
, hf_gsm_map_old_Component_PDU
);
1878 offset = dissect_ber_choice(pinfo, tree, tvb, offset,
1879 GSMMAPPDU_choice, hf_index, ett_gsm_map_GSMMAPPDU, NULL);
1886 dissect_gsm_map(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*parent_tree
, void* data
)
1888 proto_item
*item
=NULL
;
1889 proto_tree
*tree
=NULL
;
1890 /* Used for gsm_map TAP */
1891 static gsm_map_tap_rec_t tap_rec
;
1893 struct tcap_private_t
* p_private_tcap
= (struct tcap_private_t
*)data
;
1894 asn1_ctx_t asn1_ctx
;
1896 asn1_ctx_init(&asn1_ctx
, ASN1_ENC_BER
, TRUE
, pinfo
);
1898 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "GSM MAP");
1900 top_tree
= parent_tree
;
1902 /* create display subtree for the protocol */
1903 item
= proto_tree_add_item(parent_tree
, proto_gsm_map
, tvb
, 0, -1, ENC_NA
);
1904 tree
= proto_item_add_subtree(item
, ett_gsm_map
);
1906 dissect_gsm_map_GSMMAPPDU(FALSE
, tvb
, 0, &asn1_ctx
, tree
, -1, p_private_tcap
);
1907 try_val_to_str_idx(opcode
, gsm_map_opr_code_strings
, &op_idx
);
1910 tap_rec
.invoke
= (gsmmap_pdu_type
== 1) ? TRUE
: FALSE
;
1911 tap_rec
.opr_code_idx
= op_idx
;
1912 tap_rec
.size
= gsm_map_pdu_size
;
1914 tap_queue_packet(gsm_map_tap
, pinfo
, &tap_rec
);
1917 return tvb_length(tvb
);
1920 const value_string ssCode_vals
[] = {
1921 { 0x00, "allSS - all SS" },
1922 { 0x10 ,"allLineIdentificationSS - all line identification SS" },
1923 { 0x11 ,"clip - calling line identification presentation" },
1924 { 0x12 ,"clir - calling line identification restriction" },
1925 { 0x13 ,"colp - connected line identification presentation" },
1926 { 0x14 ,"colr - connected line identification restriction" },
1927 { 0x15 ,"mci - malicious call identification" },
1928 { 0x18 ,"allNameIdentificationSS - all name identification SS" },
1929 { 0x19 ,"cnap - calling name presentation" },
1930 { 0x20 ,"allForwardingSS - all forwarding SS" },
1931 { 0x21 ,"cfu - call forwarding unconditional" },
1932 { 0x28 ,"allCondForwardingSS - all conditional forwarding SS" },
1933 { 0x29 ,"cfb - call forwarding busy" },
1934 { 0x2a ,"cfnry - call forwarding on no reply" },
1935 { 0x2b ,"cfnrc - call forwarding on mobile subscriber not reachable" },
1936 { 0x24 ,"cd - call deflection" },
1937 { 0x30 ,"allCallOfferingSS - all call offering SS includes also all forwarding SS" },
1938 { 0x31 ,"ect - explicit call transfer" },
1939 { 0x32 ,"mah - mobile access hunting" },
1940 { 0x40 ,"allCallCompletionSS - all Call completion SS" },
1941 { 0x41 ,"cw - call waiting" },
1942 { 0x42 ,"hold - call hold" },
1943 { 0x43 ,"ccbs-A - completion of call to busy subscribers, originating side" },
1944 { 0x44 ,"ccbs-B - completion of call to busy subscribers, destination side" },
1945 { 0x45 ,"mc - multicall" },
1946 { 0x50 ,"allMultiPartySS - all multiparty SS" },
1947 { 0x51 ,"multiPTY - multiparty" },
1948 { 0x60 ,"allCommunityOfInterestSS - all community of interest SS" },
1949 { 0x61 ,"cug - closed user group" },
1950 { 0x70 ,"allChargingSS - all charging SS" },
1951 { 0x71 ,"aoci - advice of charge information" },
1952 { 0x72 ,"aocc - advice of charge charging" },
1953 { 0x80 ,"allAdditionalInfoTransferSS - all additional information transfer SS" },
1954 { 0x81 ,"uus1 - UUS1 user-to-user signalling" },
1955 { 0x82 ,"uus2 - UUS2 user-to-user signalling" },
1956 { 0x83 ,"uus3 - UUS3 user-to-user signalling" },
1957 { 0x90 ,"allCallRestrictionSS - all Callrestriction SS" },
1958 { 0x91 ,"barringOfOutgoingCalls" },
1959 { 0x92 ,"baoc - barring of all outgoing calls" },
1960 { 0x93 ,"boic - barring of outgoing international calls" },
1961 { 0x94 ,"boicExHC - barring of outgoing international calls except those directed to the home PLMN" },
1962 { 0x99 ,"barringOfIncomingCalls" },
1963 { 0x9a ,"baic - barring of all incoming calls" },
1964 { 0x9b ,"bicRoam - barring of incoming calls when roaming outside home PLMN Country" },
1965 { 0xf0 ,"allPLMN-specificSS" },
1966 { 0xa0 ,"allCallPrioritySS - all call priority SS" },
1967 { 0xa1 ,"emlpp - enhanced Multilevel Precedence Pre-emption (EMLPP) service" },
1968 { 0xb0 ,"allLCSPrivacyException - all LCS Privacy Exception Classes" },
1969 { 0xb1 ,"universal - allow location by any LCS client" },
1970 { 0xb2 ,"callrelated - allow location by any value added LCS client to which a call is established from the target MS" },
1971 { 0xb3 ,"callunrelated - allow location by designated external value added LCS clients" },
1972 { 0xb4 ,"plmnoperator - allow location by designated PLMN operator LCS clients" },
1973 { 0xb5 ,"serviceType - allow location by LCS clients of a designated LCS service type" },
1974 { 0xc0 ,"allMOLR-SS - all Mobile Originating Location Request Classes" },
1975 { 0xc1 ,"basicSelfLocation - allow an MS to request its own location" },
1976 { 0xc2 ,"autonomousSelfLocation - allow an MS to perform self location without interaction with the PLMN for a predetermined period of time" },
1977 { 0xc3 ,"transferToThirdParty - allow an MS to request transfer of its location to another LCS client" },
1979 { 0xf1 ,"plmn-specificSS-1" },
1980 { 0xf2 ,"plmn-specificSS-2" },
1981 { 0xf3 ,"plmn-specificSS-3" },
1982 { 0xf4 ,"plmn-specificSS-4" },
1983 { 0xf5 ,"plmn-specificSS-5" },
1984 { 0xf6 ,"plmn-specificSS-6" },
1985 { 0xf7 ,"plmn-specificSS-7" },
1986 { 0xf8 ,"plmn-specificSS-8" },
1987 { 0xf9 ,"plmn-specificSS-9" },
1988 { 0xfa ,"plmn-specificSS-a" },
1989 { 0xfb ,"plmn-specificSS-b" },
1990 { 0xfc ,"plmn-specificSS-c" },
1991 { 0xfd ,"plmn-specificSS-d" },
1992 { 0xfe ,"plmn-specificSS-e" },
1993 { 0xff ,"plmn-specificSS-f" },
1997 static const value_string Teleservice_vals
[] = {
1998 {0x00, "allTeleservices" },
1999 {0x10, "allSpeechTransmissionServices" },
2000 {0x11, "telephony" },
2001 {0x12, "emergencyCalls" },
2002 {0x20, "allShortMessageServices" },
2003 {0x21, "shortMessageMT-PP" },
2004 {0x22, "shortMessageMO-PP" },
2005 {0x60, "allFacsimileTransmissionServices" },
2006 {0x61, "facsimileGroup3AndAlterSpeech" },
2007 {0x62, "automaticFacsimileGroup3" },
2008 {0x63, "facsimileGroup4" },
2010 {0x70, "allDataTeleservices" },
2011 {0x80, "allTeleservices-ExeptSMS" },
2013 {0x90, "allVoiceGroupCallServices" },
2014 {0x91, "voiceGroupCall" },
2015 {0x92, "voiceBroadcastCall" },
2017 {0xd0, "allPLMN-specificTS" },
2018 {0xd1, "plmn-specificTS-1" },
2019 {0xd2, "plmn-specificTS-2" },
2020 {0xd3, "plmn-specificTS-3" },
2021 {0xd4, "plmn-specificTS-4" },
2022 {0xd5, "plmn-specificTS-5" },
2023 {0xd6, "plmn-specificTS-6" },
2024 {0xd7, "plmn-specificTS-7" },
2025 {0xd8, "plmn-specificTS-8" },
2026 {0xd9, "plmn-specificTS-9" },
2027 {0xda, "plmn-specificTS-A" },
2028 {0xdb, "plmn-specificTS-B" },
2029 {0xdc, "plmn-specificTS-C" },
2030 {0xdd, "plmn-specificTS-D" },
2031 {0xde, "plmn-specificTS-E" },
2032 {0xdf, "plmn-specificTS-F" },
2036 static const value_string Bearerservice_vals
[] = {
2037 {0x00, "allBearerServices" },
2038 {0x10, "allDataCDA-Services" },
2039 {0x11, "dataCDA-300bps" },
2040 {0x12, "dataCDA-1200bps" },
2041 {0x13, "dataCDA-1200-75bps" },
2042 {0x14, "dataCDA-2400bps" },
2043 {0x15, "dataCDA-4800bps" },
2044 {0x16, "dataCDA-9600bps" },
2045 {0x17, "general-dataCDA" },
2047 {0x18, "allDataCDS-Services" },
2048 {0x1A, "dataCDS-1200bps" },
2049 {0x1C, "dataCDS-2400bps" },
2050 {0x1D, "dataCDS-4800bps" },
2051 {0x1E, "dataCDS-9600bps" },
2052 {0x1F, "general-dataCDS" },
2054 {0x20, "allPadAccessCA-Services" },
2055 {0x21, "padAccessCA-300bps" },
2056 {0x22, "padAccessCA-1200bps" },
2057 {0x23, "padAccessCA-1200-75bps" },
2058 {0x24, "padAccessCA-2400bps" },
2059 {0x25, "padAccessCA-4800bps" },
2060 {0x26, "padAccessCA-9600bps" },
2061 {0x27, "general-padAccessCA" },
2063 {0x28, "allDataPDS-Services" },
2064 {0x2C, "dataPDS-2400bps" },
2065 {0x2D, "dataPDS-4800bps" },
2066 {0x2E, "dataPDS-9600bps" },
2067 {0x2F, "general-dataPDS" },
2069 {0x30, "allAlternateSpeech-DataCDA" },
2070 {0x38, "allAlternateSpeech-DataCDS" },
2071 {0x40, "allSpeechFollowedByDataCDA" },
2072 {0x48, "allSpeechFollowedByDataCDS" },
2074 {0x50, "allDataCircuitAsynchronous" },
2075 {0x60, "allAsynchronousServices" },
2076 {0x58, "allDataCircuitSynchronous" },
2077 {0x68, "allSynchronousServices" },
2079 {0xD0, "allPLMN-specificBS" },
2080 {0xD1, "plmn-specificBS-1" },
2081 {0xD2, "plmn-specificBS-2" },
2082 {0xD3, "plmn-specificBS-3" },
2083 {0xD4, "plmn-specificBS-4" },
2084 {0xD5, "plmn-specificBS-5" },
2085 {0xD6, "plmn-specificBS-6" },
2086 {0xD7, "plmn-specificBS-7" },
2087 {0xD8, "plmn-specificBS-8" },
2088 {0xD9, "plmn-specificBS-9" },
2089 {0xDA, "plmn-specificBS-A" },
2090 {0xDB, "plmn-specificBS-B" },
2091 {0xDC, "plmn-specificBS-C" },
2092 {0xDD, "plmn-specificBS-D" },
2093 {0xDE, "plmn-specificBS-E" },
2094 {0xDF, "plmn-specificBS-F" },
2099 /* ForwardingOptions
2101 -- bit 8: notification to forwarding party
2102 -- 0 no notification
2105 static const true_false_string notification_value
= {
2110 -- bit 7: redirecting presentation
2111 -- 0 no presentation
2114 static const true_false_string redirecting_presentation_value
= {
2119 -- bit 6: notification to calling party
2120 -- 0 no notification
2124 -- bit 5: 0 (unused)
2125 -- bits 43: forwarding reason
2126 -- 00 ms not reachable
2129 -- 11 unconditional when used in a SRI Result,
2130 -- or call deflection when used in a RCH Argument
2132 static const value_string forwarding_reason_values
[] = {
2133 {0x0, "ms not reachable" },
2136 {0x3, "unconditional when used in a SRI Result or call deflection when used in a RCH Argument" },
2140 -- bits 21: 00 (unused)
2143 static const value_string pdp_type_org_values
[] = {
2146 {0xf, "Empty PDP type" },
2150 static const value_string etsi_pdp_type_number_values
[] = {
2151 {0x0, "Reserved, used in earlier version of this protocol" },
2156 static const value_string ietf_pdp_type_number_values
[] = {
2157 {0x21, "IPv4 Address" },
2158 {0x57, "IPv6 Address" },
2163 ChargingCharacteristics ::= OCTET STRING (SIZE (2))
2164 -- Octets are coded according to 3GPP TS 32.015.
2165 -- From 3GPP TS 32.015.
2167 -- Descriptions for the bits of the flag set:
2169 -- Bit 1: H (Hot billing) := '00000001'B
2170 -- Bit 2: F (Flat rate) := '00000010'B
2171 -- Bit 3: P (Prepaid service) := '00000100'B
2172 -- Bit 4: N (Normal billing) := '00001000'B
2173 -- Bit 5: - (Reserved, set to 0) := '00010000'B
2174 -- Bit 6: - (Reserved, set to 0) := '00100000'B
2175 -- Bit 7: - (Reserved, set to 0) := '01000000'B
2176 -- Bit 8: - (Reserved, set to 0) := '10000000'B
2178 static const value_string chargingcharacteristics_values
[] = {
2179 {0x1, "H (Hot billing)" },
2180 {0x2, "F (Flat rate)" },
2181 {0x4, "P (Prepaid service)" },
2182 {0x8, "N (Normal billing)" },
2186 /*--- proto_reg_handoff_gsm_map ---------------------------------------*/
2187 static void range_delete_callback(guint32 ssn
)
2190 delete_itu_tcap_subdissector(ssn
, map_handle
);
2194 static void range_add_callback(guint32 ssn
)
2197 add_itu_tcap_subdissector(ssn
, map_handle
);
2201 void proto_reg_handoff_gsm_map(void) {
2203 static gboolean map_prefs_initialized
= FALSE
;
2204 static range_t
*ssn_range
;
2206 if (!map_prefs_initialized
) {
2207 map_prefs_initialized
= TRUE
;
2208 data_handle
= find_dissector("data");
2209 ranap_handle
= find_dissector("ranap");
2210 dtap_handle
= find_dissector("gsm_a_dtap");
2211 gsm_sms_handle
= find_dissector("gsm_sms");
2213 map_handle
= find_dissector("gsm_map");
2214 oid_add_from_string("itu(0) administration(2) japan(440)","0.2.440" );
2215 register_ber_oid_dissector_handle("0.4.0.0.1.0.1.3", map_handle
, proto_gsm_map
,"networkLocUpContext-v3");
2216 register_ber_oid_dissector_handle("0.4.0.0.1.0.1.2", map_handle
, proto_gsm_map
,"networkLocUpContext-v2" );
2217 register_ber_oid_dissector_handle("0.4.0.0.1.0.1.1", map_handle
, proto_gsm_map
,"networkLocUpContext-v1" );
2218 register_ber_oid_dissector_handle("0.4.0.0.1.0.2.3", map_handle
, proto_gsm_map
,"locationCancellationContext-v3" );
2219 register_ber_oid_dissector_handle("0.4.0.0.1.0.2.2", map_handle
, proto_gsm_map
,"locationCancellationContext-v2" );
2220 register_ber_oid_dissector_handle("0.4.0.0.1.0.2.1", map_handle
, proto_gsm_map
,"locationCancellationContext-v1" );
2221 register_ber_oid_dissector_handle("0.4.0.0.1.0.3.3", map_handle
, proto_gsm_map
,"roamingNumberEnquiryContext-v3" );
2222 register_ber_oid_dissector_handle("0.4.0.0.1.0.3.2", map_handle
, proto_gsm_map
,"roamingNumberEnquiryContext-v2" );
2223 register_ber_oid_dissector_handle("0.4.0.0.1.0.3.1", map_handle
, proto_gsm_map
,"roamingNumberEnquiryContext-v1" );
2224 register_ber_oid_dissector_handle("0.4.0.0.1.0.4.3", map_handle
, proto_gsm_map
,"istAlertingContext-v3" );
2225 register_ber_oid_dissector_handle("0.4.0.0.1.0.5.3", map_handle
, proto_gsm_map
,"locationInfoRetrievalContext-v3" );
2226 register_ber_oid_dissector_handle("0.4.0.0.1.0.5.2", map_handle
, proto_gsm_map
,"locationInfoRetrievalContext-v2" );
2227 register_ber_oid_dissector_handle("0.4.0.0.1.0.5.1", map_handle
, proto_gsm_map
,"locationInfoRetrievalContext-v1" );
2228 register_ber_oid_dissector_handle("0.4.0.0.1.0.6.4", map_handle
, proto_gsm_map
,"callControlTransferContext-v4" );
2229 register_ber_oid_dissector_handle("0.4.0.0.1.0.6.3", map_handle
, proto_gsm_map
,"callControlTransferContext-v3" );
2230 register_ber_oid_dissector_handle("0.4.0.0.1.0.7.3", map_handle
, proto_gsm_map
,"reportingContext-v3" );
2231 register_ber_oid_dissector_handle("0.4.0.0.1.0.8.3", map_handle
, proto_gsm_map
,"callCompletionContext-v3" );
2232 register_ber_oid_dissector_handle("0.4.0.0.1.0.9.3", map_handle
, proto_gsm_map
,"serviceTerminationContext-v3" );
2233 register_ber_oid_dissector_handle("0.4.0.0.1.0.10.2", map_handle
, proto_gsm_map
,"resetContext-v2" );
2234 register_ber_oid_dissector_handle("0.4.0.0.1.0.10.1", map_handle
, proto_gsm_map
,"resetContext-v1" );
2235 register_ber_oid_dissector_handle("0.4.0.0.1.0.11.3", map_handle
, proto_gsm_map
,"handoverControlContext-v3" );
2236 register_ber_oid_dissector_handle("0.4.0.0.1.0.11.2", map_handle
, proto_gsm_map
,"handoverControlContext-v2" );
2237 register_ber_oid_dissector_handle("0.4.0.0.1.0.11.1", map_handle
, proto_gsm_map
,"handoverControlContext-v1" );
2238 register_ber_oid_dissector_handle("0.4.0.0.1.0.12.3", map_handle
, proto_gsm_map
,"sIWFSAllocationContext-v3" );
2239 register_ber_oid_dissector_handle("0.4.0.0.1.0.13.3", map_handle
, proto_gsm_map
,"equipmentMngtContext-v3" );
2240 register_ber_oid_dissector_handle("0.4.0.0.1.0.13.2", map_handle
, proto_gsm_map
,"equipmentMngtContext-v2" );
2241 register_ber_oid_dissector_handle("0.4.0.0.1.0.13.1", map_handle
, proto_gsm_map
,"equipmentMngtContext-v1" );
2242 register_ber_oid_dissector_handle("0.4.0.0.1.0.14.3", map_handle
, proto_gsm_map
,"infoRetrievalContext-v3" );
2243 register_ber_oid_dissector_handle("0.4.0.0.1.0.14.2", map_handle
, proto_gsm_map
,"infoRetrievalContext-v2" );
2244 register_ber_oid_dissector_handle("0.4.0.0.1.0.14.1", map_handle
, proto_gsm_map
,"infoRetrievalContext-v1" );
2245 /* fallback to infoRetrieval(14) version1(1) and not interVlrInfoRetrieval(15) version1(1) */
2246 /*register_ber_oid_dissector_handle("0.4.0.0.1.0.15.1", map_handle, proto_gsm_map,"map-ac interVlrInfoRetrieval(15) version1(1)" );*/
2247 register_ber_oid_dissector_handle("0.4.0.0.1.0.15.2", map_handle
, proto_gsm_map
,"interVlrInfoRetrievalContext-v2" );
2248 register_ber_oid_dissector_handle("0.4.0.0.1.0.15.3", map_handle
, proto_gsm_map
,"interVlrInfoRetrievalContext-v3" );
2249 register_ber_oid_dissector_handle("0.4.0.0.1.0.16.3", map_handle
, proto_gsm_map
,"subscriberDataMngtContext-v3" );
2250 register_ber_oid_dissector_handle("0.4.0.0.1.0.16.2", map_handle
, proto_gsm_map
,"subscriberDataMngtContext-v2" );
2251 register_ber_oid_dissector_handle("0.4.0.0.1.0.16.1", map_handle
, proto_gsm_map
,"subscriberDataMngtContext-v1" );
2252 register_ber_oid_dissector_handle("0.4.0.0.1.0.17.3", map_handle
, proto_gsm_map
,"tracingContext-v3" );
2253 register_ber_oid_dissector_handle("0.4.0.0.1.0.17.2", map_handle
, proto_gsm_map
,"tracingContext-v2" );
2254 register_ber_oid_dissector_handle("0.4.0.0.1.0.17.1", map_handle
, proto_gsm_map
,"tracingContext-v1" );
2255 register_ber_oid_dissector_handle("0.4.0.0.1.0.18.2", map_handle
, proto_gsm_map
,"networkFunctionalSsContext-v2" );
2256 register_ber_oid_dissector_handle("0.4.0.0.1.0.18.1", map_handle
, proto_gsm_map
,"networkFunctionalSsContext-v1" );
2257 register_ber_oid_dissector_handle("0.4.0.0.1.0.19.2", map_handle
, proto_gsm_map
,"networkUnstructuredSsContext-v2" );
2258 register_ber_oid_dissector_handle("0.4.0.0.1.0.20.3", map_handle
, proto_gsm_map
,"shortMsgGatewayContext-v3" );
2259 register_ber_oid_dissector_handle("0.4.0.0.1.0.20.2", map_handle
, proto_gsm_map
,"shortMsgGatewayContext-v2" );
2260 register_ber_oid_dissector_handle("0.4.0.0.1.0.20.1", map_handle
, proto_gsm_map
,"shortMsgGatewayContext-v1" );
2261 register_ber_oid_dissector_handle("0.4.0.0.1.0.21.3", map_handle
, proto_gsm_map
,"shortMsgMO-RelayContext-v3" );
2262 register_ber_oid_dissector_handle("0.4.0.0.1.0.21.2", map_handle
, proto_gsm_map
,"shortMsgMO-RelayContext-v2" );
2263 register_ber_oid_dissector_handle("0.4.0.0.1.0.21.1", map_handle
, proto_gsm_map
,"shortMsgRelayContext-v1" );
2264 register_ber_oid_dissector_handle("0.4.0.0.1.0.22.3", map_handle
, proto_gsm_map
,"subscriberDataModificationNotificationContext-v3" );
2265 register_ber_oid_dissector_handle("0.4.0.0.1.0.23.2", map_handle
, proto_gsm_map
,"shortMsgAlertContext-v2" );
2266 register_ber_oid_dissector_handle("0.4.0.0.1.0.23.1", map_handle
, proto_gsm_map
,"shortMsgAlertContext-v1" );
2267 register_ber_oid_dissector_handle("0.4.0.0.1.0.24.3", map_handle
, proto_gsm_map
,"mwdMngtContext-v3" );
2268 register_ber_oid_dissector_handle("0.4.0.0.1.0.24.2", map_handle
, proto_gsm_map
,"mwdMngtContext-v2" );
2269 register_ber_oid_dissector_handle("0.4.0.0.1.0.24.1", map_handle
, proto_gsm_map
,"mwdMngtContext-v1" );
2270 register_ber_oid_dissector_handle("0.4.0.0.1.0.25.3", map_handle
, proto_gsm_map
,"shortMsgMT-RelayContext-v3" );
2271 register_ber_oid_dissector_handle("0.4.0.0.1.0.25.2", map_handle
, proto_gsm_map
,"shortMsgMT-RelayContext-v2" );
2272 register_ber_oid_dissector_handle("0.4.0.0.1.0.26.2", map_handle
, proto_gsm_map
,"imsiRetrievalContext-v2" );
2273 register_ber_oid_dissector_handle("0.4.0.0.1.0.27.2", map_handle
, proto_gsm_map
,"msPurgingContext-v2" );
2274 register_ber_oid_dissector_handle("0.4.0.0.1.0.27.3", map_handle
, proto_gsm_map
,"msPurgingContext-v3" );
2275 register_ber_oid_dissector_handle("0.4.0.0.1.0.28.3", map_handle
, proto_gsm_map
,"subscriberInfoEnquiryContext-v3" );
2276 register_ber_oid_dissector_handle("0.4.0.0.1.0.29.3", map_handle
, proto_gsm_map
,"anyTimeInfoEnquiryContext-v3" );
2277 register_ber_oid_dissector_handle("0.4.0.0.1.0.31.3", map_handle
, proto_gsm_map
,"groupCallControlContext-v3" );
2278 register_ber_oid_dissector_handle("0.4.0.0.1.0.32.3", map_handle
, proto_gsm_map
,"gprsLocationUpdateContext-v3" );
2279 register_ber_oid_dissector_handle("0.4.0.0.1.0.33.4", map_handle
, proto_gsm_map
,"gprsLocationInfoRetrievalContext-v4" );
2280 register_ber_oid_dissector_handle("0.4.0.0.1.0.33.3", map_handle
, proto_gsm_map
,"gprsLocationInfoRetrievalContext-v3" );
2281 register_ber_oid_dissector_handle("0.4.0.0.1.0.34.3", map_handle
, proto_gsm_map
,"failureReportContext-v3" );
2282 register_ber_oid_dissector_handle("0.4.0.0.1.0.35.3", map_handle
, proto_gsm_map
,"gprsNotifyContext-v3" );
2283 register_ber_oid_dissector_handle("0.4.0.0.1.0.36.3", map_handle
, proto_gsm_map
,"ss-InvocationNotificationContext-v3" );
2284 register_ber_oid_dissector_handle("0.4.0.0.1.0.37.3", map_handle
, proto_gsm_map
,"locationSvcGatewayContext-v3" );
2285 register_ber_oid_dissector_handle("0.4.0.0.1.0.38.3", map_handle
, proto_gsm_map
,"locationSvcEnquiryContext-v3" );
2286 register_ber_oid_dissector_handle("0.4.0.0.1.0.39.3", map_handle
, proto_gsm_map
,"authenticationFailureReportContext-v3" );
2287 register_ber_oid_dissector_handle("0.4.0.0.1.0.40.3", map_handle
, proto_gsm_map
,"secureTransportHandlingContext-v3" );
2288 register_ber_oid_dissector_handle("0.4.0.0.1.0.41.3", map_handle
, proto_gsm_map
,"shortMsgMT-Relay-VGCS-Context-v3" );
2289 register_ber_oid_dissector_handle("0.4.0.0.1.0.42.3", map_handle
, proto_gsm_map
,"mm-EventReportingContext-v3" );
2290 register_ber_oid_dissector_handle("0.4.0.0.1.0.43.3", map_handle
, proto_gsm_map
,"anyTimeInfoHandlingContext-v3" );
2291 register_ber_oid_dissector_handle("0.4.0.0.1.0.44.3", map_handle
, proto_gsm_map
,"resourceManagementContext-v3" );
2292 register_ber_oid_dissector_handle("0.4.0.0.1.0.45.3", map_handle
, proto_gsm_map
,"groupCallInfoRetrievalContext-v3" );
2293 /* Private extension container */
2294 register_ber_oid_dissector("1.3.12.2.1006.53.2.1.3", dissect_gsm_mapext_PlmnContainer
, proto_gsm_map
,"alcatel-E10-MAP-extension-PlmnContainer" );
2297 range_foreach(ssn_range
, range_delete_callback
);
2301 ssn_range
= range_copy(global_ssn_range
);
2302 range_foreach(ssn_range
, range_add_callback
);
2306 /*--- proto_register_gsm_map -------------------------------------------*/
2307 void proto_register_gsm_map(void) {
2308 module_t
*gsm_map_module
;
2309 expert_module_t
* expert_gsm_map
;
2311 /* List of fields */
2312 static hf_register_info hf
[] = {
2313 { &hf_gsm_map_old_Component_PDU
,
2314 { "Component", "gsm_map.old.Component",
2315 FT_UINT32
, BASE_DEC
, VALS(gsm_old_Component_vals
), 0,
2317 { &hf_gsm_map_getPassword
,
2318 { "getPassword", "gsm_map.getPassword",
2319 FT_UINT8
, BASE_DEC
, VALS(gsm_old_GetPasswordArg_vals
), 0,
2321 { &hf_gsm_map_currentPassword
,
2322 { "currentPassword", "gsm_map.currentPassword",
2323 FT_STRING
, BASE_NONE
, NULL
, 0,
2325 { &hf_gsm_map_extension
,
2326 { "Extension", "gsm_map.extension",
2327 FT_BOOLEAN
, 8, TFS(&gsm_map_extension_value
), 0x80,
2329 { &hf_gsm_map_nature_of_number
,
2330 { "Nature of number", "gsm_map.nature_of_number",
2331 FT_UINT8
, BASE_HEX
|BASE_EXT_STRING
, &gsm_map_nature_of_number_values_ext
, 0x70,
2333 { &hf_gsm_map_number_plan
,
2334 { "Number plan", "gsm_map.number_plan",
2335 FT_UINT8
, BASE_HEX
|BASE_EXT_STRING
, &gsm_map_number_plan_values_ext
, 0x0f,
2337 { &hf_gsm_map_isdn_address_digits
,
2338 { "ISDN Address digits", "gsm_map.isdn.address.digits",
2339 FT_STRING
, BASE_NONE
, NULL
, 0,
2341 { &hf_gsm_map_address_digits
,
2342 { "Address digits", "gsm_map.address.digits",
2343 FT_STRING
, BASE_NONE
, NULL
, 0,
2345 { &hf_gsm_map_servicecentreaddress_digits
,
2346 { "ServiceCentreAddress digits", "gsm_map.servicecentreaddress_digits",
2347 FT_STRING
, BASE_NONE
, NULL
, 0,
2349 { &hf_gsm_map_TBCD_digits
,
2350 { "TBCD digits", "gsm_map.tbcd_digits",
2351 FT_STRING
, BASE_NONE
, NULL
, 0,
2353 { &hf_gsm_map_Ss_Status_unused
,
2354 { "Unused", "gsm_map.unused",
2355 FT_UINT8
, BASE_HEX
, NULL
, 0xf0,
2357 { &hf_gsm_map_Ss_Status_q_bit
,
2358 { "Q bit", "gsm_map.ss_status_q_bit",
2359 FT_BOOLEAN
, 8, TFS(&gsm_map_Ss_Status_q_bit_values
), 0x08,
2361 { &hf_gsm_map_Ss_Status_p_bit
,
2362 { "P bit", "gsm_map.ss_status_p_bit",
2363 FT_BOOLEAN
, 8, TFS(&gsm_map_Ss_Status_p_values
), 0x04,
2365 { &hf_gsm_map_Ss_Status_r_bit
,
2366 { "R bit", "gsm_map.ss_status_r_bit",
2367 FT_BOOLEAN
, 8, TFS(&gsm_map_Ss_Status_r_values
), 0x02,
2369 { &hf_gsm_map_Ss_Status_a_bit
,
2370 { "A bit", "gsm_map.ss_status_a_bit",
2371 FT_BOOLEAN
, 8, TFS(&gsm_map_Ss_Status_a_values
), 0x01,
2373 { &hf_gsm_map_notification_to_forwarding_party
,
2374 { "Notification to forwarding party", "gsm_map.notification_to_forwarding_party",
2375 FT_BOOLEAN
, 8, TFS(¬ification_value
), 0x80,
2377 { &hf_gsm_map_redirecting_presentation
,
2378 { "Redirecting presentation", "gsm_map.redirecting_presentation",
2379 FT_BOOLEAN
, 8, TFS(&redirecting_presentation_value
), 0x40,
2381 { &hf_gsm_map_notification_to_calling_party
,
2382 { "Notification to calling party", "gsm_map.notification_to_clling_party",
2383 FT_BOOLEAN
, 8, TFS(¬ification_value
), 0x20,
2385 { &hf_gsm_map_forwarding_reason
,
2386 { "Forwarding reason", "gsm_map.forwarding_reason",
2387 FT_UINT8
, BASE_HEX
, VALS(forwarding_reason_values
), 0x0c,
2389 { &hf_gsm_map_pdp_type_org
,
2390 { "PDP Type Organization", "gsm_map.pdp_type_org",
2391 FT_UINT8
, BASE_HEX
, VALS(pdp_type_org_values
), 0x0f,
2393 { &hf_gsm_map_etsi_pdp_type_number
,
2394 { "PDP Type Number", "gsm_map.pdp_type_number",
2395 FT_UINT8
, BASE_HEX
, VALS(etsi_pdp_type_number_values
), 0,
2396 "ETSI PDP Type Number", HFILL
}},
2397 { &hf_gsm_map_ietf_pdp_type_number
,
2398 { "PDP Type Number", "gsm_map.ietf_pdp_type_number",
2399 FT_UINT8
, BASE_HEX
, VALS(ietf_pdp_type_number_values
), 0,
2400 "IETF PDP Type Number", HFILL
}},
2401 { &hf_gsm_map_ext_qos_subscribed_pri
,
2402 { "Allocation/Retention priority", "gsm_map.ext_qos_subscribed_pri",
2403 FT_UINT8
, BASE_DEC
, NULL
, 0xff,
2405 { &hf_gsm_map_qos_traffic_cls
,
2406 { "Traffic class", "gsm_map.qos.traffic_cls",
2407 FT_UINT8
, BASE_DEC
, VALS(gsm_a_sm_qos_traffic_cls_vals
), 0xe0,
2409 { &hf_gsm_map_qos_del_order
,
2410 { "Delivery order", "gsm_map.qos.del_order",
2411 FT_UINT8
, BASE_DEC
, VALS(gsm_a_sm_qos_traffic_cls_vals
), 0x18,
2413 { &hf_gsm_map_qos_del_of_err_sdu
,
2414 { "Delivery of erroneous SDUs", "gsm_map.qos.del_of_err_sdu",
2415 FT_UINT8
, BASE_DEC
, VALS(gsm_a_sm_qos_del_of_err_sdu_vals
), 0x03,
2417 { &hf_gsm_map_qos_ber
,
2418 { "Residual Bit Error Rate (BER)", "gsm_map.qos.ber",
2419 FT_UINT8
, BASE_DEC
, VALS(gsm_a_sm_qos_ber_vals
), 0xf0,
2421 { &hf_gsm_map_qos_sdu_err_rat
,
2422 { "SDU error ratio", "gsm_map.qos.sdu_err_rat",
2423 FT_UINT8
, BASE_DEC
, VALS(gsm_a_sm_qos_sdu_err_rat_vals
), 0x0f,
2425 { &hf_gsm_map_qos_traff_hdl_pri
,
2426 { "Traffic handling priority", "gsm_map.qos.traff_hdl_pri",
2427 FT_UINT8
, BASE_DEC
, VALS(gsm_a_sm_qos_traff_hdl_pri_vals
), 0x03,
2430 { &hf_gsm_map_qos_max_sdu
,
2431 { "Maximum SDU size", "gsm_map.qos.max_sdu",
2432 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
2434 { &hf_gsm_map_max_brate_ulink
,
2435 { "Maximum bit rate for uplink in kbit/s", "gsm_map.qos.max_brate_ulink",
2436 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
2437 "Maximum bit rate for uplink", HFILL
}},
2438 { &hf_gsm_map_max_brate_dlink
,
2439 { "Maximum bit rate for downlink in kbit/s", "gsm_map.qos.max_brate_dlink",
2440 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
2441 "Maximum bit rate for downlink", HFILL
}},
2442 { &hf_gsm_map_qos_transfer_delay
,
2443 { "Transfer delay (Raw data see TS 24.008 for interpretation)", "gsm_map.qos.transfer_delay",
2444 FT_UINT8
, BASE_DEC
, NULL
, 0xfc,
2445 "Transfer delay", HFILL
}},
2446 { &hf_gsm_map_guaranteed_max_brate_ulink
,
2447 { "Guaranteed bit rate for uplink in kbit/s", "gsm_map.qos.brate_ulink",
2448 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
2449 "Guaranteed bit rate for uplink", HFILL
}},
2450 { &hf_gsm_map_guaranteed_max_brate_dlink
,
2451 { "Guaranteed bit rate for downlink in kbit/s", "gsm_map.qos.brate_dlink",
2452 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
2453 "Guaranteed bit rate for downlink", HFILL
}},
2454 { &hf_gsm_map_GSNAddress_IPv4
,
2455 { "GSN-Address IPv4", "gsm_map.gsnaddress_ipv4",
2456 FT_IPv4
, BASE_NONE
, NULL
, 0,
2457 "IPAddress IPv4", HFILL
}},
2458 { &hf_gsm_map_GSNAddress_IPv6
,
2459 { "GSN Address IPv6", "gsm_map.gsnaddress_ipv6",
2460 FT_IPv4
, BASE_NONE
, NULL
, 0,
2461 "IPAddress IPv6", HFILL
}},
2462 { &hf_gsm_map_ranap_service_Handover
,
2463 { "service-Handover", "gsm_map.ranap.service_Handover",
2464 FT_UINT32
, BASE_DEC
, VALS(ranap_Service_Handover_vals
), 0,
2465 "gsm_map.ranap.Service_Handover", HFILL
}},
2466 { &hf_gsm_map_IntegrityProtectionInformation
,
2467 { "IntegrityProtectionInformation", "gsm_map.ranap.IntegrityProtectionInformation",
2468 FT_NONE
, BASE_NONE
, NULL
, 0,
2469 "gsm_map.ranap.IntegrityProtectionInformation", HFILL
}},
2470 { &hf_gsm_map_EncryptionInformation
,
2471 { "EncryptionInformation", "gsm_map.ranap.EncryptionInformation",
2472 FT_NONE
, BASE_NONE
, NULL
, 0,
2473 "gsm_map.ranap.EncryptionInformation", HFILL
}},
2474 { &hf_gsm_map_PlmnContainer_PDU
,
2475 { "PlmnContainer", "gsm_map.PlmnContainer",
2476 FT_NONE
, BASE_NONE
, NULL
, 0,
2477 "gsm_map.PlmnContainer", HFILL
}},
2478 { &hf_gsm_map_ss_SS_UserData
,
2479 { "SS-UserData", "gsm_ss.SS_UserData",
2480 FT_STRING
, BASE_NONE
, NULL
, 0,
2481 "gsm_map.ss.SS_UserData", HFILL
}},
2482 { &hf_gsm_map_cbs_coding_grp
,
2483 { "Coding Group","gsm_map.cbs.coding_grp",
2484 FT_UINT8
,BASE_DEC
|BASE_EXT_STRING
, &gsm_map_cbs_data_coding_scheme_coding_grp_vals_ext
, 0xf0,
2487 { &hf_gsm_map_cbs_coding_grp0_lang
,
2488 { "Language","gsm_map.cbs.coding_grp0_lang",
2489 FT_UINT8
,BASE_DEC
|BASE_EXT_STRING
, &gsm_map_cbs_coding_grp0_lang_vals_ext
, 0x0f,
2492 { &hf_gsm_map_cbs_coding_grp1_lang
,
2493 { "Language","gsm_map.cbs.coding_grp1_lang",
2494 FT_UINT8
,BASE_DEC
|BASE_EXT_STRING
, &gsm_map_cbs_coding_grp1_lang_vals_ext
, 0x0f,
2497 { &hf_gsm_map_cbs_coding_grp2_lang
,
2498 { "Language","gsm_map.cbs.coding_grp2_lang",
2499 FT_UINT8
,BASE_DEC
|BASE_EXT_STRING
, &gsm_map_cbs_coding_grp2_lang_vals_ext
, 0x0f,
2502 { &hf_gsm_map_cbs_coding_grp3_lang
,
2503 { "Language","gsm_map.cbs.coding_grp3_lang",
2504 FT_UINT8
,BASE_DEC
|BASE_EXT_STRING
, &gsm_map_cbs_coding_grp3_lang_vals_ext
, 0x0f,
2507 { &hf_gsm_map_cbs_coding_grp4_7_comp
,
2508 { "Compressed indicator","gsm_map.cbs.coding_grp4_7_comp",
2509 FT_BOOLEAN
, 8, TFS(&gsm_map_cbs_coding_grp4_7_comp_vals
), 0x20,
2512 { &hf_gsm_map_cbs_coding_grp4_7_class_ind
,
2513 { "Message Class present","gsm_map.cbs.coding_grp4_7_class_ind",
2514 FT_BOOLEAN
, 8, TFS(&gsm_map_cbs_coding_grp4_7_class_ind_vals
), 0x10,
2517 { &hf_gsm_map_cbs_coding_grp4_7_char_set
,
2518 { "Character set being used","gsm_map.cbs.coding_grp4_7_char_set",
2519 FT_UINT8
,BASE_DEC
, VALS(gsm_map_cbs_coding_grp4_7_char_set_vals
), 0x0c,
2522 { &hf_gsm_map_cbs_coding_grp4_7_class
,
2523 { "Message Class","gsm_map.cbs.coding_grp4_7_class",
2524 FT_UINT8
,BASE_DEC
, VALS(gsm_map_cbs_coding_grp4_7_class_vals
), 0x03,
2527 { &hf_gsm_map_cbs_coding_grp15_mess_code
,
2528 { "Message coding","gsm_map.cbs.cbs_coding_grp15_mess_code",
2529 FT_UINT8
,BASE_DEC
, VALS(gsm_map_cbs_coding_grp15_mess_code_vals
), 0x04,
2532 { &hf_gsm_map_cbs_coding_grp15_class
,
2533 { "Message Class","gsm_map.cbs.gsm_map_cbs_coding_grp15_class",
2534 FT_UINT8
,BASE_DEC
, VALS(gsm_map_cbs_coding_grp15_class_vals
), 0x03,
2538 { "tmsi", "gsm_map.tmsi",
2539 FT_BYTES
, BASE_NONE
, NULL
, 0,
2540 "gsm_map.TMSI", HFILL
}},
2542 { &hf_gsm_map_ie_tag
,
2543 { "Tag", "gsm_map.ie_tag",
2544 FT_UINT8
, BASE_DEC
, VALS(gsm_map_tag_vals
), 0,
2545 "GSM 04.08 tag", HFILL
}},
2547 { "Length", "gsm_map.length",
2548 FT_UINT8
, BASE_DEC
, NULL
, 0,
2550 { &hf_gsm_map_disc_par
,
2551 { "Discrimination parameter", "gsm_map.disc_par",
2552 FT_UINT8
, BASE_DEC
, VALS(gsm_map_disc_par_vals
), 0,
2555 { "DLCI", "gsm_map.dlci",
2556 FT_UINT8
, BASE_DEC
, NULL
, 0,
2557 "Data Link Connection Indicator", HFILL
}},
2559 { "APN", "gsm_map.apn_str",
2560 FT_STRING
, BASE_NONE
, NULL
, 0,
2562 { &hf_gsm_map_locationnumber_odd_even
,
2563 { "Odd/Even", "gsm_map.locationnumber.odd_even",
2564 FT_BOOLEAN
, 8, NULL
, 0x80,
2566 { &hf_gsm_map_locationnumber_nai
,
2567 { "Nature of address indicator", "gsm_map.locationnumber.nai",
2568 FT_UINT8
, BASE_RANGE_STRING
| BASE_DEC
, RVALS(gsm_map_na_vals
), 0x3f,
2570 { &hf_gsm_map_locationnumber_inn
,
2571 { "Internal Network Number indicator (INN)", "gsm_map.locationnumber.inn",
2572 FT_BOOLEAN
, 8, NULL
, 0x80,
2574 { &hf_gsm_map_locationnumber_npi
,
2575 { "Numbering plan indicator", "gsm_map.locationnumber.npi",
2576 FT_UINT8
, BASE_DEC
, VALS(gsm_map_np_vals
), 0x30,
2578 { &hf_gsm_map_locationnumber_apri
,
2579 { "Address presentation restricted indicator", "gsm_map.locationnumber.apri",
2580 FT_UINT8
, BASE_DEC
, VALS(gsm_map_addr_pres_rest_vals
), 0x0c,
2582 { &hf_gsm_map_locationnumber_screening_ind
,
2583 { "Screening indicator", "gsm_map.locationnumber.screening_ind",
2584 FT_UINT8
, BASE_DEC
, VALS(gsm_map_screening_ind_vals
), 0x03,
2586 { &hf_gsm_map_locationnumber_digits
,
2587 { "Address digits", "gsm_map.locationnumber.digits",
2588 FT_STRING
, BASE_NONE
, NULL
, 0,
2590 { &hf_gsm_map_ericsson_locationInformation_rat
,
2591 { "RAT", "gsm_map.ericsson.locationInformation.rat",
2592 FT_UINT8
, BASE_DEC
, VALS(gsm_map_ericsson_locationInformation_rat_vals
), 0,
2593 "Radio Access Technology", HFILL
}},
2594 { &hf_gsm_map_ericsson_locationInformation_lac
,
2595 { "LAC", "gsm_map.ericsson.locationInformation.lac",
2596 FT_UINT16
, BASE_DEC_HEX
, NULL
, 0,
2597 "Location Area Code", HFILL
}},
2598 { &hf_gsm_map_ericsson_locationInformation_ci
,
2599 { "CI", "gsm_map.ericsson.locationInformation.ci",
2600 FT_UINT16
, BASE_DEC_HEX
, NULL
, 0,
2601 "Cell Identity", HFILL
}},
2602 { &hf_gsm_map_ericsson_locationInformation_sac
,
2603 { "SAC", "gsm_map.ericsson.locationInformation.sac",
2604 FT_UINT16
, BASE_DEC_HEX
, NULL
, 0,
2605 "Service Area Code", HFILL
}},
2607 #include "packet-gsm_map-hfarr.c"
2610 /* List of subtrees */
2611 static gint
*ett
[] = {
2613 &ett_gsm_map_InvokeId
,
2614 &ett_gsm_map_InvokePDU
,
2615 &ett_gsm_map_ReturnResultPDU
,
2616 &ett_gsm_map_ReturnErrorPDU
,
2617 &ett_gsm_map_ReturnResult_result
,
2618 &ett_gsm_map_ReturnError_result
,
2619 &ett_gsm_map_GSMMAPPDU
,
2620 &ett_gsm_map_ext_qos_subscribed
,
2621 &ett_gsm_map_pdptypenumber
,
2622 &ett_gsm_map_RAIdentity
,
2623 &ett_gsm_map_LAIFixedLength
,
2624 &ett_gsm_map_isdn_address_string
,
2625 &ett_gsm_map_geo_desc
,
2626 &ett_gsm_map_LongSignalInfo
,
2627 &ett_gsm_map_RadioResourceInformation
,
2628 &ett_gsm_map_MSNetworkCapability
,
2629 &ett_gsm_map_MSRadioAccessCapability
,
2630 &ett_gsm_map_externalsignalinfo
,
2631 &ett_gsm_map_cbs_data_coding
,
2632 &ett_gsm_map_GlobalCellId
,
2633 &ett_gsm_map_GeographicalInformation
,
2634 &ett_gsm_map_apn_str
,
2635 &ett_gsm_map_LocationNumber
,
2636 &ett_gsm_map_ericsson_locationInformation
,
2638 #include "packet-gsm_map-ettarr.c"
2641 static ei_register_info ei
[] = {
2642 { &ei_gsm_map_unknown_sequence3
, { "gsm_map.unknown.sequence3", PI_UNDECODED
, PI_ERROR
, "Unknown or not implemented [3] sequence", EXPFILL
}},
2643 { &ei_gsm_map_unknown_sequence
, { "gsm_map.unknown.sequence", PI_UNDECODED
, PI_ERROR
, "Unknown or not implemented sequence", EXPFILL
}},
2644 { &ei_gsm_map_unknown_parameter
, { "gsm_map.unknown.parameter", PI_UNDECODED
, PI_ERROR
, "Unknown or not implemented parameter", EXPFILL
}},
2645 { &ei_gsm_map_unknown_invokeData
, { "gsm_map.unknown.invokeData", PI_MALFORMED
, PI_WARN
, "Unknown invokeData", EXPFILL
}},
2648 static const enum_val_t application_context_modes
[] = {
2649 {"Use Application Context from the trace", "Use application context from the trace", APPLICATON_CONTEXT_FROM_TRACE
},
2650 {"Treat as AC 1", "Treat as AC 1", 1},
2651 {"Treat as AC 2", "Treat as AC 2", 2},
2652 {"Treat as AC 3", "Treat as AC 3", 3},
2657 /* Register protocol */
2658 proto_gsm_map_dialogue
=proto_gsm_map
= proto_register_protocol(PNAME
, PSNAME
, PFNAME
);
2660 new_register_dissector("gsm_map", dissect_gsm_map
, proto_gsm_map
);
2662 /* Register fields and subtrees */
2663 proto_register_field_array(proto_gsm_map
, hf
, array_length(hf
));
2664 proto_register_subtree_array(ett
, array_length(ett
));
2665 expert_gsm_map
= expert_register_protocol(proto_gsm_map
);
2666 expert_register_field_array(expert_gsm_map
, ei
, array_length(ei
));
2668 map_prop_arg_opcode_table
= register_dissector_table("gsm_map.prop.arg.opcode", "GSM_MAP Proprietary Arg Opcodes", FT_UINT8
, BASE_DEC
);
2669 map_prop_res_opcode_table
= register_dissector_table("gsm_map.prop.res.opcode", "GSM_MAP Proprietary Res Opcodes", FT_UINT8
, BASE_DEC
);
2670 map_prop_err_opcode_table
= register_dissector_table("gsm_map.prop.err.opcode", "GSM_MAP Proprietary Err Opcodes", FT_UINT8
, BASE_DEC
);
2672 gsm_map_tap
= register_tap("gsm_map");
2674 #include "packet-gsm_map-dis-tab.c" */
2675 oid_add_from_string("ericsson-gsm-Map-Ext","1.2.826.0.1249.58.1.0" );
2676 oid_add_from_string("accessTypeNotAllowed-id","1.3.12.2.1107.3.66.1.2");
2677 /*oid_add_from_string("map-ac networkLocUp(1) version3(3)","0.4.0.0.1.0.1.3" );
2679 * Register our configuration options, particularly our ssn:s
2682 range_convert_str(&global_ssn_range
, "6-9", MAX_SSN
);
2684 gsm_map_module
= prefs_register_protocol(proto_gsm_map
, proto_reg_handoff_gsm_map
);
2686 prefs_register_range_preference(gsm_map_module
, "tcap.ssn", "TCAP SSNs",
2687 "TCAP Subsystem numbers used for GSM MAP",
2688 &global_ssn_range
, MAX_SSN
);
2690 prefs_register_enum_preference(gsm_map_module
, "application.context.version",
2691 "Application context version",
2692 "How to treat Application context",
2693 &pref_application_context_version
, application_context_modes
, APPLICATON_CONTEXT_FROM_TRACE
);
2695 prefs_register_bool_preference(gsm_map_module
, "ericsson.proprietary.extensions",
2696 "Dissect Ericsson proprietary extensions",
2697 "When enabled, dissector will use the non 3GPP standard extensions from Ericsson (that can override the standard ones)",
2698 &pref_ericsson_proprietary_ext
);