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 and S1 mode specific
611 * 0 0 0 0 For Iu mode, 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 * For S1 mode, DRX value not specified by the MS.
614 * (Ref 3GPP TS 25.331 and 36.304)
615 * 0 1 1 0 CN Specific DRX cycle length coefficient 6 and T = 32
616 * 0 1 1 1 CN Specific DRX cycle length coefficient 7 and T = 64
617 * 1 0 0 0 CN Specific DRX cycle length coefficient 8 and T = 128
618 * 1 0 0 1 CN Specific DRX cycle length coefficient 9 and T = 256
619 * All other values shall be interpreted as "CN Specific DRX cycle length coefficient not
620 * specified by the MS" and "DRX value not specified by the MS" by this version of the protocol.
621 * NOTE: For Iu mode and S1 mode, this field (octet 3 bits 8 to 5) is used, but was spare in earlier
622 * versions of this protocol.
624 static const range_string gsm_a_gmm_cn_spec_drs_cycle_len_coef_strings[] = {
625 { 0x00, 0x05, "CN Specific DRX cycle length coefficient / value not specified by the MS" },
626 { 0x06, 0x06, "CN Specific DRX cycle length coefficient 6 and T = 32" },
627 { 0x07, 0x07, "CN Specific DRX cycle length coefficient 7 and T = 64" },
628 { 0x08, 0x08, "CN Specific DRX cycle length coefficient 8 and T = 128" },
629 { 0x09, 0x09, "CN Specific DRX cycle length coefficient 9 and T = 256" },
630 { 0x0a, 0x0f, "CN Specific DRX cycle length coefficient / value not specified by the MS" },
634 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_)
639 proto_item *tf = NULL;
640 proto_tree *tf_tree = NULL;
642 curr_offset = offset;
644 tf = proto_tree_add_text(tree,
648 tf_tree = proto_item_add_subtree(tf, ett_gmm_drx );
650 oct = tvb_get_guint8(tvb, curr_offset);
654 case 0: str="704"; break;
655 case 65: str="71"; break;
656 case 66: str="72"; break;
657 case 67: str="74"; break;
658 case 68: str="75"; break;
659 case 69: str="77"; break;
660 case 70: str="79"; break;
661 case 71: str="80"; break;
662 case 72: str="83"; break;
663 case 73: str="86"; break;
664 case 74: str="88"; break;
665 case 75: str="90"; break;
666 case 76: str="92"; break;
667 case 77: str="96"; break;
668 case 78: str="101"; break;
669 case 79: str="103"; break;
670 case 80: str="107"; break;
671 case 81: str="112"; break;
672 case 82: str="116"; break;
673 case 83: str="118"; break;
674 case 84: str="128"; break;
675 case 85: str="141"; break;
676 case 86: str="144"; break;
677 case 87: str="150"; break;
678 case 88: str="160"; break;
679 case 89: str="171"; break;
680 case 90: str="176"; break;
681 case 91: str="192"; break;
682 case 92: str="214"; break;
683 case 93: str="224"; break;
684 case 94: str="235"; break;
685 case 95: str="256"; break;
686 case 96: str="288"; break;
687 case 97: str="320"; break;
688 case 98: str="352"; break;
689 default: str="Reserved, interpreted as 1";
692 proto_tree_add_text(tf_tree,
694 "Split PG Cycle Code: %s (%u)",
699 proto_tree_add_item(tf_tree, hf_gsm_a_gmm_cn_spec_drs_cycle_len_coef, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
700 proto_tree_add_item(tf_tree, hf_gsm_a_gmm_split_on_ccch, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
701 proto_tree_add_item(tf_tree, hf_gsm_a_gmm_non_drx_timer, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
705 /* no length check possible */
707 return(curr_offset - offset);
711 * [9] 10.5.5.7 Force to standby (lower nibble)
713 static const range_string gsm_a_gm_force_to_standby_vals[] = {
714 { 0x00, 0x00, "Force to standby not indicated" },
715 { 0x01, 0x01, "Force to standby indicated" },
716 { 0x02, 0x07, "Unknown, interpreted as Force to standby not indicated" },
721 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_)
725 /* IMPORTANT - IT'S ASSUMED THAT THE INFORMATION IS IN THE LOWER NIBBLE */
726 bit_offset = (offset << 3) + 4;
727 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
728 proto_tree_add_bits_item(tree, hf_gsm_a_gm_force_to_standby, tvb, bit_offset + 1, 3, ENC_BIG_ENDIAN);
730 /* no length check possible */
735 * [9] 10.5.5.7 Force to standby (higher nibble)
738 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_)
742 /* IMPORTANT - IT'S ASSUMED THAT THE INFORMATION IS IN THE HIGHER NIBBLE */
743 bit_offset = offset << 3;
744 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
745 proto_tree_add_bits_item(tree, hf_gsm_a_gm_force_to_standby, tvb, bit_offset + 1, 3, ENC_BIG_ENDIAN);
747 /* no length check possible */
755 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_)
758 proto_item *curr_item;
760 curr_offset = offset;
762 curr_item= proto_tree_add_item(tree,hf_gsm_a_ptmsi_sig,tvb,curr_offset,3,ENC_BIG_ENDIAN);
763 proto_item_append_text(curr_item,"%s",add_string ? add_string : "");
767 /* no length check possible */
769 return(curr_offset - offset);
776 de_gmm_ptmsi_sig2(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len _U_)
779 proto_item *curr_item;
781 curr_offset = offset;
783 curr_item= proto_tree_add_item(tree,hf_gsm_a_ptmsi_sig2,tvb,curr_offset,3,ENC_BIG_ENDIAN);
784 proto_item_append_text(curr_item,"%s",add_string ? add_string : "");
787 EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo);
789 return(curr_offset - offset);
793 * [9] 10.5.5.9 Identity type 2
795 static const value_string gsm_a_gm_type_of_identity_vals[] = {
804 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_)
806 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (offset << 3) + 4, 1, ENC_BIG_ENDIAN);
807 proto_tree_add_item(tree, hf_gsm_a_gm_type_of_identity, tvb, offset, 1, ENC_BIG_ENDIAN);
809 /* no length check possible */
814 * [9] 10.5.5.10 IMEISV request
816 static const range_string gsm_a_gm_imeisv_req_vals[] = {
817 { 0x00, 0x00, "IMEISV not requested" },
818 { 0x01, 0x01, "IMEISV requested" },
819 { 0x02, 0x07, "Unknown, interpreted as IMEISV not requested" },
824 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_)
828 /* IMPORTANT - IT'S ASSUMED THAT THE INFORMATION IS IN THE HIGHER NIBBLE */
829 bit_offset = offset << 3;
830 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
831 proto_tree_add_bits_item(tree, hf_gsm_a_gm_imeisv_req, tvb, bit_offset + 1, 3, ENC_BIG_ENDIAN);
833 /* no length check possible */
841 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_)
847 curr_offset = offset;
849 if ( len == 0 ) return 0;
854 oct = tvb_get_guint8(tvb, curr_offset);
856 oct |= tvb_get_guint8(tvb, curr_offset+1);
860 proto_tree_add_text(tree,
862 "NSAPI %d: 0x%02x (%u)",
870 oct |= tvb_get_guint8(tvb, curr_offset+2);
874 proto_tree_add_text(tree,
875 tvb, curr_offset-1, 2,
876 "NSAPI %d: 0x%02x (%u)",
883 } while ( curr_len > 1 );
885 EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo);
887 return(curr_offset - offset);
891 * [9] 10.5.5.12 MS network capability
893 static const true_false_string gsm_a_gmm_net_cap_gea_vals = {
894 "Encryption algorithm available",
895 "Encryption algorithm not available"
898 static const true_false_string gsm_a_gmm_net_cap_smdch_vals = {
899 "Mobile station supports mobile terminated point to point SMS via dedicated signalling channels",
900 "Mobile station does not support mobile terminated point to point SMS via dedicated signalling channels"
903 static const true_false_string gsm_a_gmm_net_cap_smgprs_vals = {
904 "Mobile station supports mobile terminated point to point SMS via GPRS packet data channels",
905 "Mobile station does not support mobile terminated point to point SMS via GPRS packet data channels"
908 static const true_false_string gsm_a_gmm_net_cap_ucs2_vals = {
909 "The ME has no preference between the use of the default alphabet and the use of UCS2",
910 "The ME has a preference for the default alphabet (defined in 3GPP TS 23.038 [8b]) over UCS2"
913 static const value_string gsm_a_gmm_net_cap_ss_scr_ind_vals[]={
914 { 0x00, "Default value of phase 1" },
915 { 0x01, "capability of handling of ellipsis notation and phase 2 error handling" },
916 { 0x02, "For future use, interpreted as Capability of handling of ellipsis notation and phase 2 error handling" },
917 { 0x03, "For future use, interpreted as Capability of handling of ellipsis notation and phase 2 error handling" },
921 static const true_false_string gsm_a_gmm_net_cap_solsa_vals = {
922 "The ME supports SoLSA",
923 "The ME does not support SoLSA"
926 static const true_false_string gsm_a_gmm_net_cap_rev_vals = {
927 "Used by a mobile station supporting R99 or later versions of the protocol",
928 "Used by a mobile station not supporting R99 or later versions of the protocol"
931 static const true_false_string gsm_a_gmm_net_cap_pfc_vals = {
932 "Mobile station does support BSS packet flow procedures",
933 "Mobile station does not support BSS packet flow procedures"
936 static const true_false_string gsm_a_gmm_net_cap_lcs_vals = {
937 "LCS value added location request notification capability supported",
938 "LCS value added location request notification capability not supported"
941 static const true_false_string gsm_a_gmm_net_cap_ps_irat_iu_vals = {
942 "PS inter-RAT HO to UTRAN Iu mode supported",
943 "PS inter-RAT HO to UTRAN Iu mode not supported"
946 static const true_false_string gsm_a_gmm_net_cap_ps_irat_s1_vals = {
947 "PS inter-RAT HO to E-UTRAN S1 mode supported",
948 "PS inter-RAT HO to E-UTRAN S1 mode not supported"
951 static const true_false_string gsm_a_gmm_net_cap_comb_proc_vals = {
952 "Mobile station supports EMM combined procedures",
953 "Mobile station does not support EMM combined procedures"
956 static const true_false_string gsm_a_gmm_net_cap_isr_vals = {
957 "The mobile station supports ISR",
958 "The mobile station does not support ISR"
961 static const true_false_string gsm_a_gmm_net_cap_srvcc_to_geran_vals = {
962 "SRVCC from UTRAN HSPA or E-UTRAN to GERAN/UTRAN supported",
963 "SRVCC from UTRAN HSPA or E-UTRAN to GERAN/UTRAN not supported"
966 static const true_false_string gsm_a_gmm_net_cap_epc_vals = {
971 static const true_false_string gsm_a_gmm_net_cap_nf_vals = {
972 "Mobile station supports the notification procedure",
973 "Mobile station does not support the notification procedure"
977 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_)
983 curr_offset = offset;
986 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_gea1, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
988 /* bit 7: SM capabilities via dedicated channels */
989 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_smdch, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
991 /* bit 6: SM capabilities via GPRS channels */
992 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_smgprs, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
994 /* bit 5: UCS2 support */
995 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_ucs2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
997 /* bits 4 3: SS Screening Indicator */
998 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_ss_scr_ind, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1000 /* bit 2: SoLSA Capability */
1001 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_solsa, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1004 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_rev, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1007 NO_MORE_DATA_CHECK(len);
1009 /* bit 8: PFC feature mode */
1010 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_pfc, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1012 /* bits 7 6 5 4 3 2: Extended GEA bits */
1013 item = proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_ext_gea_bits, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1014 subtree = proto_item_add_subtree(item, ett_gmm_network_cap);
1015 proto_tree_add_item(subtree, hf_gsm_a_gmm_net_cap_gea2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1016 proto_tree_add_item(subtree, hf_gsm_a_gmm_net_cap_gea3, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1017 proto_tree_add_item(subtree, hf_gsm_a_gmm_net_cap_gea4, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1018 proto_tree_add_item(subtree, hf_gsm_a_gmm_net_cap_gea5, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1019 proto_tree_add_item(subtree, hf_gsm_a_gmm_net_cap_gea6, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1020 proto_tree_add_item(subtree, hf_gsm_a_gmm_net_cap_gea7, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1022 /* bit 1: LCS VA capability */
1023 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_lcs, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1026 NO_MORE_DATA_CHECK(len);
1028 /* bit 8: PS inter-RAT HO to UTRAN Iu mode capability */
1029 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_ps_irat_iu, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1031 /* bit 7: PS inter-RAT HO to E-UTRAN S1 mode capability */
1032 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_ps_irat_s1, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1034 /* bit 6: EMM Combined procedures capability */
1035 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_comb_proc, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1037 /* bit 5: ISR support */
1038 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_isr, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1040 /* bit 4: SRVCC to GERAN/UTRAN capability */
1041 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_srvcc_to_geran, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1043 /* bit 3: EPC capability */
1044 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_epc, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1046 /* bit 3: NF capability */
1047 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_nf, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1049 /* bits 1: Spare bit */
1050 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset<<3)+7, 1, ENC_BIG_ENDIAN);
1053 EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo);
1055 return(curr_offset - offset);
1061 #define GET_DATA /* check if we have enough bits left */ \
1062 if ( curr_bits_length < bits_needed ) \
1064 /* check if oct has enougth bits */ \
1065 if ( bits_in_oct < bits_needed ) \
1068 if ( curr_len == 0 ) \
1070 proto_tree_add_text(tf_tree, \
1071 tvb, curr_offset, 1, \
1072 "Not enough data available"); \
1074 tmp_oct = tvb_get_guint8(tvb, curr_offset); \
1075 oct |= tmp_oct<<(32-8-bits_in_oct); \
1078 if ( bits_in_oct != 0 ) \
1087 /* Access Technology Type */
1089 static const value_string gsm_a_gm_acc_tech_type_vals[] = {
1091 { 0x01, "GSM E --note that GSM E covers GSM P" },
1092 { 0x02, "GSM R --note that GSM R covers GSM E and GSM P" },
1093 { 0x03, "GSM 1800" },
1094 { 0x04, "GSM 1900" },
1095 { 0x05, "GSM 450" },
1096 { 0x06, "GSM 480" },
1097 { 0x07, "GSM 850" },
1098 { 0x08, "GSM 750" },
1099 { 0x09, "GSM T 380" },
1100 { 0x0a, "GSM T 410" },
1101 { 0x0b, "GSM T 900" },
1102 { 0x0c, "GSM 710" },
1103 { 0x0d, "GSM T 810" },
1104 { 0x0f, "Indicates the presence of a list of Additional access technologies" },
1108 static const true_false_string gsm_a_gm_vgcs = {
1109 "VGCS capability and notifications wanted",
1110 "no VGCS capability or no notifications wanted"
1113 static const true_false_string gsm_a_gm_vbs = {
1114 "VBS capability and notifications wanted",
1115 "no VBS capability or no notifications wanted"
1118 static const value_string gsm_a_gm_multi_slot_vals[] = {
1119 { 0x00, "Not specified" },
1120 { 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" },
1121 { 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" },
1122 { 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" },
1123 { 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" },
1124 { 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" },
1125 { 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" },
1126 { 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" },
1127 { 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" },
1128 { 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" },
1129 { 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" },
1130 { 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" },
1131 { 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" },
1132 { 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)" },
1133 { 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)" },
1134 { 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)" },
1135 { 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)" },
1136 { 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)" },
1137 { 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" },
1138 { 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" },
1139 { 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" },
1140 { 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" },
1141 { 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" },
1142 { 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" },
1143 { 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" },
1144 { 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" },
1145 { 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" },
1146 { 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" },
1147 { 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" },
1148 { 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" },
1149 { 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" },
1150 { 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" },
1151 { 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" },
1152 { 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" },
1153 { 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" },
1154 { 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))" },
1155 { 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))" },
1156 { 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))" },
1157 { 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))" },
1158 { 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))" },
1159 { 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))" },
1160 { 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))" },
1161 { 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))" },
1162 { 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))" },
1163 { 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))" },
1164 { 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))" },
1168 static const value_string gsm_a_gm_dtm_gprs_multi_slot_class_vals[] = {
1169 { 0x00, "Unused. If received, the network shall interpret this as Multislot class 5" },
1170 { 0x01, "Multislot class 5 supported" },
1171 { 0x02, "Multislot class 9 supported" },
1172 { 0x03, "Multislot class 11 supported" },
1176 static const true_false_string gsm_a_gm_revision_level_indicator = {
1177 "The ME is Release '99 onwards",
1178 "The ME is Release '98 or older"
1181 static const value_string gsm_a_gm_down_adv_rec_perf_vals[] = {
1182 { 0x00, "Downlink Advanced Receiver Performance not supported" },
1183 { 0x01, "Downlink Advanced Receiver Performance - phase I supported" },
1184 { 0x02, "Downlink Advanced Receiver Performance - phase II supported" },
1188 static const true_false_string gsm_a_gm_dtm_enh_cap = {
1189 "The mobile station supports enhanced DTM CS establishment and enhanced DTM CS release procedures",
1190 "The mobile station does not support enhanced DTM CS establishment and enhanced DTM CS release procedures"
1193 static const value_string gsm_a_gm_dtm_gprs_high_multi_slot_class_vals[] = {
1194 { 0x00, "Unused. If received, the network shall interpret this as 'Multislot class 31 or 36 supported'" },
1195 { 0x01, "Multislot class 31 or 36 supported" },
1196 { 0x02, "Multislot class 32 or 37 supported" },
1197 { 0x03, "Multislot class 33 or 38 supported" },
1198 { 0x04, "Multislot class 41 supported" },
1199 { 0x05, "Multislot class 42 supported" },
1200 { 0x06, "Multislot class 43 supported" },
1201 { 0x07, "Multislot class 44 supported" },
1205 static const value_string gsm_a_gm_multi_slot_cap_red_down_dual_carrier_vals[] = {
1206 { 0x00, "No reduction" },
1207 { 0x01, "The MS supports 1 timeslot fewer than the maximum number of receive timeslots" },
1208 { 0x02, "The MS supports 2 timeslots fewer than the maximum number of receive timeslots" },
1209 { 0x03, "The MS supports 3 timeslots fewer than the maximum number of receive timeslots" },
1210 { 0x04, "The MS supports 4 timeslots fewer than the maximum number of receive timeslots" },
1211 { 0x05, "The MS supports 5 timeslots fewer than the maximum number of receive timeslots" },
1212 { 0x06, "The MS supports 6 timeslots fewer than the maximum number of receive timeslots" },
1213 { 0x07, "Reserved for future use" },
1217 static const value_string gsm_a_gm_ul_egprs2_vals[] = {
1218 { 0x00, "The mobile station does not support either EGPRS2-A or EGPRS2-B in the uplink" },
1219 { 0x01, "The mobile station supports EGPRS2-A in the uplink" },
1220 { 0x02, "The mobile station supports both EGPRS2-A and EGPRS2-B in the uplink" },
1221 { 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'" },
1225 static const value_string gsm_a_gm_dl_egprs2_vals[] = {
1226 { 0x00, "The mobile station does not support either EGPRS2-A or EGPRS2-B in the downlink" },
1227 { 0x01, "The mobile station supports EGPRS2-A in the downlink" },
1228 { 0x02, "The mobile station supports both EGPRS2-A and EGPRS2-B in the downlink" },
1229 { 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'" },
1233 static const value_string gsm_a_gm_geran_to_eutra_support_in_geran_ptm_vals[] = {
1235 { 0x01, "E-UTRAN Neighbour Cell measurements and MS autonomous cell reselection to E-UTRAN supported" },
1236 { 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'" },
1237 { 0x03, "PS Handover to E-UTRAN supported in addition to capabilities indicated by '01' and '10'" },
1241 static const value_string gsm_a_gm_alt_efta_multi_slot_class_vals[] = {
1242 { 0x00, "No Alternative EFTA multislot class is indicated. Use (DTM) EGPRS (high) multislot class only" },
1243 { 0x01, "Alternative EFTA multislot class is Multislot class 19" },
1244 { 0x02, "Alternative EFTA multislot class is Multislot class 20" },
1245 { 0x03, "Alternative EFTA multislot class is Multislot class 21" },
1246 { 0x04, "Alternative EFTA multislot class is Multislot class 22" },
1247 { 0x05, "Alternative EFTA multislot class is Multislot class 23" },
1248 { 0x06, "Alternative EFTA multislot class is Multislot class 24" },
1249 { 0x07, "Alternative EFTA multislot class is Multislot class 25" },
1250 { 0x08, "Alternative EFTA multislot class is Multislot class 26" },
1251 { 0x09, "Alternative EFTA multislot class is Multislot class 27" },
1252 { 0x0a, "Alternative EFTA multislot class is Multislot class 28" },
1253 { 0x0b, "Alternative EFTA multislot class is Multislot class 29" },
1262 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_)
1264 guint32 curr_offset;
1267 proto_item *tf = NULL, *mc_item = NULL;
1268 proto_tree *tf_tree = NULL, *mc_tree = NULL;
1273 guint add_ocetets; /* octets which are covered by one element -1 */
1274 guint curr_bits_length;
1279 guchar dtm_gprs_mslot = 0;
1280 guchar dtm_egprs_mslot = 4;
1281 gboolean finished = TRUE;
1284 curr_offset = offset;
1285 bit_offset = offset<<3;
1293 /* check for a new round */
1294 if (( curr_len*8 + bits_in_oct ) < 11 )
1297 /* now read the first 11 bits */
1298 curr_bits_length = 11;
1302 if ( curr_len != len )
1307 if (( oct>>(32-bits_needed) ) == 1 )
1309 curr_bits_length -= bits_needed;
1310 oct <<= bits_needed;
1311 bits_in_oct -= bits_needed;
1314 if (( curr_len*8 + bits_in_oct ) < 11 )
1316 curr_bits_length = 11;
1320 curr_bits_length -= bits_needed;
1321 oct <<= bits_needed;
1322 bits_in_oct -= bits_needed;
1329 tf = proto_tree_add_text(tree,
1330 tvb, curr_offset, 1,
1331 "MS RA capability %d",indx);
1333 tf_tree = proto_item_add_subtree(tf, ett_gmm_radio_cap );
1341 acc_type = oct>>(32-bits_needed);
1343 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_acc_tech_type, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
1346 curr_bits_length -= bits_needed;
1347 oct <<= bits_needed;
1348 bits_in_oct -= bits_needed;
1350 /* < Access capabilities struct > ::= */
1357 bits_length = curr_bits_length = oct>>(32-bits_needed);
1359 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_acc_cap_struct_len, tvb, bit_offset, 7, ENC_BIG_ENDIAN);
1360 proto_item_set_len(tf, (bits_length>>3)+1);
1361 /* This is already done - length doesn't contain this field
1362 curr_bits_length -= bits_needed;
1365 oct <<= bits_needed;
1366 bits_in_oct -= bits_needed;
1368 if ( acc_type == 0x0f )
1373 * Additional access technologies:
1375 finished = TRUE; /* Break out of the loop unless proven unfinished */
1384 switch ( oct>>(32-bits_needed) )
1386 case 0x00: str="Not Present"; finished = TRUE; break;
1387 case 0x01: str="Present"; finished = FALSE; break;
1388 default: str="This should not happen";
1391 proto_tree_add_text(tf_tree,
1392 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
1393 "Presence: %s (%u)", str, oct>>(32-bits_needed));
1395 curr_bits_length -= bits_needed;
1396 oct <<= bits_needed;
1397 bits_in_oct -= bits_needed;
1402 * No more valid data, get spare bits if any
1404 while ( curr_bits_length > 0 )
1406 if ( curr_bits_length > 8 )
1409 bits_needed = curr_bits_length;
1411 curr_bits_length -= bits_needed;
1412 oct <<= bits_needed;
1413 bits_in_oct -= bits_needed;
1414 bit_offset+= bits_needed;
1425 acc_type = oct>>(32-bits_needed);
1427 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_acc_cap_struct_len, tvb, bit_offset, 7, ENC_BIG_ENDIAN);
1430 curr_bits_length -= bits_needed;
1431 oct <<= bits_needed;
1432 bits_in_oct -= bits_needed;
1440 value = tvb_get_bits8(tvb, bit_offset, 3);
1442 if ( acc_type == 0x04 ) /* GSM 1900 */
1446 case 0x01: str="1 W (30 dBm)"; break;
1447 case 0x02: str="0,25 W (24 dBm)"; break;
1448 case 0x03: str="2 W (33 dBm)"; break;
1449 default: str="Not specified";
1452 else if ( acc_type == 0x03 )
1459 case 0x01: str="1 W (30 dBm)"; break;
1460 case 0x02: str="0,25 W (24 dBm)"; break;
1461 case 0x03: str="4 W (36 dBm)"; break;
1462 default: str="Not specified";
1465 else if ( acc_type <= 0x08 )
1477 case 0x02: str="8 W (39 dBm)"; break;
1478 case 0x03: str="5 W (37 dBm)"; break;
1479 case 0x04: str="2 W (33 dBm)"; break;
1480 case 0x05: str="0,8 W (29 dBm)"; break;
1481 default: str="Not specified";
1485 str="Not specified??";
1487 /* decode_bits_in_field(gint bit_offset, gint no_of_bits, guint64 value)*/
1488 proto_tree_add_text(tf_tree,
1489 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
1490 "%s RF Power Capability, GMSK Power Class: %s (%u)", decode_bits_in_field(bit_offset, 3, value), str, value);
1492 curr_bits_length -= bits_needed;
1493 oct <<= bits_needed;
1494 bits_in_oct -= bits_needed;
1502 value = tvb_get_bits8(tvb, bit_offset, 2);
1506 case 0x00: str="8PSK modulation not supported for uplink"; break;
1507 case 0x01: str="Power class E1"; break;
1508 case 0x02: str="Power class E2"; break;
1509 case 0x03: str="Power class E3"; break;
1510 default: str="This should not happen";
1513 proto_tree_add_text(tf_tree,
1514 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
1515 "8PSK Power Class: %s (%u)",str,value);
1517 curr_bits_length -= bits_needed;
1518 oct <<= bits_needed;
1519 bits_in_oct -= bits_needed;
1521 } while (!finished);
1532 value = tvb_get_bits8(tvb, bit_offset, 3);
1534 if ( acc_type == 0x04 ) /* GSM 1900 */
1538 case 0x01: str="1 W (30 dBm)"; break;
1539 case 0x02: str="0,25 W (24 dBm)"; break;
1540 case 0x03: str="2 W (33 dBm)"; break;
1541 default: str="Not specified";
1544 else if ( acc_type == 0x03 )
1548 case 0x01: str="1 W (30 dBm)"; break;
1549 case 0x02: str="0,25 W (24 dBm)"; break;
1550 case 0x03: str="4 W (36 dBm)"; break;
1551 default: str="Not specified";
1554 else if ( acc_type <= 0x08 )
1558 case 0x02: str="8 W (39 dBm)"; break;
1559 case 0x03: str="5 W (37 dBm)"; break;
1560 case 0x04: str="2 W (33 dBm)"; break;
1561 case 0x05: str="0,8 W (29 dBm)"; break;
1562 default: str="Not specified";
1566 str="Not specified??";
1568 proto_tree_add_text(tf_tree,
1569 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
1570 "%s RF Power Capability, GMSK Power Class: %s (%u)", decode_bits_in_field(bit_offset, 3, value),str,value);
1573 curr_bits_length -= bits_needed;
1574 oct <<= bits_needed;
1575 bits_in_oct -= bits_needed;
1584 if ((oct>>(32-bits_needed))==0)
1586 proto_tree_add_text(tf_tree,
1587 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
1588 "A5 Bits: Same values apply for parameters as in the immediately preceding Access capabilities field within this IE (%u)",oct>>(32-bits_needed));
1590 curr_bits_length -= bits_needed;
1591 oct <<= bits_needed;
1592 bits_in_oct -= bits_needed;
1598 proto_tree_add_text(tf_tree,
1599 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
1600 "A5 Bits: A5 bits follow (%u)",oct>>(32-bits_needed));
1603 curr_bits_length -= bits_needed;
1604 oct <<= bits_needed;
1605 bits_in_oct -= bits_needed;
1607 for (i=1; i<= 7 ; i++ )
1616 switch ( oct>>(32-bits_needed) )
1618 case 0x00: str="encryption algorithm not available"; break;
1619 case 0x01: str="encryption algorithm available"; break;
1620 default: str="This should not happen";
1623 proto_tree_add_text(tf_tree,
1624 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
1625 "A5/%d: %s (%u)",i,str,oct>>(32-bits_needed));
1627 curr_bits_length -= bits_needed;
1628 oct <<= bits_needed;
1629 bits_in_oct -= bits_needed;
1639 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_ctrled_early_cm_sending, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
1641 curr_bits_length -= bits_needed;
1642 oct <<= bits_needed;
1643 bits_in_oct -= bits_needed;
1651 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_pseudo_sync, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
1653 curr_bits_length -= bits_needed;
1654 oct <<= bits_needed;
1655 bits_in_oct -= bits_needed;
1663 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_vgcs, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
1665 curr_bits_length -= bits_needed;
1666 oct <<= bits_needed;
1667 bits_in_oct -= bits_needed;
1675 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_vbs, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
1677 curr_bits_length -= bits_needed;
1678 oct <<= bits_needed;
1679 bits_in_oct -= bits_needed;
1682 * Multislot capability?
1687 value = oct>>(32-bits_needed);
1689 mc_item = proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_multislot_capability, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
1692 curr_bits_length -= bits_needed;
1693 oct <<= bits_needed;
1694 bits_in_oct -= bits_needed;
1699 mc_tree = proto_item_add_subtree(mc_item, ett_gsm_a_gm_msrac_multislot_capability);
1701 * HSCSD multislot class?
1707 if ((oct>>(32-bits_needed))==0)
1709 proto_tree_add_text(mc_tree,
1710 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
1711 "HSCSD multislot class: Bits are not available (%u)",oct>>(32-bits_needed));
1713 curr_bits_length -= bits_needed;
1714 oct <<= bits_needed;
1715 bits_in_oct -= bits_needed;
1719 curr_bits_length -= bits_needed;
1720 oct <<= bits_needed;
1721 bits_in_oct -= bits_needed;
1725 * HSCSD multislot class
1730 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_hscsd_multi_slot_class, tvb, bit_offset, 5, ENC_BIG_ENDIAN);
1732 curr_bits_length -= bits_needed;
1733 oct <<= bits_needed;
1734 bits_in_oct -= bits_needed;
1738 * GPRS multislot class?
1744 if ((oct>>(32-bits_needed))==0)
1746 proto_tree_add_text(mc_tree,
1747 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
1748 "GPRS multislot class: Bits are not available (%u)",oct>>(32-bits_needed));
1750 curr_bits_length -= bits_needed;
1751 oct <<= bits_needed;
1752 bits_in_oct -= bits_needed;
1756 curr_bits_length -= bits_needed;
1757 oct <<= bits_needed;
1758 bits_in_oct -= bits_needed;
1762 * GPRS multislot class
1767 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_gprs_multi_slot_class, tvb, bit_offset, 5, ENC_BIG_ENDIAN);
1769 curr_bits_length -= bits_needed;
1770 oct <<= bits_needed;
1771 bits_in_oct -= bits_needed;
1774 * GPRS Extended Dynamic Allocation Capability
1779 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_gprs_ext_dyn_alloc_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
1781 curr_bits_length -= bits_needed;
1782 oct <<= bits_needed;
1783 bits_in_oct -= bits_needed;
1793 if ((oct>>(32-bits_needed))==0)
1795 proto_tree_add_text(mc_tree,
1796 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
1797 "SMS/SM values: Bits are not available (%u)",oct>>(32-bits_needed));
1799 curr_bits_length -= bits_needed;
1800 oct <<= bits_needed;
1801 bits_in_oct -= bits_needed;
1805 curr_bits_length -= bits_needed;
1806 oct <<= bits_needed;
1807 bits_in_oct -= bits_needed;
1811 * Switch-Measure-Switch value
1817 proto_tree_add_bits_item(mc_tree, hf_gsm_a_gm_sms_value, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
1819 curr_bits_length -= bits_needed;
1820 oct <<= bits_needed;
1821 bits_in_oct -= bits_needed;
1824 * Switch-Measure value
1830 proto_tree_add_bits_item(mc_tree, hf_gsm_a_gm_sm_value, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
1832 curr_bits_length -= bits_needed;
1833 oct <<= bits_needed;
1834 bits_in_oct -= bits_needed;
1838 * ECSD multislot class?
1844 if ((oct>>(32-bits_needed))==0)
1846 proto_tree_add_text(mc_tree,
1847 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
1848 "ECSD multislot class: Bits are not available (%u)",oct>>(32-bits_needed));
1850 curr_bits_length -= bits_needed;
1851 oct <<= bits_needed;
1852 bits_in_oct -= bits_needed;
1856 curr_bits_length -= bits_needed;
1857 oct <<= bits_needed;
1858 bits_in_oct -= bits_needed;
1862 * ECSD multislot class
1867 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_ecsd_multi_slot_class, tvb, bit_offset, 5, ENC_BIG_ENDIAN);
1869 curr_bits_length -= bits_needed;
1870 oct <<= bits_needed;
1871 bits_in_oct -= bits_needed;
1875 * EGPRS multislot class?
1881 if ((oct>>(32-bits_needed))==0)
1883 proto_tree_add_text(mc_tree,
1884 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
1885 "EGPRS multislot class: Bits are not available (%u)",oct>>(32-bits_needed));
1886 curr_bits_length -= bits_needed;
1887 oct <<= bits_needed;
1888 bits_in_oct -= bits_needed;
1893 curr_bits_length -= bits_needed;
1894 oct <<= bits_needed;
1895 bits_in_oct -= bits_needed;
1899 * EGPRS multislot class
1904 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_egprs_multi_slot_class, tvb, bit_offset, 5, ENC_BIG_ENDIAN);
1906 curr_bits_length -= bits_needed;
1907 oct <<= bits_needed;
1908 bits_in_oct -= bits_needed;
1911 * EGPRS Extended Dynamic Allocation Capability
1916 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_egprs_ext_dyn_alloc_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
1918 curr_bits_length -= bits_needed;
1919 oct <<= bits_needed;
1920 bits_in_oct -= bits_needed;
1924 * DTM GPRS Multi Slot Class ?
1930 if ((oct>>(32-bits_needed))==0)
1932 proto_tree_add_text(mc_tree,
1933 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
1934 "DTM GPRS Multi Slot Class: Bits are not available (%u)",oct>>(32-bits_needed));
1936 curr_bits_length -= bits_needed;
1937 oct <<= bits_needed;
1938 bits_in_oct -= bits_needed;
1942 curr_bits_length -= bits_needed;
1943 oct <<= bits_needed;
1944 bits_in_oct -= bits_needed;
1948 * DTM GPRS Multi Slot Class
1954 dtm_gprs_mslot = oct>>(32-bits_needed);
1956 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_dtm_gprs_multi_slot_class, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
1958 curr_bits_length -= bits_needed;
1959 oct <<= bits_needed;
1960 bits_in_oct -= bits_needed;
1968 proto_tree_add_bits_item(mc_tree, hf_gsm_a_gm_rac_single_slt_dtm, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
1970 curr_bits_length -= bits_needed;
1971 oct <<= bits_needed;
1972 bits_in_oct -= bits_needed;
1975 * DTM EGPRS Multi Slot Class ?
1981 dtm_egprs_mslot = oct>>(32-bits_needed);
1982 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);
1984 curr_bits_length -= bits_needed;
1985 oct <<= bits_needed;
1986 bits_in_oct -= bits_needed;
1988 if ((oct>>(32-bits_needed))==1)
1991 * DTM EGPRS Multi Slot Class
1996 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_dtm_egprs_multi_slot_class, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
1998 curr_bits_length -= bits_needed;
1999 oct <<= bits_needed;
2000 bits_in_oct -= bits_needed;
2006 * 8PSK Power Capability?
2011 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_8psk_pow_cap_pres, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2013 curr_bits_length -= bits_needed;
2014 oct <<= bits_needed;
2015 bits_in_oct -= bits_needed;
2018 if ((oct>>(32-bits_needed))==1)
2021 * 8PSK Power Capability
2027 switch ( oct>>(32-bits_needed) )
2029 case 0x00: str="Reserved"; break;
2030 case 0x01: str="Power class E1"; break;
2031 case 0x02: str="Power class E2"; break;
2032 case 0x03: str="Power class E3"; break;
2033 default: str="This should not happen";
2036 proto_tree_add_text(tf_tree,
2037 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
2038 "8PSK Power Capability: %s (%u)",str,oct>>(32-bits_needed));
2040 curr_bits_length -= bits_needed;
2041 oct <<= bits_needed;
2042 bits_in_oct -= bits_needed;
2046 * COMPACT Interference Measurement Capability
2051 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_comp_int_meas_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2053 curr_bits_length -= bits_needed;
2054 oct <<= bits_needed;
2055 bits_in_oct -= bits_needed;
2058 * Revision Level Indicator
2063 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rel_lev_ind, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2065 curr_bits_length -= bits_needed;
2066 oct <<= bits_needed;
2067 bits_in_oct -= bits_needed;
2070 * UMTS FDD Radio Access Technology Capability
2075 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_umts_fdd_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2077 curr_bits_length -= bits_needed;
2078 oct <<= bits_needed;
2079 bits_in_oct -= bits_needed;
2082 * UMTS 3.84 Mcps TDD Radio Access Technology Capability
2087 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_umts_384_tdd_ra_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2089 curr_bits_length -= bits_needed;
2090 oct <<= bits_needed;
2091 bits_in_oct -= bits_needed;
2094 * CDMA 2000 Radio Access Technology Capability
2099 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_cdma2000_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2101 curr_bits_length -= bits_needed;
2102 oct <<= bits_needed;
2103 bits_in_oct -= bits_needed;
2106 * UMTS 1.28 Mcps TDD Radio Access Technology Capability
2111 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_umts_128_tdd_ra_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2113 curr_bits_length -= bits_needed;
2114 oct <<= bits_needed;
2115 bits_in_oct -= bits_needed;
2118 * GERAN Feature Package 1
2123 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_geran_feat_pkg, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2125 curr_bits_length -= bits_needed;
2126 oct <<= bits_needed;
2127 bits_in_oct -= bits_needed;
2130 * Extended DTM (E)GPRS Multi Slot Class
2137 if ((oct>>(32-bits_needed))==0)
2139 proto_tree_add_text(tf_tree,
2140 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
2141 "Extended DTM (E)GPRS Multi Slot Class: Bits are not available (%u)",oct>>(32-bits_needed));
2142 curr_bits_length -= bits_needed;
2143 oct <<= bits_needed;
2144 bits_in_oct -= bits_needed;
2149 curr_bits_length -= bits_needed;
2150 oct <<= bits_needed;
2151 bits_in_oct -= bits_needed;
2155 * Extended DTM GPRS Multi Slot Class
2161 switch ( (oct>>(32-bits_needed))|(dtm_gprs_mslot<<4) )
2163 case 0x00: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
2164 case 0x01: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
2165 case 0x02: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
2166 case 0x03: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
2167 case 0x10: str="Multislot class 5 supported"; break;
2168 case 0x11: str="Multislot class 6 supported"; break;
2169 case 0x12: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
2170 case 0x13: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
2171 case 0x20: str="Multislot class 9 supported"; break;
2172 case 0x21: str="Multislot class 10 supported"; break;
2173 case 0x22: str="Unused. If received, it shall be interpreted as Multislot class 9 supported"; break;
2174 case 0x23: str="Unused. If received, it shall be interpreted as Multislot class 9 supported"; break;
2175 case 0x30: str="Multislot class 11 supported"; break;
2176 case 0x31: str="Unused. If received, it shall be interpreted as Multislot class 11 supported"; break;
2177 case 0x32: str="Unused. If received, it shall be interpreted as Multislot class 11 supported"; break;
2178 case 0x33: str="Unused. If received, it shall be interpreted as Multislot class 11 supported"; break;
2179 default: str="This should not happen";
2182 proto_tree_add_text(tf_tree,
2183 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
2184 "Extended DTM GPRS Multi Slot Class: %s (%u)",str,oct>>(32-bits_needed));
2186 curr_bits_length -= bits_needed;
2187 oct <<= bits_needed;
2188 bits_in_oct -= bits_needed;
2190 if ( dtm_egprs_mslot <= 3 )
2193 * Extended DTM EGPRS Multi Slot Class
2199 switch ( (oct>>(32-bits_needed))|(dtm_egprs_mslot<<4) )
2201 case 0x00: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
2202 case 0x01: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
2203 case 0x02: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
2204 case 0x03: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
2205 case 0x10: str="Multislot class 5 supported"; break;
2206 case 0x11: str="Multislot class 6 supported"; break;
2207 case 0x12: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
2208 case 0x13: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
2209 case 0x20: str="Multislot class 9 supported"; break;
2210 case 0x21: str="Multislot class 10 supported"; break;
2211 case 0x22: str="Unused. If received, it shall be interpreted as Multislot class 9 supported"; break;
2212 case 0x23: str="Unused. If received, it shall be interpreted as Multislot class 9 supported"; break;
2213 case 0x30: str="Multislot class 11 supported"; break;
2214 case 0x31: str="Unused. If received, it shall be interpreted as Multislot class 11 supported"; break;
2215 case 0x32: str="Unused. If received, it shall be interpreted as Multislot class 11 supported"; break;
2216 case 0x33: str="Unused. If received, it shall be interpreted as Multislot class 11 supported"; break;
2217 default: str="This should not happen";
2220 proto_tree_add_text(tf_tree,
2221 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
2222 "Extended DTM EGPRS Multi Slot Class: %s (%u)",str, oct>>(32-bits_needed));
2224 curr_bits_length -= bits_needed;
2225 oct <<= bits_needed;
2226 bits_in_oct -= bits_needed;
2231 * Modulation based multislot class support
2236 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);
2238 curr_bits_length -= bits_needed;
2239 oct <<= bits_needed;
2240 bits_in_oct -= bits_needed;
2243 * High Multislot Capability
2249 if ((oct>>(32-bits_needed))==0)
2251 proto_tree_add_text(tf_tree,
2252 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
2253 "High Multislot Capability: Bits are not available (%u)",oct>>(32-bits_needed));
2255 curr_bits_length -= bits_needed;
2256 oct <<= bits_needed;
2257 bits_in_oct -= bits_needed;
2261 curr_bits_length -= bits_needed;
2262 oct <<= bits_needed;
2263 bits_in_oct -= bits_needed;
2267 * High Multislot Capability
2273 proto_tree_add_text(tf_tree,
2274 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
2275 "High Multislot Capability: 0x%02x (%u)"
2276 " - This field effect all other multislot fields."
2277 " To understand the value please read TS 24.008 5.6.0"
2278 " Release 5 Chap 10.5.5.12 Page 406",
2279 oct>>(32-bits_needed),
2280 oct>>(32-bits_needed));
2282 curr_bits_length -= bits_needed;
2283 oct <<= bits_needed;
2284 bits_in_oct -= bits_needed;
2288 * GERAN Iu Mode Capability
2293 value = tvb_get_bits8(tvb, bit_offset, 1);
2294 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_geran_iu_mode_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2295 bit_offset+=bits_needed;
2296 curr_bits_length -= bits_needed;
2297 oct <<= bits_needed;
2298 bits_in_oct -= bits_needed;
2301 /* GERAN Iu Mode Capabilities struct present */
2304 value = tvb_get_bits8(tvb, bit_offset, 4);
2305 bit_offset+=bits_needed;
2306 curr_bits_length -= bits_needed;
2307 oct <<= bits_needed;
2308 bits_in_oct -= bits_needed;
2316 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_flo_iu_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2317 bit_offset+=bits_needed;
2318 curr_bits_length -= bits_needed;
2319 oct <<= bits_needed;
2320 bits_in_oct -= bits_needed;
2323 /* skip spare bits */
2325 curr_bits_length -= value;
2327 bits_in_oct -= value;
2332 * GMSK Multislot Power Profile
2338 switch ( oct>>(32-bits_needed) )
2340 case 0x00: str="GMSK_MULTISLOT_POWER_PROFILE 0"; break;
2341 case 0x01: str="GMSK_MULTISLOT_POWER_PROFILE 1"; break;
2342 case 0x02: str="GMSK_MULTISLOT_POWER_PROFILE 2"; break;
2343 case 0x03: str="GMSK_MULTISLOT_POWER_PROFILE 3"; break;
2344 default: str="This should not happen";
2347 proto_tree_add_text(tf_tree,
2348 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
2349 "GMSK Multislot Power Profile: %s (%u)",str,oct>>(32-bits_needed));
2351 curr_bits_length -= bits_needed;
2352 oct <<= bits_needed;
2353 bits_in_oct -= bits_needed;
2356 * 8-PSK Multislot Power Profile
2362 switch ( oct>>(32-bits_needed) )
2364 case 0x00: str="8-PSK_MULTISLOT_POWER_PROFILE 0"; break;
2365 case 0x01: str="8-PSK_MULTISLOT_POWER_PROFILE 1"; break;
2366 case 0x02: str="8-PSK_MULTISLOT_POWER_PROFILE 2"; break;
2367 case 0x03: str="8-PSK_MULTISLOT_POWER_PROFILE 3"; break;
2368 default: str="This should not happen";
2371 proto_tree_add_text(tf_tree,
2372 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
2373 "8-PSK Multislot Power Profile: %s (%u)",str,oct>>(32-bits_needed));
2375 curr_bits_length -= bits_needed;
2376 oct <<= bits_needed;
2377 bits_in_oct -= bits_needed;
2384 * Multiple TBF Capability
2388 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_mult_tbf_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2389 bit_offset+=bits_needed;
2390 curr_bits_length -= bits_needed;
2391 oct <<= bits_needed;
2392 bits_in_oct -= bits_needed;
2395 * Downlink Advanced Receiver Performance
2399 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_down_adv_rec_perf, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
2400 bit_offset+=bits_needed;
2401 curr_bits_length -= bits_needed;
2402 oct <<= bits_needed;
2403 bits_in_oct -= bits_needed;
2406 * Extended RLC/MAC Control Message Segmentation Capability
2410 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);
2411 bit_offset+=bits_needed;
2412 curr_bits_length -= bits_needed;
2413 oct <<= bits_needed;
2414 bits_in_oct -= bits_needed;
2417 * DTM Enhancements Capability
2421 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_dtm_enh_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2422 bit_offset+=bits_needed;
2423 curr_bits_length -= bits_needed;
2424 oct <<= bits_needed;
2425 bits_in_oct -= bits_needed;
2428 * DTM GPRS High Multi Slot Class & DTM EGPRS High Multi Slot Class
2432 if ((oct>>(32-bits_needed))==0)
2434 bit_offset+=bits_needed;
2435 curr_bits_length -= bits_needed;
2436 oct <<= bits_needed;
2437 bits_in_oct -= bits_needed;
2441 bit_offset+=bits_needed;
2442 curr_bits_length -= bits_needed;
2443 oct <<= bits_needed;
2444 bits_in_oct -= bits_needed;
2447 * DTM GPRS High Multi Slot Class
2451 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);
2452 bit_offset+=bits_needed;
2453 curr_bits_length -= bits_needed;
2454 oct <<= bits_needed;
2455 bits_in_oct -= bits_needed;
2459 if ((oct>>(32-bits_needed))==0)
2461 bit_offset+=bits_needed;
2462 curr_bits_length -= bits_needed;
2463 oct <<= bits_needed;
2464 bits_in_oct -= bits_needed;
2468 bit_offset+=bits_needed;
2469 curr_bits_length -= bits_needed;
2470 oct <<= bits_needed;
2471 bits_in_oct -= bits_needed;
2474 * DTM EGPRS High Multi Slot Class
2478 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);
2479 bit_offset+=bits_needed;
2480 curr_bits_length -= bits_needed;
2481 oct <<= bits_needed;
2482 bits_in_oct -= bits_needed;
2487 * PS Handover Capability
2491 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_ps_ho_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2492 bit_offset+=bits_needed;
2493 curr_bits_length -= bits_needed;
2494 oct <<= bits_needed;
2495 bits_in_oct -= bits_needed;
2502 * DTM Handover Capability
2506 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_dtm_ho_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2507 bit_offset+=bits_needed;
2508 curr_bits_length -= bits_needed;
2509 oct <<= bits_needed;
2510 bits_in_oct -= bits_needed;
2513 * Multislot Capability Reduction for Downlink Dual Carrier & Downlink Dual Carrier for DTM Capability
2517 if ((oct>>(32-bits_needed))==0)
2519 bit_offset+=bits_needed;
2520 curr_bits_length -= bits_needed;
2521 oct <<= bits_needed;
2522 bits_in_oct -= bits_needed;
2526 bit_offset+=bits_needed;
2527 curr_bits_length -= bits_needed;
2528 oct <<= bits_needed;
2529 bits_in_oct -= bits_needed;
2532 * Multislot Capability Reduction for Downlink Dual Carrier
2536 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);
2537 bit_offset+=bits_needed;
2538 curr_bits_length -= bits_needed;
2539 oct <<= bits_needed;
2540 bits_in_oct -= bits_needed;
2543 * Downlink Dual Carrier for DTM Capability
2547 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_down_dual_carrier_dtm_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2548 bit_offset+=bits_needed;
2549 curr_bits_length -= bits_needed;
2550 oct <<= bits_needed;
2551 bits_in_oct -= bits_needed;
2555 * Flexible Timeslot Assignment
2559 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_flex_ts_assign, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2560 bit_offset+=bits_needed;
2561 curr_bits_length -= bits_needed;
2562 oct <<= bits_needed;
2563 bits_in_oct -= bits_needed;
2566 * GAN PS Handover Capability
2570 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_gan_ps_ho_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2571 bit_offset+=bits_needed;
2572 curr_bits_length -= bits_needed;
2573 oct <<= bits_needed;
2574 bits_in_oct -= bits_needed;
2577 * RLC Non-persistent Mode
2581 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_rlc_non_pers_mode, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2582 bit_offset+=bits_needed;
2583 curr_bits_length -= bits_needed;
2584 oct <<= bits_needed;
2585 bits_in_oct -= bits_needed;
2588 * Reduced Latency Capability
2592 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_reduced_lat_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2593 bit_offset+=bits_needed;
2594 curr_bits_length -= bits_needed;
2595 oct <<= bits_needed;
2596 bits_in_oct -= bits_needed;
2603 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_ul_egprs2, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
2604 bit_offset+=bits_needed;
2605 curr_bits_length -= bits_needed;
2606 oct <<= bits_needed;
2607 bits_in_oct -= bits_needed;
2614 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_dl_egprs2, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
2615 bit_offset+=bits_needed;
2616 curr_bits_length -= bits_needed;
2617 oct <<= bits_needed;
2618 bits_in_oct -= bits_needed;
2625 * E-UTRA FDD support
2629 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_eutra_fdd_support, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2630 bit_offset+=bits_needed;
2631 curr_bits_length -= bits_needed;
2632 oct <<= bits_needed;
2633 bits_in_oct -= bits_needed;
2636 * E-UTRA TDD support
2640 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_eutra_tdd_support, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2641 bit_offset+=bits_needed;
2642 curr_bits_length -= bits_needed;
2643 oct <<= bits_needed;
2644 bits_in_oct -= bits_needed;
2647 * GERAN to E-UTRA support in GERAN packet transfer mode
2651 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);
2652 bit_offset+=bits_needed;
2653 curr_bits_length -= bits_needed;
2654 oct <<= bits_needed;
2655 bits_in_oct -= bits_needed;
2658 * Priority-based reselection support
2662 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_prio_based_resel_support, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2663 bit_offset+=bits_needed;
2664 curr_bits_length -= bits_needed;
2665 oct <<= bits_needed;
2666 bits_in_oct -= bits_needed;
2673 * Enhanced Flexible Timeslot Assignment
2677 if ((oct>>(32-bits_needed))==0)
2679 bit_offset+=bits_needed;
2680 curr_bits_length -= bits_needed;
2681 oct <<= bits_needed;
2682 bits_in_oct -= bits_needed;
2686 bit_offset+=bits_needed;
2687 curr_bits_length -= bits_needed;
2688 oct <<= bits_needed;
2689 bits_in_oct -= bits_needed;
2692 * Alternative EFTA Multislot Class
2696 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_alt_efta_multi_slot_class, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
2697 bit_offset+=bits_needed;
2698 curr_bits_length -= bits_needed;
2699 oct <<= bits_needed;
2700 bits_in_oct -= bits_needed;
2703 * EFTA Multislot Capability Reduction for Downlink Dual Carrier
2707 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);
2708 bit_offset+=bits_needed;
2709 curr_bits_length -= bits_needed;
2710 oct <<= bits_needed;
2711 bits_in_oct -= bits_needed;
2715 * Indication of Upper Layer PDU Start Capability for RLC UM
2719 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);
2720 bit_offset+=bits_needed;
2721 curr_bits_length -= bits_needed;
2722 oct <<= bits_needed;
2723 bits_in_oct -= bits_needed;
2730 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_emst_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2731 bit_offset+=bits_needed;
2732 curr_bits_length -= bits_needed;
2733 oct <<= bits_needed;
2734 bits_in_oct -= bits_needed;
2741 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_mtti_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2742 bit_offset+=bits_needed;
2743 curr_bits_length -= bits_needed;
2744 oct <<= bits_needed;
2745 bits_in_oct -= bits_needed;
2748 * UTRA CSG Cells Reporting
2752 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_utra_csg_cell_report, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2753 bit_offset+=bits_needed;
2754 curr_bits_length -= bits_needed;
2755 oct <<= bits_needed;
2756 bits_in_oct -= bits_needed;
2759 * E-UTRA CSG Cells Reporting
2763 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_eutra_csg_cell_report, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2764 bit_offset+=bits_needed;
2765 curr_bits_length -= bits_needed;
2766 oct <<= bits_needed;
2767 bits_in_oct -= bits_needed;
2770 * we are too long ... so jump over it
2772 while ( curr_bits_length > 0 )
2774 if ( curr_bits_length > 8 )
2777 bits_needed = curr_bits_length;
2779 curr_bits_length -= bits_needed;
2780 oct <<= bits_needed;
2781 bits_in_oct -= bits_needed;
2787 curr_offset+= curr_len;
2789 EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo);
2791 return(curr_offset - offset);
2797 static const range_string gmm_cause_vals[] = {
2798 { 0x00, 0x01, "Protocol error, unspecified(Not def in v8.6.0)"},
2799 { 0x02, 0x02, "IMSI unknown in HLR"},
2800 { 0x03, 0x03, "Illegal MS"},
2801 { 0x04, 0x04, "IMSI unknown in VLR"}, /* Annex G.1 */
2802 { 0x05, 0x05, "IMEI not accepted"}, /* Annex G.1 */
2803 { 0x06, 0x06, "Illegal ME"},
2804 { 0x07, 0x07, "GPRS services not allowed"},
2805 { 0x08, 0x08, "GPRS services and non-GPRS services not allowed"},
2806 { 0x09, 0x09, "MS identity cannot be derived by the network"},
2807 { 0x0a, 0x0a, "Implicitly detached"},
2808 { 0x0b, 0x0b, "PLMN not allowed"},
2809 { 0x0c, 0x0c, "Location Area not allowed"},
2810 { 0x0d, 0x0d, "Roaming not allowed in this location area"},
2811 { 0x0e, 0x0e, "GPRS services not allowed in this PLMN"},
2812 { 0x0f, 0x0f, "No Suitable Cells In Location Area"},
2813 { 0x10, 0x10, "MSC temporarily not reachable"},
2814 { 0x11, 0x11, "Network failure"},
2815 { 0x12, 0x13, "Protocol error, unspecified(Not def in v8.6.0)"},
2816 { 0x14, 0x14, "MAC failure"},
2817 { 0x15, 0x15, "Synch failure"},
2818 { 0x16, 0x16, "Congestion"},
2819 { 0x17, 0x17, "GSM authentication unacceptable"},
2820 { 0x18, 0x18, "Protocol error, unspecified(Not def in v8.6.0)"},
2821 { 0x19, 0x19, "Not authorized for this CSG"},
2822 { 0x20, 0x20, "Service option not supported"}, /* Annex G.4 */
2823 { 0x21, 0x21, "Requested service option not subscribed"}, /* Annex G.4 */
2824 { 0x22, 0x22, "Service option temporarily out of order"}, /* Annex G.4 */
2826 { 0x23, 0x25, "Protocol error, unspecified(Not def in v8.6.0)"},
2828 { 0x26, 0x26, "Call cannot be identified(non-GPRS services only)"}, /* Annex G.4 */
2829 { 0x27, 0x27, "Protocol error, unspecified(Not def in v8.6.0)"},
2830 { 0x28, 0x28, "No PDP context activated"},
2831 { 0x29, 0x2f, "Protocol error, unspecified(Not def in v8.6.0)"},
2832 { 0x30, 0x3f, "Retry upon entry into a new cell"},
2834 { 0x40, 0x5e, "Protocol error, unspecified(Not def in v8.6.0)"},
2836 { 0x5f, 0x5f, "Semantically incorrect message"},
2837 { 0x60, 0x60, "Invalid mandatory information"},
2838 { 0x61, 0x61, "Message type non-existent or not implemented"},
2839 { 0x62, 0x62, "Message type not compatible with the protocol state"},
2840 { 0x63, 0x63, "Information element non-existent or notimplemented"},
2841 { 0x64, 0x64, "Conditional IE error"},
2842 { 0x65, 0x65, "Message not compatible with the protocol state"},
2844 { 0x66, 0x6e, "Protocol error, unspecified(Not def in v8.6.0)"},
2846 { 0x6f, 0x6f, "Protocol error, unspecified"},
2847 { 0x70, 0xff, "Protocol error, unspecified(Not def in v8.6.0)"},
2850 /* NOTE 1 TS 124 008 V8.6.0 (2009-07)
2851 "Any other value received by the mobile station shall be treated as 0110 1111, "Protocol
2852 error, unspecified". Any other value received by the network shall be treated as
2853 0110 1111, "Protocol error, unspecified".
2856 /* NOTE: The listed reject cause values are defined in annex G. */
2859 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_)
2861 guint32 curr_offset;
2863 curr_offset = offset;
2865 proto_tree_add_item(tree, hf_gsm_a_gm_cause, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2869 /* no length check possible */
2871 return(curr_offset - offset);
2875 * [7] 10.5.5.15 Routing area identification
2878 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_)
2880 proto_tree *subtree;
2886 guint32 curr_offset;
2888 curr_offset = offset;
2890 mcc = (tvb_get_guint8(tvb, curr_offset) & 0x0f) <<8;
2891 mcc |= (tvb_get_guint8(tvb, curr_offset) & 0xf0);
2892 mcc |= (tvb_get_guint8(tvb, curr_offset+1) & 0x0f);
2893 mnc = (tvb_get_guint8(tvb, curr_offset+2) & 0x0f) <<8;
2894 mnc |= (tvb_get_guint8(tvb, curr_offset+2) & 0xf0);
2895 mnc |= (tvb_get_guint8(tvb, curr_offset+1) & 0xf0) >>4;
2896 if ((mnc&0x000f) == 0x000f)
2899 lac = tvb_get_ntohs(tvb, curr_offset+3);
2900 rac = tvb_get_guint8(tvb, curr_offset+5);
2902 item = proto_tree_add_text(tree,
2903 tvb, curr_offset, 6,
2904 "Routing area identification: %x-%x-%u-%u",
2907 subtree = proto_item_add_subtree(item, ett_gmm_rai);
2908 dissect_e212_mcc_mnc(tvb, pinfo, subtree, offset, TRUE);
2910 proto_tree_add_item(subtree, hf_gsm_a_lac, tvb, curr_offset+3, 2, ENC_BIG_ENDIAN);
2911 proto_tree_add_item(subtree, hf_gsm_a_gm_rac, tvb, curr_offset+5, 1, ENC_BIG_ENDIAN);
2916 if (add_string[0] == '\0')
2918 g_snprintf(add_string, string_len, " - RAI: %x-%x-%u-%u", mcc,mnc,lac,rac);
2923 /* no length check possible */
2925 return(curr_offset - offset);
2929 * [7] 10.5.5.15a Routing area identification 2
2932 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_)
2934 /* The routing area identification 2 value is coded as octet 2 to 7 of the Routing area identification information element. */
2935 return de_gmm_rai(tvb, tree, pinfo, offset, len, add_string, string_len);
2942 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_)
2945 guint32 curr_offset;
2948 curr_offset = offset;
2950 oct = tvb_get_guint8(tvb, curr_offset);
2952 /* IMPORTANT - IT'S ASSUMED THAT THE INFORMATION IS IN THE HIGHER NIBBLE */
2957 case 0: str="RA updated"; break;
2958 case 1: str="combined RA/LA updated"; break;
2959 default: str="reserved";
2962 proto_tree_add_text(tree,
2963 tvb, curr_offset, 1,
2964 "Update Result: %s (%u)",
2970 /* no length check possible */
2972 return(curr_offset - offset);
2976 * [9] 10.5.5.18 Update Type
2978 static const value_string gsm_a_gm_update_type_vals[] = {
2979 { 0x00, "RA updating" },
2980 { 0x01, "combined RA/LA updating" },
2981 { 0x02, "combined RA/LA updating with IMSI attach" },
2982 { 0x03, "Periodic updating" },
2987 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_)
2989 proto_item *tf = NULL;
2990 proto_tree *tf_tree = NULL;
2992 proto_tree_add_bits_item(tree, hf_gsm_a_gm_ciph_key_seq_num, tvb, offset << 3, 4, ENC_BIG_ENDIAN);
2994 tf = proto_tree_add_text(tree,
2998 tf_tree = proto_item_add_subtree(tf, ett_gmm_update_type );
3000 proto_tree_add_item(tf_tree, hf_gsm_a_gm_for, tvb, offset, 1, ENC_BIG_ENDIAN);
3001 proto_tree_add_item(tf_tree, hf_gsm_a_gm_update_type, tvb, offset, 1, ENC_BIG_ENDIAN);
3003 /* no length check possible */
3008 * [9] 10.5.5.19 A&C reference number (lower nibble)
3011 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_)
3013 /* IMPORTANT - IT'S ASSUMED THAT THE INFORMATION IS IN THE LOWER NIBBLE */
3014 proto_tree_add_bits_item(tree, hf_gsm_a_gm_ac_ref_nr, tvb, (offset << 3) + 4, 4, ENC_BIG_ENDIAN);
3016 /* no length check possible */
3021 * [9] 10.5.5.19 A&C reference number (higher nibble)
3024 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_)
3026 /* IMPORTANT - IT'S ASSUMED THAT THE INFORMATION IS IN THE HIGHER NIBBLE */
3027 proto_tree_add_bits_item(tree, hf_gsm_a_gm_ac_ref_nr, tvb, offset << 3, 4, ENC_BIG_ENDIAN);
3029 /* no length check possible */
3034 * [9] 10.5.5.20 Service type
3036 static const value_string gsm_a_gm_serv_type_vals[] = {
3037 { 0x00, "Signalling" },
3039 { 0x02, "Paging response" },
3040 { 0x03, "MBMS Multicast Service Reception" },
3041 { 0x04, "MBMS Broadcast Service Reception" },
3046 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_)
3050 bit_offset = offset << 3;
3051 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3053 proto_tree_add_bits_item(tree, hf_gsm_a_gm_serv_type, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
3055 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3057 proto_tree_add_bits_item(tree, hf_gsm_a_gm_ciph_key_seq_num, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
3059 /* no length check possible */
3064 * [9] 10.5.5.21 Cell Notification
3069 * [9] 10.5.5.22 PS LCS Capability
3071 static const true_false_string gsm_a_gm_apc_vals = {
3072 "Additional Positioning Capabilities which can be retrieved by RRLP are supported",
3073 "Additional Positioning Capabilities which can be retrieved by RRLP are not supported"
3076 static const true_false_string gsm_a_gm_otd_a_vals = {
3077 "MS assisted E-OTD supported",
3078 "MS assisted E-OTD not supported"
3081 static const true_false_string gsm_a_gm_otd_b_vals = {
3082 "MS based E-OTD supported",
3083 "MS based E-OTD not supported"
3086 static const true_false_string gsm_a_gm_gps_a_vals = {
3087 "MS assisted GPS supported",
3088 "MS assisted GPS not supported"
3091 static const true_false_string gsm_a_gm_gps_b_vals = {
3092 "MS based GPS supported",
3093 "MS based GPS not supported"
3096 static const true_false_string gsm_a_gm_gps_c_vals = {
3097 "Conventional GPS supported",
3098 "Conventional GPS not supported"
3102 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_)
3104 guint32 curr_offset;
3106 curr_offset = offset;
3107 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, curr_offset << 3, 2, ENC_BIG_ENDIAN);
3108 proto_tree_add_item(tree, hf_gsm_a_gm_apc, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3109 proto_tree_add_item(tree, hf_gsm_a_gm_otd_a, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3110 proto_tree_add_item(tree, hf_gsm_a_gm_otd_b, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3111 proto_tree_add_item(tree, hf_gsm_a_gm_gps_a, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3112 proto_tree_add_item(tree, hf_gsm_a_gm_gps_b, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3113 proto_tree_add_item(tree, hf_gsm_a_gm_gps_c, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3117 EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo);
3119 return(curr_offset - offset);
3126 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_)
3129 guint32 curr_offset;
3132 curr_offset = offset;
3134 oct = tvb_get_guint8(tvb, curr_offset);
3138 case 8: str="LCS-MOLR via PS domain not supported"; break;
3139 default: str="LCS-MOLR via PS domain supported";
3142 proto_tree_add_text(tree,
3143 tvb, curr_offset, 1,
3144 "Network Feature Support: %s (%u)",
3150 /* no length check possible */
3152 return(curr_offset - offset);
3155 /* [7] 10.5.5.24 Inter RAT information container */
3157 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_)
3159 guint32 curr_offset;
3160 tvbuff_t *rrc_irat_ho_info_tvb;
3162 curr_offset = offset;
3164 /* The value part of the Inter RAT information container information element is the INTER RAT HANDOVER INFO as
3165 defined in 3GPP TS 25.331 [23c]. If this field includes padding bits, they are defined in 3GPP TS 25.331 [23c].*/
3166 rrc_irat_ho_info_tvb = tvb_new_subset(tvb, curr_offset, len, len);
3167 if (rrc_irat_ho_info_handle)
3168 call_dissector(rrc_irat_ho_info_handle, rrc_irat_ho_info_tvb,pinfo , tree);
3170 proto_tree_add_text(tree, tvb, curr_offset, len,"INTER RAT HANDOVER INFO - Not decoded");
3176 /* [7] 10.5.5.25 Requested MS information */
3177 static const true_false_string gsm_a_gm_req_ms_info_irat_vals = {
3178 "Inter RAT information container IE requested",
3179 "Inter RAT information container IE not requested"
3181 static const true_false_string gsm_a_gm_req_ms_info_irat2_vals = {
3182 "E-UTRAN inter RAT information container IE requested",
3183 "E-UTRAN inter RAT information container IE not requested"
3187 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_)
3189 guint32 curr_offset;
3192 curr_offset = offset;
3193 bit_offset = (curr_offset<<3)+4;
3195 proto_tree_add_bits_item(tree, hf_gsm_a_gm_req_ms_info_irat, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3197 proto_tree_add_bits_item(tree, hf_gsm_a_gm_req_ms_info_irat2, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3199 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
3206 /* [7] 10.5.5.26 UE network capability
3207 * See subclause 9.9.3.x in 3GPP TS 24.301 [120].
3210 /* [7] 10.5.5.27 E-UTRAN inter RAT information container */
3212 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_)
3214 guint32 curr_offset;
3215 tvbuff_t *lte_rrc_ue_eutra_cap_tvb;
3217 curr_offset = offset;
3219 /* The value part of the E-UTRAN inter RAT information container information element
3220 is formatted and coded according to the UE-EUTRA-Capability IE defined in 3GPP TS 36.331 [129]*/
3221 lte_rrc_ue_eutra_cap_tvb = tvb_new_subset(tvb, curr_offset, len, len);
3222 if (lte_rrc_ue_eutra_cap_handle)
3223 call_dissector(lte_rrc_ue_eutra_cap_handle, lte_rrc_ue_eutra_cap_tvb, pinfo, tree);
3225 proto_tree_add_text(tree, tvb, curr_offset, len,"E-UTRAN Inter RAT information container - Not decoded");
3230 /* [7] 10.5.5.28 Voice domain preference and UE's usage setting */
3231 static const true_false_string gsm_a_gm_ue_usage_setting_vals = {
3235 static const value_string gsm_a_gm_voice_domain_pref_for_eutran_vals[] = {
3236 {0x0, "CS Voice only"},
3237 {0x1, "IMS PS Voice only"},
3238 {0x2, "CS voice preferred, IMS PS Voice as secondary"},
3239 {0x3, "IMS PS voice preferred, CS Voice as secondary"},
3244 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_)
3246 guint32 curr_offset;
3249 curr_offset = offset;
3250 bit_offset = curr_offset<<3;
3252 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, 5, ENC_BIG_ENDIAN);
3254 proto_tree_add_bits_item(tree, hf_gsm_a_gm_ue_usage_setting, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3256 proto_tree_add_bits_item(tree, hf_gsm_a_gm_voice_domain_pref_for_eutran, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
3267 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_)
3271 guint32 curr_offset;
3272 proto_item *tf = NULL;
3273 proto_tree *tf_tree = NULL;
3275 curr_offset = offset;
3277 oct = tvb_get_guint8(tvb, curr_offset);
3279 tf = proto_tree_add_text(tree,
3280 tvb, curr_offset, 1,
3281 "PDP Context Status");
3283 tf_tree = proto_item_add_subtree(tf, ett_gmm_context_stat );
3285 oct = tvb_get_guint8(tvb, curr_offset);
3287 for ( pdp_nr=0;pdp_nr<16; pdp_nr++ )
3292 oct = tvb_get_guint8(tvb, curr_offset);
3294 proto_tree_add_text(tf_tree,
3295 tvb, curr_offset, 1,
3296 "NSAPI %d: %s (%u)",pdp_nr,
3304 EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo);
3306 return(curr_offset - offset);
3313 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_)
3316 guint32 curr_offset;
3319 curr_offset = offset;
3321 oct = tvb_get_guint8(tvb, curr_offset);
3325 case 1: str="priority level 1 (highest)"; break;
3326 case 2: str="priority level 2"; break;
3327 case 3: str="priority level 3"; break;
3328 case 4: str="priority level 4 (lowest)"; break;
3329 default: str="priority level 4 (lowest)";
3332 proto_tree_add_text(tree,
3333 tvb, curr_offset, 1,
3334 "Radio Priority (PDP or SMS): %s (%u)",
3340 return(curr_offset - offset);
3344 * [9] 10.5.7.3 GPRS Timer
3346 static const value_string gsm_a_gm_gprs_timer_unit_vals[] = {
3347 { 0x00, "value is incremented in multiples of 2 seconds" },
3348 { 0x01, "value is incremented in multiples of 1 minute" },
3349 { 0x02, "value is incremented in multiples of decihours" },
3350 { 0x07, "value indicates that the timer is deactivated" },
3355 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_)
3360 proto_tree *subtree;
3363 oct = tvb_get_guint8(tvb, offset);
3368 case 0: str="sec"; val*=2; break;
3369 case 1: str="min"; break;
3370 case 2: str="min"; val*=6; break;
3372 proto_tree_add_text(tree,
3374 "GPRS Timer: timer is deactivated");
3379 item = proto_tree_add_text(tree,
3381 "GPRS Timer: %u %s",
3385 subtree = proto_item_add_subtree(item, ett_gmm_gprs_timer);
3386 proto_tree_add_item(subtree, hf_gsm_a_gm_gprs_timer_unit, tvb, offset, 1, ENC_BIG_ENDIAN);
3387 proto_tree_add_item(subtree, hf_gsm_a_gm_gprs_timer_value, tvb, offset, 1, ENC_BIG_ENDIAN);
3389 /* no length check possible */
3397 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_)
3401 guint32 curr_offset;
3404 curr_offset = offset;
3406 oct = tvb_get_guint8(tvb, curr_offset);
3412 case 0: str="sec"; val*=2; break;
3413 case 1: str="min"; break;
3414 case 2: str="min"; val*=6; break;
3416 proto_tree_add_text(tree,
3417 tvb, curr_offset, 1,
3418 "GPRS Timer: timer is deactivated");
3423 proto_tree_add_text(tree,
3424 tvb, curr_offset, 1,
3425 "GPRS Timer: %u %s %s (%u)",
3427 str, add_string ? add_string : "", oct);
3431 return(curr_offset - offset);
3438 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_)
3441 guint32 curr_offset;
3444 curr_offset = offset;
3446 oct = tvb_get_guint8(tvb, curr_offset);
3448 /* IMPORTANT - IT'S ASSUMED THAT THE INFORMATION IS IN THE HIGHER NIBBLE */
3453 case 1: str="priority level 1 (highest)"; break;
3454 case 2: str="priority level 2"; break;
3455 case 3: str="priority level 3"; break;
3456 case 4: str="priority level 4 (lowest)"; break;
3457 default: str="priority level 4 (lowest)";
3460 proto_tree_add_text(tree,
3461 tvb, curr_offset, 1,
3462 "Radio Priority (TOM8): %s (%u)",
3468 return(curr_offset - offset);
3472 * [8] 10.5.7.6 MBMS context status
3475 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_)
3477 guint32 curr_offset;
3480 proto_item *tf = NULL;
3481 proto_tree *tf_tree = NULL;
3483 curr_offset = offset;
3485 oct = tvb_get_guint8(tvb, curr_offset);
3487 tf = proto_tree_add_text(tree,
3488 tvb, curr_offset, 1,
3489 "MBMS Context Status");
3491 tf_tree = proto_item_add_subtree(tf, ett_gmm_context_stat );
3493 for (i=0; i<len; i++)
3495 oct = tvb_get_guint8(tvb, curr_offset);
3499 proto_tree_add_text(tf_tree,
3500 tvb, curr_offset, 1,
3501 "NSAPI %d: %s (%u)",128+i*8+j,
3513 * [8] 10.5.7.7 Uplink data status
3515 static const true_false_string gsm_a_gm_nsapi_ul_stat_vals = {
3516 "uplink data are pending for the preserved PDP context",
3517 "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"
3521 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_)
3523 guint32 curr_offset;
3526 curr_offset = offset;
3527 bit_offset = curr_offset<<3;
3529 proto_tree_add_bits_item(tree, hf_gsm_a_gm_nsapi_7_ul_stat, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3531 proto_tree_add_bits_item(tree, hf_gsm_a_gm_nsapi_6_ul_stat, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3533 proto_tree_add_bits_item(tree, hf_gsm_a_gm_nsapi_5_ul_stat, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3535 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, 5, ENC_BIG_ENDIAN);
3538 proto_tree_add_bits_item(tree, hf_gsm_a_gm_nsapi_15_ul_stat, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3540 proto_tree_add_bits_item(tree, hf_gsm_a_gm_nsapi_14_ul_stat, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3542 proto_tree_add_bits_item(tree, hf_gsm_a_gm_nsapi_13_ul_stat, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3544 proto_tree_add_bits_item(tree, hf_gsm_a_gm_nsapi_12_ul_stat, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3546 proto_tree_add_bits_item(tree, hf_gsm_a_gm_nsapi_11_ul_stat, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3548 proto_tree_add_bits_item(tree, hf_gsm_a_gm_nsapi_10_ul_stat, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3550 proto_tree_add_bits_item(tree, hf_gsm_a_gm_nsapi_9_ul_stat, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3552 proto_tree_add_bits_item(tree, hf_gsm_a_gm_nsapi_8_ul_stat, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3562 #define MAX_APN_LENGTH 100
3565 de_sm_apn(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len _U_)
3567 guint32 curr_offset;
3569 guint8 str[MAX_APN_LENGTH+1];
3571 curr_offset = offset;
3573 /* init buffer and copy it */
3574 memset ( str , 0 , MAX_APN_LENGTH );
3575 tvb_memcpy(tvb, str, offset, len<MAX_APN_LENGTH?len:MAX_APN_LENGTH);
3578 while (( curr_len < len ) && ( curr_len < MAX_APN_LENGTH ))
3580 guint step = str[curr_len];
3585 proto_tree_add_text(tree,
3586 tvb, curr_offset, len,
3587 "APN: %s %s", str+1 , add_string ? add_string : "");
3591 EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo);
3593 return(curr_offset - offset);
3600 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_)
3603 guint32 curr_offset;
3605 curr_offset = offset;
3607 oct = tvb_get_guint8(tvb, curr_offset);
3609 proto_tree_add_text(tree,
3610 tvb, curr_offset, 1,
3611 "NSAPI: 0x%02x (%u) %s",
3612 oct&0x0f, oct&0x0f,add_string ? add_string : "");
3616 return(curr_offset - offset);
3620 * [7] 10.5.6.3 Protocol configuration options
3622 static const value_string gsm_a_sm_pco_ms2net_prot_vals[] = {
3623 { 0x01, "P-CSCF IPv6 Address Request" },
3624 { 0x02, "IM CN Subsystem Signaling Flag" },
3625 { 0x03, "DNS Server IPv6 Address Request" },
3626 { 0x04, "Not Supported" },
3627 { 0x05, "MS Support of Network Requested Bearer Control indicator" },
3628 { 0x06, "Reserved" },
3629 { 0x07, "DSMIPv6 Home Agent Address Request" },
3630 { 0x08, "DSMIPv6 Home Network Prefix Request" },
3631 { 0x09, "DSMIPv6 IPv4 Home Agent Address Request" },
3632 { 0x0a, "IP address allocation via NAS signalling" },
3633 { 0x0b, "IPv4 address allocation via DHCPv4" },
3634 { 0x0c, "P-CSCF IPv4 Address Request" },
3635 { 0x0d, "DNS Server IPv4 Address Request" },
3636 { 0x0e, "MSISDN Request" },
3639 static const value_string gsm_a_sm_pco_net2ms_prot_vals[] = {
3640 { 0x01, "P-CSCF IPv6 Address" },
3641 { 0x02, "IM CN Subsystem Signaling Flag" },
3642 { 0x03, "DNS Server IPv6 Address" },
3643 { 0x04, "Policy Control rejection code" },
3644 { 0x05, "Selected Bearer Control Mode" },
3645 { 0x06, "Reserved" },
3646 { 0x07, "DSMIPv6 Home Agent Address" },
3647 { 0x08, "DSMIPv6 Home Network Prefix" },
3648 { 0x09, "DSMIPv6 IPv4 Home Agent Address" },
3649 { 0x0a, "Reserved" },
3650 { 0x0b, "Reserved" },
3651 { 0x0c, "P-CSCF IPv4 Address" },
3652 { 0x0d, "DNS Server IPv4 Address" },
3657 static const value_string gsm_a_gm_link_dir_vals[] = {
3659 { 0x0, "MS to network" },
3660 { 0x1, "Network to MS" },
3665 de_sm_pco(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
3667 proto_item *generated_item = NULL;
3668 guint32 curr_offset;
3671 struct e_in6_addr ipv6_addr;
3676 curr_offset = offset;
3678 oct = tvb_get_guint8(tvb, curr_offset);
3680 link_dir = pinfo->link_dir;
3681 generated_item =proto_tree_add_int(tree, hf_gsm_a_gm_link_dir, tvb, curr_offset, 0, link_dir);
3682 PROTO_ITEM_SET_GENERATED(generated_item);
3685 /* 1 ext 0 0 0 0 Spare Configuration protocol */
3686 proto_tree_add_item(tree, hf_gsm_a_gm_sm_ext, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3687 /* Configuration protocol (octet 3)
3690 * 0 0 0 PPP for use with IP PDP type or IP PDN type (see 3GPP TS 24.301 [120])
3692 * All other values are interpreted as PPP in this version of the protocol.
3693 * (3GPP TS 24.008 version 9.4.0 Release 9)
3695 proto_tree_add_text(tree,tvb, curr_offset, 1, "Configuration Protocol: PPP (%u)",oct&0x07);
3699 while ( curr_len > 0 )
3704 dissector_handle_t handle = NULL;
3706 /* Protocol ID 1 octet 4
3708 * Length of protocol ID 1 contents octet 6
3709 * Protocol ID 1 contents octet 7
3712 prot = tvb_get_ntohs(tvb,curr_offset);
3713 proto_tree_add_uint_format(tree, hf_gsm_a_gm_pco_pid, tvb, curr_offset, 2, (guint32)prot,
3714 "Protocol or Container ID: %s (%u)",
3716 val_to_str_const((guint32)prot, gsm_a_sm_pco_net2ms_prot_vals, val_to_str_ext_const(prot, &ppp_vals_ext, "Unknown")) :
3717 val_to_str_const((guint32)prot, gsm_a_sm_pco_ms2net_prot_vals, val_to_str_ext_const(prot, &ppp_vals_ext, "Unknown")),
3722 e_len = tvb_get_guint8(tvb, curr_offset);
3723 proto_tree_add_text(tree,tvb, curr_offset, 1, "Length: 0x%02x (%u)", e_len , e_len);
3732 if ((link_dir == P2P_DIR_DL) && (e_len > 0)) {
3733 tvb_get_ipv6(tvb, curr_offset, &ipv6_addr);
3734 proto_tree_add_text(tree, tvb, curr_offset, 16, "IPv6: %s", ip6_to_str(&ipv6_addr));
3743 if (link_dir == P2P_DIR_DL) {
3744 oct = tvb_get_guint8(tvb, curr_offset);
3745 proto_tree_add_text(tree,tvb, curr_offset, 1, "Reject Code: 0x%02x (%u)", e_len , e_len);
3749 if ((link_dir == P2P_DIR_DL) && (e_len == 1)) {
3750 oct = tvb_get_guint8(tvb, curr_offset);
3751 proto_tree_add_text(tree, tvb, curr_offset, 1, "%s", (oct == 1) ? "MS only" :
3752 ((oct == 2) ? "MS/NW" : "Unknown"));
3756 if ((link_dir == P2P_DIR_DL) && (e_len > 0)) {
3757 tvb_get_ipv6(tvb, curr_offset, &ipv6_addr);
3758 proto_tree_add_text(tree, tvb, curr_offset, 16, "IPv6: %s", ip6_to_str(&ipv6_addr));
3759 oct = tvb_get_guint8(tvb, curr_offset+16);
3760 proto_tree_add_text(tree, tvb, curr_offset+16, 1, "Prefix length: %u", oct);
3766 if ((link_dir == P2P_DIR_DL) && (e_len > 0)) {
3767 ipv4_addr = tvb_get_ipv4(tvb, curr_offset);
3768 proto_tree_add_text(tree, tvb, curr_offset, 4, "IPv4: %s",
3769 ip_to_str((guint8 *)&ipv4_addr));
3774 handle = dissector_get_uint_handle ( gprs_sm_pco_subdissector_table , prot );
3775 if ( handle != NULL )
3778 * dissect the embedded message
3780 l3_tvb = tvb_new_subset(tvb, curr_offset, e_len, e_len);
3781 /* In this case we do not want the columns updated */
3782 col_set_writable(pinfo->cinfo, FALSE);
3783 call_dissector(handle, l3_tvb , pinfo , tree );
3784 col_set_writable(pinfo->cinfo, TRUE);
3789 * dissect the embedded DATA message
3791 l3_tvb = tvb_new_subset(tvb, curr_offset, e_len, e_len);
3792 call_dissector(data_handle, l3_tvb, pinfo , tree);
3798 curr_offset+= e_len;
3800 curr_offset+= curr_len;
3802 EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo);
3804 return(curr_offset - offset);
3808 * [9] 10.5.6.4 Packet data protocol address
3810 static const value_string gsm_a_sm_pdp_type_org_vals[] = {
3811 { 0x00, "ETSI allocated address" },
3812 { 0x01, "IETF allocated address" },
3813 { 0x0f, "Empty PDP type" },
3818 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_)
3820 guint32 curr_offset;
3822 guchar pdp_type_org, pdp_type_num;
3824 curr_offset = offset;
3826 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset << 3), 4, ENC_BIG_ENDIAN);
3827 proto_tree_add_item(tree, hf_gsm_a_sm_pdp_type_org, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3829 pdp_type_org = tvb_get_guint8(tvb, curr_offset) & 0x0f;
3831 pdp_type_num = tvb_get_guint8(tvb, curr_offset);
3833 if (pdp_type_org == 0 )
3835 /* ETSI allocated address */
3836 switch (pdp_type_num)
3838 case 0x00: str="Reserved, used in earlier version of this protocol"; break;
3839 case 0x01: str="PDP-type PPP"; break;
3840 default: str="reserved";
3843 else if (pdp_type_org == 1)
3845 /* IETF allocated address */
3846 switch (pdp_type_num)
3848 case 0x21: str="IPv4 address"; break;
3849 case 0x57: str="IPv6 address"; break;
3850 case 0x8d: str="IPv4v6 address"; break;
3851 default: str="Unknown, interpreted as IPv4 address";
3854 else if ((pdp_type_num == 0) && (pdp_type_org == 0x0f))
3857 str="Not specified";
3859 proto_tree_add_text(tree,
3860 tvb, curr_offset, 1,
3861 "PDP type number: %s (%u)",str,pdp_type_num);
3863 if (( len == 2 ) && (( pdp_type_num == 0x21 ) || ( pdp_type_num == 0x57 ) || (pdp_type_num == 0x8d)))
3865 proto_tree_add_text(tree,
3866 tvb, curr_offset, 1,
3867 "Dynamic addressing");
3869 return(curr_offset - offset);
3871 else if ( len == 2 )
3873 proto_tree_add_text(tree,
3874 tvb, curr_offset, 1,
3875 "No PDP address is included");
3877 return(curr_offset - offset);
3881 if (pdp_type_org == 1)
3882 switch (pdp_type_num)
3885 proto_tree_add_item(tree,hf_gsm_a_sm_ip6_address,tvb,curr_offset,16,ENC_NA);
3890 proto_tree_add_item(tree,hf_gsm_a_sm_ip4_address,tvb,curr_offset,4,ENC_BIG_ENDIAN);
3892 proto_tree_add_item(tree,hf_gsm_a_sm_ip6_address,tvb,curr_offset,16,ENC_NA);
3897 proto_tree_add_item(tree,hf_gsm_a_sm_ip4_address,tvb,curr_offset,4,ENC_BIG_ENDIAN);
3901 EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo);
3903 return(curr_offset - offset);
3907 * [9] 10.5.6.5 Quality of service
3909 static const value_string gsm_a_qos_delay_cls_vals[] = {
3910 { 0x00, "Subscribed delay class (in MS to network direction)" },
3911 { 0x01, "Delay class 1" },
3912 { 0x02, "Delay class 2" },
3913 { 0x03, "Delay class 3" },
3914 { 0x04, "Delay class 4 (best effort)" },
3915 { 0x07, "Reserved" },
3919 static const value_string gsm_a_qos_reliability_vals[] = {
3920 { 0x00, "Subscribed reliability class (in MS to network direction)" },
3921 { 0x01, "Acknowledged GTP, LLC, and RLC; Protected data" },
3922 { 0x02, "Unacknowledged GTP, Ack LLC/RLC, Protected data" },
3923 { 0x03, "Unacknowledged GTP/LLC, Ack RLC, Protected data" },
3924 { 0x04, "Unacknowledged GTP/LLC/RLC, Protected data" },
3925 { 0x05, "Unacknowledged GTP/LLC/RLC, Unprotected data" },
3926 { 0x07, "Reserved" },
3929 /* Delivery of erroneous SDUs, octet 6 (see 3GPP TS 23.107) Bits 3 2 1 */
3930 const value_string gsm_a_qos_del_of_err_sdu_vals[] = {
3931 { 0, "Subscribed delivery of erroneous SDUs/Reserved" },
3932 { 1, "No detect('-')" },
3933 { 2, "Erroneous SDUs are delivered('yes')" },
3934 { 3, "Erroneous SDUs are not delivered('No')" },
3939 /* Delivery order, octet 6 (see 3GPP TS 23.107) Bits 5 4 3 */
3940 const value_string gsm_a_qos_del_order_vals[] = {
3941 { 0, "Subscribed delivery order/Reserved" },
3942 { 1, "With delivery order ('yes')" },
3943 { 2, "Without delivery order ('no')" },
3947 /* Traffic class, octet 6 (see 3GPP TS 23.107) Bits 8 7 6 */
3948 const value_string gsm_a_qos_traffic_cls_vals[] = {
3949 { 0, "Subscribed traffic class/Reserved" },
3950 { 1, "Conversational class" },
3951 { 2, "Streaming class" },
3952 { 3, "Interactive class" },
3953 { 4, "Background class" },
3958 /* Residual Bit Error Rate (BER), octet 10 (see 3GPP TS 23.107) Bits 8 7 6 5 */
3959 const value_string gsm_a_qos_ber_vals[] = {
3960 { 0, "Subscribed residual BER/Reserved" },
3974 /* SDU error ratio, octet 10 (see 3GPP TS 23.107) Bits 4 3 2 1 */
3975 const value_string gsm_a_qos_sdu_err_rat_vals[] = {
3976 { 0, "Subscribed SDU error ratio/Reserved" },
3988 /* Traffic handling priority, octet 11 (see 3GPP TS 23.107) Bits 2 1 */
3989 const value_string gsm_a_qos_traff_hdl_pri_vals[] = {
3990 { 0, "Subscribed traffic handling priority/Reserved" },
3991 { 1, "Priority level 1" },
3992 { 2, "Priority level 2" },
3993 { 3, "Priority level 3" },
3997 const range_string gsm_a_qos_peak_thr_vals[] = {
3998 { 0x00, 0x00, "Subscribed peak throughput/reserved" },
3999 { 0x01, 0x01, "Up to 1 000 octet/s" },
4000 { 0x02, 0x02, "Up to 2 000 octet/s" },
4001 { 0x03, 0x03, "Up to 4 000 octet/s" },
4002 { 0x04, 0x04, "Up to 8 000 octet/s" },
4003 { 0x05, 0x05, "Up to 16 000 octet/s" },
4004 { 0x06, 0x06, "Up to 32 000 octet/s" },
4005 { 0x07, 0x07, "Up to 64 000 octet/s" },
4006 { 0x08, 0x08, "Up to 128 000 octet/s" },
4007 { 0x09, 0x09, "Up to 256 000 octet/s" },
4008 { 0x0a, 0x0e, "Interpreted as Up to 1 000 octet/s" },
4009 { 0x0f, 0x0f, "Reserved" },
4013 const range_string gsm_a_qos_mean_thr_vals[] = {
4014 { 0x00, 0x00, "Subscribed peak throughput/reserved" },
4015 { 0x01, 0x01, "100 octet/h" },
4016 { 0x02, 0x02, "200 octet/h" },
4017 { 0x03, 0x03, "500 octet/h" },
4018 { 0x04, 0x04, "1 000 octet/h" },
4019 { 0x05, 0x05, "2 000 octet/h" },
4020 { 0x06, 0x06, "5 000 octet/h" },
4021 { 0x07, 0x07, "10 000 octet/h" },
4022 { 0x08, 0x08, "20 000 octet/h" },
4023 { 0x09, 0x09, "50 000 octet/h" },
4024 { 0x0a, 0x0a, "100 000 octet/h" },
4025 { 0x0b, 0x0b, "200 000 octet/h" },
4026 { 0x0c, 0x0c, "500 000 octet/h" },
4027 { 0x0d, 0x0d, "1 000 000 octet/h" },
4028 { 0x0e, 0x0e, "2 000 000 octet/h" },
4029 { 0x0f, 0x0f, "5 000 000 octet/h" },
4030 { 0x10, 0x10, "10 000 000 octet/h" },
4031 { 0x11, 0x11, "20 000 000 octet/h" },
4032 { 0x12, 0x12, "50 000 000 octet/h" },
4033 { 0x13, 0x1d, "Interpreted as Best effort" },
4034 { 0x1e, 0x1e, "Reserved" },
4035 { 0x1f, 0x1f, "Best effort" },
4039 const range_string gsm_a_qos_prec_class_vals[] = {
4040 { 0x00, 0x00, "Subscribed precedence/reserved" },
4041 { 0x01, 0x01, "High priority" },
4042 { 0x02, 0x02, "Normal priority" },
4043 { 0x03, 0x03, "Low priority" },
4044 { 0x04, 0x06, "Interpreted as Normal priority" },
4045 { 0x07, 0x07, "Reserved" },
4049 const true_false_string gsm_a_qos_signalling_ind_value = {
4050 "Optimised for signalling traffic",
4051 "Not optimised for signalling traffic"
4054 /* Helper function returning the main bitrates in kbps */
4056 qos_calc_bitrate(guint8 oct)
4061 return 64 + (oct-0x40) * 8;
4063 return 576 + (oct-0x80) * 64;
4066 /* Helper function returning the extended bitrates in kbps */
4068 qos_calc_ext_bitrate(guint8 oct)
4071 return 8600 + oct * 100;
4073 return 16000 + (oct-0x4a) * 1000;
4075 return 128000 + (oct - 0xba) * 2000;
4079 de_sm_qos(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
4081 guint32 curr_offset;
4082 guchar oct, tmp_oct;
4086 curr_offset = offset;
4089 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset << 3), 2, ENC_BIG_ENDIAN);
4090 proto_tree_add_item(tree, hf_gsm_a_qos_delay_cls, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4091 proto_tree_add_item(tree, hf_gsm_a_qos_reliability_cls, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4095 oct = tvb_get_guint8(tvb, curr_offset);
4096 proto_tree_add_item(tree, hf_gsm_a_qos_peak_thr, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4097 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset << 3) + 4, 1, ENC_BIG_ENDIAN);
4098 proto_tree_add_item(tree, hf_gsm_a_qos_prec_class, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4102 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset << 3), 3, ENC_BIG_ENDIAN);
4103 proto_tree_add_item(tree, hf_gsm_a_qos_mean_thr, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4106 NO_MORE_DATA_CHECK(len);
4109 proto_tree_add_item(tree, hf_gsm_a_qos_traffic_cls, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4110 proto_tree_add_item(tree, hf_gsm_a_qos_del_order, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4111 proto_tree_add_item(tree, hf_gsm_a_qos_del_of_err_sdu, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4114 NO_MORE_DATA_CHECK(len);
4117 oct = tvb_get_guint8(tvb, curr_offset);
4121 case 0x00: str="Subscribed maximum SDU size/reserved"; break;
4122 case 0x97: str="1502 octets"; break;
4123 case 0x98: str="1510 octets"; break;
4124 case 0x99: str="1520 octets"; break;
4125 case 0xff: str="Reserved"; break;
4126 default: str="Unspecified";
4129 if (( oct >= 1 ) && ( oct <= 0x96 ))
4130 proto_tree_add_text(tree,
4131 tvb, curr_offset, 1,
4132 "Maximum SDU size: %u octets (%u)",oct*10, oct);
4134 proto_tree_add_text(tree,
4135 tvb, curr_offset, 1,
4136 "Maximum SDU size: %s (%u)",str, oct);
4140 NO_MORE_DATA_CHECK(len);
4143 oct = tvb_get_guint8(tvb, curr_offset);
4147 case 0x00: str = "Subscribed maximum bit rate for uplink/reserved"; break;
4148 case 0xff: str = "0 kbps"; break;
4149 default: str = ep_strdup_printf("%u kbps", qos_calc_bitrate(oct));
4152 proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_max_bitrate_upl, tvb,
4153 curr_offset, 1, oct, "%s (%u)", str, oct);
4156 NO_MORE_DATA_CHECK(len);
4159 oct = tvb_get_guint8(tvb, curr_offset);
4163 case 0x00: str="Subscribed maximum bit rate for downlink/reserved"; break;
4164 case 0xff: str="0 kbps"; break;
4165 default: str = ep_strdup_printf("%u kbps", qos_calc_bitrate(oct));
4168 proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_max_bitrate_downl, tvb,
4169 curr_offset, 1, oct, "%s (%u)", str, oct);
4172 NO_MORE_DATA_CHECK(len);
4175 proto_tree_add_item(tree, hf_gsm_a_qos_ber, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4176 proto_tree_add_item(tree, hf_gsm_a_qos_sdu_err_rat, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4179 NO_MORE_DATA_CHECK(len);
4182 oct = tvb_get_guint8(tvb, curr_offset);
4187 case 0x00: str="Subscribed transfer delay/reserved"; break;
4188 case 0x3f: str="Reserved"; break;
4190 if (tmp_oct <= 0x0f)
4191 temp32 = tmp_oct * 10;
4192 else if (tmp_oct <= 0x1f)
4193 temp32 = (tmp_oct - 0x10) * 50 + 200;
4195 temp32 = (tmp_oct - 0x20) * 100 + 1000;
4196 str = ep_strdup_printf("%u ms", temp32);
4199 proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_trans_delay, tvb,
4200 curr_offset, 1, oct, "%s (%u)", str, tmp_oct);
4202 tmp_oct = oct & 0x03;
4204 str = "Subscribed traffic handling priority/reserved";
4206 str = ep_strdup_printf("Priority level %u", tmp_oct);
4208 proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_traf_handl_prio, tvb,
4209 curr_offset, 1, oct, "%s (%u)", str, tmp_oct);
4212 NO_MORE_DATA_CHECK(len);
4215 oct = tvb_get_guint8(tvb, curr_offset);
4219 case 0x00: str="Subscribed guaranteed bit rate for uplink/reserved"; break;
4220 case 0xff: str="0 kbps"; break;
4221 default: str = ep_strdup_printf("%u kbps", qos_calc_bitrate(oct));
4224 proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_guar_bitrate_upl, tvb,
4225 curr_offset, 1, oct, "%s (%u)", str, oct);
4228 NO_MORE_DATA_CHECK(len);
4231 oct = tvb_get_guint8(tvb, curr_offset);
4235 case 0x00: str="Subscribed guaranteed bit rate for downlink/reserved"; break;
4236 case 0xff: str="0 kbps"; break;
4237 default: str = ep_strdup_printf("%u kbps", qos_calc_bitrate(oct));
4240 proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_guar_bitrate_downl, tvb,
4241 curr_offset, 1, oct, "%s (%u)", str, oct);
4244 NO_MORE_DATA_CHECK(len);
4247 oct = tvb_get_guint8(tvb, curr_offset);
4248 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset << 3), 3, ENC_BIG_ENDIAN);
4249 proto_tree_add_item(tree, hf_gsm_a_qos_signalling_ind, tvb , curr_offset, 1, ENC_BIG_ENDIAN);
4252 if (tmp_oct == 0x01)
4257 proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_source_stat_desc, tvb,
4258 curr_offset, 1, oct, "%s (%u)", str, tmp_oct);
4261 NO_MORE_DATA_CHECK(len);
4264 oct = tvb_get_guint8(tvb, curr_offset);
4267 str = "Use the value indicated by the Maximum 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_max_bitrate_downl_ext, tvb,
4277 curr_offset, 1, oct, "%s (%u)", str, oct);
4280 NO_MORE_DATA_CHECK(len);
4283 oct = tvb_get_guint8(tvb, curr_offset);
4286 str = "Use the value indicated by the Guaranteed bit rate for downlink";
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_guar_bitrate_downl_ext, tvb,
4296 curr_offset, 1, oct, "%s (%u)", str, oct);
4299 NO_MORE_DATA_CHECK(len);
4301 /* Maximum bit rate for uplink (extended) Octet 17 */
4302 oct = tvb_get_guint8(tvb, curr_offset);
4305 str = "Use the value indicated by the Maximum 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_max_bitrate_upl_ext, tvb,
4315 curr_offset, 1, oct, "%s (%u)", str, oct);
4318 NO_MORE_DATA_CHECK(len);
4320 /* Guaranteed bit rate for uplink (extended) Octet 18 */
4321 oct = tvb_get_guint8(tvb, curr_offset);
4324 str = "Use the value indicated by the Guaranteed bit rate for uplink";
4327 temp32 = qos_calc_ext_bitrate(oct);
4328 if (temp32 % 1000 == 0)
4329 str = ep_strdup_printf("%u Mbps", temp32 / 1000);
4331 str = ep_strdup_printf("%u kbps", temp32);
4333 proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_guar_bitrate_upl_ext, tvb,
4334 curr_offset, 1, oct, "%s (%u)", str, oct);
4338 EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo);
4340 return(curr_offset - offset);
4344 * [9] 10.5.6.6 SM cause
4346 static const value_string gsm_a_sm_cause_vals[] = {
4347 { 0x08, "Operator Determined Barring" },
4348 { 0x18, "MBMS bearer capabilities insufficient for the service" },
4349 { 0x19, "LLC or SNDCP failure(GSM only)" },
4350 { 0x1a, "Insufficient resources" },
4351 { 0x1b, "Missing or unknown APN" },
4352 { 0x1c, "Unknown PDP address or PDP type" },
4353 { 0x1d, "User Authentication failed" },
4354 { 0x1e, "Activation rejected by GGSN" },
4355 { 0x1f, "Activation rejected, unspecified" },
4356 { 0x20, "Service option not supported" },
4357 { 0x21, "Requested service option not subscribed" },
4358 { 0x22, "Service option temporarily out of order" },
4359 { 0x23, "NSAPI already used (not sent)" },
4360 { 0x24, "Regular deactivation" },
4361 { 0x25, "QoS not accepted" },
4362 { 0x26, "Network failure" },
4363 { 0x27, "Reactivation required" },
4364 { 0x28, "Feature not supported" },
4365 { 0x29, "Semantic error in the TFT operation" },
4366 { 0x2a, "Syntactical error in the TFT operation" },
4367 { 0x2b, "Unknown PDP context" },
4368 { 0x2c, "Semantic errors in packet filter(s)" },
4369 { 0x2d, "Syntactical errors in packet filter(s)" },
4370 { 0x2e, "PDP context without TFT already activated" },
4371 { 0x2f, "Multicast group membership time-out" },
4372 { 0x2c, "Semantic errors in packet filter(s)" },
4373 { 0x2d, "Syntactical errors in packet filter(s)" },
4374 { 0x30, "Activation rejected, BCM violation" },
4375 { 0x32, "PDP type IPv4 only allowed" },
4376 { 0x33, "PDP type IPv6 only allowed" },
4377 { 0x34, "Single address bearers only allowed" },
4378 { 0x51, "Invalid transaction identifier value" },
4379 { 0x5f, "Semantically incorrect message" },
4380 { 0x60, "Invalid mandatory information" },
4381 { 0x61, "Message type non-existent or not implemented" },
4382 { 0x62, "Message type not compatible with the protocol state" },
4383 { 0x63, "Information element non-existent or not implemented" },
4384 { 0x64, "Conditional IE error" },
4385 { 0x65, "Message not compatible with the protocol state" },
4386 { 0x6f, "Protocol error, unspecified" },
4387 { 0x70, "APN restriction value incompatible with active PDP context" },
4392 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_)
4397 oct = tvb_get_guint8(tvb, offset);
4399 /* SM Cause can be sent in both directions */
4400 str = val_to_str_const(oct, gsm_a_sm_cause_vals,
4401 "Protocol error, unspecified / Service option temporarily out of order");
4403 proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_cause, tvb,
4404 offset, 1, oct, "%s (%u)", str, oct);
4406 /* no length check possible */
4411 * [9] 10.5.6.6a SM cause 2
4414 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_)
4419 oct = tvb_get_guint8(tvb, offset);
4421 /* SM Cause 2 is sent only in the Network-to-MS direction */
4422 str = val_to_str_const(oct, gsm_a_sm_cause_vals,
4423 "Service option temporarily out of order");
4425 proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_cause_2, tvb,
4426 offset, 1, oct, "%s (%u)", str, oct);
4428 /* no length check possible */
4435 static const true_false_string gsm_a_sm_ti_flag_vals = {
4436 "The message is sent to the side that originates the TI",
4437 "The message is sent from the side that originates the TI"
4441 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_)
4443 guint32 curr_offset;
4447 curr_offset = offset;
4449 oct = tvb_get_guint8(tvb, curr_offset);
4451 proto_tree_add_item(tree, hf_gsm_a_sm_ti_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
4453 /* The TI value and the TI flag occupy bits 5 - 7 and bit 8 of the first octet respectively.
4454 * The extended TI shall not be used unless TI values of 7 or greater are needed.
4455 * 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
4456 * value is encoded in bits 7-1 of the second octet.
4462 oct = tvb_get_guint8(tvb, curr_offset);
4464 proto_tree_add_text(tree,
4465 tvb, curr_offset, 1,
4466 "TI value: 0x%02x (%u)",oct&0x7f,oct&0x7f);
4468 proto_tree_add_item(tree, hf_gsm_a_sm_ext, tvb, offset, 1, ENC_BIG_ENDIAN);
4474 proto_tree_add_text(tree,
4475 tvb, curr_offset, 1,
4476 "TI value: 0x%02x (%u)",(oct>>4)&7,(oct>>4)&7);
4481 EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo);
4483 return(curr_offset - offset);
4487 * [9] 10.5.6.9 LLC service access point identifier
4489 static const value_string gsm_a_sm_llc_sapi_vals[] = {
4490 { 0, "LLC SAPI not assigned" },
4499 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_)
4501 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, offset << 3, 4, ENC_BIG_ENDIAN);
4502 proto_tree_add_item(tree, hf_gsm_a_sm_llc_sapi, tvb, offset, 1, ENC_BIG_ENDIAN);
4504 /* no length check possible */
4509 * [9] 10.5.6.10 Tear down indicator
4511 const true_false_string gsm_a_sm_tdi_value = {
4512 "Tear down requested",
4513 "Tear down not requested"
4517 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_)
4519 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (offset << 3) + 4, 3, ENC_BIG_ENDIAN);
4520 proto_tree_add_item(tree, hf_gsm_a_sm_tdi, tvb, offset, 1, ENC_BIG_ENDIAN);
4522 /* no length check possible */
4527 * [9] 10.5.6.11 Packet Flow Identifier
4529 static const range_string gsm_a_sm_packet_flow_id_vals[] = {
4530 { 0x00, 0x00, "Best Effort"},
4531 { 0x01, 0x01, "Signaling"},
4532 { 0x02, 0x02, "SMS"},
4533 { 0x03, 0x03, "TOM8"},
4534 { 0x04, 0x07, "Reserved"},
4535 { 0x08, 0x7f, "Dynamically assigned"},
4536 { 0x00, 0x00, NULL }
4540 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_)
4542 guint32 curr_offset;
4545 curr_offset = offset;
4546 value = tvb_get_guint8(tvb,curr_offset);
4547 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, curr_offset << 3, 1, ENC_BIG_ENDIAN);
4548 proto_tree_add_item(tree, hf_gsm_a_sm_packet_flow_id, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4552 g_snprintf(add_string, string_len, " - %s", rval_to_str(value, gsm_a_sm_packet_flow_id_vals, "Unknown"));
4554 EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo);
4556 return(curr_offset - offset);
4560 * [7] 10.5.6.12 TFT - Traffic Flow Template
4562 /* TFT operation code (octet 3) */
4563 static const value_string gsm_a_tft_op_code_vals[] = {
4565 { 1, "Create new TFT"},
4566 { 2, "Delete existing TFT"},
4567 { 3, "Add packet filters to existing TFT"},
4568 { 4, "Replace packet filters in existing TFT"},
4569 { 5, "Delete packet filters from existing TFT"},
4570 { 6, "No TFT operation"},
4575 static const true_false_string gsm_a_tft_e_bit = {
4576 "Parameters list is included",
4577 "Parameters list is not included"
4580 static const value_string gsm_a_tft_pkt_flt_dir_vals[] = {
4581 { 0, "Pre Rel-7 TFT filter"},
4582 { 1, "Downlink only"},
4583 { 2, "Uplink only"},
4584 { 3, "Bidirectional"},
4588 static const value_string gsm_a_tft_param_id_vals[] = {
4589 { 1, "Authorization Token"},
4590 { 2, "Flow Identifier"},
4591 { 3, "Packet Filter Identifier"},
4596 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_)
4598 guint32 curr_offset;
4600 proto_item *tf = NULL;
4601 proto_tree *tf_tree = NULL;
4602 proto_tree *comp_tree = NULL;
4604 guchar pkt_fil_count;
4611 gint pack_component_type;
4615 curr_offset = offset;
4618 * parse first octet. It contain TFT operation code, E bit and Number of packet filters
4620 oct = tvb_get_guint8(tvb, curr_offset);
4623 pkt_fil_count = oct&0x0f;
4626 proto_tree_add_item(tree,hf_gsm_a_tft_op_code,tvb,curr_offset,1,ENC_BIG_ENDIAN);
4627 proto_tree_add_item(tree,hf_gsm_a_tft_e_bit,tvb,curr_offset,1,ENC_BIG_ENDIAN);
4628 proto_tree_add_item(tree,hf_gsm_a_tft_pkt_flt,tvb,curr_offset,1,ENC_BIG_ENDIAN);
4633 /* Packet filter list dissect */
4636 if ( op_code == 2 ) /* delete TFT contains no packet filters. so we will jump over it */
4637 count = pkt_fil_count;
4638 while ( count < pkt_fil_count )
4640 tf = proto_tree_add_text(tree,
4641 tvb, curr_offset, 1,
4642 "Packet filter %d",count); /* 0-> 7 */
4644 tf_tree = proto_item_add_subtree(tf, ett_sm_tft );
4646 if ( op_code == 5 ) /* Delete packet filters from existing TFT - just a list of identifiers */
4648 if ((curr_offset-offset)<1) {
4649 proto_tree_add_text(tf_tree,tvb, curr_offset, 1,"Not enough data");
4652 proto_tree_add_bits_item(tf_tree, hf_gsm_a_spare_bits, tvb, (curr_offset<<3), 4, ENC_BIG_ENDIAN);
4653 proto_tree_add_item(tf_tree, hf_gsm_a_tft_pkt_flt_id, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4658 else /* create new, Add packet filters or Replace packet filters */
4661 if ((curr_offset-offset)<1) {
4662 proto_tree_add_text(tf_tree,tvb, curr_offset, 1,"Not enough data");
4665 proto_tree_add_bits_item(tf_tree, hf_gsm_a_spare_bits, tvb, (curr_offset<<3), 2, ENC_BIG_ENDIAN);
4666 proto_tree_add_item(tf_tree, hf_gsm_a_tft_pkt_flt_dir, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4667 proto_tree_add_item(tf_tree, hf_gsm_a_tft_pkt_flt_id, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4671 if ((curr_offset-offset)<1) {
4672 proto_tree_add_text(tf_tree,tvb, curr_offset, 1,"Not enough data");
4675 oct = tvb_get_guint8(tvb, curr_offset);
4679 proto_tree_add_text(tf_tree,
4680 tvb, curr_offset-1, 1,
4681 "Packet evaluation precedence: 0x%02x (%u)",oct,oct );
4683 if ((curr_offset-offset)<1) { proto_tree_add_text(tf_tree,tvb, curr_offset, 1,"Not enough data"); return(len);}
4684 pf_length = tvb_get_guint8(tvb, curr_offset);
4688 proto_tree_add_text(tf_tree,
4689 tvb, curr_offset-1, 1,
4690 "Packet filter length: 0x%02x (%u)",pf_length,pf_length );
4691 /* New tree for component */
4693 /* Dissect Packet filter Component */
4694 /* while ( filter_len > 1 ) */
4695 /* packet filter component type identifier: */
4697 while (pf_length > 0 ){
4698 if ((curr_offset-offset)<1) {
4699 proto_tree_add_text(tf_tree,tvb, curr_offset, 1,"Not enough data");
4702 pack_component_type = tvb_get_guint8(tvb, curr_offset);
4707 tf=proto_tree_add_text(tf_tree,tvb, curr_offset-1, 1,"Packet filter component type identifier: ");
4708 comp_tree = proto_item_add_subtree(tf, ett_sm_tft );
4710 switch ( pack_component_type ){
4713 str="IPv4 remote address type";
4714 proto_tree_add_item(comp_tree,hf_gsm_a_sm_ip4_address,tvb,curr_offset,4,ENC_BIG_ENDIAN);
4717 proto_tree_add_item(comp_tree,hf_gsm_a_sm_ip4_mask,tvb,curr_offset,4,ENC_BIG_ENDIAN);
4724 str="IPv6 remote address type";
4725 proto_tree_add_item(comp_tree,hf_gsm_a_sm_ip6_address,tvb,curr_offset,16,ENC_NA);
4728 proto_tree_add_item(comp_tree,hf_gsm_a_sm_ip6_mask,tvb,curr_offset,16,ENC_NA);
4735 str="Protocol identifier/Next header type";
4736 proto_tree_add_item(comp_tree,hf_gsm_a_tft_protocol_header,tvb,curr_offset,1,ENC_BIG_ENDIAN);
4743 str="Single local port type";
4744 proto_tree_add_item(comp_tree,hf_gsm_a_tft_port,tvb,curr_offset,2,ENC_BIG_ENDIAN);
4751 str="Local port range type";
4752 proto_tree_add_item(comp_tree,hf_gsm_a_tft_port_low,tvb,curr_offset,2,ENC_BIG_ENDIAN);
4754 proto_tree_add_item(comp_tree,hf_gsm_a_tft_port_high,tvb,curr_offset,2,ENC_BIG_ENDIAN);
4761 str="Single remote port type";
4762 proto_tree_add_item(comp_tree,hf_gsm_a_tft_port,tvb,curr_offset,2,ENC_BIG_ENDIAN);
4769 str="Remote port range type";
4770 proto_tree_add_item(comp_tree,hf_gsm_a_tft_port_low,tvb,curr_offset,2,ENC_BIG_ENDIAN);
4772 proto_tree_add_item(comp_tree,hf_gsm_a_tft_port_high,tvb,curr_offset,2,ENC_BIG_ENDIAN);
4779 str="Security parameter index type";
4780 proto_tree_add_item(comp_tree,hf_gsm_a_tft_security,tvb,curr_offset,4,ENC_BIG_ENDIAN);
4788 str="Type of service/Traffic class type";
4789 proto_tree_add_item(comp_tree,hf_gsm_a_qos_traffic_cls,tvb,curr_offset,1,ENC_BIG_ENDIAN);
4791 proto_tree_add_item(comp_tree,hf_gsm_a_tft_traffic_mask,tvb,curr_offset,1,ENC_BIG_ENDIAN);
4798 str="Flow label type";
4799 proto_tree_add_bits_item(comp_tree, hf_gsm_a_spare_bits, tvb, (curr_offset<<3), 4, ENC_BIG_ENDIAN);
4800 proto_tree_add_item(comp_tree,hf_gsm_a_tft_flow_label_type,tvb,curr_offset,3,ENC_BIG_ENDIAN);
4807 str="not specified";
4808 curr_offset+=pf_length;
4809 curr_len-=pf_length;
4812 proto_item_append_text(tf, "%s (%u)", str, pack_component_type);
4818 /* The parameters list contains a variable number of parameters that might need to be
4819 * transferred in addition to the packet filters. If the parameters list is included, the E
4820 * bit is set to 1; otherwise, the E bit is set to 0.
4822 if ((e_bit == 1) && curr_len) {
4825 pf_length = tvb_get_guint8(tvb, curr_offset+1);
4826 tf = proto_tree_add_text(tree, tvb, curr_offset, pf_length+2, "Parameter %d" ,count);
4827 tf_tree = proto_item_add_subtree(tf, ett_sm_tft );
4828 param = tvb_get_guint8(tvb, curr_offset);
4829 proto_tree_add_item(tf_tree, hf_gsm_a_tft_param_id, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4834 proto_tree_add_text(tf_tree, tvb, curr_offset, pf_length, "Authorization token value: 0x%s",
4835 tvb_bytes_to_str(tvb, curr_offset, pf_length));
4839 proto_tree_add_text(tf_tree, tvb, curr_offset, 2, "Media Component number value: 0x%x",
4840 tvb_get_bits16(tvb, curr_offset<<3, 16, ENC_BIG_ENDIAN));
4841 proto_tree_add_text(tf_tree, tvb, curr_offset+2, 2, "IP flow number: 0x%x",
4842 tvb_get_bits16(tvb, (curr_offset+2)<<3, 16, ENC_BIG_ENDIAN));
4846 for (i = 0; i < pf_length; i++) {
4847 proto_tree_add_text(tf_tree, tvb, curr_offset+i, 1, "Packet filter identifier %d: %d",
4848 i, tvb_get_guint8(tvb, curr_offset+i));
4853 proto_tree_add_text(tf_tree, tvb, curr_offset, pf_length, "Parameter content: 0x%s",
4854 tvb_bytes_to_str(tvb, curr_offset, pf_length));
4857 curr_offset += pf_length;
4858 curr_len -= pf_length;
4863 EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo);
4869 * [9] 10.5.6.13 Temporary Mobile Group Identity (TMGI)
4872 de_sm_tmgi(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
4874 guint32 curr_offset;
4876 curr_offset = offset;
4878 proto_tree_add_item(tree, hf_gsm_a_sm_tmgi, tvb, curr_offset, 3, ENC_BIG_ENDIAN);
4881 NO_MORE_DATA_CHECK(len);
4882 curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, tree, curr_offset, TRUE);
4884 EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo);
4886 return(curr_offset - offset);
4890 * [9] 10.5.6.14 MBMS bearer capabilities
4893 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_)
4895 guint32 curr_offset, temp32;
4899 curr_offset = offset;
4901 oct = tvb_get_guint8(tvb, curr_offset);
4905 case 0x00: str="Subscribed maximum bit rate for downlink/reserved"; break;
4906 case 0xff: str="0 kbps"; break;
4907 default: str = ep_strdup_printf("%u kbps", qos_calc_bitrate(oct));
4910 proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_max_bitrate_downl, tvb,
4911 curr_offset, 1, oct, "%s (%u)", str, oct);
4914 NO_MORE_DATA_CHECK(len);
4916 oct = tvb_get_guint8(tvb, curr_offset);
4919 str = "Use the value indicated by the Maximum bit rate for downlink";
4922 temp32 = qos_calc_ext_bitrate(oct);
4923 if (temp32 % 1000 == 0)
4924 str = ep_strdup_printf("%u Mbps", temp32 / 1000);
4926 str = ep_strdup_printf("%u kbps", temp32);
4928 proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_max_bitrate_downl_ext, tvb,
4929 curr_offset, 1, oct, "%s (%u)", str, oct);
4933 EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo);
4935 return(curr_offset - offset);
4939 * [9] 10.5.6.15 MBMS protocol configuration options
4942 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_)
4944 guint32 curr_offset;
4946 curr_offset = offset;
4947 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset<<3), 8, ENC_BIG_ENDIAN);
4950 EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo);
4952 return(curr_offset - offset);
4956 * [9] 10.5.6.16 Enhanced network service access point identifier
4959 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_)
4964 oct = tvb_get_guint8(tvb, offset);
4968 else if (oct < 0xff)
4969 str = ep_strdup_printf("NSAPI %u for Multimedia Broadcast/Multicast Service (MBMS) Multicast mode", oct);
4971 str = "Reserved for use by lower layers in the p2p radio bearer allocation message for MBMS Broadcast mode";
4974 proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_enh_nsapi, tvb,
4975 offset, 1, oct, "%s (%u)", str, oct);
4977 /* no length check possible */
4982 * [9] 10.5.6.17 Request type
4984 static const value_string gsm_a_sm_req_type_vals[] = {
4985 { 0x01, "Initial request" },
4986 { 0x02, "Handover" },
4987 { 0x03, "Unused. If received, the network shall interpret this as \"Initial request\"." },
4992 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_)
4994 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (offset<<3) + 4, 1, ENC_BIG_ENDIAN);
4995 proto_tree_add_item(tree, hf_gsm_a_sm_req_type, tvb, offset, 1, ENC_BIG_ENDIAN);
4997 /* no length check possible */
5002 * [9] 10.5.6.18 Notification indicator
5004 static const value_string gsm_a_sm_notif_ind_vals[] = {
5006 { 0x1, "SRVCC handover cancelled, IMS session re-establishment required"},
5011 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_)
5013 guint32 curr_offset;
5015 curr_offset = offset;
5017 proto_tree_add_item(tree, hf_gsm_a_sm_notif_ind, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5023 guint16 (*gm_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string, int string_len) = {
5024 /* GPRS Mobility Management Information Elements 10.5.5 */
5025 de_gmm_attach_res, /* Attach Result */
5026 de_gmm_attach_type, /* Attach Type */
5027 de_gmm_ciph_alg, /* Cipher Algorithm */
5028 de_gmm_tmsi_stat, /* TMSI Status */
5029 de_gmm_detach_type, /* Detach Type */
5030 de_gmm_drx_param, /* DRX Parameter */
5031 de_gmm_ftostby, /* Force to Standby */
5032 de_gmm_ftostby_h, /* Force to Standby - Info is in the high nibble */
5033 de_gmm_ptmsi_sig, /* P-TMSI Signature */
5034 de_gmm_ptmsi_sig2, /* P-TMSI Signature 2 */
5035 de_gmm_ident_type2, /* Identity Type 2 */
5036 de_gmm_imeisv_req, /* IMEISV Request */
5037 de_gmm_rec_npdu_lst, /* Receive N-PDU Numbers List */
5038 de_gmm_ms_net_cap, /* MS Network Capability */
5039 de_gmm_ms_radio_acc_cap,/* MS Radio Access Capability */
5040 de_gmm_cause, /* GMM Cause */
5041 de_gmm_rai, /* Routing Area Identification */
5042 de_gmm_rai2, /* Routing Area Identification 2 */
5043 de_gmm_update_res, /* Update Result */
5044 de_gmm_update_type, /* Update Type */
5045 de_gmm_ac_ref_nr, /* A&C Reference Number */
5046 de_gmm_ac_ref_nr_h, /* A&C Reference Numer - Info is in the high nibble */
5047 de_gmm_service_type, /* Service Type */
5048 NULL /* no associated data */, /* Cell Notification */
5049 de_gmm_ps_lcs_cap, /* PS LCS Capability */
5050 de_gmm_net_feat_supp, /* Network Feature Support */
5051 de_gmm_rat_info_container, /* Inter RAT information container */
5052 de_gmm_req_ms_info, /* Requested MS information */
5053 NULL, /* UE network capability */
5054 de_gmm_eutran_irat_info_container, /* E-UTRAN inter RAT information container */
5055 de_gmm_voice_domain_pref, /* Voice domain preference and UE's usage setting */
5056 /* Session Management Information Elements 10.5.6 */
5057 de_sm_apn, /* Access Point Name */
5058 de_sm_nsapi, /* Network Service Access Point Identifier */
5059 de_sm_pco, /* Protocol Configuration Options */
5060 de_sm_pdp_addr, /* Packet Data Protocol Address */
5061 de_sm_qos, /* Quality Of Service */
5062 de_sm_cause, /* SM Cause */
5063 de_sm_cause_2, /* SM Cause 2 */
5064 de_sm_linked_ti, /* Linked TI */
5065 de_sm_sapi, /* LLC Service Access Point Identifier */
5066 de_sm_tear_down, /* Tear Down Indicator */
5067 de_sm_pflow_id, /* Packet Flow Identifier */
5068 de_sm_tflow_temp, /* Traffic Flow Template */
5069 de_sm_tmgi, /* Temporary Mobile Group Identity (TMGI) */
5070 de_sm_mbms_bearer_cap, /* MBMS bearer capabilities */
5071 de_sm_mbms_prot_conf_opt, /* MBMS protocol configuration options */
5072 de_sm_enh_nsapi, /* Enhanced network service access point identifier */
5073 de_sm_req_type, /* Request type */
5074 de_sm_notif_ind, /* Notification indicator */
5075 /* GPRS Common Information Elements 10.5.7 */
5076 de_gc_context_stat, /* PDP Context Status */
5077 de_gc_radio_prio, /* Radio Priority */
5078 de_gc_timer, /* GPRS Timer */
5079 de_gc_timer2, /* GPRS Timer 2 */
5080 de_gc_radio_prio2, /* Radio Priority 2 */
5081 de_gc_mbms_context_stat,/* 10.5.7.6 MBMS context status */
5082 de_gc_uplink_data_stat, /* 10.5.7.7 Uplink data status */
5086 /* MESSAGE FUNCTIONS */
5092 dtap_gmm_attach_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5094 guint32 curr_offset;
5098 curr_offset = offset;
5101 pinfo->p2p_dir = P2P_DIR_RECV;
5103 ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_MS_NET_CAP, NULL);
5105 /* Included in attach type
5107 ELEM_MAND_V(GSM_A_PDU_TYPE_COMMON, DE_CIPH_KEY_SEQ_NUM, NULL);
5112 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_ATTACH_TYPE, NULL);
5114 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_DRX_PARAM, NULL);
5116 ELEM_MAND_LV(GSM_A_PDU_TYPE_COMMON, DE_MID , NULL);
5118 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_RAI, " - Old routing area identification");
5120 ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_MS_RAD_ACC_CAP , NULL);
5122 ELEM_OPT_TV( 0x19 , GSM_A_PDU_TYPE_GM, DE_P_TMSI_SIG, " - Old P-TMSI Signature");
5124 ELEM_OPT_TV( 0x17 , GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER , " - Ready Timer" );
5126 ELEM_OPT_TV_SHORT( 0x90 , GSM_A_PDU_TYPE_GM, DE_TMSI_STAT , NULL);
5128 ELEM_OPT_TLV( 0x33 , GSM_A_PDU_TYPE_GM, DE_PS_LCS_CAP , NULL);
5130 ELEM_OPT_TLV(0x11, GSM_A_PDU_TYPE_COMMON, DE_MS_CM_2, NULL);
5132 ELEM_OPT_TLV(0x20, GSM_A_PDU_TYPE_COMMON, DE_MS_CM_3, NULL);
5134 ELEM_OPT_TLV(0x40, GSM_A_PDU_TYPE_DTAP, DE_SUP_CODEC_LIST, NULL);
5136 ELEM_OPT_TLV(0x58, NAS_PDU_TYPE_EMM, DE_EMM_UE_NET_CAP, NULL);
5138 ELEM_OPT_TLV(0x1A, GSM_A_PDU_TYPE_COMMON, DE_MID, " - Additional mobile identity");
5140 ELEM_OPT_TLV(0x1B, GSM_A_PDU_TYPE_GM, DE_RAI_2, " - Additional old routing area identification");
5142 ELEM_OPT_TLV(0x5D, GSM_A_PDU_TYPE_GM, DE_VOICE_DOMAIN_PREF, NULL);
5144 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5151 dtap_gmm_attach_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5153 guint32 curr_offset;
5157 curr_offset = offset;
5160 pinfo->p2p_dir = P2P_DIR_SENT;
5162 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND_H, NULL);
5166 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_ATTACH_RES, NULL);
5168 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER, NULL);
5170 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_RAD_PRIO_2, " - Radio priority for TOM8");
5174 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_RAD_PRIO, " - Radio priority for SMS");
5176 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_RAI, NULL);
5178 ELEM_OPT_TV( 0x19 , GSM_A_PDU_TYPE_GM, DE_P_TMSI_SIG, NULL);
5180 ELEM_OPT_TV( 0x17 , GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER , " - Negotiated Ready Timer" );
5182 ELEM_OPT_TLV( 0x18 , GSM_A_PDU_TYPE_COMMON, DE_MID , " - Allocated P-TMSI" );
5184 ELEM_OPT_TLV( 0x23 , GSM_A_PDU_TYPE_COMMON, DE_MID , NULL);
5186 ELEM_OPT_TV( 0x25 , GSM_A_PDU_TYPE_GM, DE_GMM_CAUSE , NULL);
5188 ELEM_OPT_TLV( 0x2A , GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2 , " - T3302" );
5190 ELEM_OPT_T( 0x8C , GSM_A_PDU_TYPE_GM, DE_CELL_NOT , NULL);
5192 ELEM_OPT_TLV( 0x4A , GSM_A_PDU_TYPE_COMMON, DE_PLMN_LIST , NULL);
5194 ELEM_OPT_TV_SHORT( 0xB0 , GSM_A_PDU_TYPE_GM, DE_NET_FEAT_SUP , NULL);
5196 ELEM_OPT_TLV( 0x34 , GSM_A_PDU_TYPE_DTAP, DE_EMERGENCY_NUM_LIST , NULL);
5198 ELEM_OPT_TV_SHORT( 0xA0 , GSM_A_PDU_TYPE_GM , DE_REQ_MS_INFO , NULL);
5200 ELEM_OPT_TLV( 0x37 , GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2 , " - T3319" );
5202 ELEM_OPT_TLV( 0x38 , GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2 , " - T3323" );
5204 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5211 dtap_gmm_attach_com(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5214 guint32 curr_offset;
5218 curr_offset = offset;
5221 pinfo->p2p_dir = P2P_DIR_RECV;
5223 ELEM_OPT_TLV(0x27, GSM_A_PDU_TYPE_GM, DE_RAT_INFO_CONTAINER, " - Inter RAT handover information");
5225 ELEM_OPT_TLV(0x2B, GSM_A_PDU_TYPE_GM, DE_EUTRAN_IRAT_INFO_CONTAINER, " - E-UTRAN inter RAT handover information");
5227 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5234 dtap_gmm_attach_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5236 guint32 curr_offset;
5240 curr_offset = offset;
5243 pinfo->p2p_dir = P2P_DIR_SENT;
5245 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_GMM_CAUSE, NULL);
5247 ELEM_OPT_TLV( 0x2A , GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2 , " - T3302" );
5249 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5256 dtap_gmm_detach_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5258 guint32 curr_offset;
5262 curr_offset = offset;
5265 pinfo->p2p_dir = P2P_DIR_SENT;
5267 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND_H, NULL);
5268 /* Force to standy might be wrong - To decode it correct, we need the direction */
5272 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_DETACH_TYPE, NULL);
5274 ELEM_OPT_TV( 0x25 , GSM_A_PDU_TYPE_GM, DE_GMM_CAUSE , NULL);
5276 ELEM_OPT_TLV( 0x18 , GSM_A_PDU_TYPE_COMMON, DE_MID , " - P-TMSI" );
5278 ELEM_OPT_TLV( 0x19 , GSM_A_PDU_TYPE_GM, DE_P_TMSI_SIG_2 , NULL);
5280 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5287 dtap_gmm_detach_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5289 guint32 curr_offset;
5293 curr_offset = offset;
5296 pinfo->p2p_dir = P2P_DIR_RECV;
5298 if ( curr_len != 0 )
5300 ELEM_MAND_V(GSM_A_PDU_TYPE_COMMON, DE_SPARE_NIBBLE, NULL);
5304 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND, NULL);
5307 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5314 dtap_gmm_ptmsi_realloc_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5316 guint32 curr_offset;
5320 curr_offset = offset;
5323 pinfo->p2p_dir = P2P_DIR_SENT;
5325 ELEM_MAND_LV(GSM_A_PDU_TYPE_COMMON, DE_MID , " - Allocated P-TMSI" );
5327 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_RAI, NULL);
5329 ELEM_MAND_V(GSM_A_PDU_TYPE_COMMON, DE_SPARE_NIBBLE, NULL);
5333 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND, NULL);
5335 ELEM_OPT_TV( 0x19 , GSM_A_PDU_TYPE_GM, DE_P_TMSI_SIG , " - P-TMSI Signature" );
5337 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5344 dtap_gmm_ptmsi_realloc_com(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5346 guint32 curr_offset;
5347 /* guint32 consumed; */
5350 curr_offset = offset;
5353 pinfo->p2p_dir = P2P_DIR_RECV;
5355 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5362 dtap_gmm_auth_ciph_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5364 guint32 curr_offset;
5369 curr_offset = offset;
5372 pinfo->p2p_dir = P2P_DIR_SENT;
5374 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_IMEISV_REQ, NULL);
5378 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_CIPH_ALG, NULL);
5380 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_AC_REF_NUM_H, NULL);
5384 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND, NULL);
5386 ELEM_OPT_TV( 0x21 , GSM_A_PDU_TYPE_DTAP, DE_AUTH_PARAM_RAND , NULL);
5389 ELEM_OPT_TV_SHORT( 0x08 , GSM_A_PDU_TYPE_COMMON, DE_CIPH_KEY_SEQ_NUM , NULL);
5393 oct = tvb_get_guint8(tvb, curr_offset);
5394 if (( oct & 0xf0 ) == 0x80 )
5396 /* The ciphering key sequence number is added here */
5397 proto_tree_add_text(tree,
5398 tvb, curr_offset, 1,
5399 "Ciphering key sequence number: 0x%02x (%u)",
5408 if ( curr_len == 0 )
5410 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5414 ELEM_OPT_TLV( 0x28 , GSM_A_PDU_TYPE_DTAP, DE_AUTH_PARAM_AUTN , NULL);
5416 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5423 dtap_gmm_auth_ciph_resp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5425 guint32 curr_offset;
5429 curr_offset = offset;
5432 pinfo->p2p_dir = P2P_DIR_RECV;
5434 ELEM_MAND_V(GSM_A_PDU_TYPE_COMMON, DE_SPARE_NIBBLE, NULL);
5438 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_AC_REF_NUM, NULL);
5440 ELEM_OPT_TV( 0x22 , GSM_A_PDU_TYPE_DTAP, DE_AUTH_RESP_PARAM , NULL);
5442 ELEM_OPT_TLV( 0x23 , GSM_A_PDU_TYPE_COMMON, DE_MID , " - IMEISV" );
5444 ELEM_OPT_TLV( 0x29 , GSM_A_PDU_TYPE_DTAP, DE_AUTH_RESP_PARAM_EXT , NULL);
5446 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5453 dtap_gmm_auth_ciph_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5455 guint32 curr_offset;
5458 curr_offset = offset;
5461 pinfo->p2p_dir = P2P_DIR_SENT;
5463 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5470 dtap_gmm_auth_ciph_fail(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5472 guint32 curr_offset;
5476 curr_offset = offset;
5479 pinfo->p2p_dir = P2P_DIR_RECV;
5481 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_GMM_CAUSE, NULL);
5483 ELEM_OPT_TLV( 0x30 , GSM_A_PDU_TYPE_DTAP, DE_AUTH_FAIL_PARAM , NULL);
5485 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5492 dtap_gmm_ident_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5494 guint32 curr_offset;
5497 curr_offset = offset;
5500 pinfo->p2p_dir = P2P_DIR_SENT;
5502 /* 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. */
5504 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_ID_TYPE_2, NULL);
5507 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND_H, NULL);
5510 elem_v(tvb, tree, pinfo, GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND_H, curr_offset, NULL);
5511 elem_v(tvb, tree, pinfo, GSM_A_PDU_TYPE_GM, DE_ID_TYPE_2, curr_offset, NULL);
5516 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5523 dtap_gmm_ident_res(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5525 guint32 curr_offset;
5529 curr_offset = offset;
5532 pinfo->p2p_dir = P2P_DIR_RECV;
5534 ELEM_MAND_LV(GSM_A_PDU_TYPE_COMMON, DE_MID , NULL);
5536 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5543 dtap_gmm_rau_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5545 guint32 curr_offset;
5549 curr_offset = offset;
5552 pinfo->p2p_dir = P2P_DIR_RECV;
5554 /* is included in update type
5555 ELEM_MAND_V(GSM_A_PDU_TYPE_COMMON, DE_CIPH_KEY_SEQ_NUM, NULL);
5560 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_UPD_TYPE, NULL);
5562 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_RAI, " - Old routing area identification");
5564 ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_MS_RAD_ACC_CAP , NULL);
5566 ELEM_OPT_TV( 0x19 , GSM_A_PDU_TYPE_GM, DE_P_TMSI_SIG , " - Old P-TMSI Signature" );
5568 ELEM_OPT_TV( 0x17 , GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER , " - Requested Ready Timer" );
5570 ELEM_OPT_TV( 0x27 , GSM_A_PDU_TYPE_GM, DE_DRX_PARAM , NULL);
5572 ELEM_OPT_TV_SHORT( 0x90 , GSM_A_PDU_TYPE_GM, DE_TMSI_STAT , NULL);
5574 ELEM_OPT_TLV( 0x18 , GSM_A_PDU_TYPE_COMMON, DE_MID , " - P-TMSI" );
5576 ELEM_OPT_TLV( 0x31 , GSM_A_PDU_TYPE_GM, DE_MS_NET_CAP , NULL);
5578 ELEM_OPT_TLV( 0x32 , GSM_A_PDU_TYPE_GM, DE_PDP_CONTEXT_STAT , NULL);
5580 ELEM_OPT_TLV( 0x33 , GSM_A_PDU_TYPE_GM, DE_PS_LCS_CAP , NULL);
5582 ELEM_OPT_TLV(0x35, GSM_A_PDU_TYPE_GM, DE_MBMS_CTX_STATUS, NULL);
5584 ELEM_OPT_TLV(0x58, NAS_PDU_TYPE_EMM, DE_EMM_UE_NET_CAP, NULL);
5586 ELEM_OPT_TLV(0x1A, GSM_A_PDU_TYPE_COMMON, DE_MID, " - Additional mobile identity");
5588 ELEM_OPT_TLV(0x1B, GSM_A_PDU_TYPE_GM, DE_RAI_2, " - Additional old routing area identification");
5590 ELEM_OPT_TLV(0x11, GSM_A_PDU_TYPE_COMMON, DE_MS_CM_2, NULL);
5592 ELEM_OPT_TLV(0x20, GSM_A_PDU_TYPE_COMMON, DE_MS_CM_3, NULL);
5594 ELEM_OPT_TLV(0x40, GSM_A_PDU_TYPE_DTAP, DE_SUP_CODEC_LIST, NULL);
5596 ELEM_OPT_TLV(0x5D, GSM_A_PDU_TYPE_GM, DE_VOICE_DOMAIN_PREF, NULL);
5598 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5605 dtap_gmm_rau_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5607 guint32 curr_offset;
5611 curr_offset = offset;
5614 pinfo->p2p_dir = P2P_DIR_SENT;
5616 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_UPD_RES, NULL);
5620 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND, NULL);
5622 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER, " - Periodic RA update timer");
5624 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_RAI, NULL);
5626 ELEM_OPT_TV( 0x19 , GSM_A_PDU_TYPE_GM, DE_P_TMSI_SIG , NULL);
5628 ELEM_OPT_TLV( 0x18 , GSM_A_PDU_TYPE_COMMON, DE_MID , " - Allocated P-TMSI");
5630 ELEM_OPT_TLV( 0x23 , GSM_A_PDU_TYPE_COMMON, DE_MID , " - MS identity");
5632 ELEM_OPT_TLV( 0x26 , GSM_A_PDU_TYPE_GM, DE_REC_N_PDU_NUM_LIST , NULL);
5634 ELEM_OPT_TV( 0x17 , GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER , " - Negotiated Ready Timer" );
5636 ELEM_OPT_TV( 0x25 , GSM_A_PDU_TYPE_GM, DE_GMM_CAUSE , NULL);
5638 ELEM_OPT_TLV( 0x2A , GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2 , " - T3302" );
5640 ELEM_OPT_T( 0x8C , GSM_A_PDU_TYPE_GM, DE_CELL_NOT , NULL);
5642 ELEM_OPT_TLV( 0x4A , GSM_A_PDU_TYPE_COMMON, DE_PLMN_LIST , NULL);
5644 ELEM_OPT_TLV( 0x32 , GSM_A_PDU_TYPE_GM, DE_PDP_CONTEXT_STAT , NULL);
5646 ELEM_OPT_TV_SHORT ( 0xB0 , GSM_A_PDU_TYPE_GM, DE_NET_FEAT_SUP , NULL);
5648 ELEM_OPT_TLV( 0x34 , GSM_A_PDU_TYPE_DTAP, DE_EMERGENCY_NUM_LIST , NULL);
5650 ELEM_OPT_TLV(0x35 , GSM_A_PDU_TYPE_GM, DE_MBMS_CTX_STATUS , NULL);
5652 ELEM_OPT_TV_SHORT(0xA0 , GSM_A_PDU_TYPE_GM , DE_REQ_MS_INFO , NULL);
5654 ELEM_OPT_TLV(0x37 , GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2 , " - T3319");
5656 ELEM_OPT_TLV(0x38 , GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2 , " - T3323");
5658 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5665 dtap_gmm_rau_com(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5667 guint32 curr_offset;
5671 curr_offset = offset;
5674 pinfo->p2p_dir = P2P_DIR_RECV;
5676 ELEM_OPT_TLV( 0x26 , GSM_A_PDU_TYPE_GM, DE_REC_N_PDU_NUM_LIST , NULL);
5677 /* Inter RAT information container 10.5.5.24 TS 24.008 version 6.8.0 Release 6 */
5678 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_RAT_INFO_CONTAINER , " - Inter RAT handover information");
5680 ELEM_OPT_TLV(0x2B, GSM_A_PDU_TYPE_GM, DE_EUTRAN_IRAT_INFO_CONTAINER, " - E-UTRAN inter RAT handover information");
5682 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5689 dtap_gmm_rau_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5691 guint32 curr_offset;
5695 curr_offset = offset;
5698 pinfo->p2p_dir = P2P_DIR_SENT;
5700 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_GMM_CAUSE, NULL);
5702 ELEM_MAND_V(GSM_A_PDU_TYPE_COMMON, DE_SPARE_NIBBLE, NULL);
5706 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND, NULL);
5708 ELEM_OPT_TLV( 0x26 , GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2 , " - T3302" );
5710 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5717 dtap_gmm_status(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5719 guint32 curr_offset;
5723 curr_offset = offset;
5726 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
5728 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_GMM_CAUSE, NULL);
5730 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5734 * [8] 9.4.19 GMM Information
5737 dtap_gmm_information(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5739 guint32 curr_offset;
5743 curr_offset = offset;
5746 pinfo->p2p_dir = P2P_DIR_SENT;
5748 ELEM_OPT_TLV( 0x43 , GSM_A_PDU_TYPE_DTAP, DE_NETWORK_NAME , " - Full Name" );
5750 ELEM_OPT_TLV( 0x45 , GSM_A_PDU_TYPE_DTAP, DE_NETWORK_NAME , " - Short Name" );
5752 ELEM_OPT_TV( 0x46 , GSM_A_PDU_TYPE_DTAP, DE_TIME_ZONE , NULL);
5754 ELEM_OPT_TV( 0x47 , GSM_A_PDU_TYPE_DTAP, DE_TIME_ZONE_TIME , NULL);
5756 ELEM_OPT_TLV( 0x48 , GSM_A_PDU_TYPE_DTAP, DE_LSA_ID , NULL);
5758 ELEM_OPT_TLV( 0x49 , GSM_A_PDU_TYPE_DTAP, DE_DAY_SAVING_TIME , NULL);
5760 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5767 dtap_gmm_service_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5769 guint32 curr_offset;
5773 curr_offset = offset;
5776 pinfo->p2p_dir = P2P_DIR_RECV;
5778 /* Is included in SRVC TYPE
5779 ELEM_MAND_V(GSM_A_PDU_TYPE_COMMON, DE_CIPH_KEY_SEQ_NUM, NULL);
5784 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_SRVC_TYPE, NULL);
5786 /* P-TMSI Mobile station identity 10.5.1.4 M LV 6 */
5787 ELEM_MAND_LV(GSM_A_PDU_TYPE_COMMON, DE_MID, NULL);
5789 ELEM_OPT_TLV( 0x32 , GSM_A_PDU_TYPE_GM, DE_PDP_CONTEXT_STAT , NULL);
5791 /* MBMS context status 10.5.7.6 TLV 2 - 18 */
5792 ELEM_OPT_TLV( 0x35 , GSM_A_PDU_TYPE_GM, DE_MBMS_CTX_STATUS , NULL);
5794 ELEM_OPT_TLV(0x36, GSM_A_PDU_TYPE_GM, DE_UPLINK_DATA_STATUS, NULL);
5796 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5803 dtap_gmm_service_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5805 guint32 curr_offset;
5809 curr_offset = offset;
5812 pinfo->p2p_dir = P2P_DIR_SENT;
5814 ELEM_OPT_TLV( 0x32 , GSM_A_PDU_TYPE_GM, DE_PDP_CONTEXT_STAT , NULL);
5816 /* MBMS context status 10.5.7.6 TLV 2 - 18 */
5817 ELEM_OPT_TLV( 0x35 , GSM_A_PDU_TYPE_GM, DE_MBMS_CTX_STATUS , NULL);
5819 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5826 dtap_gmm_service_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5828 guint32 curr_offset;
5832 curr_offset = offset;
5835 pinfo->p2p_dir = P2P_DIR_SENT;
5837 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_GMM_CAUSE, NULL);
5839 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5843 * [8] 9.5.1 Activate PDP context request
5844 * Direction: MS to network
5847 dtap_sm_act_pdp_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5849 guint32 curr_offset;
5853 curr_offset = offset;
5856 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
5858 pinfo->link_dir = P2P_DIR_UL;
5860 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_NET_SAPI, " - Requested NSAPI");
5862 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_LLC_SAPI, " - Requested LLC SAPI");
5864 ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_QOS , " - Requested QoS" );
5866 ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_PD_PRO_ADDR , " - Requested PDP address" );
5868 ELEM_OPT_TLV( 0x28 , GSM_A_PDU_TYPE_GM, DE_ACC_POINT_NAME , NULL);
5870 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL);
5872 ELEM_OPT_TV_SHORT(0xA0, GSM_A_PDU_TYPE_GM, DE_REQ_TYPE, NULL);
5874 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5878 * [9] 9.5.2 Activate PDP context accept
5879 * Direction: network to MS
5882 dtap_sm_act_pdp_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5884 guint32 curr_offset;
5888 curr_offset = offset;
5891 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
5893 pinfo->link_dir = P2P_DIR_DL;
5895 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_LLC_SAPI, " - Negotiated LLC SAPI");
5897 ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_QOS , " - Negotiated QoS" );
5900 /* This is done automatically */
5901 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_SPARE, NULL);
5906 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_RAD_PRIO, NULL);
5908 ELEM_OPT_TLV( 0x2B , GSM_A_PDU_TYPE_GM, DE_PD_PRO_ADDR , " - PDP address");
5910 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL);
5912 ELEM_OPT_TLV( 0x34 , GSM_A_PDU_TYPE_GM, DE_PACKET_FLOW_ID , NULL);
5914 ELEM_OPT_TLV( 0x39 , GSM_A_PDU_TYPE_GM, DE_SM_CAUSE_2, " - SM cause");
5916 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5920 * [8] 9.5.3 Activate PDP context reject
5921 * Direction: network to MS
5924 dtap_sm_act_pdp_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5926 guint32 curr_offset;
5930 curr_offset = offset;
5933 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
5935 pinfo->link_dir = P2P_DIR_DL;
5937 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL);
5939 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL);
5941 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5945 * [8] 9.5.4 Activate Secondary PDP Context Request
5946 * Direction: MS to network
5949 dtap_sm_act_sec_pdp_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5951 guint32 curr_offset;
5955 curr_offset = offset;
5958 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
5960 pinfo->link_dir = P2P_DIR_UL;
5962 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_NET_SAPI, " - Requested NSAPI");
5964 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_LLC_SAPI, " - Requested LLC SAPI");
5966 ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_QOS , " - Requested QoS" );
5968 ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_LINKED_TI , NULL);
5970 /* 3GPP TS 24.008 version 6.8.0 Release 6, 36 TFT Traffic Flow Template 10.5.6.12 O TLV 3-257 */
5971 ELEM_OPT_TLV( 0x36 , GSM_A_PDU_TYPE_GM, DE_TRAFFIC_FLOW_TEMPLATE , NULL);
5973 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL);
5975 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5979 * [7] 9.5.5 Activate Secondary PDP Context Accept
5980 * Direction: network to MS
5983 dtap_sm_act_sec_pdp_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5985 guint32 curr_offset;
5989 curr_offset = offset;
5992 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
5994 pinfo->link_dir = P2P_DIR_DL;
5996 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_LLC_SAPI, " - Negotiated LLC SAPI");
5998 ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_QOS , " - Negotiated QoS" );
6000 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_RAD_PRIO, NULL);
6003 /* This is done automatically */
6004 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_SPARE, NULL);
6009 ELEM_OPT_TLV( 0x34 , GSM_A_PDU_TYPE_GM, DE_PACKET_FLOW_ID , NULL);
6011 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL);
6013 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
6017 * [8] 9.5.6 Activate Secondary PDP Context Reject
6018 * Direction: network to MS
6021 dtap_sm_act_sec_pdp_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
6023 guint32 curr_offset;
6027 curr_offset = offset;
6030 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
6032 pinfo->link_dir = P2P_DIR_DL;
6034 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL);
6036 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL);
6038 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
6042 * [8] 9.5.7 Request PDP context activation
6043 * Direction: network to MS
6046 dtap_sm_req_pdp_act(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
6048 guint32 curr_offset;
6052 curr_offset = offset;
6055 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
6057 pinfo->link_dir = P2P_DIR_DL;
6059 ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_PD_PRO_ADDR , " - Offered PDP address" );
6061 ELEM_OPT_TLV( 0x28 , GSM_A_PDU_TYPE_GM, DE_ACC_POINT_NAME , NULL);
6063 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL);
6065 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
6069 * [8] 9.5.8 Request PDP context activation reject
6070 * Direction: MS to network
6073 dtap_sm_req_pdp_act_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
6075 guint32 curr_offset;
6079 curr_offset = offset;
6082 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
6084 pinfo->link_dir = P2P_DIR_UL;
6086 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL);
6088 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL);
6090 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
6094 * [8] 9.5.9 Modify PDP context request (Network to MS direction)
6095 * Direction: network to MS
6098 dtap_sm_mod_pdp_req_net(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
6100 guint32 curr_offset;
6104 curr_offset = offset;
6107 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
6109 pinfo->link_dir = P2P_DIR_DL;
6111 ELEM_MAND_V(GSM_A_PDU_TYPE_GM,DE_RAD_PRIO, NULL);
6113 /* This is done automatically */
6114 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_SPARE, NULL);
6119 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_LLC_SAPI, " - Requested LLC SAPI");
6121 ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_QOS , " - New QoS" );
6123 ELEM_OPT_TLV( 0x2B , GSM_A_PDU_TYPE_GM, DE_PD_PRO_ADDR , " - PDP address");
6125 ELEM_OPT_TLV( 0x34 , GSM_A_PDU_TYPE_GM, DE_PACKET_FLOW_ID , NULL);
6127 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL);
6129 ELEM_OPT_TLV(0x36 , GSM_A_PDU_TYPE_GM, DE_TRAFFIC_FLOW_TEMPLATE , NULL);
6131 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
6135 * [8] 9.5.10 Modify PDP context request (MS to network direction)
6136 * Direction: MS to network
6139 dtap_sm_mod_pdp_req_ms(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
6141 guint32 curr_offset;
6145 curr_offset = offset;
6148 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
6150 pinfo->link_dir = P2P_DIR_UL;
6152 ELEM_OPT_TV( 0x32 , GSM_A_PDU_TYPE_GM, DE_LLC_SAPI , " - Requested LLC SAPI" );
6154 ELEM_OPT_TLV( 0x30 , GSM_A_PDU_TYPE_GM, DE_QOS , " - Requested new QoS" );
6156 ELEM_OPT_TLV( 0x31 , GSM_A_PDU_TYPE_GM, DE_TRAFFIC_FLOW_TEMPLATE , " - New TFT" );
6158 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL);
6160 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
6164 * [8] 9.5.11 Modify PDP context accept (MS to network direction)
6165 * Direction: MS to network
6168 dtap_sm_mod_pdp_acc_ms(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
6170 guint32 curr_offset;
6174 curr_offset = offset;
6177 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
6179 pinfo->link_dir = P2P_DIR_UL;
6181 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL);
6183 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
6187 * [8] 9.5.12 Modify PDP context accept (Network to MS direction)
6188 * Direction: Network to MS
6191 dtap_sm_mod_pdp_acc_net(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
6193 guint32 curr_offset;
6197 curr_offset = offset;
6200 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
6202 pinfo->link_dir = P2P_DIR_DL;
6204 ELEM_OPT_TLV( 0x30 , GSM_A_PDU_TYPE_GM, DE_QOS , " - Negotiated QoS" );
6206 ELEM_OPT_TV( 0x32 , GSM_A_PDU_TYPE_GM, DE_LLC_SAPI , " - Negotiated LLC SAPI" );
6208 ELEM_OPT_TV_SHORT ( 0x80 , GSM_A_PDU_TYPE_GM , DE_RAD_PRIO , " - New radio priority" );
6210 ELEM_OPT_TLV( 0x34 , GSM_A_PDU_TYPE_GM, DE_PACKET_FLOW_ID , NULL);
6212 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL);
6214 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
6218 * [8] 9.5.13 Modify PDP Context Reject
6222 dtap_sm_mod_pdp_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
6224 guint32 curr_offset;
6228 curr_offset = offset;
6231 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
6232 /* Network or the MS */
6233 pinfo->link_dir = LINK_DIR_UNKNOWN;
6236 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL);
6238 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL);
6240 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
6244 * [8] 9.5.14 Deactivate PDP context request
6248 dtap_sm_deact_pdp_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
6250 guint32 curr_offset;
6254 curr_offset = offset;
6257 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
6258 pinfo->link_dir = LINK_DIR_UNKNOWN;
6260 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL);
6262 ELEM_OPT_TV_SHORT( 0x90 , GSM_A_PDU_TYPE_GM , DE_TEAR_DOWN_IND , NULL);
6264 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL);
6266 /* MBMS context status 10.5.7.6 TLV 2 - 18 */
6267 ELEM_OPT_TLV( 0x35 , GSM_A_PDU_TYPE_GM, DE_MBMS_CTX_STATUS , NULL);
6269 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
6273 * [8] 9.5.15 Deactivate PDP context accept
6277 dtap_sm_deact_pdp_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
6279 guint32 curr_offset;
6283 curr_offset = offset;
6286 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
6287 pinfo->link_dir = LINK_DIR_UNKNOWN;
6289 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL);
6291 /* MBMS context status 10.5.7.6 TLV 2 - 18 */
6292 ELEM_OPT_TLV( 0x35 , GSM_A_PDU_TYPE_GM, DE_MBMS_CTX_STATUS , NULL);
6294 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
6298 * [8] 9.5.15a Request Secondary PDP Context Activation
6299 * Direction: network to MS
6302 dtap_sm_req_sec_pdp_act(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
6304 guint32 curr_offset;
6308 curr_offset = offset;
6311 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
6312 pinfo->link_dir = P2P_DIR_DL;
6314 /* Required QoS Quality of service 10.5.6.5 M LV 13-17 */
6315 ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_QOS , " - Required QoS");
6317 /* Linked TI Linked TI 10.5.6.7 M LV 2-3 */
6318 ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_LINKED_TI , NULL);
6320 /* 36 TFT Traffic Flow Template 10.5.6.12 O TLV 3-257 */
6321 ELEM_OPT_TLV(0x36, GSM_A_PDU_TYPE_GM, DE_TRAFFIC_FLOW_TEMPLATE, NULL);
6323 /* 27 Protocol configuration options Protocol configuration options 10.5.6.3 O TLV 3 - 253 */
6324 ELEM_OPT_TLV(0x27, GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT, NULL);
6326 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
6330 * [8] 9.5.15b Request Secondary PDP Context Activation Reject
6331 * Direction: MS to network
6334 dtap_sm_req_sec_pdp_act_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
6336 guint32 curr_offset;
6340 curr_offset = offset;
6343 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
6344 pinfo->link_dir = P2P_DIR_UL;
6346 /* SM cause SM cause 10.5.6.6 M V 1 */
6347 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL);
6349 /* 27 Protocol configuration options Protocol configuration options 10.5.6.3 O TLV 3 - 253 */
6350 ELEM_OPT_TLV(0x27, GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT, NULL);
6352 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
6356 * [8] 9.5.16a Notification
6357 * Direction: network to MS
6360 dtap_sm_notif(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
6362 guint32 curr_offset;
6366 curr_offset = offset;
6369 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
6370 pinfo->link_dir = P2P_DIR_DL;
6372 ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_SM_NOTIF_IND, NULL);
6374 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
6378 * [8] 9.5.21 SM Status
6382 dtap_sm_status(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
6384 guint32 curr_offset;
6388 curr_offset = offset;
6391 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
6392 pinfo->link_dir = LINK_DIR_UNKNOWN;
6394 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL);
6396 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
6400 * [9] 9.5.22 Activate MBMS Context Request
6401 * Direction: MS to network
6404 dtap_sm_act_mbms_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
6406 guint32 curr_offset;
6410 curr_offset = offset;
6413 pinfo->p2p_dir = P2P_DIR_RECV;
6415 /* Requested MBMS NSAPI Enhanced Network service access point identifier 10.5.6.16 M V */
6416 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_ENH_NSAPI, " - Requested MBMS NSAPI");
6418 /* Requested LLC SAPI LLC service access point identifier 10.5.6.9 M V 1 */
6419 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_LLC_SAPI, " - Requested LLC SAPI");
6421 /* Supported MBMS bearer capabilities MBMS bearer capabilities 10.5.6.14 M LV 2 - 3 */
6422 ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_MBMS_BEARER_CAP , NULL );
6424 /* Requested multicast address Packet data protocol address 10.5.6.4 M LV 3 - 19 */
6425 ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_PD_PRO_ADDR , " - Requested multicast address" );
6427 /* Access point name Access point name 10.5.6.1 M LV 2 - 101 */
6428 ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_ACC_POINT_NAME , NULL );
6430 /* 35 MBMS protocol configuration options MBMS protocol configuration options 10.5.6.15 O TLV 3 - 253 */
6431 ELEM_OPT_TLV( 0x35 , GSM_A_PDU_TYPE_GM, DE_MBMS_PROT_CONF_OPT , NULL);
6433 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
6437 * [9] 9.5.23 Activate MBMS Context Accept
6438 * Direction: network to MS
6441 dtap_sm_act_mbms_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
6443 guint32 curr_offset;
6447 curr_offset = offset;
6450 pinfo->p2p_dir = P2P_DIR_SENT;
6452 ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_TMGI, NULL);
6454 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_LLC_SAPI, " - Negotiated LLC SAPI");
6456 ELEM_OPT_TLV( 0x35 , GSM_A_PDU_TYPE_GM, DE_MBMS_PROT_CONF_OPT , NULL);
6458 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
6462 * [9] 9.5.24 Activate MBMS Context Reject
6463 * Direction: network to MS
6466 dtap_sm_act_mbms_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
6468 guint32 curr_offset;
6472 curr_offset = offset;
6475 pinfo->p2p_dir = P2P_DIR_SENT;
6477 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL);
6479 ELEM_OPT_TLV( 0x35 , GSM_A_PDU_TYPE_GM, DE_MBMS_PROT_CONF_OPT , NULL);
6481 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
6485 * [9] 9.5.25 Request MBMS Context Activation
6486 * Direction: network to MS
6489 dtap_sm_req_mbms_act(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
6491 guint32 curr_offset;
6495 curr_offset = offset;
6498 pinfo->p2p_dir = P2P_DIR_SENT;
6500 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_NET_SAPI, " - Linked NSAPI");
6502 ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_PD_PRO_ADDR , " - Offered multicast address" );
6504 ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_ACC_POINT_NAME , NULL );
6506 ELEM_OPT_TLV( 0x35 , GSM_A_PDU_TYPE_GM, DE_MBMS_PROT_CONF_OPT , NULL);
6508 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
6512 * [8] 9.5.26 Request MBMS Context Activation Reject
6513 * Direction: MS to network
6516 dtap_sm_req_mbms_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
6518 guint32 curr_offset;
6522 curr_offset = offset;
6525 pinfo->p2p_dir = P2P_DIR_RECV;
6527 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL);
6529 ELEM_OPT_TLV( 0x35 , GSM_A_PDU_TYPE_GM, DE_MBMS_PROT_CONF_OPT , NULL);
6531 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
6534 #define NUM_GSM_DTAP_MSG_GMM (sizeof(gsm_a_dtap_msg_gmm_strings)/sizeof(value_string))
6535 static gint ett_gsm_dtap_msg_gmm[NUM_GSM_DTAP_MSG_GMM];
6536 static void (*dtap_msg_gmm_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len) = {
6537 dtap_gmm_attach_req, /* Attach Request */
6538 dtap_gmm_attach_acc, /* Attach Accept */
6539 dtap_gmm_attach_com, /* Attach Complete */
6540 dtap_gmm_attach_rej, /* Attach Reject */
6541 dtap_gmm_detach_req, /* Detach Request */
6542 dtap_gmm_detach_acc, /* Detach Accept */
6543 dtap_gmm_rau_req, /* Routing Area Update Request */
6544 dtap_gmm_rau_acc, /* Routing Area Update Accept */
6545 dtap_gmm_rau_com, /* Routing Area Update Complete */
6546 dtap_gmm_rau_rej, /* Routing Area Update Reject */
6547 dtap_gmm_service_req, /* Service Request */
6548 dtap_gmm_service_acc, /* Service Accept */
6549 dtap_gmm_service_rej, /* Service Reject */
6550 dtap_gmm_ptmsi_realloc_cmd, /* P-TMSI Reallocation Command */
6551 dtap_gmm_ptmsi_realloc_com, /* P-TMSI Reallocation Complete */
6552 dtap_gmm_auth_ciph_req, /* Authentication and Ciphering Req */
6553 dtap_gmm_auth_ciph_resp, /* Authentication and Ciphering Resp */
6554 dtap_gmm_auth_ciph_rej, /* Authentication and Ciphering Rej */
6555 dtap_gmm_auth_ciph_fail, /* Authentication and Ciphering Failure */
6556 dtap_gmm_ident_req, /* Identity Request */
6557 dtap_gmm_ident_res, /* Identity Response */
6558 dtap_gmm_status, /* GMM Status */
6559 dtap_gmm_information, /* GMM Information */
6563 #define NUM_GSM_DTAP_MSG_SM (sizeof(gsm_a_dtap_msg_sm_strings)/sizeof(value_string))
6564 static gint ett_gsm_dtap_msg_sm[NUM_GSM_DTAP_MSG_SM];
6565 static void (*dtap_msg_sm_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len) = {
6566 dtap_sm_act_pdp_req, /* Activate PDP Context Request */
6567 dtap_sm_act_pdp_acc, /* Activate PDP Context Accept */
6568 dtap_sm_act_pdp_rej, /* Activate PDP Context Reject */
6569 dtap_sm_req_pdp_act, /* Request PDP Context Activation */
6570 dtap_sm_req_pdp_act_rej, /* Request PDP Context Activation rej. */
6571 dtap_sm_deact_pdp_req, /* Deactivate PDP Context Request */
6572 dtap_sm_deact_pdp_acc, /* Deactivate PDP Context Accept */
6573 dtap_sm_mod_pdp_req_net, /* Modify PDP Context Request(Network to MS direction) */
6574 dtap_sm_mod_pdp_acc_ms, /* Modify PDP Context Accept (MS to network direction) */
6575 dtap_sm_mod_pdp_req_ms, /* Modify PDP Context Request(MS to network direction) */
6576 dtap_sm_mod_pdp_acc_net, /* Modify PDP Context Accept (Network to MS direction) */
6577 dtap_sm_mod_pdp_rej, /* Modify PDP Context Reject */
6578 dtap_sm_act_sec_pdp_req, /* Activate Secondary PDP Context Request */
6579 dtap_sm_act_sec_pdp_acc, /* Activate Secondary PDP Context Accept */
6580 dtap_sm_act_sec_pdp_rej, /* Activate Secondary PDP Context Reject */
6581 NULL, /* Reserved: was allocated in earlier phases of the protocol */
6582 NULL, /* Reserved: was allocated in earlier phases of the protocol */
6583 NULL, /* Reserved: was allocated in earlier phases of the protocol */
6584 NULL, /* Reserved: was allocated in earlier phases of the protocol */
6585 NULL, /* Reserved: was allocated in earlier phases of the protocol */
6586 dtap_sm_status, /* SM Status */
6587 dtap_sm_act_mbms_req, /* Activate MBMS Context Request */
6588 dtap_sm_act_mbms_acc, /* Activate MBMS Context Accept */
6589 dtap_sm_act_mbms_rej, /* Activate MBMS Context Reject */
6590 dtap_sm_req_mbms_act, /* Request MBMS Context Activation */
6591 dtap_sm_req_mbms_rej, /* Request MBMS Context Activation Reject */
6592 dtap_sm_req_sec_pdp_act, /* Request Secondary PDP Context Activation */
6593 dtap_sm_req_sec_pdp_act_rej,/* Request Secondary PDP Context Activation Reject */
6594 dtap_sm_notif, /* Notification */
6598 void get_gmm_msg_params(guint8 oct, const gchar **msg_str, int *ett_tree, int *hf_idx, msg_fcn *dtap_msg_fcn)
6602 *msg_str = match_strval_idx((guint32) (oct & DTAP_GMM_IEI_MASK), gsm_a_dtap_msg_gmm_strings, &idx);
6603 *ett_tree = ett_gsm_dtap_msg_gmm[idx];
6604 *hf_idx = hf_gsm_a_dtap_msg_gmm_type;
6605 *dtap_msg_fcn = dtap_msg_gmm_fcn[idx];
6610 void get_sm_msg_params(guint8 oct, const gchar **msg_str, int *ett_tree, int *hf_idx, msg_fcn *dtap_msg_fcn)
6614 *msg_str = match_strval_idx((guint32) (oct & DTAP_SM_IEI_MASK), gsm_a_dtap_msg_sm_strings, &idx);
6615 *ett_tree = ett_gsm_dtap_msg_sm[idx];
6616 *hf_idx = hf_gsm_a_dtap_msg_sm_type;
6617 *dtap_msg_fcn = dtap_msg_sm_fcn[idx];
6622 /* Register the protocol with Wireshark */
6624 proto_register_gsm_a_gm(void)
6629 /* Setup list of header fields */
6631 static hf_register_info hf[] =
6633 { &hf_gsm_a_dtap_msg_gmm_type,
6634 { "DTAP GPRS Mobility Management Message Type", "gsm_a.dtap_msg_gmm_type",
6635 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_msg_gmm_strings), 0x0,
6638 { &hf_gsm_a_dtap_msg_sm_type,
6639 { "DTAP GPRS Session Management Message Type", "gsm_a.dtap_msg_sm_type",
6640 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_msg_sm_strings), 0x0,
6643 { &hf_gsm_a_gm_elem_id,
6644 { "Element ID", "gsm_a_gm.elem_id",
6645 FT_UINT8, BASE_DEC, NULL, 0,
6648 { &hf_gsm_a_qos_delay_cls,
6649 { "Quality of Service Delay class", "gsm_a.qos.delay_cls",
6650 FT_UINT8, BASE_DEC, VALS(gsm_a_qos_delay_cls_vals), 0x38,
6653 { &hf_gsm_a_qos_reliability_cls,
6654 { "Reliability class", "gsm_a.qos.delay_cls",
6655 FT_UINT8, BASE_DEC, VALS(gsm_a_qos_delay_cls_vals), 0x07,
6658 { &hf_gsm_a_qos_traffic_cls,
6659 { "Traffic class", "gsm_a.qos.traffic_cls",
6660 FT_UINT8, BASE_DEC, VALS(gsm_a_qos_traffic_cls_vals), 0xe0,
6663 { &hf_gsm_a_qos_del_order,
6664 { "Delivery order", "gsm_a.qos.del_order",
6665 FT_UINT8, BASE_DEC, VALS(gsm_a_qos_del_order_vals), 0x18,
6668 { &hf_gsm_a_qos_del_of_err_sdu,
6669 { "Delivery of erroneous SDUs", "gsm_a.qos.del_of_err_sdu",
6670 FT_UINT8, BASE_DEC, VALS(gsm_a_qos_del_of_err_sdu_vals), 0x07,
6673 { &hf_gsm_a_qos_ber,
6674 { "Residual Bit Error Rate (BER)", "gsm_a.qos.ber",
6675 FT_UINT8, BASE_DEC, VALS(gsm_a_qos_ber_vals), 0xf0,
6678 { &hf_gsm_a_qos_sdu_err_rat,
6679 { "SDU error ratio", "gsm_a.qos.sdu_err_rat",
6680 FT_UINT8, BASE_DEC, VALS(gsm_a_qos_sdu_err_rat_vals), 0x0f,
6683 { &hf_gsm_a_qos_traff_hdl_pri,
6684 { "Traffic handling priority", "gsm_a.qos.traff_hdl_pri",
6685 FT_UINT8, BASE_DEC, VALS(gsm_a_qos_traff_hdl_pri_vals), 0x03,
6688 { &hf_gsm_a_gmm_split_on_ccch,
6689 { "SPLIT on CCCH","gsm_a.gmm.split_on_ccch",
6690 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_split_on_ccch_value), 0x08,
6693 { &hf_gsm_a_gmm_non_drx_timer,
6694 { "Non-DRX timer","gsm_a.gmm.non_drx_timer",
6695 FT_UINT8, BASE_DEC, VALS(gsm_a_gmm_non_drx_timer_strings), 0x07,
6698 { &hf_gsm_a_gmm_cn_spec_drs_cycle_len_coef,
6699 { "CN Specific DRX cycle length coefficient","gsm_a.gmm.cn_spec_drs_cycle_len_coef",
6700 FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gsm_a_gmm_cn_spec_drs_cycle_len_coef_strings), 0xf0,
6703 { &hf_gsm_a_tft_op_code,
6704 { "TFT operation code", "gsm_a.tft.op_code",
6705 FT_UINT8, BASE_DEC, VALS(gsm_a_tft_op_code_vals), 0xe0,
6708 { &hf_gsm_a_tft_e_bit,
6709 { "E bit","gsm_a.tft.e_bit",
6710 FT_BOOLEAN, 8, TFS(&gsm_a_tft_e_bit), 0x10,
6713 { &hf_gsm_a_tft_pkt_flt,
6714 { "Number of packet filters", "gsm_a.tft.pkt_flt",
6715 FT_UINT8, BASE_DEC, NULL, 0x0f,
6718 { &hf_gsm_a_tft_pkt_flt_dir,
6719 { "Packet filter direction", "gsm_a.tft.pkt_flt_dir",
6720 FT_UINT8, BASE_DEC, VALS(gsm_a_tft_pkt_flt_dir_vals), 0x30,
6723 { &hf_gsm_a_tft_pkt_flt_id,
6724 { "Packet filter identifier", "gsm_a.tft.pkt_flt_id",
6725 FT_UINT8, BASE_DEC, NULL, 0x0f,
6728 { &hf_gsm_a_sm_ip4_address,
6729 { "IPv4 address", "gsm_a.sm.ip4_address",
6730 FT_IPv4, BASE_NONE, NULL, 0x0,
6733 { &hf_gsm_a_sm_ip4_mask,
6734 { "IPv4 address mask", "gsm_a.sm.ip4_mask",
6735 FT_IPv4, BASE_NONE, NULL, 0x0,
6738 { &hf_gsm_a_sm_ip6_address,
6739 { "IPv6 address", "gsm_a.sm.ip6_address",
6740 FT_IPv6, BASE_NONE, NULL, 0x0,
6743 { &hf_gsm_a_sm_ip6_mask,
6744 { "IPv6 address mask", "gsm_a.sm.ip6_mask",
6745 FT_IPv6, BASE_NONE, NULL, 0x0,
6748 { &hf_gsm_a_tft_protocol_header,
6749 { "Protocol/header", "gsm_a.tft.protocol_header",
6750 FT_UINT8, BASE_HEX, NULL, 0x0,
6753 { &hf_gsm_a_tft_port,
6754 { "Port", "gsm_a.tft.port",
6755 FT_UINT16, BASE_DEC, NULL, 0x0,
6758 { &hf_gsm_a_tft_port_low,
6759 { "Low limit port", "gsm_a.tft.port_low",
6760 FT_UINT16, BASE_DEC, NULL, 0x0,
6763 { &hf_gsm_a_tft_port_high,
6764 { "High limit port", "gsm_a.tft.port_high",
6765 FT_UINT16, BASE_DEC, NULL, 0x0,
6768 { &hf_gsm_a_tft_security,
6769 { "IPSec security parameter index", "gsm_a.tft.security",
6770 FT_UINT32, BASE_HEX, NULL, 0x0,
6773 { &hf_gsm_a_tft_traffic_mask,
6774 { "Mask field", "gsm_a.tft.traffic_mask",
6775 FT_UINT8, BASE_HEX, NULL, 0x0,
6778 { &hf_gsm_a_tft_flow_label_type,
6779 { "Flow Label Type", "gsm_a.tft.flow_label_type",
6780 FT_UINT24, BASE_HEX, NULL, 0x0FFFFF,
6783 { &hf_gsm_a_tft_param_id,
6784 { "Parameter identifier", "gsm_a.tft.param_id",
6785 FT_UINT8, BASE_DEC, VALS(gsm_a_tft_param_id_vals), 0x0,
6788 { &hf_gsm_a_ptmsi_sig,
6789 { "P-TMSI Signature", "gsm_a.ptmsi_sig",
6790 FT_UINT24, BASE_HEX, NULL, 0x0,
6793 { &hf_gsm_a_ptmsi_sig2,
6794 { "P-TMSI Signature 2", "gsm_a.ptmsi_sig2",
6795 FT_UINT24, BASE_HEX, NULL, 0x0,
6798 { &hf_gsm_a_gm_acc_tech_type,
6799 { "Access Technology Type", "gsm_a.gm.acc_tech_type",
6800 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_acc_tech_type_vals), 0x0,
6803 { &hf_gsm_a_gm_acc_cap_struct_len,
6804 { "Length in bits", "gsm_a.gm.acc_cap_struct_len",
6805 FT_UINT8, BASE_HEX_DEC,NULL, 0x0,
6808 { &hf_gsm_a_gm_sms_value,
6809 { "SMS_VALUE (Switch-Measure-Switch)", "gsm_a.gm.sms",
6810 FT_UINT8, BASE_DEC, VALS(gsm_a_sms_vals), 0x0,
6813 { &hf_gsm_a_gm_sm_value,
6814 { "(SM_VALUE) Switch-Measure", "gsm_a.gm.sm",
6815 FT_UINT8, BASE_DEC, VALS(gsm_a_sms_vals), 0x0,
6818 { &hf_gsm_a_gm_sm_ext,
6819 { "Ext", "gsm_a.gm.sm.ext",
6820 FT_UINT8, BASE_HEX, NULL, 0x80,
6823 { &hf_gsm_a_gm_link_dir,
6824 { "Link direction", "gsm_a.gm.link_dir",
6825 FT_INT32, BASE_DEC, VALS(gsm_a_gm_link_dir_vals), 0x0,
6828 { &hf_gsm_a_gm_cause,
6829 { "gmm Cause", "gsm_a.gm.cause",
6830 FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gmm_cause_vals), 0x0,
6834 { "Follow-on proceed", "gsm_a.gm.fop",
6835 FT_BOOLEAN, 8, NULL, 0x08,
6838 { &hf_gsm_a_gm_res_of_attach,
6839 { "Result of attach", "gsm_a.gm.res_of_attach",
6840 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_res_of_attach_vals), 0x07,
6843 { &hf_gsm_a_gm_type_of_ciph_alg,
6844 { "Type of ciphering algorithm", "gsm_a.gm.type_of_ciph_alg",
6845 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_type_of_ciph_alg_vals), 0x07,
6848 { &hf_gsm_a_gm_imeisv_req,
6849 { "IMEISV request", "gsm_a.gm.imeisv_req",
6850 FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gsm_a_gm_imeisv_req_vals), 0x00,
6853 { &hf_gsm_a_gm_ac_ref_nr,
6854 { "A&C reference number", "gsm_a.gm.ac_ref_nr",
6855 FT_UINT8, BASE_DEC, NULL, 0x0,
6858 { &hf_gsm_a_gm_force_to_standby,
6859 { "Force to standby", "gsm_a.gm.force_to_standby",
6860 FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gsm_a_gm_force_to_standby_vals), 0x00,
6863 { &hf_gsm_a_gm_ciph_key_seq_num,
6864 { "Ciphering key sequence number", "gsm_a.gm.ciph_key_seq_num",
6865 FT_UINT8, BASE_DEC, NULL, 0x00,
6868 { &hf_gsm_a_gm_serv_type,
6869 { "Service type", "gsm_a.gm.serv_type",
6870 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_serv_type_vals), 0x00,
6874 { "Follow-on request pending", "gsm_a.gm.for",
6875 FT_BOOLEAN, 8, NULL, 0x08,
6878 { &hf_gsm_a_gm_type_of_attach,
6879 { "Type of attach", "gsm_a.gm.type_of_attach",
6880 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_type_of_attach_vals), 0x07,
6883 { &hf_gsm_a_gm_tmsi_flag,
6884 { "TMSI flag", "gsm_a.gm.tmsi_flag",
6885 FT_BOOLEAN, 8, TFS(&gsm_a_gm_tmsi_flag_value), 0x01,
6888 { &hf_gsm_a_gm_update_type,
6889 { "Update type", "gsm_a.gm.update_type",
6890 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_update_type_vals), 0x07,
6893 { &hf_gsm_a_gm_gprs_timer_unit,
6894 { "Unit", "gsm_a.gm.gprs_timer_unit",
6895 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_gprs_timer_unit_vals), 0xe0,
6898 { &hf_gsm_a_gm_gprs_timer_value,
6899 { "Timer value", "gsm_a.gm.gprs_timer_value",
6900 FT_UINT8, BASE_DEC, NULL, 0x1f,
6903 { &hf_gsm_a_gm_nsapi_5_ul_stat,
6904 { "NSAPI(5) uplink status", "gsm_a.gm.nsapi_5_ul_stat",
6905 FT_BOOLEAN, 8, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0,
6908 { &hf_gsm_a_gm_nsapi_6_ul_stat,
6909 { "NSAPI(6) uplink status", "gsm_a.gm.nsapi_6_ul_stat",
6910 FT_BOOLEAN, 8, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0,
6913 { &hf_gsm_a_gm_nsapi_7_ul_stat,
6914 { "NSAPI(7) uplink status", "gsm_a.gm.nsapi_7_ul_stat",
6915 FT_BOOLEAN, 8, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0,
6918 { &hf_gsm_a_gm_nsapi_8_ul_stat,
6919 { "NSAPI(8) uplink status", "gsm_a.gm.nsapi_8_ul_stat",
6920 FT_BOOLEAN, 8, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0,
6923 { &hf_gsm_a_gm_nsapi_9_ul_stat,
6924 { "NSAPI(9) uplink status", "gsm_a.gm.nsapi_9_ul_stat",
6925 FT_BOOLEAN, 8, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0,
6928 { &hf_gsm_a_gm_nsapi_10_ul_stat,
6929 { "NSAPI(10) uplink status", "gsm_a.gm.nsapi_10_ul_stat",
6930 FT_BOOLEAN, 8, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0,
6933 { &hf_gsm_a_gm_nsapi_11_ul_stat,
6934 { "NSAPI(11) uplink status", "gsm_a.gm.nsapi_11_ul_stat",
6935 FT_BOOLEAN, 8, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0,
6938 { &hf_gsm_a_gm_nsapi_12_ul_stat,
6939 { "NSAPI(12) uplink status", "gsm_a.gm.nsapi_12_ul_stat",
6940 FT_BOOLEAN, 8, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0,
6943 { &hf_gsm_a_gm_nsapi_13_ul_stat,
6944 { "NSAPI(13) uplink status", "gsm_a.gm.nsapi_13_ul_stat",
6945 FT_BOOLEAN, 8, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0,
6948 { &hf_gsm_a_gm_nsapi_14_ul_stat,
6949 { "NSAPI(14) uplink status", "gsm_a.gm.nsapi_14_ul_stat",
6950 FT_BOOLEAN, 8, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0,
6953 { &hf_gsm_a_gm_nsapi_15_ul_stat,
6954 { "NSAPI(15) uplink status", "gsm_a.gm.nsapi_15_ul_stat",
6955 FT_BOOLEAN, 8, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0,
6958 { &hf_gsm_a_gm_pco_pid,
6959 { "Protocol or Container ID", "gsm_a.gm.pco_pid",
6960 FT_UINT16, BASE_DEC, NULL, 0x0,
6963 { &hf_gsm_a_gm_type_of_identity,
6964 { "Type of identity", "gsm_a.gm.type_of_identity",
6965 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_type_of_identity_vals), 0x07,
6969 { "Routing Area Code (RAC)","gsm_a.gm.rac",
6970 FT_UINT8, BASE_HEX_DEC, NULL, 0x00,
6974 { "APC","gsm_a.gm.apc",
6975 FT_BOOLEAN, 8, TFS(&gsm_a_gm_apc_vals), 0x20,
6978 { &hf_gsm_a_gm_otd_a,
6979 { "OTD-A","gsm_a.gm.otd_a",
6980 FT_BOOLEAN, 8, TFS(&gsm_a_gm_otd_a_vals), 0x10,
6983 { &hf_gsm_a_gm_otd_b,
6984 { "OTD-B","gsm_a.gm.otd_b",
6985 FT_BOOLEAN, 8, TFS(&gsm_a_gm_otd_b_vals), 0x08,
6988 { &hf_gsm_a_gm_gps_a,
6989 { "GPS-A","gsm_a.gm.gps_a",
6990 FT_BOOLEAN, 8, TFS(&gsm_a_gm_gps_a_vals), 0x04,
6993 { &hf_gsm_a_gm_gps_b,
6994 { "GPS-B","gsm_a.gm.gps_b",
6995 FT_BOOLEAN, 8, TFS(&gsm_a_gm_gps_b_vals), 0x02,
6998 { &hf_gsm_a_gm_gps_c,
6999 { "GPS-C","gsm_a.gm.gps_c",
7000 FT_BOOLEAN, 8, TFS(&gsm_a_gm_gps_c_vals), 0x01,
7003 { &hf_gsm_a_gm_req_ms_info_irat,
7004 { "I-RAT","gsm_a.gm.req_ms_info_irat",
7005 FT_BOOLEAN, 8, TFS(&gsm_a_gm_req_ms_info_irat_vals), 0x0,
7008 { &hf_gsm_a_gm_req_ms_info_irat2,
7009 { "I-RAT2","gsm_a.gm.req_ms_info_irat2",
7010 FT_BOOLEAN, 8, TFS(&gsm_a_gm_req_ms_info_irat2_vals), 0x0,
7013 { &hf_gsm_a_gm_ue_usage_setting,
7014 { "UE's usage setting","gsm_a.gm.ue_usage_setting",
7015 FT_BOOLEAN, 8, TFS(&gsm_a_gm_ue_usage_setting_vals), 0x0,
7018 { &hf_gsm_a_gm_voice_domain_pref_for_eutran,
7019 { "Voice domain preference for E-UTRAN","gsm_a.gm.voice_domain_pref_for_eutran",
7020 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_voice_domain_pref_for_eutran_vals), 0x0,
7023 { &hf_gsm_a_sm_pdp_type_org,
7024 { "PDP type organization", "gsm_a.sm.pdp_type_org",
7025 FT_UINT8, BASE_DEC, VALS(gsm_a_sm_pdp_type_org_vals), 0x0f,
7028 { &hf_gsm_a_qos_mean_thr,
7029 { "Mean throughput", "gsm_a.qos.mean_throughput",
7030 FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gsm_a_qos_mean_thr_vals), 0x1f,
7033 { &hf_gsm_a_qos_peak_thr,
7034 { "Peak throughput", "gsm_a.qos.peak_throughput",
7035 FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gsm_a_qos_peak_thr_vals), 0xf0,
7038 { &hf_gsm_a_qos_prec_class,
7039 { "Precedence class", "gsm_a.qos.prec_class",
7040 FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gsm_a_qos_prec_class_vals), 0x07,
7043 { &hf_gsm_a_qos_traf_handl_prio,
7044 { "Traffic handling priority", "gsm_a.qos.traf_handl_prio",
7045 FT_UINT8, BASE_DEC, NULL, 0x03,
7048 { &hf_gsm_a_qos_trans_delay,
7049 { "Transfer delay", "gsm_a.qos.trans_delay",
7050 FT_UINT8, BASE_DEC, NULL, 0xfc,
7053 { &hf_gsm_a_qos_signalling_ind,
7054 { "Signalling indication", "gsm_a.qos.signalling_ind",
7055 FT_BOOLEAN, 8, TFS(&gsm_a_qos_signalling_ind_value), 0x10,
7058 { &hf_gsm_a_qos_source_stat_desc,
7059 { "Source statistics description", "gsm_a.qos.source_stat_desc",
7060 FT_UINT8, BASE_DEC, NULL, 0x0f,
7063 { &hf_gsm_a_qos_max_bitrate_upl,
7064 { "Maximum bitrate for uplink", "gsm_a.qos.max_bitrate_upl",
7065 FT_UINT8, BASE_DEC, NULL, 0x0,
7068 { &hf_gsm_a_qos_max_bitrate_downl,
7069 { "Maximum bitrate for downlink", "gsm_a.qos.max_bitrate_downl",
7070 FT_UINT8, BASE_DEC, NULL, 0x0,
7073 { &hf_gsm_a_qos_guar_bitrate_upl,
7074 { "Guaranteed bitrate for uplink", "gsm_a.qos.guar_bitrate_upl",
7075 FT_UINT8, BASE_DEC, NULL, 0x0,
7078 { &hf_gsm_a_qos_guar_bitrate_downl,
7079 { "Guaranteed bitrate for downlink", "gsm_a.qos.guar_bitrate_downl",
7080 FT_UINT8, BASE_DEC, NULL, 0x0,
7083 { &hf_gsm_a_qos_max_bitrate_upl_ext,
7084 { "Maximum bitrate for uplink (extended)", "gsm_a.qos.max_bitrate_upl_ext",
7085 FT_UINT8, BASE_DEC, NULL, 0x0,
7088 { &hf_gsm_a_qos_max_bitrate_downl_ext,
7089 { "Maximum bitrate for downlink (extended)", "gsm_a.qos.max_bitrate_downl_ext",
7090 FT_UINT8, BASE_DEC, NULL, 0x0,
7093 { &hf_gsm_a_qos_guar_bitrate_upl_ext,
7094 { "Guaranteed bitrate for uplink (extended)", "gsm_a.qos.guar_bitrate_upl_ext",
7095 FT_UINT8, BASE_DEC, NULL, 0x0,
7098 { &hf_gsm_a_qos_guar_bitrate_downl_ext,
7099 { "Guaranteed bitrate for downlink (extended)", "gsm_a.qos.guar_bitrate_downl_ext",
7100 FT_UINT8, BASE_DEC, NULL, 0x0,
7103 { &hf_gsm_a_sm_cause,
7104 { "SM Cause", "gsm_a.sm.cause",
7105 FT_UINT8, BASE_DEC, NULL, 0x0,
7108 { &hf_gsm_a_sm_cause_2,
7109 { "SM Cause 2", "gsm_a.sm.cause_2",
7110 FT_UINT8, BASE_DEC, NULL, 0x0,
7113 { &hf_gsm_a_sm_llc_sapi,
7114 { "LLC SAPI", "gsm_a.sm.llc_sapi",
7115 FT_UINT8, BASE_DEC, VALS(gsm_a_sm_llc_sapi_vals), 0x0f,
7119 { "Tear Down Indicator (TDI)", "gsm_a.sm.tdi",
7120 FT_BOOLEAN, 8, TFS(&gsm_a_sm_tdi_value), 0x01,
7123 { &hf_gsm_a_sm_packet_flow_id,
7124 { "Packet Flow Identifier (PFI)", "gsm_a.sm.packet_flow_id",
7125 FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gsm_a_sm_packet_flow_id_vals), 0x7f,
7128 { &hf_gsm_a_gmm_net_cap_gea1,
7129 { "GEA/1", "gsm_a.gmm.net_cap.gea1",
7130 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_gea_vals), 0x80,
7133 { &hf_gsm_a_gmm_net_cap_smdch,
7134 { "SM capabilities via dedicated channels", "gsm_a.gmm.net_cap.smdch",
7135 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_smdch_vals), 0x40,
7138 { &hf_gsm_a_gmm_net_cap_smgprs,
7139 { "SM capabilities via GPRS channels", "gsm_a.gmm.net_cap.smgprs",
7140 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_smgprs_vals), 0x20,
7143 { &hf_gsm_a_gmm_net_cap_ucs2,
7144 { "UCS2 support", "gsm_a.gmm.net_cap.ucs2",
7145 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_smgprs_vals), 0x10,
7148 { &hf_gsm_a_gmm_net_cap_ss_scr_ind,
7149 { "SS Screening Indicator", "gsm_a.gmm.net_cap.ss_scr_ind",
7150 FT_UINT8, BASE_HEX, VALS(gsm_a_gmm_net_cap_ss_scr_ind_vals), 0x0c,
7153 { &hf_gsm_a_gmm_net_cap_solsa,
7154 { "SoLSA Capability", "gsm_a.gmm.net_cap.solsa",
7155 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_solsa_vals), 0x02,
7158 { &hf_gsm_a_gmm_net_cap_rev,
7159 { "Revision level indicator", "gsm_a.gmm.net_cap.rev",
7160 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_rev_vals), 0x01,
7163 { &hf_gsm_a_gmm_net_cap_pfc,
7164 { "PFC feature mode", "gsm_a.gmm.net_cap.pfc",
7165 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_pfc_vals), 0x80,
7168 { &hf_gsm_a_gmm_net_cap_ext_gea_bits,
7169 { "Extended GEA bits", "gsm_a.gmm.net_cap.ext_gea_bits",
7170 FT_UINT8, BASE_HEX, NULL, 0x7e,
7173 { &hf_gsm_a_gmm_net_cap_gea2,
7174 { "GEA/2", "gsm_a.gmm.net_cap.gea2",
7175 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_gea_vals), 0x40,
7178 { &hf_gsm_a_gmm_net_cap_gea3,
7179 { "GEA/3", "gsm_a.gmm.net_cap.gea3",
7180 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_gea_vals), 0x20,
7183 { &hf_gsm_a_gmm_net_cap_gea4,
7184 { "GEA/4", "gsm_a.gmm.net_cap.gea4",
7185 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_gea_vals), 0x10,
7188 { &hf_gsm_a_gmm_net_cap_gea5,
7189 { "GEA/5", "gsm_a.gmm.net_cap.gea5",
7190 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_gea_vals), 0x08,
7193 { &hf_gsm_a_gmm_net_cap_gea6,
7194 { "GEA/6", "gsm_a.gmm.net_cap.gea6",
7195 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_gea_vals), 0x04,
7198 { &hf_gsm_a_gmm_net_cap_gea7,
7199 { "GEA/7", "gsm_a.gmm.net_cap.gea7",
7200 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_gea_vals), 0x02,
7203 { &hf_gsm_a_gmm_net_cap_lcs,
7204 { "LCS VA capability", "gsm_a.gmm.net_cap.lcs",
7205 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_lcs_vals), 0x01,
7208 { &hf_gsm_a_gmm_net_cap_ps_irat_iu,
7209 { "PS inter-RAT HO to UTRAN Iu mode capability", "gsm_a.gmm.net_cap.ps_irat_iu",
7210 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_ps_irat_iu_vals), 0x80,
7213 { &hf_gsm_a_gmm_net_cap_ps_irat_s1,
7214 { "PS inter-RAT HO to E-UTRAN S1 mode capability", "gsm_a.gmm.net_cap.ps_irat_s1",
7215 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_ps_irat_s1_vals), 0x40,
7218 { &hf_gsm_a_gmm_net_cap_comb_proc,
7219 { "EMM Combined procedures capability", "gsm_a.gmm.net_cap.comb_proc",
7220 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_comb_proc_vals), 0x20,
7223 { &hf_gsm_a_gmm_net_cap_isr,
7224 { "ISR support", "gsm_a.gmm.net_cap.isr",
7225 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_isr_vals), 0x10,
7228 { &hf_gsm_a_gmm_net_cap_srvcc_to_geran,
7229 { "SRVCC to GERAN/UTRAN capability", "gsm_a.gmm.net_cap.srvcc_to_geran",
7230 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_srvcc_to_geran_vals), 0x08,
7233 { &hf_gsm_a_gmm_net_cap_epc,
7234 { "EPC Capability", "gsm_a.gmm.net_cap.epc",
7235 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_epc_vals), 0x04,
7238 { &hf_gsm_a_gmm_net_cap_nf,
7239 { "NF Capability", "gsm_a.gmm.net_cap.nf",
7240 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_nf_vals), 0x02,
7243 { &hf_gsm_a_sm_tmgi,
7244 { "Temporary Mobile Group Identity (TMGI)", "gsm_a.sm.tmgi",
7245 FT_UINT24, BASE_HEX, NULL, 0x0,
7248 { &hf_gsm_a_sm_enh_nsapi,
7249 { "Enhanced NSAPI", "gsm_a.sm.enh_nsapi",
7250 FT_UINT8, BASE_DEC, NULL, 0x0,
7253 { &hf_gsm_a_sm_req_type,
7254 { "Request type", "gsm_a.sm.req_type",
7255 FT_UINT8, BASE_DEC, VALS(gsm_a_sm_req_type_vals), 0x07,
7258 { &hf_gsm_a_sm_notif_ind,
7259 { "Notification indicator value", "gsm_a.sm.notif_ind",
7260 FT_UINT8, BASE_DEC, VALS(gsm_a_sm_notif_ind_vals), 0x0,
7263 { &hf_gsm_a_gm_rac_ctrled_early_cm_sending,
7264 { "Controlled early Classmark Sending", "gsm_a.gm.rac.comp_int_meas_cap",
7265 FT_BOOLEAN, 8, TFS(&tfs_implemented_not_implemented), 0x0,
7268 { &hf_gsm_a_gm_rac_pseudo_sync,
7269 { "Pseudo Synchronisation", "gsm_a.gm.rac.pseudo_sync",
7270 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x0,
7273 { &hf_gsm_a_gm_rac_vgcs,
7274 { "Voice Group Call Service", "gsm_a.gm.rac.vgcs",
7275 FT_BOOLEAN, 8, TFS(&gsm_a_gm_vgcs), 0x0,
7278 { &hf_gsm_a_gm_rac_vbs,
7279 { "Voice Broadcast Service", "gsm_a.gm.rac.vbs",
7280 FT_BOOLEAN, 8, TFS(&gsm_a_gm_vbs), 0x0,
7283 { &hf_gsm_a_gm_rac_multislot_capability,
7284 { "Multislot capability struct", "gsm_a.gm.rac.multislot_capability",
7285 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x0,
7288 { &hf_gsm_a_gm_rac_hscsd_multi_slot_class,
7289 { "HSCSD multislot class", "gsm_a.gm.rac.hscsd_multi_slot_class",
7290 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_multi_slot_vals), 0x0,
7293 { &hf_gsm_a_gm_rac_gprs_multi_slot_class,
7294 { "GPRS multislot class", "gsm_a.gm.rac.gprs_multi_slot_class",
7295 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_multi_slot_vals), 0x0,
7298 { &hf_gsm_a_gm_rac_gprs_ext_dyn_alloc_cap,
7299 { "GPRS Extended Dynamic Allocation Capability", "gsm_a.gm.rac.gprs_ext_dyn_alloc_cap",
7300 FT_BOOLEAN, 8, TFS(&tfs_implemented_not_implemented), 0x0,
7303 { &hf_gsm_a_gm_rac_ecsd_multi_slot_class,
7304 { "ECSD multislot class", "gsm_a.gm.rac.ecsd_multi_slot_class",
7305 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_multi_slot_vals), 0x0,
7308 { &hf_gsm_a_gm_rac_egprs_multi_slot_class,
7309 { "EGPRS multislot class", "gsm_a.gm.rac.egprs_multi_slot_class",
7310 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_multi_slot_vals), 0x0,
7313 { &hf_gsm_a_gm_rac_egprs_ext_dyn_alloc_cap,
7314 { "EGPRS Extended Dynamic Allocation Capability", "gsm_a.gm.rac.egprs_ext_dyn_alloc_cap",
7315 FT_BOOLEAN, 8, TFS(&tfs_implemented_not_implemented), 0x0,
7318 { &hf_gsm_a_gm_rac_dtm_gprs_multi_slot_class,
7319 { "DTM GPRS Multi Slot Class", "gsm_a.gm.rac.dtm_gprs_multi_slot_class",
7320 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_dtm_gprs_multi_slot_class_vals), 0x0,
7323 { &hf_gsm_a_gm_rac_single_slt_dtm,
7324 { "Single Slot DTM", "gsm_a.gm.rac.single_slt_dtm",
7325 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
7328 { &hf_gsm_a_gm_rac_dtm_egprs_multi_slot_cls_pres,
7329 { "DTM EGPRS Multi Slot Class", "gsm_a.gm.rac.dtm_egprs_multi_slot_cls_pres",
7330 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x0,
7333 { &hf_gsm_a_gm_rac_dtm_egprs_multi_slot_class,
7334 { "DTM EGPRS Multi Slot Class", "gsm_a.gm.rac.dtm_egprs_multi_slot_class",
7335 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_dtm_gprs_multi_slot_class_vals), 0x0,
7338 { &hf_gsm_a_gm_rac_8psk_pow_cap_pres,
7339 { "8PSK Power Capability Bits", "gsm_a.gm.rac.8psk_pow_cap_pres",
7340 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x0,
7343 { &hf_gsm_a_gm_rac_comp_int_meas_cap,
7344 { "COMPACT Interference Measurement Capability", "gsm_a.gm.rac.comp_int_meas_cap",
7345 FT_BOOLEAN, 8, TFS(&tfs_implemented_not_implemented), 0x0,
7348 { &hf_gsm_a_gm_rel_lev_ind,
7349 { "Revision Level Indicator", "gsm_a.gm.rel_lev_ind",
7350 FT_BOOLEAN, 8, TFS(&gsm_a_gm_revision_level_indicator), 0x0,
7353 { &hf_gsm_a_gm_rac_umts_fdd_cap,
7354 { "UMTS FDD Radio Access Technology Capability", "gsm_a.gm.rac.umts_fdd_cap",
7355 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
7358 { &hf_gsm_a_gm_rac_umts_384_tdd_ra_cap,
7359 { "UMTS 3.84 Mcps TDD Radio Access Technology Capability", "gsm_a.gm.rac.umts_384_tdd_ra_cap",
7360 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
7363 { &hf_gsm_a_gm_rac_cdma2000_cap,
7364 { "CDMA 2000 Radio Access Technology Capability", "gsm_a.gm.rac.cdma2000_cap",
7365 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
7368 { &hf_gsm_a_gm_rac_umts_128_tdd_ra_cap,
7369 { "UMTS 1.28 Mcps TDD Radio Access Technology Capability", "gsm_a.gm.rac.umts_128_tdd_ra_cap",
7370 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
7373 { &hf_gsm_a_gm_rac_geran_feat_pkg,
7374 { "GERAN Feature Package 1", "gsm_a.gm.rac.geran_feat_pkg",
7375 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
7378 { &hf_gsm_a_gm_rac_mod_based_multi_slot_class_support,
7379 { "Modulation based multislot class support", "gsm_a.gm.rac.mod_based_multi_slot_class_support",
7380 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
7383 { &hf_gsm_a_gm_rac_geran_iu_mode_cap,
7384 { "GERAN Iu mode", "gsm_a.gm.rac.geran_iu_mode_cap",
7385 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
7388 { &hf_gsm_a_gm_rac_flo_iu_cap,
7389 { "FLO Iu Capability", "gsm_a.gm.rac.flo_iu_cap",
7390 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
7393 { &hf_gsm_a_gm_rac_mult_tbf_cap,
7394 { "Multiple TBF Capability", "gsm_a.gm.rac.mult_tbf_cap",
7395 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
7398 { &hf_gsm_a_gm_rac_down_adv_rec_perf,
7399 { "Downlink Advanced Receiver Performance", "gsm_a.gm.rac.down_adv_rec_perf",
7400 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_down_adv_rec_perf_vals), 0x0,
7403 { &hf_gsm_a_gm_rac_ext_rlc_mac_ctrl_msg_seg_cap,
7404 { "Extended RLC/MAC Control Message Segmentation Capability", "gsm_a.gm.rac.ext_rlc_mac_ctrl_msg_seg_cap",
7405 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
7408 { &hf_gsm_a_gm_rac_dtm_enh_cap,
7409 { "DTM Enhancements Capability", "gsm_a.gm.rac.dtm_enh_cap",
7410 FT_BOOLEAN, 8, TFS(&gsm_a_gm_dtm_enh_cap), 0x0,
7413 { &hf_gsm_a_gm_rac_dtm_gprs_high_multi_slot_class,
7414 { "DTM GPRS High Multi Slot Class", "gsm_a.gm.rac.dtm_gprs_high_multi_slot_class",
7415 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_dtm_gprs_high_multi_slot_class_vals), 0x0,
7418 { &hf_gsm_a_gm_rac_dtm_egprs_high_multi_slot_class,
7419 { "DTM EGPRS High Multi Slot Class", "gsm_a.gm.rac.dtm_egprs_high_multi_slot_class",
7420 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_dtm_gprs_high_multi_slot_class_vals), 0x0,
7423 { &hf_gsm_a_gm_rac_ps_ho_cap,
7424 { "PS Handover Capability", "gsm_a.gm.rac.ps_ho_cap",
7425 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
7428 { &hf_gsm_a_gm_rac_dtm_ho_cap,
7429 { "DTM Handover Capability", "gsm_a.gm.rac.dtm_ho_cap",
7430 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
7433 { &hf_gsm_a_gm_rac_multi_slot_cap_red_down_dual_carrier,
7434 { "Multislot Capability Reduction for Downlink Dual Carrier", "gsm_a.gm.rac.multi_slot_cap_red_down_dual_carrier",
7435 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_multi_slot_cap_red_down_dual_carrier_vals), 0x0,
7438 { &hf_gsm_a_gm_rac_down_dual_carrier_dtm_cap,
7439 { "Downlink Dual Carrier for DTM Capability", "gsm_a.gm.rac.down_dual_carrier_dtm_cap",
7440 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
7443 { &hf_gsm_a_gm_rac_flex_ts_assign,
7444 { "Flexible Timeslot Assignment", "gsm_a.gm.rac.flex_ts_assign",
7445 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
7448 { &hf_gsm_a_gm_rac_gan_ps_ho_cap,
7449 { "GAN PS Handover Capability", "gsm_a.gm.rac.gan_ps_ho_cap",
7450 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
7453 { &hf_gsm_a_gm_rac_rlc_non_pers_mode,
7454 { "RLC Non-persistent Mode", "gsm_a.gm.rac.rlc_non_pers_mode",
7455 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
7458 { &hf_gsm_a_gm_rac_reduced_lat_cap,
7459 { "Reduced Latency Capability", "gsm_a.gm.rac.reduced_lat_cap",
7460 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
7463 { &hf_gsm_a_gm_rac_ul_egprs2,
7464 { "Uplink EGPRS2", "gsm_a.gm.rac.ul_egprs2",
7465 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_ul_egprs2_vals), 0x0,
7468 { &hf_gsm_a_gm_rac_dl_egprs2,
7469 { "Downlink EGPRS2", "gsm_a.gm.rac.dl_egprs2",
7470 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_dl_egprs2_vals), 0x0,
7473 { &hf_gsm_a_gm_rac_eutra_fdd_support,
7474 { "E-UTRA FDD support", "gsm_a.gm.rac.eutra_fdd_support",
7475 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
7478 { &hf_gsm_a_gm_rac_eutra_tdd_support,
7479 { "E-UTRA TDD support", "gsm_a.gm.rac.eutra_tdd_support",
7480 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
7483 { &hf_gsm_a_gm_rac_geran_to_eutra_support_in_geran_ptm,
7484 { "GERAN to E-UTRA support in GERAN packet transfer mode", "gsm_a.gm.rac.geran_to_eutra_support_in_geran_ptm",
7485 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_geran_to_eutra_support_in_geran_ptm_vals), 0x0,
7488 { &hf_gsm_a_gm_rac_prio_based_resel_support,
7489 { "Priority-based reselection support", "gsm_a.gm.rac.prio_based_resel_support",
7490 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
7493 { &hf_gsm_a_gm_rac_alt_efta_multi_slot_class,
7494 { "Alternative EFTA Multislot Class", "gsm_a.gm.rac.alt_efta_multi_slot_class",
7495 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_alt_efta_multi_slot_class_vals), 0x0,
7498 { &hf_gsm_a_gm_rac_efta_multi_slot_cap_red_down_dual_carrier,
7499 { "EFTA Multislot Capability Reduction for Downlink Dual Carrier", "gsm_a.gm.rac.efta_multi_slot_cap_red_down_dual_carrier",
7500 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_multi_slot_cap_red_down_dual_carrier_vals), 0x0,
7503 { &hf_gsm_a_gm_rac_ind_up_layer_pdu_start_cap_for_rlc_um,
7504 { "Indication of Upper Layer PDU Start Capability for RLC UM", "gsm_a.gm.rac.ind_up_layer_pdu_start_cap_for_rlc_um",
7505 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
7508 { &hf_gsm_a_gm_rac_emst_cap,
7509 { "Enhanced Multiplexing for Single TBF Capability", "gsm_a.gm.rac.emst_cap",
7510 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
7513 { &hf_gsm_a_gm_rac_mtti_cap,
7514 { "Multiple TTI Capability", "gsm_a.gm.rac.mtti_cap",
7515 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
7518 { &hf_gsm_a_gm_rac_utra_csg_cell_report,
7519 { "UTRA CSG Cells Reporting", "gsm_a.gm.rac.utra_csg_cell_report",
7520 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
7523 { &hf_gsm_a_gm_rac_eutra_csg_cell_report,
7524 { "E-UTRA CSG Cells Reporting", "gsm_a.gm.rac.mtti_cap",
7525 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
7528 { &hf_gsm_a_sm_ti_flag,
7529 { "TI Flag", "gsm_a.sm.ti_flag",
7530 FT_BOOLEAN, 8, TFS(&gsm_a_sm_ti_flag_vals), 0x80,
7534 { "Extension", "gsm_a.sm.ext",
7535 FT_BOOLEAN, 8, NULL, 0x80,
7540 /* Setup protocol subtree array */
7541 #define NUM_INDIVIDUAL_ELEMS 18
7542 gint *ett[NUM_INDIVIDUAL_ELEMS +
7543 NUM_GSM_DTAP_MSG_GMM + NUM_GSM_DTAP_MSG_SM +
7546 ett[0] = &ett_tc_component;
7547 ett[1] = &ett_tc_invoke_id;
7548 ett[2] = &ett_tc_linked_id;
7549 ett[3] = &ett_tc_opr_code;
7550 ett[4] = &ett_tc_err_code;
7551 ett[5] = &ett_tc_prob_code;
7552 ett[6] = &ett_tc_sequence;
7553 ett[7] = &ett_gmm_drx;
7554 ett[8] = &ett_gmm_detach_type;
7555 ett[9] = &ett_gmm_attach_type;
7556 ett[10] = &ett_gmm_context_stat;
7557 ett[11] = &ett_gmm_update_type;
7558 ett[12] = &ett_gmm_radio_cap;
7559 ett[13] = &ett_gmm_rai;
7560 ett[14] = &ett_sm_tft;
7561 ett[15] = &ett_gmm_gprs_timer;
7562 ett[16] = &ett_gmm_network_cap;
7563 ett[17] = &ett_gsm_a_gm_msrac_multislot_capability;
7565 last_offset = NUM_INDIVIDUAL_ELEMS;
7567 for (i=0; i < NUM_GSM_DTAP_MSG_GMM; i++, last_offset++)
7569 ett_gsm_dtap_msg_gmm[i] = -1;
7570 ett[last_offset] = &ett_gsm_dtap_msg_gmm[i];
7573 for (i=0; i < NUM_GSM_DTAP_MSG_SM; i++, last_offset++)
7575 ett_gsm_dtap_msg_sm[i] = -1;
7576 ett[last_offset] = &ett_gsm_dtap_msg_sm[i];
7579 for (i=0; i < NUM_GSM_GM_ELEM; i++, last_offset++)
7581 ett_gsm_gm_elem[i] = -1;
7582 ett[last_offset] = &ett_gsm_gm_elem[i];
7586 proto_register_protocol("GSM A-I/F GPRS Mobility and Session Management", "GSM Management", "gsm_a_gm");
7588 proto_register_field_array(proto_a_gm, hf, array_length(hf));
7590 proto_register_subtree_array(ett, array_length(ett));
7592 /* subdissector code */
7593 gprs_sm_pco_subdissector_table = register_dissector_table("sm_pco.protocol",
7594 "GPRS SM PCO PPP protocol", FT_UINT16, BASE_HEX);
7598 proto_reg_handoff_gsm_a_gm(void)
7600 data_handle = find_dissector("data");
7601 rrc_irat_ho_info_handle = find_dissector("rrc.irat.irat_ho_info");
7602 lte_rrc_ue_eutra_cap_handle = find_dissector("lte-rrc.ue_eutra_cap");