File: | builds/wireshark/wireshark/epan/dissectors/packet-gsm_a_common.c |
Warning: | line 1078, column 9 Value stored to 'value' is never read |
Press '?' to see keyboard shortcuts
Keyboard shortcuts:
1 | /* packet-gsm_a_common.c |
2 | * Common routines for GSM A Interface dissection |
3 | * |
4 | * Copyright 2003, Michael Lum <mlum [AT] telostech.com> |
5 | * In association with Telos Technology Inc. |
6 | * |
7 | * Split from packet-gsm_a.c by Neil Piercy <Neil [AT] littlebriars.co.uk> |
8 | * |
9 | * Wireshark - Network traffic analyzer |
10 | * By Gerald Combs <[email protected]> |
11 | * Copyright 1998 Gerald Combs |
12 | * |
13 | * SPDX-License-Identifier: GPL-2.0-or-later |
14 | */ |
15 | |
16 | #include "config.h" |
17 | |
18 | #include <math.h> |
19 | |
20 | #include <epan/packet.h> |
21 | #include <epan/expert.h> |
22 | #include <epan/tap.h> |
23 | #include <epan/stat_tap_ui.h> |
24 | #include <epan/tfs.h> |
25 | #include <epan/unit_strings.h> |
26 | |
27 | #include <wsutil/str_util.h> |
28 | #include <wsutil/array.h> |
29 | #include "packet-gsm_a_common.h" |
30 | #include "packet-bssap.h" |
31 | #include "packet-gmr1_common.h" |
32 | #include "packet-e212.h" |
33 | |
34 | void proto_register_gsm_a_common(void); |
35 | |
36 | static const value_string gsm_common_elem_strings[] = { |
37 | /* Common Information Elements 10.5.1 */ |
38 | { DE_CELL_ID, "Cell Identity" }, |
39 | { DE_CIPH_KEY_SEQ_NUM, "Ciphering Key Sequence Number" }, |
40 | { DE_LAI, "Location Area Identification (LAI)" }, |
41 | { DE_MID, "Mobile Identity" }, |
42 | { DE_MS_CM_1, "Mobile Station Classmark 1" }, |
43 | { DE_MS_CM_2, "Mobile Station Classmark 2" }, |
44 | { DE_MS_CM_3, "Mobile Station Classmark 3" }, |
45 | { DE_SPARE_NIBBLE, "Spare Half Octet" }, |
46 | { DE_D_GB_CALL_REF, "Descriptive group or broadcast call reference" }, |
47 | { DE_G_CIPH_KEY_NUM, "Group Cipher Key Number" }, |
48 | { DE_PD_SAPI, "PD and SAPI $(CCBS)$" }, |
49 | { DE_PRIO, "Priority Level" }, |
50 | { DE_CN_COMMON_GSM_MAP_NAS_SYS_INFO, "CN Common GSM-MAP NAS system information" }, |
51 | { DE_CS_DOMAIN_SPEC_SYS_INFO, "CS domain specific system information" }, |
52 | { DE_PS_DOMAIN_SPEC_SYS_INFO, "PS domain specific system information" }, |
53 | { DE_PLMN_LIST, "PLMN List" }, |
54 | { DE_NAS_CONT_FOR_PS_HO, "NAS container for PS HO" }, |
55 | { DE_MS_NET_FEAT_SUP, "MS network feature support" }, |
56 | { 0, NULL((void*)0) } |
57 | }; |
58 | value_string_ext gsm_common_elem_strings_ext = VALUE_STRING_EXT_INIT(gsm_common_elem_strings){ _try_val_to_str_ext_init, 0, (sizeof (gsm_common_elem_strings ) / sizeof ((gsm_common_elem_strings)[0]))-1, gsm_common_elem_strings , "gsm_common_elem_strings" }; |
59 | |
60 | static const value_string gsm_a_skip_ind_vals[] = { |
61 | { 0, "No indication of selected PLMN"}, |
62 | { 1, "PLMN identity of the Common PLMN in the broadcast system information"}, |
63 | { 2, "PLMN identity of the first Additional PLMN in the broadcast system information"}, |
64 | { 3, "PLMN identity of the second Additional PLMN in the broadcast system information"}, |
65 | { 4, "PLMN identity of the third Additional PLMN in the broadcast system information"}, |
66 | { 5, "PLMN identity of the fourth Additional PLMN in the broadcast system information"}, |
67 | { 6, "Reserved"}, |
68 | { 7, "Reserved"}, |
69 | { 0, NULL((void*)0) } |
70 | }; |
71 | |
72 | static const true_false_string gsm_a_extension_value = { |
73 | "No Extension", |
74 | "Extended" |
75 | }; |
76 | |
77 | |
78 | /* Mobile Station Classmark Value strings |
79 | */ |
80 | |
81 | /* Mobile Station Classmark |
82 | * Revision level |
83 | */ |
84 | static const value_string gsm_a_msc_rev_vals[] = { |
85 | { 0, "Reserved for GSM phase 1"}, |
86 | { 1, "Used by GSM phase 2 mobile stations"}, |
87 | { 2, "Used by mobile stations supporting R99 or later versions of the protocol"}, |
88 | { 3, "Reserved for future use"}, |
89 | { 0, NULL((void*)0) } |
90 | }; |
91 | |
92 | /* ES IND (octet 3, bit 5) "Controlled Early Classmark Sending" option implementation */ |
93 | static const true_false_string ES_IND_vals = { |
94 | "Controlled Early Classmark Sending option is implemented in the MS", |
95 | "Controlled Early Classmark Sending option is not implemented in the MS" |
96 | }; |
97 | /* A5/1 algorithm supported (octet 3, bit 4) */ |
98 | static const true_false_string A5_1_algorithm_sup_vals = { |
99 | "encryption algorithm A5/1 not available", |
100 | "encryption algorithm A5/1 available" |
101 | }; |
102 | /* RF Power Capability (Octet 3) */ |
103 | static const value_string RF_power_capability_vals[] = { |
104 | { 0, "class 1"}, |
105 | { 1, "class 2"}, |
106 | { 2, "class 3"}, |
107 | { 3, "class 4"}, |
108 | { 4, "class 5"}, |
109 | { 7, "RF Power capability is irrelevant in this information element"}, |
110 | { 0, NULL((void*)0) } |
111 | }; |
112 | /* PS capability (pseudo-synchronization capability) (octet 4) */ |
113 | static const true_false_string ps_sup_cap_vals = { |
114 | "PS capability present", |
115 | "PS capability not present" |
116 | }; |
117 | /* SS Screening Indicator (octet 4)defined in 3GPP TS 24.080 */ |
118 | static const value_string SS_screening_indicator_vals[] = { |
119 | { 0, "Default value of phase 1"}, |
120 | { 1, "Capability of handling of ellipsis notation and phase 2 error handling "}, |
121 | { 2, "For future use"}, |
122 | { 3, "For future use"}, |
123 | { 0, NULL((void*)0) } |
124 | }; |
125 | /* SM capability (MT SMS pt to pt capability) (octet 4)*/ |
126 | static const true_false_string SM_capability_vals = { |
127 | "Mobile station supports mobile terminated point to point SMS", |
128 | "Mobile station does not support mobile terminated point to point SMS" |
129 | }; |
130 | /* VBS notification reception (octet 4) */ |
131 | static const true_false_string VBS_notification_rec_vals = { |
132 | "VBS capability and notifications wanted", |
133 | "no VBS capability or no notifications wanted" |
134 | }; |
135 | /* VGCS notification reception (octet 4) */ |
136 | static const true_false_string VGCS_notification_rec_vals = { |
137 | "VGCS capability and notifications wanted", |
138 | "no VGCS capability or no notifications wanted" |
139 | }; |
140 | /* FC Frequency Capability (octet 4 ) */ |
141 | static const true_false_string FC_frequency_cap_vals = { |
142 | "The MS does support the E-GSM or R-GSM", |
143 | "The MS does not support the E-GSM or R-GSM band" |
144 | }; |
145 | /* CM3 (octet 5, bit 8) */ |
146 | static const true_false_string CM3_vals = { |
147 | "The MS supports options that are indicated in classmark 3 IE", |
148 | "The MS does not support any options that are indicated in CM3" |
149 | }; |
150 | /* LCS VA capability (LCS value added location request notification capability) (octet 5,bit 6) */ |
151 | static const true_false_string LCS_VA_cap_vals = { |
152 | "LCS value added location request notification capability supported", |
153 | "LCS value added location request notification capability not supported" |
154 | }; |
155 | /* UCS2 treatment (octet 5, bit 5) */ |
156 | static const true_false_string UCS2_treatment_vals = { |
157 | "the ME has no preference between the use of the default alphabet and the use of UCS2", |
158 | "the ME has a preference for the default alphabet" |
159 | }; |
160 | /* SoLSA (octet 5, bit 4) */ |
161 | static const true_false_string SoLSA_vals = { |
162 | "The ME supports SoLSA", |
163 | "The ME does not support SoLSA" |
164 | }; |
165 | /* CMSP: CM Service Prompt (octet 5, bit 3) */ |
166 | static const true_false_string CMSP_vals = { |
167 | "Network initiated MO CM connection request supported for at least one CM protocol", |
168 | "Network initiated MO CM connection request not supported" |
169 | }; |
170 | /* A5/7 algorithm supported */ |
171 | static const true_false_string A5_7_algorithm_sup_vals = { |
172 | "encryption algorithm A5/7 available", |
173 | "encryption algorithm A5/7 not available" |
174 | }; |
175 | /* A5/6 algorithm supported */ |
176 | static const true_false_string A5_6_algorithm_sup_vals = { |
177 | "encryption algorithm A5/6 available", |
178 | "encryption algorithm A5/6 not available" |
179 | }; |
180 | /* A5/5 algorithm supported */ |
181 | static const true_false_string A5_5_algorithm_sup_vals = { |
182 | "encryption algorithm A5/5 available", |
183 | "encryption algorithm A5/5 not available" |
184 | }; |
185 | /* A5/4 algorithm supported */ |
186 | static const true_false_string A5_4_algorithm_sup_vals = { |
187 | "encryption algorithm A5/4 available", |
188 | "encryption algorithm A5/4 not available" |
189 | }; |
190 | /* A5/3 algorithm supported (octet 5, bit 2) */ |
191 | static const true_false_string A5_3_algorithm_sup_vals = { |
192 | "encryption algorithm A5/3 available", |
193 | "encryption algorithm A5/3 not available" |
194 | }; |
195 | /* A5/2 algorithm supported (octet 5, bit 1) */ |
196 | static const true_false_string A5_2_algorithm_sup_vals = { |
197 | "encryption algorithm A5/2 available", |
198 | "encryption algorithm A5/2 not available" |
199 | }; |
200 | |
201 | static const value_string mobile_identity_type_vals[] = { |
202 | { 0, "No Identity"}, |
203 | { 1, "IMSI"}, |
204 | { 2, "IMEI"}, |
205 | { 3, "IMEISV"}, |
206 | { 4, "TMSI/P-TMSI/M-TMSI"}, |
207 | { 5, "TMGI and optional MBMS Session Identity"}, /* ETSI TS 124 008 V6.8.0 (2005-03) p326 */ |
208 | { 0, NULL((void*)0) } |
209 | }; |
210 | |
211 | static const true_false_string oddevenind_vals = { |
212 | "Odd number of identity digits", |
213 | "Even number of identity digits" |
214 | }; |
215 | |
216 | |
217 | const value_string gsm_a_sms_vals[] = { |
218 | { 0, "1/4 timeslot (~144 microseconds)" }, |
219 | { 1, "2/4 timeslot (~288 microseconds)" }, |
220 | { 2, "3/4 timeslot (~433 microseconds)" }, |
221 | { 3, "4/4 timeslot (~577 microseconds)" }, |
222 | { 4, "5/4 timeslot (~721 microseconds)" }, |
223 | { 5, "6/4 timeslot (~865 microseconds)" }, |
224 | { 6, "7/4 timeslot (~1009 microseconds)" }, |
225 | { 7, "8/4 timeslot (~1154 microseconds)" }, |
226 | { 8, "9/4 timeslot (~1298 microseconds)" }, |
227 | { 9, "10/4 timeslot (~1442 microseconds)" }, |
228 | { 10, "11/4 timeslot (~1586 microseconds)" }, |
229 | { 11, "12/4 timeslot (~1730 microseconds)" }, |
230 | { 12, "13/4 timeslot (~1874 microseconds)" }, |
231 | { 13, "14/4 timeslot (~2019 microseconds)" }, |
232 | { 14, "15/4 timeslot (~2163 microseconds)" }, |
233 | { 15, "16/4 timeslot (~2307 microseconds)" }, |
234 | { 0, NULL((void*)0)} |
235 | }; |
236 | |
237 | static const true_false_string ms_assisted_e_otd_vals = { |
238 | "MS assisted E-OTD supported", |
239 | "MS assisted E-OTD not supported" |
240 | }; |
241 | |
242 | static const true_false_string ms_based_e_otd_vals = { |
243 | "MS based E-OTD supported", |
244 | "MS based E-OTD not supported" |
245 | }; |
246 | |
247 | static const true_false_string ms_assisted_gps_vals = { |
248 | "MS assisted GPS supported", |
249 | "MS assisted GPS not supported" |
250 | }; |
251 | |
252 | static const true_false_string ms_based_gps_vals = { |
253 | "MS based GPS supported", |
254 | "MS based GPS not supported" |
255 | }; |
256 | |
257 | static const true_false_string ms_conventional_gps_vals = { |
258 | "Conventional GPS supported", |
259 | "Conventional GPS not supported" |
260 | }; |
261 | |
262 | static const true_false_string modulation_capability_vals = { |
263 | "8-PSK supported for uplink transmission and downlink reception", |
264 | "8-PSK supported for downlink reception only" |
265 | }; |
266 | |
267 | static const value_string eight_psk_rf_power_capability_vals[] = { |
268 | { 0, "Reserved" }, |
269 | { 1, "Power class E1" }, |
270 | { 2, "Power class E2" }, |
271 | { 3, "Power class E3" }, |
272 | { 0, NULL((void*)0)} |
273 | }; |
274 | |
275 | static const value_string gsm_400_bands_supported_vals[] = { |
276 | { 1, "GSM 480 supported, GSM 450 not supported" }, |
277 | { 2, "GSM 450 supported, GSM 480 not supported" }, |
278 | { 3, "GSM 450 supported, GSM 480 supported" }, |
279 | { 0, NULL((void*)0)} |
280 | }; |
281 | |
282 | static const true_false_string umts_fdd_rat_cap_vals = { |
283 | "UMTS FDD supported", |
284 | "UMTS FDD not supported" |
285 | }; |
286 | |
287 | static const true_false_string umts_384_mcps_tdd_rat_cap_vals = { |
288 | "UMTS 3.84 Mcps TDD supported", |
289 | "UMTS 3.84 Mcps TDD not supported" |
290 | }; |
291 | |
292 | static const true_false_string cdma_2000_rat_cap_vals = { |
293 | "CDMA 2000 supported", |
294 | "CDMA 2000 not supported" |
295 | }; |
296 | |
297 | static const value_string dtm_gprs_multi_slot_class_vals[] = { |
298 | { 0, "Unused. If received, the network shall interpret this as 1" }, |
299 | { 1, "Multislot class 5 supported" }, |
300 | { 2, "Multislot class 9 supported" }, |
301 | { 3, "Multislot class 11 supported" }, |
302 | { 0, NULL((void*)0)} |
303 | }; |
304 | |
305 | static const true_false_string single_slot_dtm_vals = { |
306 | "Single Slot DTM supported", |
307 | "Single Slot DTM not supported" |
308 | }; |
309 | |
310 | static const value_string gsm_band_vals[] = { |
311 | { 0, "E-GSM is supported" }, |
312 | { 1, "P-GSM is supported" }, |
313 | { 2, "GSM 1800 is supported" }, |
314 | { 3, "GSM 450 is supported" }, |
315 | { 4, "GSM 480 is supported" }, |
316 | { 5, "GSM 850 is supported" }, |
317 | { 6, "GSM 1900 is supported" }, |
318 | { 7, "GSM 750 is supported" }, |
319 | { 8, "GSM 710 is supported" }, |
320 | { 9, "T-GSM 810 is supported" }, |
321 | { 0, NULL((void*)0)} |
322 | }; |
323 | |
324 | static const true_false_string umts_128_mcps_tdd_rat_cap_vals = { |
325 | "UMTS 1.28 Mcps TDD supported", |
326 | "UMTS 1.28 Mcps TDD not supported" |
327 | }; |
328 | |
329 | static const true_false_string geran_feature_package_1_vals = { |
330 | "GERAN feature package 1 supported", |
331 | "GERAN feature package 1 not supported" |
332 | }; |
333 | |
334 | static const true_false_string flo_iu_cap_vals = { |
335 | "FLO in GERAN Iu Mode supported", |
336 | "FLO in GERAN Iu Mode not supported" |
337 | }; |
338 | |
339 | static const true_false_string geran_feature_package_2_vals = { |
340 | "GERAN feature package 2 supported", |
341 | "GERAN feature package 2 not supported" |
342 | }; |
343 | |
344 | static const value_string gmsk_multislot_power_prof_vals[] = { |
345 | { 0, "GMSK_MULTISLOT_POWER_PROFILE 0" }, |
346 | { 1, "GMSK_MULTISLOT_POWER_PROFILE 1" }, |
347 | { 2, "GMSK_MULTISLOT_POWER_PROFILE 2" }, |
348 | { 3, "GMSK_MULTISLOT_POWER_PROFILE 3" }, |
349 | { 0, NULL((void*)0)} |
350 | }; |
351 | |
352 | static const value_string eight_psk_multislot_power_prof_vals[] = { |
353 | { 0, "8-PSK_MULTISLOT_POWER_PROFILE 0" }, |
354 | { 1, "8-PSK_MULTISLOT_POWER_PROFILE 1" }, |
355 | { 2, "8-PSK_MULTISLOT_POWER_PROFILE 2" }, |
356 | { 3, "8-PSK_MULTISLOT_POWER_PROFILE 3" }, |
357 | { 0, NULL((void*)0)} |
358 | }; |
359 | |
360 | static const value_string t_gsm_400_bands_supported_vals[] = { |
361 | { 1, "T-GSM 380 supported, T-GSM 410 not supported" }, |
362 | { 2, "T-GSM 410 supported, T-GSM 380 not supported" }, |
363 | { 3, "T-GSM 410 supported, T-GSM 380 supported" }, |
364 | { 0, NULL((void*)0)} |
365 | }; |
366 | |
367 | static const value_string downlink_adv_receiver_perf_vals[] = { |
368 | { 0, "Downlink Advanced Receiver Performance not supported" }, |
369 | { 1, "Downlink Advanced Receiver Performance - phase I supported" }, |
370 | { 2, "Downlink Advanced Receiver Performance - phase II supported" }, |
371 | { 0, NULL((void*)0)} |
372 | }; |
373 | |
374 | static const true_false_string dtm_enhancements_cap_vals = { |
375 | "The mobile station supports enhanced DTM CS establishment and release procedures", |
376 | "The mobile station does not support enhanced DTM CS establishment and release procedures" |
377 | }; |
378 | |
379 | static const true_false_string offset_required_vals = { |
380 | "The mobile station requires the offset", |
381 | "The mobile station does not require the offset" |
382 | }; |
383 | |
384 | static const value_string dtm_gprs_high_multi_slot_class_vals[] = { |
385 | { 0, "Unused. If received, the network shall interpret this as \"0 0 1\"" }, |
386 | { 1, "Multislot class 31 or 36 supported" }, |
387 | { 2, "Multislot class 32 or 37 supported" }, |
388 | { 3, "Multislot class 33 or 38 supported" }, |
389 | { 4, "Multislot class 41 supported" }, |
390 | { 5, "Multislot class 42 supported" }, |
391 | { 6, "Multislot class 43 supported" }, |
392 | { 7, "Multislot class 44 supported" }, |
393 | { 0, NULL((void*)0)} |
394 | }; |
395 | |
396 | static const true_false_string repeated_acch_cap_vals = { |
397 | "The mobile station supports Repeated SACCH and Repeated Downlink FACCH", |
398 | "The mobile station does not support Repeated SACCH" |
399 | }; |
400 | |
401 | static const true_false_string ciphering_mode_setting_cap_vals = { |
402 | "The mobile station supports the Ciphering Mode Setting IE in the DTM ASSIGNMENT COMMAND message", |
403 | "The mobile station does not support the Ciphering Mode Setting IE in the DTM ASSIGNMENT COMMAND message" |
404 | }; |
405 | |
406 | static const true_false_string additional_positioning_caps_vals = { |
407 | "The mobile station supports additional positioning capabilities which can be retrieved using RRLP", |
408 | "The mobile station does not support additional positioning capabilities which can be retrieved using RRLP" |
409 | }; |
410 | |
411 | static const true_false_string e_utra_fdd_support_vals = { |
412 | "E-UTRA FDD supported", |
413 | "E-UTRA FDD not supported" |
414 | }; |
415 | |
416 | static const true_false_string e_utra_tdd_support_vals = { |
417 | "E-UTRA TDD supported", |
418 | "E-UTRA TDD not supported" |
419 | }; |
420 | |
421 | static const true_false_string e_utra_meas_and_report_support_vals = { |
422 | "E-UTRAN Neighbour Cell measurements and measurement reporting while having an RR connection supported", |
423 | "E-UTRAN Neighbour Cell measurements and measurement reporting while having an RR connection not supported" |
424 | }; |
425 | |
426 | static const true_false_string prio_based_resel_support_vals = { |
427 | "Priority-based cell reselection supported", |
428 | "Priority-based cell reselection not supported" |
429 | }; |
430 | |
431 | static const true_false_string utra_csg_cells_reporting_vals = { |
432 | "Reporting of UTRAN CSG cells supported", |
433 | "Reporting of UTRAN CSG cells not supported" |
434 | }; |
435 | |
436 | static const value_string vamos_level_vals[] = { |
437 | { 0, "VAMOS not supported" }, |
438 | { 1, "VAMOS I supported" }, |
439 | { 2, "VAMOS II supported" }, |
440 | { 3, "VAMOS III supported" }, |
441 | { 0, NULL((void*)0)} |
442 | }; |
443 | |
444 | const value_string tighter_cap_level_vals[] = { |
445 | { 0, "TIGHTER not supported" }, |
446 | { 1, "TIGHTER supported for speech and signalling channels only" }, |
447 | { 2, "TIGHTER supported for speech and signalling channels and for GPRS and EGPRS, but not for EGPRS2" }, |
448 | { 3, "TIGHTER supported for speech and signalling channels and for GPRS, EGPRS and EGPRS2" }, |
449 | { 0, NULL((void*)0)} |
450 | }; |
451 | |
452 | static const value_string cs_to_ps_srvcc_geran_to_utra_vals[] = { |
453 | { 0, "CS to PS SRVCC from GERAN to UMTS FDD and 1.28 Mcps TDD not supported" }, |
454 | { 1, "CS to PS SRVCC from GERAN to UMTS FDD supported" }, |
455 | { 2, "CS to PS SRVCC from GERAN to UMTS 1.28 Mcps TDD supported" }, |
456 | { 3, "CS to PS SRVCC from GERAN to UMTS FDD and 1.28 Mcps TDD supported" }, |
457 | { 0, NULL((void*)0)} |
458 | }; |
459 | |
460 | static const value_string cs_to_ps_srvcc_geran_to_eutra_vals[] = { |
461 | { 0, "CS to PS SRVCC from GERAN to E-UTRA FDD and TDD not supported" }, |
462 | { 1, "CS to PS SRVCC from GERAN to E-UTRA FDD supported" }, |
463 | { 2, "CS to PS SRVCC from GERAN to E-UTRA TDD supported" }, |
464 | { 3, "CS to PS SRVCC from GERAN to E-UTRA FDD and TDD supported" }, |
465 | { 0, NULL((void*)0)} |
466 | }; |
467 | |
468 | static const value_string gsm_a_rr_rxlev_vals [] = { |
469 | { 0, "< -110 dBm"}, |
470 | { 1, "-110 <= x < -109 dBm"}, |
471 | { 2, "-109 <= x < -108 dBm"}, |
472 | { 3, "-108 <= x < -107 dBm"}, |
473 | { 4, "-107 <= x < -106 dBm"}, |
474 | { 5, "-106 <= x < -105 dBm"}, |
475 | { 6, "-105 <= x < -104 dBm"}, |
476 | { 7, "-104 <= x < -103 dBm"}, |
477 | { 8, "-103 <= x < -102 dBm"}, |
478 | { 9, "-102 <= x < -101 dBm"}, |
479 | { 10, "-101 <= x < -100 dBm"}, |
480 | { 11, "-100 <= x < -99 dBm"}, |
481 | { 12, "-99 <= x < -98 dBm"}, |
482 | { 13, "-98 <= x < -97 dBm"}, |
483 | { 14, "-97 <= x < -96 dBm"}, |
484 | { 15, "-96 <= x < -95 dBm"}, |
485 | { 16, "-95 <= x < -94 dBm"}, |
486 | { 17, "-94 <= x < -93 dBm"}, |
487 | { 18, "-93 <= x < -92 dBm"}, |
488 | { 19, "-92 <= x < -91 dBm"}, |
489 | { 20, "-91 <= x < -90 dBm"}, |
490 | { 21, "-90 <= x < -89 dBm"}, |
491 | { 22, "-89 <= x < -88 dBm"}, |
492 | { 23, "-88 <= x < -87 dBm"}, |
493 | { 24, "-87 <= x < -86 dBm"}, |
494 | { 25, "-86 <= x < -85 dBm"}, |
495 | { 26, "-85 <= x < -84 dBm"}, |
496 | { 27, "-84 <= x < -83 dBm"}, |
497 | { 28, "-83 <= x < -82 dBm"}, |
498 | { 29, "-82 <= x < -81 dBm"}, |
499 | { 30, "-81 <= x < -80 dBm"}, |
500 | { 31, "-80 <= x < -79 dBm"}, |
501 | { 32, "-79 <= x < -78 dBm"}, |
502 | { 33, "-78 <= x < -77 dBm"}, |
503 | { 34, "-77 <= x < -76 dBm"}, |
504 | { 35, "-76 <= x < -75 dBm"}, |
505 | { 36, "-75 <= x < -74 dBm"}, |
506 | { 37, "-74 <= x < -73 dBm"}, |
507 | { 38, "-73 <= x < -72 dBm"}, |
508 | { 39, "-72 <= x < -71 dBm"}, |
509 | { 40, "-71 <= x < -70 dBm"}, |
510 | { 41, "-70 <= x < -69 dBm"}, |
511 | { 42, "-69 <= x < -68 dBm"}, |
512 | { 43, "-68 <= x < -67 dBm"}, |
513 | { 44, "-67 <= x < -66 dBm"}, |
514 | { 45, "-66 <= x < -65 dBm"}, |
515 | { 46, "-65 <= x < -64 dBm"}, |
516 | { 47, "-64 <= x < -63 dBm"}, |
517 | { 48, "-63 <= x < -62 dBm"}, |
518 | { 49, "-62 <= x < -61 dBm"}, |
519 | { 50, "-61 <= x < -60 dBm"}, |
520 | { 51, "-60 <= x < -59 dBm"}, |
521 | { 52, "-59 <= x < -58 dBm"}, |
522 | { 53, "-58 <= x < -57 dBm"}, |
523 | { 54, "-57 <= x < -56 dBm"}, |
524 | { 55, "-56 <= x < -55 dBm"}, |
525 | { 56, "-55 <= x < -54 dBm"}, |
526 | { 57, "-54 <= x < -53 dBm"}, |
527 | { 58, "-53 <= x < -52 dBm"}, |
528 | { 59, "-52 <= x < -51 dBm"}, |
529 | { 60, "-51 <= x < -50 dBm"}, |
530 | { 61, "-50 <= x < -49 dBm"}, |
531 | { 62, "-49 <= x < -48 dBm"}, |
532 | { 63, ">= -48 dBm"}, |
533 | { 0, NULL((void*)0)} |
534 | }; |
535 | value_string_ext gsm_a_rr_rxlev_vals_ext = VALUE_STRING_EXT_INIT(gsm_a_rr_rxlev_vals){ _try_val_to_str_ext_init, 0, (sizeof (gsm_a_rr_rxlev_vals) / sizeof ((gsm_a_rr_rxlev_vals)[0]))-1, gsm_a_rr_rxlev_vals, "gsm_a_rr_rxlev_vals" }; |
536 | |
537 | const value_string gsm_a_rr_rxqual_vals[] = { |
538 | {0, "BER < 0.2%, Mean value 0.14%"}, |
539 | {1, "0.2% <= BER < 0.4%, Mean value 0.28%"}, |
540 | {2, "0.4% <= BER < 0.8%, Mean value 0.57%"}, |
541 | {3, "0.8% <= BER < 1.6%, Mean value 1.13%"}, |
542 | {4, "1.6% <= BER < 3.2%, Mean value 2.26%"}, |
543 | {5, "3.2% <= BER < 6.4%, Mean value 4.53%"}, |
544 | {6, "6.4% <= BER < 12.8%, Mean value 9.05%"}, |
545 | {7, "BER > 12.8%, Mean value 18.10%"}, |
546 | {0, NULL((void*)0)} |
547 | }; |
548 | |
549 | /* Initialize the protocol and registered fields */ |
550 | static int proto_a_common; |
551 | static int proto_3gpp; |
552 | |
553 | int gsm_a_tap; |
554 | |
555 | int hf_gsm_a_common_elem_id; |
556 | static int hf_gsm_a_common_elem_id_f0; |
557 | static int hf_gsm_a_l_ext; |
558 | int hf_gsm_a_tmsi; |
559 | static int hf_gsm_a_imei; |
560 | static int hf_gsm_a_imeisv; |
561 | |
562 | static int hf_gsm_a_MSC_rev; |
563 | static int hf_gsm_a_ES_IND; |
564 | static int hf_gsm_a_A5_1_algorithm_sup; |
565 | static int hf_gsm_a_RF_power_capability; |
566 | static int hf_gsm_a_ps_sup_cap; |
567 | static int hf_gsm_a_SS_screening_indicator; |
568 | static int hf_gsm_a_SM_capability; |
569 | static int hf_gsm_a_VBS_notification_rec; |
570 | static int hf_gsm_a_VGCS_notification_rec; |
571 | static int hf_gsm_a_FC_frequency_cap; |
572 | static int hf_gsm_a_CM3; |
573 | static int hf_gsm_a_LCS_VA_cap; |
574 | static int hf_gsm_a_UCS2_treatment; |
575 | static int hf_gsm_a_SoLSA; |
576 | static int hf_gsm_a_CMSP; |
577 | static int hf_gsm_a_A5_7_algorithm_sup; |
578 | static int hf_gsm_a_A5_6_algorithm_sup; |
579 | static int hf_gsm_a_A5_5_algorithm_sup; |
580 | static int hf_gsm_a_A5_4_algorithm_sup; |
581 | static int hf_gsm_a_A5_3_algorithm_sup; |
582 | static int hf_gsm_a_A5_2_algorithm_sup; |
583 | |
584 | static int hf_gsm_a_odd_even_ind; |
585 | static int hf_gsm_a_id_dig_1; |
586 | static int hf_gsm_a_unused; |
587 | static int hf_gsm_a_mobile_identity_type; |
588 | static int hf_gsm_a_tmgi_mcc_mnc_ind; |
589 | static int hf_gsm_a_mbs_ses_id_ind; |
590 | static int hf_gsm_a_mbs_service_id; |
591 | static int hf_gsm_a_mbs_session_id; |
592 | static int hf_gsm_a_length; |
593 | static int hf_gsm_a_element_value; |
594 | int hf_gsm_a_extension; |
595 | int hf_gsm_a_L3_protocol_discriminator; |
596 | int hf_gsm_a_call_prio; |
597 | int hf_gsm_a_skip_ind; |
598 | int hf_gsm_a_spare_bits; |
599 | int hf_gsm_a_lac; |
600 | |
601 | static int hf_gsm_a_spare_nibble; |
602 | static int hf_gsm_a_type_of_ciph_alg; |
603 | static int hf_gsm_a_att; |
604 | static int hf_gsm_a_nmo_1; |
605 | static int hf_gsm_a_nmo; |
606 | static int hf_gsm_a_old_xid; |
607 | static int hf_gsm_a_iov_ui; |
608 | static int hf_gsm_a_ext_periodic_timers; |
609 | static int hf_gsm_a_b7spare; |
610 | int hf_gsm_a_b8spare; |
611 | static int hf_gsm_a_multi_bnd_sup_fields; |
612 | static int hf_gsm_a_pgsm_supported; |
613 | static int hf_gsm_a_egsm_supported; |
614 | static int hf_gsm_a_gsm1800_supported; |
615 | static int hf_gsm_a_ass_radio_cap1; |
616 | static int hf_gsm_a_ass_radio_cap2; |
617 | static int hf_gsm_a_rsupport; |
618 | static int hf_gsm_a_r_capabilities; |
619 | static int hf_gsm_a_multislot_capabilities; |
620 | static int hf_gsm_a_multislot_class; |
621 | static int hf_gsm_a_ucs2_treatment; |
622 | static int hf_gsm_a_extended_measurement_cap; |
623 | static int hf_gsm_a_ms_measurement_capability; |
624 | static int hf_gsm_a_sms_value; |
625 | static int hf_gsm_a_sm_value; |
626 | static int hf_gsm_a_key_seq; |
627 | static int hf_gsm_a_ms_pos_method_cap_present; |
628 | static int hf_gsm_a_ms_pos_method; |
629 | static int hf_gsm_a_ms_assisted_e_otd; |
630 | static int hf_gsm_a_ms_based_e_otd; |
631 | static int hf_gsm_a_ms_assisted_gps; |
632 | static int hf_gsm_a_ms_based_gps; |
633 | static int hf_gsm_a_ms_conventional_gps; |
634 | static int hf_gsm_a_ecsd_multi_slot_capability; |
635 | static int hf_gsm_a_ecsd_multi_slot_class; |
636 | static int hf_gsm_a_8_psk_struct_present; |
637 | static int hf_gsm_a_8_psk_struct; |
638 | static int hf_gsm_a_modulation_capability; |
639 | static int hf_gsm_a_8_psk_rf_power_capability_1_present; |
640 | static int hf_gsm_a_8_psk_rf_power_capability_1; |
641 | static int hf_gsm_a_8_psk_rf_power_capability_2_present; |
642 | static int hf_gsm_a_8_psk_rf_power_capability_2; |
643 | static int hf_gsm_a_gsm_400_band_info_present; |
644 | static int hf_gsm_a_gsm_400_bands_supported; |
645 | static int hf_gsm_a_gsm_400_assoc_radio_cap; |
646 | static int hf_gsm_a_gsm_850_assoc_radio_cap_present; |
647 | static int hf_gsm_a_gsm_850_assoc_radio_cap; |
648 | static int hf_gsm_a_gsm_1900_assoc_radio_cap_present; |
649 | static int hf_gsm_a_gsm_1900_assoc_radio_cap; |
650 | static int hf_gsm_a_cm3_A5_bits; |
651 | static int hf_gsm_a_umts_fdd_rat_cap; |
652 | static int hf_gsm_a_umts_384_mcps_tdd_rat_cap; |
653 | static int hf_gsm_a_cdma_2000_rat_cap; |
654 | static int hf_gsm_a_dtm_e_gprs_multi_slot_info_present; |
655 | static int hf_gsm_a_dtm_gprs_multi_slot_class; |
656 | static int hf_gsm_a_single_slot_dtm; |
657 | static int hf_gsm_a_dtm_egprs_multi_slot_class_present; |
658 | static int hf_gsm_a_dtm_egprs_multi_slot_class; |
659 | static int hf_gsm_a_single_band_support; |
660 | static int hf_gsm_a_gsm_band; |
661 | static int hf_gsm_a_gsm_750_assoc_radio_cap_present; |
662 | static int hf_gsm_a_gsm_750_assoc_radio_cap; |
663 | static int hf_gsm_a_umts_128_mcps_tdd_rat_cap; |
664 | static int hf_gsm_a_geran_feature_package_1; |
665 | static int hf_gsm_a_ext_dtm_e_gprs_multi_slot_info_present; |
666 | static int hf_gsm_a_ext_dtm_gprs_multi_slot_class; |
667 | static int hf_gsm_a_ext_dtm_egprs_multi_slot_class; |
668 | static int hf_gsm_a_high_multislot_cap_present; |
669 | static int hf_gsm_a_high_multislot_cap; |
670 | static int hf_gsm_a_geran_iu_mode_support; |
671 | static int hf_gsm_a_geran_iu_mode_cap; |
672 | static int hf_gsm_a_geran_iu_mode_cap_length; |
673 | static int hf_gsm_a_flo_iu_cap; |
674 | static int hf_gsm_a_geran_feature_package_2; |
675 | static int hf_gsm_a_gmsk_multislot_power_prof; |
676 | static int hf_gsm_a_8_psk_multislot_power_prof; |
677 | static int hf_gsm_a_t_gsm_400_band_info_present; |
678 | static int hf_gsm_a_t_gsm_400_bands_supported; |
679 | static int hf_gsm_a_t_gsm_400_assoc_radio_cap; |
680 | static int hf_gsm_a_t_gsm_900_assoc_radio_cap_present; |
681 | static int hf_gsm_a_t_gsm_900_assoc_radio_cap; |
682 | static int hf_gsm_a_downlink_adv_receiver_perf; |
683 | static int hf_gsm_a_dtm_enhancements_cap; |
684 | static int hf_gsm_a_dtm_e_gprs_high_multi_slot_info_present; |
685 | static int hf_gsm_a_dtm_gprs_high_multi_slot_class; |
686 | static int hf_gsm_a_offset_required; |
687 | static int hf_gsm_a_dtm_egprs_high_multi_slot_class_present; |
688 | static int hf_gsm_a_dtm_egprs_high_multi_slot_class; |
689 | static int hf_gsm_a_repeated_acch_cap; |
690 | static int hf_gsm_a_gsm_710_assoc_radio_cap_present; |
691 | static int hf_gsm_a_gsm_710_assoc_radio_cap; |
692 | static int hf_gsm_a_t_gsm_810_assoc_radio_cap_present; |
693 | static int hf_gsm_a_t_gsm_810_assoc_radio_cap; |
694 | static int hf_gsm_a_ciphering_mode_setting_cap; |
695 | static int hf_gsm_a_additional_positioning_caps; |
696 | static int hf_gsm_a_e_utra_fdd_support; |
697 | static int hf_gsm_a_e_utra_tdd_support; |
698 | static int hf_gsm_a_e_utra_meas_and_report_support; |
699 | static int hf_gsm_a_prio_based_resel_support; |
700 | static int hf_gsm_a_utra_csg_cells_reporting; |
701 | static int hf_gsm_a_vamos_level; |
702 | static int hf_gsm_a_tighter_cap; |
703 | static int hf_gsm_a_selective_ciph_down_sacch; |
704 | static int hf_gsm_a_cs_to_ps_srvcc_geran_to_utra; |
705 | static int hf_gsm_a_cs_to_ps_srvcc_geran_to_eutra; |
706 | static int hf_gsm_a_geran_network_sharing_support; |
707 | static int hf_gsm_a_eutra_wb_rsrq_support; |
708 | static int hf_gsm_a_er_band_support; |
709 | static int hf_gsm_a_utra_mfbi_support; |
710 | static int hf_gsm_a_eutra_mfbi_support; |
711 | static int hf_gsm_a_ext_tsc_set_cap_support; |
712 | static int hf_gsm_a_ext_earfcn_value_range; |
713 | |
714 | static int hf_gsm_a_geo_loc_type_of_shape; |
715 | static int hf_gsm_a_geo_loc_sign_of_lat; |
716 | static int hf_gsm_a_geo_loc_deg_of_lat; |
717 | static int hf_gsm_a_geo_loc_deg_of_long; |
718 | static int hf_gsm_a_geo_loc_osm_uri; |
719 | static int hf_gsm_a_geo_loc_uncertainty_code; |
720 | static int hf_gsm_a_geo_loc_uncertainty_semi_major; |
721 | static int hf_gsm_a_geo_loc_uncertainty_semi_minor; |
722 | static int hf_gsm_a_geo_loc_orientation_of_major_axis; |
723 | static int hf_gsm_a_geo_loc_uncertainty_altitude; |
724 | static int hf_gsm_a_geo_loc_confidence; |
725 | static int hf_gsm_a_geo_loc_uncertainty_range; |
726 | static int hf_gsm_a_geo_loc_horizontal_confidence; |
727 | static int hf_gsm_a_geo_loc_horizontal_uncertainty_range; |
728 | static int hf_gsm_a_geo_loc_vertical_confidence; |
729 | static int hf_gsm_a_geo_loc_vertical_uncertainty_range; |
730 | static int hf_gsm_a_geo_loc_high_acc_uncertainty_alt; |
731 | static int hf_gsm_a_geo_loc_no_of_points; |
732 | static int hf_gsm_a_geo_loc_high_acc_deg_of_lat; |
733 | static int hf_gsm_a_geo_loc_high_acc_deg_of_long; |
734 | static int hf_gsm_a_geo_loc_high_acc_uncertainty_semi_major; |
735 | static int hf_gsm_a_geo_loc_high_acc_uncertainty_semi_minor; |
736 | static int hf_gsm_a_geo_loc_high_acc_alt; |
737 | static int hf_gsm_a_velocity_type; |
738 | static int hf_gsm_a_bearing; |
739 | static int hf_gsm_a_horizontal_speed; |
740 | static int hf_gsm_a_uncertainty_speed; |
741 | static int hf_gsm_a_h_uncertainty_speed; |
742 | static int hf_gsm_a_v_uncertainty_speed; |
743 | static int hf_gsm_a_vertical_speed; |
744 | static int hf_gsm_a_d; |
745 | static int hf_gsm_a_geo_loc_D; |
746 | static int hf_gsm_a_geo_loc_altitude; |
747 | static int hf_gsm_a_geo_loc_inner_radius; |
748 | static int hf_gsm_a_geo_loc_uncertainty_radius; |
749 | static int hf_gsm_a_geo_loc_offset_angle; |
750 | static int hf_gsm_a_geo_loc_included_angle; |
751 | |
752 | /* Generated from convert_proto_tree_add_text.pl */ |
753 | static int hf_gsm_a_filler; |
754 | static int hf_gsm_a_identity_digit1; |
755 | static int hf_gsm_a_group_call_reference; |
756 | static int hf_gsm_a_service_flag; |
757 | static int hf_gsm_a_af_acknowledgement; |
758 | static int hf_gsm_a_call_priority; |
759 | static int hf_gsm_a_ciphering_info; |
760 | static int hf_gsm_a_sapi; |
761 | |
762 | /* Inter protocol hf */ |
763 | int hf_3gpp_tmsi; |
764 | |
765 | static int ett_gsm_a_plmn; |
766 | static int ett_gsm_a_poly_pnt; |
767 | |
768 | static expert_field ei_gsm_a_extraneous_data; |
769 | static expert_field ei_gsm_a_unknown_element; |
770 | static expert_field ei_gsm_a_unknown_pdu_type; |
771 | static expert_field ei_gsm_a_no_element_dissector; |
772 | static expert_field ei_gsm_a_format_not_supported; |
773 | static expert_field ei_gsm_a_mobile_identity_type; |
774 | static expert_field ei_gsm_a_ie_length_too_short; |
775 | |
776 | sccp_assoc_info_t* sccp_assoc; |
777 | |
778 | #define NUM_GSM_COMMON_ELEM(sizeof (gsm_common_elem_strings) / sizeof (gsm_common_elem_strings )[0]) array_length(gsm_common_elem_strings)(sizeof (gsm_common_elem_strings) / sizeof (gsm_common_elem_strings )[0]) |
779 | int ett_gsm_common_elem[NUM_GSM_COMMON_ELEM(sizeof (gsm_common_elem_strings) / sizeof (gsm_common_elem_strings )[0])]; |
780 | |
781 | |
782 | #define ELLIPSOID_POINT0 0 |
783 | #define ELLIPSOID_POINT_WITH_UNCERT_CIRC1 1 |
784 | #define ELLIPSOID_POINT_WITH_UNCERT_ELLIPSE3 3 |
785 | #define POLYGON5 5 |
786 | #define ELLIPSOID_POINT_WITH_ALT8 8 |
787 | #define ELLIPSOID_POINT_WITH_ALT_AND_UNCERT_ELLIPSOID9 9 |
788 | #define ELLIPSOID_ARC10 10 |
789 | #define HIGH_ACC_ELLIPSOID_PNT_WITH_UNCERT_ELLIPSE11 11 |
790 | #define HIGH_ACC_ELLIPSOID_PNT_WITH_ALT_AND_UNCERT_ELLIPSOID12 12 |
791 | #define HIGH_ACC_ELLIPSOID_PNT_WITH_SCALABLE_UNCERT_ELLIPSE13 13 |
792 | #define HIGH_ACC_ELLIPSOID_PNT_WITH_ALT_AND_SCALABLE_UNCERT_ELLIPSOID14 14 |
793 | /* |
794 | 4 3 2 1 |
795 | 0 0 0 0 Ellipsoid Point |
796 | 0 0 0 1 Ellipsoid point with uncertainty Circle |
797 | 0 0 1 1 Ellipsoid point with uncertainty Ellipse |
798 | 0 1 0 1 Polygon |
799 | 1 0 0 0 Ellipsoid point with altitude |
800 | 1 0 0 1 Ellipsoid point with altitude and uncertainty Ellipsoid |
801 | 1 0 1 0 Ellipsoid Arc |
802 | 1 0 1 1 High Accuracy Ellipsoid point with uncertainty ellipse |
803 | 1 1 0 0 High Accuracy Ellipsoid point with altitude and uncertainty ellipsoid |
804 | 1 1 0 1 High Accuracy Ellipsoid point with scalable uncertainty ellipse |
805 | 1 1 1 0 High Accuracy Ellipsoid point with altitude and scalable uncertainty ellipsoid |
806 | other values reserved for future use |
807 | */ |
808 | |
809 | /* TS 23 032 Table 2a: Coding of Type of Shape */ |
810 | static const value_string type_of_shape_vals[] = { |
811 | { ELLIPSOID_POINT0, "Ellipsoid Point"}, |
812 | { ELLIPSOID_POINT_WITH_UNCERT_CIRC1, "Ellipsoid point with uncertainty Circle"}, |
813 | { ELLIPSOID_POINT_WITH_UNCERT_ELLIPSE3, "Ellipsoid point with uncertainty Ellipse"}, |
814 | { POLYGON5, "Polygon"}, |
815 | { ELLIPSOID_POINT_WITH_ALT8, "Ellipsoid point with altitude"}, |
816 | { ELLIPSOID_POINT_WITH_ALT_AND_UNCERT_ELLIPSOID9, "Ellipsoid point with altitude and uncertainty Ellipsoid"}, |
817 | { ELLIPSOID_ARC10, "Ellipsoid Arc"}, |
818 | { HIGH_ACC_ELLIPSOID_PNT_WITH_UNCERT_ELLIPSE11, "High Accuracy Ellipsoid point with uncertainty ellipse"}, |
819 | { HIGH_ACC_ELLIPSOID_PNT_WITH_ALT_AND_UNCERT_ELLIPSOID12, "High Accuracy Ellipsoid point with altitude and uncertainty ellipsoid"}, |
820 | { HIGH_ACC_ELLIPSOID_PNT_WITH_SCALABLE_UNCERT_ELLIPSE13, "High Accuracy Ellipsoid point with scalable uncertainty ellipse"}, |
821 | { HIGH_ACC_ELLIPSOID_PNT_WITH_ALT_AND_SCALABLE_UNCERT_ELLIPSOID14, "High Accuracy Ellipsoid point with altitude and scalable uncertainty ellipsoid"}, |
822 | { 0, NULL((void*)0) } |
823 | }; |
824 | |
825 | /* 3GPP TS 23.032 7.3.1 */ |
826 | static const value_string sign_of_latitude_vals[] = { |
827 | { 0, "North"}, |
828 | { 1, "South"}, |
829 | { 0, NULL((void*)0) } |
830 | }; |
831 | |
832 | static const value_string dir_of_alt_vals[] = { |
833 | { 0, "Altitude expresses height"}, |
834 | { 1, "Altitude expresses depth"}, |
835 | { 0, NULL((void*)0) } |
836 | }; |
837 | |
838 | static const value_string uncertainty_range[] = { |
839 | { 0, "High Accuracy default uncertainty range used"}, |
840 | { 1, "High Accuracy Extended Uncertainty Range used"}, |
841 | { 0, NULL((void*)0) } |
842 | }; |
843 | |
844 | typedef uint16_t (**elem_func_hander)(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string, int string_len); |
845 | |
846 | int |
847 | dissect_geographical_description(tvbuff_t *tvb, packet_info *pinfo _U___attribute__((unused)), proto_tree *tree) { |
848 | |
849 | proto_item *lat_item, *long_item, *major_item, *minor_item, *orientation_item, *alt_item, *uncer_item, *loc_uri_item; |
850 | /*proto_tree *subtree; */ |
851 | uint32_t type_of_shape; |
852 | int offset = 0; |
853 | int length; |
854 | uint8_t value; |
855 | uint32_t uvalue32; |
856 | int32_t svalue32; |
857 | char *deg_lat_str; |
858 | char *deg_lon_str; |
859 | char *osm_uri; |
860 | int loc_offset; |
861 | |
862 | /*subtree = proto_item_add_subtree(item, ett_gsm_a_geo_desc);*/ |
863 | |
864 | length = tvb_reported_length_remaining(tvb, 0); |
865 | /* Geographical Location |
866 | * The Location Estimate field is composed of 1 or more octets with an internal structure |
867 | * according to section 7 in [23.032]. |
868 | */ |
869 | proto_tree_add_item_ret_uint(tree, hf_gsm_a_geo_loc_type_of_shape, tvb, 0, 1, ENC_BIG_ENDIAN0x00000000, &type_of_shape); |
870 | offset++; |
871 | if (length < 2) { |
872 | return length; |
873 | } |
874 | switch (type_of_shape) { |
875 | case ELLIPSOID_POINT0: |
876 | /* Ellipsoid Point */ |
877 | case ELLIPSOID_POINT_WITH_UNCERT_CIRC1: |
878 | /* Ellipsoid Point with uncertainty Circle */ |
879 | case ELLIPSOID_POINT_WITH_UNCERT_ELLIPSE3: |
880 | /* Ellipsoid Point with uncertainty Ellipse */ |
881 | case ELLIPSOID_POINT_WITH_ALT8: |
882 | /* Ellipsoid Point with Altitude */ |
883 | case ELLIPSOID_POINT_WITH_ALT_AND_UNCERT_ELLIPSOID9: |
884 | /* Ellipsoid Point with altitude and uncertainty ellipsoid */ |
885 | case ELLIPSOID_ARC10: |
886 | /* Ellipsoid Arc */ |
887 | if (length < 4) |
888 | return length; |
889 | proto_tree_add_item(tree, hf_gsm_a_geo_loc_sign_of_lat, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000); |
890 | |
891 | uvalue32 = tvb_get_ntoh24(tvb,offset); |
892 | /* convert degrees (X/0x7fffff) * 90 = degrees */ |
893 | lat_item = proto_tree_add_item(tree, hf_gsm_a_geo_loc_deg_of_lat, tvb, offset, 3, ENC_BIG_ENDIAN0x00000000); |
894 | deg_lat_str = wmem_strdup_printf(pinfo->pool, "%s%.5f", |
895 | (uvalue32 & 0x00800000) ? "-" : "", |
896 | ((double)(uvalue32 & 0x7fffff)/8388607.0) * 90); |
897 | proto_item_append_text(lat_item, " (%s degrees)", deg_lat_str); |
898 | loc_offset = offset; |
899 | offset = offset + 3; |
900 | if (length < 7) |
901 | return offset; |
902 | svalue32 = tvb_get_ntoh24(tvb,offset); |
903 | svalue32 |= (svalue32 & 0x800000) ? 0xff000000 : 0x00000000; |
904 | long_item = proto_tree_add_item(tree, hf_gsm_a_geo_loc_deg_of_long, tvb, offset, 3, ENC_BIG_ENDIAN0x00000000); |
905 | /* (X/0xffffff) *360 = degrees */ |
906 | deg_lon_str = wmem_strdup_printf(pinfo->pool, "%.5f", |
907 | ((double)svalue32/16777215.0) * 360); |
908 | proto_item_append_text(long_item, " (%s degrees)", deg_lon_str); |
909 | offset = offset + 3; |
910 | if (type_of_shape == ELLIPSOID_POINT_WITH_UNCERT_CIRC1) { |
911 | /* Ellipsoid Point with uncertainty Circle */ |
912 | if (length < 8) |
913 | return offset; |
914 | /* Uncertainty code */ |
915 | value = tvb_get_uint8(tvb,offset)&0x7f; |
916 | uncer_item = proto_tree_add_item(tree, hf_gsm_a_geo_loc_uncertainty_code, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000); |
917 | proto_item_append_text(uncer_item, " (%.1f m)", 10 * (pow(1.1, (double)value) - 1)); |
918 | }else if (type_of_shape == ELLIPSOID_POINT_WITH_UNCERT_ELLIPSE3) { |
919 | /* Ellipsoid Point with uncertainty Ellipse */ |
920 | /* Uncertainty semi-major octet 10 |
921 | * To convert to metres 10*(((1.1)^X)-1) |
922 | */ |
923 | value = tvb_get_uint8(tvb,offset) & 0x7f; |
924 | major_item = proto_tree_add_item(tree, hf_gsm_a_geo_loc_uncertainty_semi_major, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000); |
925 | proto_item_append_text(major_item, " (%.1f m)", 10 * (pow(1.1, (double)value) - 1)); |
926 | offset++; |
927 | /* Uncertainty semi-minor Octet 11 |
928 | * To convert to metres 10*(((1.1)^X)-1) |
929 | */ |
930 | value = tvb_get_uint8(tvb,offset)&0x7f; |
931 | minor_item = proto_tree_add_item(tree, hf_gsm_a_geo_loc_uncertainty_semi_minor, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000); |
932 | proto_item_append_text(minor_item, " (%.1f m)", 10 * (pow(1.1, (double)value) - 1)); |
933 | offset++; |
934 | /* TS 23.032 V15.1.0 (2018-09) |
935 | * Orientation of major axis octet 12 |
936 | * allowed value from 0-179 |
937 | */ |
938 | orientation_item = proto_tree_add_item_ret_uint(tree, hf_gsm_a_geo_loc_orientation_of_major_axis, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &uvalue32); |
939 | proto_item_append_text(orientation_item, " (%d degrees)", 2 * uvalue32); |
940 | offset++; |
941 | /* Confidence */ |
942 | proto_tree_add_item(tree, hf_gsm_a_geo_loc_confidence, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000); |
943 | offset++; |
944 | }else if (type_of_shape == ELLIPSOID_POINT_WITH_ALT8) { |
945 | /* Ellipsoid Point with Altitude */ |
946 | /*D: Direction of Altitude */ |
947 | proto_tree_add_item(tree, hf_gsm_a_geo_loc_D, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000); |
948 | /* Altitude */ |
949 | proto_tree_add_item(tree, hf_gsm_a_geo_loc_altitude, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000); |
950 | }else if (type_of_shape == ELLIPSOID_POINT_WITH_ALT_AND_UNCERT_ELLIPSOID9) { |
951 | /* Ellipsoid Point with altitude and uncertainty ellipsoid */ |
952 | /*D: Direction of Altitude octet 8,9 */ |
953 | proto_tree_add_item(tree, hf_gsm_a_geo_loc_D, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000); |
954 | /* Altitude Octet 8,9*/ |
955 | proto_tree_add_item(tree, hf_gsm_a_geo_loc_altitude, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000); |
956 | offset = offset +2; |
957 | /* Uncertainty semi-major octet 10 |
958 | * To convert to metres 10*(((1.1)^X)-1) |
959 | */ |
960 | value = tvb_get_uint8(tvb,offset)&0x7f; |
961 | major_item = proto_tree_add_item(tree, hf_gsm_a_geo_loc_uncertainty_semi_major, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000); |
962 | proto_item_append_text(major_item, " (%.1f m)", 10 * (pow(1.1, (double)value) - 1)); |
963 | offset++; |
964 | /* Uncertainty semi-minor Octet 11 |
965 | * To convert to metres 10*(((1.1)^X)-1) |
966 | */ |
967 | value = tvb_get_uint8(tvb,offset)&0x7f; |
968 | minor_item = proto_tree_add_item(tree, hf_gsm_a_geo_loc_uncertainty_semi_minor, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000); |
969 | proto_item_append_text(minor_item, " (%.1f m)", 10 * (pow(1.1, (double)value) - 1)); |
970 | offset++; |
971 | /* Orientation of major axis octet 12 |
972 | * allowed value from 0-179 to convert |
973 | * to actual degrees multiply by 2. |
974 | */ |
975 | orientation_item = proto_tree_add_item_ret_uint(tree, hf_gsm_a_geo_loc_orientation_of_major_axis, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &uvalue32); |
976 | proto_item_append_text(orientation_item, " (%d degrees)", 2 * uvalue32); |
977 | offset++; |
978 | /* Uncertainty Altitude 13 |
979 | * to convert to metres 45*(((1.025)^X)-1) |
980 | */ |
981 | value = tvb_get_uint8(tvb,offset)&0x7f; |
982 | alt_item = proto_tree_add_item(tree, hf_gsm_a_geo_loc_uncertainty_altitude, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000); |
983 | proto_item_append_text(alt_item, " (%.1f m)", 45 * (pow(1.025, (double)value) - 1)); |
984 | offset++; |
985 | /* Confidence octet 14 |
986 | */ |
987 | proto_tree_add_item(tree, hf_gsm_a_geo_loc_confidence, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000); |
988 | }else if (type_of_shape == ELLIPSOID_ARC10) { |
989 | /* Ellipsoid Arc */ |
990 | /* Inner radius */ |
991 | proto_tree_add_item(tree, hf_gsm_a_geo_loc_inner_radius, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000); |
992 | offset = offset + 2; |
993 | /* Uncertainty radius */ |
994 | proto_tree_add_item(tree, hf_gsm_a_geo_loc_uncertainty_radius, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000); |
995 | offset++; |
996 | /* Offset angle */ |
997 | proto_tree_add_item(tree, hf_gsm_a_geo_loc_offset_angle, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000); |
998 | offset++; |
999 | /* Included angle */ |
1000 | proto_tree_add_item(tree, hf_gsm_a_geo_loc_included_angle, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000); |
1001 | offset++; |
1002 | /* Confidence */ |
1003 | proto_tree_add_item(tree, hf_gsm_a_geo_loc_confidence, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000); |
1004 | } |
1005 | osm_uri = wmem_strdup_printf(pinfo->pool, "https://www.openstreetmap.org/?mlat=%s&mlon=%s&zoom=12", deg_lat_str, deg_lon_str); |
1006 | loc_uri_item = proto_tree_add_string(tree, hf_gsm_a_geo_loc_osm_uri, tvb, loc_offset, 6, osm_uri); |
1007 | proto_item_set_url(loc_uri_item); |
1008 | proto_item_set_generated(loc_uri_item); |
1009 | |
1010 | break; |
1011 | case POLYGON5: /* Polygon */ |
1012 | { |
1013 | /* Number of points */ |
1014 | uint32_t no_of_points; |
1015 | unsigned point_no = 0; |
1016 | proto_tree* sub_tree; |
1017 | proto_item *ti; |
1018 | |
1019 | proto_tree_add_item_ret_uint(tree, hf_gsm_a_geo_loc_no_of_points, tvb, 0, 1, ENC_BIG_ENDIAN0x00000000, &no_of_points); |
1020 | /* offset increased with 1 after reading of shape above */ |
1021 | while (no_of_points > 0) { |
1022 | point_no++; |
1023 | sub_tree = proto_tree_add_subtree_format(tree, tvb, offset, 6, |
1024 | ett_gsm_a_poly_pnt, &ti, "Polygon point %u", point_no); |
1025 | proto_tree_add_item(sub_tree, hf_gsm_a_geo_loc_sign_of_lat, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000); |
1026 | |
1027 | uvalue32 = tvb_get_ntoh24(tvb, offset); |
1028 | /* convert degrees (X/0x7fffff) * 90 = degrees */ |
1029 | lat_item = proto_tree_add_item(sub_tree, hf_gsm_a_geo_loc_deg_of_lat, tvb, offset, 3, ENC_BIG_ENDIAN0x00000000); |
1030 | deg_lat_str = wmem_strdup_printf(pinfo->pool, "%s%.5f", |
1031 | (uvalue32 & 0x00800000) ? "-" : "", |
1032 | ((double)(uvalue32 & 0x7fffff) / 8388607.0) * 90); |
1033 | proto_item_append_text(lat_item, " (%s degrees)", deg_lat_str); |
1034 | loc_offset = offset; |
1035 | offset = offset + 3; |
1036 | svalue32 = tvb_get_ntoh24(tvb, offset); |
1037 | svalue32 |= (svalue32 & 0x800000) ? 0xff000000 : 0x00000000; |
1038 | long_item = proto_tree_add_item(sub_tree, hf_gsm_a_geo_loc_deg_of_long, tvb, offset, 3, ENC_BIG_ENDIAN0x00000000); |
1039 | /* (X/0xffffff) *360 = degrees */ |
1040 | deg_lon_str = wmem_strdup_printf(pinfo->pool, "%.5f", |
1041 | ((double)svalue32 / 16777215.0) * 360); |
1042 | proto_item_append_text(long_item, " (%s degrees)", deg_lon_str); |
1043 | offset = offset + 3; |
1044 | no_of_points--; |
1045 | |
1046 | osm_uri = wmem_strdup_printf(pinfo->pool, "https://www.openstreetmap.org/?mlat=%s&mlon=%s&zoom=12", deg_lat_str, deg_lon_str); |
1047 | loc_uri_item = proto_tree_add_string(tree, hf_gsm_a_geo_loc_osm_uri, tvb, loc_offset, 6, osm_uri); |
1048 | proto_item_set_url(loc_uri_item); |
1049 | proto_item_set_generated(loc_uri_item); |
1050 | } |
1051 | } |
1052 | break; |
1053 | case HIGH_ACC_ELLIPSOID_PNT_WITH_UNCERT_ELLIPSE11: |
1054 | case HIGH_ACC_ELLIPSOID_PNT_WITH_SCALABLE_UNCERT_ELLIPSE13: |
1055 | loc_offset = offset; |
1056 | lat_item = proto_tree_add_item_ret_int(tree, hf_gsm_a_geo_loc_high_acc_deg_of_lat, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000, &svalue32); |
1057 | deg_lat_str = wmem_strdup_printf(pinfo->pool, "%s%.5f", |
1058 | (svalue32 & 0x80000000) ? "-" : "", |
1059 | ((double)(svalue32 & 0x7fffffff) / 2147483647.0) * 90); |
1060 | proto_item_append_text(lat_item, " (%s degrees)", deg_lat_str); |
1061 | offset += 4; |
1062 | long_item = proto_tree_add_item_ret_int(tree, hf_gsm_a_geo_loc_high_acc_deg_of_long, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000, &svalue32); |
1063 | deg_lon_str = wmem_strdup_printf(pinfo->pool, "%s%.5f", |
1064 | (svalue32 & 0x80000000) ? "-" : "", |
1065 | ((double)svalue32 / 2147483647.0) * 180); |
1066 | proto_item_append_text(long_item, " (%s degrees)", deg_lon_str); |
1067 | |
1068 | offset += 4; |
1069 | /* High accuracy uncertainty semi-major*/ |
1070 | major_item = proto_tree_add_item_ret_uint(tree, hf_gsm_a_geo_loc_high_acc_uncertainty_semi_major, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &uvalue32); |
1071 | proto_item_append_text(major_item, " (%.5f m)", 0.3 * (pow(1.02, (double)uvalue32) - 1)); |
1072 | offset++; |
1073 | /* High accuracy uncertainty semi-minor*/ |
1074 | minor_item = proto_tree_add_item_ret_uint(tree, hf_gsm_a_geo_loc_high_acc_uncertainty_semi_minor, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &uvalue32); |
1075 | proto_item_append_text(minor_item, " (%.5f m)", 0.3 * (pow(1.02, (double)uvalue32) - 1)); |
1076 | offset++; |
1077 | /* Orientation of major axis */ |
1078 | value = tvb_get_uint8(tvb,offset)&0x7f; |
Value stored to 'value' is never read | |
1079 | orientation_item = proto_tree_add_item_ret_uint(tree, hf_gsm_a_geo_loc_orientation_of_major_axis, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &uvalue32); |
1080 | proto_item_append_text(orientation_item, " (%d degrees)", 2 * uvalue32); |
1081 | offset++; |
1082 | /* Confidence */ |
1083 | proto_tree_add_item(tree, hf_gsm_a_geo_loc_confidence, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000); |
1084 | if (type_of_shape == HIGH_ACC_ELLIPSOID_PNT_WITH_SCALABLE_UNCERT_ELLIPSE13) { |
1085 | /* Uncertainty Range */ |
1086 | proto_tree_add_item(tree, hf_gsm_a_geo_loc_uncertainty_range, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000); |
1087 | } |
1088 | offset++; |
1089 | |
1090 | osm_uri = wmem_strdup_printf(pinfo->pool, "https://www.openstreetmap.org/?mlat=%s&mlon=%s&zoom=12", deg_lat_str, deg_lon_str); |
1091 | loc_uri_item = proto_tree_add_string(tree, hf_gsm_a_geo_loc_osm_uri, tvb, loc_offset, 6, osm_uri); |
1092 | proto_item_set_url(loc_uri_item); |
1093 | proto_item_set_generated(loc_uri_item); |
1094 | |
1095 | break; |
1096 | case HIGH_ACC_ELLIPSOID_PNT_WITH_ALT_AND_UNCERT_ELLIPSOID12: |
1097 | case HIGH_ACC_ELLIPSOID_PNT_WITH_ALT_AND_SCALABLE_UNCERT_ELLIPSOID14: |
1098 | lat_item = proto_tree_add_item_ret_int(tree, hf_gsm_a_geo_loc_high_acc_deg_of_lat, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000, &svalue32); |
1099 | deg_lat_str = wmem_strdup_printf(pinfo->pool, "%s%.5f", |
1100 | (svalue32 & 0x80000000) ? "-" : "", |
1101 | ((double)(svalue32 & 0x7fffffff) / 2147483647.0) * 90); |
1102 | proto_item_append_text(lat_item, " (%s degrees)", deg_lat_str); |
1103 | offset += 4; |
1104 | long_item = proto_tree_add_item_ret_int(tree, hf_gsm_a_geo_loc_high_acc_deg_of_long, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000, &svalue32); |
1105 | deg_lon_str = wmem_strdup_printf(pinfo->pool, "%s%.5f", |
1106 | (svalue32 & 0x80000000) ? "-" : "", |
1107 | ((double)svalue32 / 2147483647.0) * 180); |
1108 | proto_item_append_text(long_item, " (%s degrees)", deg_lon_str); |
1109 | offset += 4; |
1110 | |
1111 | /* High accuracy altitude |
1112 | * High accuracy altitude is encoded as a number N between -64000 and 1280000 using 2's complement binary on 22 bits. |
1113 | */ |
1114 | |
1115 | alt_item = proto_tree_add_item_ret_int(tree, hf_gsm_a_geo_loc_high_acc_alt, tvb, offset, 3, ENC_BIG_ENDIAN0x00000000, &svalue32); |
1116 | /* double z = pow(double x, double y);*/ |
1117 | proto_item_append_text(alt_item, " (%.1f m)", (double)svalue32 * pow(2,-7)); |
1118 | offset += 3; |
1119 | |
1120 | /* High accuracy uncertainty semi-major*/ |
1121 | major_item = proto_tree_add_item_ret_uint(tree, hf_gsm_a_geo_loc_high_acc_uncertainty_semi_major, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &uvalue32); |
1122 | proto_item_append_text(major_item, " (%.5f m)", 0.3 * (pow(1.02, (double)uvalue32) - 1)); |
1123 | offset++; |
1124 | /* High accuracy uncertainty semi-minor*/ |
1125 | minor_item = proto_tree_add_item_ret_uint(tree, hf_gsm_a_geo_loc_high_acc_uncertainty_semi_minor, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &uvalue32); |
1126 | proto_item_append_text(minor_item, " (%.5f m)", 0.3 * (pow(1.02, (double)uvalue32) - 1)); |
1127 | offset++; |
1128 | /* Orientation of major axis */ |
1129 | orientation_item = proto_tree_add_item_ret_uint(tree, hf_gsm_a_geo_loc_orientation_of_major_axis, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &uvalue32); |
1130 | proto_item_append_text(orientation_item, " (%d degrees)", 2 * uvalue32); |
1131 | offset++; |
1132 | |
1133 | /* Horizontal confidence */ |
1134 | proto_tree_add_item(tree, hf_gsm_a_geo_loc_horizontal_confidence, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000); |
1135 | if (type_of_shape == HIGH_ACC_ELLIPSOID_PNT_WITH_ALT_AND_SCALABLE_UNCERT_ELLIPSOID14) { |
1136 | /* Horizontal Uncertainty Range */ |
1137 | proto_tree_add_item(tree, hf_gsm_a_geo_loc_horizontal_uncertainty_range, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000); |
1138 | } |
1139 | offset++; |
1140 | |
1141 | /* High accuracy uncertainty altitude */ |
1142 | value = tvb_get_uint8(tvb, offset) & 0x7f; |
1143 | alt_item = proto_tree_add_item(tree, hf_gsm_a_geo_loc_high_acc_uncertainty_alt, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000); |
1144 | proto_item_append_text(alt_item, " (%.1f m)", 45 * (pow(1.025, (double)value) - 1)); |
1145 | offset++; |
1146 | |
1147 | /* Vertical confidence*/ |
1148 | proto_tree_add_item(tree, hf_gsm_a_geo_loc_vertical_confidence, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000); |
1149 | if (type_of_shape == HIGH_ACC_ELLIPSOID_PNT_WITH_ALT_AND_SCALABLE_UNCERT_ELLIPSOID14) { |
1150 | /* Vertical Uncertainty Range */ |
1151 | proto_tree_add_item(tree, hf_gsm_a_geo_loc_vertical_uncertainty_range, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000); |
1152 | } |
1153 | offset++; |
1154 | break; |
1155 | |
1156 | default: |
1157 | break; |
1158 | } |
1159 | return offset; |
1160 | } |
1161 | |
1162 | /* TS 23.032 |
1163 | * Ch. 8 Description of Velocity |
1164 | */ |
1165 | /* 8.6 Coding of Velocity Type */ |
1166 | static const value_string gsm_a_velocity_type_vals[] = { |
1167 | { 0, "Horizontal Velocity"}, |
1168 | { 1, "Horizontal with Vertical Velocity"}, |
1169 | { 2, "Horizontal Velocity with Uncertainty"}, |
1170 | { 3, "Horizontal with Vertical Velocity and Uncertainty"}, |
1171 | { 4, "reserved for future use"}, |
1172 | { 5, "reserved for future use"}, |
1173 | { 6, "reserved for future use"}, |
1174 | { 7, "reserved for future use"}, |
1175 | { 8, "reserved for future use"}, |
1176 | { 9, "reserved for future use"}, |
1177 | { 10, "reserved for future use"}, |
1178 | { 11, "reserved for future use"}, |
1179 | { 12, "reserved for future use"}, |
1180 | { 13, "reserved for future use"}, |
1181 | { 14, "reserved for future use"}, |
1182 | { 15, "reserved for future use"}, |
1183 | { 0, NULL((void*)0) } |
1184 | }; |
1185 | |
1186 | static const true_false_string gsm_a_dir_of_ver_speed_vals = { |
1187 | "Downward", |
1188 | "Upward" |
1189 | }; |
1190 | |
1191 | uint16_t |
1192 | dissect_description_of_velocity(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U___attribute__((unused)), uint32_t offset, unsigned len _U___attribute__((unused)), char *add_string _U___attribute__((unused)), int string_len _U___attribute__((unused))) |
1193 | { |
1194 | proto_item *velocity_item; |
1195 | uint32_t curr_offset; |
1196 | uint32_t velocity_type, uncertainty_speed = 0; |
1197 | |
1198 | curr_offset = offset; |
1199 | |
1200 | /* Bit 8 - 5 Velocity Type */ |
1201 | proto_tree_add_item_ret_uint(tree, hf_gsm_a_velocity_type, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000, &velocity_type); |
1202 | |
1203 | switch (velocity_type) { |
1204 | case 0: |
1205 | /* 8.12 Coding of Horizontal Velocity */ |
1206 | /* Spare bits */ |
1207 | proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset<<3)+4, 3, ENC_BIG_ENDIAN0x00000000); |
1208 | /* Bearing is encoded in increments of 1 degree measured clockwise from North using a 9 bit binary coded number N. */ |
1209 | proto_tree_add_bits_item(tree, hf_gsm_a_bearing, tvb, (curr_offset<<3)+7, 9, ENC_BIG_ENDIAN0x00000000); |
1210 | curr_offset += 2; |
1211 | /* Horizontal speed is encoded in increments of 1 kilometre per hour using a 16 bit binary coded number N. */ |
1212 | proto_tree_add_item(tree, hf_gsm_a_horizontal_speed, tvb, curr_offset, 2, ENC_BIG_ENDIAN0x00000000); |
1213 | curr_offset += 2; |
1214 | break; |
1215 | case 1: |
1216 | /* 8.13 Coding of Horizontal with Vertical Velocity */ |
1217 | /* Spare bits */ |
1218 | proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset<<3)+4, 2, ENC_BIG_ENDIAN0x00000000); |
1219 | /* D: Direction of Vertical Speed */ |
1220 | proto_tree_add_item(tree, hf_gsm_a_d, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000); |
1221 | /* Bearing is encoded in increments of 1 degree measured clockwise from North using a 9 bit binary coded number N. */ |
1222 | proto_tree_add_bits_item(tree, hf_gsm_a_bearing, tvb, (curr_offset<<3)+7, 9, ENC_BIG_ENDIAN0x00000000); |
1223 | curr_offset += 2; |
1224 | /* Horizontal speed is encoded in increments of 1 kilometre per hour using a 16 bit binary coded number N. */ |
1225 | proto_tree_add_item(tree, hf_gsm_a_horizontal_speed, tvb, curr_offset, 2, ENC_BIG_ENDIAN0x00000000); |
1226 | curr_offset += 2; |
1227 | /* Vertical Speed Octet 5 |
1228 | * Vertical speed is encoded in increments of 1 kilometre per hour using 8 bits giving a number N between 0 and 28-1. |
1229 | */ |
1230 | proto_tree_add_item(tree, hf_gsm_a_vertical_speed, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000); |
1231 | curr_offset++; |
1232 | break; |
1233 | case 2: |
1234 | /* 8.14 Coding of Horizontal Velocity with Uncertainty */ |
1235 | /* Spare bits */ |
1236 | proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset<<3)+4, 3, ENC_BIG_ENDIAN0x00000000); |
1237 | /* Bearing is encoded in increments of 1 degree measured clockwise from North using a 9 bit binary coded number N. */ |
1238 | proto_tree_add_bits_item(tree, hf_gsm_a_bearing, tvb, (curr_offset<<3)+7, 9, ENC_BIG_ENDIAN0x00000000); |
1239 | curr_offset += 2; |
1240 | /* Horizontal speed is encoded in increments of 1 kilometre per hour using a 16 bit binary coded number N. */ |
1241 | proto_tree_add_item(tree, hf_gsm_a_horizontal_speed, tvb, curr_offset, 2, ENC_BIG_ENDIAN0x00000000); |
1242 | curr_offset += 2; |
1243 | /* Uncertainty Speed Octet 5 |
1244 | * Uncertainty speed is encoded in increments of 1 kilometre per hour using an 8 bit binary coded number N. The value of |
1245 | * N gives the uncertainty speed except for N=255 which indicates that the uncertainty is not specified. |
1246 | */ |
1247 | velocity_item = proto_tree_add_item_ret_uint(tree, hf_gsm_a_uncertainty_speed, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000, &uncertainty_speed); |
1248 | if (uncertainty_speed == 255) { |
1249 | proto_item_append_text(velocity_item, " (not specified)"); |
1250 | } else { |
1251 | proto_item_append_text(velocity_item, "km/h"); |
1252 | } |
1253 | curr_offset++; |
1254 | break; |
1255 | case 3: |
1256 | /* 8.15 Coding of Horizontal with Vertical Velocity and Uncertainty */ |
1257 | /* Spare bits */ |
1258 | proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset<<3)+4, 2, ENC_BIG_ENDIAN0x00000000); |
1259 | /* D: Direction of Vertical Speed */ |
1260 | proto_tree_add_item(tree, hf_gsm_a_d, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000); |
1261 | /* Bearing is encoded in increments of 1 degree measured clockwise from North using a 9 bit binary coded number N. */ |
1262 | proto_tree_add_bits_item(tree, hf_gsm_a_bearing, tvb, (curr_offset<<3)+7, 9, ENC_BIG_ENDIAN0x00000000); |
1263 | curr_offset += 2; |
1264 | /* Horizontal speed is encoded in increments of 1 kilometre per hour using a 16 bit binary coded number N. */ |
1265 | proto_tree_add_item(tree, hf_gsm_a_horizontal_speed, tvb, curr_offset, 2, ENC_BIG_ENDIAN0x00000000); |
1266 | curr_offset += 2; |
1267 | /* Vertical Speed Octet 5 |
1268 | * Vertical speed is encoded in increments of 1 kilometre per hour using 8 bits giving a number N between 0 and 28-1. |
1269 | */ |
1270 | proto_tree_add_item(tree, hf_gsm_a_vertical_speed, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000); |
1271 | curr_offset++; |
1272 | |
1273 | /* Horizontal Uncertainty Speed Octet 6 */ |
1274 | velocity_item = proto_tree_add_item_ret_uint(tree, hf_gsm_a_h_uncertainty_speed, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000, &uncertainty_speed); |
1275 | if (uncertainty_speed == 255) { |
1276 | proto_item_append_text(velocity_item, " (not specified)"); |
1277 | } else { |
1278 | proto_item_append_text(velocity_item, "km/h"); |
1279 | } |
1280 | curr_offset++; |
1281 | |
1282 | /* Vertical Uncertainty Speed Octet 7 */ |
1283 | velocity_item = proto_tree_add_item_ret_uint(tree, hf_gsm_a_v_uncertainty_speed, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000, &uncertainty_speed); |
1284 | if (uncertainty_speed == 255) { |
1285 | proto_item_append_text(velocity_item, " (not specified)"); |
1286 | } else { |
1287 | proto_item_append_text(velocity_item, "km/h"); |
1288 | } |
1289 | curr_offset++; |
1290 | break; |
1291 | default: |
1292 | break; |
1293 | } |
1294 | |
1295 | return (curr_offset - offset); |
1296 | } |
1297 | |
1298 | const char* get_gsm_a_msg_string(int pdu_type, int idx) |
1299 | { |
1300 | const char *msg_string = NULL((void*)0); |
1301 | |
1302 | switch (pdu_type) { |
1303 | case GSM_A_PDU_TYPE_BSSMAP0: |
1304 | msg_string = val_to_str_ext(idx, &gsm_bssmap_elem_strings_ext, "GSM_A_PDU_TYPE_BSSMAP (%u)"); |
1305 | break; |
1306 | case GSM_A_PDU_TYPE_DTAP1: |
1307 | msg_string = val_to_str_ext(idx, &gsm_dtap_elem_strings_ext, "GSM_A_PDU_TYPE_DTAP (%u)"); |
1308 | break; |
1309 | case GSM_A_PDU_TYPE_RP2: |
1310 | msg_string = val_to_str_ext(idx, &gsm_rp_elem_strings_ext, "GSM_A_PDU_TYPE_RP (%u)"); |
1311 | break; |
1312 | case GSM_A_PDU_TYPE_RR3: |
1313 | msg_string = val_to_str_ext(idx, &gsm_rr_elem_strings_ext, "GSM_A_PDU_TYPE_RR (%u)"); |
1314 | break; |
1315 | case GSM_A_PDU_TYPE_COMMON4: |
1316 | msg_string = val_to_str_ext(idx, &gsm_common_elem_strings_ext, "GSM_A_PDU_TYPE_COMMON (%u)"); |
1317 | break; |
1318 | case GSM_A_PDU_TYPE_GM5: |
1319 | msg_string = val_to_str_ext(idx, &gsm_gm_elem_strings_ext, "GSM_A_PDU_TYPE_GM (%u)"); |
1320 | break; |
1321 | case GSM_A_PDU_TYPE_BSSLAP6: |
1322 | msg_string = val_to_str_ext(idx, &gsm_bsslap_elem_strings_ext, "GSM_A_PDU_TYPE_BSSLAP (%u)"); |
1323 | break; |
1324 | case GSM_PDU_TYPE_BSSMAP_LE8: |
1325 | msg_string = val_to_str_ext(idx, &gsm_bssmap_le_elem_strings_ext, "GSM_PDU_TYPE_BSSMAP_LE (%u)"); |
1326 | break; |
1327 | case NAS_PDU_TYPE_COMMON9: |
1328 | msg_string = val_to_str_ext(idx, &nas_eps_common_elem_strings_ext, "NAS_PDU_TYPE_COMMON (%u)"); |
1329 | break; |
1330 | case NAS_PDU_TYPE_EMM10: |
1331 | msg_string = val_to_str_ext(idx, &nas_emm_elem_strings_ext, "NAS_PDU_TYPE_EMM (%u)"); |
1332 | break; |
1333 | case NAS_PDU_TYPE_ESM11: |
1334 | msg_string = val_to_str_ext(idx, &nas_esm_elem_strings_ext, "NAS_PDU_TYPE_ESM (%u)"); |
1335 | break; |
1336 | case SGSAP_PDU_TYPE12: |
1337 | msg_string = val_to_str_ext(idx, &sgsap_elem_strings_ext, "SGSAP_PDU_TYPE (%u)"); |
1338 | break; |
1339 | case BSSGP_PDU_TYPE13: |
1340 | msg_string = val_to_str_ext(idx, &bssgp_elem_strings_ext, "BSSGP_PDU_TYPE (%u)"); |
1341 | break; |
1342 | case GMR1_IE_COMMON14: |
1343 | msg_string = val_to_str_ext(idx, &gmr1_ie_common_strings_ext, "GMR1_IE_COMMON (%u)"); |
1344 | break; |
1345 | case GMR1_IE_RR15: |
1346 | msg_string = val_to_str_ext(idx, &gmr1_ie_rr_strings_ext, "GMR1_IE_RR (%u)"); |
1347 | break; |
1348 | case NAS_5GS_PDU_TYPE_COMMON16: |
1349 | msg_string = val_to_str_ext(idx, &nas_5gs_common_elem_strings_ext, "NAS_5GS_PDU_TYPE_COMMON (%u)"); |
1350 | break; |
1351 | case NAS_5GS_PDU_TYPE_MM17: |
1352 | msg_string = val_to_str_ext(idx, &nas_5gs_mm_elem_strings_ext, "NAS_5GS_PDU_TYPE_MM (%u)"); |
1353 | break; |
1354 | case NAS_5GS_PDU_TYPE_SM18: |
1355 | msg_string = val_to_str_ext(idx, &nas_5gs_sm_elem_strings_ext, "NAS_5GS_PDU_TYPE_SM (%u)"); |
1356 | break; |
1357 | case NAS_5GS_PDU_TYPE_UPDP19: |
1358 | msg_string = val_to_str_ext(idx, &nas_5gs_updp_elem_strings_ext, "NAS_5GS_PDU_TYPE_UPDP (%u)"); |
1359 | break; |
1360 | default: |
1361 | DISSECTOR_ASSERT_NOT_REACHED()(proto_report_dissector_bug("%s:%u: failed assertion \"DISSECTOR_ASSERT_NOT_REACHED\"" , "epan/dissectors/packet-gsm_a_common.c", 1361)); |
1362 | } |
1363 | |
1364 | return msg_string; |
1365 | } |
1366 | |
1367 | static int get_hf_elem_id(int pdu_type) |
1368 | { |
1369 | int hf_elem_id = 0; |
1370 | |
1371 | switch (pdu_type) { |
1372 | case GSM_A_PDU_TYPE_BSSMAP0: |
1373 | hf_elem_id = hf_gsm_a_bssmap_elem_id; |
1374 | break; |
1375 | case GSM_A_PDU_TYPE_DTAP1: |
1376 | hf_elem_id = hf_gsm_a_dtap_elem_id; |
1377 | break; |
1378 | case GSM_A_PDU_TYPE_RP2: |
1379 | hf_elem_id = hf_gsm_a_rp_elem_id; |
1380 | break; |
1381 | case GSM_A_PDU_TYPE_RR3: |
1382 | hf_elem_id = hf_gsm_a_rr_elem_id; |
1383 | break; |
1384 | case GSM_A_PDU_TYPE_COMMON4: |
1385 | hf_elem_id = hf_gsm_a_common_elem_id; |
1386 | break; |
1387 | case GSM_A_PDU_TYPE_GM5: |
1388 | hf_elem_id = hf_gsm_a_gm_elem_id; |
1389 | break; |
1390 | case GSM_A_PDU_TYPE_BSSLAP6: |
1391 | hf_elem_id = hf_gsm_a_bsslap_elem_id; |
1392 | break; |
1393 | case GSM_PDU_TYPE_BSSMAP_LE8: |
1394 | hf_elem_id = hf_gsm_bssmap_le_elem_id; |
1395 | break; |
1396 | case NAS_PDU_TYPE_COMMON9: |
1397 | hf_elem_id = hf_nas_eps_common_elem_id; |
1398 | break; |
1399 | case NAS_PDU_TYPE_EMM10: |
1400 | hf_elem_id = hf_nas_eps_emm_elem_id; |
1401 | break; |
1402 | case NAS_PDU_TYPE_ESM11: |
1403 | hf_elem_id = hf_nas_eps_esm_elem_id; |
1404 | break; |
1405 | case SGSAP_PDU_TYPE12: |
1406 | hf_elem_id = hf_sgsap_elem_id; |
1407 | break; |
1408 | case BSSGP_PDU_TYPE13: |
1409 | hf_elem_id = hf_bssgp_elem_id; |
1410 | break; |
1411 | case GMR1_IE_COMMON14: |
1412 | case GMR1_IE_RR15: |
1413 | hf_elem_id = hf_gmr1_elem_id; |
1414 | break; |
1415 | case NAS_5GS_PDU_TYPE_COMMON16: |
1416 | hf_elem_id = hf_nas_5gs_common_elem_id; |
1417 | break; |
1418 | case NAS_5GS_PDU_TYPE_MM17: |
1419 | hf_elem_id = hf_nas_5gs_mm_elem_id; |
1420 | break; |
1421 | case NAS_5GS_PDU_TYPE_SM18: |
1422 | hf_elem_id = hf_nas_5gs_sm_elem_id; |
1423 | break; |
1424 | case NAS_5GS_PDU_TYPE_UPDP19: |
1425 | hf_elem_id = hf_nas_5gs_updp_elem_id; |
1426 | break; |
1427 | default: |
1428 | DISSECTOR_ASSERT_NOT_REACHED()(proto_report_dissector_bug("%s:%u: failed assertion \"DISSECTOR_ASSERT_NOT_REACHED\"" , "epan/dissectors/packet-gsm_a_common.c", 1428)); |
1429 | } |
1430 | |
1431 | return hf_elem_id; |
1432 | } |
1433 | |
1434 | /* |
1435 | * Type Length Value (TLV) element dissector |
1436 | */ |
1437 | uint16_t elem_tlv(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint8_t iei, int pdu_type, int idx, uint32_t offset, unsigned len _U___attribute__((unused)), const char *name_add) |
1438 | { |
1439 | uint8_t oct; |
1440 | uint16_t parm_len; |
1441 | uint8_t lengt_length = 1; |
1442 | uint16_t consumed; |
1443 | uint32_t curr_offset; |
1444 | proto_tree *subtree; |
1445 | proto_item *item; |
1446 | value_string_ext elem_names_ext; |
1447 | int *elem_ett; |
1448 | const char *elem_name; |
1449 | elem_func_hander elem_funcs; |
1450 | |
1451 | curr_offset = offset; |
1452 | consumed = 0; |
1453 | |
1454 | SET_ELEM_VARS(pdu_type, elem_names_ext, elem_ett, elem_funcs, &ei_gsm_a_unknown_pdu_type)switch (pdu_type) { case 0: elem_names_ext = gsm_bssmap_elem_strings_ext ; elem_ett = ett_gsm_bssmap_elem; elem_funcs = bssmap_elem_fcn ; break; case 1: elem_names_ext = gsm_dtap_elem_strings_ext; elem_ett = ett_gsm_dtap_elem; elem_funcs = dtap_elem_fcn; break; case 2: elem_names_ext = gsm_rp_elem_strings_ext; elem_ett = ett_gsm_rp_elem ; elem_funcs = rp_elem_fcn; break; case 3: elem_names_ext = gsm_rr_elem_strings_ext ; elem_ett = ett_gsm_rr_elem; elem_funcs = rr_elem_fcn; break ; case 4: elem_names_ext = gsm_common_elem_strings_ext; elem_ett = ett_gsm_common_elem; elem_funcs = common_elem_fcn; break; case 5: elem_names_ext = gsm_gm_elem_strings_ext; elem_ett = ett_gsm_gm_elem ; elem_funcs = gm_elem_fcn; break; case 6: elem_names_ext = gsm_bsslap_elem_strings_ext ; elem_ett = ett_gsm_bsslap_elem; elem_funcs = bsslap_elem_fcn ; break; case 8: elem_names_ext = gsm_bssmap_le_elem_strings_ext ; elem_ett = ett_gsm_bssmap_le_elem; elem_funcs = bssmap_le_elem_fcn ; break; case 9: elem_names_ext = nas_eps_common_elem_strings_ext ; elem_ett = ett_nas_eps_common_elem; elem_funcs = nas_eps_common_elem_fcn ; break; case 10: elem_names_ext = nas_emm_elem_strings_ext; elem_ett = ett_nas_eps_emm_elem; elem_funcs = emm_elem_fcn; break; case 11: elem_names_ext = nas_esm_elem_strings_ext; elem_ett = ett_nas_eps_esm_elem ; elem_funcs = esm_elem_fcn; break; case 12: elem_names_ext = sgsap_elem_strings_ext; elem_ett = ett_sgsap_elem; elem_funcs = sgsap_elem_fcn; break; case 13: elem_names_ext = bssgp_elem_strings_ext ; elem_ett = ett_bssgp_elem; elem_funcs = bssgp_elem_fcn; break ; case 14: elem_names_ext = gmr1_ie_common_strings_ext; elem_ett = ett_gmr1_ie_common; elem_funcs = gmr1_ie_common_func; break ; case 15: elem_names_ext = gmr1_ie_rr_strings_ext; elem_ett = ett_gmr1_ie_rr; elem_funcs = gmr1_ie_rr_func; break; case 16 : elem_names_ext = nas_5gs_common_elem_strings_ext; elem_ett = ett_nas_5gs_common_elem; elem_funcs = nas_5gs_common_elem_fcn ; break; case 17: elem_names_ext = nas_5gs_mm_elem_strings_ext ; elem_ett = ett_nas_5gs_mm_elem; elem_funcs = nas_5gs_mm_elem_fcn ; break; case 18: elem_names_ext = nas_5gs_sm_elem_strings_ext ; elem_ett = ett_nas_5gs_sm_elem; elem_funcs = nas_5gs_sm_elem_fcn ; break; case 19: elem_names_ext = nas_5gs_updp_elem_strings_ext ; elem_ett = ett_nas_5gs_updp_elem; elem_funcs = nas_5gs_updp_elem_fcn ; break; default: proto_tree_add_expert_format(tree, pinfo, & ei_gsm_a_unknown_pdu_type, tvb, curr_offset, -1, "Unknown PDU type (%u) gsm_a_common" , pdu_type); return(consumed); }; |
1455 | |
1456 | oct = tvb_get_uint8(tvb, curr_offset); |
1457 | |
1458 | if (oct == iei) { |
1459 | parm_len = tvb_get_uint8(tvb, curr_offset + 1); |
1460 | |
1461 | elem_name = try_val_to_str_ext(idx, &elem_names_ext); |
1462 | |
1463 | /* idx is out of range */ |
1464 | if (elem_name == NULL((void*)0)) { |
1465 | proto_tree_add_expert_format(tree, pinfo, &ei_gsm_a_unknown_element, |
1466 | tvb, curr_offset, parm_len + 1 + lengt_length, |
1467 | "Unknown - aborting dissection%s", (name_add == NULL((void*)0)) || (name_add[0] == '\0') ? "" : name_add); |
1468 | return consumed; |
1469 | } |
1470 | |
1471 | subtree = proto_tree_add_subtree_format(tree, tvb, curr_offset, parm_len + 1 + lengt_length, elem_ett[idx], &item, |
1472 | "%s%s", elem_name, (name_add == NULL((void*)0)) || (name_add[0] == '\0') ? "" : name_add); |
1473 | |
1474 | proto_tree_add_uint(subtree, |
1475 | get_hf_elem_id(pdu_type), tvb, |
1476 | curr_offset, 1, oct); |
1477 | |
1478 | proto_tree_add_uint(subtree, hf_gsm_a_length, tvb, |
1479 | curr_offset + 1, lengt_length, parm_len); |
1480 | |
1481 | if (parm_len > 0) |
1482 | { |
1483 | if (elem_funcs[idx] == NULL((void*)0)) |
1484 | { |
1485 | proto_tree_add_item(subtree, hf_gsm_a_element_value, tvb, curr_offset + 1 + lengt_length, parm_len, ENC_NA0x00000000); |
1486 | /* See ASSERT above */ |
1487 | consumed = (uint8_t)parm_len; |
1488 | } |
1489 | else |
1490 | { |
1491 | char *a_add_string; |
1492 | |
1493 | a_add_string = (char *)wmem_alloc(pinfo->pool, 1024); |
1494 | a_add_string[0] = '\0'; |
1495 | consumed = |
1496 | (*elem_funcs[idx])(tvb, subtree, pinfo, curr_offset + 2, |
1497 | parm_len, a_add_string, 1024); |
1498 | |
1499 | if (a_add_string[0] != '\0') |
1500 | { |
1501 | proto_item_append_text(item, "%s", a_add_string); |
1502 | } |
1503 | } |
1504 | } |
1505 | |
1506 | consumed += 1 + lengt_length; |
1507 | } |
1508 | |
1509 | return consumed; |
1510 | } |
1511 | |
1512 | /* |
1513 | * Type Extendable Length Value (TELV) element dissector |
1514 | * This is a version where the length field can be one or two octets depending |
1515 | * if the extension bit is set or not (TS 48.016 p 10.1.2). |
1516 | * 8 7 6 5 4 3 2 1 |
1517 | * octet 2 0/1 ext length |
1518 | * octet 2a length |
1519 | */ |
1520 | uint16_t elem_telv(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint8_t iei, int pdu_type, int idx, uint32_t offset, unsigned len _U___attribute__((unused)), const char *name_add) |
1521 | { |
1522 | uint8_t oct; |
1523 | uint16_t parm_len; |
1524 | uint8_t lengt_length = 1; |
1525 | uint16_t consumed; |
1526 | uint32_t curr_offset; |
1527 | proto_tree *subtree; |
1528 | proto_item *item; |
1529 | value_string_ext elem_names_ext; |
1530 | int *elem_ett; |
1531 | const char *elem_name; |
1532 | elem_func_hander elem_funcs; |
1533 | |
1534 | curr_offset = offset; |
1535 | consumed = 0; |
1536 | |
1537 | SET_ELEM_VARS(pdu_type, elem_names_ext, elem_ett, elem_funcs, &ei_gsm_a_unknown_pdu_type)switch (pdu_type) { case 0: elem_names_ext = gsm_bssmap_elem_strings_ext ; elem_ett = ett_gsm_bssmap_elem; elem_funcs = bssmap_elem_fcn ; break; case 1: elem_names_ext = gsm_dtap_elem_strings_ext; elem_ett = ett_gsm_dtap_elem; elem_funcs = dtap_elem_fcn; break; case 2: elem_names_ext = gsm_rp_elem_strings_ext; elem_ett = ett_gsm_rp_elem ; elem_funcs = rp_elem_fcn; break; case 3: elem_names_ext = gsm_rr_elem_strings_ext ; elem_ett = ett_gsm_rr_elem; elem_funcs = rr_elem_fcn; break ; case 4: elem_names_ext = gsm_common_elem_strings_ext; elem_ett = ett_gsm_common_elem; elem_funcs = common_elem_fcn; break; case 5: elem_names_ext = gsm_gm_elem_strings_ext; elem_ett = ett_gsm_gm_elem ; elem_funcs = gm_elem_fcn; break; case 6: elem_names_ext = gsm_bsslap_elem_strings_ext ; elem_ett = ett_gsm_bsslap_elem; elem_funcs = bsslap_elem_fcn ; break; case 8: elem_names_ext = gsm_bssmap_le_elem_strings_ext ; elem_ett = ett_gsm_bssmap_le_elem; elem_funcs = bssmap_le_elem_fcn ; break; case 9: elem_names_ext = nas_eps_common_elem_strings_ext ; elem_ett = ett_nas_eps_common_elem; elem_funcs = nas_eps_common_elem_fcn ; break; case 10: elem_names_ext = nas_emm_elem_strings_ext; elem_ett = ett_nas_eps_emm_elem; elem_funcs = emm_elem_fcn; break; case 11: elem_names_ext = nas_esm_elem_strings_ext; elem_ett = ett_nas_eps_esm_elem ; elem_funcs = esm_elem_fcn; break; case 12: elem_names_ext = sgsap_elem_strings_ext; elem_ett = ett_sgsap_elem; elem_funcs = sgsap_elem_fcn; break; case 13: elem_names_ext = bssgp_elem_strings_ext ; elem_ett = ett_bssgp_elem; elem_funcs = bssgp_elem_fcn; break ; case 14: elem_names_ext = gmr1_ie_common_strings_ext; elem_ett = ett_gmr1_ie_common; elem_funcs = gmr1_ie_common_func; break ; case 15: elem_names_ext = gmr1_ie_rr_strings_ext; elem_ett = ett_gmr1_ie_rr; elem_funcs = gmr1_ie_rr_func; break; case 16 : elem_names_ext = nas_5gs_common_elem_strings_ext; elem_ett = ett_nas_5gs_common_elem; elem_funcs = nas_5gs_common_elem_fcn ; break; case 17: elem_names_ext = nas_5gs_mm_elem_strings_ext ; elem_ett = ett_nas_5gs_mm_elem; elem_funcs = nas_5gs_mm_elem_fcn ; break; case 18: elem_names_ext = nas_5gs_sm_elem_strings_ext ; elem_ett = ett_nas_5gs_sm_elem; elem_funcs = nas_5gs_sm_elem_fcn ; break; case 19: elem_names_ext = nas_5gs_updp_elem_strings_ext ; elem_ett = ett_nas_5gs_updp_elem; elem_funcs = nas_5gs_updp_elem_fcn ; break; default: proto_tree_add_expert_format(tree, pinfo, & ei_gsm_a_unknown_pdu_type, tvb, curr_offset, -1, "Unknown PDU type (%u) gsm_a_common" , pdu_type); return(consumed); }; |
1538 | |
1539 | oct = tvb_get_uint8(tvb, curr_offset); |
1540 | |
1541 | if (oct == iei) { |
1542 | parm_len = tvb_get_uint8(tvb, curr_offset + 1); |
1543 | if ((parm_len&0x80) == 0) { |
1544 | /* length in 2 octets */ |
1545 | parm_len = tvb_get_ntohs(tvb, curr_offset + 1); |
1546 | lengt_length = 2; |
1547 | }else{ |
1548 | parm_len = parm_len & 0x7f; |
1549 | } |
1550 | |
1551 | elem_name = try_val_to_str_ext(idx, &elem_names_ext); |
1552 | |
1553 | /* idx is out of range */ |
1554 | if (elem_name == NULL((void*)0)) { |
1555 | proto_tree_add_expert_format(tree, pinfo, &ei_gsm_a_unknown_element, |
1556 | tvb, curr_offset, parm_len + 1 + lengt_length, |
1557 | "Unknown - aborting dissection%s", (name_add == NULL((void*)0)) || (name_add[0] == '\0') ? "" : name_add); |
1558 | return consumed; |
1559 | } |
1560 | |
1561 | subtree = proto_tree_add_subtree_format(tree, tvb, curr_offset, parm_len + 1 + lengt_length, elem_ett[idx], &item, |
1562 | "%s%s", elem_name, (name_add == NULL((void*)0)) || (name_add[0] == '\0') ? "" : name_add); |
1563 | |
1564 | proto_tree_add_uint(subtree, |
1565 | get_hf_elem_id(pdu_type), tvb, |
1566 | curr_offset, 1, oct); |
1567 | |
1568 | proto_tree_add_item(subtree, hf_gsm_a_l_ext, tvb, curr_offset+1, 1, ENC_BIG_ENDIAN0x00000000); |
1569 | |
1570 | proto_tree_add_uint(subtree, hf_gsm_a_length, tvb, |
1571 | curr_offset + 1, lengt_length, parm_len); |
1572 | |
1573 | if (parm_len > 0) |
1574 | { |
1575 | if (elem_funcs[idx] == NULL((void*)0)) |
1576 | { |
1577 | proto_tree_add_item(subtree, hf_gsm_a_element_value, tvb, curr_offset + 1 + lengt_length, parm_len, ENC_NA0x00000000); |
1578 | /* See ASSERT above */ |
1579 | consumed = parm_len; |
1580 | } |
1581 | else |
1582 | { |
1583 | char *a_add_string; |
1584 | |
1585 | a_add_string = (char*)wmem_alloc(pinfo->pool, 1024); |
1586 | a_add_string[0] = '\0'; |
1587 | consumed = |
1588 | (*elem_funcs[idx])(tvb, subtree, pinfo, curr_offset + 1 + lengt_length, |
1589 | parm_len, a_add_string, 1024); |
1590 | |
1591 | if (a_add_string[0] != '\0') |
1592 | { |
1593 | proto_item_append_text(item, "%s", a_add_string); |
1594 | } |
1595 | } |
1596 | } |
1597 | |
1598 | consumed += 1 + lengt_length; |
1599 | } |
1600 | |
1601 | return consumed; |
1602 | } |
1603 | |
1604 | /* |
1605 | * Type Length Value Extended(TLV-E) element dissector |
1606 | * TS 24.007 |
1607 | * information elements of format LV-E or TLV-E with value part consisting of zero, |
1608 | * one or more octets and a maximum of 65535 octets (type 6). This category is used in EPS only. |
1609 | */ |
1610 | uint16_t elem_tlv_e(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint8_t iei, int pdu_type, int idx, uint32_t offset, unsigned len _U___attribute__((unused)), const char *name_add) |
1611 | { |
1612 | uint8_t oct; |
1613 | uint16_t parm_len; |
1614 | uint16_t consumed; |
1615 | uint32_t curr_offset; |
1616 | proto_tree *subtree; |
1617 | proto_item *item; |
1618 | value_string_ext elem_names_ext; |
1619 | int *elem_ett; |
1620 | const char *elem_name; |
1621 | elem_func_hander elem_funcs; |
1622 | |
1623 | curr_offset = offset; |
1624 | consumed = 0; |
1625 | |
1626 | SET_ELEM_VARS(pdu_type, elem_names_ext, elem_ett, elem_funcs, &ei_gsm_a_unknown_pdu_type)switch (pdu_type) { case 0: elem_names_ext = gsm_bssmap_elem_strings_ext ; elem_ett = ett_gsm_bssmap_elem; elem_funcs = bssmap_elem_fcn ; break; case 1: elem_names_ext = gsm_dtap_elem_strings_ext; elem_ett = ett_gsm_dtap_elem; elem_funcs = dtap_elem_fcn; break; case 2: elem_names_ext = gsm_rp_elem_strings_ext; elem_ett = ett_gsm_rp_elem ; elem_funcs = rp_elem_fcn; break; case 3: elem_names_ext = gsm_rr_elem_strings_ext ; elem_ett = ett_gsm_rr_elem; elem_funcs = rr_elem_fcn; break ; case 4: elem_names_ext = gsm_common_elem_strings_ext; elem_ett = ett_gsm_common_elem; elem_funcs = common_elem_fcn; break; case 5: elem_names_ext = gsm_gm_elem_strings_ext; elem_ett = ett_gsm_gm_elem ; elem_funcs = gm_elem_fcn; break; case 6: elem_names_ext = gsm_bsslap_elem_strings_ext ; elem_ett = ett_gsm_bsslap_elem; elem_funcs = bsslap_elem_fcn ; break; case 8: elem_names_ext = gsm_bssmap_le_elem_strings_ext ; elem_ett = ett_gsm_bssmap_le_elem; elem_funcs = bssmap_le_elem_fcn ; break; case 9: elem_names_ext = nas_eps_common_elem_strings_ext ; elem_ett = ett_nas_eps_common_elem; elem_funcs = nas_eps_common_elem_fcn ; break; case 10: elem_names_ext = nas_emm_elem_strings_ext; elem_ett = ett_nas_eps_emm_elem; elem_funcs = emm_elem_fcn; break; case 11: elem_names_ext = nas_esm_elem_strings_ext; elem_ett = ett_nas_eps_esm_elem ; elem_funcs = esm_elem_fcn; break; case 12: elem_names_ext = sgsap_elem_strings_ext; elem_ett = ett_sgsap_elem; elem_funcs = sgsap_elem_fcn; break; case 13: elem_names_ext = bssgp_elem_strings_ext ; elem_ett = ett_bssgp_elem; elem_funcs = bssgp_elem_fcn; break ; case 14: elem_names_ext = gmr1_ie_common_strings_ext; elem_ett = ett_gmr1_ie_common; elem_funcs = gmr1_ie_common_func; break ; case 15: elem_names_ext = gmr1_ie_rr_strings_ext; elem_ett = ett_gmr1_ie_rr; elem_funcs = gmr1_ie_rr_func; break; case 16 : elem_names_ext = nas_5gs_common_elem_strings_ext; elem_ett = ett_nas_5gs_common_elem; elem_funcs = nas_5gs_common_elem_fcn ; break; case 17: elem_names_ext = nas_5gs_mm_elem_strings_ext ; elem_ett = ett_nas_5gs_mm_elem; elem_funcs = nas_5gs_mm_elem_fcn ; break; case 18: elem_names_ext = nas_5gs_sm_elem_strings_ext ; elem_ett = ett_nas_5gs_sm_elem; elem_funcs = nas_5gs_sm_elem_fcn ; break; case 19: elem_names_ext = nas_5gs_updp_elem_strings_ext ; elem_ett = ett_nas_5gs_updp_elem; elem_funcs = nas_5gs_updp_elem_fcn ; break; default: proto_tree_add_expert_format(tree, pinfo, & ei_gsm_a_unknown_pdu_type, tvb, curr_offset, -1, "Unknown PDU type (%u) gsm_a_common" , pdu_type); return(consumed); }; |
1627 | |
1628 | oct = tvb_get_uint8(tvb, curr_offset); |
1629 | |
1630 | if (oct == iei) { |
1631 | parm_len = tvb_get_ntohs(tvb, curr_offset + 1); |
1632 | |
1633 | elem_name = try_val_to_str_ext(idx, &elem_names_ext); |
1634 | |
1635 | /* idx is out of range */ |
1636 | if (elem_name == NULL((void*)0)) { |
1637 | proto_tree_add_expert_format(tree, pinfo, &ei_gsm_a_unknown_element, |
1638 | tvb, curr_offset, parm_len + 1 + 2, |
1639 | "Unknown - aborting dissection%s", (name_add == NULL((void*)0)) || (name_add[0] == '\0') ? "" : name_add); |
1640 | return consumed; |
1641 | } |
1642 | |
1643 | subtree = proto_tree_add_subtree_format(tree, tvb, curr_offset, parm_len + 1 + 2, elem_ett[idx], &item, |
1644 | "%s%s", elem_name, (name_add == NULL((void*)0)) || (name_add[0] == '\0') ? "" : name_add); |
1645 | |
1646 | proto_tree_add_uint(subtree, |
1647 | get_hf_elem_id(pdu_type), tvb, |
1648 | curr_offset, 1, oct); |
1649 | |
1650 | proto_tree_add_uint(subtree, hf_gsm_a_length, tvb, |
1651 | curr_offset + 1, 2, parm_len); |
1652 | |
1653 | if (parm_len > 0) |
1654 | { |
1655 | if (elem_funcs[idx] == NULL((void*)0)) |
1656 | { |
1657 | proto_tree_add_item(subtree, hf_gsm_a_element_value, tvb, curr_offset + 1 + 2, parm_len, ENC_NA0x00000000); |
1658 | /* See ASSERT above */ |
1659 | consumed = parm_len; |
1660 | } |
1661 | else |
1662 | { |
1663 | char *a_add_string; |
1664 | |
1665 | a_add_string = (char*)wmem_alloc(pinfo->pool, 1024); |
1666 | a_add_string[0] = '\0'; |
1667 | consumed = |
1668 | (*elem_funcs[idx])(tvb, subtree, pinfo, curr_offset + 1 + 2, |
1669 | parm_len, a_add_string, 1024); |
1670 | |
1671 | if (a_add_string[0] != '\0') |
1672 | { |
1673 | proto_item_append_text(item, "%s", a_add_string); |
1674 | } |
1675 | } |
1676 | } |
1677 | |
1678 | consumed += 1 + 2; |
1679 | } |
1680 | |
1681 | return consumed; |
1682 | } |
1683 | |
1684 | /* |
1685 | * Type Value (TV) element dissector |
1686 | * |
1687 | * Length cannot be used in these functions, big problem if a element dissector |
1688 | * is not defined for these. |
1689 | */ |
1690 | uint16_t elem_tv(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint8_t iei, int pdu_type, int idx, uint32_t offset, const char *name_add) |
1691 | { |
1692 | uint8_t oct; |
1693 | uint16_t consumed; |
1694 | uint32_t curr_offset; |
1695 | proto_tree *subtree; |
1696 | proto_item *item; |
1697 | value_string_ext elem_names_ext; |
1698 | int *elem_ett; |
1699 | const char *elem_name; |
1700 | elem_func_hander elem_funcs; |
1701 | |
1702 | curr_offset = offset; |
1703 | consumed = 0; |
1704 | |
1705 | SET_ELEM_VARS(pdu_type, elem_names_ext, elem_ett, elem_funcs, &ei_gsm_a_unknown_pdu_type)switch (pdu_type) { case 0: elem_names_ext = gsm_bssmap_elem_strings_ext ; elem_ett = ett_gsm_bssmap_elem; elem_funcs = bssmap_elem_fcn ; break; case 1: elem_names_ext = gsm_dtap_elem_strings_ext; elem_ett = ett_gsm_dtap_elem; elem_funcs = dtap_elem_fcn; break; case 2: elem_names_ext = gsm_rp_elem_strings_ext; elem_ett = ett_gsm_rp_elem ; elem_funcs = rp_elem_fcn; break; case 3: elem_names_ext = gsm_rr_elem_strings_ext ; elem_ett = ett_gsm_rr_elem; elem_funcs = rr_elem_fcn; break ; case 4: elem_names_ext = gsm_common_elem_strings_ext; elem_ett = ett_gsm_common_elem; elem_funcs = common_elem_fcn; break; case 5: elem_names_ext = gsm_gm_elem_strings_ext; elem_ett = ett_gsm_gm_elem ; elem_funcs = gm_elem_fcn; break; case 6: elem_names_ext = gsm_bsslap_elem_strings_ext ; elem_ett = ett_gsm_bsslap_elem; elem_funcs = bsslap_elem_fcn ; break; case 8: elem_names_ext = gsm_bssmap_le_elem_strings_ext ; elem_ett = ett_gsm_bssmap_le_elem; elem_funcs = bssmap_le_elem_fcn ; break; case 9: elem_names_ext = nas_eps_common_elem_strings_ext ; elem_ett = ett_nas_eps_common_elem; elem_funcs = nas_eps_common_elem_fcn ; break; case 10: elem_names_ext = nas_emm_elem_strings_ext; elem_ett = ett_nas_eps_emm_elem; elem_funcs = emm_elem_fcn; break; case 11: elem_names_ext = nas_esm_elem_strings_ext; elem_ett = ett_nas_eps_esm_elem ; elem_funcs = esm_elem_fcn; break; case 12: elem_names_ext = sgsap_elem_strings_ext; elem_ett = ett_sgsap_elem; elem_funcs = sgsap_elem_fcn; break; case 13: elem_names_ext = bssgp_elem_strings_ext ; elem_ett = ett_bssgp_elem; elem_funcs = bssgp_elem_fcn; break ; case 14: elem_names_ext = gmr1_ie_common_strings_ext; elem_ett = ett_gmr1_ie_common; elem_funcs = gmr1_ie_common_func; break ; case 15: elem_names_ext = gmr1_ie_rr_strings_ext; elem_ett = ett_gmr1_ie_rr; elem_funcs = gmr1_ie_rr_func; break; case 16 : elem_names_ext = nas_5gs_common_elem_strings_ext; elem_ett = ett_nas_5gs_common_elem; elem_funcs = nas_5gs_common_elem_fcn ; break; case 17: elem_names_ext = nas_5gs_mm_elem_strings_ext ; elem_ett = ett_nas_5gs_mm_elem; elem_funcs = nas_5gs_mm_elem_fcn ; break; case 18: elem_names_ext = nas_5gs_sm_elem_strings_ext ; elem_ett = ett_nas_5gs_sm_elem; elem_funcs = nas_5gs_sm_elem_fcn ; break; case 19: elem_names_ext = nas_5gs_updp_elem_strings_ext ; elem_ett = ett_nas_5gs_updp_elem; elem_funcs = nas_5gs_updp_elem_fcn ; break; default: proto_tree_add_expert_format(tree, pinfo, & ei_gsm_a_unknown_pdu_type, tvb, curr_offset, -1, "Unknown PDU type (%u) gsm_a_common" , pdu_type); return(consumed); }; |
1706 | |
1707 | oct = tvb_get_uint8(tvb, curr_offset); |
1708 | |
1709 | if (oct == iei) |
1710 | { |
1711 | elem_name = try_val_to_str_ext(idx, &elem_names_ext); |
1712 | |
1713 | /* idx is out of range */ |
1714 | if (elem_name == NULL((void*)0)) { |
1715 | proto_tree_add_expert_format(tree, pinfo, &ei_gsm_a_unknown_element, |
1716 | tvb, curr_offset, -1, |
1717 | "Unknown - aborting dissection%s", (name_add == NULL((void*)0)) || (name_add[0] == '\0') ? "" : name_add); |
1718 | return consumed; |
1719 | } |
1720 | |
1721 | subtree = proto_tree_add_subtree_format(tree, tvb, curr_offset, -1, elem_ett[idx], &item, |
1722 | "%s%s", elem_name, (name_add == NULL((void*)0)) || (name_add[0] == '\0') ? "" : name_add); |
1723 | |
1724 | proto_tree_add_uint(subtree, |
1725 | get_hf_elem_id(pdu_type), tvb, |
1726 | curr_offset, 1, oct); |
1727 | |
1728 | if (elem_funcs[idx] == NULL((void*)0)) |
1729 | { |
1730 | /* BAD THING, CANNOT DETERMINE LENGTH */ |
1731 | expert_add_info(pinfo, item, &ei_gsm_a_no_element_dissector); |
1732 | |
1733 | consumed = 1; |
1734 | } |
1735 | else |
1736 | { |
1737 | char *a_add_string; |
1738 | |
1739 | a_add_string = (char*)wmem_alloc(pinfo->pool, 1024); |
1740 | a_add_string[0] = '\0'; |
1741 | consumed = (*elem_funcs[idx])(tvb, subtree, pinfo, curr_offset + 1, -1, a_add_string, 1024); |
1742 | |
1743 | if (a_add_string[0] != '\0') |
1744 | { |
1745 | proto_item_append_text(item, "%s", a_add_string); |
1746 | } |
1747 | } |
1748 | |
1749 | consumed++; |
1750 | |
1751 | proto_item_set_len(item, consumed); |
1752 | } |
1753 | |
1754 | return consumed; |
1755 | } |
1756 | |
1757 | /* |
1758 | * Type Value (TV) element dissector |
1759 | * Where top half nibble is IEI and bottom half nibble is value. |
1760 | * |
1761 | * Length cannot be used in these functions, big problem if a element dissector |
1762 | * is not defined for these. |
1763 | */ |
1764 | uint16_t elem_tv_short(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint8_t iei, int pdu_type, int idx, uint32_t offset, const char *name_add) |
1765 | { |
1766 | uint8_t oct; |
1767 | uint16_t consumed; |
1768 | uint32_t curr_offset; |
1769 | proto_tree *subtree; |
1770 | proto_item *item; |
1771 | value_string_ext elem_names_ext; |
1772 | int *elem_ett; |
1773 | const char *elem_name; |
1774 | elem_func_hander elem_funcs; |
1775 | |
1776 | curr_offset = offset; |
1777 | consumed = 0; |
1778 | |
1779 | SET_ELEM_VARS(pdu_type, elem_names_ext, elem_ett, elem_funcs, &ei_gsm_a_unknown_pdu_type)switch (pdu_type) { case 0: elem_names_ext = gsm_bssmap_elem_strings_ext ; elem_ett = ett_gsm_bssmap_elem; elem_funcs = bssmap_elem_fcn ; break; case 1: elem_names_ext = gsm_dtap_elem_strings_ext; elem_ett = ett_gsm_dtap_elem; elem_funcs = dtap_elem_fcn; break; case 2: elem_names_ext = gsm_rp_elem_strings_ext; elem_ett = ett_gsm_rp_elem ; elem_funcs = rp_elem_fcn; break; case 3: elem_names_ext = gsm_rr_elem_strings_ext ; elem_ett = ett_gsm_rr_elem; elem_funcs = rr_elem_fcn; break ; case 4: elem_names_ext = gsm_common_elem_strings_ext; elem_ett = ett_gsm_common_elem; elem_funcs = common_elem_fcn; break; case 5: elem_names_ext = gsm_gm_elem_strings_ext; elem_ett = ett_gsm_gm_elem ; elem_funcs = gm_elem_fcn; break; case 6: elem_names_ext = gsm_bsslap_elem_strings_ext ; elem_ett = ett_gsm_bsslap_elem; elem_funcs = bsslap_elem_fcn ; break; case 8: elem_names_ext = gsm_bssmap_le_elem_strings_ext ; elem_ett = ett_gsm_bssmap_le_elem; elem_funcs = bssmap_le_elem_fcn ; break; case 9: elem_names_ext = nas_eps_common_elem_strings_ext ; elem_ett = ett_nas_eps_common_elem; elem_funcs = nas_eps_common_elem_fcn ; break; case 10: elem_names_ext = nas_emm_elem_strings_ext; elem_ett = ett_nas_eps_emm_elem; elem_funcs = emm_elem_fcn; break; case 11: elem_names_ext = nas_esm_elem_strings_ext; elem_ett = ett_nas_eps_esm_elem ; elem_funcs = esm_elem_fcn; break; case 12: elem_names_ext = sgsap_elem_strings_ext; elem_ett = ett_sgsap_elem; elem_funcs = sgsap_elem_fcn; break; case 13: elem_names_ext = bssgp_elem_strings_ext ; elem_ett = ett_bssgp_elem; elem_funcs = bssgp_elem_fcn; break ; case 14: elem_names_ext = gmr1_ie_common_strings_ext; elem_ett = ett_gmr1_ie_common; elem_funcs = gmr1_ie_common_func; break ; case 15: elem_names_ext = gmr1_ie_rr_strings_ext; elem_ett = ett_gmr1_ie_rr; elem_funcs = gmr1_ie_rr_func; break; case 16 : elem_names_ext = nas_5gs_common_elem_strings_ext; elem_ett = ett_nas_5gs_common_elem; elem_funcs = nas_5gs_common_elem_fcn ; break; case 17: elem_names_ext = nas_5gs_mm_elem_strings_ext ; elem_ett = ett_nas_5gs_mm_elem; elem_funcs = nas_5gs_mm_elem_fcn ; break; case 18: elem_names_ext = nas_5gs_sm_elem_strings_ext ; elem_ett = ett_nas_5gs_sm_elem; elem_funcs = nas_5gs_sm_elem_fcn ; break; case 19: elem_names_ext = nas_5gs_updp_elem_strings_ext ; elem_ett = ett_nas_5gs_updp_elem; elem_funcs = nas_5gs_updp_elem_fcn ; break; default: proto_tree_add_expert_format(tree, pinfo, & ei_gsm_a_unknown_pdu_type, tvb, curr_offset, -1, "Unknown PDU type (%u) gsm_a_common" , pdu_type); return(consumed); }; |
1780 | |
1781 | oct = tvb_get_uint8(tvb, curr_offset); |
1782 | |
1783 | if ((oct & 0xf0) == (iei & 0xf0)) |
1784 | { |
1785 | elem_name = try_val_to_str_ext(idx, &elem_names_ext); |
1786 | |
1787 | /* idx is out of range */ |
1788 | if (elem_name == NULL((void*)0)) { |
1789 | proto_tree_add_expert_format(tree, pinfo, &ei_gsm_a_unknown_element, |
1790 | tvb, curr_offset, -1, |
1791 | "Unknown - aborting dissection%s", (name_add == NULL((void*)0)) || (name_add[0] == '\0') ? "" : name_add); |
1792 | return consumed; |
1793 | } |
1794 | |
1795 | subtree = proto_tree_add_subtree_format(tree, tvb, curr_offset, -1, elem_ett[idx], &item, |
1796 | "%s%s", elem_name, (name_add == NULL((void*)0)) || (name_add[0] == '\0') ? "" : name_add); |
1797 | |
1798 | proto_tree_add_uint_format_value(subtree, hf_gsm_a_common_elem_id_f0, tvb, curr_offset, 1, oct, "0x%1x-", oct>>4); |
1799 | |
1800 | if (elem_funcs[idx] == NULL((void*)0)) |
1801 | { |
1802 | /* BAD THING, CANNOT DETERMINE LENGTH */ |
1803 | |
1804 | expert_add_info(pinfo, item, &ei_gsm_a_no_element_dissector); |
1805 | |
1806 | consumed++; |
1807 | } |
1808 | else |
1809 | { |
1810 | char *a_add_string; |
1811 | |
1812 | a_add_string = (char*)wmem_alloc(pinfo->pool, 1024); |
1813 | a_add_string[0] = '\0'; |
1814 | consumed = (*elem_funcs[idx])(tvb, subtree, pinfo, curr_offset, RIGHT_NIBBLE(1), a_add_string, 1024); |
1815 | |
1816 | if (a_add_string[0] != '\0') |
1817 | { |
1818 | proto_item_append_text(item, "%s", a_add_string); |
1819 | } |
1820 | } |
1821 | |
1822 | proto_item_set_len(item, consumed); |
1823 | } |
1824 | |
1825 | return consumed; |
1826 | } |
1827 | |
1828 | /* |
1829 | * Type (T) element dissector |
1830 | */ |
1831 | uint16_t elem_t(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint8_t iei, int pdu_type, int idx, uint32_t offset, const char *name_add) |
1832 | { |
1833 | uint8_t oct; |
1834 | uint32_t curr_offset; |
1835 | uint16_t consumed; |
1836 | value_string_ext elem_names_ext; |
1837 | int *elem_ett; |
1838 | elem_func_hander elem_funcs; |
1839 | |
1840 | curr_offset = offset; |
1841 | consumed = 0; |
1842 | |
1843 | SET_ELEM_VARS(pdu_type, elem_names_ext, elem_ett, elem_funcs, &ei_gsm_a_unknown_pdu_type)switch (pdu_type) { case 0: elem_names_ext = gsm_bssmap_elem_strings_ext ; elem_ett = ett_gsm_bssmap_elem; elem_funcs = bssmap_elem_fcn ; break; case 1: elem_names_ext = gsm_dtap_elem_strings_ext; elem_ett = ett_gsm_dtap_elem; elem_funcs = dtap_elem_fcn; break; case 2: elem_names_ext = gsm_rp_elem_strings_ext; elem_ett = ett_gsm_rp_elem ; elem_funcs = rp_elem_fcn; break; case 3: elem_names_ext = gsm_rr_elem_strings_ext ; elem_ett = ett_gsm_rr_elem; elem_funcs = rr_elem_fcn; break ; case 4: elem_names_ext = gsm_common_elem_strings_ext; elem_ett = ett_gsm_common_elem; elem_funcs = common_elem_fcn; break; case 5: elem_names_ext = gsm_gm_elem_strings_ext; elem_ett = ett_gsm_gm_elem ; elem_funcs = gm_elem_fcn; break; case 6: elem_names_ext = gsm_bsslap_elem_strings_ext ; elem_ett = ett_gsm_bsslap_elem; elem_funcs = bsslap_elem_fcn ; break; case 8: elem_names_ext = gsm_bssmap_le_elem_strings_ext ; elem_ett = ett_gsm_bssmap_le_elem; elem_funcs = bssmap_le_elem_fcn ; break; case 9: elem_names_ext = nas_eps_common_elem_strings_ext ; elem_ett = ett_nas_eps_common_elem; elem_funcs = nas_eps_common_elem_fcn ; break; case 10: elem_names_ext = nas_emm_elem_strings_ext; elem_ett = ett_nas_eps_emm_elem; elem_funcs = emm_elem_fcn; break; case 11: elem_names_ext = nas_esm_elem_strings_ext; elem_ett = ett_nas_eps_esm_elem ; elem_funcs = esm_elem_fcn; break; case 12: elem_names_ext = sgsap_elem_strings_ext; elem_ett = ett_sgsap_elem; elem_funcs = sgsap_elem_fcn; break; case 13: elem_names_ext = bssgp_elem_strings_ext ; elem_ett = ett_bssgp_elem; elem_funcs = bssgp_elem_fcn; break ; case 14: elem_names_ext = gmr1_ie_common_strings_ext; elem_ett = ett_gmr1_ie_common; elem_funcs = gmr1_ie_common_func; break ; case 15: elem_names_ext = gmr1_ie_rr_strings_ext; elem_ett = ett_gmr1_ie_rr; elem_funcs = gmr1_ie_rr_func; break; case 16 : elem_names_ext = nas_5gs_common_elem_strings_ext; elem_ett = ett_nas_5gs_common_elem; elem_funcs = nas_5gs_common_elem_fcn ; break; case 17: elem_names_ext = nas_5gs_mm_elem_strings_ext ; elem_ett = ett_nas_5gs_mm_elem; elem_funcs = nas_5gs_mm_elem_fcn ; break; case 18: elem_names_ext = nas_5gs_sm_elem_strings_ext ; elem_ett = ett_nas_5gs_sm_elem; elem_funcs = nas_5gs_sm_elem_fcn ; break; case 19: elem_names_ext = nas_5gs_updp_elem_strings_ext ; elem_ett = ett_nas_5gs_updp_elem; elem_funcs = nas_5gs_updp_elem_fcn ; break; default: proto_tree_add_expert_format(tree, pinfo, & ei_gsm_a_unknown_pdu_type, tvb, curr_offset, -1, "Unknown PDU type (%u) gsm_a_common" , pdu_type); return(consumed); }; |
1844 | |
1845 | (void)elem_ett; |
1846 | (void)elem_funcs; |
1847 | |
1848 | oct = tvb_get_uint8(tvb, curr_offset); |
1849 | |
1850 | if (oct == iei) |
1851 | { |
1852 | proto_tree_add_uint_format(tree, |
1853 | get_hf_elem_id(pdu_type), tvb, |
1854 | curr_offset, 1, oct, |
1855 | "%s%s", |
1856 | val_to_str_ext(idx, &elem_names_ext, "Unknown (%u)"), |
1857 | (name_add == NULL((void*)0)) || (name_add[0] == '\0') ? "" : name_add); |
1858 | |
1859 | consumed = 1; |
1860 | } |
1861 | |
1862 | return consumed; |
1863 | } |
1864 | |
1865 | /* |
1866 | * Length Value (LV) element dissector |
1867 | */ |
1868 | uint16_t |
1869 | elem_lv(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, int pdu_type, int idx, uint32_t offset, unsigned len _U___attribute__((unused)), const char *name_add) |
1870 | { |
1871 | uint8_t parm_len; |
1872 | uint16_t consumed; |
1873 | uint32_t curr_offset; |
1874 | proto_tree *subtree; |
1875 | proto_item *item; |
1876 | value_string_ext elem_names_ext; |
1877 | int *elem_ett; |
1878 | const char *elem_name; |
1879 | elem_func_hander elem_funcs; |
1880 | |
1881 | curr_offset = offset; |
1882 | consumed = 0; |
1883 | |
1884 | SET_ELEM_VARS(pdu_type, elem_names_ext, elem_ett, elem_funcs, &ei_gsm_a_unknown_pdu_type)switch (pdu_type) { case 0: elem_names_ext = gsm_bssmap_elem_strings_ext ; elem_ett = ett_gsm_bssmap_elem; elem_funcs = bssmap_elem_fcn ; break; case 1: elem_names_ext = gsm_dtap_elem_strings_ext; elem_ett = ett_gsm_dtap_elem; elem_funcs = dtap_elem_fcn; break; case 2: elem_names_ext = gsm_rp_elem_strings_ext; elem_ett = ett_gsm_rp_elem ; elem_funcs = rp_elem_fcn; break; case 3: elem_names_ext = gsm_rr_elem_strings_ext ; elem_ett = ett_gsm_rr_elem; elem_funcs = rr_elem_fcn; break ; case 4: elem_names_ext = gsm_common_elem_strings_ext; elem_ett = ett_gsm_common_elem; elem_funcs = common_elem_fcn; break; case 5: elem_names_ext = gsm_gm_elem_strings_ext; elem_ett = ett_gsm_gm_elem ; elem_funcs = gm_elem_fcn; break; case 6: elem_names_ext = gsm_bsslap_elem_strings_ext ; elem_ett = ett_gsm_bsslap_elem; elem_funcs = bsslap_elem_fcn ; break; case 8: elem_names_ext = gsm_bssmap_le_elem_strings_ext ; elem_ett = ett_gsm_bssmap_le_elem; elem_funcs = bssmap_le_elem_fcn ; break; case 9: elem_names_ext = nas_eps_common_elem_strings_ext ; elem_ett = ett_nas_eps_common_elem; elem_funcs = nas_eps_common_elem_fcn ; break; case 10: elem_names_ext = nas_emm_elem_strings_ext; elem_ett = ett_nas_eps_emm_elem; elem_funcs = emm_elem_fcn; break; case 11: elem_names_ext = nas_esm_elem_strings_ext; elem_ett = ett_nas_eps_esm_elem ; elem_funcs = esm_elem_fcn; break; case 12: elem_names_ext = sgsap_elem_strings_ext; elem_ett = ett_sgsap_elem; elem_funcs = sgsap_elem_fcn; break; case 13: elem_names_ext = bssgp_elem_strings_ext ; elem_ett = ett_bssgp_elem; elem_funcs = bssgp_elem_fcn; break ; case 14: elem_names_ext = gmr1_ie_common_strings_ext; elem_ett = ett_gmr1_ie_common; elem_funcs = gmr1_ie_common_func; break ; case 15: elem_names_ext = gmr1_ie_rr_strings_ext; elem_ett = ett_gmr1_ie_rr; elem_funcs = gmr1_ie_rr_func; break; case 16 : elem_names_ext = nas_5gs_common_elem_strings_ext; elem_ett = ett_nas_5gs_common_elem; elem_funcs = nas_5gs_common_elem_fcn ; break; case 17: elem_names_ext = nas_5gs_mm_elem_strings_ext ; elem_ett = ett_nas_5gs_mm_elem; elem_funcs = nas_5gs_mm_elem_fcn ; break; case 18: elem_names_ext = nas_5gs_sm_elem_strings_ext ; elem_ett = ett_nas_5gs_sm_elem; elem_funcs = nas_5gs_sm_elem_fcn ; break; case 19: elem_names_ext = nas_5gs_updp_elem_strings_ext ; elem_ett = ett_nas_5gs_updp_elem; elem_funcs = nas_5gs_updp_elem_fcn ; break; default: proto_tree_add_expert_format(tree, pinfo, & ei_gsm_a_unknown_pdu_type, tvb, curr_offset, -1, "Unknown PDU type (%u) gsm_a_common" , pdu_type); return(consumed); }; |
1885 | |
1886 | parm_len = tvb_get_uint8(tvb, curr_offset); |
1887 | |
1888 | elem_name = try_val_to_str_ext(idx, &elem_names_ext); |
1889 | |
1890 | /* idx is out of range */ |
1891 | if (elem_name == NULL((void*)0)) { |
1892 | proto_tree_add_expert_format(tree, pinfo, &ei_gsm_a_unknown_element, |
1893 | tvb, curr_offset, parm_len + 1, |
1894 | "Unknown - aborting dissection%s", (name_add == NULL((void*)0)) || (name_add[0] == '\0') ? "" : name_add); |
1895 | return consumed; |
1896 | } |
1897 | |
1898 | subtree = proto_tree_add_subtree_format(tree, tvb, curr_offset, parm_len + 1, elem_ett[idx], &item, |
1899 | "%s%s", elem_name, (name_add == NULL((void*)0)) || (name_add[0] == '\0') ? "" : name_add); |
1900 | |
1901 | proto_tree_add_uint(subtree, hf_gsm_a_length, tvb, |
1902 | curr_offset, 1, parm_len); |
1903 | |
1904 | if (parm_len > 0) |
1905 | { |
1906 | if (elem_funcs[idx] == NULL((void*)0)) |
1907 | { |
1908 | proto_tree_add_item(subtree, hf_gsm_a_element_value, tvb, curr_offset + 1, parm_len, ENC_NA0x00000000); |
1909 | |
1910 | consumed = parm_len; |
1911 | } |
1912 | else |
1913 | { |
1914 | char *a_add_string; |
1915 | |
1916 | a_add_string = (char*)wmem_alloc(pinfo->pool, 1024); |
1917 | a_add_string[0] = '\0'; |
1918 | consumed = |
1919 | (*elem_funcs[idx])(tvb, subtree, pinfo, curr_offset + 1, |
1920 | parm_len, a_add_string, 1024); |
1921 | |
1922 | if (a_add_string[0] != '\0') |
1923 | { |
1924 | proto_item_append_text(item, "%s", a_add_string); |
1925 | } |
1926 | } |
1927 | } |
1928 | |
1929 | return (consumed + 1); |
1930 | } |
1931 | |
1932 | /* |
1933 | * Length Value Extended(LV-E) element dissector |
1934 | */ |
1935 | uint16_t elem_lv_e(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, int pdu_type, int idx, uint32_t offset, unsigned len _U___attribute__((unused)), const char *name_add) |
1936 | { |
1937 | uint16_t parm_len; |
1938 | uint16_t consumed; |
1939 | uint32_t curr_offset; |
1940 | proto_tree *subtree; |
1941 | proto_item *item; |
1942 | value_string_ext elem_names_ext; |
1943 | int *elem_ett; |
1944 | const char *elem_name; |
1945 | elem_func_hander elem_funcs; |
1946 | |
1947 | curr_offset = offset; |
1948 | consumed = 0; |
1949 | |
1950 | SET_ELEM_VARS(pdu_type, elem_names_ext, elem_ett, elem_funcs, &ei_gsm_a_unknown_pdu_type)switch (pdu_type) { case 0: elem_names_ext = gsm_bssmap_elem_strings_ext ; elem_ett = ett_gsm_bssmap_elem; elem_funcs = bssmap_elem_fcn ; break; case 1: elem_names_ext = gsm_dtap_elem_strings_ext; elem_ett = ett_gsm_dtap_elem; elem_funcs = dtap_elem_fcn; break; case 2: elem_names_ext = gsm_rp_elem_strings_ext; elem_ett = ett_gsm_rp_elem ; elem_funcs = rp_elem_fcn; break; case 3: elem_names_ext = gsm_rr_elem_strings_ext ; elem_ett = ett_gsm_rr_elem; elem_funcs = rr_elem_fcn; break ; case 4: elem_names_ext = gsm_common_elem_strings_ext; elem_ett = ett_gsm_common_elem; elem_funcs = common_elem_fcn; break; case 5: elem_names_ext = gsm_gm_elem_strings_ext; elem_ett = ett_gsm_gm_elem ; elem_funcs = gm_elem_fcn; break; case 6: elem_names_ext = gsm_bsslap_elem_strings_ext ; elem_ett = ett_gsm_bsslap_elem; elem_funcs = bsslap_elem_fcn ; break; case 8: elem_names_ext = gsm_bssmap_le_elem_strings_ext ; elem_ett = ett_gsm_bssmap_le_elem; elem_funcs = bssmap_le_elem_fcn ; break; case 9: elem_names_ext = nas_eps_common_elem_strings_ext ; elem_ett = ett_nas_eps_common_elem; elem_funcs = nas_eps_common_elem_fcn ; break; case 10: elem_names_ext = nas_emm_elem_strings_ext; elem_ett = ett_nas_eps_emm_elem; elem_funcs = emm_elem_fcn; break; case 11: elem_names_ext = nas_esm_elem_strings_ext; elem_ett = ett_nas_eps_esm_elem ; elem_funcs = esm_elem_fcn; break; case 12: elem_names_ext = sgsap_elem_strings_ext; elem_ett = ett_sgsap_elem; elem_funcs = sgsap_elem_fcn; break; case 13: elem_names_ext = bssgp_elem_strings_ext ; elem_ett = ett_bssgp_elem; elem_funcs = bssgp_elem_fcn; break ; case 14: elem_names_ext = gmr1_ie_common_strings_ext; elem_ett = ett_gmr1_ie_common; elem_funcs = gmr1_ie_common_func; break ; case 15: elem_names_ext = gmr1_ie_rr_strings_ext; elem_ett = ett_gmr1_ie_rr; elem_funcs = gmr1_ie_rr_func; break; case 16 : elem_names_ext = nas_5gs_common_elem_strings_ext; elem_ett = ett_nas_5gs_common_elem; elem_funcs = nas_5gs_common_elem_fcn ; break; case 17: elem_names_ext = nas_5gs_mm_elem_strings_ext ; elem_ett = ett_nas_5gs_mm_elem; elem_funcs = nas_5gs_mm_elem_fcn ; break; case 18: elem_names_ext = nas_5gs_sm_elem_strings_ext ; elem_ett = ett_nas_5gs_sm_elem; elem_funcs = nas_5gs_sm_elem_fcn ; break; case 19: elem_names_ext = nas_5gs_updp_elem_strings_ext ; elem_ett = ett_nas_5gs_updp_elem; elem_funcs = nas_5gs_updp_elem_fcn ; break; default: proto_tree_add_expert_format(tree, pinfo, & ei_gsm_a_unknown_pdu_type, tvb, curr_offset, -1, "Unknown PDU type (%u) gsm_a_common" , pdu_type); return(consumed); }; |
1951 | |
1952 | parm_len = tvb_get_ntohs(tvb, curr_offset); |
1953 | |
1954 | elem_name = try_val_to_str_ext(idx, &elem_names_ext); |
1955 | |
1956 | /* idx is out of range */ |
1957 | if (elem_name == NULL((void*)0)) { |
1958 | proto_tree_add_expert_format(tree, pinfo, &ei_gsm_a_unknown_element, |
1959 | tvb, curr_offset, parm_len + 2, |
1960 | "Unknown - aborting dissection%s", (name_add == NULL((void*)0)) || (name_add[0] == '\0') ? "" : name_add); |
1961 | return consumed; |
1962 | } |
1963 | |
1964 | subtree = proto_tree_add_subtree_format(tree, tvb, curr_offset, parm_len + 2, elem_ett[idx], &item, |
1965 | "%s%s", elem_name, (name_add == NULL((void*)0)) || (name_add[0] == '\0') ? "" : name_add); |
1966 | |
1967 | proto_tree_add_uint(subtree, hf_gsm_a_length, tvb, |
1968 | curr_offset, 2, parm_len); |
1969 | |
1970 | if (parm_len > 0) |
1971 | { |
1972 | if (elem_funcs[idx] == NULL((void*)0)) |
1973 | { |
1974 | proto_tree_add_item(subtree, hf_gsm_a_element_value, tvb, curr_offset + 2, parm_len, ENC_NA0x00000000); |
1975 | |
1976 | consumed = parm_len; |
1977 | } |
1978 | else |
1979 | { |
1980 | char *a_add_string; |
1981 | |
1982 | a_add_string = (char*)wmem_alloc(pinfo->pool, 1024); |
1983 | a_add_string[0] = '\0'; |
1984 | consumed = |
1985 | (*elem_funcs[idx])(tvb, subtree, pinfo, curr_offset + 2, |
1986 | parm_len, a_add_string, 1024); |
1987 | |
1988 | if (a_add_string[0] != '\0') |
1989 | { |
1990 | proto_item_append_text(item, "%s", a_add_string); |
1991 | } |
1992 | } |
1993 | } |
1994 | |
1995 | return (consumed + 2); |
1996 | } |
1997 | /* |
1998 | * Value (V) element dissector |
1999 | * |
2000 | * Length cannot be used in these functions, big problem if a element dissector |
2001 | * is not defined for these. |
2002 | */ |
2003 | uint16_t elem_v(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, int pdu_type, int idx, uint32_t offset, const char *name_add) |
2004 | { |
2005 | uint16_t consumed; |
2006 | uint32_t curr_offset; |
2007 | proto_tree *subtree; |
2008 | proto_item *item; |
2009 | value_string_ext elem_names_ext; |
2010 | int *elem_ett; |
2011 | const char *elem_name; |
2012 | elem_func_hander elem_funcs; |
2013 | |
2014 | curr_offset = offset; |
2015 | consumed = 0; |
2016 | |
2017 | SET_ELEM_VARS(pdu_type, elem_names_ext, elem_ett, elem_funcs, &ei_gsm_a_unknown_pdu_type)switch (pdu_type) { case 0: elem_names_ext = gsm_bssmap_elem_strings_ext ; elem_ett = ett_gsm_bssmap_elem; elem_funcs = bssmap_elem_fcn ; break; case 1: elem_names_ext = gsm_dtap_elem_strings_ext; elem_ett = ett_gsm_dtap_elem; elem_funcs = dtap_elem_fcn; break; case 2: elem_names_ext = gsm_rp_elem_strings_ext; elem_ett = ett_gsm_rp_elem ; elem_funcs = rp_elem_fcn; break; case 3: elem_names_ext = gsm_rr_elem_strings_ext ; elem_ett = ett_gsm_rr_elem; elem_funcs = rr_elem_fcn; break ; case 4: elem_names_ext = gsm_common_elem_strings_ext; elem_ett = ett_gsm_common_elem; elem_funcs = common_elem_fcn; break; case 5: elem_names_ext = gsm_gm_elem_strings_ext; elem_ett = ett_gsm_gm_elem ; elem_funcs = gm_elem_fcn; break; case 6: elem_names_ext = gsm_bsslap_elem_strings_ext ; elem_ett = ett_gsm_bsslap_elem; elem_funcs = bsslap_elem_fcn ; break; case 8: elem_names_ext = gsm_bssmap_le_elem_strings_ext ; elem_ett = ett_gsm_bssmap_le_elem; elem_funcs = bssmap_le_elem_fcn ; break; case 9: elem_names_ext = nas_eps_common_elem_strings_ext ; elem_ett = ett_nas_eps_common_elem; elem_funcs = nas_eps_common_elem_fcn ; break; case 10: elem_names_ext = nas_emm_elem_strings_ext; elem_ett = ett_nas_eps_emm_elem; elem_funcs = emm_elem_fcn; break; case 11: elem_names_ext = nas_esm_elem_strings_ext; elem_ett = ett_nas_eps_esm_elem ; elem_funcs = esm_elem_fcn; break; case 12: elem_names_ext = sgsap_elem_strings_ext; elem_ett = ett_sgsap_elem; elem_funcs = sgsap_elem_fcn; break; case 13: elem_names_ext = bssgp_elem_strings_ext ; elem_ett = ett_bssgp_elem; elem_funcs = bssgp_elem_fcn; break ; case 14: elem_names_ext = gmr1_ie_common_strings_ext; elem_ett = ett_gmr1_ie_common; elem_funcs = gmr1_ie_common_func; break ; case 15: elem_names_ext = gmr1_ie_rr_strings_ext; elem_ett = ett_gmr1_ie_rr; elem_funcs = gmr1_ie_rr_func; break; case 16 : elem_names_ext = nas_5gs_common_elem_strings_ext; elem_ett = ett_nas_5gs_common_elem; elem_funcs = nas_5gs_common_elem_fcn ; break; case 17: elem_names_ext = nas_5gs_mm_elem_strings_ext ; elem_ett = ett_nas_5gs_mm_elem; elem_funcs = nas_5gs_mm_elem_fcn ; break; case 18: elem_names_ext = nas_5gs_sm_elem_strings_ext ; elem_ett = ett_nas_5gs_sm_elem; elem_funcs = nas_5gs_sm_elem_fcn ; break; case 19: elem_names_ext = nas_5gs_updp_elem_strings_ext ; elem_ett = ett_nas_5gs_updp_elem; elem_funcs = nas_5gs_updp_elem_fcn ; break; default: proto_tree_add_expert_format(tree, pinfo, & ei_gsm_a_unknown_pdu_type, tvb, curr_offset, -1, "Unknown PDU type (%u) gsm_a_common" , pdu_type); return(consumed); }; |
2018 | |
2019 | elem_name = try_val_to_str_ext(idx, &elem_names_ext); |
2020 | |
2021 | if (elem_name == NULL((void*)0) || elem_funcs[idx] == NULL((void*)0)) |
2022 | { |
2023 | /* BAD THING, CANNOT DETERMINE LENGTH */ |
2024 | proto_tree_add_expert(tree, pinfo, &ei_gsm_a_no_element_dissector, tvb, curr_offset, 1); |
2025 | |
2026 | consumed = 1; |
2027 | } |
2028 | else |
2029 | { |
2030 | char *a_add_string; |
2031 | |
2032 | subtree = |
2033 | proto_tree_add_subtree_format(tree, |
2034 | tvb, curr_offset, 0, |
2035 | elem_ett[idx], &item, "%s%s", elem_name, |
2036 | (name_add == NULL((void*)0)) || (name_add[0] == '\0') ? "" : name_add); |
2037 | |
2038 | a_add_string= (char*)wmem_alloc(pinfo->pool, 1024); |
2039 | a_add_string[0] = '\0'; |
2040 | consumed = (*elem_funcs[idx])(tvb, subtree, pinfo, curr_offset, -1, a_add_string, 1024); |
2041 | if (a_add_string[0] != '\0') |
2042 | { |
2043 | proto_item_append_text(item, "%s", a_add_string); |
2044 | } |
2045 | proto_item_set_len(item, consumed); |
2046 | } |
2047 | |
2048 | return (consumed); |
2049 | } |
2050 | |
2051 | /* |
2052 | * Short Value (V_SHORT) element dissector |
2053 | * |
2054 | * nibble is used in this function to indicate right or left nibble of the octet |
2055 | * This is expected to be used right nibble first, as the tables of 24.008. |
2056 | */ |
2057 | |
2058 | uint16_t elem_v_short(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, int pdu_type, int idx, uint32_t offset, uint32_t nibble) |
2059 | { |
2060 | uint16_t consumed = 1; |
2061 | uint32_t curr_offset; |
2062 | proto_tree *subtree; |
2063 | proto_item *item; |
2064 | value_string_ext elem_names_ext; |
2065 | int *elem_ett; |
2066 | elem_fcn *elem_funcs; |
2067 | char *a_add_string; |
2068 | const char *elem_name; |
2069 | |
2070 | curr_offset = offset; |
2071 | |
2072 | SET_ELEM_VARS(pdu_type, elem_names_ext, elem_ett, elem_funcs, &ei_gsm_a_unknown_pdu_type)switch (pdu_type) { case 0: elem_names_ext = gsm_bssmap_elem_strings_ext ; elem_ett = ett_gsm_bssmap_elem; elem_funcs = bssmap_elem_fcn ; break; case 1: elem_names_ext = gsm_dtap_elem_strings_ext; elem_ett = ett_gsm_dtap_elem; elem_funcs = dtap_elem_fcn; break; case 2: elem_names_ext = gsm_rp_elem_strings_ext; elem_ett = ett_gsm_rp_elem ; elem_funcs = rp_elem_fcn; break; case 3: elem_names_ext = gsm_rr_elem_strings_ext ; elem_ett = ett_gsm_rr_elem; elem_funcs = rr_elem_fcn; break ; case 4: elem_names_ext = gsm_common_elem_strings_ext; elem_ett = ett_gsm_common_elem; elem_funcs = common_elem_fcn; break; case 5: elem_names_ext = gsm_gm_elem_strings_ext; elem_ett = ett_gsm_gm_elem ; elem_funcs = gm_elem_fcn; break; case 6: elem_names_ext = gsm_bsslap_elem_strings_ext ; elem_ett = ett_gsm_bsslap_elem; elem_funcs = bsslap_elem_fcn ; break; case 8: elem_names_ext = gsm_bssmap_le_elem_strings_ext ; elem_ett = ett_gsm_bssmap_le_elem; elem_funcs = bssmap_le_elem_fcn ; break; case 9: elem_names_ext = nas_eps_common_elem_strings_ext ; elem_ett = ett_nas_eps_common_elem; elem_funcs = nas_eps_common_elem_fcn ; break; case 10: elem_names_ext = nas_emm_elem_strings_ext; elem_ett = ett_nas_eps_emm_elem; elem_funcs = emm_elem_fcn; break; case 11: elem_names_ext = nas_esm_elem_strings_ext; elem_ett = ett_nas_eps_esm_elem ; elem_funcs = esm_elem_fcn; break; case 12: elem_names_ext = sgsap_elem_strings_ext; elem_ett = ett_sgsap_elem; elem_funcs = sgsap_elem_fcn; break; case 13: elem_names_ext = bssgp_elem_strings_ext ; elem_ett = ett_bssgp_elem; elem_funcs = bssgp_elem_fcn; break ; case 14: elem_names_ext = gmr1_ie_common_strings_ext; elem_ett = ett_gmr1_ie_common; elem_funcs = gmr1_ie_common_func; break ; case 15: elem_names_ext = gmr1_ie_rr_strings_ext; elem_ett = ett_gmr1_ie_rr; elem_funcs = gmr1_ie_rr_func; break; case 16 : elem_names_ext = nas_5gs_common_elem_strings_ext; elem_ett = ett_nas_5gs_common_elem; elem_funcs = nas_5gs_common_elem_fcn ; break; case 17: elem_names_ext = nas_5gs_mm_elem_strings_ext ; elem_ett = ett_nas_5gs_mm_elem; elem_funcs = nas_5gs_mm_elem_fcn ; break; case 18: elem_names_ext = nas_5gs_sm_elem_strings_ext ; elem_ett = ett_nas_5gs_sm_elem; elem_funcs = nas_5gs_sm_elem_fcn ; break; case 19: elem_names_ext = nas_5gs_updp_elem_strings_ext ; elem_ett = ett_nas_5gs_updp_elem; elem_funcs = nas_5gs_updp_elem_fcn ; break; default: proto_tree_add_expert_format(tree, pinfo, & ei_gsm_a_unknown_pdu_type, tvb, curr_offset, -1, "Unknown PDU type (%u) gsm_a_common" , pdu_type); return(consumed); }; |
2073 | |
2074 | elem_name = try_val_to_str_ext(idx, &elem_names_ext); |
2075 | |
2076 | /* idx is out of range */ |
2077 | if (elem_name == NULL((void*)0)) { |
2078 | proto_tree_add_expert(tree, pinfo, &ei_gsm_a_unknown_element, |
2079 | tvb, curr_offset, 0); |
2080 | return consumed; |
2081 | } |
2082 | |
2083 | subtree = proto_tree_add_subtree(tree, tvb, curr_offset, 0, elem_ett[idx], &item, elem_name); |
2084 | |
2085 | a_add_string= (char*)wmem_alloc(pinfo->pool, 1024); |
2086 | a_add_string[0] = '\0'; |
2087 | |
2088 | if (elem_funcs[idx] == NULL((void*)0)) |
2089 | { |
2090 | /* NOT NECESSARILY A BAD THING - LENGTH IS HALF OCTET */ |
2091 | (void)de_spare_nibble(tvb, subtree, pinfo, curr_offset, nibble, a_add_string, 1024); |
2092 | } |
2093 | else |
2094 | { |
2095 | (void)(*elem_funcs[idx])(tvb, subtree, pinfo, curr_offset, nibble, a_add_string, 1024); |
2096 | } |
2097 | |
2098 | if (a_add_string[0] != '\0') |
2099 | { |
2100 | proto_item_append_text(item, "%s", a_add_string); |
2101 | } |
2102 | proto_item_set_len(item, consumed); |
2103 | |
2104 | return consumed; |
2105 | } |
2106 | |
2107 | |
2108 | static dgt_set_t Dgt1_9_bcd = { |
2109 | { |
2110 | /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */ |
2111 | '0','1','2','3','4','5','6','7','8','9','?','?','?','?','?','?' |
2112 | } |
2113 | }; |
2114 | |
2115 | /* FUNCTIONS */ |
2116 | |
2117 | /* 3GPP TS 24.008 |
2118 | * [3] 10.5.1.1 Cell Identity |
2119 | */ |
2120 | uint16_t |
2121 | de_cell_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string, int string_len) |
2122 | { |
2123 | uint32_t curr_offset; |
2124 | |
2125 | curr_offset = offset; |
2126 | |
2127 | curr_offset += |
2128 | /* 0x02 CI */ |
2129 | be_cell_id_aux(tvb, tree, pinfo, offset, len, add_string, string_len, 0x02); |
2130 | |
2131 | /* no length check possible */ |
2132 | |
2133 | return (curr_offset - offset); |
2134 | } |
2135 | /* |
2136 | * 10.5.1.2 Ciphering Key Sequence Number |
2137 | */ |
2138 | |
2139 | |
2140 | /* |
2141 | * Key sequence (octet 1) |
2142 | * Bits |
2143 | * 3 2 1 |
2144 | * 0 0 0 |
2145 | * through |
2146 | * 1 1 0 |
2147 | * Possible values for the ciphering key sequence number |
2148 | * 1 1 1 No key is available (MS to network);Reserved (network to MS) |
2149 | */ |
2150 | |
2151 | static const value_string gsm_a_key_seq_vals[] = { |
2152 | { 0, "Ciphering key sequence number"}, |
2153 | { 1, "Ciphering key sequence number"}, |
2154 | { 2, "Ciphering key sequence number"}, |
2155 | { 3, "Ciphering key sequence number"}, |
2156 | { 4, "Ciphering key sequence number"}, |
2157 | { 5, "Ciphering key sequence number"}, |
2158 | { 6, "Ciphering key sequence number"}, |
2159 | { 7, "No key is available (MS to network)"}, |
2160 | { 0, NULL((void*)0) } |
2161 | }; |
2162 | |
2163 | static uint16_t |
2164 | de_ciph_key_seq_num( tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U___attribute__((unused)), uint32_t offset, unsigned len, char *add_string _U___attribute__((unused)), int string_len _U___attribute__((unused))) |
2165 | { |
2166 | uint32_t curr_offset, bit_offset; |
2167 | |
2168 | curr_offset = offset; |
2169 | |
2170 | if (RIGHT_NIBBLE(1) == len) |
2171 | bit_offset = 4; |
2172 | else |
2173 | bit_offset = 0; |
2174 | |
2175 | proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset<<3)+bit_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2176 | proto_tree_add_bits_item(tree, hf_gsm_a_key_seq, tvb, (curr_offset<<3)+bit_offset+1, 3, ENC_BIG_ENDIAN0x00000000); |
2177 | curr_offset++; |
2178 | |
2179 | return (curr_offset - offset); |
2180 | } |
2181 | |
2182 | |
2183 | /* |
2184 | * [3] 10.5.1.3 |
2185 | */ |
2186 | |
2187 | uint16_t |
2188 | de_lai(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len _U___attribute__((unused)), char *add_string _U___attribute__((unused)), int string_len _U___attribute__((unused))) |
2189 | { |
2190 | uint16_t value; |
2191 | uint32_t curr_offset; |
2192 | proto_tree *subtree; |
2193 | proto_item *item; |
2194 | char *mcc_mnc_str; |
2195 | |
2196 | curr_offset = offset; |
2197 | |
2198 | subtree = proto_tree_add_subtree(tree, |
2199 | tvb, curr_offset, 5, ett_gsm_common_elem[DE_LAI], &item, |
2200 | val_to_str_ext_const(DE_LAI, &gsm_common_elem_strings_ext, "")); |
2201 | |
2202 | mcc_mnc_str = dissect_e212_mcc_mnc_wmem_packet_str(tvb, pinfo, subtree, curr_offset, E212_LAI, true1); |
2203 | |
2204 | curr_offset += 3; |
2205 | |
2206 | value = tvb_get_ntohs(tvb, curr_offset); |
2207 | |
2208 | proto_tree_add_item(subtree, hf_gsm_a_lac, tvb, curr_offset, 2, ENC_BIG_ENDIAN0x00000000); |
2209 | |
2210 | proto_item_append_text(item, " - %s, LAC %u", mcc_mnc_str, value); |
2211 | |
2212 | curr_offset += 2; |
2213 | |
2214 | /* no length check possible */ |
2215 | |
2216 | return (curr_offset - offset); |
2217 | } |
2218 | |
2219 | /* |
2220 | * [3] 10.5.1.4 Mobile Identity |
2221 | * 3GPP TS 24.008 version 7.8.0 Release 7 |
2222 | */ |
2223 | |
2224 | uint16_t |
2225 | de_mid(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string, int string_len) |
2226 | { |
2227 | uint8_t oct; |
2228 | uint32_t curr_offset; |
2229 | uint32_t value; |
2230 | bool_Bool odd; |
2231 | const char *digit_str; |
2232 | proto_item* ti; |
2233 | |
2234 | curr_offset = offset; |
2235 | |
2236 | oct = tvb_get_uint8(tvb, curr_offset); |
2237 | |
2238 | switch (oct & 0x07) |
2239 | { |
2240 | case 0: /* No Identity */ |
2241 | proto_tree_add_item(tree, hf_gsm_a_unused, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2242 | proto_tree_add_item(tree, hf_gsm_a_odd_even_ind, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2243 | proto_tree_add_item(tree, hf_gsm_a_mobile_identity_type, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2244 | |
2245 | if (add_string) |
2246 | snprintf(add_string, string_len, " - No Identity Code"); |
2247 | |
2248 | curr_offset++; |
2249 | |
2250 | if (len != 1 && len != 3) |
2251 | { |
2252 | expert_add_info(pinfo, tree, &ei_gsm_a_format_not_supported); |
2253 | } |
2254 | |
2255 | curr_offset += len - 1; |
2256 | break; |
2257 | |
2258 | case 3: /* IMEISV */ |
2259 | /* FALLTHRU */ |
2260 | |
2261 | case 1: /* IMSI */ |
2262 | odd = oct & 0x08; |
2263 | proto_tree_add_item(tree, hf_gsm_a_id_dig_1, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2264 | proto_tree_add_item(tree, hf_gsm_a_odd_even_ind, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2265 | proto_tree_add_item(tree, hf_gsm_a_mobile_identity_type, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2266 | |
2267 | if (curr_offset - offset >= len) /* Sanity check */ |
2268 | return (curr_offset - offset); |
2269 | |
2270 | if((oct & 0x07) == 3){ |
2271 | /* imeisv */ |
2272 | digit_str = tvb_bcd_dig_to_str(pinfo->pool, tvb ,curr_offset , len - (curr_offset - offset), NULL((void*)0), true1); |
2273 | proto_tree_add_string_format(tree, |
2274 | hf_gsm_a_imeisv, |
2275 | tvb, curr_offset, len - (curr_offset - offset), |
2276 | digit_str, |
2277 | "BCD Digits: %s", |
2278 | digit_str); |
2279 | }else{ |
2280 | digit_str = dissect_e212_imsi(tvb, pinfo, tree, curr_offset, len - (curr_offset - offset), true1); |
2281 | } |
2282 | |
2283 | if (sccp_assoc && ! sccp_assoc->calling_party) { |
2284 | sccp_assoc->calling_party = wmem_strdup_printf(wmem_file_scope(), |
2285 | ((oct & 0x07) == 3) ? "IMEISV: %s" : "IMSI: %s", |
2286 | digit_str ); |
2287 | } |
2288 | |
2289 | if (add_string) |
2290 | snprintf(add_string, string_len, " - %s (%s)", |
2291 | ((oct & 0x07) == 3) ? "IMEISV" : "IMSI", |
2292 | digit_str); |
2293 | |
2294 | curr_offset += len - (curr_offset - offset); |
2295 | |
2296 | if (!odd) |
2297 | { |
2298 | proto_tree_add_item(tree, hf_gsm_a_filler, tvb, curr_offset - 1, 1, ENC_NA0x00000000); |
2299 | } |
2300 | break; |
2301 | |
2302 | case 2: /* IMEI */ |
2303 | proto_tree_add_uint_format_value(tree, hf_gsm_a_identity_digit1, tvb, curr_offset, 1, oct, "%c", Dgt1_9_bcd.out[(oct & 0xf0) >> 4]); |
2304 | |
2305 | proto_tree_add_item(tree, hf_gsm_a_odd_even_ind, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2306 | |
2307 | proto_tree_add_item(tree, hf_gsm_a_mobile_identity_type, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2308 | |
2309 | if (curr_offset - offset >= len) /* Sanity check */ |
2310 | return (curr_offset - offset); |
2311 | |
2312 | digit_str = tvb_bcd_dig_to_str(pinfo->pool, tvb, curr_offset, len - (curr_offset - offset), NULL((void*)0), true1); |
2313 | |
2314 | proto_tree_add_string_format(tree, |
2315 | hf_gsm_a_imei, |
2316 | tvb, curr_offset, len - (curr_offset - offset), |
2317 | digit_str, |
2318 | "BCD Digits: %s", |
2319 | digit_str); |
2320 | |
2321 | if (add_string) |
2322 | snprintf(add_string, string_len, " - IMEI (%s)", digit_str); |
2323 | |
2324 | curr_offset += len - (curr_offset - offset); |
2325 | break; |
2326 | |
2327 | case 4: /* TMSI/P-TMSI/M-TMSI */ |
2328 | proto_tree_add_item(tree, hf_gsm_a_unused, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2329 | proto_tree_add_item(tree, hf_gsm_a_odd_even_ind, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2330 | proto_tree_add_item(tree, hf_gsm_a_mobile_identity_type, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2331 | curr_offset++; |
2332 | |
2333 | proto_tree_add_item_ret_uint(tree, hf_3gpp_tmsi, tvb, curr_offset, 4, ENC_BIG_ENDIAN0x00000000, &value); |
2334 | |
2335 | if (add_string) |
2336 | snprintf(add_string, string_len, " - TMSI/P-TMSI (0x%04x)", value); |
2337 | |
2338 | curr_offset += 4; |
2339 | break; |
2340 | |
2341 | case 5: /* TMGI and optional MBMS Session Identity */ |
2342 | /* Spare bits (octet 3) Bits 8-7 */ |
2343 | proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, curr_offset<<3, 2, ENC_BIG_ENDIAN0x00000000); |
2344 | /* MBMS Session Identity indication (octet 3) Bit 6 */ |
2345 | proto_tree_add_item(tree, hf_gsm_a_mbs_ses_id_ind, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2346 | /* MCC/MNC indication (octet 3) Bit 5 */ |
2347 | proto_tree_add_item(tree, hf_gsm_a_tmgi_mcc_mnc_ind, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2348 | /* Odd/even indication (octet 3) Bit 4 */ |
2349 | proto_tree_add_item(tree, hf_gsm_a_odd_even_ind, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2350 | /* Type of identity (octet 3) Bits 3-1 */ |
2351 | proto_tree_add_item(tree, hf_gsm_a_mobile_identity_type, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2352 | curr_offset++; |
2353 | /* MBMS Service ID (octet 4, 5 and 6) */ |
2354 | proto_tree_add_item(tree, hf_gsm_a_mbs_service_id, tvb, curr_offset, 3, ENC_BIG_ENDIAN0x00000000); |
2355 | curr_offset += 3; |
2356 | if ((oct&0x10) == 0x10) { |
2357 | /* MCC/MNC*/ |
2358 | /* MCC, Mobile country code (octet 6a, octet 6b bits 1 to 4)*/ |
2359 | /* MNC, Mobile network code (octet 6b bits 5 to 8, octet 6c) */ |
2360 | curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, tree, curr_offset, E212_NONE, true1); |
2361 | } |
2362 | if ((oct&0x20) == 0x20) { |
2363 | /* MBMS Session Identity (octet 7) |
2364 | * The MBMS Session Identity field is encoded as the value part |
2365 | * of the MBMS Session Identity IE as specified in 3GPP TS 48.018 [86]. |
2366 | */ |
2367 | proto_tree_add_item(tree, hf_gsm_a_mbs_session_id, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2368 | curr_offset++; |
2369 | } |
2370 | break; |
2371 | |
2372 | default: /* Reserved */ |
2373 | proto_tree_add_item(tree, hf_gsm_a_odd_even_ind, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2374 | ti = proto_tree_add_item(tree, hf_gsm_a_mobile_identity_type, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2375 | expert_add_info_format(pinfo, ti, &ei_gsm_a_mobile_identity_type, "Unknown format %u", (oct & 0x07)); |
2376 | |
2377 | if (add_string) |
2378 | snprintf(add_string, string_len, " - Format Unknown"); |
2379 | |
2380 | curr_offset += len; |
2381 | break; |
2382 | } |
2383 | |
2384 | EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_extraneous_data)if ((len) > (curr_offset - offset)) { proto_tree_add_expert (tree, pinfo, &ei_gsm_a_extraneous_data, tvb, curr_offset , (len) - (curr_offset - offset)); curr_offset += ((len) - (curr_offset - offset)); }; |
2385 | |
2386 | return (curr_offset - offset); |
2387 | } |
2388 | |
2389 | /* |
2390 | * [3] 10.5.1.5 |
2391 | */ |
2392 | uint16_t |
2393 | de_ms_cm_1(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U___attribute__((unused)), uint32_t offset, unsigned len _U___attribute__((unused)), char *add_string _U___attribute__((unused)), int string_len _U___attribute__((unused))) |
2394 | { |
2395 | uint32_t curr_offset; |
2396 | proto_tree *subtree; |
2397 | |
2398 | curr_offset = offset; |
2399 | |
2400 | subtree = |
2401 | proto_tree_add_subtree(tree, |
2402 | tvb, curr_offset, 1, ett_gsm_common_elem[DE_MS_CM_1], NULL((void*)0), |
2403 | val_to_str_ext_const(DE_MS_CM_1, &gsm_common_elem_strings_ext, "")); |
2404 | |
2405 | proto_tree_add_item(subtree, hf_gsm_a_b8spare, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2406 | |
2407 | proto_tree_add_item(subtree, hf_gsm_a_MSC_rev, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2408 | |
2409 | proto_tree_add_item(subtree, hf_gsm_a_ES_IND, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2410 | |
2411 | proto_tree_add_item(subtree, hf_gsm_a_A5_1_algorithm_sup, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2412 | |
2413 | proto_tree_add_item(subtree, hf_gsm_a_RF_power_capability, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2414 | |
2415 | curr_offset++; |
2416 | |
2417 | /* no length check possible */ |
2418 | |
2419 | return (curr_offset - offset); |
2420 | } |
2421 | |
2422 | /* |
2423 | * [3] 10.5.1.6 Mobile Station Classmark 2 |
2424 | * 3GPP TS 24.008 version 7.8.0 Release 7 |
2425 | */ |
2426 | uint16_t |
2427 | de_ms_cm_2(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U___attribute__((unused)), int string_len _U___attribute__((unused))) |
2428 | { |
2429 | uint32_t curr_offset; |
2430 | curr_offset = offset; |
2431 | |
2432 | proto_tree_add_item(tree, hf_gsm_a_b8spare, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2433 | |
2434 | proto_tree_add_item(tree, hf_gsm_a_MSC_rev, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2435 | |
2436 | proto_tree_add_item(tree, hf_gsm_a_ES_IND, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2437 | |
2438 | proto_tree_add_item(tree, hf_gsm_a_A5_1_algorithm_sup, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2439 | |
2440 | proto_tree_add_item(tree, hf_gsm_a_RF_power_capability, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2441 | |
2442 | curr_offset++; |
2443 | |
2444 | NO_MORE_DATA_CHECK(len)if ((len) <= (curr_offset - offset)) return(len);; |
2445 | |
2446 | proto_tree_add_item(tree, hf_gsm_a_b8spare, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2447 | |
2448 | proto_tree_add_item(tree, hf_gsm_a_ps_sup_cap, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2449 | |
2450 | proto_tree_add_item(tree, hf_gsm_a_SS_screening_indicator, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2451 | |
2452 | /* SM capability (MT SMS pt to pt capability) (octet 4)*/ |
2453 | proto_tree_add_item(tree, hf_gsm_a_SM_capability, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2454 | /* VBS notification reception (octet 4) */ |
2455 | proto_tree_add_item(tree, hf_gsm_a_VBS_notification_rec, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2456 | /*VGCS notification reception (octet 4)*/ |
2457 | proto_tree_add_item(tree, hf_gsm_a_VGCS_notification_rec, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2458 | /* FC Frequency Capability (octet 4 ) */ |
2459 | proto_tree_add_item(tree, hf_gsm_a_FC_frequency_cap, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2460 | |
2461 | curr_offset++; |
2462 | |
2463 | NO_MORE_DATA_CHECK(len)if ((len) <= (curr_offset - offset)) return(len);; |
2464 | |
2465 | /* CM3 (octet 5, bit 8) */ |
2466 | proto_tree_add_item(tree, hf_gsm_a_CM3, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2467 | /* spare bit 7 */ |
2468 | proto_tree_add_item(tree, hf_gsm_a_b7spare, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2469 | /* LCS VA capability (LCS value added location request notification capability) (octet 5,bit 6) */ |
2470 | proto_tree_add_item(tree, hf_gsm_a_LCS_VA_cap, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2471 | /* UCS2 treatment (octet 5, bit 5) */ |
2472 | proto_tree_add_item(tree, hf_gsm_a_UCS2_treatment, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2473 | /* SoLSA (octet 5, bit 4) */ |
2474 | proto_tree_add_item(tree, hf_gsm_a_SoLSA, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2475 | /* CMSP: CM Service Prompt (octet 5, bit 3) */ |
2476 | proto_tree_add_item(tree, hf_gsm_a_CMSP, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2477 | /* A5/3 algorithm supported (octet 5, bit 2) */ |
2478 | proto_tree_add_item(tree, hf_gsm_a_A5_3_algorithm_sup, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2479 | /* A5/2 algorithm supported (octet 5, bit 1) */ |
2480 | proto_tree_add_item(tree, hf_gsm_a_A5_2_algorithm_sup, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2481 | |
2482 | curr_offset++; |
2483 | |
2484 | EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_extraneous_data)if ((len) > (curr_offset - offset)) { proto_tree_add_expert (tree, pinfo, &ei_gsm_a_extraneous_data, tvb, curr_offset , (len) - (curr_offset - offset)); curr_offset += ((len) - (curr_offset - offset)); }; |
2485 | |
2486 | return (curr_offset - offset); |
2487 | } |
2488 | |
2489 | /* |
2490 | * [3] 10.5.1.7 Mobile Station Classmark 3 |
2491 | * 3GPP TS 24.008 version 12.10.0 Release 12 |
2492 | */ |
2493 | #define AVAILABLE_BITS_CHECK(n)bits_left = ((len + offset) << 3) - bit_offset; if (bits_left < (n)) { if (bits_left > 0) proto_tree_add_bits_item(tree , hf_gsm_a_spare_bits, tvb, bit_offset, bits_left, 0x00000000 ); else if (bits_left < 0) proto_tree_add_expert(tree, pinfo , &ei_gsm_a_ie_length_too_short, tvb, offset, len); return len; } \ |
2494 | bits_left = ((len + offset) << 3) - bit_offset; \ |
2495 | if (bits_left < (n)) { \ |
2496 | if (bits_left > 0) \ |
2497 | proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, bits_left, ENC_BIG_ENDIAN0x00000000); \ |
2498 | else if (bits_left < 0) \ |
2499 | proto_tree_add_expert(tree, pinfo, &ei_gsm_a_ie_length_too_short, tvb, offset, len); \ |
2500 | return len; \ |
2501 | } |
2502 | |
2503 | uint16_t |
2504 | de_ms_cm_3(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U___attribute__((unused)), int string_len _U___attribute__((unused))) |
2505 | { |
2506 | uint32_t curr_offset; |
2507 | uint32_t bit_offset; /* Offset in bits */ |
2508 | uint8_t length; |
2509 | proto_tree *subtree; |
2510 | proto_item *item; |
2511 | int32_t bits_left; |
2512 | uint32_t target_bit_offset, old_bit_offset; |
2513 | uint64_t multi_bnd_sup_fields, rsupport, multislotCapability; |
2514 | uint64_t msMeasurementCapability, msPosMethodCapPresent; |
2515 | uint64_t ecsdMultiSlotCapability, eightPskStructPresent, eightPskStructRfPowerCapPresent; |
2516 | uint64_t gsm400BandInfoPresent, gsm850AssocRadioCapabilityPresent; |
2517 | uint64_t gsm1900AssocRadioCapabilityPresent, dtmEGprsMultiSlotInfoPresent; |
2518 | uint64_t dtmEgprsMultiSlotClassPresent, singleBandSupport; |
2519 | uint64_t gsm750AssocRadioCapabilityPresent, extDtmEGprsMultiSlotInfoPresent; |
2520 | uint64_t highMultislotCapPresent, geranIuModeSupport; |
2521 | uint64_t tGsm400BandInfoPresent, tGsm900AssocRadioCapabilityPresent, dtmEGprsHighMultiSlotInfoPresent; |
2522 | uint64_t dtmEgprsHighMultiSlotClassPresent, gsm710AssocRadioCapabilityPresent; |
2523 | uint64_t tGsm810AssocRadioCapabilityPresent; |
2524 | |
2525 | curr_offset = offset; |
2526 | |
2527 | bit_offset = curr_offset << 3; |
2528 | |
2529 | /* Spare bit */ |
2530 | proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2531 | bit_offset++; |
2532 | |
2533 | /* Multiband supported field |
2534 | * { < Multiband supported : { 000 } > |
2535 | * < A5 bits > |
2536 | * | < Multiband supported : { 101 | 110 } > |
2537 | * < A5 bits > |
2538 | * < Associated Radio Capability 2 : bit(4) > |
2539 | * < Associated Radio Capability 1 : bit(4) > |
2540 | * | < Multiband supported : { 001 | 010 | 100 } > |
2541 | * < A5 bits > |
2542 | * < spare bit >(4) |
2543 | * < Associated Radio Capability 1 : bit(4) > } |
2544 | */ |
2545 | |
2546 | 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_ENDIAN0x00000000); |
2547 | subtree = proto_item_add_subtree(item, ett_gsm_common_elem[DE_MS_CM_3]); |
2548 | |
2549 | proto_tree_add_bits_item(subtree, hf_gsm_a_gsm1800_supported, tvb, bit_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2550 | bit_offset++; |
2551 | |
2552 | proto_tree_add_bits_item(subtree, hf_gsm_a_egsm_supported, tvb, bit_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2553 | bit_offset++; |
2554 | |
2555 | proto_tree_add_bits_item(subtree, hf_gsm_a_pgsm_supported, tvb, bit_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2556 | bit_offset++; |
2557 | |
2558 | item = proto_tree_add_bits_item(tree, hf_gsm_a_cm3_A5_bits, tvb, bit_offset, 4, ENC_BIG_ENDIAN0x00000000); |
2559 | subtree = proto_item_add_subtree(item, ett_gsm_common_elem[DE_MS_CM_3]); |
2560 | |
2561 | /* < A5 bits > */ |
2562 | proto_tree_add_bits_item(subtree, hf_gsm_a_A5_7_algorithm_sup, tvb, bit_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2563 | bit_offset++; |
2564 | proto_tree_add_bits_item(subtree, hf_gsm_a_A5_6_algorithm_sup, tvb, bit_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2565 | bit_offset++; |
2566 | proto_tree_add_bits_item(subtree, hf_gsm_a_A5_5_algorithm_sup, tvb, bit_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2567 | bit_offset++; |
2568 | proto_tree_add_bits_item(subtree, hf_gsm_a_A5_4_algorithm_sup, tvb, bit_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2569 | bit_offset++; |
2570 | |
2571 | switch (multi_bnd_sup_fields) { |
2572 | case 0: |
2573 | /* A5 bits dissected is done */ |
2574 | break; |
2575 | /* |
2576 | * | < Multiband supported : { 001 | 010 | 100 } > |
2577 | */ |
2578 | case 1: |
2579 | case 2: |
2580 | case 4: |
2581 | /* < spare bit >(4) */ |
2582 | proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, 4, ENC_BIG_ENDIAN0x00000000); |
2583 | bit_offset += 4; |
2584 | /* < Associated Radio Capability 1 : bit(4) > */ |
2585 | proto_tree_add_bits_item(tree, hf_gsm_a_ass_radio_cap1, tvb, bit_offset, 4, ENC_BIG_ENDIAN0x00000000); |
2586 | bit_offset += 4; |
2587 | break; |
2588 | /* < Multiband supported : { 101 | 110 } > */ |
2589 | case 5: |
2590 | /* fall trough */ |
2591 | case 6: |
2592 | /* < Associated Radio Capability 2 : bit(4) > */ |
2593 | proto_tree_add_bits_item(tree, hf_gsm_a_ass_radio_cap2, tvb, bit_offset, 4, ENC_BIG_ENDIAN0x00000000); |
2594 | bit_offset += 4; |
2595 | /* < Associated Radio Capability 1 : bit(4) > */ |
2596 | proto_tree_add_bits_item(tree, hf_gsm_a_ass_radio_cap1, tvb, bit_offset, 4, ENC_BIG_ENDIAN0x00000000); |
2597 | bit_offset += 4; |
2598 | break; |
2599 | default: |
2600 | break; |
2601 | } |
2602 | /* Extract R Support */ |
2603 | AVAILABLE_BITS_CHECK(1)bits_left = ((len + offset) << 3) - bit_offset; if (bits_left < (1)) { if (bits_left > 0) proto_tree_add_bits_item(tree , hf_gsm_a_spare_bits, tvb, bit_offset, bits_left, 0x00000000 ); else if (bits_left < 0) proto_tree_add_expert(tree, pinfo , &ei_gsm_a_ie_length_too_short, tvb, offset, len); return len; }; |
2604 | proto_tree_add_bits_ret_val(tree, hf_gsm_a_rsupport, tvb, bit_offset, 1, &rsupport, ENC_BIG_ENDIAN0x00000000); |
2605 | bit_offset++; |
2606 | |
2607 | if (rsupport == 1) |
2608 | { |
2609 | /* |
2610 | * { 0 | 1 < R Support > } |
2611 | * Extract R Capabilities |
2612 | */ |
2613 | proto_tree_add_bits_item(tree, hf_gsm_a_r_capabilities, tvb, bit_offset, 3, ENC_BIG_ENDIAN0x00000000); |
2614 | bit_offset = bit_offset + 3; |
2615 | } |
2616 | |
2617 | /* |
2618 | * { 0 | 1 < HSCSD Multi Slot Capability > } |
2619 | * Extract Multislot capability |
2620 | */ |
2621 | AVAILABLE_BITS_CHECK(1)bits_left = ((len + offset) << 3) - bit_offset; if (bits_left < (1)) { if (bits_left > 0) proto_tree_add_bits_item(tree , hf_gsm_a_spare_bits, tvb, bit_offset, bits_left, 0x00000000 ); else if (bits_left < 0) proto_tree_add_expert(tree, pinfo , &ei_gsm_a_ie_length_too_short, tvb, offset, len); return len; }; |
2622 | proto_tree_add_bits_ret_val(tree, hf_gsm_a_multislot_capabilities, tvb, bit_offset, 1, &multislotCapability, ENC_BIG_ENDIAN0x00000000); |
2623 | bit_offset++; |
2624 | |
2625 | if (multislotCapability == 1) |
2626 | { |
2627 | /* Extract Multislot Class */ |
2628 | proto_tree_add_bits_item(tree, hf_gsm_a_multislot_class, tvb, bit_offset, 5, ENC_BIG_ENDIAN0x00000000); |
2629 | bit_offset = bit_offset + 5; |
2630 | } |
2631 | |
2632 | /* < UCS2 treatment: bit > */ |
2633 | AVAILABLE_BITS_CHECK(1)bits_left = ((len + offset) << 3) - bit_offset; if (bits_left < (1)) { if (bits_left > 0) proto_tree_add_bits_item(tree , hf_gsm_a_spare_bits, tvb, bit_offset, bits_left, 0x00000000 ); else if (bits_left < 0) proto_tree_add_expert(tree, pinfo , &ei_gsm_a_ie_length_too_short, tvb, offset, len); return len; }; |
2634 | proto_tree_add_bits_item(tree, hf_gsm_a_ucs2_treatment, tvb, bit_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2635 | bit_offset = bit_offset + 1; |
2636 | |
2637 | /* < Extended Measurement Capability : bit > */ |
2638 | AVAILABLE_BITS_CHECK(1)bits_left = ((len + offset) << 3) - bit_offset; if (bits_left < (1)) { if (bits_left > 0) proto_tree_add_bits_item(tree , hf_gsm_a_spare_bits, tvb, bit_offset, bits_left, 0x00000000 ); else if (bits_left < 0) proto_tree_add_expert(tree, pinfo , &ei_gsm_a_ie_length_too_short, tvb, offset, len); return len; }; |
2639 | proto_tree_add_bits_item(tree, hf_gsm_a_extended_measurement_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2640 | bit_offset = bit_offset + 1; |
2641 | |
2642 | /* { 0 | 1 < MS measurement capability > } |
2643 | * Extract MS Measurement capability |
2644 | */ |
2645 | AVAILABLE_BITS_CHECK(1)bits_left = ((len + offset) << 3) - bit_offset; if (bits_left < (1)) { if (bits_left > 0) proto_tree_add_bits_item(tree , hf_gsm_a_spare_bits, tvb, bit_offset, bits_left, 0x00000000 ); else if (bits_left < 0) proto_tree_add_expert(tree, pinfo , &ei_gsm_a_ie_length_too_short, tvb, offset, len); return len; }; |
2646 | proto_tree_add_bits_ret_val(tree, hf_gsm_a_ms_measurement_capability, tvb, bit_offset, 1, &msMeasurementCapability, ENC_BIG_ENDIAN0x00000000); |
2647 | bit_offset = bit_offset + 1; |
2648 | |
2649 | if (msMeasurementCapability == 1) |
2650 | { |
2651 | /* Extract SMS Value n/4 */ |
2652 | proto_tree_add_bits_item(tree, hf_gsm_a_sms_value, tvb, bit_offset, 4, ENC_BIG_ENDIAN0x00000000); |
2653 | bit_offset = bit_offset + 4; |
2654 | |
2655 | /* Extract SM Value n/4 */ |
2656 | proto_tree_add_bits_item(tree, hf_gsm_a_sm_value, tvb, bit_offset, 4, ENC_BIG_ENDIAN0x00000000); |
2657 | bit_offset = bit_offset + 4; |
2658 | } |
2659 | |
2660 | /* { 0 | 1 < MS Positioning Method Capability > } |
2661 | * Extract MS Positioning Method Capability |
2662 | */ |
2663 | AVAILABLE_BITS_CHECK(1)bits_left = ((len + offset) << 3) - bit_offset; if (bits_left < (1)) { if (bits_left > 0) proto_tree_add_bits_item(tree , hf_gsm_a_spare_bits, tvb, bit_offset, bits_left, 0x00000000 ); else if (bits_left < 0) proto_tree_add_expert(tree, pinfo , &ei_gsm_a_ie_length_too_short, tvb, offset, len); return len; }; |
2664 | proto_tree_add_bits_ret_val(tree, hf_gsm_a_ms_pos_method_cap_present, tvb, bit_offset, 1, &msPosMethodCapPresent, ENC_BIG_ENDIAN0x00000000); |
2665 | bit_offset = bit_offset + 1; |
2666 | |
2667 | if (msPosMethodCapPresent == 1) |
2668 | { |
2669 | /* Extract MS Positioning Method */ |
2670 | item = proto_tree_add_bits_item(tree, hf_gsm_a_ms_pos_method, tvb, bit_offset, 5, ENC_BIG_ENDIAN0x00000000); |
2671 | subtree = proto_item_add_subtree(item, ett_gsm_common_elem[DE_MS_CM_3]); |
2672 | |
2673 | proto_tree_add_bits_item(subtree, hf_gsm_a_ms_assisted_e_otd, tvb, bit_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2674 | bit_offset++; |
2675 | |
2676 | proto_tree_add_bits_item(subtree, hf_gsm_a_ms_based_e_otd, tvb, bit_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2677 | bit_offset++; |
2678 | |
2679 | proto_tree_add_bits_item(subtree, hf_gsm_a_ms_assisted_gps, tvb, bit_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2680 | bit_offset++; |
2681 | |
2682 | proto_tree_add_bits_item(subtree, hf_gsm_a_ms_based_gps, tvb, bit_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2683 | bit_offset++; |
2684 | |
2685 | proto_tree_add_bits_item(subtree, hf_gsm_a_ms_conventional_gps, tvb, bit_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2686 | bit_offset++; |
2687 | } |
2688 | |
2689 | /* { 0 | 1 < ECSD Multi Slot Capability > } |
2690 | * Extract ECSD Multi Slot Capability |
2691 | */ |
2692 | AVAILABLE_BITS_CHECK(1)bits_left = ((len + offset) << 3) - bit_offset; if (bits_left < (1)) { if (bits_left > 0) proto_tree_add_bits_item(tree , hf_gsm_a_spare_bits, tvb, bit_offset, bits_left, 0x00000000 ); else if (bits_left < 0) proto_tree_add_expert(tree, pinfo , &ei_gsm_a_ie_length_too_short, tvb, offset, len); return len; }; |
2693 | proto_tree_add_bits_ret_val(tree, hf_gsm_a_ecsd_multi_slot_capability, tvb, bit_offset, 1, &ecsdMultiSlotCapability, ENC_BIG_ENDIAN0x00000000); |
2694 | bit_offset = bit_offset + 1; |
2695 | |
2696 | if (ecsdMultiSlotCapability == 1) |
2697 | { |
2698 | /* Extract ECSD Multi Slot Class */ |
2699 | proto_tree_add_bits_item(tree, hf_gsm_a_ecsd_multi_slot_class, tvb, bit_offset, 5, ENC_BIG_ENDIAN0x00000000); |
2700 | bit_offset = bit_offset + 5; |
2701 | } |
2702 | |
2703 | /* { 0 | 1 < 8-PSK Struct > } |
2704 | * Extract 8-PSK struct presence |
2705 | */ |
2706 | AVAILABLE_BITS_CHECK(1)bits_left = ((len + offset) << 3) - bit_offset; if (bits_left < (1)) { if (bits_left > 0) proto_tree_add_bits_item(tree , hf_gsm_a_spare_bits, tvb, bit_offset, bits_left, 0x00000000 ); else if (bits_left < 0) proto_tree_add_expert(tree, pinfo , &ei_gsm_a_ie_length_too_short, tvb, offset, len); return len; }; |
2707 | proto_tree_add_bits_ret_val(tree, hf_gsm_a_8_psk_struct_present, tvb, bit_offset, 1, &eightPskStructPresent, ENC_BIG_ENDIAN0x00000000); |
2708 | bit_offset = bit_offset + 1; |
2709 | |
2710 | if (eightPskStructPresent == 1) |
2711 | { |
2712 | /* At lesst Modulation Capability and cap1,cap2 present indicators are present */ |
2713 | uint8_t psk_struct_len = 3; |
2714 | uint32_t tmp_bit_offset = bit_offset; |
2715 | |
2716 | /* Check if Power Capability 1 is present */ |
2717 | tmp_bit_offset++; |
2718 | if (tvb_get_bits8(tvb,tmp_bit_offset,1) == 1){ |
2719 | psk_struct_len += 2; |
2720 | tmp_bit_offset += 2; |
2721 | } |
2722 | tmp_bit_offset++; |
2723 | /* Check if Power Capability 2 is present */ |
2724 | if (tvb_get_bits8(tvb,tmp_bit_offset,1) == 1){ |
2725 | psk_struct_len += 2; |
2726 | } |
2727 | /* Extract 8-PSK struct */ |
2728 | item = proto_tree_add_bits_item(tree, hf_gsm_a_8_psk_struct, tvb, bit_offset, psk_struct_len, ENC_BIG_ENDIAN0x00000000); |
2729 | subtree = proto_item_add_subtree(item, ett_gsm_common_elem[DE_MS_CM_3]); |
2730 | old_bit_offset = bit_offset; |
2731 | |
2732 | /* Extract Modulation Capability */ |
2733 | proto_tree_add_bits_item(subtree, hf_gsm_a_modulation_capability, tvb, bit_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2734 | bit_offset = bit_offset + 1; |
2735 | |
2736 | /* Extract 8_PSK RF Power Capability 1 */ |
2737 | proto_tree_add_bits_ret_val(subtree, hf_gsm_a_8_psk_rf_power_capability_1_present, tvb, bit_offset, |
2738 | 1, &eightPskStructRfPowerCapPresent, ENC_BIG_ENDIAN0x00000000); |
2739 | bit_offset = bit_offset + 1; |
2740 | if (eightPskStructRfPowerCapPresent == 1) |
2741 | { |
2742 | proto_tree_add_bits_item(subtree, hf_gsm_a_8_psk_rf_power_capability_1, tvb, bit_offset, 2, ENC_BIG_ENDIAN0x00000000); |
2743 | bit_offset = bit_offset + 2; |
2744 | } |
2745 | |
2746 | /* Extract 8_PSK RF Power Capability 2 */ |
2747 | proto_tree_add_bits_ret_val(subtree, hf_gsm_a_8_psk_rf_power_capability_2_present, tvb, bit_offset, |
2748 | 1, &eightPskStructRfPowerCapPresent, ENC_BIG_ENDIAN0x00000000); |
2749 | bit_offset = bit_offset + 1; |
2750 | if (eightPskStructRfPowerCapPresent == 1) |
2751 | { |
2752 | proto_tree_add_bits_item(subtree, hf_gsm_a_8_psk_rf_power_capability_2, tvb, bit_offset, 2, ENC_BIG_ENDIAN0x00000000); |
2753 | bit_offset = bit_offset + 2; |
2754 | } |
2755 | length = (uint8_t)((bit_offset - old_bit_offset)>>3); |
2756 | if ((bit_offset - old_bit_offset) & 0x07) |
2757 | length++; |
2758 | proto_item_set_len(item, length); |
2759 | } |
2760 | |
2761 | /* { 0 | 1 < GSM 400 Bands Supported : { 01 | 10 | 11 } > |
2762 | * < GSM 400 Associated Radio Capability: bit(4) > } |
2763 | * Extract GSM 400 Band Information presence |
2764 | */ |
2765 | AVAILABLE_BITS_CHECK(1)bits_left = ((len + offset) << 3) - bit_offset; if (bits_left < (1)) { if (bits_left > 0) proto_tree_add_bits_item(tree , hf_gsm_a_spare_bits, tvb, bit_offset, bits_left, 0x00000000 ); else if (bits_left < 0) proto_tree_add_expert(tree, pinfo , &ei_gsm_a_ie_length_too_short, tvb, offset, len); return len; }; |
2766 | proto_tree_add_bits_ret_val(tree, hf_gsm_a_gsm_400_band_info_present, tvb, bit_offset, 1, &gsm400BandInfoPresent, ENC_BIG_ENDIAN0x00000000); |
2767 | bit_offset = bit_offset + 1; |
2768 | |
2769 | if (gsm400BandInfoPresent == 1) |
2770 | { |
2771 | /* Extract GSM 400 Bands Supported */ |
2772 | proto_tree_add_bits_item(tree, hf_gsm_a_gsm_400_bands_supported, tvb, bit_offset, 2, ENC_BIG_ENDIAN0x00000000); |
2773 | bit_offset = bit_offset + 2; |
2774 | |
2775 | /* Extract GSM 400 Associated Radio Capability */ |
2776 | proto_tree_add_bits_item(tree, hf_gsm_a_gsm_400_assoc_radio_cap, tvb, bit_offset, 4, ENC_BIG_ENDIAN0x00000000); |
2777 | bit_offset = bit_offset + 4; |
2778 | } |
2779 | |
2780 | /* { 0 | 1 <GSM 850 Associated Radio Capability : bit(4) > } |
2781 | * Extract GSM 850 Associated Radio Capability presence |
2782 | */ |
2783 | AVAILABLE_BITS_CHECK(1)bits_left = ((len + offset) << 3) - bit_offset; if (bits_left < (1)) { if (bits_left > 0) proto_tree_add_bits_item(tree , hf_gsm_a_spare_bits, tvb, bit_offset, bits_left, 0x00000000 ); else if (bits_left < 0) proto_tree_add_expert(tree, pinfo , &ei_gsm_a_ie_length_too_short, tvb, offset, len); return len; }; |
2784 | proto_tree_add_bits_ret_val(tree, hf_gsm_a_gsm_850_assoc_radio_cap_present, tvb, bit_offset, 1, &gsm850AssocRadioCapabilityPresent, ENC_BIG_ENDIAN0x00000000); |
2785 | bit_offset = bit_offset + 1; |
2786 | |
2787 | if (gsm850AssocRadioCapabilityPresent == 1) |
2788 | { |
2789 | /* Extract GSM 850 Associated Radio Capability */ |
2790 | proto_tree_add_bits_item(tree, hf_gsm_a_gsm_850_assoc_radio_cap, tvb, bit_offset, 4, ENC_BIG_ENDIAN0x00000000); |
2791 | bit_offset = bit_offset + 4; |
2792 | } |
2793 | |
2794 | /* { 0 | 1 <GSM 1900 Associated Radio Capability : bit(4) > } |
2795 | * Extract GSM 1900 Associated Radio Capability presence |
2796 | */ |
2797 | AVAILABLE_BITS_CHECK(1)bits_left = ((len + offset) << 3) - bit_offset; if (bits_left < (1)) { if (bits_left > 0) proto_tree_add_bits_item(tree , hf_gsm_a_spare_bits, tvb, bit_offset, bits_left, 0x00000000 ); else if (bits_left < 0) proto_tree_add_expert(tree, pinfo , &ei_gsm_a_ie_length_too_short, tvb, offset, len); return len; }; |
2798 | proto_tree_add_bits_ret_val(tree, hf_gsm_a_gsm_1900_assoc_radio_cap_present, tvb, bit_offset, 1, &gsm1900AssocRadioCapabilityPresent, ENC_BIG_ENDIAN0x00000000); |
2799 | bit_offset = bit_offset + 1; |
2800 | |
2801 | if (gsm1900AssocRadioCapabilityPresent == 1) |
2802 | { |
2803 | /* Extract GSM 1900 Associated Radio Capability */ |
2804 | proto_tree_add_bits_item(tree, hf_gsm_a_gsm_1900_assoc_radio_cap, tvb, bit_offset, 4, ENC_BIG_ENDIAN0x00000000); |
2805 | bit_offset = bit_offset + 4; |
2806 | } |
2807 | |
2808 | /* < UMTS FDD Radio Access Technology Capability : bit > |
2809 | * Extract UMTS FDD Radio Access Technology Capability |
2810 | */ |
2811 | AVAILABLE_BITS_CHECK(1)bits_left = ((len + offset) << 3) - bit_offset; if (bits_left < (1)) { if (bits_left > 0) proto_tree_add_bits_item(tree , hf_gsm_a_spare_bits, tvb, bit_offset, bits_left, 0x00000000 ); else if (bits_left < 0) proto_tree_add_expert(tree, pinfo , &ei_gsm_a_ie_length_too_short, tvb, offset, len); return len; }; |
2812 | proto_tree_add_bits_item(tree, hf_gsm_a_umts_fdd_rat_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2813 | bit_offset = bit_offset + 1; |
2814 | |
2815 | /* < UMTS 3.84 Mcps TDD Radio Access Technology Capability : bit > |
2816 | * Extract UMTS 3.84 Mcps TDD Radio Access Technology Capability |
2817 | */ |
2818 | AVAILABLE_BITS_CHECK(1)bits_left = ((len + offset) << 3) - bit_offset; if (bits_left < (1)) { if (bits_left > 0) proto_tree_add_bits_item(tree , hf_gsm_a_spare_bits, tvb, bit_offset, bits_left, 0x00000000 ); else if (bits_left < 0) proto_tree_add_expert(tree, pinfo , &ei_gsm_a_ie_length_too_short, tvb, offset, len); return len; }; |
2819 | proto_tree_add_bits_item(tree, hf_gsm_a_umts_384_mcps_tdd_rat_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2820 | bit_offset = bit_offset + 1; |
2821 | |
2822 | /* < CDMA 2000 Radio Access Technology Capability : bit > |
2823 | * Extract CDMA 2000 Radio Access Technology Capability |
2824 | */ |
2825 | AVAILABLE_BITS_CHECK(1)bits_left = ((len + offset) << 3) - bit_offset; if (bits_left < (1)) { if (bits_left > 0) proto_tree_add_bits_item(tree , hf_gsm_a_spare_bits, tvb, bit_offset, bits_left, 0x00000000 ); else if (bits_left < 0) proto_tree_add_expert(tree, pinfo , &ei_gsm_a_ie_length_too_short, tvb, offset, len); return len; }; |
2826 | proto_tree_add_bits_item(tree, hf_gsm_a_cdma_2000_rat_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2827 | bit_offset = bit_offset + 1; |
2828 | |
2829 | /* { 0 | 1 < DTM GPRS Multi Slot Class : bit(2) > |
2830 | * < Single Slot DTM : bit > |
2831 | * {0 | 1< DTM EGPRS Multi Slot Class : bit(2) > } } |
2832 | * Extract DTM E/GPRS Information presence |
2833 | */ |
2834 | AVAILABLE_BITS_CHECK(1)bits_left = ((len + offset) << 3) - bit_offset; if (bits_left < (1)) { if (bits_left > 0) proto_tree_add_bits_item(tree , hf_gsm_a_spare_bits, tvb, bit_offset, bits_left, 0x00000000 ); else if (bits_left < 0) proto_tree_add_expert(tree, pinfo , &ei_gsm_a_ie_length_too_short, tvb, offset, len); return len; }; |
2835 | proto_tree_add_bits_ret_val(tree, hf_gsm_a_dtm_e_gprs_multi_slot_info_present, tvb, bit_offset, 1, &dtmEGprsMultiSlotInfoPresent, ENC_BIG_ENDIAN0x00000000); |
2836 | bit_offset = bit_offset + 1; |
2837 | |
2838 | if (dtmEGprsMultiSlotInfoPresent == 1) |
2839 | { |
2840 | /* Extract DTM GPRS Multi Slot Class */ |
2841 | proto_tree_add_bits_item(tree, hf_gsm_a_dtm_gprs_multi_slot_class, tvb, bit_offset, 2, ENC_BIG_ENDIAN0x00000000); |
2842 | bit_offset = bit_offset + 2; |
2843 | |
2844 | /* Extract Single Slot DTM */ |
2845 | proto_tree_add_bits_item(tree, hf_gsm_a_single_slot_dtm, tvb, bit_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2846 | bit_offset = bit_offset + 1; |
2847 | |
2848 | /* Extract DTM EGPRS Multi Slot Class Presence */ |
2849 | proto_tree_add_bits_ret_val(tree, hf_gsm_a_dtm_egprs_multi_slot_class_present, tvb, bit_offset, 1, &dtmEgprsMultiSlotClassPresent, ENC_BIG_ENDIAN0x00000000); |
2850 | bit_offset = bit_offset + 1; |
2851 | |
2852 | /* Extract DTM EGPRS Multi Slot Class */ |
2853 | if (dtmEgprsMultiSlotClassPresent == 1) |
2854 | { |
2855 | proto_tree_add_bits_item(tree, hf_gsm_a_dtm_egprs_multi_slot_class, tvb, bit_offset, 2, ENC_BIG_ENDIAN0x00000000); |
2856 | bit_offset = bit_offset + 2; |
2857 | } |
2858 | } |
2859 | |
2860 | /* |
2861 | * Release 4 starts here |
2862 | * |
2863 | * { 0 | 1 < Single Band Support > } -- Release 4 starts here: |
2864 | * Extract Single Band Support |
2865 | */ |
2866 | AVAILABLE_BITS_CHECK(1)bits_left = ((len + offset) << 3) - bit_offset; if (bits_left < (1)) { if (bits_left > 0) proto_tree_add_bits_item(tree , hf_gsm_a_spare_bits, tvb, bit_offset, bits_left, 0x00000000 ); else if (bits_left < 0) proto_tree_add_expert(tree, pinfo , &ei_gsm_a_ie_length_too_short, tvb, offset, len); return len; }; |
2867 | proto_tree_add_bits_ret_val(tree, hf_gsm_a_single_band_support, tvb, bit_offset, 1, &singleBandSupport, ENC_BIG_ENDIAN0x00000000); |
2868 | bit_offset = bit_offset + 1; |
2869 | |
2870 | if (singleBandSupport == 1) |
2871 | { |
2872 | /* Extract Single Band Support */ |
2873 | proto_tree_add_bits_item(tree, hf_gsm_a_gsm_band, tvb, bit_offset, 4, ENC_BIG_ENDIAN0x00000000); |
2874 | bit_offset = bit_offset + 4; |
2875 | } |
2876 | |
2877 | /* { 0 | 1 <GSM 750 Associated Radio Capability : bit(4) > } |
2878 | * Extract GSM 750 Associated Radio Capability presence |
2879 | */ |
2880 | AVAILABLE_BITS_CHECK(1)bits_left = ((len + offset) << 3) - bit_offset; if (bits_left < (1)) { if (bits_left > 0) proto_tree_add_bits_item(tree , hf_gsm_a_spare_bits, tvb, bit_offset, bits_left, 0x00000000 ); else if (bits_left < 0) proto_tree_add_expert(tree, pinfo , &ei_gsm_a_ie_length_too_short, tvb, offset, len); return len; }; |
2881 | proto_tree_add_bits_ret_val(tree, hf_gsm_a_gsm_750_assoc_radio_cap_present, tvb, bit_offset, 1, &gsm750AssocRadioCapabilityPresent, ENC_BIG_ENDIAN0x00000000); |
2882 | bit_offset = bit_offset + 1; |
2883 | |
2884 | if (gsm750AssocRadioCapabilityPresent == 1) |
2885 | { |
2886 | /* Extract GSM 750 Associated Radio Capability */ |
2887 | proto_tree_add_bits_item(tree, hf_gsm_a_gsm_750_assoc_radio_cap, tvb, bit_offset, 4, ENC_BIG_ENDIAN0x00000000); |
2888 | bit_offset = bit_offset + 4; |
2889 | } |
2890 | |
2891 | /* < UMTS 1.28 Mcps TDD Radio Access Technology Capability : bit > |
2892 | * Extract UMTS 1.28 Mcps TDD Radio Access Technology Capability |
2893 | */ |
2894 | AVAILABLE_BITS_CHECK(1)bits_left = ((len + offset) << 3) - bit_offset; if (bits_left < (1)) { if (bits_left > 0) proto_tree_add_bits_item(tree , hf_gsm_a_spare_bits, tvb, bit_offset, bits_left, 0x00000000 ); else if (bits_left < 0) proto_tree_add_expert(tree, pinfo , &ei_gsm_a_ie_length_too_short, tvb, offset, len); return len; }; |
2895 | proto_tree_add_bits_item(tree, hf_gsm_a_umts_128_mcps_tdd_rat_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2896 | bit_offset = bit_offset + 1; |
2897 | |
2898 | /* < GERAN Feature Package 1 : bit > |
2899 | * Extract GERAN Feature Package 1 |
2900 | */ |
2901 | AVAILABLE_BITS_CHECK(1)bits_left = ((len + offset) << 3) - bit_offset; if (bits_left < (1)) { if (bits_left > 0) proto_tree_add_bits_item(tree , hf_gsm_a_spare_bits, tvb, bit_offset, bits_left, 0x00000000 ); else if (bits_left < 0) proto_tree_add_expert(tree, pinfo , &ei_gsm_a_ie_length_too_short, tvb, offset, len); return len; }; |
2902 | proto_tree_add_bits_item(tree, hf_gsm_a_geran_feature_package_1, tvb, bit_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2903 | bit_offset = bit_offset + 1; |
2904 | |
2905 | /* { 0 | 1 < Extended DTM GPRS Multi Slot Class : bit(2) > |
2906 | * < Extended DTM EGPRS Multi Slot Class : bit(2) > } |
2907 | * Extract Extended DTM E/GPRS Information presence |
2908 | */ |
2909 | AVAILABLE_BITS_CHECK(1)bits_left = ((len + offset) << 3) - bit_offset; if (bits_left < (1)) { if (bits_left > 0) proto_tree_add_bits_item(tree , hf_gsm_a_spare_bits, tvb, bit_offset, bits_left, 0x00000000 ); else if (bits_left < 0) proto_tree_add_expert(tree, pinfo , &ei_gsm_a_ie_length_too_short, tvb, offset, len); return len; }; |
2910 | 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_ENDIAN0x00000000); |
2911 | bit_offset = bit_offset + 1; |
2912 | |
2913 | if (extDtmEGprsMultiSlotInfoPresent == 1) |
2914 | { |
2915 | /* Extract Extended DTM GPRS Multi Slot Class */ |
2916 | proto_tree_add_bits_item(tree, hf_gsm_a_ext_dtm_gprs_multi_slot_class, tvb, bit_offset, 2, ENC_BIG_ENDIAN0x00000000); |
2917 | bit_offset = bit_offset + 2; |
2918 | |
2919 | /* Extract Extended DTM EGPRS Multi Slot Class */ |
2920 | proto_tree_add_bits_item(tree, hf_gsm_a_ext_dtm_egprs_multi_slot_class, tvb, bit_offset, 2, ENC_BIG_ENDIAN0x00000000); |
2921 | bit_offset = bit_offset + 2; |
2922 | } |
2923 | |
2924 | /* |
2925 | * Release 5 starts here |
2926 | * |
2927 | * { 0 | 1 < High Multislot Capability : bit(2) > } -- Release 5 starts here. |
2928 | * Extract High Multislot Capability presence |
2929 | */ |
2930 | AVAILABLE_BITS_CHECK(1)bits_left = ((len + offset) << 3) - bit_offset; if (bits_left < (1)) { if (bits_left > 0) proto_tree_add_bits_item(tree , hf_gsm_a_spare_bits, tvb, bit_offset, bits_left, 0x00000000 ); else if (bits_left < 0) proto_tree_add_expert(tree, pinfo , &ei_gsm_a_ie_length_too_short, tvb, offset, len); return len; }; |
2931 | proto_tree_add_bits_ret_val(tree, hf_gsm_a_high_multislot_cap_present, tvb, bit_offset, 1, &highMultislotCapPresent, ENC_BIG_ENDIAN0x00000000); |
2932 | bit_offset = bit_offset + 1; |
2933 | |
2934 | if (highMultislotCapPresent == 1) |
2935 | { |
2936 | /* Extract High Multislot Capability */ |
2937 | proto_tree_add_bits_item(tree, hf_gsm_a_high_multislot_cap, tvb, bit_offset, 2, ENC_BIG_ENDIAN0x00000000); |
2938 | bit_offset = bit_offset + 2; |
2939 | } |
2940 | |
2941 | /* |
2942 | * { 0 | 1 < GERAN Iu Mode Capabilities > } -- "1" also means support of GERAN Iu mode |
2943 | * Extract GERAN Iu Mode Capabilities presence |
2944 | */ |
2945 | AVAILABLE_BITS_CHECK(1)bits_left = ((len + offset) << 3) - bit_offset; if (bits_left < (1)) { if (bits_left > 0) proto_tree_add_bits_item(tree , hf_gsm_a_spare_bits, tvb, bit_offset, bits_left, 0x00000000 ); else if (bits_left < 0) proto_tree_add_expert(tree, pinfo , &ei_gsm_a_ie_length_too_short, tvb, offset, len); return len; }; |
2946 | proto_tree_add_bits_ret_val(tree, hf_gsm_a_geran_iu_mode_support, tvb, bit_offset, 1, &geranIuModeSupport, ENC_BIG_ENDIAN0x00000000); |
2947 | bit_offset = bit_offset + 1; |
2948 | |
2949 | if (geranIuModeSupport == 1) |
2950 | { |
2951 | /* Extract GERAN Iu Mode Capabilities Length */ |
2952 | length = tvb_get_bits8(tvb, bit_offset, 4); |
2953 | |
2954 | /* Extract GERAN Iu Mode Capabilities */ |
2955 | item = proto_tree_add_bits_item(tree, hf_gsm_a_geran_iu_mode_cap, tvb, bit_offset, length + 4, ENC_BIG_ENDIAN0x00000000); |
2956 | subtree = proto_item_add_subtree(item, ett_gsm_common_elem[DE_MS_CM_3]); |
2957 | |
2958 | /* Add GERAN Iu Mode Capabilities Length in subtree */ |
2959 | proto_tree_add_bits_item(subtree, hf_gsm_a_geran_iu_mode_cap_length, tvb, bit_offset, 4, ENC_BIG_ENDIAN0x00000000); |
2960 | bit_offset += 4; |
2961 | target_bit_offset = bit_offset + length; |
2962 | |
2963 | /* Extract FLO Iu Capability */ |
2964 | proto_tree_add_bits_item(subtree, hf_gsm_a_flo_iu_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2965 | bit_offset += 1; |
2966 | |
2967 | /* If needed, add spare bits */ |
2968 | if (target_bit_offset > bit_offset) |
2969 | { |
2970 | proto_tree_add_bits_item(subtree, hf_gsm_a_spare_bits, tvb, bit_offset, target_bit_offset - bit_offset, ENC_BIG_ENDIAN0x00000000); |
2971 | bit_offset = target_bit_offset; |
2972 | } |
2973 | } |
2974 | |
2975 | /* < GERAN Feature Package 2 : bit > |
2976 | * Extract GERAN Feature Package 2 |
2977 | */ |
2978 | AVAILABLE_BITS_CHECK(1)bits_left = ((len + offset) << 3) - bit_offset; if (bits_left < (1)) { if (bits_left > 0) proto_tree_add_bits_item(tree , hf_gsm_a_spare_bits, tvb, bit_offset, bits_left, 0x00000000 ); else if (bits_left < 0) proto_tree_add_expert(tree, pinfo , &ei_gsm_a_ie_length_too_short, tvb, offset, len); return len; }; |
2979 | proto_tree_add_bits_item(tree, hf_gsm_a_geran_feature_package_2, tvb, bit_offset, 1, ENC_BIG_ENDIAN0x00000000); |
2980 | bit_offset = bit_offset + 1; |
2981 | |
2982 | /* < GMSK Multislot Power Profile : bit (2) > |
2983 | * Extract GMSK Multislot Power Profile |
2984 | */ |
2985 | AVAILABLE_BITS_CHECK(2)bits_left = ((len + offset) << 3) - bit_offset; if (bits_left < (2)) { if (bits_left > 0) proto_tree_add_bits_item(tree , hf_gsm_a_spare_bits, tvb, bit_offset, bits_left, 0x00000000 ); else if (bits_left < 0) proto_tree_add_expert(tree, pinfo , &ei_gsm_a_ie_length_too_short, tvb, offset, len); return len; }; |
2986 | proto_tree_add_bits_item(tree, hf_gsm_a_gmsk_multislot_power_prof, tvb, bit_offset, 2, ENC_BIG_ENDIAN0x00000000); |
2987 | bit_offset = bit_offset + 2; |
2988 | |
2989 | /* < 8-PSK Multislot Power Profile : bit (2) > |
2990 | * Extract GMSK Multislot Power Profile |
2991 | */ |
2992 | AVAILABLE_BITS_CHECK(2)bits_left = ((len + offset) << 3) - bit_offset; if (bits_left < (2)) { if (bits_left > 0) proto_tree_add_bits_item(tree , hf_gsm_a_spare_bits, tvb, bit_offset, bits_left, 0x00000000 ); else if (bits_left < 0) proto_tree_add_expert(tree, pinfo , &ei_gsm_a_ie_length_too_short, tvb, offset, len); return len; }; |
2993 | proto_tree_add_bits_item(tree, hf_gsm_a_8_psk_multislot_power_prof, tvb, bit_offset, 2, ENC_BIG_ENDIAN0x00000000); |
2994 | bit_offset = bit_offset + 2; |
2995 | |
2996 | /* |
2997 | * Release 6 starts here |
2998 | * |
2999 | * { 0 | 1 < T-GSM 400 Bands Supported : { 01 | 10 | 11 } > -- Release 6 starts here. |
3000 | * < T-GSM 400 Associated Radio Capability: bit(4) > } |
3001 | */ |
3002 | AVAILABLE_BITS_CHECK(1)bits_left = ((len + offset) << 3) - bit_offset; if (bits_left < (1)) { if (bits_left > 0) proto_tree_add_bits_item(tree , hf_gsm_a_spare_bits, tvb, bit_offset, bits_left, 0x00000000 ); else if (bits_left < 0) proto_tree_add_expert(tree, pinfo , &ei_gsm_a_ie_length_too_short, tvb, offset, len); return len; }; |
3003 | proto_tree_add_bits_ret_val(tree, hf_gsm_a_t_gsm_400_band_info_present, tvb, bit_offset, 1, &tGsm400BandInfoPresent, ENC_BIG_ENDIAN0x00000000); |
3004 | bit_offset = bit_offset + 1; |
3005 | |
3006 | if (tGsm400BandInfoPresent == 1) |
3007 | { |
3008 | /* Extract T-GSM 400 Bands Supported */ |
3009 | proto_tree_add_bits_item(tree, hf_gsm_a_t_gsm_400_bands_supported, tvb, bit_offset, 2, ENC_BIG_ENDIAN0x00000000); |
3010 | bit_offset = bit_offset + 2; |
3011 | |
3012 | /* Extract T-GSM 400 Associated Radio Capability */ |
3013 | proto_tree_add_bits_item(tree, hf_gsm_a_t_gsm_400_assoc_radio_cap, tvb, bit_offset, 4, ENC_BIG_ENDIAN0x00000000); |
3014 | bit_offset = bit_offset + 4; |
3015 | } |
3016 | |
3017 | /* { 0 | 1 < T-GSM 900 Associated Radio Capability: bit(4) > } |
3018 | * Extract T-GSM 900 Associated Radio Capability presence |
3019 | */ |
3020 | AVAILABLE_BITS_CHECK(1)bits_left = ((len + offset) << 3) - bit_offset; if (bits_left < (1)) { if (bits_left > 0) proto_tree_add_bits_item(tree , hf_gsm_a_spare_bits, tvb, bit_offset, bits_left, 0x00000000 ); else if (bits_left < 0) proto_tree_add_expert(tree, pinfo , &ei_gsm_a_ie_length_too_short, tvb, offset, len); return len; }; |
3021 | proto_tree_add_bits_ret_val(tree, hf_gsm_a_t_gsm_900_assoc_radio_cap_present, tvb, bit_offset, 1, &tGsm900AssocRadioCapabilityPresent, ENC_BIG_ENDIAN0x00000000); |
3022 | bit_offset = bit_offset + 1; |
3023 | |
3024 | if (tGsm900AssocRadioCapabilityPresent == 1) |
3025 | { |
3026 | /* Extract T-GSM 900 Associated Radio Capability */ |
3027 | proto_tree_add_bits_item(tree, hf_gsm_a_t_gsm_900_assoc_radio_cap, tvb, bit_offset, 4, ENC_BIG_ENDIAN0x00000000); |
3028 | bit_offset = bit_offset + 4; |
3029 | } |
3030 | |
3031 | /* < Downlink Advanced Receiver Performance : bit (2)> |
3032 | * Extract Downlink Advanced Receiver Performance |
3033 | */ |
3034 | AVAILABLE_BITS_CHECK(2)bits_left = ((len + offset) << 3) - bit_offset; if (bits_left < (2)) { if (bits_left > 0) proto_tree_add_bits_item(tree , hf_gsm_a_spare_bits, tvb, bit_offset, bits_left, 0x00000000 ); else if (bits_left < 0) proto_tree_add_expert(tree, pinfo , &ei_gsm_a_ie_length_too_short, tvb, offset, len); return len; }; |
3035 | proto_tree_add_bits_item(tree, hf_gsm_a_downlink_adv_receiver_perf, tvb, bit_offset, 2, ENC_BIG_ENDIAN0x00000000); |
3036 | bit_offset = bit_offset + 2; |
3037 | |
3038 | /* < DTM Enhancements Capability : bit > |
3039 | * Extract DTM Enhancements Capability |
3040 | */ |
3041 | AVAILABLE_BITS_CHECK(1)bits_left = ((len + offset) << 3) - bit_offset; if (bits_left < (1)) { if (bits_left > 0) proto_tree_add_bits_item(tree , hf_gsm_a_spare_bits, tvb, bit_offset, bits_left, 0x00000000 ); else if (bits_left < 0) proto_tree_add_expert(tree, pinfo , &ei_gsm_a_ie_length_too_short, tvb, offset, len); return len; }; |
3042 | proto_tree_add_bits_item(tree, hf_gsm_a_dtm_enhancements_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN0x00000000); |
3043 | bit_offset = bit_offset + 1; |
3044 | |
3045 | /* { 0 | 1 < DTM GPRS High Multi Slot Class : bit(3) > |
3046 | * < Offset required : bit> |
3047 | * { 0 | 1 < DTM EGPRS High Multi Slot Class : bit(3) > } } |
3048 | * Extract DTM E/GPRS High Multi Slot Information presence |
3049 | */ |
3050 | AVAILABLE_BITS_CHECK(1)bits_left = ((len + offset) << 3) - bit_offset; if (bits_left < (1)) { if (bits_left > 0) proto_tree_add_bits_item(tree , hf_gsm_a_spare_bits, tvb, bit_offset, bits_left, 0x00000000 ); else if (bits_left < 0) proto_tree_add_expert(tree, pinfo , &ei_gsm_a_ie_length_too_short, tvb, offset, len); return len; }; |
3051 | 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_ENDIAN0x00000000); |
3052 | bit_offset = bit_offset + 1; |
3053 | |
3054 | if (dtmEGprsHighMultiSlotInfoPresent == 1) |
3055 | { |
3056 | /* Extract DTM GPRS High Multi Slot Class */ |
3057 | proto_tree_add_bits_item(tree, hf_gsm_a_dtm_gprs_high_multi_slot_class, tvb, bit_offset, 3, ENC_BIG_ENDIAN0x00000000); |
3058 | bit_offset = bit_offset + 3; |
3059 | |
3060 | /* Extract Offset Required */ |
3061 | proto_tree_add_bits_item(tree, hf_gsm_a_offset_required, tvb, bit_offset, 1, ENC_BIG_ENDIAN0x00000000); |
3062 | bit_offset = bit_offset + 1; |
3063 | |
3064 | /* Extract DTM EGPRS High Multi Slot Class Presence */ |
3065 | proto_tree_add_bits_ret_val(tree, hf_gsm_a_dtm_egprs_high_multi_slot_class_present, tvb, bit_offset, 1, &dtmEgprsHighMultiSlotClassPresent, ENC_BIG_ENDIAN0x00000000); |
3066 | bit_offset = bit_offset + 1; |
3067 | |
3068 | /* Extract DTM EGPRS High Multi Slot Class */ |
3069 | if (dtmEgprsHighMultiSlotClassPresent == 1) |
3070 | { |
3071 | proto_tree_add_bits_item(tree, hf_gsm_a_dtm_egprs_high_multi_slot_class, tvb, bit_offset, 3, ENC_BIG_ENDIAN0x00000000); |
3072 | bit_offset = bit_offset + 3; |
3073 | } |
3074 | } |
3075 | |
3076 | /* < Repeated ACCH Capability : bit > |
3077 | * Extract Repeated ACCH Capability |
3078 | */ |
3079 | AVAILABLE_BITS_CHECK(1)bits_left = ((len + offset) << 3) - bit_offset; if (bits_left < (1)) { if (bits_left > 0) proto_tree_add_bits_item(tree , hf_gsm_a_spare_bits, tvb, bit_offset, bits_left, 0x00000000 ); else if (bits_left < 0) proto_tree_add_expert(tree, pinfo , &ei_gsm_a_ie_length_too_short, tvb, offset, len); return len; }; |
3080 | proto_tree_add_bits_item(tree, hf_gsm_a_repeated_acch_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN0x00000000); |
3081 | bit_offset = bit_offset + 1; |
3082 | |
3083 | /* |
3084 | * Release 7 starts here |
3085 | * |
3086 | * { 0 | 1 <GSM 710 Associated Radio Capability : bit(4) > } -- Release 7 starts here. |
3087 | * Extract GSM 710 Associated Radio Capability presence |
3088 | */ |
3089 | AVAILABLE_BITS_CHECK(1)bits_left = ((len + offset) << 3) - bit_offset; if (bits_left < (1)) { if (bits_left > 0) proto_tree_add_bits_item(tree , hf_gsm_a_spare_bits, tvb, bit_offset, bits_left, 0x00000000 ); else if (bits_left < 0) proto_tree_add_expert(tree, pinfo , &ei_gsm_a_ie_length_too_short, tvb, offset, len); return len; }; |
3090 | proto_tree_add_bits_ret_val(tree, hf_gsm_a_gsm_710_assoc_radio_cap_present, tvb, bit_offset, 1, &gsm710AssocRadioCapabilityPresent, ENC_BIG_ENDIAN0x00000000); |
3091 | bit_offset = bit_offset + 1; |
3092 | |
3093 | if (gsm710AssocRadioCapabilityPresent == 1) |
3094 | { |
3095 | /* Extract GSM 710 Associated Radio Capability */ |
3096 | proto_tree_add_bits_item(tree, hf_gsm_a_gsm_710_assoc_radio_cap, tvb, bit_offset, 4, ENC_BIG_ENDIAN0x00000000); |
3097 | bit_offset = bit_offset + 4; |
3098 | } |
3099 | |
3100 | /* { 0 | 1 < T-GSM 810 Associated Radio Capability: bit(4) > } |
3101 | * Extract T-GSM 810 Associated Radio Capability presence |
3102 | */ |
3103 | AVAILABLE_BITS_CHECK(1)bits_left = ((len + offset) << 3) - bit_offset; if (bits_left < (1)) { if (bits_left > 0) proto_tree_add_bits_item(tree , hf_gsm_a_spare_bits, tvb, bit_offset, bits_left, 0x00000000 ); else if (bits_left < 0) proto_tree_add_expert(tree, pinfo , &ei_gsm_a_ie_length_too_short, tvb, offset, len); return len; }; |
3104 | proto_tree_add_bits_ret_val(tree, hf_gsm_a_t_gsm_810_assoc_radio_cap_present, tvb, bit_offset, 1, &tGsm810AssocRadioCapabilityPresent, ENC_BIG_ENDIAN0x00000000); |
3105 | bit_offset = bit_offset + 1; |
3106 | |
3107 | if (tGsm810AssocRadioCapabilityPresent == 1) |
3108 | { |
3109 | /* Extract T-GSM 810 Associated Radio Capability */ |
3110 | proto_tree_add_bits_item(tree, hf_gsm_a_t_gsm_810_assoc_radio_cap, tvb, bit_offset, 4, ENC_BIG_ENDIAN0x00000000); |
3111 | bit_offset = bit_offset + 4; |
3112 | } |
3113 | |
3114 | /* < Ciphering Mode Setting Capability : bit > |
3115 | * Extract Ciphering Mode Setting Capability |
3116 | */ |
3117 | AVAILABLE_BITS_CHECK(1)bits_left = ((len + offset) << 3) - bit_offset; if (bits_left < (1)) { if (bits_left > 0) proto_tree_add_bits_item(tree , hf_gsm_a_spare_bits, tvb, bit_offset, bits_left, 0x00000000 ); else if (bits_left < 0) proto_tree_add_expert(tree, pinfo , &ei_gsm_a_ie_length_too_short, tvb, offset, len); return len; }; |
3118 | proto_tree_add_bits_item(tree, hf_gsm_a_ciphering_mode_setting_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN0x00000000); |
3119 | bit_offset = bit_offset + 1; |
3120 | |
3121 | /* < Additional Positioning Capabilities : bit > |
3122 | * Extract Additional Positioning Capabilities |
3123 | */ |
3124 | AVAILABLE_BITS_CHECK(1)bits_left = ((len + offset) << 3) - bit_offset; if (bits_left < (1)) { if (bits_left > 0) proto_tree_add_bits_item(tree , hf_gsm_a_spare_bits, tvb, bit_offset, bits_left, 0x00000000 ); else if (bits_left < 0) proto_tree_add_expert(tree, pinfo , &ei_gsm_a_ie_length_too_short, tvb, offset, len); return len; }; |
3125 | proto_tree_add_bits_item(tree, hf_gsm_a_additional_positioning_caps, tvb, bit_offset, 1, ENC_BIG_ENDIAN0x00000000); |
3126 | bit_offset = bit_offset + 1; |
3127 | |
3128 | /* |
3129 | * Release 8 starts here |
3130 | * |
3131 | * <E-UTRA FDD support : bit > -- Release 8 starts here. |
3132 | * Extract E-UTRA FDD support |
3133 | */ |
3134 | AVAILABLE_BITS_CHECK(1)bits_left = ((len + offset) << 3) - bit_offset; if (bits_left < (1)) { if (bits_left > 0) proto_tree_add_bits_item(tree , hf_gsm_a_spare_bits, tvb, bit_offset, bits_left, 0x00000000 ); else if (bits_left < 0) proto_tree_add_expert(tree, pinfo , &ei_gsm_a_ie_length_too_short, tvb, offset, len); return len; }; |
3135 | proto_tree_add_bits_item(tree, hf_gsm_a_e_utra_fdd_support, tvb, bit_offset, 1, ENC_BIG_ENDIAN0x00000000); |
3136 | bit_offset = bit_offset + 1; |
3137 | |
3138 | /* |
3139 | * <E-UTRA TDD support : bit > |
3140 | * Extract E-UTRA TDD support |
3141 | */ |
3142 | AVAILABLE_BITS_CHECK(1)bits_left = ((len + offset) << 3) - bit_offset; if (bits_left < (1)) { if (bits_left > 0) proto_tree_add_bits_item(tree , hf_gsm_a_spare_bits, tvb, bit_offset, bits_left, 0x00000000 ); else if (bits_left < 0) proto_tree_add_expert(tree, pinfo , &ei_gsm_a_ie_length_too_short, tvb, offset, len); return len; }; |
3143 | proto_tree_add_bits_item(tree, hf_gsm_a_e_utra_tdd_support, tvb, bit_offset, 1, ENC_BIG_ENDIAN0x00000000); |
3144 | bit_offset = bit_offset + 1; |
3145 | |
3146 | /* |
3147 | * <E-UTRA Measurement and Reporting support : bit > |
3148 | * Extract E-UTRA Measurement and Reporting support |
3149 | */ |
3150 | AVAILABLE_BITS_CHECK(1)bits_left = ((len + offset) << 3) - bit_offset; if (bits_left < (1)) { if (bits_left > 0) proto_tree_add_bits_item(tree , hf_gsm_a_spare_bits, tvb, bit_offset, bits_left, 0x00000000 ); else if (bits_left < 0) proto_tree_add_expert(tree, pinfo , &ei_gsm_a_ie_length_too_short, tvb, offset, len); return len; }; |
3151 | proto_tree_add_bits_item(tree, hf_gsm_a_e_utra_meas_and_report_support, tvb, bit_offset, 1, ENC_BIG_ENDIAN0x00000000); |
3152 | bit_offset = bit_offset + 1; |
3153 | |
3154 | /* |
3155 | * <Priority-based reselection support : bit > |
3156 | * Extract Priority-based reselection support |
3157 | */ |
3158 | AVAILABLE_BITS_CHECK(1)bits_left = ((len + offset) << 3) - bit_offset; if (bits_left < (1)) { if (bits_left > 0) proto_tree_add_bits_item(tree , hf_gsm_a_spare_bits, tvb, bit_offset, bits_left, 0x00000000 ); else if (bits_left < 0) proto_tree_add_expert(tree, pinfo , &ei_gsm_a_ie_length_too_short, tvb, offset, len); return len; }; |
3159 | proto_tree_add_bits_item(tree, hf_gsm_a_prio_based_resel_support, tvb, bit_offset, 1, ENC_BIG_ENDIAN0x00000000); |
3160 | bit_offset = bit_offset + 1; |
3161 | |
3162 | /* |
3163 | * Release 9 starts here |
3164 | * |
3165 | * <UTRA CSG Cells Reporting : bit > -- Release 9 starts here. |
3166 | * Extract UTRA CSG Cells Reporting |
3167 | */ |
3168 | AVAILABLE_BITS_CHECK(1)bits_left = ((len + offset) << 3) - bit_offset; if (bits_left < (1)) { if (bits_left > 0) proto_tree_add_bits_item(tree , hf_gsm_a_spare_bits, tvb, bit_offset, bits_left, 0x00000000 ); else if (bits_left < 0) proto_tree_add_expert(tree, pinfo , &ei_gsm_a_ie_length_too_short, tvb, offset, len); return len; }; |
3169 | proto_tree_add_bits_item(tree, hf_gsm_a_utra_csg_cells_reporting, tvb, bit_offset, 1, ENC_BIG_ENDIAN0x00000000); |
3170 | bit_offset = bit_offset + 1; |
3171 | |
3172 | /* |
3173 | * <VAMOS Level : bit(2) > |
3174 | * Extract VAMOS Level |
3175 | */ |
3176 | AVAILABLE_BITS_CHECK(2)bits_left = ((len + offset) << 3) - bit_offset; if (bits_left < (2)) { if (bits_left > 0) proto_tree_add_bits_item(tree , hf_gsm_a_spare_bits, tvb, bit_offset, bits_left, 0x00000000 ); else if (bits_left < 0) proto_tree_add_expert(tree, pinfo , &ei_gsm_a_ie_length_too_short, tvb, offset, len); return len; }; |
3177 | proto_tree_add_bits_item(tree, hf_gsm_a_vamos_level, tvb, bit_offset, 2, ENC_BIG_ENDIAN0x00000000); |
3178 | bit_offset = bit_offset + 2; |
3179 | |
3180 | /* |
3181 | * Release 10 starts here |
3182 | * |
3183 | * < TIGHTER Capability : bit(2) > -- Release 10 starts here. |
3184 | * Extract TIGHTER Capability |
3185 | */ |
3186 | AVAILABLE_BITS_CHECK(2)bits_left = ((len + offset) << 3) - bit_offset; if (bits_left < (2)) { if (bits_left > 0) proto_tree_add_bits_item(tree , hf_gsm_a_spare_bits, tvb, bit_offset, bits_left, 0x00000000 ); else if (bits_left < 0) proto_tree_add_expert(tree, pinfo , &ei_gsm_a_ie_length_too_short, tvb, offset, len); return len; }; |
3187 | proto_tree_add_bits_item(tree, hf_gsm_a_tighter_cap, tvb, bit_offset, 2, ENC_BIG_ENDIAN0x00000000); |
3188 | bit_offset = bit_offset + 2; |
3189 | |
3190 | /* |
3191 | * < Selective Ciphering of Downlink SACCH : bit > |
3192 | * Extract Selective Ciphering of Downlink SACCH |
3193 | */ |
3194 | AVAILABLE_BITS_CHECK(1)bits_left = ((len + offset) << 3) - bit_offset; if (bits_left < (1)) { if (bits_left > 0) proto_tree_add_bits_item(tree , hf_gsm_a_spare_bits, tvb, bit_offset, bits_left, 0x00000000 ); else if (bits_left < 0) proto_tree_add_expert(tree, pinfo , &ei_gsm_a_ie_length_too_short, tvb, offset, len); return len; }; |
3195 | proto_tree_add_bits_item(tree, hf_gsm_a_selective_ciph_down_sacch, tvb, bit_offset, 1, ENC_BIG_ENDIAN0x00000000); |
3196 | bit_offset = bit_offset + 1; |
3197 | |
3198 | /* |
3199 | * Release 11 starts here |
3200 | * |
3201 | * < CS to PS SRVCC from GERAN to UTRA : bit(2) > -- Release 11 starts here |
3202 | */ |
3203 | AVAILABLE_BITS_CHECK(2)bits_left = ((len + offset) << 3) - bit_offset; if (bits_left < (2)) { if (bits_left > 0) proto_tree_add_bits_item(tree , hf_gsm_a_spare_bits, tvb, bit_offset, bits_left, 0x00000000 ); else if (bits_left < 0) proto_tree_add_expert(tree, pinfo , &ei_gsm_a_ie_length_too_short, tvb, offset, len); return len; }; |
3204 | proto_tree_add_bits_item(tree, hf_gsm_a_cs_to_ps_srvcc_geran_to_utra, tvb, bit_offset, 2, ENC_BIG_ENDIAN0x00000000); |
3205 | bit_offset = bit_offset + 2; |
3206 | |
3207 | /* |
3208 | * < CS to PS SRVCC from GERAN to E-UTRA : bit(2)> |
3209 | */ |
3210 | AVAILABLE_BITS_CHECK(2)bits_left = ((len + offset) << 3) - bit_offset; if (bits_left < (2)) { if (bits_left > 0) proto_tree_add_bits_item(tree , hf_gsm_a_spare_bits, tvb, bit_offset, bits_left, 0x00000000 ); else if (bits_left < 0) proto_tree_add_expert(tree, pinfo , &ei_gsm_a_ie_length_too_short, tvb, offset, len); return len; }; |
3211 | proto_tree_add_bits_item(tree, hf_gsm_a_cs_to_ps_srvcc_geran_to_eutra, tvb, bit_offset, 2, ENC_BIG_ENDIAN0x00000000); |
3212 | bit_offset = bit_offset + 2; |
3213 | |
3214 | /* |
3215 | * < GERAN Network Sharing support : bit(1)> |
3216 | */ |
3217 | AVAILABLE_BITS_CHECK(1)bits_left = ((len + offset) << 3) - bit_offset; if (bits_left < (1)) { if (bits_left > 0) proto_tree_add_bits_item(tree , hf_gsm_a_spare_bits, tvb, bit_offset, bits_left, 0x00000000 ); else if (bits_left < 0) proto_tree_add_expert(tree, pinfo , &ei_gsm_a_ie_length_too_short, tvb, offset, len); return len; }; |
3218 | proto_tree_add_bits_item(tree, hf_gsm_a_geran_network_sharing_support, tvb, bit_offset, 1, ENC_BIG_ENDIAN0x00000000); |
3219 | bit_offset = bit_offset + 1; |
3220 | |
3221 | /* |
3222 | * < E-UTRA Wideband RSRQ measurements support : bit(1)> |
3223 | */ |
3224 | AVAILABLE_BITS_CHECK(1)bits_left = ((len + offset) << 3) - bit_offset; if (bits_left < (1)) { if (bits_left > 0) proto_tree_add_bits_item(tree , hf_gsm_a_spare_bits, tvb, bit_offset, bits_left, 0x00000000 ); else if (bits_left < 0) proto_tree_add_expert(tree, pinfo , &ei_gsm_a_ie_length_too_short, tvb, offset, len); return len; }; |
3225 | proto_tree_add_bits_item(tree, hf_gsm_a_eutra_wb_rsrq_support, tvb, bit_offset, 1, ENC_BIG_ENDIAN0x00000000); |
3226 | bit_offset = bit_offset + 1; |
3227 | |
3228 | /* |
3229 | * Release 12 starts here |
3230 | * |
3231 | * < ER Band support : bit(1) > -- Release 12 starts here |
3232 | */ |
3233 | AVAILABLE_BITS_CHECK(1)bits_left = ((len + offset) << 3) - bit_offset; if (bits_left < (1)) { if (bits_left > 0) proto_tree_add_bits_item(tree , hf_gsm_a_spare_bits, tvb, bit_offset, bits_left, 0x00000000 ); else if (bits_left < 0) proto_tree_add_expert(tree, pinfo , &ei_gsm_a_ie_length_too_short, tvb, offset, len); return len; }; |
3234 | proto_tree_add_bits_item(tree, hf_gsm_a_er_band_support, tvb, bit_offset, 1, ENC_BIG_ENDIAN0x00000000); |
3235 | bit_offset = bit_offset + 1; |
3236 | |
3237 | /* |
3238 | * < UTRA Multiple Frequency Band Indicators support : bit(1)> |
3239 | */ |
3240 | AVAILABLE_BITS_CHECK(1)bits_left = ((len + offset) << 3) - bit_offset; if (bits_left < (1)) { if (bits_left > 0) proto_tree_add_bits_item(tree , hf_gsm_a_spare_bits, tvb, bit_offset, bits_left, 0x00000000 ); else if (bits_left < 0) proto_tree_add_expert(tree, pinfo , &ei_gsm_a_ie_length_too_short, tvb, offset, len); return len; }; |
3241 | proto_tree_add_bits_item(tree, hf_gsm_a_utra_mfbi_support, tvb, bit_offset, 1, ENC_BIG_ENDIAN0x00000000); |
3242 | bit_offset = bit_offset + 1; |
3243 | |
3244 | /* |
3245 | * < E-UTRA Multiple Frequency Band Indicators support : bit(1)> |
3246 | */ |
3247 | AVAILABLE_BITS_CHECK(1)bits_left = ((len + offset) << 3) - bit_offset; if (bits_left < (1)) { if (bits_left > 0) proto_tree_add_bits_item(tree , hf_gsm_a_spare_bits, tvb, bit_offset, bits_left, 0x00000000 ); else if (bits_left < 0) proto_tree_add_expert(tree, pinfo , &ei_gsm_a_ie_length_too_short, tvb, offset, len); return len; }; |
3248 | proto_tree_add_bits_item(tree, hf_gsm_a_eutra_mfbi_support, tvb, bit_offset, 1, ENC_BIG_ENDIAN0x00000000); |
3249 | bit_offset = bit_offset + 1; |
3250 | |
3251 | /* |
3252 | * < Extended TSC Set Capability support : bit(1)> |
3253 | */ |
3254 | AVAILABLE_BITS_CHECK(1)bits_left = ((len + offset) << 3) - bit_offset; if (bits_left < (1)) { if (bits_left > 0) proto_tree_add_bits_item(tree , hf_gsm_a_spare_bits, tvb, bit_offset, bits_left, 0x00000000 ); else if (bits_left < 0) proto_tree_add_expert(tree, pinfo , &ei_gsm_a_ie_length_too_short, tvb, offset, len); return len; }; |
3255 | proto_tree_add_bits_item(tree, hf_gsm_a_ext_tsc_set_cap_support, tvb, bit_offset, 1, ENC_BIG_ENDIAN0x00000000); |
3256 | bit_offset = bit_offset + 1; |
3257 | |
3258 | /* |
3259 | * < Extended EARFCN value range : bit(1)> |
3260 | */ |
3261 | AVAILABLE_BITS_CHECK(1)bits_left = ((len + offset) << 3) - bit_offset; if (bits_left < (1)) { if (bits_left > 0) proto_tree_add_bits_item(tree , hf_gsm_a_spare_bits, tvb, bit_offset, bits_left, 0x00000000 ); else if (bits_left < 0) proto_tree_add_expert(tree, pinfo , &ei_gsm_a_ie_length_too_short, tvb, offset, len); return len; }; |
3262 | proto_tree_add_bits_item(tree, hf_gsm_a_ext_earfcn_value_range, tvb, bit_offset, 1, ENC_BIG_ENDIAN0x00000000); |
3263 | bit_offset = bit_offset + 1; |
3264 | |
3265 | /* |
3266 | * Add spare bits until we reach an octet boundary |
3267 | */ |
3268 | bits_left = (((len + offset) << 3) - bit_offset) & 0x07; |
3269 | if (bits_left != 0) |
3270 | { |
3271 | proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, bits_left, ENC_BIG_ENDIAN0x00000000); |
3272 | bit_offset += bits_left; |
3273 | } |
3274 | |
3275 | /* translate to byte offset (we already know that we are on an octet boundary) */ |
3276 | curr_offset = bit_offset >> 3; |
3277 | EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_extraneous_data)if ((len) > (curr_offset - offset)) { proto_tree_add_expert (tree, pinfo, &ei_gsm_a_extraneous_data, tvb, curr_offset , (len) - (curr_offset - offset)); curr_offset += ((len) - (curr_offset - offset)); }; |
3278 | |
3279 | return len; |
3280 | } |
3281 | /* |
3282 | * [3] 10.5.1.8 |
3283 | */ |
3284 | uint16_t de_spare_nibble(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U___attribute__((unused)), uint32_t offset, unsigned len, char *add_string _U___attribute__((unused)), int string_len _U___attribute__((unused))) |
3285 | { |
3286 | uint32_t curr_offset; |
3287 | int bit_offset; |
3288 | |
3289 | curr_offset = offset; |
3290 | if (RIGHT_NIBBLE(1) == len) |
3291 | bit_offset = 4; |
3292 | else |
3293 | bit_offset = 0; |
3294 | |
3295 | proto_tree_add_bits_item(tree, hf_gsm_a_spare_nibble, tvb, (curr_offset<<3)+bit_offset, 4, ENC_BIG_ENDIAN0x00000000); |
3296 | curr_offset = curr_offset + 1; |
3297 | |
3298 | return (curr_offset - offset); |
3299 | } |
3300 | |
3301 | /* |
3302 | * [3] 10.5.1.9 Descriptive group or broadcast call reference |
3303 | */ |
3304 | static const true_false_string tfs_vgcs_vbs = { "VGCS (Group call reference)", "VBS (Broadcast call reference)" }; |
3305 | |
3306 | static const value_string gsm_a_call_priority_vals[] = { |
3307 | { 0, "no priority applied"}, |
3308 | { 1, "call priority level 4"}, |
3309 | { 2, "call priority level 3"}, |
3310 | { 3, "call priority level 2"}, |
3311 | { 4, "call priority level 1"}, |
3312 | { 5, "call priority level 0"}, |
3313 | { 6, "call priority level B"}, |
3314 | { 7, "call priority level A"}, |
3315 | { 0, NULL((void*)0) } |
3316 | }; |
3317 | |
3318 | uint16_t |
3319 | de_d_gb_call_ref(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U___attribute__((unused)), uint32_t offset, unsigned len _U___attribute__((unused)), char *add_string _U___attribute__((unused)), int string_len _U___attribute__((unused))) |
3320 | { |
3321 | uint32_t curr_offset = offset; |
3322 | |
3323 | proto_tree_add_item(tree, hf_gsm_a_group_call_reference, tvb, curr_offset, 4, ENC_BIG_ENDIAN0x00000000); |
3324 | proto_tree_add_item(tree, hf_gsm_a_service_flag, tvb, curr_offset, 4, ENC_BIG_ENDIAN0x00000000); |
3325 | proto_tree_add_item(tree, hf_gsm_a_af_acknowledgement, tvb, curr_offset, 4, ENC_BIG_ENDIAN0x00000000); |
3326 | proto_tree_add_item(tree, hf_gsm_a_call_priority, tvb, curr_offset, 4, ENC_BIG_ENDIAN0x00000000); |
3327 | curr_offset += 4; |
3328 | |
3329 | proto_tree_add_item(tree, hf_gsm_a_ciphering_info, tvb, curr_offset, 1, ENC_NA0x00000000); |
3330 | |
3331 | proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset<<3)+4, 4, ENC_BIG_ENDIAN0x00000000); |
3332 | curr_offset++; |
3333 | |
3334 | /* no length check possible */ |
3335 | |
3336 | return (curr_offset - offset); |
3337 | } |
3338 | |
3339 | /* |
3340 | * [3] 10.5.1.10a PD and SAPI $(CCBS)$ |
3341 | */ |
3342 | static const value_string gsm_a_sapi_vals[] = { |
3343 | { 0, "SAPI 0"}, |
3344 | { 1, "Reserved"}, |
3345 | { 2, "Reserved"}, |
3346 | { 3, "SAPI 3"}, |
3347 | { 0, NULL((void*)0) } |
3348 | }; |
3349 | |
3350 | static uint16_t |
3351 | de_pd_sapi(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U___attribute__((unused)), uint32_t offset, unsigned len _U___attribute__((unused)), char *add_string _U___attribute__((unused)), int string_len _U___attribute__((unused))) |
3352 | { |
3353 | uint32_t curr_offset; |
3354 | proto_tree *subtree; |
3355 | |
3356 | curr_offset = offset; |
3357 | |
3358 | subtree = |
3359 | proto_tree_add_subtree(tree, |
3360 | tvb, curr_offset, 1, ett_gsm_dtap_elem[DE_PD_SAPI], NULL((void*)0), |
3361 | val_to_str_ext_const(DE_PD_SAPI, &gsm_dtap_elem_strings_ext, "")); |
3362 | |
3363 | proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, curr_offset<<3, 2, ENC_BIG_ENDIAN0x00000000); |
3364 | |
3365 | proto_tree_add_item(subtree, hf_gsm_a_sapi, tvb, curr_offset, 1, ENC_NA0x00000000); |
3366 | |
3367 | proto_tree_add_item(tree, hf_gsm_a_L3_protocol_discriminator, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000); |
3368 | |
3369 | curr_offset++; |
3370 | |
3371 | /* no length check possible */ |
3372 | |
3373 | return (curr_offset - offset); |
3374 | } |
3375 | |
3376 | /* |
3377 | * [3] 10.5.1.11 Priority Level |
3378 | */ |
3379 | static const value_string gsm_a_call_prio_vals[] = { |
3380 | { 0x00, "no priority applied" }, |
3381 | { 0x01, "call priority level 4" }, |
3382 | { 0x02, "call priority level 3" }, |
3383 | { 0x03, "call priority level 2" }, |
3384 | { 0x04, "call priority level 1" }, |
3385 | { 0x05, "call priority level 0" }, |
3386 | { 0x06, "call priority level B" }, |
3387 | { 0x07, "call priority level A" }, |
3388 | { 0, NULL((void*)0) } |
3389 | }; |
3390 | |
3391 | static uint16_t |
3392 | de_prio(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U___attribute__((unused)), uint32_t offset, unsigned len _U___attribute__((unused)), char *add_string _U___attribute__((unused)), int string_len _U___attribute__((unused))) |
3393 | { |
3394 | uint32_t curr_offset; |
3395 | |
3396 | curr_offset = offset; |
3397 | |
3398 | proto_tree_add_item(tree, hf_gsm_a_b8spare, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000); |
3399 | proto_tree_add_bits_item(tree, hf_gsm_a_call_prio, tvb, (curr_offset<<3)+5, 3, ENC_BIG_ENDIAN0x00000000); |
3400 | curr_offset++; |
3401 | |
3402 | /* no length check possible */ |
3403 | |
3404 | return (curr_offset - offset); |
3405 | } |
3406 | |
3407 | /* |
3408 | * [3] 10.5.1.12.1 CN Common GSM-MAP NAS system information |
3409 | */ |
3410 | uint16_t |
3411 | de_cn_common_gsm_map_nas_sys_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U___attribute__((unused)), int string_len _U___attribute__((unused))) |
3412 | { |
3413 | uint32_t curr_offset; |
3414 | |
3415 | curr_offset = offset; |
3416 | |
3417 | proto_tree_add_item(tree, hf_gsm_a_lac, tvb, curr_offset, 2, ENC_BIG_ENDIAN0x00000000); |
3418 | curr_offset += 2; |
3419 | |
3420 | EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_extraneous_data)if ((len) > (curr_offset - offset)) { proto_tree_add_expert (tree, pinfo, &ei_gsm_a_extraneous_data, tvb, curr_offset , (len) - (curr_offset - offset)); curr_offset += ((len) - (curr_offset - offset)); }; |
3421 | |
3422 | return (curr_offset - offset); |
3423 | } |
3424 | |
3425 | /* |
3426 | * [3] 10.5.1.12.2 CS domain specific system information |
3427 | */ |
3428 | static const true_false_string gsm_a_att_value = { |
3429 | "MSs shall apply IMSI attach and detach procedure", |
3430 | "MSs shall not apply IMSI attach and detach procedure" |
3431 | }; |
3432 | |
3433 | uint16_t |
3434 | de_cs_domain_spec_sys_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U___attribute__((unused)), int string_len _U___attribute__((unused))) |
3435 | { |
3436 | uint32_t curr_offset; |
3437 | |
3438 | curr_offset = offset; |
3439 | |
3440 | proto_tree_add_item(tree, hf_gsm_a_rr_t3212, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000); |
3441 | curr_offset++; |
3442 | proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset<<3), 7, ENC_BIG_ENDIAN0x00000000); |
3443 | proto_tree_add_item(tree, hf_gsm_a_att, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000); |
3444 | curr_offset++; |
3445 | |
3446 | EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_extraneous_data)if ((len) > (curr_offset - offset)) { proto_tree_add_expert (tree, pinfo, &ei_gsm_a_extraneous_data, tvb, curr_offset , (len) - (curr_offset - offset)); curr_offset += ((len) - (curr_offset - offset)); }; |
3447 | |
3448 | return (curr_offset - offset); |
3449 | } |
3450 | |
3451 | /* |
3452 | * [3] 10.5.1.12.3 PS domain specific system information |
3453 | */ |
3454 | static const true_false_string gsm_a_nmo_1_value = { |
3455 | "Network Mode of Operation I is used for MS configured for NMO_I_Behaviour", |
3456 | "Network Mode of Operation indicated in Bit 1 (NMO) is used for MS configured for NMO_I_Behaviour" |
3457 | }; |
3458 | |
3459 | static const true_false_string gsm_a_nmo_value = { |
3460 | "Network Mode of Operation II", |
3461 | "Network Mode of Operation I" |
3462 | }; |
3463 | |
3464 | uint16_t |
3465 | de_ps_domain_spec_sys_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U___attribute__((unused)), int string_len _U___attribute__((unused))) |
3466 | { |
3467 | uint32_t curr_offset; |
3468 | |
3469 | curr_offset = offset; |
3470 | |
3471 | proto_tree_add_item(tree, hf_gsm_a_gm_rac, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000); |
3472 | curr_offset++; |
3473 | proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset<<3), 6, ENC_BIG_ENDIAN0x00000000); |
3474 | proto_tree_add_item(tree, hf_gsm_a_nmo_1, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000); |
3475 | proto_tree_add_item(tree, hf_gsm_a_nmo, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000); |
3476 | curr_offset++; |
3477 | |
3478 | EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_extraneous_data)if ((len) > (curr_offset - offset)) { proto_tree_add_expert (tree, pinfo, &ei_gsm_a_extraneous_data, tvb, curr_offset , (len) - (curr_offset - offset)); curr_offset += ((len) - (curr_offset - offset)); }; |
3479 | |
3480 | return (curr_offset - offset); |
3481 | } |
3482 | |
3483 | /* |
3484 | * [3] 10.5.1.13 PLMN list |
3485 | */ |
3486 | uint16_t |
3487 | de_plmn_list(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string, int string_len) |
3488 | { |
3489 | char *mcc_mnc_str; |
3490 | uint32_t curr_offset; |
3491 | uint8_t num_plmn; |
3492 | proto_tree* subtree; |
3493 | |
3494 | curr_offset = offset; |
3495 | |
3496 | num_plmn = 0; |
3497 | while ((len - (curr_offset - offset)) >= 3) |
3498 | { |
3499 | subtree = proto_tree_add_subtree_format(tree, tvb, curr_offset, 3, ett_gsm_a_plmn, NULL((void*)0), "PLMN[%u]", num_plmn + 1); |
3500 | mcc_mnc_str = dissect_e212_mcc_mnc_wmem_packet_str(tvb, pinfo, subtree, curr_offset, E212_NONE, true1); |
3501 | proto_item_append_text(subtree, ": %s", mcc_mnc_str); |
3502 | |
3503 | curr_offset += 3; |
3504 | |
3505 | num_plmn++; |
3506 | } |
3507 | |
3508 | if (add_string) |
3509 | snprintf(add_string, string_len, " - %u PLMN%s", |
3510 | num_plmn, plurality(num_plmn, "", "s")((num_plmn) == 1 ? ("") : ("s"))); |
3511 | |
3512 | EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_extraneous_data)if ((len) > (curr_offset - offset)) { proto_tree_add_expert (tree, pinfo, &ei_gsm_a_extraneous_data, tvb, curr_offset , (len) - (curr_offset - offset)); curr_offset += ((len) - (curr_offset - offset)); }; |
3513 | |
3514 | return (curr_offset - offset); |
3515 | } |
3516 | |
3517 | /* |
3518 | * 10.5.1.14 NAS container for PS HO |
3519 | */ |
3520 | |
3521 | static const value_string gsm_a_pld_xid_vals[] = { |
3522 | { 0x00, "The MS shall perform a Reset of LLC and SNDCP without old XID indicator" }, |
3523 | { 0x01, "The MS shall perform a Reset of LLC and SNDCP with old XID indicator" }, |
3524 | { 0, NULL((void*)0) } |
3525 | }; |
3526 | |
3527 | static uint16_t |
3528 | de_nas_cont_for_ps_ho(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U___attribute__((unused)), int string_len _U___attribute__((unused))) |
3529 | { |
3530 | uint32_t curr_offset; |
3531 | |
3532 | curr_offset = offset; |
3533 | |
3534 | /* 8 7 6 5 4 3 2 1 |
3535 | * 0 0 0 old 0 Type of ciphering |
3536 | * spare spare spare XID spare algorithm |
3537 | */ |
3538 | proto_tree_add_item(tree, hf_gsm_a_old_xid, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000); |
3539 | proto_tree_add_item(tree, hf_gsm_a_type_of_ciph_alg, tvb, curr_offset, 1, ENC_BIG_ENDIAN0x00000000); |
3540 | curr_offset++; |
3541 | |
3542 | /* IOV-UI value (octet 2 to 5) |
3543 | * The IOV-UI value consists of 32 bits, the format is defined in 3GPP TS 44.064 [78a]. |
3544 | */ |
3545 | proto_tree_add_item(tree, hf_gsm_a_iov_ui, tvb, curr_offset, 4, ENC_BIG_ENDIAN0x00000000); |
3546 | curr_offset += 4; |
3547 | |
3548 | EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_extraneous_data)if ((len) > (curr_offset - offset)) { proto_tree_add_expert (tree, pinfo, &ei_gsm_a_extraneous_data, tvb, curr_offset , (len) - (curr_offset - offset)); curr_offset += ((len) - (curr_offset - offset)); }; |
3549 | |
3550 | return (curr_offset - offset); |
3551 | } |
3552 | |
3553 | /* |
3554 | * 10.5.1.15 MS network feature support |
3555 | */ |
3556 | static const true_false_string gsm_a_ext_periodic_timers_value = { |
3557 | "MS supports the extended periodic timer in this domain", |
3558 | "MS does not support the extended periodic timer in this domain" |
3559 | }; |
3560 | |
3561 | static uint16_t |
3562 | de_ms_net_feat_sup(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U___attribute__((unused)), uint32_t offset, unsigned len _U___attribute__((unused)), char *add_string _U___attribute__((unused)), int string_len _U___attribute__((unused))) |
3563 | { |
3564 | uint32_t curr_offset, bit_offset; |
3565 | |
3566 | curr_offset = offset; |
3567 | bit_offset = (curr_offset<<3)+4; |
3568 | |
3569 | proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, 3, ENC_BIG_ENDIAN0x00000000); |
3570 | bit_offset += 3; |
3571 | proto_tree_add_bits_item(tree, hf_gsm_a_ext_periodic_timers, tvb, bit_offset, 1, ENC_BIG_ENDIAN0x00000000); |
3572 | curr_offset++; |
3573 | |
3574 | return (curr_offset - offset); |
3575 | } |
3576 | |
3577 | |
3578 | uint16_t (*common_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string, int string_len) = { |
3579 | /* Common Information Elements 10.5.1 */ |
3580 | de_cell_id, /* Cell Identity */ |
3581 | de_ciph_key_seq_num, /* Ciphering Key Sequence Number */ |
3582 | de_lai, /* Location Area Identification */ |
3583 | de_mid, /* Mobile Identity */ |
3584 | de_ms_cm_1, /* Mobile Station Classmark 1 */ |
3585 | de_ms_cm_2, /* Mobile Station Classmark 2 */ |
3586 | de_ms_cm_3, /* Mobile Station Classmark 3 */ |
3587 | de_spare_nibble, /* Spare Half Octet */ |
3588 | de_d_gb_call_ref, /* Descriptive group or broadcast call reference */ |
3589 | NULL((void*)0) /* handled inline */, /* Group Cipher Key Number */ |
3590 | de_pd_sapi, /* PD and SAPI $(CCBS)$ */ |
3591 | /* Pos 10 */ |
3592 | de_prio /* handled inline */, /* Priority Level */ |
3593 | de_cn_common_gsm_map_nas_sys_info, /* 10.5.1.12.1 CN Common GSM-MAP NAS system information */ |
3594 | de_cs_domain_spec_sys_info, /* 10.5.1.12.2 CS domain specific system information */ |
3595 | de_ps_domain_spec_sys_info, /* 10.5.1.12.2 PS domain specific system information */ |
3596 | de_plmn_list, /* 10.5.1.13 PLMN list */ |
3597 | de_nas_cont_for_ps_ho, /* 10.5.1.14 NAS container for PS HO */ |
3598 | de_ms_net_feat_sup, /* 10.5.1.15 MS network feature support */ |
3599 | NULL((void*)0), /* NONE */ |
3600 | }; |
3601 | |
3602 | /* TAP STAT INFO */ |
3603 | typedef enum |
3604 | { |
3605 | IEI_COLUMN, |
3606 | MSG_NAME_COLUMN, |
3607 | COUNT_COLUMN |
3608 | } gsm_a_stat_columns; |
3609 | |
3610 | static stat_tap_table_item gsm_a_stat_fields[] = { |
3611 | {TABLE_ITEM_UINT, TAP_ALIGN_RIGHT, "IEI", "%d"}, |
3612 | {TABLE_ITEM_STRING, TAP_ALIGN_LEFT, "Message Name", "%-25s"}, |
3613 | {TABLE_ITEM_UINT, TAP_ALIGN_RIGHT, "Count", "%d"} |
3614 | }; |
3615 | |
3616 | static void gsm_a_stat_init(stat_tap_table_ui* new_stat, const char *table_title, const value_string *msg_strings) |
3617 | { |
3618 | int num_fields = array_length(gsm_a_stat_fields)(sizeof (gsm_a_stat_fields) / sizeof (gsm_a_stat_fields)[0]); |
3619 | stat_tap_table* table; |
3620 | unsigned i; |
3621 | stat_tap_table_item_type items[array_length(gsm_a_stat_fields)(sizeof (gsm_a_stat_fields) / sizeof (gsm_a_stat_fields)[0])]; |
3622 | |
3623 | items[IEI_COLUMN].type = TABLE_ITEM_UINT; |
3624 | items[MSG_NAME_COLUMN].type = TABLE_ITEM_STRING; |
3625 | items[COUNT_COLUMN].type = TABLE_ITEM_UINT; |
3626 | items[COUNT_COLUMN].value.uint_value = 0; |
3627 | |
3628 | table = stat_tap_find_table(new_stat, table_title); |
3629 | if (table) { |
3630 | if (new_stat->stat_tap_reset_table_cb) { |
3631 | new_stat->stat_tap_reset_table_cb(table); |
3632 | } |
3633 | return; |
3634 | } |
3635 | |
3636 | table = stat_tap_init_table(table_title, num_fields, 0, NULL((void*)0)); |
3637 | stat_tap_add_table(new_stat, table); |
3638 | |
3639 | /* Add a row for each value type */ |
3640 | for (i = 0; i < 256; i++) |
3641 | { |
3642 | const char *msg_str = try_val_to_str(i, msg_strings); |
3643 | char *col_str; |
3644 | if (msg_str) { |
3645 | col_str = g_strdup(msg_str)g_strdup_inline (msg_str); |
3646 | } else { |
3647 | col_str = ws_strdup_printf("Unknown message %d", i)wmem_strdup_printf(((void*)0), "Unknown message %d", i); |
3648 | } |
3649 | |
3650 | items[IEI_COLUMN].value.uint_value = i; |
3651 | items[MSG_NAME_COLUMN].value.string_value = col_str; |
3652 | stat_tap_init_table_row(table, i, num_fields, items); |
3653 | } |
3654 | } |
3655 | |
3656 | static void gsm_a_bssmap_stat_init(stat_tap_table_ui* new_stat) |
3657 | { |
3658 | gsm_a_stat_init(new_stat, |
3659 | "GSM A-I/F BSSMAP Statistics", gsm_a_bssmap_msg_strings); |
3660 | } |
3661 | |
3662 | static void gsm_a_dtap_mm_stat_init(stat_tap_table_ui* new_stat) |
3663 | { |
3664 | gsm_a_stat_init(new_stat, |
3665 | "GSM A-I/F DTAP Mobility Management Statistics", gsm_a_dtap_msg_mm_strings); |
3666 | } |
3667 | |
3668 | static void gsm_a_dtap_rr_stat_init(stat_tap_table_ui* new_stat) |
3669 | { |
3670 | gsm_a_stat_init(new_stat, |
3671 | "GSM A-I/F DTAP Radio Resource Management Statistics", gsm_a_dtap_msg_rr_strings); |
3672 | } |
3673 | |
3674 | static void gsm_a_dtap_cc_stat_init(stat_tap_table_ui* new_stat) |
3675 | { |
3676 | gsm_a_stat_init(new_stat, |
3677 | "GSM A-I/F DTAP Call Control Statistics", gsm_a_dtap_msg_cc_strings); |
3678 | } |
3679 | |
3680 | static void gsm_a_dtap_gmm_stat_init(stat_tap_table_ui* new_stat) |
3681 | { |
3682 | gsm_a_stat_init(new_stat, |
3683 | "GSM A-I/F DTAP GPRS Mobility Management Statistics", gsm_a_dtap_msg_gmm_strings); |
3684 | } |
3685 | |
3686 | static void gsm_a_dtap_sm_stat_init(stat_tap_table_ui* new_stat) |
3687 | { |
3688 | gsm_a_stat_init(new_stat, |
3689 | "GSM A-I/F DTAP GPRS Session Management Statistics", gsm_a_dtap_msg_sm_strings); |
3690 | } |
3691 | |
3692 | static void gsm_a_dtap_sms_stat_init(stat_tap_table_ui* new_stat) |
3693 | { |
3694 | gsm_a_stat_init(new_stat, |
3695 | "GSM A-I/F DTAP Short Message Service Statistics", gsm_a_dtap_msg_sms_strings); |
3696 | } |
3697 | |
3698 | static void gsm_a_dtap_tp_stat_init(stat_tap_table_ui* new_stat) |
3699 | { |
3700 | gsm_a_stat_init(new_stat, |
3701 | "GSM A-I/F DTAP Special Conformance Testing Functions", gsm_a_dtap_msg_tp_strings); |
3702 | } |
3703 | |
3704 | static void gsm_a_dtap_ss_stat_init(stat_tap_table_ui* new_stat) |
3705 | { |
3706 | gsm_a_stat_init(new_stat, |
3707 | "GSM A-I/F DTAP Supplementary Services Statistics", gsm_a_dtap_msg_ss_strings); |
3708 | } |
3709 | |
3710 | static void gsm_a_sacch_rr_stat_init(stat_tap_table_ui* new_stat) |
3711 | { |
3712 | gsm_a_stat_init(new_stat, |
3713 | "GSM A-I/F SACCH Statistics", gsm_a_rr_short_pd_msg_strings); |
3714 | } |
3715 | |
3716 | static tap_packet_status |
3717 | gsm_a_stat_packet(void *tapdata, const void *gatr_ptr, uint8_t pdu_type, int protocol_disc) |
3718 | { |
3719 | stat_data_t* stat_data = (stat_data_t*)tapdata; |
3720 | const gsm_a_tap_rec_t *gatr = (const gsm_a_tap_rec_t *) gatr_ptr; |
3721 | stat_tap_table* table; |
3722 | stat_tap_table_item_type* msg_data; |
3723 | |
3724 | if (gatr->pdu_type != pdu_type) return TAP_PACKET_DONT_REDRAW; |
3725 | if (pdu_type == BSSAP_PDU_TYPE_DTAP0x01 && (int)gatr->protocol_disc != protocol_disc) return TAP_PACKET_DONT_REDRAW; |
3726 | if (pdu_type == GSM_A_PDU_TYPE_SACCH7 && gatr->protocol_disc != 0) return TAP_PACKET_DONT_REDRAW; |
3727 | |
3728 | table = g_array_index(stat_data->stat_tap_data->tables, stat_tap_table*, 0)(((stat_tap_table**) (void *) (stat_data->stat_tap_data-> tables)->data) [(0)]); |
3729 | msg_data = stat_tap_get_field_data(table, gatr->message_type, COUNT_COLUMN); |
3730 | msg_data->value.uint_value++; |
3731 | stat_tap_set_field_data(table, gatr->message_type, COUNT_COLUMN, msg_data); |
3732 | |
3733 | return TAP_PACKET_REDRAW; |
3734 | } |
3735 | |
3736 | static tap_packet_status |
3737 | gsm_a_bssmap_stat_packet(void *tapdata, packet_info *pinfo _U___attribute__((unused)), epan_dissect_t *edt _U___attribute__((unused)), const void *gatr_ptr, tap_flags_t flags _U___attribute__((unused))) |
3738 | { |
3739 | return gsm_a_stat_packet(tapdata, gatr_ptr, BSSAP_PDU_TYPE_BSSMAP0x00, 0); |
3740 | } |
3741 | |
3742 | static tap_packet_status |
3743 | gsm_a_dtap_mm_stat_packet(void *tapdata, packet_info *pinfo _U___attribute__((unused)), epan_dissect_t *edt _U___attribute__((unused)), const void *gatr_ptr, tap_flags_t flags _U___attribute__((unused))) |
3744 | { |
3745 | return gsm_a_stat_packet(tapdata, gatr_ptr, BSSAP_PDU_TYPE_DTAP0x01, PD_MM); |
3746 | } |
3747 | |
3748 | static tap_packet_status |
3749 | gsm_a_dtap_rr_stat_packet(void *tapdata, packet_info *pinfo _U___attribute__((unused)), epan_dissect_t *edt _U___attribute__((unused)), const void *gatr_ptr, tap_flags_t flags _U___attribute__((unused))) |
3750 | { |
3751 | return gsm_a_stat_packet(tapdata, gatr_ptr, BSSAP_PDU_TYPE_DTAP0x01, PD_RR); |
3752 | } |
3753 | |
3754 | static tap_packet_status |
3755 | gsm_a_dtap_cc_stat_packet(void *tapdata, packet_info *pinfo _U___attribute__((unused)), epan_dissect_t *edt _U___attribute__((unused)), const void *gatr_ptr, tap_flags_t flags _U___attribute__((unused))) |
3756 | { |
3757 | return gsm_a_stat_packet(tapdata, gatr_ptr, BSSAP_PDU_TYPE_DTAP0x01, PD_CC); |
3758 | } |
3759 | |
3760 | static tap_packet_status |
3761 | gsm_a_dtap_gmm_stat_packet(void *tapdata, packet_info *pinfo _U___attribute__((unused)), epan_dissect_t *edt _U___attribute__((unused)), const void *gatr_ptr, tap_flags_t flags _U___attribute__((unused))) |
3762 | { |
3763 | return gsm_a_stat_packet(tapdata, gatr_ptr, BSSAP_PDU_TYPE_DTAP0x01, PD_GMM); |
3764 | } |
3765 | |
3766 | static tap_packet_status |
3767 | gsm_a_dtap_sms_stat_packet(void *tapdata, packet_info *pinfo _U___attribute__((unused)), epan_dissect_t *edt _U___attribute__((unused)), const void *gatr_ptr, tap_flags_t flags _U___attribute__((unused))) |
3768 | { |
3769 | return gsm_a_stat_packet(tapdata, gatr_ptr, BSSAP_PDU_TYPE_DTAP0x01, PD_SMS); |
3770 | } |
3771 | |
3772 | static tap_packet_status |
3773 | gsm_a_dtap_sm_stat_packet(void *tapdata, packet_info *pinfo _U___attribute__((unused)), epan_dissect_t *edt _U___attribute__((unused)), const void *gatr_ptr, tap_flags_t flags _U___attribute__((unused))) |
3774 | { |
3775 | return gsm_a_stat_packet(tapdata, gatr_ptr, BSSAP_PDU_TYPE_DTAP0x01, PD_SM); |
3776 | } |
3777 | |
3778 | static tap_packet_status |
3779 | gsm_a_dtap_ss_stat_packet(void *tapdata, packet_info *pinfo _U___attribute__((unused)), epan_dissect_t *edt _U___attribute__((unused)), const void *gatr_ptr, tap_flags_t flags _U___attribute__((unused))) |
3780 | { |
3781 | return gsm_a_stat_packet(tapdata, gatr_ptr, BSSAP_PDU_TYPE_DTAP0x01, PD_SS); |
3782 | } |
3783 | |
3784 | static tap_packet_status |
3785 | gsm_a_dtap_tp_stat_packet(void *tapdata, packet_info *pinfo _U___attribute__((unused)), epan_dissect_t *edt _U___attribute__((unused)), const void *gatr_ptr, tap_flags_t flags _U___attribute__((unused))) |
3786 | { |
3787 | return gsm_a_stat_packet(tapdata, gatr_ptr, BSSAP_PDU_TYPE_DTAP0x01, PD_TP); |
3788 | } |
3789 | |
3790 | static tap_packet_status |
3791 | gsm_a_sacch_rr_stat_packet(void *tapdata, packet_info *pinfo _U___attribute__((unused)), epan_dissect_t *edt _U___attribute__((unused)), const void *gatr_ptr, tap_flags_t flags _U___attribute__((unused))) |
3792 | { |
3793 | return gsm_a_stat_packet(tapdata, gatr_ptr, GSM_A_PDU_TYPE_SACCH7, 0); |
3794 | } |
3795 | |
3796 | static void |
3797 | gsm_a_stat_reset(stat_tap_table* table) |
3798 | { |
3799 | unsigned element; |
3800 | stat_tap_table_item_type* item_data; |
3801 | |
3802 | for (element = 0; element < table->num_elements; element++) |
3803 | { |
3804 | item_data = stat_tap_get_field_data(table, element, COUNT_COLUMN); |
3805 | item_data->value.uint_value = 0; |
3806 | stat_tap_set_field_data(table, element, COUNT_COLUMN, item_data); |
3807 | } |
3808 | } |
3809 | |
3810 | static void |
3811 | gsm_a_stat_free_table_item(stat_tap_table* table _U___attribute__((unused)), unsigned row _U___attribute__((unused)), unsigned column, stat_tap_table_item_type* field_data) |
3812 | { |
3813 | if (column != MSG_NAME_COLUMN) return; |
3814 | g_free((char*)field_data->value.string_value); |
3815 | } |
3816 | |
3817 | /* Register the protocol with Wireshark */ |
3818 | void |
3819 | proto_register_gsm_a_common(void) |
3820 | { |
3821 | unsigned i; |
3822 | unsigned last_offset; |
3823 | |
3824 | /* Setup list of header fields */ |
3825 | static hf_register_info hf[] = |
3826 | { |
3827 | { &hf_gsm_a_common_elem_id, |
3828 | { "Element ID", "gsm_a.common.elem_id", |
3829 | FT_UINT8, BASE_HEX, NULL((void*)0), 0, |
3830 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
3831 | }, |
3832 | { &hf_gsm_a_common_elem_id_f0, |
3833 | { "Element ID", "gsm_a.common.elem_id", |
3834 | FT_UINT8, BASE_HEX, NULL((void*)0), 0xF0, |
3835 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
3836 | }, |
3837 | { &hf_gsm_a_l_ext, |
3838 | { "ext", "gsm_a.l_ext", |
3839 | FT_UINT8, BASE_DEC, NULL((void*)0), 0x80, |
3840 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
3841 | }, |
3842 | { &hf_gsm_a_tmsi, |
3843 | { "TMSI/P-TMSI", "gsm_a.tmsi", |
3844 | FT_UINT32, BASE_DEC_HEX, 0, 0x0, |
3845 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
3846 | }, |
3847 | { &hf_gsm_a_imei, |
3848 | { "IMEI", "gsm_a.imei", |
3849 | FT_STRING, BASE_NONE, 0, 0, |
3850 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
3851 | }, |
3852 | { &hf_gsm_a_imeisv, |
3853 | { "IMEISV", "gsm_a.imeisv", |
3854 | FT_STRING, BASE_NONE, 0, 0, |
3855 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
3856 | }, |
3857 | { &hf_gsm_a_MSC_rev, |
3858 | { "Revision Level", "gsm_a.MSC_rev", |
3859 | FT_UINT8, BASE_DEC, VALS(gsm_a_msc_rev_vals)((0 ? (const struct _value_string*)0 : ((gsm_a_msc_rev_vals)) )), 0x60, |
3860 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
3861 | }, |
3862 | { &hf_gsm_a_ES_IND, |
3863 | { "ES IND", "gsm_a.ES_IND", |
3864 | FT_BOOLEAN, 8, TFS(&ES_IND_vals)((0 ? (const struct true_false_string*)0 : ((&ES_IND_vals )))), 0x10, |
3865 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
3866 | }, |
3867 | { &hf_gsm_a_A5_1_algorithm_sup, |
3868 | { "A5/1 algorithm supported", "gsm_a.A5_1_algorithm_sup", |
3869 | FT_BOOLEAN, 8, TFS(&A5_1_algorithm_sup_vals)((0 ? (const struct true_false_string*)0 : ((&A5_1_algorithm_sup_vals )))), 0x08, |
3870 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
3871 | }, |
3872 | { &hf_gsm_a_RF_power_capability, |
3873 | { "RF Power Capability", "gsm_a.RF_power_capability", |
3874 | FT_UINT8, BASE_DEC, VALS(RF_power_capability_vals)((0 ? (const struct _value_string*)0 : ((RF_power_capability_vals )))), 0x07, |
3875 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
3876 | }, |
3877 | { &hf_gsm_a_ps_sup_cap, |
3878 | { "PS capability (pseudo-synchronization capability)", "gsm_a.ps_sup_cap", |
3879 | FT_BOOLEAN, 8, TFS(&ps_sup_cap_vals)((0 ? (const struct true_false_string*)0 : ((&ps_sup_cap_vals )))), 0x40, |
3880 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
3881 | }, |
3882 | { &hf_gsm_a_SS_screening_indicator, |
3883 | { "SS Screening Indicator", "gsm_a.SS_screening_indicator", |
3884 | FT_UINT8, BASE_DEC, VALS(SS_screening_indicator_vals)((0 ? (const struct _value_string*)0 : ((SS_screening_indicator_vals )))), 0x30, |
3885 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
3886 | }, |
3887 | { &hf_gsm_a_SM_capability, |
3888 | { "SM capability (MT SMS pt to pt capability)", "gsm_a.SM_cap", |
3889 | FT_BOOLEAN, 8, TFS(&SM_capability_vals)((0 ? (const struct true_false_string*)0 : ((&SM_capability_vals )))), 0x08, |
3890 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
3891 | }, |
3892 | { &hf_gsm_a_VBS_notification_rec, |
3893 | { "VBS notification reception", "gsm_a.VBS_notification_rec", |
3894 | FT_BOOLEAN, 8, TFS(&VBS_notification_rec_vals)((0 ? (const struct true_false_string*)0 : ((&VBS_notification_rec_vals )))), 0x04, |
3895 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
3896 | }, |
3897 | { &hf_gsm_a_VGCS_notification_rec, |
3898 | { "VGCS notification reception", "gsm_a.VGCS_notification_rec", |
3899 | FT_BOOLEAN, 8, TFS(&VGCS_notification_rec_vals)((0 ? (const struct true_false_string*)0 : ((&VGCS_notification_rec_vals )))), 0x02, |
3900 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
3901 | }, |
3902 | { &hf_gsm_a_FC_frequency_cap, |
3903 | { "FC Frequency Capability", "gsm_a.FC_frequency_cap", |
3904 | FT_BOOLEAN, 8, TFS(&FC_frequency_cap_vals)((0 ? (const struct true_false_string*)0 : ((&FC_frequency_cap_vals )))), 0x01, |
3905 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
3906 | }, |
3907 | { &hf_gsm_a_CM3, |
3908 | { "CM3", "gsm_a.CM3", |
3909 | FT_BOOLEAN, 8, TFS(&CM3_vals)((0 ? (const struct true_false_string*)0 : ((&CM3_vals))) ), 0x80, |
3910 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
3911 | }, |
3912 | { &hf_gsm_a_LCS_VA_cap, |
3913 | { "LCS VA capability (LCS value added location request notification capability)", "gsm_a.LCS_VA_cap", |
3914 | FT_BOOLEAN, 8, TFS(&LCS_VA_cap_vals)((0 ? (const struct true_false_string*)0 : ((&LCS_VA_cap_vals )))), 0x20, |
3915 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
3916 | }, |
3917 | { &hf_gsm_a_UCS2_treatment, |
3918 | { "UCS2 treatment", "gsm_a.UCS2_treatment", |
3919 | FT_BOOLEAN, 8, TFS(&UCS2_treatment_vals)((0 ? (const struct true_false_string*)0 : ((&UCS2_treatment_vals )))), 0x10, |
3920 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
3921 | }, |
3922 | { &hf_gsm_a_SoLSA, |
3923 | { "SoLSA", "gsm_a.SoLSA", |
3924 | FT_BOOLEAN, 8, TFS(&SoLSA_vals)((0 ? (const struct true_false_string*)0 : ((&SoLSA_vals) ))), 0x08, |
3925 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
3926 | }, |
3927 | { &hf_gsm_a_CMSP, |
3928 | { "CMSP: CM Service Prompt", "gsm_a.CMSP", |
3929 | FT_BOOLEAN, 8, TFS(&CMSP_vals)((0 ? (const struct true_false_string*)0 : ((&CMSP_vals)) )), 0x04, |
3930 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
3931 | }, |
3932 | { &hf_gsm_a_A5_7_algorithm_sup, |
3933 | { "A5/7 algorithm supported", "gsm_a.A5_7_algorithm_sup", |
3934 | FT_BOOLEAN, BASE_NONE, TFS(&A5_7_algorithm_sup_vals)((0 ? (const struct true_false_string*)0 : ((&A5_7_algorithm_sup_vals )))), 0x0, |
3935 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
3936 | }, |
3937 | { &hf_gsm_a_A5_6_algorithm_sup, |
3938 | { "A5/6 algorithm supported", "gsm_a.A5_6_algorithm_sup", |
3939 | FT_BOOLEAN, BASE_NONE, TFS(&A5_6_algorithm_sup_vals)((0 ? (const struct true_false_string*)0 : ((&A5_6_algorithm_sup_vals )))), 0x0, |
3940 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
3941 | }, |
3942 | { &hf_gsm_a_A5_5_algorithm_sup, |
3943 | { "A5/5 algorithm supported", "gsm_a.A5_5_algorithm_sup", |
3944 | FT_BOOLEAN, BASE_NONE, TFS(&A5_5_algorithm_sup_vals)((0 ? (const struct true_false_string*)0 : ((&A5_5_algorithm_sup_vals )))), 0x0, |
3945 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
3946 | }, |
3947 | { &hf_gsm_a_A5_4_algorithm_sup, |
3948 | { "A5/4 algorithm supported", "gsm_a.A5_4_algorithm_sup", |
3949 | FT_BOOLEAN, BASE_NONE, TFS(&A5_4_algorithm_sup_vals)((0 ? (const struct true_false_string*)0 : ((&A5_4_algorithm_sup_vals )))), 0x0, |
3950 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
3951 | }, |
3952 | { &hf_gsm_a_A5_3_algorithm_sup, |
3953 | { "A5/3 algorithm supported", "gsm_a.A5_3_algorithm_sup", |
3954 | FT_BOOLEAN, 8, TFS(&A5_3_algorithm_sup_vals)((0 ? (const struct true_false_string*)0 : ((&A5_3_algorithm_sup_vals )))), 0x02, |
3955 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
3956 | }, |
3957 | { &hf_gsm_a_A5_2_algorithm_sup, |
3958 | { "A5/2 algorithm supported", "gsm_a.A5_2_algorithm_sup", |
3959 | FT_BOOLEAN, 8, TFS(&A5_2_algorithm_sup_vals)((0 ? (const struct true_false_string*)0 : ((&A5_2_algorithm_sup_vals )))), 0x01, |
3960 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
3961 | }, |
3962 | { &hf_gsm_a_mobile_identity_type, |
3963 | { "Mobile Identity Type", "gsm_a.ie.mobileid.type", |
3964 | FT_UINT8, BASE_DEC, VALS(mobile_identity_type_vals)((0 ? (const struct _value_string*)0 : ((mobile_identity_type_vals )))), 0x07, |
3965 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
3966 | }, |
3967 | { &hf_gsm_a_id_dig_1, |
3968 | { "Identity Digit 1", "gsm_a.id_dig_1", |
3969 | FT_UINT8, BASE_DEC, NULL((void*)0), 0xf0, |
3970 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
3971 | }, |
3972 | { &hf_gsm_a_odd_even_ind, |
3973 | { "Odd/even indication", "gsm_a.oddevenind", |
3974 | FT_BOOLEAN, 8, TFS(&oddevenind_vals)((0 ? (const struct true_false_string*)0 : ((&oddevenind_vals )))), 0x08, |
3975 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
3976 | }, |
3977 | { &hf_gsm_a_unused, |
3978 | { "Unused", "gsm_a.unused", |
3979 | FT_UINT8, BASE_HEX, NULL((void*)0), 0xf0, |
3980 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
3981 | }, |
3982 | { &hf_gsm_a_tmgi_mcc_mnc_ind, |
3983 | { "MCC/MNC indication", "gsm_a.tmgi_mcc_mnc_ind", |
3984 | FT_BOOLEAN, 8, TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present )))), 0x10, |
3985 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
3986 | }, |
3987 | { &hf_gsm_a_mbs_ses_id_ind, |
3988 | { "MBMS Session Identity indication", "gsm_a.mbs_session_id_ind", |
3989 | FT_BOOLEAN, 8, TFS(&tfs_present_not_present)((0 ? (const struct true_false_string*)0 : ((&tfs_present_not_present )))), 0x20, |
3990 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
3991 | }, |
3992 | { &hf_gsm_a_mbs_service_id, |
3993 | { "MBMS Service ID", "gsm_a.mbs_service_id", |
3994 | FT_UINT24, BASE_HEX, NULL((void*)0), 0x0, |
3995 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
3996 | }, |
3997 | { &hf_gsm_a_mbs_session_id, |
3998 | { "MBMS Session ID", "gsm_a.mbs_session_id", |
3999 | FT_UINT8, BASE_HEX, NULL((void*)0), 0x0, |
4000 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4001 | }, |
4002 | { &hf_gsm_a_length, |
4003 | { "Length", "gsm_a.len", |
4004 | FT_UINT16, BASE_DEC, NULL((void*)0), 0, |
4005 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4006 | }, |
4007 | { &hf_gsm_a_element_value, |
4008 | { "Element Value", "gsm_a.element_value", |
4009 | FT_BYTES, BASE_NONE, NULL((void*)0), 0, |
4010 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4011 | }, |
4012 | { &hf_gsm_a_extension, |
4013 | { "Extension", "gsm_a.extension", |
4014 | FT_BOOLEAN, 8, TFS(&gsm_a_extension_value)((0 ? (const struct true_false_string*)0 : ((&gsm_a_extension_value )))), 0x80, |
4015 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4016 | }, |
4017 | { &hf_gsm_a_L3_protocol_discriminator, |
4018 | { "Protocol discriminator", "gsm_a.L3_protocol_discriminator", |
4019 | FT_UINT8, BASE_HEX, VALS(protocol_discriminator_vals)((0 ? (const struct _value_string*)0 : ((protocol_discriminator_vals )))), 0x0f, |
4020 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4021 | }, |
4022 | { &hf_gsm_a_call_prio, |
4023 | { "Call priority", "gsm_a.call_prio", |
4024 | FT_UINT8, BASE_DEC, VALS(gsm_a_call_prio_vals)((0 ? (const struct _value_string*)0 : ((gsm_a_call_prio_vals )))), 0x00, |
4025 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4026 | }, |
4027 | { &hf_gsm_a_type_of_ciph_alg, |
4028 | { "Type of ciphering algorithm", "gsm_a.type_of_ciph_alg", |
4029 | FT_UINT8, BASE_DEC, VALS(gsm_a_gm_type_of_ciph_alg_vals)((0 ? (const struct _value_string*)0 : ((gsm_a_gm_type_of_ciph_alg_vals )))), 0x07, |
4030 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4031 | }, |
4032 | { &hf_gsm_a_att, |
4033 | { "ATT", "gsm_a.att", |
4034 | FT_BOOLEAN, 8, TFS(&gsm_a_att_value)((0 ? (const struct true_false_string*)0 : ((&gsm_a_att_value )))), 0x01, |
4035 | "Attach-detach allowed", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4036 | }, |
4037 | { &hf_gsm_a_nmo_1, |
4038 | { "NMO I", "gsm_a.nmo_1", |
4039 | FT_BOOLEAN, 8, TFS(&gsm_a_nmo_1_value)((0 ? (const struct true_false_string*)0 : ((&gsm_a_nmo_1_value )))), 0x02, |
4040 | "Network Mode of Operation I", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4041 | }, |
4042 | { &hf_gsm_a_nmo, |
4043 | { "NMO", "gsm_a.nmo", |
4044 | FT_BOOLEAN, 8, TFS(&gsm_a_nmo_value)((0 ? (const struct true_false_string*)0 : ((&gsm_a_nmo_value )))), 0x01, |
4045 | "Network Mode of Operation", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4046 | }, |
4047 | { &hf_gsm_a_old_xid, |
4048 | { "Old XID", "gsm_a.old_xid", |
4049 | FT_UINT8, BASE_DEC, VALS(gsm_a_pld_xid_vals)((0 ? (const struct _value_string*)0 : ((gsm_a_pld_xid_vals)) )), 0x10, |
4050 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4051 | }, |
4052 | { &hf_gsm_a_iov_ui, |
4053 | { "IOV-UI", "gsm_a.iov_ui", |
4054 | FT_UINT32, BASE_HEX, NULL((void*)0), 0x0, |
4055 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4056 | }, |
4057 | { &hf_gsm_a_ext_periodic_timers, |
4058 | { "Extended periodic timers", "gsm_a.ext_periodic_timers", |
4059 | FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_ext_periodic_timers_value)((0 ? (const struct true_false_string*)0 : ((&gsm_a_ext_periodic_timers_value )))), 0x0, |
4060 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4061 | }, |
4062 | { &hf_gsm_a_skip_ind, |
4063 | { "Skip Indicator", "gsm_a.skip.ind", |
4064 | FT_UINT8, BASE_DEC, VALS(gsm_a_skip_ind_vals)((0 ? (const struct _value_string*)0 : ((gsm_a_skip_ind_vals) ))), 0xf0, |
4065 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4066 | }, |
4067 | { &hf_gsm_a_b7spare, |
4068 | { "Spare", "gsm_a.spareb7", |
4069 | FT_UINT8, BASE_DEC, NULL((void*)0), 0x40, |
4070 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4071 | }, |
4072 | { &hf_gsm_a_b8spare, |
4073 | { "Spare", "gsm_a.spareb8", |
4074 | FT_UINT8, BASE_DEC, NULL((void*)0), 0x80, |
4075 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4076 | }, |
4077 | { &hf_gsm_a_spare_bits, |
4078 | { "Spare bit(s)", "gsm_a.spare_bits", |
4079 | FT_UINT8, BASE_DEC, NULL((void*)0), 0x0, |
4080 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4081 | }, |
4082 | { &hf_gsm_a_multi_bnd_sup_fields, |
4083 | { "Multiband supported field", "gsm_a.multi_bnd_sup_fields", |
4084 | FT_UINT8, BASE_DEC, NULL((void*)0), 0x0, |
4085 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4086 | }, |
4087 | { &hf_gsm_a_pgsm_supported, |
4088 | { "P-GSM Supported", "gsm_a.classmark3.pgsmSupported", |
4089 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x0, |
4090 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4091 | }, |
4092 | { &hf_gsm_a_egsm_supported, |
4093 | { "E-GSM or R-GSM Supported", "gsm_a.classmark3.egsmSupported", |
4094 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x0, |
4095 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4096 | }, |
4097 | { &hf_gsm_a_gsm1800_supported, |
4098 | { "GSM 1800 Supported", "gsm_a.classmark3.gsm1800Supported", |
4099 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x0, |
4100 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4101 | }, |
4102 | { &hf_gsm_a_ass_radio_cap1, |
4103 | { "Associated Radio Capability 1", "gsm_a.classmark3.ass_radio_cap1", |
4104 | FT_UINT8, BASE_DEC, NULL((void*)0), 0x0, |
4105 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4106 | }, |
4107 | { &hf_gsm_a_ass_radio_cap2, |
4108 | { "Associated Radio Capability 2", "gsm_a.classmark3.ass_radio_cap2", |
4109 | FT_UINT8, BASE_DEC, NULL((void*)0), 0x0, |
4110 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4111 | }, |
4112 | { &hf_gsm_a_cm3_A5_bits, |
4113 | { "A5 bits", "gsm_a.classmark3.a5_bits", |
4114 | FT_UINT8, BASE_HEX, NULL((void*)0), 0x00, |
4115 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4116 | }, |
4117 | { &hf_gsm_a_rsupport, |
4118 | { "R Support", "gsm_a.classmark3.rsupport", |
4119 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x0, |
4120 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4121 | }, |
4122 | { &hf_gsm_a_r_capabilities, |
4123 | { "R-GSM band Associated Radio Capability", "gsm_a.classmark3.r_capabilities", |
4124 | FT_UINT8, BASE_DEC, NULL((void*)0), 0x0, |
4125 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4126 | }, |
4127 | { &hf_gsm_a_multislot_capabilities, |
4128 | { "HSCSD Multi Slot Capability", "gsm_a.classmark3.multislot_capabilities", |
4129 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x0, |
4130 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4131 | }, |
4132 | { &hf_gsm_a_multislot_class, |
4133 | { "HSCSD Multi Slot Class", "gsm_a.classmark3.multislot_cap", |
4134 | FT_UINT8, BASE_DEC, NULL((void*)0), 0x0, |
4135 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4136 | }, |
4137 | { &hf_gsm_a_ucs2_treatment, |
4138 | { "UCS2 treatment", "gsm_a.UCS2_treatment", |
4139 | FT_BOOLEAN, BASE_NONE, TFS(&UCS2_treatment_vals)((0 ? (const struct true_false_string*)0 : ((&UCS2_treatment_vals )))), 0x0, |
4140 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4141 | }, |
4142 | { &hf_gsm_a_extended_measurement_cap, |
4143 | { "Extended Measurement Capability", "gsm_a.classmark3.ext_meas_cap", |
4144 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x0, |
4145 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4146 | }, |
4147 | { &hf_gsm_a_ms_measurement_capability, |
4148 | { "MS measurement capability", "gsm_a.classmark3.ms_measurement_capability", |
4149 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x0, |
4150 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4151 | }, |
4152 | { &hf_gsm_a_sms_value, |
4153 | { "SMS_VALUE (Switch-Measure-Switch)", "gsm_a.classmark3.sms_value", |
4154 | FT_UINT8, BASE_DEC, VALS(gsm_a_sms_vals)((0 ? (const struct _value_string*)0 : ((gsm_a_sms_vals)))), 0x0, |
4155 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4156 | }, |
4157 | { &hf_gsm_a_sm_value, |
4158 | { "SM_VALUE (Switch-Measure)", "gsm_a.classmark3.sm_value", |
4159 | FT_UINT8, BASE_DEC, VALS(gsm_a_sms_vals)((0 ? (const struct _value_string*)0 : ((gsm_a_sms_vals)))), 0x0, |
4160 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4161 | }, |
4162 | { &hf_gsm_a_ms_pos_method_cap_present, |
4163 | { "MS Positioning Method Capability present", "gsm_a.classmark3.ms_pos_method_cap_present", |
4164 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x00, |
4165 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4166 | }, |
4167 | { &hf_gsm_a_ms_pos_method, |
4168 | { "MS Positioning Method", "gsm_a.classmark3.ms_pos_method", |
4169 | FT_UINT8, BASE_HEX, NULL((void*)0), 0x00, |
4170 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4171 | }, |
4172 | { &hf_gsm_a_ms_assisted_e_otd, |
4173 | { "MS assisted E-OTD", "gsm_a.classmark3.ms_assisted_e_otd", |
4174 | FT_BOOLEAN, BASE_NONE, TFS(&ms_assisted_e_otd_vals)((0 ? (const struct true_false_string*)0 : ((&ms_assisted_e_otd_vals )))), 0x0, |
4175 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4176 | }, |
4177 | { &hf_gsm_a_ms_based_e_otd, |
4178 | { "MS based E-OTD", "gsm_a.classmark3.ms_based_e_otd", |
4179 | FT_BOOLEAN, BASE_NONE, TFS(&ms_based_e_otd_vals)((0 ? (const struct true_false_string*)0 : ((&ms_based_e_otd_vals )))), 0x0, |
4180 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4181 | }, |
4182 | { &hf_gsm_a_ms_assisted_gps, |
4183 | { "MS assisted GPS", "gsm_a.classmark3.ms_assisted_gps", |
4184 | FT_BOOLEAN, BASE_NONE, TFS(&ms_assisted_gps_vals)((0 ? (const struct true_false_string*)0 : ((&ms_assisted_gps_vals )))), 0x0, |
4185 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4186 | }, |
4187 | { &hf_gsm_a_ms_based_gps, |
4188 | { "MS based GPS", "gsm_a.classmark3.ms_based_gps", |
4189 | FT_BOOLEAN, BASE_NONE, TFS(&ms_based_gps_vals)((0 ? (const struct true_false_string*)0 : ((&ms_based_gps_vals )))), 0x0, |
4190 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4191 | }, |
4192 | { &hf_gsm_a_ms_conventional_gps, |
4193 | { "MS Conventional GPS", "gsm_a.classmark3.ms_conventional_gps", |
4194 | FT_BOOLEAN, BASE_NONE, TFS(&ms_conventional_gps_vals)((0 ? (const struct true_false_string*)0 : ((&ms_conventional_gps_vals )))), 0x0, |
4195 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4196 | }, |
4197 | { &hf_gsm_a_ecsd_multi_slot_capability, |
4198 | { "ECSD Multi Slot Capability present", "gsm_a.classmark3.ecsd_multi_slot_capability", |
4199 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x00, |
4200 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4201 | }, |
4202 | { &hf_gsm_a_ecsd_multi_slot_class, |
4203 | { "ECSD Multi Slot Class", "gsm_a.classmark3.ecsd_multi_slot_class", |
4204 | FT_UINT8, BASE_DEC, NULL((void*)0), 0x00, |
4205 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4206 | }, |
4207 | { &hf_gsm_a_8_psk_struct_present, |
4208 | { "8-PSK Struct present", "gsm_a.classmark3.8_psk_struct_present", |
4209 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x00, |
4210 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4211 | }, |
4212 | { &hf_gsm_a_8_psk_struct, |
4213 | { "8-PSK Struct", "gsm_a.classmark3.8_psk_struct", |
4214 | FT_UINT8, BASE_HEX, NULL((void*)0), 0x00, |
4215 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4216 | }, |
4217 | { &hf_gsm_a_modulation_capability, |
4218 | { "Modulation Capability", "gsm_a.classmark3.modulation_capability", |
4219 | FT_BOOLEAN, BASE_NONE, TFS(&modulation_capability_vals)((0 ? (const struct true_false_string*)0 : ((&modulation_capability_vals )))), 0x00, |
4220 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4221 | }, |
4222 | { &hf_gsm_a_8_psk_rf_power_capability_1_present, |
4223 | { "8-PSK RF Power Capability 1 present", "gsm_a.classmark3.8_psk_rf_power_capability_1_present", |
4224 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x00, |
4225 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4226 | }, |
4227 | { &hf_gsm_a_8_psk_rf_power_capability_1, |
4228 | { "8-PSK RF Power Capability 1", "gsm_a.classmark3.8_psk_rf_power_capability_1", |
4229 | FT_UINT8, BASE_HEX, VALS(eight_psk_rf_power_capability_vals)((0 ? (const struct _value_string*)0 : ((eight_psk_rf_power_capability_vals )))), 0x00, |
4230 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4231 | }, |
4232 | { &hf_gsm_a_8_psk_rf_power_capability_2_present, |
4233 | { "8-PSK RF Power Capability 2 present", "gsm_a.classmark3.8_psk_rf_power_capability_2_present", |
4234 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x00, |
4235 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4236 | }, |
4237 | { &hf_gsm_a_8_psk_rf_power_capability_2, |
4238 | { "8-PSK RF Power Capability 2", "gsm_a.classmark3.8_psk_rf_power_capability_2", |
4239 | FT_UINT8, BASE_HEX, VALS(eight_psk_rf_power_capability_vals)((0 ? (const struct _value_string*)0 : ((eight_psk_rf_power_capability_vals )))), 0x00, |
4240 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4241 | }, |
4242 | { &hf_gsm_a_gsm_400_band_info_present, |
4243 | { "GSM 400 Band Information present", "gsm_a.classmark3.gsm_400_band_info_present", |
4244 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x00, |
4245 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4246 | }, |
4247 | { &hf_gsm_a_gsm_400_bands_supported, |
4248 | { "GSM 400 Bands Supported", "gsm_a.classmark3.gsm_400_bands_supported", |
4249 | FT_UINT8, BASE_HEX, VALS(gsm_400_bands_supported_vals)((0 ? (const struct _value_string*)0 : ((gsm_400_bands_supported_vals )))), 0x00, |
4250 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4251 | }, |
4252 | { &hf_gsm_a_gsm_400_assoc_radio_cap, |
4253 | { "GSM 400 Associated Radio Capability", "gsm_a.classmark3.gsm_400_assoc_radio_cap", |
4254 | FT_UINT8, BASE_HEX, NULL((void*)0), 0x00, |
4255 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4256 | }, |
4257 | { &hf_gsm_a_gsm_850_assoc_radio_cap_present, |
4258 | { "GSM 850 Associated Radio Capability present", "gsm_a.classmark3.gsm_850_assoc_radio_cap_present", |
4259 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x00, |
4260 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4261 | }, |
4262 | { &hf_gsm_a_gsm_850_assoc_radio_cap, |
4263 | { "GSM 850 Associated Radio Capability", "gsm_a.classmark3.gsm_850_assoc_radio_cap", |
4264 | FT_UINT8, BASE_HEX, NULL((void*)0), 0x00, |
4265 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4266 | }, |
4267 | { &hf_gsm_a_gsm_1900_assoc_radio_cap_present, |
4268 | { "GSM 1900 Associated Radio Capability present", "gsm_a.classmark3.gsm_1900_assoc_radio_cap_present", |
4269 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x00, |
4270 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4271 | }, |
4272 | { &hf_gsm_a_gsm_1900_assoc_radio_cap, |
4273 | { "GSM 1900 Associated Radio Capability", "gsm_a.classmark3.gsm_1900_assoc_radio_cap", |
4274 | FT_UINT8, BASE_HEX, NULL((void*)0), 0x00, |
4275 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4276 | }, |
4277 | { &hf_gsm_a_umts_fdd_rat_cap, |
4278 | { "UMTS FDD Radio Access Technology Capability", "gsm_a.classmark3.umts_fdd_rat_cap", |
4279 | FT_BOOLEAN, BASE_NONE, TFS(&umts_fdd_rat_cap_vals)((0 ? (const struct true_false_string*)0 : ((&umts_fdd_rat_cap_vals )))), 0x00, |
4280 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4281 | }, |
4282 | { &hf_gsm_a_umts_384_mcps_tdd_rat_cap, |
4283 | { "UMTS 3.84 Mcps TDD Radio Access Technology Capability", "gsm_a.classmark3.umts_384_mcps_tdd_rat_cap", |
4284 | FT_BOOLEAN, BASE_NONE, TFS(&umts_384_mcps_tdd_rat_cap_vals)((0 ? (const struct true_false_string*)0 : ((&umts_384_mcps_tdd_rat_cap_vals )))), 0x00, |
4285 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4286 | }, |
4287 | { &hf_gsm_a_cdma_2000_rat_cap, |
4288 | { "CDMA 2000 Radio Access Technology Capability", "gsm_a.classmark3.cdma_2000_rat_cap", |
4289 | FT_BOOLEAN, BASE_NONE, TFS(&cdma_2000_rat_cap_vals)((0 ? (const struct true_false_string*)0 : ((&cdma_2000_rat_cap_vals )))), 0x00, |
4290 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4291 | }, |
4292 | { &hf_gsm_a_dtm_e_gprs_multi_slot_info_present, |
4293 | { "DTM E/GPRS Multi Slot Information present", "gsm_a.classmark3.dtm_e_gprs_multi_slot_info_present", |
4294 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x00, |
4295 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4296 | }, |
4297 | { &hf_gsm_a_dtm_gprs_multi_slot_class, |
4298 | { "DTM GPRS Multi Slot Class", "gsm_a.classmark3.dtm_gprs_multi_slot_class", |
4299 | FT_UINT8, BASE_DEC, VALS(dtm_gprs_multi_slot_class_vals)((0 ? (const struct _value_string*)0 : ((dtm_gprs_multi_slot_class_vals )))), 0x00, |
4300 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4301 | }, |
4302 | { &hf_gsm_a_single_slot_dtm, |
4303 | { "Single Slot DTM", "gsm_a.classmark3.single_slot_dtm_supported", |
4304 | FT_BOOLEAN, BASE_NONE, TFS(&single_slot_dtm_vals)((0 ? (const struct true_false_string*)0 : ((&single_slot_dtm_vals )))), 0x0, |
4305 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4306 | }, |
4307 | { &hf_gsm_a_dtm_egprs_multi_slot_class_present, |
4308 | { "DTM EGPRS Multi Slot Class present", "gsm_a.classmark3.dtm_egprs_multi_slot_class_present", |
4309 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x00, |
4310 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4311 | }, |
4312 | { &hf_gsm_a_dtm_egprs_multi_slot_class, |
4313 | { "DTM EGPRS Multi Slot Class", "gsm_a.classmark3.dtm_egprs_multi_slot_class", |
4314 | FT_UINT8, BASE_DEC, VALS(dtm_gprs_multi_slot_class_vals)((0 ? (const struct _value_string*)0 : ((dtm_gprs_multi_slot_class_vals )))), 0x00, |
4315 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4316 | }, |
4317 | { &hf_gsm_a_single_band_support, |
4318 | { "Single Band Support", "gsm_a.classmark3.single_band_support", |
4319 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x00, |
4320 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4321 | }, |
4322 | { &hf_gsm_a_gsm_band, |
4323 | { "GSM Band", "gsm_a.classmark3.gsm_band", |
4324 | FT_UINT8, BASE_DEC, VALS(gsm_band_vals)((0 ? (const struct _value_string*)0 : ((gsm_band_vals)))), 0x00, |
4325 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4326 | }, |
4327 | { &hf_gsm_a_gsm_750_assoc_radio_cap_present, |
4328 | { "GSM 750 Associated Radio Capability present", "gsm_a.classmark3.gsm_750_assoc_radio_cap_present", |
4329 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x00, |
4330 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4331 | }, |
4332 | { &hf_gsm_a_gsm_750_assoc_radio_cap, |
4333 | { "GSM 750 Associated Radio Capability", "gsm_a.classmark3.gsm_750_assoc_radio_cap", |
4334 | FT_UINT8, BASE_HEX, NULL((void*)0), 0x00, |
4335 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4336 | }, |
4337 | { &hf_gsm_a_umts_128_mcps_tdd_rat_cap, |
4338 | { "UMTS 1.28 Mcps TDD Radio Access Technology Capability", "gsm_a.classmark3.umts_128_mcps_tdd_rat_cap", |
4339 | FT_BOOLEAN, BASE_NONE, TFS(&umts_128_mcps_tdd_rat_cap_vals)((0 ? (const struct true_false_string*)0 : ((&umts_128_mcps_tdd_rat_cap_vals )))), 0x00, |
4340 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4341 | }, |
4342 | { &hf_gsm_a_geran_feature_package_1, |
4343 | { "GERAN Feature Package 1", "gsm_a.classmark3.geran_feature_package_1", |
4344 | FT_BOOLEAN, BASE_NONE, TFS(&geran_feature_package_1_vals)((0 ? (const struct true_false_string*)0 : ((&geran_feature_package_1_vals )))), 0x00, |
4345 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4346 | }, |
4347 | { &hf_gsm_a_ext_dtm_e_gprs_multi_slot_info_present, |
4348 | { "Extended DTM E/GPRS Multi Slot Information present", "gsm_a.classmark3.ext_dtm_e_gprs_info_present", |
4349 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x00, |
4350 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4351 | }, |
4352 | { &hf_gsm_a_ext_dtm_gprs_multi_slot_class, |
4353 | { "Extended DTM GPRS Multi Slot Class", "gsm_a.classmark3.ext_dtm_gprs_multi_slot_class", |
4354 | FT_UINT8, BASE_HEX, NULL((void*)0), 0x00, |
4355 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4356 | }, |
4357 | { &hf_gsm_a_ext_dtm_egprs_multi_slot_class, |
4358 | { "Extended DTM EGPRS Multi Slot Class", "gsm_a.classmark3.ext_dtm_egprs_multi_slot_class", |
4359 | FT_UINT8, BASE_HEX, NULL((void*)0), 0x00, |
4360 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4361 | }, |
4362 | { &hf_gsm_a_high_multislot_cap_present, |
4363 | { "High Multislot Capability present", "gsm_a.classmark3.high_multislot_cap_present", |
4364 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x00, |
4365 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4366 | }, |
4367 | { &hf_gsm_a_high_multislot_cap, |
4368 | { "High Multislot Capability", "gsm_a.classmark3.high_multislot_cap", |
4369 | FT_UINT8, BASE_HEX, NULL((void*)0), 0x00, |
4370 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4371 | }, |
4372 | { &hf_gsm_a_geran_iu_mode_support, |
4373 | { "GERAN Iu Mode Support", "gsm_a.classmark3.geran_iu_mode_support", |
4374 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x00, |
4375 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4376 | }, |
4377 | { &hf_gsm_a_geran_iu_mode_cap, |
4378 | { "GERAN Iu Mode Capabilities", "gsm_a.classmark3.geran_iu_mode_cap", |
4379 | FT_UINT24, BASE_HEX, NULL((void*)0), 0x00, |
4380 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4381 | }, |
4382 | { &hf_gsm_a_geran_iu_mode_cap_length, |
4383 | { "Length", "gsm_a.classmark3.geran_iu_mode_cap.length", |
4384 | FT_UINT8, BASE_DEC, NULL((void*)0), 0x00, |
4385 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4386 | }, |
4387 | { &hf_gsm_a_flo_iu_cap, |
4388 | { "FLO Iu Capability", "gsm_a.classmark3.geran_iu_mode_cap.flo_iu_cap", |
4389 | FT_BOOLEAN, BASE_NONE, TFS(&flo_iu_cap_vals)((0 ? (const struct true_false_string*)0 : ((&flo_iu_cap_vals )))), 0x00, |
4390 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4391 | }, |
4392 | { &hf_gsm_a_geran_feature_package_2, |
4393 | { "GERAN Feature Package 2", "gsm_a.classmark3.geran_feature_package_2", |
4394 | FT_BOOLEAN, BASE_NONE, TFS(&geran_feature_package_2_vals)((0 ? (const struct true_false_string*)0 : ((&geran_feature_package_2_vals )))), 0x00, |
4395 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4396 | }, |
4397 | { &hf_gsm_a_gmsk_multislot_power_prof, |
4398 | { "GMSK Multislot Power Profile", "gsm_a.classmark3.gmsk_multislot_power_prof", |
4399 | FT_UINT8, BASE_DEC, VALS(gmsk_multislot_power_prof_vals)((0 ? (const struct _value_string*)0 : ((gmsk_multislot_power_prof_vals )))), 0x00, |
4400 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4401 | }, |
4402 | { &hf_gsm_a_8_psk_multislot_power_prof, |
4403 | { "8-PSK Multislot Power Profile", "gsm_a.classmark3.8_psk_multislot_power_prof", |
4404 | FT_UINT8, BASE_DEC, VALS(eight_psk_multislot_power_prof_vals)((0 ? (const struct _value_string*)0 : ((eight_psk_multislot_power_prof_vals )))), 0x00, |
4405 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4406 | }, |
4407 | { &hf_gsm_a_t_gsm_400_band_info_present, |
4408 | { "T-GSM 400 Band Information present", "gsm_a.classmark3.gsm_400_band_info_present", |
4409 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x00, |
4410 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4411 | }, |
4412 | { &hf_gsm_a_t_gsm_400_bands_supported, |
4413 | { "T-GSM 400 Bands Supported", "gsm_a.classmark3.t_gsm_400_bands_supported", |
4414 | FT_UINT8, BASE_HEX, VALS(t_gsm_400_bands_supported_vals)((0 ? (const struct _value_string*)0 : ((t_gsm_400_bands_supported_vals )))), 0x00, |
4415 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4416 | }, |
4417 | { &hf_gsm_a_t_gsm_400_assoc_radio_cap, |
4418 | { "T-GSM 400 Associated Radio Capability", "gsm_a.classmark3.t_gsm_400_assoc_radio_cap", |
4419 | FT_UINT8, BASE_HEX, NULL((void*)0), 0x00, |
4420 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4421 | }, |
4422 | { &hf_gsm_a_t_gsm_900_assoc_radio_cap_present, |
4423 | { "T-GSM 900 Associated Radio Capability present", "gsm_a.classmark3.t_gsm_900_assoc_radio_cap_present", |
4424 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x00, |
4425 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4426 | }, |
4427 | { &hf_gsm_a_t_gsm_900_assoc_radio_cap, |
4428 | { "T-GSM 900 Associated Radio Capability", "gsm_a.classmark3.t_gsm_900_assoc_radio_cap", |
4429 | FT_UINT8, BASE_HEX, NULL((void*)0), 0x00, |
4430 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4431 | }, |
4432 | { &hf_gsm_a_downlink_adv_receiver_perf, |
4433 | { "Downlink Advanced Receiver Performance", "gsm_a.classmark3.downlink_adv_receiver_perf", |
4434 | FT_UINT8, BASE_DEC, VALS(downlink_adv_receiver_perf_vals)((0 ? (const struct _value_string*)0 : ((downlink_adv_receiver_perf_vals )))), 0x00, |
4435 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4436 | }, |
4437 | { &hf_gsm_a_dtm_enhancements_cap, |
4438 | { "DTM Enhancements Capability", "gsm_a.classmark3.dtm_enhancements_capability", |
4439 | FT_BOOLEAN, BASE_NONE, TFS(&dtm_enhancements_cap_vals)((0 ? (const struct true_false_string*)0 : ((&dtm_enhancements_cap_vals )))), 0x00, |
4440 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4441 | }, |
4442 | { &hf_gsm_a_dtm_e_gprs_high_multi_slot_info_present, |
4443 | { "DTM E/GPRS High Multi Slot Information present", "gsm_a.classmark3.dtm_e_gprs_high_mutli_slot_info_present", |
4444 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x00, |
4445 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4446 | }, |
4447 | { &hf_gsm_a_dtm_gprs_high_multi_slot_class, |
4448 | { "DTM GPRS Multi Slot Class", "gsm_a.classmark3.dtm_gprs_multi_slot_class", |
4449 | FT_UINT8, BASE_DEC, VALS(dtm_gprs_high_multi_slot_class_vals)((0 ? (const struct _value_string*)0 : ((dtm_gprs_high_multi_slot_class_vals )))), 0x00, |
4450 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4451 | }, |
4452 | { &hf_gsm_a_offset_required, |
4453 | { "Offset required", "gsm_a.classmark3.offset_required", |
4454 | FT_BOOLEAN, BASE_NONE, TFS(&offset_required_vals)((0 ? (const struct true_false_string*)0 : ((&offset_required_vals )))), 0x0, |
4455 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4456 | }, |
4457 | { &hf_gsm_a_dtm_egprs_high_multi_slot_class_present, |
4458 | { "DTM EGPRS High Multi Slot Class present", "gsm_a.classmark3.dtm_egprs_high_multi_slot_class_present", |
4459 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x00, |
4460 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4461 | }, |
4462 | { &hf_gsm_a_dtm_egprs_high_multi_slot_class, |
4463 | { "DTM EGPRS High Multi Slot Class", "gsm_a.classmark3.dtm_egprs_high_multi_slot_class", |
4464 | FT_UINT8, BASE_DEC, VALS(dtm_gprs_high_multi_slot_class_vals)((0 ? (const struct _value_string*)0 : ((dtm_gprs_high_multi_slot_class_vals )))), 0x00, |
4465 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4466 | }, |
4467 | { &hf_gsm_a_repeated_acch_cap, |
4468 | { "Repeated ACCH Capability", "gsm_a.classmark3.repeated_acch_cap", |
4469 | FT_BOOLEAN, BASE_NONE, TFS(&repeated_acch_cap_vals)((0 ? (const struct true_false_string*)0 : ((&repeated_acch_cap_vals )))), 0x00, |
4470 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4471 | }, |
4472 | { &hf_gsm_a_gsm_710_assoc_radio_cap_present, |
4473 | { "GSM 710 Associated Radio Capability present", "gsm_a.classmark3.gsm_710_assoc_radio_cap_present", |
4474 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x00, |
4475 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4476 | }, |
4477 | { &hf_gsm_a_gsm_710_assoc_radio_cap, |
4478 | { "GSM 710 Associated Radio Capability", "gsm_a.classmark3.gsm_710_assoc_radio_cap", |
4479 | FT_UINT8, BASE_HEX, NULL((void*)0), 0x00, |
4480 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4481 | }, |
4482 | { &hf_gsm_a_t_gsm_810_assoc_radio_cap_present, |
4483 | { "T-GSM 810 Associated Radio Capability present", "gsm_a.classmark3.t_gsm_810_assoc_radio_cap_present", |
4484 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x00, |
4485 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4486 | }, |
4487 | { &hf_gsm_a_t_gsm_810_assoc_radio_cap, |
4488 | { "T-GSM 810 Associated Radio Capability", "gsm_a.classmark3.t_gsm_810_assoc_radio_cap", |
4489 | FT_UINT8, BASE_HEX, NULL((void*)0), 0x00, |
4490 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4491 | }, |
4492 | { &hf_gsm_a_ciphering_mode_setting_cap, |
4493 | { "Ciphering Mode Setting Capability", "gsm_a.classmark3.ciphering_mode_setting_cap", |
4494 | FT_BOOLEAN, BASE_NONE, TFS(&ciphering_mode_setting_cap_vals)((0 ? (const struct true_false_string*)0 : ((&ciphering_mode_setting_cap_vals )))), 0x00, |
4495 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4496 | }, |
4497 | { &hf_gsm_a_additional_positioning_caps, |
4498 | { "Additional Positioning Capabilities", "gsm_a.classmark3.additional_positioning_caps", |
4499 | FT_BOOLEAN, BASE_NONE, TFS(&additional_positioning_caps_vals)((0 ? (const struct true_false_string*)0 : ((&additional_positioning_caps_vals )))), 0x00, |
4500 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4501 | }, |
4502 | { &hf_gsm_a_e_utra_fdd_support, |
4503 | { "E-UTRA FDD support", "gsm_a.classmark3.e_utra_fdd_support", |
4504 | FT_BOOLEAN, BASE_NONE, TFS(&e_utra_fdd_support_vals)((0 ? (const struct true_false_string*)0 : ((&e_utra_fdd_support_vals )))), 0x00, |
4505 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4506 | }, |
4507 | { &hf_gsm_a_e_utra_tdd_support, |
4508 | { "E-UTRA TDD support", "gsm_a.classmark3.e_utra_tdd_support", |
4509 | FT_BOOLEAN, BASE_NONE, TFS(&e_utra_tdd_support_vals)((0 ? (const struct true_false_string*)0 : ((&e_utra_tdd_support_vals )))), 0x00, |
4510 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4511 | }, |
4512 | { &hf_gsm_a_e_utra_meas_and_report_support, |
4513 | { "E-UTRA Measurement and Reporting support", "gsm_a.classmark3.e_utra_meas_and_report_support", |
4514 | FT_BOOLEAN, BASE_NONE, TFS(&e_utra_meas_and_report_support_vals)((0 ? (const struct true_false_string*)0 : ((&e_utra_meas_and_report_support_vals )))), 0x00, |
4515 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4516 | }, |
4517 | { &hf_gsm_a_prio_based_resel_support, |
4518 | { "Priority-based reselection support", "gsm_a.classmark3.prio_based_resel_support", |
4519 | FT_BOOLEAN, BASE_NONE, TFS(&prio_based_resel_support_vals)((0 ? (const struct true_false_string*)0 : ((&prio_based_resel_support_vals )))), 0x00, |
4520 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4521 | }, |
4522 | { &hf_gsm_a_utra_csg_cells_reporting, |
4523 | { "UTRA CSG Cells Reporting", "gsm_a.classmark3.utra_csg_cells_reporting", |
4524 | FT_BOOLEAN, BASE_NONE, TFS(&utra_csg_cells_reporting_vals)((0 ? (const struct true_false_string*)0 : ((&utra_csg_cells_reporting_vals )))), 0x00, |
4525 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4526 | }, |
4527 | { &hf_gsm_a_vamos_level, |
4528 | { "VAMOS Level", "gsm_a.classmark3.vamos_level", |
4529 | FT_UINT8, BASE_DEC, VALS(vamos_level_vals)((0 ? (const struct _value_string*)0 : ((vamos_level_vals)))), 0x00, |
4530 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4531 | }, |
4532 | { &hf_gsm_a_tighter_cap, |
4533 | { "TIGHTER Capability", "gsm_a.classmark3.tighter_cap", |
4534 | FT_UINT8, BASE_DEC, VALS(tighter_cap_level_vals)((0 ? (const struct _value_string*)0 : ((tighter_cap_level_vals )))), 0x00, |
4535 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4536 | }, |
4537 | { &hf_gsm_a_selective_ciph_down_sacch, |
4538 | { "Selective Ciphering of Downlink SACCH", "gsm_a.classmark3.selective_ciph_down_sacch", |
4539 | FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported)((0 ? (const struct true_false_string*)0 : ((&tfs_supported_not_supported )))), 0x00, |
4540 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4541 | }, |
4542 | { &hf_gsm_a_cs_to_ps_srvcc_geran_to_utra, |
4543 | { "CS to PS SRVCC from GERAN to UTRA", "gsm_a.classmark3.cs_to_ps_srvcc_geran_to_utra", |
4544 | FT_UINT8, BASE_DEC, VALS(cs_to_ps_srvcc_geran_to_utra_vals)((0 ? (const struct _value_string*)0 : ((cs_to_ps_srvcc_geran_to_utra_vals )))), 0x00, |
4545 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4546 | }, |
4547 | { &hf_gsm_a_cs_to_ps_srvcc_geran_to_eutra, |
4548 | { "CS to PS SRVCC from GERAN to E-UTRA", "gsm_a.classmark3.cs_to_ps_srvcc_geran_to_eutra", |
4549 | FT_UINT8, BASE_DEC, VALS(cs_to_ps_srvcc_geran_to_eutra_vals)((0 ? (const struct _value_string*)0 : ((cs_to_ps_srvcc_geran_to_eutra_vals )))), 0x00, |
4550 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4551 | }, |
4552 | { &hf_gsm_a_geran_network_sharing_support, |
4553 | { "GERAN Network Sharing support", "gsm_a.classmark3.geran_network_sharing_support", |
4554 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x00, |
4555 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4556 | }, |
4557 | { &hf_gsm_a_eutra_wb_rsrq_support, |
4558 | { "E-UTRA Wideband RSRQ measurements support", "gsm_a.classmark3.eutra_wb_rsrq_support", |
4559 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x00, |
4560 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4561 | }, |
4562 | { &hf_gsm_a_er_band_support, |
4563 | { "ER Band support", "gsm_a.classmark3.er_band_support", |
4564 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x00, |
4565 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4566 | }, |
4567 | { &hf_gsm_a_utra_mfbi_support, |
4568 | { "UTRA Multiple Frequency Band Indicators support", "gsm_a.classmark3.utra_mfbi_support", |
4569 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x00, |
4570 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4571 | }, |
4572 | { &hf_gsm_a_eutra_mfbi_support, |
4573 | { "E-UTRA Multiple Frequency Band Indicators support", "gsm_a.classmark3.eutra_mfbi_support", |
4574 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x00, |
4575 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4576 | }, |
4577 | { &hf_gsm_a_ext_tsc_set_cap_support, |
4578 | { "Extended TSC Set Capability support", "gsm_a.classmark3.ext_tsc_set_cap_support", |
4579 | FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x00, |
4580 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4581 | }, |
4582 | { &hf_gsm_a_ext_earfcn_value_range, |
4583 | { "Extended EARFCN value range", "gsm_a.classmark3.ext_earfcn_value_range", |
4584 | FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported)((0 ? (const struct true_false_string*)0 : ((&tfs_supported_not_supported )))), 0x00, |
4585 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4586 | }, |
4587 | { &hf_gsm_a_geo_loc_type_of_shape, |
4588 | { "Location estimate", "gsm_a.gad.location_estimate", |
4589 | FT_UINT8, BASE_DEC, VALS(type_of_shape_vals)((0 ? (const struct _value_string*)0 : ((type_of_shape_vals)) )), 0xf0, |
4590 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4591 | }, |
4592 | { &hf_gsm_a_geo_loc_sign_of_lat, |
4593 | { "Sign of latitude", "gsm_a.gad.sign_of_latitude", |
4594 | FT_UINT8, BASE_DEC, VALS(sign_of_latitude_vals)((0 ? (const struct _value_string*)0 : ((sign_of_latitude_vals )))), 0x80, |
4595 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4596 | }, |
4597 | { &hf_gsm_a_geo_loc_deg_of_lat, |
4598 | { "Degrees of latitude", "gsm_a.gad.deg_of_latitude", |
4599 | FT_UINT24, BASE_DEC, NULL((void*)0), 0x7fffff, |
4600 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4601 | }, |
4602 | { &hf_gsm_a_geo_loc_deg_of_long, |
4603 | { "Degrees of longitude", "gsm_a.gad.deg_of_longitude", |
4604 | FT_INT24, BASE_DEC, NULL((void*)0), 0xffffff, |
4605 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4606 | }, |
4607 | { &hf_gsm_a_geo_loc_osm_uri, |
4608 | { "Location OSM URI", "gsm_a.gad.location_uri", |
4609 | FT_STRING, BASE_NONE, NULL((void*)0), 0x0, |
4610 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4611 | }, |
4612 | { &hf_gsm_a_geo_loc_uncertainty_code, |
4613 | { "Uncertainty code", "gsm_a.gad.uncertainty_code", |
4614 | FT_UINT8, BASE_DEC, NULL((void*)0), 0x7f, |
4615 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4616 | }, |
4617 | { &hf_gsm_a_geo_loc_uncertainty_semi_major, |
4618 | { "Uncertainty semi-major", "gsm_a.gad.uncertainty_semi_major", |
4619 | FT_UINT8, BASE_DEC, NULL((void*)0), 0x7f, |
4620 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4621 | }, |
4622 | { &hf_gsm_a_geo_loc_uncertainty_semi_minor, |
4623 | { "Uncertainty semi-minor", "gsm_a.gad.uncertainty_semi_minor", |
4624 | FT_UINT8, BASE_DEC, NULL((void*)0), 0x7f, |
4625 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4626 | }, |
4627 | { &hf_gsm_a_geo_loc_orientation_of_major_axis, |
4628 | { "Orientation of major axis", "gsm_a.gad.orientation_of_major_axis", |
4629 | FT_UINT8, BASE_DEC, NULL((void*)0), 0x0, |
4630 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4631 | }, |
4632 | { &hf_gsm_a_geo_loc_uncertainty_altitude, |
4633 | { "Uncertainty Altitude", "gsm_a.gad.uncertainty_altitude", |
4634 | FT_UINT8, BASE_DEC, NULL((void*)0), 0x7f, |
4635 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4636 | }, |
4637 | { &hf_gsm_a_geo_loc_confidence, |
4638 | { "Confidence(%)", "gsm_a.gad.confidence", |
4639 | FT_UINT8, BASE_DEC, NULL((void*)0), 0x7f, |
4640 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4641 | }, |
4642 | { &hf_gsm_a_geo_loc_uncertainty_range, |
4643 | { "Uncertainty Range", "gsm_a.gad.uncertainty_range", |
4644 | FT_UINT8, BASE_DEC, VALS(uncertainty_range)((0 ? (const struct _value_string*)0 : ((uncertainty_range))) ), 0x80, |
4645 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4646 | }, |
4647 | { &hf_gsm_a_geo_loc_horizontal_confidence, |
4648 | { "Horizontal confidence(%)", "gsm_a.gad.horizontal_confidence", |
4649 | FT_UINT8, BASE_DEC, NULL((void*)0), 0x7f, |
4650 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4651 | }, |
4652 | { &hf_gsm_a_geo_loc_horizontal_uncertainty_range, |
4653 | { "Horizontal Uncertainty Range", "gsm_a.gad.horizontal_uncertainty_range", |
4654 | FT_UINT8, BASE_DEC, VALS(uncertainty_range)((0 ? (const struct _value_string*)0 : ((uncertainty_range))) ), 0x80, |
4655 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4656 | }, |
4657 | { &hf_gsm_a_geo_loc_vertical_confidence, |
4658 | { "Vertical Confidence(%)", "gsm_a.gad.vertical_confidence", |
4659 | FT_UINT8, BASE_DEC, NULL((void*)0), 0x7f, |
4660 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4661 | }, |
4662 | { &hf_gsm_a_geo_loc_vertical_uncertainty_range, |
4663 | { "Vertical Uncertainty Range", "gsm_a.gad.vertical_uncertainty_range", |
4664 | FT_UINT8, BASE_DEC, VALS(uncertainty_range)((0 ? (const struct _value_string*)0 : ((uncertainty_range))) ), 0x80, |
4665 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4666 | }, |
4667 | { &hf_gsm_a_geo_loc_high_acc_uncertainty_alt, |
4668 | { "High accuracy uncertainty altitude", "gsm_a.gad.high_acc_uncertainty_alt", |
4669 | FT_UINT8, BASE_DEC, NULL((void*)0), 0x0, |
4670 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4671 | }, |
4672 | { &hf_gsm_a_geo_loc_no_of_points, |
4673 | { "Number of points", "gsm_a.gad.no_of_points", |
4674 | FT_UINT8, BASE_DEC, NULL((void*)0), 0x0f, |
4675 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4676 | }, |
4677 | { &hf_gsm_a_geo_loc_high_acc_deg_of_lat, |
4678 | { "High accuracy degrees of latitude", "gsm_a.gad.hig_acc_deg_of_lat", |
4679 | FT_INT32, BASE_DEC, NULL((void*)0), 0x0, |
4680 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4681 | }, |
4682 | { &hf_gsm_a_geo_loc_high_acc_deg_of_long, |
4683 | { "High accuracy degrees of longitude", "gsm_a.gad.high_acc_deg_of_long", |
4684 | FT_INT32, BASE_DEC, NULL((void*)0), 0x0, |
4685 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4686 | }, |
4687 | { &hf_gsm_a_geo_loc_high_acc_uncertainty_semi_major, |
4688 | { "High accuracy uncertainty semi-major", "gsm_a.gad.high_acc_uncertainty_semi_major", |
4689 | FT_UINT8, BASE_DEC, NULL((void*)0), 0x0, |
4690 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4691 | }, |
4692 | { &hf_gsm_a_geo_loc_high_acc_uncertainty_semi_minor, |
4693 | { "High accuracy uncertainty semi-minor", "gsm_a.gad.high_acc_uncertainty_semi_minor", |
4694 | FT_UINT8, BASE_DEC, NULL((void*)0), 0x0, |
4695 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4696 | }, |
4697 | { &hf_gsm_a_geo_loc_high_acc_alt, |
4698 | { "High accuracy altitude", "gsm_a.gad.high_acc_alt", |
4699 | FT_INT24, BASE_DEC, NULL((void*)0), 0x3fffff, |
4700 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4701 | }, |
4702 | { &hf_gsm_a_velocity_type, |
4703 | { "Velocity type", "gsm_a.gad.velocity_type", |
4704 | FT_UINT8, BASE_DEC, VALS(gsm_a_velocity_type_vals)((0 ? (const struct _value_string*)0 : ((gsm_a_velocity_type_vals )))), 0xf0, |
4705 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4706 | }, |
4707 | { &hf_gsm_a_bearing, |
4708 | { "Bearing", "gsm_a.gad.bearing", |
4709 | FT_UINT16, BASE_DEC, NULL((void*)0), 0x0, |
4710 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4711 | }, |
4712 | { &hf_gsm_a_horizontal_speed, |
4713 | { "Horizontal Speed", "gsm_a.gad.horizontal_velocity", |
4714 | FT_UINT16, BASE_DEC|BASE_UNIT_STRING0x00001000, UNS(&units_kmh)((0 ? (const struct unit_name_string*)0 : ((&units_kmh))) ), 0x0, |
4715 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4716 | }, |
4717 | { &hf_gsm_a_vertical_speed, |
4718 | { "Vertical Speed", "gsm_a.gad.vertical_speed", |
4719 | FT_UINT8, BASE_DEC|BASE_UNIT_STRING0x00001000, UNS(&units_kmh)((0 ? (const struct unit_name_string*)0 : ((&units_kmh))) ), 0x0, |
4720 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4721 | }, |
4722 | { &hf_gsm_a_uncertainty_speed, |
4723 | { "Uncertainty Speed", "gsm_a.gad.uncertainty_speed", |
4724 | FT_UINT8, BASE_DEC, NULL((void*)0), 0x0, |
4725 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4726 | }, |
4727 | { &hf_gsm_a_h_uncertainty_speed, |
4728 | { "Horizontal Uncertainty Speed", "gsm_a.gad.h_uncertainty_speed", |
4729 | FT_UINT8, BASE_DEC, NULL((void*)0), 0x0, |
4730 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4731 | }, |
4732 | { &hf_gsm_a_v_uncertainty_speed, |
4733 | { "Vertical Uncertainty Speed", "gsm_a.gad.v_uncertainty_speed", |
4734 | FT_UINT8, BASE_DEC, NULL((void*)0), 0x0, |
4735 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4736 | }, |
4737 | { &hf_gsm_a_d, |
4738 | { "Direction of Vertical Speed", "gsm_a.gad.d", |
4739 | FT_BOOLEAN, 8, TFS(&gsm_a_dir_of_ver_speed_vals)((0 ? (const struct true_false_string*)0 : ((&gsm_a_dir_of_ver_speed_vals )))), 0x02, |
4740 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)} |
4741 | }, |
4742 | { &hf_gsm_a_geo_loc_D, |
4743 | { "D: Direction of Altitude", "gsm_a.gad.D", |
4744 | FT_UINT16, BASE_DEC, VALS(dir_of_alt_vals)((0 ? (const struct _value_string*)0 : ((dir_of_alt_vals)))), 0x8000, |
4745 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4746 | }, |
4747 | { &hf_gsm_a_geo_loc_altitude, |
4748 | { "Altitude in meters", "gsm_a.gad.altitude", |
4749 | FT_UINT16, BASE_DEC, NULL((void*)0), 0x7fff, |
4750 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4751 | }, |
4752 | { &hf_gsm_a_geo_loc_inner_radius, |
4753 | { "Inner radius", "gsm_a.gad.inner_radius", |
4754 | FT_UINT16, BASE_DEC, NULL((void*)0), 0x0, |
4755 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4756 | }, |
4757 | { &hf_gsm_a_geo_loc_uncertainty_radius, |
4758 | { "Uncertainty radius", "gsm_a.gad.uncertainty_radius", |
4759 | FT_UINT8, BASE_DEC, NULL((void*)0), 0x7f, |
4760 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4761 | }, |
4762 | { &hf_gsm_a_geo_loc_offset_angle, |
4763 | { "Offset angle", "gsm_a.gad.offset_angle", |
4764 | FT_UINT8, BASE_DEC, NULL((void*)0), 0x0, |
4765 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4766 | }, |
4767 | { &hf_gsm_a_geo_loc_included_angle, |
4768 | { "Included angle", "gsm_a.gad.included_angle", |
4769 | FT_UINT8, BASE_DEC, NULL((void*)0), 0x0, |
4770 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4771 | }, |
4772 | { &hf_gsm_a_key_seq, |
4773 | { "key sequence", "gsm_a.key_seq", |
4774 | FT_UINT8, BASE_DEC, VALS(gsm_a_key_seq_vals)((0 ? (const struct _value_string*)0 : ((gsm_a_key_seq_vals)) )), 0x00, |
4775 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4776 | }, |
4777 | { &hf_gsm_a_lac, |
4778 | { "Location Area Code (LAC)", "gsm_a.lac", |
4779 | FT_UINT16, BASE_HEX_DEC, NULL((void*)0), 0x00, |
4780 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4781 | }, |
4782 | { &hf_gsm_a_spare_nibble, |
4783 | { "Spare Nibble", "gsm_a.spare", |
4784 | FT_UINT8, BASE_DEC_HEX, NULL((void*)0), 0x00, |
4785 | NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
4786 | }, |
4787 | /* Generated from convert_proto_tree_add_text.pl */ |
4788 | { &hf_gsm_a_filler, { "Filler", "gsm_a.filler", FT_UINT8, BASE_HEX, NULL((void*)0), 0xF0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }}, |
4789 | { &hf_gsm_a_identity_digit1, { "Identity Digit 1", "gsm_a.identity_digit1", FT_UINT8, BASE_HEX, NULL((void*)0), 0xF0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }}, |
4790 | { &hf_gsm_a_group_call_reference, { "Group or Broadcast call reference", "gsm_a.group_call_reference", FT_UINT32, BASE_DEC_HEX, NULL((void*)0), 0xffffffe0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }}, |
4791 | { &hf_gsm_a_service_flag, { "SF Service Flag", "gsm_a.service_flag", FT_BOOLEAN, 32, TFS(&tfs_vgcs_vbs)((0 ? (const struct true_false_string*)0 : ((&tfs_vgcs_vbs )))), 0x00000010, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }}, |
4792 | { &hf_gsm_a_af_acknowledgement, { "AF Acknowledgement", "gsm_a.af_acknowledgement", FT_BOOLEAN, 32, TFS(&tfs_required_not_required)((0 ? (const struct true_false_string*)0 : ((&tfs_required_not_required )))), 0x00000008, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }}, |
4793 | { &hf_gsm_a_call_priority, { "Call Priority", "gsm_a.call_priority", FT_UINT32, BASE_DEC, VALS(gsm_a_call_priority_vals)((0 ? (const struct _value_string*)0 : ((gsm_a_call_priority_vals )))), 0x00000007, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }}, |
4794 | { &hf_gsm_a_ciphering_info, { "Ciphering Information", "gsm_a.ciphering_info", FT_UINT8, BASE_HEX, NULL((void*)0), 0xf0, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }}, |
4795 | { &hf_gsm_a_sapi, { "SAPI (Service Access Point Identifier)", "gsm_a.sapi", FT_UINT8, BASE_DEC, VALS(gsm_a_sapi_vals)((0 ? (const struct _value_string*)0 : ((gsm_a_sapi_vals)))), 0x30, NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }}, |
4796 | }; |
4797 | |
4798 | /* Setup protocol subtree array */ |
4799 | #define NUM_INDIVIDUAL_ELEMS2 2 |
4800 | static int *ett[NUM_INDIVIDUAL_ELEMS2 + |
4801 | NUM_GSM_COMMON_ELEM(sizeof (gsm_common_elem_strings) / sizeof (gsm_common_elem_strings )[0])]; |
4802 | |
4803 | static ei_register_info ei[] = { |
4804 | { &ei_gsm_a_extraneous_data, { "gsm_a.extraneous_data", PI_PROTOCOL0x09000000, PI_NOTE0x00400000, "Extraneous Data, dissector bug or later version spec(report to wireshark.org)", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE , ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void *)0)}} }}, |
4805 | { &ei_gsm_a_unknown_element, { "gsm_a.unknown_element", PI_PROTOCOL0x09000000, PI_ERROR0x00800000, "Unknown - aborting dissection", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE , ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void *)0)}} }}, |
4806 | { &ei_gsm_a_unknown_pdu_type, { "gsm_a.unknown_pdu_type", PI_PROTOCOL0x09000000, PI_WARN0x00600000, "Unknown PDU type", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE , ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void *)0)}} }}, |
4807 | { &ei_gsm_a_no_element_dissector, { "gsm_a.no_element_dissector", PI_PROTOCOL0x09000000, PI_WARN0x00600000, "No element dissector, rest of dissection may be incorrect", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE , ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void *)0)}} }}, |
4808 | { &ei_gsm_a_format_not_supported, { "gsm_a.format_not_supported", PI_PROTOCOL0x09000000, PI_WARN0x00600000, "Format not supported", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE , ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void *)0)}} }}, |
4809 | { &ei_gsm_a_mobile_identity_type, { "gsm_a.ie.mobileid.type.unknown", PI_PROTOCOL0x09000000, PI_WARN0x00600000, "Format unknown", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE , ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void *)0)}} }}, |
4810 | { &ei_gsm_a_ie_length_too_short, { "gsm_a.ie.length_too_short", PI_PROTOCOL0x09000000, PI_ERROR0x00800000, "IE length too short", EXPFILL0, ((void*)0), 0, {0, {((void*)0), ((void*)0), FT_NONE, BASE_NONE , ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE, -1, ((void *)0)}} }} |
4811 | }; |
4812 | |
4813 | expert_module_t* expert_a_common; |
4814 | |
4815 | static tap_param gsm_a_stat_params[] = { |
4816 | { PARAM_FILTER, "filter", "Filter", NULL((void*)0), true1 } |
4817 | }; |
4818 | |
4819 | static stat_tap_table_ui gsm_a_bssmap_stat_table = { |
4820 | REGISTER_TELEPHONY_GROUP_GSM, |
4821 | "A-Interface BSSMAP", |
4822 | "gsm_a", |
4823 | "gsm_a,bssmap", |
4824 | gsm_a_bssmap_stat_init, |
4825 | gsm_a_bssmap_stat_packet, |
4826 | gsm_a_stat_reset, |
4827 | gsm_a_stat_free_table_item, |
4828 | NULL((void*)0), |
4829 | array_length(gsm_a_stat_fields)(sizeof (gsm_a_stat_fields) / sizeof (gsm_a_stat_fields)[0]), gsm_a_stat_fields, |
4830 | array_length(gsm_a_stat_params)(sizeof (gsm_a_stat_params) / sizeof (gsm_a_stat_params)[0]), gsm_a_stat_params, |
4831 | NULL((void*)0), |
4832 | 0 |
4833 | }; |
4834 | |
4835 | static stat_tap_table_ui gsm_a_dtap_mm_stat_table = { |
4836 | REGISTER_TELEPHONY_GROUP_GSM, |
4837 | "A-Interface DTAP Mobility Management", |
4838 | "gsm_a", |
4839 | "gsm_a,dtap_mm", |
4840 | gsm_a_dtap_mm_stat_init, |
4841 | gsm_a_dtap_mm_stat_packet, |
4842 | gsm_a_stat_reset, |
4843 | gsm_a_stat_free_table_item, |
4844 | NULL((void*)0), |
4845 | array_length(gsm_a_stat_fields)(sizeof (gsm_a_stat_fields) / sizeof (gsm_a_stat_fields)[0]), gsm_a_stat_fields, |
4846 | array_length(gsm_a_stat_params)(sizeof (gsm_a_stat_params) / sizeof (gsm_a_stat_params)[0]), gsm_a_stat_params, |
4847 | NULL((void*)0), |
4848 | 0 |
4849 | }; |
4850 | |
4851 | static stat_tap_table_ui gsm_a_dtap_rr_stat_table = { |
4852 | REGISTER_TELEPHONY_GROUP_GSM, |
4853 | "A-Interface DTAP Radio Resource Management", |
4854 | "gsm_a", |
4855 | "gsm_a,dtap_rr", |
4856 | gsm_a_dtap_rr_stat_init, |
4857 | gsm_a_dtap_rr_stat_packet, |
4858 | gsm_a_stat_reset, |
4859 | gsm_a_stat_free_table_item, |
4860 | NULL((void*)0), |
4861 | array_length(gsm_a_stat_fields)(sizeof (gsm_a_stat_fields) / sizeof (gsm_a_stat_fields)[0]), gsm_a_stat_fields, |
4862 | array_length(gsm_a_stat_params)(sizeof (gsm_a_stat_params) / sizeof (gsm_a_stat_params)[0]), gsm_a_stat_params, |
4863 | NULL((void*)0), |
4864 | 0 |
4865 | }; |
4866 | |
4867 | static stat_tap_table_ui gsm_a_dtap_cc_stat_table = { |
4868 | REGISTER_TELEPHONY_GROUP_GSM, |
4869 | "A-Interface DTAP Call Control", |
4870 | "gsm_a", |
4871 | "gsm_a,dtap_cc", |
4872 | gsm_a_dtap_cc_stat_init, |
4873 | gsm_a_dtap_cc_stat_packet, |
4874 | gsm_a_stat_reset, |
4875 | gsm_a_stat_free_table_item, |
4876 | NULL((void*)0), |
4877 | array_length(gsm_a_stat_fields)(sizeof (gsm_a_stat_fields) / sizeof (gsm_a_stat_fields)[0]), gsm_a_stat_fields, |
4878 | array_length(gsm_a_stat_params)(sizeof (gsm_a_stat_params) / sizeof (gsm_a_stat_params)[0]), gsm_a_stat_params, |
4879 | NULL((void*)0), |
4880 | 0 |
4881 | }; |
4882 | |
4883 | static stat_tap_table_ui gsm_a_dtap_gmm_stat_table = { |
4884 | REGISTER_TELEPHONY_GROUP_GSM, |
4885 | "A-Interface DTAP GPRS Mobility Management", |
4886 | "gsm_a", |
4887 | "gsm_a,dtap_gmm", |
4888 | gsm_a_dtap_gmm_stat_init, |
4889 | gsm_a_dtap_gmm_stat_packet, |
4890 | gsm_a_stat_reset, |
4891 | gsm_a_stat_free_table_item, |
4892 | NULL((void*)0), |
4893 | array_length(gsm_a_stat_fields)(sizeof (gsm_a_stat_fields) / sizeof (gsm_a_stat_fields)[0]), gsm_a_stat_fields, |
4894 | array_length(gsm_a_stat_params)(sizeof (gsm_a_stat_params) / sizeof (gsm_a_stat_params)[0]), gsm_a_stat_params, |
4895 | NULL((void*)0), |
4896 | 0 |
4897 | }; |
4898 | |
4899 | static stat_tap_table_ui gsm_a_dtap_sm_stat_table = { |
4900 | REGISTER_TELEPHONY_GROUP_GSM, |
4901 | "A-Interface DTAP GPRS Session Management", |
4902 | "gsm_a", |
4903 | "gsm_a,dtap_sm", |
4904 | gsm_a_dtap_sm_stat_init, |
4905 | gsm_a_dtap_sm_stat_packet, |
4906 | gsm_a_stat_reset, |
4907 | gsm_a_stat_free_table_item, |
4908 | NULL((void*)0), |
4909 | array_length(gsm_a_stat_fields)(sizeof (gsm_a_stat_fields) / sizeof (gsm_a_stat_fields)[0]), gsm_a_stat_fields, |
4910 | array_length(gsm_a_stat_params)(sizeof (gsm_a_stat_params) / sizeof (gsm_a_stat_params)[0]), gsm_a_stat_params, |
4911 | NULL((void*)0), |
4912 | 0 |
4913 | }; |
4914 | |
4915 | static stat_tap_table_ui gsm_a_dtap_sms_stat_table = { |
4916 | REGISTER_TELEPHONY_GROUP_GSM, |
4917 | "A-Interface DTAP Short Message Service", |
4918 | "gsm_a", |
4919 | "gsm_a,dtap_sms", |
4920 | gsm_a_dtap_sms_stat_init, |
4921 | gsm_a_dtap_sms_stat_packet, |
4922 | gsm_a_stat_reset, |
4923 | gsm_a_stat_free_table_item, |
4924 | NULL((void*)0), |
4925 | array_length(gsm_a_stat_fields)(sizeof (gsm_a_stat_fields) / sizeof (gsm_a_stat_fields)[0]), gsm_a_stat_fields, |
4926 | array_length(gsm_a_stat_params)(sizeof (gsm_a_stat_params) / sizeof (gsm_a_stat_params)[0]), gsm_a_stat_params, |
4927 | NULL((void*)0), |
4928 | 0 |
4929 | }; |
4930 | |
4931 | static stat_tap_table_ui gsm_a_dtap_tp_stat_table = { |
4932 | REGISTER_TELEPHONY_GROUP_GSM, |
4933 | "A-Interface DTAP Special Conformance Testing Functions", |
4934 | "gsm_a", |
4935 | "gsm_a,dtap_tp", |
4936 | gsm_a_dtap_tp_stat_init, |
4937 | gsm_a_dtap_tp_stat_packet, |
4938 | gsm_a_stat_reset, |
4939 | gsm_a_stat_free_table_item, |
4940 | NULL((void*)0), |
4941 | array_length(gsm_a_stat_fields)(sizeof (gsm_a_stat_fields) / sizeof (gsm_a_stat_fields)[0]), gsm_a_stat_fields, |
4942 | array_length(gsm_a_stat_params)(sizeof (gsm_a_stat_params) / sizeof (gsm_a_stat_params)[0]), gsm_a_stat_params, |
4943 | NULL((void*)0), |
4944 | 0 |
4945 | }; |
4946 | |
4947 | static stat_tap_table_ui gsm_a_dtap_ss_stat_table = { |
4948 | REGISTER_TELEPHONY_GROUP_GSM, |
4949 | "A-Interface DTAP Supplementary Services", |
4950 | "gsm_a", |
4951 | "gsm_a,dtap_ss", |
4952 | gsm_a_dtap_ss_stat_init, |
4953 | gsm_a_dtap_ss_stat_packet, |
4954 | gsm_a_stat_reset, |
4955 | gsm_a_stat_free_table_item, |
4956 | NULL((void*)0), |
4957 | array_length(gsm_a_stat_fields)(sizeof (gsm_a_stat_fields) / sizeof (gsm_a_stat_fields)[0]), gsm_a_stat_fields, |
4958 | array_length(gsm_a_stat_params)(sizeof (gsm_a_stat_params) / sizeof (gsm_a_stat_params)[0]), gsm_a_stat_params, |
4959 | NULL((void*)0), |
4960 | 0 |
4961 | }; |
4962 | |
4963 | static stat_tap_table_ui gsm_a_sacch_rr_stat_table = { |
4964 | REGISTER_TELEPHONY_GROUP_GSM, |
4965 | "A-Interface SACCH", |
4966 | "gsm_a", |
4967 | "gsm_a,dtap_sacch", |
4968 | gsm_a_sacch_rr_stat_init, |
4969 | gsm_a_sacch_rr_stat_packet, |
4970 | gsm_a_stat_reset, |
4971 | gsm_a_stat_free_table_item, |
4972 | NULL((void*)0), |
4973 | array_length(gsm_a_stat_fields)(sizeof (gsm_a_stat_fields) / sizeof (gsm_a_stat_fields)[0]), gsm_a_stat_fields, |
4974 | array_length(gsm_a_stat_params)(sizeof (gsm_a_stat_params) / sizeof (gsm_a_stat_params)[0]), gsm_a_stat_params, |
4975 | NULL((void*)0), |
4976 | 0 |
4977 | }; |
4978 | |
4979 | last_offset = NUM_INDIVIDUAL_ELEMS2; |
4980 | |
4981 | ett[0] = &ett_gsm_a_plmn; |
4982 | ett[1] = &ett_gsm_a_poly_pnt; |
4983 | for (i=0; i < NUM_GSM_COMMON_ELEM(sizeof (gsm_common_elem_strings) / sizeof (gsm_common_elem_strings )[0]); i++, last_offset++) |
4984 | { |
4985 | ett[last_offset] = &ett_gsm_common_elem[i]; |
4986 | } |
4987 | |
4988 | /* Register the protocol name and description */ |
4989 | |
4990 | proto_a_common = |
4991 | proto_register_protocol("GSM A-I/F COMMON", "GSM COMMON", "gsm_a"); |
4992 | |
4993 | proto_register_field_array(proto_a_common, hf, array_length(hf)(sizeof (hf) / sizeof (hf)[0])); |
4994 | |
4995 | proto_register_subtree_array(ett, array_length(ett)(sizeof (ett) / sizeof (ett)[0])); |
4996 | expert_a_common = expert_register_protocol(proto_a_common); |
4997 | expert_register_field_array(expert_a_common, ei, array_length(ei)(sizeof (ei) / sizeof (ei)[0])); |
4998 | |
4999 | |
5000 | gsm_a_tap = register_tap("gsm_a"); |
5001 | |
5002 | register_stat_tap_table_ui(&gsm_a_bssmap_stat_table); |
5003 | register_stat_tap_table_ui(&gsm_a_dtap_mm_stat_table); |
5004 | register_stat_tap_table_ui(&gsm_a_dtap_rr_stat_table); |
5005 | register_stat_tap_table_ui(&gsm_a_dtap_cc_stat_table); |
5006 | register_stat_tap_table_ui(&gsm_a_dtap_gmm_stat_table); |
5007 | register_stat_tap_table_ui(&gsm_a_dtap_sms_stat_table); |
5008 | register_stat_tap_table_ui(&gsm_a_dtap_sm_stat_table); |
5009 | register_stat_tap_table_ui(&gsm_a_dtap_ss_stat_table); |
5010 | register_stat_tap_table_ui(&gsm_a_dtap_tp_stat_table); |
5011 | register_stat_tap_table_ui(&gsm_a_sacch_rr_stat_table); |
5012 | |
5013 | /* Register a 3GPP protocol to be used for "global hf" that can be used to track inter protocol relations*/ |
5014 | static hf_register_info hf_3gpp[] = |
5015 | { |
5016 | { &hf_3gpp_tmsi, |
5017 | { "TMSI/P-TMSI/M-TMSI/5G-TMSI", "3gpp.tmsi", |
5018 | FT_UINT32, BASE_DEC_HEX, 0, 0x0, |
5019 | "Filter TMSI, P-TMSI, M-TMSI, 5G-TMSI across protocols", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) } |
5020 | }, |
5021 | }; |
5022 | |
5023 | proto_3gpp = proto_register_protocol("3GPP COMMON", "3GPP COMMON", "3gpp"); |
5024 | |
5025 | proto_register_field_array(proto_3gpp, hf_3gpp, array_length(hf_3gpp)(sizeof (hf_3gpp) / sizeof (hf_3gpp)[0])); |
5026 | |
5027 | } |
5028 | |
5029 | /* |
5030 | * Editor modelines - https://www.wireshark.org/tools/modelines.html |
5031 | * |
5032 | * Local variables: |
5033 | * c-basic-offset: 4 |
5034 | * tab-width: 8 |
5035 | * indent-tabs-mode: nil |
5036 | * End: |
5037 | * |
5038 | * vi: set shiftwidth=4 tabstop=8 expandtab: |
5039 | * :indentSize=4:tabSize=8:noTabs=true: |
5040 | */ |