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>
11 * Wireshark - Network traffic analyzer
12 * By Gerald Combs <gerald@wireshark.org>
13 * Copyright 1998 Gerald Combs
15 * This program is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU General Public License
17 * as published by the Free Software Foundation; either version 2
18 * of the License, or (at your option) any later version.
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
25 * You should have received a copy of the GNU General Public License
26 * along with this program; if not, write to the Free Software
27 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
36 #include <epan/packet.h>
37 #include <epan/to_str.h>
38 #include <epan/expert.h>
40 #include <epan/wmem/wmem.h>
42 #include "packet-bssap.h"
43 #include "packet-sccp.h"
44 #include "packet-gsm_a_common.h"
45 #include "packet-gmr1_common.h"
46 #include "packet-e212.h"
49 static const value_string gsm_common_elem_strings
[] = {
50 /* Common Information Elements 10.5.1 */
51 { DE_CELL_ID
, "Cell Identity" },
52 { DE_CIPH_KEY_SEQ_NUM
, "Ciphering Key Sequence Number" },
53 { DE_LAI
, "Location Area Identification (LAI)" },
54 { DE_MID
, "Mobile Identity" },
55 { DE_MS_CM_1
, "Mobile Station Classmark 1" },
56 { DE_MS_CM_2
, "Mobile Station Classmark 2" },
57 { DE_MS_CM_3
, "Mobile Station Classmark 3" },
58 { DE_SPARE_NIBBLE
, "Spare Half Octet" },
59 { DE_D_GB_CALL_REF
, "Descriptive group or broadcast call reference" },
60 { DE_G_CIPH_KEY_NUM
, "Group Cipher Key Number" },
61 { DE_PD_SAPI
, "PD and SAPI $(CCBS)$" },
62 { DE_PRIO
, "Priority Level" },
63 { DE_CN_COMMON_GSM_MAP_NAS_SYS_INFO
, "CN Common GSM-MAP NAS system information" },
64 { DE_CS_DOMAIN_SPEC_SYS_INFO
, "CS domain specific system information" },
65 { DE_PS_DOMAIN_SPEC_SYS_INFO
, "PS domain specific system information" },
66 { DE_PLMN_LIST
, "PLMN List" },
67 { DE_NAS_CONT_FOR_PS_HO
, "NAS container for PS HO" },
68 { DE_MS_NET_FEAT_SUP
, "MS network feature support" },
71 value_string_ext gsm_common_elem_strings_ext
= VALUE_STRING_EXT_INIT(gsm_common_elem_strings
);
73 static const value_string gsm_a_skip_ind_vals
[] = {
74 { 0, "No indication of selected PLMN"},
75 { 1, "PLMN identity of the Common PLMN in the broadcast system information"},
76 { 2, "PLMN identity of the first Additional PLMN in the broadcast system information"},
77 { 3, "PLMN identity of the second Additional PLMN in the broadcast system information"},
78 { 4, "PLMN identity of the third Additional PLMN in the broadcast sytem information"},
79 { 5, "PLMN identity of the fourth Additional PLMN in the broadcast system information"},
85 static const true_false_string gsm_a_extension_value
= {
91 /* Mobile Station Classmark Value strings
94 /* Mobile Station Classmark
97 static const value_string gsm_a_msc_rev_vals
[] = {
98 { 0, "Reserved for GSM phase 1"},
99 { 1, "Used by GSM phase 2 mobile stations"},
100 { 2, "Used by mobile stations supporting R99 or later versions of the protocol"},
101 { 3, "Reserved for future use"},
105 /* ES IND (octet 3, bit 5) "Controlled Early Classmark Sending" option implementation */
106 static const true_false_string ES_IND_vals
= {
107 "Controlled Early Classmark Sending option is implemented in the MS",
108 "Controlled Early Classmark Sending option is not implemented in the MS"
110 /* A5/1 algorithm supported (octet 3, bit 4) */
111 static const true_false_string A5_1_algorithm_sup_vals
= {
112 "encryption algorithm A5/1 not available",
113 "encryption algorithm A5/1 available"
115 /* RF Power Capability (Octet 3) */
116 static const value_string RF_power_capability_vals
[] = {
122 { 7, "RF Power capability is irrelevant in this information element"},
125 /* PS capability (pseudo-synchronization capability) (octet 4) */
126 static const true_false_string ps_sup_cap_vals
= {
127 "PS capability present",
128 "PS capability not present"
130 /* SS Screening Indicator (octet 4)defined in 3GPP TS 24.080 */
131 static const value_string SS_screening_indicator_vals
[] = {
132 { 0, "Default value of phase 1"},
133 { 1, "Capability of handling of ellipsis notation and phase 2 error handling "},
134 { 2, "For future use"},
135 { 3, "For future use"},
138 /* SM capability (MT SMS pt to pt capability) (octet 4)*/
139 static const true_false_string SM_capability_vals
= {
140 "Mobile station supports mobile terminated point to point SMS",
141 "Mobile station does not support mobile terminated point to point SMS"
143 /* VBS notification reception (octet 4) */
144 static const true_false_string VBS_notification_rec_vals
= {
145 "VBS capability and notifications wanted",
146 "no VBS capability or no notifications wanted"
148 /* VGCS notification reception (octet 4) */
149 static const true_false_string VGCS_notification_rec_vals
= {
150 "VGCS capability and notifications wanted",
151 "no VGCS capability or no notifications wanted"
153 /* FC Frequency Capability (octet 4 ) */
154 static const true_false_string FC_frequency_cap_vals
= {
155 "The MS does support the E-GSM or R-GSM",
156 "The MS does not support the E-GSM or R-GSM band"
158 /* CM3 (octet 5, bit 8) */
159 static const true_false_string CM3_vals
= {
160 "The MS supports options that are indicated in classmark 3 IE",
161 "The MS does not support any options that are indicated in CM3"
163 /* LCS VA capability (LCS value added location request notification capability) (octet 5,bit 6) */
164 static const true_false_string LCS_VA_cap_vals
= {
165 "LCS value added location request notification capability supported",
166 "LCS value added location request notification capability not supported"
168 /* UCS2 treatment (octet 5, bit 5) */
169 static const true_false_string UCS2_treatment_vals
= {
170 "the ME has no preference between the use of the default alphabet and the use of UCS2",
171 "the ME has a preference for the default alphabet"
173 /* SoLSA (octet 5, bit 4) */
174 static const true_false_string SoLSA_vals
= {
175 "The ME supports SoLSA",
176 "The ME does not support SoLSA"
178 /* CMSP: CM Service Prompt (octet 5, bit 3) */
179 static const true_false_string CMSP_vals
= {
180 "Network initiated MO CM connection request supported for at least one CM protocol",
181 "Network initiated MO CM connection request not supported"
183 /* A5/7 algorithm supported */
184 static const true_false_string A5_7_algorithm_sup_vals
= {
185 "encryption algorithm A5/7 available",
186 "encryption algorithm A5/7 not available"
188 /* A5/6 algorithm supported */
189 static const true_false_string A5_6_algorithm_sup_vals
= {
190 "encryption algorithm A5/6 available",
191 "encryption algorithm A5/6 not available"
193 /* A5/5 algorithm supported */
194 static const true_false_string A5_5_algorithm_sup_vals
= {
195 "encryption algorithm A5/5 available",
196 "encryption algorithm A5/5 not available"
198 /* A5/4 algorithm supported */
199 static const true_false_string A5_4_algorithm_sup_vals
= {
200 "encryption algorithm A5/4 available",
201 "encryption algorithm A5/4 not available"
203 /* A5/3 algorithm supported (octet 5, bit 2) */
204 static const true_false_string A5_3_algorithm_sup_vals
= {
205 "encryption algorithm A5/3 available",
206 "encryption algorithm A5/3 not available"
208 /* A5/2 algorithm supported (octet 5, bit 1) */
209 static const true_false_string A5_2_algorithm_sup_vals
= {
210 "encryption algorithm A5/2 available",
211 "encryption algorithm A5/2 not available"
214 static const value_string mobile_identity_type_vals
[] = {
219 { 4, "TMSI/P-TMSI/M-TMSI"},
220 { 5, "TMGI and optional MBMS Session Identity"}, /* ETSI TS 124 008 V6.8.0 (2005-03) p326 */
224 static const true_false_string oddevenind_vals
= {
225 "Odd number of identity digits",
226 "Even number of identity digits"
229 static const true_false_string true_false_vals
= {
234 const value_string gsm_a_sms_vals
[] = {
235 { 0, "1/4 timeslot (~144 microseconds)" },
236 { 1, "2/4 timeslot (~288 microseconds)" },
237 { 2, "3/4 timeslot (~433 microseconds)" },
238 { 3, "4/4 timeslot (~577 microseconds)" },
239 { 4, "5/4 timeslot (~721 microseconds)" },
240 { 5, "6/4 timeslot (~865 microseconds)" },
241 { 6, "7/4 timeslot (~1009 microseconds)" },
242 { 7, "8/4 timeslot (~1154 microseconds)" },
243 { 8, "9/4 timeslot (~1298 microseconds)" },
244 { 9, "10/4 timeslot (~1442 microseconds)" },
245 { 10, "11/4 timeslot (~1586 microseconds)" },
246 { 11, "12/4 timeslot (~1730 microseconds)" },
247 { 12, "13/4 timeslot (~1874 microseconds)" },
248 { 13, "14/4 timeslot (~2019 microseconds)" },
249 { 14, "15/4 timeslot (~2163 microseconds)" },
250 { 15, "16/4 timeslot (~2307 microseconds)" },
254 static const true_false_string ms_assisted_e_otd_vals
= {
255 "MS assisted E-OTD supported",
256 "MS assisted E-OTD not supported"
259 static const true_false_string ms_based_e_otd_vals
= {
260 "MS based E-OTD supported",
261 "MS based E-OTD not supported"
264 static const true_false_string ms_assisted_gps_vals
= {
265 "MS assisted GPS supported",
266 "MS assisted GPS not supported"
269 static const true_false_string ms_based_gps_vals
= {
270 "MS based GPS supported",
271 "MS based GPS not supported"
274 static const true_false_string ms_conventional_gps_vals
= {
275 "Conventional GPS supported",
276 "Conventional GPS not supported"
279 static const true_false_string modulation_capability_vals
= {
280 "8-PSK supported for uplink transmission and downlink reception",
281 "8-PSK supported for downlink reception only"
284 static const value_string eight_psk_rf_power_capability_vals
[] = {
286 { 1, "Power class E1" },
287 { 2, "Power class E2" },
288 { 3, "Power class E3" },
292 static const value_string gsm_400_bands_supported_vals
[] = {
293 { 1, "GSM 480 supported, GSM 450 not supported" },
294 { 2, "GSM 450 supported, GSM 480 not supported" },
295 { 3, "GSM 450 supported, GSM 480 supported" },
299 static const true_false_string umts_fdd_rat_cap_vals
= {
300 "UMTS FDD supported",
301 "UMTS FDD not supported"
304 static const true_false_string umts_384_mcps_tdd_rat_cap_vals
= {
305 "UMTS 3.84 Mcps TDD supported",
306 "UMTS 3.84 Mcps TDD not supported"
309 static const true_false_string cdma_2000_rat_cap_vals
= {
310 "CDMA 2000 supported",
311 "CDMA 2000 not supported"
314 static const value_string dtm_gprs_multi_slot_class_vals
[] = {
315 { 0, "Unused. If received, the network shall interpret this as 1" },
316 { 1, "Multislot class 5 supported" },
317 { 2, "Multislot class 9 supported" },
318 { 3, "Multislot class 11 supported" },
322 static const true_false_string single_slot_dtm_vals
= {
323 "Single Slot DTM supported",
324 "Single Slot DTM not supported"
327 static const value_string gsm_band_vals
[] = {
328 { 0, "E-GSM is supported" },
329 { 1, "P-GSM is supported" },
330 { 2, "GSM 1800 is supported" },
331 { 3, "GSM 450 is supported" },
332 { 4, "GSM 480 is supported" },
333 { 5, "GSM 850 is supported" },
334 { 6, "GSM 1900 is supported" },
335 { 7, "GSM 750 is supported" },
336 { 8, "GSM 710 is supported" },
337 { 9, "T-GSM 810 is supported" },
341 static const true_false_string umts_128_mcps_tdd_rat_cap_vals
= {
342 "UMTS 1.28 Mcps TDD supported",
343 "UMTS 1.28 Mcps TDD not supported"
346 static const true_false_string geran_feature_package_1_vals
= {
347 "GERAN feature package 1 supported",
348 "GERAN feature package 1 not supported"
351 static const true_false_string flo_iu_cap_vals
= {
352 "FLO in GERAN Iu Mode supported",
353 "FLO in GERAN Iu Mode not supported"
356 static const true_false_string geran_feature_package_2_vals
= {
357 "GERAN feature package 2 supported",
358 "GERAN feature package 2 not supported"
361 static const value_string gmsk_multislot_power_prof_vals
[] = {
362 { 0, "GMSK_MULTISLOT_POWER_PROFILE 0" },
363 { 1, "GMSK_MULTISLOT_POWER_PROFILE 1" },
364 { 2, "GMSK_MULTISLOT_POWER_PROFILE 2" },
365 { 3, "GMSK_MULTISLOT_POWER_PROFILE 3" },
369 static const value_string eight_psk_multislot_power_prof_vals
[] = {
370 { 0, "8-PSK_MULTISLOT_POWER_PROFILE 0" },
371 { 1, "8-PSK_MULTISLOT_POWER_PROFILE 1" },
372 { 2, "8-PSK_MULTISLOT_POWER_PROFILE 2" },
373 { 3, "8-PSK_MULTISLOT_POWER_PROFILE 3" },
377 static const value_string t_gsm_400_bands_supported_vals
[] = {
378 { 1, "T-GSM 380 supported, T-GSM 410 not supported" },
379 { 2, "T-GSM 410 supported, T-GSM 380 not supported" },
380 { 3, "T-GSM 410 supported, T-GSM 380 supported" },
384 static const value_string downlink_adv_receiver_perf_vals
[] = {
385 { 0, "Downlink Advanced Receiver Performance not supported" },
386 { 1, "Downlink Advanced Receiver Performance - phase I supported" },
387 { 2, "Downlink Advanced Receiver Performance - phase II supported" },
391 static const true_false_string dtm_enhancements_cap_vals
= {
392 "The mobile station supports enhanced DTM CS establishment and release procedures",
393 "The mobile station does not support enhanced DTM CS establishment and release procedures"
396 static const true_false_string offset_required_vals
= {
397 "The mobile station requires the offset",
398 "The mobile station does not require the offset"
401 static const value_string dtm_gprs_high_multi_slot_class_vals
[] = {
402 { 0, "Unused. If received, the network shall interpret this as \"0 0 1\"" },
403 { 1, "Multislot class 31 or 36 supported" },
404 { 2, "Multislot class 32 or 37 supported" },
405 { 3, "Multislot class 33 or 38 supported" },
406 { 4, "Multislot class 41 supported" },
407 { 5, "Multislot class 42 supported" },
408 { 6, "Multislot class 43 supported" },
409 { 7, "Multislot class 44 supported" },
413 static const true_false_string repeated_acch_cap_vals
= {
414 "The mobile station supports Repeated SACCH and Repeated Downlink FACCH",
415 "The mobile station does not support Repeated SACCH"
418 static const true_false_string ciphering_mode_setting_cap_vals
= {
419 "The mobile station supports the Ciphering Mode Setting IE in the DTM ASSIGNMENT COMMAND message",
420 "The mobile station does not support the Ciphering Mode Setting IE in the DTM ASSIGNMENT COMMAND message"
423 static const true_false_string additional_positioning_caps_vals
= {
424 "The mobile station supports additional positioning capabilities which can be retrieved using RRLP",
425 "The mobile station does not support additional positioning capabilities which can be retrieved using RRLP"
428 static const true_false_string e_utra_fdd_support_vals
= {
429 "E-UTRA FDD supported",
430 "E-UTRA FDD not supported"
433 static const true_false_string e_utra_tdd_support_vals
= {
434 "E-UTRA TDD supported",
435 "E-UTRA TDD not supported"
438 static const true_false_string e_utra_meas_and_report_support_vals
= {
439 "E-UTRAN Neighbour Cell measurements and measurement reporting while having an RR connection supported",
440 "E-UTRAN Neighbour Cell measurements and measurement reporting while having an RR connection not supported"
443 static const true_false_string prio_based_resel_support_vals
= {
444 "Priority-based cell reselection supported",
445 "Priority-based cell reselection not supported"
448 static const true_false_string utra_csg_cells_reporting_vals
= {
449 "Reporting of UTRAN CSG cells supported",
450 "Reporting of UTRAN CSG cells not supported"
453 static const value_string vamos_level_vals
[] = {
454 { 0, "VAMOS not supported" },
455 { 1, "VAMOS I supported" },
456 { 2, "VAMOS II supported" },
457 { 3, "Unused. If received, the network shall interpret this as VAMOS II supported" },
461 const value_string tighter_cap_level_vals
[] = {
462 { 0, "TIGHTER not supported" },
463 { 1, "TIGHTER supported for speech and signalling channels only" },
464 { 2, "TIGHTER supported for speech and signalling channels and for GPRS and EGPRS, but not for EGPRS2" },
465 { 3, "TIGHTER supported for speech and signalling channels and for GPRS, EGPRS and EGPRS2" },
469 const value_string cs_to_ps_srvcc_geran_to_utra_vals
[] = {
470 { 0, "CS to PS SRVCC from GERAN to UMTS FDD and 1.28 Mcps TDD not supported" },
471 { 1, "CS to PS SRVCC from GERAN to UMTS FDD supported" },
472 { 2, "CS to PS SRVCC from GERAN to UMTS 1.28 Mcps TDD supported" },
473 { 3, "CS to PS SRVCC from GERAN to UMTS FDD and 1.28 Mcps TDD supported" },
477 const value_string cs_to_ps_srvcc_geran_to_eutra_vals
[] = {
478 { 0, "CS to PS SRVCC from GERAN to E-UTRA FDD and TDD not supported" },
479 { 1, "CS to PS SRVCC from GERAN to E-UTRA FDD supported" },
480 { 2, "CS to PS SRVCC from GERAN to E-UTRA TDD supported" },
481 { 3, "CS to PS SRVCC from GERAN to E-UTRA FDD and TDD supported" },
485 static const value_string gsm_a_rr_rxlev_vals
[] = {
487 { 1, "-110 <= x < -109 dBm"},
488 { 2, "-109 <= x < -108 dBm"},
489 { 3, "-108 <= x < -107 dBm"},
490 { 4, "-107 <= x < -106 dBm"},
491 { 5, "-106 <= x < -105 dBm"},
492 { 6, "-105 <= x < -104 dBm"},
493 { 7, "-104 <= x < -103 dBm"},
494 { 8, "-103 <= x < -102 dBm"},
495 { 9, "-102 <= x < -101 dBm"},
496 { 10, "-101 <= x < -100 dBm"},
497 { 11, "-100 <= x < -99 dBm"},
498 { 12, "-99 <= x < -98 dBm"},
499 { 13, "-98 <= x < -97 dBm"},
500 { 14, "-97 <= x < -96 dBm"},
501 { 15, "-96 <= x < -95 dBm"},
502 { 16, "-95 <= x < -94 dBm"},
503 { 17, "-94 <= x < -93 dBm"},
504 { 18, "-93 <= x < -92 dBm"},
505 { 19, "-92 <= x < -91 dBm"},
506 { 20, "-91 <= x < -90 dBm"},
507 { 21, "-90 <= x < -89 dBm"},
508 { 22, "-89 <= x < -88 dBm"},
509 { 23, "-88 <= x < -87 dBm"},
510 { 24, "-87 <= x < -86 dBm"},
511 { 25, "-86 <= x < -85 dBm"},
512 { 26, "-85 <= x < -84 dBm"},
513 { 27, "-84 <= x < -83 dBm"},
514 { 28, "-83 <= x < -82 dBm"},
515 { 29, "-82 <= x < -81 dBm"},
516 { 30, "-81 <= x < -80 dBm"},
517 { 31, "-80 <= x < -79 dBm"},
518 { 32, "-79 <= x < -78 dBm"},
519 { 33, "-78 <= x < -77 dBm"},
520 { 34, "-77 <= x < -76 dBm"},
521 { 35, "-76 <= x < -75 dBm"},
522 { 36, "-75 <= x < -74 dBm"},
523 { 37, "-74 <= x < -73 dBm"},
524 { 38, "-73 <= x < -72 dBm"},
525 { 39, "-72 <= x < -71 dBm"},
526 { 40, "-71 <= x < -70 dBm"},
527 { 41, "-70 <= x < -69 dBm"},
528 { 42, "-69 <= x < -68 dBm"},
529 { 43, "-68 <= x < -67 dBm"},
530 { 44, "-67 <= x < -66 dBm"},
531 { 45, "-66 <= x < -65 dBm"},
532 { 46, "-65 <= x < -64 dBm"},
533 { 47, "-64 <= x < -63 dBm"},
534 { 48, "-63 <= x < -62 dBm"},
535 { 49, "-62 <= x < -61 dBm"},
536 { 50, "-61 <= x < -60 dBm"},
537 { 51, "-60 <= x < -59 dBm"},
538 { 52, "-59 <= x < -58 dBm"},
539 { 53, "-58 <= x < -57 dBm"},
540 { 54, "-57 <= x < -56 dBm"},
541 { 55, "-56 <= x < -55 dBm"},
542 { 56, "-55 <= x < -54 dBm"},
543 { 57, "-54 <= x < -53 dBm"},
544 { 58, "-53 <= x < -52 dBm"},
545 { 59, "-52 <= x < -51 dBm"},
546 { 60, "-51 <= x < -50 dBm"},
547 { 61, "-50 <= x < -49 dBm"},
548 { 62, "-49 <= x < -48 dBm"},
552 value_string_ext gsm_a_rr_rxlev_vals_ext
= VALUE_STRING_EXT_INIT(gsm_a_rr_rxlev_vals
);
554 /* Initialize the protocol and registered fields */
555 static int proto_a_common
= -1;
559 int hf_gsm_a_common_elem_id
= -1;
560 static int hf_gsm_a_l_ext
= -1;
561 static int hf_gsm_a_imsi
= -1;
562 int hf_gsm_a_tmsi
= -1;
563 static int hf_gsm_a_imei
= -1;
564 static int hf_gsm_a_imeisv
= -1;
566 static int hf_gsm_a_MSC_rev
= -1;
567 static int hf_gsm_a_ES_IND
= -1;
568 static int hf_gsm_a_A5_1_algorithm_sup
= -1;
569 static int hf_gsm_a_RF_power_capability
= -1;
570 static int hf_gsm_a_ps_sup_cap
= -1;
571 static int hf_gsm_a_SS_screening_indicator
= -1;
572 static int hf_gsm_a_SM_capability
= -1;
573 static int hf_gsm_a_VBS_notification_rec
= -1;
574 static int hf_gsm_a_VGCS_notification_rec
= -1;
575 static int hf_gsm_a_FC_frequency_cap
= -1;
576 static int hf_gsm_a_CM3
= -1;
577 static int hf_gsm_a_LCS_VA_cap
= -1;
578 static int hf_gsm_a_UCS2_treatment
= -1;
579 static int hf_gsm_a_SoLSA
= -1;
580 static int hf_gsm_a_CMSP
= -1;
581 static int hf_gsm_a_A5_7_algorithm_sup
= -1;
582 static int hf_gsm_a_A5_6_algorithm_sup
= -1;
583 static int hf_gsm_a_A5_5_algorithm_sup
= -1;
584 static int hf_gsm_a_A5_4_algorithm_sup
= -1;
585 static int hf_gsm_a_A5_3_algorithm_sup
= -1;
586 static int hf_gsm_a_A5_2_algorithm_sup
= -1;
588 static int hf_gsm_a_odd_even_ind
= -1;
589 static int hf_gsm_a_unused
= -1;
590 static int hf_gsm_a_mobile_identity_type
= -1;
591 static int hf_gsm_a_tmgi_mcc_mnc_ind
= -1;
592 static int hf_gsm_a_mbs_ses_id_ind
= -1;
593 static int hf_gsm_a_mbs_service_id
= -1;
594 static int hf_gsm_a_mbs_session_id
= -1;
595 static int hf_gsm_a_length
= -1;
596 int hf_gsm_a_extension
= -1;
597 int hf_gsm_a_L3_protocol_discriminator
= -1;
598 int hf_gsm_a_call_prio
= -1;
599 int hf_gsm_a_skip_ind
= -1;
600 int hf_gsm_a_spare_bits
= -1;
601 int hf_gsm_a_lac
= -1;
603 static int hf_gsm_a_spare_nibble
= -1;
604 static int hf_gsm_a_type_of_ciph_alg
= -1;
605 static int hf_gsm_a_att
= -1;
606 static int hf_gsm_a_nmo_1
= -1;
607 static int hf_gsm_a_nmo
= -1;
608 static int hf_gsm_a_old_xid
= -1;
609 static int hf_gsm_a_iov_ui
= -1;
610 static int hf_gsm_a_ext_periodic_timers
= -1;
611 static int hf_gsm_a_b7spare
= -1;
612 int hf_gsm_a_b8spare
= -1;
613 static int hf_gsm_a_multi_bnd_sup_fields
= -1;
614 static int hf_gsm_a_pgsm_supported
= -1;
615 static int hf_gsm_a_egsm_supported
= -1;
616 static int hf_gsm_a_gsm1800_supported
= -1;
617 static int hf_gsm_a_ass_radio_cap1
= -1;
618 static int hf_gsm_a_ass_radio_cap2
= -1;
619 static int hf_gsm_a_rsupport
= -1;
620 static int hf_gsm_a_r_capabilities
= -1;
621 static int hf_gsm_a_multislot_capabilities
= -1;
622 static int hf_gsm_a_multislot_class
= -1;
623 static int hf_gsm_a_ucs2_treatment
= -1;
624 static int hf_gsm_a_extended_measurement_cap
= -1;
625 static int hf_gsm_a_ms_measurement_capability
= -1;
626 static int hf_gsm_a_sms_value
=-1;
627 static int hf_gsm_a_sm_value
=-1;
628 static int hf_gsm_a_key_seq
= -1;
629 static int hf_gsm_a_ms_pos_method_cap_present
= -1;
630 static int hf_gsm_a_ms_pos_method
= -1;
631 static int hf_gsm_a_ms_assisted_e_otd
= -1;
632 static int hf_gsm_a_ms_based_e_otd
= -1;
633 static int hf_gsm_a_ms_assisted_gps
= -1;
634 static int hf_gsm_a_ms_based_gps
= -1;
635 static int hf_gsm_a_ms_conventional_gps
= -1;
636 static int hf_gsm_a_ecsd_multi_slot_capability
= -1;
637 static int hf_gsm_a_ecsd_multi_slot_class
= -1;
638 static int hf_gsm_a_8_psk_struct_present
= -1;
639 static int hf_gsm_a_8_psk_struct
= -1;
640 static int hf_gsm_a_modulation_capability
= -1;
641 static int hf_gsm_a_8_psk_rf_power_capability_1_present
= -1;
642 static int hf_gsm_a_8_psk_rf_power_capability_1
= -1;
643 static int hf_gsm_a_8_psk_rf_power_capability_2_present
= -1;
644 static int hf_gsm_a_8_psk_rf_power_capability_2
= -1;
645 static int hf_gsm_a_gsm_400_band_info_present
= -1;
646 static int hf_gsm_a_gsm_400_bands_supported
= -1;
647 static int hf_gsm_a_gsm_400_assoc_radio_cap
= -1;
648 static int hf_gsm_a_gsm_850_assoc_radio_cap_present
= -1;
649 static int hf_gsm_a_gsm_850_assoc_radio_cap
= -1;
650 static int hf_gsm_a_gsm_1900_assoc_radio_cap_present
= -1;
651 static int hf_gsm_a_gsm_1900_assoc_radio_cap
= -1;
652 static int hf_gsm_a_cm3_A5_bits
= -1;
653 static int hf_gsm_a_umts_fdd_rat_cap
= -1;
654 static int hf_gsm_a_umts_384_mcps_tdd_rat_cap
= -1;
655 static int hf_gsm_a_cdma_2000_rat_cap
= -1;
656 static int hf_gsm_a_dtm_e_gprs_multi_slot_info_present
= -1;
657 static int hf_gsm_a_dtm_gprs_multi_slot_class
= -1;
658 static int hf_gsm_a_single_slot_dtm
= -1;
659 static int hf_gsm_a_dtm_egprs_multi_slot_class_present
= -1;
660 static int hf_gsm_a_dtm_egprs_multi_slot_class
= -1;
661 static int hf_gsm_a_single_band_support
= -1;
662 static int hf_gsm_a_gsm_band
= -1;
663 static int hf_gsm_a_gsm_750_assoc_radio_cap_present
= -1;
664 static int hf_gsm_a_gsm_750_assoc_radio_cap
= -1;
665 static int hf_gsm_a_umts_128_mcps_tdd_rat_cap
= -1;
666 static int hf_gsm_a_geran_feature_package_1
= -1;
667 static int hf_gsm_a_ext_dtm_e_gprs_multi_slot_info_present
= -1;
668 static int hf_gsm_a_ext_dtm_gprs_multi_slot_class
= -1;
669 static int hf_gsm_a_ext_dtm_egprs_multi_slot_class
= -1;
670 static int hf_gsm_a_high_multislot_cap_present
= -1;
671 static int hf_gsm_a_high_multislot_cap
= -1;
672 static int hf_gsm_a_geran_iu_mode_support
= -1;
673 static int hf_gsm_a_geran_iu_mode_cap
= -1;
674 static int hf_gsm_a_geran_iu_mode_cap_length
= -1;
675 static int hf_gsm_a_flo_iu_cap
= -1;
676 static int hf_gsm_a_geran_feature_package_2
= -1;
677 static int hf_gsm_a_gmsk_multislot_power_prof
= -1;
678 static int hf_gsm_a_8_psk_multislot_power_prof
= -1;
679 static int hf_gsm_a_t_gsm_400_band_info_present
= -1;
680 static int hf_gsm_a_t_gsm_400_bands_supported
= -1;
681 static int hf_gsm_a_t_gsm_400_assoc_radio_cap
= -1;
682 static int hf_gsm_a_t_gsm_900_assoc_radio_cap_present
= -1;
683 static int hf_gsm_a_t_gsm_900_assoc_radio_cap
= -1;
684 static int hf_gsm_a_downlink_adv_receiver_perf
= -1;
685 static int hf_gsm_a_dtm_enhancements_cap
= -1;
686 static int hf_gsm_a_dtm_e_gprs_high_multi_slot_info_present
= -1;
687 static int hf_gsm_a_dtm_gprs_high_multi_slot_class
= -1;
688 static int hf_gsm_a_offset_required
= -1;
689 static int hf_gsm_a_dtm_egprs_high_multi_slot_class_present
= -1;
690 static int hf_gsm_a_dtm_egprs_high_multi_slot_class
= -1;
691 static int hf_gsm_a_repeated_acch_cap
= -1;
692 static int hf_gsm_a_gsm_710_assoc_radio_cap_present
= -1;
693 static int hf_gsm_a_gsm_710_assoc_radio_cap
= -1;
694 static int hf_gsm_a_t_gsm_810_assoc_radio_cap_present
= -1;
695 static int hf_gsm_a_t_gsm_810_assoc_radio_cap
= -1;
696 static int hf_gsm_a_ciphering_mode_setting_cap
= -1;
697 static int hf_gsm_a_additional_positioning_caps
= -1;
698 static int hf_gsm_a_e_utra_fdd_support
= -1;
699 static int hf_gsm_a_e_utra_tdd_support
= -1;
700 static int hf_gsm_a_e_utra_meas_and_report_support
= -1;
701 static int hf_gsm_a_prio_based_resel_support
= -1;
702 static int hf_gsm_a_utra_csg_cells_reporting
= -1;
703 static int hf_gsm_a_vamos_level
= -1;
704 static int hf_gsm_a_tighter_cap
= -1;
705 static int hf_gsm_a_selective_ciph_down_sacch
= -1;
706 static int hf_gsm_a_cs_to_ps_srvcc_geran_to_utra
= -1;
707 static int hf_gsm_a_cs_to_ps_srvcc_geran_to_eutra
= -1;
708 static int hf_gsm_a_geran_network_sharing_support
= -1;
710 static int hf_gsm_a_geo_loc_type_of_shape
= -1;
711 static int hf_gsm_a_geo_loc_sign_of_lat
= -1;
712 static int hf_gsm_a_geo_loc_deg_of_lat
=-1;
713 static int hf_gsm_a_geo_loc_deg_of_long
=-1;
714 static int hf_gsm_a_geo_loc_uncertainty_code
= -1;
715 static int hf_gsm_a_geo_loc_uncertainty_semi_major
= -1;
716 static int hf_gsm_a_geo_loc_uncertainty_semi_minor
= -1;
717 static int hf_gsm_a_geo_loc_orientation_of_major_axis
= -1;
718 static int hf_gsm_a_geo_loc_uncertainty_altitude
= -1;
719 static int hf_gsm_a_geo_loc_confidence
= -1;
720 static int hf_gsm_a_geo_loc_no_of_points
= -1;
721 static int hf_gsm_a_velocity_type
= -1;
722 static int hf_gsm_a_bearing
= -1;
723 static int hf_gsm_a_horizontal_speed
= -1;
724 static int hf_gsm_a_uncertainty_speed
= -1;
725 static int hf_gsm_a_h_uncertainty_speed
= -1;
726 static int hf_gsm_a_v_uncertainty_speed
= -1;
727 static int hf_gsm_a_vertical_speed
= -1;
728 static int hf_gsm_a_d
= -1;
729 static int hf_gsm_a_geo_loc_D
= -1;
730 static int hf_gsm_a_geo_loc_altitude
= -1;
731 static int hf_gsm_a_geo_loc_inner_radius
= -1;
732 static int hf_gsm_a_geo_loc_uncertainty_radius
= -1;
733 static int hf_gsm_a_geo_loc_offset_angle
= -1;
734 static int hf_gsm_a_geo_loc_included_angle
= -1;
736 static expert_field ei_gsm_a_extraneous_data
= EI_INIT
;
738 static char a_bigbuf
[1024];
740 sccp_msg_info_t
* sccp_msg
;
741 sccp_assoc_info_t
* sccp_assoc
;
743 #define NUM_GSM_COMMON_ELEM (sizeof(gsm_common_elem_strings)/sizeof(value_string))
744 gint ett_gsm_common_elem
[NUM_GSM_COMMON_ELEM
];
747 #define ELLIPSOID_POINT 0
748 #define ELLIPSOID_POINT_WITH_UNCERT_CIRC 1
749 #define ELLIPSOID_POINT_WITH_UNCERT_ELLIPSE 3
751 #define ELLIPSOID_POINT_WITH_ALT 8
752 #define ELLIPSOID_POINT_WITH_ALT_AND_UNCERT_ELLIPSOID 9
753 #define ELLIPSOID_ARC 10
756 0 0 0 0 Ellipsoid Point
757 0 0 0 1 Ellipsoid point with uncertainty Circle
758 0 0 1 1 Ellipsoid point with uncertainty Ellipse
760 1 0 0 0 Ellipsoid point with altitude
761 1 0 0 1 Ellipsoid point with altitude and uncertainty Ellipsoid
762 1 0 1 0 Ellipsoid Arc
763 other values reserved for future use
766 /* TS 23 032 Table 2a: Coding of Type of Shape */
767 static const value_string type_of_shape_vals
[] = {
768 { ELLIPSOID_POINT
, "Ellipsoid Point"},
769 { ELLIPSOID_POINT_WITH_UNCERT_CIRC
, "Ellipsoid point with uncertainty Circle"},
770 { ELLIPSOID_POINT_WITH_UNCERT_ELLIPSE
, "Ellipsoid point with uncertainty Ellipse"},
771 { POLYGON
, "Polygon"},
772 { ELLIPSOID_POINT_WITH_ALT
, "Ellipsoid point with altitude"},
773 { ELLIPSOID_POINT_WITH_ALT_AND_UNCERT_ELLIPSOID
, "Ellipsoid point with altitude and uncertainty Ellipsoid"},
774 { ELLIPSOID_ARC
, "Ellipsoid Arc"},
778 /* 3GPP TS 23.032 7.3.1 */
779 static const value_string sign_of_latitude_vals
[] = {
785 static const value_string dir_of_alt_vals
[] = {
786 { 0, "Altitude expresses height"},
787 { 1, "Altitude expresses depth"},
792 dissect_geographical_description(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
) {
794 proto_item
*lat_item
, *long_item
, *major_item
, *minor_item
, *alt_item
, *uncer_item
;
795 /*proto_tree *subtree; */
796 guint8 type_of_shape
;
797 /*guint8 no_of_points;*/
804 /*subtree = proto_item_add_subtree(item, ett_gsm_a_geo_desc);*/
806 length
= tvb_reported_length_remaining(tvb
, 0);
807 /* Geographical Location
808 * The Location Estimate field is composed of 1 or more octets with an internal structure
809 * according to section 7 in [23.032].
811 proto_tree_add_item(tree
, hf_gsm_a_geo_loc_type_of_shape
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
814 type_of_shape
= tvb_get_guint8(tvb
,offset
)>>4;
815 switch (type_of_shape
) {
816 case ELLIPSOID_POINT
:
817 /* Ellipsoid Point */
818 case ELLIPSOID_POINT_WITH_UNCERT_CIRC
:
819 /* Ellipsoid Point with uncertainty Circle */
820 case ELLIPSOID_POINT_WITH_UNCERT_ELLIPSE
:
821 /* Ellipsoid Point with uncertainty Ellipse */
822 case ELLIPSOID_POINT_WITH_ALT
:
823 /* Ellipsoid Point with Altitude */
824 case ELLIPSOID_POINT_WITH_ALT_AND_UNCERT_ELLIPSOID
:
825 /* Ellipsoid Point with altitude and uncertainty ellipsoid */
831 proto_tree_add_item(tree
, hf_gsm_a_geo_loc_sign_of_lat
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
833 uvalue32
= tvb_get_ntoh24(tvb
,offset
);
834 /* convert degrees (X/0x7fffff) * 90 = degrees */
835 lat_item
= proto_tree_add_item(tree
, hf_gsm_a_geo_loc_deg_of_lat
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
836 proto_item_append_text(lat_item
, " (%s%.5f degrees)",
837 (uvalue32
& 0x00800000) ? "-" : "",
838 ((double)(uvalue32
& 0x7fffff)/8388607.0) * 90);
842 svalue32
= tvb_get_ntoh24(tvb
,offset
);
843 svalue32
|= (svalue32
& 0x800000) ? 0xff000000 : 0x00000000;
844 long_item
= proto_tree_add_item(tree
, hf_gsm_a_geo_loc_deg_of_long
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
845 /* (X/0xffffff) *360 = degrees */
846 proto_item_append_text(long_item
, " (%.5f degrees)",
847 ((double)svalue32
/16777215.0) * 360);
849 if (type_of_shape
== ELLIPSOID_POINT_WITH_UNCERT_CIRC
) {
850 /* Ellipsoid Point with uncertainty Circle */
853 /* Uncertainty code */
854 value
= tvb_get_guint8(tvb
,offset
)&0x7f;
855 uncer_item
= proto_tree_add_item(tree
, hf_gsm_a_geo_loc_uncertainty_code
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
856 proto_item_append_text(uncer_item
, " (%.1f m)", 10 * (pow(1.1, (double)value
) - 1));
857 }else if (type_of_shape
== ELLIPSOID_POINT_WITH_UNCERT_ELLIPSE
) {
858 /* Ellipsoid Point with uncertainty Ellipse */
859 /* Uncertainty semi-major octet 10
860 * To convert to metres 10*(((1.1)^X)-1)
862 value
= tvb_get_guint8(tvb
,offset
) & 0x7f;
863 major_item
= proto_tree_add_item(tree
, hf_gsm_a_geo_loc_uncertainty_semi_major
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
864 proto_item_append_text(major_item
, " (%.1f m)", 10 * (pow(1.1, (double)value
) - 1));
866 /* Uncertainty semi-minor Octet 11
867 * To convert to metres 10*(((1.1)^X)-1)
869 value
= tvb_get_guint8(tvb
,offset
)&0x7f;
870 minor_item
= proto_tree_add_item(tree
, hf_gsm_a_geo_loc_uncertainty_semi_minor
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
871 proto_item_append_text(minor_item
, " (%.1f m)", 10 * (pow(1.1, (double)value
) - 1));
873 /* Orientation of major axis octet 12
874 * allowed value from 0-179 to convert
875 * to actual degrees multiply by 2.
877 value
= tvb_get_guint8(tvb
,offset
)&0x7f;
878 proto_tree_add_uint(tree
, hf_gsm_a_geo_loc_orientation_of_major_axis
, tvb
, offset
, 1, value
*2);
881 proto_tree_add_item(tree
, hf_gsm_a_geo_loc_confidence
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
883 }else if (type_of_shape
== ELLIPSOID_POINT_WITH_ALT
) {
884 /* Ellipsoid Point with Altitude */
885 /*D: Direction of Altitude */
886 proto_tree_add_item(tree
, hf_gsm_a_geo_loc_D
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
888 proto_tree_add_item(tree
, hf_gsm_a_geo_loc_altitude
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
889 }else if (type_of_shape
== ELLIPSOID_POINT_WITH_ALT_AND_UNCERT_ELLIPSOID
) {
890 /* Ellipsoid Point with altitude and uncertainty ellipsoid */
891 /*D: Direction of Altitude octet 8,9 */
892 proto_tree_add_item(tree
, hf_gsm_a_geo_loc_D
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
893 /* Altitude Octet 8,9*/
894 proto_tree_add_item(tree
, hf_gsm_a_geo_loc_altitude
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
896 /* Uncertainty semi-major octet 10
897 * To convert to metres 10*(((1.1)^X)-1)
899 value
= tvb_get_guint8(tvb
,offset
)&0x7f;
900 major_item
= proto_tree_add_item(tree
, hf_gsm_a_geo_loc_uncertainty_semi_major
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
901 proto_item_append_text(major_item
, " (%.1f m)", 10 * (pow(1.1, (double)value
) - 1));
903 /* Uncertainty semi-minor Octet 11
904 * To convert to metres 10*(((1.1)^X)-1)
906 value
= tvb_get_guint8(tvb
,offset
)&0x7f;
907 minor_item
= proto_tree_add_item(tree
, hf_gsm_a_geo_loc_uncertainty_semi_minor
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
908 proto_item_append_text(minor_item
, " (%.1f m)", 10 * (pow(1.1, (double)value
) - 1));
910 /* Orientation of major axis octet 12
911 * allowed value from 0-179 to convert
912 * to actual degrees multiply by 2.
914 value
= tvb_get_guint8(tvb
,offset
)&0x7f;
915 proto_tree_add_uint(tree
, hf_gsm_a_geo_loc_orientation_of_major_axis
, tvb
, offset
, 1, value
*2);
917 /* Uncertainty Altitude 13
918 * to convert to metres 45*(((1.025)^X)-1)
920 value
= tvb_get_guint8(tvb
,offset
)&0x7f;
921 alt_item
= proto_tree_add_item(tree
, hf_gsm_a_geo_loc_uncertainty_altitude
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
922 proto_item_append_text(alt_item
, " (%.1f m)", 45 * (pow(1.025, (double)value
) - 1));
924 /* Confidence octet 14
926 proto_tree_add_item(tree
, hf_gsm_a_geo_loc_confidence
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
927 }else if (type_of_shape
== ELLIPSOID_ARC
) {
930 proto_tree_add_item(tree
, hf_gsm_a_geo_loc_inner_radius
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
932 /* Uncertainty radius */
933 proto_tree_add_item(tree
, hf_gsm_a_geo_loc_uncertainty_radius
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
936 proto_tree_add_item(tree
, hf_gsm_a_geo_loc_offset_angle
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
939 proto_tree_add_item(tree
, hf_gsm_a_geo_loc_included_angle
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
942 proto_tree_add_item(tree
, hf_gsm_a_geo_loc_confidence
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
946 case POLYGON
: /* Polygon */
947 /* Number of points */
948 proto_tree_add_item(tree
, hf_gsm_a_geo_loc_no_of_points
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
950 no_of_points
= tvb_get_guint8(tvb
,offset
)&0x0f;
951 while ( no_of_points
> 0) {
965 * Ch. 8 Description of Velocity
967 /* 8.6 Coding of Velocity Type */
968 static const value_string gsm_a_velocity_type_vals
[] = {
969 { 0, "Horizontal Velocity"},
970 { 1, "Horizontal with Vertical Velocity"},
971 { 2, "Horizontal Velocity with Uncertainty"},
972 { 3, "Horizontal with Vertical Velocity and Uncertainty"},
973 { 4, "reserved for future use"},
974 { 5, "reserved for future use"},
975 { 6, "reserved for future use"},
976 { 7, "reserved for future use"},
977 { 8, "reserved for future use"},
978 { 9, "reserved for future use"},
979 { 10, "reserved for future use"},
980 { 11, "reserved for future use"},
981 { 12, "reserved for future use"},
982 { 13, "reserved for future use"},
983 { 14, "reserved for future use"},
984 { 15, "reserved for future use"},
988 static const true_false_string gsm_a_dir_of_ver_speed_vals
= {
994 dissect_description_of_velocity(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo _U_
, guint32 offset
, guint len _U_
, gchar
*add_string _U_
, int string_len _U_
)
996 proto_item
*velocity_item
;
998 guint8 velocity_type
, uncertainty_speed
= 0;
1000 curr_offset
= offset
;
1002 /* Bit 8 - 5 Velocity Type */
1003 velocity_type
= tvb_get_guint8(tvb
,curr_offset
);
1004 proto_tree_add_item(tree
, hf_gsm_a_velocity_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1007 switch (velocity_type
) {
1009 /* 8.12 Coding of Horizontal Velocity */
1011 proto_tree_add_bits_item(tree
, hf_gsm_a_spare_bits
, tvb
, (curr_offset
<<3)+4, 3, ENC_BIG_ENDIAN
);
1012 /* Bearing is encoded in increments of 1 degree measured clockwise from North using a 9 bit binary coded number N. */
1013 proto_tree_add_bits_item(tree
, hf_gsm_a_bearing
, tvb
, (curr_offset
<<3)+7, 9, ENC_BIG_ENDIAN
);
1015 /* Horizontal speed is encoded in increments of 1 kilometre per hour using a 16 bit binary coded number N. */
1016 velocity_item
= proto_tree_add_item(tree
, hf_gsm_a_horizontal_speed
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1017 proto_item_append_text(velocity_item
, " km/h");
1021 /* 8.13 Coding of Horizontal with Vertical Velocity */
1023 proto_tree_add_bits_item(tree
, hf_gsm_a_spare_bits
, tvb
, (curr_offset
<<3)+4, 2, ENC_BIG_ENDIAN
);
1024 /* D: Direction of Vertical Speed */
1025 proto_tree_add_item(tree
, hf_gsm_a_d
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1026 /* Bearing is encoded in increments of 1 degree measured clockwise from North using a 9 bit binary coded number N. */
1027 proto_tree_add_bits_item(tree
, hf_gsm_a_bearing
, tvb
, (curr_offset
<<3)+7, 9, ENC_BIG_ENDIAN
);
1029 /* Horizontal speed is encoded in increments of 1 kilometre per hour using a 16 bit binary coded number N. */
1030 velocity_item
= proto_tree_add_item(tree
, hf_gsm_a_horizontal_speed
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1031 proto_item_append_text(velocity_item
, " km/h");
1033 /* Vertical Speed Octet 5
1034 * Vertical speed is encoded in increments of 1 kilometre per hour using 8 bits giving a number N between 0 and 28-1.
1036 velocity_item
= proto_tree_add_item(tree
, hf_gsm_a_vertical_speed
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1037 proto_item_append_text(velocity_item
, " km/h");
1041 /* 8.14 Coding of Horizontal Velocity with Uncertainty */
1043 proto_tree_add_bits_item(tree
, hf_gsm_a_spare_bits
, tvb
, (curr_offset
<<3)+4, 3, ENC_BIG_ENDIAN
);
1044 /* Bearing is encoded in increments of 1 degree measured clockwise from North using a 9 bit binary coded number N. */
1045 proto_tree_add_bits_item(tree
, hf_gsm_a_bearing
, tvb
, (curr_offset
<<3)+7, 9, ENC_BIG_ENDIAN
);
1047 /* Horizontal speed is encoded in increments of 1 kilometre per hour using a 16 bit binary coded number N. */
1048 velocity_item
= proto_tree_add_item(tree
, hf_gsm_a_horizontal_speed
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1049 proto_item_append_text(velocity_item
, " km/h");
1051 /* Uncertainty Speed Octet 5
1052 * Uncertainty speed is encoded in increments of 1 kilometre per hour using an 8 bit binary coded number N. The value of
1053 * N gives the uncertainty speed except for N=255 which indicates that the uncertainty is not specified.
1055 uncertainty_speed
= tvb_get_guint8(tvb
,curr_offset
);
1056 velocity_item
= proto_tree_add_item(tree
, hf_gsm_a_uncertainty_speed
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1057 if (uncertainty_speed
== 255) {
1058 proto_item_append_text(velocity_item
, " not specified");
1060 proto_item_append_text(velocity_item
, " km/h");
1065 /* 8.15 Coding of Horizontal with Vertical Velocity and Uncertainty */
1067 proto_tree_add_bits_item(tree
, hf_gsm_a_spare_bits
, tvb
, (curr_offset
<<3)+4, 2, ENC_BIG_ENDIAN
);
1068 /* D: Direction of Vertical Speed */
1069 proto_tree_add_item(tree
, hf_gsm_a_d
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1070 /* Bearing is encoded in increments of 1 degree measured clockwise from North using a 9 bit binary coded number N. */
1071 proto_tree_add_bits_item(tree
, hf_gsm_a_bearing
, tvb
, (curr_offset
<<3)+7, 9, ENC_BIG_ENDIAN
);
1073 /* Horizontal speed is encoded in increments of 1 kilometre per hour using a 16 bit binary coded number N. */
1074 velocity_item
= proto_tree_add_item(tree
, hf_gsm_a_horizontal_speed
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1075 proto_item_append_text(velocity_item
, " km/h");
1077 /* Vertical Speed Octet 5
1078 * Vertical speed is encoded in increments of 1 kilometre per hour using 8 bits giving a number N between 0 and 28-1.
1080 velocity_item
= proto_tree_add_item(tree
, hf_gsm_a_vertical_speed
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1081 proto_item_append_text(velocity_item
, " km/h");
1084 /* Horizontal Uncertainty Speed Octet 6 */
1085 uncertainty_speed
= tvb_get_guint8(tvb
,curr_offset
);
1086 velocity_item
= proto_tree_add_item(tree
, hf_gsm_a_h_uncertainty_speed
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1087 if (uncertainty_speed
== 255) {
1088 proto_item_append_text(velocity_item
, " not specified");
1090 proto_item_append_text(velocity_item
, " km/h");
1094 /* Vertical Uncertainty Speed Octet 7 */
1095 uncertainty_speed
= tvb_get_guint8(tvb
,curr_offset
);
1096 velocity_item
= proto_tree_add_item(tree
, hf_gsm_a_v_uncertainty_speed
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1097 if (uncertainty_speed
== 255) {
1098 proto_item_append_text(velocity_item
, " not specified");
1100 proto_item_append_text(velocity_item
, " km/h");
1109 return(curr_offset
-offset
);
1112 const char* get_gsm_a_msg_string(int pdu_type
, int idx
)
1114 const char *msg_string
= NULL
;
1117 case GSM_A_PDU_TYPE_BSSMAP
:
1118 msg_string
= val_to_str_ext(idx
, &gsm_bssmap_elem_strings_ext
, "GSM_A_PDU_TYPE_BSSMAP (%u)");
1120 case GSM_A_PDU_TYPE_DTAP
:
1121 msg_string
= val_to_str_ext(idx
, &gsm_dtap_elem_strings_ext
, "GSM_A_PDU_TYPE_DTAP (%u)");
1123 case GSM_A_PDU_TYPE_RP
:
1124 msg_string
= val_to_str_ext(idx
, &gsm_rp_elem_strings_ext
, "GSM_A_PDU_TYPE_RP (%u)");
1126 case GSM_A_PDU_TYPE_RR
:
1127 msg_string
= val_to_str_ext(idx
, &gsm_rr_elem_strings_ext
, "GSM_A_PDU_TYPE_RR (%u)");
1129 case GSM_A_PDU_TYPE_COMMON
:
1130 msg_string
= val_to_str_ext(idx
, &gsm_common_elem_strings_ext
, "GSM_A_PDU_TYPE_COMMON (%u)");
1132 case GSM_A_PDU_TYPE_GM
:
1133 msg_string
= val_to_str_ext(idx
, &gsm_gm_elem_strings_ext
, "GSM_A_PDU_TYPE_GM (%u)");
1135 case GSM_A_PDU_TYPE_BSSLAP
:
1136 msg_string
= val_to_str_ext(idx
, &gsm_bsslap_elem_strings_ext
, "GSM_A_PDU_TYPE_BSSLAP (%u)");
1138 case GSM_PDU_TYPE_BSSMAP_LE
:
1139 msg_string
= val_to_str_ext(idx
, &gsm_bssmap_le_elem_strings_ext
, "GSM_PDU_TYPE_BSSMAP_LE (%u)");
1141 case NAS_PDU_TYPE_COMMON
:
1142 msg_string
= val_to_str_ext(idx
, &nas_eps_common_elem_strings_ext
, "NAS_PDU_TYPE_COMMON (%u)");
1144 case NAS_PDU_TYPE_EMM
:
1145 msg_string
= val_to_str_ext(idx
, &nas_emm_elem_strings_ext
, "NAS_PDU_TYPE_EMM (%u)");
1147 case NAS_PDU_TYPE_ESM
:
1148 msg_string
= val_to_str_ext(idx
, &nas_esm_elem_strings_ext
, "NAS_PDU_TYPE_ESM (%u)");
1150 case SGSAP_PDU_TYPE
:
1151 msg_string
= val_to_str_ext(idx
, &sgsap_elem_strings_ext
, "SGSAP_PDU_TYPE (%u)");
1153 case BSSGP_PDU_TYPE
:
1154 msg_string
= val_to_str_ext(idx
, &bssgp_elem_strings_ext
, "BSSGP_PDU_TYPE (%u)");
1156 case GMR1_IE_COMMON
:
1157 msg_string
= val_to_str_ext(idx
, &gmr1_ie_common_strings_ext
, "GMR1_IE_COMMON (%u)");
1160 msg_string
= val_to_str_ext(idx
, &gmr1_ie_rr_strings_ext
, "GMR1_IE_RR (%u)");
1163 DISSECTOR_ASSERT_NOT_REACHED();
1169 static int get_hf_elem_id(int pdu_type
)
1174 case GSM_A_PDU_TYPE_BSSMAP
:
1175 hf_elem_id
= hf_gsm_a_bssmap_elem_id
;
1177 case GSM_A_PDU_TYPE_DTAP
:
1178 hf_elem_id
= hf_gsm_a_dtap_elem_id
;
1180 case GSM_A_PDU_TYPE_RP
:
1181 hf_elem_id
= hf_gsm_a_rp_elem_id
;
1183 case GSM_A_PDU_TYPE_RR
:
1184 hf_elem_id
= hf_gsm_a_rr_elem_id
;
1186 case GSM_A_PDU_TYPE_COMMON
:
1187 hf_elem_id
= hf_gsm_a_common_elem_id
;
1189 case GSM_A_PDU_TYPE_GM
:
1190 hf_elem_id
= hf_gsm_a_gm_elem_id
;
1192 case GSM_A_PDU_TYPE_BSSLAP
:
1193 hf_elem_id
= hf_gsm_a_bsslap_elem_id
;
1195 case GSM_PDU_TYPE_BSSMAP_LE
:
1196 hf_elem_id
= hf_gsm_bssmap_le_elem_id
;
1198 case NAS_PDU_TYPE_COMMON
:
1199 hf_elem_id
= hf_nas_eps_common_elem_id
;
1201 case NAS_PDU_TYPE_EMM
:
1202 hf_elem_id
= hf_nas_eps_emm_elem_id
;
1204 case NAS_PDU_TYPE_ESM
:
1205 hf_elem_id
= hf_nas_eps_esm_elem_id
;
1207 case SGSAP_PDU_TYPE
:
1208 hf_elem_id
= hf_sgsap_elem_id
;
1210 case BSSGP_PDU_TYPE
:
1211 hf_elem_id
= hf_bssgp_elem_id
;
1213 case GMR1_IE_COMMON
:
1215 hf_elem_id
= hf_gmr1_elem_id
;
1218 DISSECTOR_ASSERT_NOT_REACHED();
1225 * Type Length Value (TLV) element dissector
1227 guint16
elem_tlv(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo
, guint8 iei
, gint pdu_type
, int idx
, guint32 offset
, guint len _U_
, const gchar
*name_add
)
1231 guint8 lengt_length
= 1;
1233 guint32 curr_offset
;
1234 proto_tree
*subtree
;
1236 value_string_ext elem_names_ext
;
1238 const gchar
*elem_name
;
1239 guint16 (**elem_funcs
)(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo
, guint32 offset
, guint len
, gchar
*add_string
, int string_len
);
1241 curr_offset
= offset
;
1244 SET_ELEM_VARS(pdu_type
, elem_names_ext
, elem_ett
, elem_funcs
);
1246 oct
= tvb_get_guint8(tvb
, curr_offset
);
1249 parm_len
= tvb_get_guint8(tvb
, curr_offset
+ 1);
1251 elem_name
= try_val_to_str_ext(idx
, &elem_names_ext
);
1254 proto_tree_add_text(tree
,
1255 tvb
, curr_offset
, parm_len
+ 1 + lengt_length
,
1256 "%s%s", elem_name
? elem_name
: "Unknown - aborting dissection",
1257 (name_add
== NULL
) || (name_add
[0] == '\0') ? "" : name_add
);
1259 /* idx is out of range */
1260 if (elem_name
== NULL
)
1263 subtree
= proto_item_add_subtree(item
, elem_ett
[idx
]);
1265 proto_tree_add_uint(subtree
,
1266 get_hf_elem_id(pdu_type
), tvb
,
1267 curr_offset
, 1, oct
);
1269 proto_tree_add_uint(subtree
, hf_gsm_a_length
, tvb
,
1270 curr_offset
+ 1, lengt_length
, parm_len
);
1274 if (elem_funcs
[idx
] == NULL
)
1276 proto_tree_add_text(subtree
,
1277 tvb
, curr_offset
+ 1 + lengt_length
, parm_len
,
1279 /* See ASSERT above */
1280 consumed
= (guint8
)parm_len
;
1284 gchar
*a_add_string
;
1286 a_add_string
= (gchar
*)wmem_alloc(wmem_packet_scope(), 1024);
1287 a_add_string
[0] = '\0';
1289 (*elem_funcs
[idx
])(tvb
, subtree
, pinfo
, curr_offset
+ 2,
1290 parm_len
, a_add_string
, 1024);
1292 if (a_add_string
[0] != '\0')
1294 proto_item_append_text(item
, "%s", a_add_string
);
1299 consumed
+= 1 + lengt_length
;
1306 * Type Extendable Length Value (TELV) element dissector
1307 * This is a version where the length field can be one or two octets depending
1308 * if the extension bit is set or not (TS 48.016 p 10.1.2).
1310 * octet 2 0/1 ext length
1313 guint16
elem_telv(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo
, guint8 iei
, gint pdu_type
, int idx
, guint32 offset
, guint len _U_
, const gchar
*name_add
)
1317 guint8 lengt_length
= 1;
1319 guint32 curr_offset
;
1320 proto_tree
*subtree
;
1322 value_string_ext elem_names_ext
;
1324 const gchar
*elem_name
;
1325 guint16 (**elem_funcs
)(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo
, guint32 offset
, guint len
, gchar
*add_string
, int string_len
);
1327 curr_offset
= offset
;
1330 SET_ELEM_VARS(pdu_type
, elem_names_ext
, elem_ett
, elem_funcs
);
1332 oct
= tvb_get_guint8(tvb
, curr_offset
);
1335 parm_len
= tvb_get_guint8(tvb
, curr_offset
+ 1);
1336 if ((parm_len
&0x80) == 0) {
1337 /* length in 2 octets */
1338 parm_len
= tvb_get_ntohs(tvb
, curr_offset
+ 1);
1341 parm_len
= parm_len
& 0x7f;
1344 elem_name
= try_val_to_str_ext(idx
, &elem_names_ext
);
1347 proto_tree_add_text(tree
,
1348 tvb
, curr_offset
, parm_len
+ 1 + lengt_length
,
1349 "%s%s", elem_name
? elem_name
: "Unknown - aborting dissection",
1350 (name_add
== NULL
) || (name_add
[0] == '\0') ? "" : name_add
);
1352 /* idx is out of range */
1353 if (elem_name
== NULL
)
1356 subtree
= proto_item_add_subtree(item
, elem_ett
[idx
]);
1358 proto_tree_add_uint(subtree
,
1359 get_hf_elem_id(pdu_type
), tvb
,
1360 curr_offset
, 1, oct
);
1362 proto_tree_add_item(subtree
, hf_gsm_a_l_ext
, tvb
, curr_offset
+1, 1, ENC_BIG_ENDIAN
);
1364 proto_tree_add_uint(subtree
, hf_gsm_a_length
, tvb
,
1365 curr_offset
+ 1, lengt_length
, parm_len
);
1369 if (elem_funcs
[idx
] == NULL
)
1371 proto_tree_add_text(subtree
,
1372 tvb
, curr_offset
+ 1 + lengt_length
, parm_len
,
1374 /* See ASSERT above */
1375 consumed
= parm_len
;
1379 gchar
*a_add_string
;
1381 a_add_string
= (gchar
*)wmem_alloc(wmem_packet_scope(), 1024);
1382 a_add_string
[0] = '\0';
1384 (*elem_funcs
[idx
])(tvb
, subtree
, pinfo
, curr_offset
+ 1 + lengt_length
,
1385 parm_len
, a_add_string
, 1024);
1387 if (a_add_string
[0] != '\0')
1389 proto_item_append_text(item
, "%s", a_add_string
);
1394 consumed
+= 1 + lengt_length
;
1401 * Type Length Value Extended(TLV-E) element dissector
1403 * information elements of format LV-E or TLV-E with value part consisting of zero,
1404 * one or more octets and a maximum of 65535 octets (type 6). This category is used in EPS only.
1406 guint16
elem_tlv_e(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo
, guint8 iei
, gint pdu_type
, int idx
, guint32 offset
, guint len _U_
, const gchar
*name_add
)
1411 guint32 curr_offset
;
1412 proto_tree
*subtree
;
1414 value_string_ext elem_names_ext
;
1416 const gchar
*elem_name
;
1417 guint16 (**elem_funcs
)(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo
, guint32 offset
, guint len
, gchar
*add_string
, int string_len
);
1419 curr_offset
= offset
;
1422 SET_ELEM_VARS(pdu_type
, elem_names_ext
, elem_ett
, elem_funcs
);
1424 oct
= tvb_get_guint8(tvb
, curr_offset
);
1427 parm_len
= tvb_get_ntohs(tvb
, curr_offset
+ 1);
1429 elem_name
= try_val_to_str_ext(idx
, &elem_names_ext
);
1431 item
= proto_tree_add_text(tree
, tvb
, curr_offset
, parm_len
+ 1 + 2,
1432 "%s%s", elem_name
? elem_name
: "Unknown - aborting dissection",
1433 (name_add
== NULL
) || (name_add
[0] == '\0') ? "" : name_add
);
1435 /* idx is out of range */
1436 if (elem_name
== NULL
)
1439 subtree
= proto_item_add_subtree(item
, elem_ett
[idx
]);
1441 proto_tree_add_uint(subtree
,
1442 get_hf_elem_id(pdu_type
), tvb
,
1443 curr_offset
, 1, oct
);
1445 proto_tree_add_uint(subtree
, hf_gsm_a_length
, tvb
,
1446 curr_offset
+ 1, 2, parm_len
);
1450 if (elem_funcs
[idx
] == NULL
)
1452 proto_tree_add_text(subtree
,
1453 tvb
, curr_offset
+ 1 + 2, parm_len
,
1455 /* See ASSERT above */
1456 consumed
= parm_len
;
1460 gchar
*a_add_string
;
1462 a_add_string
= (gchar
*)wmem_alloc(wmem_packet_scope(), 1024);
1463 a_add_string
[0] = '\0';
1465 (*elem_funcs
[idx
])(tvb
, subtree
, pinfo
, curr_offset
+ 1 + 2,
1466 parm_len
, a_add_string
, 1024);
1468 if (a_add_string
[0] != '\0')
1470 proto_item_append_text(item
, "%s", a_add_string
);
1482 * Type Value (TV) element dissector
1484 * Length cannot be used in these functions, big problem if a element dissector
1485 * is not defined for these.
1487 guint16
elem_tv(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo
, guint8 iei
, gint pdu_type
, int idx
, guint32 offset
, const gchar
*name_add
)
1491 guint32 curr_offset
;
1492 proto_tree
*subtree
;
1494 value_string_ext elem_names_ext
;
1496 const gchar
*elem_name
;
1497 guint16 (**elem_funcs
)(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo
, guint32 offset
, guint len
, gchar
*add_string
, int string_len
);
1499 curr_offset
= offset
;
1502 SET_ELEM_VARS(pdu_type
, elem_names_ext
, elem_ett
, elem_funcs
);
1504 oct
= tvb_get_guint8(tvb
, curr_offset
);
1508 elem_name
= try_val_to_str_ext(idx
, &elem_names_ext
);
1511 proto_tree_add_text(tree
, tvb
, curr_offset
, -1,
1512 "%s%s", elem_name
? elem_name
: "Unknown - aborting dissection",
1513 (name_add
== NULL
) || (name_add
[0] == '\0') ? "" : name_add
);
1515 /* idx is out of range */
1516 if (elem_name
== NULL
)
1519 subtree
= proto_item_add_subtree(item
, elem_ett
[idx
]);
1521 proto_tree_add_uint(subtree
,
1522 get_hf_elem_id(pdu_type
), tvb
,
1523 curr_offset
, 1, oct
);
1525 if (elem_funcs
[idx
] == NULL
)
1527 /* BAD THING, CANNOT DETERMINE LENGTH */
1529 proto_tree_add_text(subtree
,
1530 tvb
, curr_offset
+ 1, 1,
1531 "No element dissector, rest of dissection may be incorrect");
1537 gchar
*a_add_string
;
1539 a_add_string
= (gchar
*)wmem_alloc(wmem_packet_scope(), 1024);
1540 a_add_string
[0] = '\0';
1541 consumed
= (*elem_funcs
[idx
])(tvb
, subtree
, pinfo
, curr_offset
+ 1, -1, a_add_string
, 1024);
1543 if (a_add_string
[0] != '\0')
1545 proto_item_append_text(item
, "%s", a_add_string
);
1551 proto_item_set_len(item
, consumed
);
1558 * Type Value (TV) element dissector
1559 * Where top half nibble is IEI and bottom half nibble is value.
1561 * Length cannot be used in these functions, big problem if a element dissector
1562 * is not defined for these.
1564 guint16
elem_tv_short(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo
, guint8 iei
, gint pdu_type
, int idx
, guint32 offset
, const gchar
*name_add
)
1568 guint32 curr_offset
;
1569 proto_tree
*subtree
;
1571 value_string_ext elem_names_ext
;
1573 const gchar
*elem_name
;
1574 guint16 (**elem_funcs
)(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo
, guint32 offset
, guint len
, gchar
*add_string
, int string_len
);
1577 curr_offset
= offset
;
1580 SET_ELEM_VARS(pdu_type
, elem_names_ext
, elem_ett
, elem_funcs
);
1582 oct
= tvb_get_guint8(tvb
, curr_offset
);
1584 if ((oct
& 0xf0) == (iei
& 0xf0))
1586 elem_name
= try_val_to_str_ext(idx
, &elem_names_ext
);
1589 proto_tree_add_text(tree
,
1590 tvb
, curr_offset
, -1,
1591 "%s%s", elem_name
? elem_name
: "Unknown - aborting dissection",
1592 (name_add
== NULL
) || (name_add
[0] == '\0') ? "" : name_add
);
1594 /* idx is out of range */
1595 if (elem_name
== NULL
)
1598 subtree
= proto_item_add_subtree(item
, elem_ett
[idx
]);
1600 other_decode_bitfield_value(buf
, oct
, 0xf0, 8);
1601 proto_tree_add_text(subtree
,
1602 tvb
, curr_offset
, 1,
1603 "%s = Element ID: 0x%1x-",
1606 if (elem_funcs
[idx
] == NULL
)
1608 /* BAD THING, CANNOT DETERMINE LENGTH */
1610 proto_tree_add_text(subtree
,
1611 tvb
, curr_offset
, 1,
1612 "No element dissector, rest of dissection may be incorrect");
1618 gchar
*a_add_string
;
1620 a_add_string
= (gchar
*)wmem_alloc(wmem_packet_scope(), 1024);
1621 a_add_string
[0] = '\0';
1622 consumed
= (*elem_funcs
[idx
])(tvb
, subtree
, pinfo
, curr_offset
, RIGHT_NIBBLE
, a_add_string
, 1024);
1624 if (a_add_string
[0] != '\0')
1626 proto_item_append_text(item
, "%s", a_add_string
);
1630 proto_item_set_len(item
, consumed
);
1637 * Type (T) element dissector
1639 guint16
elem_t(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo _U_
, guint8 iei
, gint pdu_type
, int idx
, guint32 offset
, const gchar
*name_add
)
1642 guint32 curr_offset
;
1644 value_string_ext elem_names_ext
;
1646 guint16 (**elem_funcs
)(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo
, guint32 offset
, guint len
, gchar
*add_string
, int string_len
);
1648 curr_offset
= offset
;
1651 SET_ELEM_VARS(pdu_type
, elem_names_ext
, elem_ett
, elem_funcs
);
1656 oct
= tvb_get_guint8(tvb
, curr_offset
);
1660 proto_tree_add_uint_format(tree
,
1661 get_hf_elem_id(pdu_type
), tvb
,
1662 curr_offset
, 1, oct
,
1664 val_to_str_ext(idx
, &elem_names_ext
, "Unknown (%u)"),
1665 (name_add
== NULL
) || (name_add
[0] == '\0') ? "" : name_add
);
1674 * Length Value (LV) element dissector
1677 elem_lv(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo
, gint pdu_type
, int idx
, guint32 offset
, guint len _U_
, const gchar
*name_add
)
1681 guint32 curr_offset
;
1682 proto_tree
*subtree
;
1684 value_string_ext elem_names_ext
;
1686 const gchar
*elem_name
;
1687 guint16 (**elem_funcs
)(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo
, guint32 offset
, guint len
, gchar
*add_string
, int string_len
);
1689 curr_offset
= offset
;
1692 SET_ELEM_VARS(pdu_type
, elem_names_ext
, elem_ett
, elem_funcs
);
1694 parm_len
= tvb_get_guint8(tvb
, curr_offset
);
1696 elem_name
= try_val_to_str_ext(idx
, &elem_names_ext
);
1699 proto_tree_add_text(tree
,
1700 tvb
, curr_offset
, parm_len
+ 1,
1701 "%s%s", elem_name
? elem_name
: "Unknown - aborting dissection",
1702 (name_add
== NULL
) || (name_add
[0] == '\0') ? "" : name_add
);
1704 /* idx is out of range */
1705 if (elem_name
== NULL
)
1708 subtree
= proto_item_add_subtree(item
, elem_ett
[idx
]);
1710 proto_tree_add_uint(subtree
, hf_gsm_a_length
, tvb
,
1711 curr_offset
, 1, parm_len
);
1715 if (elem_funcs
[idx
] == NULL
)
1717 proto_tree_add_text(subtree
,
1718 tvb
, curr_offset
+ 1, parm_len
,
1721 consumed
= parm_len
;
1725 gchar
*a_add_string
;
1727 a_add_string
= (gchar
*)wmem_alloc(wmem_packet_scope(), 1024);
1728 a_add_string
[0] = '\0';
1730 (*elem_funcs
[idx
])(tvb
, subtree
, pinfo
, curr_offset
+ 1,
1731 parm_len
, a_add_string
, 1024);
1733 if (a_add_string
[0] != '\0')
1735 proto_item_append_text(item
, "%s", a_add_string
);
1740 return(consumed
+ 1);
1744 * Length Value Extended(LV-E) element dissector
1746 guint16
elem_lv_e(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo
, gint pdu_type
, int idx
, guint32 offset
, guint len _U_
, const gchar
*name_add
)
1750 guint32 curr_offset
;
1751 proto_tree
*subtree
;
1753 value_string_ext elem_names_ext
;
1755 const gchar
*elem_name
;
1756 guint16 (**elem_funcs
)(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo
, guint32 offset
, guint len
, gchar
*add_string
, int string_len
);
1758 curr_offset
= offset
;
1761 SET_ELEM_VARS(pdu_type
, elem_names_ext
, elem_ett
, elem_funcs
);
1763 parm_len
= tvb_get_ntohs(tvb
, curr_offset
);
1765 elem_name
= try_val_to_str_ext(idx
, &elem_names_ext
);
1767 item
= proto_tree_add_text(tree
, tvb
, curr_offset
, parm_len
+ 2,
1768 "%s%s", elem_name
? elem_name
: "Unknown - aborting dissection",
1769 (name_add
== NULL
) || (name_add
[0] == '\0') ? "" : name_add
);
1771 /* idx is out of range */
1772 if (elem_name
== NULL
)
1775 subtree
= proto_item_add_subtree(item
, elem_ett
[idx
]);
1777 proto_tree_add_uint(subtree
, hf_gsm_a_length
, tvb
,
1778 curr_offset
, 2, parm_len
);
1782 if (elem_funcs
[idx
] == NULL
)
1784 proto_tree_add_text(subtree
,
1785 tvb
, curr_offset
+ 2, parm_len
,
1788 consumed
= parm_len
;
1792 gchar
*a_add_string
;
1794 a_add_string
= (gchar
*)wmem_alloc(wmem_packet_scope(), 1024);
1795 a_add_string
[0] = '\0';
1797 (*elem_funcs
[idx
])(tvb
, subtree
, pinfo
, curr_offset
+ 2,
1798 parm_len
, a_add_string
, 1024);
1800 if (a_add_string
[0] != '\0')
1802 proto_item_append_text(item
, "%s", a_add_string
);
1807 return(consumed
+ 2);
1810 * Value (V) element dissector
1812 * Length cannot be used in these functions, big problem if a element dissector
1813 * is not defined for these.
1815 guint16
elem_v(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo
, gint pdu_type
, int idx
, guint32 offset
, const gchar
*name_add
)
1818 guint32 curr_offset
;
1819 proto_tree
*subtree
;
1821 value_string_ext elem_names_ext
;
1823 const gchar
*elem_name
;
1824 guint16 (**elem_funcs
)(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo
, guint32 offset
, guint len
, gchar
*add_string
, int string_len
);
1826 curr_offset
= offset
;
1829 SET_ELEM_VARS(pdu_type
, elem_names_ext
, elem_ett
, elem_funcs
);
1831 elem_name
= try_val_to_str_ext(idx
, &elem_names_ext
);
1833 if (elem_name
== NULL
|| elem_funcs
[idx
] == NULL
)
1835 /* BAD THING, CANNOT DETERMINE LENGTH */
1837 proto_tree_add_text(tree
,
1838 tvb
, curr_offset
, 1,
1839 "No element dissector, rest of dissection may be incorrect");
1845 gchar
*a_add_string
;
1848 proto_tree_add_text(tree
,
1849 tvb
, curr_offset
, 0,
1851 (name_add
== NULL
) || (name_add
[0] == '\0') ? "" : name_add
);
1853 subtree
= proto_item_add_subtree(item
, elem_ett
[idx
]);
1855 a_add_string
= (gchar
*)wmem_alloc(wmem_packet_scope(), 1024);
1856 a_add_string
[0] = '\0';
1857 consumed
= (*elem_funcs
[idx
])(tvb
, subtree
, pinfo
, curr_offset
, -1, a_add_string
, 1024);
1858 if (a_add_string
[0] != '\0')
1860 proto_item_append_text(item
, "%s", a_add_string
);
1862 proto_item_set_len(item
, consumed
);
1869 * Short Value (V_SHORT) element dissector
1871 * nibble is used in this function to indicate right or left nibble of the octet
1872 * This is expected to be used right nibble first, as the tables of 24.008.
1875 guint16
elem_v_short(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo
, gint pdu_type
, int idx
, guint32 offset
, guint32 nibble
)
1877 guint16 consumed
= 1;
1878 guint32 curr_offset
;
1879 proto_tree
*subtree
;
1881 value_string_ext elem_names_ext
;
1883 elem_fcn
*elem_funcs
;
1884 gchar
*a_add_string
;
1885 const gchar
*elem_name
;
1887 curr_offset
= offset
;
1889 SET_ELEM_VARS(pdu_type
, elem_names_ext
, elem_ett
, elem_funcs
);
1891 elem_name
= try_val_to_str_ext(idx
, &elem_names_ext
);
1893 item
= proto_tree_add_text(tree
,
1894 tvb
, curr_offset
, 0,
1895 "%s%s", elem_name
? elem_name
: "Unknown - aborting dissection",
1898 /* idx is out of range */
1899 if (elem_name
== NULL
)
1902 subtree
= proto_item_add_subtree(item
, elem_ett
[idx
]);
1904 a_add_string
= (gchar
*)wmem_alloc(wmem_packet_scope(), 1024);
1905 a_add_string
[0] = '\0';
1907 if (elem_funcs
[idx
] == NULL
)
1909 /* NOT NECESSARILY A BAD THING - LENGTH IS HALF OCTET */
1910 (void)de_spare_nibble(tvb
, subtree
, pinfo
, curr_offset
, nibble
, a_add_string
, 1024);
1914 (void)(*elem_funcs
[idx
])(tvb
, subtree
, pinfo
, curr_offset
, nibble
, a_add_string
, 1024);
1917 if (a_add_string
[0] != '\0')
1919 proto_item_append_text(item
, "%s", a_add_string
);
1921 proto_item_set_len(item
, consumed
);
1927 static dgt_set_t Dgt_tbcd
= {
1929 /* 0 1 2 3 4 5 6 7 8 9 a b c d e */
1930 '0','1','2','3','4','5','6','7','8','9','?','B','C','*','#'
1934 static dgt_set_t Dgt1_9_bcd
= {
1936 /* 0 1 2 3 4 5 6 7 8 9 a b c d e */
1937 '0','1','2','3','4','5','6','7','8','9','?','?','?','?','?'
1944 * Unpack BCD input pattern into output ASCII pattern
1946 * Input Pattern is supplied using the same format as the digits
1948 * Returns: length of unpacked pattern
1952 char *out
, /* ASCII pattern out */
1953 guchar
*in
, /* packed pattern in */
1954 int num_octs
, /* Number of octets to unpack */
1955 dgt_set_t
*dgt
/* Digit definitions */
1964 * unpack first value in byte
1967 *out
++ = dgt
->out
[i
& 0x0f];
1971 * unpack second value in byte
1975 if (i
== 0x0f) /* odd number bytes - hit filler */
1978 *out
++ = dgt
->out
[i
];
1989 * Decode the MCC/MNC from 3 octets in 'octs'
1992 mcc_mnc_aux(guint8
*octs
, gchar
*mcc
, gchar
*mnc
)
1994 if ((octs
[0] & 0x0f) <= 9)
1996 mcc
[0] = Dgt_tbcd
.out
[octs
[0] & 0x0f];
2000 mcc
[0] = (octs
[0] & 0x0f) + 55;
2003 if (((octs
[0] & 0xf0) >> 4) <= 9)
2005 mcc
[1] = Dgt_tbcd
.out
[(octs
[0] & 0xf0) >> 4];
2009 mcc
[1] = ((octs
[0] & 0xf0) >> 4) + 55;
2012 if ((octs
[1] & 0x0f) <= 9)
2014 mcc
[2] = Dgt_tbcd
.out
[octs
[1] & 0x0f];
2018 mcc
[2] = (octs
[1] & 0x0f) + 55;
2023 if (((octs
[1] & 0xf0) >> 4) <= 9)
2025 mnc
[2] = Dgt_tbcd
.out
[(octs
[1] & 0xf0) >> 4];
2029 mnc
[2] = ((octs
[1] & 0xf0) >> 4) + 55;
2032 if ((octs
[2] & 0x0f) <= 9)
2034 mnc
[0] = Dgt_tbcd
.out
[octs
[2] & 0x0f];
2038 mnc
[0] = (octs
[2] & 0x0f) + 55;
2041 if (((octs
[2] & 0xf0) >> 4) <= 9)
2043 mnc
[1] = Dgt_tbcd
.out
[(octs
[2] & 0xf0) >> 4];
2047 mnc
[1] = ((octs
[2] & 0xf0) >> 4) + 55;
2053 * only a 1 digit MNC (very old)
2057 else if (mnc
[2] == 'F')
2060 * only a 2 digit MNC
2071 * [3] 10.5.1.1 Cell Identity
2074 de_cell_id(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo _U_
, guint32 offset
, guint len
, gchar
*add_string
, int string_len
)
2076 guint32 curr_offset
;
2078 curr_offset
= offset
;
2082 be_cell_id_aux(tvb
, tree
, pinfo
, offset
, len
, add_string
, string_len
, 0x02);
2084 /* no length check possible */
2086 return(curr_offset
- offset
);
2089 * 10.5.1.2 Ciphering Key Sequence Number
2094 * Key sequence (octet 1)
2100 * Possible values for the ciphering key sequence number
2101 * 1 1 1 No key is available (MS to network);Reserved (network to MS)
2104 static const value_string gsm_a_key_seq_vals
[] = {
2105 { 0, "Ciphering key sequence number"},
2106 { 1, "Ciphering key sequence number"},
2107 { 2, "Ciphering key sequence number"},
2108 { 3, "Ciphering key sequence number"},
2109 { 4, "Ciphering key sequence number"},
2110 { 5, "Ciphering key sequence number"},
2111 { 6, "Ciphering key sequence number"},
2112 { 7, "No key is available (MS to network)"},
2117 de_ciph_key_seq_num( tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo _U_
, guint32 offset
, guint len _U_
, gchar
*add_string _U_
, int string_len _U_
)
2119 guint32 curr_offset
, bit_offset
;
2121 curr_offset
= offset
;
2123 if (RIGHT_NIBBLE
== len
)
2128 proto_tree_add_bits_item(tree
, hf_gsm_a_spare_bits
, tvb
, (curr_offset
<<3)+bit_offset
, 1, ENC_BIG_ENDIAN
);
2129 proto_tree_add_bits_item(tree
, hf_gsm_a_key_seq
, tvb
, (curr_offset
<<3)+bit_offset
+1, 3, ENC_BIG_ENDIAN
);
2132 return(curr_offset
- offset
);
2141 de_lai(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo
, guint32 offset
, guint len _U_
, gchar
*add_string _U_
, int string_len _U_
)
2145 guint32 curr_offset
;
2146 proto_tree
*subtree
;
2151 curr_offset
= offset
;
2153 item
= proto_tree_add_text(tree
,
2154 tvb
, curr_offset
, 5, "%s",
2155 val_to_str_ext_const(DE_LAI
, &gsm_common_elem_strings_ext
, ""));
2157 subtree
= proto_item_add_subtree(item
, ett_gsm_common_elem
[DE_LAI
]);
2159 octs
[0] = tvb_get_guint8(tvb
, curr_offset
);
2160 octs
[1] = tvb_get_guint8(tvb
, curr_offset
+ 1);
2161 octs
[2] = tvb_get_guint8(tvb
, curr_offset
+ 2);
2163 mcc_mnc_aux(octs
, mcc
, mnc
);
2165 curr_offset
= dissect_e212_mcc_mnc(tvb
, pinfo
, subtree
, curr_offset
, TRUE
);
2167 value
= tvb_get_ntohs(tvb
, curr_offset
);
2169 proto_tree_add_item(subtree
, hf_gsm_a_lac
, tvb
, curr_offset
, 2, ENC_BIG_ENDIAN
);
2171 proto_item_append_text(item
, " - %s/%s/%u", mcc
,mnc
,value
);
2175 /* no length check possible */
2177 return(curr_offset
- offset
);
2181 * [3] 10.5.1.4 Mobile Identity
2182 * 3GPP TS 24.008 version 7.8.0 Release 7
2184 static const true_false_string gsm_a_present_vals
= {
2190 de_mid(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo
, guint32 offset
, guint len
, gchar
*add_string
, int string_len
)
2193 guint32 curr_offset
;
2197 const gchar
*digit_str
;
2199 curr_offset
= offset
;
2201 oct
= tvb_get_guint8(tvb
, curr_offset
);
2205 case 0: /* No Identity */
2206 proto_tree_add_item(tree
, hf_gsm_a_unused
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2207 proto_tree_add_item(tree
, hf_gsm_a_odd_even_ind
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2208 proto_tree_add_item(tree
, hf_gsm_a_mobile_identity_type
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2211 g_snprintf(add_string
, string_len
, " - No Identity Code");
2217 proto_tree_add_text(tree
, tvb
, curr_offset
, len
- 1,
2218 "Format not supported");
2221 curr_offset
+= len
- 1;
2224 case 3: /* IMEISV */
2228 other_decode_bitfield_value(a_bigbuf
, oct
, 0xf0, 8);
2229 proto_tree_add_text(tree
,
2230 tvb
, curr_offset
, 1,
2231 "%s = Identity Digit 1: %c",
2233 Dgt1_9_bcd
.out
[(oct
& 0xf0) >> 4]);
2237 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
);
2241 digit_str
= tvb_bcd_dig_to_wmem_packet_str(tvb
,curr_offset
, len
- (curr_offset
- offset
), NULL
, TRUE
);
2243 proto_tree_add_string_format(tree
,
2244 ((oct
& 0x07) == 3) ? hf_gsm_a_imeisv
: hf_gsm_a_imsi
,
2245 tvb
, curr_offset
, len
- (curr_offset
- offset
),
2250 if (sccp_assoc
&& ! sccp_assoc
->calling_party
) {
2251 sccp_assoc
->calling_party
= wmem_strdup_printf(wmem_file_scope(),
2252 ((oct
& 0x07) == 3) ? "IMEISV: %s" : "IMSI: %s",
2257 g_snprintf(add_string
, string_len
, " - %s (%s)",
2258 ((oct
& 0x07) == 3) ? "IMEISV" : "IMSI",
2261 curr_offset
+= len
- (curr_offset
- offset
);
2265 oct
= tvb_get_guint8(tvb
, curr_offset
- 1);
2267 other_decode_bitfield_value(a_bigbuf
, oct
, 0xf0, 8);
2268 proto_tree_add_text(tree
,
2269 tvb
, curr_offset
- 1, 1,
2276 other_decode_bitfield_value(a_bigbuf
, oct
, 0xf0, 8);
2277 proto_tree_add_text(tree
,
2278 tvb
, curr_offset
, 1,
2279 "%s = Identity Digit 1: %c",
2281 Dgt1_9_bcd
.out
[(oct
& 0xf0) >> 4]);
2283 proto_tree_add_item(tree
, hf_gsm_a_odd_even_ind
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2285 proto_tree_add_item(tree
, hf_gsm_a_mobile_identity_type
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2287 a_bigbuf
[0] = Dgt1_9_bcd
.out
[(oct
& 0xf0) >> 4];
2290 poctets
= tvb_get_string(wmem_packet_scope(), tvb
, curr_offset
, len
- (curr_offset
- offset
));
2292 my_dgt_tbcd_unpack(&a_bigbuf
[1], poctets
, len
- (curr_offset
- offset
),
2295 proto_tree_add_string_format(tree
,
2297 tvb
, curr_offset
, len
- (curr_offset
- offset
),
2303 g_snprintf(add_string
, string_len
, " - IMEI (%s)", a_bigbuf
);
2305 curr_offset
+= len
- (curr_offset
- offset
);
2308 case 4: /* TMSI/P-TMSI/M-TMSI */
2309 proto_tree_add_item(tree
, hf_gsm_a_unused
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2310 proto_tree_add_item(tree
, hf_gsm_a_odd_even_ind
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2311 proto_tree_add_item(tree
, hf_gsm_a_mobile_identity_type
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2314 value
= tvb_get_ntohl(tvb
, curr_offset
);
2316 proto_tree_add_uint(tree
, hf_gsm_a_tmsi
,
2317 tvb
, curr_offset
, 4,
2321 g_snprintf(add_string
, string_len
, " - TMSI/P-TMSI (0x%04x)", value
);
2326 case 5: /* TMGI and optional MBMS Session Identity */
2327 /* Spare bits (octet 3) Bits 8-7 */
2328 proto_tree_add_bits_item(tree
, hf_gsm_a_spare_bits
, tvb
, curr_offset
<<3, 2, ENC_BIG_ENDIAN
);
2329 /* MBMS Session Identity indication (octet 3) Bit 6 */
2330 proto_tree_add_item(tree
, hf_gsm_a_mbs_ses_id_ind
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2331 /* MCC/MNC indication (octet 3) Bit 5 */
2332 proto_tree_add_item(tree
, hf_gsm_a_tmgi_mcc_mnc_ind
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2333 /* Odd/even indication (octet 3) Bit 4 */
2334 proto_tree_add_item(tree
, hf_gsm_a_odd_even_ind
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2335 /* Type of identity (octet 3) Bits 3-1 */
2336 proto_tree_add_item(tree
, hf_gsm_a_mobile_identity_type
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2338 /* MBMS Service ID (octet 4, 5 and 6) */
2339 proto_tree_add_item(tree
, hf_gsm_a_mbs_service_id
, tvb
, curr_offset
, 3, ENC_BIG_ENDIAN
);
2341 if ((oct
&0x10) == 0x10) {
2343 /* MCC, Mobile country code (octet 6a, octet 6b bits 1 to 4)*/
2344 /* MNC, Mobile network code (octet 6b bits 5 to 8, octet 6c) */
2345 curr_offset
= dissect_e212_mcc_mnc(tvb
, pinfo
, tree
, curr_offset
, TRUE
);
2347 if ((oct
&0x20) == 0x20) {
2348 /* MBMS Session Identity (octet 7)
2349 * The MBMS Session Identity field is encoded as the value part
2350 * of the MBMS Session Identity IE as specified in 3GPP TS 48.018 [86].
2352 proto_tree_add_item(tree
, hf_gsm_a_mbs_session_id
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2357 default: /* Reserved */
2358 proto_tree_add_item(tree
, hf_gsm_a_odd_even_ind
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2359 proto_tree_add_item(tree
, hf_gsm_a_mobile_identity_type
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2360 proto_tree_add_text(tree
, tvb
, curr_offset
, len
,
2361 "Mobile station identity Format %u, Format Unknown", (oct
& 0x07));
2364 g_snprintf(add_string
, string_len
, " - Format Unknown");
2370 EXTRANEOUS_DATA_CHECK_EXPERT(len
, curr_offset
- offset
, pinfo
, &ei_gsm_a_extraneous_data
);
2372 return(curr_offset
- offset
);
2379 de_ms_cm_1(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo _U_
, guint32 offset
, guint len _U_
, gchar
*add_string _U_
, int string_len _U_
)
2381 guint32 curr_offset
;
2382 proto_tree
*subtree
;
2385 curr_offset
= offset
;
2388 proto_tree_add_text(tree
,
2389 tvb
, curr_offset
, 1, "%s",
2390 val_to_str_ext_const(DE_MS_CM_1
, &gsm_common_elem_strings_ext
, ""));
2392 subtree
= proto_item_add_subtree(item
, ett_gsm_common_elem
[DE_MS_CM_1
]);
2394 proto_tree_add_item(subtree
, hf_gsm_a_b8spare
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2396 proto_tree_add_item(subtree
, hf_gsm_a_MSC_rev
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2398 proto_tree_add_item(subtree
, hf_gsm_a_ES_IND
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2400 proto_tree_add_item(subtree
, hf_gsm_a_A5_1_algorithm_sup
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2402 proto_tree_add_item(subtree
, hf_gsm_a_RF_power_capability
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2406 /* no length check possible */
2408 return(curr_offset
- offset
);
2412 * [3] 10.5.1.6 Mobile Station Classmark 2
2413 * 3GPP TS 24.008 version 7.8.0 Release 7
2416 de_ms_cm_2(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo
, guint32 offset
, guint len
, gchar
*add_string _U_
, int string_len _U_
)
2418 guint32 curr_offset
;
2419 curr_offset
= offset
;
2421 proto_tree_add_item(tree
, hf_gsm_a_b8spare
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2423 proto_tree_add_item(tree
, hf_gsm_a_MSC_rev
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2425 proto_tree_add_item(tree
, hf_gsm_a_ES_IND
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2427 proto_tree_add_item(tree
, hf_gsm_a_A5_1_algorithm_sup
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2429 proto_tree_add_item(tree
, hf_gsm_a_RF_power_capability
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2433 NO_MORE_DATA_CHECK(len
);
2435 proto_tree_add_item(tree
, hf_gsm_a_b8spare
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2437 proto_tree_add_item(tree
, hf_gsm_a_ps_sup_cap
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2439 proto_tree_add_item(tree
, hf_gsm_a_SS_screening_indicator
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2441 /* SM capability (MT SMS pt to pt capability) (octet 4)*/
2442 proto_tree_add_item(tree
, hf_gsm_a_SM_capability
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2443 /* VBS notification reception (octet 4) */
2444 proto_tree_add_item(tree
, hf_gsm_a_VBS_notification_rec
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2445 /*VGCS notification reception (octet 4)*/
2446 proto_tree_add_item(tree
, hf_gsm_a_VGCS_notification_rec
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2447 /* FC Frequency Capability (octet 4 ) */
2448 proto_tree_add_item(tree
, hf_gsm_a_FC_frequency_cap
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2452 NO_MORE_DATA_CHECK(len
);
2454 /* CM3 (octet 5, bit 8) */
2455 proto_tree_add_item(tree
, hf_gsm_a_CM3
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2457 proto_tree_add_item(tree
, hf_gsm_a_b7spare
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2458 /* LCS VA capability (LCS value added location request notification capability) (octet 5,bit 6) */
2459 proto_tree_add_item(tree
, hf_gsm_a_LCS_VA_cap
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2460 /* UCS2 treatment (octet 5, bit 5) */
2461 proto_tree_add_item(tree
, hf_gsm_a_UCS2_treatment
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2462 /* SoLSA (octet 5, bit 4) */
2463 proto_tree_add_item(tree
, hf_gsm_a_SoLSA
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2464 /* CMSP: CM Service Prompt (octet 5, bit 3) */
2465 proto_tree_add_item(tree
, hf_gsm_a_CMSP
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2466 /* A5/3 algorithm supported (octet 5, bit 2) */
2467 proto_tree_add_item(tree
, hf_gsm_a_A5_3_algorithm_sup
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2468 /* A5/2 algorithm supported (octet 5, bit 1) */
2469 proto_tree_add_item(tree
, hf_gsm_a_A5_2_algorithm_sup
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
2473 EXTRANEOUS_DATA_CHECK_EXPERT(len
, curr_offset
- offset
, pinfo
, &ei_gsm_a_extraneous_data
);
2475 return(curr_offset
- offset
);
2479 * [3] 10.5.1.7 Mobile Station Classmark 3
2480 * 3GPP TS 24.008 version 11.7.0 Release 11
2482 #define AVAILABLE_BITS_CHECK(n) \
2483 bits_left = ((len + offset) << 3) - bit_offset; \
2484 if (bits_left < (n)) { \
2486 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, bits_left, ENC_BIG_ENDIAN); \
2491 de_ms_cm_3(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo
, guint32 offset
, guint len
, gchar
*add_string _U_
, int string_len _U_
)
2493 guint32 curr_offset
;
2494 guint32 bit_offset
; /* Offset in bits */
2496 proto_tree
*subtree
;
2498 guint32 bits_left
, target_bit_offset
, old_bit_offset
;
2499 guint64 multi_bnd_sup_fields
, rsupport
, multislotCapability
;
2500 guint64 msMeasurementCapability
, msPosMethodCapPresent
;
2501 guint64 ecsdMultiSlotCapability
, eightPskStructPresent
, eightPskStructRfPowerCapPresent
;
2502 guint64 gsm400BandInfoPresent
, gsm850AssocRadioCapabilityPresent
;
2503 guint64 gsm1900AssocRadioCapabilityPresent
, dtmEGprsMultiSlotInfoPresent
;
2504 guint64 dtmEgprsMultiSlotClassPresent
, singleBandSupport
;
2505 guint64 gsm750AssocRadioCapabilityPresent
, extDtmEGprsMultiSlotInfoPresent
;
2506 guint64 highMultislotCapPresent
, geranIuModeSupport
;
2507 guint64 tGsm400BandInfoPresent
, tGsm900AssocRadioCapabilityPresent
, dtmEGprsHighMultiSlotInfoPresent
;
2508 guint64 dtmEgprsHighMultiSlotClassPresent
, gsm710AssocRadioCapabilityPresent
;
2509 guint64 tGsm810AssocRadioCapabilityPresent
;
2511 curr_offset
= offset
;
2513 bit_offset
= curr_offset
<< 3;
2516 proto_tree_add_bits_item(tree
, hf_gsm_a_spare_bits
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
2519 /* Multiband supported field
2520 * { < Multiband supported : { 000 } >
2522 * | < Multiband supported : { 101 | 110 } >
2524 * < Associated Radio Capability 2 : bit(4) >
2525 * < Associated Radio Capability 1 : bit(4) >
2526 * | < Multiband supported : { 001 | 010 | 100 } >
2529 * < Associated Radio Capability 1 : bit(4) > }
2532 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
);
2533 subtree
= proto_item_add_subtree(item
, ett_gsm_common_elem
[DE_MS_CM_3
]);
2535 proto_tree_add_bits_item(subtree
, hf_gsm_a_gsm1800_supported
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
2538 proto_tree_add_bits_item(subtree
, hf_gsm_a_egsm_supported
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
2541 proto_tree_add_bits_item(subtree
, hf_gsm_a_pgsm_supported
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
2544 item
= proto_tree_add_bits_item(tree
, hf_gsm_a_cm3_A5_bits
, tvb
, bit_offset
, 4, ENC_BIG_ENDIAN
);
2545 subtree
= proto_item_add_subtree(item
, ett_gsm_common_elem
[DE_MS_CM_3
]);
2548 proto_tree_add_bits_item(subtree
, hf_gsm_a_A5_7_algorithm_sup
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
2550 proto_tree_add_bits_item(subtree
, hf_gsm_a_A5_6_algorithm_sup
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
2552 proto_tree_add_bits_item(subtree
, hf_gsm_a_A5_5_algorithm_sup
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
2554 proto_tree_add_bits_item(subtree
, hf_gsm_a_A5_4_algorithm_sup
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
2557 switch (multi_bnd_sup_fields
) {
2559 /* A5 bits dissected is done */
2562 * | < Multiband supported : { 001 | 010 | 100 } >
2567 /* < spare bit >(4) */
2568 proto_tree_add_bits_item(tree
, hf_gsm_a_spare_bits
, tvb
, bit_offset
, 4, ENC_BIG_ENDIAN
);
2570 /* < Associated Radio Capability 1 : bit(4) > */
2571 proto_tree_add_bits_item(tree
, hf_gsm_a_ass_radio_cap1
, tvb
, bit_offset
, 4, ENC_BIG_ENDIAN
);
2574 /* < Multiband supported : { 101 | 110 } > */
2578 /* < Associated Radio Capability 2 : bit(4) > */
2579 proto_tree_add_bits_item(tree
, hf_gsm_a_ass_radio_cap2
, tvb
, bit_offset
, 4, ENC_BIG_ENDIAN
);
2581 /* < Associated Radio Capability 1 : bit(4) > */
2582 proto_tree_add_bits_item(tree
, hf_gsm_a_ass_radio_cap1
, tvb
, bit_offset
, 4, ENC_BIG_ENDIAN
);
2588 /* Extract R Support */
2589 AVAILABLE_BITS_CHECK(1);
2590 proto_tree_add_bits_ret_val(tree
, hf_gsm_a_rsupport
, tvb
, bit_offset
, 1, &rsupport
, ENC_BIG_ENDIAN
);
2596 * { 0 | 1 < R Support > }
2597 * Extract R Capabilities
2599 proto_tree_add_bits_item(tree
, hf_gsm_a_r_capabilities
, tvb
, bit_offset
, 3, ENC_BIG_ENDIAN
);
2600 bit_offset
= bit_offset
+ 3;
2604 * { 0 | 1 < HSCSD Multi Slot Capability > }
2605 * Extract Multislot capability
2607 AVAILABLE_BITS_CHECK(1);
2608 proto_tree_add_bits_ret_val(tree
, hf_gsm_a_multislot_capabilities
, tvb
, bit_offset
, 1, &multislotCapability
, ENC_BIG_ENDIAN
);
2611 if (multislotCapability
== 1)
2613 /* Extract Multislot Class */
2614 proto_tree_add_bits_item(tree
, hf_gsm_a_multislot_class
, tvb
, bit_offset
, 5, ENC_BIG_ENDIAN
);
2615 bit_offset
= bit_offset
+ 5;
2618 /* < UCS2 treatment: bit > */
2619 AVAILABLE_BITS_CHECK(1);
2620 proto_tree_add_bits_item(tree
, hf_gsm_a_ucs2_treatment
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
2621 bit_offset
= bit_offset
+ 1;
2623 /* < Extended Measurement Capability : bit > */
2624 AVAILABLE_BITS_CHECK(1);
2625 proto_tree_add_bits_item(tree
, hf_gsm_a_extended_measurement_cap
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
2626 bit_offset
= bit_offset
+ 1;
2628 /* { 0 | 1 < MS measurement capability > }
2629 * Extract MS Measurement capability
2631 AVAILABLE_BITS_CHECK(1);
2632 proto_tree_add_bits_ret_val(tree
, hf_gsm_a_ms_measurement_capability
, tvb
, bit_offset
, 1, &msMeasurementCapability
, ENC_BIG_ENDIAN
);
2633 bit_offset
= bit_offset
+ 1;
2635 if (msMeasurementCapability
== 1)
2637 /* Extract SMS Value n/4 */
2638 proto_tree_add_bits_item(tree
, hf_gsm_a_sms_value
, tvb
, bit_offset
, 4, ENC_BIG_ENDIAN
);
2639 bit_offset
= bit_offset
+ 4;
2641 /* Extract SM Value n/4 */
2642 proto_tree_add_bits_item(tree
, hf_gsm_a_sm_value
, tvb
, bit_offset
, 4, ENC_BIG_ENDIAN
);
2643 bit_offset
= bit_offset
+ 4;
2646 /* { 0 | 1 < MS Positioning Method Capability > }
2647 * Extract MS Positioning Method Capability
2649 AVAILABLE_BITS_CHECK(1);
2650 proto_tree_add_bits_ret_val(tree
, hf_gsm_a_ms_pos_method_cap_present
, tvb
, bit_offset
, 1, &msPosMethodCapPresent
, ENC_BIG_ENDIAN
);
2651 bit_offset
= bit_offset
+ 1;
2653 if (msPosMethodCapPresent
== 1)
2655 /* Extract MS Positioning Method */
2656 item
= proto_tree_add_bits_item(tree
, hf_gsm_a_ms_pos_method
, tvb
, bit_offset
, 5, ENC_BIG_ENDIAN
);
2657 subtree
= proto_item_add_subtree(item
, ett_gsm_common_elem
[DE_MS_CM_3
]);
2659 proto_tree_add_bits_item(subtree
, hf_gsm_a_ms_assisted_e_otd
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
2662 proto_tree_add_bits_item(subtree
, hf_gsm_a_ms_based_e_otd
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
2665 proto_tree_add_bits_item(subtree
, hf_gsm_a_ms_assisted_gps
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
2668 proto_tree_add_bits_item(subtree
, hf_gsm_a_ms_based_gps
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
2671 proto_tree_add_bits_item(subtree
, hf_gsm_a_ms_conventional_gps
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
2675 /* { 0 | 1 < ECSD Multi Slot Capability > }
2676 * Extract ECSD Multi Slot Capability
2678 AVAILABLE_BITS_CHECK(1);
2679 proto_tree_add_bits_ret_val(tree
, hf_gsm_a_ecsd_multi_slot_capability
, tvb
, bit_offset
, 1, &ecsdMultiSlotCapability
, ENC_BIG_ENDIAN
);
2680 bit_offset
= bit_offset
+ 1;
2682 if (ecsdMultiSlotCapability
== 1)
2684 /* Extract ECSD Multi Slot Class */
2685 proto_tree_add_bits_item(tree
, hf_gsm_a_ecsd_multi_slot_class
, tvb
, bit_offset
, 5, ENC_BIG_ENDIAN
);
2686 bit_offset
= bit_offset
+ 5;
2689 /* { 0 | 1 < 8-PSK Struct > }
2690 * Extract 8-PSK struct presence
2692 AVAILABLE_BITS_CHECK(1);
2693 proto_tree_add_bits_ret_val(tree
, hf_gsm_a_8_psk_struct_present
, tvb
, bit_offset
, 1, &eightPskStructPresent
, ENC_BIG_ENDIAN
);
2694 bit_offset
= bit_offset
+ 1;
2696 if (eightPskStructPresent
== 1)
2698 /* At lest Modulation Capability and cap1,cap2 presens indicators is present */
2699 guint8 psk_struct_len
= 3;
2700 guint32 tmp_bit_offset
= bit_offset
;
2702 /* Check if Power Capability 1 is present */
2704 if(tvb_get_bits8(tvb
,tmp_bit_offset
,1) == 1){
2709 /* Check if Power Capability 2 is present */
2710 if(tvb_get_bits8(tvb
,tmp_bit_offset
,1) == 1){
2713 /* Extract 8-PSK struct */
2714 item
= proto_tree_add_bits_item(tree
, hf_gsm_a_8_psk_struct
, tvb
, bit_offset
, psk_struct_len
, ENC_BIG_ENDIAN
);
2715 subtree
= proto_item_add_subtree(item
, ett_gsm_common_elem
[DE_MS_CM_3
]);
2716 old_bit_offset
= bit_offset
;
2718 /* Extract Modulation Capability */
2719 proto_tree_add_bits_item(subtree
, hf_gsm_a_modulation_capability
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
2720 bit_offset
= bit_offset
+ 1;
2722 /* Extract 8_PSK RF Power Capability 1 */
2723 proto_tree_add_bits_ret_val(subtree
, hf_gsm_a_8_psk_rf_power_capability_1_present
, tvb
, bit_offset
,
2724 1, &eightPskStructRfPowerCapPresent
, ENC_BIG_ENDIAN
);
2725 bit_offset
= bit_offset
+ 1;
2726 if (eightPskStructRfPowerCapPresent
== 1)
2728 proto_tree_add_bits_item(subtree
, hf_gsm_a_8_psk_rf_power_capability_1
, tvb
, bit_offset
, 2, ENC_BIG_ENDIAN
);
2729 bit_offset
= bit_offset
+ 2;
2732 /* Extract 8_PSK RF Power Capability 2 */
2733 proto_tree_add_bits_ret_val(subtree
, hf_gsm_a_8_psk_rf_power_capability_2_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_2
, tvb
, bit_offset
, 2, ENC_BIG_ENDIAN
);
2739 bit_offset
= bit_offset
+ 2;
2741 length
= (guint8
)((bit_offset
- old_bit_offset
)>>3);
2742 if ((bit_offset
- old_bit_offset
) & 0x07)
2744 proto_item_set_len(item
, length
);
2747 /* { 0 | 1 < GSM 400 Bands Supported : { 01 | 10 | 11 } >
2748 * < GSM 400 Associated Radio Capability: bit(4) > }
2749 * Extract GSM 400 Band Information presence
2751 AVAILABLE_BITS_CHECK(1);
2752 proto_tree_add_bits_ret_val(tree
, hf_gsm_a_gsm_400_band_info_present
, tvb
, bit_offset
, 1, &gsm400BandInfoPresent
, ENC_BIG_ENDIAN
);
2753 bit_offset
= bit_offset
+ 1;
2755 if (gsm400BandInfoPresent
== 1)
2757 /* Extract GSM 400 Bands Supported */
2758 proto_tree_add_bits_item(tree
, hf_gsm_a_gsm_400_bands_supported
, tvb
, bit_offset
, 2, ENC_BIG_ENDIAN
);
2759 bit_offset
= bit_offset
+ 2;
2761 /* Extract GSM 400 Associated Radio Capability */
2762 proto_tree_add_bits_item(tree
, hf_gsm_a_gsm_400_assoc_radio_cap
, tvb
, bit_offset
, 4, ENC_BIG_ENDIAN
);
2763 bit_offset
= bit_offset
+ 4;
2766 /* { 0 | 1 <GSM 850 Associated Radio Capability : bit(4) > }
2767 * Extract GSM 850 Associated Radio Capability presence
2769 AVAILABLE_BITS_CHECK(1);
2770 proto_tree_add_bits_ret_val(tree
, hf_gsm_a_gsm_850_assoc_radio_cap_present
, tvb
, bit_offset
, 1, &gsm850AssocRadioCapabilityPresent
, ENC_BIG_ENDIAN
);
2771 bit_offset
= bit_offset
+ 1;
2773 if (gsm850AssocRadioCapabilityPresent
== 1)
2775 /* Extract GSM 850 Associated Radio Capability */
2776 proto_tree_add_bits_item(tree
, hf_gsm_a_gsm_850_assoc_radio_cap
, tvb
, bit_offset
, 4, ENC_BIG_ENDIAN
);
2777 bit_offset
= bit_offset
+ 4;
2780 /* { 0 | 1 <GSM 1900 Associated Radio Capability : bit(4) > }
2781 * Extract GSM 1900 Associated Radio Capability presence
2783 AVAILABLE_BITS_CHECK(1);
2784 proto_tree_add_bits_ret_val(tree
, hf_gsm_a_gsm_1900_assoc_radio_cap_present
, tvb
, bit_offset
, 1, &gsm1900AssocRadioCapabilityPresent
, ENC_BIG_ENDIAN
);
2785 bit_offset
= bit_offset
+ 1;
2787 if (gsm1900AssocRadioCapabilityPresent
== 1)
2789 /* Extract GSM 1900 Associated Radio Capability */
2790 proto_tree_add_bits_item(tree
, hf_gsm_a_gsm_1900_assoc_radio_cap
, tvb
, bit_offset
, 4, ENC_BIG_ENDIAN
);
2791 bit_offset
= bit_offset
+ 4;
2794 /* < UMTS FDD Radio Access Technology Capability : bit >
2795 * Extract UMTS FDD Radio Access Technology Capability
2797 AVAILABLE_BITS_CHECK(1);
2798 proto_tree_add_bits_item(tree
, hf_gsm_a_umts_fdd_rat_cap
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
2799 bit_offset
= bit_offset
+ 1;
2801 /* < UMTS 3.84 Mcps TDD Radio Access Technology Capability : bit >
2802 * Extract UMTS 3.84 Mcps TDD Radio Access Technology Capability
2804 AVAILABLE_BITS_CHECK(1);
2805 proto_tree_add_bits_item(tree
, hf_gsm_a_umts_384_mcps_tdd_rat_cap
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
2806 bit_offset
= bit_offset
+ 1;
2808 /* < CDMA 2000 Radio Access Technology Capability : bit >
2809 * Extract CDMA 2000 Radio Access Technology Capability
2811 AVAILABLE_BITS_CHECK(1);
2812 proto_tree_add_bits_item(tree
, hf_gsm_a_cdma_2000_rat_cap
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
2813 bit_offset
= bit_offset
+ 1;
2815 /* { 0 | 1 < DTM GPRS Multi Slot Class : bit(2) >
2816 * < Single Slot DTM : bit >
2817 * {0 | 1< DTM EGPRS Multi Slot Class : bit(2) > } }
2818 * Extract DTM E/GPRS Information presence
2820 AVAILABLE_BITS_CHECK(1);
2821 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
);
2822 bit_offset
= bit_offset
+ 1;
2824 if (dtmEGprsMultiSlotInfoPresent
== 1)
2826 /* Extract DTM GPRS Multi Slot Class */
2827 proto_tree_add_bits_item(tree
, hf_gsm_a_dtm_gprs_multi_slot_class
, tvb
, bit_offset
, 2, ENC_BIG_ENDIAN
);
2828 bit_offset
= bit_offset
+ 2;
2830 /* Extract Single Slot DTM */
2831 proto_tree_add_bits_item(tree
, hf_gsm_a_single_slot_dtm
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
2832 bit_offset
= bit_offset
+ 1;
2834 /* Extract DTM EGPRS Multi Slot Class Presence */
2835 proto_tree_add_bits_ret_val(tree
, hf_gsm_a_dtm_egprs_multi_slot_class_present
, tvb
, bit_offset
, 1, &dtmEgprsMultiSlotClassPresent
, ENC_BIG_ENDIAN
);
2836 bit_offset
= bit_offset
+ 1;
2838 /* Extract DTM EGPRS Multi Slot Class */
2839 if (dtmEgprsMultiSlotClassPresent
== 1)
2841 proto_tree_add_bits_item(tree
, hf_gsm_a_dtm_egprs_multi_slot_class
, tvb
, bit_offset
, 2, ENC_BIG_ENDIAN
);
2842 bit_offset
= bit_offset
+ 2;
2847 * Release 4 starts here
2849 * { 0 | 1 < Single Band Support > } -- Release 4 starts here:
2850 * Extract Single Band Support
2852 AVAILABLE_BITS_CHECK(1);
2853 proto_tree_add_bits_ret_val(tree
, hf_gsm_a_single_band_support
, tvb
, bit_offset
, 1, &singleBandSupport
, ENC_BIG_ENDIAN
);
2854 bit_offset
= bit_offset
+ 1;
2856 if (singleBandSupport
== 1)
2858 /* Extract Single Band Support */
2859 proto_tree_add_bits_item(tree
, hf_gsm_a_gsm_band
, tvb
, bit_offset
, 4, ENC_BIG_ENDIAN
);
2860 bit_offset
= bit_offset
+ 4;
2863 /* { 0 | 1 <GSM 750 Associated Radio Capability : bit(4) > }
2864 * Extract GSM 750 Associated Radio Capability presence
2866 AVAILABLE_BITS_CHECK(1);
2867 proto_tree_add_bits_ret_val(tree
, hf_gsm_a_gsm_750_assoc_radio_cap_present
, tvb
, bit_offset
, 1, &gsm750AssocRadioCapabilityPresent
, ENC_BIG_ENDIAN
);
2868 bit_offset
= bit_offset
+ 1;
2870 if (gsm750AssocRadioCapabilityPresent
== 1)
2872 /* Extract GSM 750 Associated Radio Capability */
2873 proto_tree_add_bits_item(tree
, hf_gsm_a_gsm_750_assoc_radio_cap
, tvb
, bit_offset
, 4, ENC_BIG_ENDIAN
);
2874 bit_offset
= bit_offset
+ 4;
2877 /* < UMTS 1.28 Mcps TDD Radio Access Technology Capability : bit >
2878 * Extract UMTS 1.28 Mcps TDD Radio Access Technology Capability
2880 AVAILABLE_BITS_CHECK(1);
2881 proto_tree_add_bits_item(tree
, hf_gsm_a_umts_128_mcps_tdd_rat_cap
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
2882 bit_offset
= bit_offset
+ 1;
2884 /* < GERAN Feature Package 1 : bit >
2885 * Extract GERAN Feature Package 1
2887 AVAILABLE_BITS_CHECK(1);
2888 proto_tree_add_bits_item(tree
, hf_gsm_a_geran_feature_package_1
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
2889 bit_offset
= bit_offset
+ 1;
2891 /* { 0 | 1 < Extended DTM GPRS Multi Slot Class : bit(2) >
2892 * < Extended DTM EGPRS Multi Slot Class : bit(2) > }
2893 * Extract Extended DTM E/GPRS Information presence
2895 AVAILABLE_BITS_CHECK(1);
2896 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
);
2897 bit_offset
= bit_offset
+ 1;
2899 if (extDtmEGprsMultiSlotInfoPresent
== 1)
2901 /* Extract Extended DTM GPRS Multi Slot Class */
2902 proto_tree_add_bits_item(tree
, hf_gsm_a_ext_dtm_gprs_multi_slot_class
, tvb
, bit_offset
, 2, ENC_BIG_ENDIAN
);
2903 bit_offset
= bit_offset
+ 2;
2905 /* Extract Extended DTM EGPRS Multi Slot Class */
2906 proto_tree_add_bits_item(tree
, hf_gsm_a_ext_dtm_egprs_multi_slot_class
, tvb
, bit_offset
, 2, ENC_BIG_ENDIAN
);
2907 bit_offset
= bit_offset
+ 2;
2911 * Release 5 starts here
2913 * { 0 | 1 < High Multislot Capability : bit(2) > } -- Release 5 starts here.
2914 * Extract High Multislot Capability presence
2916 AVAILABLE_BITS_CHECK(1);
2917 proto_tree_add_bits_ret_val(tree
, hf_gsm_a_high_multislot_cap_present
, tvb
, bit_offset
, 1, &highMultislotCapPresent
, ENC_BIG_ENDIAN
);
2918 bit_offset
= bit_offset
+ 1;
2920 if (highMultislotCapPresent
== 1)
2922 /* Extract High Multislot Capability */
2923 proto_tree_add_bits_item(tree
, hf_gsm_a_high_multislot_cap
, tvb
, bit_offset
, 2, ENC_BIG_ENDIAN
);
2924 bit_offset
= bit_offset
+ 2;
2928 * { 0 | 1 < GERAN Iu Mode Capabilities > } -- "1" also means support of GERAN Iu mode
2929 * Extract GERAN Iu Mode Capabilities presence
2931 AVAILABLE_BITS_CHECK(1);
2932 proto_tree_add_bits_ret_val(tree
, hf_gsm_a_geran_iu_mode_support
, tvb
, bit_offset
, 1, &geranIuModeSupport
, ENC_BIG_ENDIAN
);
2933 bit_offset
= bit_offset
+ 1;
2935 if (geranIuModeSupport
== 1)
2937 /* Extract GERAN Iu Mode Capabilities Length */
2938 length
= tvb_get_bits8(tvb
, bit_offset
, 4);
2940 /* Extract GERAN Iu Mode Capabilities */
2941 item
= proto_tree_add_bits_item(tree
, hf_gsm_a_geran_iu_mode_cap
, tvb
, bit_offset
, length
+ 4, ENC_BIG_ENDIAN
);
2942 subtree
= proto_item_add_subtree(item
, ett_gsm_common_elem
[DE_MS_CM_3
]);
2944 /* Add GERAN Iu Mode Capabilities Length in subtree */
2945 proto_tree_add_bits_item(subtree
, hf_gsm_a_geran_iu_mode_cap_length
, tvb
, bit_offset
, 4, ENC_BIG_ENDIAN
);
2947 target_bit_offset
= bit_offset
+ length
;
2949 /* Extract FLO Iu Capability */
2950 proto_tree_add_bits_item(subtree
, hf_gsm_a_flo_iu_cap
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
2953 /* If needed, add spare bits */
2954 if (target_bit_offset
> bit_offset
)
2956 proto_tree_add_bits_item(subtree
, hf_gsm_a_spare_bits
, tvb
, bit_offset
, target_bit_offset
- bit_offset
, ENC_BIG_ENDIAN
);
2957 bit_offset
= target_bit_offset
;
2961 /* < GERAN Feature Package 2 : bit >
2962 * Extract GERAN Feature Package 2
2964 AVAILABLE_BITS_CHECK(1);
2965 proto_tree_add_bits_item(tree
, hf_gsm_a_geran_feature_package_2
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
2966 bit_offset
= bit_offset
+ 1;
2968 /* < GMSK Multislot Power Profile : bit (2) >
2969 * Extract GMSK Multislot Power Profile
2971 AVAILABLE_BITS_CHECK(2);
2972 proto_tree_add_bits_item(tree
, hf_gsm_a_gmsk_multislot_power_prof
, tvb
, bit_offset
, 2, ENC_BIG_ENDIAN
);
2973 bit_offset
= bit_offset
+ 2;
2975 /* < 8-PSK Multislot Power Profile : bit (2) >
2976 * Extract GMSK Multislot Power Profile
2978 AVAILABLE_BITS_CHECK(2);
2979 proto_tree_add_bits_item(tree
, hf_gsm_a_8_psk_multislot_power_prof
, tvb
, bit_offset
, 2, ENC_BIG_ENDIAN
);
2980 bit_offset
= bit_offset
+ 2;
2983 * Release 6 starts here
2985 * { 0 | 1 < T-GSM 400 Bands Supported : { 01 | 10 | 11 } > -- Release 6 starts here.
2986 * < T-GSM 400 Associated Radio Capability: bit(4) > }
2988 AVAILABLE_BITS_CHECK(1);
2989 proto_tree_add_bits_ret_val(tree
, hf_gsm_a_t_gsm_400_band_info_present
, tvb
, bit_offset
, 1, &tGsm400BandInfoPresent
, ENC_BIG_ENDIAN
);
2990 bit_offset
= bit_offset
+ 1;
2992 if (tGsm400BandInfoPresent
== 1)
2994 /* Extract T-GSM 400 Bands Supported */
2995 proto_tree_add_bits_item(tree
, hf_gsm_a_t_gsm_400_bands_supported
, tvb
, bit_offset
, 2, ENC_BIG_ENDIAN
);
2996 bit_offset
= bit_offset
+ 2;
2998 /* Extract T-GSM 400 Associated Radio Capability */
2999 proto_tree_add_bits_item(tree
, hf_gsm_a_t_gsm_400_assoc_radio_cap
, tvb
, bit_offset
, 4, ENC_BIG_ENDIAN
);
3000 bit_offset
= bit_offset
+ 4;
3003 /* { 0 | 1 < T-GSM 900 Associated Radio Capability: bit(4) > }
3004 * Extract T-GSM 900 Associated Radio Capability presence
3006 AVAILABLE_BITS_CHECK(1);
3007 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
);
3008 bit_offset
= bit_offset
+ 1;
3010 if (tGsm900AssocRadioCapabilityPresent
== 1)
3012 /* Extract T-GSM 900 Associated Radio Capability */
3013 proto_tree_add_bits_item(tree
, hf_gsm_a_t_gsm_900_assoc_radio_cap
, tvb
, bit_offset
, 4, ENC_BIG_ENDIAN
);
3014 bit_offset
= bit_offset
+ 4;
3017 /* < Downlink Advanced Receiver Performance : bit (2)>
3018 * Extract Downlink Advanced Receiver Performance
3020 AVAILABLE_BITS_CHECK(2);
3021 proto_tree_add_bits_item(tree
, hf_gsm_a_downlink_adv_receiver_perf
, tvb
, bit_offset
, 2, ENC_BIG_ENDIAN
);
3022 bit_offset
= bit_offset
+ 2;
3024 /* < DTM Enhancements Capability : bit >
3025 * Extract DTM Enhancements Capability
3027 AVAILABLE_BITS_CHECK(1);
3028 proto_tree_add_bits_item(tree
, hf_gsm_a_dtm_enhancements_cap
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
3029 bit_offset
= bit_offset
+ 1;
3031 /* { 0 | 1 < DTM GPRS High Multi Slot Class : bit(3) >
3032 * < Offset required : bit>
3033 * { 0 | 1 < DTM EGPRS High Multi Slot Class : bit(3) > } }
3034 * Extract DTM E/GPRS High Multi Slot Information presence
3036 AVAILABLE_BITS_CHECK(1);
3037 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
);
3038 bit_offset
= bit_offset
+ 1;
3040 if (dtmEGprsHighMultiSlotInfoPresent
== 1)
3042 /* Extract DTM GPRS High Multi Slot Class */
3043 proto_tree_add_bits_item(tree
, hf_gsm_a_dtm_gprs_high_multi_slot_class
, tvb
, bit_offset
, 3, ENC_BIG_ENDIAN
);
3044 bit_offset
= bit_offset
+ 3;
3046 /* Extract Offset Required */
3047 proto_tree_add_bits_item(tree
, hf_gsm_a_offset_required
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
3048 bit_offset
= bit_offset
+ 1;
3050 /* Extract DTM EGPRS High Multi Slot Class Presence */
3051 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
);
3052 bit_offset
= bit_offset
+ 1;
3054 /* Extract DTM EGPRS High Multi Slot Class */
3055 if (dtmEgprsHighMultiSlotClassPresent
== 1)
3057 proto_tree_add_bits_item(tree
, hf_gsm_a_dtm_egprs_high_multi_slot_class
, tvb
, bit_offset
, 3, ENC_BIG_ENDIAN
);
3058 bit_offset
= bit_offset
+ 3;
3062 /* < Repeated ACCH Capability : bit >
3063 * Extract Repeated ACCH Capability
3065 AVAILABLE_BITS_CHECK(1);
3066 proto_tree_add_bits_item(tree
, hf_gsm_a_repeated_acch_cap
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
3067 bit_offset
= bit_offset
+ 1;
3070 * Release 7 starts here
3072 * { 0 | 1 <GSM 710 Associated Radio Capability : bit(4) > } -- Release 7 starts here.
3073 * Extract GSM 710 Associated Radio Capability presence
3075 AVAILABLE_BITS_CHECK(1);
3076 proto_tree_add_bits_ret_val(tree
, hf_gsm_a_gsm_710_assoc_radio_cap_present
, tvb
, bit_offset
, 1, &gsm710AssocRadioCapabilityPresent
, ENC_BIG_ENDIAN
);
3077 bit_offset
= bit_offset
+ 1;
3079 if (gsm710AssocRadioCapabilityPresent
== 1)
3081 /* Extract GSM 710 Associated Radio Capability */
3082 proto_tree_add_bits_item(tree
, hf_gsm_a_gsm_710_assoc_radio_cap
, tvb
, bit_offset
, 4, ENC_BIG_ENDIAN
);
3083 bit_offset
= bit_offset
+ 4;
3086 /* { 0 | 1 < T-GSM 810 Associated Radio Capability: bit(4) > }
3087 * Extract T-GSM 810 Associated Radio Capability presence
3089 AVAILABLE_BITS_CHECK(1);
3090 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
);
3091 bit_offset
= bit_offset
+ 1;
3093 if (tGsm810AssocRadioCapabilityPresent
== 1)
3095 /* Extract T-GSM 810 Associated Radio Capability */
3096 proto_tree_add_bits_item(tree
, hf_gsm_a_t_gsm_810_assoc_radio_cap
, tvb
, bit_offset
, 4, ENC_BIG_ENDIAN
);
3097 bit_offset
= bit_offset
+ 4;
3100 /* < Ciphering Mode Setting Capability : bit >
3101 * Extract Ciphering Mode Setting Capability
3103 AVAILABLE_BITS_CHECK(1);
3104 proto_tree_add_bits_item(tree
, hf_gsm_a_ciphering_mode_setting_cap
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
3105 bit_offset
= bit_offset
+ 1;
3107 /* < Additional Positioning Capabilities : bit >
3108 * Extract Additional Positioning Capabilities
3110 AVAILABLE_BITS_CHECK(1);
3111 proto_tree_add_bits_item(tree
, hf_gsm_a_additional_positioning_caps
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
3112 bit_offset
= bit_offset
+ 1;
3115 * Release 8 starts here
3117 * <E-UTRA FDD support : bit > -- Release 8 starts here.
3118 * Extract E-UTRA FDD support
3120 AVAILABLE_BITS_CHECK(1);
3121 proto_tree_add_bits_item(tree
, hf_gsm_a_e_utra_fdd_support
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
3122 bit_offset
= bit_offset
+ 1;
3125 * <E-UTRA TDD support : bit >
3126 * Extract E-UTRA TDD support
3128 AVAILABLE_BITS_CHECK(1);
3129 proto_tree_add_bits_item(tree
, hf_gsm_a_e_utra_tdd_support
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
3130 bit_offset
= bit_offset
+ 1;
3133 * <E-UTRA Measurement and Reporting support : bit >
3134 * Extract E-UTRA Measurement and Reporting support
3136 AVAILABLE_BITS_CHECK(1);
3137 proto_tree_add_bits_item(tree
, hf_gsm_a_e_utra_meas_and_report_support
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
3138 bit_offset
= bit_offset
+ 1;
3141 * <Priority-based reselection support : bit >
3142 * Extract Priority-based reselection support
3144 AVAILABLE_BITS_CHECK(1);
3145 proto_tree_add_bits_item(tree
, hf_gsm_a_prio_based_resel_support
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
3146 bit_offset
= bit_offset
+ 1;
3149 * Release 9 starts here
3151 * <UTRA CSG Cells Reporting : bit > -- Release 9 starts here.
3152 * Extract UTRA CSG Cells Reporting
3154 AVAILABLE_BITS_CHECK(1);
3155 proto_tree_add_bits_item(tree
, hf_gsm_a_utra_csg_cells_reporting
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
3156 bit_offset
= bit_offset
+ 1;
3159 * <VAMOS Level : bit(2) >
3160 * Extract VAMOS Level
3162 AVAILABLE_BITS_CHECK(2);
3163 proto_tree_add_bits_item(tree
, hf_gsm_a_vamos_level
, tvb
, bit_offset
, 2, ENC_BIG_ENDIAN
);
3164 bit_offset
= bit_offset
+ 2;
3167 * Release 10 starts here
3169 * < TIGHTER Capability : bit(2) > -- Release 10 starts here.
3170 * Extract TIGHTER Capability
3172 AVAILABLE_BITS_CHECK(2);
3173 proto_tree_add_bits_item(tree
, hf_gsm_a_tighter_cap
, tvb
, bit_offset
, 2, ENC_BIG_ENDIAN
);
3174 bit_offset
= bit_offset
+ 2;
3177 * < Selective Ciphering of Downlink SACCH : bit >
3178 * Extract Selective Ciphering of Downlink SACCH
3180 AVAILABLE_BITS_CHECK(1);
3181 proto_tree_add_bits_item(tree
, hf_gsm_a_selective_ciph_down_sacch
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
3182 bit_offset
= bit_offset
+ 1;
3185 * Release 11 starts here
3187 * < CS to PS SRVCC from GERAN to UTRA : bit(2) > -- Release 11 starts here
3189 AVAILABLE_BITS_CHECK(2);
3190 proto_tree_add_bits_item(tree
, hf_gsm_a_cs_to_ps_srvcc_geran_to_utra
, tvb
, bit_offset
, 2, ENC_BIG_ENDIAN
);
3191 bit_offset
= bit_offset
+ 2;
3194 * < CS to PS SRVCC from GERAN to E-UTRA : bit(2)>
3196 AVAILABLE_BITS_CHECK(2);
3197 proto_tree_add_bits_item(tree
, hf_gsm_a_cs_to_ps_srvcc_geran_to_eutra
, tvb
, bit_offset
, 2, ENC_BIG_ENDIAN
);
3198 bit_offset
= bit_offset
+ 2;
3201 * < GERAN Network Sharing support : bit(1)>
3203 AVAILABLE_BITS_CHECK(1);
3204 proto_tree_add_bits_item(tree
, hf_gsm_a_geran_network_sharing_support
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
3205 bit_offset
= bit_offset
+ 1;
3208 * Add spare bits until we reach an octet boundary
3210 bits_left
= (((len
+ offset
) << 3) - bit_offset
) & 0x07;
3213 proto_tree_add_bits_item(tree
, hf_gsm_a_spare_bits
, tvb
, bit_offset
, bits_left
, ENC_BIG_ENDIAN
);
3214 bit_offset
+= bits_left
;
3217 /* translate to byte offset (we already know that we are on an octet boundary) */
3218 curr_offset
= bit_offset
>> 3;
3219 EXTRANEOUS_DATA_CHECK_EXPERT(len
, curr_offset
- offset
, pinfo
, &ei_gsm_a_extraneous_data
);
3226 guint16
de_spare_nibble(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo _U_
, guint32 offset
, guint len _U_
, gchar
*add_string _U_
, int string_len _U_
)
3228 guint32 curr_offset
;
3231 curr_offset
= offset
;
3232 if (RIGHT_NIBBLE
== len
)
3237 proto_tree_add_bits_item(tree
, hf_gsm_a_spare_nibble
, tvb
, (curr_offset
<<3)+bit_offset
, 4, ENC_BIG_ENDIAN
);
3238 curr_offset
= curr_offset
+ 1;
3240 return(curr_offset
- offset
);
3244 * [3] 10.5.1.9 Descriptive group or broadcast call reference
3247 de_d_gb_call_ref(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo _U_
, guint32 offset
, guint len _U_
, gchar
*add_string _U_
, int string_len _U_
)
3251 guint32 curr_offset
;
3254 curr_offset
= offset
;
3256 value
= tvb_get_ntohl(tvb
, curr_offset
);
3258 other_decode_bitfield_value(a_bigbuf
, value
, 0xffffffe0, 32);
3259 proto_tree_add_text(tree
, tvb
, curr_offset
, 4,
3260 "%s = Group or Broadcast call reference: %u (0x%04x)",
3262 (value
& 0xffffffe0) >> 5,
3263 (value
& 0xffffffe0) >> 5);
3265 other_decode_bitfield_value(a_bigbuf
, value
, 0x00000010, 32);
3266 proto_tree_add_text(tree
, tvb
, curr_offset
, 4,
3267 "%s = SF Service Flag: %s",
3269 (value
& 0x00000010) ?
3270 "VGCS (Group call reference)" : "VBS (Broadcast call reference)");
3272 other_decode_bitfield_value(a_bigbuf
, value
, 0x00000008, 32);
3273 proto_tree_add_text(tree
, tvb
, curr_offset
, 4,
3274 "%s = AF Acknowledgement Flag: acknowledgment is %srequired",
3276 (value
& 0x00000008) ? "" : "not ");
3278 switch (value
& 0x00000007)
3280 case 1: str
= "call priority level 4"; break;
3281 case 2: str
= "call priority level 3"; break;
3282 case 3: str
= "call priority level 2"; break;
3283 case 4: str
= "call priority level 1"; break;
3284 case 5: str
= "call priority level 0"; break;
3285 case 6: str
= "call priority level B"; break;
3286 case 7: str
= "call priority level A"; break;
3288 str
= "no priority applied";
3292 other_decode_bitfield_value(a_bigbuf
, value
, 0x00000007, 32);
3293 proto_tree_add_text(tree
, tvb
, curr_offset
, 4,
3294 "%s = Call Priority: %s",
3300 oct
= tvb_get_guint8(tvb
, curr_offset
);
3302 other_decode_bitfield_value(a_bigbuf
, oct
, 0xf0, 8);
3303 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
3304 "%s = Ciphering Information",
3307 proto_tree_add_bits_item(tree
, hf_gsm_a_spare_bits
, tvb
, (curr_offset
<<3)+4, 4, ENC_BIG_ENDIAN
);
3310 /* no length check possible */
3312 return(curr_offset
- offset
);
3316 * [3] 10.5.1.10a PD and SAPI $(CCBS)$
3319 de_pd_sapi(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo _U_
, guint32 offset
, guint len _U_
, gchar
*add_string _U_
, int string_len _U_
)
3322 guint32 curr_offset
;
3323 proto_tree
*subtree
;
3327 curr_offset
= offset
;
3329 oct
= tvb_get_guint8(tvb
, curr_offset
);
3332 proto_tree_add_text(tree
,
3333 tvb
, curr_offset
, 1, "%s",
3334 val_to_str_ext_const(DE_PD_SAPI
, &gsm_dtap_elem_strings_ext
, ""));
3336 subtree
= proto_item_add_subtree(item
, ett_gsm_dtap_elem
[DE_PD_SAPI
]);
3338 proto_tree_add_bits_item(tree
, hf_gsm_a_spare_bits
, tvb
, curr_offset
<<3, 2, ENC_BIG_ENDIAN
);
3340 switch ((oct
& 0x30) >> 4)
3342 case 0: str
= "SAPI 0"; break;
3343 case 3: str
= "SAPI 3"; break;
3349 other_decode_bitfield_value(a_bigbuf
, oct
, 0x30, 8);
3350 proto_tree_add_text(subtree
, tvb
, curr_offset
, 1,
3351 "%s = SAPI (Service Access Point Identifier): %s",
3355 proto_tree_add_item(tree
, hf_gsm_a_L3_protocol_discriminator
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
3359 /* no length check possible */
3361 return(curr_offset
- offset
);
3365 * [3] 10.5.1.11 Priority Level
3367 static const value_string gsm_a_call_prio_vals
[] = {
3368 { 0x00, "no priority applied" },
3369 { 0x01, "call priority level 4" },
3370 { 0x02, "call priority level 3" },
3371 { 0x03, "call priority level 2" },
3372 { 0x04, "call priority level 1" },
3373 { 0x05, "call priority level 0" },
3374 { 0x06, "call priority level B" },
3375 { 0x07, "call priority level A" },
3380 de_prio(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo _U_
, guint32 offset
, guint len _U_
, gchar
*add_string _U_
, int string_len _U_
)
3382 guint32 curr_offset
;
3384 curr_offset
= offset
;
3386 proto_tree_add_item(tree
, hf_gsm_a_b8spare
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
3387 proto_tree_add_bits_item(tree
, hf_gsm_a_call_prio
, tvb
, (curr_offset
<<3)+5, 3, ENC_BIG_ENDIAN
);
3390 /* no length check possible */
3392 return(curr_offset
- offset
);
3396 * [3] 10.5.1.12.1 CN Common GSM-MAP NAS system information
3399 de_cn_common_gsm_map_nas_sys_info(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo
, guint32 offset
, guint len
, gchar
*add_string _U_
, int string_len _U_
)
3401 guint32 curr_offset
;
3403 curr_offset
= offset
;
3405 proto_tree_add_item(tree
, hf_gsm_a_lac
, tvb
, curr_offset
, 2, ENC_BIG_ENDIAN
);
3408 EXTRANEOUS_DATA_CHECK_EXPERT(len
, curr_offset
- offset
, pinfo
, &ei_gsm_a_extraneous_data
);
3410 return(curr_offset
- offset
);
3414 * [3] 10.5.1.12.2 CS domain specific system information
3416 const true_false_string gsm_a_att_value
= {
3417 "MSs shall apply IMSI attach and detach procedure",
3418 "MSs shall not apply IMSI attach and detach procedure"
3422 de_cs_domain_spec_sys_info(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo
, guint32 offset
, guint len
, gchar
*add_string _U_
, int string_len _U_
)
3424 guint32 curr_offset
;
3426 curr_offset
= offset
;
3428 proto_tree_add_item(tree
, hf_gsm_a_rr_t3212
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
3430 proto_tree_add_bits_item(tree
, hf_gsm_a_spare_bits
, tvb
, (curr_offset
<<3), 7, ENC_BIG_ENDIAN
);
3431 proto_tree_add_item(tree
, hf_gsm_a_att
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
3434 EXTRANEOUS_DATA_CHECK_EXPERT(len
, curr_offset
- offset
, pinfo
, &ei_gsm_a_extraneous_data
);
3436 return(curr_offset
- offset
);
3440 * [3] 10.5.1.12.3 PS domain specific system information
3442 const true_false_string gsm_a_nmo_1_value
= {
3443 "Network Mode of Operation I is used for MS configured for NMO_I_Behaviour",
3444 "Network Mode of Operation indicated in Bit 1 (NMO) is used for MS configured for NMO_I_Behaviour"
3447 const true_false_string gsm_a_nmo_value
= {
3448 "Network Mode of Operation II",
3449 "Network Mode of Operation I"
3453 de_ps_domain_spec_sys_info(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo
, guint32 offset
, guint len
, gchar
*add_string _U_
, int string_len _U_
)
3455 guint32 curr_offset
;
3457 curr_offset
= offset
;
3459 proto_tree_add_item(tree
, hf_gsm_a_gm_rac
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
3461 proto_tree_add_bits_item(tree
, hf_gsm_a_spare_bits
, tvb
, (curr_offset
<<3), 6, ENC_BIG_ENDIAN
);
3462 proto_tree_add_item(tree
, hf_gsm_a_nmo_1
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
3463 proto_tree_add_item(tree
, hf_gsm_a_nmo
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
3466 EXTRANEOUS_DATA_CHECK_EXPERT(len
, curr_offset
- offset
, pinfo
, &ei_gsm_a_extraneous_data
);
3468 return(curr_offset
- offset
);
3472 * [3] 10.5.1.13 PLMN list
3475 de_plmn_list(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo
, guint32 offset
, guint len
, gchar
*add_string
, int string_len
)
3478 guint32 curr_offset
;
3483 curr_offset
= offset
;
3486 while ((len
- (curr_offset
- offset
)) >= 3)
3488 octs
[0] = tvb_get_guint8(tvb
, curr_offset
);
3489 octs
[1] = tvb_get_guint8(tvb
, curr_offset
+ 1);
3490 octs
[2] = tvb_get_guint8(tvb
, curr_offset
+ 2);
3492 mcc_mnc_aux(octs
, mcc
, mnc
);
3494 proto_tree_add_text(tree
,
3495 tvb
, curr_offset
, 3,
3496 "PLMN[%u] Mobile Country Code (MCC): %s, Mobile Network Code (MNC): %s",
3507 g_snprintf(add_string
, string_len
, " - %u PLMN%s",
3508 num_plmn
, plurality(num_plmn
, "", "s"));
3510 EXTRANEOUS_DATA_CHECK_EXPERT(len
, curr_offset
- offset
, pinfo
, &ei_gsm_a_extraneous_data
);
3512 return(curr_offset
- offset
);
3516 * 10.5.1.14 NAS container for PS HO
3519 static const value_string gsm_a_pld_xid_vals
[] = {
3520 { 0x00, "The MS shall perform a Reset of LLC and SNDCP without old XID indicator" },
3521 { 0x01, "The MS shall perform a Reset of LLC and SNDCP with old XID indicator" },
3526 de_nas_cont_for_ps_ho(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo
, guint32 offset
, guint len
, gchar
*add_string _U_
, int string_len _U_
)
3528 guint32 curr_offset
;
3530 curr_offset
= offset
;
3533 * 0 0 0 old 0 Type of ciphering
3534 * spare spare spare XID spare algorithm
3536 proto_tree_add_item(tree
, hf_gsm_a_old_xid
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
3537 proto_tree_add_item(tree
, hf_gsm_a_type_of_ciph_alg
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
3540 /* IOV-UI value (octet 2 to 5)
3541 * The IOV-UI value consists of 32 bits, the format is defined in 3GPP TS 44.064 [78a].
3543 proto_tree_add_item(tree
, hf_gsm_a_iov_ui
, tvb
, curr_offset
, 4, ENC_BIG_ENDIAN
);
3546 EXTRANEOUS_DATA_CHECK_EXPERT(len
, curr_offset
- offset
, pinfo
, &ei_gsm_a_extraneous_data
);
3548 return(curr_offset
- offset
);
3552 * 10.5.1.15 MS network feature support
3554 static const true_false_string gsm_a_ext_periodic_timers_value
= {
3555 "MS supports the extended periodic timer in this domain",
3556 "MS does not support the extended periodic timer in this domain"
3560 de_ms_net_feat_sup(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo _U_
, guint32 offset
, guint len _U_
, gchar
*add_string _U_
, int string_len _U_
)
3562 guint32 curr_offset
, bit_offset
;
3564 curr_offset
= offset
;
3565 bit_offset
= (curr_offset
<<3)+4;
3567 proto_tree_add_bits_item(tree
, hf_gsm_a_spare_bits
, tvb
, bit_offset
, 3, ENC_BIG_ENDIAN
);
3569 proto_tree_add_bits_item(tree
, hf_gsm_a_ext_periodic_timers
, tvb
, bit_offset
, 1, ENC_BIG_ENDIAN
);
3572 return (curr_offset
- offset
);
3576 guint16 (*common_elem_fcn
[])(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo
, guint32 offset
, guint len
, gchar
*add_string
, int string_len
) = {
3577 /* Common Information Elements 10.5.1 */
3578 de_cell_id
, /* Cell Identity */
3579 de_ciph_key_seq_num
, /* Ciphering Key Sequence Number */
3580 de_lai
, /* Location Area Identification */
3581 de_mid
, /* Mobile Identity */
3582 de_ms_cm_1
, /* Mobile Station Classmark 1 */
3583 de_ms_cm_2
, /* Mobile Station Classmark 2 */
3584 de_ms_cm_3
, /* Mobile Station Classmark 3 */
3585 de_spare_nibble
, /* Spare Half Octet */
3586 de_d_gb_call_ref
, /* Descriptive group or broadcast call reference */
3587 NULL
/* handled inline */, /* Group Cipher Key Number */
3588 de_pd_sapi
, /* PD and SAPI $(CCBS)$ */
3590 de_prio
/* handled inline */, /* Priority Level */
3591 de_cn_common_gsm_map_nas_sys_info
, /* 10.5.1.12.1 CN Common GSM-MAP NAS system information */
3592 de_cs_domain_spec_sys_info
, /* 10.5.1.12.2 CS domain specific system information */
3593 de_ps_domain_spec_sys_info
, /* 10.5.1.12.2 PS domain specific system information */
3594 de_plmn_list
, /* 10.5.1.13 PLMN list */
3595 de_nas_cont_for_ps_ho
, /* 10.5.1.14 NAS container for PS HO */
3596 de_ms_net_feat_sup
, /* 10.5.1.15 MS network feature support */
3600 /* Register the protocol with Wireshark */
3602 proto_register_gsm_a_common(void)
3607 /* Setup list of header fields */
3608 static hf_register_info hf
[] =
3610 { &hf_gsm_a_common_elem_id
,
3611 { "Element ID", "gsm_a.common.elem_id",
3612 FT_UINT8
, BASE_HEX
, NULL
, 0,
3616 { "ext", "gsm_a.l_ext",
3617 FT_UINT8
, BASE_DEC
, NULL
, 0x80,
3621 { "IMSI", "gsm_a.imsi",
3622 FT_STRING
, BASE_NONE
, 0, 0,
3626 { "TMSI/P-TMSI", "gsm_a.tmsi",
3627 FT_UINT32
, BASE_HEX
, 0, 0x0,
3631 { "IMEI", "gsm_a.imei",
3632 FT_STRING
, BASE_NONE
, 0, 0,
3636 { "IMEISV", "gsm_a.imeisv",
3637 FT_STRING
, BASE_NONE
, 0, 0,
3640 { &hf_gsm_a_MSC_rev
,
3641 { "Revision Level", "gsm_a.MSC_rev",
3642 FT_UINT8
, BASE_DEC
, VALS(gsm_a_msc_rev_vals
), 0x60,
3646 { "ES IND", "gsm_a.ES_IND",
3647 FT_BOOLEAN
, 8, TFS(&ES_IND_vals
), 0x10,
3650 { &hf_gsm_a_A5_1_algorithm_sup
,
3651 { "A5/1 algorithm supported", "gsm_a.A5_1_algorithm_sup",
3652 FT_BOOLEAN
, 8, TFS(&A5_1_algorithm_sup_vals
), 0x08,
3655 { &hf_gsm_a_RF_power_capability
,
3656 { "RF Power Capability", "gsm_a.RF_power_capability",
3657 FT_UINT8
, BASE_DEC
, VALS(RF_power_capability_vals
), 0x07,
3660 { &hf_gsm_a_ps_sup_cap
,
3661 { "PS capability (pseudo-synchronization capability)", "gsm_a.ps_sup_cap",
3662 FT_BOOLEAN
, 8, TFS(&ps_sup_cap_vals
), 0x40,
3665 { &hf_gsm_a_SS_screening_indicator
,
3666 { "SS Screening Indicator", "gsm_a.SS_screening_indicator",
3667 FT_UINT8
, BASE_DEC
, VALS(SS_screening_indicator_vals
), 0x30,
3670 { &hf_gsm_a_SM_capability
,
3671 { "SM capability (MT SMS pt to pt capability)", "gsm_a.SM_cap",
3672 FT_BOOLEAN
, 8, TFS(&SM_capability_vals
), 0x08,
3675 { &hf_gsm_a_VBS_notification_rec
,
3676 { "VBS notification reception", "gsm_a.VBS_notification_rec",
3677 FT_BOOLEAN
, 8, TFS(&VBS_notification_rec_vals
), 0x04,
3680 { &hf_gsm_a_VGCS_notification_rec
,
3681 { "VGCS notification reception", "gsm_a.VGCS_notification_rec",
3682 FT_BOOLEAN
, 8, TFS(&VGCS_notification_rec_vals
), 0x02,
3685 { &hf_gsm_a_FC_frequency_cap
,
3686 { "FC Frequency Capability", "gsm_a.FC_frequency_cap",
3687 FT_BOOLEAN
, 8, TFS(&FC_frequency_cap_vals
), 0x01,
3691 { "CM3", "gsm_a.CM3",
3692 FT_BOOLEAN
, 8, TFS(&CM3_vals
), 0x80,
3695 { &hf_gsm_a_LCS_VA_cap
,
3696 { "LCS VA capability (LCS value added location request notification capability)", "gsm_a.LCS_VA_cap",
3697 FT_BOOLEAN
, 8, TFS(&LCS_VA_cap_vals
), 0x20,
3700 { &hf_gsm_a_UCS2_treatment
,
3701 { "UCS2 treatment", "gsm_a.UCS2_treatment",
3702 FT_BOOLEAN
, 8, TFS(&UCS2_treatment_vals
), 0x10,
3706 { "SoLSA", "gsm_a.SoLSA",
3707 FT_BOOLEAN
, 8, TFS(&SoLSA_vals
), 0x08,
3711 { "CMSP: CM Service Prompt", "gsm_a.CMSP",
3712 FT_BOOLEAN
, 8, TFS(&CMSP_vals
), 0x04,
3715 { &hf_gsm_a_A5_7_algorithm_sup
,
3716 { "A5/7 algorithm supported", "gsm_a.A5_7_algorithm_sup",
3717 FT_BOOLEAN
, BASE_NONE
, TFS(&A5_7_algorithm_sup_vals
), 0x0,
3720 { &hf_gsm_a_A5_6_algorithm_sup
,
3721 { "A5/6 algorithm supported", "gsm_a.A5_6_algorithm_sup",
3722 FT_BOOLEAN
, BASE_NONE
, TFS(&A5_6_algorithm_sup_vals
), 0x0,
3725 { &hf_gsm_a_A5_5_algorithm_sup
,
3726 { "A5/5 algorithm supported", "gsm_a.A5_5_algorithm_sup",
3727 FT_BOOLEAN
, BASE_NONE
, TFS(&A5_5_algorithm_sup_vals
), 0x0,
3730 { &hf_gsm_a_A5_4_algorithm_sup
,
3731 { "A5/4 algorithm supported", "gsm_a.A5_4_algorithm_sup",
3732 FT_BOOLEAN
, BASE_NONE
, TFS(&A5_4_algorithm_sup_vals
), 0x0,
3735 { &hf_gsm_a_A5_3_algorithm_sup
,
3736 { "A5/3 algorithm supported", "gsm_a.A5_3_algorithm_sup",
3737 FT_BOOLEAN
, 8, TFS(&A5_3_algorithm_sup_vals
), 0x02,
3740 { &hf_gsm_a_A5_2_algorithm_sup
,
3741 { "A5/2 algorithm supported", "gsm_a.A5_2_algorithm_sup",
3742 FT_BOOLEAN
, 8, TFS(&A5_2_algorithm_sup_vals
), 0x01,
3745 { &hf_gsm_a_mobile_identity_type
,
3746 { "Mobile Identity Type", "gsm_a.ie.mobileid.type",
3747 FT_UINT8
, BASE_DEC
, VALS(mobile_identity_type_vals
), 0x07,
3750 { &hf_gsm_a_odd_even_ind
,
3751 { "Odd/even indication", "gsm_a.oddevenind",
3752 FT_BOOLEAN
, 8, TFS(&oddevenind_vals
), 0x08,
3756 { "Unused", "gsm_a.unused",
3757 FT_UINT8
, BASE_HEX
, NULL
, 0xf0,
3760 { &hf_gsm_a_tmgi_mcc_mnc_ind
,
3761 { "MCC/MNC indication", "gsm_a.tmgi_mcc_mnc_ind",
3762 FT_BOOLEAN
, 8, TFS(&gsm_a_present_vals
), 0x10,
3765 { &hf_gsm_a_mbs_ses_id_ind
,
3766 { "MBMS Session Identity indication", "gsm_a.mbs_session_id_ind",
3767 FT_BOOLEAN
, 8, TFS(&gsm_a_present_vals
), 0x20,
3770 { &hf_gsm_a_mbs_service_id
,
3771 { "MBMS Service ID", "gsm_a.mbs_service_id",
3772 FT_UINT24
, BASE_HEX
, NULL
, 0x0,
3775 { &hf_gsm_a_mbs_session_id
,
3776 { "MBMS Session ID", "gsm_a.mbs_session_id",
3777 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
3781 { "Length", "gsm_a.len",
3782 FT_UINT16
, BASE_DEC
, NULL
, 0,
3785 { &hf_gsm_a_extension
,
3786 { "Extension", "gsm_a.extension",
3787 FT_BOOLEAN
, 8, TFS(&gsm_a_extension_value
), 0x80,
3790 { &hf_gsm_a_L3_protocol_discriminator
,
3791 { "Protocol discriminator", "gsm_a.L3_protocol_discriminator",
3792 FT_UINT8
, BASE_HEX
, VALS(protocol_discriminator_vals
), 0x0f,
3795 { &hf_gsm_a_call_prio
,
3796 { "Call priority", "gsm_a.call_prio",
3797 FT_UINT8
, BASE_DEC
, VALS(gsm_a_call_prio_vals
), 0x00,
3800 { &hf_gsm_a_type_of_ciph_alg
,
3801 { "Call priority", "gsm_a.call_prio",
3802 FT_UINT8
, BASE_DEC
, VALS(gsm_a_gm_type_of_ciph_alg_vals
), 0x07,
3806 { "ATT", "gsm_a.att",
3807 FT_BOOLEAN
, 8, TFS(&gsm_a_att_value
), 0x01,
3808 "ttach-detach allowed", HFILL
}
3811 { "NMO I", "gsm_a.nmo_1",
3812 FT_BOOLEAN
, 8, TFS(&gsm_a_nmo_1_value
), 0x02,
3813 "Network Mode of Operation I", HFILL
}
3816 { "NMO", "gsm_a.nmo",
3817 FT_BOOLEAN
, 8, TFS(&gsm_a_nmo_value
), 0x01,
3818 "Network Mode of Operation", HFILL
}
3820 { &hf_gsm_a_old_xid
,
3821 { "Old XID", "gsm_a.old_xid",
3822 FT_UINT8
, BASE_DEC
, VALS(gsm_a_pld_xid_vals
), 0x10,
3826 { "IOV-UI", "gsm_a.iov_ui",
3827 FT_UINT32
, BASE_HEX
, NULL
, 0x0,
3830 { &hf_gsm_a_ext_periodic_timers
,
3831 { "Extended periodic timers", "gsm_a.ext_periodic_timers",
3832 FT_BOOLEAN
, BASE_NONE
, TFS(&gsm_a_ext_periodic_timers_value
), 0x0,
3835 { &hf_gsm_a_skip_ind
,
3836 { "Skip Indicator", "gsm_a.skip.ind",
3837 FT_UINT8
, BASE_DEC
, VALS(gsm_a_skip_ind_vals
), 0xf0,
3840 { &hf_gsm_a_b7spare
,
3841 { "Spare", "gsm_a.spareb7",
3842 FT_UINT8
, BASE_DEC
, NULL
, 0x40,
3845 { &hf_gsm_a_b8spare
,
3846 { "Spare", "gsm_a.spareb8",
3847 FT_UINT8
, BASE_DEC
, NULL
, 0x80,
3850 { &hf_gsm_a_spare_bits
,
3851 { "Spare bit(s)", "gsm_a.spare_bits",
3852 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
3855 { &hf_gsm_a_multi_bnd_sup_fields
,
3856 { "Multiband supported field", "gsm_a.multi_bnd_sup_fields",
3857 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
3860 { &hf_gsm_a_pgsm_supported
,
3861 { "P-GSM Supported", "gsm_a.classmark3.pgsmSupported",
3862 FT_BOOLEAN
, BASE_NONE
, TFS(&true_false_vals
), 0x0,
3865 { &hf_gsm_a_egsm_supported
,
3866 { "E-GSM or R-GSM Supported", "gsm_a.classmark3.egsmSupported",
3867 FT_BOOLEAN
, BASE_NONE
, TFS(&true_false_vals
), 0x0,
3870 { &hf_gsm_a_gsm1800_supported
,
3871 { "GSM 1800 Supported", "gsm_a.classmark3.gsm1800Supported",
3872 FT_BOOLEAN
, BASE_NONE
, TFS(&true_false_vals
), 0x0,
3875 { &hf_gsm_a_ass_radio_cap1
,
3876 { "Associated Radio Capability 1", "gsm_a.classmark3.ass_radio_cap1",
3877 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
3880 { &hf_gsm_a_ass_radio_cap2
,
3881 { "Associated Radio Capability 2", "gsm_a.classmark3.ass_radio_cap2",
3882 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
3885 { &hf_gsm_a_cm3_A5_bits
,
3886 { "A5 bits", "gsm_a.classmark3.a5_bits",
3887 FT_UINT8
, BASE_HEX
, NULL
, 0x00,
3890 { &hf_gsm_a_rsupport
,
3891 { "R Support", "gsm_a.classmark3.rsupport",
3892 FT_BOOLEAN
, BASE_NONE
, TFS(&true_false_vals
), 0x0,
3895 { &hf_gsm_a_r_capabilities
,
3896 { "R-GSM band Associated Radio Capability", "gsm_a.classmark3.r_capabilities",
3897 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
3900 { &hf_gsm_a_multislot_capabilities
,
3901 { "HSCSD Multi Slot Capability", "gsm_a.classmark3.multislot_capabilities",
3902 FT_BOOLEAN
, BASE_NONE
, TFS(&true_false_vals
), 0x0,
3905 { &hf_gsm_a_multislot_class
,
3906 { "HSCSD Multi Slot Class", "gsm_a.classmark3.multislot_cap",
3907 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
3910 { &hf_gsm_a_ucs2_treatment
,
3911 { "UCS2 treatment", "gsm_a.UCS2_treatment",
3912 FT_BOOLEAN
, BASE_NONE
, TFS(&UCS2_treatment_vals
), 0x0,
3915 { &hf_gsm_a_extended_measurement_cap
,
3916 { "Extended Measurement Capability", "gsm_a.classmark3.ext_meas_cap",
3917 FT_BOOLEAN
, BASE_NONE
, TFS(&true_false_vals
), 0x0,
3920 { &hf_gsm_a_ms_measurement_capability
,
3921 { "MS measurement capability", "gsm_a.classmark3.ms_measurement_capability",
3922 FT_BOOLEAN
, BASE_NONE
, TFS(&true_false_vals
), 0x0,
3925 { &hf_gsm_a_sms_value
,
3926 { "SMS_VALUE (Switch-Measure-Switch)", "gsm_a.classmark3.sms_value",
3927 FT_UINT8
, BASE_DEC
, VALS(gsm_a_sms_vals
), 0x0,
3930 { &hf_gsm_a_sm_value
,
3931 { "SM_VALUE (Switch-Measure)", "gsm_a.classmark3.sm_value",
3932 FT_UINT8
, BASE_DEC
, VALS(gsm_a_sms_vals
), 0x0,
3935 { &hf_gsm_a_ms_pos_method_cap_present
,
3936 { "MS Positioning Method Capability present", "gsm_a.classmark3.ms_pos_method_cap_present",
3937 FT_BOOLEAN
, BASE_NONE
, TFS(&true_false_vals
), 0x00,
3940 { &hf_gsm_a_ms_pos_method
,
3941 { "MS Positioning Method", "gsm_a.classmark3.ms_pos_method",
3942 FT_UINT8
, BASE_HEX
, NULL
, 0x00,
3945 { &hf_gsm_a_ms_assisted_e_otd
,
3946 { "MS assisted E-OTD", "gsm_a.classmark3.ms_assisted_e_otd",
3947 FT_BOOLEAN
, BASE_NONE
, TFS(&ms_assisted_e_otd_vals
), 0x0,
3950 { &hf_gsm_a_ms_based_e_otd
,
3951 { "MS based E-OTD", "gsm_a.classmark3.ms_based_e_otd",
3952 FT_BOOLEAN
, BASE_NONE
, TFS(&ms_based_e_otd_vals
), 0x0,
3955 { &hf_gsm_a_ms_assisted_gps
,
3956 { "MS assisted GPS", "gsm_a.classmark3.ms_assisted_gps",
3957 FT_BOOLEAN
, BASE_NONE
, TFS(&ms_assisted_gps_vals
), 0x0,
3960 { &hf_gsm_a_ms_based_gps
,
3961 { "MS based GPS", "gsm_a.classmark3.ms_based_gps",
3962 FT_BOOLEAN
, BASE_NONE
, TFS(&ms_based_gps_vals
), 0x0,
3965 { &hf_gsm_a_ms_conventional_gps
,
3966 { "MS Conventional GPS", "gsm_a.classmark3.ms_conventional_gps",
3967 FT_BOOLEAN
, BASE_NONE
, TFS(&ms_conventional_gps_vals
), 0x0,
3970 { &hf_gsm_a_ecsd_multi_slot_capability
,
3971 { "ECSD Multi Slot Capability present", "gsm_a.classmark3.ecsd_multi_slot_capability",
3972 FT_BOOLEAN
, BASE_NONE
, TFS(&true_false_vals
), 0x00,
3975 { &hf_gsm_a_ecsd_multi_slot_class
,
3976 { "ECSD Multi Slot Class", "gsm_a.classmark3.ecsd_multi_slot_class",
3977 FT_UINT8
, BASE_DEC
, NULL
, 0x00,
3980 { &hf_gsm_a_8_psk_struct_present
,
3981 { "8-PSK Struct present", "gsm_a.classmark3.8_psk_struct_present",
3982 FT_BOOLEAN
, BASE_NONE
, TFS(&true_false_vals
), 0x00,
3985 { &hf_gsm_a_8_psk_struct
,
3986 { "8-PSK Struct", "gsm_a.classmark3.8_psk_struct",
3987 FT_UINT8
, BASE_HEX
, NULL
, 0x00,
3990 { &hf_gsm_a_modulation_capability
,
3991 { "Modulation Capability", "gsm_a.classmark3.modulation_capability",
3992 FT_BOOLEAN
, BASE_NONE
, TFS(&modulation_capability_vals
), 0x00,
3995 { &hf_gsm_a_8_psk_rf_power_capability_1_present
,
3996 { "8-PSK RF Power Capability 1 present", "gsm_a.classmark3.8_psk_rf_power_capability_1_present",
3997 FT_BOOLEAN
, BASE_NONE
, TFS(&true_false_vals
), 0x00,
4000 { &hf_gsm_a_8_psk_rf_power_capability_1
,
4001 { "8-PSK RF Power Capability 1", "gsm_a.classmark3.8_psk_rf_power_capability_1",
4002 FT_UINT8
, BASE_HEX
, VALS(eight_psk_rf_power_capability_vals
), 0x00,
4005 { &hf_gsm_a_8_psk_rf_power_capability_2_present
,
4006 { "8-PSK RF Power Capability 2 present", "gsm_a.classmark3.8_psk_rf_power_capability_2_present",
4007 FT_BOOLEAN
, BASE_NONE
, TFS(&true_false_vals
), 0x00,
4010 { &hf_gsm_a_8_psk_rf_power_capability_2
,
4011 { "8-PSK RF Power Capability 2", "gsm_a.classmark3.8_psk_rf_power_capability_2",
4012 FT_UINT8
, BASE_HEX
, VALS(eight_psk_rf_power_capability_vals
), 0x00,
4015 { &hf_gsm_a_gsm_400_band_info_present
,
4016 { "GSM 400 Band Information present", "gsm_a.classmark3.gsm_400_band_info_present",
4017 FT_BOOLEAN
, BASE_NONE
, TFS(&true_false_vals
), 0x00,
4020 { &hf_gsm_a_gsm_400_bands_supported
,
4021 { "GSM 400 Bands Supported", "gsm_a.classmark3.gsm_400_bands_supported",
4022 FT_UINT8
, BASE_HEX
, VALS(gsm_400_bands_supported_vals
), 0x00,
4025 { &hf_gsm_a_gsm_400_assoc_radio_cap
,
4026 { "GSM 400 Associated Radio Capability", "gsm_a.classmark3.gsm_400_assoc_radio_cap",
4027 FT_UINT8
, BASE_HEX
, NULL
, 0x00,
4030 { &hf_gsm_a_gsm_850_assoc_radio_cap_present
,
4031 { "GSM 850 Associated Radio Capability present", "gsm_a.classmark3.gsm_850_assoc_radio_cap_present",
4032 FT_BOOLEAN
, BASE_NONE
, TFS(&true_false_vals
), 0x00,
4035 { &hf_gsm_a_gsm_850_assoc_radio_cap
,
4036 { "GSM 850 Associated Radio Capability", "gsm_a.classmark3.gsm_850_assoc_radio_cap",
4037 FT_UINT8
, BASE_HEX
, NULL
, 0x00,
4040 { &hf_gsm_a_gsm_1900_assoc_radio_cap_present
,
4041 { "GSM 1900 Associated Radio Capability present", "gsm_a.classmark3.gsm_1900_assoc_radio_cap_present",
4042 FT_BOOLEAN
, BASE_NONE
, TFS(&true_false_vals
), 0x00,
4045 { &hf_gsm_a_gsm_1900_assoc_radio_cap
,
4046 { "GSM 1900 Associated Radio Capability", "gsm_a.classmark3.gsm_1900_assoc_radio_cap",
4047 FT_UINT8
, BASE_HEX
, NULL
, 0x00,
4050 { &hf_gsm_a_umts_fdd_rat_cap
,
4051 { "UMTS FDD Radio Access Technology Capability", "gsm_a.classmark3.umts_fdd_rat_cap",
4052 FT_BOOLEAN
, BASE_NONE
, TFS(&umts_fdd_rat_cap_vals
), 0x00,
4055 { &hf_gsm_a_umts_384_mcps_tdd_rat_cap
,
4056 { "UMTS 3.84 Mcps TDD Radio Access Technology Capability", "gsm_a.classmark3.umts_384_mcps_tdd_rat_cap",
4057 FT_BOOLEAN
, BASE_NONE
, TFS(&umts_384_mcps_tdd_rat_cap_vals
), 0x00,
4060 { &hf_gsm_a_cdma_2000_rat_cap
,
4061 { "CDMA 2000 Radio Access Technology Capability", "gsm_a.classmark3.cdma_2000_rat_cap",
4062 FT_BOOLEAN
, BASE_NONE
, TFS(&cdma_2000_rat_cap_vals
), 0x00,
4065 { &hf_gsm_a_dtm_e_gprs_multi_slot_info_present
,
4066 { "DTM E/GPRS Multi Slot Information present", "gsm_a.classmark3.dtm_e_gprs_multi_slot_info_present",
4067 FT_BOOLEAN
, BASE_NONE
, TFS(&true_false_vals
), 0x00,
4070 { &hf_gsm_a_dtm_gprs_multi_slot_class
,
4071 { "DTM GPRS Multi Slot Class", "gsm_a.classmark3.dtm_gprs_multi_slot_class",
4072 FT_UINT8
, BASE_DEC
, VALS(dtm_gprs_multi_slot_class_vals
), 0x00,
4075 { &hf_gsm_a_single_slot_dtm
,
4076 { "Single Slot DTM", "gsm_a.classmark3.single_slot_dtm_supported",
4077 FT_BOOLEAN
, BASE_NONE
, TFS(&single_slot_dtm_vals
), 0x0,
4080 { &hf_gsm_a_dtm_egprs_multi_slot_class_present
,
4081 { "DTM EGPRS Multi Slot Class present", "gsm_a.classmark3.dtm_egprs_multi_slot_class_present",
4082 FT_BOOLEAN
, BASE_NONE
, TFS(&true_false_vals
), 0x00,
4085 { &hf_gsm_a_dtm_egprs_multi_slot_class
,
4086 { "DTM EGPRS Multi Slot Class", "gsm_a.classmark3.dtm_egprs_multi_slot_class",
4087 FT_UINT8
, BASE_DEC
, VALS(dtm_gprs_multi_slot_class_vals
), 0x00,
4090 { &hf_gsm_a_single_band_support
,
4091 { "Single Band Support", "gsm_a.classmark3.single_band_support",
4092 FT_BOOLEAN
, BASE_NONE
, TFS(&true_false_vals
), 0x00,
4095 { &hf_gsm_a_gsm_band
,
4096 { "GSM Band", "gsm_a.classmark3.gsm_band",
4097 FT_UINT8
, BASE_DEC
, VALS(gsm_band_vals
), 0x00,
4100 { &hf_gsm_a_gsm_750_assoc_radio_cap_present
,
4101 { "GSM 750 Associated Radio Capability present", "gsm_a.classmark3.gsm_750_assoc_radio_cap_present",
4102 FT_BOOLEAN
, BASE_NONE
, TFS(&true_false_vals
), 0x00,
4105 { &hf_gsm_a_gsm_750_assoc_radio_cap
,
4106 { "GSM 750 Associated Radio Capability", "gsm_a.classmark3.gsm_750_assoc_radio_cap",
4107 FT_UINT8
, BASE_HEX
, NULL
, 0x00,
4110 { &hf_gsm_a_umts_128_mcps_tdd_rat_cap
,
4111 { "UMTS 1.28 Mcps TDD Radio Access Technology Capability", "gsm_a.classmark3.umts_128_mcps_tdd_rat_cap",
4112 FT_BOOLEAN
, BASE_NONE
, TFS(&umts_128_mcps_tdd_rat_cap_vals
), 0x00,
4115 { &hf_gsm_a_geran_feature_package_1
,
4116 { "GERAN Feature Package 1", "gsm_a.classmark3.geran_feature_package_1",
4117 FT_BOOLEAN
, BASE_NONE
, TFS(&geran_feature_package_1_vals
), 0x00,
4120 { &hf_gsm_a_ext_dtm_e_gprs_multi_slot_info_present
,
4121 { "Extended DTM E/GPRS Multi Slot Information present", "gsm_a.classmark3.ext_dtm_e_gprs_info_present",
4122 FT_BOOLEAN
, BASE_NONE
, TFS(&true_false_vals
), 0x00,
4125 { &hf_gsm_a_ext_dtm_gprs_multi_slot_class
,
4126 { "Extended DTM GPRS Multi Slot Class", "gsm_a.classmark3.ext_dtm_gprs_multi_slot_class",
4127 FT_UINT8
, BASE_HEX
, NULL
, 0x00,
4130 { &hf_gsm_a_ext_dtm_egprs_multi_slot_class
,
4131 { "Extended DTM EGPRS Multi Slot Class", "gsm_a.classmark3.ext_dtm_egprs_multi_slot_class",
4132 FT_UINT8
, BASE_HEX
, NULL
, 0x00,
4135 { &hf_gsm_a_high_multislot_cap_present
,
4136 { "High Multislot Capability present", "gsm_a.classmark3.high_multislot_cap_present",
4137 FT_BOOLEAN
, BASE_NONE
, TFS(&true_false_vals
), 0x00,
4140 { &hf_gsm_a_high_multislot_cap
,
4141 { "High Multislot Capability", "gsm_a.classmark3.high_multislot_cap",
4142 FT_UINT8
, BASE_HEX
, NULL
, 0x00,
4145 { &hf_gsm_a_geran_iu_mode_support
,
4146 { "GERAN Iu Mode Support", "gsm_a.classmark3.geran_iu_mode_support",
4147 FT_BOOLEAN
, BASE_NONE
, TFS(&true_false_vals
), 0x00,
4150 { &hf_gsm_a_geran_iu_mode_cap
,
4151 { "GERAN Iu Mode Capabilities", "gsm_a.classmark3.geran_iu_mode_cap",
4152 FT_UINT24
, BASE_HEX
, NULL
, 0x00,
4155 { &hf_gsm_a_geran_iu_mode_cap_length
,
4156 { "Length", "gsm_a.classmark3.geran_iu_mode_cap.length",
4157 FT_UINT8
, BASE_DEC
, NULL
, 0x00,
4160 { &hf_gsm_a_flo_iu_cap
,
4161 { "FLO Iu Capability", "gsm_a.classmark3.geran_iu_mode_cap.flo_iu_cap",
4162 FT_BOOLEAN
, BASE_NONE
, TFS(&flo_iu_cap_vals
), 0x00,
4165 { &hf_gsm_a_geran_feature_package_2
,
4166 { "GERAN Feature Package 2", "gsm_a.classmark3.geran_feature_package_2",
4167 FT_BOOLEAN
, BASE_NONE
, TFS(&geran_feature_package_2_vals
), 0x00,
4170 { &hf_gsm_a_gmsk_multislot_power_prof
,
4171 { "GMSK Multislot Power Profile", "gsm_a.classmark3.gmsk_multislot_power_prof",
4172 FT_UINT8
, BASE_DEC
, VALS(gmsk_multislot_power_prof_vals
), 0x00,
4175 { &hf_gsm_a_8_psk_multislot_power_prof
,
4176 { "8-PSK Multislot Power Profile", "gsm_a.classmark3.8_psk_multislot_power_prof",
4177 FT_UINT8
, BASE_DEC
, VALS(eight_psk_multislot_power_prof_vals
), 0x00,
4180 { &hf_gsm_a_t_gsm_400_band_info_present
,
4181 { "T-GSM 400 Band Information present", "gsm_a.classmark3.gsm_400_band_info_present",
4182 FT_BOOLEAN
, BASE_NONE
, TFS(&true_false_vals
), 0x00,
4185 { &hf_gsm_a_t_gsm_400_bands_supported
,
4186 { "T-GSM 400 Bands Supported", "gsm_a.classmark3.t_gsm_400_bands_supported",
4187 FT_UINT8
, BASE_HEX
, VALS(t_gsm_400_bands_supported_vals
), 0x00,
4190 { &hf_gsm_a_t_gsm_400_assoc_radio_cap
,
4191 { "T-GSM 400 Associated Radio Capability", "gsm_a.classmark3.t_gsm_400_assoc_radio_cap",
4192 FT_UINT8
, BASE_HEX
, NULL
, 0x00,
4195 { &hf_gsm_a_t_gsm_900_assoc_radio_cap_present
,
4196 { "T-GSM 900 Associated Radio Capability present", "gsm_a.classmark3.t_gsm_900_assoc_radio_cap_present",
4197 FT_BOOLEAN
, BASE_NONE
, TFS(&true_false_vals
), 0x00,
4200 { &hf_gsm_a_t_gsm_900_assoc_radio_cap
,
4201 { "T-GSM 900 Associated Radio Capability", "gsm_a.classmark3.t_gsm_900_assoc_radio_cap",
4202 FT_UINT8
, BASE_HEX
, NULL
, 0x00,
4205 { &hf_gsm_a_downlink_adv_receiver_perf
,
4206 { "Downlink Advanced Receiver Performance", "gsm_a.classmark3.downlink_adv_receiver_perf",
4207 FT_UINT8
, BASE_DEC
, VALS(downlink_adv_receiver_perf_vals
), 0x00,
4210 { &hf_gsm_a_dtm_enhancements_cap
,
4211 { "DTM Enhancements Capability", "gsm_a.classmark3.dtm_enhancements_capability",
4212 FT_BOOLEAN
, BASE_NONE
, TFS(&dtm_enhancements_cap_vals
), 0x00,
4215 { &hf_gsm_a_dtm_e_gprs_high_multi_slot_info_present
,
4216 { "DTM E/GPRS High Multi Slot Information present", "gsm_a.classmark3.dtm_e_gprs_high_mutli_slot_info_present",
4217 FT_BOOLEAN
, BASE_NONE
, TFS(&true_false_vals
), 0x00,
4220 { &hf_gsm_a_dtm_gprs_high_multi_slot_class
,
4221 { "DTM GPRS Multi Slot Class", "gsm_a.classmark3.dtm_gprs_multi_slot_class",
4222 FT_UINT8
, BASE_DEC
, VALS(dtm_gprs_high_multi_slot_class_vals
), 0x00,
4225 { &hf_gsm_a_offset_required
,
4226 { "Offset required", "gsm_a.classmark3.offset_required",
4227 FT_BOOLEAN
, BASE_NONE
, TFS(&offset_required_vals
), 0x0,
4230 { &hf_gsm_a_dtm_egprs_high_multi_slot_class_present
,
4231 { "DTM EGPRS High Multi Slot Class present", "gsm_a.classmark3.dtm_egprs_high_multi_slot_class_present",
4232 FT_BOOLEAN
, BASE_NONE
, TFS(&true_false_vals
), 0x00,
4235 { &hf_gsm_a_dtm_egprs_high_multi_slot_class
,
4236 { "DTM EGPRS High Multi Slot Class", "gsm_a.classmark3.dtm_egprs_high_multi_slot_class",
4237 FT_UINT8
, BASE_DEC
, VALS(dtm_gprs_high_multi_slot_class_vals
), 0x00,
4240 { &hf_gsm_a_repeated_acch_cap
,
4241 { "Repeated ACCH Capability", "gsm_a.classmark3.repeated_acch_cap",
4242 FT_BOOLEAN
, BASE_NONE
, TFS(&repeated_acch_cap_vals
), 0x00,
4245 { &hf_gsm_a_gsm_710_assoc_radio_cap_present
,
4246 { "GSM 710 Associated Radio Capability present", "gsm_a.classmark3.gsm_710_assoc_radio_cap_present",
4247 FT_BOOLEAN
, BASE_NONE
, TFS(&true_false_vals
), 0x00,
4250 { &hf_gsm_a_gsm_710_assoc_radio_cap
,
4251 { "GSM 710 Associated Radio Capability", "gsm_a.classmark3.gsm_710_assoc_radio_cap",
4252 FT_UINT8
, BASE_HEX
, NULL
, 0x00,
4255 { &hf_gsm_a_t_gsm_810_assoc_radio_cap_present
,
4256 { "T-GSM 810 Associated Radio Capability present", "gsm_a.classmark3.t_gsm_810_assoc_radio_cap_present",
4257 FT_BOOLEAN
, BASE_NONE
, TFS(&true_false_vals
), 0x00,
4260 { &hf_gsm_a_t_gsm_810_assoc_radio_cap
,
4261 { "T-GSM 810 Associated Radio Capability", "gsm_a.classmark3.t_gsm_810_assoc_radio_cap",
4262 FT_UINT8
, BASE_HEX
, NULL
, 0x00,
4265 { &hf_gsm_a_ciphering_mode_setting_cap
,
4266 { "Ciphering Mode Setting Capability", "gsm_a.classmark3.ciphering_mode_setting_cap",
4267 FT_BOOLEAN
, BASE_NONE
, TFS(&ciphering_mode_setting_cap_vals
), 0x00,
4270 { &hf_gsm_a_additional_positioning_caps
,
4271 { "Additional Positioning Capabilities", "gsm_a.classmark3.additional_positioning_caps",
4272 FT_BOOLEAN
, BASE_NONE
, TFS(&additional_positioning_caps_vals
), 0x00,
4275 { &hf_gsm_a_e_utra_fdd_support
,
4276 { "E-UTRA FDD support", "gsm_a.classmark3.e_utra_fdd_support",
4277 FT_BOOLEAN
, BASE_NONE
, TFS(&e_utra_fdd_support_vals
), 0x00,
4280 { &hf_gsm_a_e_utra_tdd_support
,
4281 { "E-UTRA TDD support", "gsm_a.classmark3.e_utra_tdd_support",
4282 FT_BOOLEAN
, BASE_NONE
, TFS(&e_utra_tdd_support_vals
), 0x00,
4285 { &hf_gsm_a_e_utra_meas_and_report_support
,
4286 { "E-UTRA Measurement and Reporting support", "gsm_a.classmark3.e_utra_meas_and_report_support",
4287 FT_BOOLEAN
, BASE_NONE
, TFS(&e_utra_meas_and_report_support_vals
), 0x00,
4290 { &hf_gsm_a_prio_based_resel_support
,
4291 { "Priority-based reselection support", "gsm_a.classmark3.prio_based_resel_support",
4292 FT_BOOLEAN
, BASE_NONE
, TFS(&prio_based_resel_support_vals
), 0x00,
4295 { &hf_gsm_a_utra_csg_cells_reporting
,
4296 { "UTRA CSG Cells Reporting", "gsm_a.classmark3.utra_csg_cells_reporting",
4297 FT_BOOLEAN
, BASE_NONE
, TFS(&utra_csg_cells_reporting_vals
), 0x00,
4300 { &hf_gsm_a_vamos_level
,
4301 { "VAMOS Level", "gsm_a.classmark3.vamos_level",
4302 FT_UINT8
, BASE_DEC
, VALS(vamos_level_vals
), 0x00,
4305 { &hf_gsm_a_tighter_cap
,
4306 { "TIGHTER Capability", "gsm_a.classmark3.tighter_cap",
4307 FT_UINT8
, BASE_DEC
, VALS(tighter_cap_level_vals
), 0x00,
4310 { &hf_gsm_a_selective_ciph_down_sacch
,
4311 { "Selective Ciphering of Downlink SACCH", "gsm_a.classmark3.selective_ciph_down_sacch",
4312 FT_BOOLEAN
, BASE_NONE
, TFS(&tfs_supported_not_supported
), 0x00,
4315 { &hf_gsm_a_cs_to_ps_srvcc_geran_to_utra
,
4316 { "CS to PS SRVCC from GERAN to UTRA", "gsm_a.classmark3.cs_to_ps_srvcc_geran_to_utra",
4317 FT_UINT8
, BASE_DEC
, VALS(cs_to_ps_srvcc_geran_to_utra_vals
), 0x00,
4320 { &hf_gsm_a_cs_to_ps_srvcc_geran_to_eutra
,
4321 { "CS to PS SRVCC from GERAN to E-UTRA", "gsm_a.classmark3.cs_to_ps_srvcc_geran_to_eutra",
4322 FT_UINT8
, BASE_DEC
, VALS(cs_to_ps_srvcc_geran_to_eutra_vals
), 0x00,
4325 { &hf_gsm_a_geran_network_sharing_support
,
4326 { "GERAN Network Sharing support", "gsm_a.classmark3.ggeran_network_sharing_support",
4327 FT_BOOLEAN
, BASE_NONE
, TFS(&true_false_vals
), 0x00,
4330 { &hf_gsm_a_geo_loc_type_of_shape
,
4331 { "Location estimate", "gsm_a.gad.location_estimate",
4332 FT_UINT8
, BASE_DEC
, VALS(type_of_shape_vals
), 0xf0,
4335 { &hf_gsm_a_geo_loc_sign_of_lat
,
4336 { "Sign of latitude", "gsm_a.gad.sign_of_latitude",
4337 FT_UINT8
, BASE_DEC
, VALS(sign_of_latitude_vals
), 0x80,
4340 { &hf_gsm_a_geo_loc_deg_of_lat
,
4341 { "Degrees of latitude", "gsm_a.gad.deg_of_latitude",
4342 FT_UINT24
, BASE_DEC
, NULL
, 0x7fffff,
4345 { &hf_gsm_a_geo_loc_deg_of_long
,
4346 { "Degrees of longitude", "gsm_a.gad.deg_of_longitude",
4347 FT_INT24
, BASE_DEC
, NULL
, 0x0,
4350 { &hf_gsm_a_geo_loc_uncertainty_code
,
4351 { "Uncertainty code", "gsm_a.gad.uncertainty_code",
4352 FT_UINT8
, BASE_DEC
, NULL
, 0x7f,
4355 { &hf_gsm_a_geo_loc_uncertainty_semi_major
,
4356 { "Uncertainty semi-major", "gsm_a.gad.uncertainty_semi_major",
4357 FT_UINT8
, BASE_DEC
, NULL
, 0x7f,
4360 { &hf_gsm_a_geo_loc_uncertainty_semi_minor
,
4361 { "Uncertainty semi-minor", "gsm_a.gad.uncertainty_semi_minor",
4362 FT_UINT8
, BASE_DEC
, NULL
, 0x7f,
4365 { &hf_gsm_a_geo_loc_orientation_of_major_axis
,
4366 { "Orientation of major axis", "gsm_a.gad.orientation_of_major_axis",
4367 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
4370 { &hf_gsm_a_geo_loc_uncertainty_altitude
,
4371 { "Uncertainty Altitude", "gsm_a.gad.uncertainty_altitude",
4372 FT_UINT8
, BASE_DEC
, NULL
, 0x7f,
4375 { &hf_gsm_a_geo_loc_confidence
,
4376 { "Confidence(%)", "gsm_a.gad.confidence",
4377 FT_UINT8
, BASE_DEC
, NULL
, 0x7f,
4380 { &hf_gsm_a_geo_loc_no_of_points
,
4381 { "Number of points", "gsm_a.gad.no_of_points",
4382 FT_UINT8
, BASE_DEC
, NULL
, 0x0f,
4385 { &hf_gsm_a_velocity_type
,
4386 { "Number of points", "gsm_a.gad.velocity_type",
4387 FT_UINT8
, BASE_DEC
, VALS(gsm_a_velocity_type_vals
), 0xf0,
4390 { &hf_gsm_a_bearing
,
4391 { "Bearing", "gsm_a.gad.bearing",
4392 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
4395 { &hf_gsm_a_horizontal_speed
,
4396 { "Horizontal Speed", "gsm_a.gad.horizontal_velocity",
4397 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
4400 { &hf_gsm_a_vertical_speed
,
4401 { "Vertical Speed", "gsm_a.gad.vertical_speed",
4402 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
4405 { &hf_gsm_a_uncertainty_speed
,
4406 { "Uncertainty Speed", "gsm_a.gad.uncertainty_speed",
4407 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
4410 { &hf_gsm_a_h_uncertainty_speed
,
4411 { "Horizontal Uncertainty Speed", "gsm_a.gad.v_uncertainty_speed",
4412 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
4415 { &hf_gsm_a_v_uncertainty_speed
,
4416 { "Vertical Uncertainty Speed", "gsm_a.gad.h_uncertainty_speed",
4417 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
4421 { "Direction of Vertical Speed", "gsm_a.gad.d",
4422 FT_BOOLEAN
, 8, TFS(&gsm_a_dir_of_ver_speed_vals
), 0x08,
4425 { &hf_gsm_a_geo_loc_D
,
4426 { "D: Direction of Altitude", "gsm_a.gad.D",
4427 FT_UINT16
, BASE_DEC
, VALS(dir_of_alt_vals
), 0x8000,
4430 { &hf_gsm_a_geo_loc_altitude
,
4431 { "Altitude in meters", "gsm_a.gad.altitude",
4432 FT_UINT16
, BASE_DEC
, NULL
, 0x7fff,
4435 { &hf_gsm_a_geo_loc_inner_radius
,
4436 { "Inner radius", "gsm_a.gad.altitude",
4437 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
4440 { &hf_gsm_a_geo_loc_uncertainty_radius
,
4441 { "Uncertainty radius", "gsm_a.gad.no_of_points",
4442 FT_UINT8
, BASE_DEC
, NULL
, 0x7f,
4445 { &hf_gsm_a_geo_loc_offset_angle
,
4446 { "Offset angle", "gsm_a.gad.offset_angle",
4447 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
4450 { &hf_gsm_a_geo_loc_included_angle
,
4451 { "Included angle", "gsm_a.gad.included_angle",
4452 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
4455 { &hf_gsm_a_key_seq
,
4456 { "key sequence", "gsm_a.key_seq",
4457 FT_UINT8
, BASE_DEC
, VALS(gsm_a_key_seq_vals
), 0x00,
4461 { "Location Area Code (LAC)", "gsm_a.lac",
4462 FT_UINT16
, BASE_HEX_DEC
, NULL
, 0x00,
4465 { &hf_gsm_a_spare_nibble
,
4466 { "Spare Nibble", "gsm_a.spare",
4467 FT_UINT8
, BASE_DEC_HEX
, NULL
, 0x00,
4472 /* Setup protocol subtree array */
4473 #define NUM_INDIVIDUAL_ELEMS 0
4474 static gint
*ett
[NUM_INDIVIDUAL_ELEMS
+
4475 NUM_GSM_COMMON_ELEM
];
4477 static ei_register_info ei
[] = {
4478 { &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
}},
4481 expert_module_t
* expert_a_common
;
4483 last_offset
= NUM_INDIVIDUAL_ELEMS
;
4485 for (i
=0; i
< NUM_GSM_COMMON_ELEM
; i
++, last_offset
++)
4487 ett_gsm_common_elem
[i
] = -1;
4488 ett
[last_offset
] = &ett_gsm_common_elem
[i
];
4491 /* Register the protocol name and description */
4494 proto_register_protocol("GSM A-I/F COMMON", "GSM COMMON", "gsm_a");
4496 proto_register_field_array(proto_a_common
, hf
, array_length(hf
));
4498 proto_register_subtree_array(ett
, array_length(ett
));
4499 expert_a_common
= expert_register_protocol(proto_a_common
);
4500 expert_register_field_array(expert_a_common
, ei
, array_length(ei
));
4503 gsm_a_tap
= register_tap("gsm_a");