1 /* packet-gsm_a_common.c
2 * Common routines for GSM A Interface dissection
4 * Copyright 2003, Michael Lum <mlum [AT] telostech.com>
5 * In association with Telos Technology Inc.
7 * Split from packet-gsm_a.c by Neil Piercy <Neil [AT] littlebriars.co.uk>
9 * Wireshark - Network traffic analyzer
10 * By Gerald Combs <gerald@wireshark.org>
11 * Copyright 1998 Gerald Combs
13 * SPDX-License-Identifier: GPL-2.0-or-later
20 #include <epan/packet.h>
21 #include <epan/expert.h>
23 #include <epan/stat_tap_ui.h>
25 #include <epan/unit_strings.h>
27 #include <wsutil/str_util.h>
28 #include <wsutil/array.h>
29 #include "packet-gsm_a_common.h"
30 #include "packet-bssap.h"
31 #include "packet-gmr1_common.h"
32 #include "packet-e212.h"
34 void proto_register_gsm_a_common(void);
36 static const value_string gsm_common_elem_strings
[] = {
37 /* Common Information Elements 10.5.1 */
38 { DE_CELL_ID
, "Cell Identity" },
39 { DE_CIPH_KEY_SEQ_NUM
, "Ciphering Key Sequence Number" },
40 { DE_LAI
, "Location Area Identification (LAI)" },
41 { DE_MID
, "Mobile Identity" },
42 { DE_MS_CM_1
, "Mobile Station Classmark 1" },
43 { DE_MS_CM_2
, "Mobile Station Classmark 2" },
44 { DE_MS_CM_3
, "Mobile Station Classmark 3" },
45 { DE_SPARE_NIBBLE
, "Spare Half Octet" },
46 { DE_D_GB_CALL_REF
, "Descriptive group or broadcast call reference" },
47 { DE_G_CIPH_KEY_NUM
, "Group Cipher Key Number" },
48 { DE_PD_SAPI
, "PD and SAPI $(CCBS)$" },
49 { DE_PRIO
, "Priority Level" },
50 { DE_CN_COMMON_GSM_MAP_NAS_SYS_INFO
, "CN Common GSM-MAP NAS system information" },
51 { DE_CS_DOMAIN_SPEC_SYS_INFO
, "CS domain specific system information" },
52 { DE_PS_DOMAIN_SPEC_SYS_INFO
, "PS domain specific system information" },
53 { DE_PLMN_LIST
, "PLMN List" },
54 { DE_NAS_CONT_FOR_PS_HO
, "NAS container for PS HO" },
55 { DE_MS_NET_FEAT_SUP
, "MS network feature support" },
58 value_string_ext gsm_common_elem_strings_ext
= VALUE_STRING_EXT_INIT(gsm_common_elem_strings
);
60 static const value_string gsm_a_skip_ind_vals
[] = {
61 { 0, "No indication of selected PLMN"},
62 { 1, "PLMN identity of the Common PLMN in the broadcast system information"},
63 { 2, "PLMN identity of the first Additional PLMN in the broadcast system information"},
64 { 3, "PLMN identity of the second Additional PLMN in the broadcast system information"},
65 { 4, "PLMN identity of the third Additional PLMN in the broadcast system information"},
66 { 5, "PLMN identity of the fourth Additional PLMN in the broadcast system information"},
72 static const true_false_string gsm_a_extension_value
= {
78 /* Mobile Station Classmark Value strings
81 /* Mobile Station Classmark
84 static const value_string gsm_a_msc_rev_vals
[] = {
85 { 0, "Reserved for GSM phase 1"},
86 { 1, "Used by GSM phase 2 mobile stations"},
87 { 2, "Used by mobile stations supporting R99 or later versions of the protocol"},
88 { 3, "Reserved for future use"},
92 /* ES IND (octet 3, bit 5) "Controlled Early Classmark Sending" option implementation */
93 static const true_false_string ES_IND_vals
= {
94 "Controlled Early Classmark Sending option is implemented in the MS",
95 "Controlled Early Classmark Sending option is not implemented in the MS"
97 /* A5/1 algorithm supported (octet 3, bit 4) */
98 static const true_false_string A5_1_algorithm_sup_vals
= {
99 "encryption algorithm A5/1 not available",
100 "encryption algorithm A5/1 available"
102 /* RF Power Capability (Octet 3) */
103 static const value_string RF_power_capability_vals
[] = {
109 { 7, "RF Power capability is irrelevant in this information element"},
112 /* PS capability (pseudo-synchronization capability) (octet 4) */
113 static const true_false_string ps_sup_cap_vals
= {
114 "PS capability present",
115 "PS capability not present"
117 /* SS Screening Indicator (octet 4)defined in 3GPP TS 24.080 */
118 static const value_string SS_screening_indicator_vals
[] = {
119 { 0, "Default value of phase 1"},
120 { 1, "Capability of handling of ellipsis notation and phase 2 error handling "},
121 { 2, "For future use"},
122 { 3, "For future use"},
125 /* SM capability (MT SMS pt to pt capability) (octet 4)*/
126 static const true_false_string SM_capability_vals
= {
127 "Mobile station supports mobile terminated point to point SMS",
128 "Mobile station does not support mobile terminated point to point SMS"
130 /* VBS notification reception (octet 4) */
131 static const true_false_string VBS_notification_rec_vals
= {
132 "VBS capability and notifications wanted",
133 "no VBS capability or no notifications wanted"
135 /* VGCS notification reception (octet 4) */
136 static const true_false_string VGCS_notification_rec_vals
= {
137 "VGCS capability and notifications wanted",
138 "no VGCS capability or no notifications wanted"
140 /* FC Frequency Capability (octet 4 ) */
141 static const true_false_string FC_frequency_cap_vals
= {
142 "The MS does support the E-GSM or R-GSM",
143 "The MS does not support the E-GSM or R-GSM band"
145 /* CM3 (octet 5, bit 8) */
146 static const true_false_string CM3_vals
= {
147 "The MS supports options that are indicated in classmark 3 IE",
148 "The MS does not support any options that are indicated in CM3"
150 /* LCS VA capability (LCS value added location request notification capability) (octet 5,bit 6) */
151 static const true_false_string LCS_VA_cap_vals
= {
152 "LCS value added location request notification capability supported",
153 "LCS value added location request notification capability not supported"
155 /* UCS2 treatment (octet 5, bit 5) */
156 static const true_false_string UCS2_treatment_vals
= {
157 "the ME has no preference between the use of the default alphabet and the use of UCS2",
158 "the ME has a preference for the default alphabet"
160 /* SoLSA (octet 5, bit 4) */
161 static const true_false_string SoLSA_vals
= {
162 "The ME supports SoLSA",
163 "The ME does not support SoLSA"
165 /* CMSP: CM Service Prompt (octet 5, bit 3) */
166 static const true_false_string CMSP_vals
= {
167 "Network initiated MO CM connection request supported for at least one CM protocol",
168 "Network initiated MO CM connection request not supported"
170 /* A5/7 algorithm supported */
171 static const true_false_string A5_7_algorithm_sup_vals
= {
172 "encryption algorithm A5/7 available",
173 "encryption algorithm A5/7 not available"
175 /* A5/6 algorithm supported */
176 static const true_false_string A5_6_algorithm_sup_vals
= {
177 "encryption algorithm A5/6 available",
178 "encryption algorithm A5/6 not available"
180 /* A5/5 algorithm supported */
181 static const true_false_string A5_5_algorithm_sup_vals
= {
182 "encryption algorithm A5/5 available",
183 "encryption algorithm A5/5 not available"
185 /* A5/4 algorithm supported */
186 static const true_false_string A5_4_algorithm_sup_vals
= {
187 "encryption algorithm A5/4 available",
188 "encryption algorithm A5/4 not available"
190 /* A5/3 algorithm supported (octet 5, bit 2) */
191 static const true_false_string A5_3_algorithm_sup_vals
= {
192 "encryption algorithm A5/3 available",
193 "encryption algorithm A5/3 not available"
195 /* A5/2 algorithm supported (octet 5, bit 1) */
196 static const true_false_string A5_2_algorithm_sup_vals
= {
197 "encryption algorithm A5/2 available",
198 "encryption algorithm A5/2 not available"
201 static const value_string mobile_identity_type_vals
[] = {
206 { 4, "TMSI/P-TMSI/M-TMSI"},
207 { 5, "TMGI and optional MBMS Session Identity"}, /* ETSI TS 124 008 V6.8.0 (2005-03) p326 */
211 static const true_false_string oddevenind_vals
= {
212 "Odd number of identity digits",
213 "Even number of identity digits"
217 const value_string gsm_a_sms_vals
[] = {
218 { 0, "1/4 timeslot (~144 microseconds)" },
219 { 1, "2/4 timeslot (~288 microseconds)" },
220 { 2, "3/4 timeslot (~433 microseconds)" },
221 { 3, "4/4 timeslot (~577 microseconds)" },
222 { 4, "5/4 timeslot (~721 microseconds)" },
223 { 5, "6/4 timeslot (~865 microseconds)" },
224 { 6, "7/4 timeslot (~1009 microseconds)" },
225 { 7, "8/4 timeslot (~1154 microseconds)" },
226 { 8, "9/4 timeslot (~1298 microseconds)" },
227 { 9, "10/4 timeslot (~1442 microseconds)" },
228 { 10, "11/4 timeslot (~1586 microseconds)" },
229 { 11, "12/4 timeslot (~1730 microseconds)" },
230 { 12, "13/4 timeslot (~1874 microseconds)" },
231 { 13, "14/4 timeslot (~2019 microseconds)" },
232 { 14, "15/4 timeslot (~2163 microseconds)" },
233 { 15, "16/4 timeslot (~2307 microseconds)" },
237 static const true_false_string ms_assisted_e_otd_vals
= {
238 "MS assisted E-OTD supported",
239 "MS assisted E-OTD not supported"
242 static const true_false_string ms_based_e_otd_vals
= {
243 "MS based E-OTD supported",
244 "MS based E-OTD not supported"
247 static const true_false_string ms_assisted_gps_vals
= {
248 "MS assisted GPS supported",
249 "MS assisted GPS not supported"
252 static const true_false_string ms_based_gps_vals
= {
253 "MS based GPS supported",
254 "MS based GPS not supported"
257 static const true_false_string ms_conventional_gps_vals
= {
258 "Conventional GPS supported",
259 "Conventional GPS not supported"
262 static const true_false_string modulation_capability_vals
= {
263 "8-PSK supported for uplink transmission and downlink reception",
264 "8-PSK supported for downlink reception only"
267 static const value_string eight_psk_rf_power_capability_vals
[] = {
269 { 1, "Power class E1" },
270 { 2, "Power class E2" },
271 { 3, "Power class E3" },
275 static const value_string gsm_400_bands_supported_vals
[] = {
276 { 1, "GSM 480 supported, GSM 450 not supported" },
277 { 2, "GSM 450 supported, GSM 480 not supported" },
278 { 3, "GSM 450 supported, GSM 480 supported" },
282 static const true_false_string umts_fdd_rat_cap_vals
= {
283 "UMTS FDD supported",
284 "UMTS FDD not supported"
287 static const true_false_string umts_384_mcps_tdd_rat_cap_vals
= {
288 "UMTS 3.84 Mcps TDD supported",
289 "UMTS 3.84 Mcps TDD not supported"
292 static const true_false_string cdma_2000_rat_cap_vals
= {
293 "CDMA 2000 supported",
294 "CDMA 2000 not supported"
297 static const value_string dtm_gprs_multi_slot_class_vals
[] = {
298 { 0, "Unused. If received, the network shall interpret this as 1" },
299 { 1, "Multislot class 5 supported" },
300 { 2, "Multislot class 9 supported" },
301 { 3, "Multislot class 11 supported" },
305 static const true_false_string single_slot_dtm_vals
= {
306 "Single Slot DTM supported",
307 "Single Slot DTM not supported"
310 static const value_string gsm_band_vals
[] = {
311 { 0, "E-GSM is supported" },
312 { 1, "P-GSM is supported" },
313 { 2, "GSM 1800 is supported" },
314 { 3, "GSM 450 is supported" },
315 { 4, "GSM 480 is supported" },
316 { 5, "GSM 850 is supported" },
317 { 6, "GSM 1900 is supported" },
318 { 7, "GSM 750 is supported" },
319 { 8, "GSM 710 is supported" },
320 { 9, "T-GSM 810 is supported" },
324 static const true_false_string umts_128_mcps_tdd_rat_cap_vals
= {
325 "UMTS 1.28 Mcps TDD supported",
326 "UMTS 1.28 Mcps TDD not supported"
329 static const true_false_string geran_feature_package_1_vals
= {
330 "GERAN feature package 1 supported",
331 "GERAN feature package 1 not supported"
334 static const true_false_string flo_iu_cap_vals
= {
335 "FLO in GERAN Iu Mode supported",
336 "FLO in GERAN Iu Mode not supported"
339 static const true_false_string geran_feature_package_2_vals
= {
340 "GERAN feature package 2 supported",
341 "GERAN feature package 2 not supported"
344 static const value_string gmsk_multislot_power_prof_vals
[] = {
345 { 0, "GMSK_MULTISLOT_POWER_PROFILE 0" },
346 { 1, "GMSK_MULTISLOT_POWER_PROFILE 1" },
347 { 2, "GMSK_MULTISLOT_POWER_PROFILE 2" },
348 { 3, "GMSK_MULTISLOT_POWER_PROFILE 3" },
352 static const value_string eight_psk_multislot_power_prof_vals
[] = {
353 { 0, "8-PSK_MULTISLOT_POWER_PROFILE 0" },
354 { 1, "8-PSK_MULTISLOT_POWER_PROFILE 1" },
355 { 2, "8-PSK_MULTISLOT_POWER_PROFILE 2" },
356 { 3, "8-PSK_MULTISLOT_POWER_PROFILE 3" },
360 static const value_string t_gsm_400_bands_supported_vals
[] = {
361 { 1, "T-GSM 380 supported, T-GSM 410 not supported" },
362 { 2, "T-GSM 410 supported, T-GSM 380 not supported" },
363 { 3, "T-GSM 410 supported, T-GSM 380 supported" },
367 static const value_string downlink_adv_receiver_perf_vals
[] = {
368 { 0, "Downlink Advanced Receiver Performance not supported" },
369 { 1, "Downlink Advanced Receiver Performance - phase I supported" },
370 { 2, "Downlink Advanced Receiver Performance - phase II supported" },
374 static const true_false_string dtm_enhancements_cap_vals
= {
375 "The mobile station supports enhanced DTM CS establishment and release procedures",
376 "The mobile station does not support enhanced DTM CS establishment and release procedures"
379 static const true_false_string offset_required_vals
= {
380 "The mobile station requires the offset",
381 "The mobile station does not require the offset"
384 static const value_string dtm_gprs_high_multi_slot_class_vals
[] = {
385 { 0, "Unused. If received, the network shall interpret this as \"0 0 1\"" },
386 { 1, "Multislot class 31 or 36 supported" },
387 { 2, "Multislot class 32 or 37 supported" },
388 { 3, "Multislot class 33 or 38 supported" },
389 { 4, "Multislot class 41 supported" },
390 { 5, "Multislot class 42 supported" },
391 { 6, "Multislot class 43 supported" },
392 { 7, "Multislot class 44 supported" },
396 static const true_false_string repeated_acch_cap_vals
= {
397 "The mobile station supports Repeated SACCH and Repeated Downlink FACCH",
398 "The mobile station does not support Repeated SACCH"
401 static const true_false_string ciphering_mode_setting_cap_vals
= {
402 "The mobile station supports the Ciphering Mode Setting IE in the DTM ASSIGNMENT COMMAND message",
403 "The mobile station does not support the Ciphering Mode Setting IE in the DTM ASSIGNMENT COMMAND message"
406 static const true_false_string additional_positioning_caps_vals
= {
407 "The mobile station supports additional positioning capabilities which can be retrieved using RRLP",
408 "The mobile station does not support additional positioning capabilities which can be retrieved using RRLP"
411 static const true_false_string e_utra_fdd_support_vals
= {
412 "E-UTRA FDD supported",
413 "E-UTRA FDD not supported"
416 static const true_false_string e_utra_tdd_support_vals
= {
417 "E-UTRA TDD supported",
418 "E-UTRA TDD not supported"
421 static const true_false_string e_utra_meas_and_report_support_vals
= {
422 "E-UTRAN Neighbour Cell measurements and measurement reporting while having an RR connection supported",
423 "E-UTRAN Neighbour Cell measurements and measurement reporting while having an RR connection not supported"
426 static const true_false_string prio_based_resel_support_vals
= {
427 "Priority-based cell reselection supported",
428 "Priority-based cell reselection not supported"
431 static const true_false_string utra_csg_cells_reporting_vals
= {
432 "Reporting of UTRAN CSG cells supported",
433 "Reporting of UTRAN CSG cells not supported"
436 static const value_string vamos_level_vals
[] = {
437 { 0, "VAMOS not supported" },
438 { 1, "VAMOS I supported" },
439 { 2, "VAMOS II supported" },
440 { 3, "VAMOS III supported" },
444 const value_string tighter_cap_level_vals
[] = {
445 { 0, "TIGHTER not supported" },
446 { 1, "TIGHTER supported for speech and signalling channels only" },
447 { 2, "TIGHTER supported for speech and signalling channels and for GPRS and EGPRS, but not for EGPRS2" },
448 { 3, "TIGHTER supported for speech and signalling channels and for GPRS, EGPRS and EGPRS2" },
452 static const value_string cs_to_ps_srvcc_geran_to_utra_vals
[] = {
453 { 0, "CS to PS SRVCC from GERAN to UMTS FDD and 1.28 Mcps TDD not supported" },
454 { 1, "CS to PS SRVCC from GERAN to UMTS FDD supported" },
455 { 2, "CS to PS SRVCC from GERAN to UMTS 1.28 Mcps TDD supported" },
456 { 3, "CS to PS SRVCC from GERAN to UMTS FDD and 1.28 Mcps TDD supported" },
460 static const value_string cs_to_ps_srvcc_geran_to_eutra_vals
[] = {
461 { 0, "CS to PS SRVCC from GERAN to E-UTRA FDD and TDD not supported" },
462 { 1, "CS to PS SRVCC from GERAN to E-UTRA FDD supported" },
463 { 2, "CS to PS SRVCC from GERAN to E-UTRA TDD supported" },
464 { 3, "CS to PS SRVCC from GERAN to E-UTRA FDD and TDD supported" },
468 static const value_string gsm_a_rr_rxlev_vals
[] = {
470 { 1, "-110 <= x < -109 dBm"},
471 { 2, "-109 <= x < -108 dBm"},
472 { 3, "-108 <= x < -107 dBm"},
473 { 4, "-107 <= x < -106 dBm"},
474 { 5, "-106 <= x < -105 dBm"},
475 { 6, "-105 <= x < -104 dBm"},
476 { 7, "-104 <= x < -103 dBm"},
477 { 8, "-103 <= x < -102 dBm"},
478 { 9, "-102 <= x < -101 dBm"},
479 { 10, "-101 <= x < -100 dBm"},
480 { 11, "-100 <= x < -99 dBm"},
481 { 12, "-99 <= x < -98 dBm"},
482 { 13, "-98 <= x < -97 dBm"},
483 { 14, "-97 <= x < -96 dBm"},
484 { 15, "-96 <= x < -95 dBm"},
485 { 16, "-95 <= x < -94 dBm"},
486 { 17, "-94 <= x < -93 dBm"},
487 { 18, "-93 <= x < -92 dBm"},
488 { 19, "-92 <= x < -91 dBm"},
489 { 20, "-91 <= x < -90 dBm"},
490 { 21, "-90 <= x < -89 dBm"},
491 { 22, "-89 <= x < -88 dBm"},
492 { 23, "-88 <= x < -87 dBm"},
493 { 24, "-87 <= x < -86 dBm"},
494 { 25, "-86 <= x < -85 dBm"},
495 { 26, "-85 <= x < -84 dBm"},
496 { 27, "-84 <= x < -83 dBm"},
497 { 28, "-83 <= x < -82 dBm"},
498 { 29, "-82 <= x < -81 dBm"},
499 { 30, "-81 <= x < -80 dBm"},
500 { 31, "-80 <= x < -79 dBm"},
501 { 32, "-79 <= x < -78 dBm"},
502 { 33, "-78 <= x < -77 dBm"},
503 { 34, "-77 <= x < -76 dBm"},
504 { 35, "-76 <= x < -75 dBm"},
505 { 36, "-75 <= x < -74 dBm"},
506 { 37, "-74 <= x < -73 dBm"},
507 { 38, "-73 <= x < -72 dBm"},
508 { 39, "-72 <= x < -71 dBm"},
509 { 40, "-71 <= x < -70 dBm"},
510 { 41, "-70 <= x < -69 dBm"},
511 { 42, "-69 <= x < -68 dBm"},
512 { 43, "-68 <= x < -67 dBm"},
513 { 44, "-67 <= x < -66 dBm"},
514 { 45, "-66 <= x < -65 dBm"},
515 { 46, "-65 <= x < -64 dBm"},
516 { 47, "-64 <= x < -63 dBm"},
517 { 48, "-63 <= x < -62 dBm"},
518 { 49, "-62 <= x < -61 dBm"},
519 { 50, "-61 <= x < -60 dBm"},
520 { 51, "-60 <= x < -59 dBm"},
521 { 52, "-59 <= x < -58 dBm"},
522 { 53, "-58 <= x < -57 dBm"},
523 { 54, "-57 <= x < -56 dBm"},
524 { 55, "-56 <= x < -55 dBm"},
525 { 56, "-55 <= x < -54 dBm"},
526 { 57, "-54 <= x < -53 dBm"},
527 { 58, "-53 <= x < -52 dBm"},
528 { 59, "-52 <= x < -51 dBm"},
529 { 60, "-51 <= x < -50 dBm"},
530 { 61, "-50 <= x < -49 dBm"},
531 { 62, "-49 <= x < -48 dBm"},
535 value_string_ext gsm_a_rr_rxlev_vals_ext
= VALUE_STRING_EXT_INIT(gsm_a_rr_rxlev_vals
);
537 const value_string gsm_a_rr_rxqual_vals
[] = {
538 {0, "BER < 0.2%, Mean value 0.14%"},
539 {1, "0.2% <= BER < 0.4%, Mean value 0.28%"},
540 {2, "0.4% <= BER < 0.8%, Mean value 0.57%"},
541 {3, "0.8% <= BER < 1.6%, Mean value 1.13%"},
542 {4, "1.6% <= BER < 3.2%, Mean value 2.26%"},
543 {5, "3.2% <= BER < 6.4%, Mean value 4.53%"},
544 {6, "6.4% <= BER < 12.8%, Mean value 9.05%"},
545 {7, "BER > 12.8%, Mean value 18.10%"},
549 /* Initialize the protocol and registered fields */
550 static int proto_a_common
;
551 static int proto_3gpp
;
555 int hf_gsm_a_common_elem_id
;
556 static int hf_gsm_a_common_elem_id_f0
;
557 static int hf_gsm_a_l_ext
;
559 static int hf_gsm_a_imei
;
560 static int hf_gsm_a_imeisv
;
562 static int hf_gsm_a_MSC_rev
;
563 static int hf_gsm_a_ES_IND
;
564 static int hf_gsm_a_A5_1_algorithm_sup
;
565 static int hf_gsm_a_RF_power_capability
;
566 static int hf_gsm_a_ps_sup_cap
;
567 static int hf_gsm_a_SS_screening_indicator
;
568 static int hf_gsm_a_SM_capability
;
569 static int hf_gsm_a_VBS_notification_rec
;
570 static int hf_gsm_a_VGCS_notification_rec
;
571 static int hf_gsm_a_FC_frequency_cap
;
572 static int hf_gsm_a_CM3
;
573 static int hf_gsm_a_LCS_VA_cap
;
574 static int hf_gsm_a_UCS2_treatment
;
575 static int hf_gsm_a_SoLSA
;
576 static int hf_gsm_a_CMSP
;
577 static int hf_gsm_a_A5_7_algorithm_sup
;
578 static int hf_gsm_a_A5_6_algorithm_sup
;
579 static int hf_gsm_a_A5_5_algorithm_sup
;
580 static int hf_gsm_a_A5_4_algorithm_sup
;
581 static int hf_gsm_a_A5_3_algorithm_sup
;
582 static int hf_gsm_a_A5_2_algorithm_sup
;
584 static int hf_gsm_a_odd_even_ind
;
585 static int hf_gsm_a_id_dig_1
;
586 static int hf_gsm_a_unused
;
587 static int hf_gsm_a_mobile_identity_type
;
588 static int hf_gsm_a_tmgi_mcc_mnc_ind
;
589 static int hf_gsm_a_mbs_ses_id_ind
;
590 static int hf_gsm_a_mbs_service_id
;
591 static int hf_gsm_a_mbs_session_id
;
592 static int hf_gsm_a_length
;
593 static int hf_gsm_a_element_value
;
594 int hf_gsm_a_extension
;
595 int hf_gsm_a_L3_protocol_discriminator
;
596 int hf_gsm_a_call_prio
;
597 int hf_gsm_a_skip_ind
;
598 int hf_gsm_a_spare_bits
;
601 static int hf_gsm_a_spare_nibble
;
602 static int hf_gsm_a_type_of_ciph_alg
;
603 static int hf_gsm_a_att
;
604 static int hf_gsm_a_nmo_1
;
605 static int hf_gsm_a_nmo
;
606 static int hf_gsm_a_old_xid
;
607 static int hf_gsm_a_iov_ui
;
608 static int hf_gsm_a_ext_periodic_timers
;
609 static int hf_gsm_a_b7spare
;
610 int hf_gsm_a_b8spare
;
611 static int hf_gsm_a_multi_bnd_sup_fields
;
612 static int hf_gsm_a_pgsm_supported
;
613 static int hf_gsm_a_egsm_supported
;
614 static int hf_gsm_a_gsm1800_supported
;
615 static int hf_gsm_a_ass_radio_cap1
;
616 static int hf_gsm_a_ass_radio_cap2
;
617 static int hf_gsm_a_rsupport
;
618 static int hf_gsm_a_r_capabilities
;
619 static int hf_gsm_a_multislot_capabilities
;
620 static int hf_gsm_a_multislot_class
;
621 static int hf_gsm_a_ucs2_treatment
;
622 static int hf_gsm_a_extended_measurement_cap
;
623 static int hf_gsm_a_ms_measurement_capability
;
624 static int hf_gsm_a_sms_value
;
625 static int hf_gsm_a_sm_value
;
626 static int hf_gsm_a_key_seq
;
627 static int hf_gsm_a_ms_pos_method_cap_present
;
628 static int hf_gsm_a_ms_pos_method
;
629 static int hf_gsm_a_ms_assisted_e_otd
;
630 static int hf_gsm_a_ms_based_e_otd
;
631 static int hf_gsm_a_ms_assisted_gps
;
632 static int hf_gsm_a_ms_based_gps
;
633 static int hf_gsm_a_ms_conventional_gps
;
634 static int hf_gsm_a_ecsd_multi_slot_capability
;
635 static int hf_gsm_a_ecsd_multi_slot_class
;
636 static int hf_gsm_a_8_psk_struct_present
;
637 static int hf_gsm_a_8_psk_struct
;
638 static int hf_gsm_a_modulation_capability
;
639 static int hf_gsm_a_8_psk_rf_power_capability_1_present
;
640 static int hf_gsm_a_8_psk_rf_power_capability_1
;
641 static int hf_gsm_a_8_psk_rf_power_capability_2_present
;
642 static int hf_gsm_a_8_psk_rf_power_capability_2
;
643 static int hf_gsm_a_gsm_400_band_info_present
;
644 static int hf_gsm_a_gsm_400_bands_supported
;
645 static int hf_gsm_a_gsm_400_assoc_radio_cap
;
646 static int hf_gsm_a_gsm_850_assoc_radio_cap_present
;
647 static int hf_gsm_a_gsm_850_assoc_radio_cap
;
648 static int hf_gsm_a_gsm_1900_assoc_radio_cap_present
;
649 static int hf_gsm_a_gsm_1900_assoc_radio_cap
;
650 static int hf_gsm_a_cm3_A5_bits
;
651 static int hf_gsm_a_umts_fdd_rat_cap
;
652 static int hf_gsm_a_umts_384_mcps_tdd_rat_cap
;
653 static int hf_gsm_a_cdma_2000_rat_cap
;
654 static int hf_gsm_a_dtm_e_gprs_multi_slot_info_present
;
655 static int hf_gsm_a_dtm_gprs_multi_slot_class
;
656 static int hf_gsm_a_single_slot_dtm
;
657 static int hf_gsm_a_dtm_egprs_multi_slot_class_present
;
658 static int hf_gsm_a_dtm_egprs_multi_slot_class
;
659 static int hf_gsm_a_single_band_support
;
660 static int hf_gsm_a_gsm_band
;
661 static int hf_gsm_a_gsm_750_assoc_radio_cap_present
;
662 static int hf_gsm_a_gsm_750_assoc_radio_cap
;
663 static int hf_gsm_a_umts_128_mcps_tdd_rat_cap
;
664 static int hf_gsm_a_geran_feature_package_1
;
665 static int hf_gsm_a_ext_dtm_e_gprs_multi_slot_info_present
;
666 static int hf_gsm_a_ext_dtm_gprs_multi_slot_class
;
667 static int hf_gsm_a_ext_dtm_egprs_multi_slot_class
;
668 static int hf_gsm_a_high_multislot_cap_present
;
669 static int hf_gsm_a_high_multislot_cap
;
670 static int hf_gsm_a_geran_iu_mode_support
;
671 static int hf_gsm_a_geran_iu_mode_cap
;
672 static int hf_gsm_a_geran_iu_mode_cap_length
;
673 static int hf_gsm_a_flo_iu_cap
;
674 static int hf_gsm_a_geran_feature_package_2
;
675 static int hf_gsm_a_gmsk_multislot_power_prof
;
676 static int hf_gsm_a_8_psk_multislot_power_prof
;
677 static int hf_gsm_a_t_gsm_400_band_info_present
;
678 static int hf_gsm_a_t_gsm_400_bands_supported
;
679 static int hf_gsm_a_t_gsm_400_assoc_radio_cap
;
680 static int hf_gsm_a_t_gsm_900_assoc_radio_cap_present
;
681 static int hf_gsm_a_t_gsm_900_assoc_radio_cap
;
682 static int hf_gsm_a_downlink_adv_receiver_perf
;
683 static int hf_gsm_a_dtm_enhancements_cap
;
684 static int hf_gsm_a_dtm_e_gprs_high_multi_slot_info_present
;
685 static int hf_gsm_a_dtm_gprs_high_multi_slot_class
;
686 static int hf_gsm_a_offset_required
;
687 static int hf_gsm_a_dtm_egprs_high_multi_slot_class_present
;
688 static int hf_gsm_a_dtm_egprs_high_multi_slot_class
;
689 static int hf_gsm_a_repeated_acch_cap
;
690 static int hf_gsm_a_gsm_710_assoc_radio_cap_present
;
691 static int hf_gsm_a_gsm_710_assoc_radio_cap
;
692 static int hf_gsm_a_t_gsm_810_assoc_radio_cap_present
;
693 static int hf_gsm_a_t_gsm_810_assoc_radio_cap
;
694 static int hf_gsm_a_ciphering_mode_setting_cap
;
695 static int hf_gsm_a_additional_positioning_caps
;
696 static int hf_gsm_a_e_utra_fdd_support
;
697 static int hf_gsm_a_e_utra_tdd_support
;
698 static int hf_gsm_a_e_utra_meas_and_report_support
;
699 static int hf_gsm_a_prio_based_resel_support
;
700 static int hf_gsm_a_utra_csg_cells_reporting
;
701 static int hf_gsm_a_vamos_level
;
702 static int hf_gsm_a_tighter_cap
;
703 static int hf_gsm_a_selective_ciph_down_sacch
;
704 static int hf_gsm_a_cs_to_ps_srvcc_geran_to_utra
;
705 static int hf_gsm_a_cs_to_ps_srvcc_geran_to_eutra
;
706 static int hf_gsm_a_geran_network_sharing_support
;
707 static int hf_gsm_a_eutra_wb_rsrq_support
;
708 static int hf_gsm_a_er_band_support
;
709 static int hf_gsm_a_utra_mfbi_support
;
710 static int hf_gsm_a_eutra_mfbi_support
;
711 static int hf_gsm_a_ext_tsc_set_cap_support
;
712 static int hf_gsm_a_ext_earfcn_value_range
;
714 static int hf_gsm_a_geo_loc_type_of_shape
;
715 static int hf_gsm_a_geo_loc_sign_of_lat
;
716 static int hf_gsm_a_geo_loc_deg_of_lat
;
717 static int hf_gsm_a_geo_loc_deg_of_long
;
718 static int hf_gsm_a_geo_loc_osm_uri
;
719 static int hf_gsm_a_geo_loc_uncertainty_code
;
720 static int hf_gsm_a_geo_loc_uncertainty_semi_major
;
721 static int hf_gsm_a_geo_loc_uncertainty_semi_minor
;
722 static int hf_gsm_a_geo_loc_orientation_of_major_axis
;
723 static int hf_gsm_a_geo_loc_uncertainty_altitude
;
724 static int hf_gsm_a_geo_loc_confidence
;
725 static int hf_gsm_a_geo_loc_uncertainty_range
;
726 static int hf_gsm_a_geo_loc_horizontal_confidence
;
727 static int hf_gsm_a_geo_loc_horizontal_uncertainty_range
;
728 static int hf_gsm_a_geo_loc_vertical_confidence
;
729 static int hf_gsm_a_geo_loc_vertical_uncertainty_range
;
730 static int hf_gsm_a_geo_loc_high_acc_uncertainty_alt
;
731 static int hf_gsm_a_geo_loc_no_of_points
;
732 static int hf_gsm_a_geo_loc_high_acc_deg_of_lat
;
733 static int hf_gsm_a_geo_loc_high_acc_deg_of_long
;
734 static int hf_gsm_a_geo_loc_high_acc_uncertainty_semi_major
;
735 static int hf_gsm_a_geo_loc_high_acc_uncertainty_semi_minor
;
736 static int hf_gsm_a_geo_loc_high_acc_alt
;
737 static int hf_gsm_a_velocity_type
;
738 static int hf_gsm_a_bearing
;
739 static int hf_gsm_a_horizontal_speed
;
740 static int hf_gsm_a_uncertainty_speed
;
741 static int hf_gsm_a_h_uncertainty_speed
;
742 static int hf_gsm_a_v_uncertainty_speed
;
743 static int hf_gsm_a_vertical_speed
;
744 static int hf_gsm_a_d
;
745 static int hf_gsm_a_geo_loc_D
;
746 static int hf_gsm_a_geo_loc_altitude
;
747 static int hf_gsm_a_geo_loc_inner_radius
;
748 static int hf_gsm_a_geo_loc_uncertainty_radius
;
749 static int hf_gsm_a_geo_loc_offset_angle
;
750 static int hf_gsm_a_geo_loc_included_angle
;
752 /* Generated from convert_proto_tree_add_text.pl */
753 static int hf_gsm_a_filler
;
754 static int hf_gsm_a_identity_digit1
;
755 static int hf_gsm_a_group_call_reference
;
756 static int hf_gsm_a_service_flag
;
757 static int hf_gsm_a_af_acknowledgement
;
758 static int hf_gsm_a_call_priority
;
759 static int hf_gsm_a_ciphering_info
;
760 static int hf_gsm_a_sapi
;
762 /* Inter protocol hf */
765 static int ett_gsm_a_plmn
;
766 static int ett_gsm_a_poly_pnt
;
768 static expert_field ei_gsm_a_extraneous_data
;
769 static expert_field ei_gsm_a_unknown_element
;
770 static expert_field ei_gsm_a_unknown_pdu_type
;
771 static expert_field ei_gsm_a_no_element_dissector
;
772 static expert_field ei_gsm_a_format_not_supported
;
773 static expert_field ei_gsm_a_mobile_identity_type
;
774 static expert_field ei_gsm_a_ie_length_too_short
;
776 sccp_assoc_info_t
* sccp_assoc
;
778 #define NUM_GSM_COMMON_ELEM array_length(gsm_common_elem_strings)
779 int ett_gsm_common_elem
[NUM_GSM_COMMON_ELEM
];
782 #define ELLIPSOID_POINT 0
783 #define ELLIPSOID_POINT_WITH_UNCERT_CIRC 1
784 #define ELLIPSOID_POINT_WITH_UNCERT_ELLIPSE 3
786 #define ELLIPSOID_POINT_WITH_ALT 8
787 #define ELLIPSOID_POINT_WITH_ALT_AND_UNCERT_ELLIPSOID 9
788 #define ELLIPSOID_ARC 10
789 #define HIGH_ACC_ELLIPSOID_PNT_WITH_UNCERT_ELLIPSE 11
790 #define HIGH_ACC_ELLIPSOID_PNT_WITH_ALT_AND_UNCERT_ELLIPSOID 12
791 #define HIGH_ACC_ELLIPSOID_PNT_WITH_SCALABLE_UNCERT_ELLIPSE 13
792 #define HIGH_ACC_ELLIPSOID_PNT_WITH_ALT_AND_SCALABLE_UNCERT_ELLIPSOID 14
795 0 0 0 0 Ellipsoid Point
796 0 0 0 1 Ellipsoid point with uncertainty Circle
797 0 0 1 1 Ellipsoid point with uncertainty Ellipse
799 1 0 0 0 Ellipsoid point with altitude
800 1 0 0 1 Ellipsoid point with altitude and uncertainty Ellipsoid
801 1 0 1 0 Ellipsoid Arc
802 1 0 1 1 High Accuracy Ellipsoid point with uncertainty ellipse
803 1 1 0 0 High Accuracy Ellipsoid point with altitude and uncertainty ellipsoid
804 1 1 0 1 High Accuracy Ellipsoid point with scalable uncertainty ellipse
805 1 1 1 0 High Accuracy Ellipsoid point with altitude and scalable uncertainty ellipsoid
806 other values reserved for future use
809 /* TS 23 032 Table 2a: Coding of Type of Shape */
810 static const value_string type_of_shape_vals
[] = {
811 { ELLIPSOID_POINT
, "Ellipsoid Point"},
812 { ELLIPSOID_POINT_WITH_UNCERT_CIRC
, "Ellipsoid point with uncertainty Circle"},
813 { ELLIPSOID_POINT_WITH_UNCERT_ELLIPSE
, "Ellipsoid point with uncertainty Ellipse"},
814 { POLYGON
, "Polygon"},
815 { ELLIPSOID_POINT_WITH_ALT
, "Ellipsoid point with altitude"},
816 { ELLIPSOID_POINT_WITH_ALT_AND_UNCERT_ELLIPSOID
, "Ellipsoid point with altitude and uncertainty Ellipsoid"},
817 { ELLIPSOID_ARC
, "Ellipsoid Arc"},
818 { HIGH_ACC_ELLIPSOID_PNT_WITH_UNCERT_ELLIPSE
, "High Accuracy Ellipsoid point with uncertainty ellipse"},
819 { HIGH_ACC_ELLIPSOID_PNT_WITH_ALT_AND_UNCERT_ELLIPSOID
, "High Accuracy Ellipsoid point with altitude and uncertainty ellipsoid"},
820 { HIGH_ACC_ELLIPSOID_PNT_WITH_SCALABLE_UNCERT_ELLIPSE
, "High Accuracy Ellipsoid point with scalable uncertainty ellipse"},
821 { HIGH_ACC_ELLIPSOID_PNT_WITH_ALT_AND_SCALABLE_UNCERT_ELLIPSOID
, "High Accuracy Ellipsoid point with altitude and scalable uncertainty ellipsoid"},
825 /* 3GPP TS 23.032 7.3.1 */
826 static const value_string sign_of_latitude_vals
[] = {
832 static const value_string dir_of_alt_vals
[] = {
833 { 0, "Altitude expresses height"},
834 { 1, "Altitude expresses depth"},
838 static const value_string uncertainty_range
[] = {
839 { 0, "High Accuracy default uncertainty range used"},
840 { 1, "High Accuracy Extended Uncertainty Range used"},
844 typedef uint16_t (**elem_func_hander
)(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo
, uint32_t offset
, unsigned len
, char *add_string
, int string_len
);
847 dissect_geographical_description(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
) {
849 proto_item
*lat_item
, *long_item
, *major_item
, *minor_item
, *alt_item
, *uncer_item
, *loc_uri_item
;
850 /*proto_tree *subtree; */
851 uint32_t type_of_shape
;
862 /*subtree = proto_item_add_subtree(item, ett_gsm_a_geo_desc);*/
864 length
= tvb_reported_length_remaining(tvb
, 0);
865 /* Geographical Location
866 * The Location Estimate field is composed of 1 or more octets with an internal structure
867 * according to section 7 in [23.032].
869 proto_tree_add_item_ret_uint(tree
, hf_gsm_a_geo_loc_type_of_shape
, tvb
, 0, 1, ENC_BIG_ENDIAN
, &type_of_shape
);
874 switch (type_of_shape
) {
875 case ELLIPSOID_POINT
:
876 /* Ellipsoid Point */
877 case ELLIPSOID_POINT_WITH_UNCERT_CIRC
:
878 /* Ellipsoid Point with uncertainty Circle */
879 case ELLIPSOID_POINT_WITH_UNCERT_ELLIPSE
:
880 /* Ellipsoid Point with uncertainty Ellipse */
881 case ELLIPSOID_POINT_WITH_ALT
:
882 /* Ellipsoid Point with Altitude */
883 case ELLIPSOID_POINT_WITH_ALT_AND_UNCERT_ELLIPSOID
:
884 /* Ellipsoid Point with altitude and uncertainty ellipsoid */
889 proto_tree_add_item(tree
, hf_gsm_a_geo_loc_sign_of_lat
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
891 uvalue32
= tvb_get_ntoh24(tvb
,offset
);
892 /* convert degrees (X/0x7fffff) * 90 = degrees */
893 lat_item
= proto_tree_add_item(tree
, hf_gsm_a_geo_loc_deg_of_lat
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
894 deg_lat_str
= wmem_strdup_printf(pinfo
->pool
, "%s%.5f",
895 (uvalue32
& 0x00800000) ? "-" : "",
896 ((double)(uvalue32
& 0x7fffff)/8388607.0) * 90);
897 proto_item_append_text(lat_item
, " (%s degrees)", deg_lat_str
);
902 svalue32
= tvb_get_ntoh24(tvb
,offset
);
903 svalue32
|= (svalue32
& 0x800000) ? 0xff000000 : 0x00000000;
904 long_item
= proto_tree_add_item(tree
, hf_gsm_a_geo_loc_deg_of_long
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
905 /* (X/0xffffff) *360 = degrees */
906 deg_lon_str
= wmem_strdup_printf(pinfo
->pool
, "%.5f",
907 ((double)svalue32
/16777215.0) * 360);
908 proto_item_append_text(long_item
, " (%s degrees)", deg_lon_str
);
910 if (type_of_shape
== ELLIPSOID_POINT_WITH_UNCERT_CIRC
) {
911 /* Ellipsoid Point with uncertainty Circle */
914 /* Uncertainty code */
915 value
= tvb_get_uint8(tvb
,offset
)&0x7f;
916 uncer_item
= proto_tree_add_item(tree
, hf_gsm_a_geo_loc_uncertainty_code
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
917 proto_item_append_text(uncer_item
, " (%.1f m)", 10 * (pow(1.1, (double)value
) - 1));
918 }else if (type_of_shape
== ELLIPSOID_POINT_WITH_UNCERT_ELLIPSE
) {
919 /* Ellipsoid Point with uncertainty Ellipse */
920 /* Uncertainty semi-major octet 10
921 * To convert to metres 10*(((1.1)^X)-1)
923 value
= tvb_get_uint8(tvb
,offset
) & 0x7f;
924 major_item
= proto_tree_add_item(tree
, hf_gsm_a_geo_loc_uncertainty_semi_major
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
925 proto_item_append_text(major_item
, " (%.1f m)", 10 * (pow(1.1, (double)value
) - 1));
927 /* Uncertainty semi-minor Octet 11
928 * To convert to metres 10*(((1.1)^X)-1)
930 value
= tvb_get_uint8(tvb
,offset
)&0x7f;
931 minor_item
= proto_tree_add_item(tree
, hf_gsm_a_geo_loc_uncertainty_semi_minor
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
932 proto_item_append_text(minor_item
, " (%.1f m)", 10 * (pow(1.1, (double)value
) - 1));
934 /* TS 23.032 V15.1.0 (2018-09)
935 * Orientation of major axis octet 12
936 * allowed value from 0-179
938 proto_tree_add_item(tree
, hf_gsm_a_geo_loc_orientation_of_major_axis
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
941 proto_tree_add_item(tree
, hf_gsm_a_geo_loc_confidence
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
943 }else if (type_of_shape
== ELLIPSOID_POINT_WITH_ALT
) {
944 /* Ellipsoid Point with Altitude */
945 /*D: Direction of Altitude */
946 proto_tree_add_item(tree
, hf_gsm_a_geo_loc_D
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
948 proto_tree_add_item(tree
, hf_gsm_a_geo_loc_altitude
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
949 }else if (type_of_shape
== ELLIPSOID_POINT_WITH_ALT_AND_UNCERT_ELLIPSOID
) {
950 /* Ellipsoid Point with altitude and uncertainty ellipsoid */
951 /*D: Direction of Altitude octet 8,9 */
952 proto_tree_add_item(tree
, hf_gsm_a_geo_loc_D
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
953 /* Altitude Octet 8,9*/
954 proto_tree_add_item(tree
, hf_gsm_a_geo_loc_altitude
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
956 /* Uncertainty semi-major octet 10
957 * To convert to metres 10*(((1.1)^X)-1)
959 value
= tvb_get_uint8(tvb
,offset
)&0x7f;
960 major_item
= proto_tree_add_item(tree
, hf_gsm_a_geo_loc_uncertainty_semi_major
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
961 proto_item_append_text(major_item
, " (%.1f m)", 10 * (pow(1.1, (double)value
) - 1));
963 /* Uncertainty semi-minor Octet 11
964 * To convert to metres 10*(((1.1)^X)-1)
966 value
= tvb_get_uint8(tvb
,offset
)&0x7f;
967 minor_item
= proto_tree_add_item(tree
, hf_gsm_a_geo_loc_uncertainty_semi_minor
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
968 proto_item_append_text(minor_item
, " (%.1f m)", 10 * (pow(1.1, (double)value
) - 1));
970 /* Orientation of major axis octet 12
971 * allowed value from 0-179 to convert
972 * to actual degrees multiply by 2.
974 value
= tvb_get_uint8(tvb
,offset
)&0x7f;
975 proto_tree_add_uint(tree
, hf_gsm_a_geo_loc_orientation_of_major_axis
, tvb
, offset
, 1, value
*2);
977 /* Uncertainty Altitude 13
978 * to convert to metres 45*(((1.025)^X)-1)
980 value
= tvb_get_uint8(tvb
,offset
)&0x7f;
981 alt_item
= proto_tree_add_item(tree
, hf_gsm_a_geo_loc_uncertainty_altitude
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
982 proto_item_append_text(alt_item
, " (%.1f m)", 45 * (pow(1.025, (double)value
) - 1));
984 /* Confidence octet 14
986 proto_tree_add_item(tree
, hf_gsm_a_geo_loc_confidence
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
987 }else if (type_of_shape
== ELLIPSOID_ARC
) {
990 proto_tree_add_item(tree
, hf_gsm_a_geo_loc_inner_radius
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
992 /* Uncertainty radius */
993 proto_tree_add_item(tree
, hf_gsm_a_geo_loc_uncertainty_radius
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
996 proto_tree_add_item(tree
, hf_gsm_a_geo_loc_offset_angle
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
999 proto_tree_add_item(tree
, hf_gsm_a_geo_loc_included_angle
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1002 proto_tree_add_item(tree
, hf_gsm_a_geo_loc_confidence
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1004 osm_uri
= wmem_strdup_printf(pinfo
->pool
, "https://www.openstreetmap.org/?mlat=%s&mlon=%s&zoom=12", deg_lat_str
, deg_lon_str
);
1005 loc_uri_item
= proto_tree_add_string(tree
, hf_gsm_a_geo_loc_osm_uri
, tvb
, loc_offset
, 6, osm_uri
);
1006 proto_item_set_url(loc_uri_item
);
1007 proto_item_set_generated(loc_uri_item
);
1010 case POLYGON
: /* Polygon */
1012 /* Number of points */
1013 uint32_t no_of_points
;
1014 unsigned point_no
= 0;
1015 proto_tree
* sub_tree
;
1018 proto_tree_add_item_ret_uint(tree
, hf_gsm_a_geo_loc_no_of_points
, tvb
, 0, 1, ENC_BIG_ENDIAN
, &no_of_points
);
1019 /* offset increased with 1 after reading of shape above */
1020 while (no_of_points
> 0) {
1022 sub_tree
= proto_tree_add_subtree_format(tree
, tvb
, offset
, 6,
1023 ett_gsm_a_poly_pnt
, &ti
, "Polygon point %u", point_no
);
1024 proto_tree_add_item(sub_tree
, hf_gsm_a_geo_loc_sign_of_lat
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1026 uvalue32
= tvb_get_ntoh24(tvb
, offset
);
1027 /* convert degrees (X/0x7fffff) * 90 = degrees */
1028 lat_item
= proto_tree_add_item(sub_tree
, hf_gsm_a_geo_loc_deg_of_lat
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
1029 deg_lat_str
= wmem_strdup_printf(pinfo
->pool
, "%s%.5f",
1030 (uvalue32
& 0x00800000) ? "-" : "",
1031 ((double)(uvalue32
& 0x7fffff) / 8388607.0) * 90);
1032 proto_item_append_text(lat_item
, " (%s degrees)", deg_lat_str
);
1033 loc_offset
= offset
;
1034 offset
= offset
+ 3;
1035 svalue32
= tvb_get_ntoh24(tvb
, offset
);
1036 svalue32
|= (svalue32
& 0x800000) ? 0xff000000 : 0x00000000;
1037 long_item
= proto_tree_add_item(sub_tree
, hf_gsm_a_geo_loc_deg_of_long
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
1038 /* (X/0xffffff) *360 = degrees */
1039 deg_lon_str
= wmem_strdup_printf(pinfo
->pool
, "%.5f",
1040 ((double)svalue32
/ 16777215.0) * 360);
1041 proto_item_append_text(long_item
, " (%s degrees)", deg_lon_str
);
1042 offset
= offset
+ 3;
1045 osm_uri
= wmem_strdup_printf(pinfo
->pool
, "https://www.openstreetmap.org/?mlat=%s&mlon=%s&zoom=12", deg_lat_str
, deg_lon_str
);
1046 loc_uri_item
= proto_tree_add_string(tree
, hf_gsm_a_geo_loc_osm_uri
, tvb
, loc_offset
, 6, osm_uri
);
1047 proto_item_set_url(loc_uri_item
);
1048 proto_item_set_generated(loc_uri_item
);
1052 case HIGH_ACC_ELLIPSOID_PNT_WITH_UNCERT_ELLIPSE
:
1053 case HIGH_ACC_ELLIPSOID_PNT_WITH_SCALABLE_UNCERT_ELLIPSE
:
1054 loc_offset
= offset
;
1055 lat_item
= proto_tree_add_item_ret_int(tree
, hf_gsm_a_geo_loc_high_acc_deg_of_lat
, tvb
, offset
, 4, ENC_BIG_ENDIAN
, &svalue32
);
1056 deg_lat_str
= wmem_strdup_printf(pinfo
->pool
, "%s%.5f",
1057 (svalue32
& 0x80000000) ? "-" : "",
1058 ((double)(svalue32
& 0x7fffffff) / 2147483647.0) * 90);
1059 proto_item_append_text(lat_item
, " (%s degrees)", deg_lat_str
);
1061 long_item
= proto_tree_add_item_ret_int(tree
, hf_gsm_a_geo_loc_high_acc_deg_of_long
, tvb
, offset
, 4, ENC_BIG_ENDIAN
, &svalue32
);
1062 deg_lon_str
= wmem_strdup_printf(pinfo
->pool
, "%s%.5f",
1063 (svalue32
& 0x80000000) ? "-" : "",
1064 ((double)svalue32
/ 2147483647.0) * 180);
1065 proto_item_append_text(long_item
, " (%s degrees)", deg_lon_str
);
1068 /* High accuracy uncertainty semi-major*/
1069 major_item
= proto_tree_add_item_ret_uint(tree
, hf_gsm_a_geo_loc_high_acc_uncertainty_semi_major
, tvb
, offset
, 1, ENC_BIG_ENDIAN
, &uvalue32
);
1070 proto_item_append_text(major_item
, " (%.5f m)", 0.3 * (pow(1.02, (double)uvalue32
) - 1));
1072 /* High accuracy uncertainty semi-minor*/
1073 minor_item
= proto_tree_add_item_ret_uint(tree
, hf_gsm_a_geo_loc_high_acc_uncertainty_semi_minor
, tvb
, offset
, 1, ENC_BIG_ENDIAN
, &uvalue32
);
1074 proto_item_append_text(minor_item
, " (%.5f m)", 0.3 * (pow(1.02, (double)uvalue32
) - 1));
1076 /* Orientation of major axis */
1077 proto_tree_add_item(tree
, hf_gsm_a_geo_loc_orientation_of_major_axis
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1080 proto_tree_add_item(tree
, hf_gsm_a_geo_loc_confidence
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1081 if (type_of_shape
== HIGH_ACC_ELLIPSOID_PNT_WITH_SCALABLE_UNCERT_ELLIPSE
) {
1082 /* Uncertainty Range */
1083 proto_tree_add_item(tree
, hf_gsm_a_geo_loc_uncertainty_range
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1087 osm_uri
= wmem_strdup_printf(pinfo
->pool
, "https://www.openstreetmap.org/?mlat=%s&mlon=%s&zoom=12", deg_lat_str
, deg_lon_str
);
1088 loc_uri_item
= proto_tree_add_string(tree
, hf_gsm_a_geo_loc_osm_uri
, tvb
, loc_offset
, 6, osm_uri
);
1089 proto_item_set_url(loc_uri_item
);
1090 proto_item_set_generated(loc_uri_item
);
1093 case HIGH_ACC_ELLIPSOID_PNT_WITH_ALT_AND_UNCERT_ELLIPSOID
:
1094 case HIGH_ACC_ELLIPSOID_PNT_WITH_ALT_AND_SCALABLE_UNCERT_ELLIPSOID
:
1095 lat_item
= proto_tree_add_item_ret_int(tree
, hf_gsm_a_geo_loc_high_acc_deg_of_lat
, tvb
, offset
, 4, ENC_BIG_ENDIAN
, &svalue32
);
1096 deg_lat_str
= wmem_strdup_printf(pinfo
->pool
, "%s%.5f",
1097 (svalue32
& 0x80000000) ? "-" : "",
1098 ((double)(svalue32
& 0x7fffffff) / 2147483647.0) * 90);
1099 proto_item_append_text(lat_item
, " (%s degrees)", deg_lat_str
);
1101 long_item
= proto_tree_add_item_ret_int(tree
, hf_gsm_a_geo_loc_high_acc_deg_of_long
, tvb
, offset
, 4, ENC_BIG_ENDIAN
, &svalue32
);
1102 deg_lon_str
= wmem_strdup_printf(pinfo
->pool
, "%s%.5f",
1103 (svalue32
& 0x80000000) ? "-" : "",
1104 ((double)svalue32
/ 2147483647.0) * 180);
1105 proto_item_append_text(long_item
, " (%s degrees)", deg_lon_str
);
1108 /* High accuracy altitude
1109 * High accuracy altitude is encoded as a number N between -64000 and 1280000 using 2's complement binary on 22 bits.
1112 alt_item
= proto_tree_add_item_ret_int(tree
, hf_gsm_a_geo_loc_high_acc_alt
, tvb
, offset
, 3, ENC_BIG_ENDIAN
, &svalue32
);
1113 /* double z = pow(double x, double y);*/
1114 proto_item_append_text(alt_item
, " (%.1f m)", (double)svalue32
* pow(2,-7));
1117 /* High accuracy uncertainty semi-major*/
1118 major_item
= proto_tree_add_item_ret_uint(tree
, hf_gsm_a_geo_loc_high_acc_uncertainty_semi_major
, tvb
, offset
, 1, ENC_BIG_ENDIAN
, &uvalue32
);
1119 proto_item_append_text(major_item
, " (%.5f m)", 0.3 * (pow(1.02, (double)uvalue32
) - 1));
1121 /* High accuracy uncertainty semi-minor*/
1122 minor_item
= proto_tree_add_item_ret_uint(tree
, hf_gsm_a_geo_loc_high_acc_uncertainty_semi_minor
, tvb
, offset
, 1, ENC_BIG_ENDIAN
, &uvalue32
);
1123 proto_item_append_text(minor_item
, " (%.5f m)", 0.3 * (pow(1.02, (double)uvalue32
) - 1));
1125 /* Orientation of major axis */
1126 proto_tree_add_item(tree
, hf_gsm_a_geo_loc_orientation_of_major_axis
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1129 /* Horizontal confidence */
1130 proto_tree_add_item(tree
, hf_gsm_a_geo_loc_horizontal_confidence
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1131 if (type_of_shape
== HIGH_ACC_ELLIPSOID_PNT_WITH_ALT_AND_SCALABLE_UNCERT_ELLIPSOID
) {
1132 /* Horizontal Uncertainty Range */
1133 proto_tree_add_item(tree
, hf_gsm_a_geo_loc_horizontal_uncertainty_range
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1137 /* High accuracy uncertainty altitude */
1138 value
= tvb_get_uint8(tvb
, offset
) & 0x7f;
1139 alt_item
= proto_tree_add_item(tree
, hf_gsm_a_geo_loc_high_acc_uncertainty_alt
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1140 proto_item_append_text(alt_item
, " (%.1f m)", 45 * (pow(1.025, (double)value
) - 1));
1143 /* Vertical confidence*/
1144 proto_tree_add_item(tree
, hf_gsm_a_geo_loc_vertical_confidence
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1145 if (type_of_shape
== HIGH_ACC_ELLIPSOID_PNT_WITH_ALT_AND_SCALABLE_UNCERT_ELLIPSOID
) {
1146 /* Vertical Uncertainty Range */
1147 proto_tree_add_item(tree
, hf_gsm_a_geo_loc_vertical_uncertainty_range
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1159 * Ch. 8 Description of Velocity
1161 /* 8.6 Coding of Velocity Type */
1162 static const value_string gsm_a_velocity_type_vals
[] = {
1163 { 0, "Horizontal Velocity"},
1164 { 1, "Horizontal with Vertical Velocity"},
1165 { 2, "Horizontal Velocity with Uncertainty"},
1166 { 3, "Horizontal with Vertical Velocity and Uncertainty"},
1167 { 4, "reserved for future use"},
1168 { 5, "reserved for future use"},
1169 { 6, "reserved for future use"},
1170 { 7, "reserved for future use"},
1171 { 8, "reserved for future use"},
1172 { 9, "reserved for future use"},
1173 { 10, "reserved for future use"},
1174 { 11, "reserved for future use"},
1175 { 12, "reserved for future use"},
1176 { 13, "reserved for future use"},
1177 { 14, "reserved for future use"},
1178 { 15, "reserved for future use"},
1182 static const true_false_string gsm_a_dir_of_ver_speed_vals
= {
1188 dissect_description_of_velocity(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo _U_
, uint32_t offset
, unsigned len _U_
, char *add_string _U_
, int string_len _U_
)
1190 proto_item
*velocity_item
;
1191 uint32_t curr_offset
;
1192 uint32_t velocity_type
, uncertainty_speed
= 0;
1194 curr_offset
= offset
;
1196 /* Bit 8 - 5 Velocity Type */
1197 proto_tree_add_item_ret_uint(tree
, hf_gsm_a_velocity_type
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
, &velocity_type
);
1199 switch (velocity_type
) {
1201 /* 8.12 Coding of Horizontal Velocity */
1203 proto_tree_add_bits_item(tree
, hf_gsm_a_spare_bits
, tvb
, (curr_offset
<<3)+4, 3, ENC_BIG_ENDIAN
);
1204 /* Bearing is encoded in increments of 1 degree measured clockwise from North using a 9 bit binary coded number N. */
1205 proto_tree_add_bits_item(tree
, hf_gsm_a_bearing
, tvb
, (curr_offset
<<3)+7, 9, ENC_BIG_ENDIAN
);
1207 /* Horizontal speed is encoded in increments of 1 kilometre per hour using a 16 bit binary coded number N. */
1208 proto_tree_add_item(tree
, hf_gsm_a_horizontal_speed
, tvb
, curr_offset
, 2, ENC_BIG_ENDIAN
);
1212 /* 8.13 Coding of Horizontal with Vertical Velocity */
1214 proto_tree_add_bits_item(tree
, hf_gsm_a_spare_bits
, tvb
, (curr_offset
<<3)+4, 2, ENC_BIG_ENDIAN
);
1215 /* D: Direction of Vertical Speed */
1216 proto_tree_add_item(tree
, hf_gsm_a_d
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
1217 /* Bearing is encoded in increments of 1 degree measured clockwise from North using a 9 bit binary coded number N. */
1218 proto_tree_add_bits_item(tree
, hf_gsm_a_bearing
, tvb
, (curr_offset
<<3)+7, 9, ENC_BIG_ENDIAN
);
1220 /* Horizontal speed is encoded in increments of 1 kilometre per hour using a 16 bit binary coded number N. */
1221 proto_tree_add_item(tree
, hf_gsm_a_horizontal_speed
, tvb
, curr_offset
, 2, ENC_BIG_ENDIAN
);
1223 /* Vertical Speed Octet 5
1224 * Vertical speed is encoded in increments of 1 kilometre per hour using 8 bits giving a number N between 0 and 28-1.
1226 proto_tree_add_item(tree
, hf_gsm_a_vertical_speed
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
1230 /* 8.14 Coding of Horizontal Velocity with Uncertainty */
1232 proto_tree_add_bits_item(tree
, hf_gsm_a_spare_bits
, tvb
, (curr_offset
<<3)+4, 3, ENC_BIG_ENDIAN
);
1233 /* Bearing is encoded in increments of 1 degree measured clockwise from North using a 9 bit binary coded number N. */
1234 proto_tree_add_bits_item(tree
, hf_gsm_a_bearing
, tvb
, (curr_offset
<<3)+7, 9, ENC_BIG_ENDIAN
);
1236 /* Horizontal speed is encoded in increments of 1 kilometre per hour using a 16 bit binary coded number N. */
1237 proto_tree_add_item(tree
, hf_gsm_a_horizontal_speed
, tvb
, curr_offset
, 2, ENC_BIG_ENDIAN
);
1239 /* Uncertainty Speed Octet 5
1240 * Uncertainty speed is encoded in increments of 1 kilometre per hour using an 8 bit binary coded number N. The value of
1241 * N gives the uncertainty speed except for N=255 which indicates that the uncertainty is not specified.
1243 velocity_item
= proto_tree_add_item_ret_uint(tree
, hf_gsm_a_uncertainty_speed
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
, &uncertainty_speed
);
1244 if (uncertainty_speed
== 255) {
1245 proto_item_append_text(velocity_item
, " (not specified)");
1247 proto_item_append_text(velocity_item
, "km/h");
1252 /* 8.15 Coding of Horizontal with Vertical Velocity and Uncertainty */
1254 proto_tree_add_bits_item(tree
, hf_gsm_a_spare_bits
, tvb
, (curr_offset
<<3)+4, 2, ENC_BIG_ENDIAN
);
1255 /* D: Direction of Vertical Speed */
1256 proto_tree_add_item(tree
, hf_gsm_a_d
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
1257 /* Bearing is encoded in increments of 1 degree measured clockwise from North using a 9 bit binary coded number N. */
1258 proto_tree_add_bits_item(tree
, hf_gsm_a_bearing
, tvb
, (curr_offset
<<3)+7, 9, ENC_BIG_ENDIAN
);
1260 /* Horizontal speed is encoded in increments of 1 kilometre per hour using a 16 bit binary coded number N. */
1261 proto_tree_add_item(tree
, hf_gsm_a_horizontal_speed
, tvb
, curr_offset
, 2, ENC_BIG_ENDIAN
);
1263 /* Vertical Speed Octet 5
1264 * Vertical speed is encoded in increments of 1 kilometre per hour using 8 bits giving a number N between 0 and 28-1.
1266 proto_tree_add_item(tree
, hf_gsm_a_vertical_speed
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
1269 /* Horizontal Uncertainty Speed Octet 6 */
1270 velocity_item
= proto_tree_add_item_ret_uint(tree
, hf_gsm_a_h_uncertainty_speed
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
, &uncertainty_speed
);
1271 if (uncertainty_speed
== 255) {
1272 proto_item_append_text(velocity_item
, " (not specified)");
1274 proto_item_append_text(velocity_item
, "km/h");
1278 /* Vertical Uncertainty Speed Octet 7 */
1279 velocity_item
= proto_tree_add_item_ret_uint(tree
, hf_gsm_a_v_uncertainty_speed
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
, &uncertainty_speed
);
1280 if (uncertainty_speed
== 255) {
1281 proto_item_append_text(velocity_item
, " (not specified)");
1283 proto_item_append_text(velocity_item
, "km/h");
1291 return (curr_offset
- offset
);
1294 const char* get_gsm_a_msg_string(int pdu_type
, int idx
)
1296 const char *msg_string
= NULL
;
1299 case GSM_A_PDU_TYPE_BSSMAP
:
1300 msg_string
= val_to_str_ext(idx
, &gsm_bssmap_elem_strings_ext
, "GSM_A_PDU_TYPE_BSSMAP (%u)");
1302 case GSM_A_PDU_TYPE_DTAP
:
1303 msg_string
= val_to_str_ext(idx
, &gsm_dtap_elem_strings_ext
, "GSM_A_PDU_TYPE_DTAP (%u)");
1305 case GSM_A_PDU_TYPE_RP
:
1306 msg_string
= val_to_str_ext(idx
, &gsm_rp_elem_strings_ext
, "GSM_A_PDU_TYPE_RP (%u)");
1308 case GSM_A_PDU_TYPE_RR
:
1309 msg_string
= val_to_str_ext(idx
, &gsm_rr_elem_strings_ext
, "GSM_A_PDU_TYPE_RR (%u)");
1311 case GSM_A_PDU_TYPE_COMMON
:
1312 msg_string
= val_to_str_ext(idx
, &gsm_common_elem_strings_ext
, "GSM_A_PDU_TYPE_COMMON (%u)");
1314 case GSM_A_PDU_TYPE_GM
:
1315 msg_string
= val_to_str_ext(idx
, &gsm_gm_elem_strings_ext
, "GSM_A_PDU_TYPE_GM (%u)");
1317 case GSM_A_PDU_TYPE_BSSLAP
:
1318 msg_string
= val_to_str_ext(idx
, &gsm_bsslap_elem_strings_ext
, "GSM_A_PDU_TYPE_BSSLAP (%u)");
1320 case GSM_PDU_TYPE_BSSMAP_LE
:
1321 msg_string
= val_to_str_ext(idx
, &gsm_bssmap_le_elem_strings_ext
, "GSM_PDU_TYPE_BSSMAP_LE (%u)");
1323 case NAS_PDU_TYPE_COMMON
:
1324 msg_string
= val_to_str_ext(idx
, &nas_eps_common_elem_strings_ext
, "NAS_PDU_TYPE_COMMON (%u)");
1326 case NAS_PDU_TYPE_EMM
:
1327 msg_string
= val_to_str_ext(idx
, &nas_emm_elem_strings_ext
, "NAS_PDU_TYPE_EMM (%u)");
1329 case NAS_PDU_TYPE_ESM
:
1330 msg_string
= val_to_str_ext(idx
, &nas_esm_elem_strings_ext
, "NAS_PDU_TYPE_ESM (%u)");
1332 case SGSAP_PDU_TYPE
:
1333 msg_string
= val_to_str_ext(idx
, &sgsap_elem_strings_ext
, "SGSAP_PDU_TYPE (%u)");
1335 case BSSGP_PDU_TYPE
:
1336 msg_string
= val_to_str_ext(idx
, &bssgp_elem_strings_ext
, "BSSGP_PDU_TYPE (%u)");
1338 case GMR1_IE_COMMON
:
1339 msg_string
= val_to_str_ext(idx
, &gmr1_ie_common_strings_ext
, "GMR1_IE_COMMON (%u)");
1342 msg_string
= val_to_str_ext(idx
, &gmr1_ie_rr_strings_ext
, "GMR1_IE_RR (%u)");
1344 case NAS_5GS_PDU_TYPE_COMMON
:
1345 msg_string
= val_to_str_ext(idx
, &nas_5gs_common_elem_strings_ext
, "NAS_5GS_PDU_TYPE_COMMON (%u)");
1347 case NAS_5GS_PDU_TYPE_MM
:
1348 msg_string
= val_to_str_ext(idx
, &nas_5gs_mm_elem_strings_ext
, "NAS_5GS_PDU_TYPE_MM (%u)");
1350 case NAS_5GS_PDU_TYPE_SM
:
1351 msg_string
= val_to_str_ext(idx
, &nas_5gs_sm_elem_strings_ext
, "NAS_5GS_PDU_TYPE_SM (%u)");
1353 case NAS_5GS_PDU_TYPE_UPDP
:
1354 msg_string
= val_to_str_ext(idx
, &nas_5gs_updp_elem_strings_ext
, "NAS_5GS_PDU_TYPE_UPDP (%u)");
1357 DISSECTOR_ASSERT_NOT_REACHED();
1363 static int get_hf_elem_id(int pdu_type
)
1368 case GSM_A_PDU_TYPE_BSSMAP
:
1369 hf_elem_id
= hf_gsm_a_bssmap_elem_id
;
1371 case GSM_A_PDU_TYPE_DTAP
:
1372 hf_elem_id
= hf_gsm_a_dtap_elem_id
;
1374 case GSM_A_PDU_TYPE_RP
:
1375 hf_elem_id
= hf_gsm_a_rp_elem_id
;
1377 case GSM_A_PDU_TYPE_RR
:
1378 hf_elem_id
= hf_gsm_a_rr_elem_id
;
1380 case GSM_A_PDU_TYPE_COMMON
:
1381 hf_elem_id
= hf_gsm_a_common_elem_id
;
1383 case GSM_A_PDU_TYPE_GM
:
1384 hf_elem_id
= hf_gsm_a_gm_elem_id
;
1386 case GSM_A_PDU_TYPE_BSSLAP
:
1387 hf_elem_id
= hf_gsm_a_bsslap_elem_id
;
1389 case GSM_PDU_TYPE_BSSMAP_LE
:
1390 hf_elem_id
= hf_gsm_bssmap_le_elem_id
;
1392 case NAS_PDU_TYPE_COMMON
:
1393 hf_elem_id
= hf_nas_eps_common_elem_id
;
1395 case NAS_PDU_TYPE_EMM
:
1396 hf_elem_id
= hf_nas_eps_emm_elem_id
;
1398 case NAS_PDU_TYPE_ESM
:
1399 hf_elem_id
= hf_nas_eps_esm_elem_id
;
1401 case SGSAP_PDU_TYPE
:
1402 hf_elem_id
= hf_sgsap_elem_id
;
1404 case BSSGP_PDU_TYPE
:
1405 hf_elem_id
= hf_bssgp_elem_id
;
1407 case GMR1_IE_COMMON
:
1409 hf_elem_id
= hf_gmr1_elem_id
;
1411 case NAS_5GS_PDU_TYPE_COMMON
:
1412 hf_elem_id
= hf_nas_5gs_common_elem_id
;
1414 case NAS_5GS_PDU_TYPE_MM
:
1415 hf_elem_id
= hf_nas_5gs_mm_elem_id
;
1417 case NAS_5GS_PDU_TYPE_SM
:
1418 hf_elem_id
= hf_nas_5gs_sm_elem_id
;
1420 case NAS_5GS_PDU_TYPE_UPDP
:
1421 hf_elem_id
= hf_nas_5gs_updp_elem_id
;
1424 DISSECTOR_ASSERT_NOT_REACHED();
1431 * Type Length Value (TLV) element dissector
1433 uint16_t elem_tlv(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo
, uint8_t iei
, int pdu_type
, int idx
, uint32_t offset
, unsigned len _U_
, const char *name_add
)
1437 uint8_t lengt_length
= 1;
1439 uint32_t curr_offset
;
1440 proto_tree
*subtree
;
1442 value_string_ext elem_names_ext
;
1444 const char *elem_name
;
1445 elem_func_hander elem_funcs
;
1447 curr_offset
= offset
;
1450 SET_ELEM_VARS(pdu_type
, elem_names_ext
, elem_ett
, elem_funcs
, &ei_gsm_a_unknown_pdu_type
);
1452 oct
= tvb_get_uint8(tvb
, curr_offset
);
1455 parm_len
= tvb_get_uint8(tvb
, curr_offset
+ 1);
1457 elem_name
= try_val_to_str_ext(idx
, &elem_names_ext
);
1459 /* idx is out of range */
1460 if (elem_name
== NULL
) {
1461 proto_tree_add_expert_format(tree
, pinfo
, &ei_gsm_a_unknown_element
,
1462 tvb
, curr_offset
, parm_len
+ 1 + lengt_length
,
1463 "Unknown - aborting dissection%s", (name_add
== NULL
) || (name_add
[0] == '\0') ? "" : name_add
);
1467 subtree
= proto_tree_add_subtree_format(tree
, tvb
, curr_offset
, parm_len
+ 1 + lengt_length
, elem_ett
[idx
], &item
,
1468 "%s%s", elem_name
, (name_add
== NULL
) || (name_add
[0] == '\0') ? "" : name_add
);
1470 proto_tree_add_uint(subtree
,
1471 get_hf_elem_id(pdu_type
), tvb
,
1472 curr_offset
, 1, oct
);
1474 proto_tree_add_uint(subtree
, hf_gsm_a_length
, tvb
,
1475 curr_offset
+ 1, lengt_length
, parm_len
);
1479 if (elem_funcs
[idx
] == NULL
)
1481 proto_tree_add_item(subtree
, hf_gsm_a_element_value
, tvb
, curr_offset
+ 1 + lengt_length
, parm_len
, ENC_NA
);
1482 /* See ASSERT above */
1483 consumed
= (uint8_t)parm_len
;
1489 a_add_string
= (char *)wmem_alloc(pinfo
->pool
, 1024);
1490 a_add_string
[0] = '\0';
1492 (*elem_funcs
[idx
])(tvb
, subtree
, pinfo
, curr_offset
+ 2,
1493 parm_len
, a_add_string
, 1024);
1495 if (a_add_string
[0] != '\0')
1497 proto_item_append_text(item
, "%s", a_add_string
);
1502 consumed
+= 1 + lengt_length
;
1509 * Type Extendable Length Value (TELV) element dissector
1510 * This is a version where the length field can be one or two octets depending
1511 * if the extension bit is set or not (TS 48.016 p 10.1.2).
1513 * octet 2 0/1 ext length
1516 uint16_t elem_telv(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo
, uint8_t iei
, int pdu_type
, int idx
, uint32_t offset
, unsigned len _U_
, const char *name_add
)
1520 uint8_t lengt_length
= 1;
1522 uint32_t curr_offset
;
1523 proto_tree
*subtree
;
1525 value_string_ext elem_names_ext
;
1527 const char *elem_name
;
1528 elem_func_hander elem_funcs
;
1530 curr_offset
= offset
;
1533 SET_ELEM_VARS(pdu_type
, elem_names_ext
, elem_ett
, elem_funcs
, &ei_gsm_a_unknown_pdu_type
);
1535 oct
= tvb_get_uint8(tvb
, curr_offset
);
1538 parm_len
= tvb_get_uint8(tvb
, curr_offset
+ 1);
1539 if ((parm_len
&0x80) == 0) {
1540 /* length in 2 octets */
1541 parm_len
= tvb_get_ntohs(tvb
, curr_offset
+ 1);
1544 parm_len
= parm_len
& 0x7f;
1547 elem_name
= try_val_to_str_ext(idx
, &elem_names_ext
);
1549 /* idx is out of range */
1550 if (elem_name
== NULL
) {
1551 proto_tree_add_expert_format(tree
, pinfo
, &ei_gsm_a_unknown_element
,
1552 tvb
, curr_offset
, parm_len
+ 1 + lengt_length
,
1553 "Unknown - aborting dissection%s", (name_add
== NULL
) || (name_add
[0] == '\0') ? "" : name_add
);
1557 subtree
= proto_tree_add_subtree_format(tree
, tvb
, curr_offset
, parm_len
+ 1 + lengt_length
, elem_ett
[idx
], &item
,
1558 "%s%s", elem_name
, (name_add
== NULL
) || (name_add
[0] == '\0') ? "" : name_add
);
1560 proto_tree_add_uint(subtree
,
1561 get_hf_elem_id(pdu_type
), tvb
,
1562 curr_offset
, 1, oct
);
1564 proto_tree_add_item(subtree
, hf_gsm_a_l_ext
, tvb
, curr_offset
+1, 1, ENC_BIG_ENDIAN
);
1566 proto_tree_add_uint(subtree
, hf_gsm_a_length
, tvb
,
1567 curr_offset
+ 1, lengt_length
, parm_len
);
1571 if (elem_funcs
[idx
] == NULL
)
1573 proto_tree_add_item(subtree
, hf_gsm_a_element_value
, tvb
, curr_offset
+ 1 + lengt_length
, parm_len
, ENC_NA
);
1574 /* See ASSERT above */
1575 consumed
= parm_len
;
1581 a_add_string
= (char*)wmem_alloc(pinfo
->pool
, 1024);
1582 a_add_string
[0] = '\0';
1584 (*elem_funcs
[idx
])(tvb
, subtree
, pinfo
, curr_offset
+ 1 + lengt_length
,
1585 parm_len
, a_add_string
, 1024);
1587 if (a_add_string
[0] != '\0')
1589 proto_item_append_text(item
, "%s", a_add_string
);
1594 consumed
+= 1 + lengt_length
;
1601 * Type Length Value Extended(TLV-E) element dissector
1603 * information elements of format LV-E or TLV-E with value part consisting of zero,
1604 * one or more octets and a maximum of 65535 octets (type 6). This category is used in EPS only.
1606 uint16_t elem_tlv_e(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo
, uint8_t iei
, int pdu_type
, int idx
, uint32_t offset
, unsigned len _U_
, const char *name_add
)
1611 uint32_t curr_offset
;
1612 proto_tree
*subtree
;
1614 value_string_ext elem_names_ext
;
1616 const char *elem_name
;
1617 elem_func_hander elem_funcs
;
1619 curr_offset
= offset
;
1622 SET_ELEM_VARS(pdu_type
, elem_names_ext
, elem_ett
, elem_funcs
, &ei_gsm_a_unknown_pdu_type
);
1624 oct
= tvb_get_uint8(tvb
, curr_offset
);
1627 parm_len
= tvb_get_ntohs(tvb
, curr_offset
+ 1);
1629 elem_name
= try_val_to_str_ext(idx
, &elem_names_ext
);
1631 /* idx is out of range */
1632 if (elem_name
== NULL
) {
1633 proto_tree_add_expert_format(tree
, pinfo
, &ei_gsm_a_unknown_element
,
1634 tvb
, curr_offset
, parm_len
+ 1 + 2,
1635 "Unknown - aborting dissection%s", (name_add
== NULL
) || (name_add
[0] == '\0') ? "" : name_add
);
1639 subtree
= proto_tree_add_subtree_format(tree
, tvb
, curr_offset
, parm_len
+ 1 + 2, elem_ett
[idx
], &item
,
1640 "%s%s", elem_name
, (name_add
== NULL
) || (name_add
[0] == '\0') ? "" : name_add
);
1642 proto_tree_add_uint(subtree
,
1643 get_hf_elem_id(pdu_type
), tvb
,
1644 curr_offset
, 1, oct
);
1646 proto_tree_add_uint(subtree
, hf_gsm_a_length
, tvb
,
1647 curr_offset
+ 1, 2, parm_len
);
1651 if (elem_funcs
[idx
] == NULL
)
1653 proto_tree_add_item(subtree
, hf_gsm_a_element_value
, tvb
, curr_offset
+ 1 + 2, parm_len
, ENC_NA
);
1654 /* See ASSERT above */
1655 consumed
= parm_len
;
1661 a_add_string
= (char*)wmem_alloc(pinfo
->pool
, 1024);
1662 a_add_string
[0] = '\0';
1664 (*elem_funcs
[idx
])(tvb
, subtree
, pinfo
, curr_offset
+ 1 + 2,
1665 parm_len
, a_add_string
, 1024);
1667 if (a_add_string
[0] != '\0')
1669 proto_item_append_text(item
, "%s", a_add_string
);
1681 * Type Value (TV) element dissector
1683 * Length cannot be used in these functions, big problem if a element dissector
1684 * is not defined for these.
1686 uint16_t elem_tv(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo
, uint8_t iei
, int pdu_type
, int idx
, uint32_t offset
, const char *name_add
)
1690 uint32_t curr_offset
;
1691 proto_tree
*subtree
;
1693 value_string_ext elem_names_ext
;
1695 const char *elem_name
;
1696 elem_func_hander elem_funcs
;
1698 curr_offset
= offset
;
1701 SET_ELEM_VARS(pdu_type
, elem_names_ext
, elem_ett
, elem_funcs
, &ei_gsm_a_unknown_pdu_type
);
1703 oct
= tvb_get_uint8(tvb
, curr_offset
);
1707 elem_name
= try_val_to_str_ext(idx
, &elem_names_ext
);
1709 /* idx is out of range */
1710 if (elem_name
== NULL
) {
1711 proto_tree_add_expert_format(tree
, pinfo
, &ei_gsm_a_unknown_element
,
1712 tvb
, curr_offset
, -1,
1713 "Unknown - aborting dissection%s", (name_add
== NULL
) || (name_add
[0] == '\0') ? "" : name_add
);
1717 subtree
= proto_tree_add_subtree_format(tree
, tvb
, curr_offset
, -1, elem_ett
[idx
], &item
,
1718 "%s%s", elem_name
, (name_add
== NULL
) || (name_add
[0] == '\0') ? "" : name_add
);
1720 proto_tree_add_uint(subtree
,
1721 get_hf_elem_id(pdu_type
), tvb
,
1722 curr_offset
, 1, oct
);
1724 if (elem_funcs
[idx
] == NULL
)
1726 /* BAD THING, CANNOT DETERMINE LENGTH */
1727 expert_add_info(pinfo
, item
, &ei_gsm_a_no_element_dissector
);
1735 a_add_string
= (char*)wmem_alloc(pinfo
->pool
, 1024);
1736 a_add_string
[0] = '\0';
1737 consumed
= (*elem_funcs
[idx
])(tvb
, subtree
, pinfo
, curr_offset
+ 1, -1, a_add_string
, 1024);
1739 if (a_add_string
[0] != '\0')
1741 proto_item_append_text(item
, "%s", a_add_string
);
1747 proto_item_set_len(item
, consumed
);
1754 * Type Value (TV) element dissector
1755 * Where top half nibble is IEI and bottom half nibble is value.
1757 * Length cannot be used in these functions, big problem if a element dissector
1758 * is not defined for these.
1760 uint16_t elem_tv_short(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo
, uint8_t iei
, int pdu_type
, int idx
, uint32_t offset
, const char *name_add
)
1764 uint32_t curr_offset
;
1765 proto_tree
*subtree
;
1767 value_string_ext elem_names_ext
;
1769 const char *elem_name
;
1770 elem_func_hander elem_funcs
;
1772 curr_offset
= offset
;
1775 SET_ELEM_VARS(pdu_type
, elem_names_ext
, elem_ett
, elem_funcs
, &ei_gsm_a_unknown_pdu_type
);
1777 oct
= tvb_get_uint8(tvb
, curr_offset
);
1779 if ((oct
& 0xf0) == (iei
& 0xf0))
1781 elem_name
= try_val_to_str_ext(idx
, &elem_names_ext
);
1783 /* idx is out of range */
1784 if (elem_name
== NULL
) {
1785 proto_tree_add_expert_format(tree
, pinfo
, &ei_gsm_a_unknown_element
,
1786 tvb
, curr_offset
, -1,
1787 "Unknown - aborting dissection%s", (name_add
== NULL
) || (name_add
[0] == '\0') ? "" : name_add
);
1791 subtree
= proto_tree_add_subtree_format(tree
, tvb
, curr_offset
, -1, elem_ett
[idx
], &item
,
1792 "%s%s", elem_name
, (name_add
== NULL
) || (name_add
[0] == '\0') ? "" : name_add
);
1794 proto_tree_add_uint_format_value(subtree
, hf_gsm_a_common_elem_id_f0
, tvb
, curr_offset
, 1, oct
, "0x%1x-", oct
>>4);
1796 if (elem_funcs
[idx
] == NULL
)
1798 /* BAD THING, CANNOT DETERMINE LENGTH */
1800 expert_add_info(pinfo
, item
, &ei_gsm_a_no_element_dissector
);
1808 a_add_string
= (char*)wmem_alloc(pinfo
->pool
, 1024);
1809 a_add_string
[0] = '\0';
1810 consumed
= (*elem_funcs
[idx
])(tvb
, subtree
, pinfo
, curr_offset
, RIGHT_NIBBLE
, a_add_string
, 1024);
1812 if (a_add_string
[0] != '\0')
1814 proto_item_append_text(item
, "%s", a_add_string
);
1818 proto_item_set_len(item
, consumed
);
1825 * Type (T) element dissector
1827 uint16_t elem_t(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo
, uint8_t iei
, int pdu_type
, int idx
, uint32_t offset
, const char *name_add
)
1830 uint32_t curr_offset
;
1832 value_string_ext elem_names_ext
;
1834 elem_func_hander elem_funcs
;
1836 curr_offset
= offset
;
1839 SET_ELEM_VARS(pdu_type
, elem_names_ext
, elem_ett
, elem_funcs
, &ei_gsm_a_unknown_pdu_type
);
1844 oct
= tvb_get_uint8(tvb
, curr_offset
);
1848 proto_tree_add_uint_format(tree
,
1849 get_hf_elem_id(pdu_type
), tvb
,
1850 curr_offset
, 1, oct
,
1852 val_to_str_ext(idx
, &elem_names_ext
, "Unknown (%u)"),
1853 (name_add
== NULL
) || (name_add
[0] == '\0') ? "" : name_add
);
1862 * Length Value (LV) element dissector
1865 elem_lv(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo
, int pdu_type
, int idx
, uint32_t offset
, unsigned len _U_
, const char *name_add
)
1869 uint32_t curr_offset
;
1870 proto_tree
*subtree
;
1872 value_string_ext elem_names_ext
;
1874 const char *elem_name
;
1875 elem_func_hander elem_funcs
;
1877 curr_offset
= offset
;
1880 SET_ELEM_VARS(pdu_type
, elem_names_ext
, elem_ett
, elem_funcs
, &ei_gsm_a_unknown_pdu_type
);
1882 parm_len
= tvb_get_uint8(tvb
, curr_offset
);
1884 elem_name
= try_val_to_str_ext(idx
, &elem_names_ext
);
1886 /* idx is out of range */
1887 if (elem_name
== NULL
) {
1888 proto_tree_add_expert_format(tree
, pinfo
, &ei_gsm_a_unknown_element
,
1889 tvb
, curr_offset
, parm_len
+ 1,
1890 "Unknown - aborting dissection%s", (name_add
== NULL
) || (name_add
[0] == '\0') ? "" : name_add
);
1894 subtree
= proto_tree_add_subtree_format(tree
, tvb
, curr_offset
, parm_len
+ 1, elem_ett
[idx
], &item
,
1895 "%s%s", elem_name
, (name_add
== NULL
) || (name_add
[0] == '\0') ? "" : name_add
);
1897 proto_tree_add_uint(subtree
, hf_gsm_a_length
, tvb
,
1898 curr_offset
, 1, parm_len
);
1902 if (elem_funcs
[idx
] == NULL
)
1904 proto_tree_add_item(subtree
, hf_gsm_a_element_value
, tvb
, curr_offset
+ 1, parm_len
, ENC_NA
);
1906 consumed
= parm_len
;
1912 a_add_string
= (char*)wmem_alloc(pinfo
->pool
, 1024);
1913 a_add_string
[0] = '\0';
1915 (*elem_funcs
[idx
])(tvb
, subtree
, pinfo
, curr_offset
+ 1,
1916 parm_len
, a_add_string
, 1024);
1918 if (a_add_string
[0] != '\0')
1920 proto_item_append_text(item
, "%s", a_add_string
);
1925 return (consumed
+ 1);
1929 * Length Value Extended(LV-E) element dissector
1931 uint16_t elem_lv_e(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo
, int pdu_type
, int idx
, uint32_t offset
, unsigned len _U_
, const char *name_add
)
1935 uint32_t curr_offset
;
1936 proto_tree
*subtree
;
1938 value_string_ext elem_names_ext
;
1940 const char *elem_name
;
1941 elem_func_hander elem_funcs
;
1943 curr_offset
= offset
;
1946 SET_ELEM_VARS(pdu_type
, elem_names_ext
, elem_ett
, elem_funcs
, &ei_gsm_a_unknown_pdu_type
);
1948 parm_len
= tvb_get_ntohs(tvb
, curr_offset
);
1950 elem_name
= try_val_to_str_ext(idx
, &elem_names_ext
);
1952 /* idx is out of range */
1953 if (elem_name
== NULL
) {
1954 proto_tree_add_expert_format(tree
, pinfo
, &ei_gsm_a_unknown_element
,
1955 tvb
, curr_offset
, parm_len
+ 2,
1956 "Unknown - aborting dissection%s", (name_add
== NULL
) || (name_add
[0] == '\0') ? "" : name_add
);
1960 subtree
= proto_tree_add_subtree_format(tree
, tvb
, curr_offset
, parm_len
+ 2, elem_ett
[idx
], &item
,
1961 "%s%s", elem_name
, (name_add
== NULL
) || (name_add
[0] == '\0') ? "" : name_add
);
1963 proto_tree_add_uint(subtree
, hf_gsm_a_length
, tvb
,
1964 curr_offset
, 2, parm_len
);
1968 if (elem_funcs
[idx
] == NULL
)
1970 proto_tree_add_item(subtree
, hf_gsm_a_element_value
, tvb
, curr_offset
+ 2, parm_len
, ENC_NA
);
1972 consumed
= parm_len
;
1978 a_add_string
= (char*)wmem_alloc(pinfo
->pool
, 1024);
1979 a_add_string
[0] = '\0';
1981 (*elem_funcs
[idx
])(tvb
, subtree
, pinfo
, curr_offset
+ 2,
1982 parm_len
, a_add_string
, 1024);
1984 if (a_add_string
[0] != '\0')
1986 proto_item_append_text(item
, "%s", a_add_string
);
1991 return (consumed
+ 2);
1994 * Value (V) element dissector
1996 * Length cannot be used in these functions, big problem if a element dissector
1997 * is not defined for these.
1999 uint16_t elem_v(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo
, int pdu_type
, int idx
, uint32_t offset
, const char *name_add
)
2002 uint32_t curr_offset
;
2003 proto_tree
*subtree
;
2005 value_string_ext elem_names_ext
;
2007 const char *elem_name
;
2008 elem_func_hander elem_funcs
;
2010 curr_offset
= offset
;
2013 SET_ELEM_VARS(pdu_type
, elem_names_ext
, elem_ett
, elem_funcs
, &ei_gsm_a_unknown_pdu_type
);
2015 elem_name
= try_val_to_str_ext(idx
, &elem_names_ext
);
2017 if (elem_name
== NULL
|| elem_funcs
[idx
] == NULL
)
2019 /* BAD THING, CANNOT DETERMINE LENGTH */
2020 proto_tree_add_expert(tree
, pinfo
, &ei_gsm_a_no_element_dissector
, tvb
, curr_offset
, 1);
2029 proto_tree_add_subtree_format(tree
,
2030 tvb
, curr_offset
, 0,
2031 elem_ett
[idx
], &item
, "%s%s", elem_name
,
2032 (name_add
== NULL
) || (name_add
[0] == '\0') ? "" : name_add
);
2034 a_add_string
= (char*)wmem_alloc(pinfo
->pool
, 1024);
2035 a_add_string
[0] = '\0';
2036 consumed
= (*elem_funcs
[idx
])(tvb
, subtree
, pinfo
, curr_offset
, -1, a_add_string
, 1024);
2037 if (a_add_string
[0] != '\0')
2039 proto_item_append_text(item
, "%s", a_add_string
);
2041 proto_item_set_len(item
, consumed
);
2048 * Short Value (V_SHORT) element dissector
2050 * nibble is used in this function to indicate right or left nibble of the octet
2051 * This is expected to be used right nibble first, as the tables of 24.008.
2054 uint16_t elem_v_short(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo
, int pdu_type
, int idx
, uint32_t offset
, uint32_t nibble
)
2056 uint16_t consumed
= 1;
2057 uint32_t curr_offset
;
2058 proto_tree
*subtree
;
2060 value_string_ext elem_names_ext
;
2062 elem_fcn
*elem_funcs
;
2064 const char *elem_name
;
2066 curr_offset
= offset
;
2068 SET_ELEM_VARS(pdu_type
, elem_names_ext
, elem_ett
, elem_funcs
, &ei_gsm_a_unknown_pdu_type
);
2070 elem_name
= try_val_to_str_ext(idx
, &elem_names_ext
);
2072 /* idx is out of range */
2073 if (elem_name
== NULL
) {
2074 proto_tree_add_expert(tree
, pinfo
, &ei_gsm_a_unknown_element
,
2075 tvb
, curr_offset
, 0);
2079 subtree
= proto_tree_add_subtree(tree
, tvb
, curr_offset
, 0, elem_ett
[idx
], &item
, elem_name
);
2081 a_add_string
= (char*)wmem_alloc(pinfo
->pool
, 1024);
2082 a_add_string
[0] = '\0';
2084 if (elem_funcs
[idx
] == NULL
)
2086 /* NOT NECESSARILY A BAD THING - LENGTH IS HALF OCTET */
2087 (void)de_spare_nibble(tvb
, subtree
, pinfo
, curr_offset
, nibble
, a_add_string
, 1024);
2091 (void)(*elem_funcs
[idx
])(tvb
, subtree
, pinfo
, curr_offset
, nibble
, a_add_string
, 1024);
2094 if (a_add_string
[0] != '\0')
2096 proto_item_append_text(item
, "%s", a_add_string
);
2098 proto_item_set_len(item
, consumed
);
2104 static dgt_set_t Dgt1_9_bcd
= {
2106 /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
2107 '0','1','2','3','4','5','6','7','8','9','?','?','?','?','?','?'
2114 * [3] 10.5.1.1 Cell Identity
2117 de_cell_id(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo
, uint32_t offset
, unsigned len
, char *add_string
, int string_len
)
2119 uint32_t curr_offset
;
2121 curr_offset
= offset
;
2125 be_cell_id_aux(tvb
, tree
, pinfo
, offset
, len
, add_string
, string_len
, 0x02);
2127 /* no length check possible */
2129 return (curr_offset
- offset
);
2132 * 10.5.1.2 Ciphering Key Sequence Number
2137 * Key sequence (octet 1)
2143 * Possible values for the ciphering key sequence number
2144 * 1 1 1 No key is available (MS to network);Reserved (network to MS)
2147 static const value_string gsm_a_key_seq_vals
[] = {
2148 { 0, "Ciphering key sequence number"},
2149 { 1, "Ciphering key sequence number"},
2150 { 2, "Ciphering key sequence number"},
2151 { 3, "Ciphering key sequence number"},
2152 { 4, "Ciphering key sequence number"},
2153 { 5, "Ciphering key sequence number"},
2154 { 6, "Ciphering key sequence number"},
2155 { 7, "No key is available (MS to network)"},
2160 de_ciph_key_seq_num( tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo _U_
, uint32_t offset
, unsigned len
, char *add_string _U_
, int string_len _U_
)
2162 uint32_t curr_offset
, bit_offset
;
2164 curr_offset
= offset
;
2166 if (RIGHT_NIBBLE
== len
)
2171 proto_tree_add_bits_item(tree
, hf_gsm_a_spare_bits
, tvb
, (curr_offset
<<3)+bit_offset
, 1, ENC_BIG_ENDIAN
);
2172 proto_tree_add_bits_item(tree
, hf_gsm_a_key_seq
, tvb
, (curr_offset
<<3)+bit_offset
+1, 3, ENC_BIG_ENDIAN
);
2175 return (curr_offset
- offset
);
2184 de_lai(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo
, uint32_t offset
, unsigned len _U_
, char *add_string _U_
, int string_len _U_
)
2187 uint32_t curr_offset
;
2188 proto_tree
*subtree
;
2192 curr_offset
= offset
;
2194 subtree
= proto_tree_add_subtree(tree
,
2195 tvb
, curr_offset
, 5, ett_gsm_common_elem
[DE_LAI
], &item
,
2196 val_to_str_ext_const(DE_LAI
, &gsm_common_elem_strings_ext
, ""));
2198 mcc_mnc_str
= dissect_e212_mcc_mnc_wmem_packet_str(tvb
, pinfo
, subtree
, curr_offset
, E212_LAI
, true);
2202 value
= tvb_get_ntohs(tvb
, curr_offset
);
2204 proto_tree_add_item(subtree
, hf_gsm_a_lac
, tvb
, curr_offset
, 2, ENC_BIG_ENDIAN
);
2206 proto_item_append_text(item
, " - %s, LAC %u", mcc_mnc_str
, value
);
2210 /* no length check possible */
2212 return (curr_offset
- offset
);
2216 * [3] 10.5.1.4 Mobile Identity
2217 * 3GPP TS 24.008 version 7.8.0 Release 7
2221 de_mid(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo
, uint32_t offset
, unsigned len
, char *add_string
, int string_len
)
2224 uint32_t curr_offset
;
2227 const char *digit_str
;
2230 curr_offset
= offset
;
2232 oct
= tvb_get_uint8(tvb
, curr_offset
);
2236 case 0: /* No Identity */
2237 proto_tree_add_item(tree
, hf_gsm_a_unused
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2238 proto_tree_add_item(tree
, hf_gsm_a_odd_even_ind
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2239 proto_tree_add_item(tree
, hf_gsm_a_mobile_identity_type
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2242 snprintf(add_string
, string_len
, " - No Identity Code");
2246 if (len
!= 1 && len
!= 3)
2248 expert_add_info(pinfo
, tree
, &ei_gsm_a_format_not_supported
);
2251 curr_offset
+= len
- 1;
2254 case 3: /* IMEISV */
2259 proto_tree_add_item(tree
, hf_gsm_a_id_dig_1
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2260 proto_tree_add_item(tree
, hf_gsm_a_odd_even_ind
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2261 proto_tree_add_item(tree
, hf_gsm_a_mobile_identity_type
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2263 if (curr_offset
- offset
>= len
) /* Sanity check */
2264 return (curr_offset
- offset
);
2266 if((oct
& 0x07) == 3){
2268 digit_str
= tvb_bcd_dig_to_str(pinfo
->pool
, tvb
,curr_offset
, len
- (curr_offset
- offset
), NULL
, true);
2269 proto_tree_add_string_format(tree
,
2271 tvb
, curr_offset
, len
- (curr_offset
- offset
),
2276 digit_str
= dissect_e212_imsi(tvb
, pinfo
, tree
, curr_offset
, len
- (curr_offset
- offset
), true);
2279 if (sccp_assoc
&& ! sccp_assoc
->calling_party
) {
2280 sccp_assoc
->calling_party
= wmem_strdup_printf(wmem_file_scope(),
2281 ((oct
& 0x07) == 3) ? "IMEISV: %s" : "IMSI: %s",
2286 snprintf(add_string
, string_len
, " - %s (%s)",
2287 ((oct
& 0x07) == 3) ? "IMEISV" : "IMSI",
2290 curr_offset
+= len
- (curr_offset
- offset
);
2294 proto_tree_add_item(tree
, hf_gsm_a_filler
, tvb
, curr_offset
- 1, 1, ENC_NA
);
2299 proto_tree_add_uint_format_value(tree
, hf_gsm_a_identity_digit1
, tvb
, curr_offset
, 1, oct
, "%c", Dgt1_9_bcd
.out
[(oct
& 0xf0) >> 4]);
2301 proto_tree_add_item(tree
, hf_gsm_a_odd_even_ind
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2303 proto_tree_add_item(tree
, hf_gsm_a_mobile_identity_type
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2305 if (curr_offset
- offset
>= len
) /* Sanity check */
2306 return (curr_offset
- offset
);
2308 digit_str
= tvb_bcd_dig_to_str(pinfo
->pool
, tvb
, curr_offset
, len
- (curr_offset
- offset
), NULL
, true);
2310 proto_tree_add_string_format(tree
,
2312 tvb
, curr_offset
, len
- (curr_offset
- offset
),
2318 snprintf(add_string
, string_len
, " - IMEI (%s)", digit_str
);
2320 curr_offset
+= len
- (curr_offset
- offset
);
2323 case 4: /* TMSI/P-TMSI/M-TMSI */
2324 proto_tree_add_item(tree
, hf_gsm_a_unused
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2325 proto_tree_add_item(tree
, hf_gsm_a_odd_even_ind
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2326 proto_tree_add_item(tree
, hf_gsm_a_mobile_identity_type
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2329 proto_tree_add_item_ret_uint(tree
, hf_3gpp_tmsi
, tvb
, curr_offset
, 4, ENC_BIG_ENDIAN
, &value
);
2332 snprintf(add_string
, string_len
, " - TMSI/P-TMSI (0x%04x)", value
);
2337 case 5: /* TMGI and optional MBMS Session Identity */
2338 /* Spare bits (octet 3) Bits 8-7 */
2339 proto_tree_add_bits_item(tree
, hf_gsm_a_spare_bits
, tvb
, curr_offset
<<3, 2, ENC_BIG_ENDIAN
);
2340 /* MBMS Session Identity indication (octet 3) Bit 6 */
2341 proto_tree_add_item(tree
, hf_gsm_a_mbs_ses_id_ind
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2342 /* MCC/MNC indication (octet 3) Bit 5 */
2343 proto_tree_add_item(tree
, hf_gsm_a_tmgi_mcc_mnc_ind
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2344 /* Odd/even indication (octet 3) Bit 4 */
2345 proto_tree_add_item(tree
, hf_gsm_a_odd_even_ind
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2346 /* Type of identity (octet 3) Bits 3-1 */
2347 proto_tree_add_item(tree
, hf_gsm_a_mobile_identity_type
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2349 /* MBMS Service ID (octet 4, 5 and 6) */
2350 proto_tree_add_item(tree
, hf_gsm_a_mbs_service_id
, tvb
, curr_offset
, 3, ENC_BIG_ENDIAN
);
2352 if ((oct
&0x10) == 0x10) {
2354 /* MCC, Mobile country code (octet 6a, octet 6b bits 1 to 4)*/
2355 /* MNC, Mobile network code (octet 6b bits 5 to 8, octet 6c) */
2356 curr_offset
= dissect_e212_mcc_mnc(tvb
, pinfo
, tree
, curr_offset
, E212_NONE
, true);
2358 if ((oct
&0x20) == 0x20) {
2359 /* MBMS Session Identity (octet 7)
2360 * The MBMS Session Identity field is encoded as the value part
2361 * of the MBMS Session Identity IE as specified in 3GPP TS 48.018 [86].
2363 proto_tree_add_item(tree
, hf_gsm_a_mbs_session_id
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2368 default: /* Reserved */
2369 proto_tree_add_item(tree
, hf_gsm_a_odd_even_ind
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2370 ti
= proto_tree_add_item(tree
, hf_gsm_a_mobile_identity_type
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2371 expert_add_info_format(pinfo
, ti
, &ei_gsm_a_mobile_identity_type
, "Unknown format %u", (oct
& 0x07));
2374 snprintf(add_string
, string_len
, " - Format Unknown");
2380 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
, pinfo
, &ei_gsm_a_extraneous_data
);
2382 return (curr_offset
- offset
);
2389 de_ms_cm_1(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo _U_
, uint32_t offset
, unsigned len _U_
, char *add_string _U_
, int string_len _U_
)
2391 uint32_t curr_offset
;
2392 proto_tree
*subtree
;
2394 curr_offset
= offset
;
2397 proto_tree_add_subtree(tree
,
2398 tvb
, curr_offset
, 1, ett_gsm_common_elem
[DE_MS_CM_1
], NULL
,
2399 val_to_str_ext_const(DE_MS_CM_1
, &gsm_common_elem_strings_ext
, ""));
2401 proto_tree_add_item(subtree
, hf_gsm_a_b8spare
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2403 proto_tree_add_item(subtree
, hf_gsm_a_MSC_rev
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2405 proto_tree_add_item(subtree
, hf_gsm_a_ES_IND
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2407 proto_tree_add_item(subtree
, hf_gsm_a_A5_1_algorithm_sup
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2409 proto_tree_add_item(subtree
, hf_gsm_a_RF_power_capability
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2413 /* no length check possible */
2415 return (curr_offset
- offset
);
2419 * [3] 10.5.1.6 Mobile Station Classmark 2
2420 * 3GPP TS 24.008 version 7.8.0 Release 7
2423 de_ms_cm_2(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo
, uint32_t offset
, unsigned len
, char *add_string _U_
, int string_len _U_
)
2425 uint32_t curr_offset
;
2426 curr_offset
= offset
;
2428 proto_tree_add_item(tree
, hf_gsm_a_b8spare
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2430 proto_tree_add_item(tree
, hf_gsm_a_MSC_rev
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2432 proto_tree_add_item(tree
, hf_gsm_a_ES_IND
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2434 proto_tree_add_item(tree
, hf_gsm_a_A5_1_algorithm_sup
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2436 proto_tree_add_item(tree
, hf_gsm_a_RF_power_capability
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2440 NO_MORE_DATA_CHECK(len
);
2442 proto_tree_add_item(tree
, hf_gsm_a_b8spare
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2444 proto_tree_add_item(tree
, hf_gsm_a_ps_sup_cap
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2446 proto_tree_add_item(tree
, hf_gsm_a_SS_screening_indicator
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2448 /* SM capability (MT SMS pt to pt capability) (octet 4)*/
2449 proto_tree_add_item(tree
, hf_gsm_a_SM_capability
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2450 /* VBS notification reception (octet 4) */
2451 proto_tree_add_item(tree
, hf_gsm_a_VBS_notification_rec
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2452 /*VGCS notification reception (octet 4)*/
2453 proto_tree_add_item(tree
, hf_gsm_a_VGCS_notification_rec
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2454 /* FC Frequency Capability (octet 4 ) */
2455 proto_tree_add_item(tree
, hf_gsm_a_FC_frequency_cap
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2459 NO_MORE_DATA_CHECK(len
);
2461 /* CM3 (octet 5, bit 8) */
2462 proto_tree_add_item(tree
, hf_gsm_a_CM3
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2464 proto_tree_add_item(tree
, hf_gsm_a_b7spare
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2465 /* LCS VA capability (LCS value added location request notification capability) (octet 5,bit 6) */
2466 proto_tree_add_item(tree
, hf_gsm_a_LCS_VA_cap
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2467 /* UCS2 treatment (octet 5, bit 5) */
2468 proto_tree_add_item(tree
, hf_gsm_a_UCS2_treatment
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2469 /* SoLSA (octet 5, bit 4) */
2470 proto_tree_add_item(tree
, hf_gsm_a_SoLSA
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2471 /* CMSP: CM Service Prompt (octet 5, bit 3) */
2472 proto_tree_add_item(tree
, hf_gsm_a_CMSP
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2473 /* A5/3 algorithm supported (octet 5, bit 2) */
2474 proto_tree_add_item(tree
, hf_gsm_a_A5_3_algorithm_sup
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2475 /* A5/2 algorithm supported (octet 5, bit 1) */
2476 proto_tree_add_item(tree
, hf_gsm_a_A5_2_algorithm_sup
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2480 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
, pinfo
, &ei_gsm_a_extraneous_data
);
2482 return (curr_offset
- offset
);
2486 * [3] 10.5.1.7 Mobile Station Classmark 3
2487 * 3GPP TS 24.008 version 12.10.0 Release 12
2489 #define AVAILABLE_BITS_CHECK(n) \
2490 bits_left = ((len + offset) << 3) - bit_offset; \
2491 if (bits_left < (n)) { \
2492 if (bits_left > 0) \
2493 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, bits_left, ENC_BIG_ENDIAN); \
2494 else if (bits_left < 0) \
2495 proto_tree_add_expert(tree, pinfo, &ei_gsm_a_ie_length_too_short, tvb, offset, len); \
2500 de_ms_cm_3(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo
, uint32_t offset
, unsigned len
, char *add_string _U_
, int string_len _U_
)
2502 uint32_t curr_offset
;
2503 uint32_t bit_offset
; /* Offset in bits */
2505 proto_tree
*subtree
;
2508 uint32_t target_bit_offset
, old_bit_offset
;
2509 uint64_t multi_bnd_sup_fields
, rsupport
, multislotCapability
;
2510 uint64_t msMeasurementCapability
, msPosMethodCapPresent
;
2511 uint64_t ecsdMultiSlotCapability
, eightPskStructPresent
, eightPskStructRfPowerCapPresent
;
2512 uint64_t gsm400BandInfoPresent
, gsm850AssocRadioCapabilityPresent
;
2513 uint64_t gsm1900AssocRadioCapabilityPresent
, dtmEGprsMultiSlotInfoPresent
;
2514 uint64_t dtmEgprsMultiSlotClassPresent
, singleBandSupport
;
2515 uint64_t gsm750AssocRadioCapabilityPresent
, extDtmEGprsMultiSlotInfoPresent
;
2516 uint64_t highMultislotCapPresent
, geranIuModeSupport
;
2517 uint64_t tGsm400BandInfoPresent
, tGsm900AssocRadioCapabilityPresent
, dtmEGprsHighMultiSlotInfoPresent
;
2518 uint64_t dtmEgprsHighMultiSlotClassPresent
, gsm710AssocRadioCapabilityPresent
;
2519 uint64_t tGsm810AssocRadioCapabilityPresent
;
2521 curr_offset
= offset
;
2523 bit_offset
= curr_offset
<< 3;
2526 proto_tree_add_bits_item(tree
, hf_gsm_a_spare_bits
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
2529 /* Multiband supported field
2530 * { < Multiband supported : { 000 } >
2532 * | < Multiband supported : { 101 | 110 } >
2534 * < Associated Radio Capability 2 : bit(4) >
2535 * < Associated Radio Capability 1 : bit(4) >
2536 * | < Multiband supported : { 001 | 010 | 100 } >
2539 * < Associated Radio Capability 1 : bit(4) > }
2542 item
= proto_tree_add_bits_ret_val(tree
, hf_gsm_a_multi_bnd_sup_fields
, tvb
, bit_offset
, 3, &multi_bnd_sup_fields
, ENC_BIG_ENDIAN
);
2543 subtree
= proto_item_add_subtree(item
, ett_gsm_common_elem
[DE_MS_CM_3
]);
2545 proto_tree_add_bits_item(subtree
, hf_gsm_a_gsm1800_supported
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
2548 proto_tree_add_bits_item(subtree
, hf_gsm_a_egsm_supported
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
2551 proto_tree_add_bits_item(subtree
, hf_gsm_a_pgsm_supported
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
2554 item
= proto_tree_add_bits_item(tree
, hf_gsm_a_cm3_A5_bits
, tvb
, bit_offset
, 4, ENC_BIG_ENDIAN
);
2555 subtree
= proto_item_add_subtree(item
, ett_gsm_common_elem
[DE_MS_CM_3
]);
2558 proto_tree_add_bits_item(subtree
, hf_gsm_a_A5_7_algorithm_sup
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
2560 proto_tree_add_bits_item(subtree
, hf_gsm_a_A5_6_algorithm_sup
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
2562 proto_tree_add_bits_item(subtree
, hf_gsm_a_A5_5_algorithm_sup
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
2564 proto_tree_add_bits_item(subtree
, hf_gsm_a_A5_4_algorithm_sup
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
2567 switch (multi_bnd_sup_fields
) {
2569 /* A5 bits dissected is done */
2572 * | < Multiband supported : { 001 | 010 | 100 } >
2577 /* < spare bit >(4) */
2578 proto_tree_add_bits_item(tree
, hf_gsm_a_spare_bits
, tvb
, bit_offset
, 4, ENC_BIG_ENDIAN
);
2580 /* < Associated Radio Capability 1 : bit(4) > */
2581 proto_tree_add_bits_item(tree
, hf_gsm_a_ass_radio_cap1
, tvb
, bit_offset
, 4, ENC_BIG_ENDIAN
);
2584 /* < Multiband supported : { 101 | 110 } > */
2588 /* < Associated Radio Capability 2 : bit(4) > */
2589 proto_tree_add_bits_item(tree
, hf_gsm_a_ass_radio_cap2
, tvb
, bit_offset
, 4, ENC_BIG_ENDIAN
);
2591 /* < Associated Radio Capability 1 : bit(4) > */
2592 proto_tree_add_bits_item(tree
, hf_gsm_a_ass_radio_cap1
, tvb
, bit_offset
, 4, ENC_BIG_ENDIAN
);
2598 /* Extract R Support */
2599 AVAILABLE_BITS_CHECK(1);
2600 proto_tree_add_bits_ret_val(tree
, hf_gsm_a_rsupport
, tvb
, bit_offset
, 1, &rsupport
, ENC_BIG_ENDIAN
);
2606 * { 0 | 1 < R Support > }
2607 * Extract R Capabilities
2609 proto_tree_add_bits_item(tree
, hf_gsm_a_r_capabilities
, tvb
, bit_offset
, 3, ENC_BIG_ENDIAN
);
2610 bit_offset
= bit_offset
+ 3;
2614 * { 0 | 1 < HSCSD Multi Slot Capability > }
2615 * Extract Multislot capability
2617 AVAILABLE_BITS_CHECK(1);
2618 proto_tree_add_bits_ret_val(tree
, hf_gsm_a_multislot_capabilities
, tvb
, bit_offset
, 1, &multislotCapability
, ENC_BIG_ENDIAN
);
2621 if (multislotCapability
== 1)
2623 /* Extract Multislot Class */
2624 proto_tree_add_bits_item(tree
, hf_gsm_a_multislot_class
, tvb
, bit_offset
, 5, ENC_BIG_ENDIAN
);
2625 bit_offset
= bit_offset
+ 5;
2628 /* < UCS2 treatment: bit > */
2629 AVAILABLE_BITS_CHECK(1);
2630 proto_tree_add_bits_item(tree
, hf_gsm_a_ucs2_treatment
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
2631 bit_offset
= bit_offset
+ 1;
2633 /* < Extended Measurement Capability : bit > */
2634 AVAILABLE_BITS_CHECK(1);
2635 proto_tree_add_bits_item(tree
, hf_gsm_a_extended_measurement_cap
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
2636 bit_offset
= bit_offset
+ 1;
2638 /* { 0 | 1 < MS measurement capability > }
2639 * Extract MS Measurement capability
2641 AVAILABLE_BITS_CHECK(1);
2642 proto_tree_add_bits_ret_val(tree
, hf_gsm_a_ms_measurement_capability
, tvb
, bit_offset
, 1, &msMeasurementCapability
, ENC_BIG_ENDIAN
);
2643 bit_offset
= bit_offset
+ 1;
2645 if (msMeasurementCapability
== 1)
2647 /* Extract SMS Value n/4 */
2648 proto_tree_add_bits_item(tree
, hf_gsm_a_sms_value
, tvb
, bit_offset
, 4, ENC_BIG_ENDIAN
);
2649 bit_offset
= bit_offset
+ 4;
2651 /* Extract SM Value n/4 */
2652 proto_tree_add_bits_item(tree
, hf_gsm_a_sm_value
, tvb
, bit_offset
, 4, ENC_BIG_ENDIAN
);
2653 bit_offset
= bit_offset
+ 4;
2656 /* { 0 | 1 < MS Positioning Method Capability > }
2657 * Extract MS Positioning Method Capability
2659 AVAILABLE_BITS_CHECK(1);
2660 proto_tree_add_bits_ret_val(tree
, hf_gsm_a_ms_pos_method_cap_present
, tvb
, bit_offset
, 1, &msPosMethodCapPresent
, ENC_BIG_ENDIAN
);
2661 bit_offset
= bit_offset
+ 1;
2663 if (msPosMethodCapPresent
== 1)
2665 /* Extract MS Positioning Method */
2666 item
= proto_tree_add_bits_item(tree
, hf_gsm_a_ms_pos_method
, tvb
, bit_offset
, 5, ENC_BIG_ENDIAN
);
2667 subtree
= proto_item_add_subtree(item
, ett_gsm_common_elem
[DE_MS_CM_3
]);
2669 proto_tree_add_bits_item(subtree
, hf_gsm_a_ms_assisted_e_otd
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
2672 proto_tree_add_bits_item(subtree
, hf_gsm_a_ms_based_e_otd
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
2675 proto_tree_add_bits_item(subtree
, hf_gsm_a_ms_assisted_gps
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
2678 proto_tree_add_bits_item(subtree
, hf_gsm_a_ms_based_gps
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
2681 proto_tree_add_bits_item(subtree
, hf_gsm_a_ms_conventional_gps
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
2685 /* { 0 | 1 < ECSD Multi Slot Capability > }
2686 * Extract ECSD Multi Slot Capability
2688 AVAILABLE_BITS_CHECK(1);
2689 proto_tree_add_bits_ret_val(tree
, hf_gsm_a_ecsd_multi_slot_capability
, tvb
, bit_offset
, 1, &ecsdMultiSlotCapability
, ENC_BIG_ENDIAN
);
2690 bit_offset
= bit_offset
+ 1;
2692 if (ecsdMultiSlotCapability
== 1)
2694 /* Extract ECSD Multi Slot Class */
2695 proto_tree_add_bits_item(tree
, hf_gsm_a_ecsd_multi_slot_class
, tvb
, bit_offset
, 5, ENC_BIG_ENDIAN
);
2696 bit_offset
= bit_offset
+ 5;
2699 /* { 0 | 1 < 8-PSK Struct > }
2700 * Extract 8-PSK struct presence
2702 AVAILABLE_BITS_CHECK(1);
2703 proto_tree_add_bits_ret_val(tree
, hf_gsm_a_8_psk_struct_present
, tvb
, bit_offset
, 1, &eightPskStructPresent
, ENC_BIG_ENDIAN
);
2704 bit_offset
= bit_offset
+ 1;
2706 if (eightPskStructPresent
== 1)
2708 /* At lesst Modulation Capability and cap1,cap2 present indicators are present */
2709 uint8_t psk_struct_len
= 3;
2710 uint32_t tmp_bit_offset
= bit_offset
;
2712 /* Check if Power Capability 1 is present */
2714 if (tvb_get_bits8(tvb
,tmp_bit_offset
,1) == 1){
2715 psk_struct_len
+= 2;
2716 tmp_bit_offset
+= 2;
2719 /* Check if Power Capability 2 is present */
2720 if (tvb_get_bits8(tvb
,tmp_bit_offset
,1) == 1){
2721 psk_struct_len
+= 2;
2723 /* Extract 8-PSK struct */
2724 item
= proto_tree_add_bits_item(tree
, hf_gsm_a_8_psk_struct
, tvb
, bit_offset
, psk_struct_len
, ENC_BIG_ENDIAN
);
2725 subtree
= proto_item_add_subtree(item
, ett_gsm_common_elem
[DE_MS_CM_3
]);
2726 old_bit_offset
= bit_offset
;
2728 /* Extract Modulation Capability */
2729 proto_tree_add_bits_item(subtree
, hf_gsm_a_modulation_capability
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
2730 bit_offset
= bit_offset
+ 1;
2732 /* Extract 8_PSK RF Power Capability 1 */
2733 proto_tree_add_bits_ret_val(subtree
, hf_gsm_a_8_psk_rf_power_capability_1_present
, tvb
, bit_offset
,
2734 1, &eightPskStructRfPowerCapPresent
, ENC_BIG_ENDIAN
);
2735 bit_offset
= bit_offset
+ 1;
2736 if (eightPskStructRfPowerCapPresent
== 1)
2738 proto_tree_add_bits_item(subtree
, hf_gsm_a_8_psk_rf_power_capability_1
, tvb
, bit_offset
, 2, ENC_BIG_ENDIAN
);
2739 bit_offset
= bit_offset
+ 2;
2742 /* Extract 8_PSK RF Power Capability 2 */
2743 proto_tree_add_bits_ret_val(subtree
, hf_gsm_a_8_psk_rf_power_capability_2_present
, tvb
, bit_offset
,
2744 1, &eightPskStructRfPowerCapPresent
, ENC_BIG_ENDIAN
);
2745 bit_offset
= bit_offset
+ 1;
2746 if (eightPskStructRfPowerCapPresent
== 1)
2748 proto_tree_add_bits_item(subtree
, hf_gsm_a_8_psk_rf_power_capability_2
, tvb
, bit_offset
, 2, ENC_BIG_ENDIAN
);
2749 bit_offset
= bit_offset
+ 2;
2751 length
= (uint8_t)((bit_offset
- old_bit_offset
)>>3);
2752 if ((bit_offset
- old_bit_offset
) & 0x07)
2754 proto_item_set_len(item
, length
);
2757 /* { 0 | 1 < GSM 400 Bands Supported : { 01 | 10 | 11 } >
2758 * < GSM 400 Associated Radio Capability: bit(4) > }
2759 * Extract GSM 400 Band Information presence
2761 AVAILABLE_BITS_CHECK(1);
2762 proto_tree_add_bits_ret_val(tree
, hf_gsm_a_gsm_400_band_info_present
, tvb
, bit_offset
, 1, &gsm400BandInfoPresent
, ENC_BIG_ENDIAN
);
2763 bit_offset
= bit_offset
+ 1;
2765 if (gsm400BandInfoPresent
== 1)
2767 /* Extract GSM 400 Bands Supported */
2768 proto_tree_add_bits_item(tree
, hf_gsm_a_gsm_400_bands_supported
, tvb
, bit_offset
, 2, ENC_BIG_ENDIAN
);
2769 bit_offset
= bit_offset
+ 2;
2771 /* Extract GSM 400 Associated Radio Capability */
2772 proto_tree_add_bits_item(tree
, hf_gsm_a_gsm_400_assoc_radio_cap
, tvb
, bit_offset
, 4, ENC_BIG_ENDIAN
);
2773 bit_offset
= bit_offset
+ 4;
2776 /* { 0 | 1 <GSM 850 Associated Radio Capability : bit(4) > }
2777 * Extract GSM 850 Associated Radio Capability presence
2779 AVAILABLE_BITS_CHECK(1);
2780 proto_tree_add_bits_ret_val(tree
, hf_gsm_a_gsm_850_assoc_radio_cap_present
, tvb
, bit_offset
, 1, &gsm850AssocRadioCapabilityPresent
, ENC_BIG_ENDIAN
);
2781 bit_offset
= bit_offset
+ 1;
2783 if (gsm850AssocRadioCapabilityPresent
== 1)
2785 /* Extract GSM 850 Associated Radio Capability */
2786 proto_tree_add_bits_item(tree
, hf_gsm_a_gsm_850_assoc_radio_cap
, tvb
, bit_offset
, 4, ENC_BIG_ENDIAN
);
2787 bit_offset
= bit_offset
+ 4;
2790 /* { 0 | 1 <GSM 1900 Associated Radio Capability : bit(4) > }
2791 * Extract GSM 1900 Associated Radio Capability presence
2793 AVAILABLE_BITS_CHECK(1);
2794 proto_tree_add_bits_ret_val(tree
, hf_gsm_a_gsm_1900_assoc_radio_cap_present
, tvb
, bit_offset
, 1, &gsm1900AssocRadioCapabilityPresent
, ENC_BIG_ENDIAN
);
2795 bit_offset
= bit_offset
+ 1;
2797 if (gsm1900AssocRadioCapabilityPresent
== 1)
2799 /* Extract GSM 1900 Associated Radio Capability */
2800 proto_tree_add_bits_item(tree
, hf_gsm_a_gsm_1900_assoc_radio_cap
, tvb
, bit_offset
, 4, ENC_BIG_ENDIAN
);
2801 bit_offset
= bit_offset
+ 4;
2804 /* < UMTS FDD Radio Access Technology Capability : bit >
2805 * Extract UMTS FDD Radio Access Technology Capability
2807 AVAILABLE_BITS_CHECK(1);
2808 proto_tree_add_bits_item(tree
, hf_gsm_a_umts_fdd_rat_cap
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
2809 bit_offset
= bit_offset
+ 1;
2811 /* < UMTS 3.84 Mcps TDD Radio Access Technology Capability : bit >
2812 * Extract UMTS 3.84 Mcps TDD Radio Access Technology Capability
2814 AVAILABLE_BITS_CHECK(1);
2815 proto_tree_add_bits_item(tree
, hf_gsm_a_umts_384_mcps_tdd_rat_cap
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
2816 bit_offset
= bit_offset
+ 1;
2818 /* < CDMA 2000 Radio Access Technology Capability : bit >
2819 * Extract CDMA 2000 Radio Access Technology Capability
2821 AVAILABLE_BITS_CHECK(1);
2822 proto_tree_add_bits_item(tree
, hf_gsm_a_cdma_2000_rat_cap
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
2823 bit_offset
= bit_offset
+ 1;
2825 /* { 0 | 1 < DTM GPRS Multi Slot Class : bit(2) >
2826 * < Single Slot DTM : bit >
2827 * {0 | 1< DTM EGPRS Multi Slot Class : bit(2) > } }
2828 * Extract DTM E/GPRS Information presence
2830 AVAILABLE_BITS_CHECK(1);
2831 proto_tree_add_bits_ret_val(tree
, hf_gsm_a_dtm_e_gprs_multi_slot_info_present
, tvb
, bit_offset
, 1, &dtmEGprsMultiSlotInfoPresent
, ENC_BIG_ENDIAN
);
2832 bit_offset
= bit_offset
+ 1;
2834 if (dtmEGprsMultiSlotInfoPresent
== 1)
2836 /* Extract DTM GPRS Multi Slot Class */
2837 proto_tree_add_bits_item(tree
, hf_gsm_a_dtm_gprs_multi_slot_class
, tvb
, bit_offset
, 2, ENC_BIG_ENDIAN
);
2838 bit_offset
= bit_offset
+ 2;
2840 /* Extract Single Slot DTM */
2841 proto_tree_add_bits_item(tree
, hf_gsm_a_single_slot_dtm
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
2842 bit_offset
= bit_offset
+ 1;
2844 /* Extract DTM EGPRS Multi Slot Class Presence */
2845 proto_tree_add_bits_ret_val(tree
, hf_gsm_a_dtm_egprs_multi_slot_class_present
, tvb
, bit_offset
, 1, &dtmEgprsMultiSlotClassPresent
, ENC_BIG_ENDIAN
);
2846 bit_offset
= bit_offset
+ 1;
2848 /* Extract DTM EGPRS Multi Slot Class */
2849 if (dtmEgprsMultiSlotClassPresent
== 1)
2851 proto_tree_add_bits_item(tree
, hf_gsm_a_dtm_egprs_multi_slot_class
, tvb
, bit_offset
, 2, ENC_BIG_ENDIAN
);
2852 bit_offset
= bit_offset
+ 2;
2857 * Release 4 starts here
2859 * { 0 | 1 < Single Band Support > } -- Release 4 starts here:
2860 * Extract Single Band Support
2862 AVAILABLE_BITS_CHECK(1);
2863 proto_tree_add_bits_ret_val(tree
, hf_gsm_a_single_band_support
, tvb
, bit_offset
, 1, &singleBandSupport
, ENC_BIG_ENDIAN
);
2864 bit_offset
= bit_offset
+ 1;
2866 if (singleBandSupport
== 1)
2868 /* Extract Single Band Support */
2869 proto_tree_add_bits_item(tree
, hf_gsm_a_gsm_band
, tvb
, bit_offset
, 4, ENC_BIG_ENDIAN
);
2870 bit_offset
= bit_offset
+ 4;
2873 /* { 0 | 1 <GSM 750 Associated Radio Capability : bit(4) > }
2874 * Extract GSM 750 Associated Radio Capability presence
2876 AVAILABLE_BITS_CHECK(1);
2877 proto_tree_add_bits_ret_val(tree
, hf_gsm_a_gsm_750_assoc_radio_cap_present
, tvb
, bit_offset
, 1, &gsm750AssocRadioCapabilityPresent
, ENC_BIG_ENDIAN
);
2878 bit_offset
= bit_offset
+ 1;
2880 if (gsm750AssocRadioCapabilityPresent
== 1)
2882 /* Extract GSM 750 Associated Radio Capability */
2883 proto_tree_add_bits_item(tree
, hf_gsm_a_gsm_750_assoc_radio_cap
, tvb
, bit_offset
, 4, ENC_BIG_ENDIAN
);
2884 bit_offset
= bit_offset
+ 4;
2887 /* < UMTS 1.28 Mcps TDD Radio Access Technology Capability : bit >
2888 * Extract UMTS 1.28 Mcps TDD Radio Access Technology Capability
2890 AVAILABLE_BITS_CHECK(1);
2891 proto_tree_add_bits_item(tree
, hf_gsm_a_umts_128_mcps_tdd_rat_cap
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
2892 bit_offset
= bit_offset
+ 1;
2894 /* < GERAN Feature Package 1 : bit >
2895 * Extract GERAN Feature Package 1
2897 AVAILABLE_BITS_CHECK(1);
2898 proto_tree_add_bits_item(tree
, hf_gsm_a_geran_feature_package_1
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
2899 bit_offset
= bit_offset
+ 1;
2901 /* { 0 | 1 < Extended DTM GPRS Multi Slot Class : bit(2) >
2902 * < Extended DTM EGPRS Multi Slot Class : bit(2) > }
2903 * Extract Extended DTM E/GPRS Information presence
2905 AVAILABLE_BITS_CHECK(1);
2906 proto_tree_add_bits_ret_val(tree
, hf_gsm_a_ext_dtm_e_gprs_multi_slot_info_present
, tvb
, bit_offset
, 1, &extDtmEGprsMultiSlotInfoPresent
, ENC_BIG_ENDIAN
);
2907 bit_offset
= bit_offset
+ 1;
2909 if (extDtmEGprsMultiSlotInfoPresent
== 1)
2911 /* Extract Extended DTM GPRS Multi Slot Class */
2912 proto_tree_add_bits_item(tree
, hf_gsm_a_ext_dtm_gprs_multi_slot_class
, tvb
, bit_offset
, 2, ENC_BIG_ENDIAN
);
2913 bit_offset
= bit_offset
+ 2;
2915 /* Extract Extended DTM EGPRS Multi Slot Class */
2916 proto_tree_add_bits_item(tree
, hf_gsm_a_ext_dtm_egprs_multi_slot_class
, tvb
, bit_offset
, 2, ENC_BIG_ENDIAN
);
2917 bit_offset
= bit_offset
+ 2;
2921 * Release 5 starts here
2923 * { 0 | 1 < High Multislot Capability : bit(2) > } -- Release 5 starts here.
2924 * Extract High Multislot Capability presence
2926 AVAILABLE_BITS_CHECK(1);
2927 proto_tree_add_bits_ret_val(tree
, hf_gsm_a_high_multislot_cap_present
, tvb
, bit_offset
, 1, &highMultislotCapPresent
, ENC_BIG_ENDIAN
);
2928 bit_offset
= bit_offset
+ 1;
2930 if (highMultislotCapPresent
== 1)
2932 /* Extract High Multislot Capability */
2933 proto_tree_add_bits_item(tree
, hf_gsm_a_high_multislot_cap
, tvb
, bit_offset
, 2, ENC_BIG_ENDIAN
);
2934 bit_offset
= bit_offset
+ 2;
2938 * { 0 | 1 < GERAN Iu Mode Capabilities > } -- "1" also means support of GERAN Iu mode
2939 * Extract GERAN Iu Mode Capabilities presence
2941 AVAILABLE_BITS_CHECK(1);
2942 proto_tree_add_bits_ret_val(tree
, hf_gsm_a_geran_iu_mode_support
, tvb
, bit_offset
, 1, &geranIuModeSupport
, ENC_BIG_ENDIAN
);
2943 bit_offset
= bit_offset
+ 1;
2945 if (geranIuModeSupport
== 1)
2947 /* Extract GERAN Iu Mode Capabilities Length */
2948 length
= tvb_get_bits8(tvb
, bit_offset
, 4);
2950 /* Extract GERAN Iu Mode Capabilities */
2951 item
= proto_tree_add_bits_item(tree
, hf_gsm_a_geran_iu_mode_cap
, tvb
, bit_offset
, length
+ 4, ENC_BIG_ENDIAN
);
2952 subtree
= proto_item_add_subtree(item
, ett_gsm_common_elem
[DE_MS_CM_3
]);
2954 /* Add GERAN Iu Mode Capabilities Length in subtree */
2955 proto_tree_add_bits_item(subtree
, hf_gsm_a_geran_iu_mode_cap_length
, tvb
, bit_offset
, 4, ENC_BIG_ENDIAN
);
2957 target_bit_offset
= bit_offset
+ length
;
2959 /* Extract FLO Iu Capability */
2960 proto_tree_add_bits_item(subtree
, hf_gsm_a_flo_iu_cap
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
2963 /* If needed, add spare bits */
2964 if (target_bit_offset
> bit_offset
)
2966 proto_tree_add_bits_item(subtree
, hf_gsm_a_spare_bits
, tvb
, bit_offset
, target_bit_offset
- bit_offset
, ENC_BIG_ENDIAN
);
2967 bit_offset
= target_bit_offset
;
2971 /* < GERAN Feature Package 2 : bit >
2972 * Extract GERAN Feature Package 2
2974 AVAILABLE_BITS_CHECK(1);
2975 proto_tree_add_bits_item(tree
, hf_gsm_a_geran_feature_package_2
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
2976 bit_offset
= bit_offset
+ 1;
2978 /* < GMSK Multislot Power Profile : bit (2) >
2979 * Extract GMSK Multislot Power Profile
2981 AVAILABLE_BITS_CHECK(2);
2982 proto_tree_add_bits_item(tree
, hf_gsm_a_gmsk_multislot_power_prof
, tvb
, bit_offset
, 2, ENC_BIG_ENDIAN
);
2983 bit_offset
= bit_offset
+ 2;
2985 /* < 8-PSK Multislot Power Profile : bit (2) >
2986 * Extract GMSK Multislot Power Profile
2988 AVAILABLE_BITS_CHECK(2);
2989 proto_tree_add_bits_item(tree
, hf_gsm_a_8_psk_multislot_power_prof
, tvb
, bit_offset
, 2, ENC_BIG_ENDIAN
);
2990 bit_offset
= bit_offset
+ 2;
2993 * Release 6 starts here
2995 * { 0 | 1 < T-GSM 400 Bands Supported : { 01 | 10 | 11 } > -- Release 6 starts here.
2996 * < T-GSM 400 Associated Radio Capability: bit(4) > }
2998 AVAILABLE_BITS_CHECK(1);
2999 proto_tree_add_bits_ret_val(tree
, hf_gsm_a_t_gsm_400_band_info_present
, tvb
, bit_offset
, 1, &tGsm400BandInfoPresent
, ENC_BIG_ENDIAN
);
3000 bit_offset
= bit_offset
+ 1;
3002 if (tGsm400BandInfoPresent
== 1)
3004 /* Extract T-GSM 400 Bands Supported */
3005 proto_tree_add_bits_item(tree
, hf_gsm_a_t_gsm_400_bands_supported
, tvb
, bit_offset
, 2, ENC_BIG_ENDIAN
);
3006 bit_offset
= bit_offset
+ 2;
3008 /* Extract T-GSM 400 Associated Radio Capability */
3009 proto_tree_add_bits_item(tree
, hf_gsm_a_t_gsm_400_assoc_radio_cap
, tvb
, bit_offset
, 4, ENC_BIG_ENDIAN
);
3010 bit_offset
= bit_offset
+ 4;
3013 /* { 0 | 1 < T-GSM 900 Associated Radio Capability: bit(4) > }
3014 * Extract T-GSM 900 Associated Radio Capability presence
3016 AVAILABLE_BITS_CHECK(1);
3017 proto_tree_add_bits_ret_val(tree
, hf_gsm_a_t_gsm_900_assoc_radio_cap_present
, tvb
, bit_offset
, 1, &tGsm900AssocRadioCapabilityPresent
, ENC_BIG_ENDIAN
);
3018 bit_offset
= bit_offset
+ 1;
3020 if (tGsm900AssocRadioCapabilityPresent
== 1)
3022 /* Extract T-GSM 900 Associated Radio Capability */
3023 proto_tree_add_bits_item(tree
, hf_gsm_a_t_gsm_900_assoc_radio_cap
, tvb
, bit_offset
, 4, ENC_BIG_ENDIAN
);
3024 bit_offset
= bit_offset
+ 4;
3027 /* < Downlink Advanced Receiver Performance : bit (2)>
3028 * Extract Downlink Advanced Receiver Performance
3030 AVAILABLE_BITS_CHECK(2);
3031 proto_tree_add_bits_item(tree
, hf_gsm_a_downlink_adv_receiver_perf
, tvb
, bit_offset
, 2, ENC_BIG_ENDIAN
);
3032 bit_offset
= bit_offset
+ 2;
3034 /* < DTM Enhancements Capability : bit >
3035 * Extract DTM Enhancements Capability
3037 AVAILABLE_BITS_CHECK(1);
3038 proto_tree_add_bits_item(tree
, hf_gsm_a_dtm_enhancements_cap
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
3039 bit_offset
= bit_offset
+ 1;
3041 /* { 0 | 1 < DTM GPRS High Multi Slot Class : bit(3) >
3042 * < Offset required : bit>
3043 * { 0 | 1 < DTM EGPRS High Multi Slot Class : bit(3) > } }
3044 * Extract DTM E/GPRS High Multi Slot Information presence
3046 AVAILABLE_BITS_CHECK(1);
3047 proto_tree_add_bits_ret_val(tree
, hf_gsm_a_dtm_e_gprs_high_multi_slot_info_present
, tvb
, bit_offset
, 1, &dtmEGprsHighMultiSlotInfoPresent
, ENC_BIG_ENDIAN
);
3048 bit_offset
= bit_offset
+ 1;
3050 if (dtmEGprsHighMultiSlotInfoPresent
== 1)
3052 /* Extract DTM GPRS High Multi Slot Class */
3053 proto_tree_add_bits_item(tree
, hf_gsm_a_dtm_gprs_high_multi_slot_class
, tvb
, bit_offset
, 3, ENC_BIG_ENDIAN
);
3054 bit_offset
= bit_offset
+ 3;
3056 /* Extract Offset Required */
3057 proto_tree_add_bits_item(tree
, hf_gsm_a_offset_required
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
3058 bit_offset
= bit_offset
+ 1;
3060 /* Extract DTM EGPRS High Multi Slot Class Presence */
3061 proto_tree_add_bits_ret_val(tree
, hf_gsm_a_dtm_egprs_high_multi_slot_class_present
, tvb
, bit_offset
, 1, &dtmEgprsHighMultiSlotClassPresent
, ENC_BIG_ENDIAN
);
3062 bit_offset
= bit_offset
+ 1;
3064 /* Extract DTM EGPRS High Multi Slot Class */
3065 if (dtmEgprsHighMultiSlotClassPresent
== 1)
3067 proto_tree_add_bits_item(tree
, hf_gsm_a_dtm_egprs_high_multi_slot_class
, tvb
, bit_offset
, 3, ENC_BIG_ENDIAN
);
3068 bit_offset
= bit_offset
+ 3;
3072 /* < Repeated ACCH Capability : bit >
3073 * Extract Repeated ACCH Capability
3075 AVAILABLE_BITS_CHECK(1);
3076 proto_tree_add_bits_item(tree
, hf_gsm_a_repeated_acch_cap
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
3077 bit_offset
= bit_offset
+ 1;
3080 * Release 7 starts here
3082 * { 0 | 1 <GSM 710 Associated Radio Capability : bit(4) > } -- Release 7 starts here.
3083 * Extract GSM 710 Associated Radio Capability presence
3085 AVAILABLE_BITS_CHECK(1);
3086 proto_tree_add_bits_ret_val(tree
, hf_gsm_a_gsm_710_assoc_radio_cap_present
, tvb
, bit_offset
, 1, &gsm710AssocRadioCapabilityPresent
, ENC_BIG_ENDIAN
);
3087 bit_offset
= bit_offset
+ 1;
3089 if (gsm710AssocRadioCapabilityPresent
== 1)
3091 /* Extract GSM 710 Associated Radio Capability */
3092 proto_tree_add_bits_item(tree
, hf_gsm_a_gsm_710_assoc_radio_cap
, tvb
, bit_offset
, 4, ENC_BIG_ENDIAN
);
3093 bit_offset
= bit_offset
+ 4;
3096 /* { 0 | 1 < T-GSM 810 Associated Radio Capability: bit(4) > }
3097 * Extract T-GSM 810 Associated Radio Capability presence
3099 AVAILABLE_BITS_CHECK(1);
3100 proto_tree_add_bits_ret_val(tree
, hf_gsm_a_t_gsm_810_assoc_radio_cap_present
, tvb
, bit_offset
, 1, &tGsm810AssocRadioCapabilityPresent
, ENC_BIG_ENDIAN
);
3101 bit_offset
= bit_offset
+ 1;
3103 if (tGsm810AssocRadioCapabilityPresent
== 1)
3105 /* Extract T-GSM 810 Associated Radio Capability */
3106 proto_tree_add_bits_item(tree
, hf_gsm_a_t_gsm_810_assoc_radio_cap
, tvb
, bit_offset
, 4, ENC_BIG_ENDIAN
);
3107 bit_offset
= bit_offset
+ 4;
3110 /* < Ciphering Mode Setting Capability : bit >
3111 * Extract Ciphering Mode Setting Capability
3113 AVAILABLE_BITS_CHECK(1);
3114 proto_tree_add_bits_item(tree
, hf_gsm_a_ciphering_mode_setting_cap
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
3115 bit_offset
= bit_offset
+ 1;
3117 /* < Additional Positioning Capabilities : bit >
3118 * Extract Additional Positioning Capabilities
3120 AVAILABLE_BITS_CHECK(1);
3121 proto_tree_add_bits_item(tree
, hf_gsm_a_additional_positioning_caps
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
3122 bit_offset
= bit_offset
+ 1;
3125 * Release 8 starts here
3127 * <E-UTRA FDD support : bit > -- Release 8 starts here.
3128 * Extract E-UTRA FDD support
3130 AVAILABLE_BITS_CHECK(1);
3131 proto_tree_add_bits_item(tree
, hf_gsm_a_e_utra_fdd_support
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
3132 bit_offset
= bit_offset
+ 1;
3135 * <E-UTRA TDD support : bit >
3136 * Extract E-UTRA TDD support
3138 AVAILABLE_BITS_CHECK(1);
3139 proto_tree_add_bits_item(tree
, hf_gsm_a_e_utra_tdd_support
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
3140 bit_offset
= bit_offset
+ 1;
3143 * <E-UTRA Measurement and Reporting support : bit >
3144 * Extract E-UTRA Measurement and Reporting support
3146 AVAILABLE_BITS_CHECK(1);
3147 proto_tree_add_bits_item(tree
, hf_gsm_a_e_utra_meas_and_report_support
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
3148 bit_offset
= bit_offset
+ 1;
3151 * <Priority-based reselection support : bit >
3152 * Extract Priority-based reselection support
3154 AVAILABLE_BITS_CHECK(1);
3155 proto_tree_add_bits_item(tree
, hf_gsm_a_prio_based_resel_support
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
3156 bit_offset
= bit_offset
+ 1;
3159 * Release 9 starts here
3161 * <UTRA CSG Cells Reporting : bit > -- Release 9 starts here.
3162 * Extract UTRA CSG Cells Reporting
3164 AVAILABLE_BITS_CHECK(1);
3165 proto_tree_add_bits_item(tree
, hf_gsm_a_utra_csg_cells_reporting
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
3166 bit_offset
= bit_offset
+ 1;
3169 * <VAMOS Level : bit(2) >
3170 * Extract VAMOS Level
3172 AVAILABLE_BITS_CHECK(2);
3173 proto_tree_add_bits_item(tree
, hf_gsm_a_vamos_level
, tvb
, bit_offset
, 2, ENC_BIG_ENDIAN
);
3174 bit_offset
= bit_offset
+ 2;
3177 * Release 10 starts here
3179 * < TIGHTER Capability : bit(2) > -- Release 10 starts here.
3180 * Extract TIGHTER Capability
3182 AVAILABLE_BITS_CHECK(2);
3183 proto_tree_add_bits_item(tree
, hf_gsm_a_tighter_cap
, tvb
, bit_offset
, 2, ENC_BIG_ENDIAN
);
3184 bit_offset
= bit_offset
+ 2;
3187 * < Selective Ciphering of Downlink SACCH : bit >
3188 * Extract Selective Ciphering of Downlink SACCH
3190 AVAILABLE_BITS_CHECK(1);
3191 proto_tree_add_bits_item(tree
, hf_gsm_a_selective_ciph_down_sacch
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
3192 bit_offset
= bit_offset
+ 1;
3195 * Release 11 starts here
3197 * < CS to PS SRVCC from GERAN to UTRA : bit(2) > -- Release 11 starts here
3199 AVAILABLE_BITS_CHECK(2);
3200 proto_tree_add_bits_item(tree
, hf_gsm_a_cs_to_ps_srvcc_geran_to_utra
, tvb
, bit_offset
, 2, ENC_BIG_ENDIAN
);
3201 bit_offset
= bit_offset
+ 2;
3204 * < CS to PS SRVCC from GERAN to E-UTRA : bit(2)>
3206 AVAILABLE_BITS_CHECK(2);
3207 proto_tree_add_bits_item(tree
, hf_gsm_a_cs_to_ps_srvcc_geran_to_eutra
, tvb
, bit_offset
, 2, ENC_BIG_ENDIAN
);
3208 bit_offset
= bit_offset
+ 2;
3211 * < GERAN Network Sharing support : bit(1)>
3213 AVAILABLE_BITS_CHECK(1);
3214 proto_tree_add_bits_item(tree
, hf_gsm_a_geran_network_sharing_support
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
3215 bit_offset
= bit_offset
+ 1;
3218 * < E-UTRA Wideband RSRQ measurements support : bit(1)>
3220 AVAILABLE_BITS_CHECK(1);
3221 proto_tree_add_bits_item(tree
, hf_gsm_a_eutra_wb_rsrq_support
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
3222 bit_offset
= bit_offset
+ 1;
3225 * Release 12 starts here
3227 * < ER Band support : bit(1) > -- Release 12 starts here
3229 AVAILABLE_BITS_CHECK(1);
3230 proto_tree_add_bits_item(tree
, hf_gsm_a_er_band_support
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
3231 bit_offset
= bit_offset
+ 1;
3234 * < UTRA Multiple Frequency Band Indicators support : bit(1)>
3236 AVAILABLE_BITS_CHECK(1);
3237 proto_tree_add_bits_item(tree
, hf_gsm_a_utra_mfbi_support
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
3238 bit_offset
= bit_offset
+ 1;
3241 * < E-UTRA Multiple Frequency Band Indicators support : bit(1)>
3243 AVAILABLE_BITS_CHECK(1);
3244 proto_tree_add_bits_item(tree
, hf_gsm_a_eutra_mfbi_support
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
3245 bit_offset
= bit_offset
+ 1;
3248 * < Extended TSC Set Capability support : bit(1)>
3250 AVAILABLE_BITS_CHECK(1);
3251 proto_tree_add_bits_item(tree
, hf_gsm_a_ext_tsc_set_cap_support
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
3252 bit_offset
= bit_offset
+ 1;
3255 * < Extended EARFCN value range : bit(1)>
3257 AVAILABLE_BITS_CHECK(1);
3258 proto_tree_add_bits_item(tree
, hf_gsm_a_ext_earfcn_value_range
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
3259 bit_offset
= bit_offset
+ 1;
3262 * Add spare bits until we reach an octet boundary
3264 bits_left
= (((len
+ offset
) << 3) - bit_offset
) & 0x07;
3267 proto_tree_add_bits_item(tree
, hf_gsm_a_spare_bits
, tvb
, bit_offset
, bits_left
, ENC_BIG_ENDIAN
);
3268 bit_offset
+= bits_left
;
3271 /* translate to byte offset (we already know that we are on an octet boundary) */
3272 curr_offset
= bit_offset
>> 3;
3273 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
, pinfo
, &ei_gsm_a_extraneous_data
);
3280 uint16_t de_spare_nibble(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo _U_
, uint32_t offset
, unsigned len
, char *add_string _U_
, int string_len _U_
)
3282 uint32_t curr_offset
;
3285 curr_offset
= offset
;
3286 if (RIGHT_NIBBLE
== len
)
3291 proto_tree_add_bits_item(tree
, hf_gsm_a_spare_nibble
, tvb
, (curr_offset
<<3)+bit_offset
, 4, ENC_BIG_ENDIAN
);
3292 curr_offset
= curr_offset
+ 1;
3294 return (curr_offset
- offset
);
3298 * [3] 10.5.1.9 Descriptive group or broadcast call reference
3300 static const true_false_string tfs_vgcs_vbs
= { "VGCS (Group call reference)", "VBS (Broadcast call reference)" };
3302 static const value_string gsm_a_call_priority_vals
[] = {
3303 { 0, "no priority applied"},
3304 { 1, "call priority level 4"},
3305 { 2, "call priority level 3"},
3306 { 3, "call priority level 2"},
3307 { 4, "call priority level 1"},
3308 { 5, "call priority level 0"},
3309 { 6, "call priority level B"},
3310 { 7, "call priority level A"},
3315 de_d_gb_call_ref(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo _U_
, uint32_t offset
, unsigned len _U_
, char *add_string _U_
, int string_len _U_
)
3317 uint32_t curr_offset
= offset
;
3319 proto_tree_add_item(tree
, hf_gsm_a_group_call_reference
, tvb
, curr_offset
, 4, ENC_BIG_ENDIAN
);
3320 proto_tree_add_item(tree
, hf_gsm_a_service_flag
, tvb
, curr_offset
, 4, ENC_BIG_ENDIAN
);
3321 proto_tree_add_item(tree
, hf_gsm_a_af_acknowledgement
, tvb
, curr_offset
, 4, ENC_BIG_ENDIAN
);
3322 proto_tree_add_item(tree
, hf_gsm_a_call_priority
, tvb
, curr_offset
, 4, ENC_BIG_ENDIAN
);
3325 proto_tree_add_item(tree
, hf_gsm_a_ciphering_info
, tvb
, curr_offset
, 1, ENC_NA
);
3327 proto_tree_add_bits_item(tree
, hf_gsm_a_spare_bits
, tvb
, (curr_offset
<<3)+4, 4, ENC_BIG_ENDIAN
);
3330 /* no length check possible */
3332 return (curr_offset
- offset
);
3336 * [3] 10.5.1.10a PD and SAPI $(CCBS)$
3338 static const value_string gsm_a_sapi_vals
[] = {
3347 de_pd_sapi(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo _U_
, uint32_t offset
, unsigned len _U_
, char *add_string _U_
, int string_len _U_
)
3349 uint32_t curr_offset
;
3350 proto_tree
*subtree
;
3352 curr_offset
= offset
;
3355 proto_tree_add_subtree(tree
,
3356 tvb
, curr_offset
, 1, ett_gsm_dtap_elem
[DE_PD_SAPI
], NULL
,
3357 val_to_str_ext_const(DE_PD_SAPI
, &gsm_dtap_elem_strings_ext
, ""));
3359 proto_tree_add_bits_item(tree
, hf_gsm_a_spare_bits
, tvb
, curr_offset
<<3, 2, ENC_BIG_ENDIAN
);
3361 proto_tree_add_item(subtree
, hf_gsm_a_sapi
, tvb
, curr_offset
, 1, ENC_NA
);
3363 proto_tree_add_item(tree
, hf_gsm_a_L3_protocol_discriminator
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
3367 /* no length check possible */
3369 return (curr_offset
- offset
);
3373 * [3] 10.5.1.11 Priority Level
3375 static const value_string gsm_a_call_prio_vals
[] = {
3376 { 0x00, "no priority applied" },
3377 { 0x01, "call priority level 4" },
3378 { 0x02, "call priority level 3" },
3379 { 0x03, "call priority level 2" },
3380 { 0x04, "call priority level 1" },
3381 { 0x05, "call priority level 0" },
3382 { 0x06, "call priority level B" },
3383 { 0x07, "call priority level A" },
3388 de_prio(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo _U_
, uint32_t offset
, unsigned len _U_
, char *add_string _U_
, int string_len _U_
)
3390 uint32_t curr_offset
;
3392 curr_offset
= offset
;
3394 proto_tree_add_item(tree
, hf_gsm_a_b8spare
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
3395 proto_tree_add_bits_item(tree
, hf_gsm_a_call_prio
, tvb
, (curr_offset
<<3)+5, 3, ENC_BIG_ENDIAN
);
3398 /* no length check possible */
3400 return (curr_offset
- offset
);
3404 * [3] 10.5.1.12.1 CN Common GSM-MAP NAS system information
3407 de_cn_common_gsm_map_nas_sys_info(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo
, uint32_t offset
, unsigned len
, char *add_string _U_
, int string_len _U_
)
3409 uint32_t curr_offset
;
3411 curr_offset
= offset
;
3413 proto_tree_add_item(tree
, hf_gsm_a_lac
, tvb
, curr_offset
, 2, ENC_BIG_ENDIAN
);
3416 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
, pinfo
, &ei_gsm_a_extraneous_data
);
3418 return (curr_offset
- offset
);
3422 * [3] 10.5.1.12.2 CS domain specific system information
3424 static const true_false_string gsm_a_att_value
= {
3425 "MSs shall apply IMSI attach and detach procedure",
3426 "MSs shall not apply IMSI attach and detach procedure"
3430 de_cs_domain_spec_sys_info(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo
, uint32_t offset
, unsigned len
, char *add_string _U_
, int string_len _U_
)
3432 uint32_t curr_offset
;
3434 curr_offset
= offset
;
3436 proto_tree_add_item(tree
, hf_gsm_a_rr_t3212
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
3438 proto_tree_add_bits_item(tree
, hf_gsm_a_spare_bits
, tvb
, (curr_offset
<<3), 7, ENC_BIG_ENDIAN
);
3439 proto_tree_add_item(tree
, hf_gsm_a_att
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
3442 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
, pinfo
, &ei_gsm_a_extraneous_data
);
3444 return (curr_offset
- offset
);
3448 * [3] 10.5.1.12.3 PS domain specific system information
3450 static const true_false_string gsm_a_nmo_1_value
= {
3451 "Network Mode of Operation I is used for MS configured for NMO_I_Behaviour",
3452 "Network Mode of Operation indicated in Bit 1 (NMO) is used for MS configured for NMO_I_Behaviour"
3455 static const true_false_string gsm_a_nmo_value
= {
3456 "Network Mode of Operation II",
3457 "Network Mode of Operation I"
3461 de_ps_domain_spec_sys_info(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo
, uint32_t offset
, unsigned len
, char *add_string _U_
, int string_len _U_
)
3463 uint32_t curr_offset
;
3465 curr_offset
= offset
;
3467 proto_tree_add_item(tree
, hf_gsm_a_gm_rac
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
3469 proto_tree_add_bits_item(tree
, hf_gsm_a_spare_bits
, tvb
, (curr_offset
<<3), 6, ENC_BIG_ENDIAN
);
3470 proto_tree_add_item(tree
, hf_gsm_a_nmo_1
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
3471 proto_tree_add_item(tree
, hf_gsm_a_nmo
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
3474 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
, pinfo
, &ei_gsm_a_extraneous_data
);
3476 return (curr_offset
- offset
);
3480 * [3] 10.5.1.13 PLMN list
3483 de_plmn_list(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo
, uint32_t offset
, unsigned len
, char *add_string
, int string_len
)
3486 uint32_t curr_offset
;
3488 proto_tree
* subtree
;
3490 curr_offset
= offset
;
3493 while ((len
- (curr_offset
- offset
)) >= 3)
3495 subtree
= proto_tree_add_subtree_format(tree
, tvb
, curr_offset
, 3, ett_gsm_a_plmn
, NULL
, "PLMN[%u]", num_plmn
+ 1);
3496 mcc_mnc_str
= dissect_e212_mcc_mnc_wmem_packet_str(tvb
, pinfo
, subtree
, curr_offset
, E212_NONE
, true);
3497 proto_item_append_text(subtree
, ": %s", mcc_mnc_str
);
3505 snprintf(add_string
, string_len
, " - %u PLMN%s",
3506 num_plmn
, plurality(num_plmn
, "", "s"));
3508 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
, pinfo
, &ei_gsm_a_extraneous_data
);
3510 return (curr_offset
- offset
);
3514 * 10.5.1.14 NAS container for PS HO
3517 static const value_string gsm_a_pld_xid_vals
[] = {
3518 { 0x00, "The MS shall perform a Reset of LLC and SNDCP without old XID indicator" },
3519 { 0x01, "The MS shall perform a Reset of LLC and SNDCP with old XID indicator" },
3524 de_nas_cont_for_ps_ho(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo
, uint32_t offset
, unsigned len
, char *add_string _U_
, int string_len _U_
)
3526 uint32_t curr_offset
;
3528 curr_offset
= offset
;
3531 * 0 0 0 old 0 Type of ciphering
3532 * spare spare spare XID spare algorithm
3534 proto_tree_add_item(tree
, hf_gsm_a_old_xid
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
3535 proto_tree_add_item(tree
, hf_gsm_a_type_of_ciph_alg
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
3538 /* IOV-UI value (octet 2 to 5)
3539 * The IOV-UI value consists of 32 bits, the format is defined in 3GPP TS 44.064 [78a].
3541 proto_tree_add_item(tree
, hf_gsm_a_iov_ui
, tvb
, curr_offset
, 4, ENC_BIG_ENDIAN
);
3544 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
, pinfo
, &ei_gsm_a_extraneous_data
);
3546 return (curr_offset
- offset
);
3550 * 10.5.1.15 MS network feature support
3552 static const true_false_string gsm_a_ext_periodic_timers_value
= {
3553 "MS supports the extended periodic timer in this domain",
3554 "MS does not support the extended periodic timer in this domain"
3558 de_ms_net_feat_sup(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo _U_
, uint32_t offset
, unsigned len _U_
, char *add_string _U_
, int string_len _U_
)
3560 uint32_t curr_offset
, bit_offset
;
3562 curr_offset
= offset
;
3563 bit_offset
= (curr_offset
<<3)+4;
3565 proto_tree_add_bits_item(tree
, hf_gsm_a_spare_bits
, tvb
, bit_offset
, 3, ENC_BIG_ENDIAN
);
3567 proto_tree_add_bits_item(tree
, hf_gsm_a_ext_periodic_timers
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
3570 return (curr_offset
- offset
);
3574 uint16_t (*common_elem_fcn
[])(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo
, uint32_t offset
, unsigned len
, char *add_string
, int string_len
) = {
3575 /* Common Information Elements 10.5.1 */
3576 de_cell_id
, /* Cell Identity */
3577 de_ciph_key_seq_num
, /* Ciphering Key Sequence Number */
3578 de_lai
, /* Location Area Identification */
3579 de_mid
, /* Mobile Identity */
3580 de_ms_cm_1
, /* Mobile Station Classmark 1 */
3581 de_ms_cm_2
, /* Mobile Station Classmark 2 */
3582 de_ms_cm_3
, /* Mobile Station Classmark 3 */
3583 de_spare_nibble
, /* Spare Half Octet */
3584 de_d_gb_call_ref
, /* Descriptive group or broadcast call reference */
3585 NULL
/* handled inline */, /* Group Cipher Key Number */
3586 de_pd_sapi
, /* PD and SAPI $(CCBS)$ */
3588 de_prio
/* handled inline */, /* Priority Level */
3589 de_cn_common_gsm_map_nas_sys_info
, /* 10.5.1.12.1 CN Common GSM-MAP NAS system information */
3590 de_cs_domain_spec_sys_info
, /* 10.5.1.12.2 CS domain specific system information */
3591 de_ps_domain_spec_sys_info
, /* 10.5.1.12.2 PS domain specific system information */
3592 de_plmn_list
, /* 10.5.1.13 PLMN list */
3593 de_nas_cont_for_ps_ho
, /* 10.5.1.14 NAS container for PS HO */
3594 de_ms_net_feat_sup
, /* 10.5.1.15 MS network feature support */
3604 } gsm_a_stat_columns
;
3606 static stat_tap_table_item gsm_a_stat_fields
[] = {
3607 {TABLE_ITEM_UINT
, TAP_ALIGN_RIGHT
, "IEI", "%d"},
3608 {TABLE_ITEM_STRING
, TAP_ALIGN_LEFT
, "Message Name", "%-25s"},
3609 {TABLE_ITEM_UINT
, TAP_ALIGN_RIGHT
, "Count", "%d"}
3612 static void gsm_a_stat_init(stat_tap_table_ui
* new_stat
, const char *table_title
, const value_string
*msg_strings
)
3614 int num_fields
= array_length(gsm_a_stat_fields
);
3615 stat_tap_table
* table
;
3617 stat_tap_table_item_type items
[array_length(gsm_a_stat_fields
)];
3619 items
[IEI_COLUMN
].type
= TABLE_ITEM_UINT
;
3620 items
[MSG_NAME_COLUMN
].type
= TABLE_ITEM_STRING
;
3621 items
[COUNT_COLUMN
].type
= TABLE_ITEM_UINT
;
3622 items
[COUNT_COLUMN
].value
.uint_value
= 0;
3624 table
= stat_tap_find_table(new_stat
, table_title
);
3626 if (new_stat
->stat_tap_reset_table_cb
) {
3627 new_stat
->stat_tap_reset_table_cb(table
);
3632 table
= stat_tap_init_table(table_title
, num_fields
, 0, NULL
);
3633 stat_tap_add_table(new_stat
, table
);
3635 /* Add a row for each value type */
3636 for (i
= 0; i
< 256; i
++)
3638 const char *msg_str
= try_val_to_str(i
, msg_strings
);
3641 col_str
= g_strdup(msg_str
);
3643 col_str
= ws_strdup_printf("Unknown message %d", i
);
3646 items
[IEI_COLUMN
].value
.uint_value
= i
;
3647 items
[MSG_NAME_COLUMN
].value
.string_value
= col_str
;
3648 stat_tap_init_table_row(table
, i
, num_fields
, items
);
3652 static void gsm_a_bssmap_stat_init(stat_tap_table_ui
* new_stat
)
3654 gsm_a_stat_init(new_stat
,
3655 "GSM A-I/F BSSMAP Statistics", gsm_a_bssmap_msg_strings
);
3658 static void gsm_a_dtap_mm_stat_init(stat_tap_table_ui
* new_stat
)
3660 gsm_a_stat_init(new_stat
,
3661 "GSM A-I/F DTAP Mobility Management Statistics", gsm_a_dtap_msg_mm_strings
);
3664 static void gsm_a_dtap_rr_stat_init(stat_tap_table_ui
* new_stat
)
3666 gsm_a_stat_init(new_stat
,
3667 "GSM A-I/F DTAP Radio Resource Management Statistics", gsm_a_dtap_msg_rr_strings
);
3670 static void gsm_a_dtap_cc_stat_init(stat_tap_table_ui
* new_stat
)
3672 gsm_a_stat_init(new_stat
,
3673 "GSM A-I/F DTAP Call Control Statistics", gsm_a_dtap_msg_cc_strings
);
3676 static void gsm_a_dtap_gmm_stat_init(stat_tap_table_ui
* new_stat
)
3678 gsm_a_stat_init(new_stat
,
3679 "GSM A-I/F DTAP GPRS Mobility Management Statistics", gsm_a_dtap_msg_gmm_strings
);
3682 static void gsm_a_dtap_sm_stat_init(stat_tap_table_ui
* new_stat
)
3684 gsm_a_stat_init(new_stat
,
3685 "GSM A-I/F DTAP GPRS Session Management Statistics", gsm_a_dtap_msg_sm_strings
);
3688 static void gsm_a_dtap_sms_stat_init(stat_tap_table_ui
* new_stat
)
3690 gsm_a_stat_init(new_stat
,
3691 "GSM A-I/F DTAP Short Message Service Statistics", gsm_a_dtap_msg_sms_strings
);
3694 static void gsm_a_dtap_tp_stat_init(stat_tap_table_ui
* new_stat
)
3696 gsm_a_stat_init(new_stat
,
3697 "GSM A-I/F DTAP Special Conformance Testing Functions", gsm_a_dtap_msg_tp_strings
);
3700 static void gsm_a_dtap_ss_stat_init(stat_tap_table_ui
* new_stat
)
3702 gsm_a_stat_init(new_stat
,
3703 "GSM A-I/F DTAP Supplementary Services Statistics", gsm_a_dtap_msg_ss_strings
);
3706 static void gsm_a_sacch_rr_stat_init(stat_tap_table_ui
* new_stat
)
3708 gsm_a_stat_init(new_stat
,
3709 "GSM A-I/F SACCH Statistics", gsm_a_rr_short_pd_msg_strings
);
3712 static tap_packet_status
3713 gsm_a_stat_packet(void *tapdata
, const void *gatr_ptr
, uint8_t pdu_type
, int protocol_disc
)
3715 stat_data_t
* stat_data
= (stat_data_t
*)tapdata
;
3716 const gsm_a_tap_rec_t
*gatr
= (const gsm_a_tap_rec_t
*) gatr_ptr
;
3717 stat_tap_table
* table
;
3718 stat_tap_table_item_type
* msg_data
;
3720 if (gatr
->pdu_type
!= pdu_type
) return TAP_PACKET_DONT_REDRAW
;
3721 if (pdu_type
== BSSAP_PDU_TYPE_DTAP
&& (int)gatr
->protocol_disc
!= protocol_disc
) return TAP_PACKET_DONT_REDRAW
;
3722 if (pdu_type
== GSM_A_PDU_TYPE_SACCH
&& gatr
->protocol_disc
!= 0) return TAP_PACKET_DONT_REDRAW
;
3724 table
= g_array_index(stat_data
->stat_tap_data
->tables
, stat_tap_table
*, 0);
3725 msg_data
= stat_tap_get_field_data(table
, gatr
->message_type
, COUNT_COLUMN
);
3726 msg_data
->value
.uint_value
++;
3727 stat_tap_set_field_data(table
, gatr
->message_type
, COUNT_COLUMN
, msg_data
);
3729 return TAP_PACKET_REDRAW
;
3732 static tap_packet_status
3733 gsm_a_bssmap_stat_packet(void *tapdata
, packet_info
*pinfo _U_
, epan_dissect_t
*edt _U_
, const void *gatr_ptr
, tap_flags_t flags _U_
)
3735 return gsm_a_stat_packet(tapdata
, gatr_ptr
, BSSAP_PDU_TYPE_BSSMAP
, 0);
3738 static tap_packet_status
3739 gsm_a_dtap_mm_stat_packet(void *tapdata
, packet_info
*pinfo _U_
, epan_dissect_t
*edt _U_
, const void *gatr_ptr
, tap_flags_t flags _U_
)
3741 return gsm_a_stat_packet(tapdata
, gatr_ptr
, BSSAP_PDU_TYPE_DTAP
, PD_MM
);
3744 static tap_packet_status
3745 gsm_a_dtap_rr_stat_packet(void *tapdata
, packet_info
*pinfo _U_
, epan_dissect_t
*edt _U_
, const void *gatr_ptr
, tap_flags_t flags _U_
)
3747 return gsm_a_stat_packet(tapdata
, gatr_ptr
, BSSAP_PDU_TYPE_DTAP
, PD_RR
);
3750 static tap_packet_status
3751 gsm_a_dtap_cc_stat_packet(void *tapdata
, packet_info
*pinfo _U_
, epan_dissect_t
*edt _U_
, const void *gatr_ptr
, tap_flags_t flags _U_
)
3753 return gsm_a_stat_packet(tapdata
, gatr_ptr
, BSSAP_PDU_TYPE_DTAP
, PD_CC
);
3756 static tap_packet_status
3757 gsm_a_dtap_gmm_stat_packet(void *tapdata
, packet_info
*pinfo _U_
, epan_dissect_t
*edt _U_
, const void *gatr_ptr
, tap_flags_t flags _U_
)
3759 return gsm_a_stat_packet(tapdata
, gatr_ptr
, BSSAP_PDU_TYPE_DTAP
, PD_GMM
);
3762 static tap_packet_status
3763 gsm_a_dtap_sms_stat_packet(void *tapdata
, packet_info
*pinfo _U_
, epan_dissect_t
*edt _U_
, const void *gatr_ptr
, tap_flags_t flags _U_
)
3765 return gsm_a_stat_packet(tapdata
, gatr_ptr
, BSSAP_PDU_TYPE_DTAP
, PD_SMS
);
3768 static tap_packet_status
3769 gsm_a_dtap_sm_stat_packet(void *tapdata
, packet_info
*pinfo _U_
, epan_dissect_t
*edt _U_
, const void *gatr_ptr
, tap_flags_t flags _U_
)
3771 return gsm_a_stat_packet(tapdata
, gatr_ptr
, BSSAP_PDU_TYPE_DTAP
, PD_SM
);
3774 static tap_packet_status
3775 gsm_a_dtap_ss_stat_packet(void *tapdata
, packet_info
*pinfo _U_
, epan_dissect_t
*edt _U_
, const void *gatr_ptr
, tap_flags_t flags _U_
)
3777 return gsm_a_stat_packet(tapdata
, gatr_ptr
, BSSAP_PDU_TYPE_DTAP
, PD_SS
);
3780 static tap_packet_status
3781 gsm_a_dtap_tp_stat_packet(void *tapdata
, packet_info
*pinfo _U_
, epan_dissect_t
*edt _U_
, const void *gatr_ptr
, tap_flags_t flags _U_
)
3783 return gsm_a_stat_packet(tapdata
, gatr_ptr
, BSSAP_PDU_TYPE_DTAP
, PD_TP
);
3786 static tap_packet_status
3787 gsm_a_sacch_rr_stat_packet(void *tapdata
, packet_info
*pinfo _U_
, epan_dissect_t
*edt _U_
, const void *gatr_ptr
, tap_flags_t flags _U_
)
3789 return gsm_a_stat_packet(tapdata
, gatr_ptr
, GSM_A_PDU_TYPE_SACCH
, 0);
3793 gsm_a_stat_reset(stat_tap_table
* table
)
3796 stat_tap_table_item_type
* item_data
;
3798 for (element
= 0; element
< table
->num_elements
; element
++)
3800 item_data
= stat_tap_get_field_data(table
, element
, COUNT_COLUMN
);
3801 item_data
->value
.uint_value
= 0;
3802 stat_tap_set_field_data(table
, element
, COUNT_COLUMN
, item_data
);
3807 gsm_a_stat_free_table_item(stat_tap_table
* table _U_
, unsigned row _U_
, unsigned column
, stat_tap_table_item_type
* field_data
)
3809 if (column
!= MSG_NAME_COLUMN
) return;
3810 g_free((char*)field_data
->value
.string_value
);
3813 /* Register the protocol with Wireshark */
3815 proto_register_gsm_a_common(void)
3818 unsigned last_offset
;
3820 /* Setup list of header fields */
3821 static hf_register_info hf
[] =
3823 { &hf_gsm_a_common_elem_id
,
3824 { "Element ID", "gsm_a.common.elem_id",
3825 FT_UINT8
, BASE_HEX
, NULL
, 0,
3828 { &hf_gsm_a_common_elem_id_f0
,
3829 { "Element ID", "gsm_a.common.elem_id",
3830 FT_UINT8
, BASE_HEX
, NULL
, 0xF0,
3834 { "ext", "gsm_a.l_ext",
3835 FT_UINT8
, BASE_DEC
, NULL
, 0x80,
3839 { "TMSI/P-TMSI", "gsm_a.tmsi",
3840 FT_UINT32
, BASE_DEC_HEX
, 0, 0x0,
3844 { "IMEI", "gsm_a.imei",
3845 FT_STRING
, BASE_NONE
, 0, 0,
3849 { "IMEISV", "gsm_a.imeisv",
3850 FT_STRING
, BASE_NONE
, 0, 0,
3853 { &hf_gsm_a_MSC_rev
,
3854 { "Revision Level", "gsm_a.MSC_rev",
3855 FT_UINT8
, BASE_DEC
, VALS(gsm_a_msc_rev_vals
), 0x60,
3859 { "ES IND", "gsm_a.ES_IND",
3860 FT_BOOLEAN
, 8, TFS(&ES_IND_vals
), 0x10,
3863 { &hf_gsm_a_A5_1_algorithm_sup
,
3864 { "A5/1 algorithm supported", "gsm_a.A5_1_algorithm_sup",
3865 FT_BOOLEAN
, 8, TFS(&A5_1_algorithm_sup_vals
), 0x08,
3868 { &hf_gsm_a_RF_power_capability
,
3869 { "RF Power Capability", "gsm_a.RF_power_capability",
3870 FT_UINT8
, BASE_DEC
, VALS(RF_power_capability_vals
), 0x07,
3873 { &hf_gsm_a_ps_sup_cap
,
3874 { "PS capability (pseudo-synchronization capability)", "gsm_a.ps_sup_cap",
3875 FT_BOOLEAN
, 8, TFS(&ps_sup_cap_vals
), 0x40,
3878 { &hf_gsm_a_SS_screening_indicator
,
3879 { "SS Screening Indicator", "gsm_a.SS_screening_indicator",
3880 FT_UINT8
, BASE_DEC
, VALS(SS_screening_indicator_vals
), 0x30,
3883 { &hf_gsm_a_SM_capability
,
3884 { "SM capability (MT SMS pt to pt capability)", "gsm_a.SM_cap",
3885 FT_BOOLEAN
, 8, TFS(&SM_capability_vals
), 0x08,
3888 { &hf_gsm_a_VBS_notification_rec
,
3889 { "VBS notification reception", "gsm_a.VBS_notification_rec",
3890 FT_BOOLEAN
, 8, TFS(&VBS_notification_rec_vals
), 0x04,
3893 { &hf_gsm_a_VGCS_notification_rec
,
3894 { "VGCS notification reception", "gsm_a.VGCS_notification_rec",
3895 FT_BOOLEAN
, 8, TFS(&VGCS_notification_rec_vals
), 0x02,
3898 { &hf_gsm_a_FC_frequency_cap
,
3899 { "FC Frequency Capability", "gsm_a.FC_frequency_cap",
3900 FT_BOOLEAN
, 8, TFS(&FC_frequency_cap_vals
), 0x01,
3904 { "CM3", "gsm_a.CM3",
3905 FT_BOOLEAN
, 8, TFS(&CM3_vals
), 0x80,
3908 { &hf_gsm_a_LCS_VA_cap
,
3909 { "LCS VA capability (LCS value added location request notification capability)", "gsm_a.LCS_VA_cap",
3910 FT_BOOLEAN
, 8, TFS(&LCS_VA_cap_vals
), 0x20,
3913 { &hf_gsm_a_UCS2_treatment
,
3914 { "UCS2 treatment", "gsm_a.UCS2_treatment",
3915 FT_BOOLEAN
, 8, TFS(&UCS2_treatment_vals
), 0x10,
3919 { "SoLSA", "gsm_a.SoLSA",
3920 FT_BOOLEAN
, 8, TFS(&SoLSA_vals
), 0x08,
3924 { "CMSP: CM Service Prompt", "gsm_a.CMSP",
3925 FT_BOOLEAN
, 8, TFS(&CMSP_vals
), 0x04,
3928 { &hf_gsm_a_A5_7_algorithm_sup
,
3929 { "A5/7 algorithm supported", "gsm_a.A5_7_algorithm_sup",
3930 FT_BOOLEAN
, BASE_NONE
, TFS(&A5_7_algorithm_sup_vals
), 0x0,
3933 { &hf_gsm_a_A5_6_algorithm_sup
,
3934 { "A5/6 algorithm supported", "gsm_a.A5_6_algorithm_sup",
3935 FT_BOOLEAN
, BASE_NONE
, TFS(&A5_6_algorithm_sup_vals
), 0x0,
3938 { &hf_gsm_a_A5_5_algorithm_sup
,
3939 { "A5/5 algorithm supported", "gsm_a.A5_5_algorithm_sup",
3940 FT_BOOLEAN
, BASE_NONE
, TFS(&A5_5_algorithm_sup_vals
), 0x0,
3943 { &hf_gsm_a_A5_4_algorithm_sup
,
3944 { "A5/4 algorithm supported", "gsm_a.A5_4_algorithm_sup",
3945 FT_BOOLEAN
, BASE_NONE
, TFS(&A5_4_algorithm_sup_vals
), 0x0,
3948 { &hf_gsm_a_A5_3_algorithm_sup
,
3949 { "A5/3 algorithm supported", "gsm_a.A5_3_algorithm_sup",
3950 FT_BOOLEAN
, 8, TFS(&A5_3_algorithm_sup_vals
), 0x02,
3953 { &hf_gsm_a_A5_2_algorithm_sup
,
3954 { "A5/2 algorithm supported", "gsm_a.A5_2_algorithm_sup",
3955 FT_BOOLEAN
, 8, TFS(&A5_2_algorithm_sup_vals
), 0x01,
3958 { &hf_gsm_a_mobile_identity_type
,
3959 { "Mobile Identity Type", "gsm_a.ie.mobileid.type",
3960 FT_UINT8
, BASE_DEC
, VALS(mobile_identity_type_vals
), 0x07,
3963 { &hf_gsm_a_id_dig_1
,
3964 { "Identity Digit 1", "gsm_a.id_dig_1",
3965 FT_UINT8
, BASE_DEC
, NULL
, 0xf0,
3968 { &hf_gsm_a_odd_even_ind
,
3969 { "Odd/even indication", "gsm_a.oddevenind",
3970 FT_BOOLEAN
, 8, TFS(&oddevenind_vals
), 0x08,
3974 { "Unused", "gsm_a.unused",
3975 FT_UINT8
, BASE_HEX
, NULL
, 0xf0,
3978 { &hf_gsm_a_tmgi_mcc_mnc_ind
,
3979 { "MCC/MNC indication", "gsm_a.tmgi_mcc_mnc_ind",
3980 FT_BOOLEAN
, 8, TFS(&tfs_present_not_present
), 0x10,
3983 { &hf_gsm_a_mbs_ses_id_ind
,
3984 { "MBMS Session Identity indication", "gsm_a.mbs_session_id_ind",
3985 FT_BOOLEAN
, 8, TFS(&tfs_present_not_present
), 0x20,
3988 { &hf_gsm_a_mbs_service_id
,
3989 { "MBMS Service ID", "gsm_a.mbs_service_id",
3990 FT_UINT24
, BASE_HEX
, NULL
, 0x0,
3993 { &hf_gsm_a_mbs_session_id
,
3994 { "MBMS Session ID", "gsm_a.mbs_session_id",
3995 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
3999 { "Length", "gsm_a.len",
4000 FT_UINT16
, BASE_DEC
, NULL
, 0,
4003 { &hf_gsm_a_element_value
,
4004 { "Element Value", "gsm_a.element_value",
4005 FT_BYTES
, BASE_NONE
, NULL
, 0,
4008 { &hf_gsm_a_extension
,
4009 { "Extension", "gsm_a.extension",
4010 FT_BOOLEAN
, 8, TFS(&gsm_a_extension_value
), 0x80,
4013 { &hf_gsm_a_L3_protocol_discriminator
,
4014 { "Protocol discriminator", "gsm_a.L3_protocol_discriminator",
4015 FT_UINT8
, BASE_HEX
, VALS(protocol_discriminator_vals
), 0x0f,
4018 { &hf_gsm_a_call_prio
,
4019 { "Call priority", "gsm_a.call_prio",
4020 FT_UINT8
, BASE_DEC
, VALS(gsm_a_call_prio_vals
), 0x00,
4023 { &hf_gsm_a_type_of_ciph_alg
,
4024 { "Type of ciphering algorithm", "gsm_a.type_of_ciph_alg",
4025 FT_UINT8
, BASE_DEC
, VALS(gsm_a_gm_type_of_ciph_alg_vals
), 0x07,
4029 { "ATT", "gsm_a.att",
4030 FT_BOOLEAN
, 8, TFS(&gsm_a_att_value
), 0x01,
4031 "Attach-detach allowed", HFILL
}
4034 { "NMO I", "gsm_a.nmo_1",
4035 FT_BOOLEAN
, 8, TFS(&gsm_a_nmo_1_value
), 0x02,
4036 "Network Mode of Operation I", HFILL
}
4039 { "NMO", "gsm_a.nmo",
4040 FT_BOOLEAN
, 8, TFS(&gsm_a_nmo_value
), 0x01,
4041 "Network Mode of Operation", HFILL
}
4043 { &hf_gsm_a_old_xid
,
4044 { "Old XID", "gsm_a.old_xid",
4045 FT_UINT8
, BASE_DEC
, VALS(gsm_a_pld_xid_vals
), 0x10,
4049 { "IOV-UI", "gsm_a.iov_ui",
4050 FT_UINT32
, BASE_HEX
, NULL
, 0x0,
4053 { &hf_gsm_a_ext_periodic_timers
,
4054 { "Extended periodic timers", "gsm_a.ext_periodic_timers",
4055 FT_BOOLEAN
, BASE_NONE
, TFS(&gsm_a_ext_periodic_timers_value
), 0x0,
4058 { &hf_gsm_a_skip_ind
,
4059 { "Skip Indicator", "gsm_a.skip.ind",
4060 FT_UINT8
, BASE_DEC
, VALS(gsm_a_skip_ind_vals
), 0xf0,
4063 { &hf_gsm_a_b7spare
,
4064 { "Spare", "gsm_a.spareb7",
4065 FT_UINT8
, BASE_DEC
, NULL
, 0x40,
4068 { &hf_gsm_a_b8spare
,
4069 { "Spare", "gsm_a.spareb8",
4070 FT_UINT8
, BASE_DEC
, NULL
, 0x80,
4073 { &hf_gsm_a_spare_bits
,
4074 { "Spare bit(s)", "gsm_a.spare_bits",
4075 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
4078 { &hf_gsm_a_multi_bnd_sup_fields
,
4079 { "Multiband supported field", "gsm_a.multi_bnd_sup_fields",
4080 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
4083 { &hf_gsm_a_pgsm_supported
,
4084 { "P-GSM Supported", "gsm_a.classmark3.pgsmSupported",
4085 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x0,
4088 { &hf_gsm_a_egsm_supported
,
4089 { "E-GSM or R-GSM Supported", "gsm_a.classmark3.egsmSupported",
4090 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x0,
4093 { &hf_gsm_a_gsm1800_supported
,
4094 { "GSM 1800 Supported", "gsm_a.classmark3.gsm1800Supported",
4095 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x0,
4098 { &hf_gsm_a_ass_radio_cap1
,
4099 { "Associated Radio Capability 1", "gsm_a.classmark3.ass_radio_cap1",
4100 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
4103 { &hf_gsm_a_ass_radio_cap2
,
4104 { "Associated Radio Capability 2", "gsm_a.classmark3.ass_radio_cap2",
4105 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
4108 { &hf_gsm_a_cm3_A5_bits
,
4109 { "A5 bits", "gsm_a.classmark3.a5_bits",
4110 FT_UINT8
, BASE_HEX
, NULL
, 0x00,
4113 { &hf_gsm_a_rsupport
,
4114 { "R Support", "gsm_a.classmark3.rsupport",
4115 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x0,
4118 { &hf_gsm_a_r_capabilities
,
4119 { "R-GSM band Associated Radio Capability", "gsm_a.classmark3.r_capabilities",
4120 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
4123 { &hf_gsm_a_multislot_capabilities
,
4124 { "HSCSD Multi Slot Capability", "gsm_a.classmark3.multislot_capabilities",
4125 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x0,
4128 { &hf_gsm_a_multislot_class
,
4129 { "HSCSD Multi Slot Class", "gsm_a.classmark3.multislot_cap",
4130 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
4133 { &hf_gsm_a_ucs2_treatment
,
4134 { "UCS2 treatment", "gsm_a.UCS2_treatment",
4135 FT_BOOLEAN
, BASE_NONE
, TFS(&UCS2_treatment_vals
), 0x0,
4138 { &hf_gsm_a_extended_measurement_cap
,
4139 { "Extended Measurement Capability", "gsm_a.classmark3.ext_meas_cap",
4140 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x0,
4143 { &hf_gsm_a_ms_measurement_capability
,
4144 { "MS measurement capability", "gsm_a.classmark3.ms_measurement_capability",
4145 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x0,
4148 { &hf_gsm_a_sms_value
,
4149 { "SMS_VALUE (Switch-Measure-Switch)", "gsm_a.classmark3.sms_value",
4150 FT_UINT8
, BASE_DEC
, VALS(gsm_a_sms_vals
), 0x0,
4153 { &hf_gsm_a_sm_value
,
4154 { "SM_VALUE (Switch-Measure)", "gsm_a.classmark3.sm_value",
4155 FT_UINT8
, BASE_DEC
, VALS(gsm_a_sms_vals
), 0x0,
4158 { &hf_gsm_a_ms_pos_method_cap_present
,
4159 { "MS Positioning Method Capability present", "gsm_a.classmark3.ms_pos_method_cap_present",
4160 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x00,
4163 { &hf_gsm_a_ms_pos_method
,
4164 { "MS Positioning Method", "gsm_a.classmark3.ms_pos_method",
4165 FT_UINT8
, BASE_HEX
, NULL
, 0x00,
4168 { &hf_gsm_a_ms_assisted_e_otd
,
4169 { "MS assisted E-OTD", "gsm_a.classmark3.ms_assisted_e_otd",
4170 FT_BOOLEAN
, BASE_NONE
, TFS(&ms_assisted_e_otd_vals
), 0x0,
4173 { &hf_gsm_a_ms_based_e_otd
,
4174 { "MS based E-OTD", "gsm_a.classmark3.ms_based_e_otd",
4175 FT_BOOLEAN
, BASE_NONE
, TFS(&ms_based_e_otd_vals
), 0x0,
4178 { &hf_gsm_a_ms_assisted_gps
,
4179 { "MS assisted GPS", "gsm_a.classmark3.ms_assisted_gps",
4180 FT_BOOLEAN
, BASE_NONE
, TFS(&ms_assisted_gps_vals
), 0x0,
4183 { &hf_gsm_a_ms_based_gps
,
4184 { "MS based GPS", "gsm_a.classmark3.ms_based_gps",
4185 FT_BOOLEAN
, BASE_NONE
, TFS(&ms_based_gps_vals
), 0x0,
4188 { &hf_gsm_a_ms_conventional_gps
,
4189 { "MS Conventional GPS", "gsm_a.classmark3.ms_conventional_gps",
4190 FT_BOOLEAN
, BASE_NONE
, TFS(&ms_conventional_gps_vals
), 0x0,
4193 { &hf_gsm_a_ecsd_multi_slot_capability
,
4194 { "ECSD Multi Slot Capability present", "gsm_a.classmark3.ecsd_multi_slot_capability",
4195 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x00,
4198 { &hf_gsm_a_ecsd_multi_slot_class
,
4199 { "ECSD Multi Slot Class", "gsm_a.classmark3.ecsd_multi_slot_class",
4200 FT_UINT8
, BASE_DEC
, NULL
, 0x00,
4203 { &hf_gsm_a_8_psk_struct_present
,
4204 { "8-PSK Struct present", "gsm_a.classmark3.8_psk_struct_present",
4205 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x00,
4208 { &hf_gsm_a_8_psk_struct
,
4209 { "8-PSK Struct", "gsm_a.classmark3.8_psk_struct",
4210 FT_UINT8
, BASE_HEX
, NULL
, 0x00,
4213 { &hf_gsm_a_modulation_capability
,
4214 { "Modulation Capability", "gsm_a.classmark3.modulation_capability",
4215 FT_BOOLEAN
, BASE_NONE
, TFS(&modulation_capability_vals
), 0x00,
4218 { &hf_gsm_a_8_psk_rf_power_capability_1_present
,
4219 { "8-PSK RF Power Capability 1 present", "gsm_a.classmark3.8_psk_rf_power_capability_1_present",
4220 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x00,
4223 { &hf_gsm_a_8_psk_rf_power_capability_1
,
4224 { "8-PSK RF Power Capability 1", "gsm_a.classmark3.8_psk_rf_power_capability_1",
4225 FT_UINT8
, BASE_HEX
, VALS(eight_psk_rf_power_capability_vals
), 0x00,
4228 { &hf_gsm_a_8_psk_rf_power_capability_2_present
,
4229 { "8-PSK RF Power Capability 2 present", "gsm_a.classmark3.8_psk_rf_power_capability_2_present",
4230 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x00,
4233 { &hf_gsm_a_8_psk_rf_power_capability_2
,
4234 { "8-PSK RF Power Capability 2", "gsm_a.classmark3.8_psk_rf_power_capability_2",
4235 FT_UINT8
, BASE_HEX
, VALS(eight_psk_rf_power_capability_vals
), 0x00,
4238 { &hf_gsm_a_gsm_400_band_info_present
,
4239 { "GSM 400 Band Information present", "gsm_a.classmark3.gsm_400_band_info_present",
4240 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x00,
4243 { &hf_gsm_a_gsm_400_bands_supported
,
4244 { "GSM 400 Bands Supported", "gsm_a.classmark3.gsm_400_bands_supported",
4245 FT_UINT8
, BASE_HEX
, VALS(gsm_400_bands_supported_vals
), 0x00,
4248 { &hf_gsm_a_gsm_400_assoc_radio_cap
,
4249 { "GSM 400 Associated Radio Capability", "gsm_a.classmark3.gsm_400_assoc_radio_cap",
4250 FT_UINT8
, BASE_HEX
, NULL
, 0x00,
4253 { &hf_gsm_a_gsm_850_assoc_radio_cap_present
,
4254 { "GSM 850 Associated Radio Capability present", "gsm_a.classmark3.gsm_850_assoc_radio_cap_present",
4255 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x00,
4258 { &hf_gsm_a_gsm_850_assoc_radio_cap
,
4259 { "GSM 850 Associated Radio Capability", "gsm_a.classmark3.gsm_850_assoc_radio_cap",
4260 FT_UINT8
, BASE_HEX
, NULL
, 0x00,
4263 { &hf_gsm_a_gsm_1900_assoc_radio_cap_present
,
4264 { "GSM 1900 Associated Radio Capability present", "gsm_a.classmark3.gsm_1900_assoc_radio_cap_present",
4265 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x00,
4268 { &hf_gsm_a_gsm_1900_assoc_radio_cap
,
4269 { "GSM 1900 Associated Radio Capability", "gsm_a.classmark3.gsm_1900_assoc_radio_cap",
4270 FT_UINT8
, BASE_HEX
, NULL
, 0x00,
4273 { &hf_gsm_a_umts_fdd_rat_cap
,
4274 { "UMTS FDD Radio Access Technology Capability", "gsm_a.classmark3.umts_fdd_rat_cap",
4275 FT_BOOLEAN
, BASE_NONE
, TFS(&umts_fdd_rat_cap_vals
), 0x00,
4278 { &hf_gsm_a_umts_384_mcps_tdd_rat_cap
,
4279 { "UMTS 3.84 Mcps TDD Radio Access Technology Capability", "gsm_a.classmark3.umts_384_mcps_tdd_rat_cap",
4280 FT_BOOLEAN
, BASE_NONE
, TFS(&umts_384_mcps_tdd_rat_cap_vals
), 0x00,
4283 { &hf_gsm_a_cdma_2000_rat_cap
,
4284 { "CDMA 2000 Radio Access Technology Capability", "gsm_a.classmark3.cdma_2000_rat_cap",
4285 FT_BOOLEAN
, BASE_NONE
, TFS(&cdma_2000_rat_cap_vals
), 0x00,
4288 { &hf_gsm_a_dtm_e_gprs_multi_slot_info_present
,
4289 { "DTM E/GPRS Multi Slot Information present", "gsm_a.classmark3.dtm_e_gprs_multi_slot_info_present",
4290 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x00,
4293 { &hf_gsm_a_dtm_gprs_multi_slot_class
,
4294 { "DTM GPRS Multi Slot Class", "gsm_a.classmark3.dtm_gprs_multi_slot_class",
4295 FT_UINT8
, BASE_DEC
, VALS(dtm_gprs_multi_slot_class_vals
), 0x00,
4298 { &hf_gsm_a_single_slot_dtm
,
4299 { "Single Slot DTM", "gsm_a.classmark3.single_slot_dtm_supported",
4300 FT_BOOLEAN
, BASE_NONE
, TFS(&single_slot_dtm_vals
), 0x0,
4303 { &hf_gsm_a_dtm_egprs_multi_slot_class_present
,
4304 { "DTM EGPRS Multi Slot Class present", "gsm_a.classmark3.dtm_egprs_multi_slot_class_present",
4305 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x00,
4308 { &hf_gsm_a_dtm_egprs_multi_slot_class
,
4309 { "DTM EGPRS Multi Slot Class", "gsm_a.classmark3.dtm_egprs_multi_slot_class",
4310 FT_UINT8
, BASE_DEC
, VALS(dtm_gprs_multi_slot_class_vals
), 0x00,
4313 { &hf_gsm_a_single_band_support
,
4314 { "Single Band Support", "gsm_a.classmark3.single_band_support",
4315 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x00,
4318 { &hf_gsm_a_gsm_band
,
4319 { "GSM Band", "gsm_a.classmark3.gsm_band",
4320 FT_UINT8
, BASE_DEC
, VALS(gsm_band_vals
), 0x00,
4323 { &hf_gsm_a_gsm_750_assoc_radio_cap_present
,
4324 { "GSM 750 Associated Radio Capability present", "gsm_a.classmark3.gsm_750_assoc_radio_cap_present",
4325 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x00,
4328 { &hf_gsm_a_gsm_750_assoc_radio_cap
,
4329 { "GSM 750 Associated Radio Capability", "gsm_a.classmark3.gsm_750_assoc_radio_cap",
4330 FT_UINT8
, BASE_HEX
, NULL
, 0x00,
4333 { &hf_gsm_a_umts_128_mcps_tdd_rat_cap
,
4334 { "UMTS 1.28 Mcps TDD Radio Access Technology Capability", "gsm_a.classmark3.umts_128_mcps_tdd_rat_cap",
4335 FT_BOOLEAN
, BASE_NONE
, TFS(&umts_128_mcps_tdd_rat_cap_vals
), 0x00,
4338 { &hf_gsm_a_geran_feature_package_1
,
4339 { "GERAN Feature Package 1", "gsm_a.classmark3.geran_feature_package_1",
4340 FT_BOOLEAN
, BASE_NONE
, TFS(&geran_feature_package_1_vals
), 0x00,
4343 { &hf_gsm_a_ext_dtm_e_gprs_multi_slot_info_present
,
4344 { "Extended DTM E/GPRS Multi Slot Information present", "gsm_a.classmark3.ext_dtm_e_gprs_info_present",
4345 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x00,
4348 { &hf_gsm_a_ext_dtm_gprs_multi_slot_class
,
4349 { "Extended DTM GPRS Multi Slot Class", "gsm_a.classmark3.ext_dtm_gprs_multi_slot_class",
4350 FT_UINT8
, BASE_HEX
, NULL
, 0x00,
4353 { &hf_gsm_a_ext_dtm_egprs_multi_slot_class
,
4354 { "Extended DTM EGPRS Multi Slot Class", "gsm_a.classmark3.ext_dtm_egprs_multi_slot_class",
4355 FT_UINT8
, BASE_HEX
, NULL
, 0x00,
4358 { &hf_gsm_a_high_multislot_cap_present
,
4359 { "High Multislot Capability present", "gsm_a.classmark3.high_multislot_cap_present",
4360 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x00,
4363 { &hf_gsm_a_high_multislot_cap
,
4364 { "High Multislot Capability", "gsm_a.classmark3.high_multislot_cap",
4365 FT_UINT8
, BASE_HEX
, NULL
, 0x00,
4368 { &hf_gsm_a_geran_iu_mode_support
,
4369 { "GERAN Iu Mode Support", "gsm_a.classmark3.geran_iu_mode_support",
4370 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x00,
4373 { &hf_gsm_a_geran_iu_mode_cap
,
4374 { "GERAN Iu Mode Capabilities", "gsm_a.classmark3.geran_iu_mode_cap",
4375 FT_UINT24
, BASE_HEX
, NULL
, 0x00,
4378 { &hf_gsm_a_geran_iu_mode_cap_length
,
4379 { "Length", "gsm_a.classmark3.geran_iu_mode_cap.length",
4380 FT_UINT8
, BASE_DEC
, NULL
, 0x00,
4383 { &hf_gsm_a_flo_iu_cap
,
4384 { "FLO Iu Capability", "gsm_a.classmark3.geran_iu_mode_cap.flo_iu_cap",
4385 FT_BOOLEAN
, BASE_NONE
, TFS(&flo_iu_cap_vals
), 0x00,
4388 { &hf_gsm_a_geran_feature_package_2
,
4389 { "GERAN Feature Package 2", "gsm_a.classmark3.geran_feature_package_2",
4390 FT_BOOLEAN
, BASE_NONE
, TFS(&geran_feature_package_2_vals
), 0x00,
4393 { &hf_gsm_a_gmsk_multislot_power_prof
,
4394 { "GMSK Multislot Power Profile", "gsm_a.classmark3.gmsk_multislot_power_prof",
4395 FT_UINT8
, BASE_DEC
, VALS(gmsk_multislot_power_prof_vals
), 0x00,
4398 { &hf_gsm_a_8_psk_multislot_power_prof
,
4399 { "8-PSK Multislot Power Profile", "gsm_a.classmark3.8_psk_multislot_power_prof",
4400 FT_UINT8
, BASE_DEC
, VALS(eight_psk_multislot_power_prof_vals
), 0x00,
4403 { &hf_gsm_a_t_gsm_400_band_info_present
,
4404 { "T-GSM 400 Band Information present", "gsm_a.classmark3.gsm_400_band_info_present",
4405 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x00,
4408 { &hf_gsm_a_t_gsm_400_bands_supported
,
4409 { "T-GSM 400 Bands Supported", "gsm_a.classmark3.t_gsm_400_bands_supported",
4410 FT_UINT8
, BASE_HEX
, VALS(t_gsm_400_bands_supported_vals
), 0x00,
4413 { &hf_gsm_a_t_gsm_400_assoc_radio_cap
,
4414 { "T-GSM 400 Associated Radio Capability", "gsm_a.classmark3.t_gsm_400_assoc_radio_cap",
4415 FT_UINT8
, BASE_HEX
, NULL
, 0x00,
4418 { &hf_gsm_a_t_gsm_900_assoc_radio_cap_present
,
4419 { "T-GSM 900 Associated Radio Capability present", "gsm_a.classmark3.t_gsm_900_assoc_radio_cap_present",
4420 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x00,
4423 { &hf_gsm_a_t_gsm_900_assoc_radio_cap
,
4424 { "T-GSM 900 Associated Radio Capability", "gsm_a.classmark3.t_gsm_900_assoc_radio_cap",
4425 FT_UINT8
, BASE_HEX
, NULL
, 0x00,
4428 { &hf_gsm_a_downlink_adv_receiver_perf
,
4429 { "Downlink Advanced Receiver Performance", "gsm_a.classmark3.downlink_adv_receiver_perf",
4430 FT_UINT8
, BASE_DEC
, VALS(downlink_adv_receiver_perf_vals
), 0x00,
4433 { &hf_gsm_a_dtm_enhancements_cap
,
4434 { "DTM Enhancements Capability", "gsm_a.classmark3.dtm_enhancements_capability",
4435 FT_BOOLEAN
, BASE_NONE
, TFS(&dtm_enhancements_cap_vals
), 0x00,
4438 { &hf_gsm_a_dtm_e_gprs_high_multi_slot_info_present
,
4439 { "DTM E/GPRS High Multi Slot Information present", "gsm_a.classmark3.dtm_e_gprs_high_mutli_slot_info_present",
4440 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x00,
4443 { &hf_gsm_a_dtm_gprs_high_multi_slot_class
,
4444 { "DTM GPRS Multi Slot Class", "gsm_a.classmark3.dtm_gprs_multi_slot_class",
4445 FT_UINT8
, BASE_DEC
, VALS(dtm_gprs_high_multi_slot_class_vals
), 0x00,
4448 { &hf_gsm_a_offset_required
,
4449 { "Offset required", "gsm_a.classmark3.offset_required",
4450 FT_BOOLEAN
, BASE_NONE
, TFS(&offset_required_vals
), 0x0,
4453 { &hf_gsm_a_dtm_egprs_high_multi_slot_class_present
,
4454 { "DTM EGPRS High Multi Slot Class present", "gsm_a.classmark3.dtm_egprs_high_multi_slot_class_present",
4455 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x00,
4458 { &hf_gsm_a_dtm_egprs_high_multi_slot_class
,
4459 { "DTM EGPRS High Multi Slot Class", "gsm_a.classmark3.dtm_egprs_high_multi_slot_class",
4460 FT_UINT8
, BASE_DEC
, VALS(dtm_gprs_high_multi_slot_class_vals
), 0x00,
4463 { &hf_gsm_a_repeated_acch_cap
,
4464 { "Repeated ACCH Capability", "gsm_a.classmark3.repeated_acch_cap",
4465 FT_BOOLEAN
, BASE_NONE
, TFS(&repeated_acch_cap_vals
), 0x00,
4468 { &hf_gsm_a_gsm_710_assoc_radio_cap_present
,
4469 { "GSM 710 Associated Radio Capability present", "gsm_a.classmark3.gsm_710_assoc_radio_cap_present",
4470 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x00,
4473 { &hf_gsm_a_gsm_710_assoc_radio_cap
,
4474 { "GSM 710 Associated Radio Capability", "gsm_a.classmark3.gsm_710_assoc_radio_cap",
4475 FT_UINT8
, BASE_HEX
, NULL
, 0x00,
4478 { &hf_gsm_a_t_gsm_810_assoc_radio_cap_present
,
4479 { "T-GSM 810 Associated Radio Capability present", "gsm_a.classmark3.t_gsm_810_assoc_radio_cap_present",
4480 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x00,
4483 { &hf_gsm_a_t_gsm_810_assoc_radio_cap
,
4484 { "T-GSM 810 Associated Radio Capability", "gsm_a.classmark3.t_gsm_810_assoc_radio_cap",
4485 FT_UINT8
, BASE_HEX
, NULL
, 0x00,
4488 { &hf_gsm_a_ciphering_mode_setting_cap
,
4489 { "Ciphering Mode Setting Capability", "gsm_a.classmark3.ciphering_mode_setting_cap",
4490 FT_BOOLEAN
, BASE_NONE
, TFS(&ciphering_mode_setting_cap_vals
), 0x00,
4493 { &hf_gsm_a_additional_positioning_caps
,
4494 { "Additional Positioning Capabilities", "gsm_a.classmark3.additional_positioning_caps",
4495 FT_BOOLEAN
, BASE_NONE
, TFS(&additional_positioning_caps_vals
), 0x00,
4498 { &hf_gsm_a_e_utra_fdd_support
,
4499 { "E-UTRA FDD support", "gsm_a.classmark3.e_utra_fdd_support",
4500 FT_BOOLEAN
, BASE_NONE
, TFS(&e_utra_fdd_support_vals
), 0x00,
4503 { &hf_gsm_a_e_utra_tdd_support
,
4504 { "E-UTRA TDD support", "gsm_a.classmark3.e_utra_tdd_support",
4505 FT_BOOLEAN
, BASE_NONE
, TFS(&e_utra_tdd_support_vals
), 0x00,
4508 { &hf_gsm_a_e_utra_meas_and_report_support
,
4509 { "E-UTRA Measurement and Reporting support", "gsm_a.classmark3.e_utra_meas_and_report_support",
4510 FT_BOOLEAN
, BASE_NONE
, TFS(&e_utra_meas_and_report_support_vals
), 0x00,
4513 { &hf_gsm_a_prio_based_resel_support
,
4514 { "Priority-based reselection support", "gsm_a.classmark3.prio_based_resel_support",
4515 FT_BOOLEAN
, BASE_NONE
, TFS(&prio_based_resel_support_vals
), 0x00,
4518 { &hf_gsm_a_utra_csg_cells_reporting
,
4519 { "UTRA CSG Cells Reporting", "gsm_a.classmark3.utra_csg_cells_reporting",
4520 FT_BOOLEAN
, BASE_NONE
, TFS(&utra_csg_cells_reporting_vals
), 0x00,
4523 { &hf_gsm_a_vamos_level
,
4524 { "VAMOS Level", "gsm_a.classmark3.vamos_level",
4525 FT_UINT8
, BASE_DEC
, VALS(vamos_level_vals
), 0x00,
4528 { &hf_gsm_a_tighter_cap
,
4529 { "TIGHTER Capability", "gsm_a.classmark3.tighter_cap",
4530 FT_UINT8
, BASE_DEC
, VALS(tighter_cap_level_vals
), 0x00,
4533 { &hf_gsm_a_selective_ciph_down_sacch
,
4534 { "Selective Ciphering of Downlink SACCH", "gsm_a.classmark3.selective_ciph_down_sacch",
4535 FT_BOOLEAN
, BASE_NONE
, TFS(&tfs_supported_not_supported
), 0x00,
4538 { &hf_gsm_a_cs_to_ps_srvcc_geran_to_utra
,
4539 { "CS to PS SRVCC from GERAN to UTRA", "gsm_a.classmark3.cs_to_ps_srvcc_geran_to_utra",
4540 FT_UINT8
, BASE_DEC
, VALS(cs_to_ps_srvcc_geran_to_utra_vals
), 0x00,
4543 { &hf_gsm_a_cs_to_ps_srvcc_geran_to_eutra
,
4544 { "CS to PS SRVCC from GERAN to E-UTRA", "gsm_a.classmark3.cs_to_ps_srvcc_geran_to_eutra",
4545 FT_UINT8
, BASE_DEC
, VALS(cs_to_ps_srvcc_geran_to_eutra_vals
), 0x00,
4548 { &hf_gsm_a_geran_network_sharing_support
,
4549 { "GERAN Network Sharing support", "gsm_a.classmark3.geran_network_sharing_support",
4550 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x00,
4553 { &hf_gsm_a_eutra_wb_rsrq_support
,
4554 { "E-UTRA Wideband RSRQ measurements support", "gsm_a.classmark3.eutra_wb_rsrq_support",
4555 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x00,
4558 { &hf_gsm_a_er_band_support
,
4559 { "ER Band support", "gsm_a.classmark3.er_band_support",
4560 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x00,
4563 { &hf_gsm_a_utra_mfbi_support
,
4564 { "UTRA Multiple Frequency Band Indicators support", "gsm_a.classmark3.utra_mfbi_support",
4565 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x00,
4568 { &hf_gsm_a_eutra_mfbi_support
,
4569 { "E-UTRA Multiple Frequency Band Indicators support", "gsm_a.classmark3.eutra_mfbi_support",
4570 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x00,
4573 { &hf_gsm_a_ext_tsc_set_cap_support
,
4574 { "Extended TSC Set Capability support", "gsm_a.classmark3.ext_tsc_set_cap_support",
4575 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x00,
4578 { &hf_gsm_a_ext_earfcn_value_range
,
4579 { "Extended EARFCN value range", "gsm_a.classmark3.ext_earfcn_value_range",
4580 FT_BOOLEAN
, BASE_NONE
, TFS(&tfs_supported_not_supported
), 0x00,
4583 { &hf_gsm_a_geo_loc_type_of_shape
,
4584 { "Location estimate", "gsm_a.gad.location_estimate",
4585 FT_UINT8
, BASE_DEC
, VALS(type_of_shape_vals
), 0xf0,
4588 { &hf_gsm_a_geo_loc_sign_of_lat
,
4589 { "Sign of latitude", "gsm_a.gad.sign_of_latitude",
4590 FT_UINT8
, BASE_DEC
, VALS(sign_of_latitude_vals
), 0x80,
4593 { &hf_gsm_a_geo_loc_deg_of_lat
,
4594 { "Degrees of latitude", "gsm_a.gad.deg_of_latitude",
4595 FT_UINT24
, BASE_DEC
, NULL
, 0x7fffff,
4598 { &hf_gsm_a_geo_loc_deg_of_long
,
4599 { "Degrees of longitude", "gsm_a.gad.deg_of_longitude",
4600 FT_INT24
, BASE_DEC
, NULL
, 0xffffff,
4603 { &hf_gsm_a_geo_loc_osm_uri
,
4604 { "Location OSM URI", "gsm_a.gad.location_uri",
4605 FT_STRING
, BASE_NONE
, NULL
, 0x0,
4608 { &hf_gsm_a_geo_loc_uncertainty_code
,
4609 { "Uncertainty code", "gsm_a.gad.uncertainty_code",
4610 FT_UINT8
, BASE_DEC
, NULL
, 0x7f,
4613 { &hf_gsm_a_geo_loc_uncertainty_semi_major
,
4614 { "Uncertainty semi-major", "gsm_a.gad.uncertainty_semi_major",
4615 FT_UINT8
, BASE_DEC
, NULL
, 0x7f,
4618 { &hf_gsm_a_geo_loc_uncertainty_semi_minor
,
4619 { "Uncertainty semi-minor", "gsm_a.gad.uncertainty_semi_minor",
4620 FT_UINT8
, BASE_DEC
, NULL
, 0x7f,
4623 { &hf_gsm_a_geo_loc_orientation_of_major_axis
,
4624 { "Orientation of major axis", "gsm_a.gad.orientation_of_major_axis",
4625 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
4628 { &hf_gsm_a_geo_loc_uncertainty_altitude
,
4629 { "Uncertainty Altitude", "gsm_a.gad.uncertainty_altitude",
4630 FT_UINT8
, BASE_DEC
, NULL
, 0x7f,
4633 { &hf_gsm_a_geo_loc_confidence
,
4634 { "Confidence(%)", "gsm_a.gad.confidence",
4635 FT_UINT8
, BASE_DEC
, NULL
, 0x7f,
4638 { &hf_gsm_a_geo_loc_uncertainty_range
,
4639 { "Uncertainty Range", "gsm_a.gad.uncertainty_range",
4640 FT_UINT8
, BASE_DEC
, VALS(uncertainty_range
), 0x80,
4643 { &hf_gsm_a_geo_loc_horizontal_confidence
,
4644 { "Horizontal confidence(%)", "gsm_a.gad.horizontal_confidence",
4645 FT_UINT8
, BASE_DEC
, NULL
, 0x7f,
4648 { &hf_gsm_a_geo_loc_horizontal_uncertainty_range
,
4649 { "Horizontal Uncertainty Range", "gsm_a.gad.horizontal_uncertainty_range",
4650 FT_UINT8
, BASE_DEC
, VALS(uncertainty_range
), 0x80,
4653 { &hf_gsm_a_geo_loc_vertical_confidence
,
4654 { "Vertical Confidence(%)", "gsm_a.gad.vertical_confidence",
4655 FT_UINT8
, BASE_DEC
, NULL
, 0x7f,
4658 { &hf_gsm_a_geo_loc_vertical_uncertainty_range
,
4659 { "Vertical Uncertainty Range", "gsm_a.gad.vertical_uncertainty_range",
4660 FT_UINT8
, BASE_DEC
, VALS(uncertainty_range
), 0x80,
4663 { &hf_gsm_a_geo_loc_high_acc_uncertainty_alt
,
4664 { "High accuracy uncertainty altitude", "gsm_a.gad.high_acc_uncertainty_alt",
4665 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
4668 { &hf_gsm_a_geo_loc_no_of_points
,
4669 { "Number of points", "gsm_a.gad.no_of_points",
4670 FT_UINT8
, BASE_DEC
, NULL
, 0x0f,
4673 { &hf_gsm_a_geo_loc_high_acc_deg_of_lat
,
4674 { "High accuracy degrees of latitude", "gsm_a.gad.hig_acc_deg_of_lat",
4675 FT_INT32
, BASE_DEC
, NULL
, 0x0,
4678 { &hf_gsm_a_geo_loc_high_acc_deg_of_long
,
4679 { "High accuracy degrees of longitude", "gsm_a.gad.high_acc_deg_of_long",
4680 FT_INT32
, BASE_DEC
, NULL
, 0x0,
4683 { &hf_gsm_a_geo_loc_high_acc_uncertainty_semi_major
,
4684 { "High accuracy uncertainty semi-major", "gsm_a.gad.high_acc_uncertainty_semi_major",
4685 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
4688 { &hf_gsm_a_geo_loc_high_acc_uncertainty_semi_minor
,
4689 { "High accuracy uncertainty semi-minor", "gsm_a.gad.high_acc_uncertainty_semi_minor",
4690 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
4693 { &hf_gsm_a_geo_loc_high_acc_alt
,
4694 { "High accuracy altitude", "gsm_a.gad.high_acc_alt",
4695 FT_INT24
, BASE_DEC
, NULL
, 0x3fffff,
4698 { &hf_gsm_a_velocity_type
,
4699 { "Velocity type", "gsm_a.gad.velocity_type",
4700 FT_UINT8
, BASE_DEC
, VALS(gsm_a_velocity_type_vals
), 0xf0,
4703 { &hf_gsm_a_bearing
,
4704 { "Bearing", "gsm_a.gad.bearing",
4705 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
4708 { &hf_gsm_a_horizontal_speed
,
4709 { "Horizontal Speed", "gsm_a.gad.horizontal_velocity",
4710 FT_UINT16
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_kmh
), 0x0,
4713 { &hf_gsm_a_vertical_speed
,
4714 { "Vertical Speed", "gsm_a.gad.vertical_speed",
4715 FT_UINT8
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_kmh
), 0x0,
4718 { &hf_gsm_a_uncertainty_speed
,
4719 { "Uncertainty Speed", "gsm_a.gad.uncertainty_speed",
4720 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
4723 { &hf_gsm_a_h_uncertainty_speed
,
4724 { "Horizontal Uncertainty Speed", "gsm_a.gad.v_uncertainty_speed",
4725 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
4728 { &hf_gsm_a_v_uncertainty_speed
,
4729 { "Vertical Uncertainty Speed", "gsm_a.gad.h_uncertainty_speed",
4730 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
4734 { "Direction of Vertical Speed", "gsm_a.gad.d",
4735 FT_BOOLEAN
, 8, TFS(&gsm_a_dir_of_ver_speed_vals
), 0x02,
4738 { &hf_gsm_a_geo_loc_D
,
4739 { "D: Direction of Altitude", "gsm_a.gad.D",
4740 FT_UINT16
, BASE_DEC
, VALS(dir_of_alt_vals
), 0x8000,
4743 { &hf_gsm_a_geo_loc_altitude
,
4744 { "Altitude in meters", "gsm_a.gad.altitude",
4745 FT_UINT16
, BASE_DEC
, NULL
, 0x7fff,
4748 { &hf_gsm_a_geo_loc_inner_radius
,
4749 { "Inner radius", "gsm_a.gad.inner_radius",
4750 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
4753 { &hf_gsm_a_geo_loc_uncertainty_radius
,
4754 { "Uncertainty radius", "gsm_a.gad.no_of_points",
4755 FT_UINT8
, BASE_DEC
, NULL
, 0x7f,
4758 { &hf_gsm_a_geo_loc_offset_angle
,
4759 { "Offset angle", "gsm_a.gad.offset_angle",
4760 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
4763 { &hf_gsm_a_geo_loc_included_angle
,
4764 { "Included angle", "gsm_a.gad.included_angle",
4765 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
4768 { &hf_gsm_a_key_seq
,
4769 { "key sequence", "gsm_a.key_seq",
4770 FT_UINT8
, BASE_DEC
, VALS(gsm_a_key_seq_vals
), 0x00,
4774 { "Location Area Code (LAC)", "gsm_a.lac",
4775 FT_UINT16
, BASE_HEX_DEC
, NULL
, 0x00,
4778 { &hf_gsm_a_spare_nibble
,
4779 { "Spare Nibble", "gsm_a.spare",
4780 FT_UINT8
, BASE_DEC_HEX
, NULL
, 0x00,
4783 /* Generated from convert_proto_tree_add_text.pl */
4784 { &hf_gsm_a_filler
, { "Filler", "gsm_a.filler", FT_UINT8
, BASE_HEX
, NULL
, 0xF0, NULL
, HFILL
}},
4785 { &hf_gsm_a_identity_digit1
, { "Identity Digit 1", "gsm_a.identity_digit1", FT_UINT8
, BASE_HEX
, NULL
, 0xF0, NULL
, HFILL
}},
4786 { &hf_gsm_a_group_call_reference
, { "Group or Broadcast call reference", "gsm_a.group_call_reference", FT_UINT32
, BASE_DEC_HEX
, NULL
, 0xffffffe0, NULL
, HFILL
}},
4787 { &hf_gsm_a_service_flag
, { "SF Service Flag", "gsm_a.service_flag", FT_BOOLEAN
, 32, TFS(&tfs_vgcs_vbs
), 0x00000010, NULL
, HFILL
}},
4788 { &hf_gsm_a_af_acknowledgement
, { "AF Acknowledgement", "gsm_a.af_acknowledgement", FT_BOOLEAN
, 32, TFS(&tfs_required_not_required
), 0x00000008, NULL
, HFILL
}},
4789 { &hf_gsm_a_call_priority
, { "Call Priority", "gsm_a.call_priority", FT_UINT32
, BASE_DEC
, VALS(gsm_a_call_priority_vals
), 0x00000007, NULL
, HFILL
}},
4790 { &hf_gsm_a_ciphering_info
, { "Ciphering Information", "gsm_a.ciphering_info", FT_UINT8
, BASE_HEX
, NULL
, 0xf0, NULL
, HFILL
}},
4791 { &hf_gsm_a_sapi
, { "SAPI (Service Access Point Identifier)", "gsm_a.sapi", FT_UINT8
, BASE_DEC
, VALS(gsm_a_sapi_vals
), 0x30, NULL
, HFILL
}},
4794 /* Setup protocol subtree array */
4795 #define NUM_INDIVIDUAL_ELEMS 2
4796 static int *ett
[NUM_INDIVIDUAL_ELEMS
+
4797 NUM_GSM_COMMON_ELEM
];
4799 static ei_register_info ei
[] = {
4800 { &ei_gsm_a_extraneous_data
, { "gsm_a.extraneous_data", PI_PROTOCOL
, PI_NOTE
, "Extraneous Data, dissector bug or later version spec(report to wireshark.org)", EXPFILL
}},
4801 { &ei_gsm_a_unknown_element
, { "gsm_a.unknown_element", PI_PROTOCOL
, PI_ERROR
, "Unknown - aborting dissection", EXPFILL
}},
4802 { &ei_gsm_a_unknown_pdu_type
, { "gsm_a.unknown_pdu_type", PI_PROTOCOL
, PI_WARN
, "Unknown PDU type", EXPFILL
}},
4803 { &ei_gsm_a_no_element_dissector
, { "gsm_a.no_element_dissector", PI_PROTOCOL
, PI_WARN
, "No element dissector, rest of dissection may be incorrect", EXPFILL
}},
4804 { &ei_gsm_a_format_not_supported
, { "gsm_a.format_not_supported", PI_PROTOCOL
, PI_WARN
, "Format not supported", EXPFILL
}},
4805 { &ei_gsm_a_mobile_identity_type
, { "gsm_a.ie.mobileid.type.unknown", PI_PROTOCOL
, PI_WARN
, "Format unknown", EXPFILL
}},
4806 { &ei_gsm_a_ie_length_too_short
, { "gsm_a.ie.length_too_short", PI_PROTOCOL
, PI_ERROR
, "IE length too short", EXPFILL
}}
4809 expert_module_t
* expert_a_common
;
4811 static tap_param gsm_a_stat_params
[] = {
4812 { PARAM_FILTER
, "filter", "Filter", NULL
, true }
4815 static stat_tap_table_ui gsm_a_bssmap_stat_table
= {
4816 REGISTER_TELEPHONY_GROUP_GSM
,
4817 "A-Interface BSSMAP",
4820 gsm_a_bssmap_stat_init
,
4821 gsm_a_bssmap_stat_packet
,
4823 gsm_a_stat_free_table_item
,
4825 array_length(gsm_a_stat_fields
), gsm_a_stat_fields
,
4826 array_length(gsm_a_stat_params
), gsm_a_stat_params
,
4831 static stat_tap_table_ui gsm_a_dtap_mm_stat_table
= {
4832 REGISTER_TELEPHONY_GROUP_GSM
,
4833 "A-Interface DTAP Mobility Management",
4836 gsm_a_dtap_mm_stat_init
,
4837 gsm_a_dtap_mm_stat_packet
,
4839 gsm_a_stat_free_table_item
,
4841 array_length(gsm_a_stat_fields
), gsm_a_stat_fields
,
4842 array_length(gsm_a_stat_params
), gsm_a_stat_params
,
4847 static stat_tap_table_ui gsm_a_dtap_rr_stat_table
= {
4848 REGISTER_TELEPHONY_GROUP_GSM
,
4849 "A-Interface DTAP Radio Resource Management",
4852 gsm_a_dtap_rr_stat_init
,
4853 gsm_a_dtap_rr_stat_packet
,
4855 gsm_a_stat_free_table_item
,
4857 array_length(gsm_a_stat_fields
), gsm_a_stat_fields
,
4858 array_length(gsm_a_stat_params
), gsm_a_stat_params
,
4863 static stat_tap_table_ui gsm_a_dtap_cc_stat_table
= {
4864 REGISTER_TELEPHONY_GROUP_GSM
,
4865 "A-Interface DTAP Call Control",
4868 gsm_a_dtap_cc_stat_init
,
4869 gsm_a_dtap_cc_stat_packet
,
4871 gsm_a_stat_free_table_item
,
4873 array_length(gsm_a_stat_fields
), gsm_a_stat_fields
,
4874 array_length(gsm_a_stat_params
), gsm_a_stat_params
,
4879 static stat_tap_table_ui gsm_a_dtap_gmm_stat_table
= {
4880 REGISTER_TELEPHONY_GROUP_GSM
,
4881 "A-Interface DTAP GPRS Mobility Management",
4884 gsm_a_dtap_gmm_stat_init
,
4885 gsm_a_dtap_gmm_stat_packet
,
4887 gsm_a_stat_free_table_item
,
4889 array_length(gsm_a_stat_fields
), gsm_a_stat_fields
,
4890 array_length(gsm_a_stat_params
), gsm_a_stat_params
,
4895 static stat_tap_table_ui gsm_a_dtap_sm_stat_table
= {
4896 REGISTER_TELEPHONY_GROUP_GSM
,
4897 "A-Interface DTAP GPRS Session Management",
4900 gsm_a_dtap_sm_stat_init
,
4901 gsm_a_dtap_sm_stat_packet
,
4903 gsm_a_stat_free_table_item
,
4905 array_length(gsm_a_stat_fields
), gsm_a_stat_fields
,
4906 array_length(gsm_a_stat_params
), gsm_a_stat_params
,
4911 static stat_tap_table_ui gsm_a_dtap_sms_stat_table
= {
4912 REGISTER_TELEPHONY_GROUP_GSM
,
4913 "A-Interface DTAP Short Message Service",
4916 gsm_a_dtap_sms_stat_init
,
4917 gsm_a_dtap_sms_stat_packet
,
4919 gsm_a_stat_free_table_item
,
4921 array_length(gsm_a_stat_fields
), gsm_a_stat_fields
,
4922 array_length(gsm_a_stat_params
), gsm_a_stat_params
,
4927 static stat_tap_table_ui gsm_a_dtap_tp_stat_table
= {
4928 REGISTER_TELEPHONY_GROUP_GSM
,
4929 "A-Interface DTAP Special Conformance Testing Functions",
4932 gsm_a_dtap_tp_stat_init
,
4933 gsm_a_dtap_tp_stat_packet
,
4935 gsm_a_stat_free_table_item
,
4937 array_length(gsm_a_stat_fields
), gsm_a_stat_fields
,
4938 array_length(gsm_a_stat_params
), gsm_a_stat_params
,
4943 static stat_tap_table_ui gsm_a_dtap_ss_stat_table
= {
4944 REGISTER_TELEPHONY_GROUP_GSM
,
4945 "A-Interface DTAP Supplementary Services",
4948 gsm_a_dtap_ss_stat_init
,
4949 gsm_a_dtap_ss_stat_packet
,
4951 gsm_a_stat_free_table_item
,
4953 array_length(gsm_a_stat_fields
), gsm_a_stat_fields
,
4954 array_length(gsm_a_stat_params
), gsm_a_stat_params
,
4959 static stat_tap_table_ui gsm_a_sacch_rr_stat_table
= {
4960 REGISTER_TELEPHONY_GROUP_GSM
,
4961 "A-Interface SACCH",
4964 gsm_a_sacch_rr_stat_init
,
4965 gsm_a_sacch_rr_stat_packet
,
4967 gsm_a_stat_free_table_item
,
4969 array_length(gsm_a_stat_fields
), gsm_a_stat_fields
,
4970 array_length(gsm_a_stat_params
), gsm_a_stat_params
,
4975 last_offset
= NUM_INDIVIDUAL_ELEMS
;
4977 ett
[0] = &ett_gsm_a_plmn
;
4978 ett
[1] = &ett_gsm_a_poly_pnt
;
4979 for (i
=0; i
< NUM_GSM_COMMON_ELEM
; i
++, last_offset
++)
4981 ett
[last_offset
] = &ett_gsm_common_elem
[i
];
4984 /* Register the protocol name and description */
4987 proto_register_protocol("GSM A-I/F COMMON", "GSM COMMON", "gsm_a");
4989 proto_register_field_array(proto_a_common
, hf
, array_length(hf
));
4991 proto_register_subtree_array(ett
, array_length(ett
));
4992 expert_a_common
= expert_register_protocol(proto_a_common
);
4993 expert_register_field_array(expert_a_common
, ei
, array_length(ei
));
4996 gsm_a_tap
= register_tap("gsm_a");
4998 register_stat_tap_table_ui(&gsm_a_bssmap_stat_table
);
4999 register_stat_tap_table_ui(&gsm_a_dtap_mm_stat_table
);
5000 register_stat_tap_table_ui(&gsm_a_dtap_rr_stat_table
);
5001 register_stat_tap_table_ui(&gsm_a_dtap_cc_stat_table
);
5002 register_stat_tap_table_ui(&gsm_a_dtap_gmm_stat_table
);
5003 register_stat_tap_table_ui(&gsm_a_dtap_sms_stat_table
);
5004 register_stat_tap_table_ui(&gsm_a_dtap_sm_stat_table
);
5005 register_stat_tap_table_ui(&gsm_a_dtap_ss_stat_table
);
5006 register_stat_tap_table_ui(&gsm_a_dtap_tp_stat_table
);
5007 register_stat_tap_table_ui(&gsm_a_sacch_rr_stat_table
);
5009 /* Register a 3GPP protocol to be used for "global hf" that can be used to track inter protocol relations*/
5010 static hf_register_info hf_3gpp
[] =
5013 { "TMSI/P-TMSI/M-TMSI/5G-TMSI", "3gpp.tmsi",
5014 FT_UINT32
, BASE_DEC_HEX
, 0, 0x0,
5015 "Filter TMSI, P-TMSI, M-TMSI, 5G-TMSI across protocols", HFILL
}
5019 proto_3gpp
= proto_register_protocol("3GPP COMMON", "3GPP COMMON", "3gpp");
5021 proto_register_field_array(proto_3gpp
, hf_3gpp
, array_length(hf_3gpp
));
5026 * Editor modelines - https://www.wireshark.org/tools/modelines.html
5031 * indent-tabs-mode: nil
5034 * vi: set shiftwidth=4 tabstop=8 expandtab:
5035 * :indentSize=4:tabSize=8:noTabs=true: