2 * Routines for GSM A Interface GPRS Mobilty 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 Managment Protocol and
8 * the GPRS Session Managment 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
20 * Mobile radio interface Layer 3 specification;
21 * Core network protocols;
23 * (3GPP TS 24.008 version 5.9.0 Release 5)
26 * Mobile radio interface Layer 3 specification;
27 * Core network protocols;
29 * (3GPP TS 24.008 version 6.7.0 Release 6)
30 * (3GPP TS 24.008 version 6.8.0 Release 6)
33 * Mobile radio interface Layer 3 specification;
34 * Core network protocols;
36 * (3GPP TS 24.008 version 9.6.0 Release 9)
40 * Wireshark - Network traffic analyzer
41 * By Gerald Combs <gerald@wireshark.org>
42 * Copyright 1998 Gerald Combs
44 * This program is free software; you can redistribute it and/or
45 * modify it under the terms of the GNU General Public License
46 * as published by the Free Software Foundation; either version 2
47 * of the License, or (at your option) any later version.
49 * This program is distributed in the hope that it will be useful,
50 * but WITHOUT ANY WARRANTY; without even the implied warranty of
51 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
52 * GNU General Public License for more details.
54 * You should have received a copy of the GNU General Public License
55 * along with this program; if not, write to the Free Software
56 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
65 #include <epan/packet.h>
66 #include <epan/expert.h>
67 #include <epan/prefs.h>
69 #include <epan/asn1.h>
71 #include "packet-bssap.h"
72 #include "packet-sccp.h"
73 #include "packet-ber.h"
74 #include "packet-q931.h"
75 #include "packet-gsm_a_common.h"
76 #include "packet-e212.h"
77 #include "packet-ppp.h"
79 /* PROTOTYPES/FORWARDS */
81 const value_string gsm_a_dtap_msg_gmm_strings[] = {
82 { 0x01, "Attach Request" },
83 { 0x02, "Attach Accept" },
84 { 0x03, "Attach Complete" },
85 { 0x04, "Attach Reject" },
86 { 0x05, "Detach Request" },
87 { 0x06, "Detach Accept" },
88 { 0x08, "Routing Area Update Request" },
89 { 0x09, "Routing Area Update Accept" },
90 { 0x0a, "Routing Area Update Complete" },
91 { 0x0b, "Routing Area Update Reject" },
92 { 0x0c, "Service Request" },
93 { 0x0d, "Service Accept" },
94 { 0x0e, "Service Reject" },
95 { 0x10, "P-TMSI Reallocation Command" },
96 { 0x11, "P-TMSI Reallocation Complete" },
97 { 0x12, "Authentication and Ciphering Req" },
98 { 0x13, "Authentication and Ciphering Resp" },
99 { 0x14, "Authentication and Ciphering Rej" },
100 { 0x1c, "Authentication and Ciphering Failure" },
101 { 0x15, "Identity Request" },
102 { 0x16, "Identity Response" },
103 { 0x20, "GMM Status" },
104 { 0x21, "GMM Information" },
108 const value_string gsm_a_dtap_msg_sm_strings[] = {
109 { 0x41, "Activate PDP Context Request" },
110 { 0x42, "Activate PDP Context Accept" },
111 { 0x43, "Activate PDP Context Reject" },
112 { 0x44, "Request PDP Context Activation" },
113 { 0x45, "Request PDP Context Activation rej." },
114 { 0x46, "Deactivate PDP Context Request" },
115 { 0x47, "Deactivate PDP Context Accept" },
116 { 0x48, "Modify PDP Context Request(Network to MS direction)" },
117 { 0x49, "Modify PDP Context Accept (MS to network direction)" },
118 { 0x4a, "Modify PDP Context Request(MS to network direction)" },
119 { 0x4b, "Modify PDP Context Accept (Network to MS direction)" },
120 { 0x4c, "Modify PDP Context Reject" },
121 { 0x4d, "Activate Secondary PDP Context Request" },
122 { 0x4e, "Activate Secondary PDP Context Accept" },
123 { 0x4f, "Activate Secondary PDP Context Reject" },
124 { 0x50, "Reserved: was allocated in earlier phases of the protocol" },
125 { 0x51, "Reserved: was allocated in earlier phases of the protocol" },
126 { 0x52, "Reserved: was allocated in earlier phases of the protocol" },
127 { 0x53, "Reserved: was allocated in earlier phases of the protocol" },
128 { 0x54, "Reserved: was allocated in earlier phases of the protocol" },
129 { 0x55, "SM Status" },
130 { 0x56, "Activate MBMS Context Request" },
131 { 0x57, "Activate MBMS Context Accept" },
132 { 0x58, "Activate MBMS Context Reject" },
133 { 0x59, "Request MBMS Context Activation" },
134 { 0x5a, "Request MBMS Context Activation Reject" },
135 { 0x5b, "Request Secondary PDP Context Activation" },
136 { 0x5c, "Request Secondary PDP Context Activation Reject" },
137 { 0x5d, "Notification" },
141 const value_string gsm_gm_elem_strings[] = {
142 /* GPRS Mobility Management Information Elements 10.5.5 */
143 { 0x00, "Attach Result" },
144 { 0x00, "Attach Type" },
145 { 0x00, "Cipher Algorithm" },
146 { 0x00, "TMSI Status" },
147 { 0x00, "Detach Type" },
148 { 0x00, "DRX Parameter" },
149 { 0x00, "Force to Standby" },
150 { 0x00, "Force to Standby" },
151 { 0x00, "P-TMSI Signature" },
152 { 0x00, "P-TMSI Signature 2" },
153 { 0x00, "Identity Type 2" },
154 { 0x00, "IMEISV Request" },
155 { 0x00, "Receive N-PDU Numbers List" },
156 { 0x00, "MS Network Capability" },
157 { 0x00, "MS Radio Access Capability" },
158 { 0x00, "GMM Cause" },
159 { 0x00, "Routing Area Identification" },
160 { 0x00, "Routing Area Identification 2" },
161 { 0x00, "Update Result" },
162 { 0x00, "Update Type" },
163 { 0x00, "A&C Reference Number" },
164 { 0x00, "A&C Reference Number" },
165 { 0x00, "Service Type" },
166 { 0x00, "Cell Notification" },
167 { 0x00, "PS LCS Capability" },
168 { 0x00, "Network Feature Support" },
169 { 0x00, "Inter RAT information container" },
170 { 0x00, "Requested MS information" },
171 { 0x00, "UE network capability" },
172 { 0x00, "E-UTRAN inter RAT information container" },
173 { 0x00, "Voice domain preference and UE's usage setting" },
174 /* Session Management Information Elements 10.5.6 */
175 { 0x00, "Access Point Name" },
176 { 0x00, "Network Service Access Point Identifier" },
177 { 0x00, "Protocol Configuration Options" },
178 { 0x00, "Packet Data Protocol Address" },
179 { 0x00, "Quality Of Service" },
180 { 0x00, "SM Cause" },
181 { 0x00, "SM Cause 2" },
182 { 0x00, "Linked TI" },
183 { 0x00, "LLC Service Access Point Identifier" },
184 { 0x00, "Tear Down Indicator" },
185 { 0x00, "Packet Flow Identifier" },
186 { 0x00, "Traffic Flow Template" },
187 { 0x00, "Temporary Mobile Group Identity (TMGI)" },
188 { 0x00, "MBMS bearer capabilities" },
189 { 0x00, "MBMS protocol configuration options" },
190 { 0x00, "Enhanced network service access point identifier" },
191 { 0x00, "Request type" },
192 { 0x00, "Notification indicator" },
193 /* GPRS Common Information Elements 10.5.7 */
194 { 0x00, "PDP Context Status" },
195 { 0x00, "Radio Priority" },
196 { 0x00, "GPRS Timer" },
197 { 0x00, "GPRS Timer 2" },
198 { 0x00, "Radio Priority 2"},
199 { 0x00, "MBMS context status"},
200 { 0x00, "Uplink data status"},
201 { 0x00, "Spare Nibble"},
205 #define DTAP_GMM_IEI_MASK 0xff
206 #define DTAP_SM_IEI_MASK 0xff
208 /* Initialize the protocol and registered fields */
209 static int proto_a_gm = -1;
211 static int hf_gsm_a_dtap_msg_gmm_type = -1;
212 static int hf_gsm_a_dtap_msg_sm_type = -1;
213 int hf_gsm_a_gm_elem_id = -1;
214 static int hf_gsm_a_qos_delay_cls = -1;
215 static int hf_gsm_a_qos_reliability_cls = -1;
216 static int hf_gsm_a_qos_traffic_cls = -1;
217 static int hf_gsm_a_qos_del_order = -1;
218 static int hf_gsm_a_qos_del_of_err_sdu = -1;
219 static int hf_gsm_a_qos_ber = -1;
220 static int hf_gsm_a_qos_sdu_err_rat = -1;
221 static int hf_gsm_a_qos_traff_hdl_pri = -1;
223 static int hf_gsm_a_gmm_split_on_ccch = -1;
224 static int hf_gsm_a_gmm_non_drx_timer = -1;
225 static int hf_gsm_a_gmm_cn_spec_drs_cycle_len_coef = -1;
227 static int hf_gsm_a_ptmsi_sig =-1;
228 static int hf_gsm_a_ptmsi_sig2 =-1;
230 static int hf_gsm_a_tft_op_code = -1;
231 static int hf_gsm_a_tft_e_bit = -1;
232 static int hf_gsm_a_tft_pkt_flt = -1;
233 static int hf_gsm_a_tft_pkt_flt_id = -1;
234 static int hf_gsm_a_tft_pkt_flt_dir = -1;
235 static int hf_gsm_a_sm_ip4_address = -1;
236 static int hf_gsm_a_sm_ip4_mask = -1;
237 static int hf_gsm_a_sm_ip6_address = -1;
238 static int hf_gsm_a_sm_ip6_mask = -1;
239 static int hf_gsm_a_tft_protocol_header = -1;
240 static int hf_gsm_a_tft_port = -1;
241 static int hf_gsm_a_tft_port_low = -1;
242 static int hf_gsm_a_tft_port_high = -1;
243 static int hf_gsm_a_tft_security = -1;
244 static int hf_gsm_a_tft_traffic_mask = -1;
245 static int hf_gsm_a_tft_flow_label_type = -1;
246 static int hf_gsm_a_tft_param_id = -1;
247 static int hf_gsm_a_gm_acc_tech_type = -1;
248 static int hf_gsm_a_gm_acc_cap_struct_len = -1;
249 static int hf_gsm_a_gm_sms_value = -1;
250 static int hf_gsm_a_gm_sm_value = -1;
251 static int hf_gsm_a_gm_sm_ext = -1;
252 static int hf_gsm_a_gm_link_dir = -1;
253 static int hf_gsm_a_gm_cause = -1;
255 static int hf_gsm_a_gm_fop = -1;
256 static int hf_gsm_a_gm_res_of_attach = -1;
257 static int hf_gsm_a_gm_type_of_ciph_alg = -1;
258 static int hf_gsm_a_gm_imeisv_req = -1;
259 static int hf_gsm_a_gm_ac_ref_nr = -1;
260 static int hf_gsm_a_gm_force_to_standby = -1;
261 static int hf_gsm_a_gm_serv_type = -1;
262 static int hf_gsm_a_gm_ciph_key_seq_num = -1;
263 static int hf_gsm_a_gm_for = -1;
264 static int hf_gsm_a_gm_type_of_attach = -1;
265 static int hf_gsm_a_gm_tmsi_flag = -1;
266 static int hf_gsm_a_gm_update_type = -1;
267 static int hf_gsm_a_gm_gprs_timer_unit = -1;
268 static int hf_gsm_a_gm_gprs_timer_value = -1;
269 static int hf_gsm_a_gm_nsapi_5_ul_stat = -1;
270 static int hf_gsm_a_gm_nsapi_6_ul_stat = -1;
271 static int hf_gsm_a_gm_nsapi_7_ul_stat = -1;
272 static int hf_gsm_a_gm_nsapi_8_ul_stat = -1;
273 static int hf_gsm_a_gm_nsapi_9_ul_stat = -1;
274 static int hf_gsm_a_gm_nsapi_10_ul_stat = -1;
275 static int hf_gsm_a_gm_nsapi_11_ul_stat = -1;
276 static int hf_gsm_a_gm_nsapi_12_ul_stat = -1;
277 static int hf_gsm_a_gm_nsapi_13_ul_stat = -1;
278 static int hf_gsm_a_gm_nsapi_14_ul_stat = -1;
279 static int hf_gsm_a_gm_nsapi_15_ul_stat = -1;
280 static int hf_gsm_a_gm_pco_pid = -1;
281 static int hf_gsm_a_gm_type_of_identity = -1;
282 static int hf_gsm_a_gm_rac = -1;
283 static int hf_gsm_a_gm_apc = -1;
284 static int hf_gsm_a_gm_otd_a = -1;
285 static int hf_gsm_a_gm_otd_b = -1;
286 static int hf_gsm_a_gm_gps_a = -1;
287 static int hf_gsm_a_gm_gps_b = -1;
288 static int hf_gsm_a_gm_gps_c = -1;
289 static int hf_gsm_a_gm_req_ms_info_irat = -1;
290 static int hf_gsm_a_gm_req_ms_info_irat2 = -1;
291 static int hf_gsm_a_gm_ue_usage_setting = -1;
292 static int hf_gsm_a_gm_voice_domain_pref_for_eutran = -1;
293 static int hf_gsm_a_sm_pdp_type_org = -1;
294 static int hf_gsm_a_qos_mean_thr = -1;
295 static int hf_gsm_a_qos_peak_thr = -1;
296 static int hf_gsm_a_qos_prec_class = -1;
297 static int hf_gsm_a_qos_traf_handl_prio = -1;
298 static int hf_gsm_a_qos_trans_delay = -1;
299 static int hf_gsm_a_qos_signalling_ind = -1;
300 static int hf_gsm_a_qos_source_stat_desc = -1;
301 static int hf_gsm_a_qos_max_bitrate_upl = -1;
302 static int hf_gsm_a_qos_max_bitrate_downl = -1;
303 static int hf_gsm_a_qos_guar_bitrate_upl = -1;
304 static int hf_gsm_a_qos_guar_bitrate_downl = -1;
305 static int hf_gsm_a_qos_max_bitrate_upl_ext = -1;
306 static int hf_gsm_a_qos_max_bitrate_downl_ext = -1;
307 static int hf_gsm_a_qos_guar_bitrate_upl_ext = -1;
308 static int hf_gsm_a_qos_guar_bitrate_downl_ext = -1;
309 static int hf_gsm_a_sm_cause = -1;
310 static int hf_gsm_a_sm_cause_2 = -1;
311 static int hf_gsm_a_sm_llc_sapi = -1;
312 static int hf_gsm_a_sm_tdi = -1;
313 static int hf_gsm_a_sm_packet_flow_id = -1;
314 static int hf_gsm_a_sm_tmgi = -1;
315 static int hf_gsm_a_sm_enh_nsapi = -1;
316 static int hf_gsm_a_sm_req_type = -1;
317 static int hf_gsm_a_sm_notif_ind = -1;
318 static int hf_gsm_a_gm_rac_ctrled_early_cm_sending = -1;
319 static int hf_gsm_a_gm_rac_pseudo_sync = -1;
320 static int hf_gsm_a_gm_rac_vgcs = -1;
321 static int hf_gsm_a_gm_rac_vbs = -1;
322 static int hf_gsm_a_gm_rac_multislot_capability = -1;
323 static int hf_gsm_a_gm_rac_hscsd_multi_slot_class = -1;
324 static int hf_gsm_a_gm_rac_gprs_multi_slot_class = -1;
325 static int hf_gsm_a_gm_rac_gprs_ext_dyn_alloc_cap = -1;
326 static int hf_gsm_a_gm_rac_ecsd_multi_slot_class = -1;
327 static int hf_gsm_a_gm_rac_egprs_multi_slot_class = -1;
328 static int hf_gsm_a_gm_rac_egprs_ext_dyn_alloc_cap = -1;
329 static int hf_gsm_a_gm_rac_dtm_gprs_multi_slot_class = -1;
330 static int hf_gsm_a_gm_rac_single_slt_dtm = -1;
331 static int hf_gsm_a_gm_rac_dtm_egprs_multi_slot_cls_pres = -1;
332 static int hf_gsm_a_gm_rac_dtm_egprs_multi_slot_class = -1;
333 static int hf_gsm_a_gm_rac_8psk_pow_cap_pres = -1;
334 static int hf_gsm_a_gm_rac_comp_int_meas_cap = -1;
335 static int hf_gsm_a_gm_rel_lev_ind = -1;
336 static int hf_gsm_a_gm_rac_geran_feat_pkg = -1;
337 static int hf_gsm_a_gm_rac_umts_fdd_cap = -1;
338 static int hf_gsm_a_gm_rac_umts_384_tdd_ra_cap = -1;
339 static int hf_gsm_a_gm_rac_cdma2000_cap = -1;
340 static int hf_gsm_a_gm_rac_umts_128_tdd_ra_cap = -1;
341 static int hf_gsm_a_gm_rac_mod_based_multi_slot_class_support = -1;
342 static int hf_gsm_a_gm_rac_geran_iu_mode_cap = -1;
343 static int hf_gsm_a_gm_rac_flo_iu_cap = -1;
344 static int hf_gsm_a_gm_rac_mult_tbf_cap = -1;
345 static int hf_gsm_a_gm_rac_down_adv_rec_perf = -1;
346 static int hf_gsm_a_gm_rac_ext_rlc_mac_ctrl_msg_seg_cap = -1;
347 static int hf_gsm_a_gm_rac_dtm_enh_cap = -1;
348 static int hf_gsm_a_gm_rac_dtm_gprs_high_multi_slot_class = -1;
349 static int hf_gsm_a_gm_rac_dtm_egprs_high_multi_slot_class = -1;
350 static int hf_gsm_a_gm_rac_ps_ho_cap = -1;
351 static int hf_gsm_a_gm_rac_dtm_ho_cap = -1;
352 static int hf_gsm_a_gm_rac_multi_slot_cap_red_down_dual_carrier = -1;
353 static int hf_gsm_a_gm_rac_down_dual_carrier_dtm_cap = -1;
354 static int hf_gsm_a_gm_rac_flex_ts_assign = -1;
355 static int hf_gsm_a_gm_rac_gan_ps_ho_cap = -1;
356 static int hf_gsm_a_gm_rac_rlc_non_pers_mode = -1;
357 static int hf_gsm_a_gm_rac_reduced_lat_cap = -1;
358 static int hf_gsm_a_gm_rac_ul_egprs2 = -1;
359 static int hf_gsm_a_gm_rac_dl_egprs2 = -1;
360 static int hf_gsm_a_gm_rac_eutra_fdd_support = -1;
361 static int hf_gsm_a_gm_rac_eutra_tdd_support = -1;
362 static int hf_gsm_a_gm_rac_geran_to_eutra_support_in_geran_ptm = -1;
363 static int hf_gsm_a_gm_rac_prio_based_resel_support = -1;
364 static int hf_gsm_a_gm_rac_alt_efta_multi_slot_class = -1;
365 static int hf_gsm_a_gm_rac_efta_multi_slot_cap_red_down_dual_carrier = -1;
366 static int hf_gsm_a_gm_rac_ind_up_layer_pdu_start_cap_for_rlc_um = -1;
367 static int hf_gsm_a_gm_rac_emst_cap = -1;
368 static int hf_gsm_a_gm_rac_mtti_cap = -1;
369 static int hf_gsm_a_gm_rac_utra_csg_cell_report = -1;
370 static int hf_gsm_a_gm_rac_eutra_csg_cell_report = -1;
371 static int hf_gsm_a_sm_ti_flag = -1;
372 static int hf_gsm_a_sm_ext = -1;
374 static int hf_gsm_a_gmm_net_cap_gea1 = -1;
375 static int hf_gsm_a_gmm_net_cap_smdch = -1;
376 static int hf_gsm_a_gmm_net_cap_smgprs = -1;
377 static int hf_gsm_a_gmm_net_cap_ucs2 = -1;
378 static int hf_gsm_a_gmm_net_cap_ss_scr_ind = -1;
379 static int hf_gsm_a_gmm_net_cap_solsa = -1;
380 static int hf_gsm_a_gmm_net_cap_rev = -1;
381 static int hf_gsm_a_gmm_net_cap_pfc = -1;
382 static int hf_gsm_a_gmm_net_cap_ext_gea_bits = -1;
383 static int hf_gsm_a_gmm_net_cap_gea2 = -1;
384 static int hf_gsm_a_gmm_net_cap_gea3 = -1;
385 static int hf_gsm_a_gmm_net_cap_gea4 = -1;
386 static int hf_gsm_a_gmm_net_cap_gea5 = -1;
387 static int hf_gsm_a_gmm_net_cap_gea6 = -1;
388 static int hf_gsm_a_gmm_net_cap_gea7 = -1;
389 static int hf_gsm_a_gmm_net_cap_lcs = -1;
390 static int hf_gsm_a_gmm_net_cap_ps_irat_iu = -1;
391 static int hf_gsm_a_gmm_net_cap_ps_irat_s1 = -1;
392 static int hf_gsm_a_gmm_net_cap_comb_proc = -1;
393 static int hf_gsm_a_gmm_net_cap_isr = -1;
394 static int hf_gsm_a_gmm_net_cap_srvcc_to_geran = -1;
395 static int hf_gsm_a_gmm_net_cap_epc = -1;
396 static int hf_gsm_a_gmm_net_cap_nf = -1;
398 /* Initialize the subtree pointers */
399 static gint ett_tc_component = -1;
400 static gint ett_tc_invoke_id = -1;
401 static gint ett_tc_linked_id = -1;
402 static gint ett_tc_opr_code = -1;
403 static gint ett_tc_err_code = -1;
404 static gint ett_tc_prob_code = -1;
405 static gint ett_tc_sequence = -1;
407 static gint ett_gmm_drx = -1;
408 static gint ett_gmm_detach_type = -1;
409 static gint ett_gmm_attach_type = -1;
410 static gint ett_gmm_context_stat = -1;
411 static gint ett_gmm_update_type = -1;
412 static gint ett_gmm_radio_cap = -1;
413 static gint ett_gmm_network_cap = -1;
414 static gint ett_gsm_a_gm_msrac_multislot_capability = -1;
415 static gint ett_gmm_rai = -1;
416 static gint ett_gmm_gprs_timer = -1;
418 static gint ett_sm_tft = -1;
420 static dissector_handle_t data_handle;
421 static dissector_handle_t rrc_irat_ho_info_handle;
422 static dissector_handle_t lte_rrc_ue_eutra_cap_handle;
424 static dissector_table_t gprs_sm_pco_subdissector_table; /* GPRS SM PCO PPP Protocols */
426 #define NUM_GSM_GM_ELEM (sizeof(gsm_gm_elem_strings)/sizeof(value_string))
427 gint ett_gsm_gm_elem[NUM_GSM_GM_ELEM];
429 static const gchar *pdp_str[2]={ "PDP-INACTIVE", "PDP-ACTIVE" };
432 * [9] 10.5.5.1 Attach result
434 static const value_string gsm_a_gm_res_of_attach_vals[] = {
435 { 0x01, "GPRS only attached" },
436 { 0x03, "Combined GPRS/IMSI attached" },
441 de_gmm_attach_res(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
443 proto_tree_add_item(tree, hf_gsm_a_gm_fop, tvb, offset, 1, ENC_BIG_ENDIAN);
444 proto_tree_add_item(tree, hf_gsm_a_gm_res_of_attach, tvb, offset, 1, ENC_BIG_ENDIAN);
446 /* no length check possible */
451 * [9] 10.5.5.2 Attach type
453 static const value_string gsm_a_gm_type_of_attach_vals[] = {
454 { 0x01, "GPRS attach" },
455 { 0x02, "Not used (In earlier versions: GPRS attach while IMSI attached)" },
456 { 0x03, "Combined GPRS/IMSI attached" },
461 de_gmm_attach_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
463 proto_item *tf = NULL;
464 proto_tree *tf_tree = NULL;
466 proto_tree_add_bits_item(tree, hf_gsm_a_gm_ciph_key_seq_num, tvb, offset << 3, 4, ENC_BIG_ENDIAN);
468 tf = proto_tree_add_text(tree,
472 tf_tree = proto_item_add_subtree(tf, ett_gmm_attach_type );
474 proto_tree_add_item(tf_tree, hf_gsm_a_gm_for, tvb, offset, 1, ENC_BIG_ENDIAN);
475 proto_tree_add_item(tf_tree, hf_gsm_a_gm_type_of_attach, tvb, offset, 1, ENC_BIG_ENDIAN);
477 /* no length check possible */
482 * [9] 10.5.5.3 Ciphering algorithm
484 const value_string gsm_a_gm_type_of_ciph_alg_vals[] = {
485 { 0x00, "ciphering not used" },
486 { 0x01, "GPRS Encryption Algorithm GEA/1" },
487 { 0x02, "GPRS Encryption Algorithm GEA/2" },
488 { 0x03, "GPRS Encryption Algorithm GEA/3" },
489 { 0x04, "GPRS Encryption Algorithm GEA/4" },
490 { 0x05, "GPRS Encryption Algorithm GEA/5" },
491 { 0x06, "GPRS Encryption Algorithm GEA/6" },
492 { 0x07, "GPRS Encryption Algorithm GEA/7" },
497 de_gmm_ciph_alg(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
499 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (offset << 3) + 4, 1, ENC_BIG_ENDIAN);
500 proto_tree_add_item(tree, hf_gsm_a_gm_type_of_ciph_alg, tvb, offset, 1, ENC_BIG_ENDIAN);
502 /* no length check possible */
507 * [9] 10.5.5.4 TMSI status
509 const true_false_string gsm_a_gm_tmsi_flag_value = {
510 "valid TMSI available",
511 "no valid TMSI available"
515 de_gmm_tmsi_stat(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
517 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (offset << 3) + 4, 3, ENC_BIG_ENDIAN);
518 proto_tree_add_item(tree, hf_gsm_a_gm_tmsi_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
520 /* no length check possible */
528 de_gmm_detach_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
533 const gchar *str_power;
534 proto_item *tf = NULL;
535 proto_tree *tf_tree = NULL;
537 curr_offset = offset;
539 oct = tvb_get_guint8(tvb, curr_offset);
543 case 1: str="GPRS detach/re-attach required"; break;
544 case 2: str="IMSI detach/re-attach not required"; break;
545 case 3: str="Combined GPRS/IMSI detach/IMSI detach (after VLR failure)"; break;
546 default: str="Combined GPRS/IMSI detach/re-attach not required";
551 case 8: str_power="power switched off"; break;
552 default: str_power="normal detach"; break;
555 tf = proto_tree_add_text(tree,
559 tf_tree = proto_item_add_subtree(tf, ett_gmm_detach_type );
561 proto_tree_add_text(tf_tree,
567 proto_tree_add_text(tf_tree,
575 /* no length check possible */
577 return(curr_offset - offset);
583 * SPLIT on CCCH, octet 3 (bit 4)
584 * 0 Split pg cycle on CCCH is not supported by the mobile station
585 * 1 Split pg cycle on CCCH is supported by the mobile station
587 static const true_false_string gsm_a_gmm_split_on_ccch_value = {
588 "Split pg cycle on CCCH is supported by the mobile station",
589 "Split pg cycle on CCCH is not supported by the mobile station"
592 /* non-DRX timer, octet 3
596 static const value_string gsm_a_gmm_non_drx_timer_strings[] = {
597 { 0x00, "no non-DRX mode after transfer state" },
598 { 0x01, "max. 1 sec non-DRX mode after transfer state" },
599 { 0x02, "max. 2 sec non-DRX mode after transfer state" },
600 { 0x03, "max. 4 sec non-DRX mode after transfer state" },
601 { 0x04, "max. 8 sec non-DRX mode after transfer state" },
602 { 0x05, "max. 16 sec non-DRX mode after transfer state" },
603 { 0x06, "max. 32 sec non-DRX mode after transfer state" },
604 { 0x07, "max. 64 sec non-DRX mode after transfer state" },
608 * CN Specific DRX cycle length coefficient, octet 3
610 * 8 7 6 5 Iu mode specific
611 * 0 0 0 0 CN Specific DRX cycle length coefficient not specified by the MS, ie. the
612 * system information value 'CN domain specific DRX cycle length' is used.
613 * (Ref 3GPP TS 25.331)
614 * 0 1 1 0 CN Specific DRX cycle length coefficient 6
615 * 0 1 1 1 CN Specific DRX cycle length coefficient 7
616 * 1 0 0 0 CN Specific DRX cycle length coefficient 8
617 * 1 0 0 1 CN Specific DRX cycle length coefficient 9
618 * All other values shall be interpreted as "CN Specific DRX cycle length coefficient not
619 * specified by the MS " by this version of the protocol.
620 * NOTE: In Iu mode this field (octet 3 bits 8 to 5) is used, but was spare in earlier
621 * versions of this protocol.
623 static const range_string gsm_a_gmm_cn_spec_drs_cycle_len_coef_strings[] = {
624 { 0x00, 0x05, "CN Specific DRX cycle length coefficient not specified by the MS" },
625 { 0x06, 0x06, "CN Specific DRX cycle length coefficient 6" },
626 { 0x07, 0x07, "CN Specific DRX cycle length coefficient 7" },
627 { 0x08, 0x08, "CN Specific DRX cycle length coefficient 8" },
628 { 0x09, 0x09, "CN Specific DRX cycle length coefficient 9" },
629 { 0x0a, 0x0f, "CN Specific DRX cycle length coefficient not specified by the MS" },
633 de_gmm_drx_param(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
638 proto_item *tf = NULL;
639 proto_tree *tf_tree = NULL;
641 curr_offset = offset;
643 tf = proto_tree_add_text(tree,
647 tf_tree = proto_item_add_subtree(tf, ett_gmm_drx );
649 oct = tvb_get_guint8(tvb, curr_offset);
653 case 0: str="704"; break;
654 case 65: str="71"; break;
655 case 66: str="72"; break;
656 case 67: str="74"; break;
657 case 68: str="75"; break;
658 case 69: str="77"; break;
659 case 70: str="79"; break;
660 case 71: str="80"; break;
661 case 72: str="83"; break;
662 case 73: str="86"; break;
663 case 74: str="88"; break;
664 case 75: str="90"; break;
665 case 76: str="92"; break;
666 case 77: str="96"; break;
667 case 78: str="101"; break;
668 case 79: str="103"; break;
669 case 80: str="107"; break;
670 case 81: str="112"; break;
671 case 82: str="116"; break;
672 case 83: str="118"; break;
673 case 84: str="128"; break;
674 case 85: str="141"; break;
675 case 86: str="144"; break;
676 case 87: str="150"; break;
677 case 88: str="160"; break;
678 case 89: str="171"; break;
679 case 90: str="176"; break;
680 case 91: str="192"; break;
681 case 92: str="214"; break;
682 case 93: str="224"; break;
683 case 94: str="235"; break;
684 case 95: str="256"; break;
685 case 96: str="288"; break;
686 case 97: str="320"; break;
687 case 98: str="352"; break;
688 default: str="Reserved, interpreted as 1";
691 proto_tree_add_text(tf_tree,
693 "Split PG Cycle Code: %s (%u)",
698 proto_tree_add_item(tf_tree, hf_gsm_a_gmm_cn_spec_drs_cycle_len_coef, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
699 proto_tree_add_item(tf_tree, hf_gsm_a_gmm_split_on_ccch, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
700 proto_tree_add_item(tf_tree, hf_gsm_a_gmm_non_drx_timer, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
704 /* no length check possible */
706 return(curr_offset - offset);
710 * [9] 10.5.5.7 Force to standby (lower nibble)
712 static const range_string gsm_a_gm_force_to_standby_vals[] = {
713 { 0x00, 0x00, "Force to standby not indicated" },
714 { 0x01, 0x01, "Force to standby indicated" },
715 { 0x02, 0x07, "Unknown, interpreted as Force to standby not indicated" },
720 de_gmm_ftostby(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
724 /* IMPORTANT - IT'S ASSUMED THAT THE INFORMATION IS IN THE LOWER NIBBLE */
725 bit_offset = (offset << 3) + 4;
726 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
727 proto_tree_add_bits_item(tree, hf_gsm_a_gm_force_to_standby, tvb, bit_offset + 1, 3, ENC_BIG_ENDIAN);
729 /* no length check possible */
734 * [9] 10.5.5.7 Force to standby (higher nibble)
737 de_gmm_ftostby_h(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
741 /* IMPORTANT - IT'S ASSUMED THAT THE INFORMATION IS IN THE HIGHER NIBBLE */
742 bit_offset = offset << 3;
743 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
744 proto_tree_add_bits_item(tree, hf_gsm_a_gm_force_to_standby, tvb, bit_offset + 1, 3, ENC_BIG_ENDIAN);
746 /* no length check possible */
754 de_gmm_ptmsi_sig(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
757 proto_item *curr_item;
759 curr_offset = offset;
761 curr_item= proto_tree_add_item(tree,hf_gsm_a_ptmsi_sig,tvb,curr_offset,3,ENC_BIG_ENDIAN);
762 proto_item_append_text(curr_item,"%s",add_string ? add_string : "");
766 /* no length check possible */
768 return(curr_offset - offset);
775 de_gmm_ptmsi_sig2(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len _U_)
778 proto_item *curr_item;
780 curr_offset = offset;
782 curr_item= proto_tree_add_item(tree,hf_gsm_a_ptmsi_sig2,tvb,curr_offset,3,ENC_BIG_ENDIAN);
783 proto_item_append_text(curr_item,"%s",add_string ? add_string : "");
786 EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo);
788 return(curr_offset - offset);
792 * [9] 10.5.5.9 Identity type 2
794 static const value_string gsm_a_gm_type_of_identity_vals[] = {
803 de_gmm_ident_type2(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
805 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (offset << 3) + 4, 1, ENC_BIG_ENDIAN);
806 proto_tree_add_item(tree, hf_gsm_a_gm_type_of_identity, tvb, offset, 1, ENC_BIG_ENDIAN);
808 /* no length check possible */
813 * [9] 10.5.5.10 IMEISV request
815 static const range_string gsm_a_gm_imeisv_req_vals[] = {
816 { 0x00, 0x00, "IMEISV not requested" },
817 { 0x01, 0x01, "IMEISV requested" },
818 { 0x02, 0x07, "Unknown, interpreted as IMEISV not requested" },
823 de_gmm_imeisv_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
827 /* IMPORTANT - IT'S ASSUMED THAT THE INFORMATION IS IN THE HIGHER NIBBLE */
828 bit_offset = offset << 3;
829 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
830 proto_tree_add_bits_item(tree, hf_gsm_a_gm_imeisv_req, tvb, bit_offset + 1, 3, ENC_BIG_ENDIAN);
832 /* no length check possible */
840 de_gmm_rec_npdu_lst(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
846 curr_offset = offset;
848 if ( len == 0 ) return 0;
853 oct = tvb_get_guint8(tvb, curr_offset);
855 oct |= tvb_get_guint8(tvb, curr_offset+1);
859 proto_tree_add_text(tree,
861 "NSAPI %d: 0x%02x (%u)",
869 oct |= tvb_get_guint8(tvb, curr_offset+2);
873 proto_tree_add_text(tree,
874 tvb, curr_offset-1, 2,
875 "NSAPI %d: 0x%02x (%u)",
882 } while ( curr_len > 1 );
884 EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo);
886 return(curr_offset - offset);
890 * [9] 10.5.5.12 MS network capability
892 static const true_false_string gsm_a_gmm_net_cap_gea_vals = {
893 "Encryption algorithm available",
894 "Encryption algorithm not available"
897 static const true_false_string gsm_a_gmm_net_cap_smdch_vals = {
898 "Mobile station supports mobile terminated point to point SMS via dedicated signalling channels",
899 "Mobile station does not support mobile terminated point to point SMS via dedicated signalling channels"
902 static const true_false_string gsm_a_gmm_net_cap_smgprs_vals = {
903 "Mobile station supports mobile terminated point to point SMS via GPRS packet data channels",
904 "Mobile station does not support mobile terminated point to point SMS via GPRS packet data channels"
907 static const true_false_string gsm_a_gmm_net_cap_ucs2_vals = {
908 "The ME has no preference between the use of the default alphabet and the use of UCS2",
909 "The ME has a preference for the default alphabet (defined in 3GPP TS 23.038 [8b]) over UCS2"
912 static const value_string gsm_a_gmm_net_cap_ss_scr_ind_vals[]={
913 { 0x00, "Default value of phase 1" },
914 { 0x01, "capability of handling of ellipsis notation and phase 2 error handling" },
915 { 0x02, "For future use, interpreted as Capability of handling of ellipsis notation and phase 2 error handling" },
916 { 0x03, "For future use, interpreted as Capability of handling of ellipsis notation and phase 2 error handling" },
920 static const true_false_string gsm_a_gmm_net_cap_solsa_vals = {
921 "The ME supports SoLSA",
922 "The ME does not support SoLSA"
925 static const true_false_string gsm_a_gmm_net_cap_rev_vals = {
926 "Used by a mobile station supporting R99 or later versions of the protocol",
927 "Used by a mobile station not supporting R99 or later versions of the protocol"
930 static const true_false_string gsm_a_gmm_net_cap_pfc_vals = {
931 "Mobile station does support BSS packet flow procedures",
932 "Mobile station does not support BSS packet flow procedures"
935 static const true_false_string gsm_a_gmm_net_cap_lcs_vals = {
936 "LCS value added location request notification capability supported",
937 "LCS value added location request notification capability not supported"
940 static const true_false_string gsm_a_gmm_net_cap_ps_irat_iu_vals = {
941 "PS inter-RAT HO to UTRAN Iu mode supported",
942 "PS inter-RAT HO to UTRAN Iu mode not supported"
945 static const true_false_string gsm_a_gmm_net_cap_ps_irat_s1_vals = {
946 "PS inter-RAT HO to E-UTRAN S1 mode supported",
947 "PS inter-RAT HO to E-UTRAN S1 mode not supported"
950 static const true_false_string gsm_a_gmm_net_cap_comb_proc_vals = {
951 "Mobile station supports EMM combined procedures",
952 "Mobile station does not support EMM combined procedures"
955 static const true_false_string gsm_a_gmm_net_cap_isr_vals = {
956 "The mobile station supports ISR",
957 "The mobile station does not support ISR"
960 static const true_false_string gsm_a_gmm_net_cap_srvcc_to_geran_vals = {
961 "SRVCC from UTRAN HSPA or E-UTRAN to GERAN/UTRAN supported",
962 "SRVCC from UTRAN HSPA or E-UTRAN to GERAN/UTRAN not supported"
965 static const true_false_string gsm_a_gmm_net_cap_epc_vals = {
970 static const true_false_string gsm_a_gmm_net_cap_nf_vals = {
971 "Mobile station supports the notification procedure",
972 "Mobile station does not support the notification procedure"
976 de_gmm_ms_net_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
982 curr_offset = offset;
985 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_gea1, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
987 /* bit 7: SM capabilities via dedicated channels */
988 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_smdch, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
990 /* bit 6: SM capabilities via GPRS channels */
991 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_smgprs, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
993 /* bit 5: UCS2 support */
994 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_ucs2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
996 /* bits 4 3: SS Screening Indicator */
997 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_ss_scr_ind, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
999 /* bit 2: SoLSA Capability */
1000 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_solsa, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1003 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_rev, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1006 NO_MORE_DATA_CHECK(len);
1008 /* bit 8: PFC feature mode */
1009 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_pfc, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1011 /* bits 7 6 5 4 3 2: Extended GEA bits */
1012 item = proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_ext_gea_bits, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1013 subtree = proto_item_add_subtree(item, ett_gmm_network_cap);
1014 proto_tree_add_item(subtree, hf_gsm_a_gmm_net_cap_gea2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1015 proto_tree_add_item(subtree, hf_gsm_a_gmm_net_cap_gea3, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1016 proto_tree_add_item(subtree, hf_gsm_a_gmm_net_cap_gea4, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1017 proto_tree_add_item(subtree, hf_gsm_a_gmm_net_cap_gea5, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1018 proto_tree_add_item(subtree, hf_gsm_a_gmm_net_cap_gea6, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1019 proto_tree_add_item(subtree, hf_gsm_a_gmm_net_cap_gea7, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1021 /* bit 1: LCS VA capability */
1022 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_lcs, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1025 NO_MORE_DATA_CHECK(len);
1027 /* bit 8: PS inter-RAT HO to UTRAN Iu mode capability */
1028 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_ps_irat_iu, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1030 /* bit 7: PS inter-RAT HO to E-UTRAN S1 mode capability */
1031 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_ps_irat_s1, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1033 /* bit 6: EMM Combined procedures capability */
1034 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_comb_proc, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1036 /* bit 5: ISR support */
1037 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_isr, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1039 /* bit 4: SRVCC to GERAN/UTRAN capability */
1040 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_srvcc_to_geran, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1042 /* bit 3: EPC capability */
1043 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_epc, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1045 /* bit 3: NF capability */
1046 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_nf, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1048 /* bits 1: Spare bit */
1049 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset<<3)+7, 1, ENC_BIG_ENDIAN);
1052 EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo);
1054 return(curr_offset - offset);
1060 #define GET_DATA /* check if we have enough bits left */ \
1061 if ( curr_bits_length < bits_needed ) \
1063 /* check if oct has enougth bits */ \
1064 if ( bits_in_oct < bits_needed ) \
1067 if ( curr_len == 0 ) \
1069 proto_tree_add_text(tf_tree, \
1070 tvb, curr_offset, 1, \
1071 "Not enough data available"); \
1073 tmp_oct = tvb_get_guint8(tvb, curr_offset); \
1074 oct |= tmp_oct<<(32-8-bits_in_oct); \
1077 if ( bits_in_oct != 0 ) \
1086 /* Access Technology Type */
1088 static const value_string gsm_a_gm_acc_tech_type_vals[] = {
1090 { 0x01, "GSM E --note that GSM E covers GSM P" },
1091 { 0x02, "GSM R --note that GSM R covers GSM E and GSM P" },
1092 { 0x03, "GSM 1800" },
1093 { 0x04, "GSM 1900" },
1094 { 0x05, "GSM 450" },
1095 { 0x06, "GSM 480" },
1096 { 0x07, "GSM 850" },
1097 { 0x08, "GSM 750" },
1098 { 0x09, "GSM T 380" },
1099 { 0x0a, "GSM T 410" },
1100 { 0x0b, "GSM T 900" },
1101 { 0x0c, "GSM 710" },
1102 { 0x0d, "GSM T 810" },
1103 { 0x0f, "Indicates the presence of a list of Additional access technologies" },
1107 static const true_false_string gsm_a_gm_vgcs = {
1108 "VGCS capability and notifications wanted",
1109 "no VGCS capability or no notifications wanted"
1112 static const true_false_string gsm_a_gm_vbs = {
1113 "VBS capability and notifications wanted",
1114 "no VBS capability or no notifications wanted"
1117 static const value_string gsm_a_gm_multi_slot_vals[] = {
1118 { 0x00, "Not specified" },
1119 { 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" },
1120 { 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" },
1121 { 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" },
1122 { 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" },
1123 { 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" },
1124 { 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" },
1125 { 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" },
1126 { 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" },
1127 { 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" },
1128 { 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" },
1129 { 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" },
1130 { 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" },
1131 { 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)" },
1132 { 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)" },
1133 { 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)" },
1134 { 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)" },
1135 { 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)" },
1136 { 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" },
1137 { 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" },
1138 { 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" },
1139 { 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" },
1140 { 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" },
1141 { 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" },
1142 { 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" },
1143 { 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" },
1144 { 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" },
1145 { 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" },
1146 { 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" },
1147 { 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" },
1148 { 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" },
1149 { 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" },
1150 { 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" },
1151 { 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" },
1152 { 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" },
1153 { 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))" },
1154 { 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))" },
1155 { 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))" },
1156 { 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))" },
1157 { 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))" },
1158 { 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))" },
1159 { 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))" },
1160 { 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))" },
1161 { 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))" },
1162 { 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))" },
1163 { 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))" },
1167 static const value_string gsm_a_gm_dtm_gprs_multi_slot_class_vals[] = {
1168 { 0x00, "Unused. If received, the network shall interpret this as Multislot class 5" },
1169 { 0x01, "Multislot class 5 supported" },
1170 { 0x02, "Multislot class 9 supported" },
1171 { 0x03, "Multislot class 11 supported" },
1175 static const true_false_string gsm_a_gm_revision_level_indicator = {
1176 "The ME is Release '99 onwards",
1177 "The ME is Release '98 or older"
1180 static const value_string gsm_a_gm_down_adv_rec_perf_vals[] = {
1181 { 0x00, "Downlink Advanced Receiver Performance not supported" },
1182 { 0x01, "Downlink Advanced Receiver Performance - phase I supported" },
1183 { 0x02, "Downlink Advanced Receiver Performance - phase II supported" },
1187 static const true_false_string gsm_a_gm_dtm_enh_cap = {
1188 "The mobile station supports enhanced DTM CS establishment and enhanced DTM CS release procedures",
1189 "The mobile station does not support enhanced DTM CS establishment and enhanced DTM CS release procedures"
1192 static const value_string gsm_a_gm_dtm_gprs_high_multi_slot_class_vals[] = {
1193 { 0x00, "Unused. If received, the network shall interpret this as 'Multislot class 31 or 36 supported'" },
1194 { 0x01, "Multislot class 31 or 36 supported" },
1195 { 0x02, "Multislot class 32 or 37 supported" },
1196 { 0x03, "Multislot class 33 or 38 supported" },
1197 { 0x04, "Multislot class 41 supported" },
1198 { 0x05, "Multislot class 42 supported" },
1199 { 0x06, "Multislot class 43 supported" },
1200 { 0x07, "Multislot class 44 supported" },
1204 static const value_string gsm_a_gm_multi_slot_cap_red_down_dual_carrier_vals[] = {
1205 { 0x00, "No reduction" },
1206 { 0x01, "The MS supports 1 timeslot fewer than the maximum number of receive timeslots" },
1207 { 0x02, "The MS supports 2 timeslots fewer than the maximum number of receive timeslots" },
1208 { 0x03, "The MS supports 3 timeslots fewer than the maximum number of receive timeslots" },
1209 { 0x04, "The MS supports 4 timeslots fewer than the maximum number of receive timeslots" },
1210 { 0x05, "The MS supports 5 timeslots fewer than the maximum number of receive timeslots" },
1211 { 0x06, "The MS supports 6 timeslots fewer than the maximum number of receive timeslots" },
1212 { 0x07, "Reserved for future use" },
1216 static const value_string gsm_a_gm_ul_egprs2_vals[] = {
1217 { 0x00, "The mobile station does not support either EGPRS2-A or EGPRS2-B in the uplink" },
1218 { 0x01, "The mobile station supports EGPRS2-A in the uplink" },
1219 { 0x02, "The mobile station supports both EGPRS2-A and EGPRS2-B in the uplink" },
1220 { 0x03, "This value is not used in this release/version of the specifications. If received it shall be interpreted as 'The mobile station supports both EGPRS2-A and EGPRS2-B in the uplink'" },
1224 static const value_string gsm_a_gm_dl_egprs2_vals[] = {
1225 { 0x00, "The mobile station does not support either EGPRS2-A or EGPRS2-B in the downlink" },
1226 { 0x01, "The mobile station supports EGPRS2-A in the downlink" },
1227 { 0x02, "The mobile station supports both EGPRS2-A and EGPRS2-B in the downlink" },
1228 { 0x03, "This value is not used in this release/version of the specifications. If received it shall be interpreted as 'The mobile station supports both EGPRS2-A and EGPRS2-B in the downlink'" },
1232 static const value_string gsm_a_gm_geran_to_eutra_support_in_geran_ptm_vals[] = {
1234 { 0x01, "E-UTRAN Neighbour Cell measurements and MS autonomous cell reselection to E-UTRAN supported" },
1235 { 0x02, "CCN towards E-UTRAN, E-UTRAN Neighbour Cell measurement reporting and Network controlled cell reselection to E-UTRAN supported in addition to capabilities indicated by '01'" },
1236 { 0x03, "PS Handover to E-UTRAN supported in addition to capabilities indicated by '01' and '10'" },
1240 static const value_string gsm_a_gm_alt_efta_multi_slot_class_vals[] = {
1241 { 0x00, "No Alternative EFTA multislot class is indicated. Use (DTM) EGPRS (high) multislot class only" },
1242 { 0x01, "Alternative EFTA multislot class is Multislot class 19" },
1243 { 0x02, "Alternative EFTA multislot class is Multislot class 20" },
1244 { 0x03, "Alternative EFTA multislot class is Multislot class 21" },
1245 { 0x04, "Alternative EFTA multislot class is Multislot class 22" },
1246 { 0x05, "Alternative EFTA multislot class is Multislot class 23" },
1247 { 0x06, "Alternative EFTA multislot class is Multislot class 24" },
1248 { 0x07, "Alternative EFTA multislot class is Multislot class 25" },
1249 { 0x08, "Alternative EFTA multislot class is Multislot class 26" },
1250 { 0x09, "Alternative EFTA multislot class is Multislot class 27" },
1251 { 0x0a, "Alternative EFTA multislot class is Multislot class 28" },
1252 { 0x0b, "Alternative EFTA multislot class is Multislot class 29" },
1261 de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
1263 guint32 curr_offset;
1266 proto_item *tf = NULL, *mc_item = NULL;
1267 proto_tree *tf_tree = NULL, *mc_tree = NULL;
1272 guint add_ocetets; /* octets which are covered by one element -1 */
1273 guint curr_bits_length;
1278 guchar dtm_gprs_mslot = 0;
1279 guchar dtm_egprs_mslot = 4;
1280 gboolean finished = TRUE;
1283 curr_offset = offset;
1284 bit_offset = offset<<3;
1292 /* check for a new round */
1293 if (( curr_len*8 + bits_in_oct ) < 11 )
1296 /* now read the first 11 bits */
1297 curr_bits_length = 11;
1301 if ( curr_len != len )
1306 if (( oct>>(32-bits_needed) ) == 1 )
1308 curr_bits_length -= bits_needed;
1309 oct <<= bits_needed;
1310 bits_in_oct -= bits_needed;
1313 if (( curr_len*8 + bits_in_oct ) < 11 )
1315 curr_bits_length = 11;
1319 curr_bits_length -= bits_needed;
1320 oct <<= bits_needed;
1321 bits_in_oct -= bits_needed;
1328 tf = proto_tree_add_text(tree,
1329 tvb, curr_offset, 1,
1330 "MS RA capability %d",indx);
1332 tf_tree = proto_item_add_subtree(tf, ett_gmm_radio_cap );
1340 acc_type = oct>>(32-bits_needed);
1342 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_acc_tech_type, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
1345 curr_bits_length -= bits_needed;
1346 oct <<= bits_needed;
1347 bits_in_oct -= bits_needed;
1349 /* < Access capabilities struct > ::= */
1356 bits_length = curr_bits_length = oct>>(32-bits_needed);
1358 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_acc_cap_struct_len, tvb, bit_offset, 7, ENC_BIG_ENDIAN);
1359 proto_item_set_len(tf, (bits_length>>3)+1);
1360 /* This is already done - length doesn't contain this field
1361 curr_bits_length -= bits_needed;
1364 oct <<= bits_needed;
1365 bits_in_oct -= bits_needed;
1367 if ( acc_type == 0x0f )
1372 * Additional access technologies:
1374 finished = TRUE; /* Break out of the loop unless proven unfinished */
1383 switch ( oct>>(32-bits_needed) )
1385 case 0x00: str="Not Present"; finished = TRUE; break;
1386 case 0x01: str="Present"; finished = FALSE; break;
1387 default: str="This should not happen";
1390 proto_tree_add_text(tf_tree,
1391 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
1392 "Presence: %s (%u)", str, oct>>(32-bits_needed));
1394 curr_bits_length -= bits_needed;
1395 oct <<= bits_needed;
1396 bits_in_oct -= bits_needed;
1401 * No more valid data, get spare bits if any
1403 while ( curr_bits_length > 0 )
1405 if ( curr_bits_length > 8 )
1408 bits_needed = curr_bits_length;
1410 curr_bits_length -= bits_needed;
1411 oct <<= bits_needed;
1412 bits_in_oct -= bits_needed;
1413 bit_offset+= bits_needed;
1424 acc_type = oct>>(32-bits_needed);
1426 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_acc_cap_struct_len, tvb, bit_offset, 7, ENC_BIG_ENDIAN);
1429 curr_bits_length -= bits_needed;
1430 oct <<= bits_needed;
1431 bits_in_oct -= bits_needed;
1439 value = tvb_get_bits8(tvb, bit_offset, 3);
1441 if ( acc_type == 0x04 ) /* GSM 1900 */
1445 case 0x01: str="1 W (30 dBm)"; break;
1446 case 0x02: str="0,25 W (24 dBm)"; break;
1447 case 0x03: str="2 W (33 dBm)"; break;
1448 default: str="Not specified";
1451 else if ( acc_type == 0x03 )
1458 case 0x01: str="1 W (30 dBm)"; break;
1459 case 0x02: str="0,25 W (24 dBm)"; break;
1460 case 0x03: str="4 W (36 dBm)"; break;
1461 default: str="Not specified";
1464 else if ( acc_type <= 0x08 )
1476 case 0x02: str="8 W (39 dBm)"; break;
1477 case 0x03: str="5 W (37 dBm)"; break;
1478 case 0x04: str="2 W (33 dBm)"; break;
1479 case 0x05: str="0,8 W (29 dBm)"; break;
1480 default: str="Not specified";
1484 str="Not specified??";
1486 /* decode_bits_in_field(gint bit_offset, gint no_of_bits, guint64 value)*/
1487 proto_tree_add_text(tf_tree,
1488 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
1489 "%s RF Power Capability, GMSK Power Class: %s (%u)", decode_bits_in_field(bit_offset, 3, value), str, value);
1491 curr_bits_length -= bits_needed;
1492 oct <<= bits_needed;
1493 bits_in_oct -= bits_needed;
1501 value = tvb_get_bits8(tvb, bit_offset, 2);
1505 case 0x00: str="8PSK modulation not supported for uplink"; break;
1506 case 0x01: str="Power class E1"; break;
1507 case 0x02: str="Power class E2"; break;
1508 case 0x03: str="Power class E3"; break;
1509 default: str="This should not happen";
1512 proto_tree_add_text(tf_tree,
1513 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
1514 "8PSK Power Class: %s (%u)",str,value);
1516 curr_bits_length -= bits_needed;
1517 oct <<= bits_needed;
1518 bits_in_oct -= bits_needed;
1520 } while (!finished);
1531 value = tvb_get_bits8(tvb, bit_offset, 3);
1533 if ( acc_type == 0x04 ) /* GSM 1900 */
1537 case 0x01: str="1 W (30 dBm)"; break;
1538 case 0x02: str="0,25 W (24 dBm)"; break;
1539 case 0x03: str="2 W (33 dBm)"; break;
1540 default: str="Not specified";
1543 else if ( acc_type == 0x03 )
1547 case 0x01: str="1 W (30 dBm)"; break;
1548 case 0x02: str="0,25 W (24 dBm)"; break;
1549 case 0x03: str="4 W (36 dBm)"; break;
1550 default: str="Not specified";
1553 else if ( acc_type <= 0x08 )
1557 case 0x02: str="8 W (39 dBm)"; break;
1558 case 0x03: str="5 W (37 dBm)"; break;
1559 case 0x04: str="2 W (33 dBm)"; break;
1560 case 0x05: str="0,8 W (29 dBm)"; break;
1561 default: str="Not specified";
1565 str="Not specified??";
1567 proto_tree_add_text(tf_tree,
1568 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
1569 "%s RF Power Capability, GMSK Power Class: %s (%u)", decode_bits_in_field(bit_offset, 3, value),str,value);
1572 curr_bits_length -= bits_needed;
1573 oct <<= bits_needed;
1574 bits_in_oct -= bits_needed;
1583 if ((oct>>(32-bits_needed))==0)
1585 proto_tree_add_text(tf_tree,
1586 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
1587 "A5 Bits: Same values apply for parameters as in the immediately preceding Access capabilities field within this IE (%u)",oct>>(32-bits_needed));
1589 curr_bits_length -= bits_needed;
1590 oct <<= bits_needed;
1591 bits_in_oct -= bits_needed;
1597 proto_tree_add_text(tf_tree,
1598 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
1599 "A5 Bits: A5 bits follow (%u)",oct>>(32-bits_needed));
1602 curr_bits_length -= bits_needed;
1603 oct <<= bits_needed;
1604 bits_in_oct -= bits_needed;
1606 for (i=1; i<= 7 ; i++ )
1615 switch ( oct>>(32-bits_needed) )
1617 case 0x00: str="encryption algorithm not available"; break;
1618 case 0x01: str="encryption algorithm available"; break;
1619 default: str="This should not happen";
1622 proto_tree_add_text(tf_tree,
1623 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
1624 "A5/%d: %s (%u)",i,str,oct>>(32-bits_needed));
1626 curr_bits_length -= bits_needed;
1627 oct <<= bits_needed;
1628 bits_in_oct -= bits_needed;
1638 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_ctrled_early_cm_sending, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
1640 curr_bits_length -= bits_needed;
1641 oct <<= bits_needed;
1642 bits_in_oct -= bits_needed;
1650 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_pseudo_sync, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
1652 curr_bits_length -= bits_needed;
1653 oct <<= bits_needed;
1654 bits_in_oct -= bits_needed;
1662 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_vgcs, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
1664 curr_bits_length -= bits_needed;
1665 oct <<= bits_needed;
1666 bits_in_oct -= bits_needed;
1674 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_vbs, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
1676 curr_bits_length -= bits_needed;
1677 oct <<= bits_needed;
1678 bits_in_oct -= bits_needed;
1681 * Multislot capability?
1686 value = oct>>(32-bits_needed);
1688 mc_item = proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_multislot_capability, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
1691 curr_bits_length -= bits_needed;
1692 oct <<= bits_needed;
1693 bits_in_oct -= bits_needed;
1698 mc_tree = proto_item_add_subtree(mc_item, ett_gsm_a_gm_msrac_multislot_capability);
1700 * HSCSD multislot class?
1706 if ((oct>>(32-bits_needed))==0)
1708 proto_tree_add_text(mc_tree,
1709 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
1710 "HSCSD multislot class: Bits are not available (%u)",oct>>(32-bits_needed));
1712 curr_bits_length -= bits_needed;
1713 oct <<= bits_needed;
1714 bits_in_oct -= bits_needed;
1718 curr_bits_length -= bits_needed;
1719 oct <<= bits_needed;
1720 bits_in_oct -= bits_needed;
1724 * HSCSD multislot class
1729 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_hscsd_multi_slot_class, tvb, bit_offset, 5, ENC_BIG_ENDIAN);
1731 curr_bits_length -= bits_needed;
1732 oct <<= bits_needed;
1733 bits_in_oct -= bits_needed;
1737 * GPRS multislot class?
1743 if ((oct>>(32-bits_needed))==0)
1745 proto_tree_add_text(mc_tree,
1746 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
1747 "GPRS multislot class: Bits are not available (%u)",oct>>(32-bits_needed));
1749 curr_bits_length -= bits_needed;
1750 oct <<= bits_needed;
1751 bits_in_oct -= bits_needed;
1755 curr_bits_length -= bits_needed;
1756 oct <<= bits_needed;
1757 bits_in_oct -= bits_needed;
1761 * GPRS multislot class
1766 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_gprs_multi_slot_class, tvb, bit_offset, 5, ENC_BIG_ENDIAN);
1768 curr_bits_length -= bits_needed;
1769 oct <<= bits_needed;
1770 bits_in_oct -= bits_needed;
1773 * GPRS Extended Dynamic Allocation Capability
1778 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_gprs_ext_dyn_alloc_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
1780 curr_bits_length -= bits_needed;
1781 oct <<= bits_needed;
1782 bits_in_oct -= bits_needed;
1792 if ((oct>>(32-bits_needed))==0)
1794 proto_tree_add_text(mc_tree,
1795 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
1796 "SMS/SM values: Bits are not available (%u)",oct>>(32-bits_needed));
1798 curr_bits_length -= bits_needed;
1799 oct <<= bits_needed;
1800 bits_in_oct -= bits_needed;
1804 curr_bits_length -= bits_needed;
1805 oct <<= bits_needed;
1806 bits_in_oct -= bits_needed;
1810 * Switch-Measure-Switch value
1816 proto_tree_add_bits_item(mc_tree, hf_gsm_a_gm_sms_value, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
1818 curr_bits_length -= bits_needed;
1819 oct <<= bits_needed;
1820 bits_in_oct -= bits_needed;
1823 * Switch-Measure value
1829 proto_tree_add_bits_item(mc_tree, hf_gsm_a_gm_sm_value, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
1831 curr_bits_length -= bits_needed;
1832 oct <<= bits_needed;
1833 bits_in_oct -= bits_needed;
1837 * ECSD multislot class?
1843 if ((oct>>(32-bits_needed))==0)
1845 proto_tree_add_text(mc_tree,
1846 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
1847 "ECSD multislot class: Bits are not available (%u)",oct>>(32-bits_needed));
1849 curr_bits_length -= bits_needed;
1850 oct <<= bits_needed;
1851 bits_in_oct -= bits_needed;
1855 curr_bits_length -= bits_needed;
1856 oct <<= bits_needed;
1857 bits_in_oct -= bits_needed;
1861 * ECSD multislot class
1866 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_ecsd_multi_slot_class, tvb, bit_offset, 5, ENC_BIG_ENDIAN);
1868 curr_bits_length -= bits_needed;
1869 oct <<= bits_needed;
1870 bits_in_oct -= bits_needed;
1874 * EGPRS multislot class?
1880 if ((oct>>(32-bits_needed))==0)
1882 proto_tree_add_text(mc_tree,
1883 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
1884 "EGPRS multislot class: Bits are not available (%u)",oct>>(32-bits_needed));
1885 curr_bits_length -= bits_needed;
1886 oct <<= bits_needed;
1887 bits_in_oct -= bits_needed;
1892 curr_bits_length -= bits_needed;
1893 oct <<= bits_needed;
1894 bits_in_oct -= bits_needed;
1898 * EGPRS multislot class
1903 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_egprs_multi_slot_class, tvb, bit_offset, 5, ENC_BIG_ENDIAN);
1905 curr_bits_length -= bits_needed;
1906 oct <<= bits_needed;
1907 bits_in_oct -= bits_needed;
1910 * EGPRS Extended Dynamic Allocation Capability
1915 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_egprs_ext_dyn_alloc_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
1917 curr_bits_length -= bits_needed;
1918 oct <<= bits_needed;
1919 bits_in_oct -= bits_needed;
1923 * DTM GPRS Multi Slot Class ?
1929 if ((oct>>(32-bits_needed))==0)
1931 proto_tree_add_text(mc_tree,
1932 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
1933 "DTM GPRS Multi Slot Class: Bits are not available (%u)",oct>>(32-bits_needed));
1935 curr_bits_length -= bits_needed;
1936 oct <<= bits_needed;
1937 bits_in_oct -= bits_needed;
1941 curr_bits_length -= bits_needed;
1942 oct <<= bits_needed;
1943 bits_in_oct -= bits_needed;
1947 * DTM GPRS Multi Slot Class
1953 dtm_gprs_mslot = oct>>(32-bits_needed);
1955 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_dtm_gprs_multi_slot_class, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
1957 curr_bits_length -= bits_needed;
1958 oct <<= bits_needed;
1959 bits_in_oct -= bits_needed;
1967 proto_tree_add_bits_item(mc_tree, hf_gsm_a_gm_rac_single_slt_dtm, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
1969 curr_bits_length -= bits_needed;
1970 oct <<= bits_needed;
1971 bits_in_oct -= bits_needed;
1974 * DTM EGPRS Multi Slot Class ?
1980 dtm_egprs_mslot = oct>>(32-bits_needed);
1981 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);
1983 curr_bits_length -= bits_needed;
1984 oct <<= bits_needed;
1985 bits_in_oct -= bits_needed;
1987 if ((oct>>(32-bits_needed))==1)
1990 * DTM EGPRS Multi Slot Class
1995 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_dtm_egprs_multi_slot_class, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
1997 curr_bits_length -= bits_needed;
1998 oct <<= bits_needed;
1999 bits_in_oct -= bits_needed;
2005 * 8PSK Power Capability?
2010 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_8psk_pow_cap_pres, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2012 curr_bits_length -= bits_needed;
2013 oct <<= bits_needed;
2014 bits_in_oct -= bits_needed;
2017 if ((oct>>(32-bits_needed))==1)
2020 * 8PSK Power Capability
2026 switch ( oct>>(32-bits_needed) )
2028 case 0x00: str="Reserved"; break;
2029 case 0x01: str="Power class E1"; break;
2030 case 0x02: str="Power class E2"; break;
2031 case 0x03: str="Power class E3"; break;
2032 default: str="This should not happen";
2035 proto_tree_add_text(tf_tree,
2036 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
2037 "8PSK Power Capability: %s (%u)",str,oct>>(32-bits_needed));
2039 curr_bits_length -= bits_needed;
2040 oct <<= bits_needed;
2041 bits_in_oct -= bits_needed;
2045 * COMPACT Interference Measurement Capability
2050 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_comp_int_meas_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2052 curr_bits_length -= bits_needed;
2053 oct <<= bits_needed;
2054 bits_in_oct -= bits_needed;
2057 * Revision Level Indicator
2062 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rel_lev_ind, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2064 curr_bits_length -= bits_needed;
2065 oct <<= bits_needed;
2066 bits_in_oct -= bits_needed;
2069 * UMTS FDD Radio Access Technology Capability
2074 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_umts_fdd_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2076 curr_bits_length -= bits_needed;
2077 oct <<= bits_needed;
2078 bits_in_oct -= bits_needed;
2081 * UMTS 3.84 Mcps TDD Radio Access Technology Capability
2086 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_umts_384_tdd_ra_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2088 curr_bits_length -= bits_needed;
2089 oct <<= bits_needed;
2090 bits_in_oct -= bits_needed;
2093 * CDMA 2000 Radio Access Technology Capability
2098 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_cdma2000_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2100 curr_bits_length -= bits_needed;
2101 oct <<= bits_needed;
2102 bits_in_oct -= bits_needed;
2105 * UMTS 1.28 Mcps TDD Radio Access Technology Capability
2110 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_umts_128_tdd_ra_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2112 curr_bits_length -= bits_needed;
2113 oct <<= bits_needed;
2114 bits_in_oct -= bits_needed;
2117 * GERAN Feature Package 1
2122 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_geran_feat_pkg, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2124 curr_bits_length -= bits_needed;
2125 oct <<= bits_needed;
2126 bits_in_oct -= bits_needed;
2129 * Extended DTM (E)GPRS Multi Slot Class
2136 if ((oct>>(32-bits_needed))==0)
2138 proto_tree_add_text(tf_tree,
2139 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
2140 "Extended DTM (E)GPRS Multi Slot Class: Bits are not available (%u)",oct>>(32-bits_needed));
2141 curr_bits_length -= bits_needed;
2142 oct <<= bits_needed;
2143 bits_in_oct -= bits_needed;
2148 curr_bits_length -= bits_needed;
2149 oct <<= bits_needed;
2150 bits_in_oct -= bits_needed;
2154 * Extended DTM GPRS Multi Slot Class
2160 switch ( (oct>>(32-bits_needed))|(dtm_gprs_mslot<<4) )
2162 case 0x00: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
2163 case 0x01: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
2164 case 0x02: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
2165 case 0x03: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
2166 case 0x10: str="Multislot class 5 supported"; break;
2167 case 0x11: str="Multislot class 6 supported"; break;
2168 case 0x12: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
2169 case 0x13: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
2170 case 0x20: str="Multislot class 9 supported"; break;
2171 case 0x21: str="Multislot class 10 supported"; break;
2172 case 0x22: str="Unused. If received, it shall be interpreted as Multislot class 9 supported"; break;
2173 case 0x23: str="Unused. If received, it shall be interpreted as Multislot class 9 supported"; break;
2174 case 0x30: str="Multislot class 11 supported"; break;
2175 case 0x31: str="Unused. If received, it shall be interpreted as Multislot class 11 supported"; break;
2176 case 0x32: str="Unused. If received, it shall be interpreted as Multislot class 11 supported"; break;
2177 case 0x33: str="Unused. If received, it shall be interpreted as Multislot class 11 supported"; break;
2178 default: str="This should not happen";
2181 proto_tree_add_text(tf_tree,
2182 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
2183 "Extended DTM GPRS Multi Slot Class: %s (%u)",str,oct>>(32-bits_needed));
2185 curr_bits_length -= bits_needed;
2186 oct <<= bits_needed;
2187 bits_in_oct -= bits_needed;
2189 if ( dtm_egprs_mslot <= 3 )
2192 * Extended DTM EGPRS Multi Slot Class
2198 switch ( (oct>>(32-bits_needed))|(dtm_egprs_mslot<<4) )
2200 case 0x00: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
2201 case 0x01: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
2202 case 0x02: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
2203 case 0x03: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
2204 case 0x10: str="Multislot class 5 supported"; break;
2205 case 0x11: str="Multislot class 6 supported"; break;
2206 case 0x12: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
2207 case 0x13: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
2208 case 0x20: str="Multislot class 9 supported"; break;
2209 case 0x21: str="Multislot class 10 supported"; break;
2210 case 0x22: str="Unused. If received, it shall be interpreted as Multislot class 9 supported"; break;
2211 case 0x23: str="Unused. If received, it shall be interpreted as Multislot class 9 supported"; break;
2212 case 0x30: str="Multislot class 11 supported"; break;
2213 case 0x31: str="Unused. If received, it shall be interpreted as Multislot class 11 supported"; break;
2214 case 0x32: str="Unused. If received, it shall be interpreted as Multislot class 11 supported"; break;
2215 case 0x33: str="Unused. If received, it shall be interpreted as Multislot class 11 supported"; break;
2216 default: str="This should not happen";
2219 proto_tree_add_text(tf_tree,
2220 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
2221 "Extended DTM EGPRS Multi Slot Class: %s (%u)",str, oct>>(32-bits_needed));
2223 curr_bits_length -= bits_needed;
2224 oct <<= bits_needed;
2225 bits_in_oct -= bits_needed;
2230 * Modulation based multislot class support
2235 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);
2237 curr_bits_length -= bits_needed;
2238 oct <<= bits_needed;
2239 bits_in_oct -= bits_needed;
2242 * High Multislot Capability
2248 if ((oct>>(32-bits_needed))==0)
2250 proto_tree_add_text(tf_tree,
2251 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
2252 "High Multislot Capability: Bits are not available (%u)",oct>>(32-bits_needed));
2254 curr_bits_length -= bits_needed;
2255 oct <<= bits_needed;
2256 bits_in_oct -= bits_needed;
2260 curr_bits_length -= bits_needed;
2261 oct <<= bits_needed;
2262 bits_in_oct -= bits_needed;
2266 * High Multislot Capability
2272 proto_tree_add_text(tf_tree,
2273 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
2274 "High Multislot Capability: 0x%02x (%u)"
2275 " - This field effect all other multislot fields."
2276 " To understand the value please read TS 24.008 5.6.0"
2277 " Release 5 Chap 10.5.5.12 Page 406",
2278 oct>>(32-bits_needed),
2279 oct>>(32-bits_needed));
2281 curr_bits_length -= bits_needed;
2282 oct <<= bits_needed;
2283 bits_in_oct -= bits_needed;
2287 * GERAN Iu Mode Capability
2292 value = tvb_get_bits8(tvb, bit_offset, 1);
2293 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_geran_iu_mode_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2294 bit_offset+=bits_needed;
2295 curr_bits_length -= bits_needed;
2296 oct <<= bits_needed;
2297 bits_in_oct -= bits_needed;
2300 /* GERAN Iu Mode Capabilities struct present */
2303 value = tvb_get_bits8(tvb, bit_offset, 4);
2304 bit_offset+=bits_needed;
2305 curr_bits_length -= bits_needed;
2306 oct <<= bits_needed;
2307 bits_in_oct -= bits_needed;
2315 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_flo_iu_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2316 bit_offset+=bits_needed;
2317 curr_bits_length -= bits_needed;
2318 oct <<= bits_needed;
2319 bits_in_oct -= bits_needed;
2322 /* skip spare bits */
2324 curr_bits_length -= value;
2326 bits_in_oct -= value;
2331 * GMSK Multislot Power Profile
2337 switch ( oct>>(32-bits_needed) )
2339 case 0x00: str="GMSK_MULTISLOT_POWER_PROFILE 0"; break;
2340 case 0x01: str="GMSK_MULTISLOT_POWER_PROFILE 1"; break;
2341 case 0x02: str="GMSK_MULTISLOT_POWER_PROFILE 2"; break;
2342 case 0x03: str="GMSK_MULTISLOT_POWER_PROFILE 3"; break;
2343 default: str="This should not happen";
2346 proto_tree_add_text(tf_tree,
2347 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
2348 "GMSK Multislot Power Profile: %s (%u)",str,oct>>(32-bits_needed));
2350 curr_bits_length -= bits_needed;
2351 oct <<= bits_needed;
2352 bits_in_oct -= bits_needed;
2355 * 8-PSK Multislot Power Profile
2361 switch ( oct>>(32-bits_needed) )
2363 case 0x00: str="8-PSK_MULTISLOT_POWER_PROFILE 0"; break;
2364 case 0x01: str="8-PSK_MULTISLOT_POWER_PROFILE 1"; break;
2365 case 0x02: str="8-PSK_MULTISLOT_POWER_PROFILE 2"; break;
2366 case 0x03: str="8-PSK_MULTISLOT_POWER_PROFILE 3"; break;
2367 default: str="This should not happen";
2370 proto_tree_add_text(tf_tree,
2371 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
2372 "8-PSK Multislot Power Profile: %s (%u)",str,oct>>(32-bits_needed));
2374 curr_bits_length -= bits_needed;
2375 oct <<= bits_needed;
2376 bits_in_oct -= bits_needed;
2383 * Multiple TBF Capability
2387 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_mult_tbf_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2388 bit_offset+=bits_needed;
2389 curr_bits_length -= bits_needed;
2390 oct <<= bits_needed;
2391 bits_in_oct -= bits_needed;
2394 * Downlink Advanced Receiver Performance
2398 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_down_adv_rec_perf, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
2399 bit_offset+=bits_needed;
2400 curr_bits_length -= bits_needed;
2401 oct <<= bits_needed;
2402 bits_in_oct -= bits_needed;
2405 * Extended RLC/MAC Control Message Segmentation Capability
2409 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);
2410 bit_offset+=bits_needed;
2411 curr_bits_length -= bits_needed;
2412 oct <<= bits_needed;
2413 bits_in_oct -= bits_needed;
2416 * DTM Enhancements Capability
2420 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_dtm_enh_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2421 bit_offset+=bits_needed;
2422 curr_bits_length -= bits_needed;
2423 oct <<= bits_needed;
2424 bits_in_oct -= bits_needed;
2427 * DTM GPRS High Multi Slot Class & DTM EGPRS High Multi Slot Class
2431 if ((oct>>(32-bits_needed))==0)
2433 bit_offset+=bits_needed;
2434 curr_bits_length -= bits_needed;
2435 oct <<= bits_needed;
2436 bits_in_oct -= bits_needed;
2440 bit_offset+=bits_needed;
2441 curr_bits_length -= bits_needed;
2442 oct <<= bits_needed;
2443 bits_in_oct -= bits_needed;
2446 * DTM GPRS High Multi Slot Class
2450 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);
2451 bit_offset+=bits_needed;
2452 curr_bits_length -= bits_needed;
2453 oct <<= bits_needed;
2454 bits_in_oct -= bits_needed;
2458 if ((oct>>(32-bits_needed))==0)
2460 bit_offset+=bits_needed;
2461 curr_bits_length -= bits_needed;
2462 oct <<= bits_needed;
2463 bits_in_oct -= bits_needed;
2467 bit_offset+=bits_needed;
2468 curr_bits_length -= bits_needed;
2469 oct <<= bits_needed;
2470 bits_in_oct -= bits_needed;
2473 * DTM EGPRS High Multi Slot Class
2477 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);
2478 bit_offset+=bits_needed;
2479 curr_bits_length -= bits_needed;
2480 oct <<= bits_needed;
2481 bits_in_oct -= bits_needed;
2486 * PS Handover Capability
2490 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_ps_ho_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2491 bit_offset+=bits_needed;
2492 curr_bits_length -= bits_needed;
2493 oct <<= bits_needed;
2494 bits_in_oct -= bits_needed;
2501 * DTM Handover Capability
2505 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_dtm_ho_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2506 bit_offset+=bits_needed;
2507 curr_bits_length -= bits_needed;
2508 oct <<= bits_needed;
2509 bits_in_oct -= bits_needed;
2512 * Multislot Capability Reduction for Downlink Dual Carrier & Downlink Dual Carrier for DTM Capability
2516 if ((oct>>(32-bits_needed))==0)
2518 bit_offset+=bits_needed;
2519 curr_bits_length -= bits_needed;
2520 oct <<= bits_needed;
2521 bits_in_oct -= bits_needed;
2525 bit_offset+=bits_needed;
2526 curr_bits_length -= bits_needed;
2527 oct <<= bits_needed;
2528 bits_in_oct -= bits_needed;
2531 * Multislot Capability Reduction for Downlink Dual Carrier
2535 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);
2536 bit_offset+=bits_needed;
2537 curr_bits_length -= bits_needed;
2538 oct <<= bits_needed;
2539 bits_in_oct -= bits_needed;
2542 * Downlink Dual Carrier for DTM Capability
2546 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_down_dual_carrier_dtm_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2547 bit_offset+=bits_needed;
2548 curr_bits_length -= bits_needed;
2549 oct <<= bits_needed;
2550 bits_in_oct -= bits_needed;
2554 * Flexible Timeslot Assignment
2558 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_flex_ts_assign, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2559 bit_offset+=bits_needed;
2560 curr_bits_length -= bits_needed;
2561 oct <<= bits_needed;
2562 bits_in_oct -= bits_needed;
2565 * GAN PS Handover Capability
2569 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_gan_ps_ho_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2570 bit_offset+=bits_needed;
2571 curr_bits_length -= bits_needed;
2572 oct <<= bits_needed;
2573 bits_in_oct -= bits_needed;
2576 * RLC Non-persistent Mode
2580 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_rlc_non_pers_mode, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2581 bit_offset+=bits_needed;
2582 curr_bits_length -= bits_needed;
2583 oct <<= bits_needed;
2584 bits_in_oct -= bits_needed;
2587 * Reduced Latency Capability
2591 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_reduced_lat_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2592 bit_offset+=bits_needed;
2593 curr_bits_length -= bits_needed;
2594 oct <<= bits_needed;
2595 bits_in_oct -= bits_needed;
2602 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_ul_egprs2, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
2603 bit_offset+=bits_needed;
2604 curr_bits_length -= bits_needed;
2605 oct <<= bits_needed;
2606 bits_in_oct -= bits_needed;
2613 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_dl_egprs2, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
2614 bit_offset+=bits_needed;
2615 curr_bits_length -= bits_needed;
2616 oct <<= bits_needed;
2617 bits_in_oct -= bits_needed;
2624 * E-UTRA FDD support
2628 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_eutra_fdd_support, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2629 bit_offset+=bits_needed;
2630 curr_bits_length -= bits_needed;
2631 oct <<= bits_needed;
2632 bits_in_oct -= bits_needed;
2635 * E-UTRA TDD support
2639 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_eutra_tdd_support, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2640 bit_offset+=bits_needed;
2641 curr_bits_length -= bits_needed;
2642 oct <<= bits_needed;
2643 bits_in_oct -= bits_needed;
2646 * GERAN to E-UTRA support in GERAN packet transfer mode
2650 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);
2651 bit_offset+=bits_needed;
2652 curr_bits_length -= bits_needed;
2653 oct <<= bits_needed;
2654 bits_in_oct -= bits_needed;
2657 * Priority-based reselection support
2661 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_prio_based_resel_support, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2662 bit_offset+=bits_needed;
2663 curr_bits_length -= bits_needed;
2664 oct <<= bits_needed;
2665 bits_in_oct -= bits_needed;
2672 * Enhanced Flexible Timeslot Assignment
2676 if ((oct>>(32-bits_needed))==0)
2678 bit_offset+=bits_needed;
2679 curr_bits_length -= bits_needed;
2680 oct <<= bits_needed;
2681 bits_in_oct -= bits_needed;
2685 bit_offset+=bits_needed;
2686 curr_bits_length -= bits_needed;
2687 oct <<= bits_needed;
2688 bits_in_oct -= bits_needed;
2691 * Alternative EFTA Multislot Class
2695 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_alt_efta_multi_slot_class, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
2696 bit_offset+=bits_needed;
2697 curr_bits_length -= bits_needed;
2698 oct <<= bits_needed;
2699 bits_in_oct -= bits_needed;
2702 * EFTA Multislot Capability Reduction for Downlink Dual Carrier
2706 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);
2707 bit_offset+=bits_needed;
2708 curr_bits_length -= bits_needed;
2709 oct <<= bits_needed;
2710 bits_in_oct -= bits_needed;
2714 * Indication of Upper Layer PDU Start Capability for RLC UM
2718 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);
2719 bit_offset+=bits_needed;
2720 curr_bits_length -= bits_needed;
2721 oct <<= bits_needed;
2722 bits_in_oct -= bits_needed;
2729 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_emst_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2730 bit_offset+=bits_needed;
2731 curr_bits_length -= bits_needed;
2732 oct <<= bits_needed;
2733 bits_in_oct -= bits_needed;
2740 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_mtti_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2741 bit_offset+=bits_needed;
2742 curr_bits_length -= bits_needed;
2743 oct <<= bits_needed;
2744 bits_in_oct -= bits_needed;
2747 * UTRA CSG Cells Reporting
2751 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_utra_csg_cell_report, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2752 bit_offset+=bits_needed;
2753 curr_bits_length -= bits_needed;
2754 oct <<= bits_needed;
2755 bits_in_oct -= bits_needed;
2758 * E-UTRA CSG Cells Reporting
2762 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_eutra_csg_cell_report, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2763 bit_offset+=bits_needed;
2764 curr_bits_length -= bits_needed;
2765 oct <<= bits_needed;
2766 bits_in_oct -= bits_needed;
2769 * we are too long ... so jump over it
2771 while ( curr_bits_length > 0 )
2773 if ( curr_bits_length > 8 )
2776 bits_needed = curr_bits_length;
2778 curr_bits_length -= bits_needed;
2779 oct <<= bits_needed;
2780 bits_in_oct -= bits_needed;
2786 curr_offset+= curr_len;
2788 EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo);
2790 return(curr_offset - offset);
2796 static const range_string gmm_cause_vals[] = {
2797 { 0x00, 0x01, "Protocol error, unspecified(Not def in v8.6.0)"},
2798 { 0x02, 0x02, "IMSI unknown in HLR"},
2799 { 0x03, 0x03, "Illegal MS"},
2800 { 0x04, 0x04, "IMSI unknown in VLR"}, /* Annex G.1 */
2801 { 0x05, 0x05, "IMEI not accepted"}, /* Annex G.1 */
2802 { 0x06, 0x06, "Illegal ME"},
2803 { 0x07, 0x07, "GPRS services not allowed"},
2804 { 0x08, 0x08, "GPRS services and non-GPRS services not allowed"},
2805 { 0x09, 0x09, "MS identity cannot be derived by the network"},
2806 { 0x0a, 0x0a, "Implicitly detached"},
2807 { 0x0b, 0x0b, "PLMN not allowed"},
2808 { 0x0c, 0x0c, "Location Area not allowed"},
2809 { 0x0d, 0x0d, "Roaming not allowed in this location area"},
2810 { 0x0e, 0x0e, "GPRS services not allowed in this PLMN"},
2811 { 0x0f, 0x0f, "No Suitable Cells In Location Area"},
2812 { 0x10, 0x10, "MSC temporarily not reachable"},
2813 { 0x11, 0x11, "Network failure"},
2814 { 0x12, 0x13, "Protocol error, unspecified(Not def in v8.6.0)"},
2815 { 0x14, 0x14, "MAC failure"},
2816 { 0x15, 0x15, "Synch failure"},
2817 { 0x16, 0x16, "Congestion"},
2818 { 0x17, 0x17, "GSM authentication unacceptable"},
2819 { 0x18, 0x18, "Protocol error, unspecified(Not def in v8.6.0)"},
2820 { 0x19, 0x19, "Not authorized for this CSG"},
2821 { 0x20, 0x20, "Service option not supported"}, /* Annex G.4 */
2822 { 0x21, 0x21, "Requested service option not subscribed"}, /* Annex G.4 */
2823 { 0x22, 0x22, "Service option temporarily out of order"}, /* Annex G.4 */
2825 { 0x23, 0x25, "Protocol error, unspecified(Not def in v8.6.0)"},
2827 { 0x26, 0x26, "Call cannot be identified(non-GPRS services only)"}, /* Annex G.4 */
2828 { 0x27, 0x27, "Protocol error, unspecified(Not def in v8.6.0)"},
2829 { 0x28, 0x28, "No PDP context activated"},
2830 { 0x29, 0x2f, "Protocol error, unspecified(Not def in v8.6.0)"},
2831 { 0x30, 0x3f, "Retry upon entry into a new cell"},
2833 { 0x40, 0x5e, "Protocol error, unspecified(Not def in v8.6.0)"},
2835 { 0x5f, 0x5f, "Semantically incorrect message"},
2836 { 0x60, 0x60, "Invalid mandatory information"},
2837 { 0x61, 0x61, "Message type non-existent or not implemented"},
2838 { 0x62, 0x62, "Message type not compatible with the protocol state"},
2839 { 0x63, 0x63, "Information element non-existent or notimplemented"},
2840 { 0x64, 0x64, "Conditional IE error"},
2841 { 0x65, 0x65, "Message not compatible with the protocol state"},
2843 { 0x66, 0x6e, "Protocol error, unspecified(Not def in v8.6.0)"},
2845 { 0x6f, 0x6f, "Protocol error, unspecified"},
2846 { 0x70, 0xff, "Protocol error, unspecified(Not def in v8.6.0)"},
2849 /* NOTE 1 TS 124 008 V8.6.0 (2009-07)
2850 "Any other value received by the mobile station shall be treated as 0110 1111, "Protocol
2851 error, unspecified". Any other value received by the network shall be treated as
2852 0110 1111, "Protocol error, unspecified".
2855 /* NOTE: The listed reject cause values are defined in annex G. */
2858 de_gmm_cause(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
2860 guint32 curr_offset;
2862 curr_offset = offset;
2864 proto_tree_add_item(tree, hf_gsm_a_gm_cause, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2868 /* no length check possible */
2870 return(curr_offset - offset);
2874 * [7] 10.5.5.15 Routing area identification
2877 de_gmm_rai(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
2879 proto_tree *subtree;
2885 guint32 curr_offset;
2887 curr_offset = offset;
2889 mcc = (tvb_get_guint8(tvb, curr_offset) & 0x0f) <<8;
2890 mcc |= (tvb_get_guint8(tvb, curr_offset) & 0xf0);
2891 mcc |= (tvb_get_guint8(tvb, curr_offset+1) & 0x0f);
2892 mnc = (tvb_get_guint8(tvb, curr_offset+2) & 0x0f) <<8;
2893 mnc |= (tvb_get_guint8(tvb, curr_offset+2) & 0xf0);
2894 mnc |= (tvb_get_guint8(tvb, curr_offset+1) & 0xf0) >>4;
2895 if ((mnc&0x000f) == 0x000f)
2898 lac = tvb_get_ntohs(tvb, curr_offset+3);
2899 rac = tvb_get_guint8(tvb, curr_offset+5);
2901 item = proto_tree_add_text(tree,
2902 tvb, curr_offset, 6,
2903 "Routing area identification: %x-%x-%u-%u",
2906 subtree = proto_item_add_subtree(item, ett_gmm_rai);
2907 dissect_e212_mcc_mnc(tvb, pinfo, subtree, offset, TRUE);
2909 proto_tree_add_item(subtree, hf_gsm_a_lac, tvb, curr_offset+3, 2, ENC_BIG_ENDIAN);
2910 proto_tree_add_item(subtree, hf_gsm_a_gm_rac, tvb, curr_offset+5, 1, ENC_BIG_ENDIAN);
2915 if (add_string[0] == '\0')
2917 g_snprintf(add_string, string_len, " - RAI: %x-%x-%u-%u", mcc,mnc,lac,rac);
2922 /* no length check possible */
2924 return(curr_offset - offset);
2928 * [7] 10.5.5.15a Routing area identification 2
2931 de_gmm_rai2(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
2933 /* The routing area identification 2 value is coded as octet 2 to 7 of the Routing area identification information element. */
2934 return de_gmm_rai(tvb, tree, pinfo, offset, len, add_string, string_len);
2941 de_gmm_update_res(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
2944 guint32 curr_offset;
2947 curr_offset = offset;
2949 oct = tvb_get_guint8(tvb, curr_offset);
2951 /* IMPORTANT - IT'S ASSUMED THAT THE INFORMATION IS IN THE HIGHER NIBBLE */
2956 case 0: str="RA updated"; break;
2957 case 1: str="combined RA/LA updated"; break;
2958 default: str="reserved";
2961 proto_tree_add_text(tree,
2962 tvb, curr_offset, 1,
2963 "Update Result: %s (%u)",
2969 /* no length check possible */
2971 return(curr_offset - offset);
2975 * [9] 10.5.5.18 Update Type
2977 static const value_string gsm_a_gm_update_type_vals[] = {
2978 { 0x00, "RA updating" },
2979 { 0x01, "combined RA/LA updating" },
2980 { 0x02, "combined RA/LA updating with IMSI attach" },
2981 { 0x03, "Periodic updating" },
2986 de_gmm_update_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
2988 proto_item *tf = NULL;
2989 proto_tree *tf_tree = NULL;
2991 proto_tree_add_bits_item(tree, hf_gsm_a_gm_ciph_key_seq_num, tvb, offset << 3, 4, ENC_BIG_ENDIAN);
2993 tf = proto_tree_add_text(tree,
2997 tf_tree = proto_item_add_subtree(tf, ett_gmm_update_type );
2999 proto_tree_add_item(tf_tree, hf_gsm_a_gm_for, tvb, offset, 1, ENC_BIG_ENDIAN);
3000 proto_tree_add_item(tf_tree, hf_gsm_a_gm_update_type, tvb, offset, 1, ENC_BIG_ENDIAN);
3002 /* no length check possible */
3007 * [9] 10.5.5.19 A&C reference number (lower nibble)
3010 de_gmm_ac_ref_nr(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
3012 /* IMPORTANT - IT'S ASSUMED THAT THE INFORMATION IS IN THE LOWER NIBBLE */
3013 proto_tree_add_bits_item(tree, hf_gsm_a_gm_ac_ref_nr, tvb, (offset << 3) + 4, 4, ENC_BIG_ENDIAN);
3015 /* no length check possible */
3020 * [9] 10.5.5.19 A&C reference number (higher nibble)
3023 de_gmm_ac_ref_nr_h(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
3025 /* IMPORTANT - IT'S ASSUMED THAT THE INFORMATION IS IN THE HIGHER NIBBLE */
3026 proto_tree_add_bits_item(tree, hf_gsm_a_gm_ac_ref_nr, tvb, offset << 3, 4, ENC_BIG_ENDIAN);
3028 /* no length check possible */
3033 * [9] 10.5.5.20 Service type
3035 static const value_string gsm_a_gm_serv_type_vals[] = {
3036 { 0x00, "Signalling" },
3038 { 0x02, "Paging response" },
3039 { 0x03, "MBMS Multicast Service Reception" },
3040 { 0x04, "MBMS Broadcast Service Reception" },
3045 de_gmm_service_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
3049 bit_offset = offset << 3;
3050 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3052 proto_tree_add_bits_item(tree, hf_gsm_a_gm_serv_type, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
3054 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3056 proto_tree_add_bits_item(tree, hf_gsm_a_gm_ciph_key_seq_num, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
3058 /* no length check possible */
3063 * [9] 10.5.5.21 Cell Notification
3068 * [9] 10.5.5.22 PS LCS Capability
3070 static const true_false_string gsm_a_gm_apc_vals = {
3071 "Additional Positioning Capabilities which can be retrieved by RRLP are supported",
3072 "Additional Positioning Capabilities which can be retrieved by RRLP are not supported"
3075 static const true_false_string gsm_a_gm_otd_a_vals = {
3076 "MS assisted E-OTD supported",
3077 "MS assisted E-OTD not supported"
3080 static const true_false_string gsm_a_gm_otd_b_vals = {
3081 "MS based E-OTD supported",
3082 "MS based E-OTD not supported"
3085 static const true_false_string gsm_a_gm_gps_a_vals = {
3086 "MS assisted GPS supported",
3087 "MS assisted GPS not supported"
3090 static const true_false_string gsm_a_gm_gps_b_vals = {
3091 "MS based GPS supported",
3092 "MS based GPS not supported"
3095 static const true_false_string gsm_a_gm_gps_c_vals = {
3096 "Conventional GPS supported",
3097 "Conventional GPS not supported"
3101 de_gmm_ps_lcs_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
3103 guint32 curr_offset;
3105 curr_offset = offset;
3106 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, curr_offset << 3, 2, ENC_BIG_ENDIAN);
3107 proto_tree_add_item(tree, hf_gsm_a_gm_apc, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3108 proto_tree_add_item(tree, hf_gsm_a_gm_otd_a, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3109 proto_tree_add_item(tree, hf_gsm_a_gm_otd_b, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3110 proto_tree_add_item(tree, hf_gsm_a_gm_gps_a, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3111 proto_tree_add_item(tree, hf_gsm_a_gm_gps_b, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3112 proto_tree_add_item(tree, hf_gsm_a_gm_gps_c, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3116 EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo);
3118 return(curr_offset - offset);
3125 de_gmm_net_feat_supp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
3128 guint32 curr_offset;
3131 curr_offset = offset;
3133 oct = tvb_get_guint8(tvb, curr_offset);
3137 case 8: str="LCS-MOLR via PS domain not supported"; break;
3138 default: str="LCS-MOLR via PS domain supported";
3141 proto_tree_add_text(tree,
3142 tvb, curr_offset, 1,
3143 "Network Feature Support: %s (%u)",
3149 /* no length check possible */
3151 return(curr_offset - offset);
3154 /* [7] 10.5.5.24 Inter RAT information container */
3156 de_gmm_rat_info_container(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
3158 guint32 curr_offset;
3159 tvbuff_t *rrc_irat_ho_info_tvb;
3161 curr_offset = offset;
3163 /* The value part of the Inter RAT information container information element is the INTER RAT HANDOVER INFO as
3164 defined in 3GPP TS 25.331 [23c]. If this field includes padding bits, they are defined in 3GPP TS 25.331 [23c].*/
3165 rrc_irat_ho_info_tvb = tvb_new_subset(tvb, curr_offset, len, len);
3166 if (rrc_irat_ho_info_handle)
3167 call_dissector(rrc_irat_ho_info_handle, rrc_irat_ho_info_tvb,pinfo , tree);
3169 proto_tree_add_text(tree, tvb, curr_offset, len,"INTER RAT HANDOVER INFO - Not decoded");
3175 /* [7] 10.5.5.25 Requested MS information */
3176 static const true_false_string gsm_a_gm_req_ms_info_irat_vals = {
3177 "Inter RAT information container IE requested",
3178 "Inter RAT information container IE not requested"
3180 static const true_false_string gsm_a_gm_req_ms_info_irat2_vals = {
3181 "E-UTRAN inter RAT information container IE requested",
3182 "E-UTRAN inter RAT information container IE not requested"
3186 de_gmm_req_ms_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
3188 guint32 curr_offset;
3191 curr_offset = offset;
3192 bit_offset = (curr_offset<<3)+4;
3194 proto_tree_add_bits_item(tree, hf_gsm_a_gm_req_ms_info_irat, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3196 proto_tree_add_bits_item(tree, hf_gsm_a_gm_req_ms_info_irat2, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3198 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
3205 /* [7] 10.5.5.26 UE network capability
3206 * See subclause 9.9.3.x in 3GPP TS 24.301 [120].
3209 /* [7] 10.5.5.27 E-UTRAN inter RAT information container */
3211 de_gmm_eutran_irat_info_container(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
3213 guint32 curr_offset;
3214 tvbuff_t *lte_rrc_ue_eutra_cap_tvb;
3216 curr_offset = offset;
3218 /* The value part of the E-UTRAN inter RAT information container information element
3219 is formatted and coded according to the UE-EUTRA-Capability IE defined in 3GPP TS 36.331 [129]*/
3220 lte_rrc_ue_eutra_cap_tvb = tvb_new_subset(tvb, curr_offset, len, len);
3221 if (lte_rrc_ue_eutra_cap_handle)
3222 call_dissector(lte_rrc_ue_eutra_cap_handle, lte_rrc_ue_eutra_cap_tvb, pinfo, tree);
3224 proto_tree_add_text(tree, tvb, curr_offset, len,"E-UTRAN Inter RAT information container - Not decoded");
3229 /* [7] 10.5.5.28 Voice domain preference and UE's usage setting */
3230 static const true_false_string gsm_a_gm_ue_usage_setting_vals = {
3234 static const value_string gsm_a_gm_voice_domain_pref_for_eutran_vals[] = {
3235 {0x0, "CS Voice only"},
3236 {0x1, "IMS PS Voice only"},
3237 {0x2, "CS voice preferred, IMS PS Voice as secondary"},
3238 {0x3, "IMS PS voice preferred, CS Voice as secondary"},
3243 de_gmm_voice_domain_pref(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
3245 guint32 curr_offset;
3248 curr_offset = offset;
3249 bit_offset = curr_offset<<3;
3251 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, 5, ENC_BIG_ENDIAN);
3253 proto_tree_add_bits_item(tree, hf_gsm_a_gm_ue_usage_setting, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3255 proto_tree_add_bits_item(tree, hf_gsm_a_gm_voice_domain_pref_for_eutran, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
3266 de_gc_context_stat(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
3270 guint32 curr_offset;
3271 proto_item *tf = NULL;
3272 proto_tree *tf_tree = NULL;
3274 curr_offset = offset;
3276 oct = tvb_get_guint8(tvb, curr_offset);
3278 tf = proto_tree_add_text(tree,
3279 tvb, curr_offset, 1,
3280 "PDP Context Status");
3282 tf_tree = proto_item_add_subtree(tf, ett_gmm_context_stat );
3284 oct = tvb_get_guint8(tvb, curr_offset);
3286 for ( pdp_nr=0;pdp_nr<16; pdp_nr++ )
3291 oct = tvb_get_guint8(tvb, curr_offset);
3293 proto_tree_add_text(tf_tree,
3294 tvb, curr_offset, 1,
3295 "NSAPI %d: %s (%u)",pdp_nr,
3303 EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo);
3305 return(curr_offset - offset);
3312 de_gc_radio_prio(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
3315 guint32 curr_offset;
3318 curr_offset = offset;
3320 oct = tvb_get_guint8(tvb, curr_offset);
3324 case 1: str="priority level 1 (highest)"; break;
3325 case 2: str="priority level 2"; break;
3326 case 3: str="priority level 3"; break;
3327 case 4: str="priority level 4 (lowest)"; break;
3328 default: str="priority level 4 (lowest)";
3331 proto_tree_add_text(tree,
3332 tvb, curr_offset, 1,
3333 "Radio Priority (PDP or SMS): %s (%u)",
3339 return(curr_offset - offset);
3343 * [9] 10.5.7.3 GPRS Timer
3345 static const value_string gsm_a_gm_gprs_timer_unit_vals[] = {
3346 { 0x00, "value is incremented in multiples of 2 seconds" },
3347 { 0x01, "value is incremented in multiples of 1 minute" },
3348 { 0x02, "value is incremented in multiples of decihours" },
3349 { 0x07, "value indicates that the timer is deactivated" },
3354 de_gc_timer(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
3359 proto_tree *subtree;
3362 oct = tvb_get_guint8(tvb, offset);
3367 case 0: str="sec"; val*=2; break;
3368 case 1: str="min"; break;
3369 case 2: str="min"; val*=6; break;
3371 proto_tree_add_text(tree,
3373 "GPRS Timer: timer is deactivated");
3378 item = proto_tree_add_text(tree,
3380 "GPRS Timer: %u %s",
3384 subtree = proto_item_add_subtree(item, ett_gmm_gprs_timer);
3385 proto_tree_add_item(subtree, hf_gsm_a_gm_gprs_timer_unit, tvb, offset, 1, ENC_BIG_ENDIAN);
3386 proto_tree_add_item(subtree, hf_gsm_a_gm_gprs_timer_value, tvb, offset, 1, ENC_BIG_ENDIAN);
3388 /* no length check possible */
3396 de_gc_timer2(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string, int string_len _U_)
3400 guint32 curr_offset;
3403 curr_offset = offset;
3405 oct = tvb_get_guint8(tvb, curr_offset);
3411 case 0: str="sec"; val*=2; break;
3412 case 1: str="min"; break;
3413 case 2: str="min"; val*=6; break;
3415 proto_tree_add_text(tree,
3416 tvb, curr_offset, 1,
3417 "GPRS Timer: timer is deactivated");
3422 proto_tree_add_text(tree,
3423 tvb, curr_offset, 1,
3424 "GPRS Timer: %u %s %s (%u)",
3426 str, add_string ? add_string : "", oct);
3430 return(curr_offset - offset);
3437 de_gc_radio_prio2(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
3440 guint32 curr_offset;
3443 curr_offset = offset;
3445 oct = tvb_get_guint8(tvb, curr_offset);
3447 /* IMPORTANT - IT'S ASSUMED THAT THE INFORMATION IS IN THE HIGHER NIBBLE */
3452 case 1: str="priority level 1 (highest)"; break;
3453 case 2: str="priority level 2"; break;
3454 case 3: str="priority level 3"; break;
3455 case 4: str="priority level 4 (lowest)"; break;
3456 default: str="priority level 4 (lowest)";
3459 proto_tree_add_text(tree,
3460 tvb, curr_offset, 1,
3461 "Radio Priority (TOM8): %s (%u)",
3467 return(curr_offset - offset);
3471 * [8] 10.5.7.6 MBMS context status
3474 de_gc_mbms_context_stat(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
3476 guint32 curr_offset;
3479 proto_item *tf = NULL;
3480 proto_tree *tf_tree = NULL;
3482 curr_offset = offset;
3484 oct = tvb_get_guint8(tvb, curr_offset);
3486 tf = proto_tree_add_text(tree,
3487 tvb, curr_offset, 1,
3488 "MBMS Context Status");
3490 tf_tree = proto_item_add_subtree(tf, ett_gmm_context_stat );
3492 for (i=0; i<len; i++)
3494 oct = tvb_get_guint8(tvb, curr_offset);
3498 proto_tree_add_text(tf_tree,
3499 tvb, curr_offset, 1,
3500 "NSAPI %d: %s (%u)",128+i*8+j,
3512 * [8] 10.5.7.7 Uplink data status
3514 static const true_false_string gsm_a_gm_nsapi_ul_stat_vals = {
3515 "uplink data are pending for the preserved PDP context",
3516 "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"
3520 de_gc_uplink_data_stat(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
3522 guint32 curr_offset;
3525 curr_offset = offset;
3526 bit_offset = curr_offset<<3;
3528 proto_tree_add_bits_item(tree, hf_gsm_a_gm_nsapi_7_ul_stat, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3530 proto_tree_add_bits_item(tree, hf_gsm_a_gm_nsapi_6_ul_stat, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3532 proto_tree_add_bits_item(tree, hf_gsm_a_gm_nsapi_5_ul_stat, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3534 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, 5, ENC_BIG_ENDIAN);
3537 proto_tree_add_bits_item(tree, hf_gsm_a_gm_nsapi_15_ul_stat, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3539 proto_tree_add_bits_item(tree, hf_gsm_a_gm_nsapi_14_ul_stat, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3541 proto_tree_add_bits_item(tree, hf_gsm_a_gm_nsapi_13_ul_stat, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3543 proto_tree_add_bits_item(tree, hf_gsm_a_gm_nsapi_12_ul_stat, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3545 proto_tree_add_bits_item(tree, hf_gsm_a_gm_nsapi_11_ul_stat, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3547 proto_tree_add_bits_item(tree, hf_gsm_a_gm_nsapi_10_ul_stat, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3549 proto_tree_add_bits_item(tree, hf_gsm_a_gm_nsapi_9_ul_stat, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3551 proto_tree_add_bits_item(tree, hf_gsm_a_gm_nsapi_8_ul_stat, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3561 #define MAX_APN_LENGTH 50
3564 de_sm_apn(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len _U_)
3566 guint32 curr_offset;
3568 guint8 str[MAX_APN_LENGTH+1];
3570 curr_offset = offset;
3572 /* init buffer and copy it */
3573 memset ( str , 0 , MAX_APN_LENGTH );
3574 tvb_memcpy(tvb, str, offset, len<MAX_APN_LENGTH?len:MAX_APN_LENGTH);
3577 while (( curr_len < len ) && ( curr_len < MAX_APN_LENGTH ))
3579 guint step = str[curr_len];
3584 proto_tree_add_text(tree,
3585 tvb, curr_offset, len,
3586 "APN: %s %s", str+1 , add_string ? add_string : "");
3590 EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo);
3592 return(curr_offset - offset);
3599 de_sm_nsapi(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string, int string_len _U_)
3602 guint32 curr_offset;
3604 curr_offset = offset;
3606 oct = tvb_get_guint8(tvb, curr_offset);
3608 proto_tree_add_text(tree,
3609 tvb, curr_offset, 1,
3610 "NSAPI: 0x%02x (%u) %s",
3611 oct&0x0f, oct&0x0f,add_string ? add_string : "");
3615 return(curr_offset - offset);
3619 * [7] 10.5.6.3 Protocol configuration options
3621 static const value_string gsm_a_sm_pco_ms2net_prot_vals[] = {
3622 { 0x01, "P-CSCF IPv6 Address Request" },
3623 { 0x02, "IM CN Subsystem Signaling Flag" },
3624 { 0x03, "DNS Server IPv6 Address Request" },
3625 { 0x04, "Not Supported" },
3626 { 0x05, "MS Support of Network Requested Bearer Control indicator" },
3627 { 0x06, "Reserved" },
3628 { 0x07, "DSMIPv6 Home Agent Address Request" },
3629 { 0x08, "DSMIPv6 Home Network Prefix Request" },
3630 { 0x09, "DSMIPv6 IPv4 Home Agent Address Request" },
3631 { 0x0a, "IP address allocation via NAS signalling" },
3632 { 0x0b, "IPv4 address allocation via DHCPv4" },
3633 { 0x0c, "P-CSCF IPv4 Address Request" },
3634 { 0x0d, "DNS Server IPv4 Address Request" },
3635 { 0x0e, "MSISDN Request" },
3638 static const value_string gsm_a_sm_pco_net2ms_prot_vals[] = {
3639 { 0x01, "P-CSCF IPv6 Address" },
3640 { 0x02, "IM CN Subsystem Signaling Flag" },
3641 { 0x03, "DNS Server IPv6 Address" },
3642 { 0x04, "Policy Control rejection code" },
3643 { 0x05, "Selected Bearer Control Mode" },
3644 { 0x06, "Reserved" },
3645 { 0x07, "DSMIPv6 Home Agent Address" },
3646 { 0x08, "DSMIPv6 Home Network Prefix" },
3647 { 0x09, "DSMIPv6 IPv4 Home Agent Address" },
3648 { 0x0a, "Reserved" },
3649 { 0x0b, "Reserved" },
3650 { 0x0c, "P-CSCF IPv4 Address" },
3651 { 0x0d, "DNS Server IPv4 Address" },
3656 static const value_string gsm_a_gm_link_dir_vals[] = {
3658 { 0x0, "MS to network" },
3659 { 0x1, "Network to MS" },
3664 de_sm_pco(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
3666 proto_item *generated_item = NULL;
3667 guint32 curr_offset;
3670 struct e_in6_addr ipv6_addr;
3674 curr_offset = offset;
3676 oct = tvb_get_guint8(tvb, curr_offset);
3678 link_dir = pinfo->link_dir;
3679 generated_item =proto_tree_add_int(tree, hf_gsm_a_gm_link_dir, tvb, curr_offset, 0, link_dir);
3680 PROTO_ITEM_SET_GENERATED(generated_item);
3683 /* 1 ext 0 0 0 0 Spare Configuration protocol */
3684 proto_tree_add_item(tree, hf_gsm_a_gm_sm_ext, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3685 /* Configuration protocol (octet 3)
3688 * 0 0 0 PPP for use with IP PDP type or IP PDN type (see 3GPP TS 24.301 [120])
3690 * All other values are interpreted as PPP in this version of the protocol.
3691 * (3GPP TS 24.008 version 9.4.0 Release 9)
3693 proto_tree_add_text(tree,tvb, curr_offset, 1, "Configuration Protocol: PPP (%u)",oct&0x07);
3697 while ( curr_len > 0 )
3702 dissector_handle_t handle = NULL;
3704 /* Protocol ID 1 octet 4
3706 * Length of protocol ID 1 contents octet 6
3707 * Protocol ID 1 contents octet 7
3710 prot = tvb_get_ntohs(tvb,curr_offset);
3711 proto_tree_add_uint_format(tree, hf_gsm_a_gm_pco_pid, tvb, curr_offset, 2, (guint32)prot,
3712 "Protocol or Container ID: %s (%u)",
3714 val_to_str_const((guint32)prot, gsm_a_sm_pco_net2ms_prot_vals, val_to_str_ext_const(prot, &ppp_vals_ext, "Unknown")) :
3715 val_to_str_const((guint32)prot, gsm_a_sm_pco_ms2net_prot_vals, val_to_str_ext_const(prot, &ppp_vals_ext, "Unknown")),
3720 e_len = tvb_get_guint8(tvb, curr_offset);
3721 proto_tree_add_text(tree,tvb, curr_offset, 1, "Length: 0x%02x (%u)", e_len , e_len);
3730 tvb_get_ipv6(tvb, curr_offset, &ipv6_addr);
3731 proto_tree_add_text(tree,
3732 tvb, curr_offset, 16,
3733 "IPv6: %s", ip6_to_str(&ipv6_addr));
3742 tvb_get_ipv6(tvb, curr_offset, &ipv6_addr);
3743 proto_tree_add_text(tree,
3744 tvb, curr_offset, 16,
3745 "IPv6: %s", ip6_to_str(&ipv6_addr));
3750 oct = tvb_get_guint8(tvb, curr_offset);
3751 proto_tree_add_text(tree,tvb, curr_offset, 1, "Reject Code: 0x%02x (%u)", e_len , e_len);
3755 handle = dissector_get_uint_handle ( gprs_sm_pco_subdissector_table , prot );
3756 if ( handle != NULL )
3759 * dissect the embedded message
3761 l3_tvb = tvb_new_subset(tvb, curr_offset, e_len, e_len);
3762 /* In this case we do not want the columns updated */
3763 col_set_writable(pinfo->cinfo, FALSE);
3764 call_dissector(handle, l3_tvb , pinfo , tree );
3765 col_set_writable(pinfo->cinfo, TRUE);
3770 * dissect the embedded DATA message
3772 l3_tvb = tvb_new_subset(tvb, curr_offset, e_len, e_len);
3773 call_dissector(data_handle, l3_tvb, pinfo , tree);
3779 curr_offset+= e_len;
3781 curr_offset+= curr_len;
3783 EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo);
3785 return(curr_offset - offset);
3789 * [9] 10.5.6.4 Packet data protocol address
3791 static const value_string gsm_a_sm_pdp_type_org_vals[] = {
3792 { 0x00, "ETSI allocated address" },
3793 { 0x01, "IETF allocated address" },
3794 { 0x0f, "Empty PDP type" },
3799 de_sm_pdp_addr(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
3801 guint32 curr_offset;
3803 guchar pdp_type_org, pdp_type_num;
3805 curr_offset = offset;
3807 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset << 3), 4, ENC_BIG_ENDIAN);
3808 proto_tree_add_item(tree, hf_gsm_a_sm_pdp_type_org, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3810 pdp_type_org = tvb_get_guint8(tvb, curr_offset) & 0x0f;
3812 pdp_type_num = tvb_get_guint8(tvb, curr_offset);
3814 if (pdp_type_org == 0 )
3816 /* ETSI allocated address */
3817 switch (pdp_type_num)
3819 case 0x00: str="Reserved, used in earlier version of this protocol"; break;
3820 case 0x01: str="PDP-type PPP"; break;
3821 default: str="reserved";
3824 else if (pdp_type_org == 1)
3826 /* IETF allocated addres */
3827 switch (pdp_type_num)
3829 case 0x21: str="IPv4 address"; break;
3830 case 0x57: str="IPv6 address"; break;
3831 case 0x8d: str="IPv4v6 address"; break;
3832 default: str="Unknown, interpreted as IPv4 address";
3835 else if ((pdp_type_num == 0) && (pdp_type_org == 0x0f))
3838 str="Not specified";
3840 proto_tree_add_text(tree,
3841 tvb, curr_offset, 1,
3842 "PDP type number: %s (%u)",str,pdp_type_num);
3844 if (( len == 2 ) && (( pdp_type_num == 0x21 ) || ( pdp_type_num == 0x57 ) || (pdp_type_num == 0x8d)))
3846 proto_tree_add_text(tree,
3847 tvb, curr_offset, 1,
3848 "Dynamic addressing");
3850 return(curr_offset - offset);
3852 else if ( len == 2 )
3854 proto_tree_add_text(tree,
3855 tvb, curr_offset, 1,
3856 "No PDP address is included");
3858 return(curr_offset - offset);
3862 if (pdp_type_org == 1)
3863 switch (pdp_type_num)
3866 proto_tree_add_item(tree,hf_gsm_a_sm_ip6_address,tvb,curr_offset,16,ENC_NA);
3871 proto_tree_add_item(tree,hf_gsm_a_sm_ip4_address,tvb,curr_offset,4,ENC_BIG_ENDIAN);
3873 proto_tree_add_item(tree,hf_gsm_a_sm_ip6_address,tvb,curr_offset,16,ENC_NA);
3878 proto_tree_add_item(tree,hf_gsm_a_sm_ip4_address,tvb,curr_offset,4,ENC_BIG_ENDIAN);
3882 EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo);
3884 return(curr_offset - offset);
3888 * [9] 10.5.6.5 Quality of service
3890 static const value_string gsm_a_qos_delay_cls_vals[] = {
3891 { 0x00, "Subscribed delay class (in MS to network direction)" },
3892 { 0x01, "Delay class 1" },
3893 { 0x02, "Delay class 2" },
3894 { 0x03, "Delay class 3" },
3895 { 0x04, "Delay class 4 (best effort)" },
3896 { 0x07, "Reserved" },
3900 static const value_string gsm_a_qos_reliability_vals[] = {
3901 { 0x00, "Subscribed reliability class (in MS to network direction)" },
3902 { 0x01, "Acknowledged GTP, LLC, and RLC; Protected data" },
3903 { 0x02, "Unacknowledged GTP, Ack LLC/RLC, Protected data" },
3904 { 0x03, "Unacknowledged GTP/LLC, Ack RLC, Protected data" },
3905 { 0x04, "Unacknowledged GTP/LLC/RLC, Protected data" },
3906 { 0x05, "Unacknowledged GTP/LLC/RLC, Unprotected data" },
3907 { 0x07, "Reserved" },
3910 /* Delivery of erroneous SDUs, octet 6 (see 3GPP TS 23.107) Bits 3 2 1 */
3911 const value_string gsm_a_qos_del_of_err_sdu_vals[] = {
3912 { 0, "Subscribed delivery of erroneous SDUs/Reserved" },
3913 { 1, "No detect('-')" },
3914 { 2, "Erroneous SDUs are delivered('yes')" },
3915 { 3, "Erroneous SDUs are not delivered('No')" },
3920 /* Delivery order, octet 6 (see 3GPP TS 23.107) Bits 5 4 3 */
3921 const value_string gsm_a_qos_del_order_vals[] = {
3922 { 0, "Subscribed delivery order/Reserved" },
3923 { 1, "With delivery order ('yes')" },
3924 { 2, "Without delivery order ('no')" },
3928 /* Traffic class, octet 6 (see 3GPP TS 23.107) Bits 8 7 6 */
3929 const value_string gsm_a_qos_traffic_cls_vals[] = {
3930 { 0, "Subscribed traffic class/Reserved" },
3931 { 1, "Conversational class" },
3932 { 2, "Streaming class" },
3933 { 3, "Interactive class" },
3934 { 4, "Background class" },
3939 /* Residual Bit Error Rate (BER), octet 10 (see 3GPP TS 23.107) Bits 8 7 6 5 */
3940 const value_string gsm_a_qos_ber_vals[] = {
3941 { 0, "Subscribed residual BER/Reserved" },
3955 /* SDU error ratio, octet 10 (see 3GPP TS 23.107) Bits 4 3 2 1 */
3956 const value_string gsm_a_qos_sdu_err_rat_vals[] = {
3957 { 0, "Subscribed SDU error ratio/Reserved" },
3969 /* Traffic handling priority, octet 11 (see 3GPP TS 23.107) Bits 2 1 */
3970 const value_string gsm_a_qos_traff_hdl_pri_vals[] = {
3971 { 0, "Subscribed traffic handling priority/Reserved" },
3972 { 1, "Priority level 1" },
3973 { 2, "Priority level 2" },
3974 { 3, "Priority level 3" },
3978 const range_string gsm_a_qos_peak_thr_vals[] = {
3979 { 0x00, 0x00, "Subscribed peak throughput/reserved" },
3980 { 0x01, 0x01, "Up to 1 000 octet/s" },
3981 { 0x02, 0x02, "Up to 2 000 octet/s" },
3982 { 0x03, 0x03, "Up to 4 000 octet/s" },
3983 { 0x04, 0x04, "Up to 8 000 octet/s" },
3984 { 0x05, 0x05, "Up to 16 000 octet/s" },
3985 { 0x06, 0x06, "Up to 32 000 octet/s" },
3986 { 0x07, 0x07, "Up to 64 000 octet/s" },
3987 { 0x08, 0x08, "Up to 128 000 octet/s" },
3988 { 0x09, 0x09, "Up to 256 000 octet/s" },
3989 { 0x0a, 0x0e, "Interpreted as Up to 1 000 octet/s" },
3990 { 0x0f, 0x0f, "Reserved" },
3994 const range_string gsm_a_qos_mean_thr_vals[] = {
3995 { 0x00, 0x00, "Subscribed peak throughput/reserved" },
3996 { 0x01, 0x01, "100 octet/h" },
3997 { 0x02, 0x02, "200 octet/h" },
3998 { 0x03, 0x03, "500 octet/h" },
3999 { 0x04, 0x04, "1 000 octet/h" },
4000 { 0x05, 0x05, "2 000 octet/h" },
4001 { 0x06, 0x06, "5 000 octet/h" },
4002 { 0x07, 0x07, "10 000 octet/h" },
4003 { 0x08, 0x08, "20 000 octet/h" },
4004 { 0x09, 0x09, "50 000 octet/h" },
4005 { 0x0a, 0x0a, "100 000 octet/h" },
4006 { 0x0b, 0x0b, "200 000 octet/h" },
4007 { 0x0c, 0x0c, "500 000 octet/h" },
4008 { 0x0d, 0x0d, "1 000 000 octet/h" },
4009 { 0x0e, 0x0e, "2 000 000 octet/h" },
4010 { 0x0f, 0x0f, "5 000 000 octet/h" },
4011 { 0x10, 0x10, "10 000 000 octet/h" },
4012 { 0x11, 0x11, "20 000 000 octet/h" },
4013 { 0x12, 0x12, "50 000 000 octet/h" },
4014 { 0x13, 0x1d, "Interpreted as Best effort" },
4015 { 0x1e, 0x1e, "Reserved" },
4016 { 0x1f, 0x1f, "Best effort" },
4020 const range_string gsm_a_qos_prec_class_vals[] = {
4021 { 0x00, 0x00, "Subscribed precedence/reserved" },
4022 { 0x01, 0x01, "High priority" },
4023 { 0x02, 0x02, "Normal priority" },
4024 { 0x03, 0x03, "Low priority" },
4025 { 0x04, 0x06, "Interpreted as Normal priority" },
4026 { 0x07, 0x07, "Reserved" },
4030 const true_false_string gsm_a_qos_signalling_ind_value = {
4031 "Optimised for signalling traffic",
4032 "Not optimised for signalling traffic"
4035 /* Helper function returning the main bitrates in kbps */
4037 qos_calc_bitrate(guint8 oct)
4042 return 64 + (oct-0x40) * 8;
4044 return 576 + (oct-0x80) * 64;
4047 /* Helper function returning the extended bitrates in kbps */
4049 qos_calc_ext_bitrate(guint8 oct)
4052 return 8600 + oct * 100;
4054 return 16000 + (oct-0x4a) * 1000;
4056 return 128000 + (oct - 0xba) * 2000;
4060 de_sm_qos(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
4062 guint32 curr_offset;
4063 guchar oct, tmp_oct;
4067 curr_offset = offset;
4070 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset << 3), 2, ENC_BIG_ENDIAN);
4071 proto_tree_add_item(tree, hf_gsm_a_qos_delay_cls, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4072 proto_tree_add_item(tree, hf_gsm_a_qos_reliability_cls, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4076 oct = tvb_get_guint8(tvb, curr_offset);
4077 proto_tree_add_item(tree, hf_gsm_a_qos_peak_thr, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4078 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset << 3) + 4, 1, ENC_BIG_ENDIAN);
4079 proto_tree_add_item(tree, hf_gsm_a_qos_prec_class, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4083 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset << 3), 3, ENC_BIG_ENDIAN);
4084 proto_tree_add_item(tree, hf_gsm_a_qos_mean_thr, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4087 NO_MORE_DATA_CHECK(len);
4090 proto_tree_add_item(tree, hf_gsm_a_qos_traffic_cls, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4091 proto_tree_add_item(tree, hf_gsm_a_qos_del_order, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4092 proto_tree_add_item(tree, hf_gsm_a_qos_del_of_err_sdu, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4095 NO_MORE_DATA_CHECK(len);
4098 oct = tvb_get_guint8(tvb, curr_offset);
4102 case 0x00: str="Subscribed maximum SDU size/reserved"; break;
4103 case 0x97: str="1502 octets"; break;
4104 case 0x98: str="1510 octets"; break;
4105 case 0x99: str="1520 octets"; break;
4106 case 0xff: str="Reserved"; break;
4107 default: str="Unspecified";
4110 if (( oct >= 1 ) && ( oct <= 0x96 ))
4111 proto_tree_add_text(tree,
4112 tvb, curr_offset, 1,
4113 "Maximum SDU size: %u octets (%u)",oct*10, oct);
4115 proto_tree_add_text(tree,
4116 tvb, curr_offset, 1,
4117 "Maximum SDU size: %s (%u)",str, oct);
4121 NO_MORE_DATA_CHECK(len);
4124 oct = tvb_get_guint8(tvb, curr_offset);
4128 case 0x00: str = "Subscribed maximum bit rate for uplink/reserved"; break;
4129 case 0xff: str = "0 kbps"; break;
4130 default: str = ep_strdup_printf("%u kbps", qos_calc_bitrate(oct));
4133 proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_max_bitrate_upl, tvb,
4134 curr_offset, 1, oct, "%s (%u)", str, oct);
4137 NO_MORE_DATA_CHECK(len);
4140 oct = tvb_get_guint8(tvb, curr_offset);
4144 case 0x00: str="Subscribed maximum bit rate for downlink/reserved"; break;
4145 case 0xff: str="0 kbps"; break;
4146 default: str = ep_strdup_printf("%u kbps", qos_calc_bitrate(oct));
4149 proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_max_bitrate_downl, tvb,
4150 curr_offset, 1, oct, "%s (%u)", str, oct);
4153 NO_MORE_DATA_CHECK(len);
4156 proto_tree_add_item(tree, hf_gsm_a_qos_ber, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4157 proto_tree_add_item(tree, hf_gsm_a_qos_sdu_err_rat, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4160 NO_MORE_DATA_CHECK(len);
4163 oct = tvb_get_guint8(tvb, curr_offset);
4168 case 0x00: str="Subscribed transfer delay/reserved"; break;
4169 case 0x3f: str="Reserved"; break;
4171 if (tmp_oct <= 0x0f)
4172 temp32 = tmp_oct * 10;
4173 else if (tmp_oct <= 0x1f)
4174 temp32 = (tmp_oct - 0x10) * 50 + 200;
4176 temp32 = (tmp_oct - 0x20) * 100 + 1000;
4177 str = ep_strdup_printf("%u ms", temp32);
4180 proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_trans_delay, tvb,
4181 curr_offset, 1, oct, "%s (%u)", str, tmp_oct);
4183 tmp_oct = oct & 0x03;
4185 str = "Subscribed traffic handling priority/reserved";
4187 str = ep_strdup_printf("Priority level %u", tmp_oct);
4189 proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_traf_handl_prio, tvb,
4190 curr_offset, 1, oct, "%s (%u)", str, tmp_oct);
4193 NO_MORE_DATA_CHECK(len);
4196 oct = tvb_get_guint8(tvb, curr_offset);
4200 case 0x00: str="Subscribed guaranteed bit rate for uplink/reserved"; break;
4201 case 0xff: str="0 kbps"; break;
4202 default: str = ep_strdup_printf("%u kbps", qos_calc_bitrate(oct));
4205 proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_guar_bitrate_upl, tvb,
4206 curr_offset, 1, oct, "%s (%u)", str, oct);
4209 NO_MORE_DATA_CHECK(len);
4212 oct = tvb_get_guint8(tvb, curr_offset);
4216 case 0x00: str="Subscribed guaranteed bit rate for downlink/reserved"; break;
4217 case 0xff: str="0 kbps"; break;
4218 default: str = ep_strdup_printf("%u kbps", qos_calc_bitrate(oct));
4221 proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_guar_bitrate_downl, tvb,
4222 curr_offset, 1, oct, "%s (%u)", str, oct);
4225 NO_MORE_DATA_CHECK(len);
4228 oct = tvb_get_guint8(tvb, curr_offset);
4229 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset << 3), 3, ENC_BIG_ENDIAN);
4230 proto_tree_add_item(tree, hf_gsm_a_qos_signalling_ind, tvb , curr_offset, 1, ENC_BIG_ENDIAN);
4233 if (tmp_oct == 0x01)
4238 proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_source_stat_desc, tvb,
4239 curr_offset, 1, oct, "%s (%u)", str, tmp_oct);
4242 NO_MORE_DATA_CHECK(len);
4245 oct = tvb_get_guint8(tvb, curr_offset);
4248 str = "Use the value indicated by the Maximum bit rate for downlink";
4251 temp32 = qos_calc_ext_bitrate(oct);
4252 if (temp32 % 1000 == 0)
4253 str = ep_strdup_printf("%u Mbps", temp32 / 1000);
4255 str = ep_strdup_printf("%u kbps", temp32);
4257 proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_max_bitrate_downl_ext, tvb,
4258 curr_offset, 1, oct, "%s (%u)", str, oct);
4261 NO_MORE_DATA_CHECK(len);
4264 oct = tvb_get_guint8(tvb, curr_offset);
4267 str = "Use the value indicated by the Guaranteed bit rate for downlink";
4270 temp32 = qos_calc_ext_bitrate(oct);
4271 if (temp32 % 1000 == 0)
4272 str = ep_strdup_printf("%u Mbps", temp32 / 1000);
4274 str = ep_strdup_printf("%u kbps", temp32);
4276 proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_guar_bitrate_downl_ext, tvb,
4277 curr_offset, 1, oct, "%s (%u)", str, oct);
4280 NO_MORE_DATA_CHECK(len);
4282 /* Maximum bit rate for uplink (extended) Octet 17 */
4283 oct = tvb_get_guint8(tvb, curr_offset);
4286 str = "Use the value indicated by the Maximum bit rate for uplink";
4289 temp32 = qos_calc_ext_bitrate(oct);
4290 if (temp32 % 1000 == 0)
4291 str = ep_strdup_printf("%u Mbps", temp32 / 1000);
4293 str = ep_strdup_printf("%u kbps", temp32);
4295 proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_max_bitrate_upl_ext, tvb,
4296 curr_offset, 1, oct, "%s (%u)", str, oct);
4299 NO_MORE_DATA_CHECK(len);
4301 /* Guaranteed bit rate for uplink (extended) Octet 18 */
4302 oct = tvb_get_guint8(tvb, curr_offset);
4305 str = "Use the value indicated by the Guaranteed bit rate for uplink";
4308 temp32 = qos_calc_ext_bitrate(oct);
4309 if (temp32 % 1000 == 0)
4310 str = ep_strdup_printf("%u Mbps", temp32 / 1000);
4312 str = ep_strdup_printf("%u kbps", temp32);
4314 proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_guar_bitrate_upl_ext, tvb,
4315 curr_offset, 1, oct, "%s (%u)", str, oct);
4319 EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo);
4321 return(curr_offset - offset);
4325 * [9] 10.5.6.6 SM cause
4327 static const value_string gsm_a_sm_cause_vals[] = {
4328 { 0x08, "Operator Determined Barring" },
4329 { 0x18, "MBMS bearer capabilities insufficient for the service" },
4330 { 0x19, "LLC or SNDCP failure(GSM only)" },
4331 { 0x1a, "Insufficient resources" },
4332 { 0x1b, "Missing or unknown APN" },
4333 { 0x1c, "Unknown PDP address or PDP type" },
4334 { 0x1d, "User Authentication failed" },
4335 { 0x1e, "Activation rejected by GGSN" },
4336 { 0x1f, "Activation rejected, unspecified" },
4337 { 0x20, "Service option not supported" },
4338 { 0x21, "Requested service option not subscribed" },
4339 { 0x22, "Service option temporarily out of order" },
4340 { 0x23, "NSAPI already used (not sent)" },
4341 { 0x24, "Regular deactivation" },
4342 { 0x25, "QoS not accepted" },
4343 { 0x26, "Network failure" },
4344 { 0x27, "Reactivation required" },
4345 { 0x28, "Feature not supported" },
4346 { 0x29, "Semantic error in the TFT operation" },
4347 { 0x2a, "Syntactical error in the TFT operation" },
4348 { 0x2b, "Unknown PDP context" },
4349 { 0x2c, "Semantic errors in packet filter(s)" },
4350 { 0x2d, "Syntactical errors in packet filter(s)" },
4351 { 0x2e, "PDP context without TFT already activated" },
4352 { 0x2f, "Multicast group membership time-out" },
4353 { 0x2c, "Semantic errors in packet filter(s)" },
4354 { 0x2d, "Syntactical errors in packet filter(s)" },
4355 { 0x30, "Activation rejected, BCM violation" },
4356 { 0x32, "PDP type IPv4 only allowed" },
4357 { 0x33, "PDP type IPv6 only allowed" },
4358 { 0x34, "Single address bearers only allowed" },
4359 { 0x51, "Invalid transaction identifier value" },
4360 { 0x5f, "Semantically incorrect message" },
4361 { 0x60, "Invalid mandatory information" },
4362 { 0x61, "Message type non-existent or not implemented" },
4363 { 0x62, "Message type not compatible with the protocol state" },
4364 { 0x63, "Information element non-existent or not implemented" },
4365 { 0x64, "Conditional IE error" },
4366 { 0x65, "Message not compatible with the protocol state" },
4367 { 0x6f, "Protocol error, unspecified" },
4368 { 0x70, "APN restriction value incompatible with active PDP context" },
4373 de_sm_cause(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
4378 oct = tvb_get_guint8(tvb, offset);
4380 /* SM Cause can be sent in both directions */
4381 str = val_to_str_const(oct, gsm_a_sm_cause_vals,
4382 "Protocol error, unspecified / Service option temporarily out of order");
4384 proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_cause, tvb,
4385 offset, 1, oct, "%s (%u)", str, oct);
4387 /* no length check possible */
4392 * [9] 10.5.6.6a SM cause 2
4395 de_sm_cause_2(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
4400 oct = tvb_get_guint8(tvb, offset);
4402 /* SM Cause 2 is sent only in the Network-to-MS direction */
4403 str = val_to_str_const(oct, gsm_a_sm_cause_vals,
4404 "Service option temporarily out of order");
4406 proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_cause_2, tvb,
4407 offset, 1, oct, "%s (%u)", str, oct);
4409 /* no length check possible */
4416 static const true_false_string gsm_a_sm_ti_flag_vals = {
4417 "The message is sent to the side that originates the TI",
4418 "The message is sent from the side that originates the TI"
4422 de_sm_linked_ti(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
4424 guint32 curr_offset;
4428 curr_offset = offset;
4430 oct = tvb_get_guint8(tvb, curr_offset);
4432 proto_tree_add_item(tree, hf_gsm_a_sm_ti_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
4434 /* The TI value and the TI flag occupy bits 5 - 7 and bit 8 of the first octet respectively.
4435 * The extended TI shall not be used unless TI values of 7 or greater are needed.
4436 * 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
4437 * value is encoded in bits 7-1 of the second octet.
4443 oct = tvb_get_guint8(tvb, curr_offset);
4445 proto_tree_add_text(tree,
4446 tvb, curr_offset, 1,
4447 "TI value: 0x%02x (%u)",oct&0x7f,oct&0x7f);
4449 proto_tree_add_item(tree, hf_gsm_a_sm_ext, tvb, offset, 1, ENC_BIG_ENDIAN);
4455 proto_tree_add_text(tree,
4456 tvb, curr_offset, 1,
4457 "TI value: 0x%02x (%u)",(oct>>4)&7,(oct>>4)&7);
4462 EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo);
4464 return(curr_offset - offset);
4468 * [9] 10.5.6.9 LLC service access point identifier
4470 static const value_string gsm_a_sm_llc_sapi_vals[] = {
4471 { 0, "LLC SAPI not assigned" },
4480 de_sm_sapi(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
4482 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, offset << 3, 4, ENC_BIG_ENDIAN);
4483 proto_tree_add_item(tree, hf_gsm_a_sm_llc_sapi, tvb, offset, 1, ENC_BIG_ENDIAN);
4485 /* no length check possible */
4490 * [9] 10.5.6.10 Tear down indicator
4492 const true_false_string gsm_a_sm_tdi_value = {
4493 "Tear down requested",
4494 "Tear down not requested"
4498 de_sm_tear_down(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
4500 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (offset << 3) + 4, 3, ENC_BIG_ENDIAN);
4501 proto_tree_add_item(tree, hf_gsm_a_sm_tdi, tvb, offset, 1, ENC_BIG_ENDIAN);
4503 /* no length check possible */
4508 * [9] 10.5.6.11 Packet Flow Identifier
4510 static const range_string gsm_a_sm_packet_flow_id_vals[] = {
4511 { 0x00, 0x00, "Best Effort"},
4512 { 0x01, 0x01, "Signaling"},
4513 { 0x02, 0x02, "SMS"},
4514 { 0x03, 0x03, "TOM8"},
4515 { 0x04, 0x07, "Reserved"},
4516 { 0x08, 0x7f, "Dynamically assigned"},
4517 { 0x00, 0x00, NULL }
4521 de_sm_pflow_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
4523 guint32 curr_offset;
4526 curr_offset = offset;
4527 value = tvb_get_guint8(tvb,curr_offset);
4528 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, curr_offset << 3, 1, ENC_BIG_ENDIAN);
4529 proto_tree_add_item(tree, hf_gsm_a_sm_packet_flow_id, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4533 g_snprintf(add_string, string_len, " - %s", rval_to_str(value, gsm_a_sm_packet_flow_id_vals, "Unknown"));
4535 EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo);
4537 return(curr_offset - offset);
4541 * [7] 10.5.6.12 TFT - Traffic Flow Template
4543 /* TFT operation code (octet 3) */
4544 static const value_string gsm_a_tft_op_code_vals[] = {
4546 { 1, "Create new TFT"},
4547 { 2, "Delete existing TFT"},
4548 { 3, "Add packet filters to existing TFT"},
4549 { 4, "Replace packet filters in existing TFT"},
4550 { 5, "Delete packet filters from existing TFT"},
4551 { 6, "No TFT operation"},
4556 static const true_false_string gsm_a_tft_e_bit = {
4557 "Parameters list is included",
4558 "Parameters list is not included"
4561 static const value_string gsm_a_tft_pkt_flt_dir_vals[] = {
4562 { 0, "Pre Rel-7 TFT filter"},
4563 { 1, "Downlink only"},
4564 { 2, "Uplink only"},
4565 { 3, "Bidirectional"},
4569 static const value_string gsm_a_tft_param_id_vals[] = {
4570 { 1, "Authorization Token"},
4571 { 2, "Flow Identifier"},
4572 { 3, "Packet Filter Identifier"},
4577 de_sm_tflow_temp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
4579 guint32 curr_offset;
4581 proto_item *tf = NULL;
4582 proto_tree *tf_tree = NULL;
4583 proto_tree *comp_tree = NULL;
4585 guchar pkt_fil_count;
4592 gint pack_component_type;
4596 curr_offset = offset;
4599 * parse first octet. It contain TFT operation code, E bit and Number of packet filters
4601 oct = tvb_get_guint8(tvb, curr_offset);
4604 pkt_fil_count = oct&0x0f;
4607 proto_tree_add_item(tree,hf_gsm_a_tft_op_code,tvb,curr_offset,1,ENC_BIG_ENDIAN);
4608 proto_tree_add_item(tree,hf_gsm_a_tft_e_bit,tvb,curr_offset,1,ENC_BIG_ENDIAN);
4609 proto_tree_add_item(tree,hf_gsm_a_tft_pkt_flt,tvb,curr_offset,1,ENC_BIG_ENDIAN);
4614 /* Packet filter list dissect */
4617 if ( op_code == 2 ) /* delete TFT contains no packet filters. so we will jump over it */
4618 count = pkt_fil_count;
4619 while ( count < pkt_fil_count )
4621 tf = proto_tree_add_text(tree,
4622 tvb, curr_offset, 1,
4623 "Packet filter %d",count); /* 0-> 7 */
4625 tf_tree = proto_item_add_subtree(tf, ett_sm_tft );
4627 if ( op_code == 5 ) /* Delete packet filters from existing TFT - just a list of identifiers */
4629 if ((curr_offset-offset)<1) {
4630 proto_tree_add_text(tf_tree,tvb, curr_offset, 1,"Not enough data");
4633 proto_tree_add_bits_item(tf_tree, hf_gsm_a_spare_bits, tvb, (curr_offset<<3), 4, ENC_BIG_ENDIAN);
4634 proto_tree_add_item(tf_tree, hf_gsm_a_tft_pkt_flt_id, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4639 else /* create new, Add packet filters or Replace packet filters */
4642 if ((curr_offset-offset)<1) {
4643 proto_tree_add_text(tf_tree,tvb, curr_offset, 1,"Not enough data");
4646 proto_tree_add_bits_item(tf_tree, hf_gsm_a_spare_bits, tvb, (curr_offset<<3), 2, ENC_BIG_ENDIAN);
4647 proto_tree_add_item(tf_tree, hf_gsm_a_tft_pkt_flt_dir, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4648 proto_tree_add_item(tf_tree, hf_gsm_a_tft_pkt_flt_id, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4652 if ((curr_offset-offset)<1) {
4653 proto_tree_add_text(tf_tree,tvb, curr_offset, 1,"Not enough data");
4656 oct = tvb_get_guint8(tvb, curr_offset);
4660 proto_tree_add_text(tf_tree,
4661 tvb, curr_offset-1, 1,
4662 "Packet evaluation precedence: 0x%02x (%u)",oct,oct );
4664 if ((curr_offset-offset)<1) { proto_tree_add_text(tf_tree,tvb, curr_offset, 1,"Not enough data"); return(len);}
4665 pf_length = tvb_get_guint8(tvb, curr_offset);
4669 proto_tree_add_text(tf_tree,
4670 tvb, curr_offset-1, 1,
4671 "Packet filter length: 0x%02x (%u)",pf_length,pf_length );
4672 /* New tree for component */
4674 /* Dissect Packet filter Component */
4675 /* while ( filter_len > 1 ) */
4676 /* packet filter component type identifier: */
4678 while (pf_length > 0 ){
4679 if ((curr_offset-offset)<1) {
4680 proto_tree_add_text(tf_tree,tvb, curr_offset, 1,"Not enough data");
4683 pack_component_type = tvb_get_guint8(tvb, curr_offset);
4688 tf=proto_tree_add_text(tf_tree,tvb, curr_offset-1, 1,"Packet filter component type identifier: ");
4689 comp_tree = proto_item_add_subtree(tf, ett_sm_tft );
4691 switch ( pack_component_type ){
4694 str="IPv4 remote address type";
4695 proto_tree_add_item(comp_tree,hf_gsm_a_sm_ip4_address,tvb,curr_offset,4,ENC_BIG_ENDIAN);
4698 proto_tree_add_item(comp_tree,hf_gsm_a_sm_ip4_mask,tvb,curr_offset,4,ENC_BIG_ENDIAN);
4705 str="IPv6 remote address type";
4706 proto_tree_add_item(comp_tree,hf_gsm_a_sm_ip6_address,tvb,curr_offset,16,ENC_NA);
4709 proto_tree_add_item(comp_tree,hf_gsm_a_sm_ip6_mask,tvb,curr_offset,16,ENC_NA);
4716 str="Protocol identifier/Next header type";
4717 proto_tree_add_item(comp_tree,hf_gsm_a_tft_protocol_header,tvb,curr_offset,1,ENC_BIG_ENDIAN);
4724 str="Single local port type";
4725 proto_tree_add_item(comp_tree,hf_gsm_a_tft_port,tvb,curr_offset,2,ENC_BIG_ENDIAN);
4732 str="Local port range type";
4733 proto_tree_add_item(comp_tree,hf_gsm_a_tft_port_low,tvb,curr_offset,2,ENC_BIG_ENDIAN);
4735 proto_tree_add_item(comp_tree,hf_gsm_a_tft_port_high,tvb,curr_offset,2,ENC_BIG_ENDIAN);
4742 str="Single remote port type";
4743 proto_tree_add_item(comp_tree,hf_gsm_a_tft_port,tvb,curr_offset,2,ENC_BIG_ENDIAN);
4750 str="Remote port range type";
4751 proto_tree_add_item(comp_tree,hf_gsm_a_tft_port_low,tvb,curr_offset,2,ENC_BIG_ENDIAN);
4753 proto_tree_add_item(comp_tree,hf_gsm_a_tft_port_high,tvb,curr_offset,2,ENC_BIG_ENDIAN);
4760 str="Security parameter index type";
4761 proto_tree_add_item(comp_tree,hf_gsm_a_tft_security,tvb,curr_offset,4,ENC_BIG_ENDIAN);
4769 str="Type of service/Traffic class type";
4770 proto_tree_add_item(comp_tree,hf_gsm_a_qos_traffic_cls,tvb,curr_offset,1,ENC_BIG_ENDIAN);
4772 proto_tree_add_item(comp_tree,hf_gsm_a_tft_traffic_mask,tvb,curr_offset,1,ENC_BIG_ENDIAN);
4779 str="Flow label type";
4780 proto_tree_add_bits_item(comp_tree, hf_gsm_a_spare_bits, tvb, (curr_offset<<3), 4, ENC_BIG_ENDIAN);
4781 proto_tree_add_item(comp_tree,hf_gsm_a_tft_flow_label_type,tvb,curr_offset,3,ENC_BIG_ENDIAN);
4788 str="not specified";
4789 curr_offset+=pf_length;
4790 curr_len-=pf_length;
4793 proto_item_append_text(tf, "%s (%u)", str, pack_component_type);
4799 /* The parameters list contains a variable number of parameters that might need to be
4800 * transferred in addition to the packet filters. If the parameters list is included, the E
4801 * bit is set to 1; otherwise, the E bit is set to 0.
4803 if ((e_bit == 1) && curr_len) {
4806 pf_length = tvb_get_guint8(tvb, curr_offset+1);
4807 tf = proto_tree_add_text(tree, tvb, curr_offset, pf_length+2, "Parameter %d" ,count);
4808 tf_tree = proto_item_add_subtree(tf, ett_sm_tft );
4809 param = tvb_get_guint8(tvb, curr_offset);
4810 proto_tree_add_item(tf_tree, hf_gsm_a_tft_param_id, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4815 proto_tree_add_text(tf_tree, tvb, curr_offset, pf_length, "Authorization token value: 0x%s",
4816 tvb_bytes_to_str(tvb, curr_offset, pf_length));
4820 proto_tree_add_text(tf_tree, tvb, curr_offset, 2, "Media Component number value: 0x%x",
4821 tvb_get_bits16(tvb, curr_offset<<3, 16, ENC_BIG_ENDIAN));
4822 proto_tree_add_text(tf_tree, tvb, curr_offset+2, 2, "IP flow number: 0x%x",
4823 tvb_get_bits16(tvb, (curr_offset+2)<<3, 16, ENC_BIG_ENDIAN));
4827 for (i = 0; i < pf_length; i++) {
4828 proto_tree_add_text(tf_tree, tvb, curr_offset+i, 1, "Packet filter identifier %d: %d",
4829 i, tvb_get_guint8(tvb, curr_offset+i));
4834 proto_tree_add_text(tf_tree, tvb, curr_offset, pf_length, "Parameter content: 0x%s",
4835 tvb_bytes_to_str(tvb, curr_offset, pf_length));
4838 curr_offset += pf_length;
4839 curr_len -= pf_length;
4844 EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo);
4850 * [9] 10.5.6.13 Temporary Mobile Group Identity (TMGI)
4853 de_sm_tmgi(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
4855 guint32 curr_offset;
4857 curr_offset = offset;
4859 proto_tree_add_item(tree, hf_gsm_a_sm_tmgi, tvb, curr_offset, 3, ENC_BIG_ENDIAN);
4862 NO_MORE_DATA_CHECK(len);
4863 curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, tree, curr_offset, TRUE);
4865 EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo);
4867 return(curr_offset - offset);
4871 * [9] 10.5.6.14 MBMS bearer capabilities
4874 de_sm_mbms_bearer_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
4876 guint32 curr_offset, temp32;
4880 curr_offset = offset;
4882 oct = tvb_get_guint8(tvb, curr_offset);
4886 case 0x00: str="Subscribed maximum bit rate for downlink/reserved"; break;
4887 case 0xff: str="0 kbps"; break;
4888 default: str = ep_strdup_printf("%u kbps", qos_calc_bitrate(oct));
4891 proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_max_bitrate_downl, tvb,
4892 curr_offset, 1, oct, "%s (%u)", str, oct);
4895 NO_MORE_DATA_CHECK(len);
4897 oct = tvb_get_guint8(tvb, curr_offset);
4900 str = "Use the value indicated by the Maximum bit rate for downlink";
4903 temp32 = qos_calc_ext_bitrate(oct);
4904 if (temp32 % 1000 == 0)
4905 str = ep_strdup_printf("%u Mbps", temp32 / 1000);
4907 str = ep_strdup_printf("%u kbps", temp32);
4909 proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_max_bitrate_downl_ext, tvb,
4910 curr_offset, 1, oct, "%s (%u)", str, oct);
4914 EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo);
4916 return(curr_offset - offset);
4920 * [9] 10.5.6.15 MBMS protocol configuration options
4923 de_sm_mbms_prot_conf_opt(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
4925 guint32 curr_offset;
4927 curr_offset = offset;
4928 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset<<3), 8, ENC_BIG_ENDIAN);
4931 EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo);
4933 return(curr_offset - offset);
4937 * [9] 10.5.6.16 Enhanced network service access point identifier
4940 de_sm_enh_nsapi(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
4945 oct = tvb_get_guint8(tvb, offset);
4949 else if (oct < 0xff)
4950 str = ep_strdup_printf("NSAPI %u for Multimedia Broadcast/Multicast Service (MBMS) Multicast mode", oct);
4952 str = "Reserved for use by lower layers in the p2p radio bearer allocation message for MBMS Broadcast mode";
4955 proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_enh_nsapi, tvb,
4956 offset, 1, oct, "%s (%u)", str, oct);
4958 /* no length check possible */
4963 * [9] 10.5.6.17 Request type
4965 static const value_string gsm_a_sm_req_type_vals[] = {
4966 { 0x01, "Initial request" },
4967 { 0x02, "Handover" },
4968 { 0x03, "Unused. If received, the network shall interpret this as \"Initial request\"." },
4973 de_sm_req_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
4975 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (offset<<3) + 4, 1, ENC_BIG_ENDIAN);
4976 proto_tree_add_item(tree, hf_gsm_a_sm_req_type, tvb, offset, 1, ENC_BIG_ENDIAN);
4978 /* no length check possible */
4983 * [9] 10.5.6.18 Notification indicator
4985 static const value_string gsm_a_sm_notif_ind_vals[] = {
4987 { 0x1, "SRVCC handover cancelled, IMS session re-establishment required"},
4992 de_sm_notif_ind(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
4994 guint32 curr_offset;
4996 curr_offset = offset;
4998 proto_tree_add_item(tree, hf_gsm_a_sm_notif_ind, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5004 guint16 (*gm_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string, int string_len) = {
5005 /* GPRS Mobility Management Information Elements 10.5.5 */
5006 de_gmm_attach_res, /* Attach Result */
5007 de_gmm_attach_type, /* Attach Type */
5008 de_gmm_ciph_alg, /* Cipher Algorithm */
5009 de_gmm_tmsi_stat, /* TMSI Status */
5010 de_gmm_detach_type, /* Detach Type */
5011 de_gmm_drx_param, /* DRX Parameter */
5012 de_gmm_ftostby, /* Force to Standby */
5013 de_gmm_ftostby_h, /* Force to Standby - Info is in the high nibble */
5014 de_gmm_ptmsi_sig, /* P-TMSI Signature */
5015 de_gmm_ptmsi_sig2, /* P-TMSI Signature 2 */
5016 de_gmm_ident_type2, /* Identity Type 2 */
5017 de_gmm_imeisv_req, /* IMEISV Request */
5018 de_gmm_rec_npdu_lst, /* Receive N-PDU Numbers List */
5019 de_gmm_ms_net_cap, /* MS Network Capability */
5020 de_gmm_ms_radio_acc_cap,/* MS Radio Access Capability */
5021 de_gmm_cause, /* GMM Cause */
5022 de_gmm_rai, /* Routing Area Identification */
5023 de_gmm_rai2, /* Routing Area Identification 2 */
5024 de_gmm_update_res, /* Update Result */
5025 de_gmm_update_type, /* Update Type */
5026 de_gmm_ac_ref_nr, /* A&C Reference Number */
5027 de_gmm_ac_ref_nr_h, /* A&C Reference Numer - Info is in the high nibble */
5028 de_gmm_service_type, /* Service Type */
5029 NULL /* no associated data */, /* Cell Notification */
5030 de_gmm_ps_lcs_cap, /* PS LCS Capability */
5031 de_gmm_net_feat_supp, /* Network Feature Support */
5032 de_gmm_rat_info_container, /* Inter RAT information container */
5033 de_gmm_req_ms_info, /* Requested MS information */
5034 NULL, /* UE network capability */
5035 de_gmm_eutran_irat_info_container, /* E-UTRAN inter RAT information container */
5036 de_gmm_voice_domain_pref, /* Voice domain preference and UE's usage setting */
5037 /* Session Management Information Elements 10.5.6 */
5038 de_sm_apn, /* Access Point Name */
5039 de_sm_nsapi, /* Network Service Access Point Identifier */
5040 de_sm_pco, /* Protocol Configuration Options */
5041 de_sm_pdp_addr, /* Packet Data Protocol Address */
5042 de_sm_qos, /* Quality Of Service */
5043 de_sm_cause, /* SM Cause */
5044 de_sm_cause_2, /* SM Cause 2 */
5045 de_sm_linked_ti, /* Linked TI */
5046 de_sm_sapi, /* LLC Service Access Point Identifier */
5047 de_sm_tear_down, /* Tear Down Indicator */
5048 de_sm_pflow_id, /* Packet Flow Identifier */
5049 de_sm_tflow_temp, /* Traffic Flow Template */
5050 de_sm_tmgi, /* Temporary Mobile Group Identity (TMGI) */
5051 de_sm_mbms_bearer_cap, /* MBMS bearer capabilities */
5052 de_sm_mbms_prot_conf_opt, /* MBMS protocol configuration options */
5053 de_sm_enh_nsapi, /* Enhanced network service access point identifier */
5054 de_sm_req_type, /* Request type */
5055 de_sm_notif_ind, /* Notification indicator */
5056 /* GPRS Common Information Elements 10.5.7 */
5057 de_gc_context_stat, /* PDP Context Status */
5058 de_gc_radio_prio, /* Radio Priority */
5059 de_gc_timer, /* GPRS Timer */
5060 de_gc_timer2, /* GPRS Timer 2 */
5061 de_gc_radio_prio2, /* Radio Priority 2 */
5062 de_gc_mbms_context_stat,/* 10.5.7.6 MBMS context status */
5063 de_gc_uplink_data_stat, /* 10.5.7.7 Uplink data status */
5067 /* MESSAGE FUNCTIONS */
5073 dtap_gmm_attach_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5075 guint32 curr_offset;
5079 curr_offset = offset;
5082 pinfo->p2p_dir = P2P_DIR_RECV;
5084 ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_MS_NET_CAP, NULL);
5086 /* Included in attach type
5088 ELEM_MAND_V(GSM_A_PDU_TYPE_COMMON, DE_CIPH_KEY_SEQ_NUM, NULL);
5093 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_ATTACH_TYPE, NULL);
5095 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_DRX_PARAM, NULL);
5097 ELEM_MAND_LV(GSM_A_PDU_TYPE_COMMON, DE_MID , NULL);
5099 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_RAI, " - Old routing area identification");
5101 ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_MS_RAD_ACC_CAP , NULL);
5103 ELEM_OPT_TV( 0x19 , GSM_A_PDU_TYPE_GM, DE_P_TMSI_SIG, " - Old P-TMSI Signature");
5105 ELEM_OPT_TV( 0x17 , GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER , " - Ready Timer" );
5107 ELEM_OPT_TV_SHORT( 0x90 , GSM_A_PDU_TYPE_GM, DE_TMSI_STAT , NULL);
5109 ELEM_OPT_TLV( 0x33 , GSM_A_PDU_TYPE_GM, DE_PS_LCS_CAP , NULL);
5111 ELEM_OPT_TLV(0x11, GSM_A_PDU_TYPE_COMMON, DE_MS_CM_2, NULL);
5113 ELEM_OPT_TLV(0x20, GSM_A_PDU_TYPE_COMMON, DE_MS_CM_3, NULL);
5115 ELEM_OPT_TLV(0x40, GSM_A_PDU_TYPE_DTAP, DE_SUP_CODEC_LIST, NULL);
5117 ELEM_OPT_TLV(0x58, NAS_PDU_TYPE_EMM, DE_EMM_UE_NET_CAP, NULL);
5119 ELEM_OPT_TLV(0x1A, GSM_A_PDU_TYPE_COMMON, DE_MID, " - Additional mobile identity");
5121 ELEM_OPT_TLV(0x1B, GSM_A_PDU_TYPE_GM, DE_RAI_2, " - Additional old routing area identification");
5123 ELEM_OPT_TLV(0x5D, GSM_A_PDU_TYPE_GM, DE_VOICE_DOMAIN_PREF, NULL);
5125 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5132 dtap_gmm_attach_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5134 guint32 curr_offset;
5138 curr_offset = offset;
5141 pinfo->p2p_dir = P2P_DIR_SENT;
5143 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND_H, NULL);
5147 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_ATTACH_RES, NULL);
5149 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER, NULL);
5151 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_RAD_PRIO_2, " - Radio priority for TOM8");
5155 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_RAD_PRIO, " - Radio priority for SMS");
5157 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_RAI, NULL);
5159 ELEM_OPT_TV( 0x19 , GSM_A_PDU_TYPE_GM, DE_P_TMSI_SIG, NULL);
5161 ELEM_OPT_TV( 0x17 , GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER , " - Negotiated Ready Timer" );
5163 ELEM_OPT_TLV( 0x18 , GSM_A_PDU_TYPE_COMMON, DE_MID , " - Allocated P-TMSI" );
5165 ELEM_OPT_TLV( 0x23 , GSM_A_PDU_TYPE_COMMON, DE_MID , NULL);
5167 ELEM_OPT_TV( 0x25 , GSM_A_PDU_TYPE_GM, DE_GMM_CAUSE , NULL);
5169 ELEM_OPT_TLV( 0x2A , GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2 , " - T3302" );
5171 ELEM_OPT_T( 0x8C , GSM_A_PDU_TYPE_GM, DE_CELL_NOT , NULL);
5173 ELEM_OPT_TLV( 0x4A , GSM_A_PDU_TYPE_COMMON, DE_PLMN_LIST , NULL);
5175 ELEM_OPT_TV_SHORT( 0xB0 , GSM_A_PDU_TYPE_GM, DE_NET_FEAT_SUP , NULL);
5177 ELEM_OPT_TLV( 0x34 , GSM_A_PDU_TYPE_DTAP, DE_EMERGENCY_NUM_LIST , NULL);
5179 ELEM_OPT_TV_SHORT( 0xA0 , GSM_A_PDU_TYPE_GM , DE_REQ_MS_INFO , NULL);
5181 ELEM_OPT_TLV( 0x37 , GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2 , " - T3319" );
5183 ELEM_OPT_TLV( 0x38 , GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2 , " - T3323" );
5185 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5192 dtap_gmm_attach_com(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5195 guint32 curr_offset;
5199 curr_offset = offset;
5202 pinfo->p2p_dir = P2P_DIR_RECV;
5204 ELEM_OPT_TLV(0x27, GSM_A_PDU_TYPE_GM, DE_RAT_INFO_CONTAINER, " - Inter RAT handover information");
5206 ELEM_OPT_TLV(0x2B, GSM_A_PDU_TYPE_GM, DE_EUTRAN_IRAT_INFO_CONTAINER, " - E-UTRAN inter RAT handover information");
5208 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5215 dtap_gmm_attach_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5217 guint32 curr_offset;
5221 curr_offset = offset;
5224 pinfo->p2p_dir = P2P_DIR_SENT;
5226 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_GMM_CAUSE, NULL);
5228 ELEM_OPT_TLV( 0x2A , GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2 , " - T3302" );
5230 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5237 dtap_gmm_detach_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5239 guint32 curr_offset;
5243 curr_offset = offset;
5246 pinfo->p2p_dir = P2P_DIR_SENT;
5248 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND_H, NULL);
5249 /* Force to standy might be wrong - To decode it correct, we need the direction */
5253 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_DETACH_TYPE, NULL);
5255 ELEM_OPT_TV( 0x25 , GSM_A_PDU_TYPE_GM, DE_GMM_CAUSE , NULL);
5257 ELEM_OPT_TLV( 0x18 , GSM_A_PDU_TYPE_COMMON, DE_MID , " - P-TMSI" );
5259 ELEM_OPT_TLV( 0x19 , GSM_A_PDU_TYPE_GM, DE_P_TMSI_SIG_2 , NULL);
5261 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5268 dtap_gmm_detach_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5270 guint32 curr_offset;
5274 curr_offset = offset;
5277 pinfo->p2p_dir = P2P_DIR_RECV;
5279 if ( curr_len != 0 )
5281 ELEM_MAND_V(GSM_A_PDU_TYPE_COMMON, DE_SPARE_NIBBLE, NULL);
5285 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND, NULL);
5288 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5295 dtap_gmm_ptmsi_realloc_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5297 guint32 curr_offset;
5301 curr_offset = offset;
5304 pinfo->p2p_dir = P2P_DIR_SENT;
5306 ELEM_MAND_LV(GSM_A_PDU_TYPE_COMMON, DE_MID , " - Allocated P-TMSI" );
5308 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_RAI, NULL);
5310 ELEM_MAND_V(GSM_A_PDU_TYPE_COMMON, DE_SPARE_NIBBLE, NULL);
5314 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND, NULL);
5316 ELEM_OPT_TV( 0x19 , GSM_A_PDU_TYPE_GM, DE_P_TMSI_SIG , " - P-TMSI Signature" );
5318 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5325 dtap_gmm_ptmsi_realloc_com(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5327 guint32 curr_offset;
5328 /* guint32 consumed; */
5331 curr_offset = offset;
5334 pinfo->p2p_dir = P2P_DIR_RECV;
5336 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5343 dtap_gmm_auth_ciph_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5345 guint32 curr_offset;
5350 curr_offset = offset;
5353 pinfo->p2p_dir = P2P_DIR_SENT;
5355 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_IMEISV_REQ, NULL);
5359 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_CIPH_ALG, NULL);
5361 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_AC_REF_NUM_H, NULL);
5365 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND, NULL);
5367 ELEM_OPT_TV( 0x21 , GSM_A_PDU_TYPE_DTAP, DE_AUTH_PARAM_RAND , NULL);
5370 ELEM_OPT_TV_SHORT( 0x08 , GSM_A_PDU_TYPE_COMMON, DE_CIPH_KEY_SEQ_NUM , NULL);
5374 oct = tvb_get_guint8(tvb, curr_offset);
5375 if (( oct & 0xf0 ) == 0x80 )
5377 /* The ciphering key sequence number is added here */
5378 proto_tree_add_text(tree,
5379 tvb, curr_offset, 1,
5380 "Ciphering key sequence number: 0x%02x (%u)",
5389 if ( curr_len == 0 )
5391 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5395 ELEM_OPT_TLV( 0x28 , GSM_A_PDU_TYPE_DTAP, DE_AUTH_PARAM_AUTN , NULL);
5397 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5404 dtap_gmm_auth_ciph_resp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5406 guint32 curr_offset;
5410 curr_offset = offset;
5413 pinfo->p2p_dir = P2P_DIR_RECV;
5415 ELEM_MAND_V(GSM_A_PDU_TYPE_COMMON, DE_SPARE_NIBBLE, NULL);
5419 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_AC_REF_NUM, NULL);
5421 ELEM_OPT_TV( 0x22 , GSM_A_PDU_TYPE_DTAP, DE_AUTH_RESP_PARAM , NULL);
5423 ELEM_OPT_TLV( 0x23 , GSM_A_PDU_TYPE_COMMON, DE_MID , " - IMEISV" );
5425 ELEM_OPT_TLV( 0x29 , GSM_A_PDU_TYPE_DTAP, DE_AUTH_RESP_PARAM_EXT , NULL);
5427 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5434 dtap_gmm_auth_ciph_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5436 guint32 curr_offset;
5439 curr_offset = offset;
5442 pinfo->p2p_dir = P2P_DIR_SENT;
5444 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5451 dtap_gmm_auth_ciph_fail(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5453 guint32 curr_offset;
5457 curr_offset = offset;
5460 pinfo->p2p_dir = P2P_DIR_RECV;
5462 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_GMM_CAUSE, NULL);
5464 ELEM_OPT_TLV( 0x30 , GSM_A_PDU_TYPE_DTAP, DE_AUTH_FAIL_PARAM , NULL);
5466 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5473 dtap_gmm_ident_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5475 guint32 curr_offset;
5478 curr_offset = offset;
5481 pinfo->p2p_dir = P2P_DIR_SENT;
5483 /* If the half octect that are about to get decoded is the LAST in the octetstream, the macro will call return BEFORE we get a chance to fix the index. The end result will be that the first half-octet will be decoded but not the last. */
5485 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_ID_TYPE_2, NULL);
5488 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND_H, NULL);
5491 elem_v(tvb, tree, pinfo, GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND_H, curr_offset, NULL);
5492 elem_v(tvb, tree, pinfo, GSM_A_PDU_TYPE_GM, DE_ID_TYPE_2, curr_offset, NULL);
5497 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5504 dtap_gmm_ident_res(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5506 guint32 curr_offset;
5510 curr_offset = offset;
5513 pinfo->p2p_dir = P2P_DIR_RECV;
5515 ELEM_MAND_LV(GSM_A_PDU_TYPE_COMMON, DE_MID , NULL);
5517 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5524 dtap_gmm_rau_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5526 guint32 curr_offset;
5530 curr_offset = offset;
5533 pinfo->p2p_dir = P2P_DIR_RECV;
5535 /* is included in update type
5536 ELEM_MAND_V(GSM_A_PDU_TYPE_COMMON, DE_CIPH_KEY_SEQ_NUM, NULL);
5541 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_UPD_TYPE, NULL);
5543 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_RAI, " - Old routing area identification");
5545 ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_MS_RAD_ACC_CAP , NULL);
5547 ELEM_OPT_TV( 0x19 , GSM_A_PDU_TYPE_GM, DE_P_TMSI_SIG , " - Old P-TMSI Signature" );
5549 ELEM_OPT_TV( 0x17 , GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER , " - Requested Ready Timer" );
5551 ELEM_OPT_TV( 0x27 , GSM_A_PDU_TYPE_GM, DE_DRX_PARAM , NULL);
5553 ELEM_OPT_TV_SHORT( 0x90 , GSM_A_PDU_TYPE_GM, DE_TMSI_STAT , NULL);
5555 ELEM_OPT_TLV( 0x18 , GSM_A_PDU_TYPE_COMMON, DE_MID , " - P-TMSI" );
5557 ELEM_OPT_TLV( 0x31 , GSM_A_PDU_TYPE_GM, DE_MS_NET_CAP , NULL);
5559 ELEM_OPT_TLV( 0x32 , GSM_A_PDU_TYPE_GM, DE_PDP_CONTEXT_STAT , NULL);
5561 ELEM_OPT_TLV( 0x33 , GSM_A_PDU_TYPE_GM, DE_PS_LCS_CAP , NULL);
5563 ELEM_OPT_TLV(0x35, GSM_A_PDU_TYPE_GM, DE_MBMS_CTX_STATUS, NULL);
5565 ELEM_OPT_TLV(0x58, NAS_PDU_TYPE_EMM, DE_EMM_UE_NET_CAP, NULL);
5567 ELEM_OPT_TLV(0x1A, GSM_A_PDU_TYPE_COMMON, DE_MID, " - Additional mobile identity");
5569 ELEM_OPT_TLV(0x1B, GSM_A_PDU_TYPE_GM, DE_RAI_2, " - Additional old routing area identification");
5571 ELEM_OPT_TLV(0x11, GSM_A_PDU_TYPE_COMMON, DE_MS_CM_2, NULL);
5573 ELEM_OPT_TLV(0x20, GSM_A_PDU_TYPE_COMMON, DE_MS_CM_3, NULL);
5575 ELEM_OPT_TLV(0x40, GSM_A_PDU_TYPE_DTAP, DE_SUP_CODEC_LIST, NULL);
5577 ELEM_OPT_TLV(0x5D, GSM_A_PDU_TYPE_GM, DE_VOICE_DOMAIN_PREF, NULL);
5579 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5586 dtap_gmm_rau_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5588 guint32 curr_offset;
5592 curr_offset = offset;
5595 pinfo->p2p_dir = P2P_DIR_SENT;
5597 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_UPD_RES, NULL);
5601 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND, NULL);
5603 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER, " - Periodic RA update timer");
5605 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_RAI, NULL);
5607 ELEM_OPT_TV( 0x19 , GSM_A_PDU_TYPE_GM, DE_P_TMSI_SIG , NULL);
5609 ELEM_OPT_TLV( 0x18 , GSM_A_PDU_TYPE_COMMON, DE_MID , " - Allocated P-TMSI");
5611 ELEM_OPT_TLV( 0x23 , GSM_A_PDU_TYPE_COMMON, DE_MID , " - MS identity");
5613 ELEM_OPT_TLV( 0x26 , GSM_A_PDU_TYPE_GM, DE_REC_N_PDU_NUM_LIST , NULL);
5615 ELEM_OPT_TV( 0x17 , GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER , " - Negotiated Ready Timer" );
5617 ELEM_OPT_TV( 0x25 , GSM_A_PDU_TYPE_GM, DE_GMM_CAUSE , NULL);
5619 ELEM_OPT_TLV( 0x2A , GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2 , " - T3302" );
5621 ELEM_OPT_T( 0x8C , GSM_A_PDU_TYPE_GM, DE_CELL_NOT , NULL);
5623 ELEM_OPT_TLV( 0x4A , GSM_A_PDU_TYPE_COMMON, DE_PLMN_LIST , NULL);
5625 ELEM_OPT_TLV( 0x32 , GSM_A_PDU_TYPE_GM, DE_PDP_CONTEXT_STAT , NULL);
5627 ELEM_OPT_TV_SHORT ( 0xB0 , GSM_A_PDU_TYPE_GM, DE_NET_FEAT_SUP , NULL);
5629 ELEM_OPT_TLV( 0x34 , GSM_A_PDU_TYPE_DTAP, DE_EMERGENCY_NUM_LIST , NULL);
5631 ELEM_OPT_TLV(0x35 , GSM_A_PDU_TYPE_GM, DE_MBMS_CTX_STATUS , NULL);
5633 ELEM_OPT_TV_SHORT(0xA0 , GSM_A_PDU_TYPE_GM , DE_REQ_MS_INFO , NULL);
5635 ELEM_OPT_TLV(0x37 , GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2 , " - T3319");
5637 ELEM_OPT_TLV(0x38 , GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2 , " - T3323");
5639 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5646 dtap_gmm_rau_com(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5648 guint32 curr_offset;
5652 curr_offset = offset;
5655 pinfo->p2p_dir = P2P_DIR_RECV;
5657 ELEM_OPT_TLV( 0x26 , GSM_A_PDU_TYPE_GM, DE_REC_N_PDU_NUM_LIST , NULL);
5658 /* Inter RAT information container 10.5.5.24 TS 24.008 version 6.8.0 Release 6 */
5659 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_RAT_INFO_CONTAINER , " - Inter RAT handover information");
5661 ELEM_OPT_TLV(0x2B, GSM_A_PDU_TYPE_GM, DE_EUTRAN_IRAT_INFO_CONTAINER, " - E-UTRAN inter RAT handover information");
5663 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5670 dtap_gmm_rau_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5672 guint32 curr_offset;
5676 curr_offset = offset;
5679 pinfo->p2p_dir = P2P_DIR_SENT;
5681 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_GMM_CAUSE, NULL);
5683 ELEM_MAND_V(GSM_A_PDU_TYPE_COMMON, DE_SPARE_NIBBLE, NULL);
5687 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND, NULL);
5689 ELEM_OPT_TLV( 0x26 , GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2 , " - T3302" );
5691 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5698 dtap_gmm_status(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5700 guint32 curr_offset;
5704 curr_offset = offset;
5707 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
5709 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_GMM_CAUSE, NULL);
5711 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5715 * [8] 9.4.19 GMM Information
5718 dtap_gmm_information(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5720 guint32 curr_offset;
5724 curr_offset = offset;
5727 pinfo->p2p_dir = P2P_DIR_SENT;
5729 ELEM_OPT_TLV( 0x43 , GSM_A_PDU_TYPE_DTAP, DE_NETWORK_NAME , " - Full Name" );
5731 ELEM_OPT_TLV( 0x45 , GSM_A_PDU_TYPE_DTAP, DE_NETWORK_NAME , " - Short Name" );
5733 ELEM_OPT_TV( 0x46 , GSM_A_PDU_TYPE_DTAP, DE_TIME_ZONE , NULL);
5735 ELEM_OPT_TV( 0x47 , GSM_A_PDU_TYPE_DTAP, DE_TIME_ZONE_TIME , NULL);
5737 ELEM_OPT_TLV( 0x48 , GSM_A_PDU_TYPE_DTAP, DE_LSA_ID , NULL);
5739 ELEM_OPT_TLV( 0x49 , GSM_A_PDU_TYPE_DTAP, DE_DAY_SAVING_TIME , NULL);
5741 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5748 dtap_gmm_service_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5750 guint32 curr_offset;
5754 curr_offset = offset;
5757 pinfo->p2p_dir = P2P_DIR_RECV;
5759 /* Is included in SRVC TYPE
5760 ELEM_MAND_V(GSM_A_PDU_TYPE_COMMON, DE_CIPH_KEY_SEQ_NUM, NULL);
5765 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_SRVC_TYPE, NULL);
5767 /* P-TMSI Mobile station identity 10.5.1.4 M LV 6 */
5768 ELEM_MAND_LV(GSM_A_PDU_TYPE_COMMON, DE_MID, NULL);
5770 ELEM_OPT_TLV( 0x32 , GSM_A_PDU_TYPE_GM, DE_PDP_CONTEXT_STAT , NULL);
5772 /* MBMS context status 10.5.7.6 TLV 2 - 18 */
5773 ELEM_OPT_TLV( 0x35 , GSM_A_PDU_TYPE_GM, DE_MBMS_CTX_STATUS , NULL);
5775 ELEM_OPT_TLV(0x36, GSM_A_PDU_TYPE_GM, DE_UPLINK_DATA_STATUS, NULL);
5777 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5784 dtap_gmm_service_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5786 guint32 curr_offset;
5790 curr_offset = offset;
5793 pinfo->p2p_dir = P2P_DIR_SENT;
5795 ELEM_OPT_TLV( 0x32 , GSM_A_PDU_TYPE_GM, DE_PDP_CONTEXT_STAT , NULL);
5797 /* MBMS context status 10.5.7.6 TLV 2 - 18 */
5798 ELEM_OPT_TLV( 0x35 , GSM_A_PDU_TYPE_GM, DE_MBMS_CTX_STATUS , NULL);
5800 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5807 dtap_gmm_service_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5809 guint32 curr_offset;
5813 curr_offset = offset;
5816 pinfo->p2p_dir = P2P_DIR_SENT;
5818 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_GMM_CAUSE, NULL);
5820 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5824 * [8] 9.5.1 Activate PDP context request
5825 * Direction: MS to network
5828 dtap_sm_act_pdp_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5830 guint32 curr_offset;
5834 curr_offset = offset;
5837 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
5839 pinfo->link_dir = P2P_DIR_UL;
5841 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_NET_SAPI, " - Requested NSAPI");
5843 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_LLC_SAPI, " - Requested LLC SAPI");
5845 ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_QOS , " - Requested QoS" );
5847 ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_PD_PRO_ADDR , " - Requested PDP address" );
5849 ELEM_OPT_TLV( 0x28 , GSM_A_PDU_TYPE_GM, DE_ACC_POINT_NAME , NULL);
5851 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL);
5853 ELEM_OPT_TV_SHORT(0xA0, GSM_A_PDU_TYPE_GM, DE_REQ_TYPE, NULL);
5855 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5859 * [9] 9.5.2 Activate PDP context accept
5860 * Direction: network to MS
5863 dtap_sm_act_pdp_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5865 guint32 curr_offset;
5869 curr_offset = offset;
5872 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
5874 pinfo->link_dir = P2P_DIR_DL;
5876 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_LLC_SAPI, " - Negotiated LLC SAPI");
5878 ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_QOS , " - Negotiated QoS" );
5881 /* This is done automatically */
5882 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_SPARE, NULL);
5887 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_RAD_PRIO, NULL);
5889 ELEM_OPT_TLV( 0x2B , GSM_A_PDU_TYPE_GM, DE_PD_PRO_ADDR , " - PDP address");
5891 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL);
5893 ELEM_OPT_TLV( 0x34 , GSM_A_PDU_TYPE_GM, DE_PACKET_FLOW_ID , NULL);
5895 ELEM_OPT_TLV( 0x39 , GSM_A_PDU_TYPE_GM, DE_SM_CAUSE_2, " - SM cause");
5897 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5901 * [8] 9.5.3 Activate PDP context reject
5902 * Direction: network to MS
5905 dtap_sm_act_pdp_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5907 guint32 curr_offset;
5911 curr_offset = offset;
5914 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
5916 pinfo->link_dir = P2P_DIR_DL;
5918 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL);
5920 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL);
5922 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5926 * [8] 9.5.4 Activate Secondary PDP Context Request
5927 * Direction: MS to network
5930 dtap_sm_act_sec_pdp_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5932 guint32 curr_offset;
5936 curr_offset = offset;
5939 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
5941 pinfo->link_dir = P2P_DIR_UL;
5943 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_NET_SAPI, " - Requested NSAPI");
5945 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_LLC_SAPI, " - Requested LLC SAPI");
5947 ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_QOS , " - Requested QoS" );
5949 ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_LINKED_TI , NULL);
5951 /* 3GPP TS 24.008 version 6.8.0 Release 6, 36 TFT Traffic Flow Template 10.5.6.12 O TLV 3-257 */
5952 ELEM_OPT_TLV( 0x36 , GSM_A_PDU_TYPE_GM, DE_TRAFFIC_FLOW_TEMPLATE , NULL);
5954 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL);
5956 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5960 * [7] 9.5.5 Activate Secondary PDP Context Accept
5961 * Direction: network to MS
5964 dtap_sm_act_sec_pdp_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5966 guint32 curr_offset;
5970 curr_offset = offset;
5973 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
5975 pinfo->link_dir = P2P_DIR_DL;
5977 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_LLC_SAPI, " - Negotiated LLC SAPI");
5979 ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_QOS , " - Negotiated QoS" );
5981 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_RAD_PRIO, NULL);
5984 /* This is done automatically */
5985 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_SPARE, NULL);
5990 ELEM_OPT_TLV( 0x34 , GSM_A_PDU_TYPE_GM, DE_PACKET_FLOW_ID , NULL);
5992 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL);
5994 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5998 * [8] 9.5.6 Activate Secondary PDP Context Reject
5999 * Direction: network to MS
6002 dtap_sm_act_sec_pdp_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
6004 guint32 curr_offset;
6008 curr_offset = offset;
6011 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
6013 pinfo->link_dir = P2P_DIR_DL;
6015 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL);
6017 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL);
6019 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
6023 * [8] 9.5.7 Request PDP context activation
6024 * Direction: network to MS
6027 dtap_sm_req_pdp_act(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
6029 guint32 curr_offset;
6033 curr_offset = offset;
6036 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
6038 pinfo->link_dir = P2P_DIR_DL;
6040 ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_PD_PRO_ADDR , " - Offered PDP address" );
6042 ELEM_OPT_TLV( 0x28 , GSM_A_PDU_TYPE_GM, DE_ACC_POINT_NAME , NULL);
6044 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL);
6046 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
6050 * [8] 9.5.8 Request PDP context activation reject
6051 * Direction: MS to network
6054 dtap_sm_req_pdp_act_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
6056 guint32 curr_offset;
6060 curr_offset = offset;
6063 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
6065 pinfo->link_dir = P2P_DIR_UL;
6067 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL);
6069 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL);
6071 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
6075 * [8] 9.5.9 Modify PDP context request (Network to MS direction)
6076 * Direction: network to MS
6079 dtap_sm_mod_pdp_req_net(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
6081 guint32 curr_offset;
6085 curr_offset = offset;
6088 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
6090 pinfo->link_dir = P2P_DIR_DL;
6092 ELEM_MAND_V(GSM_A_PDU_TYPE_GM,DE_RAD_PRIO, NULL);
6094 /* This is done automatically */
6095 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_SPARE, NULL);
6100 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_LLC_SAPI, " - Requested LLC SAPI");
6102 ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_QOS , " - New QoS" );
6104 ELEM_OPT_TLV( 0x2B , GSM_A_PDU_TYPE_GM, DE_PD_PRO_ADDR , " - PDP address");
6106 ELEM_OPT_TLV( 0x34 , GSM_A_PDU_TYPE_GM, DE_PACKET_FLOW_ID , NULL);
6108 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL);
6110 ELEM_OPT_TLV(0x36 , GSM_A_PDU_TYPE_GM, DE_TRAFFIC_FLOW_TEMPLATE , NULL);
6112 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
6116 * [8] 9.5.10 Modify PDP context request (MS to network direction)
6117 * Direction: MS to network
6120 dtap_sm_mod_pdp_req_ms(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
6122 guint32 curr_offset;
6126 curr_offset = offset;
6129 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
6131 pinfo->link_dir = P2P_DIR_UL;
6133 ELEM_OPT_TV( 0x32 , GSM_A_PDU_TYPE_GM, DE_LLC_SAPI , " - Requested LLC SAPI" );
6135 ELEM_OPT_TLV( 0x30 , GSM_A_PDU_TYPE_GM, DE_QOS , " - Requested new QoS" );
6137 ELEM_OPT_TLV( 0x31 , GSM_A_PDU_TYPE_GM, DE_TRAFFIC_FLOW_TEMPLATE , " - New TFT" );
6139 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL);
6141 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
6145 * [8] 9.5.11 Modify PDP context accept (MS to network direction)
6146 * Direction: MS to network
6149 dtap_sm_mod_pdp_acc_ms(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
6151 guint32 curr_offset;
6155 curr_offset = offset;
6158 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
6160 pinfo->link_dir = P2P_DIR_UL;
6162 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL);
6164 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
6168 * [8] 9.5.12 Modify PDP context accept (Network to MS direction)
6169 * Direction: Network to MS
6172 dtap_sm_mod_pdp_acc_net(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
6174 guint32 curr_offset;
6178 curr_offset = offset;
6181 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
6183 pinfo->link_dir = P2P_DIR_DL;
6185 ELEM_OPT_TLV( 0x30 , GSM_A_PDU_TYPE_GM, DE_QOS , " - Negotiated QoS" );
6187 ELEM_OPT_TV( 0x32 , GSM_A_PDU_TYPE_GM, DE_LLC_SAPI , " - Negotiated LLC SAPI" );
6189 ELEM_OPT_TV_SHORT ( 0x80 , GSM_A_PDU_TYPE_GM , DE_RAD_PRIO , " - New radio priority" );
6191 ELEM_OPT_TLV( 0x34 , GSM_A_PDU_TYPE_GM, DE_PACKET_FLOW_ID , NULL);
6193 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL);
6195 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
6199 * [8] 9.5.13 Modify PDP Context Reject
6203 dtap_sm_mod_pdp_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
6205 guint32 curr_offset;
6209 curr_offset = offset;
6212 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
6213 /* Network or the MS */
6214 pinfo->link_dir = LINK_DIR_UNKNOWN;
6217 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL);
6219 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL);
6221 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
6225 * [8] 9.5.14 Deactivate PDP context request
6229 dtap_sm_deact_pdp_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
6231 guint32 curr_offset;
6235 curr_offset = offset;
6238 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
6239 pinfo->link_dir = LINK_DIR_UNKNOWN;
6241 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL);
6243 ELEM_OPT_TV_SHORT( 0x90 , GSM_A_PDU_TYPE_GM , DE_TEAR_DOWN_IND , NULL);
6245 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL);
6247 /* MBMS context status 10.5.7.6 TLV 2 - 18 */
6248 ELEM_OPT_TLV( 0x35 , GSM_A_PDU_TYPE_GM, DE_MBMS_CTX_STATUS , NULL);
6250 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
6254 * [8] 9.5.15 Deactivate PDP context accept
6258 dtap_sm_deact_pdp_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
6260 guint32 curr_offset;
6264 curr_offset = offset;
6267 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
6268 pinfo->link_dir = LINK_DIR_UNKNOWN;
6270 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL);
6272 /* MBMS context status 10.5.7.6 TLV 2 - 18 */
6273 ELEM_OPT_TLV( 0x35 , GSM_A_PDU_TYPE_GM, DE_MBMS_CTX_STATUS , NULL);
6275 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
6279 * [8] 9.5.15a Request Secondary PDP Context Activation
6280 * Direction: network to MS
6283 dtap_sm_req_sec_pdp_act(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
6285 guint32 curr_offset;
6289 curr_offset = offset;
6292 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
6293 pinfo->link_dir = P2P_DIR_DL;
6295 /* Required QoS Quality of service 10.5.6.5 M LV 13-17 */
6296 ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_QOS , " - Required QoS");
6298 /* Linked TI Linked TI 10.5.6.7 M LV 2-3 */
6299 ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_LINKED_TI , NULL);
6301 /* 36 TFT Traffic Flow Template 10.5.6.12 O TLV 3-257 */
6302 ELEM_OPT_TLV(0x36, GSM_A_PDU_TYPE_GM, DE_TRAFFIC_FLOW_TEMPLATE, NULL);
6304 /* 27 Protocol configuration options Protocol configuration options 10.5.6.3 O TLV 3
\96 253 */
6305 ELEM_OPT_TLV(0x27, GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT, NULL);
6307 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
6311 * [8] 9.5.15b Request Secondary PDP Context Activation Reject
6312 * Direction: MS to network
6315 dtap_sm_req_sec_pdp_act_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
6317 guint32 curr_offset;
6321 curr_offset = offset;
6324 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
6325 pinfo->link_dir = P2P_DIR_UL;
6327 /* SM cause SM cause 10.5.6.6 M V 1 */
6328 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL);
6330 /* 27 Protocol configuration options Protocol configuration options 10.5.6.3 O TLV 3
\96 253 */
6331 ELEM_OPT_TLV(0x27, GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT, NULL);
6333 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
6337 * [8] 9.5.16a Notification
6338 * Direction: network to MS
6341 dtap_sm_notif(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
6343 guint32 curr_offset;
6347 curr_offset = offset;
6350 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
6351 pinfo->link_dir = P2P_DIR_DL;
6353 ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_SM_NOTIF_IND, NULL);
6355 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
6359 * [8] 9.5.21 SM Status
6363 dtap_sm_status(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
6365 guint32 curr_offset;
6369 curr_offset = offset;
6372 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
6373 pinfo->link_dir = LINK_DIR_UNKNOWN;
6375 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL);
6377 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
6381 * [9] 9.5.22 Activate MBMS Context Request
6382 * Direction: MS to network
6385 dtap_sm_act_mbms_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
6387 guint32 curr_offset;
6391 curr_offset = offset;
6394 pinfo->p2p_dir = P2P_DIR_RECV;
6396 /* Requested MBMS NSAPI Enhanced Network service access point identifier 10.5.6.16 M V */
6397 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_ENH_NSAPI, " - Requested MBMS NSAPI");
6399 /* Requested LLC SAPI LLC service access point identifier 10.5.6.9 M V 1 */
6400 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_LLC_SAPI, " - Requested LLC SAPI");
6402 /* Supported MBMS bearer capabilities MBMS bearer capabilities 10.5.6.14 M LV 2 - 3 */
6403 ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_MBMS_BEARER_CAP , NULL );
6405 /* Requested multicast address Packet data protocol address 10.5.6.4 M LV 3 - 19 */
6406 ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_PD_PRO_ADDR , " - Requested multicast address" );
6408 /* Access point name Access point name 10.5.6.1 M LV 2 - 101 */
6409 ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_ACC_POINT_NAME , NULL );
6411 /* 35 MBMS protocol configuration options MBMS protocol configuration options 10.5.6.15 O TLV 3 - 253 */
6412 ELEM_OPT_TLV( 0x35 , GSM_A_PDU_TYPE_GM, DE_MBMS_PROT_CONF_OPT , NULL);
6414 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
6418 * [9] 9.5.23 Activate MBMS Context Accept
6419 * Direction: network to MS
6422 dtap_sm_act_mbms_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
6424 guint32 curr_offset;
6428 curr_offset = offset;
6431 pinfo->p2p_dir = P2P_DIR_SENT;
6433 ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_TMGI, NULL);
6435 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_LLC_SAPI, " - Negotiated LLC SAPI");
6437 ELEM_OPT_TLV( 0x35 , GSM_A_PDU_TYPE_GM, DE_MBMS_PROT_CONF_OPT , NULL);
6439 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
6443 * [9] 9.5.24 Activate MBMS Context Reject
6444 * Direction: network to MS
6447 dtap_sm_act_mbms_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
6449 guint32 curr_offset;
6453 curr_offset = offset;
6456 pinfo->p2p_dir = P2P_DIR_SENT;
6458 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL);
6460 ELEM_OPT_TLV( 0x35 , GSM_A_PDU_TYPE_GM, DE_MBMS_PROT_CONF_OPT , NULL);
6462 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
6466 * [9] 9.5.25 Request MBMS Context Activation
6467 * Direction: network to MS
6470 dtap_sm_req_mbms_act(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
6472 guint32 curr_offset;
6476 curr_offset = offset;
6479 pinfo->p2p_dir = P2P_DIR_SENT;
6481 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_NET_SAPI, " - Linked NSAPI");
6483 ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_PD_PRO_ADDR , " - Offered multicast address" );
6485 ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_ACC_POINT_NAME , NULL );
6487 ELEM_OPT_TLV( 0x35 , GSM_A_PDU_TYPE_GM, DE_MBMS_PROT_CONF_OPT , NULL);
6489 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
6493 * [8] 9.5.26 Request MBMS Context Activation Reject
6494 * Direction: MS to network
6497 dtap_sm_req_mbms_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
6499 guint32 curr_offset;
6503 curr_offset = offset;
6506 pinfo->p2p_dir = P2P_DIR_RECV;
6508 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL);
6510 ELEM_OPT_TLV( 0x35 , GSM_A_PDU_TYPE_GM, DE_MBMS_PROT_CONF_OPT , NULL);
6512 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
6515 #define NUM_GSM_DTAP_MSG_GMM (sizeof(gsm_a_dtap_msg_gmm_strings)/sizeof(value_string))
6516 static gint ett_gsm_dtap_msg_gmm[NUM_GSM_DTAP_MSG_GMM];
6517 static void (*dtap_msg_gmm_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len) = {
6518 dtap_gmm_attach_req, /* Attach Request */
6519 dtap_gmm_attach_acc, /* Attach Accept */
6520 dtap_gmm_attach_com, /* Attach Complete */
6521 dtap_gmm_attach_rej, /* Attach Reject */
6522 dtap_gmm_detach_req, /* Detach Request */
6523 dtap_gmm_detach_acc, /* Detach Accept */
6524 dtap_gmm_rau_req, /* Routing Area Update Request */
6525 dtap_gmm_rau_acc, /* Routing Area Update Accept */
6526 dtap_gmm_rau_com, /* Routing Area Update Complete */
6527 dtap_gmm_rau_rej, /* Routing Area Update Reject */
6528 dtap_gmm_service_req, /* Service Request */
6529 dtap_gmm_service_acc, /* Service Accept */
6530 dtap_gmm_service_rej, /* Service Reject */
6531 dtap_gmm_ptmsi_realloc_cmd, /* P-TMSI Reallocation Command */
6532 dtap_gmm_ptmsi_realloc_com, /* P-TMSI Reallocation Complete */
6533 dtap_gmm_auth_ciph_req, /* Authentication and Ciphering Req */
6534 dtap_gmm_auth_ciph_resp, /* Authentication and Ciphering Resp */
6535 dtap_gmm_auth_ciph_rej, /* Authentication and Ciphering Rej */
6536 dtap_gmm_auth_ciph_fail, /* Authentication and Ciphering Failure */
6537 dtap_gmm_ident_req, /* Identity Request */
6538 dtap_gmm_ident_res, /* Identity Response */
6539 dtap_gmm_status, /* GMM Status */
6540 dtap_gmm_information, /* GMM Information */
6544 #define NUM_GSM_DTAP_MSG_SM (sizeof(gsm_a_dtap_msg_sm_strings)/sizeof(value_string))
6545 static gint ett_gsm_dtap_msg_sm[NUM_GSM_DTAP_MSG_SM];
6546 static void (*dtap_msg_sm_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len) = {
6547 dtap_sm_act_pdp_req, /* Activate PDP Context Request */
6548 dtap_sm_act_pdp_acc, /* Activate PDP Context Accept */
6549 dtap_sm_act_pdp_rej, /* Activate PDP Context Reject */
6550 dtap_sm_req_pdp_act, /* Request PDP Context Activation */
6551 dtap_sm_req_pdp_act_rej, /* Request PDP Context Activation rej. */
6552 dtap_sm_deact_pdp_req, /* Deactivate PDP Context Request */
6553 dtap_sm_deact_pdp_acc, /* Deactivate PDP Context Accept */
6554 dtap_sm_mod_pdp_req_net, /* Modify PDP Context Request(Network to MS direction) */
6555 dtap_sm_mod_pdp_acc_ms, /* Modify PDP Context Accept (MS to network direction) */
6556 dtap_sm_mod_pdp_req_ms, /* Modify PDP Context Request(MS to network direction) */
6557 dtap_sm_mod_pdp_acc_net, /* Modify PDP Context Accept (Network to MS direction) */
6558 dtap_sm_mod_pdp_rej, /* Modify PDP Context Reject */
6559 dtap_sm_act_sec_pdp_req, /* Activate Secondary PDP Context Request */
6560 dtap_sm_act_sec_pdp_acc, /* Activate Secondary PDP Context Accept */
6561 dtap_sm_act_sec_pdp_rej, /* Activate Secondary PDP Context Reject */
6562 NULL, /* Reserved: was allocated in earlier phases of the protocol */
6563 NULL, /* Reserved: was allocated in earlier phases of the protocol */
6564 NULL, /* Reserved: was allocated in earlier phases of the protocol */
6565 NULL, /* Reserved: was allocated in earlier phases of the protocol */
6566 NULL, /* Reserved: was allocated in earlier phases of the protocol */
6567 dtap_sm_status, /* SM Status */
6568 dtap_sm_act_mbms_req, /* Activate MBMS Context Request */
6569 dtap_sm_act_mbms_acc, /* Activate MBMS Context Accept */
6570 dtap_sm_act_mbms_rej, /* Activate MBMS Context Reject */
6571 dtap_sm_req_mbms_act, /* Request MBMS Context Activation */
6572 dtap_sm_req_mbms_rej, /* Request MBMS Context Activation Reject */
6573 dtap_sm_req_sec_pdp_act, /* Request Secondary PDP Context Activation */
6574 dtap_sm_req_sec_pdp_act_rej,/* Request Secondary PDP Context Activation Reject */
6575 dtap_sm_notif, /* Notification */
6579 void get_gmm_msg_params(guint8 oct, const gchar **msg_str, int *ett_tree, int *hf_idx, msg_fcn *dtap_msg_fcn)
6583 *msg_str = match_strval_idx((guint32) (oct & DTAP_GMM_IEI_MASK), gsm_a_dtap_msg_gmm_strings, &idx);
6584 *ett_tree = ett_gsm_dtap_msg_gmm[idx];
6585 *hf_idx = hf_gsm_a_dtap_msg_gmm_type;
6586 *dtap_msg_fcn = dtap_msg_gmm_fcn[idx];
6591 void get_sm_msg_params(guint8 oct, const gchar **msg_str, int *ett_tree, int *hf_idx, msg_fcn *dtap_msg_fcn)
6595 *msg_str = match_strval_idx((guint32) (oct & DTAP_SM_IEI_MASK), gsm_a_dtap_msg_sm_strings, &idx);
6596 *ett_tree = ett_gsm_dtap_msg_sm[idx];
6597 *hf_idx = hf_gsm_a_dtap_msg_sm_type;
6598 *dtap_msg_fcn = dtap_msg_sm_fcn[idx];
6603 /* Register the protocol with Wireshark */
6605 proto_register_gsm_a_gm(void)
6610 /* Setup list of header fields */
6612 static hf_register_info hf[] =
6614 { &hf_gsm_a_dtap_msg_gmm_type,
6615 { "DTAP GPRS Mobility Management Message Type", "gsm_a.dtap_msg_gmm_type",
6616 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_msg_gmm_strings), 0x0,
6619 { &hf_gsm_a_dtap_msg_sm_type,
6620 { "DTAP GPRS Session Management Message Type", "gsm_a.dtap_msg_sm_type",
6621 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_msg_sm_strings), 0x0,
6624 { &hf_gsm_a_gm_elem_id,
6625 { "Element ID", "gsm_a_gm.elem_id",
6626 FT_UINT8, BASE_DEC, NULL, 0,
6629 { &hf_gsm_a_qos_delay_cls,
6630 { "Quality of Service Delay class", "gsm_a.qos.delay_cls",
6631 FT_UINT8, BASE_DEC, VALS(gsm_a_qos_delay_cls_vals), 0x38,
6634 { &hf_gsm_a_qos_reliability_cls,
6635 { "Reliability class", "gsm_a.qos.delay_cls",
6636 FT_UINT8, BASE_DEC, VALS(gsm_a_qos_delay_cls_vals), 0x07,
6639 { &hf_gsm_a_qos_traffic_cls,
6640 { "Traffic class", "gsm_a.qos.traffic_cls",
6641 FT_UINT8, BASE_DEC, VALS(gsm_a_qos_traffic_cls_vals), 0xe0,
6644 { &hf_gsm_a_qos_del_order,
6645 { "Delivery order", "gsm_a.qos.del_order",
6646 FT_UINT8, BASE_DEC, VALS(gsm_a_qos_del_order_vals), 0x18,
6649 { &hf_gsm_a_qos_del_of_err_sdu,
6650 { "Delivery of erroneous SDUs", "gsm_a.qos.del_of_err_sdu",
6651 FT_UINT8, BASE_DEC, VALS(gsm_a_qos_del_of_err_sdu_vals), 0x07,
6654 { &hf_gsm_a_qos_ber,
6655 { "Residual Bit Error Rate (BER)", "gsm_a.qos.ber",
6656 FT_UINT8, BASE_DEC, VALS(gsm_a_qos_ber_vals), 0xf0,
6659 { &hf_gsm_a_qos_sdu_err_rat,
6660 { "SDU error ratio", "gsm_a.qos.sdu_err_rat",
6661 FT_UINT8, BASE_DEC, VALS(gsm_a_qos_sdu_err_rat_vals), 0x0f,
6664 { &hf_gsm_a_qos_traff_hdl_pri,
6665 { "Traffic handling priority", "gsm_a.qos.traff_hdl_pri",
6666 FT_UINT8, BASE_DEC, VALS(gsm_a_qos_traff_hdl_pri_vals), 0x03,
6669 { &hf_gsm_a_gmm_split_on_ccch,
6670 { "SPLIT on CCCH","gsm_a.gmm.split_on_ccch",
6671 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_split_on_ccch_value), 0x08,
6674 { &hf_gsm_a_gmm_non_drx_timer,
6675 { "Non-DRX timer","gsm_a.gmm.non_drx_timer",
6676 FT_UINT8, BASE_DEC, VALS(gsm_a_gmm_non_drx_timer_strings), 0x07,
6679 { &hf_gsm_a_gmm_cn_spec_drs_cycle_len_coef,
6680 { "CN Specific DRX cycle length coefficient","gsm_a.gmm.cn_spec_drs_cycle_len_coef",
6681 FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gsm_a_gmm_cn_spec_drs_cycle_len_coef_strings), 0xf0,
6684 { &hf_gsm_a_tft_op_code,
6685 { "TFT operation code", "gsm_a.tft.op_code",
6686 FT_UINT8, BASE_DEC, VALS(gsm_a_tft_op_code_vals), 0xe0,
6689 { &hf_gsm_a_tft_e_bit,
6690 { "E bit","gsm_a.tft.e_bit",
6691 FT_BOOLEAN, 8, TFS(&gsm_a_tft_e_bit), 0x10,
6694 { &hf_gsm_a_tft_pkt_flt,
6695 { "Number of packet filters", "gsm_a.tft.pkt_flt",
6696 FT_UINT8, BASE_DEC, NULL, 0x0f,
6699 { &hf_gsm_a_tft_pkt_flt_dir,
6700 { "Packet filter direction", "gsm_a.tft.pkt_flt_dir",
6701 FT_UINT8, BASE_DEC, VALS(gsm_a_tft_pkt_flt_dir_vals), 0x30,
6704 { &hf_gsm_a_tft_pkt_flt_id,
6705 { "Packet filter identifier", "gsm_a.tft.pkt_flt_id",
6706 FT_UINT8, BASE_DEC, NULL, 0x0f,
6709 { &hf_gsm_a_sm_ip4_address,
6710 { "IPv4 address", "gsm_a.sm.ip4_address",
6711 FT_IPv4, BASE_NONE, NULL, 0x0,
6714 { &hf_gsm_a_sm_ip4_mask,
6715 { "IPv4 address mask", "gsm_a.sm.ip4_mask",
6716 FT_IPv4, BASE_NONE, NULL, 0x0,
6719 { &hf_gsm_a_sm_ip6_address,
6720 { "IPv6 address", "gsm_a.sm.ip6_address",
6721 FT_IPv6, BASE_NONE, NULL, 0x0,
6724 { &hf_gsm_a_sm_ip6_mask,
6725 { "IPv6 address mask", "gsm_a.sm.ip6_mask",
6726 FT_IPv6, BASE_NONE, NULL, 0x0,
6729 { &hf_gsm_a_tft_protocol_header,
6730 { "Protocol/header", "gsm_a.tft.protocol_header",
6731 FT_UINT8, BASE_HEX, NULL, 0x0,
6734 { &hf_gsm_a_tft_port,
6735 { "Port", "gsm_a.tft.port",
6736 FT_UINT16, BASE_DEC, NULL, 0x0,
6739 { &hf_gsm_a_tft_port_low,
6740 { "Low limit port", "gsm_a.tft.port_low",
6741 FT_UINT16, BASE_DEC, NULL, 0x0,
6744 { &hf_gsm_a_tft_port_high,
6745 { "High limit port", "gsm_a.tft.port_high",
6746 FT_UINT16, BASE_DEC, NULL, 0x0,
6749 { &hf_gsm_a_tft_security,
6750 { "IPSec security parameter index", "gsm_a.tft.security",
6751 FT_UINT32, BASE_HEX, NULL, 0x0,
6754 { &hf_gsm_a_tft_traffic_mask,
6755 { "Mask field", "gsm_a.tft.traffic_mask",
6756 FT_UINT8, BASE_HEX, NULL, 0x0,
6759 { &hf_gsm_a_tft_flow_label_type,
6760 { "Flow Label Type", "gsm_a.tft.flow_label_type",
6761 FT_UINT24, BASE_HEX, NULL, 0x0FFFFF,
6764 { &hf_gsm_a_tft_param_id,
6765 { "Parameter identifier", "gsm_a.tft.param_id",
6766 FT_UINT8, BASE_DEC, VALS(gsm_a_tft_param_id_vals), 0x0,
6769 { &hf_gsm_a_ptmsi_sig,
6770 { "P-TMSI Signature", "gsm_a.ptmsi_sig",
6771 FT_UINT24, BASE_HEX, NULL, 0x0,
6774 { &hf_gsm_a_ptmsi_sig2,
6775 { "P-TMSI Signature 2", "gsm_a.ptmsi_sig2",
6776 FT_UINT24, BASE_HEX, NULL, 0x0,
6779 { &hf_gsm_a_gm_acc_tech_type,
6780 { "Access Technology Type", "gsm_a.gm.acc_tech_type",
6781 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_acc_tech_type_vals), 0x0,
6784 { &hf_gsm_a_gm_acc_cap_struct_len,
6785 { "Length in bits", "gsm_a.gm.acc_cap_struct_len",
6786 FT_UINT8, BASE_HEX_DEC,NULL, 0x0,
6789 { &hf_gsm_a_gm_sms_value,
6790 { "SMS_VALUE (Switch-Measure-Switch)", "gsm_a.gm.sms",
6791 FT_UINT8, BASE_DEC, VALS(gsm_a_sms_vals), 0x0,
6794 { &hf_gsm_a_gm_sm_value,
6795 { "(SM_VALUE) Switch-Measure", "gsm_a.gm.sm",
6796 FT_UINT8, BASE_DEC, VALS(gsm_a_sms_vals), 0x0,
6799 { &hf_gsm_a_gm_sm_ext,
6800 { "Ext", "gsm_a.gm.sm.ext",
6801 FT_UINT8, BASE_HEX, NULL, 0x80,
6804 { &hf_gsm_a_gm_link_dir,
6805 { "Link direction", "gsm_a.gm.link_dir",
6806 FT_INT32, BASE_DEC, VALS(gsm_a_gm_link_dir_vals), 0x0,
6809 { &hf_gsm_a_gm_cause,
6810 { "gmm Cause", "gsm_a.gm.cause",
6811 FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gmm_cause_vals), 0x0,
6815 { "Follow-on proceed", "gsm_a.gm.fop",
6816 FT_BOOLEAN, 8, NULL, 0x08,
6819 { &hf_gsm_a_gm_res_of_attach,
6820 { "Result of attach", "gsm_a.gm.res_of_attach",
6821 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_res_of_attach_vals), 0x07,
6824 { &hf_gsm_a_gm_type_of_ciph_alg,
6825 { "Type of ciphering algorithm", "gsm_a.gm.type_of_ciph_alg",
6826 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_type_of_ciph_alg_vals), 0x07,
6829 { &hf_gsm_a_gm_imeisv_req,
6830 { "IMEISV request", "gsm_a.gm.imeisv_req",
6831 FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gsm_a_gm_imeisv_req_vals), 0x00,
6834 { &hf_gsm_a_gm_ac_ref_nr,
6835 { "A&C reference number", "gsm_a.gm.ac_ref_nr",
6836 FT_UINT8, BASE_DEC, NULL, 0x0,
6839 { &hf_gsm_a_gm_force_to_standby,
6840 { "Force to standby", "gsm_a.gm.force_to_standby",
6841 FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gsm_a_gm_force_to_standby_vals), 0x00,
6844 { &hf_gsm_a_gm_ciph_key_seq_num,
6845 { "Ciphering key sequence number", "gsm_a.gm.ciph_key_seq_num",
6846 FT_UINT8, BASE_DEC, NULL, 0x00,
6849 { &hf_gsm_a_gm_serv_type,
6850 { "Service type", "gsm_a.gm.serv_type",
6851 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_serv_type_vals), 0x00,
6855 { "Follow-on request pending", "gsm_a.gm.for",
6856 FT_BOOLEAN, 8, NULL, 0x08,
6859 { &hf_gsm_a_gm_type_of_attach,
6860 { "Type of attach", "gsm_a.gm.type_of_attach",
6861 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_type_of_attach_vals), 0x07,
6864 { &hf_gsm_a_gm_tmsi_flag,
6865 { "TMSI flag", "gsm_a.gm.tmsi_flag",
6866 FT_BOOLEAN, 8, TFS(&gsm_a_gm_tmsi_flag_value), 0x01,
6869 { &hf_gsm_a_gm_update_type,
6870 { "Update type", "gsm_a.gm.update_type",
6871 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_update_type_vals), 0x07,
6874 { &hf_gsm_a_gm_gprs_timer_unit,
6875 { "Unit", "gsm_a.gm.gprs_timer_unit",
6876 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_gprs_timer_unit_vals), 0xe0,
6879 { &hf_gsm_a_gm_gprs_timer_value,
6880 { "Timer value", "gsm_a.gm.gprs_timer_value",
6881 FT_UINT8, BASE_DEC, NULL, 0x1f,
6884 { &hf_gsm_a_gm_nsapi_5_ul_stat,
6885 { "NSAPI(5) uplink status", "gsm_a.gm.nsapi_5_ul_stat",
6886 FT_BOOLEAN, 8, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0,
6889 { &hf_gsm_a_gm_nsapi_6_ul_stat,
6890 { "NSAPI(6) uplink status", "gsm_a.gm.nsapi_6_ul_stat",
6891 FT_BOOLEAN, 8, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0,
6894 { &hf_gsm_a_gm_nsapi_7_ul_stat,
6895 { "NSAPI(7) uplink status", "gsm_a.gm.nsapi_7_ul_stat",
6896 FT_BOOLEAN, 8, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0,
6899 { &hf_gsm_a_gm_nsapi_8_ul_stat,
6900 { "NSAPI(8) uplink status", "gsm_a.gm.nsapi_8_ul_stat",
6901 FT_BOOLEAN, 8, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0,
6904 { &hf_gsm_a_gm_nsapi_9_ul_stat,
6905 { "NSAPI(9) uplink status", "gsm_a.gm.nsapi_9_ul_stat",
6906 FT_BOOLEAN, 8, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0,
6909 { &hf_gsm_a_gm_nsapi_10_ul_stat,
6910 { "NSAPI(10) uplink status", "gsm_a.gm.nsapi_10_ul_stat",
6911 FT_BOOLEAN, 8, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0,
6914 { &hf_gsm_a_gm_nsapi_11_ul_stat,
6915 { "NSAPI(11) uplink status", "gsm_a.gm.nsapi_11_ul_stat",
6916 FT_BOOLEAN, 8, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0,
6919 { &hf_gsm_a_gm_nsapi_12_ul_stat,
6920 { "NSAPI(12) uplink status", "gsm_a.gm.nsapi_12_ul_stat",
6921 FT_BOOLEAN, 8, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0,
6924 { &hf_gsm_a_gm_nsapi_13_ul_stat,
6925 { "NSAPI(13) uplink status", "gsm_a.gm.nsapi_13_ul_stat",
6926 FT_BOOLEAN, 8, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0,
6929 { &hf_gsm_a_gm_nsapi_14_ul_stat,
6930 { "NSAPI(14) uplink status", "gsm_a.gm.nsapi_14_ul_stat",
6931 FT_BOOLEAN, 8, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0,
6934 { &hf_gsm_a_gm_nsapi_15_ul_stat,
6935 { "NSAPI(15) uplink status", "gsm_a.gm.nsapi_15_ul_stat",
6936 FT_BOOLEAN, 8, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0,
6939 { &hf_gsm_a_gm_pco_pid,
6940 { "Protocol or Container ID", "gsm_a.gm.pco_pid",
6941 FT_UINT16, BASE_DEC, NULL, 0x0,
6944 { &hf_gsm_a_gm_type_of_identity,
6945 { "Type of identity", "gsm_a.gm.type_of_identity",
6946 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_type_of_identity_vals), 0x07,
6950 { "Routing Area Code (RAC)","gsm_a.gm.rac",
6951 FT_UINT8, BASE_HEX_DEC, NULL, 0x00,
6955 { "APC","gsm_a.gm.apc",
6956 FT_BOOLEAN, 8, TFS(&gsm_a_gm_apc_vals), 0x20,
6959 { &hf_gsm_a_gm_otd_a,
6960 { "OTD-A","gsm_a.gm.otd_a",
6961 FT_BOOLEAN, 8, TFS(&gsm_a_gm_otd_a_vals), 0x10,
6964 { &hf_gsm_a_gm_otd_b,
6965 { "OTD-B","gsm_a.gm.otd_b",
6966 FT_BOOLEAN, 8, TFS(&gsm_a_gm_otd_b_vals), 0x08,
6969 { &hf_gsm_a_gm_gps_a,
6970 { "GPS-A","gsm_a.gm.gps_a",
6971 FT_BOOLEAN, 8, TFS(&gsm_a_gm_gps_a_vals), 0x04,
6974 { &hf_gsm_a_gm_gps_b,
6975 { "GPS-B","gsm_a.gm.gps_b",
6976 FT_BOOLEAN, 8, TFS(&gsm_a_gm_gps_b_vals), 0x02,
6979 { &hf_gsm_a_gm_gps_c,
6980 { "GPS-C","gsm_a.gm.gps_c",
6981 FT_BOOLEAN, 8, TFS(&gsm_a_gm_gps_c_vals), 0x01,
6984 { &hf_gsm_a_gm_req_ms_info_irat,
6985 { "I-RAT","gsm_a.gm.req_ms_info_irat",
6986 FT_BOOLEAN, 8, TFS(&gsm_a_gm_req_ms_info_irat_vals), 0x0,
6989 { &hf_gsm_a_gm_req_ms_info_irat2,
6990 { "I-RAT2","gsm_a.gm.req_ms_info_irat2",
6991 FT_BOOLEAN, 8, TFS(&gsm_a_gm_req_ms_info_irat2_vals), 0x0,
6994 { &hf_gsm_a_gm_ue_usage_setting,
6995 { "UE's usage setting","gsm_a.gm.ue_usage_setting",
6996 FT_BOOLEAN, 8, TFS(&gsm_a_gm_ue_usage_setting_vals), 0x0,
6999 { &hf_gsm_a_gm_voice_domain_pref_for_eutran,
7000 { "Voice domain preference for E-UTRAN","gsm_a.gm.voice_domain_pref_for_eutran",
7001 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_voice_domain_pref_for_eutran_vals), 0x0,
7004 { &hf_gsm_a_sm_pdp_type_org,
7005 { "PDP type organization", "gsm_a.sm.pdp_type_org",
7006 FT_UINT8, BASE_DEC, VALS(gsm_a_sm_pdp_type_org_vals), 0x0f,
7009 { &hf_gsm_a_qos_mean_thr,
7010 { "Mean throughput", "gsm_a.qos.mean_throughput",
7011 FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gsm_a_qos_mean_thr_vals), 0x1f,
7014 { &hf_gsm_a_qos_peak_thr,
7015 { "Peak throughput", "gsm_a.qos.peak_throughput",
7016 FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gsm_a_qos_peak_thr_vals), 0xf0,
7019 { &hf_gsm_a_qos_prec_class,
7020 { "Precedence class", "gsm_a.qos.prec_class",
7021 FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gsm_a_qos_prec_class_vals), 0x07,
7024 { &hf_gsm_a_qos_traf_handl_prio,
7025 { "Traffic handling priority", "gsm_a.qos.traf_handl_prio",
7026 FT_UINT8, BASE_DEC, NULL, 0x03,
7029 { &hf_gsm_a_qos_trans_delay,
7030 { "Transfer delay", "gsm_a.qos.trans_delay",
7031 FT_UINT8, BASE_DEC, NULL, 0xfc,
7034 { &hf_gsm_a_qos_signalling_ind,
7035 { "Signalling indication", "gsm_a.qos.signalling_ind",
7036 FT_BOOLEAN, 8, TFS(&gsm_a_qos_signalling_ind_value), 0x10,
7039 { &hf_gsm_a_qos_source_stat_desc,
7040 { "Source statistics description", "gsm_a.qos.source_stat_desc",
7041 FT_UINT8, BASE_DEC, NULL, 0x0f,
7044 { &hf_gsm_a_qos_max_bitrate_upl,
7045 { "Maximum bitrate for uplink", "gsm_a.qos.max_bitrate_upl",
7046 FT_UINT8, BASE_DEC, NULL, 0x0,
7049 { &hf_gsm_a_qos_max_bitrate_downl,
7050 { "Maximum bitrate for downlink", "gsm_a.qos.max_bitrate_downl",
7051 FT_UINT8, BASE_DEC, NULL, 0x0,
7054 { &hf_gsm_a_qos_guar_bitrate_upl,
7055 { "Guaranteed bitrate for uplink", "gsm_a.qos.guar_bitrate_upl",
7056 FT_UINT8, BASE_DEC, NULL, 0x0,
7059 { &hf_gsm_a_qos_guar_bitrate_downl,
7060 { "Guaranteed bitrate for downlink", "gsm_a.qos.guar_bitrate_downl",
7061 FT_UINT8, BASE_DEC, NULL, 0x0,
7064 { &hf_gsm_a_qos_max_bitrate_upl_ext,
7065 { "Maximum bitrate for uplink (extended)", "gsm_a.qos.max_bitrate_upl_ext",
7066 FT_UINT8, BASE_DEC, NULL, 0x0,
7069 { &hf_gsm_a_qos_max_bitrate_downl_ext,
7070 { "Maximum bitrate for downlink (extended)", "gsm_a.qos.max_bitrate_downl_ext",
7071 FT_UINT8, BASE_DEC, NULL, 0x0,
7074 { &hf_gsm_a_qos_guar_bitrate_upl_ext,
7075 { "Guaranteed bitrate for uplink (extended)", "gsm_a.qos.guar_bitrate_upl_ext",
7076 FT_UINT8, BASE_DEC, NULL, 0x0,
7079 { &hf_gsm_a_qos_guar_bitrate_downl_ext,
7080 { "Guaranteed bitrate for downlink (extended)", "gsm_a.qos.guar_bitrate_downl_ext",
7081 FT_UINT8, BASE_DEC, NULL, 0x0,
7084 { &hf_gsm_a_sm_cause,
7085 { "SM Cause", "gsm_a.sm.cause",
7086 FT_UINT8, BASE_DEC, NULL, 0x0,
7089 { &hf_gsm_a_sm_cause_2,
7090 { "SM Cause 2", "gsm_a.sm.cause_2",
7091 FT_UINT8, BASE_DEC, NULL, 0x0,
7094 { &hf_gsm_a_sm_llc_sapi,
7095 { "LLC SAPI", "gsm_a.sm.llc_sapi",
7096 FT_UINT8, BASE_DEC, VALS(gsm_a_sm_llc_sapi_vals), 0x0f,
7100 { "Tear Down Indicator (TDI)", "gsm_a.sm.tdi",
7101 FT_BOOLEAN, 8, TFS(&gsm_a_sm_tdi_value), 0x01,
7104 { &hf_gsm_a_sm_packet_flow_id,
7105 { "Packet Flow Identifier (PFI)", "gsm_a.sm.packet_flow_id",
7106 FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gsm_a_sm_packet_flow_id_vals), 0x7f,
7109 { &hf_gsm_a_gmm_net_cap_gea1,
7110 { "GEA/1", "gsm_a.gmm.net_cap.gea1",
7111 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_gea_vals), 0x80,
7114 { &hf_gsm_a_gmm_net_cap_smdch,
7115 { "SM capabilities via dedicated channels", "gsm_a.gmm.net_cap.smdch",
7116 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_smdch_vals), 0x40,
7119 { &hf_gsm_a_gmm_net_cap_smgprs,
7120 { "SM capabilities via GPRS channels", "gsm_a.gmm.net_cap.smgprs",
7121 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_smgprs_vals), 0x20,
7124 { &hf_gsm_a_gmm_net_cap_ucs2,
7125 { "UCS2 support", "gsm_a.gmm.net_cap.ucs2",
7126 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_smgprs_vals), 0x10,
7129 { &hf_gsm_a_gmm_net_cap_ss_scr_ind,
7130 { "SS Screening Indicator", "gsm_a.gmm.net_cap.ss_scr_ind",
7131 FT_UINT8, BASE_HEX, VALS(gsm_a_gmm_net_cap_ss_scr_ind_vals), 0x0c,
7134 { &hf_gsm_a_gmm_net_cap_solsa,
7135 { "SoLSA Capability", "gsm_a.gmm.net_cap.solsa",
7136 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_solsa_vals), 0x02,
7139 { &hf_gsm_a_gmm_net_cap_rev,
7140 { "Revision level indicator", "gsm_a.gmm.net_cap.rev",
7141 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_rev_vals), 0x01,
7144 { &hf_gsm_a_gmm_net_cap_pfc,
7145 { "PFC feature mode", "gsm_a.gmm.net_cap.pfc",
7146 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_pfc_vals), 0x80,
7149 { &hf_gsm_a_gmm_net_cap_ext_gea_bits,
7150 { "Extended GEA bits", "gsm_a.gmm.net_cap.ext_gea_bits",
7151 FT_UINT8, BASE_HEX, NULL, 0x7e,
7154 { &hf_gsm_a_gmm_net_cap_gea2,
7155 { "GEA/2", "gsm_a.gmm.net_cap.gea2",
7156 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_gea_vals), 0x40,
7159 { &hf_gsm_a_gmm_net_cap_gea3,
7160 { "GEA/3", "gsm_a.gmm.net_cap.gea3",
7161 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_gea_vals), 0x20,
7164 { &hf_gsm_a_gmm_net_cap_gea4,
7165 { "GEA/4", "gsm_a.gmm.net_cap.gea4",
7166 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_gea_vals), 0x10,
7169 { &hf_gsm_a_gmm_net_cap_gea5,
7170 { "GEA/5", "gsm_a.gmm.net_cap.gea5",
7171 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_gea_vals), 0x08,
7174 { &hf_gsm_a_gmm_net_cap_gea6,
7175 { "GEA/6", "gsm_a.gmm.net_cap.gea6",
7176 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_gea_vals), 0x04,
7179 { &hf_gsm_a_gmm_net_cap_gea7,
7180 { "GEA/7", "gsm_a.gmm.net_cap.gea7",
7181 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_gea_vals), 0x02,
7184 { &hf_gsm_a_gmm_net_cap_lcs,
7185 { "LCS VA capability", "gsm_a.gmm.net_cap.lcs",
7186 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_lcs_vals), 0x01,
7189 { &hf_gsm_a_gmm_net_cap_ps_irat_iu,
7190 { "PS inter-RAT HO to UTRAN Iu mode capability", "gsm_a.gmm.net_cap.ps_irat_iu",
7191 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_ps_irat_iu_vals), 0x80,
7194 { &hf_gsm_a_gmm_net_cap_ps_irat_s1,
7195 { "PS inter-RAT HO to E-UTRAN S1 mode capability", "gsm_a.gmm.net_cap.ps_irat_s1",
7196 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_ps_irat_s1_vals), 0x40,
7199 { &hf_gsm_a_gmm_net_cap_comb_proc,
7200 { "EMM Combined procedures capability", "gsm_a.gmm.net_cap.comb_proc",
7201 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_comb_proc_vals), 0x20,
7204 { &hf_gsm_a_gmm_net_cap_isr,
7205 { "ISR support", "gsm_a.gmm.net_cap.isr",
7206 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_isr_vals), 0x10,
7209 { &hf_gsm_a_gmm_net_cap_srvcc_to_geran,
7210 { "SRVCC to GERAN/UTRAN capability", "gsm_a.gmm.net_cap.srvcc_to_geran",
7211 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_srvcc_to_geran_vals), 0x08,
7214 { &hf_gsm_a_gmm_net_cap_epc,
7215 { "EPC Capability", "gsm_a.gmm.net_cap.epc",
7216 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_epc_vals), 0x04,
7219 { &hf_gsm_a_gmm_net_cap_nf,
7220 { "NF Capability", "gsm_a.gmm.net_cap.nf",
7221 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_nf_vals), 0x02,
7224 { &hf_gsm_a_sm_tmgi,
7225 { "Temporary Mobile Group Identity (TMGI)", "gsm_a.sm.tmgi",
7226 FT_UINT24, BASE_HEX, NULL, 0x0,
7229 { &hf_gsm_a_sm_enh_nsapi,
7230 { "Enhanced NSAPI", "gsm_a.sm.enh_nsapi",
7231 FT_UINT8, BASE_DEC, NULL, 0x0,
7234 { &hf_gsm_a_sm_req_type,
7235 { "Request type", "gsm_a.sm.req_type",
7236 FT_UINT8, BASE_DEC, VALS(gsm_a_sm_req_type_vals), 0x07,
7239 { &hf_gsm_a_sm_notif_ind,
7240 { "Notification indicator value", "gsm_a.sm.notif_ind",
7241 FT_UINT8, BASE_DEC, VALS(gsm_a_sm_notif_ind_vals), 0x0,
7244 { &hf_gsm_a_gm_rac_ctrled_early_cm_sending,
7245 { "Controlled early Classmark Sending", "gsm_a.gm.rac.comp_int_meas_cap",
7246 FT_BOOLEAN, 8, TFS(&tfs_implemented_not_implemented), 0x0,
7249 { &hf_gsm_a_gm_rac_pseudo_sync,
7250 { "Pseudo Synchronisation", "gsm_a.gm.rac.pseudo_sync",
7251 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x0,
7254 { &hf_gsm_a_gm_rac_vgcs,
7255 { "Voice Group Call Service", "gsm_a.gm.rac.vgcs",
7256 FT_BOOLEAN, 8, TFS(&gsm_a_gm_vgcs), 0x0,
7259 { &hf_gsm_a_gm_rac_vbs,
7260 { "Voice Broadcast Service", "gsm_a.gm.rac.vbs",
7261 FT_BOOLEAN, 8, TFS(&gsm_a_gm_vbs), 0x0,
7264 { &hf_gsm_a_gm_rac_multislot_capability,
7265 { "Multislot capability struct", "gsm_a.gm.rac.multislot_capability",
7266 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x0,
7269 { &hf_gsm_a_gm_rac_hscsd_multi_slot_class,
7270 { "HSCSD multislot class", "gsm_a.gm.rac.hscsd_multi_slot_class",
7271 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_multi_slot_vals), 0x0,
7274 { &hf_gsm_a_gm_rac_gprs_multi_slot_class,
7275 { "GPRS multislot class", "gsm_a.gm.rac.gprs_multi_slot_class",
7276 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_multi_slot_vals), 0x0,
7279 { &hf_gsm_a_gm_rac_gprs_ext_dyn_alloc_cap,
7280 { "GPRS Extended Dynamic Allocation Capability", "gsm_a.gm.rac.gprs_ext_dyn_alloc_cap",
7281 FT_BOOLEAN, 8, TFS(&tfs_implemented_not_implemented), 0x0,
7284 { &hf_gsm_a_gm_rac_ecsd_multi_slot_class,
7285 { "ECSD multislot class", "gsm_a.gm.rac.ecsd_multi_slot_class",
7286 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_multi_slot_vals), 0x0,
7289 { &hf_gsm_a_gm_rac_egprs_multi_slot_class,
7290 { "EGPRS multislot class", "gsm_a.gm.rac.egprs_multi_slot_class",
7291 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_multi_slot_vals), 0x0,
7294 { &hf_gsm_a_gm_rac_egprs_ext_dyn_alloc_cap,
7295 { "EGPRS Extended Dynamic Allocation Capability", "gsm_a.gm.rac.egprs_ext_dyn_alloc_cap",
7296 FT_BOOLEAN, 8, TFS(&tfs_implemented_not_implemented), 0x0,
7299 { &hf_gsm_a_gm_rac_dtm_gprs_multi_slot_class,
7300 { "DTM GPRS Multi Slot Class", "gsm_a.gm.rac.dtm_gprs_multi_slot_class",
7301 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_dtm_gprs_multi_slot_class_vals), 0x0,
7304 { &hf_gsm_a_gm_rac_single_slt_dtm,
7305 { "Single Slot DTM", "gsm_a.gm.rac.single_slt_dtm",
7306 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
7309 { &hf_gsm_a_gm_rac_dtm_egprs_multi_slot_cls_pres,
7310 { "DTM EGPRS Multi Slot Class", "gsm_a.gm.rac.dtm_egprs_multi_slot_cls_pres",
7311 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x0,
7314 { &hf_gsm_a_gm_rac_dtm_egprs_multi_slot_class,
7315 { "DTM EGPRS Multi Slot Class", "gsm_a.gm.rac.dtm_egprs_multi_slot_class",
7316 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_dtm_gprs_multi_slot_class_vals), 0x0,
7319 { &hf_gsm_a_gm_rac_8psk_pow_cap_pres,
7320 { "8PSK Power Capability Bits", "gsm_a.gm.rac.8psk_pow_cap_pres",
7321 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x0,
7324 { &hf_gsm_a_gm_rac_comp_int_meas_cap,
7325 { "COMPACT Interference Measurement Capability", "gsm_a.gm.rac.comp_int_meas_cap",
7326 FT_BOOLEAN, 8, TFS(&tfs_implemented_not_implemented), 0x0,
7329 { &hf_gsm_a_gm_rel_lev_ind,
7330 { "Revision Level Indicator", "gsm_a.gm.rel_lev_ind",
7331 FT_BOOLEAN, 8, TFS(&gsm_a_gm_revision_level_indicator), 0x0,
7334 { &hf_gsm_a_gm_rac_umts_fdd_cap,
7335 { "UMTS FDD Radio Access Technology Capability", "gsm_a.gm.rac.umts_fdd_cap",
7336 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
7339 { &hf_gsm_a_gm_rac_umts_384_tdd_ra_cap,
7340 { "UMTS 3.84 Mcps TDD Radio Access Technology Capability", "gsm_a.gm.rac.umts_384_tdd_ra_cap",
7341 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
7344 { &hf_gsm_a_gm_rac_cdma2000_cap,
7345 { "CDMA 2000 Radio Access Technology Capability", "gsm_a.gm.rac.cdma2000_cap",
7346 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
7349 { &hf_gsm_a_gm_rac_umts_128_tdd_ra_cap,
7350 { "UMTS 1.28 Mcps TDD Radio Access Technology Capability", "gsm_a.gm.rac.umts_128_tdd_ra_cap",
7351 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
7354 { &hf_gsm_a_gm_rac_geran_feat_pkg,
7355 { "GERAN Feature Package 1", "gsm_a.gm.rac.geran_feat_pkg",
7356 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
7359 { &hf_gsm_a_gm_rac_mod_based_multi_slot_class_support,
7360 { "Modulation based multislot class support", "gsm_a.gm.rac.mod_based_multi_slot_class_support",
7361 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
7364 { &hf_gsm_a_gm_rac_geran_iu_mode_cap,
7365 { "GERAN Iu mode", "gsm_a.gm.rac.geran_iu_mode_cap",
7366 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
7369 { &hf_gsm_a_gm_rac_flo_iu_cap,
7370 { "FLO Iu Capability", "gsm_a.gm.rac.flo_iu_cap",
7371 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
7374 { &hf_gsm_a_gm_rac_mult_tbf_cap,
7375 { "Multiple TBF Capability", "gsm_a.gm.rac.mult_tbf_cap",
7376 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
7379 { &hf_gsm_a_gm_rac_down_adv_rec_perf,
7380 { "Downlink Advanced Receiver Performance", "gsm_a.gm.rac.down_adv_rec_perf",
7381 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_down_adv_rec_perf_vals), 0x0,
7384 { &hf_gsm_a_gm_rac_ext_rlc_mac_ctrl_msg_seg_cap,
7385 { "Extended RLC/MAC Control Message Segmentation Capability", "gsm_a.gm.rac.ext_rlc_mac_ctrl_msg_seg_cap",
7386 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
7389 { &hf_gsm_a_gm_rac_dtm_enh_cap,
7390 { "DTM Enhancements Capability", "gsm_a.gm.rac.dtm_enh_cap",
7391 FT_BOOLEAN, 8, TFS(&gsm_a_gm_dtm_enh_cap), 0x0,
7394 { &hf_gsm_a_gm_rac_dtm_gprs_high_multi_slot_class,
7395 { "DTM GPRS High Multi Slot Class", "gsm_a.gm.rac.dtm_gprs_high_multi_slot_class",
7396 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_dtm_gprs_high_multi_slot_class_vals), 0x0,
7399 { &hf_gsm_a_gm_rac_dtm_egprs_high_multi_slot_class,
7400 { "DTM EGPRS High Multi Slot Class", "gsm_a.gm.rac.dtm_egprs_high_multi_slot_class",
7401 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_dtm_gprs_high_multi_slot_class_vals), 0x0,
7404 { &hf_gsm_a_gm_rac_ps_ho_cap,
7405 { "PS Handover Capability", "gsm_a.gm.rac.ps_ho_cap",
7406 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
7409 { &hf_gsm_a_gm_rac_dtm_ho_cap,
7410 { "DTM Handover Capability", "gsm_a.gm.rac.dtm_ho_cap",
7411 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
7414 { &hf_gsm_a_gm_rac_multi_slot_cap_red_down_dual_carrier,
7415 { "Multislot Capability Reduction for Downlink Dual Carrier", "gsm_a.gm.rac.multi_slot_cap_red_down_dual_carrier",
7416 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_multi_slot_cap_red_down_dual_carrier_vals), 0x0,
7419 { &hf_gsm_a_gm_rac_down_dual_carrier_dtm_cap,
7420 { "Downlink Dual Carrier for DTM Capability", "gsm_a.gm.rac.down_dual_carrier_dtm_cap",
7421 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
7424 { &hf_gsm_a_gm_rac_flex_ts_assign,
7425 { "Flexible Timeslot Assignment", "gsm_a.gm.rac.flex_ts_assign",
7426 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
7429 { &hf_gsm_a_gm_rac_gan_ps_ho_cap,
7430 { "GAN PS Handover Capability", "gsm_a.gm.rac.gan_ps_ho_cap",
7431 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
7434 { &hf_gsm_a_gm_rac_rlc_non_pers_mode,
7435 { "RLC Non-persistent Mode", "gsm_a.gm.rac.rlc_non_pers_mode",
7436 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
7439 { &hf_gsm_a_gm_rac_reduced_lat_cap,
7440 { "Reduced Latency Capability", "gsm_a.gm.rac.reduced_lat_cap",
7441 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
7444 { &hf_gsm_a_gm_rac_ul_egprs2,
7445 { "Uplink EGPRS2", "gsm_a.gm.rac.ul_egprs2",
7446 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_ul_egprs2_vals), 0x0,
7449 { &hf_gsm_a_gm_rac_dl_egprs2,
7450 { "Downlink EGPRS2", "gsm_a.gm.rac.dl_egprs2",
7451 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_dl_egprs2_vals), 0x0,
7454 { &hf_gsm_a_gm_rac_eutra_fdd_support,
7455 { "E-UTRA FDD support", "gsm_a.gm.rac.eutra_fdd_support",
7456 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
7459 { &hf_gsm_a_gm_rac_eutra_tdd_support,
7460 { "E-UTRA TDD support", "gsm_a.gm.rac.eutra_tdd_support",
7461 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
7464 { &hf_gsm_a_gm_rac_geran_to_eutra_support_in_geran_ptm,
7465 { "GERAN to E-UTRA support in GERAN packet transfer mode", "gsm_a.gm.rac.geran_to_eutra_support_in_geran_ptm",
7466 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_geran_to_eutra_support_in_geran_ptm_vals), 0x0,
7469 { &hf_gsm_a_gm_rac_prio_based_resel_support,
7470 { "Priority-based reselection support", "gsm_a.gm.rac.prio_based_resel_support",
7471 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
7474 { &hf_gsm_a_gm_rac_alt_efta_multi_slot_class,
7475 { "Alternative EFTA Multislot Class", "gsm_a.gm.rac.alt_efta_multi_slot_class",
7476 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_alt_efta_multi_slot_class_vals), 0x0,
7479 { &hf_gsm_a_gm_rac_efta_multi_slot_cap_red_down_dual_carrier,
7480 { "EFTA Multislot Capability Reduction for Downlink Dual Carrier", "gsm_a.gm.rac.efta_multi_slot_cap_red_down_dual_carrier",
7481 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_multi_slot_cap_red_down_dual_carrier_vals), 0x0,
7484 { &hf_gsm_a_gm_rac_ind_up_layer_pdu_start_cap_for_rlc_um,
7485 { "Indication of Upper Layer PDU Start Capability for RLC UM", "gsm_a.gm.rac.ind_up_layer_pdu_start_cap_for_rlc_um",
7486 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
7489 { &hf_gsm_a_gm_rac_emst_cap,
7490 { "Enhanced Multiplexing for Single TBF Capability", "gsm_a.gm.rac.emst_cap",
7491 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
7494 { &hf_gsm_a_gm_rac_mtti_cap,
7495 { "Multiple TTI Capability", "gsm_a.gm.rac.mtti_cap",
7496 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
7499 { &hf_gsm_a_gm_rac_utra_csg_cell_report,
7500 { "UTRA CSG Cells Reporting", "gsm_a.gm.rac.utra_csg_cell_report",
7501 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
7504 { &hf_gsm_a_gm_rac_eutra_csg_cell_report,
7505 { "E-UTRA CSG Cells Reporting", "gsm_a.gm.rac.mtti_cap",
7506 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
7509 { &hf_gsm_a_sm_ti_flag,
7510 { "TI Flag", "gsm_a.sm.ti_flag",
7511 FT_BOOLEAN, 8, TFS(&gsm_a_sm_ti_flag_vals), 0x80,
7515 { "Extension", "gsm_a.sm.ext",
7516 FT_BOOLEAN, 8, NULL, 0x80,
7521 /* Setup protocol subtree array */
7522 #define NUM_INDIVIDUAL_ELEMS 18
7523 gint *ett[NUM_INDIVIDUAL_ELEMS +
7524 NUM_GSM_DTAP_MSG_GMM + NUM_GSM_DTAP_MSG_SM +
7527 ett[0] = &ett_tc_component;
7528 ett[1] = &ett_tc_invoke_id;
7529 ett[2] = &ett_tc_linked_id;
7530 ett[3] = &ett_tc_opr_code;
7531 ett[4] = &ett_tc_err_code;
7532 ett[5] = &ett_tc_prob_code;
7533 ett[6] = &ett_tc_sequence;
7534 ett[7] = &ett_gmm_drx;
7535 ett[8] = &ett_gmm_detach_type;
7536 ett[9] = &ett_gmm_attach_type;
7537 ett[10] = &ett_gmm_context_stat;
7538 ett[11] = &ett_gmm_update_type;
7539 ett[12] = &ett_gmm_radio_cap;
7540 ett[13] = &ett_gmm_rai;
7541 ett[14] = &ett_sm_tft;
7542 ett[15] = &ett_gmm_gprs_timer;
7543 ett[16] = &ett_gmm_network_cap;
7544 ett[17] = &ett_gsm_a_gm_msrac_multislot_capability;
7546 last_offset = NUM_INDIVIDUAL_ELEMS;
7548 for (i=0; i < NUM_GSM_DTAP_MSG_GMM; i++, last_offset++)
7550 ett_gsm_dtap_msg_gmm[i] = -1;
7551 ett[last_offset] = &ett_gsm_dtap_msg_gmm[i];
7554 for (i=0; i < NUM_GSM_DTAP_MSG_SM; i++, last_offset++)
7556 ett_gsm_dtap_msg_sm[i] = -1;
7557 ett[last_offset] = &ett_gsm_dtap_msg_sm[i];
7560 for (i=0; i < NUM_GSM_GM_ELEM; i++, last_offset++)
7562 ett_gsm_gm_elem[i] = -1;
7563 ett[last_offset] = &ett_gsm_gm_elem[i];
7567 proto_register_protocol("GSM A-I/F GPRS Mobility and Session Management", "GSM Management", "gsm_a_gm");
7569 proto_register_field_array(proto_a_gm, hf, array_length(hf));
7571 proto_register_subtree_array(ett, array_length(ett));
7573 /* subdissector code */
7574 gprs_sm_pco_subdissector_table = register_dissector_table("sm_pco.protocol",
7575 "GPRS SM PCO PPP protocol", FT_UINT16, BASE_HEX);
7579 proto_reg_handoff_gsm_a_gm(void)
7581 data_handle = find_dissector("data");
7582 rrc_irat_ho_info_handle = find_dissector("rrc.irat.irat_ho_info");
7583 lte_rrc_ue_eutra_cap_handle = find_dissector("lte-rrc.ue_eutra_cap");