1 /* packet-gsm_map-template.c
2 * Routines for GSM MobileApplication packet dissection
3 * Copyright 2004 - 2006 , Anders Broman <anders.broman [AT] ericsson.com>
4 * Based on the dissector by:
5 * Felix Fei <felix.fei [AT] utstar.com>
6 * and Michael Lum <mlum [AT] telostech.com>
10 * Wireshark - Network traffic analyzer
11 * By Gerald Combs <gerald@wireshark.org>
12 * Copyright 1998 Gerald Combs
14 * This program is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU General Public License
16 * as published by the Free Software Foundation; either version 2
17 * of the License, or (at your option) any later version.
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, write to the Free Software
26 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27 * References: ETSI TS 129 002
28 * Updated to ETSI TS 129 002 V6.9.0 (2005-3GPP TS 29.002 version 6.9.0 Release 6)
36 #include <epan/packet.h>
37 #include <epan/prefs.h>
38 #include <epan/conversation.h>
40 #include <epan/emem.h>
45 #include "packet-ber.h"
46 #include "packet-q931.h"
47 #include "packet-gsm_map.h"
48 #include "packet-gsm_a.h"
49 #include "packet-tcap.h"
50 #include "packet-e164.h"
51 #include "packet-e212.h"
52 #include "packet-smpp.h"
53 #include "packet-gsm_sms.h"
55 #define PNAME "GSM Mobile Application"
56 #define PSNAME "GSM_MAP"
57 #define PFNAME "gsm_map"
59 /* Initialize the protocol and registered fields */
60 int proto_gsm_map = -1;
62 static int hf_gsm_map_invokeCmd = -1; / Opcode /
63 static int hf_gsm_map_invokeid = -1; / INTEGER /
64 static int hf_gsm_map_absent = -1; / NULL /
65 static int hf_gsm_map_invokeId = -1; / InvokeId /
66 static int hf_gsm_map_invoke = -1; / InvokePDU /
67 static int hf_gsm_map_returnResult = -1; / InvokePDU /
68 static int hf_gsm_map_returnResult_result = -1;
69 static int hf_gsm_map_returnError_result = -1;
70 static int hf_gsm_map_returnError = -1;
71 static int hf_gsm_map_local_errorCode = -1;
72 static int hf_gsm_map_global_errorCode_oid = -1;
73 static int hf_gsm_map_global_errorCode = -1;
75 static int hf_gsm_map_SendAuthenticationInfoArg = -1;
76 static int hf_gsm_map_SendAuthenticationInfoRes = -1;
77 static int hf_gsm_mapSendEndSignal = -1;
78 static int hf_gsm_map_getPassword = -1;
79 static int hf_gsm_map_CheckIMEIArg = -1;
80 static int hf_gsm_map_currentPassword = -1;
81 static int hf_gsm_map_extension = -1;
82 static int hf_gsm_map_nature_of_number = -1;
83 static int hf_gsm_map_number_plan = -1;
84 static int hf_gsm_map_isdn_address_digits = -1;
85 static int hf_gsm_map_address_digits = -1;
86 static int hf_gsm_map_servicecentreaddress_digits = -1;
87 static int hf_gsm_map_imsi_digits = -1;
88 static int hf_gsm_map_Ss_Status_unused = -1;
89 static int hf_gsm_map_Ss_Status_q_bit = -1;
90 static int hf_gsm_map_Ss_Status_p_bit = -1;
91 static int hf_gsm_map_Ss_Status_r_bit = -1;
92 static int hf_gsm_map_Ss_Status_a_bit = -1;
93 static int hf_gsm_map_notification_to_forwarding_party = -1;
94 static int hf_gsm_map_redirecting_presentation = -1;
95 static int hf_gsm_map_notification_to_calling_party = -1;
96 static int hf_gsm_map_forwarding_reason = -1;
97 static int hf_gsm_map_pdp_type_org = -1;
98 static int hf_gsm_map_etsi_pdp_type_number = -1;
99 static int hf_gsm_map_ietf_pdp_type_number = -1;
100 static int hf_gsm_map_ext_qos_subscribed_pri = -1;
102 static int hf_gsm_map_qos_traffic_cls = -1;
103 static int hf_gsm_map_qos_del_order = -1;
104 static int hf_gsm_map_qos_del_of_err_sdu = -1;
105 static int hf_gsm_map_qos_ber = -1;
106 static int hf_gsm_map_qos_sdu_err_rat = -1;
107 static int hf_gsm_map_qos_traff_hdl_pri = -1;
108 static int hf_gsm_map_qos_max_sdu = -1;
109 static int hf_gsm_map_max_brate_ulink = -1;
110 static int hf_gsm_map_max_brate_dlink = -1;
111 static int hf_gsm_map_qos_transfer_delay = -1;
112 static int hf_gsm_map_guaranteed_max_brate_ulink = -1;
113 static int hf_gsm_map_guaranteed_max_brate_dlink = -1;
114 static int hf_gsm_map_GSNAddress_IPv4 = -1;
115 static int hf_gsm_map_GSNAddress_IPv6 = -1;
116 static int hf_geo_loc_type_of_shape = -1;
117 static int hf_geo_loc_sign_of_lat = -1;
118 static int hf_geo_loc_deg_of_lat =-1;
119 static int hf_geo_loc_deg_of_long =-1;
120 static int hf_geo_loc_uncertainty_code = -1;
121 static int hf_geo_loc_uncertainty_semi_major = -1;
122 static int hf_geo_loc_uncertainty_semi_minor = -1;
123 static int hf_geo_loc_orientation_of_major_axis = -1;
124 static int hf_geo_loc_confidence = -1;
125 static int hf_geo_loc_no_of_points = -1;
126 static int hf_geo_loc_D = -1;
127 static int hf_geo_loc_altitude = -1;
128 static int hf_geo_loc_inner_radius = -1;
129 static int hf_geo_loc_uncertainty_radius = -1;
130 static int hf_geo_loc_offset_angle = -1;
131 static int hf_geo_loc_included_angle = -1;
133 #include "packet-gsm_map-hf.c"
135 /* Initialize the subtree pointers */
136 static gint ett_gsm_map = -1;
137 static gint ett_gsm_map_InvokeId = -1;
138 static gint ett_gsm_map_InvokePDU = -1;
139 static gint ett_gsm_map_ReturnResultPDU = -1;
140 static gint ett_gsm_map_ReturnErrorPDU = -1;
141 static gint ett_gsm_map_ReturnResult_result = -1;
142 static gint ett_gsm_map_ReturnError_result = -1;
143 static gint ett_gsm_map_GSMMAPPDU = -1;
144 static gint ett_gsm_map_ext_qos_subscribed = -1;
145 static gint ett_gsm_map_pdptypenumber = -1;
146 static gint ett_gsm_map_RAIdentity = -1;
147 static gint ett_gsm_map_LAIFixedLength = -1;
148 static gint ett_gsm_map_isdn_address_string = -1;
150 #include "packet-gsm_map-ett.c"
152 static dissector_table_t sms_dissector_table; /* SMS TPDU */
153 static dissector_handle_t data_handle;
155 /* Preferenc settings default */
157 static range_t *global_ssn_range;
158 static range_t *ssn_range;
159 dissector_handle_t map_handle;
161 /* Global variables */
162 static guint32 opcode=0;
163 static guint32 errorCode;
164 static proto_tree *top_tree;
165 static int application_context_version;
167 gint AccessNetworkProtocolId;
168 const char *obj_id = NULL;
169 static int gsm_map_tap = -1;
171 /* Forward declarations */
172 static int dissect_invokeData(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset);
173 static int dissect_returnResultData(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset);
174 static int dissect_returnErrorData(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset);
178 const value_string gsm_map_PDP_Type_Organisation_vals[] = {
184 const value_string gsm_map_ietf_defined_pdp_vals[] = {
185 { 0x21, "IPv4 Address" },
186 { 0x57, "IPv6 Address" },
190 const value_string gsm_map_etsi_defined_pdp_vals[] = {
196 unpack_digits(tvbuff_t *tvb, int offset){
203 length = tvb_length(tvb);
206 digit_str = ep_alloc((length - offset)*2+1);
208 while ( offset < length ){
210 octet = tvb_get_guint8(tvb,offset);
211 digit_str[i] = ((octet & 0x0f) + '0');
215 * unpack second value in byte
219 if (octet == 0x0f) /* odd number bytes - hit filler */
222 digit_str[i] = ((octet & 0x0f) + '0');
231 /* returns value in kb/s */
233 gsm_map_calc_bitrate(guint8 value){
241 granularity = value >> 6;
242 returnvalue = value & 0x7f;
243 switch (granularity){
247 returnvalue = ((returnvalue - 0x40) << 3)+64;
250 returnvalue = (returnvalue << 6)+576;
253 returnvalue = (returnvalue << 6)+576;
261 dissect_gsm_map_ext_qos_subscribed(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree){
268 item = get_ber_last_created_item();
269 subtree = proto_item_add_subtree(item, ett_gsm_map_ext_qos_subscribed);
271 Allocation/Retention Priority (This octet encodes each priority level defined in
272 23.107 as the binary value of the priority level, declaration in 29.060)
273 Octets 2-9 are coded according to 3GPP TS 24.008[35] Quality of Service Octets
276 /* Allocation/Retention Priority */
277 proto_tree_add_item(subtree, hf_gsm_map_ext_qos_subscribed_pri, tvb, offset, 1, FALSE);
280 /* Quality of Service Octets 6-13.( Octet 2 - 9 Here) */
282 /* Traffic class, octet 6 (see 3GPP TS 23.107) Bits 8 7 6 */
283 proto_tree_add_item(subtree, hf_gsm_map_qos_traffic_cls, tvb, offset, 1, FALSE);
284 /* Delivery order, octet 6 (see 3GPP TS 23.107) Bits 5 4 */
285 proto_tree_add_item(subtree, hf_gsm_map_qos_del_order, tvb, offset, 1, FALSE);
286 /* Delivery of erroneous SDUs, octet 6 (see 3GPP TS 23.107) Bits 3 2 1 */
287 proto_tree_add_item(subtree, hf_gsm_map_qos_del_of_err_sdu, tvb, offset, 1, FALSE);
290 /* Maximum SDU size, octet 7 (see 3GPP TS 23.107) */
291 octet = tvb_get_guint8(tvb,offset);
294 proto_tree_add_text(subtree, tvb, offset, 1, "Subscribed Maximum SDU size/Reserved");
298 proto_tree_add_uint(subtree, hf_gsm_map_qos_max_sdu, tvb, offset, 1, value);
302 proto_tree_add_uint(subtree, hf_gsm_map_qos_max_sdu, tvb, offset, 1, value);
306 proto_tree_add_uint(subtree, hf_gsm_map_qos_max_sdu, tvb, offset, 1, value);
311 proto_tree_add_uint(subtree, hf_gsm_map_qos_max_sdu, tvb, offset, 1, value);
313 proto_tree_add_text(subtree, tvb, offset, 1, "Maximum SDU size value 0x%x not defined in TS 24.008",octet);
318 /* Maximum bit rate for uplink, octet 8 */
319 octet = tvb_get_guint8(tvb,offset);
321 proto_tree_add_text(subtree, tvb, offset, 1, "Subscribed Maximum bit rate for uplink/Reserved" );
323 proto_tree_add_uint(subtree, hf_gsm_map_max_brate_ulink, tvb, offset, 1, gsm_map_calc_bitrate(octet));
326 /* Maximum bit rate for downlink, octet 9 (see 3GPP TS 23.107) */
327 octet = tvb_get_guint8(tvb,offset);
329 proto_tree_add_text(subtree, tvb, offset, 1, "Subscribed Maximum bit rate for downlink/Reserved" );
331 proto_tree_add_uint(subtree, hf_gsm_map_max_brate_dlink, tvb, offset, 1, gsm_map_calc_bitrate(octet));
334 /* Residual Bit Error Rate (BER), octet 10 (see 3GPP TS 23.107) Bits 8 7 6 5 */
335 proto_tree_add_item(subtree, hf_gsm_map_qos_ber, tvb, offset, 1, FALSE);
336 /* SDU error ratio, octet 10 (see 3GPP TS 23.107) */
337 proto_tree_add_item(subtree, hf_gsm_map_qos_sdu_err_rat, tvb, offset, 1, FALSE);
340 /* Transfer delay, octet 11 (See 3GPP TS 23.107) Bits 8 7 6 5 4 3 */
341 proto_tree_add_item(subtree, hf_gsm_map_qos_transfer_delay, tvb, offset, 1, FALSE);
342 /* Traffic handling priority, octet 11 (see 3GPP TS 23.107) Bits 2 1 */
343 proto_tree_add_item(subtree, hf_gsm_map_qos_traff_hdl_pri, tvb, offset, 1, FALSE);
346 /* Guaranteed bit rate for uplink, octet 12 (See 3GPP TS 23.107)
347 Coding is identical to that of Maximum bit rate for uplink.
349 octet = tvb_get_guint8(tvb,offset);
351 proto_tree_add_text(subtree, tvb, offset, 1, "Subscribed Guaranteed bit rate for uplink/Reserved" );
353 proto_tree_add_uint(subtree, hf_gsm_map_guaranteed_max_brate_ulink, tvb, offset, 1, gsm_map_calc_bitrate(octet));
357 /* Guaranteed bit rate for downlink, octet 13(See 3GPP TS 23.107)
358 Coding is identical to that of Maximum bit rate for uplink.
360 octet = tvb_get_guint8(tvb,offset);
362 proto_tree_add_text(subtree, tvb, offset, 1, "Subscribed Guaranteed bit rate for downlink/Reserved" );
364 proto_tree_add_uint(subtree, hf_gsm_map_guaranteed_max_brate_dlink, tvb, offset, 1, gsm_map_calc_bitrate(octet));
369 #define ELLIPSOID_POINT 0
372 /* TS 23 032 Table 2a: Coding of Type of Shape */
373 static const value_string type_of_shape_vals[] = {
374 { ELLIPSOID_POINT, "Ellipsoid Point"},
375 { 1, "Ellipsoid point with uncertainty Circle"},
376 { 3, "Ellipsoid point with uncertainty Ellipse"},
378 { 8, "Ellipsoid point with altitude"},
379 { 9, "Ellipsoid point with altitude and uncertainty Ellipsoid"},
380 { 10, "Ellipsoid Arc"},
384 /* 3GPP TS 23.032 7.3.1 */
385 static const value_string sign_of_latitude_vals[] = {
391 static const value_string dir_of_alt_vals[] = {
392 { 0, "Altitude expresses height"},
393 { 1, "Altitude expresses depth"},
399 dissect_geographical_description(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree){
401 guint8 type_of_shape;
406 length = tvb_reported_length_remaining(tvb,0);
407 /* Geographical Location
408 * The Location Estimate field is composed of 1 or more octets with an internal structure
409 * according to section 7 in [23.032].
411 proto_tree_add_item(tree, hf_geo_loc_type_of_shape, tvb, 0, 1, FALSE);
414 type_of_shape = tvb_get_guint8(tvb,offset)>>4;
415 switch (type_of_shape){
416 case ELLIPSOID_POINT: /* Ellipsoid Point */
417 case 2: /* Ellipsoid Point with uncertainty Circle */
418 case 3: /* Ellipsoid Point with uncertainty Ellipse */
419 case 8: /* Ellipsoid Point with Altitude */
420 case 9: /* Ellipsoid Point with altitude and uncertainty ellipsoid */
421 case 10: /* Ellipsoid Arc */
425 proto_tree_add_item(tree, hf_geo_loc_sign_of_lat, tvb, offset, 1, FALSE);
426 proto_tree_add_item(tree, hf_geo_loc_deg_of_lat, tvb, offset, 3, FALSE);
430 proto_tree_add_item(tree, hf_geo_loc_deg_of_long, tvb, offset, 3, FALSE);
432 if(type_of_shape==2){
433 /* Ellipsoid Point with uncertainty Circle */
436 /* Uncertainty code */
437 proto_tree_add_item(tree, hf_geo_loc_uncertainty_code, tvb, offset, 1, FALSE);
438 }else if(type_of_shape==3){
439 /* Ellipsoid Point with uncertainty Ellipse */
440 /* Uncertainty semi-major */
441 proto_tree_add_item(tree, hf_geo_loc_uncertainty_semi_major, tvb, offset, 1, FALSE);
443 /* Uncertainty semi-minor */
444 proto_tree_add_item(tree, hf_geo_loc_uncertainty_semi_minor, tvb, offset, 1, FALSE);
446 /* Orientation of major axis */
447 proto_tree_add_item(tree, hf_geo_loc_orientation_of_major_axis, tvb, offset, 1, FALSE);
450 proto_tree_add_item(tree, hf_geo_loc_confidence, tvb, offset, 1, FALSE);
451 }else if(type_of_shape==8){
452 /* Ellipsoid Point with Altitude */
454 /*D: Direction of Altitude */
455 proto_tree_add_item(tree, hf_geo_loc_D, tvb, offset, 1, FALSE);
457 proto_tree_add_item(tree, hf_geo_loc_altitude, tvb, offset, 2, FALSE);
458 }else if(type_of_shape==9){
459 /* Ellipsoid Point with altitude and uncertainty ellipsoid */
461 /*D: Direction of Altitude */
462 proto_tree_add_item(tree, hf_geo_loc_D, tvb, offset, 1, FALSE);
464 proto_tree_add_item(tree, hf_geo_loc_altitude, tvb, offset, 2, FALSE);
466 /* Uncertainty semi-major */
467 proto_tree_add_item(tree, hf_geo_loc_uncertainty_semi_major, tvb, offset, 1, FALSE);
469 /* Uncertainty semi-minor */
470 proto_tree_add_item(tree, hf_geo_loc_uncertainty_semi_minor, tvb, offset, 1, FALSE);
472 /* Orientation of major axis */
473 proto_tree_add_item(tree, hf_geo_loc_orientation_of_major_axis, tvb, offset, 1, FALSE);
476 proto_tree_add_item(tree, hf_geo_loc_confidence, tvb, offset, 1, FALSE);
477 }else if(type_of_shape==10){
481 proto_tree_add_item(tree, hf_geo_loc_inner_radius, tvb, offset, 2, FALSE);
483 /* Uncertainty radius */
484 proto_tree_add_item(tree, hf_geo_loc_uncertainty_radius, tvb, offset, 1, FALSE);
487 proto_tree_add_item(tree, hf_geo_loc_offset_angle, tvb, offset, 1, FALSE);
490 proto_tree_add_item(tree, hf_geo_loc_included_angle, tvb, offset, 1, FALSE);
493 proto_tree_add_item(tree, hf_geo_loc_confidence, tvb, offset, 1, FALSE);
497 case 5: /* Polygon */
498 /* Number of points */
499 no_of_points = tvb_get_guint8(tvb,offset)&0x0f;
500 proto_tree_add_item(tree, hf_geo_loc_no_of_points, tvb, offset, 1, FALSE);
502 while ( no_of_points > 0){
514 #include "packet-gsm_map-fn.c"
516 const value_string gsm_map_opr_code_strings[] = {
517 { 2, "updateLocation" },
518 { 3, "cancelLocation" },
519 { 4, "provideRoamingNumber" },
520 { 5, "noteSubscriberDataModified" },
521 { 6, "resumeCallHandling" },
522 { 7, "insertSubscriberData" },
523 { 8, "deleteSubscriberData" },
524 { 9, "sendParameters" }, /* map-ac infoRetrieval (14) version1 (1)*/
525 { 10, "registerSS" },
527 { 12, "activateSS" },
528 { 13, "deactivateSS" },
529 { 14, "interrogateSS" },
530 { 15, "authenticationFailureReport" },
531 { 17, "registerPassword" },
532 { 18, "getPassword" },
533 { 19, "processUnstructuredSS-Data" }, /* map-ac networkFunctionalSs (18) version1 (1) */
534 { 20, "releaseResources" },
535 { 22, "sendRoutingInfo" },
536 { 23, "updateGprsLocation" },
537 { 24, "sendRoutingInfoForGprs" },
538 { 25, "failureReport" },
539 { 26, "noteMsPresentForGprs" },
540 { 28, "performHandover" }, /* map-ac handoverControl (11) version1 (1)*/
541 { 29, "sendEndSignal" },
542 { 30, "performSubsequentHandover" }, /* map-ac handoverControl (11) version1 (1) */
543 { 31, "provideSIWFSNumber" },
544 { 32, "sIWFSSignallingModify" },
545 { 33, "processAccessSignalling" },
546 { 34, "forwardAccessSignalling" },
547 { 35, "noteInternalHandover" }, /* map-ac handoverControl (11) version1 (1) */
549 { 38, "forwardCheckSS-Indication" },
550 { 39, "prepareGroupCall" },
551 { 40, "sendGroupCallEndSignal" },
552 { 41, "processGroupCallSignalling" },
553 { 42, "forwardGroupCallSignalling" },
555 { 44, "mt-forwardSM" },
556 { 45, "sendRoutingInfoForSM" },
557 { 46, "mo-forwardSM" },
558 { 47, "reportSM-DeliveryStatus" },
559 { 48, "noteSubscriberPresent" }, /* map-ac mwdMngt (24) version1 (1) */
560 { 49, "alertServiceCentreWithoutResult" }, /* map-ac shortMsgAlert (23) version1 (1) */
561 { 50, "activateTraceMode" },
562 { 51, "deactivateTraceMode" },
563 { 52, "traceSubscriberActivity" }, /* map-ac handoverControl (11) version1 (1) */
564 { 54, "beginSubscriberActivity" }, /* map-ac networkFunctionalSs (18) version1 (1) */
565 { 55, "sendIdentification" },
566 { 56, "sendAuthenticationInfo" },
567 { 57, "restoreData" },
569 { 59, "processUnstructuredSS-Request" },
570 { 60, "unstructuredSS-Request" },
571 { 61, "unstructuredSS-Notify" },
572 { 62, "anyTimeSubscriptionInterrogation" },
573 { 63, "informServiceCentre" },
574 { 64, "alertServiceCentre" },
575 { 65, "anyTimeModification" },
576 { 66, "readyForSM" },
578 { 68, "prepareHandover" },
579 { 69, "prepareSubsequentHandover" },
580 { 70, "provideSubscriberInfo" },
581 { 71, "anyTimeInterrogation" },
582 { 72, "ss-InvocationNotification" },
583 { 73, "setReportingState" },
584 { 74, "statusReport" },
585 { 75, "remoteUserFree" },
586 { 76, "registerCC-Entry" },
587 { 77, "eraseCC-Entry" },
588 { 78, "secureTransportClass1" },
589 { 79, "secureTransportClass2" },
590 { 80, "secureTransportClass3" },
591 { 81, "secureTransportClass4" },
592 { 83, "provideSubscriberLocation" },
593 { 85, "sendRoutingInfoForLCS" },
594 { 86, "subscriberLocationReport" },
596 { 88, "ist-Command" },
597 { 89, "noteMM-Event" },
600 static const value_string gsm_map_err_code_string_vals[] = {
601 { 1, "Unknown Subscriber" },
602 { 3, "Unknown MSC" },
603 { 5, "Unidentified Subscriber" },
604 { 6, "Absent Subscriber SM" },
605 { 7, "Unknown Equipment" },
606 { 8, "Roaming Not Allowed" },
607 { 9, "Illegal Subscriber" },
608 { 10, "Bearer Service Not Provisioned" },
609 { 11, "Teleservice Not Provisioned" },
610 { 12, "Illegal Equipment" },
611 { 13, "Call Barred" },
612 { 14, "Forwarding Violation" },
613 { 15, "CUG Reject" },
614 { 16, "Illegal SS Operation" },
615 { 17, "SS Error Status" },
616 { 18, "SS Not Available" },
617 { 19, "SS Subscription Violation" },
618 { 20, "SS Incompatibility" },
619 { 21, "Facility Not Supported" },
620 { 25, "No Handover Number Available" },
621 { 26, "Subsequent Handover Failure" },
622 { 27, "Absent Subscriber" },
623 { 28, "Incompatible Terminal" },
624 { 29, "Short Term Denial" },
625 { 30, "Long Term Denial" },
626 { 31, "Subscriber Busy For MT SMS" },
627 { 32, "SM Delivery Failure" },
628 { 33, "Message Waiting List Full" },
629 { 34, "System Failure" },
630 { 35, "Data Missing" },
631 { 36, "Unexpected Data Value" },
632 { 37, "PW Registration Failure" },
633 { 38, "Negative PW Check" },
634 { 39, "No Roaming Number Available" },
635 { 40, "Tracing Buffer Full" },
636 { 42, "Target Cell Outside Group Call Area" },
637 { 43, "Number Of PW Attempts Violation" },
638 { 44, "Number Changed" },
639 { 45, "Busy Subscriber" },
640 { 46, "No Subscriber Reply" },
641 { 47, "Forwarding Failed" },
642 { 48, "OR Not Allowed" },
643 { 49, "ATI Not Allowed" },
644 { 50, "No Group Call Number Available" },
645 { 51, "Resource Limitation" },
646 { 52, "Unauthorized Requesting Network" },
647 { 53, "Unauthorized LCS Client" },
648 { 54, "Position Method Failure" },
649 { 58, "Unknown Or Unreachable LCS Client" },
650 { 59, "MM Event Not Supported" },
651 { 60, "ATSI Not Allowed" },
652 { 61, "ATM Not Allowed" },
653 { 62, "Information Not Available" },
654 { 71, "Unknown Alphabet" },
656 { 120, "Nbr Sb Exceeded" },
657 { 121, "Rejected By User" },
658 { 122, "Rejected By Network" },
659 { 123, "Deflection To Served Subscriber" },
660 { 124, "Special Service Code" },
661 { 125, "Invalid Deflected To Number" },
662 { 126, "Max Number Of MPTY Participants Exceeded" },
663 { 127, "Resources Not Available" },
666 static const true_false_string gsm_map_extension_value = {
670 static const value_string gsm_map_nature_of_number_values[] = {
672 { 0x01, "International Number" },
673 { 0x02, "National Significant Number" },
674 { 0x03, "Network Specific Number" },
675 { 0x04, "Subscriber Number" },
676 { 0x05, "Reserved" },
677 { 0x06, "Abbreviated Number" },
678 { 0x07, "Reserved for extension" },
681 static const value_string gsm_map_number_plan_values[] = {
683 { 0x01, "ISDN/Telephony Numbering (Rec ITU-T E.164)" },
685 { 0x03, "Data Numbering (ITU-T Rec. X.121)" },
686 { 0x04, "Telex Numbering (ITU-T Rec. F.69)" },
688 { 0x06, "Land Mobile Numbering (ITU-T Rec. E.212)" },
690 { 0x08, "National Numbering" },
691 { 0x09, "Private Numbering" },
692 { 0x0f, "Reserved for extension" },
696 static const true_false_string gsm_map_Ss_Status_q_bit_values = {
700 static const true_false_string gsm_map_Ss_Status_p_values = {
704 static const true_false_string gsm_map_Ss_Status_r_values = {
708 static const true_false_string gsm_map_Ss_Status_a_values = {
715 dissect_gsm_map_Opcode(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
716 offset = dissect_ber_integer(FALSE, pinfo, tree, tvb, offset, hf_index, &opcode);
718 if (check_col(pinfo->cinfo, COL_INFO)){
719 col_append_fstr(pinfo->cinfo, COL_INFO, val_to_str(opcode, gsm_map_opr_code_strings, "Unknown GSM-MAP (%u)"));
725 static int dissect_invokeData(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
728 gboolean bug_pc, bug_ind_field;
735 case 2: /*updateLocation*/
736 offset=dissect_gsm_map_UpdateLocationArg(FALSE, tvb, offset, pinfo, tree, -1);
738 case 3: /*cancelLocation*/
739 octet = tvb_get_guint8(tvb,0) & 0xf;
740 if ( octet == 3){ /* */
741 /* XXX asn2eth can not yet handle tagged assignment yes so this
742 * XXX is some conformance file magic to work around that bug
744 offset = get_ber_identifier(tvb, offset, &bug_class, &bug_pc, &bug_tag);
745 offset = get_ber_length(tree, tvb, offset, &bug_len1, &bug_ind_field);
746 offset=dissect_gsm_map_CancelLocationArg(TRUE, tvb, offset, pinfo, tree, -1);
748 offset=dissect_gsm_map_CancelLocationArgV2(FALSE, tvb, offset, pinfo, tree, -1);
751 case 4: /*provideRoamingNumber*/
752 offset=dissect_gsm_map_ProvideRoamingNumberArg(FALSE, tvb, offset, pinfo, tree, -1);
754 case 6: /*resumeCallHandling*/
755 offset=dissect_gsm_map_ResumeCallHandlingArg(FALSE, tvb, offset, pinfo, tree, -1);
757 case 7: /*insertSubscriberData*/
758 offset=dissect_gsm_map_InsertSubscriberDataArg(FALSE, tvb, offset, pinfo, tree, -1);
760 case 8: /*deleteSubscriberData*/
761 offset=dissect_gsm_map_DeleteSubscriberDataArg(FALSE, tvb, offset, pinfo, tree, -1);
763 /* TODO find out why this isn't in the ASN1 file
764 case 9: sendParameters
765 offset=dissect_gsm_map_DeleteSubscriberDataArg(FALSE, tvb, offset, pinfo, tree, -1);
768 case 10: /*registerSS*/
769 offset=dissect_gsm_map_RegisterSS_Arg(FALSE, tvb, offset, pinfo, tree, -1);
772 offset=dissect_gsm_map_SS_ForBS_Code(FALSE, tvb, offset, pinfo, tree, -1);
774 case 12: /*activateSS*/
775 offset=dissect_gsm_map_SS_ForBS_Code(FALSE, tvb, offset, pinfo, tree, -1);
777 case 13: /*deactivateSS*/
778 offset=dissect_gsm_map_SS_ForBS_Code(FALSE, tvb, offset, pinfo, tree, -1);
780 case 14: /*interrogateSS*/
781 offset=dissect_gsm_map_SS_ForBS_Code(FALSE, tvb, offset, pinfo, tree, -1);
783 case 15: /*authenticationFailureReport*/
784 offset=dissect_gsm_map_AuthenticationFailureReportArg(FALSE, tvb, offset, pinfo, tree, -1);
786 case 17: /*registerPassword*/
787 offset=dissect_gsm_map_SS_Code(FALSE, tvb, offset, pinfo, tree, hf_gsm_map_ss_Code);
789 case 18: /*getPassword*/
790 offset=dissect_gsm_map_GetPasswordArg(FALSE, tvb, offset, pinfo, tree, hf_gsm_map_getPassword);
792 case 20: /*releaseResources*/
793 offset=dissect_gsm_map_ReleaseResourcesArg(FALSE, tvb, offset, pinfo, tree, -1);
795 case 22: /*sendRoutingInfo*/
796 offset=dissect_gsm_map_SendRoutingInfoArg(FALSE, tvb, offset, pinfo, tree, -1);
798 case 23: /*updateGprsLocation*/
799 offset=dissect_gsm_map_UpdateGprsLocationArg(FALSE, tvb, offset, pinfo, tree, -1);
801 case 24: /*sendRoutingInfoForGprs*/
802 offset=dissect_gsm_map_SendRoutingInfoForGprsArg(FALSE, tvb, offset, pinfo, tree, -1);
804 case 25: /*failureReport*/
805 offset=dissect_gsm_map_FailureReportArg(FALSE, tvb, offset, pinfo, tree, -1);
807 case 26: /*noteMsPresentForGprs*/
808 offset=dissect_gsm_map_NoteMsPresentForGprsArg(FALSE, tvb, offset, pinfo, tree, -1);
810 case 29: /*sendEndSignal*/
811 octet = tvb_get_guint8(tvb,0) & 0xf;
812 if ( octet == 3){ /* This is a V3 message ??? */
813 /* XXX asn2eth can not yet handle tagged assignment yes so this
814 * XXX is some conformance file magic to work around that bug
816 offset = get_ber_identifier(tvb, offset, &bug_class, &bug_pc, &bug_tag);
817 offset = get_ber_length(tree, tvb, offset, &bug_len1, &bug_ind_field);
818 offset=dissect_gsm_map_SendEndSignalArgV3(TRUE, tvb, offset, pinfo, tree, hf_gsm_mapSendEndSignal);
820 offset=dissect_gsm_map_Bss_APDU(FALSE, tvb, offset, pinfo, tree, hf_gsm_mapSendEndSignal);
823 case 31: /*provideSIWFSNumbe*/
824 offset=dissect_gsm_map_ProvideSIWFSNumberArg(FALSE, tvb, offset, pinfo, tree, -1);
826 case 32: /*sIWFSSignallingModify*/
827 offset=dissect_gsm_map_SIWFSSignallingModifyArg(FALSE, tvb, offset, pinfo, tree, -1);
829 case 33: /*processAccessSignalling*/
830 octet = tvb_get_guint8(tvb,0) & 0xf;
831 if ( octet == 3){ /* This is a V3 message ??? */
832 /* XXX asn2eth can not yet handle tagged assignment yes so this
833 * XXX is some conformance file magic to work around that bug
835 offset = get_ber_identifier(tvb, offset, &bug_class, &bug_pc, &bug_tag);
836 offset = get_ber_length(tree, tvb, offset, &bug_len1, &bug_ind_field);
837 offset = dissect_gsm_map_ProcessAccessSignallingArgV3(TRUE, tvb, offset, pinfo, tree, -1);
839 offset=dissect_gsm_map_Bss_APDU(FALSE, tvb, offset, pinfo, tree, -1);
842 case 34: /*forwardAccessSignalling*/
843 octet = tvb_get_guint8(tvb,0) & 0xf;
844 if ( octet == 3){ /* This is a V3 message ??? */
845 /* XXX asn2eth can not yet handle tagged assignment yes so this
846 * XXX is some conformance file magic to work around that bug
848 offset = get_ber_identifier(tvb, offset, &bug_class, &bug_pc, &bug_tag);
849 offset = get_ber_length(tree, tvb, offset, &bug_len1, &bug_ind_field);
850 offset=dissect_gsm_map_ForwardAccessSignallingArgV3(TRUE, tvb, offset, pinfo, tree, -1);
852 offset=dissect_gsm_map_Bss_APDU(FALSE, tvb, offset, pinfo, tree, -1);
856 offset=dissect_gsm_map_ResetArg(FALSE, tvb, offset, pinfo, tree, -1);
858 case 38: /*forwardCheckSS-Indication*/
861 case 39: /*prepareGroupCall*/
862 offset=dissect_gsm_map_PrepareGroupCallArg(FALSE, tvb, offset, pinfo, tree, -1);
864 case 40: /*sendGroupCallEndSignal*/
865 dissect_gsm_map_SendGroupCallEndSignalArg(FALSE, tvb, offset, pinfo, tree, -1);
867 case 42: /*processGroupCallSignalling*/
868 offset=dissect_gsm_map_ProcessGroupCallSignallingArg(FALSE, tvb, offset, pinfo, tree, -1);
870 case 43: /*checkIMEI*/
871 if (application_context_version < 3 ){
872 offset = dissect_gsm_map_IMEI(FALSE, tvb, offset, pinfo, tree, hf_gsm_map_imei);
874 offset=dissect_gsm_map_CheckIMEIArgV3(FALSE, tvb, offset, pinfo, tree, hf_gsm_map_CheckIMEIArg);
877 case 44: /*mt-forwardSM*/
878 offset=dissect_gsm_map_Mt_forwardSM_Arg(FALSE, tvb, offset, pinfo, tree, -1);
880 case 45: /*sendRoutingInfoForSM*/
881 offset=dissect_gsm_map_RoutingInfoForSMArg(FALSE, tvb, offset, pinfo, tree, -1);
883 case 46: /*mo-forwardSM*/
884 offset=dissect_gsm_map_Mo_forwardSM_Arg(FALSE, tvb, offset, pinfo, tree, -1);
886 case 47: /*reportSM-DeliveryStatus*/
887 offset=dissect_gsm_map_ReportSM_DeliveryStatusArg(FALSE, tvb, offset, pinfo, tree, -1);
889 case 50: /*activateTraceMode*/
890 offset=dissect_gsm_map_ActivateTraceModeArg(FALSE, tvb, offset, pinfo, tree, -1);
892 case 51: /*deactivateTraceMode*/
893 offset=dissect_gsm_map_DeactivateTraceModeArg(FALSE, tvb, offset, pinfo, tree, -1);
895 case 55: /*sendIdentification*/
896 offset=dissect_gsm_map_SendIdentificationArg(FALSE, tvb, offset, pinfo, tree, -1);
898 case 56: /*sendAuthenticationInfo*/
899 if (application_context_version < 3 ){
900 offset=dissect_gsm_map_SendAuthenticationInfoArg(FALSE, tvb, offset, pinfo, tree, hf_gsm_map_SendAuthenticationInfoArg);
902 offset=dissect_gsm_map_SendAuthenticationInfoArgV2(FALSE, tvb, offset, pinfo, tree, hf_gsm_map_SendAuthenticationInfoArg);
905 case 57: /*restoreData*/
906 offset=dissect_gsm_map_RestoreDataArg(FALSE, tvb, offset, pinfo, tree, -1);
908 case 58: /*sendIMSI*/
909 offset = dissect_gsm_map_ISDN_AddressString(FALSE, tvb, offset, pinfo, tree, hf_gsm_map_msisdn);
911 case 59: /*processUnstructuredSS-Request*/
912 offset=dissect_gsm_map_Ussd_Arg(FALSE, tvb, offset, pinfo, tree, -1);
914 case 60: /*unstructuredSS-Request*/
915 offset=dissect_gsm_map_Ussd_Arg(FALSE, tvb, offset, pinfo, tree, -1);
917 case 61: /*unstructuredSS-Notify*/
918 offset=dissect_gsm_map_Ussd_Arg(FALSE, tvb, offset, pinfo, tree, -1);
920 case 62: /*AnyTimeSubscriptionInterrogation*/
921 offset=dissect_gsm_map_AnyTimeSubscriptionInterrogationArg(FALSE, tvb, offset, pinfo, tree, -1);
923 case 63: /*informServiceCentre*/
924 offset=dissect_gsm_map_InformServiceCentreArg(FALSE, tvb, offset, pinfo, tree, -1);
926 case 64: /*alertServiceCentre*/
927 offset=dissect_gsm_map_AlertServiceCentreArg(FALSE, tvb, offset, pinfo, tree, -1);
929 case 65: /*AnyTimeModification*/
930 offset=dissect_gsm_map_AnyTimeModificationArg(FALSE, tvb, offset, pinfo, tree, -1);
932 case 66: /*readyForSM*/
933 offset=dissect_gsm_map_ReadyForSM_Arg(FALSE, tvb, offset, pinfo, tree, -1);
936 /* XXX asn2eth can not yet handle tagged assignment yes so this
937 * XXX is some conformance file magic to work around that bug
939 offset = get_ber_identifier(tvb, offset, &bug_class, &bug_pc, &bug_tag);
940 offset = get_ber_length(tree, tvb, offset, &bug_len1, &bug_ind_field);
941 offset=dissect_gsm_map_PurgeMSArg(TRUE, tvb, offset, pinfo, tree, -1);
943 case 68: /*prepareHandover*/
944 octet = tvb_get_guint8(tvb,0) & 0xf;
945 if ( octet == 3){ /* This is a V3 message ??? */
946 /* XXX asn2eth can not yet handle tagged assignment yes so this
947 * XXX is some conformance file magic to work around that bug
949 offset = get_ber_identifier(tvb, offset, &bug_class, &bug_pc, &bug_tag);
950 offset = get_ber_length(tree, tvb, offset, &bug_len1, &bug_ind_field);
951 offset=dissect_gsm_map_PrepareHO_ArgV3(TRUE, tvb, offset, pinfo, tree, -1);
953 offset=dissect_gsm_map_PrepareHO_Arg(FALSE, tvb, offset, pinfo, tree, -1);
956 case 69: /*prepareSubsequentHandover*/
957 offset=dissect_gsm_map_PrepareSubsequentHOArg(FALSE, tvb, offset, pinfo, tree, -1);
959 case 70: /*provideSubscriberInfo*/
960 offset=dissect_gsm_map_ProvideSubscriberInfoArg(FALSE, tvb, offset, pinfo, tree, -1);
962 case 71: /*anyTimeInterrogation*/
963 offset=dissect_gsm_map_AnyTimeInterrogationArg(FALSE, tvb, offset, pinfo, tree, -1);
965 case 72: /*ss-InvocationNotificatio*/
966 offset=dissect_gsm_map_Ss_InvocationNotificationArg(FALSE, tvb, offset, pinfo, tree, -1);
968 case 73: /*setReportingState*/
969 offset=dissect_gsm_map_SetReportingStateArg(FALSE, tvb, offset, pinfo, tree, -1);
971 case 74: /*statusReport*/
972 offset=dissect_gsm_map_StatusReportArg(FALSE, tvb, offset, pinfo, tree, -1);
974 case 75: /*remoteUserFree*/
975 offset=dissect_gsm_map_RemoteUserFreeArg(FALSE, tvb, offset, pinfo, tree, -1);
977 case 76: /*registerCC-Entry*/
978 offset=dissect_gsm_map_RegisterCC_EntryArg(FALSE, tvb, offset, pinfo, tree, -1);
980 case 77: /*eraseCC-Entry*/
981 offset=dissect_gsm_map_EraseCC_EntryArg(FALSE, tvb, offset, pinfo, tree, -1);
983 case 78: /*secureTransportClass1*/
984 case 79: /*secureTransportClass1*/
985 case 80: /*secureTransportClass1*/
986 case 81: /*secureTransportClass1*/
987 offset=dissect_gsm_map_SecureTransportArg(FALSE, tvb, offset, pinfo, tree, -1);
989 case 83: /*provideSubscriberLocation*/
990 offset=dissect_gsm_map_ProvideSubscriberLocation_Arg(FALSE, tvb, offset, pinfo, tree, -1);
992 case 85: /*sendRoutingInfoForLCS*/
993 offset=dissect_gsm_map_RoutingInfoForLCS_Arg(FALSE, tvb, offset, pinfo, tree, -1);
995 case 86: /*subscriberLocationReport*/
996 offset=dissect_gsm_map_SubscriberLocationReport_Arg(FALSE, tvb, offset, pinfo, tree, -1);
998 case 87: /*ist-Alert*/
999 offset=dissect_gsm_map_IST_AlertArg(FALSE, tvb, offset, pinfo, tree, -1);
1001 case 88: /*ist-Command*/
1002 offset=dissect_gsm_map_IST_CommandArg(FALSE, tvb, offset, pinfo, tree, -1);
1004 case 89: /*noteMM-Event*/
1005 offset=dissect_gsm_map_NoteMM_EventArg(FALSE, tvb, offset, pinfo, tree, -1);
1008 proto_tree_add_text(tree, tvb, offset, -1, "Unknown invokeData blob");
1014 static int dissect_returnResultData(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1017 gboolean bug_pc, bug_ind_field;
1023 case 2: /*updateLocation*/
1024 octet = tvb_get_guint8(tvb,offset);
1025 /* As it seems like SEQUENCE OF sometimes is omitted, find out if it's there */
1026 if ( octet == 0x30 ){ /* Class 0 Univerasl, P/C 1 Constructed,Tag 16 Sequence OF */
1027 offset=dissect_gsm_map_UpdateLocationRes(FALSE, tvb, offset, pinfo, tree, -1);
1028 }else{ /* Try decoding with IMPLICIT flag set */
1029 offset=dissect_gsm_map_UpdateLocationRes(TRUE, tvb, offset, pinfo, tree, -1);
1032 case 3: /*cancelLocation*/
1033 offset=dissect_gsm_map_CancelLocationRes(FALSE, tvb, offset, pinfo, tree, -1);
1035 case 4: /*provideRoamingNumber*/
1036 offset=dissect_gsm_map_ProvideRoamingNumberRes(FALSE, tvb, offset, pinfo, tree, -1); /* TRUE florent */
1038 case 6: /*resumeCallHandling*/
1039 offset=dissect_gsm_map_ResumeCallHandlingRes(FALSE, tvb, offset, pinfo, tree, -1);
1041 case 7: /*insertSubscriberData*/
1042 offset=dissect_gsm_map_InsertSubscriberDataRes(FALSE, tvb, offset, pinfo, tree, -1);
1044 case 8: /*deleteSubscriberData*/
1045 offset=dissect_gsm_map_DeleteSubscriberDataRes(FALSE, tvb, offset, pinfo, tree, -1);
1047 /* TODO find out why this isn't in the ASN1 file
1048 case 9: sendParameters
1049 offset=dissect_gsm_map_DeleteSubscriberDataArg(FALSE, tvb, offset, pinfo, tree, -1);
1052 case 10: /*registerSS*/
1053 offset=dissect_gsm_map_SS_Info(FALSE, tvb, offset, pinfo, tree, -1);
1055 case 11: /*eraseSS*/
1056 offset=dissect_gsm_map_SS_Info(FALSE, tvb, offset, pinfo, tree, -1);
1058 case 12: /*activateSS*/
1059 offset=dissect_gsm_map_SS_Info(FALSE, tvb, offset, pinfo, tree, -1);
1061 case 13: /*deactivateSS*/
1062 offset=dissect_gsm_map_SS_Info(FALSE, tvb, offset, pinfo, tree, -1);
1064 case 14: /*interrogateSS*/
1065 offset=dissect_gsm_map_InterrogateSS_Res(FALSE, tvb, offset, pinfo, tree, -1);
1067 case 15: /*authenticationFailureReport*/
1068 offset=dissect_gsm_map_AuthenticationFailureReportRes(FALSE, tvb, offset, pinfo, tree, -1);
1070 case 17: /*registerPassword*/
1071 offset=dissect_gsm_map_NewPassword(FALSE, tvb, offset, pinfo, tree, hf_gsm_map_ss_Code);
1073 case 18: /*getPassword*/
1074 offset=dissect_gsm_map_CurrentPassword(FALSE, tvb, offset, pinfo, tree, hf_gsm_map_currentPassword);
1076 case 20: /*releaseResources*/
1077 offset=dissect_gsm_map_ReleaseResourcesRes(FALSE, tvb, offset, pinfo, tree, -1);
1079 case 22: /*sendRoutingInfo*/
1080 /* This is done to get around a problem with IMPLICIT tag:s */
1081 offset = get_ber_identifier(tvb, offset, &bug_class, &bug_pc, &bug_tag);
1082 offset = get_ber_length(tree, tvb, offset, &bug_len1, &bug_ind_field);
1083 offset=dissect_gsm_map_SendRoutingInfoRes(TRUE, tvb, offset, pinfo, tree, -1);
1085 case 23: /*updateGprsLocation*/
1086 offset=dissect_gsm_map_UpdateGprsLocationRes(FALSE, tvb, offset, pinfo, tree, -1);
1088 case 24: /*sendRoutingInfoForGprs*/
1089 offset=dissect_gsm_map_SendRoutingInfoForGprsRes(FALSE, tvb, offset, pinfo, tree, -1);
1091 case 25: /*failureReport*/
1092 offset=dissect_gsm_map_FailureReportRes(FALSE, tvb, offset, pinfo, tree, -1);
1094 case 26: /*noteMsPresentForGprs*/
1095 offset=dissect_gsm_map_NoteMsPresentForGprsRes(FALSE, tvb, offset, pinfo, tree, -1);
1097 case 29: /*sendEndSignal*/
1098 /* Taken from MAP-MobileServiceOperations{ 0 identified-organization (4) etsi (0) mobileDomain
1099 * (0) gsm-Network (1) modules (3) map-MobileServiceOperations (5) version9 (9) }
1101 offset=dissect_gsm_map_SendEndSignalRes(FALSE, tvb, offset, pinfo, tree, -1);
1103 case 31: /*provideSIWFSNumbe*/
1104 offset=dissect_gsm_map_ProvideSIWFSNumberRes(FALSE, tvb, offset, pinfo, tree, -1);
1106 case 32: /*provideSIWFSNumbe*/
1107 offset=dissect_gsm_map_SIWFSSignallingModifyRes(FALSE, tvb, offset, pinfo, tree, -1);
1109 case 39: /*prepareGroupCall*/
1110 offset=dissect_gsm_map_PrepareGroupCallRes(FALSE, tvb, offset, pinfo, tree, -1);
1112 case 40: /*sendGroupCallEndSignal*/
1113 dissect_gsm_map_SendGroupCallEndSignalRes(FALSE, tvb, offset, pinfo, tree, -1);
1115 case 43: /*checkIMEI*/
1116 if (application_context_version < 3 ){
1117 offset = dissect_gsm_map_EquipmentStatus(FALSE, tvb, offset, pinfo, tree, hf_gsm_map_equipmentStatus);
1119 offset=dissect_gsm_map_CheckIMEIRes(FALSE, tvb, offset, pinfo, tree, -1);
1122 case 44: /*mt-forwardSM*/
1123 offset=dissect_gsm_map_Mt_forwardSM_Res(FALSE, tvb, offset, pinfo, tree, -1);
1125 case 45: /*sendRoutingInfoForSM*/
1126 offset=dissect_gsm_map_RoutingInfoForSM_Res(FALSE, tvb, offset, pinfo, tree, -1);
1128 case 46: /*mo-forwardSM*/
1129 offset=dissect_gsm_map_Mo_forwardSM_Res(FALSE, tvb, offset, pinfo, tree, -1);
1131 case 48: /*reportSM-DeliveryStatus*/
1132 offset=dissect_gsm_map_ReportSM_DeliveryStatusRes(FALSE, tvb, offset, pinfo, tree, -1);
1134 case 50: /*activateTraceMode*/
1135 offset=dissect_gsm_map_ActivateTraceModeRes(FALSE, tvb, offset, pinfo, tree, -1);
1137 case 51: /*deactivateTraceMode*/
1138 offset=dissect_gsm_map_DeactivateTraceModeRes(FALSE, tvb, offset, pinfo, tree, -1);
1140 case 55: /*sendIdentification
1141 * In newer versions IMSI and authenticationSetList is OPTIONAL and two new parameters added
1142 * however if the tag (3) is stripped of it should work with the 'new' def.(?)
1144 octet = tvb_get_guint8(tvb,0) & 0xf;
1145 if ( octet == 3){ /* This is a V3 message ??? */
1146 /* XXX asn2eth can not yet handle tagged assignment yes so this
1147 * XXX is some conformance file magic to work around that bug
1149 offset = get_ber_identifier(tvb, offset, &bug_class, &bug_pc, &bug_tag);
1150 offset = get_ber_length(tree, tvb, offset, &bug_len1, &bug_ind_field);
1152 offset=dissect_gsm_map_SendIdentificationRes(TRUE, tvb, offset, pinfo, tree, -1);
1154 case 56: /*sendAuthenticationInfo*/
1155 octet = tvb_get_guint8(tvb,0) & 0xf;
1156 if ( octet == 3){ /* This is a V3 message ??? */
1157 /* XXX asn2eth can not yet handle tagged assignment yes so this
1158 * XXX is some conformance file magic to work around that bug
1160 offset = get_ber_identifier(tvb, offset, &bug_class, &bug_pc, &bug_tag);
1161 offset = get_ber_length(tree, tvb, offset, &bug_len1, &bug_ind_field);
1163 offset=dissect_gsm_map_SendAuthenticationInfoResV3(TRUE, tvb, offset, pinfo, tree, hf_gsm_map_SendAuthenticationInfoRes);
1165 offset=dissect_gsm_map_SendAuthenticationInfoRes(FALSE, tvb, offset, pinfo, tree, -1);
1168 case 57: /*restoreData*/
1169 offset=dissect_gsm_map_RestoreDataRes(FALSE, tvb, offset, pinfo, tree, -1);
1171 case 58: /*sendIMSI*/
1172 offset=dissect_gsm_map_IMSI(FALSE, tvb, offset, pinfo, tree, hf_gsm_map_imsi);
1174 case 59: /*unstructuredSS-Request*/
1175 offset=dissect_gsm_map_Ussd_Res(FALSE, tvb, offset, pinfo, tree, -1);
1177 case 60: /*unstructuredSS-Request*/
1178 offset=dissect_gsm_map_Ussd_Res(FALSE, tvb, offset, pinfo, tree, -1);
1180 case 61: /*unstructuredSS-Notify*/
1182 proto_tree_add_text(tree, tvb, offset, -1, "Unknown returnResultData blob");
1184 case 62: /*AnyTimeSubscriptionInterrogation*/
1185 offset=dissect_gsm_map_AnyTimeSubscriptionInterrogationRes(FALSE, tvb, offset, pinfo, tree, -1);
1187 case 65: /*AnyTimeModification*/
1188 offset=dissect_gsm_map_AnyTimeModificationRes(FALSE, tvb, offset, pinfo, tree, -1);
1190 case 66: /*readyForSM*/
1191 offset=dissect_gsm_map_ReadyForSM_Res(FALSE, tvb, offset, pinfo, tree, -1);
1193 case 67: /*purgeMS*/
1194 offset=dissect_gsm_map_PurgeMSRes(FALSE, tvb, offset, pinfo, tree, -1);
1196 case 68: /*prepareHandover*/
1197 octet = tvb_get_guint8(tvb,0) & 0xf;
1198 if ( octet == 3){ /* This is a V3 message ??? */
1199 /* XXX asn2eth can not yet handle tagged assignment yes so this
1200 * XXX is some conformance file magic to work around that bug
1202 offset = get_ber_identifier(tvb, offset, &bug_class, &bug_pc, &bug_tag);
1203 offset = get_ber_length(tree, tvb, offset, &bug_len1, &bug_ind_field);
1204 offset=dissect_gsm_map_PrepareHO_ResV3(TRUE, tvb, offset, pinfo, tree, hf_gsm_mapSendEndSignal);
1206 offset=dissect_gsm_map_PrepareHO_Res(FALSE, tvb, offset, pinfo, tree, -1);
1209 case 69: /*prepareSubsequentHandover*/
1210 offset=dissect_gsm_map_Bss_APDU(FALSE, tvb, offset, pinfo, tree, -1);
1212 case 70: /*provideSubscriberInfo*/
1213 offset=dissect_gsm_map_ProvideSubscriberInfoRes(FALSE, tvb, offset, pinfo, tree, -1);
1215 case 71: /*anyTimeInterrogation*/
1216 offset=dissect_gsm_map_AnyTimeInterrogationRes(FALSE, tvb, offset, pinfo, tree, -1);
1218 case 72: /*ss-InvocationNotificatio*/
1219 offset=dissect_gsm_map_Ss_InvocationNotificationRes(FALSE, tvb, offset, pinfo, tree, -1);
1221 case 73: /*setReportingState*/
1222 offset=dissect_gsm_map_SetReportingStateRes(FALSE, tvb, offset, pinfo, tree, -1);
1224 case 74: /*statusReport*/
1225 offset=dissect_gsm_map_StatusReportRes(FALSE, tvb, offset, pinfo, tree, -1);
1227 case 75: /*remoteUserFree*/
1228 offset=dissect_gsm_map_RemoteUserFreeRes(FALSE, tvb, offset, pinfo, tree, -1);
1230 case 76: /*registerCC-Entry*/
1231 offset=dissect_gsm_map_RegisterCC_EntryRes(FALSE, tvb, offset, pinfo, tree, -1);
1233 case 77: /*eraseCC-Entry*/
1234 offset=dissect_gsm_map_EraseCC_EntryRes(FALSE, tvb, offset, pinfo, tree, -1);
1236 case 78: /*secureTransportClass1*/
1237 case 79: /*secureTransportClass2*/
1238 case 80: /*secureTransportClass3*/
1239 case 81: /*secureTransportClass4*/
1240 offset=dissect_gsm_map_SecureTransportRes(FALSE, tvb, offset, pinfo, tree, -1);
1242 case 83: /*provideSubscriberLocation*/
1243 offset=dissect_gsm_map_ProvideSubscriberLocation_Res(FALSE, tvb, offset, pinfo, tree, -1);
1245 case 85: /*sendRoutingInfoForLCS*/
1246 offset=dissect_gsm_map_RoutingInfoForLCS_Arg(FALSE, tvb, offset, pinfo, tree, -1);
1248 case 86: /*subscriberLocationReport*/
1249 offset=dissect_gsm_map_SubscriberLocationReport_Res(FALSE, tvb, offset, pinfo, tree, -1);
1251 case 87: /*ist-Alert*/
1252 offset=dissect_gsm_map_IST_AlertRes(FALSE, tvb, offset, pinfo, tree, -1);
1254 case 88: /*ist-Command*/
1255 offset=dissect_gsm_map_IST_CommandRes(FALSE, tvb, offset, pinfo, tree, -1);
1257 case 89: /*noteMM-Event*/
1258 offset=dissect_gsm_map_NoteMM_EventRes(FALSE, tvb, offset, pinfo, tree, -1);
1261 proto_tree_add_text(tree, tvb, offset, -1, "Unknown returnResultData blob");
1268 static int dissect_returnErrorData(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1271 case 1: /* UnknownSubscriberParam */
1272 offset=dissect_gsm_map_UnknownSubscriberParam(FALSE, tvb, offset, pinfo, tree, -1);
1274 case 4: /* SecureTransportErrorParam */
1275 offset=dissect_gsm_map_SecureTransportErrorParam(FALSE, tvb, offset, pinfo, tree, -1);
1277 case 5: /* UnidentifiedSubParam */
1278 offset=dissect_gsm_map_UnidentifiedSubParam(FALSE, tvb, offset, pinfo, tree, -1);
1280 case 6: /* AbsentSubscriberSM-Param */
1281 offset=dissect_gsm_map_AbsentSubscriberSM_Param(FALSE, tvb, offset, pinfo, tree, -1);
1283 case 8: /* RoamingNotAllowedParam */
1284 offset=dissect_gsm_map_RoamingNotAllowedParam(FALSE, tvb, offset, pinfo, tree, -1);
1286 case 9: /* IllegalSubscriberParam */
1287 offset=dissect_gsm_map_IllegalSubscriberParam(FALSE, tvb, offset, pinfo, tree, -1);
1289 case 10: /* BearerServNotProvParam */
1290 offset=dissect_gsm_map_BearerServNotProvParam(FALSE, tvb, offset, pinfo, tree, -1);
1292 case 11: /* TeleservNotProvParam */
1293 offset=dissect_gsm_map_TeleservNotProvParam(FALSE, tvb, offset, pinfo, tree, -1);
1295 case 12: /* IllegalEquipmentParam */
1296 offset=dissect_gsm_map_IllegalEquipmentParam(FALSE, tvb, offset, pinfo, tree, -1);
1298 case 13: /* CallBarredParam */
1299 offset=dissect_gsm_map_CallBarredParam(FALSE, tvb, offset, pinfo, tree, -1);
1301 case 14: /* ForwardingViolationParam */
1302 offset=dissect_gsm_map_ForwardingViolationParam(FALSE, tvb, offset, pinfo, tree, -1);
1304 case 15: /* CUG-RejectParam */
1305 offset=dissect_gsm_map_CUG_RejectParam(FALSE, tvb, offset, pinfo, tree, -1);
1307 case 16: /* IllegalSS-OperationParam */
1308 offset=dissect_gsm_map_IllegalSS_OperationParam(FALSE, tvb, offset, pinfo, tree, -1);
1310 case 18: /* SS-NotAvailableParam */
1311 offset=dissect_gsm_map_SS_NotAvailableParam(FALSE, tvb, offset, pinfo, tree, -1);
1313 case 19: /* SS-SubscriptionViolationParam */
1314 offset=dissect_gsm_map_SS_SubscriptionViolationParam(FALSE, tvb, offset, pinfo, tree, -1);
1316 case 20: /* SS-IncompatibilityCause */
1317 offset=dissect_gsm_map_SS_IncompatibilityCause(FALSE, tvb, offset, pinfo, tree, -1);
1319 case 21: /* FacilityNotSupParam */
1320 offset=dissect_gsm_map_FacilityNotSupParam(FALSE, tvb, offset, pinfo, tree, -1);
1322 case 27: /* AbsentSubscriberParam */
1323 offset=dissect_gsm_map_AbsentSubscriberParam(FALSE, tvb, offset, pinfo, tree, -1);
1325 case 28: /* IncompatibleTerminalParam */
1326 offset=dissect_gsm_map_IncompatibleTerminalParam(FALSE, tvb, offset, pinfo, tree, -1);
1328 case 29: /* ShortTermDenialParam */
1329 offset=dissect_gsm_map_ShortTermDenialParam(FALSE, tvb, offset, pinfo, tree, -1);
1331 case 30: /* LongTermDenialParam */
1332 offset=dissect_gsm_map_LongTermDenialParam(FALSE, tvb, offset, pinfo, tree, -1);
1334 case 31: /* SubBusyForMT-SMS-Param */
1335 offset=dissect_gsm_map_SubBusyForMT_SMS_Param(FALSE, tvb, offset, pinfo, tree, -1);
1337 case 32: /* SM-DeliveryFailureCause */
1338 offset=dissect_gsm_map_SM_DeliveryFailureCause(FALSE, tvb, offset, pinfo, tree, -1);
1340 case 33: /* MessageWaitListFullParam */
1341 offset=dissect_gsm_map_MessageWaitListFullParam(FALSE, tvb, offset, pinfo, tree, -1);
1343 case 34: /* SystemFailureParam */
1344 offset=dissect_gsm_map_SystemFailureParam(FALSE, tvb, offset, pinfo, tree, -1);
1346 case 35: /* DataMissingParam */
1347 offset=dissect_gsm_map_DataMissingParam(FALSE, tvb, offset, pinfo, tree, -1);
1349 case 36: /* UnexpectedDataParam */
1350 offset=dissect_gsm_map_UnexpectedDataParam(FALSE, tvb, offset, pinfo, tree, -1);
1352 case 37: /* PW-RegistrationFailureCause */
1353 offset=dissect_gsm_map_PW_RegistrationFailureCause(FALSE, tvb, offset, pinfo, tree, -1);
1355 case 39: /* NoRoamingNbParam */
1356 offset=dissect_gsm_map_NoRoamingNbParam(FALSE, tvb, offset, pinfo, tree, -1);
1358 case 40: /* TracingBufferFullParam */
1359 offset=dissect_gsm_map_TracingBufferFullParam(FALSE, tvb, offset, pinfo, tree, -1);
1361 case 42: /* TargetCellOutsideGCA-Param */
1362 offset=dissect_gsm_map_TargetCellOutsideGCA_Param(FALSE, tvb, offset, pinfo, tree, -1);
1364 case 44: /* NumberChangedParam */
1365 offset=dissect_gsm_map_NumberChangedParam(FALSE, tvb, offset, pinfo, tree, -1);
1367 case 45: /* BusySubscriberParam */
1368 offset=dissect_gsm_map_BusySubscriberParam(FALSE, tvb, offset, pinfo, tree, -1);
1370 case 46: /* NoSubscriberReplyParam */
1371 offset=dissect_gsm_map_NoSubscriberReplyParam(FALSE, tvb, offset, pinfo, tree, -1);
1373 case 47: /* ForwardingFailedParam */
1374 offset=dissect_gsm_map_ForwardingFailedParam(FALSE, tvb, offset, pinfo, tree, -1);
1376 case 48: /* OR-NotAllowedParam */
1377 offset=dissect_gsm_map_OR_NotAllowedParam(FALSE, tvb, offset, pinfo, tree, -1);
1379 case 49: /* ATI-NotAllowedParam */
1380 offset=dissect_gsm_map_ATI_NotAllowedParam(FALSE, tvb, offset, pinfo, tree, -1);
1382 case 50: /* NoGroupCallNbParam */
1383 offset=dissect_gsm_map_NoGroupCallNbParam(FALSE, tvb, offset, pinfo, tree, -1);
1385 case 51: /* ResourceLimitationParam */
1386 offset=dissect_gsm_map_ResourceLimitationParam(FALSE, tvb, offset, pinfo, tree, -1);
1388 case 52: /* UnauthorizedRequestingNetwork-Param */
1389 offset=dissect_gsm_map_UnauthorizedRequestingNetwork_Param(FALSE, tvb, offset, pinfo, tree, -1);
1391 case 53: /* UnauthorizedLCSClient-Param */
1392 offset=dissect_gsm_map_UnauthorizedLCSClient_Param(FALSE, tvb, offset, pinfo, tree, -1);
1394 case 54: /* PositionMethodFailure-Param */
1395 offset=dissect_gsm_map_PositionMethodFailure_Param(FALSE, tvb, offset, pinfo, tree, -1);
1397 case 58: /* UnknownOrUnreachableLCSClient-Param */
1398 offset=dissect_gsm_map_UnknownOrUnreachableLCSClient_Param(FALSE, tvb, offset, pinfo, tree, -1);
1400 case 59: /* MM-EventNotSupported-Param */
1401 offset=dissect_gsm_map_MM_EventNotSupported_Param(FALSE, tvb, offset, pinfo, tree, -1);
1403 case 60: /* ATSI-NotAllowedParam */
1404 offset=dissect_gsm_map_ATSI_NotAllowedParam(FALSE, tvb, offset, pinfo, tree, -1);
1406 case 61: /* ATM-NotAllowedParam */
1407 offset=dissect_gsm_map_ATM_NotAllowedParam(FALSE, tvb, offset, pinfo, tree, -1);
1409 case 62: /* InformationNotAvailableParam */
1410 offset=dissect_gsm_map_InformationNotAvailableParam(FALSE, tvb, offset, pinfo, tree, -1);
1413 proto_tree_add_text(tree, tvb, offset, -1, "Unknown returnErrorData blob");
1418 static guint8 gsmmap_pdu_type = 0;
1419 static guint8 gsm_map_pdu_size = 0;
1422 dissect_gsm_map_GSMMAPPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo , proto_tree *tree, int hf_index) {
1427 application_context_version = 0;
1428 if (pinfo->private_data != NULL){
1429 version_ptr = strrchr(pinfo->private_data,'.');
1431 application_context_version = atoi(version_ptr+1);
1435 gsmmap_pdu_type = tvb_get_guint8(tvb, offset)&0x0f;
1436 /* Get the length and add 2 */
1437 gsm_map_pdu_size = tvb_get_guint8(tvb, offset+1)+2;
1439 if (check_col(pinfo->cinfo, COL_INFO)){
1440 col_set_str(pinfo->cinfo, COL_INFO, val_to_str(gsmmap_pdu_type, gsm_map_Component_vals, "Unknown GSM-MAP PDU (%u)"));
1441 col_append_fstr(pinfo->cinfo, COL_INFO, " ");
1443 offset = dissect_gsm_map_Component(FALSE, tvb, 0, pinfo, tree, hf_gsm_map_Component_PDU);
1446 offset = dissect_ber_choice(pinfo, tree, tvb, offset,
1447 GSMMAPPDU_choice, hf_index, ett_gsm_map_GSMMAPPDU, NULL);
1457 dissect_gsm_map(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
1459 proto_item *item=NULL;
1460 proto_tree *tree=NULL;
1461 /* Used for gsm_map TAP */
1462 static gsm_map_tap_rec_t tap_rec;
1466 if (check_col(pinfo->cinfo, COL_PROTOCOL))
1468 col_set_str(pinfo->cinfo, COL_PROTOCOL, "GSM MAP");
1471 top_tree = parent_tree;
1473 /* create display subtree for the protocol */
1475 item = proto_tree_add_item(parent_tree, proto_gsm_map, tvb, 0, -1, FALSE);
1476 tree = proto_item_add_subtree(item, ett_gsm_map);
1479 dissect_gsm_map_GSMMAPPDU(FALSE, tvb, 0, pinfo, tree, -1);
1480 match_strval_idx(opcode, gsm_map_opr_code_strings, &op_idx);
1482 tap_rec.invoke = FALSE;
1483 if ( gsmmap_pdu_type == 1 )
1484 tap_rec.invoke = TRUE;
1485 tap_rec.opr_code_idx = op_idx;
1486 tap_rec.size = gsm_map_pdu_size;
1488 tap_queue_packet(gsm_map_tap, pinfo, &tap_rec);
1491 const value_string ssCode_vals[] = {
1492 { 0x00, "allSS - all SS" },
1493 { 0x10 ,"allLineIdentificationSS - all line identification SS" },
1494 { 0x11 ,"clip - calling line identification presentation" },
1495 { 0x12 ,"clir - calling line identification restriction" },
1496 { 0x13 ,"colp - connected line identification presentation" },
1497 { 0x14 ,"colr - connected line identification restriction" },
1498 { 0x15 ,"mci - malicious call identification" },
1499 { 0x18 ,"allNameIdentificationSS - all name indentification SS" },
1500 { 0x19 ,"cnap - calling name presentation" },
1501 { 0x20 ,"allForwardingSS - all forwarding SS" },
1502 { 0x21 ,"cfu - call forwarding unconditional" },
1503 { 0x28 ,"allCondForwardingSS - all conditional forwarding SS" },
1504 { 0x29 ,"cfb - call forwarding busy" },
1505 { 0x2a ,"cfnry - call forwarding on no reply" },
1506 { 0x2b ,"cfnrc - call forwarding on mobile subscriber not reachable" },
1507 { 0x24 ,"cd - call deflection" },
1508 { 0x30 ,"allCallOfferingSS - all call offering SS includes also all forwarding SS" },
1509 { 0x31 ,"ect - explicit call transfer" },
1510 { 0x32 ,"mah - mobile access hunting" },
1511 { 0x40 ,"allCallCompletionSS - all Call completion SS" },
1512 { 0x41 ,"cw - call waiting" },
1513 { 0x42 ,"hold - call hold" },
1514 { 0x43 ,"ccbs-A - completion of call to busy subscribers, originating side" },
1515 { 0x44 ,"ccbs-B - completion of call to busy subscribers, destination side" },
1516 { 0x45 ,"mc - multicall" },
1517 { 0x50 ,"allMultiPartySS - all multiparty SS" },
1518 { 0x51 ,"multiPTY - multiparty" },
1519 { 0x60 ,"allCommunityOfInterestSS - all community of interest SS" },
1520 { 0x61 ,"cug - closed user group" },
1521 { 0x70 ,"allChargingSS - all charging SS" },
1522 { 0x71 ,"aoci - advice of charge information" },
1523 { 0x72 ,"aocc - advice of charge charging" },
1524 { 0x80 ,"allAdditionalInfoTransferSS - all additional information transfer SS" },
1525 { 0x81 ,"uus1 - UUS1 user-to-user signalling" },
1526 { 0x82 ,"uus2 - UUS2 user-to-user signalling" },
1527 { 0x83 ,"uus3 - UUS3 user-to-user signalling" },
1528 { 0x90 ,"allCallRestrictionSS - all Callrestriction SS" },
1529 { 0x91 ,"barringOfOutgoingCalls" },
1530 { 0x92 ,"baoc - barring of all outgoing calls" },
1531 { 0x93 ,"boic - barring of outgoing international calls" },
1532 { 0x94 ,"boicExHC - barring of outgoing international calls except those directed to the home PLMN" },
1533 { 0x99 ,"barringOfIncomingCalls" },
1534 { 0x9a ,"baic - barring of all incoming calls" },
1535 { 0x9b ,"bicRoam - barring of incoming calls when roaming outside home PLMN Country" },
1536 { 0xf0 ,"allPLMN-specificSS" },
1537 { 0xa0 ,"allCallPrioritySS - all call priority SS" },
1538 { 0xa1 ,"emlpp - enhanced Multilevel Precedence Pre-emption (EMLPP) service" },
1539 { 0xb0 ,"allLCSPrivacyException - all LCS Privacy Exception Classes" },
1540 { 0xb1 ,"universal - allow location by any LCS client" },
1541 { 0xb2 ,"callrelated - allow location by any value added LCS client to which a call is established from the target MS" },
1542 { 0xb3 ,"callunrelated - allow location by designated external value added LCS clients" },
1543 { 0xb4 ,"plmnoperator - allow location by designated PLMN operator LCS clients" },
1544 { 0xc0 ,"allMOLR-SS - all Mobile Originating Location Request Classes" },
1545 { 0xc1 ,"basicSelfLocation - allow an MS to request its own location" },
1546 { 0xc2 ,"autonomousSelfLocation - allow an MS to perform self location without interaction with the PLMN for a predetermined period of time" },
1547 { 0xc3 ,"transferToThirdParty - allow an MS to request transfer of its location to another LCS client" },
1549 { 0xf1 ,"plmn-specificSS-1" },
1550 { 0xf2 ,"plmn-specificSS-2" },
1551 { 0xf3 ,"plmn-specificSS-3" },
1552 { 0xf4 ,"plmn-specificSS-4" },
1553 { 0xf5 ,"plmn-specificSS-5" },
1554 { 0xf6 ,"plmn-specificSS-6" },
1555 { 0xf7 ,"plmn-specificSS-7" },
1556 { 0xf8 ,"plmn-specificSS-8" },
1557 { 0xf9 ,"plmn-specificSS-9" },
1558 { 0xfa ,"plmn-specificSS-a" },
1559 { 0xfb ,"plmn-specificSS-b" },
1560 { 0xfc ,"plmn-specificSS-c" },
1561 { 0xfd ,"plmn-specificSS-d" },
1562 { 0xfe ,"plmn-specificSS-e" },
1563 { 0xff ,"plmn-specificSS-f" },
1567 static const value_string Teleservice_vals[] = {
1568 {0x00, "allTeleservices" },
1569 {0x10, "allSpeechTransmissionServices" },
1570 {0x11, "telephony" },
1571 {0x12, "emergencyCalls" },
1572 {0x20, "allShortMessageServices" },
1573 {0x21, "shortMessageMT-PP" },
1574 {0x22, "shortMessageMO-PP" },
1575 {0x60, "allFacsimileTransmissionServices" },
1576 {0x61, "facsimileGroup3AndAlterSpeech" },
1577 {0x62, "automaticFacsimileGroup3" },
1578 {0x63, "facsimileGroup4" },
1580 {0x70, "allDataTeleservices" },
1581 {0x80, "allTeleservices-ExeptSMS" },
1583 {0x90, "allVoiceGroupCallServices" },
1584 {0x91, "voiceGroupCall" },
1585 {0x92, "voiceBroadcastCall" },
1587 {0xd0, "allPLMN-specificTS" },
1588 {0xd1, "plmn-specificTS-1" },
1589 {0xd2, "plmn-specificTS-2" },
1590 {0xd3, "plmn-specificTS-3" },
1591 {0xd4, "plmn-specificTS-4" },
1592 {0xd5, "plmn-specificTS-5" },
1593 {0xd6, "plmn-specificTS-6" },
1594 {0xd7, "plmn-specificTS-7" },
1595 {0xd8, "plmn-specificTS-8" },
1596 {0xd9, "plmn-specificTS-9" },
1597 {0xda, "plmn-specificTS-A" },
1598 {0xdb, "plmn-specificTS-B" },
1599 {0xdc, "plmn-specificTS-C" },
1600 {0xdd, "plmn-specificTS-D" },
1601 {0xde, "plmn-specificTS-E" },
1602 {0xdf, "plmn-specificTS-F" },
1606 static const value_string Bearerservice_vals[] = {
1607 {0x00, "allBearerServices" },
1608 {0x10, "allDataCDA-Services" },
1609 {0x11, "dataCDA-300bps" },
1610 {0x12, "dataCDA-1200bps" },
1611 {0x13, "dataCDA-1200-75bps" },
1612 {0x14, "dataCDA-2400bps" },
1613 {0x15, "dataCDA-4800bps" },
1614 {0x16, "dataCDA-9600bps" },
1615 {0x17, "general-dataCDA" },
1617 {0x18, "allDataCDS-Services" },
1618 {0x1A, "dataCDS-1200bps" },
1619 {0x1C, "dataCDS-2400bps" },
1620 {0x1D, "dataCDS-4800bps" },
1621 {0x1E, "dataCDS-9600bps" },
1622 {0x1F, "general-dataCDS" },
1624 {0x20, "allPadAccessCA-Services" },
1625 {0x21, "padAccessCA-300bps" },
1626 {0x22, "padAccessCA-1200bps" },
1627 {0x23, "padAccessCA-1200-75bps" },
1628 {0x24, "padAccessCA-2400bps" },
1629 {0x25, "padAccessCA-4800bps" },
1630 {0x26, "padAccessCA-9600bps" },
1631 {0x27, "general-padAccessCA" },
1633 {0x28, "allDataPDS-Services" },
1634 {0x2C, "dataPDS-2400bps" },
1635 {0x2D, "dataPDS-4800bps" },
1636 {0x2E, "dataPDS-9600bps" },
1637 {0x2F, "general-dataPDS" },
1639 {0x30, "allAlternateSpeech-DataCDA" },
1640 {0x38, "allAlternateSpeech-DataCDS" },
1641 {0x40, "allSpeechFollowedByDataCDA" },
1642 {0x48, "allSpeechFollowedByDataCDS" },
1644 {0x50, "allDataCircuitAsynchronous" },
1645 {0x60, "allAsynchronousServices" },
1646 {0x58, "allDataCircuitSynchronous" },
1647 {0x68, "allSynchronousServices" },
1649 {0xD0, "allPLMN-specificBS" },
1650 {0xD1, "plmn-specificBS-1" },
1651 {0xD2, "plmn-specificBS-2" },
1652 {0xD3, "plmn-specificBS-3" },
1653 {0xD4, "plmn-specificBS-4" },
1654 {0xD5, "plmn-specificBS-5" },
1655 {0xD6, "plmn-specificBS-6" },
1656 {0xD7, "plmn-specificBS-7" },
1657 {0xD8, "plmn-specificBS-8" },
1658 {0xD9, "plmn-specificBS-9" },
1659 {0xDA, "plmn-specificBS-A" },
1660 {0xDB, "plmn-specificBS-B" },
1661 {0xDC, "plmn-specificBS-C" },
1662 {0xDD, "plmn-specificBS-D" },
1663 {0xDE, "plmn-specificBS-E" },
1664 {0xDF, "plmn-specificBS-F" },
1669 /* ForwardingOptions
1671 -- bit 8: notification to forwarding party
1672 -- 0 no notification
1675 static const true_false_string notification_value = {
1680 -- bit 7: redirecting presentation
1681 -- 0 no presentation
1684 static const true_false_string redirecting_presentation_value = {
1689 -- bit 6: notification to calling party
1690 -- 0 no notification
1694 -- bit 5: 0 (unused)
1695 -- bits 43: forwarding reason
1696 -- 00 ms not reachable
1699 -- 11 unconditional when used in a SRI Result,
1700 -- or call deflection when used in a RCH Argument
1702 static const value_string forwarding_reason_values[] = {
1703 {0x0, "ms not reachable" },
1706 {0x3, "unconditional when used in a SRI Result or call deflection when used in a RCH Argument" },
1710 -- bits 21: 00 (unused)
1713 static const value_string pdp_type_org_values[] = {
1716 {0xf, "Empty PDP type" },
1720 static const value_string etsi_pdp_type_number_values[] = {
1721 {0x0, "Reserved, used in earlier version of this protocol" },
1726 static const value_string ietf_pdp_type_number_values[] = {
1727 {0x21, "IPv4 Address" },
1728 {0x57, "IPv6 Address" },
1733 ChargingCharacteristics ::= OCTET STRING (SIZE (2))
1734 -- Octets are coded according to 3GPP TS 32.015.
1735 -- From 3GPP TS 32.015.
1737 -- Descriptions for the bits of the flag set:
1739 -- Bit 1: H (Hot billing) := '00000001'B
1740 -- Bit 2: F (Flat rate) := '00000010'B
1741 -- Bit 3: P (Prepaid service) := '00000100'B
1742 -- Bit 4: N (Normal billing) := '00001000'B
1743 -- Bit 5: - (Reserved, set to 0) := '00010000'B
1744 -- Bit 6: - (Reserved, set to 0) := '00100000'B
1745 -- Bit 7: - (Reserved, set to 0) := '01000000'B
1746 -- Bit 8: - (Reserved, set to 0) := '10000000'B
1748 static const value_string chargingcharacteristics_values[] = {
1749 {0x1, "H (Hot billing)" },
1750 {0x2, "F (Flat rate)" },
1751 {0x4, "P (Prepaid service)" },
1752 {0x8, "N (Normal billing)" },
1755 /*--- proto_reg_handoff_gsm_map ---------------------------------------*/
1756 static void range_delete_callback(guint32 ssn)
1759 delete_itu_tcap_subdissector(ssn, map_handle);
1763 static void range_add_callback(guint32 ssn)
1766 add_itu_tcap_subdissector(ssn, map_handle);
1770 void proto_reg_handoff_gsm_map(void) {
1772 static int map_prefs_initialized = FALSE;
1773 data_handle = find_dissector("data");
1775 if (!map_prefs_initialized) {
1776 map_prefs_initialized = TRUE;
1777 map_handle = create_dissector_handle(dissect_gsm_map, proto_gsm_map);
1778 register_ber_oid_dissector_handle("0.4.0.0.1.0.1.3", map_handle, proto_gsm_map, "itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) networkLocUp(1) version3(3)");
1779 register_ber_oid_dissector_handle("0.4.0.0.1.0.1.2", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) networkLocUp(1) version2(2)" );
1780 register_ber_oid_dissector_handle("0.4.0.0.1.0.2.3", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) locationCancel(2) version3(3)" );
1781 register_ber_oid_dissector_handle("0.4.0.0.1.0.2.2", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) locationCancel(2) version2(2)" );
1782 register_ber_oid_dissector_handle("0.4.0.0.1.0.2.1", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) locationCancel(2) version1(1)" );
1783 register_ber_oid_dissector_handle("0.4.0.0.1.0.3.3", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) roamingNbEnquiry(3) version3(3)" );
1784 register_ber_oid_dissector_handle("0.4.0.0.1.0.3.2", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) roamingNbEnquiry(3) version2(2)" );
1785 register_ber_oid_dissector_handle("0.4.0.0.1.0.3.1", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) roamingNbEnquiry(3) version1(1)" );
1786 register_ber_oid_dissector_handle("0.4.0.0.1.0.5.3", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) locInfoRetrieval(5) version3(3)" );
1787 register_ber_oid_dissector_handle("0.4.0.0.1.0.5.2", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) locInfoRetrieval(5) version2(2)" );
1788 register_ber_oid_dissector_handle("0.4.0.0.1.0.5.1", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) locInfoRetrieval(5) version1(1)" );
1789 register_ber_oid_dissector_handle("0.4.0.0.1.0.6.4", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) callControlTransfer(6) version4(4)" );
1790 register_ber_oid_dissector_handle("0.4.0.0.1.0.7.3", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) reporting(7) version3(3)" );
1791 register_ber_oid_dissector_handle("0.4.0.0.1.0.8.3", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) callCompletion(8) version3(3)" );
1792 register_ber_oid_dissector_handle("0.4.0.0.1.0.10.2", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) reset(10) version2(2)" );
1793 register_ber_oid_dissector_handle("0.4.0.0.1.0.10.1", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) reset(10) version1(1)" );
1794 register_ber_oid_dissector_handle("0.4.0.0.1.0.11.3", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) handoverControl(11) version3(3)" );
1795 register_ber_oid_dissector_handle("0.4.0.0.1.0.11.2", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) handoverControl(11) version2(2)" );
1796 register_ber_oid_dissector_handle("0.4.0.0.1.0.11.1", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) handoverControl(11) version1(1)" );
1797 register_ber_oid_dissector_handle("0.4.0.0.1.0.12.3", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) sIWFSAllocation(12) version3(3)" );
1798 register_ber_oid_dissector_handle("0.4.0.0.1.0.13.2", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) equipmentMngt(13) version2(2)" );
1799 register_ber_oid_dissector_handle("0.4.0.0.1.0.13.1", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) equipmentMngt(13) version1(1)" );
1800 register_ber_oid_dissector_handle("0.4.0.0.1.0.14.3", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) infoRetrieval(14) version3(3)" );
1801 register_ber_oid_dissector_handle("0.4.0.0.1.0.14.2", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) infoRetrieval(14) version2(2)" );
1802 register_ber_oid_dissector_handle("0.4.0.0.1.0.14.1", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) infoRetrieval(14) version1(1)" );
1803 register_ber_oid_dissector_handle("0.4.0.0.1.0.15.1", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) interVlrInfoRetrieval(15) version1(1)" );
1804 register_ber_oid_dissector_handle("0.4.0.0.1.0.15.2", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) interVlrInfoRetrieval(15) version2(2)" );
1805 register_ber_oid_dissector_handle("0.4.0.0.1.0.15.3", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) interVlrInfoRetrieval(15) version3(3)" );
1806 register_ber_oid_dissector_handle("0.4.0.0.1.0.16.3", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) subscriberDataMngt(16) version3(3)" );
1807 register_ber_oid_dissector_handle("0.4.0.0.1.0.16.2", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) subscriberDataMngt(16) version2(2)" );
1808 register_ber_oid_dissector_handle("0.4.0.0.1.0.16.1", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) subscriberDataMngt(16) version1(1)" );
1809 register_ber_oid_dissector_handle("0.4.0.0.1.0.17.2", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) tracing(17) version2(2)" );
1810 register_ber_oid_dissector_handle("0.4.0.0.1.0.17.1", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) tracing(17) version1(1)" );
1811 register_ber_oid_dissector_handle("0.4.0.0.1.0.18.2", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) networkFunctionalSs(18) version2(2)" );
1812 register_ber_oid_dissector_handle("0.4.0.0.1.0.18.1", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) networkFunctionalSs(18) version1(1)" );
1813 register_ber_oid_dissector_handle("0.4.0.0.1.0.19.1", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) networkUnstructuredSs(19) version2(2)" );
1814 register_ber_oid_dissector_handle("0.4.0.0.1.0.20.3", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) shortMsgGateway(20) version3(3)" );
1815 register_ber_oid_dissector_handle("0.4.0.0.1.0.20.2", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) shortMsgGateway(20) version2(2)" );
1816 register_ber_oid_dissector_handle("0.4.0.0.1.0.20.1", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) shortMsgGateway(20) version1(1)" );
1817 register_ber_oid_dissector_handle("0.4.0.0.1.0.21.2", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) shortMsgMO-Relay(21) version2(2)" );
1818 register_ber_oid_dissector_handle("0.4.0.0.1.0.21.1", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) --shortMsgRelay--21 version1(1)" );
1819 register_ber_oid_dissector_handle("0.4.0.0.1.0.22.3", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) subscriberDataModificationNotification(22) version3(3)" );
1820 register_ber_oid_dissector_handle("0.4.0.0.1.0.23.2", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) shortMsgAlert(23) version2(2)" );
1821 register_ber_oid_dissector_handle("0.4.0.0.1.0.23.1", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) shortMsgAlert(23) version1(1)" );
1822 register_ber_oid_dissector_handle("0.4.0.0.1.0.24.2", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) mwdMngt(24) version2(2)" );
1823 register_ber_oid_dissector_handle("0.4.0.0.1.0.24.1", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) mwdMngt(24) version1(1)" );
1824 register_ber_oid_dissector_handle("0.4.0.0.1.0.25.3", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) shortMsgMT-Relay(25) version3(3)" );
1825 register_ber_oid_dissector_handle("0.4.0.0.1.0.25.2", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) shortMsgMT-Relay(25) version2(2)" );
1826 register_ber_oid_dissector_handle("0.4.0.0.1.0.26.2", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) imsiRetrieval(26) version2(2)" );
1827 register_ber_oid_dissector_handle("0.4.0.0.1.0.27.2", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) msPurging(27) version2(2)" );
1828 register_ber_oid_dissector_handle("0.4.0.0.1.0.27.3", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) msPurging(27) version3(3)" );
1829 register_ber_oid_dissector_handle("0.4.0.0.1.0.29.3", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) anyTimeInfoEnquiry(29) version3(3)" );
1830 register_ber_oid_dissector_handle("0.4.0.0.1.0.31.2", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) oupCallControl(31) version3(3)" );
1831 register_ber_oid_dissector_handle("0.4.0.0.1.0.32.3", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) gprsLocationUpdate(32) version3(3)" );
1832 register_ber_oid_dissector_handle("0.4.0.0.1.0.33.4", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) rsLocationInfoRetrieval(33) version4(4)" );
1833 register_ber_oid_dissector_handle("0.4.0.0.1.0.34.3", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) failureReport(34) version3(3)" );
1834 register_ber_oid_dissector_handle("0.4.0.0.1.0.36.3", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) ss-InvocationNotification(36) version3(3)" );
1835 register_ber_oid_dissector_handle("0.4.0.0.1.0.37.3", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) locationSvcGateway(37) version3(3)" );
1836 register_ber_oid_dissector_handle("0.4.0.0.1.0.38.3", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) locationSvcEnquiry(38) version3(3)" );
1837 register_ber_oid_dissector_handle("0.4.0.0.1.0.39.3", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) authenticationFailureReport(39) version3(3)" );
1838 register_ber_oid_dissector_handle("0.4.0.0.1.0.40.3", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) secureTransportHandling(40) version3(3)" );
1839 register_ber_oid_dissector_handle("0.4.0.0.1.0.42.3", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) mm-EventReporting(42) version3(3)" );
1840 register_ber_oid_dissector_handle("0.4.0.0.1.0.43.3", map_handle, proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) anyTimeInfoHandling(43) version3(3)" );
1843 range_foreach(ssn_range, range_delete_callback);
1847 ssn_range = range_copy(global_ssn_range);
1849 range_foreach(ssn_range, range_add_callback);
1853 /*--- proto_register_gsm_map -------------------------------------------*/
1854 void proto_register_gsm_map(void) {
1855 module_t *gsm_map_module;
1857 /* List of fields */
1858 static hf_register_info hf[] = {
1860 { &hf_gsm_map_invokeCmd,
1861 { "invokeCmd", "gsm_map.invokeCmd",
1862 FT_UINT32, BASE_DEC, VALS(gsm_map_opr_code_strings), 0,
1863 "InvokePDU/invokeCmd", HFILL }},
1864 { &hf_gsm_map_invokeid,
1865 { "invokeid", "gsm_map.invokeid",
1866 FT_INT32, BASE_DEC, NULL, 0,
1867 "InvokeId/invokeid", HFILL }},
1868 { &hf_gsm_map_absent,
1869 { "absent", "gsm_map.absent",
1870 FT_NONE, BASE_NONE, NULL, 0,
1871 "InvokeId/absent", HFILL }},
1872 { &hf_gsm_map_invokeId,
1873 { "invokeId", "gsm_map.invokeId",
1874 FT_UINT32, BASE_DEC, VALS(InvokeId_vals), 0,
1875 "InvokePDU/invokeId", HFILL }},
1876 { &hf_gsm_map_invoke,
1877 { "invoke", "gsm_map.invoke",
1878 FT_NONE, BASE_NONE, NULL, 0,
1879 "GSMMAPPDU/invoke", HFILL }},
1880 { &hf_gsm_map_returnResult,
1881 { "returnResult", "gsm_map.returnResult",
1882 FT_NONE, BASE_NONE, NULL, 0,
1883 "GSMMAPPDU/returnResult", HFILL }},
1884 {&hf_gsm_map_returnResult_result,
1885 { "returnResult_result", "gsm_map.returnresultresult",
1886 FT_BYTES, BASE_NONE, NULL, 0,
1887 "returnResult_result", HFILL }},
1888 {&hf_gsm_map_returnError_result,
1889 { "returnError_result", "gsm_map.returnerrorresult",
1890 FT_UINT32, BASE_DEC, NULL, 0,
1891 "returnError_result", HFILL }},
1892 {&hf_gsm_map_returnError,
1893 { "returnError", "gsm_map.returnError",
1894 FT_NONE, BASE_NONE, NULL, 0,
1895 "GSMMAPPDU/returnError", HFILL }},
1896 {&hf_gsm_map_local_errorCode,
1897 { "Local Error Code", "gsm_map.localerrorCode",
1898 FT_UINT32, BASE_DEC, VALS(gsm_map_err_code_string_vals), 0,
1899 "localerrorCode", HFILL }},
1900 {&hf_gsm_map_global_errorCode_oid,
1901 { "Global Error Code OID", "gsm_map.hlobalerrorCodeoid",
1902 FT_STRING, BASE_NONE, NULL, 0,
1903 "globalerrorCodeoid", HFILL }},
1904 {&hf_gsm_map_global_errorCode,
1905 { "Global Error Code", "gsm_map.globalerrorCode",
1906 FT_UINT32, BASE_DEC, NULL, 0,
1907 "globalerrorCode", HFILL }},
1908 { &hf_gsm_map_getPassword,
1909 { "Password", "gsm_map.password",
1910 FT_UINT8, BASE_DEC, VALS(gsm_map_GetPasswordArg_vals), 0,
1911 "Password", HFILL }},
1914 { &hf_gsm_map_SendAuthenticationInfoArg,
1915 { "SendAuthenticationInfoArg", "gsm_map.SendAuthenticationInfoArg",
1916 FT_BYTES, BASE_NONE, NULL, 0,
1917 "SendAuthenticationInfoArg", HFILL }},
1918 { &hf_gsm_map_SendAuthenticationInfoRes,
1919 { "SendAuthenticationInfoRes", "gsm_map.SendAuthenticationInfoRes",
1920 FT_BYTES, BASE_NONE, NULL, 0,
1921 "SendAuthenticationInfoRes", HFILL }},
1922 { &hf_gsm_map_currentPassword,
1923 { "currentPassword", "gsm_map.currentPassword",
1924 FT_STRING, BASE_NONE, NULL, 0,
1926 { &hf_gsm_mapSendEndSignal,
1927 { "mapSendEndSignalArg", "gsm_map.mapsendendsignalarg",
1928 FT_BYTES, BASE_NONE, NULL, 0,
1929 "mapSendEndSignalArg", HFILL }},
1930 { &hf_gsm_map_CheckIMEIArg,
1931 { "gsm_CheckIMEIArg", "gsm_map.CheckIMEIArg",
1932 FT_BYTES, BASE_NONE, NULL, 0,
1933 "gsm_CheckIMEIArg", HFILL }},
1934 { &hf_gsm_map_extension,
1935 { "Extension", "gsm_map.extension",
1936 FT_BOOLEAN, 8, TFS(&gsm_map_extension_value), 0x80,
1937 "Extension", HFILL }},
1938 { &hf_gsm_map_nature_of_number,
1939 { "Nature of number", "gsm_map.nature_of_number",
1940 FT_UINT8, BASE_HEX, VALS(gsm_map_nature_of_number_values), 0x70,
1941 "Nature of number", HFILL }},
1942 { &hf_gsm_map_number_plan,
1943 { "Number plan", "gsm_map.number_plan",
1944 FT_UINT8, BASE_HEX, VALS(gsm_map_number_plan_values), 0x0f,
1945 "Number plan", HFILL }},
1946 { &hf_gsm_map_isdn_address_digits,
1947 { "ISDN Address digits", "gsm_map.isdn.address.digits",
1948 FT_STRING, BASE_NONE, NULL, 0,
1949 "ISDN Address digits", HFILL }},
1950 { &hf_gsm_map_address_digits,
1951 { "Address digits", "gsm_map.address.digits",
1952 FT_STRING, BASE_NONE, NULL, 0,
1953 "Address digits", HFILL }},
1954 { &hf_gsm_map_servicecentreaddress_digits,
1955 { "ServiceCentreAddress digits", "gsm_map.servicecentreaddress_digits",
1956 FT_STRING, BASE_NONE, NULL, 0,
1957 "ServiceCentreAddress digits", HFILL }},
1958 { &hf_gsm_map_imsi_digits,
1959 { "Imsi digits", "gsm_map.imsi_digits",
1960 FT_STRING, BASE_NONE, NULL, 0,
1961 "Imsi digits", HFILL }},
1962 { &hf_gsm_map_Ss_Status_unused,
1963 { "Unused", "gsm_map.unused",
1964 FT_UINT8, BASE_HEX, NULL, 0xf0,
1966 { &hf_gsm_map_Ss_Status_q_bit,
1967 { "Q bit", "gsm_map.ss_status_q_bit",
1968 FT_BOOLEAN, 8, TFS(&gsm_map_Ss_Status_q_bit_values), 0x08,
1970 { &hf_gsm_map_Ss_Status_p_bit,
1971 { "P bit", "gsm_map.ss_status_p_bit",
1972 FT_BOOLEAN, 8, TFS(&gsm_map_Ss_Status_p_values), 0x04,
1974 { &hf_gsm_map_Ss_Status_r_bit,
1975 { "R bit", "gsm_map.ss_status_r_bit",
1976 FT_BOOLEAN, 8, TFS(&gsm_map_Ss_Status_r_values), 0x02,
1978 { &hf_gsm_map_Ss_Status_a_bit,
1979 { "A bit", "gsm_map.ss_status_a_bit",
1980 FT_BOOLEAN, 8, TFS(&gsm_map_Ss_Status_a_values), 0x01,
1982 { &hf_gsm_map_notification_to_forwarding_party,
1983 { "Notification to forwarding party", "gsm_map.notification_to_forwarding_party",
1984 FT_BOOLEAN, 8, TFS(¬ification_value), 0x80,
1985 "Notification to forwarding party", HFILL }},
1986 { &hf_gsm_map_redirecting_presentation,
1987 { "Redirecting presentation", "gsm_map.redirecting_presentation",
1988 FT_BOOLEAN, 8, TFS(&redirecting_presentation_value), 0x40,
1989 "Redirecting presentation", HFILL }},
1990 { &hf_gsm_map_notification_to_calling_party,
1991 { "Notification to calling party", "gsm_map.notification_to_clling_party",
1992 FT_BOOLEAN, 8, TFS(¬ification_value), 0x20,
1993 "Notification to calling party", HFILL }},
1994 { &hf_gsm_map_forwarding_reason,
1995 { "Forwarding reason", "gsm_map.forwarding_reason",
1996 FT_UINT8, BASE_HEX, VALS(forwarding_reason_values), 0x0c,
1997 "forwarding reason", HFILL }},
1998 { &hf_gsm_map_pdp_type_org,
1999 { "PDP Type Organization", "gsm_map.pdp_type_org",
2000 FT_UINT8, BASE_HEX, VALS(pdp_type_org_values), 0x0f,
2001 "PDP Type Organization", HFILL }},
2002 { &hf_gsm_map_etsi_pdp_type_number,
2003 { "PDP Type Number", "gsm_map.pdp_type_org",
2004 FT_UINT8, BASE_HEX, VALS(etsi_pdp_type_number_values), 0,
2005 "ETSI PDP Type Number", HFILL }},
2006 { &hf_gsm_map_ietf_pdp_type_number,
2007 { "PDP Type Number", "gsm_map.ietf_pdp_type_number",
2008 FT_UINT8, BASE_HEX, VALS(ietf_pdp_type_number_values), 0,
2009 "IETF PDP Type Number", HFILL }},
2010 { &hf_gsm_map_ext_qos_subscribed_pri,
2011 { "Allocation/Retention priority", "gsm_map.ext_qos_subscribed_pri",
2012 FT_UINT8, BASE_DEC, NULL, 0xff,
2013 "Allocation/Retention priority", HFILL }},
2014 { &hf_gsm_map_qos_traffic_cls,
2015 { "Traffic class", "gsm_map.qos.traffic_cls",
2016 FT_UINT8, BASE_DEC, VALS(gsm_a_qos_traffic_cls_vals), 0xe0,
2017 "Traffic class", HFILL }},
2018 { &hf_gsm_map_qos_del_order,
2019 { "Delivery order", "gsm_map.qos.del_order",
2020 FT_UINT8, BASE_DEC, VALS(gsm_a_qos_traffic_cls_vals), 0x18,
2021 "Delivery order", HFILL }},
2022 { &hf_gsm_map_qos_del_of_err_sdu,
2023 { "Delivery of erroneous SDUs", "gsm_map.qos.del_of_err_sdu",
2024 FT_UINT8, BASE_DEC, VALS(gsm_a_qos_del_of_err_sdu_vals), 0x03,
2025 "Delivery of erroneous SDUs", HFILL }},
2026 { &hf_gsm_map_qos_ber,
2027 { "Residual Bit Error Rate (BER)", "gsm_map.qos.ber",
2028 FT_UINT8, BASE_DEC, VALS(gsm_a_qos_ber_vals), 0xf0,
2029 "Residual Bit Error Rate (BER)", HFILL }},
2030 { &hf_gsm_map_qos_sdu_err_rat,
2031 { "SDU error ratio", "gsm_map.qos.sdu_err_rat",
2032 FT_UINT8, BASE_DEC, VALS(gsm_a_qos_sdu_err_rat_vals), 0x0f,
2033 "SDU error ratio", HFILL }},
2034 { &hf_gsm_map_qos_traff_hdl_pri,
2035 { "Traffic handling priority", "gsm_map.qos.traff_hdl_pri",
2036 FT_UINT8, BASE_DEC, VALS(gsm_a_qos_traff_hdl_pri_vals), 0x03,
2037 "Traffic handling priority", HFILL }},
2039 { &hf_gsm_map_qos_max_sdu,
2040 { "Maximum SDU size", "gsm_map.qos.max_sdu",
2041 FT_UINT32, BASE_DEC, NULL, 0x0,
2042 "Maximum SDU size", HFILL }},
2043 { &hf_gsm_map_max_brate_ulink,
2044 { "Maximum bit rate for uplink in kbit/s", "gsm_map.qos.max_brate_ulink",
2045 FT_UINT32, BASE_DEC, NULL, 0x0,
2046 "Maximum bit rate for uplink", HFILL }},
2047 { &hf_gsm_map_max_brate_dlink,
2048 { "Maximum bit rate for downlink in kbit/s", "gsm_map.qos.max_brate_dlink",
2049 FT_UINT32, BASE_DEC, NULL, 0x0,
2050 "Maximum bit rate for downlink", HFILL }},
2051 { &hf_gsm_map_qos_transfer_delay,
2052 { "Transfer delay (Raw data see TS 24.008 for interpretation)", "gsm_map.qos.transfer_delay",
2053 FT_UINT8, BASE_DEC, NULL, 0xfc,
2054 "Transfer delay", HFILL }},
2055 { &hf_gsm_map_guaranteed_max_brate_ulink,
2056 { "Guaranteed bit rate for uplink in kbit/s", "gsm_map.qos.brate_ulink",
2057 FT_UINT32, BASE_DEC, NULL, 0x0,
2058 "Guaranteed bit rate for uplink", HFILL }},
2059 { &hf_gsm_map_guaranteed_max_brate_dlink,
2060 { "Guaranteed bit rate for downlink in kbit/s", "gsm_map.qos.brate_dlink",
2061 FT_UINT32, BASE_DEC, NULL, 0x0,
2062 "Guaranteed bit rate for downlink", HFILL }},
2063 { &hf_gsm_map_GSNAddress_IPv4,
2064 { "GSN-Address IPv4", "gsm_map.gsnaddress_ipv4",
2065 FT_IPv4, BASE_NONE, NULL, 0,
2066 "IPAddress IPv4", HFILL }},
2067 { &hf_gsm_map_GSNAddress_IPv6,
2068 { "GSN Address IPv6", "gsm_map.gsnaddress_ipv6",
2069 FT_IPv4, BASE_NONE, NULL, 0,
2070 "IPAddress IPv6", HFILL }},
2071 { &hf_geo_loc_type_of_shape,
2072 { "Location estimate","gad.location_estimate",
2073 FT_UINT8,BASE_DEC, VALS(type_of_shape_vals), 0xf0,
2074 "Location estimate", HFILL }
2076 { &hf_geo_loc_sign_of_lat,
2077 { "Sign of latitude","gad.sign_of_latitude",
2078 FT_UINT8,BASE_DEC, VALS(sign_of_latitude_vals), 0x80,
2079 "Sign of latitude", HFILL }
2081 { &hf_geo_loc_deg_of_lat,
2082 { "Degrees of latitude","gad.sign_of_latitude",
2083 FT_UINT32,BASE_DEC, NULL, 0x3fffff,
2084 "Degrees of latitude", HFILL }
2086 { &hf_geo_loc_deg_of_long,
2087 { "Degrees of longitude","gad.sign_of_longitude",
2088 FT_UINT32,BASE_DEC, NULL, 0xffffff,
2089 "Degrees of longitude", HFILL }
2091 { &hf_geo_loc_uncertainty_code,
2092 { "Uncertainty code","gad.uncertainty_code",
2093 FT_UINT8,BASE_DEC, NULL, 0x7f,
2094 "Uncertainty code", HFILL }
2096 { &hf_geo_loc_uncertainty_semi_major,
2097 { "Uncertainty semi-major","gad.uncertainty_semi_major",
2098 FT_UINT8,BASE_DEC, NULL, 0x7f,
2099 "Uncertainty semi-majore", HFILL }
2101 { &hf_geo_loc_uncertainty_semi_minor,
2102 { "Uncertainty semi-minor","gad.uncertainty_semi_minor",
2103 FT_UINT8,BASE_DEC, NULL, 0x7f,
2104 "Uncertainty semi-minor", HFILL }
2106 { &hf_geo_loc_orientation_of_major_axis,
2107 { "Orientation of major axis","gad.orientation_of_major_axis",
2108 FT_UINT8,BASE_DEC, NULL, 0x0,
2109 "Orientation of major axis", HFILL }
2111 { &hf_geo_loc_confidence,
2112 { "Confidence","gad.confidence",
2113 FT_UINT8,BASE_DEC, NULL, 0x7f,
2114 "Confidence", HFILL }
2116 { &hf_geo_loc_no_of_points,
2117 { "Number of points","gad.no_of_points",
2118 FT_UINT8,BASE_DEC, NULL, 0x0f,
2119 "Number of points", HFILL }
2122 { "D: Direction of Altitude","gad.D",
2123 FT_UINT8,BASE_DEC, VALS(dir_of_alt_vals), 0x8000,
2124 "D: Direction of Altitude", HFILL }
2126 { &hf_geo_loc_altitude,
2127 { "Altitude","gad.altitude",
2128 FT_UINT16,BASE_DEC, NULL, 0x7fff,
2131 { &hf_geo_loc_inner_radius,
2132 { "Inner radius","gad.altitude",
2133 FT_UINT16,BASE_DEC, NULL, 0x0,
2134 "Inner radius", HFILL }
2136 { &hf_geo_loc_uncertainty_radius,
2137 { "Uncertainty radius","gad.no_of_points",
2138 FT_UINT8,BASE_DEC, NULL, 0x7f,
2139 "Uncertainty radius", HFILL }
2141 { &hf_geo_loc_offset_angle,
2142 { "Offset angle","gad.offset_angle",
2143 FT_UINT8,BASE_DEC, NULL, 0x0,
2144 "Offset angle", HFILL }
2146 { &hf_geo_loc_included_angle,
2147 { "Included angle","gad.included_angle",
2148 FT_UINT8,BASE_DEC, NULL, 0x0,
2149 "Included angle", HFILL }
2152 #include "packet-gsm_map-hfarr.c"
2155 /* List of subtrees */
2156 static gint *ett[] = {
2158 &ett_gsm_map_InvokeId,
2159 &ett_gsm_map_InvokePDU,
2160 &ett_gsm_map_ReturnResultPDU,
2161 &ett_gsm_map_ReturnErrorPDU,
2162 &ett_gsm_map_ReturnResult_result,
2163 &ett_gsm_map_ReturnError_result,
2164 &ett_gsm_map_GSMMAPPDU,
2165 &ett_gsm_map_ext_qos_subscribed,
2166 &ett_gsm_map_pdptypenumber,
2167 &ett_gsm_map_RAIdentity,
2168 &ett_gsm_map_LAIFixedLength,
2169 &ett_gsm_map_isdn_address_string,
2171 #include "packet-gsm_map-ettarr.c"
2174 /* Register protocol */
2175 proto_gsm_map = proto_register_protocol(PNAME, PSNAME, PFNAME);
2176 /*XXX register_dissector("gsm_map", dissect_gsm_map, proto_gsm_map);*/
2177 /* Register fields and subtrees */
2178 proto_register_field_array(proto_gsm_map, hf, array_length(hf));
2179 proto_register_subtree_array(ett, array_length(ett));
2181 sms_dissector_table = register_dissector_table("gsm_map.sms_tpdu",
2182 "GSM SMS TPDU", FT_UINT8,
2185 gsm_map_tap = register_tap("gsm_map");
2187 /* #include "packet-gsm_map-dis-tab.c" */
2188 register_ber_oid_name("1.2.826.0.1249.58.1.0","iso(1) member-body(2) bsi(826) disc(0) ericsson(1249) gsmNetworkApplicationsDefinition(58) gsm-Map(1) gsm-Map-Ext(0)" );
2189 register_ber_oid_name("1.3.12.2.1107.3.66.1.2","accessTypeNotAllowed-id" );
2190 /*register_ber_oid_name("0.4.0.0.1.0.1.3","itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) map-ac(0) networkLocUp(1) version3(3)" );
2192 * Register our configuration options, particularly our ssn:s
2195 range_convert_str(&global_ssn_range, "6-9", MAX_SSN);
2196 ssn_range = range_empty();
2199 gsm_map_module = prefs_register_protocol(proto_gsm_map, proto_reg_handoff_gsm_map);
2201 prefs_register_range_preference(gsm_map_module, "tcap.ssn", "TCAP SSNs",
2202 "TCAP Subsystem numbers used for GSM MAP",
2203 &global_ssn_range, MAX_SSN);