Revert "TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags"
[wireshark-sm.git] / epan / dissectors / packet-gsm_a_gm.c
blob22d6d842fac08d6ecc298f5d4abbe75c5e195ea6
1 /* packet-gsm_a_gm.c
2 * Routines for GSM A Interface GPRS Mobility Management and GPRS Session Management
4 * Copyright 2003, Michael Lum <mlum [AT] telostech.com>
5 * In association with Telos Technology Inc.
7 * Added the GPRS Mobility Management Protocol and
8 * the GPRS Session Management Protocol
9 * Copyright 2004, Rene Pilz <rene.pilz [AT] ftw.com>
10 * In association with Telecommunications Research Center
11 * Vienna (ftw.)Betriebs-GmbH within the Project Metawin.
13 * Various updates, enhancements and fixes
14 * Copyright 2009, Gerasimos Dimitriadis <dimeg [AT] intracom.gr>
15 * In association with Intracom Telecom SA
17 * Title 3GPP Other
19 * Reference [7]
20 * Mobile radio interface Layer 3 specification;
21 * Core network protocols;
22 * Stage 3
23 * (3GPP TS 24.008 version 5.9.0 Release 5)
25 * Reference [8]
26 * Mobile radio interface Layer 3 specification;
27 * Core network protocols;
28 * Stage 3
29 * (3GPP TS 24.008 version 6.7.0 Release 6)
30 * (3GPP TS 24.008 version 6.8.0 Release 6)
32 * Reference [9]
33 * Mobile radio interface Layer 3 specification;
34 * Core network protocols;
35 * Stage 3
36 * (3GPP TS 24.008 version 9.6.0 Release 9)
38 * Reference [10]
39 * Mobile radio interface Layer 3 specification;
40 * Core network protocols;
41 * Stage 3
42 * (3GPP TS 24.008 version 10.6.1 Release 10)
44 * Reference [11]
45 * Mobile radio interface Layer 3 specification;
46 * Core network protocols;
47 * Stage 3
48 * (3GPP TS 24.008 version 11.7.0 Release 11)
50 * Reference [12]
51 * Mobile radio interface Layer 3 specification;
52 * Core network protocols;
53 * Stage 3
54 * (3GPP TS 24.008 version 12.10.0 Release 12)
56 * Reference [13]
57 * Mobile radio interface Layer 3 specification;
58 * Core network protocols;
59 * Stage 3
60 * (3GPP TS 24.008 version 13.8.0 Release 13)
62 * Reference [14]
63 * Mobile radio interface Layer 3 specification;
64 * Core network protocols;
65 * Stage 3
66 * (3GPP TS 24.008 version 14.6.0 Release 14)
68 * Reference [15]
69 * Mobile radio interface Layer 3 specification;
70 * Core network protocols;
71 * Stage 3
72 * (3GPP TS 24.008 version 15.6.0 Release 15)
74 * Reference [16]
75 * Mobile radio interface Layer 3 specification;
76 * Core network protocols;
77 * Stage 3
78 * (3GPP TS 24.008 version 16.6.0 Release 16)
80 * Reference [17]
81 * Mobile radio interface Layer 3 specification;
82 * Core network protocols;
83 * Stage 3
84 * (3GPP TS 24.008 version 17.8.0 Release 17)
86 * Reference [18]
87 * Mobile radio interface Layer 3 specification;
88 * Core network protocols;
89 * Stage 3
90 * (3GPP TS 24.008 version 18.6.0 Release 18)
92 * Wireshark - Network traffic analyzer
93 * By Gerald Combs <gerald@wireshark.org>
94 * Copyright 1998 Gerald Combs
96 * SPDX-License-Identifier: GPL-2.0-or-later
99 #include "config.h"
102 #include <epan/packet.h>
103 #include <epan/expert.h>
104 #include <epan/ipproto.h>
105 #include <epan/etypes.h>
106 #include <epan/tfs.h>
107 #include <epan/unit_strings.h>
108 #include <wsutil/array.h>
109 #include "packet-ber.h"
110 #include "packet-gsm_a_common.h"
111 #include "packet-e212.h"
112 #include "packet-ppp.h"
113 #include "packet-e164.h"
115 void proto_register_gsm_a_gm(void);
116 void proto_reg_handoff_gsm_a_gm(void);
118 /* PROTOTYPES/FORWARDS */
120 const value_string gsm_a_dtap_msg_gmm_strings[] = {
121 { 0x01, "Attach Request" },
122 { 0x02, "Attach Accept" },
123 { 0x03, "Attach Complete" },
124 { 0x04, "Attach Reject" },
125 { 0x05, "Detach Request" },
126 { 0x06, "Detach Accept" },
127 { 0x08, "Routing Area Update Request" },
128 { 0x09, "Routing Area Update Accept" },
129 { 0x0a, "Routing Area Update Complete" },
130 { 0x0b, "Routing Area Update Reject" },
131 { 0x0c, "Service Request" },
132 { 0x0d, "Service Accept" },
133 { 0x0e, "Service Reject" },
134 { 0x10, "P-TMSI Reallocation Command" },
135 { 0x11, "P-TMSI Reallocation Complete" },
136 { 0x12, "Authentication and Ciphering Req" },
137 { 0x13, "Authentication and Ciphering Resp" },
138 { 0x14, "Authentication and Ciphering Rej" },
139 { 0x15, "Identity Request" },
140 { 0x16, "Identity Response" },
141 { 0x1c, "Authentication and Ciphering Failure" },
142 { 0x20, "GMM Status" },
143 { 0x21, "GMM Information" },
144 { 0, NULL }
146 static value_string_ext gsm_a_dtap_msg_gmm_strings_ext = VALUE_STRING_EXT_INIT(gsm_a_dtap_msg_gmm_strings);
149 const value_string gsm_a_dtap_msg_sm_strings[] = {
150 { 0x41, "Activate PDP Context Request" },
151 { 0x42, "Activate PDP Context Accept" },
152 { 0x43, "Activate PDP Context Reject" },
153 { 0x44, "Request PDP Context Activation" },
154 { 0x45, "Request PDP Context Activation rej." },
155 { 0x46, "Deactivate PDP Context Request" },
156 { 0x47, "Deactivate PDP Context Accept" },
157 { 0x48, "Modify PDP Context Request(Network to MS direction)" },
158 { 0x49, "Modify PDP Context Accept (MS to network direction)" },
159 { 0x4a, "Modify PDP Context Request(MS to network direction)" },
160 { 0x4b, "Modify PDP Context Accept (Network to MS direction)" },
161 { 0x4c, "Modify PDP Context Reject" },
162 { 0x4d, "Activate Secondary PDP Context Request" },
163 { 0x4e, "Activate Secondary PDP Context Accept" },
164 { 0x4f, "Activate Secondary PDP Context Reject" },
165 { 0x50, "Reserved: was allocated in earlier phases of the protocol" },
166 { 0x51, "Reserved: was allocated in earlier phases of the protocol" },
167 { 0x52, "Reserved: was allocated in earlier phases of the protocol" },
168 { 0x53, "Reserved: was allocated in earlier phases of the protocol" },
169 { 0x54, "Reserved: was allocated in earlier phases of the protocol" },
170 { 0x55, "SM Status" },
171 { 0x56, "Activate MBMS Context Request" },
172 { 0x57, "Activate MBMS Context Accept" },
173 { 0x58, "Activate MBMS Context Reject" },
174 { 0x59, "Request MBMS Context Activation" },
175 { 0x5a, "Request MBMS Context Activation Reject" },
176 { 0x5b, "Request Secondary PDP Context Activation" },
177 { 0x5c, "Request Secondary PDP Context Activation Reject" },
178 { 0x5d, "Notification" },
179 { 0, NULL }
181 static value_string_ext gsm_a_dtap_msg_sm_strings_ext = VALUE_STRING_EXT_INIT(gsm_a_dtap_msg_sm_strings);
184 static const value_string gsm_gm_elem_strings[] = {
185 /* GPRS Mobility Management Information Elements 10.5.5 */
186 { DE_ADD_UPD_TYPE, "Additional Update Type" },
187 { DE_ATTACH_RES, "Attach Result" },
188 { DE_ATTACH_TYPE, "Attach Type" },
189 { DE_CIPH_ALG, "Ciphering Algorithm" },
190 { DE_INTEG_ALG, "Integrity Algorithm" },
191 { DE_TMSI_STAT, "TMSI Status" },
192 { DE_DETACH_TYPE, "Detach Type" },
193 { DE_DRX_PARAM, "DRX Parameter" },
194 { DE_FORCE_TO_STAND, "Force to Standby" },
195 { DE_FORCE_TO_STAND_H, "Force to Standby" },
196 { DE_P_TMSI_SIG, "P-TMSI Signature" },
197 { DE_P_TMSI_SIG_2, "P-TMSI Signature 2" },
198 { DE_ID_TYPE_2, "Identity Type 2" },
199 { DE_IMEISV_REQ, "IMEISV Request" },
200 { DE_REC_N_PDU_NUM_LIST, "Receive N-PDU Numbers List" },
201 { DE_MS_NET_CAP, "MS Network Capability" },
202 { DE_MS_RAD_ACC_CAP, "MS Radio Access Capability" },
203 { DE_GMM_CAUSE, "GMM Cause" },
204 { DE_RAI, "Routing Area Identification" },
205 { DE_RAI_2, "Routing Area Identification 2" },
206 { DE_UPD_RES, "Update Result" },
207 { DE_UPD_TYPE, "Update Type" },
208 { DE_AC_REF_NUM, "A&C Reference Number" },
209 { DE_AC_REF_NUM_H, "A&C Reference Number" },
210 { DE_SRVC_TYPE, "Service Type" },
211 { DE_CELL_NOT, "Cell Notification" },
212 { DE_PS_LCS_CAP, "PS LCS Capability" },
213 { DE_NET_FEAT_SUP, "Network Feature Support" },
214 { DE_ADD_NET_FEAT_SUP, "Additional Network Feature Support" },
215 { DE_RAT_INFO_CONTAINER, "Inter RAT Information Container" },
216 { DE_REQ_MS_INFO, "Requested MS Information" },
217 { DE_UE_NETWORK_CAP, "UE Network Capability" },
218 { DE_EUTRAN_IRAT_INFO_CONTAINER, "E-UTRAN Inter RAT Information Container" },
219 { DE_VOICE_DOMAIN_PREF, "Voice Domain Preference and UE's Usage Setting" },
220 { DE_PTMSI_TYPE, "P-TMSI Type" },
221 { DE_LAI_2, "Location Area Identification 2" },
222 { DE_NET_RES_ID_CONT, "Network Resource Identifier Container" },
223 { DE_EXT_DRX_PARAMS, "Extended DRX Parameters" },
224 { DE_MAC, "Message Authentication Code" },
225 { DE_UP_INTEG_IND, "User Plane Integrity Indicator" },
226 { DE_DCN_ID, "DCN-ID"},
227 { DE_PLMN_ID_CN_OPERATOR, "PLMN identity of the CN operator"},
228 { DE_NON_3GPP_NW_PROV_POL, "Non-3GPP NW provided policies"},
229 /* Session Management Information Elements 10.5.6 */
230 { DE_ACC_POINT_NAME, "Access Point Name" },
231 { DE_NET_SAPI, "Network Service Access Point Identifier" },
232 { DE_PRO_CONF_OPT, "Protocol Configuration Options" },
233 { DE_EXT_PRO_CONF_OPT, "Extended Protocol Configuration Options" },
234 { DE_PD_PRO_ADDR, "Packet Data Protocol Address" },
235 { DE_QOS, "Quality Of Service" },
236 { DE_RE_ATTEMPT_IND, "Re-attempt Indicator" },
237 { DE_EXT_QOS, "Extended Quality Of Service" },
238 { DE_SM_CAUSE, "SM Cause" },
239 { DE_SM_CAUSE_2, "SM Cause 2" },
240 { DE_LINKED_TI, "Linked TI" },
241 { DE_LLC_SAPI, "LLC Service Access Point Identifier" },
242 { DE_TEAR_DOWN_IND, "Tear Down Indicator" },
243 { DE_PACKET_FLOW_ID, "Packet Flow Identifier" },
244 { DE_TRAFFIC_FLOW_TEMPLATE, "Traffic Flow Template" },
245 { DE_TMGI, "Temporary Mobile Group Identity (TMGI)" },
246 { DE_MBMS_BEARER_CAP, "MBMS bearer capabilities" },
247 { DE_MBMS_PROT_CONF_OPT, "MBMS protocol configuration options" },
248 { DE_ENH_NSAPI, "Enhanced network service access point identifier" },
249 { DE_REQ_TYPE, "Request type" },
250 { DE_SM_NOTIF_IND, "Notification indicator" },
251 { DE_SM_CONNECTIVITY_TYPE, "Connectivity type" },
252 { DE_SM_WLAN_OFFLOAD_ACCEPT, "WLAN offload acceptability" },
253 { DE_NBIFOM_CONT, "NBIFOM container" },
254 /* GPRS Common Information Elements 10.5.7 */
255 { DE_PDP_CONTEXT_STAT, "PDP Context Status" },
256 { DE_RAD_PRIO, "Radio Priority" },
257 { DE_GPRS_TIMER, "GPRS Timer" },
258 { DE_GPRS_TIMER_2, "GPRS Timer 2" },
259 { DE_GPRS_TIMER_3, "GPRS Timer 3" },
260 { DE_RAD_PRIO_2, "Radio Priority 2"},
261 { DE_MBMS_CTX_STATUS, "MBMS context status"},
262 { DE_UPLINK_DATA_STATUS, "Uplink data status"},
263 { DE_DEVICE_PROPERTIES, "Device properties"},
264 { 0, NULL }
266 value_string_ext gsm_gm_elem_strings_ext = VALUE_STRING_EXT_INIT(gsm_gm_elem_strings);
268 #define DTAP_GMM_IEI_MASK 0xff
269 #define DTAP_SM_IEI_MASK 0xff
271 /* Initialize the protocol and registered fields */
272 static int proto_a_gm;
274 static int hf_gsm_a_dtap_msg_gmm_type;
275 static int hf_gsm_a_dtap_msg_sm_type;
276 int hf_gsm_a_gm_elem_id;
277 static int hf_gsm_a_sm_qos_delay_cls;
278 static int hf_gsm_a_sm_qos_reliability_cls;
279 static int hf_gsm_a_sm_qos_traffic_cls;
280 static int hf_gsm_a_sm_qos_del_order;
281 static int hf_gsm_a_sm_qos_del_of_err_sdu;
282 static int hf_gsm_a_sm_qos_ber;
283 static int hf_gsm_a_sm_qos_sdu_err_rat;
284 static int hf_gsm_a_sm_qos_traff_hdl_pri;
286 static int hf_gsm_a_gmm_split_pg_cycle_code;
287 static int hf_gsm_a_gmm_split_on_ccch;
288 static int hf_gsm_a_gmm_non_drx_timer;
289 static int hf_gsm_a_gmm_cn_spec_drx_cycle_len_coef;
291 static int hf_gsm_a_gmm_ptmsi_sig;
292 static int hf_gsm_a_gmm_ptmsi_sig2;
294 static int hf_gsm_a_sm_tft_op_code;
295 static int hf_gsm_a_sm_tft_e_bit;
296 static int hf_gsm_a_sm_tft_pkt_flt;
297 static int hf_gsm_a_sm_tft_pkt_flt_id;
298 static int hf_gsm_a_sm_tft_pkt_flt_dir;
299 static int hf_gsm_a_sm_ip4_address;
300 static int hf_gsm_a_sm_ip4_mask;
301 static int hf_gsm_a_sm_ip6_address;
302 static int hf_gsm_a_sm_ip6_mask;
303 static int hf_gsm_a_sm_ip6_prefix_length;
304 static int hf_gsm_a_sm_tft_protocol_header;
305 static int hf_gsm_a_sm_tft_port;
306 static int hf_gsm_a_sm_tft_port_low;
307 static int hf_gsm_a_sm_tft_port_high;
308 static int hf_gsm_a_sm_tft_security;
309 static int hf_gsm_a_sm_tft_traffic_class;
310 static int hf_gsm_a_sm_tft_traffic_mask;
311 static int hf_gsm_a_sm_tft_flow_label_type;
312 static int hf_gsm_a_sm_tft_param_id;
313 static int hf_gsm_a_sm_tft_packet_filter;
314 static int hf_gsm_a_sm_tft_packet_evaluation_precedence;
315 static int hf_gsm_a_sm_tft_packet_filter_length;
316 static int hf_gsm_a_sm_tft_authorization_token_value;
317 static int hf_gsm_a_sm_tft_media_component_number_value;
318 static int hf_gsm_a_sm_tft_ip_flow_number;
319 static int hf_gsm_a_sm_tft_packet_filter_identifier;
320 static int hf_gsm_a_sm_tft_parameter_content;
321 static int hf_gsm_a_sm_tft_packet_filter_component_type_id;
322 static int hf_gsm_a_sm_tft_mac_addr;
323 static int hf_gsm_a_sm_tft_vlan_tag_vid;
324 static int hf_gsm_a_sm_tft_vlan_tag_pcp;
325 static int hf_gsm_a_sm_tft_vlan_tag_dei;
326 static int hf_gsm_a_sm_tft_ethertype;
327 static int hf_gsm_a_gm_acc_tech_type;
328 static int hf_gsm_a_gm_acc_cap_struct_len;
329 static int hf_gsm_a_gm_sms_value;
330 static int hf_gsm_a_gm_sm_value;
331 static int hf_gsm_a_gm_link_dir;
332 static int hf_gsm_a_gm_cause;
334 static int hf_gsm_a_gm_add_upd_type;
335 static int hf_gsm_a_gm_fop;
336 static int hf_gsm_a_gm_res_of_attach;
337 static int hf_gsm_a_gm_type_of_ciph_alg;
338 static int hf_gsm_a_gm_type_of_integ_alg;
339 static int hf_gsm_a_gm_imeisv_req;
340 static int hf_gsm_a_gm_nsapi;
341 static int hf_gsm_a_gm_ac_ref_nr;
342 static int hf_gsm_a_gm_force_to_standby;
343 static int hf_gsm_a_gm_serv_type;
344 static int hf_gsm_a_gm_for;
345 static int hf_gsm_a_gm_type_of_attach;
346 static int hf_gsm_a_gm_tmsi_flag;
347 static int hf_gsm_a_gm_power_off;
348 static int hf_gsm_a_gm_type_of_detach_mo;
349 static int hf_gsm_a_gm_type_of_detach_mt;
350 static int hf_gsm_a_gm_update_type;
351 static int hf_gsm_a_gm_gprs_timer;
352 static int hf_gsm_a_gm_gprs_timer_unit;
353 static int hf_gsm_a_gm_gprs_timer_value;
354 static int hf_gsm_a_gm_gprs_timer2;
355 static int hf_gsm_a_gm_gprs_timer2_unit;
356 static int hf_gsm_a_gm_gprs_timer2_value;
357 static int hf_gsm_a_gm_gprs_timer3;
358 static int hf_gsm_a_gm_gprs_timer3_unit;
359 static int hf_gsm_a_gm_gprs_timer3_value;
360 static int hf_gsm_a_gm_nsapi_5_ul_stat;
361 static int hf_gsm_a_gm_nsapi_6_ul_stat;
362 static int hf_gsm_a_gm_nsapi_7_ul_stat;
363 static int hf_gsm_a_gm_nsapi_8_ul_stat;
364 static int hf_gsm_a_gm_nsapi_9_ul_stat;
365 static int hf_gsm_a_gm_nsapi_10_ul_stat;
366 static int hf_gsm_a_gm_nsapi_11_ul_stat;
367 static int hf_gsm_a_gm_nsapi_12_ul_stat;
368 static int hf_gsm_a_gm_nsapi_13_ul_stat;
369 static int hf_gsm_a_gm_nsapi_14_ul_stat;
370 static int hf_gsm_a_gm_nsapi_15_ul_stat;
371 static int hf_gsm_a_gm_device_prop_low_prio;
372 static int hf_gsm_a_gm_apn;
373 static int hf_gsm_a_gm_pco_pid;
374 static int hf_gsm_a_gm_pco_app_spec_info;
375 static int hf_gsm_a_gm_type_of_identity;
376 int hf_gsm_a_gm_rac;
377 static int hf_gsm_a_gm_mta_e;
378 static int hf_gsm_a_gm_mta_r;
379 static int hf_gsm_a_gm_apc;
380 static int hf_gsm_a_gm_otd_a;
381 static int hf_gsm_a_gm_otd_b;
382 static int hf_gsm_a_gm_gps_a;
383 static int hf_gsm_a_gm_gps_b;
384 static int hf_gsm_a_gm_gps_c;
385 static int hf_gsm_a_gm_motd;
386 static int hf_gsm_a_gm_mta_a;
387 static int hf_gsm_a_gm_lcs_molr;
388 static int hf_gsm_a_gm_mbms;
389 static int hf_gsm_a_gm_ims_vops;
390 static int hf_gsm_a_gm_emc_bs;
391 static int hf_gsm_a_gm_epco;
392 static int hf_gsm_a_gm_restrict_ec;
393 static int hf_gsm_a_gm_gprs_sms;
394 static int hf_gsm_a_gm_req_ms_info_irat;
395 static int hf_gsm_a_gm_req_ms_info_irat2;
396 static int hf_gsm_a_gm_ue_usage_setting;
397 static int hf_gsm_a_gm_voice_domain_pref_for_eutran;
398 static int hf_gsm_a_gm_ptmsi_type;
399 static int hf_gsm_a_gm_nri_cont;
400 static int hf_gsm_a_gm_paging_time_window;
401 static int hf_gsm_a_gm_edrx_value;
402 static int hf_gsm_a_gm_ext_paging_time_window;
403 static int hf_gsm_a_gm_mac;
404 static int hf_gsm_a_gm_up_integ_ind;
405 static int hf_gsm_a_gm_dcn_id;
406 static int hf_gsm_a_gm_n3en_ind;
407 static int hf_gsm_a_sm_pdp_type_org;
408 static int hf_gsm_a_sm_qos_mean_thr;
409 static int hf_gsm_a_sm_qos_peak_thr;
410 static int hf_gsm_a_sm_qos_prec_class;
411 static int hf_gsm_a_sm_qos_trans_delay;
412 static int hf_gsm_a_sm_qos_signalling_ind;
413 static int hf_gsm_a_sm_qos_source_stat_desc;
414 static int hf_gsm_a_sm_qos_max_bitrate_upl;
415 static int hf_gsm_a_sm_qos_max_bitrate_downl;
416 static int hf_gsm_a_sm_qos_guar_bitrate_upl;
417 static int hf_gsm_a_sm_qos_guar_bitrate_downl;
418 static int hf_gsm_a_sm_qos_max_bitrate_upl_ext;
419 static int hf_gsm_a_sm_qos_max_bitrate_downl_ext;
420 static int hf_gsm_a_sm_qos_guar_bitrate_upl_ext;
421 static int hf_gsm_a_sm_qos_guar_bitrate_downl_ext;
422 static int hf_gsm_a_sm_qos_max_bitrate_upl_ext2;
423 static int hf_gsm_a_sm_qos_max_bitrate_downl_ext2;
424 static int hf_gsm_a_sm_qos_guar_bitrate_upl_ext2;
425 static int hf_gsm_a_sm_qos_guar_bitrate_downl_ext2;
426 static int hf_gsm_a_sm_qos_maximum_sdu_size;
427 static int hf_gsm_a_sm_eplmnc;
428 static int hf_gsm_a_sm_ratc;
429 static int hf_gsm_a_sm_cause;
430 static int hf_gsm_a_sm_cause_2;
431 static int hf_gsm_a_sm_llc_sapi;
432 static int hf_gsm_a_sm_tdi;
433 static int hf_gsm_a_sm_packet_flow_id;
434 static int hf_gsm_a_sm_tmgi;
435 static int hf_gsm_a_sm_enh_nsapi;
436 static int hf_gsm_a_sm_req_type;
437 static int hf_gsm_a_sm_notif_ind;
438 static int hf_gsm_a_sm_connectivity_type;
439 static int hf_gsm_a_sm_wlan_utran_offload_accept;
440 static int hf_gsm_a_sm_wlan_eutran_offload_accept;
441 static int hf_gsm_a_sm_nbifom_cont;
442 static int hf_gsm_a_gm_rac_ctrled_early_cm_sending;
443 static int hf_gsm_a_gm_rac_pseudo_sync;
444 static int hf_gsm_a_gm_rac_vgcs;
445 static int hf_gsm_a_gm_rac_vbs;
446 static int hf_gsm_a_gm_rac_multislot_capability;
447 static int hf_gsm_a_gm_rac_hscsd_multi_slot_class;
448 static int hf_gsm_a_gm_rac_gprs_multi_slot_class;
449 static int hf_gsm_a_gm_rac_gprs_ext_dyn_alloc_cap;
450 static int hf_gsm_a_gm_rac_ecsd_multi_slot_class;
451 static int hf_gsm_a_gm_rac_egprs_multi_slot_class;
452 static int hf_gsm_a_gm_rac_egprs_ext_dyn_alloc_cap;
453 static int hf_gsm_a_gm_rac_dtm_gprs_multi_slot_class;
454 static int hf_gsm_a_gm_rac_single_slt_dtm;
455 static int hf_gsm_a_gm_rac_dtm_egprs_multi_slot_cls_pres;
456 static int hf_gsm_a_gm_rac_dtm_egprs_multi_slot_class;
457 static int hf_gsm_a_gm_rac_8psk_pow_cap_pres;
458 static int hf_gsm_a_gm_rac_comp_int_meas_cap;
459 static int hf_gsm_a_gm_rel_lev_ind;
460 static int hf_gsm_a_gm_rac_geran_feat_pkg;
461 static int hf_gsm_a_gm_rac_umts_fdd_cap;
462 static int hf_gsm_a_gm_rac_umts_384_tdd_ra_cap;
463 static int hf_gsm_a_gm_rac_cdma2000_cap;
464 static int hf_gsm_a_gm_rac_umts_128_tdd_ra_cap;
465 static int hf_gsm_a_gm_rac_mod_based_multi_slot_class_support;
466 static int hf_gsm_a_gm_rac_geran_iu_mode_cap;
467 static int hf_gsm_a_gm_rac_flo_iu_cap;
468 static int hf_gsm_a_gm_rac_mult_tbf_cap;
469 static int hf_gsm_a_gm_rac_down_adv_rec_perf;
470 static int hf_gsm_a_gm_rac_ext_rlc_mac_ctrl_msg_seg_cap;
471 static int hf_gsm_a_gm_rac_dtm_enh_cap;
472 static int hf_gsm_a_gm_rac_dtm_gprs_high_multi_slot_class;
473 static int hf_gsm_a_gm_rac_dtm_egprs_high_multi_slot_class;
474 static int hf_gsm_a_gm_rac_ps_ho_cap;
475 static int hf_gsm_a_gm_rac_dtm_ho_cap;
476 static int hf_gsm_a_gm_rac_multi_slot_cap_red_down_dual_carrier;
477 static int hf_gsm_a_gm_rac_down_dual_carrier_dtm_cap;
478 static int hf_gsm_a_gm_rac_flex_ts_assign;
479 static int hf_gsm_a_gm_rac_gan_ps_ho_cap;
480 static int hf_gsm_a_gm_rac_rlc_non_pers_mode;
481 static int hf_gsm_a_gm_rac_reduced_lat_cap;
482 static int hf_gsm_a_gm_rac_ul_egprs2;
483 static int hf_gsm_a_gm_rac_dl_egprs2;
484 static int hf_gsm_a_gm_rac_eutra_fdd_support;
485 static int hf_gsm_a_gm_rac_eutra_tdd_support;
486 static int hf_gsm_a_gm_rac_geran_to_eutra_support_in_geran_ptm;
487 static int hf_gsm_a_gm_rac_prio_based_resel_support;
488 static int hf_gsm_a_gm_rac_alt_efta_multi_slot_class;
489 static int hf_gsm_a_gm_rac_efta_multi_slot_cap_red_down_dual_carrier;
490 static int hf_gsm_a_gm_rac_ind_up_layer_pdu_start_cap_for_rlc_um;
491 static int hf_gsm_a_gm_rac_emst_cap;
492 static int hf_gsm_a_gm_rac_mtti_cap;
493 static int hf_gsm_a_gm_rac_utra_csg_cell_report;
494 static int hf_gsm_a_gm_rac_eutra_csg_cell_report;
495 static int hf_gsm_a_gm_rac_dtr_cap;
496 static int hf_gsm_a_gm_rac_emsr_cap;
497 static int hf_gsm_a_gm_rac_fast_down_freq_switch_cap;
498 static int hf_gsm_a_gm_rac_tighter_cap;
499 static int hf_gsm_a_gm_rac_fanr_cap;
500 static int hf_gsm_a_gm_rac_ipa_cap;
501 static int hf_gsm_a_gm_rac_geran_nw_sharing_support;
502 static int hf_gsm_a_gm_rac_eutra_wb_rsrq_support;
503 static int hf_gsm_a_gm_rac_utra_mfbi_support;
504 static int hf_gsm_a_gm_rac_eutra_mfbi_support;
505 static int hf_gsm_a_gm_rac_dlmc_non_contig_intra_band_recep;
506 static int hf_gsm_a_gm_rac_dlmc_inter_band_recep;
507 static int hf_gsm_a_gm_rac_dlmc_max_bandwidth;
508 static int hf_gsm_a_gm_rac_dlmc_max_nb_dl_ts;
509 static int hf_gsm_a_gm_rac_dlmc_max_nb_dl_carriers;
510 static int hf_gsm_a_gm_rac_ext_tsc_set_cap_support;
511 static int hf_gsm_a_gm_rac_ext_earfcn_value_range;
512 static int hf_gsm_a_gm_rac_ec_pch_mon_support;
513 static int hf_gsm_a_gm_rac_ms_sync_accuracy;
514 static int hf_gsm_a_gm_rac_ec_ul_cov_enh_support;
515 static int hf_gsm_a_gm_rac_mta_access_sec_support;
516 static int hf_gsm_a_gm_rac_ec_paging_ind_chan_mon_support;
517 static int hf_gsm_a_sm_ti_flag;
518 static int hf_gsm_a_sm_ext;
520 static int hf_gsm_a_gmm_net_cap_gea1;
521 static int hf_gsm_a_gmm_net_cap_smdch;
522 static int hf_gsm_a_gmm_net_cap_smgprs;
523 static int hf_gsm_a_gmm_net_cap_ucs2;
524 static int hf_gsm_a_gmm_net_cap_ss_scr_ind;
525 static int hf_gsm_a_gmm_net_cap_solsa;
526 static int hf_gsm_a_gmm_net_cap_rev;
527 static int hf_gsm_a_gmm_net_cap_pfc;
528 static int hf_gsm_a_gmm_net_cap_ext_gea_bits;
529 static int hf_gsm_a_gmm_net_cap_gea2;
530 static int hf_gsm_a_gmm_net_cap_gea3;
531 static int hf_gsm_a_gmm_net_cap_gea4;
532 static int hf_gsm_a_gmm_net_cap_gea5;
533 static int hf_gsm_a_gmm_net_cap_gea6;
534 static int hf_gsm_a_gmm_net_cap_gea7;
535 static int hf_gsm_a_gmm_net_cap_lcs;
536 static int hf_gsm_a_gmm_net_cap_ps_irat_iu;
537 static int hf_gsm_a_gmm_net_cap_ps_irat_s1;
538 static int hf_gsm_a_gmm_net_cap_comb_proc;
539 static int hf_gsm_a_gmm_net_cap_isr;
540 static int hf_gsm_a_gmm_net_cap_srvcc_to_geran;
541 static int hf_gsm_a_gmm_net_cap_epc;
542 static int hf_gsm_a_gmm_net_cap_nf;
543 static int hf_gsm_a_gmm_net_geran_net_sharing;
544 static int hf_gsm_a_gmm_net_cap_up_int_prot;
545 static int hf_gsm_a_gmm_net_cap_up_gia4;
546 static int hf_gsm_a_gmm_net_cap_up_gia5;
547 static int hf_gsm_a_gmm_net_cap_up_gia6;
548 static int hf_gsm_a_gmm_net_cap_up_gia7;
549 static int hf_gsm_a_gmm_net_cap_epco_ie_ind;
550 static int hf_gsm_a_gmm_net_cap_restrict_use_enh_cov;
551 static int hf_gsm_a_gmm_net_cap_dc_eutra_nr_cap;
553 /* Generated from convert_proto_tree_add_text.pl */
554 static int hf_gsm_a_gm_presence;
555 static int hf_gsm_a_gm_8psk_power_class;
556 static int hf_gsm_a_gm_rf_power_capability;
557 static int hf_gsm_a_gm_a5_bits;
558 static int hf_gsm_a_gm_8psk_power_capability;
559 static int hf_gsm_a_gm_extended_dtm_gprs_multi_slot_class;
560 static int hf_gsm_a_gm_extended_dtm_egprs_multi_slot_class;
561 static int hf_gsm_a_gm_high_multislot_capability;
562 static int hf_gsm_a_gm_gmsk_multislot_power_profile;
563 static int hf_gsm_a_gm_8psk_multislot_power_profile;
564 static int hf_gsm_a_gm_update_result;
565 static int hf_gsm_a_gm_radio_priority_pdp;
566 static int hf_gsm_a_gm_radio_priority_tom8;
567 static int hf_gsm_a_gm_configuration_protocol;
568 static int hf_gsm_a_gm_sm_pco_length;
569 static int hf_gsm_a_gm_sm_pco_length2;
570 static int hf_gsm_a_gm_sm_pco_pcscf_ipv6;
571 static int hf_gsm_a_gm_sm_pco_dns_ipv6;
572 static int hf_gsm_a_gm_sm_pco_dsmipv6_home_agent_ipv6;
573 static int hf_gsm_a_gm_sm_pco_dsmipv6_home_network_ipv6;
574 static int hf_gsm_a_gm_sm_pco_reject_code;
575 static int hf_gsm_a_gm_sm_pco_dsmipv6_home_network_prefix_length;
576 static int hf_gsm_a_gm_sm_pco_dsmipv6_home_agent_ipv4;
577 static int hf_gsm_a_gm_sm_pco_pcscf_ipv4;
578 static int hf_gsm_a_gm_sm_pco_dns_ipv4;
579 static int hf_gsm_a_gm_sm_pco_ipv4_link_mtu_size;
580 static int hf_gsm_a_gm_sm_pco_nbifom_mode;
581 static int hf_gsm_a_gm_sm_pco_non_ip_link_mtu_size;
582 static int hf_gsm_a_gm_sm_pco_apn_rate_ctrl_params_aer;
583 static int hf_gsm_a_gm_sm_pco_apn_rate_ctrl_params_ul_time_unit;
584 static int hf_gsm_a_gm_sm_pco_apn_rate_ctrl_params_max_ul_rate;
585 static int hf_gsm_a_gm_sm_pco_3gpp_data_off_ue_status;
586 static int hf_gsm_a_gm_sm_pco_sel_bearer_ctrl_mode;
587 static int hf_gsm_a_gm_sm_pco_add_apn_rate_ctrl_params_ul_time_unit;
588 static int hf_gsm_a_gm_sm_pco_add_apn_rate_ctrl_params_max_ul_rate;
589 static int hf_gsm_a_gm_sm_pco_pdu_session_id;
590 static int hf_gsm_a_gm_sm_pco_pdu_session_address_lifetime;
591 static int hf_gsm_a_gm_sm_pco_eth_frame_payload_mtu;
592 static int hf_gsm_a_gm_sm_pco_unstruct_link_mtu;
593 static int hf_gsm_a_gm_sm_pco_5gsm_cause;
594 static int hf_gsm_a_gm_sm_pco_acs_info;
595 static int hf_gsm_a_gm_sm_pco_init_small_data_rate_ctrl_params_max_ul_rate_allowed;
596 static int hf_gsm_a_gm_sm_pco_init_small_data_rate_ctrl_params_termination_timestamp;
597 static int hf_gsm_a_gm_sm_pco_atsss_response;
598 static int hf_gsm_a_gm_sm_pco_dns_serv_sec_info_type;
599 static int hf_gsm_a_gm_sm_pco_dns_serv_sec_info_sec_proto_type;
600 static int hf_gsm_a_gm_sm_pco_dns_serv_sec_info_port_number;
601 static int hf_gsm_a_gm_sm_pco_dns_serv_sec_info_auth_domain_name;
602 static int hf_gsm_a_gm_sm_pco_dns_serv_sec_info_spki_pin_set;
603 static int hf_gsm_a_gm_sm_pco_dns_serv_sec_info_root_certificate;
604 static int hf_gsm_a_gm_sm_pco_dns_serv_sec_info_raw_public_key;
605 static int hf_gsm_a_gm_sm_pco_dns_serv_sec_info_value_part;
606 static int hf_gsm_a_gm_sm_pco_ecs_addr_type;
607 static int hf_gsm_a_gm_sm_pco_ecs_addr_spatial_valid_cond_type;
608 static int hf_gsm_a_gm_sm_pco_ecs_addr_ipv4;
609 static int hf_gsm_a_gm_sm_pco_ecs_addr_ipv6;
610 static int hf_gsm_a_gm_sm_pco_ecs_addr_fqdn_len;
611 static int hf_gsm_a_gm_sm_pco_ecs_addr_fqdn;
612 static int hf_gsm_a_gm_sm_pco_ecs_addr_spatial_valid_cond_cont_len;
613 static int hf_gsm_a_gm_sm_pco_ecs_addr_spatial_valid_cond_cont;
614 static int hf_gsm_a_gm_sm_pco_ecs_addr_espili;
615 static int hf_gsm_a_gm_sm_pco_ecs_addr_eami;
616 static int hf_gsm_a_gm_sm_pco_ecs_addr_tlsgi;
617 static int hf_gsm_a_gm_sm_pco_ecs_addr_tlsai;
618 static int hf_gsm_a_gm_sm_pco_ecs_addr_tlscsci;
619 static int hf_gsm_a_gm_sm_pco_ecs_addr_supported_plmns_info_list_cont_len;
620 static int hf_gsm_a_gm_sm_pco_ecs_addr_supported_plmns_info_list_cont;
621 static int hf_gsm_a_gm_sm_pco_ecsp_id;
622 static int hf_gsm_a_gm_sm_pco_pvs_ipv4;
623 static int hf_gsm_a_gm_sm_pco_pvs_ipv6;
624 static int hf_gsm_a_gm_sm_pco_pvs_name_len;
625 static int hf_gsm_a_gm_sm_pco_pvs_name;
626 static int hf_gsm_a_gm_sm_pco_pvs_s_nssai_ind;
627 static int hf_gsm_a_gm_sm_pco_pvs_dnn_ind;
628 static int hf_gsm_a_gm_sm_pco_pvs_dnn_len;
629 static int hf_gsm_a_gm_sm_pco_pvs_s_nssai_len;
630 static int hf_gsm_a_gm_sm_pco_dns_serv_sec_prot_support;
631 static int hf_gsm_a_gm_sm_pco_eas_rediscovery_support_ind_fqdn;
632 static int hf_gsm_a_gm_sm_pco_eas_rediscovery_support_ind_ipv6;
633 static int hf_gsm_a_gm_sm_pco_eas_rediscovery_support_ind_ipv4;
634 static int hf_gsm_a_gm_sm_pco_eas_rediscovery_support_ind_with_impacted_eas_ipv4_range_low;
635 static int hf_gsm_a_gm_sm_pco_eas_rediscovery_support_ind_with_impacted_eas_ipv4_range_high;
636 static int hf_gsm_a_gm_sm_pco_eas_rediscovery_support_ind_with_impacted_eas_ipv6_range_low;
637 static int hf_gsm_a_gm_sm_pco_eas_rediscovery_support_ind_with_impacted_eas_ipv6_range_high;
638 static int hf_gsm_a_gm_sm_pco_eas_rediscovery_support_ind_with_impacted_eas_fqdn;
639 static int hf_gsm_a_gm_sm_pco_sdnaepc_dn_specific_id;
640 static int hf_gsm_a_sm_pdp_type_number;
641 static int hf_gsm_a_sm_pdp_address;
642 static int hf_gsm_a_gm_ti_value;
644 /* Initialize the subtree pointers */
645 static int ett_gmm_radio_cap;
646 static int ett_gmm_network_cap;
647 static int ett_gsm_a_gm_msrac_multislot_capability;
648 static int ett_gmm_rai;
649 static int ett_gmm_gprs_timer;
651 static int ett_sm_tft;
652 static int ett_sm_pco;
654 static expert_field ei_gsm_a_gm_extraneous_data;
655 static expert_field ei_gsm_a_gm_not_enough_data;
656 static expert_field ei_gsm_a_gm_undecoded;
657 static expert_field ei_gsm_a_gm_missing_mandatory_element;
659 static dissector_handle_t rrc_irat_ho_info_handle;
660 static dissector_handle_t lte_rrc_ue_eutra_cap_handle;
661 static dissector_handle_t nbifom_handle;
662 static dissector_handle_t eap_handle;
664 static dissector_table_t gprs_sm_pco_subdissector_table; /* GPRS SM PCO PPP Protocols */
666 static const unit_name_string units_message_messages = { " message", " messages" };
668 #define NUM_GSM_GM_ELEM array_length(gsm_gm_elem_strings)
669 int ett_gsm_gm_elem[NUM_GSM_GM_ELEM];
671 static const char *pdp_str[2]={ "PDP-INACTIVE", "PDP-ACTIVE" };
674 * [9] 10.5.5.0 Additional Update Type
676 static const true_false_string gsm_a_gm_add_upd_type_value = {
677 "SMS only",
678 "No additional information (shall be interpreted as request for combined attach or combined tracking area updating)"
680 static uint16_t
681 de_gmm_add_upd_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
683 uint32_t curr_offset, bit_offset;
685 curr_offset = offset;
686 bit_offset = (curr_offset<<3)+4;
688 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
689 bit_offset += 3;
690 proto_tree_add_bits_item(tree, hf_gsm_a_gm_add_upd_type, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
691 curr_offset++;
693 return (curr_offset - offset);
697 * [9] 10.5.5.1 Attach result
699 static const value_string gsm_a_gm_res_of_attach_vals[] = {
700 { 0x01, "GPRS only attached" },
701 { 0x03, "Combined GPRS/IMSI attached" },
702 { 0, NULL }
705 static uint16_t
706 de_gmm_attach_res(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
708 proto_tree_add_item(tree, hf_gsm_a_gm_fop, tvb, offset, 1, ENC_BIG_ENDIAN);
709 proto_tree_add_item(tree, hf_gsm_a_gm_res_of_attach, tvb, offset, 1, ENC_BIG_ENDIAN);
711 /* no length check possible */
712 return 1;
716 * [9] 10.5.5.2 Attach type
718 static const value_string gsm_a_gm_type_of_attach_vals[] = {
719 { 0x01, "GPRS attach" },
720 { 0x02, "Not used (In earlier versions: GPRS attach while IMSI attached)" },
721 { 0x03, "Combined GPRS/IMSI attached" },
722 { 0, NULL }
725 static uint16_t
726 de_gmm_attach_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
728 proto_tree_add_item(tree, hf_gsm_a_gm_for, tvb, offset, 1, ENC_BIG_ENDIAN);
729 proto_tree_add_item(tree, hf_gsm_a_gm_type_of_attach, tvb, offset, 1, ENC_BIG_ENDIAN);
731 /* no length check possible */
732 return 1;
736 * [9] 10.5.5.3 Ciphering algorithm
738 const value_string gsm_a_gm_type_of_ciph_alg_vals[] = {
739 { 0x00, "ciphering not used" },
740 { 0x01, "GPRS Encryption Algorithm GEA/1" },
741 { 0x02, "GPRS Encryption Algorithm GEA/2" },
742 { 0x03, "GPRS Encryption Algorithm GEA/3" },
743 { 0x04, "GPRS Encryption Algorithm GEA/4" },
744 { 0x05, "GPRS Encryption Algorithm GEA/5" },
745 { 0x06, "GPRS Encryption Algorithm GEA/6" },
746 { 0x07, "GPRS Encryption Algorithm GEA/7" },
747 { 0, NULL }
750 static uint16_t
751 de_gmm_ciph_alg(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
753 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (offset << 3) + 4, 1, ENC_BIG_ENDIAN);
754 proto_tree_add_item(tree, hf_gsm_a_gm_type_of_ciph_alg, tvb, offset, 1, ENC_BIG_ENDIAN);
756 /* no length check possible */
757 return 1;
761 * [13] 10.5.5.3a Integrity protection algorithm
763 static const value_string gsm_a_gm_type_of_integ_alg_vals[] = {
764 { 0x00, "GPRS Integrity Algorithm GIA/4" },
765 { 0x01, "GPRS Integrity Algorithm GIA/5" },
766 { 0x02, "GPRS Integrity Algorithm GIA/6" },
767 { 0x03, "GPRS Integrity Algorithm GIA/7" },
768 { 0, NULL }
771 static uint16_t
772 de_gmm_integ_alg(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
774 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (offset << 3) + 4, 1, ENC_BIG_ENDIAN);
775 proto_tree_add_item(tree, hf_gsm_a_gm_type_of_integ_alg, tvb, offset, 1, ENC_BIG_ENDIAN);
777 /* no length check possible */
778 return 1;
782 * [9] 10.5.5.4 TMSI status
784 static const true_false_string gsm_a_gm_tmsi_flag_value = {
785 "valid TMSI available",
786 "no valid TMSI available"
789 static uint16_t
790 de_gmm_tmsi_stat(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
792 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (offset << 3) + 4, 3, ENC_BIG_ENDIAN);
793 proto_tree_add_item(tree, hf_gsm_a_gm_tmsi_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
795 /* no length check possible */
796 return 1;
800 * [7] 10.5.5.5
802 static const true_false_string gsm_a_gm_power_off_value = {
803 "power switched off",
804 "normal detach"
807 static const value_string gsm_a_gm_type_of_detach_mo_vals[] = {
808 { 0x01, "GPRS detach" },
809 { 0x02, "IMSI detach" },
810 { 0x03, "Combined GPRS/IMSI detach" },
811 { 0, NULL }
814 static const value_string gsm_a_gm_type_of_detach_mt_vals[] = {
815 { 0x01, "re-attach required" },
816 { 0x02, "re-attach not required" },
817 { 0x03, "IMSI detach (after VLR failure)" },
818 { 0, NULL }
821 static uint16_t
822 de_gmm_detach_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
824 uint32_t curr_offset;
826 curr_offset = offset;
828 if (pinfo->p2p_dir == P2P_DIR_RECV) {
829 proto_tree_add_item(tree, hf_gsm_a_gm_power_off, tvb, offset, 1, ENC_BIG_ENDIAN);
830 proto_tree_add_item(tree, hf_gsm_a_gm_type_of_detach_mo, tvb, offset, 1, ENC_BIG_ENDIAN);
831 } else {
832 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (offset << 3) + 4, 1, ENC_BIG_ENDIAN);
833 proto_tree_add_item(tree, hf_gsm_a_gm_type_of_detach_mt, tvb, offset, 1, ENC_BIG_ENDIAN);
836 curr_offset++;
838 /* no length check possible */
840 return (curr_offset - offset);
844 * [7] 10.5.5.6
847 /* SPLIT PG CYCLE CODE, octet 2 */
848 static const value_string gsm_a_gmm_split_pg_cycle_code_strings[] = {
849 { 0, "704 (equivalent to no DRX)" },
850 { 1, "1" },
851 { 2, "2" },
852 { 3, "3" },
853 { 4, "4" },
854 { 5, "5" },
855 { 6, "6" },
856 { 7, "7" },
857 { 8, "8" },
858 { 9, "9" },
859 { 10, "10" },
860 { 11, "11" },
861 { 12, "12" },
862 { 13, "13" },
863 { 14, "14" },
864 { 15, "15" },
865 { 16, "16" },
866 { 17, "17" },
867 { 18, "18" },
868 { 19, "19" },
869 { 20, "20" },
870 { 21, "21" },
871 { 22, "22" },
872 { 23, "23" },
873 { 24, "24" },
874 { 25, "25" },
875 { 26, "26" },
876 { 27, "27" },
877 { 28, "28" },
878 { 29, "29" },
879 { 30, "30" },
880 { 31, "31" },
881 { 32, "32" },
882 { 33, "33" },
883 { 34, "34" },
884 { 35, "35" },
885 { 36, "36" },
886 { 37, "37" },
887 { 38, "38" },
888 { 39, "39" },
889 { 40, "40" },
890 { 41, "41" },
891 { 42, "42" },
892 { 43, "43" },
893 { 44, "44" },
894 { 45, "45" },
895 { 46, "46" },
896 { 47, "47" },
897 { 48, "48" },
898 { 49, "49" },
899 { 50, "50" },
900 { 51, "51" },
901 { 52, "52" },
902 { 53, "53" },
903 { 54, "54" },
904 { 55, "55" },
905 { 56, "56" },
906 { 57, "57" },
907 { 58, "58" },
908 { 59, "59" },
909 { 60, "60" },
910 { 61, "61" },
911 { 62, "62" },
912 { 63, "63" },
913 { 64, "64" },
914 { 65, "71" },
915 { 66, "72" },
916 { 67, "74" },
917 { 68, "75" },
918 { 69, "77" },
919 { 70, "79" },
920 { 71, "80" },
921 { 72, "83" },
922 { 73, "86" },
923 { 74, "88" },
924 { 75, "90" },
925 { 76, "92" },
926 { 77, "96" },
927 { 78, "101" },
928 { 79, "103" },
929 { 80, "107" },
930 { 81, "112" },
931 { 82, "116" },
932 { 83, "118" },
933 { 84, "128" },
934 { 85, "141" },
935 { 86, "144" },
936 { 87, "150" },
937 { 88, "160" },
938 { 89, "171" },
939 { 90, "176" },
940 { 91, "192" },
941 { 92, "214" },
942 { 93, "224" },
943 { 94, "235" },
944 { 95, "256" },
945 { 96, "288" },
946 { 97, "320" },
947 { 98, "352" },
948 { 0, NULL }
950 static value_string_ext gsm_a_gmm_split_pg_cycle_code_strings_ext = VALUE_STRING_EXT_INIT(gsm_a_gmm_split_pg_cycle_code_strings);
952 /* SPLIT on CCCH, octet 3 (bit 4)
953 * 0 Split pg cycle on CCCH is not supported by the mobile station
954 * 1 Split pg cycle on CCCH is supported by the mobile station
956 static const true_false_string gsm_a_gmm_split_on_ccch_value = {
957 "Split pg cycle on CCCH is supported by the mobile station",
958 "Split pg cycle on CCCH is not supported by the mobile station"
961 /* non-DRX timer, octet 3
962 * bit
963 * 3 2 1
965 static const value_string gsm_a_gmm_non_drx_timer_strings[] = {
966 { 0x00, "no non-DRX mode after transfer state" },
967 { 0x01, "max. 1 sec non-DRX mode after transfer state" },
968 { 0x02, "max. 2 sec non-DRX mode after transfer state" },
969 { 0x03, "max. 4 sec non-DRX mode after transfer state" },
970 { 0x04, "max. 8 sec non-DRX mode after transfer state" },
971 { 0x05, "max. 16 sec non-DRX mode after transfer state" },
972 { 0x06, "max. 32 sec non-DRX mode after transfer state" },
973 { 0x07, "max. 64 sec non-DRX mode after transfer state" },
974 { 0, NULL },
977 * CN Specific DRX cycle length coefficient, octet 3
978 * bit
979 * 8 7 6 5 Iu and S1 mode specific
980 * 0 0 0 0 For Iu mode, CN Specific DRX cycle length coefficient not specified by the MS, ie. the
981 * system information value 'CN domain specific DRX cycle length' is used.
982 * For S1 mode, DRX value not specified by the MS.
983 * (Ref 3GPP TS 25.331 and 36.304)
984 * 0 1 1 0 CN Specific DRX cycle length coefficient 6 and T = 32
985 * 0 1 1 1 CN Specific DRX cycle length coefficient 7 and T = 64
986 * 1 0 0 0 CN Specific DRX cycle length coefficient 8 and T = 128
987 * 1 0 0 1 CN Specific DRX cycle length coefficient 9 and T = 256
988 * All other values shall be interpreted as "CN Specific DRX cycle length coefficient not
989 * specified by the MS" and "DRX value not specified by the MS" by this version of the protocol.
990 * NOTE: For Iu mode and S1 mode, this field (octet 3 bits 8 to 5) is used, but was spare in earlier
991 * versions of this protocol.
993 static const range_string gsm_a_gmm_cn_spec_drx_cycle_len_coef_strings[] = {
994 { 0x00, 0x05, "CN Specific DRX cycle length coefficient / value not specified by the MS" },
995 { 0x06, 0x06, "CN Specific DRX cycle length coefficient 6 and T = 32" },
996 { 0x07, 0x07, "CN Specific DRX cycle length coefficient 7 and T = 64" },
997 { 0x08, 0x08, "CN Specific DRX cycle length coefficient 8 and T = 128" },
998 { 0x09, 0x09, "CN Specific DRX cycle length coefficient 9 and T = 256" },
999 { 0x0a, 0x0f, "CN Specific DRX cycle length coefficient / value not specified by the MS" },
1000 { 0, 0, NULL },
1002 uint16_t
1003 de_gmm_drx_param(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
1005 uint32_t curr_offset;
1007 curr_offset = offset;
1009 proto_tree_add_item(tree, hf_gsm_a_gmm_split_pg_cycle_code, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1010 curr_offset++;
1011 proto_tree_add_item(tree, hf_gsm_a_gmm_cn_spec_drx_cycle_len_coef, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1012 proto_tree_add_item(tree, hf_gsm_a_gmm_split_on_ccch, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1013 proto_tree_add_item(tree, hf_gsm_a_gmm_non_drx_timer, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1015 curr_offset++;
1017 /* no length check possible */
1019 return (curr_offset - offset);
1023 * [9] 10.5.5.7 Force to standby (lower nibble)
1025 static const range_string gsm_a_gm_force_to_standby_vals[] = {
1026 { 0x00, 0x00, "Force to standby not indicated" },
1027 { 0x01, 0x01, "Force to standby indicated" },
1028 { 0x02, 0x07, "Unknown, interpreted as Force to standby not indicated" },
1029 { 0, 0, NULL }
1032 static uint16_t
1033 de_gmm_ftostby(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
1035 uint32_t bit_offset;
1037 /* IMPORTANT - IT'S ASSUMED THAT THE INFORMATION IS IN THE LOWER NIBBLE */
1038 bit_offset = (offset << 3) + 4;
1039 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
1040 proto_tree_add_bits_item(tree, hf_gsm_a_gm_force_to_standby, tvb, bit_offset + 1, 3, ENC_BIG_ENDIAN);
1042 /* no length check possible */
1043 return 1;
1047 * [9] 10.5.5.7 Force to standby (higher nibble)
1049 static uint16_t
1050 de_gmm_ftostby_h(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
1052 uint32_t bit_offset;
1054 /* IMPORTANT - IT'S ASSUMED THAT THE INFORMATION IS IN THE HIGHER NIBBLE */
1055 bit_offset = offset << 3;
1056 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
1057 proto_tree_add_bits_item(tree, hf_gsm_a_gm_force_to_standby, tvb, bit_offset + 1, 3, ENC_BIG_ENDIAN);
1059 /* no length check possible */
1060 return 1;
1064 * [7] 10.5.5.8
1066 static uint16_t
1067 de_gmm_ptmsi_sig(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
1069 uint32_t curr_offset;
1070 proto_item *curr_item;
1072 curr_offset = offset;
1074 curr_item= proto_tree_add_item(tree, hf_gsm_a_gmm_ptmsi_sig, tvb, curr_offset, 3, ENC_BIG_ENDIAN);
1075 proto_item_append_text(curr_item, "%s", add_string ? add_string : "");
1077 curr_offset += 3;
1079 /* no length check possible */
1081 return (curr_offset - offset);
1085 * [7] 10.5.5.8a
1087 static uint16_t
1088 de_gmm_ptmsi_sig2(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string, int string_len _U_)
1090 uint32_t curr_offset;
1091 proto_item *curr_item;
1093 curr_offset = offset;
1095 curr_item= proto_tree_add_item(tree, hf_gsm_a_gmm_ptmsi_sig2, tvb, curr_offset, 3, ENC_BIG_ENDIAN);
1096 proto_item_append_text(curr_item, "%s", add_string ? add_string : "");
1097 curr_offset += 3;
1099 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_gm_extraneous_data);
1101 return (curr_offset - offset);
1105 * [9] 10.5.5.9 Identity type 2
1107 static const value_string gsm_a_gm_type_of_identity_vals[] = {
1108 { 0x01, "IMSI" },
1109 { 0x02, "IMEI" },
1110 { 0x03, "IMEISV" },
1111 { 0x04, "TMSI" },
1112 { 0, NULL }
1115 static uint16_t
1116 de_gmm_ident_type2(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
1118 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (offset << 3) + 4, 1, ENC_BIG_ENDIAN);
1119 proto_tree_add_item(tree, hf_gsm_a_gm_type_of_identity, tvb, offset, 1, ENC_BIG_ENDIAN);
1121 /* no length check possible */
1122 return 1;
1126 * [9] 10.5.5.10 IMEISV request
1128 static const range_string gsm_a_gm_imeisv_req_vals[] = {
1129 { 0x00, 0x00, "IMEISV not requested" },
1130 { 0x01, 0x01, "IMEISV requested" },
1131 { 0x02, 0x07, "Unknown, interpreted as IMEISV not requested" },
1132 { 0, 0, NULL }
1135 static uint16_t
1136 de_gmm_imeisv_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
1138 uint32_t bit_offset;
1140 /* IMPORTANT - IT'S ASSUMED THAT THE INFORMATION IS IN THE HIGHER NIBBLE */
1141 bit_offset = offset << 3;
1142 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
1143 proto_tree_add_bits_item(tree, hf_gsm_a_gm_imeisv_req, tvb, bit_offset + 1, 3, ENC_BIG_ENDIAN);
1145 /* no length check possible */
1146 return 1;
1150 * [7] 10.5.5.11
1152 static uint16_t
1153 de_gmm_rec_npdu_lst(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
1155 uint32_t curr_offset;
1156 unsigned curr_len;
1158 curr_len = len;
1159 curr_offset = offset;
1161 if (len == 0) return 0;
1165 uint32_t oct;
1166 oct = tvb_get_uint8(tvb, curr_offset);
1167 oct <<= 8;
1168 oct |= tvb_get_uint8(tvb, curr_offset+1);
1169 curr_len -= 2;
1170 oct <<= 8;
1172 proto_tree_add_uint_format(tree, hf_gsm_a_gm_nsapi, tvb, curr_offset, 2, (oct>>12)&0xff, "NSAPI %d: 0x%02x (%u)", oct>>20, (oct>>12)&0xff, (oct>>12)&0xff);
1173 curr_offset += 2;
1175 if (curr_len > 2)
1177 oct |= tvb_get_uint8(tvb, curr_offset+2);
1178 curr_len--;
1179 oct <<= 12;
1181 proto_tree_add_uint_format(tree, hf_gsm_a_gm_nsapi, tvb, curr_offset-1, 2, (oct>>12)&0xff, "NSAPI %d: 0x%02x (%u)", oct>>20, (oct>>12)&0xff, (oct>>12)&0xff);
1182 curr_offset++;
1185 } while (curr_len > 1);
1187 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_gm_extraneous_data);
1189 return (curr_offset - offset);
1193 * [9] 10.5.5.12 MS network capability
1195 static const true_false_string gsm_a_gmm_net_cap_gea_vals = {
1196 "Encryption algorithm available",
1197 "Encryption algorithm not available"
1200 static const true_false_string gsm_a_gmm_net_cap_smdch_vals = {
1201 "Mobile station supports mobile terminated point to point SMS via dedicated signalling channels",
1202 "Mobile station does not support mobile terminated point to point SMS via dedicated signalling channels"
1205 static const true_false_string gsm_a_gmm_net_cap_smgprs_vals = {
1206 "Mobile station supports mobile terminated point to point SMS via GPRS packet data channels",
1207 "Mobile station does not support mobile terminated point to point SMS via GPRS packet data channels"
1210 static const true_false_string gsm_a_gmm_net_cap_ucs2_vals = {
1211 "The ME has no preference between the use of the default alphabet and the use of UCS2",
1212 "The ME has a preference for the default alphabet (defined in 3GPP TS 23.038 [8b]) over UCS2"
1215 static const value_string gsm_a_gmm_net_cap_ss_scr_ind_vals[]={
1216 { 0x00, "Default value of phase 1" },
1217 { 0x01, "capability of handling of ellipsis notation and phase 2 error handling" },
1218 { 0x02, "For future use, interpreted as Capability of handling of ellipsis notation and phase 2 error handling" },
1219 { 0x03, "For future use, interpreted as Capability of handling of ellipsis notation and phase 2 error handling" },
1220 { 0x00, NULL }
1223 static const true_false_string gsm_a_gmm_net_cap_solsa_vals = {
1224 "The ME supports SoLSA",
1225 "The ME does not support SoLSA"
1228 static const true_false_string gsm_a_gmm_net_cap_rev_vals = {
1229 "Used by a mobile station supporting R99 or later versions of the protocol",
1230 "Used by a mobile station not supporting R99 or later versions of the protocol"
1233 static const true_false_string gsm_a_gmm_net_cap_pfc_vals = {
1234 "Mobile station does support BSS packet flow procedures",
1235 "Mobile station does not support BSS packet flow procedures"
1238 static const true_false_string gsm_a_gmm_net_cap_lcs_vals = {
1239 "LCS value added location request notification capability supported",
1240 "LCS value added location request notification capability not supported"
1243 static const true_false_string gsm_a_gmm_net_cap_ps_irat_iu_vals = {
1244 "PS inter-RAT HO to UTRAN Iu mode supported",
1245 "PS inter-RAT HO to UTRAN Iu mode not supported"
1248 static const true_false_string gsm_a_gmm_net_cap_ps_irat_s1_vals = {
1249 "PS inter-RAT HO to E-UTRAN S1 mode supported",
1250 "PS inter-RAT HO to E-UTRAN S1 mode not supported"
1253 static const true_false_string gsm_a_gmm_net_cap_comb_proc_vals = {
1254 "Mobile station supports EMM combined procedures",
1255 "Mobile station does not support EMM combined procedures"
1258 static const true_false_string gsm_a_gmm_net_cap_isr_vals = {
1259 "The mobile station supports ISR",
1260 "The mobile station does not support ISR"
1263 static const true_false_string gsm_a_gmm_net_cap_srvcc_to_geran_vals = {
1264 "SRVCC from UTRAN HSPA or E-UTRAN to GERAN/UTRAN supported",
1265 "SRVCC from UTRAN HSPA or E-UTRAN to GERAN/UTRAN not supported"
1268 static const true_false_string gsm_a_gmm_net_cap_epc_vals = {
1269 "EPC supported",
1270 "EPC not supported"
1273 static const true_false_string gsm_a_gmm_net_cap_nf_vals = {
1274 "Mobile station supports the notification procedure",
1275 "Mobile station does not support the notification procedure"
1278 static const true_false_string gsm_a_gmm_net_geran_net_vals = {
1279 "Mobile station supports GERAN network sharing",
1280 "Mobile station does not support GERAN network sharing"
1283 static const true_false_string gsm_a_gmm_net_cap_gia_vals = {
1284 "Integrity algorithm available",
1285 "Integrity algorithm not available"
1288 static const true_false_string gsm_a_gmm_net_cap_epco_ie_ind_vals = {
1289 "Used by a mobile station supporting extended protocol configuration options IE",
1290 "Used by a mobile station not supporting extended protocol configuration options IE"
1293 static const true_false_string gsm_a_gmm_net_cap_restrict_use_enh_cov_vals = {
1294 "Mobile station supports restriction on use of enhanced coverage",
1295 "Mobile station does not support restriction on use of enhanced coverage"
1298 static const true_false_string gsm_a_gmm_net_cap_dc_eutra_nr_cap_vals = {
1299 "Mobile station supports dual connectivity of E-UTRA with NR",
1300 "Mobile station does not support dual connectivity of E-UTRA with NR"
1303 uint16_t
1304 de_gmm_ms_net_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
1306 uint32_t curr_offset;
1307 proto_tree *subtree;
1308 proto_item *item;
1310 curr_offset = offset;
1312 /* bit 8: GEA1 */
1313 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_gea1, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1315 /* bit 7: SM capabilities via dedicated channels */
1316 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_smdch, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1318 /* bit 6: SM capabilities via GPRS channels */
1319 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_smgprs, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1321 /* bit 5: UCS2 support */
1322 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_ucs2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1324 /* bits 4 3: SS Screening Indicator */
1325 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_ss_scr_ind, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1327 /* bit 2: SoLSA Capability */
1328 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_solsa, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1330 /* bit 1 */
1331 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_rev, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1333 curr_offset++;
1334 NO_MORE_DATA_CHECK(len);
1336 /* bit 8: PFC feature mode */
1337 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_pfc, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1339 /* bits 7 6 5 4 3 2: Extended GEA bits */
1340 item = proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_ext_gea_bits, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1341 subtree = proto_item_add_subtree(item, ett_gmm_network_cap);
1342 proto_tree_add_item(subtree, hf_gsm_a_gmm_net_cap_gea2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1343 proto_tree_add_item(subtree, hf_gsm_a_gmm_net_cap_gea3, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1344 proto_tree_add_item(subtree, hf_gsm_a_gmm_net_cap_gea4, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1345 proto_tree_add_item(subtree, hf_gsm_a_gmm_net_cap_gea5, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1346 proto_tree_add_item(subtree, hf_gsm_a_gmm_net_cap_gea6, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1347 proto_tree_add_item(subtree, hf_gsm_a_gmm_net_cap_gea7, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1349 /* bit 1: LCS VA capability */
1350 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_lcs, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1352 curr_offset++;
1353 NO_MORE_DATA_CHECK(len);
1355 /* bit 8: PS inter-RAT HO from GERAN to UTRAN Iu mode capability */
1356 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_ps_irat_iu, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1358 /* bit 7: PS inter-RAT HO from GERAN to E-UTRAN S1 mode capability */
1359 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_ps_irat_s1, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1361 /* bit 6: EMM Combined procedures capability */
1362 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_comb_proc, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1364 /* bit 5: ISR support */
1365 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_isr, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1367 /* bit 4: SRVCC to GERAN/UTRAN capability */
1368 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_srvcc_to_geran, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1370 /* bit 3: EPC capability */
1371 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_epc, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1373 /* bit 2: NF capability */
1374 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_nf, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1376 /* bits 1: GERAN network sharing capability */
1377 proto_tree_add_item(tree, hf_gsm_a_gmm_net_geran_net_sharing, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1379 curr_offset++;
1380 NO_MORE_DATA_CHECK(len);
1382 /* bit 8: User plane integrity protection support */
1383 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_up_int_prot, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1385 /* bit 7: GIA/4 */
1386 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_up_gia4, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1388 /* bit 6: GIA/5 */
1389 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_up_gia5, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1391 /* bit 5: GIA/6 */
1392 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_up_gia6, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1394 /* bit 4: GIA/7 */
1395 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_up_gia7, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1397 /* bit 3: ePCO IE indicator */
1398 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_epco_ie_ind, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1400 /* bit 2: Restriction on use of enhanced coverage capability */
1401 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_restrict_use_enh_cov, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1403 /* bit 1: Dual connectivity of E-UTRA with NR capability */
1404 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_dc_eutra_nr_cap, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1406 curr_offset++;
1407 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_gm_extraneous_data);
1409 return (curr_offset - offset);
1413 * [7] 10.5.5.12a
1415 #define GET_DATA /* check if we have enough bits left */ \
1416 if (curr_bits_length < bits_needed) \
1417 continue; \
1418 /* check if oct has enough bits */ \
1419 if (bits_in_oct < bits_needed) \
1421 uint32_t tmp_oct; \
1422 if (curr_len == 0) \
1424 proto_tree_add_expert(tf_tree, pinfo, &ei_gsm_a_gm_not_enough_data, tvb, curr_offset, 1); \
1426 tmp_oct = tvb_get_uint8(tvb, curr_offset); \
1427 oct |= tmp_oct<<(32-8-bits_in_oct); \
1428 curr_len--; \
1429 curr_offset++; \
1430 if (bits_in_oct != 0) \
1431 add_octets = 1; \
1432 else \
1433 add_octets = 0; \
1434 bits_in_oct += 8; \
1436 else \
1437 add_octets = 0;
1439 /* Access Technology Type */
1441 static const value_string gsm_a_gm_acc_tech_type_vals[] = {
1442 { 0x00, "GSM P" },
1443 { 0x01, "GSM E --note that GSM E covers GSM P" },
1444 { 0x02, "GSM R --note that GSM R covers GSM E and GSM P" },
1445 { 0x03, "GSM 1800" },
1446 { 0x04, "GSM 1900" },
1447 { 0x05, "GSM 450" },
1448 { 0x06, "GSM 480" },
1449 { 0x07, "GSM 850" },
1450 { 0x08, "GSM 750" },
1451 { 0x09, "GSM T 380" },
1452 { 0x0a, "GSM T 410" },
1453 { 0x0b, "GSM T 900" },
1454 { 0x0c, "GSM 710" },
1455 { 0x0d, "GSM T 810" },
1456 { 0x0f, "Indicates the presence of a list of Additional access technologies" },
1457 { 0, NULL }
1460 static const true_false_string gsm_a_gm_vgcs = {
1461 "VGCS capability and notifications wanted",
1462 "no VGCS capability or no notifications wanted"
1465 static const true_false_string gsm_a_gm_vbs = {
1466 "VBS capability and notifications wanted",
1467 "no VBS capability or no notifications wanted"
1470 static const value_string gsm_a_gm_multi_slot_vals[] = {
1471 { 0x00, "Not specified" },
1472 { 0x01, "Max Rx-Slot/TDMA:1 Max Tx-Slot/TDMA:1 Max-Sum-Slot/TDMA:2 Tta:3 Ttb:2 Tra:4 Trb:2 Type:1" },
1473 { 0x02, "Max Rx-Slot/TDMA:2 Max Tx-Slot/TDMA:1 Max-Sum-Slot/TDMA:3 Tta:3 Ttb:2 Tra:3 Trb:1 Type:1" },
1474 { 0x03, "Max Rx-Slot/TDMA:2 Max Tx-Slot/TDMA:2 Max-Sum-Slot/TDMA:3 Tta:3 Ttb:2 Tra:3 Trb:1 Type:1" },
1475 { 0x04, "Max Rx-Slot/TDMA:3 Max Tx-Slot/TDMA:1 Max-Sum-Slot/TDMA:4 Tta:3 Ttb:1 Tra:3 Trb:1 Type:1" },
1476 { 0x05, "Max Rx-Slot/TDMA:2 Max Tx-Slot/TDMA:2 Max-Sum-Slot/TDMA:4 Tta:3 Ttb:1 Tra:3 Trb:1 Type:1" },
1477 { 0x06, "Max Rx-Slot/TDMA:3 Max Tx-Slot/TDMA:2 Max-Sum-Slot/TDMA:4 Tta:3 Ttb:1 Tra:3 Trb:1 Type:1" },
1478 { 0x07, "Max Rx-Slot/TDMA:3 Max Tx-Slot/TDMA:3 Max-Sum-Slot/TDMA:4 Tta:3 Ttb:1 Tra:3 Trb:1 Type:1" },
1479 { 0x08, "Max Rx-Slot/TDMA:4 Max Tx-Slot/TDMA:1 Max-Sum-Slot/TDMA:5 Tta:3 Ttb:1 Tra:2 Trb:1 Type:1" },
1480 { 0x09, "Max Rx-Slot/TDMA:3 Max Tx-Slot/TDMA:2 Max-Sum-Slot/TDMA:5 Tta:3 Ttb:1 Tra:2 Trb:1 Type:1" },
1481 { 0x0a, "Max Rx-Slot/TDMA:4 Max Tx-Slot/TDMA:2 Max-Sum-Slot/TDMA:5 Tta:3 Ttb:1 Tra:2 Trb:1 Type:1" },
1482 { 0x0b, "Max Rx-Slot/TDMA:4 Max Tx-Slot/TDMA:3 Max-Sum-Slot/TDMA:5 Tta:3 Ttb:1 Tra:2 Trb:1 Type:1" },
1483 { 0x0c, "Max Rx-Slot/TDMA:4 Max Tx-Slot/TDMA:4 Max-Sum-Slot/TDMA:5 Tta:2 Ttb:1 Tra:2 Trb:1 Type:1" },
1484 { 0x0d, "Max Rx-Slot/TDMA:3 Max Tx-Slot/TDMA:3 Max-Sum-Slot/TDMA:NA Tta:NA Ttb:a) Tra:3 Trb:a) Type:2 (a: 1 with frequency hopping, 0 otherwise)" },
1485 { 0x0e, "Max Rx-Slot/TDMA:4 Max Tx-Slot/TDMA:4 Max-Sum-Slot/TDMA:NA Tta:NA Ttb:a) Tra:3 Trb:a) Type:2 (a: 1 with frequency hopping, 0 otherwise)" },
1486 { 0x0f, "Max Rx-Slot/TDMA:5 Max Tx-Slot/TDMA:5 Max-Sum-Slot/TDMA:NA Tta:NA Ttb:a) Tra:3 Trb:a) Type:2 (a: 1 with frequency hopping, 0 otherwise)" },
1487 { 0x10, "Max Rx-Slot/TDMA:6 Max Tx-Slot/TDMA:6 Max-Sum-Slot/TDMA:NA Tta:NA Ttb:a) Tra:2 Trb:a) Type:2 (a: 1 with frequency hopping, 0 otherwise)" },
1488 { 0x11, "Max Rx-Slot/TDMA:7 Max Tx-Slot/TDMA:7 Max-Sum-Slot/TDMA:NA Tta:NA Ttb:a) Tra:1 Trb:0 Type:2 (a: 1 with frequency hopping, 0 otherwise)" },
1489 { 0x12, "Max Rx-Slot/TDMA:8 Max Tx-Slot/TDMA:8 Max-Sum-Slot/TDMA:NA Tta:NA Ttb:0 Tra:0 Trb:0 Type:2" },
1490 { 0x13, "Max Rx-Slot/TDMA:6 Max Tx-Slot/TDMA:2 Max-Sum-Slot/TDMA:NA Tta:3 Ttb:b) Tra:2 Trb:c) Type:1 (b: 1 with frequency hopping or change from Rx to Tx, 0 otherwise; c: 1 with frequency hopping or change from Tx to Rx, 0 otherwise" },
1491 { 0x14, "Max Rx-Slot/TDMA:6 Max Tx-Slot/TDMA:3 Max-Sum-Slot/TDMA:NA Tta:3 Ttb:b) Tra:2 Trb:c) Type:1 (b: 1 with frequency hopping or change from Rx to Tx, 0 otherwise; c: 1 with frequency hopping or change from Tx to Rx, 0 otherwise" },
1492 { 0x15, "Max Rx-Slot/TDMA:6 Max Tx-Slot/TDMA:4 Max-Sum-Slot/TDMA:NA Tta:3 Ttb:b) Tra:2 Trb:c) Type:1 (b: 1 with frequency hopping or change from Rx to Tx, 0 otherwise; c: 1 with frequency hopping or change from Tx to Rx, 0 otherwise" },
1493 { 0x16, "Max Rx-Slot/TDMA:6 Max Tx-Slot/TDMA:4 Max-Sum-Slot/TDMA:NA Tta:3 Ttb:b) Tra:2 Trb:c) Type:1 (b: 1 with frequency hopping or change from Rx to Tx, 0 otherwise; c: 1 with frequency hopping or change from Tx to Rx, 0 otherwise" },
1494 { 0x17, "Max Rx-Slot/TDMA:6 Max Tx-Slot/TDMA:6 Max-Sum-Slot/TDMA:NA Tta:3 Ttb:b) Tra:2 Trb:c) Type:1 (b: 1 with frequency hopping or change from Rx to Tx, 0 otherwise; c: 1 with frequency hopping or change from Tx to Rx, 0 otherwise" },
1495 { 0x18, "Max Rx-Slot/TDMA:8 Max Tx-Slot/TDMA:2 Max-Sum-Slot/TDMA:NA Tta:3 Ttb:b) Tra:2 Trb:c) Type:1 (b: 1 with frequency hopping or change from Rx to Tx, 0 otherwise; c: 1 with frequency hopping or change from Tx to Rx, 0 otherwise" },
1496 { 0x19, "Max Rx-Slot/TDMA:8 Max Tx-Slot/TDMA:3 Max-Sum-Slot/TDMA:NA Tta:3 Ttb:b) Tra:2 Trb:c) Type:1 (b: 1 with frequency hopping or change from Rx to Tx, 0 otherwise; c: 1 with frequency hopping or change from Tx to Rx, 0 otherwise" },
1497 { 0x1a, "Max Rx-Slot/TDMA:8 Max Tx-Slot/TDMA:4 Max-Sum-Slot/TDMA:NA Tta:3 Ttb:b) Tra:2 Trb:c) Type:1 (b: 1 with frequency hopping or change from Rx to Tx, 0 otherwise; c: 1 with frequency hopping or change from Tx to Rx, 0 otherwise" },
1498 { 0x1b, "Max Rx-Slot/TDMA:8 Max Tx-Slot/TDMA:4 Max-Sum-Slot/TDMA:NA Tta:3 Ttb:b) Tra:2 Trb:c) Type:1 (b: 1 with frequency hopping or change from Rx to Tx, 0 otherwise; c: 1 with frequency hopping or change from Tx to Rx, 0 otherwise" },
1499 { 0x1c, "Max Rx-Slot/TDMA:8 Max Tx-Slot/TDMA:6 Max-Sum-Slot/TDMA:NA Tta:3 Ttb:b) Tra:2 Trb:c) Type:1 (b: 1 with frequency hopping or change from Rx to Tx, 0 otherwise; c: 1 with frequency hopping or change from Tx to Rx, 0 otherwise" },
1500 { 0x1d, "Max Rx-Slot/TDMA:8 Max Tx-Slot/TDMA:8 Max-Sum-Slot/TDMA:NA Tta:3 Ttb:b) Tra:2 Trb:c) Type:1 (b: 1 with frequency hopping or change from Rx to Tx, 0 otherwise; c: 1 with frequency hopping or change from Tx to Rx, 0 otherwise" },
1501 { 0x1e, "Max Rx-Slot/TDMA:5 Max Tx-Slot/TDMA:1 Max-Sum-Slot/TDMA:6 Tta:2 Ttb:1 Tra:1 Trb:1 Type:1" },
1502 { 0x1f, "Max Rx-Slot/TDMA:5 Max Tx-Slot/TDMA:2 Max-Sum-Slot/TDMA:6 Tta:2 Ttb:1 Tra:1 Trb:1 Type:1" },
1503 { 0x20, "Max Rx-Slot/TDMA:5 Max Tx-Slot/TDMA:3 Max-Sum-Slot/TDMA:6 Tta:2 Ttb:1 Tra:1 Trb:1 Type:1" },
1504 { 0x21, "Max Rx-Slot/TDMA:5 Max Tx-Slot/TDMA:4 Max-Sum-Slot/TDMA:6 Tta:2 Ttb:1 Tra:1 Trb:1 Type:1" },
1505 { 0x22, "Max Rx-Slot/TDMA:5 Max Tx-Slot/TDMA:5 Max-Sum-Slot/TDMA:6 Tta:2 Ttb:1 Tra:1 Trb:1 Type:1" },
1506 { 0x23, "Max Rx-Slot/TDMA:5 Max Tx-Slot/TDMA:1 Max-Sum-Slot/TDMA:6 Tta:2 Ttb:1 Tra:1+to Trb:1 Type:1 (to: to = 31 symbol periods (this can be provided by a TA offset, i.e. a minimum TA value))" },
1507 { 0x24, "Max Rx-Slot/TDMA:5 Max Tx-Slot/TDMA:2 Max-Sum-Slot/TDMA:6 Tta:2 Ttb:1 Tra:1+to Trb:1 Type:1 (to: to = 31 symbol periods (this can be provided by a TA offset, i.e. a minimum TA value))" },
1508 { 0x25, "Max Rx-Slot/TDMA:5 Max Tx-Slot/TDMA:3 Max-Sum-Slot/TDMA:6 Tta:2 Ttb:1 Tra:1+to Trb:1 Type:1 (to: to = 31 symbol periods (this can be provided by a TA offset, i.e. a minimum TA value))" },
1509 { 0x26, "Max Rx-Slot/TDMA:5 Max Tx-Slot/TDMA:4 Max-Sum-Slot/TDMA:6 Tta:2 Ttb:1 Tra:1+to Trb:1 Type:1 (to: to = 31 symbol periods (this can be provided by a TA offset, i.e. a minimum TA value))" },
1510 { 0x27, "Max Rx-Slot/TDMA:5 Max Tx-Slot/TDMA:5 Max-Sum-Slot/TDMA:6 Tta:2 Ttb:1 Tra:1+to Trb:1 Type:1 (to: to = 31 symbol periods (this can be provided by a TA offset, i.e. a minimum TA value))" },
1511 { 0x28, "Max Rx-Slot/TDMA:6 Max Tx-Slot/TDMA:1 Max-Sum-Slot/TDMA:7 Tta:1 Ttb:1 Tra:1 Trb:to Type:1 (to: to = 31 symbol periods (this can be provided by a TA offset, i.e. a minimum TA value))" },
1512 { 0x29, "Max Rx-Slot/TDMA:6 Max Tx-Slot/TDMA:2 Max-Sum-Slot/TDMA:7 Tta:1 Ttb:1 Tra:1 Trb:to Type:1 (to: to = 31 symbol periods (this can be provided by a TA offset, i.e. a minimum TA value))" },
1513 { 0x2a, "Max Rx-Slot/TDMA:6 Max Tx-Slot/TDMA:3 Max-Sum-Slot/TDMA:7 Tta:1 Ttb:1 Tra:1 Trb:to Type:1 (to: to = 31 symbol periods (this can be provided by a TA offset, i.e. a minimum TA value))" },
1514 { 0x2b, "Max Rx-Slot/TDMA:6 Max Tx-Slot/TDMA:4 Max-Sum-Slot/TDMA:7 Tta:1 Ttb:1 Tra:1 Trb:to Type:1 (to: to = 31 symbol periods (this can be provided by a TA offset, i.e. a minimum TA value))" },
1515 { 0x2c, "Max Rx-Slot/TDMA:6 Max Tx-Slot/TDMA:5 Max-Sum-Slot/TDMA:7 Tta:1 Ttb:1 Tra:1 Trb:to Type:1 (to: to = 31 symbol periods (this can be provided by a TA offset, i.e. a minimum TA value))" },
1516 { 0x2d, "Max Rx-Slot/TDMA:6 Max Tx-Slot/TDMA:6 Max-Sum-Slot/TDMA:7 Tta:1 Ttb:1 Tra:1 Trb:to Type:1 (to: to = 31 symbol periods (this can be provided by a TA offset, i.e. a minimum TA value))" },
1517 { 0, NULL }
1520 static const value_string gsm_a_gm_dtm_gprs_multi_slot_class_vals[] = {
1521 { 0x00, "Unused. If received, the network shall interpret this as Multislot class 5" },
1522 { 0x01, "Multislot class 5 supported" },
1523 { 0x02, "Multislot class 9 supported" },
1524 { 0x03, "Multislot class 11 supported" },
1525 { 0, NULL }
1528 static const true_false_string gsm_a_gm_revision_level_indicator = {
1529 "The ME is Release '99 onwards",
1530 "The ME is Release '98 or older"
1533 static const value_string gsm_a_gm_down_adv_rec_perf_vals[] = {
1534 { 0x00, "Downlink Advanced Receiver Performance not supported" },
1535 { 0x01, "Downlink Advanced Receiver Performance - phase I supported" },
1536 { 0x02, "Downlink Advanced Receiver Performance - phase II supported" },
1537 { 0, NULL }
1540 static const true_false_string gsm_a_gm_dtm_enh_cap = {
1541 "The mobile station supports enhanced DTM CS establishment and enhanced DTM CS release procedures",
1542 "The mobile station does not support enhanced DTM CS establishment and enhanced DTM CS release procedures"
1545 static const value_string gsm_a_gm_dtm_gprs_high_multi_slot_class_vals[] = {
1546 { 0x00, "Unused. If received, the network shall interpret this as 'Multislot class 31 or 36 supported'" },
1547 { 0x01, "Multislot class 31 or 36 supported" },
1548 { 0x02, "Multislot class 32 or 37 supported" },
1549 { 0x03, "Multislot class 33 or 38 supported" },
1550 { 0x04, "Multislot class 41 supported" },
1551 { 0x05, "Multislot class 42 supported" },
1552 { 0x06, "Multislot class 43 supported" },
1553 { 0x07, "Multislot class 44 supported" },
1554 { 0, NULL }
1557 static const value_string gsm_a_gm_multi_slot_cap_red_down_dual_carrier_vals[] = {
1558 { 0x00, "No reduction" },
1559 { 0x01, "The MS supports 1 timeslot fewer than the maximum number of receive timeslots" },
1560 { 0x02, "The MS supports 2 timeslots fewer than the maximum number of receive timeslots" },
1561 { 0x03, "The MS supports 3 timeslots fewer than the maximum number of receive timeslots" },
1562 { 0x04, "The MS supports 4 timeslots fewer than the maximum number of receive timeslots" },
1563 { 0x05, "The MS supports 5 timeslots fewer than the maximum number of receive timeslots" },
1564 { 0x06, "The MS supports 6 timeslots fewer than the maximum number of receive timeslots" },
1565 { 0x07, "Reserved for future use" },
1566 { 0, NULL }
1569 static const value_string gsm_a_gm_ul_egprs2_vals[] = {
1570 { 0x00, "The mobile station does not support either EGPRS2-A or EGPRS2-B in the uplink" },
1571 { 0x01, "The mobile station supports EGPRS2-A in the uplink" },
1572 { 0x02, "The mobile station supports both EGPRS2-A and EGPRS2-B in the uplink" },
1573 { 0x03, "The mobile station supports both EGPRS2-A and EGPRS2-B in the uplink" },
1574 { 0, NULL }
1577 static const value_string gsm_a_gm_dl_egprs2_vals[] = {
1578 { 0x00, "The mobile station does not support either EGPRS2-A or EGPRS2-B in the downlink" },
1579 { 0x01, "The mobile station supports EGPRS2-A in the downlink" },
1580 { 0x02, "The mobile station supports both EGPRS2-A and EGPRS2-B in the downlink" },
1581 { 0x03, "The mobile station supports both EGPRS2-A and EGPRS2-B in the downlink" },
1582 { 0, NULL }
1585 static const value_string gsm_a_gm_geran_to_eutra_support_in_geran_ptm_vals[] = {
1586 { 0x00, "None" },
1587 { 0x01, "E-UTRAN neighbour cell measurements and MS autonomous cell reselection to E-UTRAN supported" },
1588 { 0x02, "E-UTRAN neighbour cell meas and report, MS autonomous cell resel, CCN and network controlled cell reselection to E-UTRAN" },
1589 { 0x03, "E-UTRAN neighbour cell meas and report, MS autonomous cell resel, CCN, network controlled cell reselection and PS Handover to E-UTRAN" },
1590 { 0, NULL }
1593 static const value_string gsm_a_gm_alt_efta_multi_slot_class_vals[] = {
1594 { 0x00, "No Alternative EFTA multislot class is indicated. Use (DTM) EGPRS (high) multislot class only" },
1595 { 0x01, "Alternative EFTA multislot class 1" },
1596 { 0x02, "Alternative EFTA multislot class 2" },
1597 { 0x03, "Alternative EFTA multislot class 3" },
1598 { 0x04, "Unused" },
1599 { 0x05, "Unused" },
1600 { 0x06, "Unused" },
1601 { 0x07, "Unused" },
1602 { 0x08, "Unused" },
1603 { 0x09, "Unused" },
1604 { 0x0a, "Unused" },
1605 { 0x0b, "Unused" },
1606 { 0x0c, "Unused" },
1607 { 0x0d, "Unused" },
1608 { 0x0e, "Unused" },
1609 { 0x0f, "Unused" },
1610 { 0, NULL }
1613 static const value_string gsm_a_gm_dlmc_non_contig_intra_band_recep_vals[] = {
1614 { 0x00, "Not supported" },
1615 { 0x01, "Supported in band E-GSM or GSM850" },
1616 { 0x02, "Supported in band DCS1800 or PCS1900" },
1617 { 0x03, "Supported in band E-GSM, or GSM850, or DCS1800 or PCS1900" },
1618 { 0, NULL }
1621 static const true_false_string gsm_a_gm_dlmc_inter_band_recep_val = {
1622 "Supported in band combination (E-GSM, DCS1800), or band combination (GSM850, PCS1900)",
1623 "Not supported"
1626 static const value_string gsm_a_gm_dlmc_max_bandwidth_vals[] = {
1627 { 0x00, "5 MHz" },
1628 { 0x01, "10 MHz" },
1629 { 0x02, "15 MHz" },
1630 { 0x03, "20 MHz" },
1631 { 0, NULL }
1634 static void
1635 gsm_a_gm_dlmc_max_nb_dl_ts_fmt(char *s, uint32_t v)
1637 if (v < 0x3E)
1638 snprintf(s, ITEM_LABEL_LENGTH, "%u TS supported (%u)",
1639 2*v + 6, v);
1640 else
1641 snprintf(s, ITEM_LABEL_LENGTH, "Reserved (%u)", v);
1644 static const value_string gsm_a_gm_dlmc_max_nb_dl_carriers_vals[] = {
1645 { 0x00, "2 carriers supported" },
1646 { 0x01, "4 carriers supported" },
1647 { 0x02, "6 carriers supported" },
1648 { 0x03, "8 carriers supported" },
1649 { 0x04, "10 carriers supported" },
1650 { 0x05, "12 carriers supported" },
1651 { 0x06, "14 carriers supported" },
1652 { 0x07, "16 carriers supported" },
1653 { 0, NULL }
1656 static const value_string gsm_a_gm_8psk_power_class_vals[] = {
1657 {0x00, "8PSK modulation not supported for uplink" },
1658 {0x01, "Power class E1"},
1659 {0x02, "Power class E2"},
1660 {0x03, "Power class E3"},
1661 {0, NULL},
1665 static const value_string gsm_a_gm_8psk_power_cap_vals[] = {
1666 {0x00, "Reserved" },
1667 {0x01, "Power class E1"},
1668 {0x02, "Power class E2"},
1669 {0x03, "Power class E3"},
1670 {0, NULL},
1673 static const value_string gsm_a_gm_extended_dtm_gprs_multi_slot_class_vals[] = {
1674 {0x00, "Unused. If received, it shall be interpreted as Multislot class 5 supported" },
1675 {0x01, "Unused. If received, it shall be interpreted as Multislot class 5 supported"},
1676 {0x02, "Unused. If received, it shall be interpreted as Multislot class 5 supported"},
1677 {0x03, "Unused. If received, it shall be interpreted as Multislot class 5 supported"},
1678 {0x10, "Multislot class 5 supported"},
1679 {0x11, "Multislot class 6 supported"},
1680 {0x12, "Unused. If received, it shall be interpreted as Multislot class 5 supported"},
1681 {0x13, "Unused. If received, it shall be interpreted as Multislot class 5 supported"},
1682 {0x20, "Multislot class 9 supported"},
1683 {0x21, "Multislot class 10 supported"},
1684 {0x22, "Unused. If received, it shall be interpreted as Multislot class 9 supported"},
1685 {0x23, "Unused. If received, it shall be interpreted as Multislot class 9 supported"},
1686 {0x30, "Multislot class 11 supported"},
1687 {0x31, "Unused. If received, it shall be interpreted as Multislot class 11 supported"},
1688 {0x32, "Unused. If received, it shall be interpreted as Multislot class 11 supported"},
1689 {0x33, "Unused. If received, it shall be interpreted as Multislot class 11 supported"},
1690 {0, NULL}
1693 static const value_string gsm_a_gm_gmsk_multislot_power_profile_vals[] = {
1694 {0x00, "GMSK_MULTISLOT_POWER_PROFILE 0" },
1695 {0x01, "GMSK_MULTISLOT_POWER_PROFILE 1"},
1696 {0x02, "GMSK_MULTISLOT_POWER_PROFILE 2"},
1697 {0x03, "GMSK_MULTISLOT_POWER_PROFILE 3"},
1698 {0, NULL}
1701 static const value_string gsm_a_gm_8psk_multislot_power_profile_vals[] = {
1702 {0x00, "8-PSK_MULTISLOT_POWER_PROFILE 0" },
1703 {0x01, "8-PSK_MULTISLOT_POWER_PROFILE 1"},
1704 {0x02, "8-PSK_MULTISLOT_POWER_PROFILE 2"},
1705 {0x03, "8-PSK_MULTISLOT_POWER_PROFILE 3"},
1706 {0, NULL}
1709 static const value_string gsm_a_gm_ec_pch_mon_support_vals[] = {
1710 {0x00, "PCH supported"},
1711 {0x01, "EC-PCH supported"},
1712 {0x02, "PCH and EC-PCH supported"},
1713 {0x03, "Reserved"},
1714 {0, NULL}
1717 uint16_t
1718 de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
1720 uint32_t curr_offset;
1721 unsigned curr_len;
1722 int bit_offset;
1723 proto_item *tf = NULL, *mc_item = NULL, *ti;
1724 proto_tree *tf_tree = NULL, *mc_tree = NULL;
1725 uint32_t oct;
1726 unsigned char bits_in_oct;
1727 unsigned char bits_needed;
1728 unsigned bits_length;
1729 unsigned add_octets; /* octets which are covered by one element -1 */
1730 unsigned curr_bits_length;
1731 unsigned char acc_type;
1732 unsigned value;
1733 const char *str;
1734 unsigned indx = 0;
1736 unsigned char dtm_gprs_mslot = 0;
1737 unsigned char dtm_egprs_mslot = 4;
1738 bool finished = true;
1740 curr_len = len;
1741 curr_offset = offset;
1742 bit_offset = offset<<3;
1744 bits_in_oct = 0;
1745 oct = 0;
1750 /* check for a new round */
1751 if ((curr_len*8 + bits_in_oct) < 11)
1752 break;
1754 /* now read the first 11 bits */
1755 curr_bits_length = 11;
1759 if (curr_len != len)
1761 bits_needed = 1;
1762 GET_DATA;
1764 if ((oct>>(32-bits_needed)) != 1)
1766 break;
1768 oct <<= bits_needed;
1769 bits_in_oct -= bits_needed;
1770 bit_offset++;
1772 if ((curr_len*8 + bits_in_oct) < 11)
1773 break;
1774 curr_bits_length = 11;
1777 indx++;
1778 tf_tree = proto_tree_add_subtree_format(tree,
1779 tvb, curr_offset, 1,
1780 ett_gmm_radio_cap, &tf, "MS RA capability %d", indx);
1783 * Access Technology
1785 bits_needed = 4;
1786 GET_DATA;
1788 acc_type = oct>>(32-bits_needed);
1790 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_acc_tech_type, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
1791 bit_offset += 4;
1793 curr_bits_length -= bits_needed;
1794 oct <<= bits_needed;
1795 bits_in_oct -= bits_needed;
1797 /* < Access capabilities struct > ::= */
1799 * get bits_length
1801 bits_needed = 7;
1802 GET_DATA;
1804 bits_length = curr_bits_length = oct>>(32-bits_needed);
1806 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_acc_cap_struct_len, tvb, bit_offset, 7, ENC_BIG_ENDIAN);
1807 proto_item_set_len(tf, (bits_length>>3)+1);
1808 /* This is already done - length doesn't contain this field
1809 curr_bits_length -= bits_needed;
1811 bit_offset += 7;
1812 oct <<= bits_needed;
1813 bits_in_oct -= bits_needed;
1815 if (acc_type == 0x0f)
1820 * Additional access technologies:
1822 finished = true; /* Break out of the loop unless proven unfinished */
1825 * Presence bit
1827 bits_needed = 1;
1828 GET_DATA;
1830 /* analyse bits */
1831 switch (oct>>(32-bits_needed))
1833 case 0x00: str = "Not Present"; finished = true; break;
1834 case 0x01: str = "Present"; finished = false; break;
1835 default: str = "This should not happen";
1838 proto_tree_add_uint_format_value(tf_tree, hf_gsm_a_gm_presence, tvb, curr_offset-1-add_octets, 1+add_octets, oct>>(32-bits_needed), "%s (%u)", str, oct>>(32-bits_needed));
1839 bit_offset++;
1840 curr_bits_length -= bits_needed;
1841 oct <<= bits_needed;
1842 bits_in_oct -= bits_needed;
1844 if (finished)
1847 * No more valid data, get spare bits if any
1849 while (curr_bits_length > 0)
1851 if (curr_bits_length > 8)
1852 bits_needed = 8;
1853 else
1854 bits_needed = curr_bits_length;
1855 GET_DATA;
1856 curr_bits_length -= bits_needed;
1857 oct <<= bits_needed;
1858 bits_in_oct -= bits_needed;
1859 bit_offset += bits_needed;
1861 continue;
1865 * Access Technology
1867 bits_needed = 4;
1868 GET_DATA;
1870 acc_type = oct>>(32-bits_needed);
1872 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_acc_tech_type, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
1873 bit_offset += 4;
1875 curr_bits_length -= bits_needed;
1876 oct <<= bits_needed;
1877 bits_in_oct -= bits_needed;
1880 * RF Power
1882 bits_needed = 3;
1883 GET_DATA;
1885 value = tvb_get_bits8(tvb, bit_offset, 3);
1886 /* analyse bits */
1887 if (acc_type == 0x04) /* GSM 1900 */
1889 switch (value)
1891 case 0x01: str = "1 W (30 dBm)"; break;
1892 case 0x02: str = "0,25 W (24 dBm)"; break;
1893 case 0x03: str = "2 W (33 dBm)"; break;
1894 default: str = "Not specified";
1897 else if (acc_type == 0x03)
1900 * 3 GSM 1800
1902 switch (value)
1904 case 0x01: str = "1 W (30 dBm)"; break;
1905 case 0x02: str = "0,25 W (24 dBm)"; break;
1906 case 0x03: str = "4 W (36 dBm)"; break;
1907 default: str = "Not specified";
1910 else if (acc_type <= 0x08)
1912 /* 0 GSM P
1913 * 1 GSM E
1914 * 2 GSM R
1915 * 5 GSM 450
1916 * 6 GSM 480
1917 * 7 GSM 850
1920 switch (value)
1922 case 0x02: str = "8 W (39 dBm)"; break;
1923 case 0x03: str = "5 W (37 dBm)"; break;
1924 case 0x04: str = "2 W (33 dBm)"; break;
1925 case 0x05: str = "0,8 W (29 dBm)"; break;
1926 default: str = "Not specified";
1929 else
1930 str = "Not specified??";
1932 /* decode_bits_in_field(int bit_offset, int no_of_bits, uint64_t value)*/
1933 proto_tree_add_uint_format(tf_tree, hf_gsm_a_gm_rf_power_capability, tvb, curr_offset-1-add_octets, 1+add_octets, value,
1934 "%s RF Power Capability, GMSK Power Class: %s (%u)", decode_bits_in_field(pinfo->pool, bit_offset, 3, value, ENC_BIG_ENDIAN), str, value);
1935 bit_offset += 3;
1936 curr_bits_length -= bits_needed;
1937 oct <<= bits_needed;
1938 bits_in_oct -= bits_needed;
1941 * 8PSK Power Class
1943 bits_needed = 2;
1944 GET_DATA;
1946 value = tvb_get_bits8(tvb, bit_offset, 2);
1947 /* analyse bits */
1948 proto_tree_add_uint(tf_tree, hf_gsm_a_gm_8psk_power_class, tvb, curr_offset-1-add_octets, 1+add_octets, value);
1949 bit_offset += 2;
1950 curr_bits_length -= bits_needed;
1951 oct <<= bits_needed;
1952 bits_in_oct -= bits_needed;
1954 } while (!finished);
1956 /* goto next one */
1957 continue;
1960 * RF Power
1962 bits_needed = 3;
1963 GET_DATA;
1965 value = tvb_get_bits8(tvb, bit_offset, 3);
1966 /* analyse bits */
1967 if (acc_type == 0x04) /* GSM 1900 */
1969 switch (value)
1971 case 0x01: str = "1 W (30 dBm)"; break;
1972 case 0x02: str = "0,25 W (24 dBm)"; break;
1973 case 0x03: str = "2 W (33 dBm)"; break;
1974 default: str = "Not specified";
1977 else if (acc_type == 0x03)
1979 switch (value)
1981 case 0x01: str = "1 W (30 dBm)"; break;
1982 case 0x02: str = "0,25 W (24 dBm)"; break;
1983 case 0x03: str = "4 W (36 dBm)"; break;
1984 default: str = "Not specified";
1987 else if (acc_type <= 0x08)
1989 switch (value)
1991 case 0x02: str = "8 W (39 dBm)"; break;
1992 case 0x03: str = "5 W (37 dBm)"; break;
1993 case 0x04: str = "2 W (33 dBm)"; break;
1994 case 0x05: str = "0,8 W (29 dBm)"; break;
1995 default: str = "Not specified";
1998 else
1999 str = "Not specified??";
2001 proto_tree_add_uint_format(tf_tree, hf_gsm_a_gm_rf_power_capability, tvb, curr_offset-1-add_octets, 1+add_octets, value,
2002 "%s RF Power Capability, GMSK Power Class: %s (%u)", decode_bits_in_field(pinfo->pool, bit_offset, 3, value, ENC_BIG_ENDIAN), str, value);
2004 bit_offset += 3;
2005 curr_bits_length -= bits_needed;
2006 oct <<= bits_needed;
2007 bits_in_oct -= bits_needed;
2010 * A5 Bits?
2012 bits_needed = 1;
2013 GET_DATA;
2015 /* analyse bits */
2016 if ((oct>>(32-bits_needed)) == 0)
2018 proto_tree_add_uint_format_value(tf_tree, hf_gsm_a_gm_a5_bits, tvb, curr_offset-1-add_octets, 1+add_octets, oct>>(32-bits_needed),
2019 "Same values apply for parameters as in the immediately preceding Access capabilities field within this IE (%u)",
2020 oct>>(32-bits_needed));
2021 bit_offset++;
2022 curr_bits_length -= bits_needed;
2023 oct <<= bits_needed;
2024 bits_in_oct -= bits_needed;
2026 else
2028 int i;
2030 proto_tree_add_uint_format_value(tf_tree, hf_gsm_a_gm_a5_bits, tvb, curr_offset-1-add_octets, 1+add_octets, oct>>(32-bits_needed), "A5 bits follow (%u)", oct>>(32-bits_needed));
2032 bit_offset++;
2033 curr_bits_length -= bits_needed;
2034 oct <<= bits_needed;
2035 bits_in_oct -= bits_needed;
2037 for (i=1; i<=7 ; i++)
2040 * A5 Bits decoding
2042 bits_needed = 1;
2043 GET_DATA;
2045 /* analyse bits */
2046 switch (oct>>(32-bits_needed))
2048 case 0x00: str = "encryption algorithm not available"; break;
2049 case 0x01: str = "encryption algorithm available"; break;
2050 default: str = "This should not happen";
2053 proto_tree_add_uint_format(tf_tree, hf_gsm_a_gm_a5_bits, tvb, curr_offset-1-add_octets, 1+add_octets, oct>>(32-bits_needed), "A5/%d: %s (%u)", i, str, oct>>(32-bits_needed));
2054 bit_offset++;
2055 curr_bits_length -= bits_needed;
2056 oct <<= bits_needed;
2057 bits_in_oct -= bits_needed;
2062 * ES IND
2064 bits_needed = 1;
2065 GET_DATA;
2067 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_ctrled_early_cm_sending, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2068 bit_offset++;
2069 curr_bits_length -= bits_needed;
2070 oct <<= bits_needed;
2071 bits_in_oct -= bits_needed;
2074 * PS
2076 bits_needed = 1;
2077 GET_DATA;
2079 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_pseudo_sync, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2080 bit_offset++;
2081 curr_bits_length -= bits_needed;
2082 oct <<= bits_needed;
2083 bits_in_oct -= bits_needed;
2086 * VGCS
2088 bits_needed = 1;
2089 GET_DATA;
2091 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_vgcs, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2092 bit_offset++;
2093 curr_bits_length -= bits_needed;
2094 oct <<= bits_needed;
2095 bits_in_oct -= bits_needed;
2098 * VBS
2100 bits_needed = 1;
2101 GET_DATA;
2103 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_vbs, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2104 bit_offset++;
2105 curr_bits_length -= bits_needed;
2106 oct <<= bits_needed;
2107 bits_in_oct -= bits_needed;
2110 * Multislot capability?
2112 bits_needed = 1;
2113 GET_DATA;
2115 value = oct>>(32-bits_needed);
2117 mc_item = proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_multislot_capability, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2118 bit_offset++;
2120 curr_bits_length -= bits_needed;
2121 oct <<= bits_needed;
2122 bits_in_oct -= bits_needed;
2124 /* analyse bits */
2125 if (value == 1)
2127 mc_tree = proto_item_add_subtree(mc_item, ett_gsm_a_gm_msrac_multislot_capability);
2129 * HSCSD multislot class?
2131 bits_needed = 1;
2132 GET_DATA;
2134 /* analyse bits */
2135 if ((oct>>(32-bits_needed)) == 0)
2137 proto_tree_add_uint_format_value(mc_tree, hf_gsm_a_gm_rac_hscsd_multi_slot_class, tvb, curr_offset-1-add_octets, 1+add_octets, 0xFF,
2138 "Bits are not available (%u)", oct>>(32-bits_needed));
2139 bit_offset++;
2140 curr_bits_length -= bits_needed;
2141 oct <<= bits_needed;
2142 bits_in_oct -= bits_needed;
2144 else
2146 curr_bits_length -= bits_needed;
2147 oct <<= bits_needed;
2148 bits_in_oct -= bits_needed;
2149 bit_offset++;
2152 * HSCSD multislot class
2154 bits_needed = 5;
2155 GET_DATA;
2157 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_hscsd_multi_slot_class, tvb, bit_offset, 5, ENC_BIG_ENDIAN);
2158 bit_offset += 5;
2159 curr_bits_length -= bits_needed;
2160 oct <<= bits_needed;
2161 bits_in_oct -= bits_needed;
2165 * GPRS multislot class?
2167 bits_needed = 1;
2168 GET_DATA;
2170 /* analyse bits */
2171 if ((oct>>(32-bits_needed)) == 0)
2173 proto_tree_add_uint_format_value(mc_tree, hf_gsm_a_gm_rac_gprs_multi_slot_class, tvb, curr_offset-1-add_octets, 1+add_octets, 0xFF,
2174 "Bits are not available (%u)", oct>>(32-bits_needed));
2175 bit_offset++;
2176 curr_bits_length -= bits_needed;
2177 oct <<= bits_needed;
2178 bits_in_oct -= bits_needed;
2180 else
2182 curr_bits_length -= bits_needed;
2183 oct <<= bits_needed;
2184 bits_in_oct -= bits_needed;
2185 bit_offset++;
2188 * GPRS multislot class
2190 bits_needed = 5;
2191 GET_DATA;
2193 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_gprs_multi_slot_class, tvb, bit_offset, 5, ENC_BIG_ENDIAN);
2194 bit_offset += 5;
2195 curr_bits_length -= bits_needed;
2196 oct <<= bits_needed;
2197 bits_in_oct -= bits_needed;
2200 * GPRS Extended Dynamic Allocation Capability
2202 bits_needed = 1;
2203 GET_DATA;
2205 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_gprs_ext_dyn_alloc_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2206 bit_offset++;
2207 curr_bits_length -= bits_needed;
2208 oct <<= bits_needed;
2209 bits_in_oct -= bits_needed;
2213 * SMS/SM values
2215 bits_needed = 1;
2216 GET_DATA;
2218 /* analyse bits */
2219 if ((oct>>(32-bits_needed)) == 0)
2221 proto_tree_add_uint_format_value(mc_tree, hf_gsm_a_gm_sms_value, tvb, curr_offset-1-add_octets, 1+add_octets, 0xFF,
2222 "Bits are not available (%u)", oct>>(32-bits_needed));
2223 bit_offset++;
2224 curr_bits_length -= bits_needed;
2225 oct <<= bits_needed;
2226 bits_in_oct -= bits_needed;
2228 else
2230 curr_bits_length -= bits_needed;
2231 oct <<= bits_needed;
2232 bits_in_oct -= bits_needed;
2233 bit_offset++;
2236 * Switch-Measure-Switch value
2238 bits_needed = 4;
2239 GET_DATA;
2241 /* analyse bits */
2242 proto_tree_add_bits_item(mc_tree, hf_gsm_a_gm_sms_value, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
2243 bit_offset += 4;
2244 curr_bits_length -= bits_needed;
2245 oct <<= bits_needed;
2246 bits_in_oct -= bits_needed;
2249 * Switch-Measure value
2251 bits_needed = 4;
2252 GET_DATA;
2254 /* analyse bits */
2255 proto_tree_add_bits_item(mc_tree, hf_gsm_a_gm_sm_value, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
2256 bit_offset += 4;
2257 curr_bits_length -= bits_needed;
2258 oct <<= bits_needed;
2259 bits_in_oct -= bits_needed;
2263 * ECSD multislot class?
2265 bits_needed = 1;
2266 GET_DATA;
2268 /* analyse bits */
2269 if ((oct>>(32-bits_needed)) == 0)
2271 proto_tree_add_uint_format_value(mc_tree, hf_gsm_a_gm_rac_ecsd_multi_slot_class, tvb, curr_offset-1-add_octets, 1+add_octets, 0xFF,
2272 "Bits are not available (%u)", oct>>(32-bits_needed));
2273 bit_offset++;
2274 curr_bits_length -= bits_needed;
2275 oct <<= bits_needed;
2276 bits_in_oct -= bits_needed;
2278 else
2280 curr_bits_length -= bits_needed;
2281 oct <<= bits_needed;
2282 bits_in_oct -= bits_needed;
2283 bit_offset++;
2286 * ECSD multislot class
2288 bits_needed = 5;
2289 GET_DATA;
2291 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_ecsd_multi_slot_class, tvb, bit_offset, 5, ENC_BIG_ENDIAN);
2292 bit_offset += 5;
2293 curr_bits_length -= bits_needed;
2294 oct <<= bits_needed;
2295 bits_in_oct -= bits_needed;
2299 * EGPRS multislot class?
2301 bits_needed = 1;
2302 GET_DATA;
2304 /* analyse bits */
2305 if ((oct>>(32-bits_needed)) == 0)
2307 proto_tree_add_uint_format_value(mc_tree, hf_gsm_a_gm_rac_egprs_multi_slot_class, tvb, curr_offset-1-add_octets, 1+add_octets, 0xFF,
2308 "Bits are not available (%u)", oct>>(32-bits_needed));
2309 curr_bits_length -= bits_needed;
2310 oct <<= bits_needed;
2311 bits_in_oct -= bits_needed;
2312 bit_offset++;
2314 else
2316 curr_bits_length -= bits_needed;
2317 oct <<= bits_needed;
2318 bits_in_oct -= bits_needed;
2319 bit_offset++;
2322 * EGPRS multislot class
2324 bits_needed = 5;
2325 GET_DATA;
2327 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_egprs_multi_slot_class, tvb, bit_offset, 5, ENC_BIG_ENDIAN);
2328 bit_offset += 5;
2329 curr_bits_length -= bits_needed;
2330 oct <<= bits_needed;
2331 bits_in_oct -= bits_needed;
2334 * EGPRS Extended Dynamic Allocation Capability
2336 bits_needed = 1;
2337 GET_DATA;
2339 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_egprs_ext_dyn_alloc_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2340 bit_offset++;
2341 curr_bits_length -= bits_needed;
2342 oct <<= bits_needed;
2343 bits_in_oct -= bits_needed;
2347 * DTM GPRS Multi Slot Class ?
2349 bits_needed = 1;
2350 GET_DATA;
2352 /* analyse bits */
2353 if ((oct>>(32-bits_needed)) == 0)
2355 proto_tree_add_uint_format_value(mc_tree, hf_gsm_a_gm_rac_dtm_gprs_multi_slot_class, tvb, curr_offset-1-add_octets, 1+add_octets, 0xFF,
2356 "Bits are not available (%u)", oct>>(32-bits_needed));
2357 bit_offset++;
2358 curr_bits_length -= bits_needed;
2359 oct <<= bits_needed;
2360 bits_in_oct -= bits_needed;
2362 else
2364 curr_bits_length -= bits_needed;
2365 oct <<= bits_needed;
2366 bits_in_oct -= bits_needed;
2367 bit_offset++;
2370 * DTM GPRS Multi Slot Class
2372 bits_needed = 2;
2373 GET_DATA;
2375 /* analyse bits */
2376 dtm_gprs_mslot = oct>>(32-bits_needed);
2378 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_dtm_gprs_multi_slot_class, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
2379 bit_offset += 2;
2380 curr_bits_length -= bits_needed;
2381 oct <<= bits_needed;
2382 bits_in_oct -= bits_needed;
2385 * Single Slot DTM
2387 bits_needed = 1;
2388 GET_DATA;
2390 proto_tree_add_bits_item(mc_tree, hf_gsm_a_gm_rac_single_slt_dtm, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2391 bit_offset++;
2392 curr_bits_length -= bits_needed;
2393 oct <<= bits_needed;
2394 bits_in_oct -= bits_needed;
2397 * DTM EGPRS Multi Slot Class ?
2399 bits_needed = 1;
2400 GET_DATA;
2402 /* analyse bits */
2403 dtm_egprs_mslot = oct>>(32-bits_needed);
2404 proto_tree_add_bits_item(mc_tree, hf_gsm_a_gm_rac_dtm_egprs_multi_slot_cls_pres, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2405 bit_offset++;
2406 curr_bits_length -= bits_needed;
2407 oct <<= bits_needed;
2408 bits_in_oct -= bits_needed;
2410 if ((oct>>(32-bits_needed)) == 1)
2413 * DTM EGPRS Multi Slot Class
2415 bits_needed = 2;
2416 GET_DATA;
2418 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_dtm_egprs_multi_slot_class, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
2419 bit_offset += 2;
2420 curr_bits_length -= bits_needed;
2421 oct <<= bits_needed;
2422 bits_in_oct -= bits_needed;
2428 * 8PSK Power Capability?
2430 bits_needed = 1;
2431 GET_DATA;
2432 value = oct>>(32-bits_needed);
2434 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_8psk_pow_cap_pres, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2435 bit_offset++;
2436 curr_bits_length -= bits_needed;
2437 oct <<= bits_needed;
2438 bits_in_oct -= bits_needed;
2440 /* analyse bits */
2441 if (value == 1)
2444 * 8PSK Power Capability
2446 bits_needed = 2;
2447 GET_DATA;
2450 proto_tree_add_uint(tf_tree, hf_gsm_a_gm_8psk_power_capability, tvb, curr_offset-1-add_octets, 1+add_octets, oct>>(32-bits_needed));
2451 bit_offset += 2;
2452 curr_bits_length -= bits_needed;
2453 oct <<= bits_needed;
2454 bits_in_oct -= bits_needed;
2458 * COMPACT Interference Measurement Capability
2460 bits_needed = 1;
2461 GET_DATA;
2463 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_comp_int_meas_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2464 bit_offset++;
2465 curr_bits_length -= bits_needed;
2466 oct <<= bits_needed;
2467 bits_in_oct -= bits_needed;
2470 * Revision Level Indicator
2472 bits_needed = 1;
2473 GET_DATA;
2475 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rel_lev_ind, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2476 bit_offset++;
2477 curr_bits_length -= bits_needed;
2478 oct <<= bits_needed;
2479 bits_in_oct -= bits_needed;
2482 * UMTS FDD Radio Access Technology Capability
2484 bits_needed = 1;
2485 GET_DATA;
2487 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_umts_fdd_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2488 bit_offset++;
2489 curr_bits_length -= bits_needed;
2490 oct <<= bits_needed;
2491 bits_in_oct -= bits_needed;
2494 * UMTS 3.84 Mcps TDD Radio Access Technology Capability
2496 bits_needed = 1;
2497 GET_DATA;
2499 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_umts_384_tdd_ra_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2500 bit_offset++;
2501 curr_bits_length -= bits_needed;
2502 oct <<= bits_needed;
2503 bits_in_oct -= bits_needed;
2506 * CDMA 2000 Radio Access Technology Capability
2508 bits_needed = 1;
2509 GET_DATA;
2511 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_cdma2000_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2512 bit_offset++;
2513 curr_bits_length -= bits_needed;
2514 oct <<= bits_needed;
2515 bits_in_oct -= bits_needed;
2518 * UMTS 1.28 Mcps TDD Radio Access Technology Capability
2520 bits_needed = 1;
2521 GET_DATA;
2523 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_umts_128_tdd_ra_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2524 bit_offset++;
2525 curr_bits_length -= bits_needed;
2526 oct <<= bits_needed;
2527 bits_in_oct -= bits_needed;
2530 * GERAN Feature Package 1
2532 bits_needed = 1;
2533 GET_DATA;
2535 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_geran_feat_pkg, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2536 bit_offset++;
2537 curr_bits_length -= bits_needed;
2538 oct <<= bits_needed;
2539 bits_in_oct -= bits_needed;
2542 * Extended DTM (E)GPRS Multi Slot Class
2545 bits_needed = 1;
2546 GET_DATA;
2548 /* analyse bits */
2549 if ((oct>>(32-bits_needed)) == 0)
2551 proto_tree_add_uint_format_value(tf_tree, hf_gsm_a_gm_extended_dtm_egprs_multi_slot_class, tvb, curr_offset-1-add_octets, 1+add_octets, 0xFF, "Bits are not available (%u)", oct>>(32-bits_needed));
2552 curr_bits_length -= bits_needed;
2553 oct <<= bits_needed;
2554 bits_in_oct -= bits_needed;
2555 bit_offset++;
2557 else
2559 curr_bits_length -= bits_needed;
2560 oct <<= bits_needed;
2561 bits_in_oct -= bits_needed;
2562 bit_offset++;
2565 * Extended DTM GPRS Multi Slot Class
2567 bits_needed = 2;
2568 GET_DATA;
2570 /* analyse bits */
2571 proto_tree_add_uint(tf_tree, hf_gsm_a_gm_extended_dtm_gprs_multi_slot_class, tvb, curr_offset-1-add_octets, 1+add_octets, (oct>>(32-bits_needed))|(dtm_gprs_mslot<<4));
2572 bit_offset += 2;
2573 curr_bits_length -= bits_needed;
2574 oct <<= bits_needed;
2575 bits_in_oct -= bits_needed;
2577 if (dtm_egprs_mslot <= 3)
2580 * Extended DTM EGPRS Multi Slot Class
2582 bits_needed = 2;
2583 GET_DATA;
2585 /* analyse bits */
2586 proto_tree_add_uint(tf_tree, hf_gsm_a_gm_extended_dtm_egprs_multi_slot_class, tvb, curr_offset-1-add_octets, 1+add_octets, (oct>>(32-bits_needed))|(dtm_egprs_mslot<<4));
2587 bit_offset += 2;
2588 curr_bits_length -= bits_needed;
2589 oct <<= bits_needed;
2590 bits_in_oct -= bits_needed;
2595 * Modulation based multislot class support
2597 bits_needed = 1;
2598 GET_DATA;
2600 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_mod_based_multi_slot_class_support, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2601 bit_offset++;
2602 curr_bits_length -= bits_needed;
2603 oct <<= bits_needed;
2604 bits_in_oct -= bits_needed;
2607 * High Multislot Capability
2609 bits_needed = 1;
2610 GET_DATA;
2612 /* analyse bits */
2613 if ((oct>>(32-bits_needed)) == 0)
2615 proto_tree_add_uint_format_value(tf_tree, hf_gsm_a_gm_high_multislot_capability, tvb, curr_offset-1-add_octets, 1+add_octets, 0xFF, "Bits are not available (%u)", oct>>(32-bits_needed));
2616 bit_offset++;
2617 curr_bits_length -= bits_needed;
2618 oct <<= bits_needed;
2619 bits_in_oct -= bits_needed;
2621 else
2623 curr_bits_length -= bits_needed;
2624 oct <<= bits_needed;
2625 bits_in_oct -= bits_needed;
2626 bit_offset++;
2629 * High Multislot Capability
2631 bits_needed = 2;
2632 GET_DATA;
2634 /* analyse bits */
2635 ti = proto_tree_add_uint(tf_tree, hf_gsm_a_gm_high_multislot_capability, tvb, curr_offset-1-add_octets, 1+add_octets, oct>>(32-bits_needed));
2636 proto_item_append_text(ti, " - This field effect all other multislot fields."
2637 " To understand the value please read TS 24.008 5.6.0"
2638 " Release 5 Chap 10.5.5.12 Page 406");
2639 bit_offset += 2;
2640 curr_bits_length -= bits_needed;
2641 oct <<= bits_needed;
2642 bits_in_oct -= bits_needed;
2646 * GERAN Iu Mode Capability
2648 bits_needed = 1;
2649 GET_DATA;
2651 value = tvb_get_bits8(tvb, bit_offset, 1);
2652 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_geran_iu_mode_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2653 bit_offset += bits_needed;
2654 curr_bits_length -= bits_needed;
2655 oct <<= bits_needed;
2656 bits_in_oct -= bits_needed;
2657 if (value)
2659 /* GERAN Iu Mode Capabilities struct present */
2660 bits_needed = 4;
2661 GET_DATA;
2662 value = tvb_get_bits8(tvb, bit_offset, 4);
2663 bit_offset += bits_needed;
2664 curr_bits_length -= bits_needed;
2665 oct <<= bits_needed;
2666 bits_in_oct -= bits_needed;
2667 if (value)
2670 * FLO Iu Capability
2672 bits_needed = 1;
2673 GET_DATA;
2674 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_flo_iu_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2675 bit_offset += bits_needed;
2676 curr_bits_length -= bits_needed;
2677 oct <<= bits_needed;
2678 bits_in_oct -= bits_needed;
2679 value--;
2681 /* skip spare bits */
2682 bit_offset += value;
2683 curr_bits_length -= value;
2684 oct <<= value;
2685 bits_in_oct -= value;
2690 * GMSK Multislot Power Profile
2692 bits_needed = 2;
2693 GET_DATA;
2695 /* analyse bits */
2696 proto_tree_add_uint(tf_tree, hf_gsm_a_gm_gmsk_multislot_power_profile, tvb, curr_offset-1-add_octets, 1+add_octets, oct>>(32-bits_needed));
2697 bit_offset += 2;
2698 curr_bits_length -= bits_needed;
2699 oct <<= bits_needed;
2700 bits_in_oct -= bits_needed;
2703 * 8-PSK Multislot Power Profile
2705 bits_needed = 2;
2706 GET_DATA;
2708 /* analyse bits */
2709 proto_tree_add_uint(tf_tree, hf_gsm_a_gm_8psk_multislot_power_profile, tvb, curr_offset-1-add_octets, 1+add_octets, oct>>(32-bits_needed));
2710 bit_offset += 2;
2711 curr_bits_length -= bits_needed;
2712 oct <<= bits_needed;
2713 bits_in_oct -= bits_needed;
2716 * Release 6
2720 * Multiple TBF Capability
2722 bits_needed = 1;
2723 GET_DATA;
2724 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_mult_tbf_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2725 bit_offset += bits_needed;
2726 curr_bits_length -= bits_needed;
2727 oct <<= bits_needed;
2728 bits_in_oct -= bits_needed;
2731 * Downlink Advanced Receiver Performance
2733 bits_needed = 2;
2734 GET_DATA;
2735 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_down_adv_rec_perf, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
2736 bit_offset += bits_needed;
2737 curr_bits_length -= bits_needed;
2738 oct <<= bits_needed;
2739 bits_in_oct -= bits_needed;
2742 * Extended RLC/MAC Control Message Segmentation Capability
2744 bits_needed = 1;
2745 GET_DATA;
2746 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_ext_rlc_mac_ctrl_msg_seg_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2747 bit_offset += bits_needed;
2748 curr_bits_length -= bits_needed;
2749 oct <<= bits_needed;
2750 bits_in_oct -= bits_needed;
2753 * DTM Enhancements Capability
2755 bits_needed = 1;
2756 GET_DATA;
2757 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_dtm_enh_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2758 bit_offset += bits_needed;
2759 curr_bits_length -= bits_needed;
2760 oct <<= bits_needed;
2761 bits_in_oct -= bits_needed;
2764 * DTM GPRS High Multi Slot Class & DTM EGPRS High Multi Slot Class
2766 bits_needed = 1;
2767 GET_DATA;
2768 if ((oct>>(32-bits_needed)) == 0)
2770 bit_offset += bits_needed;
2771 curr_bits_length -= bits_needed;
2772 oct <<= bits_needed;
2773 bits_in_oct -= bits_needed;
2775 else
2777 bit_offset += bits_needed;
2778 curr_bits_length -= bits_needed;
2779 oct <<= bits_needed;
2780 bits_in_oct -= bits_needed;
2783 * DTM GPRS High Multi Slot Class
2785 bits_needed = 3;
2786 GET_DATA;
2787 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_dtm_gprs_high_multi_slot_class, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
2788 bit_offset += bits_needed;
2789 curr_bits_length -= bits_needed;
2790 oct <<= bits_needed;
2791 bits_in_oct -= bits_needed;
2793 bits_needed = 1;
2794 GET_DATA;
2795 if ((oct>>(32-bits_needed)) == 0)
2797 bit_offset += bits_needed;
2798 curr_bits_length -= bits_needed;
2799 oct <<= bits_needed;
2800 bits_in_oct -= bits_needed;
2802 else
2804 bit_offset += bits_needed;
2805 curr_bits_length -= bits_needed;
2806 oct <<= bits_needed;
2807 bits_in_oct -= bits_needed;
2810 * DTM EGPRS High Multi Slot Class
2812 bits_needed = 3;
2813 GET_DATA;
2814 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_dtm_egprs_high_multi_slot_class, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
2815 bit_offset += bits_needed;
2816 curr_bits_length -= bits_needed;
2817 oct <<= bits_needed;
2818 bits_in_oct -= bits_needed;
2823 * PS Handover Capability
2825 bits_needed = 1;
2826 GET_DATA;
2827 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_ps_ho_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2828 bit_offset += bits_needed;
2829 curr_bits_length -= bits_needed;
2830 oct <<= bits_needed;
2831 bits_in_oct -= bits_needed;
2834 * Release 7
2838 * DTM Handover Capability
2840 bits_needed = 1;
2841 GET_DATA;
2842 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_dtm_ho_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2843 bit_offset += bits_needed;
2844 curr_bits_length -= bits_needed;
2845 oct <<= bits_needed;
2846 bits_in_oct -= bits_needed;
2849 * Multislot Capability Reduction for Downlink Dual Carrier & Downlink Dual Carrier for DTM Capability
2852 bits_needed = 1;
2853 GET_DATA;
2854 if ((oct>>(32-bits_needed)) == 0)
2856 bit_offset += bits_needed;
2857 curr_bits_length -= bits_needed;
2858 oct <<= bits_needed;
2859 bits_in_oct -= bits_needed;
2861 else
2863 bit_offset += bits_needed;
2864 curr_bits_length -= bits_needed;
2865 oct <<= bits_needed;
2866 bits_in_oct -= bits_needed;
2869 * Multislot Capability Reduction for Downlink Dual Carrier
2871 bits_needed = 3;
2872 GET_DATA;
2873 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_multi_slot_cap_red_down_dual_carrier, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
2874 bit_offset += bits_needed;
2875 curr_bits_length -= bits_needed;
2876 oct <<= bits_needed;
2877 bits_in_oct -= bits_needed;
2880 * Downlink Dual Carrier for DTM Capability
2882 bits_needed = 1;
2883 GET_DATA;
2884 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_down_dual_carrier_dtm_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2885 bit_offset += bits_needed;
2886 curr_bits_length -= bits_needed;
2887 oct <<= bits_needed;
2888 bits_in_oct -= bits_needed;
2892 * Flexible Timeslot Assignment
2894 bits_needed = 1;
2895 GET_DATA;
2896 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_flex_ts_assign, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2897 bit_offset += bits_needed;
2898 curr_bits_length -= bits_needed;
2899 oct <<= bits_needed;
2900 bits_in_oct -= bits_needed;
2903 * GAN PS Handover Capability
2905 bits_needed = 1;
2906 GET_DATA;
2907 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_gan_ps_ho_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2908 bit_offset += bits_needed;
2909 curr_bits_length -= bits_needed;
2910 oct <<= bits_needed;
2911 bits_in_oct -= bits_needed;
2914 * RLC Non-persistent Mode
2916 bits_needed = 1;
2917 GET_DATA;
2918 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_rlc_non_pers_mode, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2919 bit_offset += bits_needed;
2920 curr_bits_length -= bits_needed;
2921 oct <<= bits_needed;
2922 bits_in_oct -= bits_needed;
2925 * Reduced Latency Capability
2927 bits_needed = 1;
2928 GET_DATA;
2929 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_reduced_lat_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2930 bit_offset += bits_needed;
2931 curr_bits_length -= bits_needed;
2932 oct <<= bits_needed;
2933 bits_in_oct -= bits_needed;
2936 * Uplink EGPRS2
2938 bits_needed = 2;
2939 GET_DATA;
2940 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_ul_egprs2, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
2941 bit_offset += bits_needed;
2942 curr_bits_length -= bits_needed;
2943 oct <<= bits_needed;
2944 bits_in_oct -= bits_needed;
2947 * Downlink EGPRS2
2949 bits_needed = 2;
2950 GET_DATA;
2951 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_dl_egprs2, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
2952 bit_offset += bits_needed;
2953 curr_bits_length -= bits_needed;
2954 oct <<= bits_needed;
2955 bits_in_oct -= bits_needed;
2958 * Release 8
2962 * E-UTRA FDD support
2964 bits_needed = 1;
2965 GET_DATA;
2966 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_eutra_fdd_support, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2967 bit_offset += bits_needed;
2968 curr_bits_length -= bits_needed;
2969 oct <<= bits_needed;
2970 bits_in_oct -= bits_needed;
2973 * E-UTRA TDD support
2975 bits_needed = 1;
2976 GET_DATA;
2977 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_eutra_tdd_support, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2978 bit_offset += bits_needed;
2979 curr_bits_length -= bits_needed;
2980 oct <<= bits_needed;
2981 bits_in_oct -= bits_needed;
2984 * GERAN to E-UTRA support in GERAN packet transfer mode
2986 bits_needed = 2;
2987 GET_DATA;
2988 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_geran_to_eutra_support_in_geran_ptm, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
2989 bit_offset += bits_needed;
2990 curr_bits_length -= bits_needed;
2991 oct <<= bits_needed;
2992 bits_in_oct -= bits_needed;
2995 * Priority-based reselection support
2997 bits_needed = 1;
2998 GET_DATA;
2999 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_prio_based_resel_support, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3000 bit_offset += bits_needed;
3001 curr_bits_length -= bits_needed;
3002 oct <<= bits_needed;
3003 bits_in_oct -= bits_needed;
3006 * Release 9
3010 * Enhanced Flexible Timeslot Assignment
3012 bits_needed = 1;
3013 GET_DATA;
3014 if ((oct>>(32-bits_needed)) == 0)
3016 bit_offset += bits_needed;
3017 curr_bits_length -= bits_needed;
3018 oct <<= bits_needed;
3019 bits_in_oct -= bits_needed;
3021 else
3023 bit_offset += bits_needed;
3024 curr_bits_length -= bits_needed;
3025 oct <<= bits_needed;
3026 bits_in_oct -= bits_needed;
3029 * Alternative EFTA Multislot Class
3031 bits_needed = 4;
3032 GET_DATA;
3033 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_alt_efta_multi_slot_class, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
3034 bit_offset += bits_needed;
3035 curr_bits_length -= bits_needed;
3036 oct <<= bits_needed;
3037 bits_in_oct -= bits_needed;
3040 * EFTA Multislot Capability Reduction for Downlink Dual Carrier
3042 bits_needed = 3;
3043 GET_DATA;
3044 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_efta_multi_slot_cap_red_down_dual_carrier, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
3045 bit_offset += bits_needed;
3046 curr_bits_length -= bits_needed;
3047 oct <<= bits_needed;
3048 bits_in_oct -= bits_needed;
3052 * Indication of Upper Layer PDU Start Capability for RLC UM
3054 bits_needed = 1;
3055 GET_DATA;
3056 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_ind_up_layer_pdu_start_cap_for_rlc_um, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3057 bit_offset += bits_needed;
3058 curr_bits_length -= bits_needed;
3059 oct <<= bits_needed;
3060 bits_in_oct -= bits_needed;
3063 * EMST Capability
3065 bits_needed = 1;
3066 GET_DATA;
3067 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_emst_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3068 bit_offset += bits_needed;
3069 curr_bits_length -= bits_needed;
3070 oct <<= bits_needed;
3071 bits_in_oct -= bits_needed;
3074 * MTTI Capability
3076 bits_needed = 1;
3077 GET_DATA;
3078 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_mtti_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3079 bit_offset += bits_needed;
3080 curr_bits_length -= bits_needed;
3081 oct <<= bits_needed;
3082 bits_in_oct -= bits_needed;
3085 * UTRA CSG Cells Reporting
3087 bits_needed = 1;
3088 GET_DATA;
3089 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_utra_csg_cell_report, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3090 bit_offset += bits_needed;
3091 curr_bits_length -= bits_needed;
3092 oct <<= bits_needed;
3093 bits_in_oct -= bits_needed;
3096 * E-UTRA CSG Cells Reporting
3098 bits_needed = 1;
3099 GET_DATA;
3100 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_eutra_csg_cell_report, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3101 bit_offset += bits_needed;
3102 curr_bits_length -= bits_needed;
3103 oct <<= bits_needed;
3104 bits_in_oct -= bits_needed;
3107 * Release 10
3111 * DTR Capability
3113 bits_needed = 1;
3114 GET_DATA;
3115 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_dtr_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3116 bit_offset += bits_needed;
3117 curr_bits_length -= bits_needed;
3118 oct <<= bits_needed;
3119 bits_in_oct -= bits_needed;
3122 * EMSR Capability
3124 bits_needed = 1;
3125 GET_DATA;
3126 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_emsr_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3127 bit_offset += bits_needed;
3128 curr_bits_length -= bits_needed;
3129 oct <<= bits_needed;
3130 bits_in_oct -= bits_needed;
3133 * Fast Downlink Frequency Switching Capability
3135 bits_needed = 1;
3136 GET_DATA;
3137 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_fast_down_freq_switch_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3138 bit_offset += bits_needed;
3139 curr_bits_length -= bits_needed;
3140 oct <<= bits_needed;
3141 bits_in_oct -= bits_needed;
3144 * TIGHTER Capability
3146 bits_needed = 2;
3147 GET_DATA;
3148 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_tighter_cap, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
3149 bit_offset += bits_needed;
3150 curr_bits_length -= bits_needed;
3151 oct <<= bits_needed;
3152 bits_in_oct -= bits_needed;
3155 * Release 11
3159 * FANR Capability
3161 bits_needed = 1;
3162 GET_DATA;
3163 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_fanr_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3164 bit_offset += bits_needed;
3165 curr_bits_length -= bits_needed;
3166 oct <<= bits_needed;
3167 bits_in_oct -= bits_needed;
3170 * IPA Capability
3172 bits_needed = 1;
3173 GET_DATA;
3174 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_ipa_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3175 bit_offset += bits_needed;
3176 curr_bits_length -= bits_needed;
3177 oct <<= bits_needed;
3178 bits_in_oct -= bits_needed;
3181 * GERAN Network Sharing support
3183 bits_needed = 1;
3184 GET_DATA;
3185 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_geran_nw_sharing_support, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3186 bit_offset += bits_needed;
3187 curr_bits_length -= bits_needed;
3188 oct <<= bits_needed;
3189 bits_in_oct -= bits_needed;
3192 * E-UTRA Wideband RSRQ measurements support
3194 bits_needed = 1;
3195 GET_DATA;
3196 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_eutra_wb_rsrq_support, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3197 bit_offset += bits_needed;
3198 curr_bits_length -= bits_needed;
3199 oct <<= bits_needed;
3200 bits_in_oct -= bits_needed;
3203 * Release 12
3207 * UTRA Multiple Frequency Band Indicators support
3209 bits_needed = 1;
3210 GET_DATA;
3211 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_utra_mfbi_support, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3212 bit_offset += bits_needed;
3213 curr_bits_length -= bits_needed;
3214 oct <<= bits_needed;
3215 bits_in_oct -= bits_needed;
3218 * E-UTRA Multiple Frequency Band Indicators support
3220 bits_needed = 1;
3221 GET_DATA;
3222 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_eutra_mfbi_support, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3223 bit_offset += bits_needed;
3224 curr_bits_length -= bits_needed;
3225 oct <<= bits_needed;
3226 bits_in_oct -= bits_needed;
3229 * DLMC Capability
3231 bits_needed = 1;
3232 GET_DATA;
3233 if ((oct>>(32-bits_needed)) == 0)
3235 bit_offset += bits_needed;
3236 curr_bits_length -= bits_needed;
3237 oct <<= bits_needed;
3238 bits_in_oct -= bits_needed;
3240 else
3242 bit_offset += bits_needed;
3243 curr_bits_length -= bits_needed;
3244 oct <<= bits_needed;
3245 bits_in_oct -= bits_needed;
3247 bits_needed = 1;
3248 GET_DATA;
3249 if ((oct>>(32-bits_needed)) == 0)
3251 bit_offset += bits_needed;
3252 curr_bits_length -= bits_needed;
3253 oct <<= bits_needed;
3254 bits_in_oct -= bits_needed;
3256 else
3258 bit_offset += bits_needed;
3259 curr_bits_length -= bits_needed;
3260 oct <<= bits_needed;
3261 bits_in_oct -= bits_needed;
3264 * DLMC - Non-contiguous intra-band reception
3266 bits_needed = 2;
3267 GET_DATA;
3268 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_dlmc_non_contig_intra_band_recep, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
3269 bit_offset += bits_needed;
3270 curr_bits_length -= bits_needed;
3271 oct <<= bits_needed;
3272 bits_in_oct -= bits_needed;
3275 * DLMC - Inter-band reception
3277 bits_needed = 1;
3278 GET_DATA;
3279 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_dlmc_inter_band_recep, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3280 bit_offset += bits_needed;
3281 curr_bits_length -= bits_needed;
3282 oct <<= bits_needed;
3283 bits_in_oct -= bits_needed;
3287 * DLMC - Maximum Bandwidth
3289 bits_needed = 2;
3290 GET_DATA;
3291 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_dlmc_max_bandwidth, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
3292 bit_offset += bits_needed;
3293 curr_bits_length -= bits_needed;
3294 oct <<= bits_needed;
3295 bits_in_oct -= bits_needed;
3298 * DLMC - Maximum Number of Downlink Timeslots
3300 bits_needed = 6;
3301 GET_DATA;
3302 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_dlmc_max_nb_dl_ts, tvb, bit_offset, 6, ENC_BIG_ENDIAN);
3303 bit_offset += bits_needed;
3304 curr_bits_length -= bits_needed;
3305 oct <<= bits_needed;
3306 bits_in_oct -= bits_needed;
3309 * DLMC - Maximum Number of Downlink Carriers
3311 bits_needed = 3;
3312 GET_DATA;
3313 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_dlmc_max_nb_dl_carriers, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
3314 bit_offset += bits_needed;
3315 curr_bits_length -= bits_needed;
3316 oct <<= bits_needed;
3317 bits_in_oct -= bits_needed;
3321 * Extended TSC Set Capability support
3323 bits_needed = 1;
3324 GET_DATA;
3325 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_ext_tsc_set_cap_support, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3326 bit_offset += bits_needed;
3327 curr_bits_length -= bits_needed;
3328 oct <<= bits_needed;
3329 bits_in_oct -= bits_needed;
3332 * Extended EARFCN value range
3334 bits_needed = 1;
3335 GET_DATA;
3336 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_ext_earfcn_value_range, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3337 bit_offset += bits_needed;
3338 curr_bits_length -= bits_needed;
3339 oct <<= bits_needed;
3340 bits_in_oct -= bits_needed;
3343 * Release 13
3347 * (EC-)PCH monitoring support
3349 bits_needed = 2;
3350 GET_DATA;
3351 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_ec_pch_mon_support, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
3352 bit_offset += bits_needed;
3353 curr_bits_length -= bits_needed;
3354 oct <<= bits_needed;
3355 bits_in_oct -= bits_needed;
3358 * Release 14
3362 * MS Sync Accuracy
3364 bits_needed = 1;
3365 GET_DATA;
3366 if ((oct>>(32-bits_needed)) == 0)
3368 bit_offset += bits_needed;
3369 curr_bits_length -= bits_needed;
3370 oct <<= bits_needed;
3371 bits_in_oct -= bits_needed;
3373 else
3375 bits_needed = 4;
3376 GET_DATA;
3377 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_ms_sync_accuracy, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
3378 bit_offset += bits_needed;
3379 curr_bits_length -= bits_needed;
3380 oct <<= bits_needed;
3381 bits_in_oct -= bits_needed;
3385 * EC uplink coverage enhancement support
3387 bits_needed = 1;
3388 GET_DATA;
3389 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_ec_ul_cov_enh_support, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3390 bit_offset += bits_needed;
3391 curr_bits_length -= bits_needed;
3392 oct <<= bits_needed;
3393 bits_in_oct -= bits_needed;
3396 * Release 15
3400 * MTA Access Security support
3402 bits_needed = 1;
3403 GET_DATA;
3404 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_mta_access_sec_support, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3405 bit_offset += bits_needed;
3406 curr_bits_length -= bits_needed;
3407 oct <<= bits_needed;
3408 bits_in_oct -= bits_needed;
3411 * EC paging indication channel monitoring support
3413 bits_needed = 1;
3414 GET_DATA;
3415 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_ec_paging_ind_chan_mon_support, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3416 bit_offset += bits_needed;
3417 curr_bits_length -= bits_needed;
3418 oct <<= bits_needed;
3419 bits_in_oct -= bits_needed;
3422 * we are too long ... so jump over it
3424 while (curr_bits_length > 0)
3426 if (curr_bits_length > 8)
3427 bits_needed = 8;
3428 else
3429 bits_needed = curr_bits_length;
3430 GET_DATA;
3431 curr_bits_length -= bits_needed;
3432 oct <<= bits_needed;
3433 bits_in_oct -= bits_needed;
3437 } while (1);
3439 curr_offset += curr_len;
3441 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_gm_extraneous_data);
3443 return (curr_offset - offset);
3447 * [9] 10.5.5.14
3449 static const range_string gmm_cause_vals[] = {
3450 { 0x00, 0x01, "Protocol error, unspecified"},
3451 { 0x02, 0x02, "IMSI unknown in HLR"},
3452 { 0x03, 0x03, "Illegal MS"},
3453 { 0x04, 0x04, "IMSI unknown in VLR"}, /* Annex G.1 */
3454 { 0x05, 0x05, "IMEI not accepted"}, /* Annex G.1 */
3455 { 0x06, 0x06, "Illegal ME"},
3456 { 0x07, 0x07, "GPRS services not allowed"},
3457 { 0x08, 0x08, "GPRS services and non-GPRS services not allowed"},
3458 { 0x09, 0x09, "MS identity cannot be derived by the network"},
3459 { 0x0a, 0x0a, "Implicitly detached"},
3460 { 0x0b, 0x0b, "PLMN not allowed"},
3461 { 0x0c, 0x0c, "Location Area not allowed"},
3462 { 0x0d, 0x0d, "Roaming not allowed in this location area"},
3463 { 0x0e, 0x0e, "GPRS services not allowed in this PLMN"},
3464 { 0x0f, 0x0f, "No Suitable Cells In Location Area"},
3465 { 0x10, 0x10, "MSC temporarily not reachable"},
3466 { 0x11, 0x11, "Network failure"},
3467 { 0x12, 0x13, "Protocol error, unspecified"},
3468 { 0x14, 0x14, "MAC failure"},
3469 { 0x15, 0x15, "Synch failure"},
3470 { 0x16, 0x16, "Congestion"},
3471 { 0x17, 0x17, "GSM authentication unacceptable"},
3472 { 0x18, 0x18, "Protocol error, unspecified"},
3473 { 0x19, 0x19, "Not authorized for this CSG"},
3474 { 0x1c, 0x1c, "SMS provided via GPRS in this routing area"},
3475 { 0x20, 0x20, "Service option not supported"}, /* Annex G.4 */
3476 { 0x21, 0x21, "Requested service option not subscribed"}, /* Annex G.4 */
3477 { 0x22, 0x22, "Service option temporarily out of order"}, /* Annex G.4 */
3478 { 0x23, 0x25, "Protocol error, unspecified"},
3479 { 0x26, 0x26, "Call cannot be identified(non-GPRS services only)"}, /* Annex G.4 */
3480 { 0x27, 0x27, "Protocol error, unspecified"},
3481 { 0x28, 0x28, "No PDP context activated"},
3482 { 0x29, 0x2f, "Protocol error, unspecified"},
3483 { 0x30, 0x3f, "Retry upon entry into a new cell"},
3484 { 0x40, 0x5e, "Protocol error, unspecified"},
3485 { 0x5f, 0x5f, "Semantically incorrect message"},
3486 { 0x60, 0x60, "Invalid mandatory information"},
3487 { 0x61, 0x61, "Message type non-existent or not implemented"},
3488 { 0x62, 0x62, "Message type not compatible with the protocol state"},
3489 { 0x63, 0x63, "Information element non-existent or not implemented"},
3490 { 0x64, 0x64, "Conditional IE error"},
3491 { 0x65, 0x65, "Message not compatible with the protocol state"},
3492 { 0x66, 0x6e, "Protocol error, unspecified"},
3493 { 0x6f, 0x6f, "Protocol error, unspecified"},
3494 { 0x70, 0xff, "Protocol error, unspecified"},
3495 { 0, 0, NULL }
3497 /* NOTE 1 TS 124 008 V8.6.0 (2009-07)
3498 "Any other value received by the mobile station shall be treated as 0110 1111, "Protocol
3499 error, unspecified". Any other value received by the network shall be treated as
3500 0110 1111, "Protocol error, unspecified".
3503 /* NOTE: The listed reject cause values are defined in annex G. */
3505 static uint16_t
3506 de_gmm_cause(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
3508 uint32_t curr_offset;
3510 curr_offset = offset;
3512 proto_tree_add_item(tree, hf_gsm_a_gm_cause, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3514 curr_offset++;
3516 /* no length check possible */
3518 return (curr_offset - offset);
3522 * [7] 10.5.5.15 Routing area identification
3524 uint16_t
3525 de_gmm_rai(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
3527 proto_tree *subtree;
3528 uint32_t mcc;
3529 uint32_t mnc;
3530 uint32_t lac;
3531 uint32_t rac;
3532 uint32_t curr_offset;
3534 curr_offset = offset;
3536 mcc = (tvb_get_uint8(tvb, curr_offset) & 0x0f) <<8;
3537 mcc |= (tvb_get_uint8(tvb, curr_offset) & 0xf0);
3538 mcc |= (tvb_get_uint8(tvb, curr_offset+1) & 0x0f);
3539 mnc = (tvb_get_uint8(tvb, curr_offset+2) & 0x0f) <<8;
3540 mnc |= (tvb_get_uint8(tvb, curr_offset+2) & 0xf0);
3541 mnc |= (tvb_get_uint8(tvb, curr_offset+1) & 0xf0) >>4;
3542 if ((mnc&0x000f) == 0x000f)
3543 mnc = mnc>>4;
3545 lac = tvb_get_ntohs(tvb, curr_offset+3);
3546 rac = tvb_get_uint8(tvb, curr_offset+5);
3548 subtree = proto_tree_add_subtree_format(tree,
3549 tvb, curr_offset, 6, ett_gmm_rai, NULL,
3550 "Routing area identification: %x-%x-%u-%u",
3551 mcc, mnc, lac, rac);
3553 dissect_e212_mcc_mnc(tvb, pinfo, subtree, offset, E212_RAI, true);
3555 proto_tree_add_item(subtree, hf_gsm_a_lac, tvb, curr_offset+3, 2, ENC_BIG_ENDIAN);
3556 proto_tree_add_item(subtree, hf_gsm_a_gm_rac, tvb, curr_offset+5, 1, ENC_BIG_ENDIAN);
3558 curr_offset += 6;
3559 if (add_string)
3561 if (add_string[0] == '\0')
3563 snprintf(add_string, string_len, " - RAI: %x-%x-%u-%u", mcc, mnc, lac, rac);
3568 /* no length check possible */
3570 return (curr_offset - offset);
3574 * [7] 10.5.5.15a Routing area identification 2
3576 static uint16_t
3577 de_gmm_rai2(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
3579 /* The routing area identification 2 value is coded as octet 2 to 7 of the Routing area identification information element. */
3580 return de_gmm_rai(tvb, tree, pinfo, offset, len, add_string, string_len);
3584 * [7] 10.5.5.17
3586 static const value_string gsm_a_gm_update_res_vals[] = {
3587 {0, "RA updated" },
3588 {1, "Combined RA/LA updated"},
3589 {2, "Reserved"},
3590 {3, "Reserved"},
3591 {4, "Reserved"},
3592 {5, "Reserved"},
3593 {6, "Reserved"},
3594 {7, "Reserved"},
3595 {0, NULL}
3599 static uint16_t
3600 de_gmm_update_res(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
3602 uint32_t curr_offset = offset;
3604 /* IMPORTANT - IT'S ASSUMED THAT THE INFORMATION IS IN THE HIGHER NIBBLE */
3605 proto_tree_add_item(tree, hf_gsm_a_gm_update_result, tvb, curr_offset, 1, ENC_NA);
3607 curr_offset++;
3609 /* no length check possible */
3611 return (curr_offset - offset);
3615 * [9] 10.5.5.18 Update Type
3617 static const value_string gsm_a_gm_update_type_vals[] = {
3618 { 0x00, "RA updating" },
3619 { 0x01, "combined RA/LA updating" },
3620 { 0x02, "combined RA/LA updating with IMSI attach" },
3621 { 0x03, "Periodic updating" },
3622 { 0, NULL }
3625 static uint16_t
3626 de_gmm_update_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
3628 proto_tree_add_item(tree, hf_gsm_a_gm_for, tvb, offset, 1, ENC_BIG_ENDIAN);
3629 proto_tree_add_item(tree, hf_gsm_a_gm_update_type, tvb, offset, 1, ENC_BIG_ENDIAN);
3631 /* no length check possible */
3632 return 1;
3636 * [9] 10.5.5.19 A&C reference number (lower nibble)
3638 static uint16_t
3639 de_gmm_ac_ref_nr(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
3641 /* IMPORTANT - IT'S ASSUMED THAT THE INFORMATION IS IN THE LOWER NIBBLE */
3642 proto_tree_add_bits_item(tree, hf_gsm_a_gm_ac_ref_nr, tvb, (offset << 3) + 4, 4, ENC_BIG_ENDIAN);
3644 /* no length check possible */
3645 return 1;
3649 * [9] 10.5.5.19 A&C reference number (higher nibble)
3651 static uint16_t
3652 de_gmm_ac_ref_nr_h(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
3654 /* IMPORTANT - IT'S ASSUMED THAT THE INFORMATION IS IN THE HIGHER NIBBLE */
3655 proto_tree_add_bits_item(tree, hf_gsm_a_gm_ac_ref_nr, tvb, offset << 3, 4, ENC_BIG_ENDIAN);
3657 /* no length check possible */
3658 return 1;
3662 * [9] 10.5.5.20 Service type
3664 static const value_string gsm_a_gm_serv_type_vals[] = {
3665 { 0x00, "Signalling" },
3666 { 0x01, "Data" },
3667 { 0x02, "Paging response" },
3668 { 0x03, "MBMS Multicast Service Reception" },
3669 { 0x04, "MBMS Broadcast Service Reception" },
3670 { 0, NULL }
3673 static uint16_t
3674 de_gmm_service_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
3676 uint32_t bit_offset;
3678 bit_offset = offset << 3;
3679 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3680 bit_offset += 1;
3681 proto_tree_add_bits_item(tree, hf_gsm_a_gm_serv_type, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
3682 /*bit_offset += 3;*/
3684 /* no length check possible */
3685 return 1;
3689 * [9] 10.5.5.21 Cell Notification
3690 * No data
3694 * [9] 10.5.5.22 PS LCS Capability
3696 static const true_false_string gsm_a_gm_mta_e_vals = {
3697 "Multilateration Timing Advance using Extended Access Burst method supported",
3698 "Multilateration Timing Advance using Extended Access Burst method not supported"
3701 static const true_false_string gsm_a_gm_mta_r_vals = {
3702 "Multilateration Timing Advance using RLC data block method supported",
3703 "Multilateration Timing Advance using RLC data block method not supported"
3706 static const true_false_string gsm_a_gm_apc_vals = {
3707 "Additional Positioning Capabilities which can be retrieved by RRLP are supported",
3708 "Additional Positioning Capabilities which can be retrieved by RRLP are not supported"
3711 static const true_false_string gsm_a_gm_otd_a_vals = {
3712 "MS assisted E-OTD supported",
3713 "MS assisted E-OTD not supported"
3716 static const true_false_string gsm_a_gm_otd_b_vals = {
3717 "MS based E-OTD supported",
3718 "MS based E-OTD not supported"
3721 static const true_false_string gsm_a_gm_gps_a_vals = {
3722 "MS assisted GPS supported",
3723 "MS assisted GPS not supported"
3726 static const true_false_string gsm_a_gm_gps_b_vals = {
3727 "MS based GPS supported",
3728 "MS based GPS not supported"
3731 static const true_false_string gsm_a_gm_gps_c_vals = {
3732 "Conventional GPS supported",
3733 "Conventional GPS not supported"
3736 static const true_false_string gsm_a_gm_motd_vals = {
3737 "Multilateration Observed Time Difference supported",
3738 "Multilateration Observed Time Difference not supported"
3741 static const true_false_string gsm_a_gm_mta_a_vals = {
3742 "Multilateration Timing Advance using Access Burst method supported",
3743 "Multilateration Timing Advance using Access Burst method not supported"
3746 static uint16_t
3747 de_gmm_ps_lcs_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
3749 uint32_t curr_offset;
3751 curr_offset = offset;
3752 proto_tree_add_item(tree, hf_gsm_a_gm_mta_e, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3753 proto_tree_add_item(tree, hf_gsm_a_gm_mta_r, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3754 proto_tree_add_item(tree, hf_gsm_a_gm_apc, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3755 proto_tree_add_item(tree, hf_gsm_a_gm_otd_a, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3756 proto_tree_add_item(tree, hf_gsm_a_gm_otd_b, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3757 proto_tree_add_item(tree, hf_gsm_a_gm_gps_a, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3758 proto_tree_add_item(tree, hf_gsm_a_gm_gps_b, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3759 proto_tree_add_item(tree, hf_gsm_a_gm_gps_c, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3761 curr_offset++;
3763 if (len > 2) {
3764 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, curr_offset << 3, 6, ENC_BIG_ENDIAN);
3765 proto_tree_add_item(tree, hf_gsm_a_gm_motd, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3766 proto_tree_add_item(tree, hf_gsm_a_gm_mta_a, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3769 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_gm_extraneous_data);
3771 return (curr_offset - offset);
3775 * [7] 10.5.5.23
3777 static const true_false_string gsm_a_gm_lcs_molr_value = {
3778 "LCS-MOLR via PS domain supported",
3779 "LCS-MOLR via PS domain not supported"
3781 static const true_false_string gsm_a_gm_ims_vops_value = {
3782 "IMS voice over PS session supported in Iu mode, but not supported in A/Gb mode",
3783 "IMS voice over PS session in Iu mode and A/Gb mode not supported"
3785 static const true_false_string gsm_a_gm_emc_bs_value = {
3786 "Emergency bearer services supported in Iu mode, but not supported in A/Gb mode",
3787 "Emergency bearer services in Iu mode and A/Gb mode not supported"
3789 static uint16_t
3790 de_gmm_net_feat_supp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
3792 uint32_t curr_offset;
3794 curr_offset = offset;
3796 proto_tree_add_item(tree, hf_gsm_a_gm_lcs_molr, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3797 proto_tree_add_item(tree, hf_gsm_a_gm_mbms, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3798 proto_tree_add_item(tree, hf_gsm_a_gm_ims_vops, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3799 proto_tree_add_item(tree, hf_gsm_a_gm_emc_bs, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3800 curr_offset++;
3802 return (curr_offset - offset);
3806 * [7] 10.5.5.23a Additional network feature support
3808 static const true_false_string gsm_a_gm_epco_value = {
3809 "Extended protocol configuration options IE supported",
3810 "Extended protocol configuration options IE not supported"
3812 static const true_false_string gsm_a_gm_restrict_ec_value = {
3813 "Enhanced coverage restricted",
3814 "Enhanced coverage not restricted"
3816 static const true_false_string gsm_a_gm_gprs_sms_value = {
3817 "SMS via GPRS not supported",
3818 "SMS via GPRS supported"
3820 static uint16_t
3821 de_gmm_add_net_feat_supp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
3823 uint32_t curr_offset;
3825 curr_offset = offset;
3827 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, curr_offset << 3, 5, ENC_BIG_ENDIAN);
3828 proto_tree_add_item(tree, hf_gsm_a_gm_epco, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3829 proto_tree_add_item(tree, hf_gsm_a_gm_restrict_ec, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3830 proto_tree_add_item(tree, hf_gsm_a_gm_gprs_sms, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3831 curr_offset++;
3833 return (curr_offset - offset);
3836 /* [7] 10.5.5.24 Inter RAT information container */
3837 static uint16_t
3838 de_gmm_rat_info_container(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
3840 uint32_t curr_offset;
3841 tvbuff_t *rrc_irat_ho_info_tvb;
3843 curr_offset = offset;
3845 /* The value part of the Inter RAT information container information element is the INTER RAT HANDOVER INFO as
3846 defined in 3GPP TS 25.331 [23c]. If this field includes padding bits, they are defined in 3GPP TS 25.331 [23c].*/
3847 rrc_irat_ho_info_tvb = tvb_new_subset_length(tvb, curr_offset, len);
3848 if (rrc_irat_ho_info_handle)
3849 call_dissector(rrc_irat_ho_info_handle, rrc_irat_ho_info_tvb, pinfo, tree);
3850 else
3851 proto_tree_add_expert_format(tree, pinfo, &ei_gsm_a_gm_undecoded, tvb, curr_offset, len, "INTER RAT HANDOVER INFO - Not decoded");
3853 return len;
3857 /* [7] 10.5.5.25 Requested MS information */
3858 static const true_false_string gsm_a_gm_req_ms_info_irat_vals = {
3859 "Inter RAT information container IE requested",
3860 "Inter RAT information container IE not requested"
3862 static const true_false_string gsm_a_gm_req_ms_info_irat2_vals = {
3863 "E-UTRAN inter RAT information container IE requested",
3864 "E-UTRAN inter RAT information container IE not requested"
3867 static uint16_t
3868 de_gmm_req_ms_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
3870 uint32_t curr_offset;
3871 uint32_t bit_offset;
3873 curr_offset = offset;
3874 bit_offset = (curr_offset<<3)+4;
3876 proto_tree_add_bits_item(tree, hf_gsm_a_gm_req_ms_info_irat, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3877 bit_offset++;
3878 proto_tree_add_bits_item(tree, hf_gsm_a_gm_req_ms_info_irat2, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3879 bit_offset++;
3880 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
3881 /*bit_offset += 2;
3882 curr_offset++;*/
3884 return len;
3887 /* [7] 10.5.5.26 UE network capability
3888 * See subclause 9.9.3.x in 3GPP TS 24.301 [120].
3891 /* [7] 10.5.5.27 E-UTRAN inter RAT information container */
3892 static uint16_t
3893 de_gmm_eutran_irat_info_container(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
3895 uint32_t curr_offset;
3896 tvbuff_t *lte_rrc_ue_eutra_cap_tvb;
3898 curr_offset = offset;
3900 /* The value part of the E-UTRAN inter RAT information container information element
3901 is formatted and coded according to the UE-EUTRA-Capability IE defined in 3GPP TS 36.331 [129]*/
3902 lte_rrc_ue_eutra_cap_tvb = tvb_new_subset_length(tvb, curr_offset, len);
3903 if (lte_rrc_ue_eutra_cap_handle)
3904 call_dissector(lte_rrc_ue_eutra_cap_handle, lte_rrc_ue_eutra_cap_tvb, pinfo, tree);
3905 else
3906 proto_tree_add_expert_format(tree, pinfo, &ei_gsm_a_gm_undecoded, tvb, curr_offset, len, "E-UTRAN Inter RAT information container - Not decoded");
3908 return len;
3911 /* [7] 10.5.5.28 Voice domain preference and UE's usage setting */
3912 static const true_false_string gsm_a_gm_ue_usage_setting_vals = {
3913 "Data centric",
3914 "Voice centric"
3916 static const value_string gsm_a_gm_voice_domain_pref_for_eutran_vals[] = {
3917 {0x0, "CS Voice only"},
3918 {0x1, "IMS PS Voice only"},
3919 {0x2, "CS voice preferred, IMS PS Voice as secondary"},
3920 {0x3, "IMS PS voice preferred, CS Voice as secondary"},
3921 { 0, NULL }
3924 uint16_t
3925 de_gmm_voice_domain_pref(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
3927 uint32_t curr_offset;
3928 uint32_t bit_offset;
3930 curr_offset = offset;
3931 bit_offset = curr_offset<<3;
3933 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, 5, ENC_BIG_ENDIAN);
3934 bit_offset += 5;
3935 proto_tree_add_bits_item(tree, hf_gsm_a_gm_ue_usage_setting, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3936 bit_offset++;
3937 proto_tree_add_bits_item(tree, hf_gsm_a_gm_voice_domain_pref_for_eutran, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
3938 /*bit_offset += 2;
3939 curr_offset++;*/
3941 return len;
3944 /* [10] 10.5.5.29 P-TMSI type */
3945 static const true_false_string gsm_a_gm_ptmsi_type_value = {
3946 "Mapped P-TMSI",
3947 "Native P-TMSI"
3950 static uint16_t
3951 de_gmm_ptmsi_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
3953 uint32_t curr_offset, bit_offset;
3955 curr_offset = offset;
3956 bit_offset = (curr_offset<<3)+4;
3958 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
3959 bit_offset += 3;
3960 proto_tree_add_bits_item(tree, hf_gsm_a_gm_ptmsi_type, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3961 curr_offset++;
3963 return (curr_offset - offset);
3966 /* [10] 10.5.5.30 Location Area Identification 2 */
3967 static uint16_t
3968 de_gmm_lai_2(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string, int string_len)
3970 /* The Location Area Identification 2 value is coded as octet 2 to 6 of the */
3971 /* Location Area Identification information element */
3972 return de_lai(tvb, tree, pinfo, offset, len, add_string, string_len);
3975 /* [11] 10.5.5.31 Network resource identifier container */
3976 static uint16_t
3977 de_gmm_net_res_id_cont(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
3979 uint32_t curr_offset;
3980 uint32_t bit_offset;
3982 curr_offset = offset;
3983 bit_offset = curr_offset<<3;
3985 proto_tree_add_item(tree, hf_gsm_a_gm_nri_cont, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
3986 bit_offset += 10;
3987 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, 6, ENC_BIG_ENDIAN);
3989 return len;
3992 /* [13] 10.5.5.32 Extended DRX parameters */
3993 static const value_string gsm_a_gm_paging_time_window_vals[] = {
3994 {0x0, "Iu: 0 s / WB-S1/WB-N1: 1.28 s / NB-S1/NB-N1: 2.56 s"},
3995 {0x1, "Iu: 1 s / WB-S1/WB-N1: 2.56 s / NB-S1/NB-N1: 5.12 s"},
3996 {0x2, "Iu: 2 s / WB-S1/WB-N1: 3.84 s / NB-S1/NB-N1: 7.68 s"},
3997 {0x3, "Iu: 3 s / WB-S1/WB-N1: 5.12 s / NB-S1/NB-N1: 10.24 s"},
3998 {0x4, "Iu: 4 s / WB-S1/WB-N1: 6.4 s / NB-S1/NB-N1: 12.8 s"},
3999 {0x5, "Iu: 5 s / WB-S1/WB-N1: 7.68 s / NB-S1/NB-N1: 15.36 s"},
4000 {0x6, "Iu: 6 s / WB-S1/WB-N1: 8.96 s / NB-S1/NB-N1: 17.92 s"},
4001 {0x7, "Iu: 7 s / WB-S1/WB-N1: 10.24 s / NB-S1/NB-N1: 20.48 s"},
4002 {0x8, "Iu: 8 s / WB-S1/WB-N1: 11.52 s / NB-S1/NB-N1: 23.04 s"},
4003 {0x9, "Iu: 9 s / WB-S1/WB-N1: 12.8 s / NB-S1/NB-N1: 25.6 s"},
4004 {0xa, "Iu: 10 s / WB-S1/WB-N1: 14.08 s / NB-S1/NB-N1: 28.16 s"},
4005 {0xb, "Iu: 12 s / WB-S1/WB-N1: 15.36 s / NB-S1/NB-N1: 30.72 s"},
4006 {0xc, "Iu: 14 s / WB-S1/WB-N1: 16.64 s / NB-S1/NB-N1: 33.28 s"},
4007 {0xd, "Iu: 16 s / WB-S1/WB-N1: 17.92 s / NB-S1/NB-N1: 35.84 s"},
4008 {0xe, "Iu: 18 s / WB-S1/WB-N1: 19.2 s / NB-S1/NB-N1: 38.4 s"},
4009 {0xf, "Iu: 20 s / WB-S1/WB-N1: 20.48 s / NB-S1/NB-N1: 40.96 s"},
4010 { 0, NULL }
4013 static const value_string gsm_a_gm_edrx_vals[] = {
4014 {0x0, "GERAN: 1.88 s / UTRAN: 10.24 s / S1,NB-N1,WB-N1: 5.12 s / NR-5GCN: 2.56 s"},
4015 {0x1, "GERAN: 3.76 s / UTRAN: 20.48 s / S1,NB-N1,WB-N1: 10.24 s / NR-5GCN: 5.12 s"},
4016 {0x2, "GERAN: 7.53 s / UTRAN: 40.96 s / S1,NB-N1,WB-N1: 20.48 s / NR-5GCN: 10.24 s"},
4017 {0x3, "GERAN: 12.24 s / UTRAN: 81.92 s / S1,NB-N1,WB-N1: 40.96 s / NR-5GCN: 20,48 s"},
4018 {0x4, "GERAN: 24.48 s / UTRAN: 163.84 s / S1,NB-N1,WB-N1: 61.44 s / NR-5GCN: 40.96 s"},
4019 {0x5, "GERAN: 48.96 s / UTRAN: 327.68 s / S1,NB-N1,WB-N1: 81.92 s / NR-5GCN: 81.92 s"},
4020 {0x6, "GERAN: 97.92 s / UTRAN: 655.36 s / S1,NB-N1,WB-N1: 102.4 s / NR-5GCN: 163.84 s"},
4021 {0x7, "GERAN: 195.84 s / UTRAN: 1310.72 s / S1,NB-N1,WB-N1: 122.88 s / NR-5GCN: 327.68 s"},
4022 {0x8, "GERAN: 391.68 s / UTRAN: 1966.08 s / S1,NB-N1,WB-N1: 143.36 s / NR-5GCN: 655.36 s"},
4023 {0x9, "GERAN: 783.36 s / UTRAN: 2621.44 s / S1,NB-N1,WB-N1: 163.84 s / NR-5GCN: 1310.72 s"},
4024 {0xa, "GERAN: 1566.72 s / UTRAN: 10.24 s / S1,NB-N1,WB-N1: 327.68 s / NR-5GCN: 2621.44 s"},
4025 {0xb, "GERAN: 3133.44 s / UTRAN: 10.24 s / S1,NB-N1,WB-N1: 655.36 s / NR-5GCN: 5242.88 s"},
4026 {0xc, "GERAN: 1.88 s / UTRAN: 10.24 s / S1,NB-N1,WB-N1: 1310.72 s / NR-5GCN: 10485.76 s"},
4027 {0xd, "GERAN: 1.88 s / UTRAN: 10.24 s / S1,NB-N1,WB-N1: 2621.44 s / NR-5GCN: 2.56 s"},
4028 {0xe, "GERAN: 1.88 s / UTRAN: 10.24 s / S1,NB-N1,WB-N1: 5242.88 s / NR-5GCN: 2.56 s"},
4029 {0xf, "GERAN: 1.88 s / UTRAN: 10.24 s / S1,NB-N1,WB-N1: 10485.76 s / NR-5GCN: 2.56 s"},
4030 { 0, NULL }
4033 static const value_string gsm_a_gm_paging_time_window_nr_5gcn_vals[] = {
4034 {0x00, "NR-5GCN: 1.28 s"},
4035 {0x01, "NR-5GCN: 2.56 s"},
4036 {0x02, "NR-5GCN: 3.84 s"},
4037 {0x03, "NR-5GCN: 5.12 s"},
4038 {0x04, "NR-5GCN: 6.4 s"},
4039 {0x05, "NR-5GCN: 7.68 s"},
4040 {0x06, "NR-5GCN: 8.96 s"},
4041 {0x07, "NR-5GCN: 10.24 s"},
4042 {0x08, "NR-5GCN: 11.52 s"},
4043 {0x09, "NR-5GCN: 12.8 s"},
4044 {0x0a, "NR-5GCN: 14.08 s"},
4045 {0x0b, "NR-5GCN: 15.36 s"},
4046 {0x0c, "NR-5GCN: 16.64 s"},
4047 {0x0d, "NR-5GCN: 17.92 s"},
4048 {0x0e, "NR-5GCN: 19.2 s"},
4049 {0x0f, "NR-5GCN: 20.48 s"},
4050 {0x10, "NR-5GCN: 21.76 s"},
4051 {0x11, "NR-5GCN: 23.04 s"},
4052 {0x12, "NR-5GCN: 24.32 s"},
4053 {0x13, "NR-5GCN: 25.6 s"},
4054 {0x14, "NR-5GCN: 26.88 s"},
4055 {0x15, "NR-5GCN: 28.16 s"},
4056 {0x16, "NR-5GCN: 29.44 s"},
4057 {0x17, "NR-5GCN: 30.72 s"},
4058 {0x18, "NR-5GCN: 32 s"},
4059 {0x19, "NR-5GCN: 33.28 s"},
4060 {0x1a, "NR-5GCN: 34.56 s"},
4061 {0x1b, "NR-5GCN: 35.84 s"},
4062 {0x1c, "NR-5GCN: 37.12 s"},
4063 {0x1d, "NR-5GCN: 38.4 s"},
4064 {0x1e, "NR-5GCN: 39.68 s"},
4065 {0x1f, "NR-5GCN: 40.96 s"},
4066 { 0, NULL }
4069 static uint16_t
4070 de_gmm_ext_drx_params(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
4072 uint32_t curr_offset;
4074 curr_offset = offset;
4076 proto_tree_add_item(tree, hf_gsm_a_gm_paging_time_window, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4077 proto_tree_add_item(tree, hf_gsm_a_gm_edrx_value, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4078 curr_offset++;
4080 if ((curr_offset - offset) >= len)
4081 return len;
4083 proto_tree_add_item(tree, hf_gsm_a_gm_ext_paging_time_window, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4085 return len;
4088 /* [13] 10.5.5.33 Message authentication code */
4089 static uint16_t
4090 de_gmm_mac(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
4092 proto_tree_add_item(tree, hf_gsm_a_gm_mac, tvb, offset, 4, ENC_BIG_ENDIAN);
4094 return len;
4097 /* [13] 10.5.5.34 User Plane integrity indicator */
4098 static const true_false_string gsm_a_gm_up_integ_ind_value = {
4099 "MS shall enable integrity protection of user plane data in LLC layer",
4100 "MS shall disable integrity protection of user plane data in LLC layer"
4103 static uint16_t
4104 de_gmm_up_integ_ind(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
4106 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (offset << 3) + 4, 3, ENC_BIG_ENDIAN);
4107 proto_tree_add_item(tree, hf_gsm_a_gm_up_integ_ind, tvb, offset, 1, ENC_BIG_ENDIAN);
4109 /* no length check possible */
4110 return 1;
4113 /* [14] 10.5.5.35 DCN-ID */
4114 static uint16_t
4115 de_gmm_dcn_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
4117 proto_tree_add_item(tree, hf_gsm_a_gm_dcn_id, tvb, offset, 2, ENC_BIG_ENDIAN);
4119 return 2;
4122 /* [14] 10.5.5.36 PLMN identity of the CN operator */
4123 static uint16_t
4124 de_gmm_plmn_id_cn_operator(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
4126 dissect_e212_mcc_mnc(tvb, pinfo, tree, offset, E212_NONE, true);
4128 return 3;
4131 /* [14] 10.5.5.37 Non-3GPP NW provided policies */
4132 static const true_false_string gsm_a_gm_n3en_ind_value = {
4133 "Use of non-3GPP emergency numbers permitted",
4134 "Use of non-3GPP emergency numbers not permitted"
4137 static uint16_t
4138 de_gmm_non_3gpp_nw_prov_pol(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
4140 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (offset << 3) + 4, 3, ENC_BIG_ENDIAN);
4141 proto_tree_add_item(tree, hf_gsm_a_gm_n3en_ind, tvb, offset, 1, ENC_BIG_ENDIAN);
4143 /* no length check possible */
4144 return 1;
4148 * [7] 10.5.7.1
4150 static uint16_t
4151 de_gc_context_stat(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
4153 uint8_t oct;
4154 uint16_t pdp_nr;
4155 uint32_t curr_offset;
4157 curr_offset = offset;
4159 oct = tvb_get_uint8(tvb, curr_offset);
4161 for (pdp_nr=0; pdp_nr<16; pdp_nr++)
4163 if (pdp_nr == 8)
4165 curr_offset++;
4166 oct = tvb_get_uint8(tvb, curr_offset);
4168 proto_tree_add_uint_format(tree, hf_gsm_a_gm_nsapi, tvb, curr_offset, 1, oct&1, "NSAPI %d: %s (%u)", pdp_nr, pdp_str[oct&1], oct&1);
4169 oct>>=1;
4172 curr_offset++;
4174 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_gm_extraneous_data);
4176 return (curr_offset - offset);
4180 * [7] 10.5.7.2
4182 static const value_string gsm_a_gm_radio_prio_vals[] = {
4183 {0, "priority level 4 (lowest)" },
4184 {1, "priority level 1 (highest)"},
4185 {2, "priority level 2"},
4186 {3, "priority level 3"},
4187 {4, "priority level 4 (lowest)"},
4188 {5, "priority level 4 (lowest)"},
4189 {6, "priority level 4 (lowest)"},
4190 {7, "priority level 4 (lowest)"},
4191 {0, NULL}
4194 static uint16_t
4195 de_gc_radio_prio(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
4197 uint32_t curr_offset = offset;
4199 proto_tree_add_item(tree, hf_gsm_a_gm_radio_priority_pdp, tvb, curr_offset, 1, ENC_NA);
4201 curr_offset++;
4203 return (curr_offset - offset);
4207 * [9] 10.5.7.3 GPRS Timer
4209 static const value_string gsm_a_gm_gprs_timer_unit_vals[] = {
4210 { 0x00, "value is incremented in multiples of 2 seconds" },
4211 { 0x01, "value is incremented in multiples of 1 minute" },
4212 { 0x02, "value is incremented in multiples of decihours" },
4213 { 0x07, "value indicates that the timer is deactivated" },
4214 { 0, NULL }
4217 uint16_t
4218 de_gc_timer(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
4220 uint8_t oct;
4221 uint16_t val;
4222 const char *str;
4223 proto_item *item = NULL;
4224 proto_tree *subtree;
4226 oct = tvb_get_uint8(tvb, offset);
4227 val = oct&0x1f;
4229 switch (oct>>5)
4231 case 0:
4232 str = "sec";
4233 val *= 2;
4234 break;
4235 case 1:
4236 str = "min";
4237 break;
4238 case 2:
4239 str = "min";
4240 val *= 6;
4241 break;
4242 case 7:
4243 str = "";
4244 item = proto_tree_add_uint_format_value(tree, hf_gsm_a_gm_gprs_timer, tvb, offset, 1, val, "timer is deactivated");
4245 break;
4246 default:
4247 str = "min";
4248 break;
4251 if (item == NULL) {
4252 item = proto_tree_add_uint_format_value(tree, hf_gsm_a_gm_gprs_timer, tvb, offset, 1, val, "%u %s", val, str);
4255 subtree = proto_item_add_subtree(item, ett_gmm_gprs_timer);
4256 proto_tree_add_item(subtree, hf_gsm_a_gm_gprs_timer_unit, tvb, offset, 1, ENC_BIG_ENDIAN);
4257 proto_tree_add_item(subtree, hf_gsm_a_gm_gprs_timer_value, tvb, offset, 1, ENC_BIG_ENDIAN);
4259 /* no length check possible */
4260 return 1;
4264 * [7] 10.5.7.4
4266 static uint16_t
4267 de_gc_timer2(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string, int string_len _U_)
4269 uint8_t oct;
4270 uint16_t val;
4271 uint32_t curr_offset;
4272 const char *str = NULL;
4273 proto_tree *subtree;
4274 proto_item *item = NULL;
4276 curr_offset = offset;
4278 oct = tvb_get_uint8(tvb, curr_offset);
4280 val = oct&0x1f;
4282 switch (oct>>5)
4284 case 0:
4285 str = "sec";
4286 val *= 2;
4287 break;
4288 case 1:
4289 str = "min";
4290 break;
4291 case 2:
4292 str = "min";
4293 val *= 6;
4294 break;
4295 case 7:
4296 item = proto_tree_add_uint_format_value(tree, hf_gsm_a_gm_gprs_timer2, tvb, curr_offset, 1, val, "timer is deactivated");
4297 break;
4298 default:
4299 str = "min";
4300 break;
4303 if (item == NULL) {
4304 item = proto_tree_add_uint_format_value(tree, hf_gsm_a_gm_gprs_timer2, tvb, curr_offset, 1, val, "%u %s %s", val, str, add_string ? add_string : "");
4307 subtree = proto_item_add_subtree(item, ett_gmm_gprs_timer);
4308 proto_tree_add_item(subtree, hf_gsm_a_gm_gprs_timer2_unit, tvb, offset, 1, ENC_BIG_ENDIAN);
4309 proto_tree_add_item(subtree, hf_gsm_a_gm_gprs_timer2_value, tvb, offset, 1, ENC_BIG_ENDIAN);
4310 curr_offset++;
4312 return (curr_offset - offset);
4316 * [10] 10.5.7.4a
4318 static const value_string gsm_a_gm_gprs_timer3_unit_vals[] = {
4319 { 0x00, "value is incremented in multiples of 10 minutes" },
4320 { 0x01, "value is incremented in multiples of 1 hour" },
4321 { 0x02, "value is incremented in multiples of 10 hours" },
4322 { 0x03, "value is incremented in multiples of 2 seconds" },
4323 { 0x04, "value is incremented in multiples of 30 seconds" },
4324 { 0x05, "value is incremented in multiples of 1 minute" },
4325 { 0x06, "value is incremented in multiples of 320 hours (for T3312/T3412 extended), 1 hour otherwise" },
4326 { 0x07, "value indicates that the timer is deactivated" },
4327 { 0, NULL }
4330 uint16_t
4331 de_gc_timer3(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
4333 uint8_t oct;
4334 uint16_t val;
4335 uint32_t curr_offset;
4336 const char *str = NULL;
4337 proto_tree *subtree;
4338 proto_item *item = NULL;
4340 curr_offset = offset;
4342 oct = tvb_get_uint8(tvb, curr_offset);
4344 val = oct&0x1f;
4346 switch (oct>>5)
4348 case 0:
4349 str = "min";
4350 val *= 10;
4351 break;
4352 case 1:
4353 if (val == 1) {
4354 str = "hour";
4355 } else {
4356 str = "hours";
4358 break;
4359 case 2:
4360 str = "hours";
4361 val *= 10;
4362 break;
4363 case 3:
4364 str = "sec";
4365 val *= 2;
4366 break;
4367 case 4:
4368 str = "sec";
4369 val *= 30;
4370 break;
4371 case 5:
4372 str = "min";
4373 break;
4374 case 6:
4375 str = "hours";
4376 val *= 320;
4377 break;
4378 case 7:
4379 item = proto_tree_add_uint_format_value(tree, hf_gsm_a_gm_gprs_timer3, tvb, curr_offset, 1, val, "timer is deactivated");
4380 break;
4383 if (item == NULL) {
4384 item = proto_tree_add_uint_format_value(tree, hf_gsm_a_gm_gprs_timer3, tvb, curr_offset, 1, val, "%u %s", val, str);
4387 subtree = proto_item_add_subtree(item, ett_gmm_gprs_timer);
4388 proto_tree_add_item(subtree, hf_gsm_a_gm_gprs_timer3_unit, tvb, offset, 1, ENC_BIG_ENDIAN);
4389 proto_tree_add_item(subtree, hf_gsm_a_gm_gprs_timer3_value, tvb, offset, 1, ENC_BIG_ENDIAN);
4390 curr_offset++;
4392 return (curr_offset - offset);
4396 * [7] 10.5.7.5
4398 static uint16_t
4399 de_gc_radio_prio2(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
4401 uint32_t curr_offset = offset;
4403 /* IMPORTANT - IT'S ASSUMED THAT THE INFORMATION IS IN THE HIGHER NIBBLE */
4404 proto_tree_add_item(tree, hf_gsm_a_gm_radio_priority_tom8, tvb, curr_offset, 1, ENC_NA);
4406 curr_offset++;
4408 return (curr_offset - offset);
4412 * [8] 10.5.7.6 MBMS context status
4414 static uint16_t
4415 de_gc_mbms_context_stat(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
4417 uint32_t curr_offset;
4418 unsigned i;
4419 uint8_t oct, j;
4421 curr_offset = offset;
4423 for (i=0; i<len; i++)
4425 oct = tvb_get_uint8(tvb, curr_offset);
4427 for (j=0; j<8; j++)
4429 proto_tree_add_uint_format(tree, hf_gsm_a_gm_nsapi, tvb, curr_offset, 1, oct&1, "NSAPI %d: %s (%u)", 128+i*8+j, pdp_str[oct&1], oct&1);
4430 oct>>=1;
4432 curr_offset++;
4435 return (len);
4439 * [8] 10.5.7.7 Uplink data status
4441 static const true_false_string gsm_a_gm_nsapi_ul_stat_vals = {
4442 "uplink data are pending for the preserved PDP context",
4443 "no uplink data are pending for the preserved PDP context or the PDP context is PDP-INACTIVE or is PDP-ACTIVE with a RAB already established"
4446 static uint16_t
4447 de_gc_uplink_data_stat(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
4449 uint32_t curr_offset;
4450 uint32_t bit_offset;
4452 curr_offset = offset;
4453 bit_offset = curr_offset<<3;
4455 proto_tree_add_bits_item(tree, hf_gsm_a_gm_nsapi_7_ul_stat, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
4456 bit_offset++;
4457 proto_tree_add_bits_item(tree, hf_gsm_a_gm_nsapi_6_ul_stat, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
4458 bit_offset++;
4459 proto_tree_add_bits_item(tree, hf_gsm_a_gm_nsapi_5_ul_stat, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
4460 bit_offset++;
4461 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, 5, ENC_BIG_ENDIAN);
4462 bit_offset += 5;
4463 curr_offset++;
4464 proto_tree_add_bits_item(tree, hf_gsm_a_gm_nsapi_15_ul_stat, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
4465 bit_offset++;
4466 proto_tree_add_bits_item(tree, hf_gsm_a_gm_nsapi_14_ul_stat, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
4467 bit_offset++;
4468 proto_tree_add_bits_item(tree, hf_gsm_a_gm_nsapi_13_ul_stat, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
4469 bit_offset++;
4470 proto_tree_add_bits_item(tree, hf_gsm_a_gm_nsapi_12_ul_stat, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
4471 bit_offset++;
4472 proto_tree_add_bits_item(tree, hf_gsm_a_gm_nsapi_11_ul_stat, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
4473 bit_offset++;
4474 proto_tree_add_bits_item(tree, hf_gsm_a_gm_nsapi_10_ul_stat, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
4475 bit_offset++;
4476 proto_tree_add_bits_item(tree, hf_gsm_a_gm_nsapi_9_ul_stat, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
4477 bit_offset++;
4478 proto_tree_add_bits_item(tree, hf_gsm_a_gm_nsapi_8_ul_stat, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
4480 bit_offset++;
4481 curr_offset++;
4483 return (len);
4487 * [8] 10.5.7.8 Device properties
4489 static const true_false_string gsm_a_gm_device_prop_low_prio_value = {
4490 "MS is configured for NAS signalling low priority",
4491 "MS is not configured for NAS signalling low priority"
4494 static uint16_t
4495 de_gc_device_properties(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
4497 uint32_t curr_offset;
4498 uint32_t bit_offset;
4500 curr_offset = offset;
4501 bit_offset = (curr_offset<<3)+4;
4503 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
4504 bit_offset += 3;
4505 proto_tree_add_bits_item(tree, hf_gsm_a_gm_device_prop_low_prio, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
4506 curr_offset++;
4508 return (curr_offset - offset);
4512 * [7] 10.5.6.1
4514 uint16_t
4515 de_sm_apn(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
4517 uint32_t curr_offset;
4519 curr_offset = offset;
4521 proto_tree_add_item(tree, hf_gsm_a_gm_apn, tvb, curr_offset, len, ENC_APN_STR | ENC_NA);
4522 curr_offset += len;
4524 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_gm_extraneous_data);
4526 return (curr_offset - offset);
4530 * [7] 10.5.6.2
4532 static uint16_t
4533 de_sm_nsapi(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string, int string_len _U_)
4535 uint8_t oct;
4536 uint32_t curr_offset;
4538 curr_offset = offset;
4540 oct = tvb_get_uint8(tvb, curr_offset);
4542 proto_tree_add_uint_format_value(tree, hf_gsm_a_gm_nsapi, tvb, curr_offset, 1, oct&0x0f, "0x%02x (%u) %s", oct&0x0f, oct&0x0f, add_string ? add_string : "");
4544 curr_offset++;
4546 return (curr_offset - offset);
4550 * [7] 10.5.6.3 Protocol configuration options
4552 static const range_string gsm_a_sm_pco_ms2net_prot_vals[] = {
4553 { 0x0001, 0x0001, "P-CSCF IPv6 Address Request" },
4554 { 0x0002, 0x0002, "IM CN Subsystem Signaling Flag" },
4555 { 0x0003, 0x0003, "DNS Server IPv6 Address Request" },
4556 { 0x0004, 0x0004, "Not Supported" },
4557 { 0x0005, 0x0005, "MS Support of Network Requested Bearer Control indicator" },
4558 { 0x0006, 0x0006, "Reserved" },
4559 { 0x0007, 0x0007, "DSMIPv6 Home Agent Address Request" },
4560 { 0x0008, 0x0008, "DSMIPv6 Home Network Prefix Request" },
4561 { 0x0009, 0x0009, "DSMIPv6 IPv4 Home Agent Address Request" },
4562 { 0x000a, 0x000a, "IP address allocation via NAS signalling" },
4563 { 0x000b, 0x000b, "IPv4 address allocation via DHCPv4" },
4564 { 0x000c, 0x000c, "P-CSCF IPv4 Address Request" },
4565 { 0x000d, 0x000d, "DNS Server IPv4 Address Request" },
4566 { 0x000e, 0x000e, "MSISDN Request" },
4567 { 0x000f, 0x000f, "IFOM-Support-Request" },
4568 { 0x0010, 0x0010, "IPv4 Link MTU Request" },
4569 { 0x0011, 0x0011, "MS support of Local address in TFT indicator" },
4570 { 0x0012, 0x0012, "P-CSCF Re-selection support" },
4571 { 0x0013, 0x0013, "NBIFOM request indicator" },
4572 { 0x0014, 0x0014, "NBIFOM mode" },
4573 { 0x0015, 0x0015, "Non-IP Link MTU Request" },
4574 { 0x0016, 0x0016, "APN rate control support indicator" },
4575 { 0x0017, 0x0017, "3GPP PS data off UE status" },
4576 { 0x0018, 0x0018, "Reliable Data Service request indicator" },
4577 { 0x0019, 0x0019, "Additional APN rate control for exception data support indicator" },
4578 { 0x001a, 0x001a, "PDU session ID" },
4579 { 0x001b, 0x001f, "Reserved" },
4580 { 0x0020, 0x0020, "Ethernet Frame Payload MTU Request" },
4581 { 0x0021, 0x0021, "Unstructured Link MTU Request" },
4582 { 0x0022, 0x0022, "5GSM cause value" },
4583 { 0x0023, 0x0023, "QoS rules with the length of two octets support indicator" },
4584 { 0x0024, 0x0024, "QoS flow descriptions with the length of two octets support indicator" },
4585 { 0x0027, 0x0027, "ACS information request" },
4586 { 0x0030, 0x0030, "ATSSS request" },
4587 { 0x0031, 0x0031, "DNS server security information indicator" },
4588 { 0x0032, 0x0032, "ECS configuration information provisioning support indicator" },
4589 { 0x0036, 0x0036, "PVS information request" },
4590 { 0x0039, 0x0039, "DNS server security protocol support" },
4591 { 0x003a, 0x003a, "EAS rediscovery support indication" },
4592 { 0x0041, 0x0041, "Service-level-AA container with the length of two octets" },
4593 { 0x0047, 0x0047, "EDC support indicator" },
4594 { 0x004a, 0x004a, "MS support of MAC address range in 5GS indicator" },
4595 { 0x0050, 0x0050, "SDNAEPC support indicator" },
4596 { 0x0051, 0x0051, "SDNAEPC EAP message with the length of two octets" },
4597 { 0x0052, 0x0052, "SDNAEPC DN-specific identity" },
4598 { 0x0056, 0x0056, "UE policy container with the length of two octets" },
4599 { 0xff00, 0xffff, "Operator Specific Use" },
4600 { 0, 0, NULL }
4602 static const range_string gsm_a_sm_pco_net2ms_prot_vals[] = {
4603 { 0x0001, 0x0001, "P-CSCF IPv6 Address" },
4604 { 0x0002, 0x0002, "IM CN Subsystem Signaling Flag" },
4605 { 0x0003, 0x0003, "DNS Server IPv6 Address" },
4606 { 0x0004, 0x0004, "Policy Control rejection code" },
4607 { 0x0005, 0x0005, "Selected Bearer Control Mode" },
4608 { 0x0006, 0x0006, "Reserved" },
4609 { 0x0007, 0x0007, "DSMIPv6 Home Agent Address" },
4610 { 0x0008, 0x0008, "DSMIPv6 Home Network Prefix" },
4611 { 0x0009, 0x0009, "DSMIPv6 IPv4 Home Agent Address" },
4612 { 0x000a, 0x000a, "Reserved" },
4613 { 0x000b, 0x000b, "Reserved" },
4614 { 0x000c, 0x000c, "P-CSCF IPv4 Address" },
4615 { 0x000d, 0x000d, "DNS Server IPv4 Address" },
4616 { 0x000e, 0x000e, "MSISDN" },
4617 { 0x000f, 0x000f, "IFOM-Support" },
4618 { 0x0010, 0x0010, "IPv4 Link MTU" },
4619 { 0x0011, 0x0011, "Network support of Local address in TFT indicator" },
4620 { 0x0012, 0x0012, "Reserved" },
4621 { 0x0013, 0x0013, "NBIFOM accepted indicator" },
4622 { 0x0014, 0x0014, "NBIFOM mode" },
4623 { 0x0015, 0x0015, "Non-IP Link MTU" },
4624 { 0x0016, 0x0016, "APN rate control parameters" },
4625 { 0x0017, 0x0017, "3GPP PS data off support indication" },
4626 { 0x0018, 0x0018, "Reliable Data Service accepted indicator" },
4627 { 0x0019, 0x0019, "Additional APN rate control for exception data parameters" },
4628 { 0x001a, 0x001a, "Reserved" },
4629 { 0x001b, 0x001b, "S-NSSAI" },
4630 { 0x001c, 0x001c, "QoS rules" },
4631 { 0x001d, 0x001d, "Session-AMBR" },
4632 { 0x001e, 0x001e, "PDU session address lifetime" },
4633 { 0x001f, 0x001f, "QoS flow descriptions" },
4634 { 0x0020, 0x0020, "Ethernet Frame Payload MTU" },
4635 { 0x0021, 0x0021, "Unstructured Link MTU" },
4636 { 0x0022, 0x0022, "Reserved" },
4637 { 0x0023, 0x0023, "QoS rules with the length of two octets" },
4638 { 0x0024, 0x0024, "QoS flow descriptions with the length of two octets" },
4639 { 0x0025, 0x0025, "Small data rate control parameters" },
4640 { 0x0026, 0x0026, "Additional small data rate control for exception data parameters" },
4641 { 0x0027, 0x0027, "ACS information" },
4642 { 0x0028, 0x0028, "Initial small data rate control parameters" },
4643 { 0x0029, 0x0029, "Initial additional small data rate control for exception data parameters" },
4644 { 0x002a, 0x002a, "Initial APN rate control parameters" },
4645 { 0x002b, 0x002b, "Initial additional APN rate control for exception data parameters" },
4646 { 0x0030, 0x0030, "ATSSS response with the length of two octets" },
4647 { 0x0031, 0x0031, "DNS server security information with length of two octets" },
4648 { 0x0032, 0x0032, "ECS address with the length of two octets" },
4649 { 0x0035, 0x0035, "ECSP identifier" },
4650 { 0x0036, 0x0036, "PVS IPv4 Address" },
4651 { 0x0037, 0x0037, "PVS IPv6 Address" },
4652 { 0x0038, 0x0038, "PVS name" },
4653 { 0x003a, 0x003a, "EAS rediscovery indication without indicated impact" },
4654 { 0x003b, 0x003b, "EAS rediscovery indication with impacted EAS IPv4 address range" },
4655 { 0x003c, 0x003c, "EAS rediscovery indication with impacted EAS IPv6 address range" },
4656 { 0x003d, 0x003d, "EAS rediscovery indication with impacted EAS FQDN" },
4657 { 0x003e, 0x003e, "Uplink data not allowed" },
4658 { 0x003f, 0x003f, "Uplink data allowed" },
4659 { 0x0040, 0x0040, "UAS services not allowed indication" },
4660 { 0x0041, 0x0041, "Service-level-AA container with the length of two octets" },
4661 { 0x0048, 0x0048, "EDC usage allowed indicator" },
4662 { 0x0049, 0x0049, "EDC usage required indicator" },
4663 { 0x004a, 0x004a, "Network support of MAC address range in 5GS indicator" },
4664 { 0x0051, 0x0051, "SDNAEPC EAP message with the length of two octets" },
4665 { 0x0056, 0x0056, "UE policy container with the length of two octets" },
4666 { 0xff00, 0xffff, "Operator Specific Use" },
4667 { 0, 0, NULL }
4670 static const value_string gsm_a_gm_link_dir_vals[] = {
4671 { -1, "Unknown" },
4672 { 0x0, "MS to network" },
4673 { 0x1, "Network to MS" },
4674 { 0, NULL }
4677 static const value_string gsm_a_gm_sel_bearer_ctrl_mode_vals[] = {
4678 { 1, "MS only" },
4679 { 2, "MS/NW" },
4680 { 0, NULL }
4683 static const value_string gsm_a_gm_nbifom_mode_vals[] = {
4684 { 0, "UE-initiated" },
4685 { 1, "Network-initiated" },
4686 { 0, NULL }
4689 static const true_false_string gsm_a_gm_apn_rate_ctrl_params_aer_value = {
4690 "Additional exception reports at maximum rate reached are allowed",
4691 "Additional exception reports at maximum rate reached are not allowed"
4694 static const value_string gsm_a_gm_apn_rate_ctrl_ul_time_unit_vals[] = {
4695 { 0, "Unrestricted" },
4696 { 1, "Minute" },
4697 { 2, "Hour" },
4698 { 3, "Day" },
4699 { 4, "Week" },
4700 { 0, NULL }
4703 static const value_string gsm_a_gm_sm_pco_3gpp_data_off_ue_status_vals[] = {
4704 { 1, "Deactivated"},
4705 { 2, "Activated"},
4706 { 0, NULL}
4709 static const value_string gsm_a_gm_sm_pco_dns_serv_sec_info_type_vals[] = {
4710 { 0, "Security protocol type"},
4711 { 1, "Port number"},
4712 { 2, "Authentication domain name"},
4713 { 3, "SPKI pin set"},
4714 { 4, "Root certificate"},
4715 { 5, "Raw public key"},
4716 { 0, NULL}
4719 static const value_string gsm_a_gm_sm_pco_dns_serv_sec_info_sec_proto_vals[] = {
4720 { 0, "TLS"},
4721 { 1, "DTLS"},
4722 { 0, NULL}
4725 static const value_string gsm_a_gm_sm_pco_ecs_addr_type_vals[] = {
4726 { 0, "IPv4"},
4727 { 1, "IPv6"},
4728 { 2, "FQDN"},
4729 { 0, NULL}
4732 static const value_string gsm_a_gm_sm_pco_ecs_addr_spatial_valid_cond_type_vals[] = {
4733 { 0, "No spatial validity condition"},
4734 { 1, "Geographical service area"},
4735 { 2, "Tracking area"},
4736 { 3, "Country-wide"},
4737 { 0, NULL}
4740 static const value_string gsm_a_gm_sm_pco_dns_serv_sec_prot_support_vals[] = {
4741 { 1, "TLS"},
4742 { 2, "DTLS"},
4743 { 0, NULL}
4746 uint16_t
4747 de_sm_pco(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
4749 proto_item *generated_item;
4750 uint32_t curr_offset;
4751 int curr_len;
4752 unsigned char oct;
4753 int link_dir;
4754 proto_item *pco_item;
4755 proto_tree *pco_tree;
4757 curr_len = (int)len; /* length field is only 1 or 2 bytes long */
4758 curr_offset = offset;
4760 oct = tvb_get_uint8(tvb, curr_offset);
4762 link_dir = pinfo->link_dir;
4763 generated_item = proto_tree_add_int(tree, hf_gsm_a_gm_link_dir, tvb, curr_offset, 0, link_dir);
4764 proto_item_set_generated(generated_item);
4767 /* 1 ext 0 0 0 0 Spare Configuration protocol */
4768 proto_tree_add_item(tree, hf_gsm_a_sm_ext, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4769 /* Configuration protocol (octet 3)
4770 * Bits
4771 * 3 2 1
4772 * 0 0 0 PPP for use with IP PDP type or IP PDN type (see 3GPP TS 24.301 [120])
4774 * All other values are interpreted as PPP in this version of the protocol.
4775 * (3GPP TS 24.008 version 9.4.0 Release 9)
4777 proto_tree_add_uint_format_value(tree, hf_gsm_a_gm_configuration_protocol, tvb, curr_offset, 1, oct&0x07, "PPP for use with IP PDP type or IP PDN type (%u)", oct&0x07);
4778 curr_len--;
4779 curr_offset++;
4781 while (curr_len >= 3) /* 2 bytes protocol/container ID + 1 byte length */
4783 uint32_t e_len;
4784 uint16_t prot;
4785 tvbuff_t *l3_tvb;
4787 /* Protocol ID 1 octet 4
4788 * octet 5
4789 * Length of protocol ID 1 contents octet 6
4790 * Protocol ID 1 contents octet 7
4793 prot = tvb_get_ntohs(tvb, curr_offset);
4794 pco_item = proto_tree_add_uint_format_value(tree, hf_gsm_a_gm_pco_pid, tvb, curr_offset, 2, (uint32_t)prot,
4795 "%s (0x%04x)",
4796 link_dir ?
4797 rval_to_str_const((uint32_t)prot, gsm_a_sm_pco_net2ms_prot_vals, val_to_str_ext_const(prot, &ppp_vals_ext, "Unknown")) :
4798 rval_to_str_const((uint32_t)prot, gsm_a_sm_pco_ms2net_prot_vals, val_to_str_ext_const(prot, &ppp_vals_ext, "Unknown")),
4799 (uint32_t)prot);
4800 pco_tree = proto_item_add_subtree(pco_item, ett_sm_pco);
4802 curr_len -= 2;
4803 curr_offset += 2;
4804 if ((link_dir == P2P_DIR_DL && (prot == 0x0023 || prot == 0x0024 || prot == 0x0030 || prot == 0x0031 ||
4805 prot == 0x0032 || prot == 0x0041 || prot == 0x0051 || prot == 0x0056)) ||
4806 (link_dir == P2P_DIR_UL && (prot == 0x0041 || prot == 0x0051 || prot == 0x0056))) {
4807 proto_tree_add_item_ret_uint(pco_tree, hf_gsm_a_gm_sm_pco_length2, tvb, curr_offset, 2, ENC_BIG_ENDIAN, &e_len);
4808 curr_len -= 2;
4809 curr_offset += 2;
4810 } else {
4811 proto_tree_add_item_ret_uint(pco_tree, hf_gsm_a_gm_sm_pco_length, tvb, curr_offset, 1, ENC_NA, &e_len);
4812 curr_len -= 1;
4813 curr_offset += 1;
4816 switch (prot)
4818 case 0x0001:
4819 if ((link_dir == P2P_DIR_DL) && (e_len > 0)) {
4820 proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_pcscf_ipv6, tvb, curr_offset, 16, ENC_NA);
4822 break;
4823 case 0x0003:
4824 if ((link_dir == P2P_DIR_DL) && (e_len > 0)) {
4825 proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_dns_ipv6, tvb, curr_offset, 16, ENC_NA);
4827 break;
4828 case 0x0007:
4829 if ((link_dir == P2P_DIR_DL) && (e_len > 0)) {
4830 proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_dsmipv6_home_agent_ipv6, tvb, curr_offset, 16, ENC_NA);
4832 break;
4833 case 0x0002:
4834 case 0x0006:
4835 case 0x000A:
4836 case 0x000B:
4837 case 0x000F:
4838 case 0x0011:
4839 case 0x0012:
4840 case 0x0013:
4841 case 0x0018:
4842 case 0x003e:
4843 case 0x003f:
4844 case 0x0040:
4845 case 0x0047:
4846 case 0x0048:
4847 case 0x0049:
4848 case 0x004a:
4849 case 0x0050:
4850 break;
4851 case 0x0004:
4852 if ((link_dir == P2P_DIR_DL) && (e_len == 1)) {
4853 proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_reject_code, tvb, curr_offset, 1, ENC_NA);
4855 break;
4856 case 0x0005:
4857 if ((link_dir == P2P_DIR_DL) && (e_len == 1)) {
4858 proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_sel_bearer_ctrl_mode, tvb, curr_offset, 1, ENC_NA);
4860 break;
4861 case 0x0008:
4862 if ((link_dir == P2P_DIR_DL) && (e_len > 0)) {
4863 proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_dsmipv6_home_network_ipv6, tvb, curr_offset, 16, ENC_NA);
4864 proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_dsmipv6_home_network_prefix_length, tvb, curr_offset+16, 1, ENC_NA);
4866 break;
4867 case 0x0009:
4868 if ((link_dir == P2P_DIR_DL) && (e_len > 0)) {
4869 proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_dsmipv6_home_agent_ipv4, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
4871 break;
4872 case 0x000C:
4873 if ((link_dir == P2P_DIR_DL) && (e_len > 0)) {
4874 proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_pcscf_ipv4, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
4876 break;
4877 case 0x000D:
4878 if ((link_dir == P2P_DIR_DL) && (e_len > 0)) {
4879 proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_dns_ipv4, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
4881 break;
4882 case 0x000E:
4883 if ((link_dir == P2P_DIR_DL) && (e_len > 0)) {
4884 dissect_e164_msisdn(tvb, pco_tree, curr_offset, e_len, E164_ENC_BCD);
4886 break;
4887 case 0x0010:
4888 if ((link_dir == P2P_DIR_DL) && (e_len == 2)) {
4889 proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_ipv4_link_mtu_size, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
4891 break;
4892 case 0x0014:
4893 if (e_len == 1) {
4894 proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_nbifom_mode, tvb, curr_offset, 1, ENC_NA);
4896 break;
4897 case 0x0015:
4898 if ((link_dir == P2P_DIR_DL) && (e_len == 2)) {
4899 proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_non_ip_link_mtu_size, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
4901 break;
4902 case 0x0016:
4903 case 0x0025:
4904 if (link_dir == P2P_DIR_DL) {
4905 proto_tree_add_bits_item(pco_tree, hf_gsm_a_spare_bits, tvb, (curr_offset << 3), 4, ENC_BIG_ENDIAN);
4906 proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_apn_rate_ctrl_params_aer, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4907 proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_apn_rate_ctrl_params_ul_time_unit, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4908 if (e_len >= 4) {
4909 proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_apn_rate_ctrl_params_max_ul_rate, tvb, curr_offset+1, 3, ENC_BIG_ENDIAN);
4912 break;
4913 case 0x0017:
4914 if (link_dir == P2P_DIR_UL && e_len >= 1) {
4915 proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_3gpp_data_off_ue_status, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4917 break;
4918 case 0x0019:
4919 case 0x0026:
4920 if (link_dir == P2P_DIR_DL) {
4921 proto_tree_add_bits_item(pco_tree, hf_gsm_a_spare_bits, tvb, (curr_offset << 3), 5, ENC_BIG_ENDIAN);
4922 proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_add_apn_rate_ctrl_params_ul_time_unit, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4923 if (e_len >= 3) {
4924 proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_add_apn_rate_ctrl_params_max_ul_rate, tvb, curr_offset+1, 2, ENC_BIG_ENDIAN);
4927 break;
4928 case 0x001a:
4929 if (link_dir == P2P_DIR_UL) {
4930 proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_pdu_session_id, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4932 break;
4933 case 0x001b:
4934 if (link_dir == P2P_DIR_DL && e_len >= 4) {
4935 de_nas_5gs_cmn_s_nssai(tvb, pco_tree, pinfo, curr_offset, e_len - 3, NULL, 0);
4936 dissect_e212_mcc_mnc(tvb, pinfo, pco_tree, curr_offset + e_len - 3, E212_NONE, true);
4938 break;
4939 case 0x001c:
4940 case 0x0023:
4941 if (link_dir == P2P_DIR_DL) {
4942 de_nas_5gs_sm_qos_rules(tvb, pco_tree, pinfo, curr_offset, e_len, NULL, 0);
4944 break;
4945 case 0x001d:
4946 if (link_dir == P2P_DIR_DL) {
4947 /* Network to MS direction */
4948 de_nas_5gs_sm_session_ambr(tvb, pco_tree, pinfo, curr_offset, e_len, NULL, 0);
4950 break;
4951 case 0x001e:
4952 if (link_dir == P2P_DIR_DL && e_len == 2) {
4953 /* When the container identifier indicates PDU session address lifetime,
4954 * the length of container identifier contents indicates a length equal to two.
4955 * The container identifier contents field contains the binary coded representation
4956 * of how long the network is willing to maintain the PDU session in units of seconds.
4957 * ...If the length of container identifier contents is different from two octets,
4958 * then it shall be ignored by the receiver
4960 proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_pdu_session_address_lifetime, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
4962 break;
4963 case 0x001f:
4964 case 0x0024:
4965 if (link_dir == P2P_DIR_DL && e_len > 0) {
4966 de_nas_5gs_sm_qos_flow_des(tvb, pco_tree, pinfo, curr_offset, e_len, NULL, 0);
4968 break;
4969 case 0x0020:
4970 if (link_dir == P2P_DIR_DL && e_len == 2) {
4971 proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_eth_frame_payload_mtu, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
4973 break;
4974 case 0x0021:
4975 if (link_dir == P2P_DIR_DL && e_len == 2) {
4976 proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_unstruct_link_mtu, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
4978 break;
4979 case 0x0022:
4980 if (link_dir == P2P_DIR_UL && e_len == 1) {
4981 proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_5gsm_cause, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4983 break;
4984 case 0x0027:
4985 if (link_dir == P2P_DIR_DL && e_len > 0) {
4986 proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_acs_info, tvb, curr_offset, e_len, ENC_NA|ENC_UTF_8);
4988 break;
4989 case 0x0028:
4990 case 0x0029:
4991 case 0x002a:
4992 case 0x002b:
4993 if (link_dir == P2P_DIR_DL && e_len == 7) {
4994 proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_init_small_data_rate_ctrl_params_max_ul_rate_allowed, tvb, curr_offset, 3, ENC_BIG_ENDIAN);
4995 proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_init_small_data_rate_ctrl_params_termination_timestamp, tvb, curr_offset+4, 4, ENC_TIME_SECS_NTP|ENC_BIG_ENDIAN);
4997 break;
4998 case 0x0030:
4999 if (link_dir == P2P_DIR_DL && e_len > 0) {
5000 proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_atsss_response, tvb, curr_offset, e_len, ENC_NA);
5002 break;
5003 case 0x0031:
5004 if (link_dir == P2P_DIR_DL && e_len > 1) {
5005 uint32_t type;
5007 proto_tree_add_item_ret_uint(pco_tree, hf_gsm_a_gm_sm_pco_dns_serv_sec_info_type, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &type);
5008 switch (type) {
5009 case 0:
5010 proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_dns_serv_sec_info_sec_proto_type, tvb, curr_offset+1, 1, ENC_BIG_ENDIAN);
5011 break;
5012 case 1:
5013 proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_dns_serv_sec_info_port_number, tvb, curr_offset+1, 2, ENC_BIG_ENDIAN);
5014 break;
5015 case 2:
5016 proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_dns_serv_sec_info_auth_domain_name, tvb, curr_offset+1, e_len-1, ENC_APN_STR | ENC_NA);
5017 break;
5018 case 3:
5019 proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_dns_serv_sec_info_spki_pin_set, tvb, curr_offset+1, e_len-1, ENC_NA);
5020 break;
5021 case 4:
5022 proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_dns_serv_sec_info_root_certificate, tvb, curr_offset+1, e_len-1, ENC_NA);
5023 break;
5024 case 5:
5025 proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_dns_serv_sec_info_raw_public_key, tvb, curr_offset+1, e_len-1, ENC_NA);
5026 break;
5027 default:
5028 proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_dns_serv_sec_info_value_part, tvb, curr_offset+1, e_len-1, ENC_NA);
5029 break;
5032 break;
5033 case 0x0032:
5034 if (link_dir == P2P_DIR_DL && e_len > 1) {
5035 uint32_t ecs_addr_type, ie_offset, fqdn_len;
5037 ie_offset = curr_offset;
5038 proto_tree_add_item_ret_uint(pco_tree, hf_gsm_a_gm_sm_pco_ecs_addr_type, tvb, ie_offset, 1, ENC_BIG_ENDIAN, &ecs_addr_type);
5039 proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_ecs_addr_spatial_valid_cond_type, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
5040 ie_offset++;
5041 switch (ecs_addr_type) {
5042 case 0:
5043 proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_ecs_addr_ipv4, tvb, ie_offset, 4, ENC_BIG_ENDIAN);
5044 ie_offset += 4;
5045 break;
5046 case 1:
5047 proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_ecs_addr_ipv6, tvb, ie_offset, 16, ENC_NA);
5048 ie_offset += 16;
5049 break;
5050 case 2:
5051 proto_tree_add_item_ret_uint(pco_tree, hf_gsm_a_gm_sm_pco_ecs_addr_fqdn_len, tvb, ie_offset, 1, ENC_BIG_ENDIAN, &fqdn_len);
5052 ie_offset++;
5053 proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_ecs_addr_fqdn, tvb, ie_offset, fqdn_len, ENC_NA|ENC_APN_STR);
5054 ie_offset += fqdn_len;
5055 break;
5056 default:
5057 goto skip_ecs_addr;
5059 if ((ie_offset - curr_offset) < e_len) {
5060 uint32_t cont_len;
5062 proto_tree_add_item_ret_uint(pco_tree, hf_gsm_a_gm_sm_pco_ecs_addr_spatial_valid_cond_cont_len, tvb, ie_offset, 1, ENC_BIG_ENDIAN, &cont_len);
5063 ie_offset++;
5064 proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_ecs_addr_spatial_valid_cond_cont, tvb, ie_offset, cont_len, ENC_NA);
5065 ie_offset += cont_len;
5066 if ((ie_offset - curr_offset) < e_len) {
5067 uint64_t flags;
5068 static int* const ecs_flags[] = {
5069 &hf_gsm_a_gm_sm_pco_ecs_addr_espili,
5070 &hf_gsm_a_gm_sm_pco_ecs_addr_eami,
5071 NULL
5074 proto_tree_add_bitmask_list_ret_uint64(pco_tree, tvb, ie_offset, 1, ecs_flags, ENC_BIG_ENDIAN, &flags);
5075 ie_offset++;
5076 if (flags & 0x01) {
5077 static int* const ecs_auth_meth[] = {
5078 &hf_gsm_a_gm_sm_pco_ecs_addr_tlsgi,
5079 &hf_gsm_a_gm_sm_pco_ecs_addr_tlsai,
5080 &hf_gsm_a_gm_sm_pco_ecs_addr_tlscsci,
5081 NULL
5083 proto_tree_add_bitmask_list(pco_tree, tvb, ie_offset, 1, ecs_auth_meth, ENC_BIG_ENDIAN);
5084 ie_offset++;
5086 if (flags & 0x02) {
5087 proto_tree_add_item_ret_uint(pco_tree, hf_gsm_a_gm_sm_pco_ecs_addr_supported_plmns_info_list_cont_len, tvb, ie_offset, 1, ENC_BIG_ENDIAN, &cont_len);
5088 ie_offset++;
5089 proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_ecs_addr_supported_plmns_info_list_cont, tvb, ie_offset, cont_len, ENC_NA);
5093 skip_ecs_addr:;
5095 break;
5096 case 0x0035:
5097 if (link_dir == P2P_DIR_DL && e_len > 1) {
5098 proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_ecsp_id, tvb, curr_offset, e_len, ENC_NA|ENC_UTF_8);
5100 break;
5101 case 0x0036:
5102 case 0x0037:
5103 case 0x0038:
5104 if (link_dir == P2P_DIR_DL) {
5105 uint64_t flags;
5106 uint32_t field_len, ie_offset = curr_offset;
5107 static int* const ind[] = {
5108 &hf_gsm_a_gm_sm_pco_pvs_s_nssai_ind,
5109 &hf_gsm_a_gm_sm_pco_pvs_dnn_ind,
5110 NULL
5113 if (prot == 0x0036) {
5114 proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_pvs_ipv4, tvb, ie_offset, 4, ENC_BIG_ENDIAN);
5115 ie_offset += 4;
5116 } else if (prot == 0x0037) {
5117 proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_pvs_ipv6, tvb, ie_offset, 16, ENC_NA);
5118 ie_offset += 16;
5119 } else {
5120 proto_tree_add_item_ret_uint(pco_tree, hf_gsm_a_gm_sm_pco_pvs_name_len, tvb, ie_offset, 1, ENC_BIG_ENDIAN, &field_len);
5121 ie_offset++;
5122 proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_pvs_name, tvb, ie_offset, field_len, ENC_NA|ENC_APN_STR);
5123 ie_offset += field_len;
5125 proto_tree_add_bitmask_list_ret_uint64(pco_tree, tvb, ie_offset, 1, ind, ENC_BIG_ENDIAN, &flags);
5126 ie_offset++;
5127 if (flags & 0x01) {
5128 proto_tree_add_item_ret_uint(tree, hf_gsm_a_gm_sm_pco_pvs_dnn_len, tvb, ie_offset, 1, ENC_BIG_ENDIAN, &field_len);
5129 ie_offset++;
5130 ie_offset += de_nas_5gs_cmn_dnn(tvb, pco_tree, pinfo, ie_offset, field_len, NULL, 0);
5132 if (flags & 0x02) {
5133 proto_tree_add_item_ret_uint(tree, hf_gsm_a_gm_sm_pco_pvs_s_nssai_len, tvb, ie_offset, 1, ENC_BIG_ENDIAN, &field_len);
5134 ie_offset++;
5135 de_nas_5gs_cmn_s_nssai(tvb, pco_tree, pinfo, ie_offset, field_len, NULL, 0);
5138 break;
5139 case 0x0039:
5140 if (link_dir == P2P_DIR_UL && e_len == 1) {
5141 proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_dns_serv_sec_prot_support, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5143 break;
5144 case 0x003a:
5145 if (link_dir == P2P_DIR_UL && e_len > 0) {
5146 static int* const oct1_flags[] = {
5147 &hf_gsm_a_gm_sm_pco_eas_rediscovery_support_ind_fqdn,
5148 &hf_gsm_a_gm_sm_pco_eas_rediscovery_support_ind_ipv6,
5149 &hf_gsm_a_gm_sm_pco_eas_rediscovery_support_ind_ipv4,
5150 NULL
5152 proto_tree_add_bitmask_list(pco_tree, tvb, curr_offset, 1, oct1_flags, ENC_BIG_ENDIAN);
5154 break;
5155 case 0x003b:
5156 if (link_dir == P2P_DIR_DL && e_len == 8) {
5157 proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_eas_rediscovery_support_ind_with_impacted_eas_ipv4_range_low, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
5158 proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_eas_rediscovery_support_ind_with_impacted_eas_ipv4_range_high, tvb, curr_offset+4, 4, ENC_BIG_ENDIAN);
5160 break;
5161 case 0x003c:
5162 if (link_dir == P2P_DIR_DL && e_len == 32) {
5163 proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_eas_rediscovery_support_ind_with_impacted_eas_ipv6_range_low, tvb, curr_offset, 16, ENC_NA);
5164 proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_eas_rediscovery_support_ind_with_impacted_eas_ipv6_range_high, tvb, curr_offset+16, 16, ENC_NA);
5166 break;
5167 case 0x003d:
5168 if (link_dir == P2P_DIR_DL && e_len > 0) {
5169 proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_eas_rediscovery_support_ind_with_impacted_eas_fqdn, tvb, curr_offset, e_len, ENC_NA|ENC_APN_STR);
5171 break;
5172 case 0x0041:
5173 de_nas_5gs_cmn_service_level_aa_cont(tvb, pco_tree, pinfo, curr_offset, e_len, NULL, 0);
5174 break;
5175 case 0x0051:
5176 if (eap_handle) {
5177 col_append_str(pinfo->cinfo, COL_PROTOCOL, "/");
5178 col_set_fence(pinfo->cinfo, COL_PROTOCOL);
5179 col_append_str(pinfo->cinfo, COL_INFO, ", ");
5180 col_set_fence(pinfo->cinfo, COL_INFO);
5181 call_dissector(eap_handle, tvb_new_subset_length(tvb, curr_offset, e_len), pinfo, pco_tree);
5182 } else {
5183 call_data_dissector(tvb_new_subset_length(tvb, curr_offset, e_len), pinfo, pco_tree);
5185 break;
5186 case 0x0052:
5187 if (link_dir == P2P_DIR_UL && e_len > 0) {
5188 proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_sdnaepc_dn_specific_id, tvb, curr_offset, e_len, ENC_NA|ENC_UTF_8);
5190 break;
5191 case 0x0056:
5192 if (e_len > 0) {
5193 dissect_nas_5gs_updp(tvb_new_subset_length(tvb, curr_offset, e_len), pinfo, pco_tree);
5195 break;
5196 default:
5198 if (e_len > 0) {
5199 if (prot >= 0xff00) {
5200 dissect_e212_mcc_mnc(tvb, pinfo, pco_tree, curr_offset, E212_NONE, true);
5201 if ((e_len - 3) > 0) {
5202 proto_tree_add_item(pco_tree, hf_gsm_a_gm_pco_app_spec_info, tvb, curr_offset+3, e_len-3, ENC_NA);
5204 } else {
5205 dissector_handle_t handle;
5206 handle = dissector_get_uint_handle (gprs_sm_pco_subdissector_table, prot);
5207 l3_tvb = tvb_new_subset_length(tvb, curr_offset, e_len);
5208 if (handle != NULL)
5211 * dissect the embedded message
5213 /* In this case we do not want the columns updated */
5214 col_set_writable(pinfo->cinfo, -1, false);
5215 call_dissector(handle, l3_tvb, pinfo, pco_tree);
5216 col_set_writable(pinfo->cinfo, -1, true);
5218 else
5221 * dissect the embedded DATA message
5223 call_data_dissector(l3_tvb, pinfo, pco_tree);
5229 curr_len -= e_len;
5230 curr_offset += e_len;
5233 if (curr_len < 0) {
5234 proto_tree_add_expert(tree, pinfo, &ei_gsm_a_gm_not_enough_data, tvb, offset, len);
5235 } else {
5236 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_gm_extraneous_data);
5239 return len;
5243 * [9] 10.5.6.4 Packet data protocol address
5245 static const value_string gsm_a_sm_pdp_type_org_vals[] = {
5246 { 0x00, "ETSI allocated address" },
5247 { 0x01, "IETF allocated address" },
5248 { 0x0f, "Empty PDP type" },
5249 { 0, NULL }
5252 uint16_t
5253 de_sm_pdp_addr(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
5255 uint32_t curr_offset;
5256 const char *str;
5257 unsigned char pdp_type_org, pdp_type_num;
5259 curr_offset = offset;
5261 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset << 3), 4, ENC_BIG_ENDIAN);
5262 proto_tree_add_item(tree, hf_gsm_a_sm_pdp_type_org, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5264 pdp_type_org = tvb_get_uint8(tvb, curr_offset) & 0x0f;
5265 curr_offset += 1;
5266 pdp_type_num = tvb_get_uint8(tvb, curr_offset);
5268 if (pdp_type_org == 0)
5270 /* ETSI allocated address */
5271 switch (pdp_type_num)
5273 case 0x00: str = "Reserved, used in earlier version of this protocol"; break;
5274 case 0x01: str = "PDP-type PPP"; break;
5275 case 0x02: str = "non IP"; break;
5276 default: str = "reserved";
5279 else if (pdp_type_org == 1)
5281 /* IETF allocated address */
5282 switch (pdp_type_num)
5284 case 0x21: str = "IPv4 address"; break;
5285 case 0x57: str = "IPv6 address"; break;
5286 case 0x8d: str = "IPv4v6 address"; break;
5287 default: str = "Unknown, interpreted as IPv4 address";
5290 else if ((pdp_type_num == 0) && (pdp_type_org == 0x0f))
5291 str = "Empty";
5292 else
5293 str = "Not specified";
5295 proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_pdp_type_number, tvb, curr_offset, 1, pdp_type_num, "%s (%u)", str, pdp_type_num);
5297 if ((len == 2) && ((pdp_type_num == 0x21) || (pdp_type_num == 0x57) || (pdp_type_num == 0x8d)))
5299 proto_tree_add_uint_format(tree, hf_gsm_a_sm_pdp_address, tvb, curr_offset, 1, pdp_type_num, "Dynamic addressing");
5300 curr_offset += 1;
5301 return (curr_offset - offset);
5303 else if (len == 2)
5305 proto_tree_add_uint_format(tree, hf_gsm_a_sm_pdp_address, tvb, curr_offset, 1, 0, "No PDP address is included");
5306 curr_offset += 1;
5307 return (curr_offset - offset);
5310 curr_offset += 1;
5311 if (pdp_type_org == 1)
5312 switch (pdp_type_num)
5314 case 0x57:
5315 proto_tree_add_item(tree, hf_gsm_a_sm_ip6_address, tvb, curr_offset, 16, ENC_NA);
5316 curr_offset += 16;
5317 break;
5319 case 0x8d:
5320 proto_tree_add_item(tree, hf_gsm_a_sm_ip4_address, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
5321 curr_offset += 4;
5322 proto_tree_add_item(tree, hf_gsm_a_sm_ip6_address, tvb, curr_offset, 16, ENC_NA);
5323 curr_offset += 16;
5324 break;
5326 default:
5327 proto_tree_add_item(tree, hf_gsm_a_sm_ip4_address, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
5328 curr_offset += 4;
5331 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_gm_extraneous_data);
5333 return (curr_offset - offset);
5337 * [9] 10.5.6.5 Quality of service
5339 static const value_string gsm_a_sm_qos_delay_cls_vals[] = {
5340 { 0x00, "Subscribed delay class (in MS to network direction)" },
5341 { 0x01, "Delay class 1" },
5342 { 0x02, "Delay class 2" },
5343 { 0x03, "Delay class 3" },
5344 { 0x04, "Delay class 4 (best effort)" },
5345 { 0x07, "Reserved" },
5346 { 0, NULL }
5349 static const value_string gsm_a_sm_qos_reliability_vals[] = {
5350 { 0x00, "Subscribed reliability class (in MS to network direction)" },
5351 { 0x01, "Acknowledged GTP, LLC, and RLC; Protected data" },
5352 { 0x02, "Unacknowledged GTP, Ack LLC/RLC, Protected data" },
5353 { 0x03, "Unacknowledged GTP/LLC, Ack RLC, Protected data" },
5354 { 0x04, "Unacknowledged GTP/LLC/RLC, Protected data" },
5355 { 0x05, "Unacknowledged GTP/LLC/RLC, Unprotected data" },
5356 { 0x07, "Reserved" },
5357 { 0, NULL }
5359 /* Delivery of erroneous SDUs, octet 6 (see 3GPP TS 23.107) Bits 3 2 1 */
5360 const value_string gsm_a_sm_qos_del_of_err_sdu_vals[] = {
5361 { 0, "Subscribed delivery of erroneous SDUs/Reserved" },
5362 { 1, "No detect('-')" },
5363 { 2, "Erroneous SDUs are delivered('yes')" },
5364 { 3, "Erroneous SDUs are not delivered('No')" },
5365 { 7, "Reserved" },
5366 { 0, NULL }
5369 /* Delivery order, octet 6 (see 3GPP TS 23.107) Bits 5 4 */
5370 static const value_string gsm_a_sm_qos_del_order_vals[] = {
5371 { 0, "Subscribed delivery order/Reserved" },
5372 { 1, "With delivery order ('yes')" },
5373 { 2, "Without delivery order ('no')" },
5374 { 3, "Reserved" },
5375 { 0, NULL }
5377 /* Traffic class, octet 6 (see 3GPP TS 23.107) Bits 8 7 6 */
5378 const value_string gsm_a_sm_qos_traffic_cls_vals[] = {
5379 { 0, "Subscribed traffic class/Reserved" },
5380 { 1, "Conversational class" },
5381 { 2, "Streaming class" },
5382 { 3, "Interactive class" },
5383 { 4, "Background class" },
5384 { 7, "Reserved" },
5385 { 0, NULL }
5388 /* Residual Bit Error Rate (BER), octet 10 (see 3GPP TS 23.107) Bits 8 7 6 5 */
5389 const value_string gsm_a_sm_qos_ber_vals[] = {
5390 { 0, "Subscribed residual BER/Reserved" },
5391 { 1, "5*10-2" },
5392 { 2, "1*10-2" },
5393 { 3, "5*10-3" },
5394 { 4, "4*10-3" },
5395 { 5, "1*10-3" },
5396 { 6, "1*10-4" },
5397 { 7, "1*10-5" },
5398 { 8, "1*10-6" },
5399 { 9, "6*10-8" },
5400 { 10, "Reserved" },
5401 { 0, NULL }
5404 /* SDU error ratio, octet 10 (see 3GPP TS 23.107) Bits 4 3 2 1 */
5405 const value_string gsm_a_sm_qos_sdu_err_rat_vals[] = {
5406 { 0, "Subscribed SDU error ratio/Reserved" },
5407 { 1, "1*10-2" },
5408 { 2, "7*10-3" },
5409 { 3, "1*10-3" },
5410 { 4, "1*10-4" },
5411 { 5, "1*10-5" },
5412 { 6, "1*10-6" },
5413 { 7, "1*10-1" },
5414 { 15, "Reserved" },
5415 { 0, NULL }
5418 /* Traffic handling priority, octet 11 (see 3GPP TS 23.107) Bits 2 1 */
5419 const value_string gsm_a_sm_qos_traff_hdl_pri_vals[] = {
5420 { 0, "Subscribed traffic handling priority/Reserved" },
5421 { 1, "Priority level 1" },
5422 { 2, "Priority level 2" },
5423 { 3, "Priority level 3" },
5424 { 0, NULL }
5427 static const range_string gsm_a_sm_qos_peak_thr_vals[] = {
5428 { 0x00, 0x00, "Subscribed peak throughput/reserved" },
5429 { 0x01, 0x01, "Up to 1 000 octet/s" },
5430 { 0x02, 0x02, "Up to 2 000 octet/s" },
5431 { 0x03, 0x03, "Up to 4 000 octet/s" },
5432 { 0x04, 0x04, "Up to 8 000 octet/s" },
5433 { 0x05, 0x05, "Up to 16 000 octet/s" },
5434 { 0x06, 0x06, "Up to 32 000 octet/s" },
5435 { 0x07, 0x07, "Up to 64 000 octet/s" },
5436 { 0x08, 0x08, "Up to 128 000 octet/s" },
5437 { 0x09, 0x09, "Up to 256 000 octet/s" },
5438 { 0x0a, 0x0e, "Interpreted as Up to 1 000 octet/s" },
5439 { 0x0f, 0x0f, "Reserved" },
5440 { 0, 0, NULL }
5443 static const range_string gsm_a_sm_qos_mean_thr_vals[] = {
5444 { 0x00, 0x00, "Subscribed peak throughput/reserved" },
5445 { 0x01, 0x01, "100 octet/h" },
5446 { 0x02, 0x02, "200 octet/h" },
5447 { 0x03, 0x03, "500 octet/h" },
5448 { 0x04, 0x04, "1 000 octet/h" },
5449 { 0x05, 0x05, "2 000 octet/h" },
5450 { 0x06, 0x06, "5 000 octet/h" },
5451 { 0x07, 0x07, "10 000 octet/h" },
5452 { 0x08, 0x08, "20 000 octet/h" },
5453 { 0x09, 0x09, "50 000 octet/h" },
5454 { 0x0a, 0x0a, "100 000 octet/h" },
5455 { 0x0b, 0x0b, "200 000 octet/h" },
5456 { 0x0c, 0x0c, "500 000 octet/h" },
5457 { 0x0d, 0x0d, "1 000 000 octet/h" },
5458 { 0x0e, 0x0e, "2 000 000 octet/h" },
5459 { 0x0f, 0x0f, "5 000 000 octet/h" },
5460 { 0x10, 0x10, "10 000 000 octet/h" },
5461 { 0x11, 0x11, "20 000 000 octet/h" },
5462 { 0x12, 0x12, "50 000 000 octet/h" },
5463 { 0x13, 0x1d, "Interpreted as Best effort" },
5464 { 0x1e, 0x1e, "Reserved" },
5465 { 0x1f, 0x1f, "Best effort" },
5466 { 0, 0, NULL }
5469 static const range_string gsm_a_sm_qos_prec_class_vals[] = {
5470 { 0x00, 0x00, "Subscribed precedence/reserved" },
5471 { 0x01, 0x01, "High priority" },
5472 { 0x02, 0x02, "Normal priority" },
5473 { 0x03, 0x03, "Low priority" },
5474 { 0x04, 0x06, "Interpreted as Normal priority" },
5475 { 0x07, 0x07, "Reserved" },
5476 { 0, 0, NULL }
5479 static const true_false_string gsm_a_sm_qos_signalling_ind_value = {
5480 "Optimised for signalling traffic",
5481 "Not optimised for signalling traffic"
5484 /* Helper function returning the main bitrates in kbps */
5485 static uint32_t
5486 qos_calc_bitrate(uint8_t oct)
5488 if (oct <= 0x3f)
5489 return oct;
5490 if (oct <= 0x7f)
5491 return 64 + (oct-0x40) * 8;
5493 return 576 + (oct-0x80) * 64;
5496 /* Helper function returning the extended bitrates in kbps */
5497 static uint32_t
5498 qos_calc_ext_bitrate(uint8_t oct)
5500 if (oct <= 0x4a)
5501 return 8600 + oct * 100;
5502 if (oct <= 0xba)
5503 return 16000 + (oct-0x4a) * 1000;
5505 return 128000 + (oct - 0xba) * 2000;
5508 static uint32_t
5509 qos_calc_ext2_bitrate(uint8_t oct)
5511 if (oct <= 0x3d)
5512 return (256 + oct * 4);
5513 if (oct <= 0xa1)
5514 return (500 + (oct-0x3d) * 10);
5515 if (oct <= 0xf6)
5516 return (1500 + (oct-0xa1) * 100);
5518 return 10000;
5522 * 10.5.6.5 Quality of service
5524 uint16_t
5525 de_sm_qos(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
5527 uint32_t curr_offset;
5528 unsigned char oct, tmp_oct;
5529 const char *str;
5530 uint32_t temp32;
5532 curr_offset = offset;
5534 /* Octet 3 */
5535 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset << 3), 2, ENC_BIG_ENDIAN);
5536 proto_tree_add_item(tree, hf_gsm_a_sm_qos_delay_cls, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5537 proto_tree_add_item(tree, hf_gsm_a_sm_qos_reliability_cls, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5538 curr_offset += 1;
5540 /* Octet 4 */
5541 proto_tree_add_item(tree, hf_gsm_a_sm_qos_peak_thr, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5542 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset << 3) + 4, 1, ENC_BIG_ENDIAN);
5543 proto_tree_add_item(tree, hf_gsm_a_sm_qos_prec_class, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5544 curr_offset += 1;
5546 /* Octet 5 */
5547 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset << 3), 3, ENC_BIG_ENDIAN);
5548 proto_tree_add_item(tree, hf_gsm_a_sm_qos_mean_thr, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5549 curr_offset += 1;
5551 NO_MORE_DATA_CHECK(len);
5553 /* Octet 6 */
5554 proto_tree_add_item(tree, hf_gsm_a_sm_qos_traffic_cls, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5555 proto_tree_add_item(tree, hf_gsm_a_sm_qos_del_order, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5556 proto_tree_add_item(tree, hf_gsm_a_sm_qos_del_of_err_sdu, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5557 curr_offset += 1;
5559 NO_MORE_DATA_CHECK(len);
5561 /* Octet 7 */
5562 oct = tvb_get_uint8(tvb, curr_offset);
5564 switch (oct)
5566 case 0x00: str = "Subscribed maximum SDU size/reserved"; break;
5567 case 0x97: str = "1502 octets"; break;
5568 case 0x98: str = "1510 octets"; break;
5569 case 0x99: str = "1520 octets"; break;
5570 case 0xff: str = "Reserved"; break;
5571 default: str = "Unspecified";
5574 if ((oct >= 1) && (oct <= 0x96))
5575 proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_qos_maximum_sdu_size, tvb, curr_offset, 1, oct, "%u octets (%u)", oct*10, oct);
5576 else
5577 proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_qos_maximum_sdu_size, tvb, curr_offset, 1, oct, "%s (%u)", str, oct);
5579 curr_offset += 1;
5581 NO_MORE_DATA_CHECK(len);
5583 /* Octet 8 */
5584 oct = tvb_get_uint8(tvb, curr_offset);
5586 switch (oct)
5588 case 0x00: str = "Subscribed maximum bit rate for uplink/reserved"; break;
5589 case 0xff: str = "0 kbps"; break;
5590 default: str = wmem_strdup_printf(pinfo->pool, "%u kbps", qos_calc_bitrate(oct));
5593 proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_qos_max_bitrate_upl, tvb,
5594 curr_offset, 1, oct, "%s (%u)", str, oct);
5595 curr_offset += 1;
5597 NO_MORE_DATA_CHECK(len);
5599 /* Octet 9 */
5600 oct = tvb_get_uint8(tvb, curr_offset);
5602 switch (oct)
5604 case 0x00: str = "Subscribed maximum bit rate for downlink/reserved"; break;
5605 case 0xff: str = "0 kbps"; break;
5606 default: str = wmem_strdup_printf(pinfo->pool, "%u kbps", qos_calc_bitrate(oct));
5609 proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_qos_max_bitrate_downl, tvb,
5610 curr_offset, 1, oct, "%s (%u)", str, oct);
5611 curr_offset += 1;
5613 NO_MORE_DATA_CHECK(len);
5615 /* Octet 10 */
5616 proto_tree_add_item(tree, hf_gsm_a_sm_qos_ber, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5617 proto_tree_add_item(tree, hf_gsm_a_sm_qos_sdu_err_rat, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5619 curr_offset += 1;
5620 NO_MORE_DATA_CHECK(len);
5622 /* Octet 11 */
5623 oct = tvb_get_uint8(tvb, curr_offset);
5625 tmp_oct = oct>>2;
5626 switch (tmp_oct)
5628 case 0x00: str = "Subscribed transfer delay/reserved"; break;
5629 case 0x3f: str = "Reserved"; break;
5630 default:
5631 if (tmp_oct <= 0x0f)
5632 temp32 = tmp_oct * 10;
5633 else if (tmp_oct <= 0x1f)
5634 temp32 = (tmp_oct - 0x10) * 50 + 200;
5635 else
5636 temp32 = (tmp_oct - 0x20) * 100 + 1000;
5637 str = wmem_strdup_printf(pinfo->pool, "%u ms", temp32);
5640 proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_qos_trans_delay, tvb,
5641 curr_offset, 1, oct, "%s (%u)", str, tmp_oct);
5643 proto_tree_add_item(tree, hf_gsm_a_sm_qos_traff_hdl_pri, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5645 curr_offset += 1;
5646 NO_MORE_DATA_CHECK(len);
5648 /* Octet 12 */
5649 oct = tvb_get_uint8(tvb, curr_offset);
5651 switch (oct)
5653 case 0x00: str = "Subscribed guaranteed bit rate for uplink/reserved"; break;
5654 case 0xff: str = "0 kbps"; break;
5655 default: str = wmem_strdup_printf(pinfo->pool, "%u kbps", qos_calc_bitrate(oct));
5658 proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_qos_guar_bitrate_upl, tvb,
5659 curr_offset, 1, oct, "%s (%u)", str, oct);
5661 curr_offset += 1;
5662 NO_MORE_DATA_CHECK(len);
5664 /* Octet 13 */
5665 oct = tvb_get_uint8(tvb, curr_offset);
5667 switch (oct)
5669 case 0x00: str = "Subscribed guaranteed bit rate for downlink/reserved"; break;
5670 case 0xff: str = "0 kbps"; break;
5671 default: str = wmem_strdup_printf(pinfo->pool, "%u kbps", qos_calc_bitrate(oct));
5674 proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_qos_guar_bitrate_downl, tvb,
5675 curr_offset, 1, oct, "%s (%u)", str, oct);
5677 curr_offset += 1;
5678 NO_MORE_DATA_CHECK(len);
5680 /* Ocet 14 */
5681 oct = tvb_get_uint8(tvb, curr_offset);
5682 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset << 3), 3, ENC_BIG_ENDIAN);
5683 proto_tree_add_item(tree, hf_gsm_a_sm_qos_signalling_ind, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5685 tmp_oct = oct & 7;
5686 if (tmp_oct == 0x01)
5687 str = "speech";
5688 else
5689 str = "unknown";
5691 proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_qos_source_stat_desc, tvb,
5692 curr_offset, 1, oct, "%s (%u)", str, tmp_oct);
5694 curr_offset += 1;
5695 NO_MORE_DATA_CHECK(len);
5697 /* Octet 15 */
5698 oct = tvb_get_uint8(tvb, curr_offset);
5700 if (oct == 0x00)
5701 str = "Use the value indicated by the Maximum bit rate for downlink";
5702 else
5704 temp32 = qos_calc_ext_bitrate(oct);
5705 if (temp32 % 1000 == 0)
5706 str = wmem_strdup_printf(pinfo->pool, "%u Mbps", temp32 / 1000);
5707 else
5708 str = wmem_strdup_printf(pinfo->pool, "%u kbps", temp32);
5710 proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_qos_max_bitrate_downl_ext, tvb,
5711 curr_offset, 1, oct, "%s (%u)", str, oct);
5713 curr_offset += 1;
5714 NO_MORE_DATA_CHECK(len);
5716 /* Octet 16 */
5717 oct = tvb_get_uint8(tvb, curr_offset);
5719 if (oct == 0x00)
5720 str = "Use the value indicated by the Guaranteed bit rate for downlink";
5721 else
5723 temp32 = qos_calc_ext_bitrate(oct);
5724 if (temp32 % 1000 == 0)
5725 str = wmem_strdup_printf(pinfo->pool, "%u Mbps", temp32 / 1000);
5726 else
5727 str = wmem_strdup_printf(pinfo->pool, "%u kbps", temp32);
5729 proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_qos_guar_bitrate_downl_ext, tvb,
5730 curr_offset, 1, oct, "%s (%u)", str, oct);
5732 curr_offset += 1;
5733 NO_MORE_DATA_CHECK(len);
5735 /* Maximum bit rate for uplink (extended) Octet 17 */
5736 oct = tvb_get_uint8(tvb, curr_offset);
5738 if (oct == 0x00)
5739 str = "Use the value indicated by the Maximum bit rate for uplink";
5740 else
5742 temp32 = qos_calc_ext_bitrate(oct);
5743 if (temp32 % 1000 == 0)
5744 str = wmem_strdup_printf(pinfo->pool, "%u Mbps", temp32 / 1000);
5745 else
5746 str = wmem_strdup_printf(pinfo->pool, "%u kbps", temp32);
5748 proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_qos_max_bitrate_upl_ext, tvb,
5749 curr_offset, 1, oct, "%s (%u)", str, oct);
5751 curr_offset += 1;
5752 NO_MORE_DATA_CHECK(len);
5754 /* Guaranteed bit rate for uplink (extended) Octet 18 */
5755 oct = tvb_get_uint8(tvb, curr_offset);
5757 if (oct == 0x00)
5758 str = "Use the value indicated by the Guaranteed bit rate for uplink";
5759 else
5761 temp32 = qos_calc_ext_bitrate(oct);
5762 if (temp32 % 1000 == 0)
5763 str = wmem_strdup_printf(pinfo->pool, "%u Mbps", temp32 / 1000);
5764 else
5765 str = wmem_strdup_printf(pinfo->pool, "%u kbps", temp32);
5767 proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_qos_guar_bitrate_upl_ext, tvb,
5768 curr_offset, 1, oct, "%s (%u)", str, oct);
5770 curr_offset += 1;
5771 NO_MORE_DATA_CHECK(len);
5773 /* Maximum bit rate for downlink (extended-2) Octet 19 */
5774 oct = tvb_get_uint8(tvb, curr_offset);
5776 if (oct == 0x00)
5777 str = "Use the value indicated by the Maximum bit rate for downlink";
5778 else
5780 temp32 = qos_calc_ext2_bitrate(oct);
5781 str = wmem_strdup_printf(pinfo->pool, "%u Mbps", temp32);
5783 proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_qos_max_bitrate_downl_ext2, tvb,
5784 curr_offset, 1, oct, "%s (%u)", str, oct);
5786 curr_offset += 1;
5787 NO_MORE_DATA_CHECK(len);
5789 /* Guaranteed bit rate for downlink (extended-2) Octet 20 */
5790 oct = tvb_get_uint8(tvb, curr_offset);
5792 if (oct == 0x00)
5793 str = "Use the value indicated by the Guaranteed bit rate for downlink";
5794 else
5796 temp32 = qos_calc_ext2_bitrate(oct);
5797 str = wmem_strdup_printf(pinfo->pool, "%u Mbps", temp32);
5799 proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_qos_guar_bitrate_downl_ext2, tvb,
5800 curr_offset, 1, oct, "%s (%u)", str, oct);
5802 curr_offset += 1;
5803 NO_MORE_DATA_CHECK(len);
5805 /* Maximum bit rate for uplink (extended-2) Octet 21 */
5806 oct = tvb_get_uint8(tvb, curr_offset);
5808 if (oct == 0x00)
5809 str = "Use the value indicated by the Maximum bit rate for uplink";
5810 else
5812 temp32 = qos_calc_ext2_bitrate(oct);
5813 str = wmem_strdup_printf(pinfo->pool, "%u Mbps", temp32);
5815 proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_qos_max_bitrate_upl_ext2, tvb,
5816 curr_offset, 1, oct, "%s (%u)", str, oct);
5818 curr_offset += 1;
5819 NO_MORE_DATA_CHECK(len);
5821 /* Guaranteed bit rate for uplink (extended-2) Octet 22 */
5822 oct = tvb_get_uint8(tvb, curr_offset);
5824 if (oct == 0x00)
5825 str = "Use the value indicated by the Guaranteed bit rate for uplink";
5826 else
5828 temp32 = qos_calc_ext2_bitrate(oct);
5829 str = wmem_strdup_printf(pinfo->pool, "%u Mbps", temp32);
5831 proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_qos_guar_bitrate_upl_ext2, tvb,
5832 curr_offset, 1, oct, "%s (%u)", str, oct);
5834 curr_offset += 1;
5836 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_gm_extraneous_data);
5838 return (curr_offset - offset);
5842 * [12] 10.5.6.5a Re-attempt indicator
5844 static const true_false_string gsm_a_gm_eplmnc_value = {
5845 "MS is not allowed to re-attempt the procedure in an equivalent PLMN",
5846 "MS is allowed to re-attempt the procedure in an equivalent PLMN"
5849 static const true_false_string gsm_a_gm_ratc_value = {
5850 "MS is not allowed to re-attempt the procedure in S1 mode",
5851 "MS is allowed to re-attempt the procedure in S1 mode"
5854 static uint16_t
5855 de_sm_re_attempt_ind(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
5857 uint32_t curr_offset;
5859 curr_offset = offset;
5861 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, offset << 3, 6, ENC_BIG_ENDIAN);
5862 proto_tree_add_item(tree, hf_gsm_a_sm_eplmnc, tvb, offset, 1, ENC_BIG_ENDIAN);
5863 proto_tree_add_item(tree, hf_gsm_a_sm_ratc, tvb, offset, 1, ENC_BIG_ENDIAN);
5864 curr_offset++;
5866 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_gm_extraneous_data);
5868 return len;
5872 * [15] 10.5.6.5b Extended quality of service
5874 static uint16_t
5875 de_sm_ext_qos(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
5877 uint32_t curr_offset;
5879 curr_offset = offset;
5881 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_gm_extraneous_data);
5883 return len;
5887 * [9] 10.5.6.6 SM cause
5889 static const value_string gsm_a_sm_cause_vals[] = {
5890 { 0x08, "Operator Determined Barring" },
5891 { 0x18, "MBMS bearer capabilities insufficient for the service" },
5892 { 0x19, "LLC or SNDCP failure(A/Gb only)" },
5893 { 0x1a, "Insufficient resources" },
5894 { 0x1b, "Missing or unknown APN" },
5895 { 0x1c, "Unknown PDP address or PDP type" },
5896 { 0x1d, "User authentication failed" },
5897 { 0x1e, "Activation rejected by GGSN, Serving GW or PDN GW" },
5898 { 0x1f, "Activation rejected, unspecified" },
5899 { 0x20, "Service option not supported" },
5900 { 0x21, "Requested service option not subscribed" },
5901 { 0x22, "Service option temporarily out of order" },
5902 { 0x23, "NSAPI already used (not sent)" },
5903 { 0x24, "Regular deactivation" },
5904 { 0x25, "QoS not accepted" },
5905 { 0x26, "Network failure" },
5906 { 0x27, "Reactivation requested" },
5907 { 0x28, "Feature not supported" },
5908 { 0x29, "Semantic error in the TFT operation" },
5909 { 0x2a, "Syntactical error in the TFT operation" },
5910 { 0x2b, "Unknown PDP context" },
5911 { 0x2c, "Semantic errors in packet filter(s)" },
5912 { 0x2d, "Syntactical errors in packet filter(s)" },
5913 { 0x2e, "PDP context without TFT already activated" },
5914 { 0x2f, "Multicast group membership time-out" },
5915 { 0x30, "Request rejected, BCM violation" },
5916 { 0x32, "PDP type IPv4 only allowed" },
5917 { 0x33, "PDP type IPv6 only allowed" },
5918 { 0x34, "Single address bearers only allowed" },
5919 { 0x38, "Collision with network initiated request" },
5920 { 0x39, "PDP type IPv4v6 only allowed" },
5921 { 0x3a, "PDP type non IP only allowed" },
5922 { 0x3c, "Bearer handling not supported" },
5923 { 0x41, "Maximum number of PDP contexts reached" },
5924 { 0x42, "Requested APN not supported in current RAT and PLMN combination" },
5925 { 0x51, "Invalid transaction identifier value" },
5926 { 0x5f, "Semantically incorrect message" },
5927 { 0x60, "Invalid mandatory information" },
5928 { 0x61, "Message type non-existent or not implemented" },
5929 { 0x62, "Message type not compatible with the protocol state" },
5930 { 0x63, "Information element non-existent or not implemented" },
5931 { 0x64, "Conditional IE error" },
5932 { 0x65, "Message not compatible with the protocol state" },
5933 { 0x6f, "Protocol error, unspecified" },
5934 { 0x70, "APN restriction value incompatible with active PDP context" },
5935 { 0x71, "Multiple accesses to a PDN connection not allowed" },
5936 { 0, NULL }
5938 static value_string_ext gsm_a_sm_cause_vals_ext = VALUE_STRING_EXT_INIT(gsm_a_sm_cause_vals);
5940 uint16_t
5941 de_sm_cause(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
5943 uint8_t oct;
5944 const char *str;
5946 oct = tvb_get_uint8(tvb, offset);
5948 /* SM Cause can be sent in both directions */
5949 str = val_to_str_ext_const(oct, &gsm_a_sm_cause_vals_ext,
5950 "Protocol error, unspecified / Service option temporarily out of order");
5952 proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_cause, tvb,
5953 offset, 1, oct, "%s (%u)", str, oct);
5955 /* no length check possible */
5956 return 1;
5960 * [9] 10.5.6.6a SM cause 2
5962 static uint16_t
5963 de_sm_cause_2(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
5965 uint8_t oct;
5966 const char *str;
5968 oct = tvb_get_uint8(tvb, offset);
5970 /* SM Cause 2 is sent only in the Network-to-MS direction */
5971 str = val_to_str_ext_const(oct, &gsm_a_sm_cause_vals_ext,
5972 "Service option temporarily out of order");
5974 proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_cause_2, tvb,
5975 offset, 1, oct, "%s (%u)", str, oct);
5977 /* no length check possible */
5978 return 1;
5981 * [7] 10.5.6.7
5984 static const true_false_string gsm_a_sm_ti_flag_vals = {
5985 "The message is sent to the side that originates the TI",
5986 "The message is sent from the side that originates the TI"
5989 static uint16_t
5990 de_sm_linked_ti(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
5992 uint32_t curr_offset;
5993 unsigned curr_len;
5994 char oct;
5996 curr_len = len;
5997 curr_offset = offset;
5999 oct = tvb_get_uint8(tvb, curr_offset);
6001 proto_tree_add_item(tree, hf_gsm_a_sm_ti_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
6003 /* The TI value and the TI flag occupy bits 5 - 7 and bit 8 of the first octet respectively.
6004 * The extended TI shall not be used unless TI values of 7 or greater are needed.
6005 * Where the extended TI is used, the TI IE includes a second octet. The TI value in the first octet is ignored, and the TI
6006 * value is encoded in bits 7-1 of the second octet.
6009 if (curr_len > 1)
6011 curr_offset++;
6012 oct = tvb_get_uint8(tvb, curr_offset);
6014 proto_tree_add_uint(tree, hf_gsm_a_gm_ti_value, tvb, curr_offset, 1, oct&0x7f);
6016 proto_tree_add_item(tree, hf_gsm_a_sm_ext, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
6018 curr_offset++;
6020 else
6022 proto_tree_add_uint(tree, hf_gsm_a_gm_ti_value, tvb, curr_offset, 1, (oct>>4)&7);
6023 curr_offset++;
6027 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_gm_extraneous_data);
6029 return (curr_offset - offset);
6033 * [9] 10.5.6.9 LLC service access point identifier
6035 static const value_string gsm_a_sm_llc_sapi_vals[] = {
6036 { 0, "LLC SAPI not assigned" },
6037 { 3, "SAPI 3" },
6038 { 5, "SAPI 5" },
6039 { 9, "SAPI 9" },
6040 { 11, "SAPI 11" },
6041 { 0, NULL }
6044 static uint16_t
6045 de_sm_sapi(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
6047 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, offset << 3, 4, ENC_BIG_ENDIAN);
6048 proto_tree_add_item(tree, hf_gsm_a_sm_llc_sapi, tvb, offset, 1, ENC_BIG_ENDIAN);
6050 /* no length check possible */
6051 return 1;
6055 * [9] 10.5.6.10 Tear down indicator
6057 static const true_false_string gsm_a_sm_tdi_value = {
6058 "Tear down requested",
6059 "Tear down not requested"
6062 static uint16_t
6063 de_sm_tear_down(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
6065 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (offset << 3) + 4, 3, ENC_BIG_ENDIAN);
6066 proto_tree_add_item(tree, hf_gsm_a_sm_tdi, tvb, offset, 1, ENC_BIG_ENDIAN);
6068 /* no length check possible */
6069 return 1;
6073 * [9] 10.5.6.11 Packet Flow Identifier
6075 static const range_string gsm_a_sm_packet_flow_id_vals[] = {
6076 { 0x00, 0x00, "Best Effort"},
6077 { 0x01, 0x01, "Signalling"},
6078 { 0x02, 0x02, "SMS"},
6079 { 0x03, 0x03, "TOM8"},
6080 { 0x04, 0x07, "Reserved"},
6081 { 0x08, 0x7f, "Dynamically assigned"},
6082 { 0x00, 0x00, NULL }
6085 uint16_t
6086 de_sm_pflow_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
6088 uint32_t curr_offset;
6089 unsigned value;
6091 curr_offset = offset;
6092 value = tvb_get_uint8(tvb, curr_offset);
6093 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, curr_offset << 3, 1, ENC_BIG_ENDIAN);
6094 proto_tree_add_item(tree, hf_gsm_a_sm_packet_flow_id, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
6095 curr_offset++;
6097 if (add_string)
6098 snprintf(add_string, string_len, " - %s", rval_to_str_const(value, gsm_a_sm_packet_flow_id_vals, "Unknown"));
6100 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_gm_extraneous_data);
6102 return (curr_offset - offset);
6106 * [7] 10.5.6.12 TFT - Traffic Flow Template
6108 /* TFT operation code (octet 3) */
6109 static const value_string gsm_a_sm_tft_op_code_vals[] = {
6110 { 0, "Ignore this IE"},
6111 { 1, "Create new TFT"},
6112 { 2, "Delete existing TFT"},
6113 { 3, "Add packet filters to existing TFT"},
6114 { 4, "Replace packet filters in existing TFT"},
6115 { 5, "Delete packet filters from existing TFT"},
6116 { 6, "No TFT operation"},
6117 { 7, "Reserved"},
6118 { 0, NULL }
6121 static const true_false_string gsm_a_sm_tft_e_bit = {
6122 "Parameters list is included",
6123 "Parameters list is not included"
6126 static const value_string gsm_a_sm_tft_pkt_flt_dir_vals[] = {
6127 { 0, "Pre Rel-7 TFT filter"},
6128 { 1, "Downlink only"},
6129 { 2, "Uplink only"},
6130 { 3, "Bidirectional"},
6131 { 0, NULL }
6134 static const value_string gsm_a_sm_tft_param_id_vals[] = {
6135 { 1, "Authorization Token"},
6136 { 2, "Flow Identifier"},
6137 { 3, "Packet Filter Identifier"},
6138 { 0, NULL }
6141 static const value_string packet_filter_component_type_vals[] = {
6142 {0x10, "IPv4 remote address type" },
6143 {0x11, "IPv4 local address type"},
6144 {0x20, "IPv6 remote address type"},
6145 {0x21, "IPv6 remote address/prefix length type"},
6146 {0x23, "IPv6 local address/prefix length type"},
6147 {0x30, "Protocol identifier/Next header type"},
6148 {0x40, "Single local port type"},
6149 {0x41, "Local port range type"},
6150 {0x50, "Single remote port type"},
6151 {0x51, "Remote port range type"},
6152 {0x60, "Security parameter index type"},
6153 {0x70, "Type of service/Traffic class type"},
6154 {0x80, "Flow label type"},
6155 {0x81, "Destination MAC address type" },
6156 {0x82, "Source MAC address type" },
6157 {0x83, "802.1Q C-TAG VID type" },
6158 {0x84, "802.1Q S-TAG VID type" },
6159 {0x85, "802.1Q C-TAG PCP/DEI type" },
6160 {0x86, "802.1Q S-TAG PCP/DEI type" },
6161 {0x87, "Ethertype type" },
6162 {0, NULL}
6165 uint16_t
6166 de_sm_tflow_temp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
6168 uint32_t curr_offset, prev_offset;
6169 unsigned curr_len;
6170 uint8_t op_code;
6171 uint8_t pkt_fil_count;
6172 uint8_t e_bit;
6173 uint8_t count;
6174 uint8_t oct;
6175 int pf_length;
6176 int i;
6177 int pack_component_type;
6178 int param;
6180 curr_len = len;
6181 curr_offset = offset;
6184 * parse first octet. It contain TFT operation code, E bit and Number of packet filters
6186 oct = tvb_get_uint8(tvb, curr_offset);
6188 op_code = oct>>5;
6189 pkt_fil_count = oct&0x0f;
6190 e_bit = (oct>>4)&1;
6192 proto_tree_add_item(tree, hf_gsm_a_sm_tft_op_code, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
6193 proto_tree_add_item(tree, hf_gsm_a_sm_tft_e_bit, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
6194 proto_tree_add_item(tree, hf_gsm_a_sm_tft_pkt_flt, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
6196 curr_offset++;
6197 curr_len--;
6199 /* Packet filter list dissect */
6201 count = 0;
6202 if (op_code == 2) /* delete TFT contains no packet filters. so we will jump over it */
6203 count = pkt_fil_count;
6204 while (count < pkt_fil_count)
6206 proto_item *tf_pf;
6207 proto_tree *tf_tree;
6208 prev_offset = curr_offset;
6209 tf_pf = proto_tree_add_uint(tree, hf_gsm_a_sm_tft_packet_filter, tvb, curr_offset, 1, count); /* 0-> 7 */
6211 tf_tree = proto_item_add_subtree(tf_pf, ett_sm_tft);
6213 if ((curr_offset-offset)<1) {
6214 proto_tree_add_expert(tf_tree, pinfo, &ei_gsm_a_gm_not_enough_data, tvb, curr_offset, 1);
6215 return (len);
6218 if (op_code == 5) /* Delete packet filters from existing TFT - just a list of identifiers */
6220 proto_tree_add_bits_item(tf_tree, hf_gsm_a_spare_bits, tvb, (curr_offset<<3), 4, ENC_BIG_ENDIAN);
6221 oct = tvb_get_uint8(tvb, curr_offset) & 0x0f;
6222 proto_tree_add_uint_format_value(tf_tree, hf_gsm_a_sm_tft_pkt_flt_id, tvb, curr_offset, 1, oct, "%d (%d)", oct+1, oct);
6223 curr_offset++;
6224 curr_len--;
6225 count++;
6227 else /* create new, Add packet filters or Replace packet filters */
6229 proto_tree_add_bits_item(tf_tree, hf_gsm_a_spare_bits, tvb, (curr_offset<<3), 2, ENC_BIG_ENDIAN);
6230 proto_tree_add_item(tf_tree, hf_gsm_a_sm_tft_pkt_flt_dir, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
6231 oct = tvb_get_uint8(tvb, curr_offset) & 0x0f;
6232 proto_tree_add_uint_format_value(tf_tree, hf_gsm_a_sm_tft_pkt_flt_id, tvb, curr_offset, 1, oct, "%d (%d)", oct+1, oct);
6233 curr_offset++;
6234 curr_len--;
6236 if ((curr_offset-offset) < 1) {
6237 proto_tree_add_expert(tf_tree, pinfo, &ei_gsm_a_gm_not_enough_data, tvb, curr_offset, 1);
6238 return (len);
6240 proto_tree_add_item(tf_tree, hf_gsm_a_sm_tft_packet_evaluation_precedence, tvb, curr_offset, 1, ENC_NA);
6241 curr_offset++;
6242 curr_len--;
6244 if ((curr_offset-offset)<1) {
6245 proto_tree_add_expert(tf_tree, pinfo, &ei_gsm_a_gm_not_enough_data, tvb, curr_offset, 1);
6246 return (len);
6248 pf_length = tvb_get_uint8(tvb, curr_offset);
6249 proto_tree_add_item(tf_tree, hf_gsm_a_sm_tft_packet_filter_length, tvb, curr_offset, 1, ENC_NA);
6250 curr_offset++;
6251 curr_len--;
6253 /* New tree for component */
6255 /* Dissect Packet filter Component */
6256 /* while (filter_len > 1) */
6257 /* packet filter component type identifier: */
6259 while (pf_length > 0) {
6260 proto_item *tf;
6261 proto_tree *comp_tree;
6262 if ((curr_offset-offset) < 1) {
6263 proto_tree_add_expert(tf_tree, pinfo, &ei_gsm_a_gm_not_enough_data, tvb, curr_offset, 1);
6264 return (len);
6266 pack_component_type = tvb_get_uint8(tvb, curr_offset);
6267 tf = proto_tree_add_item(tf_tree, hf_gsm_a_sm_tft_packet_filter_component_type_id, tvb, curr_offset, 1, ENC_NA);
6268 comp_tree = proto_item_add_subtree(tf, ett_sm_tft);
6270 curr_offset++;
6271 curr_len--;
6272 pf_length--;
6274 switch (pack_component_type) {
6276 case 0x10:
6277 proto_tree_add_item(comp_tree, hf_gsm_a_sm_ip4_address, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
6278 curr_offset += 4;
6279 curr_len -= 4;
6280 proto_tree_add_item(comp_tree, hf_gsm_a_sm_ip4_mask, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
6281 curr_offset += 4;
6282 curr_len -= 4;
6283 pf_length -= 8;
6284 break;
6286 case 0x11:
6287 proto_tree_add_item(comp_tree, hf_gsm_a_sm_ip4_address, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
6288 curr_offset += 4;
6289 curr_len -= 4;
6290 proto_tree_add_item(comp_tree, hf_gsm_a_sm_ip4_mask, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
6291 curr_offset += 4;
6292 curr_len -= 4;
6293 pf_length -= 8;
6294 break;
6296 case 0x20:
6297 proto_tree_add_item(comp_tree, hf_gsm_a_sm_ip6_address, tvb, curr_offset, 16, ENC_NA);
6298 curr_offset += 16;
6299 curr_len -= 16;
6300 proto_tree_add_item(comp_tree, hf_gsm_a_sm_ip6_mask, tvb, curr_offset, 16, ENC_NA);
6301 curr_offset += 16;
6302 curr_len -= 16;
6303 pf_length -= 32;
6304 break;
6306 case 0x21:
6307 proto_tree_add_item(comp_tree, hf_gsm_a_sm_ip6_address, tvb, curr_offset, 16, ENC_NA);
6308 curr_offset += 16;
6309 curr_len -= 16;
6310 proto_tree_add_item(comp_tree, hf_gsm_a_sm_ip6_prefix_length, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
6311 curr_offset += 1;
6312 curr_len -= 1;
6313 pf_length -= 17;
6314 break;
6316 case 0x23:
6317 proto_tree_add_item(comp_tree, hf_gsm_a_sm_ip6_address, tvb, curr_offset, 16, ENC_NA);
6318 curr_offset += 16;
6319 curr_len -= 16;
6320 proto_tree_add_item(comp_tree, hf_gsm_a_sm_ip6_prefix_length, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
6321 curr_offset += 1;
6322 curr_len -= 1;
6323 pf_length -= 17;
6324 break;
6326 case 0x30:
6327 proto_tree_add_item(comp_tree, hf_gsm_a_sm_tft_protocol_header, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
6328 curr_offset += 1;
6329 curr_len -= 1;
6330 pf_length -= 1;
6331 break;
6333 case 0x40:
6334 proto_tree_add_item(comp_tree, hf_gsm_a_sm_tft_port, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
6335 curr_offset += 2;
6336 curr_len -= 2;
6337 pf_length -= 2;
6338 break;
6340 case 0x41:
6341 proto_tree_add_item(comp_tree, hf_gsm_a_sm_tft_port_low, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
6342 curr_offset += 2;
6343 proto_tree_add_item(comp_tree, hf_gsm_a_sm_tft_port_high, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
6344 curr_offset += 2;
6345 curr_len -= 4;
6346 pf_length -= 4;
6347 break;
6349 case 0x50:
6350 proto_tree_add_item(comp_tree, hf_gsm_a_sm_tft_port, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
6351 curr_offset += 2;
6352 curr_len -= 2;
6353 pf_length -= 2;
6354 break;
6356 case 0x51:
6357 proto_tree_add_item(comp_tree, hf_gsm_a_sm_tft_port_low, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
6358 curr_offset += 2;
6359 proto_tree_add_item(comp_tree, hf_gsm_a_sm_tft_port_high, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
6360 curr_offset += 2;
6361 curr_len -= 4;
6362 pf_length -= 4;
6363 break;
6365 case 0x60:
6366 proto_tree_add_item(comp_tree, hf_gsm_a_sm_tft_security, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
6367 curr_offset += 4;
6368 curr_len -= 4;
6369 pf_length -= 4;
6370 break;
6373 case 0x70:
6374 proto_tree_add_item(comp_tree, hf_gsm_a_sm_tft_traffic_class, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
6375 curr_offset++;
6376 proto_tree_add_item(comp_tree, hf_gsm_a_sm_tft_traffic_mask, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
6377 curr_offset++;
6378 curr_len-=2;
6379 pf_length-=2;
6380 break;
6382 case 0x80:
6383 proto_tree_add_bits_item(comp_tree, hf_gsm_a_spare_bits, tvb, (curr_offset<<3), 4, ENC_BIG_ENDIAN);
6384 proto_tree_add_item(comp_tree, hf_gsm_a_sm_tft_flow_label_type, tvb, curr_offset, 3, ENC_BIG_ENDIAN);
6385 curr_offset += 3;
6386 curr_len -= 3;
6387 pf_length -= 3;
6388 break;
6390 case 0x81:
6391 case 0x82:
6392 proto_tree_add_item(comp_tree, hf_gsm_a_sm_tft_mac_addr, tvb, curr_offset, 6, ENC_NA);
6393 curr_offset += 6;
6394 curr_len -= 6;
6395 pf_length -= 6;
6396 break;
6398 case 0x83:
6399 case 0x84:
6400 proto_tree_add_item(comp_tree, hf_gsm_a_sm_tft_vlan_tag_vid, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
6401 curr_offset += 2;
6402 curr_len -= 2;
6403 pf_length -= 2;
6404 break;
6406 case 0x85:
6407 case 0x86:
6408 proto_tree_add_item(comp_tree, hf_gsm_a_sm_tft_vlan_tag_pcp, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
6409 proto_tree_add_item(comp_tree, hf_gsm_a_sm_tft_vlan_tag_dei, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
6410 curr_offset += 1;
6411 curr_len -= 1;
6412 pf_length -= 1;
6413 break;
6415 case 0x87:
6416 proto_tree_add_item(comp_tree, hf_gsm_a_sm_tft_ethertype, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
6417 curr_offset += 2;
6418 curr_len -= 2;
6419 pf_length -= 2;
6420 break;
6422 default:
6423 curr_offset += pf_length;
6424 curr_len -= pf_length;
6425 pf_length = 0;
6428 count++;
6430 proto_item_set_len(tf_pf, curr_offset - prev_offset);
6433 /* The parameters list contains a variable number of parameters that might need to be
6434 * transferred in addition to the packet filters. If the parameters list is included, the E
6435 * bit is set to 1; otherwise, the E bit is set to 0.
6437 if ((e_bit == 1) && curr_len) {
6438 count = 0;
6439 while (curr_len) {
6440 proto_tree *tf_tree;
6441 pf_length = tvb_get_uint8(tvb, curr_offset+1);
6442 tf_tree = proto_tree_add_subtree_format(tree, tvb, curr_offset, pf_length+2, ett_sm_tft, NULL, "Parameter %d", count);
6443 param = tvb_get_uint8(tvb, curr_offset);
6444 proto_tree_add_item(tf_tree, hf_gsm_a_sm_tft_param_id, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
6445 curr_offset += 2;
6446 curr_len -= 2;
6447 switch (param) {
6448 case 0x01:
6449 proto_tree_add_item(tf_tree, hf_gsm_a_sm_tft_authorization_token_value, tvb, curr_offset, pf_length, ENC_NA);
6450 break;
6452 case 0x02:
6453 proto_tree_add_item(tf_tree, hf_gsm_a_sm_tft_media_component_number_value, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
6454 proto_tree_add_item(tf_tree, hf_gsm_a_sm_tft_ip_flow_number, tvb, curr_offset+2, 2, ENC_BIG_ENDIAN);
6455 break;
6457 case 0x03:
6458 for (i=0; i<pf_length; i++) {
6459 oct = tvb_get_uint8(tvb, curr_offset+i) & 0x0f;
6460 proto_tree_add_uint_format(tf_tree, hf_gsm_a_sm_tft_packet_filter_identifier, tvb, curr_offset+i, 1, oct+1, "Packet filter identifier %d: %d (%d)", i, oct+1, oct);
6462 break;
6464 default:
6465 proto_tree_add_item(tf_tree, hf_gsm_a_sm_tft_parameter_content, tvb, curr_offset, pf_length, ENC_NA);
6466 break;
6468 curr_offset += pf_length;
6469 curr_len -= pf_length;
6470 count++;
6474 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_gm_extraneous_data);
6476 return (len);
6480 * [9] 10.5.6.13 Temporary Mobile Group Identity (TMGI)
6482 uint16_t
6483 de_sm_tmgi(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
6485 uint32_t curr_offset;
6487 curr_offset = offset;
6489 proto_tree_add_item(tree, hf_gsm_a_sm_tmgi, tvb, curr_offset, 3, ENC_BIG_ENDIAN);
6490 curr_offset += 3;
6492 NO_MORE_DATA_CHECK(len);
6493 curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, tree, curr_offset, E212_NONE, true);
6495 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_gm_extraneous_data);
6497 return (curr_offset - offset);
6501 * [9] 10.5.6.14 MBMS bearer capabilities
6503 static uint16_t
6504 de_sm_mbms_bearer_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
6506 uint32_t curr_offset, temp32;
6507 uint8_t oct;
6508 const char *str;
6510 curr_offset = offset;
6512 oct = tvb_get_uint8(tvb, curr_offset);
6514 switch (oct)
6516 case 0x00: str = "Subscribed maximum bit rate for downlink/reserved"; break;
6517 case 0xff: str = "0 kbps"; break;
6518 default: str = wmem_strdup_printf(pinfo->pool, "%u kbps", qos_calc_bitrate(oct));
6521 proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_qos_max_bitrate_downl, tvb,
6522 curr_offset, 1, oct, "%s (%u)", str, oct);
6523 curr_offset += 1;
6525 NO_MORE_DATA_CHECK(len);
6527 oct = tvb_get_uint8(tvb, curr_offset);
6529 if (oct == 0x00)
6530 str = "Use the value indicated by the Maximum bit rate for downlink";
6531 else
6533 temp32 = qos_calc_ext_bitrate(oct);
6534 if (temp32 % 1000 == 0)
6535 str = wmem_strdup_printf(pinfo->pool, "%u Mbps", temp32 / 1000);
6536 else
6537 str = wmem_strdup_printf(pinfo->pool, "%u kbps", temp32);
6539 proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_qos_max_bitrate_downl_ext, tvb,
6540 curr_offset, 1, oct, "%s (%u)", str, oct);
6542 curr_offset += 1;
6544 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_gm_extraneous_data);
6546 return (curr_offset - offset);
6550 * [9] 10.5.6.15 MBMS protocol configuration options
6552 uint16_t
6553 de_sm_mbms_prot_conf_opt(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
6555 uint32_t curr_offset;
6557 curr_offset = offset;
6558 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset<<3), 8, ENC_BIG_ENDIAN);
6559 curr_offset++;
6561 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_gm_extraneous_data);
6563 return (curr_offset - offset);
6567 * [9] 10.5.6.16 Enhanced network service access point identifier
6569 static uint16_t
6570 de_sm_enh_nsapi(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
6572 uint8_t oct;
6573 const char *str;
6575 oct = tvb_get_uint8(tvb, offset);
6577 if(oct < 0x80)
6578 str = "Reserved";
6579 else if (oct < 0xff)
6580 str = wmem_strdup_printf(pinfo->pool, "NSAPI %u for Multimedia Broadcast/Multicast Service (MBMS) Multicast mode", oct);
6581 else
6582 str = "Reserved for use by lower layers in the p2p radio bearer allocation message for MBMS Broadcast mode";
6585 proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_enh_nsapi, tvb,
6586 offset, 1, oct, "%s (%u)", str, oct);
6588 /* no length check possible */
6589 return 1;
6593 * [9] 10.5.6.17 Request type
6595 static const value_string gsm_a_sm_req_type_vals[] = {
6596 { 0x01, "Initial request" },
6597 { 0x02, "Handover" },
6598 { 0x03, "RLOS" },
6599 { 0x04, "Emergency" },
6600 { 0x06, "Handover of emergency bearer services" },
6601 { 0, NULL }
6604 static uint16_t
6605 de_sm_req_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
6607 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (offset<<3) + 4, 1, ENC_BIG_ENDIAN);
6608 proto_tree_add_item(tree, hf_gsm_a_sm_req_type, tvb, offset, 1, ENC_BIG_ENDIAN);
6610 /* no length check possible */
6611 return 1;
6615 * [9] 10.5.6.18 Notification indicator
6617 static const value_string gsm_a_sm_notif_ind_vals[] = {
6618 { 0x0, "Reserved"},
6619 { 0x1, "SRVCC handover cancelled, IMS session re-establishment required"},
6620 { 0, NULL }
6623 static uint16_t
6624 de_sm_notif_ind(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
6626 uint32_t curr_offset;
6628 curr_offset = offset;
6630 proto_tree_add_item(tree, hf_gsm_a_sm_notif_ind, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
6632 return (len);
6636 * [10] 10.5.6.19 Connectivity type
6638 static const range_string gsm_a_sm_connectivity_type_vals[] = {
6639 { 0x0, 0x0, "The PDN connection type is not indicated"},
6640 { 0x1, 0x1, "The PDN connection is considered a LIPA PDN connection"},
6641 { 0x2, 0xF, "The PDN connection type is not indicated"},
6642 { 0, 0, NULL }
6645 static uint16_t
6646 de_sm_connectivity_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
6648 proto_tree_add_item(tree, hf_gsm_a_sm_connectivity_type, tvb, offset, 1, ENC_BIG_ENDIAN);
6650 return (len);
6654 * [12] 10.5.6.20 WLAN offload acceptability
6656 static const true_false_string gsm_a_sm_wlan_utran_offload_accept_value = {
6657 "Offloading the traffic of the PDN connection via a WLAN when in Iu mode is acceptable",
6658 "Offloading the traffic of the PDN connection via a WLAN when in Iu mode is not acceptable"
6661 static const true_false_string gsm_a_sm_wlan_eutran_offload_accept_value = {
6662 "Offloading the traffic of the PDN connection via a WLAN when in S1 mode is acceptable",
6663 "Offloading the traffic of the PDN connection via a WLAN when in S1 mode is not acceptable"
6666 static uint16_t
6667 de_sm_wlan_offload_accept(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
6669 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (offset<<3)+4, 2, ENC_BIG_ENDIAN);
6670 proto_tree_add_bits_item(tree, hf_gsm_a_sm_wlan_utran_offload_accept, tvb, (offset<<3)+6, 1, ENC_BIG_ENDIAN);
6671 proto_tree_add_bits_item(tree, hf_gsm_a_sm_wlan_eutran_offload_accept, tvb, (offset<<3)+7, 1, ENC_BIG_ENDIAN);
6673 return (len);
6677 * [13] 10.5.6.21 NBIFOM container
6679 static uint16_t
6680 de_sm_nbifom_cont(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
6682 if (nbifom_handle) {
6683 tvbuff_t *nbifom_tvb = tvb_new_subset_length(tvb, offset, len);
6685 call_dissector(nbifom_handle, nbifom_tvb, pinfo, tree);
6686 } else {
6687 proto_tree_add_item(tree, hf_gsm_a_sm_nbifom_cont, tvb, offset, len, ENC_NA);
6690 return len;
6693 uint16_t (*gm_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len, char *add_string, int string_len) = {
6694 /* GPRS Mobility Management Information Elements 10.5.5 */
6695 de_gmm_add_upd_type, /* Additional Update Type */
6696 de_gmm_attach_res, /* Attach Result */
6697 de_gmm_attach_type, /* Attach Type */
6698 de_gmm_ciph_alg, /* Ciphering Algorithm */
6699 de_gmm_integ_alg, /* Integrity Algorithm */
6700 de_gmm_tmsi_stat, /* TMSI Status */
6701 de_gmm_detach_type, /* Detach Type */
6702 de_gmm_drx_param, /* DRX Parameter */
6703 de_gmm_ftostby, /* Force to Standby */
6704 de_gmm_ftostby_h, /* Force to Standby - Info is in the high nibble */
6705 de_gmm_ptmsi_sig, /* P-TMSI Signature */
6706 de_gmm_ptmsi_sig2, /* P-TMSI Signature 2 */
6707 de_gmm_ident_type2, /* Identity Type 2 */
6708 de_gmm_imeisv_req, /* IMEISV Request */
6709 de_gmm_rec_npdu_lst, /* Receive N-PDU Numbers List */
6710 de_gmm_ms_net_cap, /* MS Network Capability */
6711 de_gmm_ms_radio_acc_cap, /* MS Radio Access Capability */
6712 de_gmm_cause, /* GMM Cause */
6713 de_gmm_rai, /* Routing Area Identification */
6714 de_gmm_rai2, /* Routing Area Identification 2 */
6715 de_gmm_update_res, /* Update Result */
6716 de_gmm_update_type, /* Update Type */
6717 de_gmm_ac_ref_nr, /* A&C Reference Number */
6718 de_gmm_ac_ref_nr_h, /* A&C Reference Number - Info is in the high nibble */
6719 de_gmm_service_type, /* Service Type */
6720 NULL /* no associated data */, /* Cell Notification */
6721 de_gmm_ps_lcs_cap, /* PS LCS Capability */
6722 de_gmm_net_feat_supp, /* Network Feature Support */
6723 de_gmm_add_net_feat_supp, /* Network Feature Support */
6724 de_gmm_rat_info_container, /* Inter RAT information container */
6725 de_gmm_req_ms_info, /* Requested MS information */
6726 NULL, /* UE network capability */
6727 de_gmm_eutran_irat_info_container, /* E-UTRAN inter RAT information container */
6728 de_gmm_voice_domain_pref, /* Voice domain preference and UE's usage setting */
6729 de_gmm_ptmsi_type, /* P-TMSI type */
6730 de_gmm_lai_2, /* Location Area Identification 2 */
6731 de_gmm_net_res_id_cont, /* Network resource identifier container */
6732 de_gmm_ext_drx_params, /* Extended DRX parameters */
6733 de_gmm_mac, /* Message authentication code */
6734 de_gmm_up_integ_ind, /* User Plane integrity indicator */
6735 de_gmm_dcn_id, /* DCN-ID */
6736 de_gmm_plmn_id_cn_operator, /* PLMN identity of the CN operator */
6737 de_gmm_non_3gpp_nw_prov_pol, /* Non-3GPP NW provided policies */
6738 /* Session Management Information Elements 10.5.6 */
6739 de_sm_apn, /* Access Point Name */
6740 de_sm_nsapi, /* Network Service Access Point Identifier */
6741 de_sm_pco, /* Protocol Configuration Options */
6742 de_sm_pco, /* Extended Protocol Configuration Options */
6743 de_sm_pdp_addr, /* Packet Data Protocol Address */
6744 de_sm_qos, /* Quality Of Service */
6745 de_sm_re_attempt_ind, /* Re-attempt indicator */
6746 de_sm_ext_qos, /* Extended quality of service */
6747 de_sm_cause, /* SM Cause */
6748 de_sm_cause_2, /* SM Cause 2 */
6749 de_sm_linked_ti, /* Linked TI */
6750 de_sm_sapi, /* LLC Service Access Point Identifier */
6751 de_sm_tear_down, /* Tear Down Indicator */
6752 de_sm_pflow_id, /* Packet Flow Identifier */
6753 de_sm_tflow_temp, /* Traffic Flow Template */
6754 de_sm_tmgi, /* Temporary Mobile Group Identity (TMGI) */
6755 de_sm_mbms_bearer_cap, /* MBMS bearer capabilities */
6756 de_sm_mbms_prot_conf_opt, /* MBMS protocol configuration options */
6757 de_sm_enh_nsapi, /* Enhanced network service access point identifier */
6758 de_sm_req_type, /* Request type */
6759 de_sm_notif_ind, /* Notification indicator */
6760 de_sm_connectivity_type, /* Connectivity type */
6761 de_sm_wlan_offload_accept, /* WLAN offload acceptability */
6762 de_sm_nbifom_cont, /* NBIFOM container */
6763 /* GPRS Common Information Elements 10.5.7 */
6764 de_gc_context_stat, /* PDP Context Status */
6765 de_gc_radio_prio, /* Radio Priority */
6766 de_gc_timer, /* GPRS Timer */
6767 de_gc_timer2, /* GPRS Timer 2 */
6768 de_gc_timer3, /* GPRS Timer 3 */
6769 de_gc_radio_prio2, /* Radio Priority 2 */
6770 de_gc_mbms_context_stat, /* 10.5.7.6 MBMS context status */
6771 de_gc_uplink_data_stat, /* 10.5.7.7 Uplink data status */
6772 de_gc_device_properties, /* 10.5.7.8 Device properties */
6773 NULL, /* NONE */
6776 /* MESSAGE FUNCTIONS */
6779 * [7] 9.4.1
6781 static void
6782 dtap_gmm_attach_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6784 uint32_t curr_offset;
6785 uint32_t consumed;
6786 unsigned curr_len;
6788 curr_offset = offset;
6789 curr_len = len;
6791 pinfo->p2p_dir = P2P_DIR_RECV;
6793 ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_MS_NET_CAP, NULL, ei_gsm_a_gm_missing_mandatory_element);
6795 ELEM_MAND_VV_SHORT(GSM_A_PDU_TYPE_GM, DE_ATTACH_TYPE, GSM_A_PDU_TYPE_COMMON, DE_CIPH_KEY_SEQ_NUM, ei_gsm_a_gm_missing_mandatory_element);
6797 ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_DRX_PARAM, NULL, ei_gsm_a_gm_missing_mandatory_element);
6799 ELEM_MAND_LV( GSM_A_PDU_TYPE_COMMON, DE_MID, NULL, ei_gsm_a_gm_missing_mandatory_element);
6801 ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_RAI, " - Old routing area identification", ei_gsm_a_gm_missing_mandatory_element);
6803 ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_MS_RAD_ACC_CAP, NULL, ei_gsm_a_gm_missing_mandatory_element);
6805 ELEM_OPT_TV( 0x19, GSM_A_PDU_TYPE_GM, DE_P_TMSI_SIG, " - Old P-TMSI Signature");
6807 ELEM_OPT_TV( 0x17, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER, " - Ready Timer");
6809 ELEM_OPT_TV_SHORT( 0x90, GSM_A_PDU_TYPE_GM, DE_TMSI_STAT, NULL);
6811 ELEM_OPT_TLV( 0x33, GSM_A_PDU_TYPE_GM, DE_PS_LCS_CAP, NULL);
6813 ELEM_OPT_TLV( 0x11, GSM_A_PDU_TYPE_COMMON, DE_MS_CM_2, NULL);
6815 ELEM_OPT_TLV( 0x20, GSM_A_PDU_TYPE_COMMON, DE_MS_CM_3, NULL);
6817 ELEM_OPT_TLV( 0x40, GSM_A_PDU_TYPE_DTAP, DE_SUP_CODEC_LIST, NULL);
6819 ELEM_OPT_TLV( 0x58, NAS_PDU_TYPE_EMM, DE_EMM_UE_NET_CAP, NULL);
6821 ELEM_OPT_TLV( 0x1A, GSM_A_PDU_TYPE_COMMON, DE_MID, " - Additional mobile identity");
6823 ELEM_OPT_TLV( 0x1B, GSM_A_PDU_TYPE_GM, DE_RAI_2, " - Additional old routing area identification");
6825 ELEM_OPT_TLV( 0x5D, GSM_A_PDU_TYPE_GM, DE_VOICE_DOMAIN_PREF, NULL);
6827 ELEM_OPT_TV_SHORT(0xD0, GSM_A_PDU_TYPE_GM, DE_DEVICE_PROPERTIES, NULL);
6829 ELEM_OPT_TV_SHORT(0xE0, GSM_A_PDU_TYPE_GM, DE_PTMSI_TYPE, NULL);
6831 ELEM_OPT_TV_SHORT(0xC0, GSM_A_PDU_TYPE_COMMON, DE_MS_NET_FEAT_SUP, NULL);
6833 ELEM_OPT_TLV(0x14, GSM_A_PDU_TYPE_GM, DE_LAI_2, " - Old location area identification");
6835 ELEM_OPT_TV_SHORT(0xF0, GSM_A_PDU_TYPE_GM, DE_ADD_UPD_TYPE, NULL);
6837 ELEM_OPT_TLV(0x10, GSM_A_PDU_TYPE_GM, DE_NET_RES_ID_CONT, " - TMSI based NRI container");
6839 ELEM_OPT_TLV(0x6A, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3324 value");
6841 ELEM_OPT_TLV(0x39, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - T3312 extended value");
6843 ELEM_OPT_TLV(0x6E, GSM_A_PDU_TYPE_GM, DE_EXT_DRX_PARAMS, NULL);
6845 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
6849 * [7] 9.4.2
6851 static void
6852 dtap_gmm_attach_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6854 uint32_t curr_offset;
6855 uint32_t consumed;
6856 unsigned curr_len;
6858 curr_offset = offset;
6859 curr_len = len;
6861 pinfo->p2p_dir = P2P_DIR_SENT;
6863 ELEM_MAND_VV_SHORT(GSM_A_PDU_TYPE_GM, DE_ATTACH_RES, GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND_H, ei_gsm_a_gm_missing_mandatory_element);
6865 ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER, NULL, ei_gsm_a_gm_missing_mandatory_element);
6867 ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_RAD_PRIO_2, " - Radio priority for TOM8", ei_gsm_a_gm_missing_mandatory_element);
6868 curr_len++;
6869 curr_offset--;
6871 ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_RAD_PRIO, " - Radio priority for SMS", ei_gsm_a_gm_missing_mandatory_element);
6873 ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_RAI, NULL, ei_gsm_a_gm_missing_mandatory_element);
6875 ELEM_OPT_TV( 0x19, GSM_A_PDU_TYPE_GM, DE_P_TMSI_SIG, NULL);
6877 ELEM_OPT_TV( 0x17, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER, " - Negotiated Ready Timer");
6879 ELEM_OPT_TLV( 0x18, GSM_A_PDU_TYPE_COMMON, DE_MID, " - Allocated P-TMSI");
6881 ELEM_OPT_TLV( 0x23, GSM_A_PDU_TYPE_COMMON, DE_MID, NULL);
6883 ELEM_OPT_TV( 0x25, GSM_A_PDU_TYPE_GM, DE_GMM_CAUSE, NULL);
6885 ELEM_OPT_TLV( 0x2A, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3302 value");
6887 ELEM_OPT_T( 0x8C, GSM_A_PDU_TYPE_GM, DE_CELL_NOT, NULL);
6889 ELEM_OPT_TLV( 0x4A, GSM_A_PDU_TYPE_COMMON, DE_PLMN_LIST, NULL);
6891 ELEM_OPT_TV_SHORT( 0xB0, GSM_A_PDU_TYPE_GM, DE_NET_FEAT_SUP, NULL);
6893 ELEM_OPT_TLV( 0x34, GSM_A_PDU_TYPE_DTAP, DE_EMERGENCY_NUM_LIST, NULL);
6895 ELEM_OPT_TV_SHORT( 0xA0, GSM_A_PDU_TYPE_GM, DE_REQ_MS_INFO, NULL);
6897 ELEM_OPT_TLV( 0x37, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3319 value");
6899 ELEM_OPT_TLV( 0x38, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3323 value" );
6901 ELEM_OPT_TLV(0x39, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - T3312 extended value");
6903 ELEM_OPT_TLV(0x66, GSM_A_PDU_TYPE_GM, DE_ADD_NET_FEAT_SUP, NULL);
6905 ELEM_OPT_TLV(0x6A, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3324 value");
6907 ELEM_OPT_TLV(0x6E, GSM_A_PDU_TYPE_GM, DE_EXT_DRX_PARAMS, NULL);
6909 ELEM_OPT_TV_SHORT(0xC0, GSM_A_PDU_TYPE_GM, DE_UP_INTEG_IND, NULL);
6911 ELEM_OPT_TLV(0x31, GSM_A_PDU_TYPE_GM, DE_MS_NET_CAP, " - Replayed MS network capability");
6913 ELEM_OPT_TLV(0x33, GSM_A_PDU_TYPE_GM, DE_MS_RAD_ACC_CAP, " - Replayed MS Radio Access capability");
6915 ELEM_OPT_TLV(0x65, GSM_A_PDU_TYPE_GM, DE_DCN_ID, NULL);
6917 ELEM_OPT_TLV(0x63, GSM_A_PDU_TYPE_GM, DE_PLMN_ID_CN_OPERATOR, NULL);
6919 ELEM_OPT_TV_SHORT(0xD0, GSM_A_PDU_TYPE_GM, DE_NON_3GPP_NW_PROV_POL, NULL);
6921 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
6925 * [7] 9.4.3
6927 static void
6928 dtap_gmm_attach_com(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6931 uint32_t curr_offset;
6932 uint32_t consumed;
6933 unsigned curr_len;
6935 curr_offset = offset;
6936 curr_len = len;
6938 pinfo->p2p_dir = P2P_DIR_RECV;
6940 ELEM_OPT_TLV( 0x27, GSM_A_PDU_TYPE_GM, DE_RAT_INFO_CONTAINER, " - Inter RAT handover information");
6942 ELEM_OPT_TLV( 0x2B, GSM_A_PDU_TYPE_GM, DE_EUTRAN_IRAT_INFO_CONTAINER, " - E-UTRAN inter RAT handover information");
6944 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
6948 * [7] 9.4.4
6950 static void
6951 dtap_gmm_attach_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6953 uint32_t curr_offset;
6954 uint32_t consumed;
6955 unsigned curr_len;
6957 curr_offset = offset;
6958 curr_len = len;
6960 pinfo->p2p_dir = P2P_DIR_SENT;
6962 ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_GMM_CAUSE, NULL, ei_gsm_a_gm_missing_mandatory_element);
6964 ELEM_OPT_TLV( 0x2A, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3302 value" );
6966 ELEM_OPT_TLV(0x3A, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3346 value");
6968 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
6972 * [7] 9.4.5
6974 static void
6975 dtap_gmm_detach_req_MT(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6977 uint32_t curr_offset;
6978 uint32_t consumed;
6979 unsigned curr_len;
6981 curr_offset = offset;
6982 curr_len = len;
6984 pinfo->p2p_dir = P2P_DIR_SENT;
6986 ELEM_MAND_VV_SHORT(GSM_A_PDU_TYPE_GM, DE_DETACH_TYPE, GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND_H, ei_gsm_a_gm_missing_mandatory_element);
6988 ELEM_OPT_TV( 0x25, GSM_A_PDU_TYPE_GM, DE_GMM_CAUSE, NULL);
6990 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
6993 static void
6994 dtap_gmm_detach_req_MO(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6996 uint32_t curr_offset;
6997 uint32_t consumed;
6998 unsigned curr_len;
7000 curr_offset = offset;
7001 curr_len = len;
7003 pinfo->p2p_dir = P2P_DIR_RECV;
7005 ELEM_MAND_VV_SHORT(GSM_A_PDU_TYPE_GM, DE_DETACH_TYPE, GSM_A_PDU_TYPE_COMMON, DE_SPARE_NIBBLE, ei_gsm_a_gm_missing_mandatory_element);
7007 ELEM_OPT_TLV( 0x18, GSM_A_PDU_TYPE_COMMON, DE_MID, NULL);
7009 ELEM_OPT_TLV( 0x19, GSM_A_PDU_TYPE_GM, DE_P_TMSI_SIG_2, NULL);
7011 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7014 static void
7015 dtap_gmm_detach_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7017 if (pinfo->link_dir == P2P_DIR_UL) {
7018 dtap_gmm_detach_req_MO(tvb, tree, pinfo, offset, len);
7019 return;
7020 }else if (pinfo->link_dir == P2P_DIR_DL) {
7021 dtap_gmm_detach_req_MT(tvb, tree, pinfo, offset, len);
7022 return;
7023 } else {
7024 /* Unknown direction. Try heuristics based on message length. */
7025 if (len > 5) {
7026 dtap_gmm_detach_req_MO(tvb, tree, pinfo, offset, len);
7027 } else {
7028 dtap_gmm_detach_req_MT(tvb, tree, pinfo, offset, len);
7034 * [7] 9.4.6
7036 static void
7037 dtap_gmm_detach_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7039 uint32_t curr_offset;
7040 unsigned curr_len;
7042 curr_offset = offset;
7043 curr_len = len;
7045 pinfo->p2p_dir = P2P_DIR_RECV;
7047 if (curr_len == 0) {
7048 return;
7051 ELEM_MAND_VV_SHORT(GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND, GSM_A_PDU_TYPE_COMMON, DE_SPARE_NIBBLE, ei_gsm_a_gm_missing_mandatory_element);
7053 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7057 * [7] 9.4.7
7059 static void
7060 dtap_gmm_ptmsi_realloc_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7062 uint32_t curr_offset;
7063 uint32_t consumed;
7064 unsigned curr_len;
7066 curr_offset = offset;
7067 curr_len = len;
7069 pinfo->p2p_dir = P2P_DIR_SENT;
7071 ELEM_MAND_LV( GSM_A_PDU_TYPE_COMMON, DE_MID, " - Allocated P-TMSI", ei_gsm_a_gm_missing_mandatory_element);
7073 ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_RAI, NULL, ei_gsm_a_gm_missing_mandatory_element);
7075 ELEM_MAND_VV_SHORT(GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND, GSM_A_PDU_TYPE_COMMON, DE_SPARE_NIBBLE, ei_gsm_a_gm_missing_mandatory_element);
7077 ELEM_OPT_TV( 0x19, GSM_A_PDU_TYPE_GM, DE_P_TMSI_SIG, " - P-TMSI Signature" );
7079 ELEM_OPT_TLV(0x65, GSM_A_PDU_TYPE_GM, DE_DCN_ID, NULL);
7081 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7085 * [7] 9.4.8
7087 static void
7088 dtap_gmm_ptmsi_realloc_com(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7090 uint32_t curr_offset;
7091 /* uint32_t consumed; */
7092 unsigned curr_len;
7094 curr_offset = offset;
7095 curr_len = len;
7097 pinfo->p2p_dir = P2P_DIR_RECV;
7099 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7103 * [7] 9.4.9
7105 static void
7106 dtap_gmm_auth_ciph_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7108 uint32_t curr_offset;
7109 uint32_t consumed;
7110 unsigned curr_len;
7112 curr_offset = offset;
7113 curr_len = len;
7115 pinfo->p2p_dir = P2P_DIR_SENT;
7117 ELEM_MAND_VV_SHORT(GSM_A_PDU_TYPE_GM, DE_CIPH_ALG, GSM_A_PDU_TYPE_GM, DE_IMEISV_REQ, ei_gsm_a_gm_missing_mandatory_element);
7119 ELEM_MAND_VV_SHORT(GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND, GSM_A_PDU_TYPE_GM, DE_AC_REF_NUM_H, ei_gsm_a_gm_missing_mandatory_element);
7121 ELEM_OPT_TV(0x21, GSM_A_PDU_TYPE_DTAP, DE_AUTH_PARAM_RAND, NULL);
7123 ELEM_OPT_TV_SHORT(0x80, GSM_A_PDU_TYPE_COMMON, DE_CIPH_KEY_SEQ_NUM, NULL);
7125 ELEM_OPT_TLV(0x28, GSM_A_PDU_TYPE_DTAP, DE_AUTH_PARAM_AUTN, NULL);
7127 ELEM_OPT_TLV(0x31, GSM_A_PDU_TYPE_GM, DE_MS_NET_CAP, " - Replayed MS network capability");
7129 ELEM_OPT_TLV(0x42, GSM_A_PDU_TYPE_GM, DE_INTEG_ALG, NULL);
7131 ELEM_OPT_TLV(0x43, GSM_A_PDU_TYPE_GM, DE_MAC, NULL);
7133 ELEM_OPT_TLV(0x33, GSM_A_PDU_TYPE_GM, DE_MS_RAD_ACC_CAP, " - Replayed MS Radio Access capability");
7135 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7139 * [7] 9.4.10
7141 static void
7142 dtap_gmm_auth_ciph_resp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7144 uint32_t curr_offset;
7145 uint32_t consumed;
7146 unsigned curr_len;
7148 curr_offset = offset;
7149 curr_len = len;
7151 pinfo->p2p_dir = P2P_DIR_RECV;
7153 ELEM_MAND_VV_SHORT(GSM_A_PDU_TYPE_GM, DE_AC_REF_NUM, GSM_A_PDU_TYPE_COMMON, DE_SPARE_NIBBLE, ei_gsm_a_gm_missing_mandatory_element);
7155 ELEM_OPT_TV(0x22, GSM_A_PDU_TYPE_DTAP, DE_AUTH_RESP_PARAM, NULL);
7157 ELEM_OPT_TLV(0x23, GSM_A_PDU_TYPE_COMMON, DE_MID, " - IMEISV" );
7159 ELEM_OPT_TLV(0x29, GSM_A_PDU_TYPE_DTAP, DE_AUTH_RESP_PARAM_EXT, NULL);
7161 ELEM_OPT_TLV(0x43, GSM_A_PDU_TYPE_GM, DE_MAC, NULL);
7163 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7167 * [7] 9.4.11
7169 static void
7170 dtap_gmm_auth_ciph_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7172 uint32_t curr_offset;
7173 unsigned curr_len;
7175 curr_offset = offset;
7176 curr_len = len;
7178 pinfo->p2p_dir = P2P_DIR_SENT;
7180 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7184 * [7] 9.4.10a
7186 static void
7187 dtap_gmm_auth_ciph_fail(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7189 uint32_t curr_offset;
7190 uint32_t consumed;
7191 unsigned curr_len;
7193 curr_offset = offset;
7194 curr_len = len;
7196 pinfo->p2p_dir = P2P_DIR_RECV;
7198 ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_GMM_CAUSE, NULL, ei_gsm_a_gm_missing_mandatory_element);
7200 ELEM_OPT_TLV( 0x30, GSM_A_PDU_TYPE_DTAP, DE_AUTH_FAIL_PARAM, NULL);
7202 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7206 * [7] 9.4.12
7208 static void
7209 dtap_gmm_ident_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7211 uint32_t curr_offset;
7212 unsigned curr_len;
7214 curr_offset = offset;
7215 curr_len = len;
7217 pinfo->p2p_dir = P2P_DIR_SENT;
7219 ELEM_MAND_VV_SHORT(GSM_A_PDU_TYPE_GM, DE_ID_TYPE_2, GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND_H, ei_gsm_a_gm_missing_mandatory_element);
7221 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7225 * [7] 9.4.13
7227 static void
7228 dtap_gmm_ident_res(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7230 uint32_t curr_offset;
7231 uint32_t consumed;
7232 unsigned curr_len;
7234 curr_offset = offset;
7235 curr_len = len;
7237 pinfo->p2p_dir = P2P_DIR_RECV;
7239 ELEM_MAND_LV( GSM_A_PDU_TYPE_COMMON, DE_MID, NULL, ei_gsm_a_gm_missing_mandatory_element);
7241 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7245 * [7] 9.4.14
7247 static void
7248 dtap_gmm_rau_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7250 uint32_t curr_offset;
7251 uint32_t consumed;
7252 unsigned curr_len;
7254 curr_offset = offset;
7255 curr_len = len;
7257 pinfo->p2p_dir = P2P_DIR_RECV;
7259 ELEM_MAND_VV_SHORT(GSM_A_PDU_TYPE_GM, DE_UPD_TYPE, GSM_A_PDU_TYPE_COMMON, DE_CIPH_KEY_SEQ_NUM, ei_gsm_a_gm_missing_mandatory_element);
7261 ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_RAI, " - Old routing area identification", ei_gsm_a_gm_missing_mandatory_element);
7263 ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_MS_RAD_ACC_CAP, NULL, ei_gsm_a_gm_missing_mandatory_element);
7265 ELEM_OPT_TV( 0x19, GSM_A_PDU_TYPE_GM, DE_P_TMSI_SIG, " - Old P-TMSI Signature" );
7267 ELEM_OPT_TV( 0x17, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER, " - Requested Ready Timer" );
7269 ELEM_OPT_TV( 0x27, GSM_A_PDU_TYPE_GM, DE_DRX_PARAM, NULL);
7271 ELEM_OPT_TV_SHORT( 0x90, GSM_A_PDU_TYPE_GM, DE_TMSI_STAT, NULL);
7273 ELEM_OPT_TLV( 0x18, GSM_A_PDU_TYPE_COMMON, DE_MID, " - P-TMSI" );
7275 ELEM_OPT_TLV( 0x31, GSM_A_PDU_TYPE_GM, DE_MS_NET_CAP, NULL);
7277 ELEM_OPT_TLV( 0x32, GSM_A_PDU_TYPE_GM, DE_PDP_CONTEXT_STAT, NULL);
7279 ELEM_OPT_TLV( 0x33, GSM_A_PDU_TYPE_GM, DE_PS_LCS_CAP, NULL);
7281 ELEM_OPT_TLV( 0x35, GSM_A_PDU_TYPE_GM, DE_MBMS_CTX_STATUS, NULL);
7283 ELEM_OPT_TLV( 0x58, NAS_PDU_TYPE_EMM, DE_EMM_UE_NET_CAP, NULL);
7285 ELEM_OPT_TLV( 0x1A, GSM_A_PDU_TYPE_COMMON, DE_MID, " - Additional mobile identity");
7287 ELEM_OPT_TLV( 0x1B, GSM_A_PDU_TYPE_GM, DE_RAI_2, " - Additional old routing area identification");
7289 ELEM_OPT_TLV( 0x11, GSM_A_PDU_TYPE_COMMON, DE_MS_CM_2, NULL);
7291 ELEM_OPT_TLV( 0x20, GSM_A_PDU_TYPE_COMMON, DE_MS_CM_3, NULL);
7293 ELEM_OPT_TLV( 0x40, GSM_A_PDU_TYPE_DTAP, DE_SUP_CODEC_LIST, NULL);
7295 ELEM_OPT_TLV( 0x5D, GSM_A_PDU_TYPE_GM, DE_VOICE_DOMAIN_PREF, NULL);
7297 ELEM_OPT_TV_SHORT(0xE0, GSM_A_PDU_TYPE_GM, DE_PTMSI_TYPE, NULL);
7299 ELEM_OPT_TV_SHORT(0xD0, GSM_A_PDU_TYPE_GM, DE_DEVICE_PROPERTIES, NULL);
7301 ELEM_OPT_TV_SHORT(0xC0, GSM_A_PDU_TYPE_COMMON, DE_MS_NET_FEAT_SUP, NULL);
7303 ELEM_OPT_TLV(0x14, GSM_A_PDU_TYPE_GM, DE_LAI_2, " - Old location area identification");
7305 ELEM_OPT_TV_SHORT(0xF0, GSM_A_PDU_TYPE_GM, DE_ADD_UPD_TYPE, NULL);
7307 ELEM_OPT_TLV(0x10, GSM_A_PDU_TYPE_GM, DE_NET_RES_ID_CONT, " - TMSI based NRI container");
7309 ELEM_OPT_TLV(0x6A, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3324 value");
7311 ELEM_OPT_TLV(0x39, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - T3312 extended value");
7313 ELEM_OPT_TLV(0x6E, GSM_A_PDU_TYPE_GM, DE_EXT_DRX_PARAMS, NULL);
7315 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7319 * [7] 9.4.15
7321 static void
7322 dtap_gmm_rau_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7324 uint32_t curr_offset;
7325 uint32_t consumed;
7326 unsigned curr_len;
7328 curr_offset = offset;
7329 curr_len = len;
7331 pinfo->p2p_dir = P2P_DIR_SENT;
7333 ELEM_MAND_VV_SHORT(GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND, GSM_A_PDU_TYPE_GM, DE_UPD_RES, ei_gsm_a_gm_missing_mandatory_element);
7335 ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER, " - Periodic RA update timer", ei_gsm_a_gm_missing_mandatory_element);
7337 ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_RAI, NULL, ei_gsm_a_gm_missing_mandatory_element);
7339 ELEM_OPT_TV( 0x19, GSM_A_PDU_TYPE_GM, DE_P_TMSI_SIG, NULL);
7341 ELEM_OPT_TLV( 0x18, GSM_A_PDU_TYPE_COMMON, DE_MID, " - Allocated P-TMSI");
7343 ELEM_OPT_TLV( 0x23, GSM_A_PDU_TYPE_COMMON, DE_MID, " - MS identity");
7345 ELEM_OPT_TLV( 0x26, GSM_A_PDU_TYPE_GM, DE_REC_N_PDU_NUM_LIST, NULL);
7347 ELEM_OPT_TV( 0x17, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER, " - Negotiated Ready Timer" );
7349 ELEM_OPT_TV( 0x25, GSM_A_PDU_TYPE_GM, DE_GMM_CAUSE, NULL);
7351 ELEM_OPT_TLV( 0x2A, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3302 value" );
7353 ELEM_OPT_T( 0x8C, GSM_A_PDU_TYPE_GM, DE_CELL_NOT, NULL);
7355 ELEM_OPT_TLV( 0x4A, GSM_A_PDU_TYPE_COMMON, DE_PLMN_LIST, NULL);
7357 ELEM_OPT_TLV( 0x32, GSM_A_PDU_TYPE_GM, DE_PDP_CONTEXT_STAT, NULL);
7359 ELEM_OPT_TV_SHORT( 0xB0, GSM_A_PDU_TYPE_GM, DE_NET_FEAT_SUP, NULL);
7361 ELEM_OPT_TLV( 0x34, GSM_A_PDU_TYPE_DTAP, DE_EMERGENCY_NUM_LIST, NULL);
7363 ELEM_OPT_TLV( 0x35, GSM_A_PDU_TYPE_GM, DE_MBMS_CTX_STATUS, NULL);
7365 ELEM_OPT_TV_SHORT( 0xA0, GSM_A_PDU_TYPE_GM, DE_REQ_MS_INFO, NULL);
7367 ELEM_OPT_TLV( 0x37, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3319 value");
7369 ELEM_OPT_TLV( 0x38, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3323 value");
7371 ELEM_OPT_TLV(0x39, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - T3312 extended value");
7373 ELEM_OPT_TLV(0x66, GSM_A_PDU_TYPE_GM, DE_ADD_NET_FEAT_SUP, NULL);
7375 ELEM_OPT_TLV(0x6A, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3324 value");
7377 ELEM_OPT_TLV(0x6E, GSM_A_PDU_TYPE_GM, DE_EXT_DRX_PARAMS, NULL);
7379 ELEM_OPT_TV_SHORT(0xC0, GSM_A_PDU_TYPE_GM, DE_UP_INTEG_IND, NULL);
7381 ELEM_OPT_TLV(0x31, GSM_A_PDU_TYPE_GM, DE_MS_NET_CAP, " - Replayed MS network capability");
7383 ELEM_OPT_TLV(0x33, GSM_A_PDU_TYPE_GM, DE_MS_RAD_ACC_CAP, " - Replayed MS Radio Access capability");
7385 ELEM_OPT_TLV(0x65, GSM_A_PDU_TYPE_GM, DE_DCN_ID, NULL);
7387 ELEM_OPT_TLV(0x63, GSM_A_PDU_TYPE_GM, DE_PLMN_ID_CN_OPERATOR, NULL);
7389 ELEM_OPT_TV_SHORT(0xD0, GSM_A_PDU_TYPE_GM, DE_NON_3GPP_NW_PROV_POL, NULL);
7391 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7395 * [7] 9.4.16
7397 static void
7398 dtap_gmm_rau_com(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7400 uint32_t curr_offset;
7401 uint32_t consumed;
7402 unsigned curr_len;
7404 curr_offset = offset;
7405 curr_len = len;
7407 pinfo->p2p_dir = P2P_DIR_RECV;
7408 /* [7] 10.5.5.11 */
7409 ELEM_OPT_TLV( 0x26, GSM_A_PDU_TYPE_GM, DE_REC_N_PDU_NUM_LIST, NULL);
7410 /* Inter RAT information container 10.5.5.24 TS 24.008 version 6.8.0 Release 6 */
7411 ELEM_OPT_TLV( 0x27, GSM_A_PDU_TYPE_GM, DE_RAT_INFO_CONTAINER, " - Inter RAT handover information");
7413 ELEM_OPT_TLV( 0x2B, GSM_A_PDU_TYPE_GM, DE_EUTRAN_IRAT_INFO_CONTAINER, " - E-UTRAN inter RAT handover information");
7415 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7419 * [7] 9.4.17
7421 static void
7422 dtap_gmm_rau_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7424 uint32_t curr_offset;
7425 uint32_t consumed;
7426 unsigned curr_len;
7428 curr_offset = offset;
7429 curr_len = len;
7431 pinfo->p2p_dir = P2P_DIR_SENT;
7433 ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_GMM_CAUSE, NULL, ei_gsm_a_gm_missing_mandatory_element);
7435 ELEM_MAND_VV_SHORT(GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND, GSM_A_PDU_TYPE_COMMON, DE_SPARE_NIBBLE, ei_gsm_a_gm_missing_mandatory_element);
7437 ELEM_OPT_TLV(0x2A, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3302 value");
7439 ELEM_OPT_TLV(0x3A, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3346 value");
7441 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7445 * [7] 9.4.18
7447 static void
7448 dtap_gmm_status(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7450 uint32_t curr_offset;
7451 uint32_t consumed;
7452 unsigned curr_len;
7454 curr_offset = offset;
7455 curr_len = len;
7457 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
7459 ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_GMM_CAUSE, NULL, ei_gsm_a_gm_missing_mandatory_element);
7461 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7465 * [8] 9.4.19 GMM Information
7467 static void
7468 dtap_gmm_information(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7470 uint32_t curr_offset;
7471 uint32_t consumed;
7472 unsigned curr_len;
7474 curr_offset = offset;
7475 curr_len = len;
7477 pinfo->p2p_dir = P2P_DIR_SENT;
7479 ELEM_OPT_TLV( 0x43, GSM_A_PDU_TYPE_DTAP, DE_NETWORK_NAME, " - Full Name" );
7481 ELEM_OPT_TLV( 0x45, GSM_A_PDU_TYPE_DTAP, DE_NETWORK_NAME, " - Short Name" );
7483 ELEM_OPT_TV( 0x46, GSM_A_PDU_TYPE_DTAP, DE_TIME_ZONE, NULL);
7485 ELEM_OPT_TV( 0x47, GSM_A_PDU_TYPE_DTAP, DE_TIME_ZONE_TIME, NULL);
7487 ELEM_OPT_TLV( 0x48, GSM_A_PDU_TYPE_DTAP, DE_LSA_ID, NULL);
7489 ELEM_OPT_TLV( 0x49, GSM_A_PDU_TYPE_DTAP, DE_DAY_SAVING_TIME, NULL);
7491 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7495 * [7] 9.4.20
7497 static void
7498 dtap_gmm_service_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7500 uint32_t curr_offset;
7501 uint32_t consumed;
7502 unsigned curr_len;
7504 curr_offset = offset;
7505 curr_len = len;
7507 pinfo->p2p_dir = P2P_DIR_RECV;
7509 ELEM_MAND_VV_SHORT(GSM_A_PDU_TYPE_COMMON, DE_CIPH_KEY_SEQ_NUM, GSM_A_PDU_TYPE_GM, DE_SRVC_TYPE, ei_gsm_a_gm_missing_mandatory_element);
7511 /* P-TMSI Mobile station identity 10.5.1.4 M LV 6 */
7512 ELEM_MAND_LV( GSM_A_PDU_TYPE_COMMON, DE_MID, NULL, ei_gsm_a_gm_missing_mandatory_element);
7514 ELEM_OPT_TLV( 0x32, GSM_A_PDU_TYPE_GM, DE_PDP_CONTEXT_STAT, NULL);
7516 /* MBMS context status 10.5.7.6 TLV 2 - 18 */
7517 ELEM_OPT_TLV( 0x35, GSM_A_PDU_TYPE_GM, DE_MBMS_CTX_STATUS, NULL);
7519 ELEM_OPT_TLV( 0x36, GSM_A_PDU_TYPE_GM, DE_UPLINK_DATA_STATUS, NULL);
7521 ELEM_OPT_TV_SHORT(0xD0, GSM_A_PDU_TYPE_GM, DE_DEVICE_PROPERTIES, NULL);
7523 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7527 * [7] 9.4.21
7529 static void
7530 dtap_gmm_service_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7532 uint32_t curr_offset;
7533 uint32_t consumed;
7534 unsigned curr_len;
7536 curr_offset = offset;
7537 curr_len = len;
7539 pinfo->p2p_dir = P2P_DIR_SENT;
7541 ELEM_OPT_TLV( 0x32, GSM_A_PDU_TYPE_GM, DE_PDP_CONTEXT_STAT, NULL);
7543 /* MBMS context status 10.5.7.6 TLV 2 - 18 */
7544 ELEM_OPT_TLV( 0x35, GSM_A_PDU_TYPE_GM, DE_MBMS_CTX_STATUS, NULL);
7546 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7550 * [7] 9.4.22
7552 static void
7553 dtap_gmm_service_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7555 uint32_t curr_offset;
7556 uint32_t consumed;
7557 unsigned curr_len;
7559 curr_offset = offset;
7560 curr_len = len;
7562 pinfo->p2p_dir = P2P_DIR_SENT;
7564 ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_GMM_CAUSE, NULL, ei_gsm_a_gm_missing_mandatory_element);
7566 ELEM_OPT_TLV(0x3A, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3346 value");
7568 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7572 * [8] 9.5.1 Activate PDP context request
7573 * Direction: MS to network
7575 static void
7576 dtap_sm_act_pdp_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7578 uint32_t curr_offset;
7579 uint32_t consumed;
7580 unsigned curr_len;
7582 curr_offset = offset;
7583 curr_len = len;
7585 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
7586 /* MS to network */
7587 pinfo->link_dir = P2P_DIR_UL;
7589 ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_NET_SAPI, " - Requested NSAPI", ei_gsm_a_gm_missing_mandatory_element);
7591 ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_LLC_SAPI, " - Requested LLC SAPI", ei_gsm_a_gm_missing_mandatory_element);
7593 ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_QOS, " - Requested QoS", ei_gsm_a_gm_missing_mandatory_element);
7595 ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_PD_PRO_ADDR, " - Requested PDP address", ei_gsm_a_gm_missing_mandatory_element);
7597 ELEM_OPT_TLV( 0x28, GSM_A_PDU_TYPE_GM, DE_ACC_POINT_NAME, NULL);
7599 ELEM_OPT_TLV( 0x27, GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT, NULL);
7601 ELEM_OPT_TV_SHORT( 0xA0, GSM_A_PDU_TYPE_GM, DE_REQ_TYPE, NULL);
7603 ELEM_OPT_TV_SHORT(0xC0, GSM_A_PDU_TYPE_GM, DE_DEVICE_PROPERTIES, NULL);
7605 ELEM_OPT_TLV(0x33, GSM_A_PDU_TYPE_GM, DE_NBIFOM_CONT, NULL);
7607 ELEM_OPT_TLV_E(0x7B, GSM_A_PDU_TYPE_GM, DE_EXT_PRO_CONF_OPT, NULL);
7609 ELEM_OPT_TLV(0x5C, GSM_A_PDU_TYPE_GM, DE_EXT_QOS, NULL);
7611 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7615 * [9] 9.5.2 Activate PDP context accept
7616 * Direction: network to MS
7618 static void
7619 dtap_sm_act_pdp_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7621 uint32_t curr_offset;
7622 uint32_t consumed;
7623 unsigned curr_len;
7625 curr_offset = offset;
7626 curr_len = len;
7628 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
7629 /* Network to MS*/
7630 pinfo->link_dir = P2P_DIR_DL;
7632 ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_LLC_SAPI, " - Negotiated LLC SAPI", ei_gsm_a_gm_missing_mandatory_element);
7634 ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_QOS, " - Negotiated QoS", ei_gsm_a_gm_missing_mandatory_element);
7636 #if 0
7637 /* This is done automatically */
7638 ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_SPARE, NULL, ei_gsm_a_gm_missing_mandatory_element);
7639 curr_offset--;
7640 curr_len++;
7641 #endif
7643 ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_RAD_PRIO, NULL, ei_gsm_a_gm_missing_mandatory_element);
7645 ELEM_OPT_TLV( 0x2B, GSM_A_PDU_TYPE_GM, DE_PD_PRO_ADDR, " - PDP address");
7647 ELEM_OPT_TLV( 0x27, GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT, NULL);
7649 ELEM_OPT_TLV( 0x34, GSM_A_PDU_TYPE_GM, DE_PACKET_FLOW_ID, NULL);
7651 ELEM_OPT_TLV( 0x39, GSM_A_PDU_TYPE_GM, DE_SM_CAUSE_2, " - SM cause");
7653 ELEM_OPT_TV_SHORT(0xB0 , GSM_A_PDU_TYPE_GM, DE_SM_CONNECTIVITY_TYPE, NULL);
7655 ELEM_OPT_TV_SHORT(0xC0 , GSM_A_PDU_TYPE_GM, DE_SM_WLAN_OFFLOAD_ACCEPT, " - WLAN offload indication");
7657 ELEM_OPT_TLV(0x33, GSM_A_PDU_TYPE_GM, DE_NBIFOM_CONT, NULL);
7659 ELEM_OPT_TLV_E(0x7B, GSM_A_PDU_TYPE_GM, DE_EXT_PRO_CONF_OPT, NULL);
7661 ELEM_OPT_TLV(0x5C, GSM_A_PDU_TYPE_GM, DE_EXT_QOS, NULL);
7663 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7667 * [8] 9.5.3 Activate PDP context reject
7668 * Direction: network to MS
7670 static void
7671 dtap_sm_act_pdp_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7673 uint32_t curr_offset;
7674 uint32_t consumed;
7675 unsigned curr_len;
7677 curr_offset = offset;
7678 curr_len = len;
7680 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
7681 /* Network to MS*/
7682 pinfo->link_dir = P2P_DIR_DL;
7684 ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL, ei_gsm_a_gm_missing_mandatory_element);
7686 ELEM_OPT_TLV( 0x27, GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT, NULL);
7688 ELEM_OPT_TLV(0x37, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - Back-off timer value");
7690 ELEM_OPT_TLV(0x6B, GSM_A_PDU_TYPE_GM, DE_RE_ATTEMPT_IND, NULL);
7692 ELEM_OPT_TLV(0x33, GSM_A_PDU_TYPE_GM, DE_NBIFOM_CONT, NULL);
7694 ELEM_OPT_TLV_E(0x7B, GSM_A_PDU_TYPE_GM, DE_EXT_PRO_CONF_OPT, NULL);
7696 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7700 * [8] 9.5.4 Activate Secondary PDP Context Request
7701 * Direction: MS to network
7703 static void
7704 dtap_sm_act_sec_pdp_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7706 uint32_t curr_offset;
7707 uint32_t consumed;
7708 unsigned curr_len;
7710 curr_offset = offset;
7711 curr_len = len;
7713 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
7714 /* MS to Network */
7715 pinfo->link_dir = P2P_DIR_UL;
7717 ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_NET_SAPI, " - Requested NSAPI", ei_gsm_a_gm_missing_mandatory_element);
7719 ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_LLC_SAPI, " - Requested LLC SAPI", ei_gsm_a_gm_missing_mandatory_element);
7721 ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_QOS, " - Requested QoS", ei_gsm_a_gm_missing_mandatory_element);
7723 ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_LINKED_TI, NULL, ei_gsm_a_gm_missing_mandatory_element);
7725 /* 3GPP TS 24.008 version 6.8.0 Release 6, 36 TFT Traffic Flow Template 10.5.6.12 O TLV 3-257 */
7726 ELEM_OPT_TLV( 0x36, GSM_A_PDU_TYPE_GM, DE_TRAFFIC_FLOW_TEMPLATE, NULL);
7728 ELEM_OPT_TLV( 0x27, GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT, NULL);
7730 ELEM_OPT_TV_SHORT(0xC0, GSM_A_PDU_TYPE_GM, DE_DEVICE_PROPERTIES, NULL);
7732 ELEM_OPT_TLV(0x33, GSM_A_PDU_TYPE_GM, DE_NBIFOM_CONT, NULL);
7734 ELEM_OPT_TLV_E(0x7B, GSM_A_PDU_TYPE_GM, DE_EXT_PRO_CONF_OPT, NULL);
7736 ELEM_OPT_TLV(0x5C, GSM_A_PDU_TYPE_GM, DE_EXT_QOS, NULL);
7738 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7742 * [7] 9.5.5 Activate Secondary PDP Context Accept
7743 * Direction: network to MS
7745 static void
7746 dtap_sm_act_sec_pdp_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7748 uint32_t curr_offset;
7749 uint32_t consumed;
7750 unsigned curr_len;
7752 curr_offset = offset;
7753 curr_len = len;
7755 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
7756 /* Network to MS*/
7757 pinfo->link_dir = P2P_DIR_DL;
7759 ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_LLC_SAPI, " - Negotiated LLC SAPI", ei_gsm_a_gm_missing_mandatory_element);
7761 ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_QOS, " - Negotiated QoS", ei_gsm_a_gm_missing_mandatory_element);
7763 ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_RAD_PRIO, NULL, ei_gsm_a_gm_missing_mandatory_element);
7765 #if 0
7766 /* This is done automatically */
7767 ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_SPARE, NULL, ei_gsm_a_gm_missing_mandatory_element);
7768 curr_offset--;
7769 curr_len++;
7770 #endif
7772 ELEM_OPT_TLV( 0x34, GSM_A_PDU_TYPE_GM, DE_PACKET_FLOW_ID, NULL);
7774 ELEM_OPT_TLV( 0x27, GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT, NULL);
7776 ELEM_OPT_TV_SHORT(0xC0 , GSM_A_PDU_TYPE_GM, DE_SM_WLAN_OFFLOAD_ACCEPT, " - WLAN offload indication");
7778 ELEM_OPT_TLV(0x33, GSM_A_PDU_TYPE_GM, DE_NBIFOM_CONT, NULL);
7780 ELEM_OPT_TLV_E(0x7B, GSM_A_PDU_TYPE_GM, DE_EXT_PRO_CONF_OPT, NULL);
7782 ELEM_OPT_TLV(0x5C, GSM_A_PDU_TYPE_GM, DE_EXT_QOS, NULL);
7784 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7788 * [8] 9.5.6 Activate Secondary PDP Context Reject
7789 * Direction: network to MS
7791 static void
7792 dtap_sm_act_sec_pdp_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7794 uint32_t curr_offset;
7795 uint32_t consumed;
7796 unsigned curr_len;
7798 curr_offset = offset;
7799 curr_len = len;
7801 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
7802 /* Network to MS*/
7803 pinfo->link_dir = P2P_DIR_DL;
7805 ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL, ei_gsm_a_gm_missing_mandatory_element);
7807 ELEM_OPT_TLV( 0x27, GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT, NULL);
7809 ELEM_OPT_TLV(0x37, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - Back-off timer value");
7811 ELEM_OPT_TLV(0x6B, GSM_A_PDU_TYPE_GM, DE_RE_ATTEMPT_IND, NULL);
7813 ELEM_OPT_TLV(0x33, GSM_A_PDU_TYPE_GM, DE_NBIFOM_CONT, NULL);
7815 ELEM_OPT_TLV_E(0x7B, GSM_A_PDU_TYPE_GM, DE_EXT_PRO_CONF_OPT, NULL);
7817 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7821 * [8] 9.5.7 Request PDP context activation
7822 * Direction: network to MS
7824 static void
7825 dtap_sm_req_pdp_act(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7827 uint32_t curr_offset;
7828 uint32_t consumed;
7829 unsigned curr_len;
7831 curr_offset = offset;
7832 curr_len = len;
7834 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
7835 /* Network to MS*/
7836 pinfo->link_dir = P2P_DIR_DL;
7838 ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_PD_PRO_ADDR, " - Offered PDP address", ei_gsm_a_gm_missing_mandatory_element);
7840 ELEM_OPT_TLV( 0x28, GSM_A_PDU_TYPE_GM, DE_ACC_POINT_NAME, NULL);
7842 ELEM_OPT_TLV( 0x27, GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT, NULL);
7844 ELEM_OPT_TLV(0x33, GSM_A_PDU_TYPE_GM, DE_NBIFOM_CONT, NULL);
7846 ELEM_OPT_TLV_E(0x7B, GSM_A_PDU_TYPE_GM, DE_EXT_PRO_CONF_OPT, NULL);
7848 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7852 * [8] 9.5.8 Request PDP context activation reject
7853 * Direction: MS to network
7855 static void
7856 dtap_sm_req_pdp_act_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7858 uint32_t curr_offset;
7859 uint32_t consumed;
7860 unsigned curr_len;
7862 curr_offset = offset;
7863 curr_len = len;
7865 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
7866 /* MS to Network */
7867 pinfo->link_dir = P2P_DIR_UL;
7869 ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL, ei_gsm_a_gm_missing_mandatory_element);
7871 ELEM_OPT_TLV( 0x27, GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT, NULL);
7873 ELEM_OPT_TLV(0x33, GSM_A_PDU_TYPE_GM, DE_NBIFOM_CONT, NULL);
7875 ELEM_OPT_TLV_E(0x7B, GSM_A_PDU_TYPE_GM, DE_EXT_PRO_CONF_OPT, NULL);
7877 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7881 * [8] 9.5.9 Modify PDP context request (Network to MS direction)
7882 * Direction: network to MS
7884 static void
7885 dtap_sm_mod_pdp_req_net(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7887 uint32_t curr_offset;
7888 uint32_t consumed;
7889 unsigned curr_len;
7891 curr_offset = offset;
7892 curr_len = len;
7894 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
7895 /* Network to MS */
7896 pinfo->link_dir = P2P_DIR_DL;
7898 ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_RAD_PRIO, NULL, ei_gsm_a_gm_missing_mandatory_element);
7899 #if 0
7900 /* This is done automatically */
7901 ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_SPARE, NULL, ei_gsm_a_gm_missing_mandatory_element);
7902 curr_offset--;
7903 curr_len++;
7904 #endif
7906 ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_LLC_SAPI, " - Requested LLC SAPI", ei_gsm_a_gm_missing_mandatory_element);
7908 ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_QOS, " - New QoS", ei_gsm_a_gm_missing_mandatory_element);
7910 ELEM_OPT_TLV( 0x2B, GSM_A_PDU_TYPE_GM, DE_PD_PRO_ADDR, " - PDP address");
7912 ELEM_OPT_TLV( 0x34, GSM_A_PDU_TYPE_GM, DE_PACKET_FLOW_ID, NULL);
7914 ELEM_OPT_TLV( 0x27, GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT, NULL);
7916 ELEM_OPT_TLV( 0x36, GSM_A_PDU_TYPE_GM, DE_TRAFFIC_FLOW_TEMPLATE, NULL);
7918 ELEM_OPT_TV_SHORT(0xC0 , GSM_A_PDU_TYPE_GM, DE_SM_WLAN_OFFLOAD_ACCEPT, " - WLAN offload indication");
7920 ELEM_OPT_TLV(0x33, GSM_A_PDU_TYPE_GM, DE_NBIFOM_CONT, NULL);
7922 ELEM_OPT_TLV_E(0x7B, GSM_A_PDU_TYPE_GM, DE_EXT_PRO_CONF_OPT, NULL);
7924 ELEM_OPT_TLV(0x5C, GSM_A_PDU_TYPE_GM, DE_EXT_QOS, NULL);
7926 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7930 * [8] 9.5.10 Modify PDP context request (MS to network direction)
7931 * Direction: MS to network
7933 static void
7934 dtap_sm_mod_pdp_req_ms(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7936 uint32_t curr_offset;
7937 uint32_t consumed;
7938 unsigned curr_len;
7940 curr_offset = offset;
7941 curr_len = len;
7943 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
7944 /* MS to Network */
7945 pinfo->link_dir = P2P_DIR_UL;
7947 ELEM_OPT_TV( 0x32, GSM_A_PDU_TYPE_GM, DE_LLC_SAPI, " - Requested LLC SAPI" );
7949 ELEM_OPT_TLV( 0x30, GSM_A_PDU_TYPE_GM, DE_QOS, " - Requested new QoS" );
7951 ELEM_OPT_TLV( 0x31, GSM_A_PDU_TYPE_GM, DE_TRAFFIC_FLOW_TEMPLATE, " - New TFT" );
7953 ELEM_OPT_TLV( 0x27, GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT, NULL);
7955 ELEM_OPT_TV_SHORT(0xC0, GSM_A_PDU_TYPE_GM, DE_DEVICE_PROPERTIES, NULL);
7957 ELEM_OPT_TLV(0x33, GSM_A_PDU_TYPE_GM, DE_NBIFOM_CONT, NULL);
7959 ELEM_OPT_TLV_E(0x7B, GSM_A_PDU_TYPE_GM, DE_EXT_PRO_CONF_OPT, NULL);
7961 ELEM_OPT_TLV(0x5C, GSM_A_PDU_TYPE_GM, DE_EXT_QOS, NULL);
7963 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7967 * [8] 9.5.11 Modify PDP context accept (MS to network direction)
7968 * Direction: MS to network
7970 static void
7971 dtap_sm_mod_pdp_acc_ms(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7973 uint32_t curr_offset;
7974 uint32_t consumed;
7975 unsigned curr_len;
7977 curr_offset = offset;
7978 curr_len = len;
7980 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
7981 /* MS to Network */
7982 pinfo->link_dir = P2P_DIR_UL;
7984 ELEM_OPT_TLV( 0x27, GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT, NULL);
7986 ELEM_OPT_TLV(0x33, GSM_A_PDU_TYPE_GM, DE_NBIFOM_CONT, NULL);
7988 ELEM_OPT_TLV_E(0x7B, GSM_A_PDU_TYPE_GM, DE_EXT_PRO_CONF_OPT, NULL);
7990 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7994 * [8] 9.5.12 Modify PDP context accept (Network to MS direction)
7995 * Direction: Network to MS
7997 static void
7998 dtap_sm_mod_pdp_acc_net(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
8000 uint32_t curr_offset;
8001 uint32_t consumed;
8002 unsigned curr_len;
8004 curr_offset = offset;
8005 curr_len = len;
8007 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
8008 /* Network to MS */
8009 pinfo->link_dir = P2P_DIR_DL;
8011 ELEM_OPT_TLV( 0x30, GSM_A_PDU_TYPE_GM, DE_QOS, " - Negotiated QoS" );
8013 ELEM_OPT_TV( 0x32, GSM_A_PDU_TYPE_GM, DE_LLC_SAPI, " - Negotiated LLC SAPI" );
8015 ELEM_OPT_TV_SHORT ( 0x80, GSM_A_PDU_TYPE_GM, DE_RAD_PRIO, " - New radio priority" );
8017 ELEM_OPT_TLV( 0x34, GSM_A_PDU_TYPE_GM, DE_PACKET_FLOW_ID, NULL);
8019 ELEM_OPT_TLV( 0x27, GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT, NULL);
8021 ELEM_OPT_TV_SHORT(0xC0 , GSM_A_PDU_TYPE_GM, DE_SM_WLAN_OFFLOAD_ACCEPT, " - WLAN offload indication");
8023 ELEM_OPT_TLV(0x33, GSM_A_PDU_TYPE_GM, DE_NBIFOM_CONT, NULL);
8025 ELEM_OPT_TLV_E(0x7B, GSM_A_PDU_TYPE_GM, DE_EXT_PRO_CONF_OPT, NULL);
8027 ELEM_OPT_TLV(0x5C, GSM_A_PDU_TYPE_GM, DE_EXT_QOS, NULL);
8029 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
8033 * [8] 9.5.13 Modify PDP Context Reject
8034 * Direction: both
8036 static void
8037 dtap_sm_mod_pdp_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
8039 uint32_t curr_offset;
8040 uint32_t consumed;
8041 unsigned curr_len;
8043 curr_offset = offset;
8044 curr_len = len;
8046 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
8047 /* Network or the MS; do not reset link_dir in case it was set by lower layers */
8048 /* pinfo->link_dir = LINK_DIR_UNKNOWN; */
8051 ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL, ei_gsm_a_gm_missing_mandatory_element);
8053 ELEM_OPT_TLV( 0x27, GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT, NULL);
8055 ELEM_OPT_TLV(0x37, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - Back-off timer value");
8057 ELEM_OPT_TLV(0x6B, GSM_A_PDU_TYPE_GM, DE_RE_ATTEMPT_IND, NULL);
8059 ELEM_OPT_TLV(0x33, GSM_A_PDU_TYPE_GM, DE_NBIFOM_CONT, NULL);
8061 ELEM_OPT_TLV_E(0x7B, GSM_A_PDU_TYPE_GM, DE_EXT_PRO_CONF_OPT, NULL);
8063 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
8067 * [8] 9.5.14 Deactivate PDP context request
8068 * Direction: both
8070 static void
8071 dtap_sm_deact_pdp_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
8073 uint32_t curr_offset;
8074 uint32_t consumed;
8075 unsigned curr_len;
8077 curr_offset = offset;
8078 curr_len = len;
8080 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
8081 pinfo->link_dir = LINK_DIR_UNKNOWN;
8083 ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL, ei_gsm_a_gm_missing_mandatory_element);
8085 ELEM_OPT_TV_SHORT( 0x90, GSM_A_PDU_TYPE_GM, DE_TEAR_DOWN_IND, NULL);
8087 ELEM_OPT_TLV( 0x27, GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT, NULL);
8089 ELEM_OPT_TLV( 0x35, GSM_A_PDU_TYPE_GM, DE_MBMS_PROT_CONF_OPT, NULL);
8091 ELEM_OPT_TLV(0x37, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - T3396 value");
8093 ELEM_OPT_TV_SHORT(0xC0 , GSM_A_PDU_TYPE_GM, DE_SM_WLAN_OFFLOAD_ACCEPT, " - WLAN offload indication");
8095 ELEM_OPT_TLV_E(0x7B, GSM_A_PDU_TYPE_GM, DE_EXT_PRO_CONF_OPT, NULL);
8097 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
8101 * [8] 9.5.15 Deactivate PDP context accept
8102 * Direction: both
8104 static void
8105 dtap_sm_deact_pdp_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
8107 uint32_t curr_offset;
8108 uint32_t consumed;
8109 unsigned curr_len;
8111 curr_offset = offset;
8112 curr_len = len;
8114 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
8115 pinfo->link_dir = LINK_DIR_UNKNOWN;
8117 ELEM_OPT_TLV( 0x27, GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT, NULL);
8119 ELEM_OPT_TLV( 0x35, GSM_A_PDU_TYPE_GM, DE_MBMS_PROT_CONF_OPT, NULL);
8121 ELEM_OPT_TLV_E(0x7B, GSM_A_PDU_TYPE_GM, DE_EXT_PRO_CONF_OPT, NULL);
8123 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
8127 * [8] 9.5.15a Request Secondary PDP Context Activation
8128 * Direction: network to MS
8130 static void
8131 dtap_sm_req_sec_pdp_act(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
8133 uint32_t curr_offset;
8134 uint32_t consumed;
8135 unsigned curr_len;
8137 curr_offset = offset;
8138 curr_len = len;
8140 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
8141 pinfo->link_dir = P2P_DIR_DL;
8143 /* Required QoS Quality of service 10.5.6.5 M LV 13-17 */
8144 ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_QOS, " - Required QoS", ei_gsm_a_gm_missing_mandatory_element);
8146 /* Linked TI Linked TI 10.5.6.7 M LV 2-3 */
8147 ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_LINKED_TI, NULL, ei_gsm_a_gm_missing_mandatory_element);
8149 /* 36 TFT Traffic Flow Template 10.5.6.12 O TLV 3-257 */
8150 ELEM_OPT_TLV( 0x36, GSM_A_PDU_TYPE_GM, DE_TRAFFIC_FLOW_TEMPLATE, NULL);
8152 /* 27 Protocol configuration options Protocol configuration options 10.5.6.3 O TLV 3 - 253 */
8153 ELEM_OPT_TLV( 0x27, GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT, NULL);
8155 /* C- WLAN offload acceptability 10.5.6.20 O TV 1 */
8156 ELEM_OPT_TV_SHORT(0xC0 , GSM_A_PDU_TYPE_GM, DE_SM_WLAN_OFFLOAD_ACCEPT, " - WLAN offload indication");
8158 ELEM_OPT_TLV(0x33, GSM_A_PDU_TYPE_GM, DE_NBIFOM_CONT, NULL);
8160 ELEM_OPT_TLV_E(0x7B, GSM_A_PDU_TYPE_GM, DE_EXT_PRO_CONF_OPT, NULL);
8162 ELEM_OPT_TLV(0x5C, GSM_A_PDU_TYPE_GM, DE_EXT_QOS, NULL);
8164 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
8168 * [8] 9.5.15b Request Secondary PDP Context Activation Reject
8169 * Direction: MS to network
8171 static void
8172 dtap_sm_req_sec_pdp_act_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
8174 uint32_t curr_offset;
8175 uint32_t consumed;
8176 unsigned curr_len;
8178 curr_offset = offset;
8179 curr_len = len;
8181 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
8182 pinfo->link_dir = P2P_DIR_UL;
8184 /* SM cause SM cause 10.5.6.6 M V 1 */
8185 ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL, ei_gsm_a_gm_missing_mandatory_element);
8187 /* 27 Protocol configuration options Protocol configuration options 10.5.6.3 O TLV 3 - 253 */
8188 ELEM_OPT_TLV( 0x27, GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT, NULL);
8190 ELEM_OPT_TLV(0x33, GSM_A_PDU_TYPE_GM, DE_NBIFOM_CONT, NULL);
8192 ELEM_OPT_TLV_E(0x7B, GSM_A_PDU_TYPE_GM, DE_EXT_PRO_CONF_OPT, NULL);
8194 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
8198 * [8] 9.5.16a Notification
8199 * Direction: network to MS
8201 static void
8202 dtap_sm_notif(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
8204 uint32_t curr_offset;
8205 uint32_t consumed;
8206 unsigned curr_len;
8208 curr_offset = offset;
8209 curr_len = len;
8211 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
8212 pinfo->link_dir = P2P_DIR_DL;
8214 ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_SM_NOTIF_IND, NULL, ei_gsm_a_gm_missing_mandatory_element);
8216 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
8220 * [8] 9.5.21 SM Status
8221 * Direction: both
8223 static void
8224 dtap_sm_status(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
8226 uint32_t curr_offset;
8227 uint32_t consumed;
8228 unsigned curr_len;
8230 curr_offset = offset;
8231 curr_len = len;
8233 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
8234 pinfo->link_dir = LINK_DIR_UNKNOWN;
8236 ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL, ei_gsm_a_gm_missing_mandatory_element);
8238 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
8242 * [9] 9.5.22 Activate MBMS Context Request
8243 * Direction: MS to network
8245 static void
8246 dtap_sm_act_mbms_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
8248 uint32_t curr_offset;
8249 uint32_t consumed;
8250 unsigned curr_len;
8252 curr_offset = offset;
8253 curr_len = len;
8255 pinfo->p2p_dir = P2P_DIR_RECV;
8257 /* Requested MBMS NSAPI Enhanced Network service access point identifier 10.5.6.16 M V */
8258 ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_ENH_NSAPI, " - Requested MBMS NSAPI", ei_gsm_a_gm_missing_mandatory_element);
8260 /* Requested LLC SAPI LLC service access point identifier 10.5.6.9 M V 1 */
8261 ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_LLC_SAPI, " - Requested LLC SAPI", ei_gsm_a_gm_missing_mandatory_element);
8263 /* Supported MBMS bearer capabilities MBMS bearer capabilities 10.5.6.14 M LV 2 - 3 */
8264 ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_MBMS_BEARER_CAP, NULL, ei_gsm_a_gm_missing_mandatory_element);
8266 /* Requested multicast address Packet data protocol address 10.5.6.4 M LV 3 - 19 */
8267 ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_PD_PRO_ADDR, " - Requested multicast address", ei_gsm_a_gm_missing_mandatory_element);
8269 /* Access point name Access point name 10.5.6.1 M LV 2 - 101 */
8270 ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_ACC_POINT_NAME, NULL, ei_gsm_a_gm_missing_mandatory_element);
8272 /* 35 MBMS protocol configuration options MBMS protocol configuration options 10.5.6.15 O TLV 3 - 253 */
8273 ELEM_OPT_TLV( 0x35, GSM_A_PDU_TYPE_GM, DE_MBMS_PROT_CONF_OPT, NULL);
8275 ELEM_OPT_TV_SHORT(0xC0, GSM_A_PDU_TYPE_GM, DE_DEVICE_PROPERTIES, NULL);
8277 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
8281 * [9] 9.5.23 Activate MBMS Context Accept
8282 * Direction: network to MS
8284 static void
8285 dtap_sm_act_mbms_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
8287 uint32_t curr_offset;
8288 uint32_t consumed;
8289 unsigned curr_len;
8291 curr_offset = offset;
8292 curr_len = len;
8294 pinfo->p2p_dir = P2P_DIR_SENT;
8296 ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_TMGI, NULL, ei_gsm_a_gm_missing_mandatory_element);
8298 ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_LLC_SAPI, " - Negotiated LLC SAPI", ei_gsm_a_gm_missing_mandatory_element);
8300 ELEM_OPT_TLV( 0x35, GSM_A_PDU_TYPE_GM, DE_MBMS_PROT_CONF_OPT, NULL);
8302 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
8306 * [9] 9.5.24 Activate MBMS Context Reject
8307 * Direction: network to MS
8309 static void
8310 dtap_sm_act_mbms_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
8312 uint32_t curr_offset;
8313 uint32_t consumed;
8314 unsigned curr_len;
8316 curr_offset = offset;
8317 curr_len = len;
8319 pinfo->p2p_dir = P2P_DIR_SENT;
8321 ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL, ei_gsm_a_gm_missing_mandatory_element);
8323 ELEM_OPT_TLV( 0x35, GSM_A_PDU_TYPE_GM, DE_MBMS_PROT_CONF_OPT, NULL);
8325 ELEM_OPT_TLV(0x37, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - T3396 value");
8327 ELEM_OPT_TLV(0x6B, GSM_A_PDU_TYPE_GM, DE_RE_ATTEMPT_IND, NULL);
8329 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
8333 * [9] 9.5.25 Request MBMS Context Activation
8334 * Direction: network to MS
8336 static void
8337 dtap_sm_req_mbms_act(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
8339 uint32_t curr_offset;
8340 uint32_t consumed;
8341 unsigned curr_len;
8343 curr_offset = offset;
8344 curr_len = len;
8346 pinfo->p2p_dir = P2P_DIR_SENT;
8348 ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_NET_SAPI, " - Linked NSAPI", ei_gsm_a_gm_missing_mandatory_element);
8350 ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_PD_PRO_ADDR, " - Offered multicast address", ei_gsm_a_gm_missing_mandatory_element);
8352 ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_ACC_POINT_NAME, NULL, ei_gsm_a_gm_missing_mandatory_element);
8354 ELEM_OPT_TLV( 0x35, GSM_A_PDU_TYPE_GM, DE_MBMS_PROT_CONF_OPT, NULL);
8356 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
8360 * [8] 9.5.26 Request MBMS Context Activation Reject
8361 * Direction: MS to network
8363 static void
8364 dtap_sm_req_mbms_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
8366 uint32_t curr_offset;
8367 uint32_t consumed;
8368 unsigned curr_len;
8370 curr_offset = offset;
8371 curr_len = len;
8373 pinfo->p2p_dir = P2P_DIR_RECV;
8375 ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL, ei_gsm_a_gm_missing_mandatory_element);
8377 ELEM_OPT_TLV( 0x35, GSM_A_PDU_TYPE_GM, DE_MBMS_PROT_CONF_OPT, NULL);
8379 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
8382 #define NUM_GSM_DTAP_MSG_GMM array_length(gsm_a_dtap_msg_gmm_strings)
8383 static int ett_gsm_dtap_msg_gmm[NUM_GSM_DTAP_MSG_GMM];
8384 static void (*dtap_msg_gmm_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len) = {
8385 dtap_gmm_attach_req, /* Attach Request */
8386 dtap_gmm_attach_acc, /* Attach Accept */
8387 dtap_gmm_attach_com, /* Attach Complete */
8388 dtap_gmm_attach_rej, /* Attach Reject */
8389 dtap_gmm_detach_req, /* Detach Request */
8390 dtap_gmm_detach_acc, /* Detach Accept */
8391 dtap_gmm_rau_req, /* Routing Area Update Request */
8392 dtap_gmm_rau_acc, /* Routing Area Update Accept */
8393 dtap_gmm_rau_com, /* Routing Area Update Complete */
8394 dtap_gmm_rau_rej, /* Routing Area Update Reject */
8395 dtap_gmm_service_req, /* Service Request */
8396 dtap_gmm_service_acc, /* Service Accept */
8397 dtap_gmm_service_rej, /* Service Reject */
8398 dtap_gmm_ptmsi_realloc_cmd, /* P-TMSI Reallocation Command */
8399 dtap_gmm_ptmsi_realloc_com, /* P-TMSI Reallocation Complete */
8400 dtap_gmm_auth_ciph_req, /* Authentication and Ciphering Req */
8401 dtap_gmm_auth_ciph_resp, /* Authentication and Ciphering Resp */
8402 dtap_gmm_auth_ciph_rej, /* Authentication and Ciphering Rej */
8403 dtap_gmm_ident_req, /* Identity Request */
8404 dtap_gmm_ident_res, /* Identity Response */
8405 dtap_gmm_auth_ciph_fail, /* Authentication and Ciphering Failure */
8406 dtap_gmm_status, /* GMM Status */
8407 dtap_gmm_information, /* GMM Information */
8408 NULL, /* NONE */
8411 #define NUM_GSM_DTAP_MSG_SM array_length(gsm_a_dtap_msg_sm_strings)
8412 static int ett_gsm_dtap_msg_sm[NUM_GSM_DTAP_MSG_SM];
8413 static void (*dtap_msg_sm_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len) = {
8414 dtap_sm_act_pdp_req, /* Activate PDP Context Request */
8415 dtap_sm_act_pdp_acc, /* Activate PDP Context Accept */
8416 dtap_sm_act_pdp_rej, /* Activate PDP Context Reject */
8417 dtap_sm_req_pdp_act, /* Request PDP Context Activation */
8418 dtap_sm_req_pdp_act_rej, /* Request PDP Context Activation rej. */
8419 dtap_sm_deact_pdp_req, /* Deactivate PDP Context Request */
8420 dtap_sm_deact_pdp_acc, /* Deactivate PDP Context Accept */
8421 dtap_sm_mod_pdp_req_net, /* Modify PDP Context Request(Network to MS direction) */
8422 dtap_sm_mod_pdp_acc_ms, /* Modify PDP Context Accept (MS to network direction) */
8423 dtap_sm_mod_pdp_req_ms, /* Modify PDP Context Request(MS to network direction) */
8424 dtap_sm_mod_pdp_acc_net, /* Modify PDP Context Accept (Network to MS direction) */
8425 dtap_sm_mod_pdp_rej, /* Modify PDP Context Reject */
8426 dtap_sm_act_sec_pdp_req, /* Activate Secondary PDP Context Request */
8427 dtap_sm_act_sec_pdp_acc, /* Activate Secondary PDP Context Accept */
8428 dtap_sm_act_sec_pdp_rej, /* Activate Secondary PDP Context Reject */
8429 NULL, /* Reserved: was allocated in earlier phases of the protocol */
8430 NULL, /* Reserved: was allocated in earlier phases of the protocol */
8431 NULL, /* Reserved: was allocated in earlier phases of the protocol */
8432 NULL, /* Reserved: was allocated in earlier phases of the protocol */
8433 NULL, /* Reserved: was allocated in earlier phases of the protocol */
8434 dtap_sm_status, /* SM Status */
8435 dtap_sm_act_mbms_req, /* Activate MBMS Context Request */
8436 dtap_sm_act_mbms_acc, /* Activate MBMS Context Accept */
8437 dtap_sm_act_mbms_rej, /* Activate MBMS Context Reject */
8438 dtap_sm_req_mbms_act, /* Request MBMS Context Activation */
8439 dtap_sm_req_mbms_rej, /* Request MBMS Context Activation Reject */
8440 dtap_sm_req_sec_pdp_act, /* Request Secondary PDP Context Activation */
8441 dtap_sm_req_sec_pdp_act_rej, /* Request Secondary PDP Context Activation Reject */
8442 dtap_sm_notif, /* Notification */
8443 NULL, /* NONE */
8446 void
8447 get_gmm_msg_params(uint8_t oct, const char **msg_str, int *ett_tree, int *hf_idx, msg_fcn *dtap_msg_fcn)
8449 int idx;
8451 *msg_str = try_val_to_str_idx_ext((uint32_t) (oct & DTAP_GMM_IEI_MASK), &gsm_a_dtap_msg_gmm_strings_ext, &idx);
8452 *hf_idx = hf_gsm_a_dtap_msg_gmm_type;
8453 if (*msg_str != NULL) {
8454 *ett_tree = ett_gsm_dtap_msg_gmm[idx];
8455 *dtap_msg_fcn = dtap_msg_gmm_fcn[idx];
8458 return;
8461 void
8462 get_sm_msg_params(uint8_t oct, const char **msg_str, int *ett_tree, int *hf_idx, msg_fcn *dtap_msg_fcn)
8464 int idx;
8466 *msg_str = try_val_to_str_idx_ext((uint32_t) (oct & DTAP_SM_IEI_MASK), &gsm_a_dtap_msg_sm_strings_ext, &idx);
8467 *hf_idx = hf_gsm_a_dtap_msg_sm_type;
8468 if (*msg_str != NULL) {
8469 *ett_tree = ett_gsm_dtap_msg_sm[idx];
8470 *dtap_msg_fcn = dtap_msg_sm_fcn[idx];
8473 return;
8476 /* Register the protocol with Wireshark */
8477 void
8478 proto_register_gsm_a_gm(void)
8480 unsigned i;
8481 unsigned last_offset;
8483 /* Setup list of header fields */
8485 static hf_register_info hf[] = {
8486 { &hf_gsm_a_dtap_msg_gmm_type,
8487 { "DTAP GPRS Mobility Management Message Type", "gsm_a.dtap.msg_gmm_type",
8488 FT_UINT8, BASE_HEX | BASE_EXT_STRING, &gsm_a_dtap_msg_gmm_strings_ext, 0x0,
8489 NULL, HFILL }
8491 { &hf_gsm_a_dtap_msg_sm_type,
8492 { "DTAP GPRS Session Management Message Type", "gsm_a.dtap.msg_sm_type",
8493 FT_UINT8, BASE_HEX | BASE_EXT_STRING, &gsm_a_dtap_msg_sm_strings_ext, 0x0,
8494 NULL, HFILL }
8496 { &hf_gsm_a_gm_elem_id,
8497 { "Element ID", "gsm_a.gm.elem_id",
8498 FT_UINT8, BASE_HEX, NULL, 0,
8499 NULL, HFILL }
8501 { &hf_gsm_a_sm_qos_delay_cls,
8502 { "Quality of Service Delay class", "gsm_a.gm.sm.qos.delay_cls",
8503 FT_UINT8, BASE_DEC, VALS(gsm_a_sm_qos_delay_cls_vals), 0x38,
8504 NULL, HFILL }
8506 { &hf_gsm_a_sm_qos_reliability_cls,
8507 { "Reliability class", "gsm_a.gm.sm.qos.reliability_cls",
8508 FT_UINT8, BASE_DEC, VALS(gsm_a_sm_qos_reliability_vals), 0x07,
8509 NULL, HFILL }
8511 { &hf_gsm_a_sm_qos_traffic_cls,
8512 { "Traffic class", "gsm_a.gm.sm.qos.traffic_cls",
8513 FT_UINT8, BASE_DEC, VALS(gsm_a_sm_qos_traffic_cls_vals), 0xe0,
8514 NULL, HFILL }
8516 { &hf_gsm_a_sm_qos_del_order,
8517 { "Delivery order", "gsm_a.gm.sm.qos.del_order",
8518 FT_UINT8, BASE_DEC, VALS(gsm_a_sm_qos_del_order_vals), 0x18,
8519 NULL, HFILL }
8521 { &hf_gsm_a_sm_qos_del_of_err_sdu,
8522 { "Delivery of erroneous SDUs", "gsm_a.gm.sm.qos.del_of_err_sdu",
8523 FT_UINT8, BASE_DEC, VALS(gsm_a_sm_qos_del_of_err_sdu_vals), 0x07,
8524 NULL, HFILL }
8526 { &hf_gsm_a_sm_qos_ber,
8527 { "Residual Bit Error Rate (BER)", "gsm_a.gm.sm.qos.ber",
8528 FT_UINT8, BASE_DEC, VALS(gsm_a_sm_qos_ber_vals), 0xf0,
8529 NULL, HFILL }
8531 { &hf_gsm_a_sm_qos_sdu_err_rat,
8532 { "SDU error ratio", "gsm_a.gm.sm.qos.sdu_err_rat",
8533 FT_UINT8, BASE_DEC, VALS(gsm_a_sm_qos_sdu_err_rat_vals), 0x0f,
8534 NULL, HFILL }
8536 { &hf_gsm_a_sm_qos_traff_hdl_pri,
8537 { "Traffic handling priority", "gsm_a.gm.sm.qos.traff_hdl_pri",
8538 FT_UINT8, BASE_DEC, VALS(gsm_a_sm_qos_traff_hdl_pri_vals), 0x03,
8539 NULL, HFILL }
8541 { &hf_gsm_a_gmm_split_pg_cycle_code,
8542 { "SPLIT PG CYCLE CODE", "gsm_a.gm.gmm.split_pg_cycle_code",
8543 FT_UINT8, BASE_DEC|BASE_EXT_STRING, &gsm_a_gmm_split_pg_cycle_code_strings_ext, 0x00,
8544 NULL, HFILL }
8546 { &hf_gsm_a_gmm_split_on_ccch,
8547 { "SPLIT on CCCH", "gsm_a.gm.gmm.split_on_ccch",
8548 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_split_on_ccch_value), 0x08,
8549 NULL, HFILL }
8551 { &hf_gsm_a_gmm_non_drx_timer,
8552 { "Non-DRX timer", "gsm_a.gm.gmm.non_drx_timer",
8553 FT_UINT8, BASE_DEC, VALS(gsm_a_gmm_non_drx_timer_strings), 0x07,
8554 NULL, HFILL }
8556 { &hf_gsm_a_gmm_cn_spec_drx_cycle_len_coef,
8557 { "CN Specific DRX cycle length coefficient", "gsm_a.gm.gmm.cn_spec_drx_cycle_len_coef",
8558 FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gsm_a_gmm_cn_spec_drx_cycle_len_coef_strings), 0xf0,
8559 NULL, HFILL }
8561 { &hf_gsm_a_sm_tft_op_code,
8562 { "TFT operation code", "gsm_a.gm.sm.tft.op_code",
8563 FT_UINT8, BASE_DEC, VALS(gsm_a_sm_tft_op_code_vals), 0xe0,
8564 NULL, HFILL }
8566 { &hf_gsm_a_sm_tft_e_bit,
8567 { "E bit", "gsm_a.gm.sm.tft.e_bit",
8568 FT_BOOLEAN, 8, TFS(&gsm_a_sm_tft_e_bit), 0x10,
8569 NULL, HFILL }
8571 { &hf_gsm_a_sm_tft_pkt_flt,
8572 { "Number of packet filters", "gsm_a.gm.sm.tft.pkt_flt",
8573 FT_UINT8, BASE_DEC, NULL, 0x0f,
8574 NULL, HFILL }
8576 { &hf_gsm_a_sm_tft_pkt_flt_dir,
8577 { "Packet filter direction", "gsm_a.gm.sm.tft.pkt_flt_dir",
8578 FT_UINT8, BASE_DEC, VALS(gsm_a_sm_tft_pkt_flt_dir_vals), 0x30,
8579 NULL, HFILL }
8581 { &hf_gsm_a_sm_tft_pkt_flt_id,
8582 { "Packet filter identifier", "gsm_a.gm.sm.tft.pkt_flt_id",
8583 FT_UINT8, BASE_DEC, NULL, 0x0f,
8584 NULL, HFILL }
8586 { &hf_gsm_a_sm_ip4_address,
8587 { "IPv4 address", "gsm_a.gm.sm.ip4_address",
8588 FT_IPv4, BASE_NONE, NULL, 0x0,
8589 NULL, HFILL }
8591 { &hf_gsm_a_sm_ip4_mask,
8592 { "IPv4 address mask", "gsm_a.gm.sm.ip4_mask",
8593 FT_IPv4, BASE_NONE, NULL, 0x0,
8594 NULL, HFILL }
8596 { &hf_gsm_a_sm_ip6_address,
8597 { "IPv6 address", "gsm_a.gm.sm.ip6_address",
8598 FT_IPv6, BASE_NONE, NULL, 0x0,
8599 NULL, HFILL }
8601 { &hf_gsm_a_sm_ip6_mask,
8602 { "IPv6 address mask", "gsm_a.gm.sm.ip6_mask",
8603 FT_IPv6, BASE_NONE, NULL, 0x0,
8604 NULL, HFILL }
8606 { &hf_gsm_a_sm_ip6_prefix_length,
8607 { "IPv6 prefix length", "gsm_a.gm.sm.ip6_prefix_length",
8608 FT_UINT8, BASE_DEC, NULL, 0x0,
8609 NULL, HFILL }
8611 { &hf_gsm_a_sm_tft_protocol_header,
8612 { "Protocol/header", "gsm_a.gm.sm.tft.protocol_header",
8613 FT_UINT8, BASE_HEX|BASE_EXT_STRING, &ipproto_val_ext, 0x0,
8614 NULL, HFILL }
8616 { &hf_gsm_a_sm_tft_port,
8617 { "Port", "gsm_a.gm.sm.tft.port",
8618 FT_UINT16, BASE_DEC, NULL, 0x0,
8619 NULL, HFILL }
8621 { &hf_gsm_a_sm_tft_port_low,
8622 { "Low limit port", "gsm_a.gm.sm.tft.port_low",
8623 FT_UINT16, BASE_DEC, NULL, 0x0,
8624 NULL, HFILL }
8626 { &hf_gsm_a_sm_tft_port_high,
8627 { "High limit port", "gsm_a.gm.sm.tft.port_high",
8628 FT_UINT16, BASE_DEC, NULL, 0x0,
8629 NULL, HFILL }
8631 { &hf_gsm_a_sm_tft_security,
8632 { "IPSec security parameter index", "gsm_a.gm.sm.tft.security",
8633 FT_UINT32, BASE_HEX, NULL, 0x0,
8634 NULL, HFILL }
8636 { &hf_gsm_a_sm_tft_traffic_class,
8637 { "Type of service/Traffic class field", "gsm_a.gm.sm.tft.traffic_class",
8638 FT_UINT8, BASE_HEX, NULL, 0x0,
8639 NULL, HFILL }
8641 { &hf_gsm_a_sm_tft_traffic_mask,
8642 { "Mask field", "gsm_a.gm.sm.tft.traffic_mask",
8643 FT_UINT8, BASE_HEX, NULL, 0x0,
8644 NULL, HFILL }
8646 { &hf_gsm_a_sm_tft_flow_label_type,
8647 { "Flow Label Type", "gsm_a.gm.sm.tft.flow_label_type",
8648 FT_UINT24, BASE_HEX, NULL, 0x0FFFFF,
8649 NULL, HFILL }
8651 { &hf_gsm_a_sm_tft_param_id,
8652 { "Parameter identifier", "gsm_a.gm.sm.tft.param_id",
8653 FT_UINT8, BASE_DEC, VALS(gsm_a_sm_tft_param_id_vals), 0x0,
8654 NULL, HFILL }
8656 { &hf_gsm_a_sm_tft_mac_addr,
8657 { "MAC address", "gsm_a.gm.sm.tft.mac_addr",
8658 FT_ETHER, BASE_NONE, NULL, 0x0,
8659 NULL, HFILL }
8661 { &hf_gsm_a_sm_tft_vlan_tag_vid,
8662 { "VID", "gsm_a.gm.sm.tft.vlan_tag_vid",
8663 FT_UINT16, BASE_HEX, NULL, 0x0fff,
8664 NULL, HFILL }
8666 { &hf_gsm_a_sm_tft_vlan_tag_pcp,
8667 { "PCP", "gsm_a.gm.sm.tft.vlan_tag_pcp",
8668 FT_UINT8, BASE_HEX, NULL, 0x0e,
8669 NULL, HFILL }
8671 { &hf_gsm_a_sm_tft_vlan_tag_dei,
8672 { "DEI", "gsm_a.gm.sm.tft.vlan_tag_dei",
8673 FT_UINT8, BASE_HEX, NULL, 0x01,
8674 NULL, HFILL }
8676 { &hf_gsm_a_sm_tft_ethertype,
8677 { "Ethertype", "gsm_a.gm.sm.tft.ethertype",
8678 FT_UINT16, BASE_HEX, VALS(etype_vals), 0x0,
8679 NULL, HFILL }
8682 { &hf_gsm_a_gmm_ptmsi_sig,
8683 { "P-TMSI Signature", "gsm_a.gm.gmm.ptmsi_sig",
8684 FT_UINT24, BASE_HEX, NULL, 0x0,
8685 NULL, HFILL }
8687 { &hf_gsm_a_gmm_ptmsi_sig2,
8688 { "P-TMSI Signature 2", "gsm_a.gm.gmm.ptmsi_sig2",
8689 FT_UINT24, BASE_HEX, NULL, 0x0,
8690 NULL, HFILL }
8692 { &hf_gsm_a_gm_acc_tech_type,
8693 { "Access Technology Type", "gsm_a.gm.gmm.acc_tech_type",
8694 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_acc_tech_type_vals), 0x0,
8695 NULL, HFILL }
8697 { &hf_gsm_a_gm_acc_cap_struct_len,
8698 { "Length in bits", "gsm_a.gm.gmm.acc_cap_struct_len",
8699 FT_UINT8, BASE_HEX_DEC, NULL, 0x0,
8700 NULL, HFILL }
8702 { &hf_gsm_a_gm_sms_value,
8703 { "SMS_VALUE (Switch-Measure-Switch)", "gsm_a.gm.gmm.sms",
8704 FT_UINT8, BASE_DEC, VALS(gsm_a_sms_vals), 0x0,
8705 NULL, HFILL }
8707 { &hf_gsm_a_gm_sm_value,
8708 { "(SM_VALUE) Switch-Measure", "gsm_a.gm.gmm.sm",
8709 FT_UINT8, BASE_DEC, VALS(gsm_a_sms_vals), 0x0,
8710 NULL, HFILL }
8712 { &hf_gsm_a_gm_link_dir,
8713 { "Link direction", "gsm_a.gm.sm.link_dir",
8714 FT_INT32, BASE_DEC, VALS(gsm_a_gm_link_dir_vals), 0x0,
8715 NULL, HFILL }
8717 { &hf_gsm_a_gm_cause,
8718 { "GMM Cause", "gsm_a.gm.gmm.cause",
8719 FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gmm_cause_vals), 0x0,
8720 NULL, HFILL }
8722 { &hf_gsm_a_gm_add_upd_type,
8723 { "Additional update type", "gsm_a.gm.gmm.add_upd_type",
8724 FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_add_upd_type_value), 0x0,
8725 NULL, HFILL }
8727 { &hf_gsm_a_gm_fop,
8728 { "Follow-on proceed", "gsm_a.gm.gmm.fop",
8729 FT_BOOLEAN, 8, NULL, 0x08,
8730 NULL, HFILL }
8732 { &hf_gsm_a_gm_res_of_attach,
8733 { "Result of attach", "gsm_a.gm.gmm.res_of_attach",
8734 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_res_of_attach_vals), 0x07,
8735 NULL, HFILL }
8737 { &hf_gsm_a_gm_type_of_ciph_alg,
8738 { "Type of ciphering algorithm", "gsm_a.gm.gmm.type_of_ciph_alg",
8739 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_type_of_ciph_alg_vals), 0x07,
8740 NULL, HFILL }
8742 { &hf_gsm_a_gm_type_of_integ_alg,
8743 { "Type of integrity algorithm", "gsm_a.gm.gmm.type_of_integ_alg",
8744 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_type_of_integ_alg_vals), 0x07,
8745 NULL, HFILL }
8747 { &hf_gsm_a_gm_imeisv_req,
8748 { "IMEISV request", "gsm_a.gm.gmm.imeisv_req",
8749 FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gsm_a_gm_imeisv_req_vals), 0x00,
8750 NULL, HFILL }
8752 { &hf_gsm_a_gm_nsapi,
8753 { "NSAPI", "gsm_a.gm.gmm.nsapi",
8754 FT_UINT16, BASE_HEX_DEC, NULL, 0x0,
8755 NULL, HFILL }
8757 { &hf_gsm_a_gm_ac_ref_nr,
8758 { "A&C reference number", "gsm_a.gm.gmm.ac_ref_nr",
8759 FT_UINT8, BASE_DEC, NULL, 0x0,
8760 NULL, HFILL }
8762 { &hf_gsm_a_gm_force_to_standby,
8763 { "Force to standby", "gsm_a.gm.gmm.force_to_standby",
8764 FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gsm_a_gm_force_to_standby_vals), 0x00,
8765 NULL, HFILL }
8767 { &hf_gsm_a_gm_serv_type,
8768 { "Service type", "gsm_a.gm.gmm.serv_type",
8769 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_serv_type_vals), 0x00,
8770 NULL, HFILL }
8772 { &hf_gsm_a_gm_for,
8773 { "Follow-on request pending", "gsm_a.gm.gmm.for",
8774 FT_BOOLEAN, 8, NULL, 0x08,
8775 NULL, HFILL }
8777 { &hf_gsm_a_gm_type_of_attach,
8778 { "Type of attach", "gsm_a.gm.gmm.type_of_attach",
8779 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_type_of_attach_vals), 0x07,
8780 NULL, HFILL }
8782 { &hf_gsm_a_gm_tmsi_flag,
8783 { "TMSI flag", "gsm_a.gm.gmm.tmsi_flag",
8784 FT_BOOLEAN, 8, TFS(&gsm_a_gm_tmsi_flag_value), 0x01,
8785 NULL, HFILL }
8787 { &hf_gsm_a_gm_power_off,
8788 { "Power off", "gsm_a.gm.gmm.power_off",
8789 FT_BOOLEAN, 8, TFS(&gsm_a_gm_power_off_value), 0x08,
8790 NULL, HFILL }
8792 { &hf_gsm_a_gm_type_of_detach_mo,
8793 { "Type of detach", "gsm_a.gm.gmm.type_of_detach",
8794 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_type_of_detach_mo_vals), 0x07,
8795 NULL, HFILL }
8797 { &hf_gsm_a_gm_type_of_detach_mt,
8798 { "Type of detach", "gsm_a.gm.gmm.type_of_detach",
8799 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_type_of_detach_mt_vals), 0x07,
8800 NULL, HFILL }
8802 { &hf_gsm_a_gm_update_type,
8803 { "Update type", "gsm_a.gm.gmm.update_type",
8804 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_update_type_vals), 0x07,
8805 NULL, HFILL }
8807 { &hf_gsm_a_gm_gprs_timer,
8808 { "GPRS Timer", "gsm_a.gm.gmm.gprs_timer",
8809 FT_UINT8, BASE_HEX, NULL, 0x0,
8810 NULL, HFILL }
8812 { &hf_gsm_a_gm_gprs_timer_unit,
8813 { "Unit", "gsm_a.gm.gmm.gprs_timer_unit",
8814 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_gprs_timer_unit_vals), 0xe0,
8815 NULL, HFILL }
8817 { &hf_gsm_a_gm_gprs_timer_value,
8818 { "Timer value", "gsm_a.gm.gmm.gprs_timer_value",
8819 FT_UINT8, BASE_DEC, NULL, 0x1f,
8820 NULL, HFILL }
8822 { &hf_gsm_a_gm_gprs_timer2,
8823 { "GPRS Timer", "gsm_a.gm.gmm.gprs_timer2",
8824 FT_UINT8, BASE_HEX, NULL, 0x0,
8825 NULL, HFILL }
8827 { &hf_gsm_a_gm_gprs_timer2_unit,
8828 { "Unit", "gsm_a.gm.gmm.gprs_timer2_unit",
8829 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_gprs_timer_unit_vals), 0xe0,
8830 NULL, HFILL }
8832 { &hf_gsm_a_gm_gprs_timer2_value,
8833 { "Timer value", "gsm_a.gm.gmm.gprs_timer2_value",
8834 FT_UINT8, BASE_DEC, NULL, 0x1f,
8835 NULL, HFILL }
8837 { &hf_gsm_a_gm_gprs_timer3,
8838 { "GPRS Timer", "gsm_a.gm.gmm.gprs_timer3",
8839 FT_UINT8, BASE_HEX, NULL, 0x0,
8840 NULL, HFILL }
8842 { &hf_gsm_a_gm_gprs_timer3_unit,
8843 { "Unit", "gsm_a.gm.gmm.gprs_timer3_unit",
8844 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_gprs_timer3_unit_vals), 0xe0,
8845 NULL, HFILL }
8847 { &hf_gsm_a_gm_gprs_timer3_value,
8848 { "Timer value", "gsm_a.gm.gmm.gprs_timer3_value",
8849 FT_UINT8, BASE_DEC, NULL, 0x1f,
8850 NULL, HFILL }
8852 { &hf_gsm_a_gm_nsapi_5_ul_stat,
8853 { "NSAPI(5) uplink status", "gsm_a.gm.gmm.nsapi_5_ul_stat",
8854 FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0,
8855 NULL, HFILL }
8857 { &hf_gsm_a_gm_nsapi_6_ul_stat,
8858 { "NSAPI(6) uplink status", "gsm_a.gm.gmm.nsapi_6_ul_stat",
8859 FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0,
8860 NULL, HFILL }
8862 { &hf_gsm_a_gm_nsapi_7_ul_stat,
8863 { "NSAPI(7) uplink status", "gsm_a.gm.gmm.nsapi_7_ul_stat",
8864 FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0,
8865 NULL, HFILL }
8867 { &hf_gsm_a_gm_nsapi_8_ul_stat,
8868 { "NSAPI(8) uplink status", "gsm_a.gm.gmm.nsapi_8_ul_stat",
8869 FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0,
8870 NULL, HFILL }
8872 { &hf_gsm_a_gm_nsapi_9_ul_stat,
8873 { "NSAPI(9) uplink status", "gsm_a.gm.gmm.nsapi_9_ul_stat",
8874 FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0,
8875 NULL, HFILL }
8877 { &hf_gsm_a_gm_nsapi_10_ul_stat,
8878 { "NSAPI(10) uplink status", "gsm_a.gm.gmm.nsapi_10_ul_stat",
8879 FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0,
8880 NULL, HFILL }
8882 { &hf_gsm_a_gm_nsapi_11_ul_stat,
8883 { "NSAPI(11) uplink status", "gsm_a.gm.gmm.nsapi_11_ul_stat",
8884 FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0,
8885 NULL, HFILL }
8887 { &hf_gsm_a_gm_nsapi_12_ul_stat,
8888 { "NSAPI(12) uplink status", "gsm_a.gm.gmm.nsapi_12_ul_stat",
8889 FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0,
8890 NULL, HFILL }
8892 { &hf_gsm_a_gm_nsapi_13_ul_stat,
8893 { "NSAPI(13) uplink status", "gsm_a.gm.gmm.nsapi_13_ul_stat",
8894 FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0,
8895 NULL, HFILL }
8897 { &hf_gsm_a_gm_nsapi_14_ul_stat,
8898 { "NSAPI(14) uplink status", "gsm_a.gm.gmm.nsapi_14_ul_stat",
8899 FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0,
8900 NULL, HFILL }
8902 { &hf_gsm_a_gm_nsapi_15_ul_stat,
8903 { "NSAPI(15) uplink status", "gsm_a.gm.gmm.nsapi_15_ul_stat",
8904 FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0,
8905 NULL, HFILL }
8907 { &hf_gsm_a_gm_device_prop_low_prio,
8908 { "Low priority", "gsm_a.gm.gmm.device_prop_low_prio",
8909 FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_device_prop_low_prio_value), 0x0,
8910 NULL, HFILL }
8912 { &hf_gsm_a_gm_apn,
8913 { "APN", "gsm_a.gm.sm.apn",
8914 FT_STRING,BASE_NONE, NULL,0x0,
8915 NULL, HFILL }
8917 { &hf_gsm_a_gm_pco_pid,
8918 { "Protocol or Container ID", "gsm_a.gm.sm.pco_pid",
8919 FT_UINT16, BASE_HEX, NULL, 0x0,
8920 NULL, HFILL }
8922 { &hf_gsm_a_gm_pco_app_spec_info,
8923 { "Application specific information", "gsm_a.gm.sm.app_spec_info",
8924 FT_BYTES, BASE_NONE, NULL, 0x0,
8925 NULL, HFILL }
8927 { &hf_gsm_a_gm_type_of_identity,
8928 { "Type of identity", "gsm_a.gm.gmm.type_of_identity",
8929 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_type_of_identity_vals), 0x07,
8930 NULL, HFILL }
8932 { &hf_gsm_a_gm_rac,
8933 { "Routing Area Code (RAC)", "gsm_a.gm.gmm.rac",
8934 FT_UINT8, BASE_HEX_DEC, NULL, 0x00,
8935 NULL, HFILL }
8937 { &hf_gsm_a_gm_mta_e,
8938 { "MTA-E", "gsm_a.gm.gmm.mta_e",
8939 FT_BOOLEAN, 8, TFS(&gsm_a_gm_mta_e_vals), 0x80,
8940 NULL, HFILL }
8942 { &hf_gsm_a_gm_mta_r,
8943 { "MTA-R", "gsm_a.gm.gmm.mta_r",
8944 FT_BOOLEAN, 8, TFS(&gsm_a_gm_mta_r_vals), 0x40,
8945 NULL, HFILL }
8947 { &hf_gsm_a_gm_apc,
8948 { "APC", "gsm_a.gm.gmm.apc",
8949 FT_BOOLEAN, 8, TFS(&gsm_a_gm_apc_vals), 0x20,
8950 NULL, HFILL }
8952 { &hf_gsm_a_gm_otd_a,
8953 { "OTD-A", "gsm_a.gm.gmm.otd_a",
8954 FT_BOOLEAN, 8, TFS(&gsm_a_gm_otd_a_vals), 0x10,
8955 NULL, HFILL }
8957 { &hf_gsm_a_gm_otd_b,
8958 { "OTD-B", "gsm_a.gm.gmm.otd_b",
8959 FT_BOOLEAN, 8, TFS(&gsm_a_gm_otd_b_vals), 0x08,
8960 NULL, HFILL }
8962 { &hf_gsm_a_gm_gps_a,
8963 { "GPS-A", "gsm_a.gm.gmm.gps_a",
8964 FT_BOOLEAN, 8, TFS(&gsm_a_gm_gps_a_vals), 0x04,
8965 NULL, HFILL }
8967 { &hf_gsm_a_gm_gps_b,
8968 { "GPS-B", "gsm_a.gm.gmm.gps_b",
8969 FT_BOOLEAN, 8, TFS(&gsm_a_gm_gps_b_vals), 0x02,
8970 NULL, HFILL }
8972 { &hf_gsm_a_gm_gps_c,
8973 { "GPS-C", "gsm_a.gm.gmm.gps_c",
8974 FT_BOOLEAN, 8, TFS(&gsm_a_gm_gps_c_vals), 0x01,
8975 NULL, HFILL }
8977 { &hf_gsm_a_gm_motd,
8978 { "MOTD", "gsm_a.gm.gmm.motd",
8979 FT_BOOLEAN, 8, TFS(&gsm_a_gm_motd_vals), 0x02,
8980 NULL, HFILL }
8982 { &hf_gsm_a_gm_mta_a,
8983 { "MTA-A", "gsm_a.gm.gmm.mta_a",
8984 FT_BOOLEAN, 8, TFS(&gsm_a_gm_mta_a_vals), 0x01,
8985 NULL, HFILL }
8987 { &hf_gsm_a_gm_lcs_molr,
8988 { "LCS-MOLR", "gsm_a.gm.gmm.lcs_molr",
8989 FT_BOOLEAN, 8, TFS(&gsm_a_gm_lcs_molr_value), 0x08,
8990 NULL, HFILL }
8992 { &hf_gsm_a_gm_mbms,
8993 { "MBMS", "gsm_a.gm.gmm.mbms",
8994 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x04,
8995 NULL, HFILL }
8997 { &hf_gsm_a_gm_ims_vops,
8998 { "IMS VoPS", "gsm_a.gm.gmm.ims_vops",
8999 FT_BOOLEAN, 8, TFS(&gsm_a_gm_ims_vops_value), 0x02,
9000 "IMS voice over PS session indicator", HFILL }
9002 { &hf_gsm_a_gm_emc_bs,
9003 { "EMC BS", "gsm_a.gm.gmm.emc_bs",
9004 FT_BOOLEAN, 8, TFS(&gsm_a_gm_emc_bs_value), 0x01,
9005 "Emergency bearer services indicator", HFILL }
9007 { &hf_gsm_a_gm_epco,
9008 { "ePCO", "gsm_a.gm.gmm.epco",
9009 FT_BOOLEAN, 8, TFS(&gsm_a_gm_epco_value), 0x04,
9010 NULL, HFILL }
9012 { &hf_gsm_a_gm_restrict_ec,
9013 { "RestrictEC", "gsm_a.gm.gmm.restrict_ec",
9014 FT_BOOLEAN, 8, TFS(&gsm_a_gm_restrict_ec_value), 0x02,
9015 NULL, HFILL }
9017 { &hf_gsm_a_gm_gprs_sms,
9018 { "GPRS-SMS", "gsm_a.gm.gmm.gprs_sms",
9019 FT_BOOLEAN, 8, TFS(&gsm_a_gm_gprs_sms_value), 0x01,
9020 NULL, HFILL }
9022 { &hf_gsm_a_gm_req_ms_info_irat,
9023 { "I-RAT", "gsm_a.gm.gmm.req_ms_info_irat",
9024 FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_req_ms_info_irat_vals), 0x0,
9025 NULL, HFILL }
9027 { &hf_gsm_a_gm_req_ms_info_irat2,
9028 { "I-RAT2", "gsm_a.gm.gmm.req_ms_info_irat2",
9029 FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_req_ms_info_irat2_vals), 0x0,
9030 NULL, HFILL }
9032 { &hf_gsm_a_gm_ue_usage_setting,
9033 { "UE's usage setting", "gsm_a.gm.gmm.ue_usage_setting",
9034 FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_ue_usage_setting_vals), 0x0,
9035 NULL, HFILL }
9037 { &hf_gsm_a_gm_voice_domain_pref_for_eutran,
9038 { "Voice domain preference for E-UTRAN", "gsm_a.gm.gmm.voice_domain_pref_for_eutran",
9039 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_voice_domain_pref_for_eutran_vals), 0x0,
9040 NULL, HFILL }
9042 { &hf_gsm_a_gm_ptmsi_type,
9043 { "P-TMSI type", "gsm_a.gm.gmm.ptmsi_type",
9044 FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_ptmsi_type_value), 0x0,
9045 NULL, HFILL }
9047 { &hf_gsm_a_gm_nri_cont,
9048 { "NRI container value", "gsm_a.gm.gmm.nri_cont_value",
9049 FT_UINT16, BASE_HEX, NULL, 0xffc0,
9050 NULL, HFILL }
9052 { &hf_gsm_a_gm_paging_time_window,
9053 { "Paging Time Window", "gsm_a.gm.gmm.paging_time_window",
9054 FT_UINT8, BASE_HEX, VALS(gsm_a_gm_paging_time_window_vals), 0xf0,
9055 NULL, HFILL }
9057 { &hf_gsm_a_gm_edrx_value,
9058 { "eDRX value", "gsm_a.gm.gmm.edrx_value",
9059 FT_UINT8, BASE_HEX, VALS(gsm_a_gm_edrx_vals), 0x0f,
9060 NULL, HFILL }
9062 { &hf_gsm_a_gm_ext_paging_time_window,
9063 { "Extended Paging Time Window", "gsm_a.gm.gmm.extended_paging_time_window",
9064 FT_UINT8, BASE_HEX, VALS(gsm_a_gm_paging_time_window_nr_5gcn_vals), 0x0,
9065 NULL, HFILL }
9067 { &hf_gsm_a_gm_mac,
9068 { "Message authentication code value", "gsm_a.gm.gmm.mac",
9069 FT_UINT32, BASE_HEX, NULL, 0x0,
9070 NULL, HFILL }
9072 { &hf_gsm_a_gm_up_integ_ind,
9073 { "Integrity indicator", "gsm_a.gm.gmm.up_integ_ind",
9074 FT_BOOLEAN, 8, TFS(&gsm_a_gm_up_integ_ind_value), 0x01,
9075 NULL, HFILL }
9077 { &hf_gsm_a_gm_dcn_id,
9078 { "DCN-ID", "gsm_a.gm.gmm.dcn_id",
9079 FT_UINT16, BASE_HEX, NULL, 0x0,
9080 NULL, HFILL }
9082 { &hf_gsm_a_gm_n3en_ind,
9083 { "N3EN indicator", "gsm_a.gm.gmm.n3en_ind",
9084 FT_BOOLEAN, 8, TFS(&gsm_a_gm_n3en_ind_value), 0x01,
9085 NULL, HFILL }
9087 { &hf_gsm_a_sm_pdp_type_org,
9088 { "PDP type organization", "gsm_a.gm.sm.pdp_type_org",
9089 FT_UINT8, BASE_DEC, VALS(gsm_a_sm_pdp_type_org_vals), 0x0f,
9090 NULL, HFILL }
9092 { &hf_gsm_a_sm_qos_mean_thr,
9093 { "Mean throughput", "gsm_a.gm.sm.qos.mean_throughput",
9094 FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gsm_a_sm_qos_mean_thr_vals), 0x1f,
9095 NULL, HFILL }
9097 { &hf_gsm_a_sm_qos_peak_thr,
9098 { "Peak throughput", "gsm_a.gm.sm.qos.peak_throughput",
9099 FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gsm_a_sm_qos_peak_thr_vals), 0xf0,
9100 NULL, HFILL }
9102 { &hf_gsm_a_sm_qos_prec_class,
9103 { "Precedence class", "gsm_a.gm.sm.qos.prec_class",
9104 FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gsm_a_sm_qos_prec_class_vals), 0x07,
9105 NULL, HFILL }
9107 { &hf_gsm_a_sm_qos_trans_delay,
9108 { "Transfer delay", "gsm_a.gm.sm.qos.trans_delay",
9109 FT_UINT8, BASE_DEC, NULL, 0xfc,
9110 NULL, HFILL }
9112 { &hf_gsm_a_sm_qos_signalling_ind,
9113 { "Signalling indication", "gsm_a.gm.sm.qos.signalling_ind",
9114 FT_BOOLEAN, 8, TFS(&gsm_a_sm_qos_signalling_ind_value), 0x10,
9115 NULL, HFILL }
9117 { &hf_gsm_a_sm_qos_source_stat_desc,
9118 { "Source statistics description", "gsm_a.gm.sm.qos.source_stat_desc",
9119 FT_UINT8, BASE_DEC, NULL, 0x0f,
9120 NULL, HFILL }
9122 { &hf_gsm_a_sm_qos_max_bitrate_upl,
9123 { "Maximum bitrate for uplink", "gsm_a.gm.sm.qos.max_bitrate_upl",
9124 FT_UINT8, BASE_DEC, NULL, 0x0,
9125 NULL, HFILL }
9127 { &hf_gsm_a_sm_qos_max_bitrate_downl,
9128 { "Maximum bitrate for downlink", "gsm_a.gm.sm.qos.max_bitrate_downl",
9129 FT_UINT8, BASE_DEC, NULL, 0x0,
9130 NULL, HFILL }
9132 { &hf_gsm_a_sm_qos_guar_bitrate_upl,
9133 { "Guaranteed bitrate for uplink", "gsm_a.gm.sm.qos.guar_bitrate_upl",
9134 FT_UINT8, BASE_DEC, NULL, 0x0,
9135 NULL, HFILL }
9137 { &hf_gsm_a_sm_qos_guar_bitrate_downl,
9138 { "Guaranteed bitrate for downlink", "gsm_a.gm.sm.qos.guar_bitrate_downl",
9139 FT_UINT8, BASE_DEC, NULL, 0x0,
9140 NULL, HFILL }
9142 { &hf_gsm_a_sm_qos_max_bitrate_upl_ext,
9143 { "Maximum bitrate for uplink (extended)", "gsm_a.gm.sm.qos.max_bitrate_upl_ext",
9144 FT_UINT8, BASE_DEC, NULL, 0x0,
9145 NULL, HFILL }
9147 { &hf_gsm_a_sm_qos_max_bitrate_downl_ext,
9148 { "Maximum bitrate for downlink (extended)", "gsm_a.gm.sm.qos.max_bitrate_downl_ext",
9149 FT_UINT8, BASE_DEC, NULL, 0x0,
9150 NULL, HFILL }
9152 { &hf_gsm_a_sm_qos_guar_bitrate_upl_ext,
9153 { "Guaranteed bitrate for uplink (extended)", "gsm_a.gm.sm.qos.guar_bitrate_upl_ext",
9154 FT_UINT8, BASE_DEC, NULL, 0x0,
9155 NULL, HFILL }
9157 { &hf_gsm_a_sm_qos_guar_bitrate_downl_ext,
9158 { "Guaranteed bitrate for downlink (extended)", "gsm_a.gm.sm.qos.guar_bitrate_downl_ext",
9159 FT_UINT8, BASE_DEC, NULL, 0x0,
9160 NULL, HFILL }
9162 { &hf_gsm_a_sm_qos_max_bitrate_upl_ext2,
9163 { "Maximum bitrate for uplink (extended-2)", "gsm_a.gm.sm.qos.max_bitrate_upl_ext2",
9164 FT_UINT8, BASE_DEC, NULL, 0x0,
9165 NULL, HFILL }
9167 { &hf_gsm_a_sm_qos_max_bitrate_downl_ext2,
9168 { "Maximum bitrate for downlink (extended-2)", "gsm_a.gm.sm.qos.max_bitrate_downl_ext2",
9169 FT_UINT8, BASE_DEC, NULL, 0x0,
9170 NULL, HFILL }
9172 { &hf_gsm_a_sm_qos_guar_bitrate_upl_ext2,
9173 { "Guaranteed bitrate for uplink (extended-2)", "gsm_a.gm.sm.qos.guar_bitrate_upl_ext2",
9174 FT_UINT8, BASE_DEC, NULL, 0x0,
9175 NULL, HFILL }
9177 { &hf_gsm_a_sm_qos_guar_bitrate_downl_ext2,
9178 { "Guaranteed bitrate for downlink (extended-2)", "gsm_a.gm.sm.qos.guar_bitrate_downl_ext2",
9179 FT_UINT8, BASE_DEC, NULL, 0x0,
9180 NULL, HFILL }
9182 { &hf_gsm_a_sm_eplmnc,
9183 { "EPLMNC", "gsm_a.gm.sm.re_attempt_ind.eplmnc",
9184 FT_BOOLEAN, 8, TFS(&gsm_a_gm_eplmnc_value), 0x02,
9185 NULL, HFILL }
9187 { &hf_gsm_a_sm_ratc,
9188 { "RATC", "gsm_a.gm.sm.re_attempt_ind.ratc",
9189 FT_BOOLEAN, 8, TFS(&gsm_a_gm_ratc_value), 0x01,
9190 NULL, HFILL }
9192 { &hf_gsm_a_sm_cause,
9193 { "SM Cause", "gsm_a.gm.sm.cause",
9194 FT_UINT8, BASE_DEC, NULL, 0x0,
9195 NULL, HFILL }
9197 { &hf_gsm_a_sm_cause_2,
9198 { "SM Cause 2", "gsm_a.gm.sm.cause_2",
9199 FT_UINT8, BASE_DEC, NULL, 0x0,
9200 NULL, HFILL }
9202 { &hf_gsm_a_sm_llc_sapi,
9203 { "LLC SAPI", "gsm_a.gm.sm.llc_sapi",
9204 FT_UINT8, BASE_DEC, VALS(gsm_a_sm_llc_sapi_vals), 0x0f,
9205 NULL, HFILL }
9207 { &hf_gsm_a_sm_tdi,
9208 { "Tear Down Indicator (TDI)", "gsm_a.gm.sm.tdi",
9209 FT_BOOLEAN, 8, TFS(&gsm_a_sm_tdi_value), 0x01,
9210 NULL, HFILL }
9212 { &hf_gsm_a_sm_packet_flow_id,
9213 { "Packet Flow Identifier (PFI)", "gsm_a.gm.sm.packet_flow_id",
9214 FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gsm_a_sm_packet_flow_id_vals), 0x7f,
9215 NULL, HFILL }
9217 { &hf_gsm_a_gmm_net_cap_gea1,
9218 { "GEA/1", "gsm_a.gm.gmm.net_cap.gea1",
9219 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_gea_vals), 0x80,
9220 NULL, HFILL }
9222 { &hf_gsm_a_gmm_net_cap_smdch,
9223 { "SM capabilities via dedicated channels", "gsm_a.gm.gmm.net_cap.smdch",
9224 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_smdch_vals), 0x40,
9225 NULL, HFILL }
9227 { &hf_gsm_a_gmm_net_cap_smgprs,
9228 { "SM capabilities via GPRS channels", "gsm_a.gm.gmm.net_cap.smgprs",
9229 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_smgprs_vals), 0x20,
9230 NULL, HFILL }
9232 { &hf_gsm_a_gmm_net_cap_ucs2,
9233 { "UCS2 support", "gsm_a.gm.gmm.net_cap.ucs2",
9234 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_ucs2_vals), 0x10,
9235 NULL, HFILL }
9237 { &hf_gsm_a_gmm_net_cap_ss_scr_ind,
9238 { "SS Screening Indicator", "gsm_a.gm.gmm.net_cap.ss_scr_ind",
9239 FT_UINT8, BASE_HEX, VALS(gsm_a_gmm_net_cap_ss_scr_ind_vals), 0x0c,
9240 NULL, HFILL }
9242 { &hf_gsm_a_gmm_net_cap_solsa,
9243 { "SoLSA Capability", "gsm_a.gm.gmm.net_cap.solsa",
9244 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_solsa_vals), 0x02,
9245 NULL, HFILL }
9247 { &hf_gsm_a_gmm_net_cap_rev,
9248 { "Revision level indicator", "gsm_a.gm.gmm.net_cap.rev",
9249 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_rev_vals), 0x01,
9250 NULL, HFILL }
9252 { &hf_gsm_a_gmm_net_cap_pfc,
9253 { "PFC feature mode", "gsm_a.gm.gmm.net_cap.pfc",
9254 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_pfc_vals), 0x80,
9255 NULL, HFILL }
9257 { &hf_gsm_a_gmm_net_cap_ext_gea_bits,
9258 { "Extended GEA bits", "gsm_a.gm.gmm.net_cap.ext_gea_bits",
9259 FT_UINT8, BASE_HEX, NULL, 0x7e,
9260 NULL, HFILL }
9262 { &hf_gsm_a_gmm_net_cap_gea2,
9263 { "GEA/2", "gsm_a.gm.gmm.net_cap.gea2",
9264 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_gea_vals), 0x40,
9265 NULL, HFILL }
9267 { &hf_gsm_a_gmm_net_cap_gea3,
9268 { "GEA/3", "gsm_a.gm.gmm.net_cap.gea3",
9269 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_gea_vals), 0x20,
9270 NULL, HFILL }
9272 { &hf_gsm_a_gmm_net_cap_gea4,
9273 { "GEA/4", "gsm_a.gm.gmm.net_cap.gea4",
9274 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_gea_vals), 0x10,
9275 NULL, HFILL }
9277 { &hf_gsm_a_gmm_net_cap_gea5,
9278 { "GEA/5", "gsm_a.gm.gmm.net_cap.gea5",
9279 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_gea_vals), 0x08,
9280 NULL, HFILL }
9282 { &hf_gsm_a_gmm_net_cap_gea6,
9283 { "GEA/6", "gsm_a.gm.gmm.net_cap.gea6",
9284 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_gea_vals), 0x04,
9285 NULL, HFILL }
9287 { &hf_gsm_a_gmm_net_cap_gea7,
9288 { "GEA/7", "gsm_a.gm.gmm.net_cap.gea7",
9289 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_gea_vals), 0x02,
9290 NULL, HFILL }
9292 { &hf_gsm_a_gmm_net_cap_lcs,
9293 { "LCS VA capability", "gsm_a.gm.gmm.net_cap.lcs",
9294 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_lcs_vals), 0x01,
9295 NULL, HFILL }
9297 { &hf_gsm_a_gmm_net_cap_ps_irat_iu,
9298 { "PS inter-RAT HO from GERAN to UTRAN Iu mode capability", "gsm_a.gm.gmm.net_cap.ps_irat_iu",
9299 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_ps_irat_iu_vals), 0x80,
9300 NULL, HFILL }
9302 { &hf_gsm_a_gmm_net_cap_ps_irat_s1,
9303 { "PS inter-RAT HO from GERAN to E-UTRAN S1 mode capability", "gsm_a.gm.gmm.net_cap.ps_irat_s1",
9304 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_ps_irat_s1_vals), 0x40,
9305 NULL, HFILL }
9307 { &hf_gsm_a_gmm_net_cap_comb_proc,
9308 { "EMM Combined procedures capability", "gsm_a.gm.gmm.net_cap.comb_proc",
9309 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_comb_proc_vals), 0x20,
9310 NULL, HFILL }
9312 { &hf_gsm_a_gmm_net_cap_isr,
9313 { "ISR support", "gsm_a.gm.gmm.net_cap.isr",
9314 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_isr_vals), 0x10,
9315 NULL, HFILL }
9317 { &hf_gsm_a_gmm_net_cap_srvcc_to_geran,
9318 { "SRVCC to GERAN/UTRAN capability", "gsm_a.gm.gmm.net_cap.srvcc_to_geran",
9319 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_srvcc_to_geran_vals), 0x08,
9320 NULL, HFILL }
9322 { &hf_gsm_a_gmm_net_cap_epc,
9323 { "EPC capability", "gsm_a.gm.gmm.net_cap.epc",
9324 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_epc_vals), 0x04,
9325 NULL, HFILL }
9327 { &hf_gsm_a_gmm_net_cap_nf,
9328 { "NF capability", "gsm_a.gm.gmm.net_cap.nf",
9329 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_nf_vals), 0x02,
9330 NULL, HFILL }
9332 { &hf_gsm_a_gmm_net_geran_net_sharing,
9333 { "GERAN network sharing capability", "gsm_a.gm.gmm.net_cap.geran_net_sharing",
9334 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_geran_net_vals), 0x01,
9335 NULL, HFILL }
9337 { &hf_gsm_a_gmm_net_cap_up_int_prot,
9338 { "User plane integrity protection support", "gsm_a.gm.gmm.net_cap.up_int_prot",
9339 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x80,
9340 NULL, HFILL }
9342 { &hf_gsm_a_gmm_net_cap_up_gia4,
9343 { "GIA/4", "gsm_a.gm.gmm.net_cap.gia4",
9344 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_gia_vals), 0x40,
9345 NULL, HFILL }
9347 { &hf_gsm_a_gmm_net_cap_up_gia5,
9348 { "GIA/5", "gsm_a.gm.gmm.net_cap.gia5",
9349 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_gia_vals), 0x20,
9350 NULL, HFILL }
9352 { &hf_gsm_a_gmm_net_cap_up_gia6,
9353 { "GIA/6", "gsm_a.gm.gmm.net_cap.gia6",
9354 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_gia_vals), 0x10,
9355 NULL, HFILL }
9357 { &hf_gsm_a_gmm_net_cap_up_gia7,
9358 { "GIA/7", "gsm_a.gm.gmm.net_cap.gia7",
9359 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_gia_vals), 0x08,
9360 NULL, HFILL }
9362 { &hf_gsm_a_gmm_net_cap_epco_ie_ind,
9363 { "ePCO IE indicator", "gsm_a.gm.gmm.net_cap.epco_ie_ind",
9364 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_epco_ie_ind_vals), 0x04,
9365 NULL, HFILL }
9367 { &hf_gsm_a_gmm_net_cap_restrict_use_enh_cov,
9368 { "Restriction on use of enhanced coverage capability", "gsm_a.gm.gmm.net_cap.restrict_use_enh_cov",
9369 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_restrict_use_enh_cov_vals), 0x02,
9370 NULL, HFILL }
9372 { &hf_gsm_a_gmm_net_cap_dc_eutra_nr_cap,
9373 { "Dual connectivity of E-UTRA with NR capability", "gsm_a.gm.gmm.net_cap.dc_eutra_nr_cap",
9374 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_dc_eutra_nr_cap_vals), 0x01,
9375 NULL, HFILL }
9377 { &hf_gsm_a_sm_tmgi,
9378 { "Temporary Mobile Group Identity (TMGI)", "gsm_a.gm.sm.tmgi",
9379 FT_UINT24, BASE_HEX, NULL, 0x0,
9380 NULL, HFILL }
9382 { &hf_gsm_a_sm_enh_nsapi,
9383 { "Enhanced NSAPI", "gsm_a.gm.sm.enh_nsapi",
9384 FT_UINT8, BASE_DEC, NULL, 0x0,
9385 NULL, HFILL }
9387 { &hf_gsm_a_sm_req_type,
9388 { "Request type", "gsm_a.gm.sm.req_type",
9389 FT_UINT8, BASE_DEC, VALS(gsm_a_sm_req_type_vals), 0x07,
9390 NULL, HFILL }
9392 { &hf_gsm_a_sm_notif_ind,
9393 { "Notification indicator", "gsm_a.gm.sm.notif_ind",
9394 FT_UINT8, BASE_DEC, VALS(gsm_a_sm_notif_ind_vals), 0x0,
9395 NULL, HFILL }
9397 { &hf_gsm_a_sm_connectivity_type,
9398 { "Connectivity type", "gsm_a.gm.sm.connectivity_type",
9399 FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gsm_a_sm_connectivity_type_vals), 0x0F,
9400 NULL, HFILL }
9402 { &hf_gsm_a_sm_wlan_utran_offload_accept,
9403 { "WLAN UTRAN offload acceptability", "gsm_a.gm.sm.wlan_utran_offload_accept",
9404 FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_sm_wlan_utran_offload_accept_value), 0x0,
9405 NULL, HFILL }
9407 { &hf_gsm_a_sm_wlan_eutran_offload_accept,
9408 { "WLAN E-UTRAN offload acceptability", "gsm_a.gm.sm.wlan_eutran_offload_accept",
9409 FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_sm_wlan_eutran_offload_accept_value), 0x0,
9410 NULL, HFILL }
9412 { &hf_gsm_a_sm_nbifom_cont,
9413 { "NBIFOM container content", "gsm_a.gm.sm.nbifom_cont",
9414 FT_BYTES, BASE_NONE, NULL, 0x0,
9415 NULL, HFILL }
9417 { &hf_gsm_a_gm_rac_ctrled_early_cm_sending,
9418 { "Controlled early Classmark Sending", "gsm_a.gm.gmm.rac.ctrled_early_cm_sending",
9419 FT_BOOLEAN, BASE_NONE, TFS(&tfs_implemented_not_implemented), 0x0,
9420 NULL, HFILL }
9422 { &hf_gsm_a_gm_rac_pseudo_sync,
9423 { "Pseudo Synchronisation", "gsm_a.gm.gmm.rac.pseudo_sync",
9424 FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x0,
9425 NULL, HFILL }
9427 { &hf_gsm_a_gm_rac_vgcs,
9428 { "Voice Group Call Service", "gsm_a.gm.gmm.rac.vgcs",
9429 FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_vgcs), 0x0,
9430 NULL, HFILL }
9432 { &hf_gsm_a_gm_rac_vbs,
9433 { "Voice Broadcast Service", "gsm_a.gm.gmm.rac.vbs",
9434 FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_vbs), 0x0,
9435 NULL, HFILL }
9437 { &hf_gsm_a_gm_rac_multislot_capability,
9438 { "Multislot capability struct", "gsm_a.gm.gmm.rac.multislot_capability",
9439 FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x0,
9440 NULL, HFILL }
9442 { &hf_gsm_a_gm_rac_hscsd_multi_slot_class,
9443 { "HSCSD multislot class", "gsm_a.gm.gmm.rac.hscsd_multi_slot_class",
9444 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_multi_slot_vals), 0x0,
9445 NULL, HFILL }
9447 { &hf_gsm_a_gm_rac_gprs_multi_slot_class,
9448 { "GPRS multislot class", "gsm_a.gm.gmm.rac.gprs_multi_slot_class",
9449 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_multi_slot_vals), 0x0,
9450 NULL, HFILL }
9452 { &hf_gsm_a_gm_rac_gprs_ext_dyn_alloc_cap,
9453 { "GPRS Extended Dynamic Allocation Capability", "gsm_a.gm.gmm.rac.gprs_ext_dyn_alloc_cap",
9454 FT_BOOLEAN, BASE_NONE, TFS(&tfs_implemented_not_implemented), 0x0,
9455 NULL, HFILL }
9457 { &hf_gsm_a_gm_rac_ecsd_multi_slot_class,
9458 { "ECSD multislot class", "gsm_a.gm.gmm.rac.ecsd_multi_slot_class",
9459 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_multi_slot_vals), 0x0,
9460 NULL, HFILL }
9462 { &hf_gsm_a_gm_rac_egprs_multi_slot_class,
9463 { "EGPRS multislot class", "gsm_a.gm.gmm.rac.egprs_multi_slot_class",
9464 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_multi_slot_vals), 0x0,
9465 NULL, HFILL }
9467 { &hf_gsm_a_gm_rac_egprs_ext_dyn_alloc_cap,
9468 { "EGPRS Extended Dynamic Allocation Capability", "gsm_a.gm.gmm.rac.egprs_ext_dyn_alloc_cap",
9469 FT_BOOLEAN, BASE_NONE, TFS(&tfs_implemented_not_implemented), 0x0,
9470 NULL, HFILL }
9472 { &hf_gsm_a_gm_rac_dtm_gprs_multi_slot_class,
9473 { "DTM GPRS Multi Slot Class", "gsm_a.gm.gmm.rac.dtm_gprs_multi_slot_class",
9474 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_dtm_gprs_multi_slot_class_vals), 0x0,
9475 NULL, HFILL }
9477 { &hf_gsm_a_gm_rac_single_slt_dtm,
9478 { "Single Slot DTM", "gsm_a.gm.gmm.rac.single_slt_dtm",
9479 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9480 NULL, HFILL }
9482 { &hf_gsm_a_gm_rac_dtm_egprs_multi_slot_cls_pres,
9483 { "DTM EGPRS Multi Slot Class", "gsm_a.gm.gmm.rac.dtm_egprs_multi_slot_cls_pres",
9484 FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x0,
9485 NULL, HFILL }
9487 { &hf_gsm_a_gm_rac_dtm_egprs_multi_slot_class,
9488 { "DTM EGPRS Multi Slot Class", "gsm_a.gm.gmm.rac.dtm_egprs_multi_slot_class",
9489 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_dtm_gprs_multi_slot_class_vals), 0x0,
9490 NULL, HFILL }
9492 { &hf_gsm_a_gm_rac_8psk_pow_cap_pres,
9493 { "8PSK Power Capability Bits", "gsm_a.gm.gmm.rac.8psk_pow_cap_pres",
9494 FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x0,
9495 NULL, HFILL }
9497 { &hf_gsm_a_gm_rac_comp_int_meas_cap,
9498 { "COMPACT Interference Measurement Capability", "gsm_a.gm.gmm.rac.comp_int_meas_cap",
9499 FT_BOOLEAN, BASE_NONE, TFS(&tfs_implemented_not_implemented), 0x0,
9500 NULL, HFILL }
9502 { &hf_gsm_a_gm_rel_lev_ind,
9503 { "Revision Level Indicator", "gsm_a.gm.gmm.rel_lev_ind",
9504 FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_revision_level_indicator), 0x0,
9505 NULL, HFILL }
9507 { &hf_gsm_a_gm_rac_umts_fdd_cap,
9508 { "UMTS FDD Radio Access Technology Capability", "gsm_a.gm.gmm.rac.umts_fdd_cap",
9509 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9510 NULL, HFILL }
9512 { &hf_gsm_a_gm_rac_umts_384_tdd_ra_cap,
9513 { "UMTS 3.84 Mcps TDD Radio Access Technology Capability", "gsm_a.gm.gmm.rac.umts_384_tdd_ra_cap",
9514 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9515 NULL, HFILL }
9517 { &hf_gsm_a_gm_rac_cdma2000_cap,
9518 { "CDMA 2000 Radio Access Technology Capability", "gsm_a.gm.gmm.rac.cdma2000_cap",
9519 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9520 NULL, HFILL }
9522 { &hf_gsm_a_gm_rac_umts_128_tdd_ra_cap,
9523 { "UMTS 1.28 Mcps TDD Radio Access Technology Capability", "gsm_a.gm.gmm.rac.umts_128_tdd_ra_cap",
9524 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9525 NULL, HFILL }
9527 { &hf_gsm_a_gm_rac_geran_feat_pkg,
9528 { "GERAN Feature Package 1", "gsm_a.gm.gmm.rac.geran_feat_pkg",
9529 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9530 NULL, HFILL }
9532 { &hf_gsm_a_gm_rac_mod_based_multi_slot_class_support,
9533 { "Modulation based multislot class support", "gsm_a.gm.gmm.rac.mod_based_multi_slot_class_support",
9534 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9535 NULL, HFILL }
9537 { &hf_gsm_a_gm_rac_geran_iu_mode_cap,
9538 { "GERAN Iu mode", "gsm_a.gm.gmm.rac.geran_iu_mode_cap",
9539 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9540 NULL, HFILL }
9542 { &hf_gsm_a_gm_rac_flo_iu_cap,
9543 { "FLO Iu Capability", "gsm_a.gm.gmm.rac.flo_iu_cap",
9544 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9545 NULL, HFILL }
9547 { &hf_gsm_a_gm_rac_mult_tbf_cap,
9548 { "Multiple TBF Capability", "gsm_a.gm.gmm.rac.mult_tbf_cap",
9549 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9550 NULL, HFILL }
9552 { &hf_gsm_a_gm_rac_down_adv_rec_perf,
9553 { "Downlink Advanced Receiver Performance", "gsm_a.gm.gmm.rac.down_adv_rec_perf",
9554 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_down_adv_rec_perf_vals), 0x0,
9555 NULL, HFILL }
9557 { &hf_gsm_a_gm_rac_ext_rlc_mac_ctrl_msg_seg_cap,
9558 { "Extended RLC/MAC Control Message Segmentation Capability", "gsm_a.gm.gmm.rac.ext_rlc_mac_ctrl_msg_seg_cap",
9559 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9560 NULL, HFILL }
9562 { &hf_gsm_a_gm_rac_dtm_enh_cap,
9563 { "DTM Enhancements Capability", "gsm_a.gm.gmm.rac.dtm_enh_cap",
9564 FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_dtm_enh_cap), 0x0,
9565 NULL, HFILL }
9567 { &hf_gsm_a_gm_rac_dtm_gprs_high_multi_slot_class,
9568 { "DTM GPRS High Multi Slot Class", "gsm_a.gm.gmm.rac.dtm_gprs_high_multi_slot_class",
9569 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_dtm_gprs_high_multi_slot_class_vals), 0x0,
9570 NULL, HFILL }
9572 { &hf_gsm_a_gm_rac_dtm_egprs_high_multi_slot_class,
9573 { "DTM EGPRS High Multi Slot Class", "gsm_a.gm.gmm.rac.dtm_egprs_high_multi_slot_class",
9574 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_dtm_gprs_high_multi_slot_class_vals), 0x0,
9575 NULL, HFILL }
9577 { &hf_gsm_a_gm_rac_ps_ho_cap,
9578 { "PS Handover Capability", "gsm_a.gm.gmm.rac.ps_ho_cap",
9579 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9580 NULL, HFILL }
9582 { &hf_gsm_a_gm_rac_dtm_ho_cap,
9583 { "DTM Handover Capability", "gsm_a.gm.gmm.rac.dtm_ho_cap",
9584 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9585 NULL, HFILL }
9587 { &hf_gsm_a_gm_rac_multi_slot_cap_red_down_dual_carrier,
9588 { "Multislot Capability Reduction for Downlink Dual Carrier", "gsm_a.gm.gmm.rac.multi_slot_cap_red_down_dual_carrier",
9589 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_multi_slot_cap_red_down_dual_carrier_vals), 0x0,
9590 NULL, HFILL }
9592 { &hf_gsm_a_gm_rac_down_dual_carrier_dtm_cap,
9593 { "Downlink Dual Carrier for DTM Capability", "gsm_a.gm.gmm.rac.down_dual_carrier_dtm_cap",
9594 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9595 NULL, HFILL }
9597 { &hf_gsm_a_gm_rac_flex_ts_assign,
9598 { "Flexible Timeslot Assignment", "gsm_a.gm.gmm.rac.flex_ts_assign",
9599 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9600 NULL, HFILL }
9602 { &hf_gsm_a_gm_rac_gan_ps_ho_cap,
9603 { "GAN PS Handover Capability", "gsm_a.gm.gmm.rac.gan_ps_ho_cap",
9604 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9605 NULL, HFILL }
9607 { &hf_gsm_a_gm_rac_rlc_non_pers_mode,
9608 { "RLC Non-persistent Mode", "gsm_a.gm.gmm.rac.rlc_non_pers_mode",
9609 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9610 NULL, HFILL }
9612 { &hf_gsm_a_gm_rac_reduced_lat_cap,
9613 { "Reduced Latency Capability", "gsm_a.gm.gmm.rac.reduced_lat_cap",
9614 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9615 NULL, HFILL }
9617 { &hf_gsm_a_gm_rac_ul_egprs2,
9618 { "Uplink EGPRS2", "gsm_a.gm.gmm.rac.ul_egprs2",
9619 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_ul_egprs2_vals), 0x0,
9620 NULL, HFILL }
9622 { &hf_gsm_a_gm_rac_dl_egprs2,
9623 { "Downlink EGPRS2", "gsm_a.gm.gmm.rac.dl_egprs2",
9624 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_dl_egprs2_vals), 0x0,
9625 NULL, HFILL }
9627 { &hf_gsm_a_gm_rac_eutra_fdd_support,
9628 { "E-UTRA FDD support", "gsm_a.gm.gmm.rac.eutra_fdd_support",
9629 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9630 NULL, HFILL }
9632 { &hf_gsm_a_gm_rac_eutra_tdd_support,
9633 { "E-UTRA TDD support", "gsm_a.gm.gmm.rac.eutra_tdd_support",
9634 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9635 NULL, HFILL }
9637 { &hf_gsm_a_gm_rac_geran_to_eutra_support_in_geran_ptm,
9638 { "GERAN to E-UTRA support in GERAN packet transfer mode", "gsm_a.gm.gmm.rac.geran_to_eutra_support_in_geran_ptm",
9639 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_geran_to_eutra_support_in_geran_ptm_vals), 0x0,
9640 NULL, HFILL }
9642 { &hf_gsm_a_gm_rac_prio_based_resel_support,
9643 { "Priority-based reselection support", "gsm_a.gm.gmm.rac.prio_based_resel_support",
9644 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9645 NULL, HFILL }
9647 { &hf_gsm_a_gm_rac_alt_efta_multi_slot_class,
9648 { "Alternative EFTA Multislot Class", "gsm_a.gm.gmm.rac.alt_efta_multi_slot_class",
9649 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_alt_efta_multi_slot_class_vals), 0x0,
9650 NULL, HFILL }
9652 { &hf_gsm_a_gm_rac_efta_multi_slot_cap_red_down_dual_carrier,
9653 { "EFTA Multislot Capability Reduction for Downlink Dual Carrier", "gsm_a.gm.gmm.rac.efta_multi_slot_cap_red_down_dual_carrier",
9654 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_multi_slot_cap_red_down_dual_carrier_vals), 0x0,
9655 NULL, HFILL }
9657 { &hf_gsm_a_gm_rac_ind_up_layer_pdu_start_cap_for_rlc_um,
9658 { "Indication of Upper Layer PDU Start Capability for RLC UM", "gsm_a.gm.gmm.rac.ind_up_layer_pdu_start_cap_for_rlc_um",
9659 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9660 NULL, HFILL }
9662 { &hf_gsm_a_gm_rac_emst_cap,
9663 { "Enhanced Multiplexing for Single TBF Capability", "gsm_a.gm.gmm.rac.emst_cap",
9664 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9665 NULL, HFILL }
9667 { &hf_gsm_a_gm_rac_mtti_cap,
9668 { "Multiple TTI Capability", "gsm_a.gm.gmm.rac.mtti_cap",
9669 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9670 NULL, HFILL }
9672 { &hf_gsm_a_gm_rac_utra_csg_cell_report,
9673 { "Reporting of UTRAN CSG cells in packet transfer mode", "gsm_a.gm.gmm.rac.utra_csg_cell_report",
9674 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9675 NULL, HFILL }
9677 { &hf_gsm_a_gm_rac_eutra_csg_cell_report,
9678 { "Reporting of E-UTRAN CSG cells in packet transfer mode", "gsm_a.gm.gmm.rac.eutra_csg_cell_report",
9679 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9680 NULL, HFILL }
9682 { &hf_gsm_a_gm_rac_dtr_cap,
9683 { "Dynamic Timeslot Reduction Capability", "gsm_a.gm.gmm.rac.dtr_cap",
9684 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9685 NULL, HFILL }
9687 { &hf_gsm_a_gm_rac_emsr_cap,
9688 { "Enhanced Multiplexing for Single RLC Entity Capability", "gsm_a.gm.gmm.rac.emsr_cap",
9689 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9690 NULL, HFILL }
9692 { &hf_gsm_a_gm_rac_fast_down_freq_switch_cap,
9693 { "Fast Downlink Frequency Switching Capability", "gsm_a.gm.gmm.rac.fast_down_freq_switch_cap",
9694 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9695 NULL, HFILL }
9697 { &hf_gsm_a_gm_rac_tighter_cap,
9698 { "TIGHTER Capability", "gsm_a.gm.gmm.rac.tighter_cap",
9699 FT_UINT8, BASE_DEC, VALS(tighter_cap_level_vals), 0x0,
9700 NULL, HFILL }
9702 { &hf_gsm_a_gm_rac_fanr_cap,
9703 { "Fast Ack/Nack Reporting Capability", "gsm_a.gm.gmm.rac.fanr_cap",
9704 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9705 NULL, HFILL }
9707 { &hf_gsm_a_gm_rac_ipa_cap,
9708 { "Immediate Packet Assignment Capability", "gsm_a.gm.gmm.rac.ipa_cap",
9709 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9710 NULL, HFILL }
9712 { &hf_gsm_a_gm_rac_geran_nw_sharing_support,
9713 { "GERAN Network Sharing support", "gsm_a.gm.gmm.rac.geran_nw_sharing_support",
9714 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9715 NULL, HFILL }
9717 { &hf_gsm_a_gm_rac_eutra_wb_rsrq_support,
9718 { "E-UTRA Wideband RSRQ measurements support", "gsm_a.gm.gmm.rac.eutra_wb_rsrq_support",
9719 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9720 NULL, HFILL }
9722 { &hf_gsm_a_gm_rac_utra_mfbi_support,
9723 { "UTRA Multiple Frequency Band Indicators support", "gsm_a.gm.gmm.rac.utra_mfbi_support",
9724 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9725 NULL, HFILL }
9727 { &hf_gsm_a_gm_rac_eutra_mfbi_support,
9728 { "E-UTRA Multiple Frequency Band Indicators support", "gsm_a.gm.gmm.rac.eutra_mfbi_support",
9729 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9730 NULL, HFILL }
9732 { &hf_gsm_a_gm_rac_dlmc_non_contig_intra_band_recep,
9733 { "DLMC - Non-contiguous intra-band reception", "gsm_a.gm.gmm.rac.dlmc.non_contig_intra_band_recep",
9734 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_dlmc_non_contig_intra_band_recep_vals), 0x0,
9735 NULL, HFILL }
9737 { &hf_gsm_a_gm_rac_dlmc_inter_band_recep,
9738 { "DLMC - Inter-band reception", "gsm_a.gm.gmm.rac.dlmc.inter_band_recep",
9739 FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_dlmc_inter_band_recep_val), 0x0,
9740 NULL, HFILL }
9742 { &hf_gsm_a_gm_rac_dlmc_max_bandwidth,
9743 { "DLMC - Maximum Bandwidth", "gsm_a.gm.gmm.rac.dlmc.max_bandwidth",
9744 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_dlmc_max_bandwidth_vals), 0x0,
9745 NULL, HFILL }
9747 { &hf_gsm_a_gm_rac_dlmc_max_nb_dl_ts,
9748 { "DLMC - Maximum Number of Downlink Timeslots", "gsm_a.gm.gmm.rac.dlmc.max_nb_dl_ts",
9749 FT_UINT8, BASE_CUSTOM, CF_FUNC(gsm_a_gm_dlmc_max_nb_dl_ts_fmt), 0x0,
9750 NULL, HFILL }
9752 { &hf_gsm_a_gm_rac_dlmc_max_nb_dl_carriers,
9753 { "DLMC - Maximum Number of Downlink Carriers", "gsm_a.gm.gmm.rac.dlmc.max_nb_dl_carriers",
9754 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_dlmc_max_nb_dl_carriers_vals), 0x0,
9755 NULL, HFILL }
9757 { &hf_gsm_a_gm_rac_ext_tsc_set_cap_support,
9758 { "Extended TSC Set Capability support", "gsm_a.gm.gmm.rac.ext_tsc_set_cap_support",
9759 FT_BOOLEAN, BASE_NONE, TFS(&tfs_yes_no), 0x0,
9760 NULL, HFILL }
9762 { &hf_gsm_a_gm_rac_ext_earfcn_value_range,
9763 { "Extended EARFCN value range", "gsm_a.gm.gmm.rac.ext_earfcn_value_range",
9764 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9765 NULL, HFILL }
9767 { &hf_gsm_a_gm_rac_ec_pch_mon_support,
9768 { "(EC-)PCH monitoring support", "gsm_a.gm.gmm.rac.ec_pch_mon_support",
9769 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_ec_pch_mon_support_vals), 0x0,
9770 NULL, HFILL }
9772 { &hf_gsm_a_gm_rac_ms_sync_accuracy,
9773 { "MS Sync Accuracy", "gsm_a.gm.gmm.rac.ms_sync_accuracy",
9774 FT_UINT8, BASE_DEC, NULL, 0x0,
9775 NULL, HFILL }
9777 { &hf_gsm_a_gm_rac_ec_ul_cov_enh_support,
9778 { "EC uplink coverage enhancement support", "gsm_a.gm.gmm.rac.ec_ul_cov_enh_support",
9779 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9780 NULL, HFILL }
9782 { &hf_gsm_a_gm_rac_mta_access_sec_support,
9783 { "MTA Access Security support", "gsm_a.gm.gmm.rac.mta_access_sec_support",
9784 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9785 NULL, HFILL }
9787 { &hf_gsm_a_gm_rac_ec_paging_ind_chan_mon_support,
9788 { "EC paging indication channel monitoring support", "gsm_a.gm.gmm.rac.ec_paging_ind_chan_mon_support",
9789 FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9790 NULL, HFILL }
9792 { &hf_gsm_a_sm_ti_flag,
9793 { "TI Flag", "gsm_a.gm.sm.ti_flag",
9794 FT_BOOLEAN, 8, TFS(&gsm_a_sm_ti_flag_vals), 0x80,
9795 NULL, HFILL }
9797 { &hf_gsm_a_sm_ext,
9798 { "Extension", "gsm_a.gm.sm.ext",
9799 FT_BOOLEAN, 8, NULL, 0x80,
9800 NULL, HFILL }
9802 { &hf_gsm_a_gm_sm_pco_apn_rate_ctrl_params_aer,
9803 { "AER", "gsm_a.gm.sm.pco.apn_rate_ctrl_params.aer",
9804 FT_BOOLEAN, 8, TFS(&gsm_a_gm_apn_rate_ctrl_params_aer_value), 0x08,
9805 NULL, HFILL }
9807 { &hf_gsm_a_gm_sm_pco_apn_rate_ctrl_params_ul_time_unit,
9808 { "Uplink time unit", "gsm_a.gm.sm.pco.apn_rate_ctrl_params.ul_time_unit",
9809 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_apn_rate_ctrl_ul_time_unit_vals), 0x07,
9810 NULL, HFILL }
9812 { &hf_gsm_a_gm_sm_pco_apn_rate_ctrl_params_max_ul_rate,
9813 { "Maximum uplink rate", "gsm_a.gm.sm.pco.apn_rate_ctrl_params.max_ul_rate",
9814 FT_UINT24, BASE_DEC|BASE_UNIT_STRING, UNS(&units_message_messages), 0x0,
9815 NULL, HFILL }
9817 { &hf_gsm_a_gm_sm_pco_3gpp_data_off_ue_status,
9818 { "3GPP PS data off UE status", "gsm_a.gm.sm.pco.3gpp_data_off_ue_status",
9819 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_sm_pco_3gpp_data_off_ue_status_vals), 0x0,
9820 NULL, HFILL }
9822 { &hf_gsm_a_gm_sm_pco_add_apn_rate_ctrl_params_ul_time_unit,
9823 { "Uplink time unit", "gsm_a.gm.sm.pco.add_apn_rate_ctrl_params.ul_time_unit",
9824 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_apn_rate_ctrl_ul_time_unit_vals), 0x07,
9825 NULL, HFILL }
9827 { &hf_gsm_a_gm_sm_pco_add_apn_rate_ctrl_params_max_ul_rate,
9828 { "Additional uplink rate for exception data", "gsm_a.gm.sm.pco.add_apn_rate_ctrl_params.max_ul_rate",
9829 FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_message_messages), 0x0,
9830 NULL, HFILL }
9832 { &hf_gsm_a_gm_sm_pco_pdu_session_id,
9833 { "PDU session identity", "gsm_a.gm.sm.pco.pdu_session_id",
9834 FT_UINT8, BASE_DEC, VALS(nas_5gs_pdu_session_id_vals), 0x0,
9835 NULL, HFILL }
9837 { &hf_gsm_a_gm_sm_pco_pdu_session_address_lifetime,
9838 { "PDU session address lifetime", "gsm_a.gm.sm.pco.pdu_session_address_lifetime",
9839 FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_second_seconds), 0x0,
9840 NULL, HFILL }
9842 { &hf_gsm_a_gm_sm_pco_eth_frame_payload_mtu,
9843 { "Ethernet Frame Payload MTU", "gsm_a.gm.sm.pco.eth_frame_payload_mtu",
9844 FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_octet_octets), 0x0,
9845 NULL, HFILL }
9847 { &hf_gsm_a_gm_sm_pco_unstruct_link_mtu,
9848 { "Unstructured Link MTU", "gsm_a.gm.sm.pco.unstruct_link_mtu",
9849 FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_octet_octets), 0x0,
9850 NULL, HFILL }
9852 { &hf_gsm_a_gm_sm_pco_5gsm_cause,
9853 { "5GSM cause", "gsm_a.gm.sm.pco.5gsm_cause",
9854 FT_UINT8, BASE_DEC, VALS(nas_5gs_sm_cause_vals), 0x0,
9855 NULL, HFILL }
9857 { &hf_gsm_a_gm_sm_pco_acs_info,
9858 { "ACS information", "gsm_a.gm.sm.pco.acs_info",
9859 FT_STRING, BASE_NONE, NULL, 0x0,
9860 NULL, HFILL }
9862 { &hf_gsm_a_gm_sm_pco_init_small_data_rate_ctrl_params_max_ul_rate_allowed,
9863 { "Maximum uplink rate allowed", "gsm_a.gm.sm.pco.init_small_data_rate_ctrl_params.max_ul_rate_allowed",
9864 FT_UINT24, BASE_DEC, NULL, 0x0,
9865 NULL, HFILL }
9867 { &hf_gsm_a_gm_sm_pco_init_small_data_rate_ctrl_params_termination_timestamp,
9868 { "Termination timestamp", "gsm_a.gm.sm.pco.init_small_data_rate_ctrl_params.termination_timestamp",
9869 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0x0,
9870 NULL, HFILL }
9872 { &hf_gsm_a_gm_sm_pco_atsss_response,
9873 { "ATSSS response", "gsm_a.gm.sm.pco.atsss_response",
9874 FT_BYTES, BASE_NONE, NULL, 0x0,
9875 NULL, HFILL }
9877 { &hf_gsm_a_gm_sm_pco_dns_serv_sec_info_type,
9878 { "Type", "gsm_a.gm.sm.pco.dns_serv_sec_info.type",
9879 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_sm_pco_dns_serv_sec_info_type_vals), 0x0,
9880 NULL, HFILL }
9882 { &hf_gsm_a_gm_sm_pco_dns_serv_sec_info_sec_proto_type,
9883 { "Security protocol type", "gsm_a.gm.sm.pco.dns_serv_sec_info.sec_proto_type",
9884 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_sm_pco_dns_serv_sec_info_sec_proto_vals), 0x0,
9885 NULL, HFILL }
9887 { &hf_gsm_a_gm_sm_pco_dns_serv_sec_info_port_number,
9888 { "Port number", "gsm_a.gm.sm.pco.dns_serv_sec_info.port_number",
9889 FT_UINT16, BASE_DEC, NULL, 0x0,
9890 NULL, HFILL }
9892 { &hf_gsm_a_gm_sm_pco_dns_serv_sec_info_auth_domain_name,
9893 { "Authentication domain name", "gsm_a.gm.sm.pco.dns_serv_sec_info.auth_domain_name",
9894 FT_STRING, BASE_NONE, NULL, 0x0,
9895 NULL, HFILL }
9897 { &hf_gsm_a_gm_sm_pco_dns_serv_sec_info_spki_pin_set,
9898 { "SPKI pin set", "gsm_a.gm.sm.pco.dns_serv_sec_info.spki_pin_set",
9899 FT_BYTES, BASE_NONE, NULL, 0x0,
9900 NULL, HFILL }
9902 { &hf_gsm_a_gm_sm_pco_dns_serv_sec_info_root_certificate,
9903 { "Root certificate", "gsm_a.gm.sm.pco.dns_serv_sec_info.root_certificate",
9904 FT_BYTES, BASE_NONE, NULL, 0x0,
9905 NULL, HFILL }
9907 { &hf_gsm_a_gm_sm_pco_dns_serv_sec_info_raw_public_key,
9908 { "Raw public key", "gsm_a.gm.sm.pco.dns_serv_sec_info.raw_public_key",
9909 FT_BYTES, BASE_NONE, NULL, 0x0,
9910 NULL, HFILL }
9912 { &hf_gsm_a_gm_sm_pco_dns_serv_sec_info_value_part,
9913 { "Value part", "gsm_a.gm.sm.pco.dns_serv_sec_info.value_part",
9914 FT_BYTES, BASE_NONE, NULL, 0x0,
9915 NULL, HFILL }
9917 { &hf_gsm_a_gm_sm_pco_ecs_addr_type,
9918 { "Type of ECS address", "gsm_a.gm.sm.pco.ecs_addr.type",
9919 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_sm_pco_ecs_addr_type_vals), 0xf0,
9920 NULL, HFILL }
9922 { &hf_gsm_a_gm_sm_pco_ecs_addr_spatial_valid_cond_type,
9923 { "Type of spatial validity condition", "gsm_a.gm.sm.pco.ecs_addr.spatial_valid_cond_type",
9924 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_sm_pco_ecs_addr_spatial_valid_cond_type_vals), 0x0f,
9925 NULL, HFILL }
9927 { &hf_gsm_a_gm_sm_pco_ecs_addr_ipv4,
9928 { "ECS IPv4 address", "gsm_a.gm.sm.pco.ecs_addr.ipv4",
9929 FT_IPv4, BASE_NONE, NULL, 0x0,
9930 NULL, HFILL }
9932 { &hf_gsm_a_gm_sm_pco_ecs_addr_ipv6,
9933 { "ECS IPv6 address", "gsm_a.gm.sm.pco.ecs_addr.ipv6",
9934 FT_IPv6, BASE_NONE, NULL, 0x0,
9935 NULL, HFILL }
9937 { &hf_gsm_a_gm_sm_pco_ecs_addr_fqdn_len,
9938 { "ECS FQDN address length", "gsm_a.gm.sm.pco.ecs_addr.fqdn.len",
9939 FT_UINT8, BASE_DEC, NULL, 0x0,
9940 NULL, HFILL }
9942 { &hf_gsm_a_gm_sm_pco_ecs_addr_fqdn,
9943 { "ECS FQDN address", "gsm_a.gm.sm.pco.ecs_addr.fqdn",
9944 FT_STRING, BASE_NONE, NULL, 0x0,
9945 NULL, HFILL }
9947 { &hf_gsm_a_gm_sm_pco_ecs_addr_spatial_valid_cond_cont_len,
9948 { "Spatial validity condition contents length", "gsm_a.gm.sm.pco.ecs_addr.spatial_valid_cond_cont_len",
9949 FT_UINT8, BASE_DEC, NULL, 0x0,
9950 NULL, HFILL }
9952 { &hf_gsm_a_gm_sm_pco_ecs_addr_spatial_valid_cond_cont,
9953 { "Spatial validity condition contents", "gsm_a.gm.sm.pco.ecs_addr.spatial_valid_cond_cont",
9954 FT_BYTES, BASE_NONE, NULL, 0x0,
9955 NULL, HFILL }
9957 { &hf_gsm_a_gm_sm_pco_ecs_addr_espili,
9958 { "ESPILI", "gsm_a.gm.sm.pco.ecs_addr.espili",
9959 FT_BOOLEAN, 8, TFS(&tfs_included_not_included), 0x02,
9960 NULL, HFILL }
9962 { &hf_gsm_a_gm_sm_pco_ecs_addr_eami,
9963 { "EAMI", "gsm_a.gm.sm.pco.ecs_addr.eami",
9964 FT_BOOLEAN, 8, TFS(&tfs_included_not_included), 0x01,
9965 NULL, HFILL }
9967 { &hf_gsm_a_gm_sm_pco_ecs_addr_tlsgi,
9968 { "TLSGI", "gsm_a.gm.sm.pco.ecs_addr.tlsgi",
9969 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x04,
9970 NULL, HFILL }
9972 { &hf_gsm_a_gm_sm_pco_ecs_addr_tlsai,
9973 { "TLSAI", "gsm_a.gm.sm.pco.ecs_addr.tlsai",
9974 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02,
9975 NULL, HFILL }
9977 { &hf_gsm_a_gm_sm_pco_ecs_addr_tlscsci,
9978 { "TLSCSCI", "gsm_a.gm.sm.pco.ecs_addr.tlscsci",
9979 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
9980 NULL, HFILL }
9982 { &hf_gsm_a_gm_sm_pco_ecs_addr_supported_plmns_info_list_cont_len,
9983 { "ECS supported PLMNs information list length", "gsm_a.gm.sm.pco.ecs_addr.supported_plmns_info_list_cont_len",
9984 FT_UINT8, BASE_DEC, NULL, 0x0,
9985 NULL, HFILL }
9987 { &hf_gsm_a_gm_sm_pco_ecs_addr_supported_plmns_info_list_cont,
9988 { "ECS supported PLMNs information list", "gsm_a.gm.sm.pco.ecs_addr.supported_plmns_info_list_cont",
9989 FT_BYTES, BASE_NONE, NULL, 0x0,
9990 NULL, HFILL }
9992 { &hf_gsm_a_gm_sm_pco_ecsp_id,
9993 { "ECSP identifier", "gsm_a.gm.sm.pco.ecsp_id",
9994 FT_STRING, BASE_NONE, NULL, 0x0,
9995 NULL, HFILL }
9997 { &hf_gsm_a_gm_sm_pco_pvs_ipv4,
9998 { "PVS IPv4 address", "gsm_a.gm.sm.pco.pvs.ipv4",
9999 FT_IPv4, BASE_NONE, NULL, 0x0,
10000 NULL, HFILL }
10002 { &hf_gsm_a_gm_sm_pco_pvs_ipv6,
10003 { "PVS IPv6 address", "gsm_a.gm.sm.pco.pvs.ipv6",
10004 FT_IPv6, BASE_NONE, NULL, 0x0,
10005 NULL, HFILL }
10007 { &hf_gsm_a_gm_sm_pco_pvs_name_len,
10008 { "PVS name length", "gsm_a.gm.sm.pco.pvs.name.len",
10009 FT_UINT8, BASE_DEC, NULL, 0x0,
10010 NULL, HFILL }
10012 { &hf_gsm_a_gm_sm_pco_pvs_name,
10013 { "PVS name", "gsm_a.gm.sm.pco.pvs.name",
10014 FT_STRING, BASE_NONE, NULL, 0x0,
10015 NULL, HFILL }
10017 { &hf_gsm_a_gm_sm_pco_pvs_s_nssai_ind,
10018 { "S-NSSAI indicator", "gsm_a.gm.sm.pco.pvs.s_nssai_ind",
10019 FT_BOOLEAN, 8, TFS(&tfs_present_absent), 0x02,
10020 NULL, HFILL }
10022 { &hf_gsm_a_gm_sm_pco_pvs_dnn_ind,
10023 { "DNN indicator", "gsm_a.gm.sm.pco.pvs.dnn_ind",
10024 FT_BOOLEAN, 8, TFS(&tfs_present_absent), 0x01,
10025 NULL, HFILL }
10027 { &hf_gsm_a_gm_sm_pco_pvs_dnn_len,
10028 { "DNN length", "gsm_a.gm.sm.pco.pvs.dnn_len",
10029 FT_UINT8, BASE_DEC, NULL, 0x0,
10030 NULL, HFILL }
10032 { &hf_gsm_a_gm_sm_pco_pvs_s_nssai_len,
10033 { "S-NSSAI length", "gsm_a.gm.sm.pco.pvs.s_nssai_len",
10034 FT_UINT8, BASE_DEC, NULL, 0x0,
10035 NULL, HFILL }
10037 { &hf_gsm_a_gm_sm_pco_dns_serv_sec_prot_support,
10038 { "DNS server security protocol type", "gsm_a.gm.sm.pco.dns_serv_sec_prot_support",
10039 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_sm_pco_dns_serv_sec_prot_support_vals), 0x0,
10040 NULL, HFILL }
10042 { &hf_gsm_a_gm_sm_pco_eas_rediscovery_support_ind_fqdn,
10043 { "With impacted EAS FQDN address range", "gsm_a.gm.sm.pco.eas_rediscovery_support_ind.fqdn",
10044 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x04,
10045 NULL, HFILL }
10047 { &hf_gsm_a_gm_sm_pco_eas_rediscovery_support_ind_ipv6,
10048 { "With impacted EAS IPv6 address range", "gsm_a.gm.sm.pco.eas_rediscovery_support_ind.ipv6",
10049 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02,
10050 NULL, HFILL }
10052 { &hf_gsm_a_gm_sm_pco_eas_rediscovery_support_ind_ipv4,
10053 { "With impacted EAS IPv4 address range", "gsm_a.gm.sm.pco.eas_rediscovery_support_ind.ipv4",
10054 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
10055 NULL, HFILL }
10057 { &hf_gsm_a_gm_sm_pco_eas_rediscovery_support_ind_with_impacted_eas_ipv4_range_low,
10058 { "With impacted EAS IPv4 address range low", "gsm_a.gm.sm.pco.eas_rediscovery_support_ind_with_impacted_eas_ipv4_range.low",
10059 FT_IPv4, BASE_NONE, NULL, 0x0,
10060 NULL, HFILL }
10062 { &hf_gsm_a_gm_sm_pco_eas_rediscovery_support_ind_with_impacted_eas_ipv4_range_high,
10063 { "With impacted EAS IPv4 address range high", "gsm_a.gm.sm.pco.eas_rediscovery_support_ind_with_impacted_eas_ipv4_range.high",
10064 FT_IPv4, BASE_NONE, NULL, 0x0,
10065 NULL, HFILL }
10067 { &hf_gsm_a_gm_sm_pco_eas_rediscovery_support_ind_with_impacted_eas_ipv6_range_low,
10068 { "With impacted EAS IPv6 address range low", "gsm_a.gm.sm.pco.eas_rediscovery_support_ind_with_impacted_eas_ipv6_range.low",
10069 FT_IPv6, BASE_NONE, NULL, 0x0,
10070 NULL, HFILL }
10072 { &hf_gsm_a_gm_sm_pco_eas_rediscovery_support_ind_with_impacted_eas_ipv6_range_high,
10073 { "With impacted EAS IPv6 address range high", "gsm_a.gm.sm.pco.eas_rediscovery_support_ind_with_impacted_eas_ipv6_range.high",
10074 FT_IPv6, BASE_NONE, NULL, 0x0,
10075 NULL, HFILL }
10077 { &hf_gsm_a_gm_sm_pco_eas_rediscovery_support_ind_with_impacted_eas_fqdn,
10078 { "With impacted EAS FQDN", "gsm_a.gm.sm.pco.eas_rediscovery_support_ind_with_impacted_eas_fqdn",
10079 FT_STRING, BASE_NONE, NULL, 0x0,
10080 NULL, HFILL }
10082 { &hf_gsm_a_gm_sm_pco_sdnaepc_dn_specific_id,
10083 { "SDNAEPC DN-specific identity", "gsm_a.gm.sm.pco.sdnaepc_dn_specific_id",
10084 FT_STRING, BASE_NONE, NULL, 0x0,
10085 NULL, HFILL }
10087 /* Generated from convert_proto_tree_add_text.pl */
10088 { &hf_gsm_a_gm_presence, { "Presence", "gsm_a.gm.gmm.presence", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10089 { &hf_gsm_a_gm_8psk_power_class, { "8PSK Power Class", "gsm_a.gm.8psk_power_class", FT_UINT8, BASE_DEC, VALS(gsm_a_gm_8psk_power_class_vals), 0x0, NULL, HFILL }},
10090 { &hf_gsm_a_gm_rf_power_capability, { "RF Power Capability", "gsm_a.gm.rf_power_capability", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10091 { &hf_gsm_a_gm_a5_bits, { "A5 Bits", "gsm_a.gm.a5_bits", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10092 { &hf_gsm_a_gm_8psk_power_capability, { "8PSK Power Capability", "gsm_a.gm.8psk_power_capability", FT_UINT8, BASE_DEC, VALS(gsm_a_gm_8psk_power_cap_vals), 0x0, NULL, HFILL }},
10093 { &hf_gsm_a_gm_extended_dtm_gprs_multi_slot_class, { "Extended DTM GPRS Multi Slot Class", "gsm_a.gm.extended_dtm_gprs_multi_slot_class", FT_UINT8, BASE_DEC, VALS(gsm_a_gm_extended_dtm_gprs_multi_slot_class_vals), 0x0, NULL, HFILL }},
10094 { &hf_gsm_a_gm_extended_dtm_egprs_multi_slot_class, { "Extended DTM EGPRS Multi Slot Class", "gsm_a.gm.extended_dtm_egprs_multi_slot_class", FT_UINT8, BASE_DEC, VALS(gsm_a_gm_extended_dtm_gprs_multi_slot_class_vals), 0x0, NULL, HFILL }},
10095 { &hf_gsm_a_gm_high_multislot_capability, { "High Multislot Capability", "gsm_a.gm.high_multislot_capability", FT_UINT8, BASE_HEX_DEC, NULL, 0x0, NULL, HFILL }},
10096 { &hf_gsm_a_gm_gmsk_multislot_power_profile, { "GMSK Multislot Power Profile", "gsm_a.gm.gmsk_multislot_power_profile", FT_UINT8, BASE_DEC, VALS(gsm_a_gm_gmsk_multislot_power_profile_vals), 0x0, NULL, HFILL }},
10097 { &hf_gsm_a_gm_8psk_multislot_power_profile, { "8-PSK Multislot Power Profile", "gsm_a.gm.8psk_multislot_power_profile", FT_UINT8, BASE_DEC, VALS(gsm_a_gm_8psk_multislot_power_profile_vals), 0x0, NULL, HFILL }},
10098 { &hf_gsm_a_gm_update_result, { "Update Result", "gsm_a.gm.gmm.update_result", FT_UINT8, BASE_DEC, VALS(gsm_a_gm_update_res_vals), 0x70, NULL, HFILL }},
10099 { &hf_gsm_a_gm_radio_priority_pdp, { "Radio Priority (PDP or SMS)", "gsm_a.gm.radio_priority_pdp", FT_UINT8, BASE_DEC, VALS(gsm_a_gm_radio_prio_vals), 0x07, NULL, HFILL }},
10100 { &hf_gsm_a_gm_radio_priority_tom8, { "Radio Priority (TOM8)", "gsm_a.gm.radio_priority_tom8", FT_UINT8, BASE_DEC, VALS(gsm_a_gm_radio_prio_vals), 0x70, NULL, HFILL }},
10101 { &hf_gsm_a_gm_configuration_protocol, { "Configuration Protocol", "gsm_a.gm.configuration_protocol", FT_UINT8, BASE_DEC, NULL, 0x7, NULL, HFILL }},
10102 { &hf_gsm_a_gm_sm_pco_length, { "Length", "gsm_a.gm.sm.pco.length", FT_UINT8, BASE_HEX_DEC, NULL, 0x0, NULL, HFILL }},
10103 { &hf_gsm_a_gm_sm_pco_length2, { "Length", "gsm_a.gm.sm.pco.length", FT_UINT16, BASE_HEX_DEC, NULL, 0x0, NULL, HFILL }},
10104 { &hf_gsm_a_gm_sm_pco_pcscf_ipv6, { "IPv6", "gsm_a.gm.sm.pco.pcscf.ipv6", FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10105 { &hf_gsm_a_gm_sm_pco_dns_ipv6, { "IPv6", "gsm_a.gm.sm.pco.dns.ipv6", FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10106 { &hf_gsm_a_gm_sm_pco_dsmipv6_home_agent_ipv6, { "IPv6", "gsm_a.gm.sm.pco.dsmipv6_home_agent.ipv6", FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10107 { &hf_gsm_a_gm_sm_pco_dsmipv6_home_network_ipv6, { "IPv6", "gsm_a.gm.sm.pco.dsmipv6_home_network.ipv6", FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10108 { &hf_gsm_a_gm_sm_pco_dsmipv6_home_network_prefix_length, { "Prefix length", "gsm_a.gm.sm.pco.dsmipv6_home_network.ipv6_prefix_length", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10109 { &hf_gsm_a_gm_sm_pco_reject_code, { "Reject Code", "gsm_a.gm.sm.pco.reject_code", FT_UINT8, BASE_HEX_DEC, NULL, 0x0, NULL, HFILL }},
10110 { &hf_gsm_a_gm_sm_pco_dsmipv6_home_agent_ipv4, { "IPv4", "gsm_a.gm.sm.pco.dsmipv6_home_agent.ipv4", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10111 { &hf_gsm_a_gm_sm_pco_pcscf_ipv4, { "IPv4", "gsm_a.gm.sm.pco.pcscf.ipv4", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10112 { &hf_gsm_a_gm_sm_pco_dns_ipv4, { "IPv4", "gsm_a.gm.sm.pco.dns.ipv4", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10113 { &hf_gsm_a_gm_sm_pco_ipv4_link_mtu_size, { "IPv4 link MTU size", "gsm_a.gm.sm.pco.ipv4_link_mtu_size", FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_octet_octets), 0x0, NULL, HFILL }},
10114 { &hf_gsm_a_gm_sm_pco_nbifom_mode, { "NBIFOM mode", "gsm_a.gm.sm.pco.nbifom_mode", FT_UINT8, BASE_HEX, VALS(gsm_a_gm_nbifom_mode_vals), 0x0, NULL, HFILL }},
10115 { &hf_gsm_a_gm_sm_pco_non_ip_link_mtu_size, { "Non-IP link MTU size", "gsm_a.gm.sm.pco.non_ip_link_mtu_size", FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_octet_octets), 0x0, NULL, HFILL }},
10116 { &hf_gsm_a_gm_sm_pco_sel_bearer_ctrl_mode, { "Selected Bearer Control Mode", "gsm_a.gm.sm.pco.sel_bearer_ctrl_mode", FT_UINT8, BASE_DEC, VALS(gsm_a_gm_sel_bearer_ctrl_mode_vals), 0x0, NULL, HFILL }},
10117 { &hf_gsm_a_sm_pdp_type_number, { "PDP type number", "gsm_a.gm.sm.pdp_type_number", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10118 { &hf_gsm_a_sm_pdp_address, { "PDP address", "gsm_a.gm.sm.pdp_address", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10119 { &hf_gsm_a_sm_qos_maximum_sdu_size, { "Maximum SDU size", "gsm_a.gm.sm.qos.maximum_sdu_size", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10120 { &hf_gsm_a_gm_ti_value, { "TI value", "gsm_a.gm.ti_value", FT_UINT8, BASE_HEX_DEC, NULL, 0x0, NULL, HFILL }},
10121 { &hf_gsm_a_sm_tft_packet_filter, { "Packet filter", "gsm_a.gm.sm.tft.packet_filter", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10122 { &hf_gsm_a_sm_tft_packet_evaluation_precedence, { "Packet evaluation precedence", "gsm_a.gm.sm.tft.packet_evaluation_precedence", FT_UINT8, BASE_HEX_DEC, NULL, 0x0, NULL, HFILL }},
10123 { &hf_gsm_a_sm_tft_packet_filter_length, { "Packet filter length", "gsm_a.gm.sm.tft.packet_filter_length", FT_UINT8, BASE_HEX_DEC, NULL, 0x0, NULL, HFILL }},
10124 { &hf_gsm_a_sm_tft_authorization_token_value, { "Authorization token value", "gsm_a.gm.sm.tft.authorization_token_value", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10125 { &hf_gsm_a_sm_tft_media_component_number_value, { "Media Component number value", "gsm_a.gm.sm.tft.media_component_number_value", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }},
10126 { &hf_gsm_a_sm_tft_ip_flow_number, { "IP flow number", "gsm_a.gm.sm.tft.ip_flow_number", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }},
10127 { &hf_gsm_a_sm_tft_packet_filter_identifier, { "Packet filter identifier", "gsm_a.gm.sm.tft.packet_filter_identifier", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10128 { &hf_gsm_a_sm_tft_parameter_content, { "Parameter content", "gsm_a.gm.sm.tft.parameter_content", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10129 { &hf_gsm_a_sm_tft_packet_filter_component_type_id, { "Packet filter component type identifier", "gsm_a.gm.sm.tft.packet_filter_component_type_id", FT_UINT8, BASE_DEC, VALS(packet_filter_component_type_vals), 0x0, NULL, HFILL }},
10132 static ei_register_info ei[] = {
10133 { &ei_gsm_a_gm_extraneous_data, { "gsm_a.gm.extraneous_data", PI_PROTOCOL, PI_NOTE, "Extraneous Data, dissector bug or later version spec (report to wireshark.org)", EXPFILL }},
10134 { &ei_gsm_a_gm_not_enough_data, { "gsm_a.gm.not_enough_data", PI_PROTOCOL, PI_WARN, "Not enough data", EXPFILL }},
10135 { &ei_gsm_a_gm_undecoded, { "gsm_a.gm.undecoded", PI_UNDECODED, PI_WARN, "Not decoded", EXPFILL }},
10136 { &ei_gsm_a_gm_missing_mandatory_element, { "gsm_a.gm.missing_mandatory_element", PI_PROTOCOL, PI_ERROR, "Missing Mandatory element, rest of dissection is suspect", EXPFILL }},
10139 expert_module_t* expert_gsm_a_gm;
10141 /* Setup protocol subtree array */
10142 #define NUM_INDIVIDUAL_ELEMS 7
10143 int *ett[NUM_INDIVIDUAL_ELEMS +
10144 NUM_GSM_DTAP_MSG_GMM + NUM_GSM_DTAP_MSG_SM +
10145 NUM_GSM_GM_ELEM];
10147 ett[0] = &ett_gmm_radio_cap;
10148 ett[1] = &ett_gmm_rai;
10149 ett[2] = &ett_sm_tft;
10150 ett[3] = &ett_gmm_gprs_timer;
10151 ett[4] = &ett_gmm_network_cap;
10152 ett[5] = &ett_gsm_a_gm_msrac_multislot_capability;
10153 ett[6] = &ett_sm_pco;
10155 last_offset = NUM_INDIVIDUAL_ELEMS;
10157 for (i=0; i<NUM_GSM_DTAP_MSG_GMM; i++, last_offset++)
10159 ett[last_offset] = &ett_gsm_dtap_msg_gmm[i];
10162 for (i=0; i<NUM_GSM_DTAP_MSG_SM; i++, last_offset++)
10164 ett[last_offset] = &ett_gsm_dtap_msg_sm[i];
10167 for (i=0; i<NUM_GSM_GM_ELEM; i++, last_offset++)
10169 ett[last_offset] = &ett_gsm_gm_elem[i];
10172 proto_a_gm =
10173 proto_register_protocol("GSM A-I/F GPRS Mobility and Session Management", "GSM Management", "gsm_a.gm");
10175 proto_register_field_array(proto_a_gm, hf, array_length(hf));
10177 proto_register_subtree_array(ett, array_length(ett));
10178 expert_gsm_a_gm = expert_register_protocol(proto_a_gm);
10179 expert_register_field_array(expert_gsm_a_gm, ei, array_length(ei));
10181 /* subdissector code */
10182 gprs_sm_pco_subdissector_table = register_dissector_table("sm_pco.protocol",
10183 "GPRS SM PCO PPP protocol", proto_a_gm, FT_UINT16, BASE_HEX);
10186 void
10187 proto_reg_handoff_gsm_a_gm(void)
10189 rrc_irat_ho_info_handle = find_dissector_add_dependency("rrc.irat.irat_ho_info", proto_a_gm);
10190 lte_rrc_ue_eutra_cap_handle = find_dissector_add_dependency("lte-rrc.ue_eutra_cap", proto_a_gm);
10191 nbifom_handle = find_dissector_add_dependency("nbifom", proto_a_gm);
10192 eap_handle = find_dissector_add_dependency("eap", proto_a_gm);
10196 * Editor modelines - https://www.wireshark.org/tools/modelines.html
10198 * Local variables:
10199 * c-basic-offset: 8
10200 * tab-width: 8
10201 * indent-tabs-mode: t
10202 * End:
10204 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
10205 * :indentSize=8:tabSize=8:noTabs=false: