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 8.6.0 Release 8)
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" },
138 const value_string gsm_gm_elem_strings[] = {
139 /* GPRS Mobility Management Information Elements 10.5.5 */
140 { 0x00, "Attach Result" },
141 { 0x00, "Attach Type" },
142 { 0x00, "Cipher Algorithm" },
143 { 0x00, "TMSI Status" },
144 { 0x00, "Detach Type" },
145 { 0x00, "DRX Parameter" },
146 { 0x00, "Force to Standby" },
147 { 0x00, "Force to Standby" },
148 { 0x00, "P-TMSI Signature" },
149 { 0x00, "P-TMSI Signature 2" },
150 { 0x00, "Identity Type 2" },
151 { 0x00, "IMEISV Request" },
152 { 0x00, "Receive N-PDU Numbers List" },
153 { 0x00, "MS Network Capability" },
154 { 0x00, "MS Radio Access Capability" },
155 { 0x00, "GMM Cause" },
156 { 0x00, "Routing Area Identification" },
157 { 0x00, "Update Result" },
158 { 0x00, "Update Type" },
159 { 0x00, "A&C Reference Number" },
160 { 0x00, "A&C Reference Number" },
161 { 0x00, "Service Type" },
162 { 0x00, "Cell Notification" },
163 { 0x00, "PS LCS Capability" },
164 { 0x00, "Network Feature Support" },
165 { 0x00, "Inter RAT information container" },
166 /* Session Management Information Elements 10.5.6 */
167 { 0x00, "Access Point Name" },
168 { 0x00, "Network Service Access Point Identifier" },
169 { 0x00, "Protocol Configuration Options" },
170 { 0x00, "Packet Data Protocol Address" },
171 { 0x00, "Quality Of Service" },
172 { 0x00, "SM Cause" },
173 { 0x00, "SM Cause 2" },
174 { 0x00, "Linked TI" },
175 { 0x00, "LLC Service Access Point Identifier" },
176 { 0x00, "Tear Down Indicator" },
177 { 0x00, "Packet Flow Identifier" },
178 { 0x00, "Traffic Flow Template" },
179 { 0x00, "Temporary Mobile Group Identity (TMGI)" },
180 { 0x00, "MBMS bearer capabilities" },
181 { 0x00, "MBMS protocol configuration options" },
182 { 0x00, "Enhanced network service access point identifier" },
183 { 0x00, "Request type" },
184 /* GPRS Common Information Elements 10.5.7 */
185 { 0x00, "PDP Context Status" },
186 { 0x00, "Radio Priority" },
187 { 0x00, "GPRS Timer" },
188 { 0x00, "GPRS Timer 2" },
189 { 0x00, "Radio Priority 2"},
190 { 0x00, "MBMS context status"},
191 { 0x00, "Spare Nibble"},
195 #define DTAP_GMM_IEI_MASK 0xff
196 #define DTAP_SM_IEI_MASK 0xff
198 /* Initialize the protocol and registered fields */
199 static int proto_a_gm = -1;
201 static int hf_gsm_a_dtap_msg_gmm_type = -1;
202 static int hf_gsm_a_dtap_msg_sm_type = -1;
203 int hf_gsm_a_gm_elem_id = -1;
204 static int hf_gsm_a_qos_delay_cls = -1;
205 static int hf_gsm_a_qos_reliability_cls = -1;
206 static int hf_gsm_a_qos_traffic_cls = -1;
207 static int hf_gsm_a_qos_del_order = -1;
208 static int hf_gsm_a_qos_del_of_err_sdu = -1;
209 static int hf_gsm_a_qos_ber = -1;
210 static int hf_gsm_a_qos_sdu_err_rat = -1;
211 static int hf_gsm_a_qos_traff_hdl_pri = -1;
213 static int hf_gsm_a_gmm_split_on_ccch = -1;
214 static int hf_gsm_a_gmm_non_drx_timer = -1;
215 static int hf_gsm_a_gmm_cn_spec_drs_cycle_len_coef = -1;
217 static int hf_gsm_a_ptmsi_sig =-1;
218 static int hf_gsm_a_ptmsi_sig2 =-1;
220 static int hf_gsm_a_tft_op_code = -1;
221 static int hf_gsm_a_tft_e_bit = -1;
222 static int hf_gsm_a_tft_pkt_flt = -1;
223 static int hf_gsm_a_tft_pkt_flt_id = -1;
224 static int hf_gsm_a_tft_pkt_flt_dir = -1;
225 static int hf_gsm_a_sm_ip4_address = -1;
226 static int hf_gsm_a_sm_ip4_mask = -1;
227 static int hf_gsm_a_sm_ip6_address = -1;
228 static int hf_gsm_a_sm_ip6_mask = -1;
229 static int hf_gsm_a_tft_protocol_header = -1;
230 static int hf_gsm_a_tft_port = -1;
231 static int hf_gsm_a_tft_port_low = -1;
232 static int hf_gsm_a_tft_port_high = -1;
233 static int hf_gsm_a_tft_security = -1;
234 static int hf_gsm_a_tft_traffic_mask = -1;
235 static int hf_gsm_a_tft_flow_label_type = -1;
236 static int hf_gsm_a_tft_param_id = -1;
237 static int hf_gsm_a_gm_acc_tech_type = -1;
238 static int hf_gsm_a_gm_acc_cap_struct_len = -1;
239 static int hf_gsm_a_gm_sms_value = -1;
240 static int hf_gsm_a_gm_sm_value = -1;
241 static int hf_gsm_a_gm_sm_ext = -1;
242 static int hf_gsm_a_gm_link_dir = -1;
243 static int hf_gsm_a_gm_cause = -1;
245 static int hf_gsm_a_gm_fop = -1;
246 static int hf_gsm_a_gm_res_of_attach = -1;
247 static int hf_gsm_a_gm_type_of_ciph_alg = -1;
248 static int hf_gsm_a_gm_imeisv_req = -1;
249 static int hf_gsm_a_gm_ac_ref_nr = -1;
250 static int hf_gsm_a_gm_force_to_standby = -1;
251 static int hf_gsm_a_gm_serv_type = -1;
252 static int hf_gsm_a_gm_ciph_key_seq_num = -1;
253 static int hf_gsm_a_gm_for = -1;
254 static int hf_gsm_a_gm_type_of_attach = -1;
255 static int hf_gsm_a_gm_tmsi_flag = -1;
256 static int hf_gsm_a_gm_update_type = -1;
257 static int hf_gsm_a_gm_gprs_timer_unit = -1;
258 static int hf_gsm_a_gm_gprs_timer_value = -1;
259 static int hf_gsm_a_gm_pco_pid = -1;
260 static int hf_gsm_a_gm_type_of_identity = -1;
261 static int hf_gsm_a_gm_rac = -1;
262 static int hf_gsm_a_gm_apc = -1;
263 static int hf_gsm_a_gm_otd_a = -1;
264 static int hf_gsm_a_gm_otd_b = -1;
265 static int hf_gsm_a_gm_gps_a = -1;
266 static int hf_gsm_a_gm_gps_b = -1;
267 static int hf_gsm_a_gm_gps_c = -1;
268 static int hf_gsm_a_sm_pdp_type_org = -1;
269 static int hf_gsm_a_qos_mean_thr = -1;
270 static int hf_gsm_a_qos_peak_thr = -1;
271 static int hf_gsm_a_qos_prec_class = -1;
272 static int hf_gsm_a_qos_traf_handl_prio = -1;
273 static int hf_gsm_a_qos_trans_delay = -1;
274 static int hf_gsm_a_qos_signalling_ind = -1;
275 static int hf_gsm_a_qos_source_stat_desc = -1;
276 static int hf_gsm_a_qos_max_bitrate_upl = -1;
277 static int hf_gsm_a_qos_max_bitrate_downl = -1;
278 static int hf_gsm_a_qos_guar_bitrate_upl = -1;
279 static int hf_gsm_a_qos_guar_bitrate_downl = -1;
280 static int hf_gsm_a_qos_max_bitrate_upl_ext = -1;
281 static int hf_gsm_a_qos_max_bitrate_downl_ext = -1;
282 static int hf_gsm_a_qos_guar_bitrate_upl_ext = -1;
283 static int hf_gsm_a_qos_guar_bitrate_downl_ext = -1;
284 static int hf_gsm_a_sm_cause = -1;
285 static int hf_gsm_a_sm_cause_2 = -1;
286 static int hf_gsm_a_sm_llc_sapi = -1;
287 static int hf_gsm_a_sm_tdi = -1;
288 static int hf_gsm_a_sm_packet_flow_id = -1;
289 static int hf_gsm_a_sm_tmgi = -1;
290 static int hf_gsm_a_sm_enh_nsapi = -1;
291 static int hf_gsm_a_sm_req_type = -1;
292 static int hf_gsm_a_gm_rac_ctrled_early_cm_sending = -1;
293 static int hf_gsm_a_gm_rac_multislot_capability = -1;
294 static int hf_gsm_a_gm_rac_single_slt_dtm = -1;
295 static int hf_gsm_a_gm_rac_dtm_egprs_multi_slot_cls_pres = -1;
296 static int hf_gsm_a_gm_rac_8psk_pow_cap_pres = -1;
297 static int hf_gsm_a_gm_rac_comp_int_meas_cap = -1;
298 static int hf_gsm_a_gm_rel_lev_ind = -1;
299 static int hf_gsm_a_gm_rac_geran_feat_pkg = -1;
300 static int hf_gsm_a_gm_rac_umts_fdd_cap = -1;
301 static int hf_gsm_a_gm_rac_umts_384_tdd_ra_cap = -1;
302 static int hf_gsm_a_gm_rac_cdma2000_cap = -1;
303 static int hf_gsm_a_gm_rac_umts_128_tdd_ra_cap = -1;
305 static int hf_gsm_a_gmm_net_cap_gea1 = -1;
306 static int hf_gsm_a_gmm_net_cap_smdch = -1;
307 static int hf_gsm_a_gmm_net_cap_smgprs = -1;
308 static int hf_gsm_a_gmm_net_cap_ucs2 = -1;
309 static int hf_gsm_a_gmm_net_cap_ss_scr_ind = -1;
310 static int hf_gsm_a_gmm_net_cap_solsa = -1;
311 static int hf_gsm_a_gmm_net_cap_rev = -1;
312 static int hf_gsm_a_gmm_net_cap_pfc = -1;
313 static int hf_gsm_a_gmm_net_cap_ext_gea_bits = -1;
314 static int hf_gsm_a_gmm_net_cap_gea2 = -1;
315 static int hf_gsm_a_gmm_net_cap_gea3 = -1;
316 static int hf_gsm_a_gmm_net_cap_gea4 = -1;
317 static int hf_gsm_a_gmm_net_cap_gea5 = -1;
318 static int hf_gsm_a_gmm_net_cap_gea6 = -1;
319 static int hf_gsm_a_gmm_net_cap_gea7 = -1;
320 static int hf_gsm_a_gmm_net_cap_lcs = -1;
321 static int hf_gsm_a_gmm_net_cap_ps_irat_iu = -1;
322 static int hf_gsm_a_gmm_net_cap_ps_irat_s1 = -1;
323 static int hf_gsm_a_gmm_net_cap_csfb = -1;
324 static int hf_gsm_a_gmm_net_cap_isr = -1;
325 static int hf_gsm_a_gmm_net_cap_srvcc_to_geran = -1;
326 static int hf_gsm_a_gmm_net_cap_epc = -1;
328 /* Initialize the subtree pointers */
329 static gint ett_tc_component = -1;
330 static gint ett_tc_invoke_id = -1;
331 static gint ett_tc_linked_id = -1;
332 static gint ett_tc_opr_code = -1;
333 static gint ett_tc_err_code = -1;
334 static gint ett_tc_prob_code = -1;
335 static gint ett_tc_sequence = -1;
337 static gint ett_gmm_drx = -1;
338 static gint ett_gmm_detach_type = -1;
339 static gint ett_gmm_attach_type = -1;
340 static gint ett_gmm_context_stat = -1;
341 static gint ett_gmm_update_type = -1;
342 static gint ett_gmm_radio_cap = -1;
343 static gint ett_gmm_network_cap = -1;
344 static gint ett_gsm_a_gm_msrac_multislot_capability = -1;
345 static gint ett_gmm_rai = -1;
346 static gint ett_gmm_gprs_timer = -1;
348 static gint ett_sm_tft = -1;
350 static dissector_handle_t data_handle;
351 static dissector_handle_t rrc_irat_ho_info_handle;
353 static dissector_table_t gprs_sm_pco_subdissector_table; /* GPRS SM PCO PPP Protocols */
355 #define NUM_GSM_GM_ELEM (sizeof(gsm_gm_elem_strings)/sizeof(value_string))
356 gint ett_gsm_gm_elem[NUM_GSM_GM_ELEM];
358 static const gchar *pdp_str[2]={ "PDP-INACTIVE", "PDP-ACTIVE" };
361 * [9] 10.5.5.1 Attach result
363 static const value_string gsm_a_gm_res_of_attach_vals[] = {
364 { 0x01, "GPRS only attached" },
365 { 0x03, "Combined GPRS/IMSI attached" },
370 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_)
372 proto_tree_add_item(tree, hf_gsm_a_gm_fop, tvb, offset, 1, FALSE);
373 proto_tree_add_item(tree, hf_gsm_a_gm_res_of_attach, tvb, offset, 1, FALSE);
375 /* no length check possible */
380 * [9] 10.5.5.2 Attach type
382 static const value_string gsm_a_gm_type_of_attach_vals[] = {
383 { 0x01, "GPRS attach" },
384 { 0x02, "Not used (In earlier versions: GPRS attach while IMSI attached)" },
385 { 0x03, "Combined GPRS/IMSI attached" },
390 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_)
392 proto_item *tf = NULL;
393 proto_tree *tf_tree = NULL;
395 proto_tree_add_bits_item(tree, hf_gsm_a_gm_ciph_key_seq_num, tvb, offset << 3, 4, FALSE);
397 tf = proto_tree_add_text(tree,
401 tf_tree = proto_item_add_subtree(tf, ett_gmm_attach_type );
403 proto_tree_add_item(tf_tree, hf_gsm_a_gm_for, tvb, offset, 1, FALSE);
404 proto_tree_add_item(tf_tree, hf_gsm_a_gm_type_of_attach, tvb, offset, 1, FALSE);
406 /* no length check possible */
411 * [9] 10.5.5.3 Ciphering algorithm
413 const value_string gsm_a_gm_type_of_ciph_alg_vals[] = {
414 { 0x00, "ciphering not used" },
415 { 0x01, "GPRS Encryption Algorithm GEA/1" },
416 { 0x02, "GPRS Encryption Algorithm GEA/2" },
417 { 0x03, "GPRS Encryption Algorithm GEA/3" },
418 { 0x04, "GPRS Encryption Algorithm GEA/4" },
419 { 0x05, "GPRS Encryption Algorithm GEA/5" },
420 { 0x06, "GPRS Encryption Algorithm GEA/6" },
421 { 0x07, "GPRS Encryption Algorithm GEA/7" },
426 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_)
428 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (offset << 3) + 4, 1, FALSE);
429 proto_tree_add_item(tree, hf_gsm_a_gm_type_of_ciph_alg, tvb, offset, 1, FALSE);
431 /* no length check possible */
436 * [9] 10.5.5.4 TMSI status
438 const true_false_string gsm_a_gm_tmsi_flag_value = {
439 "valid TMSI available",
440 "no valid TMSI available"
444 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_)
446 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (offset << 3) + 4, 3, FALSE);
447 proto_tree_add_item(tree, hf_gsm_a_gm_tmsi_flag, tvb, offset, 1, FALSE);
449 /* no length check possible */
457 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_)
462 const gchar *str_power;
463 proto_item *tf = NULL;
464 proto_tree *tf_tree = NULL;
466 curr_offset = offset;
468 oct = tvb_get_guint8(tvb, curr_offset);
472 case 1: str="GPRS detach/re-attach required"; break;
473 case 2: str="IMSI detach/re-attach not required"; break;
474 case 3: str="Combined GPRS/IMSI detach/IMSI detach (after VLR failure)"; break;
475 default: str="Combined GPRS/IMSI detach/re-attach not required";
480 case 8: str_power="power switched off"; break;
481 default: str_power="normal detach"; break;
484 tf = proto_tree_add_text(tree,
488 tf_tree = proto_item_add_subtree(tf, ett_gmm_detach_type );
490 proto_tree_add_text(tf_tree,
496 proto_tree_add_text(tf_tree,
504 /* no length check possible */
506 return(curr_offset - offset);
512 * SPLIT on CCCH, octet 3 (bit 4)
513 * 0 Split pg cycle on CCCH is not supported by the mobile station
514 * 1 Split pg cycle on CCCH is supported by the mobile station
516 static const true_false_string gsm_a_gmm_split_on_ccch_value = {
517 "Split pg cycle on CCCH is supported by the mobile station",
518 "Split pg cycle on CCCH is not supported by the mobile station"
521 /* non-DRX timer, octet 3
525 static const value_string gsm_a_gmm_non_drx_timer_strings[] = {
526 { 0x00, "no non-DRX mode after transfer state" },
527 { 0x01, "max. 1 sec non-DRX mode after transfer state" },
528 { 0x02, "max. 2 sec non-DRX mode after transfer state" },
529 { 0x03, "max. 4 sec non-DRX mode after transfer state" },
530 { 0x04, "max. 8 sec non-DRX mode after transfer state" },
531 { 0x05, "max. 16 sec non-DRX mode after transfer state" },
532 { 0x06, "max. 32 sec non-DRX mode after transfer state" },
533 { 0x07, "max. 64 sec non-DRX mode after transfer state" },
537 * CN Specific DRX cycle length coefficient, octet 3
539 * 8 7 6 5 Iu mode specific
540 * 0 0 0 0 CN Specific DRX cycle length coefficient not specified by the MS, ie. the
541 * system information value 'CN domain specific DRX cycle length' is used.
542 * (Ref 3GPP TS 25.331)
543 * 0 1 1 0 CN Specific DRX cycle length coefficient 6
544 * 0 1 1 1 CN Specific DRX cycle length coefficient 7
545 * 1 0 0 0 CN Specific DRX cycle length coefficient 8
546 * 1 0 0 1 CN Specific DRX cycle length coefficient 9
547 * All other values shall be interpreted as "CN Specific DRX cycle length coefficient not
548 * specified by the MS " by this version of the protocol.
549 * NOTE: In Iu mode this field (octet 3 bits 8 to 5) is used, but was spare in earlier
550 * versions of this protocol.
552 static const range_string gsm_a_gmm_cn_spec_drs_cycle_len_coef_strings[] = {
553 { 0x00, 0x05, "CN Specific DRX cycle length coefficient not specified by the MS" },
554 { 0x06, 0x06, "CN Specific DRX cycle length coefficient 6" },
555 { 0x07, 0x07, "CN Specific DRX cycle length coefficient 7" },
556 { 0x08, 0x08, "CN Specific DRX cycle length coefficient 8" },
557 { 0x09, 0x09, "CN Specific DRX cycle length coefficient 9" },
558 { 0x0a, 0x0f, "CN Specific DRX cycle length coefficient not specified by the MS" },
562 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_)
567 proto_item *tf = NULL;
568 proto_tree *tf_tree = NULL;
570 curr_offset = offset;
572 tf = proto_tree_add_text(tree,
576 tf_tree = proto_item_add_subtree(tf, ett_gmm_drx );
578 oct = tvb_get_guint8(tvb, curr_offset);
582 case 0: str="704"; break;
583 case 65: str="71"; break;
584 case 66: str="72"; break;
585 case 67: str="74"; break;
586 case 68: str="75"; break;
587 case 69: str="77"; break;
588 case 70: str="79"; break;
589 case 71: str="80"; break;
590 case 72: str="83"; break;
591 case 73: str="86"; break;
592 case 74: str="88"; break;
593 case 75: str="90"; break;
594 case 76: str="92"; break;
595 case 77: str="96"; break;
596 case 78: str="101"; break;
597 case 79: str="103"; break;
598 case 80: str="107"; break;
599 case 81: str="112"; break;
600 case 82: str="116"; break;
601 case 83: str="118"; break;
602 case 84: str="128"; break;
603 case 85: str="141"; break;
604 case 86: str="144"; break;
605 case 87: str="150"; break;
606 case 88: str="160"; break;
607 case 89: str="171"; break;
608 case 90: str="176"; break;
609 case 91: str="192"; break;
610 case 92: str="214"; break;
611 case 93: str="224"; break;
612 case 94: str="235"; break;
613 case 95: str="256"; break;
614 case 96: str="288"; break;
615 case 97: str="320"; break;
616 case 98: str="352"; break;
617 default: str="Reserved, interpreted as 1";
620 proto_tree_add_text(tf_tree,
622 "Split PG Cycle Code: %s (%u)",
627 proto_tree_add_item(tf_tree, hf_gsm_a_gmm_cn_spec_drs_cycle_len_coef, tvb, curr_offset, 1, FALSE);
628 proto_tree_add_item(tf_tree, hf_gsm_a_gmm_split_on_ccch, tvb, curr_offset, 1, FALSE);
629 proto_tree_add_item(tf_tree, hf_gsm_a_gmm_non_drx_timer, tvb, curr_offset, 1, FALSE);
633 /* no length check possible */
635 return(curr_offset - offset);
639 * [9] 10.5.5.7 Force to standby (lower nibble)
641 static const range_string gsm_a_gm_force_to_standby_vals[] = {
642 { 0x00, 0x00, "Force to standby not indicated" },
643 { 0x01, 0x01, "Force to standby indicated" },
644 { 0x02, 0x07, "Unknown, interpreted as Force to standby not indicated" },
649 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_)
653 /* IMPORTANT - IT'S ASSUMED THAT THE INFORMATION IS IN THE LOWER NIBBLE */
654 bit_offset = (offset << 3) + 4;
655 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, 1, FALSE);
656 proto_tree_add_bits_item(tree, hf_gsm_a_gm_force_to_standby, tvb, bit_offset + 1, 3, FALSE);
658 /* no length check possible */
663 * [9] 10.5.5.7 Force to standby (higher nibble)
666 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_)
670 /* IMPORTANT - IT'S ASSUMED THAT THE INFORMATION IS IN THE HIGHER NIBBLE */
671 bit_offset = offset << 3;
672 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, 1, FALSE);
673 proto_tree_add_bits_item(tree, hf_gsm_a_gm_force_to_standby, tvb, bit_offset + 1, 3, FALSE);
675 /* no length check possible */
683 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_)
686 proto_item *curr_item;
688 curr_offset = offset;
690 curr_item= proto_tree_add_item(tree,hf_gsm_a_ptmsi_sig,tvb,curr_offset,3,FALSE);
691 proto_item_append_text(curr_item,"%s",add_string ? add_string : "");
695 /* no length check possible */
697 return(curr_offset - offset);
704 de_gmm_ptmsi_sig2(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len _U_)
707 proto_item *curr_item;
709 curr_offset = offset;
711 curr_item= proto_tree_add_item(tree,hf_gsm_a_ptmsi_sig2,tvb,curr_offset,3,FALSE);
712 proto_item_append_text(curr_item,"%s",add_string ? add_string : "");
715 EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo);
717 return(curr_offset - offset);
721 * [9] 10.5.5.9 Identity type 2
723 static const value_string gsm_a_gm_type_of_identity_vals[] = {
732 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_)
734 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (offset << 3) + 4, 1, FALSE);
735 proto_tree_add_item(tree, hf_gsm_a_gm_type_of_identity, tvb, offset, 1, FALSE);
737 /* no length check possible */
742 * [9] 10.5.5.10 IMEISV request
744 static const range_string gsm_a_gm_imeisv_req_vals[] = {
745 { 0x00, 0x00, "IMEISV not requested" },
746 { 0x01, 0x01, "IMEISV requested" },
747 { 0x02, 0x07, "Unknown, interpreted as IMEISV not requested" },
752 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_)
756 /* IMPORTANT - IT'S ASSUMED THAT THE INFORMATION IS IN THE HIGHER NIBBLE */
757 bit_offset = offset << 3;
758 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, 1, FALSE);
759 proto_tree_add_bits_item(tree, hf_gsm_a_gm_imeisv_req, tvb, bit_offset + 1, 3, FALSE);
761 /* no length check possible */
769 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_)
775 curr_offset = offset;
777 if ( len == 0 ) return 0;
782 oct = tvb_get_guint8(tvb, curr_offset);
784 oct |= tvb_get_guint8(tvb, curr_offset+1);
788 proto_tree_add_text(tree,
790 "NSAPI %d: 0x%02x (%u)",
798 oct |= tvb_get_guint8(tvb, curr_offset+2);
802 proto_tree_add_text(tree,
803 tvb, curr_offset-1, 2,
804 "NSAPI %d: 0x%02x (%u)",
811 } while ( curr_len > 1 );
813 EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo);
815 return(curr_offset - offset);
819 * [9] 10.5.5.12 MS network capability
821 static const true_false_string gsm_a_gmm_net_cap_gea_vals = {
822 "Encryption algorithm available",
823 "Encryption algorithm not available"
826 static const true_false_string gsm_a_gmm_net_cap_smdch_vals = {
827 "Mobile station supports mobile terminated point to point SMS via dedicated signalling channels",
828 "Mobile station does not support mobile terminated point to point SMS via dedicated signalling channels"
831 static const true_false_string gsm_a_gmm_net_cap_smgprs_vals = {
832 "Mobile station supports mobile terminated point to point SMS via GPRS packet data channels",
833 "Mobile station does not support mobile terminated point to point SMS via GPRS packet data channels"
836 static const true_false_string gsm_a_gmm_net_cap_ucs2_vals = {
837 "The ME has no preference between the use of the default alphabet and the use of UCS2",
838 "The ME has a preference for the default alphabet (defined in 3GPP TS 23.038 [8b]) over UCS2"
841 static const value_string gsm_a_gmm_net_cap_ss_scr_ind_vals[]={
842 { 0x00, "Default value of phase 1" },
843 { 0x01, "capability of handling of ellipsis notation and phase 2 error handling" },
844 { 0x02, "For future use, interpreted as Capability of handling of ellipsis notation and phase 2 error handling" },
845 { 0x03, "For future use, interpreted as Capability of handling of ellipsis notation and phase 2 error handling" },
849 static const true_false_string gsm_a_gmm_net_cap_solsa_vals = {
850 "The ME supports SoLSA",
851 "The ME does not support SoLSA"
854 static const true_false_string gsm_a_gmm_net_cap_rev_vals = {
855 "Used by a mobile station supporting R99 or later versions of the protocol",
856 "Used by a mobile station not supporting R99 or later versions of the protocol"
859 static const true_false_string gsm_a_gmm_net_cap_pfc_vals = {
860 "Mobile station does support BSS packet flow procedures",
861 "Mobile station does not support BSS packet flow procedures"
864 static const true_false_string gsm_a_gmm_net_cap_lcs_vals = {
865 "LCS value added location request notification capability supported",
866 "LCS value added location request notification capability not supported"
869 static const true_false_string gsm_a_gmm_net_cap_ps_irat_iu_vals = {
870 "PS inter-RAT HO to UTRAN Iu mode supported",
871 "PS inter-RAT HO to UTRAN Iu mode not supported"
874 static const true_false_string gsm_a_gmm_net_cap_ps_irat_s1_vals = {
875 "PS inter-RAT HO to E-UTRAN S1 mode supported",
876 "PS inter-RAT HO to E-UTRAN S1 mode not supported"
879 static const true_false_string gsm_a_gmm_net_cap_csfb_vals = {
880 "Mobile station supports CS fallback",
881 "Mobile station does not support CS fallback"
884 static const true_false_string gsm_a_gmm_net_cap_isr_vals = {
885 "The mobile station supports ISR",
886 "The mobile station does not support ISR"
889 static const true_false_string gsm_a_gmm_net_cap_srvcc_to_geran_vals = {
890 "SRVCC from UTRAN HSPA or E-UTRAN to GERAN/UTRAN supported",
891 "SRVCC from UTRAN HSPA or E-UTRAN to GERAN/UTRAN not supported"
894 static const true_false_string gsm_a_gmm_net_cap_epc_vals = {
900 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_)
906 curr_offset = offset;
909 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_gea1, tvb, curr_offset, 1, FALSE);
911 /* bit 7: SM capabilities via dedicated channels */
912 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_smdch, tvb, curr_offset, 1, FALSE);
914 /* bit 6: SM capabilities via GPRS channels */
915 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_smgprs, tvb, curr_offset, 1, FALSE);
917 /* bit 5: UCS2 support */
918 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_ucs2, tvb, curr_offset, 1, FALSE);
920 /* bits 4 3: SS Screening Indicator */
921 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_ss_scr_ind, tvb, curr_offset, 1, FALSE);
923 /* bit 2: SoLSA Capability */
924 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_solsa, tvb, curr_offset, 1, FALSE);
927 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_rev, tvb, curr_offset, 1, FALSE);
930 NO_MORE_DATA_CHECK(len);
932 /* bit 8: PFC feature mode */
933 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_pfc, tvb, curr_offset, 1, FALSE);
935 /* bits 7 6 5 4 3 2: Extended GEA bits */
936 item = proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_ext_gea_bits, tvb, curr_offset, 1, FALSE);
937 subtree = proto_item_add_subtree(item, ett_gmm_network_cap);
938 proto_tree_add_item(subtree, hf_gsm_a_gmm_net_cap_gea2, tvb, curr_offset, 1, FALSE);
939 proto_tree_add_item(subtree, hf_gsm_a_gmm_net_cap_gea3, tvb, curr_offset, 1, FALSE);
940 proto_tree_add_item(subtree, hf_gsm_a_gmm_net_cap_gea4, tvb, curr_offset, 1, FALSE);
941 proto_tree_add_item(subtree, hf_gsm_a_gmm_net_cap_gea5, tvb, curr_offset, 1, FALSE);
942 proto_tree_add_item(subtree, hf_gsm_a_gmm_net_cap_gea6, tvb, curr_offset, 1, FALSE);
943 proto_tree_add_item(subtree, hf_gsm_a_gmm_net_cap_gea7, tvb, curr_offset, 1, FALSE);
945 /* bit 1: LCS VA capability */
946 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_lcs, tvb, curr_offset, 1, FALSE);
949 NO_MORE_DATA_CHECK(len);
951 /* bit 8: PS inter-RAT HO to UTRAN Iu mode capability */
952 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_ps_irat_iu, tvb, curr_offset, 1, FALSE);
954 /* bit 7: PS inter-RAT HO to E-UTRAN S1 mode capability */
955 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_ps_irat_s1, tvb, curr_offset, 1, FALSE);
957 /* bit 6: CSFB Capability */
958 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_csfb, tvb, curr_offset, 1, FALSE);
960 /* bit 5: ISR support */
961 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_isr, tvb, curr_offset, 1, FALSE);
963 /* bit 4: SRVCC to GERAN/UTRAN capability */
964 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_srvcc_to_geran, tvb, curr_offset, 1, FALSE);
966 /* bit 3: EPC capability */
967 proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_epc, tvb, curr_offset, 1, FALSE);
969 /* bits 2 1: Spare bits */
970 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset<<3)+6, 2, FALSE);
973 EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo);
975 return(curr_offset - offset);
981 #define GET_DATA /* check if we have enough bits left */ \
982 if ( curr_bits_length < bits_needed ) \
984 /* check if oct has enougth bits */ \
985 if ( bits_in_oct < bits_needed ) \
988 if ( curr_len == 0 ) \
990 proto_tree_add_text(tf_tree, \
991 tvb, curr_offset, 1, \
992 "Not enough data available"); \
994 tmp_oct = tvb_get_guint8(tvb, curr_offset); \
995 oct |= tmp_oct<<(32-8-bits_in_oct); \
998 if ( bits_in_oct != 0 ) \
1007 /* Access Technology Type */
1009 static const value_string gsm_a_gm_acc_tech_type_vals[] = {
1011 { 0x01, "GSM E --note that GSM E covers GSM P" },
1012 { 0x02, "GSM R --note that GSM R covers GSM E and GSM P" },
1013 { 0x03, "GSM 1800" },
1014 { 0x04, "GSM 1900" },
1015 { 0x05, "GSM 450" },
1016 { 0x06, "GSM 480" },
1017 { 0x07, "GSM 850" },
1018 { 0x08, "GSM 750" },
1019 { 0x09, "GSM T 380" },
1020 { 0x0a, "GSM T 410" },
1021 { 0x0b, "GSM T 900" },
1022 { 0x0c, "GSM 710" },
1023 { 0x0d, "GSM T 810" },
1024 { 0x0f, "Indicates the presence of a list of Additional access technologies" },
1028 static const value_string gsm_a_gm_revision_level_indicator_vals[] = {
1029 { 0x00, "The ME is Release '98 or older" },
1030 { 0x01, "The ME is Release '99 onwards" },
1035 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_)
1037 guint32 curr_offset;
1040 proto_item *tf = NULL, *mc_item = NULL;
1041 proto_tree *tf_tree = NULL, *mc_tree = NULL;
1046 guint add_ocetets; /* octets which are covered by one element -1 */
1047 guint curr_bits_length;
1051 /** XXX: AFAIT only the first 32 entries of the following are actually used. Is this a bug someplace ?? */
1052 static const gchar *multi_slot_str[64] = {
1053 "Not specified", /* 00 */
1054 "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", /* 01 */
1055 "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", /* 02 */
1056 "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", /* 03 */
1057 "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", /* 04 */
1058 "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", /* 05 */
1059 "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", /* 06 */
1060 "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", /* 07 */
1061 "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", /* 08 */
1062 "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", /* 09 */
1063 "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", /* 10 */
1064 "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", /* 11 */
1065 "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", /* 12 */
1066 "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)", /* 13 */
1067 "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)", /* 14 */
1068 "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)", /* 15 */
1069 "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)", /* 16 */
1070 "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)", /* 17 */
1071 "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", /* 18 */
1072 "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", /* 19 */
1073 "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", /* 20 */
1074 "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", /* 21 */
1075 "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", /* 22 */
1076 "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", /* 23 */
1077 "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", /* 24 */
1078 "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", /* 25 */
1079 "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", /* 26 */
1080 "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", /* 27 */
1081 "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", /* 28 */
1082 "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", /* 29 */
1083 "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", /* 30 */
1084 "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", /* 31 */
1085 "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", /* 32 */
1086 "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", /* 33 */
1087 "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", /* 34 */
1088 "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))", /* 35 */
1089 "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))", /* 36 */
1090 "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))", /* 37 */
1091 "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))", /* 38 */
1092 "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))", /* 39 */
1093 "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))", /* 40 */
1094 "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))", /* 41 */
1095 "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))", /* 42 */
1096 "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))", /* 43 */
1097 "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))", /* 44 */
1098 "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))", /* 45 */
1099 "Not specified", /* 46 */
1100 "Not specified", /* 47 */
1101 "Not specified", /* 48 */
1102 "Not specified", /* 49 */
1103 "Not specified", /* 50 */
1104 "Not specified", /* 51 */
1105 "Not specified", /* 52 */
1106 "Not specified", /* 53 */
1107 "Not specified", /* 54 */
1108 "Not specified", /* 55 */
1109 "Not specified", /* 56 */
1110 "Not specified", /* 57 */
1111 "Not specified", /* 58 */
1112 "Not specified", /* 59 */
1113 "Not specified", /* 60 */
1114 "Not specified", /* 61 */
1115 "Not specified", /* 62 */
1116 "Not specified", /* 63 */
1119 guchar dtm_gprs_mslot = 0;
1120 guchar dtm_egprs_mslot = 4;
1121 gboolean finished = TRUE;
1124 curr_offset = offset;
1125 bit_offset = offset<<3;
1133 /* check for a new round */
1134 if (( curr_len*8 + bits_in_oct ) < 11 )
1137 /* now read the first 11 bits */
1138 curr_bits_length = 11;
1142 if ( curr_len != len )
1147 if (( oct>>(32-bits_needed) ) == 1 )
1149 curr_bits_length -= bits_needed;
1150 oct <<= bits_needed;
1151 bits_in_oct -= bits_needed;
1154 if (( curr_len*8 + bits_in_oct ) < 11 )
1156 curr_bits_length = 11;
1160 curr_bits_length -= bits_needed;
1161 oct <<= bits_needed;
1162 bits_in_oct -= bits_needed;
1169 tf = proto_tree_add_text(tree,
1170 tvb, curr_offset, 1,
1171 "MS RA capability %d",indx);
1173 tf_tree = proto_item_add_subtree(tf, ett_gmm_radio_cap );
1181 acc_type = oct>>(32-bits_needed);
1183 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_acc_tech_type, tvb, bit_offset, 4, FALSE);
1186 curr_bits_length -= bits_needed;
1187 oct <<= bits_needed;
1188 bits_in_oct -= bits_needed;
1190 /* < Access capabilities struct > ::= */
1197 bits_length = curr_bits_length = oct>>(32-bits_needed);
1199 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_acc_cap_struct_len, tvb, bit_offset, 7, FALSE);
1200 proto_item_set_len(tf, (bits_length>>3)+1);
1201 /* This is already done - length doesn't contain this field
1202 curr_bits_length -= bits_needed;
1205 oct <<= bits_needed;
1206 bits_in_oct -= bits_needed;
1208 if ( acc_type == 0x0f )
1213 * Additional access technologies:
1215 finished = TRUE; /* Break out of the loop unless proven unfinished */
1224 switch ( oct>>(32-bits_needed) )
1226 case 0x00: str="Not Present"; finished = TRUE; break;
1227 case 0x01: str="Present"; finished = FALSE; break;
1228 default: str="This should not happen";
1231 proto_tree_add_text(tf_tree,
1232 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
1233 "Presence: %s (%u)", str, oct>>(32-bits_needed));
1235 curr_bits_length -= bits_needed;
1236 oct <<= bits_needed;
1237 bits_in_oct -= bits_needed;
1242 * No more valid data, get spare bits if any
1244 while ( curr_bits_length > 0 )
1246 if ( curr_bits_length > 8 )
1249 bits_needed = curr_bits_length;
1251 curr_bits_length -= bits_needed;
1252 oct <<= bits_needed;
1253 bits_in_oct -= bits_needed;
1254 bit_offset+= bits_needed;
1265 acc_type = oct>>(32-bits_needed);
1267 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_acc_cap_struct_len, tvb, bit_offset, 7, FALSE);
1270 curr_bits_length -= bits_needed;
1271 oct <<= bits_needed;
1272 bits_in_oct -= bits_needed;
1280 value = tvb_get_bits8(tvb, bit_offset, 3);
1282 if ( acc_type == 0x04 ) /* GSM 1900 */
1286 case 0x01: str="1 W (30 dBm)"; break;
1287 case 0x02: str="0,25 W (24 dBm)"; break;
1288 case 0x03: str="2 W (33 dBm)"; break;
1289 default: str="Not specified";
1292 else if ( acc_type == 0x03 )
1299 case 0x01: str="1 W (30 dBm)"; break;
1300 case 0x02: str="0,25 W (24 dBm)"; break;
1301 case 0x03: str="4 W (36 dBm)"; break;
1302 default: str="Not specified";
1305 else if ( acc_type <= 0x08 )
1317 case 0x02: str="8 W (39 dBm)"; break;
1318 case 0x03: str="5 W (37 dBm)"; break;
1319 case 0x04: str="2 W (33 dBm)"; break;
1320 case 0x05: str="0,8 W (29 dBm)"; break;
1321 default: str="Not specified";
1325 str="Not specified??";
1327 /* decode_bits_in_field(gint bit_offset, gint no_of_bits, guint64 value)*/
1328 proto_tree_add_text(tf_tree,
1329 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
1330 "%s RF Power Capability, GMSK Power Class: %s (%u)", decode_bits_in_field(bit_offset, 3, value), str, value);
1332 curr_bits_length -= bits_needed;
1333 oct <<= bits_needed;
1334 bits_in_oct -= bits_needed;
1342 value = tvb_get_bits8(tvb, bit_offset, 2);
1346 case 0x00: str="8PSK modulation not supported for uplink"; break;
1347 case 0x01: str="Power class E1"; break;
1348 case 0x02: str="Power class E2"; break;
1349 case 0x03: str="Power class E3"; break;
1350 default: str="This should not happen";
1353 proto_tree_add_text(tf_tree,
1354 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
1355 "8PSK Power Class: %s (%u)",str,value);
1357 curr_bits_length -= bits_needed;
1358 oct <<= bits_needed;
1359 bits_in_oct -= bits_needed;
1361 } while (!finished);
1372 value = tvb_get_bits8(tvb, bit_offset, 3);
1374 if ( acc_type == 0x04 ) /* GSM 1900 */
1378 case 0x01: str="1 W (30 dBm)"; break;
1379 case 0x02: str="0,25 W (24 dBm)"; break;
1380 case 0x03: str="2 W (33 dBm)"; break;
1381 default: str="Not specified";
1384 else if ( acc_type == 0x03 )
1388 case 0x01: str="1 W (30 dBm)"; break;
1389 case 0x02: str="0,25 W (24 dBm)"; break;
1390 case 0x03: str="4 W (36 dBm)"; break;
1391 default: str="Not specified";
1394 else if ( acc_type <= 0x08 )
1398 case 0x02: str="8 W (39 dBm)"; break;
1399 case 0x03: str="5 W (37 dBm)"; break;
1400 case 0x04: str="2 W (33 dBm)"; break;
1401 case 0x05: str="0,8 W (29 dBm)"; break;
1402 default: str="Not specified";
1406 str="Not specified??";
1408 proto_tree_add_text(tf_tree,
1409 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
1410 "%s RF Power Capability, GMSK Power Class: %s (%u)", decode_bits_in_field(bit_offset, 3, value),str,value);
1413 curr_bits_length -= bits_needed;
1414 oct <<= bits_needed;
1415 bits_in_oct -= bits_needed;
1424 if ((oct>>(32-bits_needed))==0)
1426 proto_tree_add_text(tf_tree,
1427 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
1428 "A5 Bits: Same values apply for parameters as in the immediately preceding Access capabilities field within this IE (%u)",oct>>(32-bits_needed));
1430 curr_bits_length -= bits_needed;
1431 oct <<= bits_needed;
1432 bits_in_oct -= bits_needed;
1438 proto_tree_add_text(tf_tree,
1439 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
1440 "A5 Bits: A5 bits follow (%u)",oct>>(32-bits_needed));
1443 curr_bits_length -= bits_needed;
1444 oct <<= bits_needed;
1445 bits_in_oct -= bits_needed;
1447 for (i=1; i<= 7 ; i++ )
1456 switch ( oct>>(32-bits_needed) )
1458 case 0x00: str="encryption algorithm not available"; break;
1459 case 0x01: str="encryption algorithm available"; break;
1460 default: str="This should not happen";
1463 proto_tree_add_text(tf_tree,
1464 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
1465 "A5/%d: %s (%u)",i,str,oct>>(32-bits_needed));
1467 curr_bits_length -= bits_needed;
1468 oct <<= bits_needed;
1469 bits_in_oct -= bits_needed;
1479 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_ctrled_early_cm_sending, tvb, bit_offset, 1, FALSE);
1481 curr_bits_length -= bits_needed;
1482 oct <<= bits_needed;
1483 bits_in_oct -= bits_needed;
1492 switch ( oct>>(32-bits_needed) )
1494 case 0x00: str="PS capability not present"; break;
1495 case 0x01: str="PS capability present"; break;
1496 default: str="This should not happen";
1499 proto_tree_add_text(tf_tree,
1500 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
1501 "Pseudo Synchronisation: %s (%u)",str,oct>>(32-bits_needed));
1503 curr_bits_length -= bits_needed;
1504 oct <<= bits_needed;
1505 bits_in_oct -= bits_needed;
1514 switch ( oct>>(32-bits_needed) )
1516 case 0x00: str="no VGCS capability or no notifications wanted"; break;
1517 case 0x01: str="VGCS capability and notifications wanted"; break;
1518 default: str="This should not happen";
1521 proto_tree_add_text(tf_tree,
1522 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
1523 "Voice Group Call Service: %s (%u)",str,oct>>(32-bits_needed));
1525 curr_bits_length -= bits_needed;
1526 oct <<= bits_needed;
1527 bits_in_oct -= bits_needed;
1536 switch ( oct>>(32-bits_needed) )
1538 case 0x00: str="no VBS capability or no notifications wanted"; break;
1539 case 0x01: str="VBS capability and notifications wanted"; break;
1540 default: str="This should not happen";
1543 proto_tree_add_text(tf_tree,
1544 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
1545 "Voice Broadcast Service: %s (%u)",str,oct>>(32-bits_needed));
1547 curr_bits_length -= bits_needed;
1548 oct <<= bits_needed;
1549 bits_in_oct -= bits_needed;
1552 * Multislot capability?
1557 value = oct>>(32-bits_needed);
1559 mc_item = proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_multislot_capability, tvb, bit_offset, 1, FALSE);
1562 curr_bits_length -= bits_needed;
1563 oct <<= bits_needed;
1564 bits_in_oct -= bits_needed;
1569 mc_tree = proto_item_add_subtree(mc_item, ett_gsm_a_gm_msrac_multislot_capability);
1571 * HSCSD multislot class?
1577 if ((oct>>(32-bits_needed))==0)
1579 proto_tree_add_text(mc_tree,
1580 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
1581 "HSCSD multislot class: Bits are not available (%u)",oct>>(32-bits_needed));
1583 curr_bits_length -= bits_needed;
1584 oct <<= bits_needed;
1585 bits_in_oct -= bits_needed;
1589 curr_bits_length -= bits_needed;
1590 oct <<= bits_needed;
1591 bits_in_oct -= bits_needed;
1595 * HSCSD multislot class
1601 proto_tree_add_text(mc_tree,
1602 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
1603 "HSCSD multislot class: %s (%u)",multi_slot_str[oct>>(32-bits_needed)],oct>>(32-bits_needed));
1605 curr_bits_length -= bits_needed;
1606 oct <<= bits_needed;
1607 bits_in_oct -= bits_needed;
1611 * GPRS multislot class?
1617 if ((oct>>(32-bits_needed))==0)
1619 proto_tree_add_text(mc_tree,
1620 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
1621 "GPRS multislot class: Bits are not available (%u)",oct>>(32-bits_needed));
1623 curr_bits_length -= bits_needed;
1624 oct <<= bits_needed;
1625 bits_in_oct -= bits_needed;
1629 curr_bits_length -= bits_needed;
1630 oct <<= bits_needed;
1631 bits_in_oct -= bits_needed;
1635 * GPRS multislot class
1641 proto_tree_add_text(mc_tree,
1642 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
1643 "GPRS multislot class: %s (%u)",multi_slot_str[oct>>(32-bits_needed)],oct>>(32-bits_needed));
1645 curr_bits_length -= bits_needed;
1646 oct <<= bits_needed;
1647 bits_in_oct -= bits_needed;
1650 * GPRS Extended Dynamic Allocation Capability
1656 switch ( oct>>(32-bits_needed) )
1658 case 0x00: str="Extended Dynamic Allocation Capability for GPRS is not implemented"; break;
1659 case 0x01: str="Extended Dynamic Allocation Capability for GPRS is implemented"; break;
1660 default: str="This should not happen";
1662 proto_tree_add_text(mc_tree,
1663 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
1664 "GPRS Extended Dynamic Allocation Capability: %s (%u)",str,oct>>(32-bits_needed));
1666 curr_bits_length -= bits_needed;
1667 oct <<= bits_needed;
1668 bits_in_oct -= bits_needed;
1678 if ((oct>>(32-bits_needed))==0)
1680 proto_tree_add_text(mc_tree,
1681 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
1682 "SMS/SM values: Bits are not available (%u)",oct>>(32-bits_needed));
1684 curr_bits_length -= bits_needed;
1685 oct <<= bits_needed;
1686 bits_in_oct -= bits_needed;
1690 curr_bits_length -= bits_needed;
1691 oct <<= bits_needed;
1692 bits_in_oct -= bits_needed;
1696 * Switch-Measure-Switch value
1702 proto_tree_add_bits_item(mc_tree, hf_gsm_a_gm_sms_value, tvb, bit_offset, 4, FALSE);
1704 curr_bits_length -= bits_needed;
1705 oct <<= bits_needed;
1706 bits_in_oct -= bits_needed;
1709 * Switch-Measure value
1715 proto_tree_add_bits_item(mc_tree, hf_gsm_a_gm_sm_value, tvb, bit_offset, 4, FALSE);
1717 curr_bits_length -= bits_needed;
1718 oct <<= bits_needed;
1719 bits_in_oct -= bits_needed;
1723 * ECSD multislot class?
1729 if ((oct>>(32-bits_needed))==0)
1731 proto_tree_add_text(mc_tree,
1732 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
1733 "ECSD multislot class: Bits are not available (%u)",oct>>(32-bits_needed));
1735 curr_bits_length -= bits_needed;
1736 oct <<= bits_needed;
1737 bits_in_oct -= bits_needed;
1741 curr_bits_length -= bits_needed;
1742 oct <<= bits_needed;
1743 bits_in_oct -= bits_needed;
1747 * ECSD multislot class
1753 proto_tree_add_text(mc_tree,
1754 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
1755 "ECSD multislot class: %s (%u)",multi_slot_str[oct>>(32-bits_needed)],oct>>(32-bits_needed));
1757 curr_bits_length -= bits_needed;
1758 oct <<= bits_needed;
1759 bits_in_oct -= bits_needed;
1763 * EGPRS multislot class?
1769 if ((oct>>(32-bits_needed))==0)
1771 proto_tree_add_text(mc_tree,
1772 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
1773 "EGPRS multislot class: Bits are not available (%u)",oct>>(32-bits_needed));
1774 curr_bits_length -= bits_needed;
1775 oct <<= bits_needed;
1776 bits_in_oct -= bits_needed;
1781 curr_bits_length -= bits_needed;
1782 oct <<= bits_needed;
1783 bits_in_oct -= bits_needed;
1787 * EGPRS multislot class
1793 proto_tree_add_text(mc_tree,
1794 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
1795 "EGPRS multislot class: %s (%u)",multi_slot_str[oct>>(32-bits_needed)],oct>>(32-bits_needed));
1797 curr_bits_length -= bits_needed;
1798 oct <<= bits_needed;
1799 bits_in_oct -= bits_needed;
1802 * EGPRS Extended Dynamic Allocation Capability
1808 switch ( oct>>(32-bits_needed) )
1810 case 0x00: str="Extended Dynamic Allocation Capability for EGPRS is not implemented"; break;
1811 case 0x01: str="Extended Dynamic Allocation Capability for EGPRS is implemented"; break;
1812 default: str="This should not happen";
1814 proto_tree_add_text(mc_tree,
1815 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
1816 "EGPRS Extended Dynamic Allocation Capability: %s (%u)",str, oct>>(32-bits_needed));
1818 curr_bits_length -= bits_needed;
1819 oct <<= bits_needed;
1820 bits_in_oct -= bits_needed;
1824 * DTM GPRS Multi Slot Class ?
1830 if ((oct>>(32-bits_needed))==0)
1832 proto_tree_add_text(mc_tree,
1833 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
1834 "DTM GPRS Multi Slot Class: Bits are not available (%u)",oct>>(32-bits_needed));
1836 curr_bits_length -= bits_needed;
1837 oct <<= bits_needed;
1838 bits_in_oct -= bits_needed;
1842 curr_bits_length -= bits_needed;
1843 oct <<= bits_needed;
1844 bits_in_oct -= bits_needed;
1848 * DTM GPRS Multi Slot Class
1854 dtm_gprs_mslot = oct>>(32-bits_needed);
1856 switch ( oct>>(32-bits_needed) )
1858 case 0: str="Unused. If received, the network shall interpret this as Multislot class 5"; break;
1859 case 1: str="Multislot class 5 supported"; break;
1860 case 2: str="Multislot class 9 supported"; break;
1861 case 3: str="Multislot class 11 supported"; break;
1862 default: str="This should not happen";
1865 proto_tree_add_text(mc_tree,
1866 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
1867 "DTM GPRS Multi Slot Class: %s (%u)",str,oct>>(32-bits_needed));
1869 curr_bits_length -= bits_needed;
1870 oct <<= bits_needed;
1871 bits_in_oct -= bits_needed;
1879 proto_tree_add_bits_item(mc_tree, hf_gsm_a_gm_rac_single_slt_dtm, tvb, bit_offset, 1, FALSE);
1881 curr_bits_length -= bits_needed;
1882 oct <<= bits_needed;
1883 bits_in_oct -= bits_needed;
1886 * DTM EGPRS Multi Slot Class ?
1892 dtm_egprs_mslot = oct>>(32-bits_needed);
1893 proto_tree_add_bits_item(mc_tree, hf_gsm_a_gm_rac_dtm_egprs_multi_slot_cls_pres, tvb, bit_offset, 1, FALSE);
1895 curr_bits_length -= bits_needed;
1896 oct <<= bits_needed;
1897 bits_in_oct -= bits_needed;
1899 if ((oct>>(32-bits_needed))==1)
1902 * DTM EGPRS Multi Slot Class
1908 switch ( oct>>(32-bits_needed) )
1910 case 0: str="Unused. If received, the network shall interpret this as Multislot class 5"; break;
1911 case 1: str="Multislot class 5 supported"; break;
1912 case 2: str="Multislot class 9 supported"; break;
1913 case 3: str="Multislot class 11 supported"; break;
1914 default: str="This should not happen";
1917 proto_tree_add_text(mc_tree,
1918 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
1919 "DTM EGPRS Multi Slot Class: %s (%u)",str,oct>>(32-bits_needed));
1921 curr_bits_length -= bits_needed;
1922 oct <<= bits_needed;
1923 bits_in_oct -= bits_needed;
1929 * 8PSK Power Capability?
1934 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_8psk_pow_cap_pres, tvb, bit_offset, 1, FALSE);
1936 curr_bits_length -= bits_needed;
1937 oct <<= bits_needed;
1938 bits_in_oct -= bits_needed;
1941 if ((oct>>(32-bits_needed))==1)
1944 * 8PSK Power Capability
1950 switch ( oct>>(32-bits_needed) )
1952 case 0x00: str="Reserved"; break;
1953 case 0x01: str="Power class E1"; break;
1954 case 0x02: str="Power class E2"; break;
1955 case 0x03: str="Power class E3"; break;
1956 default: str="This should not happen";
1959 proto_tree_add_text(tf_tree,
1960 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
1961 "8PSK Power Capability: %s (%u)",str,oct>>(32-bits_needed));
1963 curr_bits_length -= bits_needed;
1964 oct <<= bits_needed;
1965 bits_in_oct -= bits_needed;
1969 * COMPACT Interference Measurement Capability
1974 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_comp_int_meas_cap, tvb, bit_offset, 1, FALSE);
1976 curr_bits_length -= bits_needed;
1977 oct <<= bits_needed;
1978 bits_in_oct -= bits_needed;
1981 * Revision Level Indicator
1986 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rel_lev_ind, tvb, bit_offset, 1, FALSE);
1988 curr_bits_length -= bits_needed;
1989 oct <<= bits_needed;
1990 bits_in_oct -= bits_needed;
1993 * UMTS FDD Radio Access Technology Capability
1998 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_umts_fdd_cap, tvb, bit_offset, 1, FALSE);
2000 curr_bits_length -= bits_needed;
2001 oct <<= bits_needed;
2002 bits_in_oct -= bits_needed;
2005 * UMTS 3.84 Mcps TDD Radio Access Technology Capability
2010 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_umts_384_tdd_ra_cap, tvb, bit_offset, 1, FALSE);
2012 curr_bits_length -= bits_needed;
2013 oct <<= bits_needed;
2014 bits_in_oct -= bits_needed;
2017 * CDMA 2000 Radio Access Technology Capability
2022 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_cdma2000_cap, tvb, bit_offset, 1, FALSE);
2024 curr_bits_length -= bits_needed;
2025 oct <<= bits_needed;
2026 bits_in_oct -= bits_needed;
2029 * UMTS 1.28 Mcps TDD Radio Access Technology Capability
2034 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_umts_128_tdd_ra_cap, tvb, bit_offset, 1, FALSE);
2036 curr_bits_length -= bits_needed;
2037 oct <<= bits_needed;
2038 bits_in_oct -= bits_needed;
2041 * GERAN Feature Package 1
2046 proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_geran_feat_pkg, tvb, bit_offset, 1, FALSE);
2048 curr_bits_length -= bits_needed;
2049 oct <<= bits_needed;
2050 bits_in_oct -= bits_needed;
2053 * Extended DTM (E)GPRS Multi Slot Class
2060 if ((oct>>(32-bits_needed))==0)
2062 proto_tree_add_text(tf_tree,
2063 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
2064 "Extended DTM (E)GPRS Multi Slot Class: Bits are not available (%u)",oct>>(32-bits_needed));
2065 curr_bits_length -= bits_needed;
2066 oct <<= bits_needed;
2067 bits_in_oct -= bits_needed;
2072 curr_bits_length -= bits_needed;
2073 oct <<= bits_needed;
2074 bits_in_oct -= bits_needed;
2077 * Extended DTM GPRS Multi Slot Class
2083 switch ( (oct>>(32-bits_needed))|(dtm_gprs_mslot<<4) )
2085 case 0x00: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
2086 case 0x01: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
2087 case 0x02: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
2088 case 0x03: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
2089 case 0x10: str="Multislot class 5 supported"; break;
2090 case 0x11: str="Multislot class 6 supported"; break;
2091 case 0x12: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
2092 case 0x13: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
2093 case 0x20: str="Multislot class 9 supported"; break;
2094 case 0x21: str="Multislot class 10 supported"; break;
2095 case 0x22: str="Unused. If received, it shall be interpreted as Multislot class 9 supported"; break;
2096 case 0x23: str="Unused. If received, it shall be interpreted as Multislot class 9 supported"; break;
2097 case 0x30: str="Multislot class 11 supported"; break;
2098 case 0x31: str="Unused. If received, it shall be interpreted as Multislot class 11 supported"; break;
2099 case 0x32: str="Unused. If received, it shall be interpreted as Multislot class 11 supported"; break;
2100 case 0x33: str="Unused. If received, it shall be interpreted as Multislot class 11 supported"; break;
2101 default: str="This should not happen";
2104 proto_tree_add_text(tf_tree,
2105 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
2106 "Extended DTM GPRS Multi Slot Class: %s (%u)",str,oct>>(32-bits_needed));
2108 curr_bits_length -= bits_needed;
2109 oct <<= bits_needed;
2110 bits_in_oct -= bits_needed;
2112 if ( dtm_egprs_mslot <= 3 )
2115 * Extended DTM EGPRS Multi Slot Class
2121 switch ( (oct>>(32-bits_needed))|(dtm_egprs_mslot<<4) )
2123 case 0x00: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
2124 case 0x01: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
2125 case 0x02: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
2126 case 0x03: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
2127 case 0x10: str="Multislot class 5 supported"; break;
2128 case 0x11: str="Multislot class 6 supported"; break;
2129 case 0x12: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
2130 case 0x13: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
2131 case 0x20: str="Multislot class 9 supported"; break;
2132 case 0x21: str="Multislot class 10 supported"; break;
2133 case 0x22: str="Unused. If received, it shall be interpreted as Multislot class 9 supported"; break;
2134 case 0x23: str="Unused. If received, it shall be interpreted as Multislot class 9 supported"; break;
2135 case 0x30: str="Multislot class 11 supported"; break;
2136 case 0x31: str="Unused. If received, it shall be interpreted as Multislot class 11 supported"; break;
2137 case 0x32: str="Unused. If received, it shall be interpreted as Multislot class 11 supported"; break;
2138 case 0x33: str="Unused. If received, it shall be interpreted as Multislot class 11 supported"; break;
2139 default: str="This should not happen";
2142 proto_tree_add_text(tf_tree,
2143 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
2144 "Extended DTM EGPRS Multi Slot Class: %s (%u)",str, oct>>(32-bits_needed));
2146 curr_bits_length -= bits_needed;
2147 oct <<= bits_needed;
2148 bits_in_oct -= bits_needed;
2153 * Modulation based multislot class support
2159 switch ( oct>>(32-bits_needed) )
2161 case 0x00: str="Modulation based multislot class not supported"; break;
2162 case 0x01: str="Modulation based multislot class supported"; break;
2163 default: str="This should not happen";
2166 proto_tree_add_text(tf_tree,
2167 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
2168 "Modulation based multislot class support: %s (%u)",str,oct>>(32-bits_needed));
2170 curr_bits_length -= bits_needed;
2171 oct <<= bits_needed;
2172 bits_in_oct -= bits_needed;
2175 * High Multislot Capability
2181 if ((oct>>(32-bits_needed))==0)
2183 proto_tree_add_text(tf_tree,
2184 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
2185 "High Multislot Capability: Bits are not available (%u)",oct>>(32-bits_needed));
2187 curr_bits_length -= bits_needed;
2188 oct <<= bits_needed;
2189 bits_in_oct -= bits_needed;
2193 curr_bits_length -= bits_needed;
2194 oct <<= bits_needed;
2195 bits_in_oct -= bits_needed;
2199 * High Multislot Capability
2205 proto_tree_add_text(tf_tree,
2206 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
2207 "High Multislot Capability: 0x%02x (%u)"
2208 " - This field effect all other multislot fields."
2209 " To understand the value please read TS 24.008 5.6.0"
2210 " Release 5 Chap 10.5.5.12 Page 406",
2211 oct>>(32-bits_needed),
2212 oct>>(32-bits_needed));
2214 curr_bits_length -= bits_needed;
2215 oct <<= bits_needed;
2216 bits_in_oct -= bits_needed;
2220 * GERAN Iu Mode Capability
2226 switch ( oct>>(32-bits_needed) )
2228 case 0x00: str="GERAN Iu mode not supported"; break;
2229 case 0x01: str="GERAN Iu mode supported"; break;
2230 default: str="This should not happen";
2233 proto_tree_add_text(tf_tree,
2234 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
2235 "GERAN Iu Mode Capability: %s (%u)",str,oct>>(32-bits_needed));
2237 curr_bits_length -= bits_needed;
2238 oct <<= bits_needed;
2239 bits_in_oct -= bits_needed;
2242 * GMSK/8-PSK Multislot Power Profile
2248 if ((oct>>(32-bits_needed))==0)
2250 proto_tree_add_text(tf_tree,
2251 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
2252 "GMSK/8-PSK Multislot Power Profile: Bits are not available (%u)",oct>>(32-bits_needed));
2254 curr_bits_length -= bits_needed;
2255 oct <<= bits_needed;
2256 bits_in_oct -= bits_needed;
2260 curr_bits_length -= bits_needed;
2261 oct <<= bits_needed;
2262 bits_in_oct -= bits_needed;
2266 * GMSK Multislot Power Profile
2272 switch ( oct>>(32-bits_needed) )
2274 case 0x00: str="GMSK_MULTISLOT_POWER_PROFILE 0"; break;
2275 case 0x01: str="GMSK_MULTISLOT_POWER_PROFILE 1"; break;
2276 case 0x02: str="GMSK_MULTISLOT_POWER_PROFILE 2"; break;
2277 case 0x03: str="GMSK_MULTISLOT_POWER_PROFILE 3"; break;
2278 default: str="This should not happen";
2281 proto_tree_add_text(tf_tree,
2282 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
2283 "GMSK Multislot Power Profile: %s (%u)",str,oct>>(32-bits_needed));
2285 curr_bits_length -= bits_needed;
2286 oct <<= bits_needed;
2287 bits_in_oct -= bits_needed;
2290 * 8-PSK Multislot Power Profile
2296 switch ( oct>>(32-bits_needed) )
2298 case 0x00: str="8-PSK_MULTISLOT_POWER_PROFILE 0"; break;
2299 case 0x01: str="8-PSK_MULTISLOT_POWER_PROFILE 1"; break;
2300 case 0x02: str="8-PSK_MULTISLOT_POWER_PROFILE 2"; break;
2301 case 0x03: str="8-PSK_MULTISLOT_POWER_PROFILE 3"; break;
2302 default: str="This should not happen";
2305 proto_tree_add_text(tf_tree,
2306 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
2307 "8-PSK Multislot Power Profile: %s (%u)",str,oct>>(32-bits_needed));
2309 curr_bits_length -= bits_needed;
2310 oct <<= bits_needed;
2311 bits_in_oct -= bits_needed;
2316 * we are too long ... so jump over it
2318 while ( curr_bits_length > 0 )
2320 if ( curr_bits_length > 8 )
2323 bits_needed = curr_bits_length;
2325 curr_bits_length -= bits_needed;
2326 oct <<= bits_needed;
2327 bits_in_oct -= bits_needed;
2333 curr_offset+= curr_len;
2335 EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo);
2337 return(curr_offset - offset);
2343 static const range_string gmm_cause_vals[] = {
2344 { 0x00, 0x01, "Protocol error, unspecified(Not def in v8.6.0)"},
2345 { 0x02, 0x02, "IMSI unknown in HLR"},
2346 { 0x03, 0x03, "Illegal MS"},
2347 { 0x04, 0x04, "IMSI unknown in VLR"}, /* Annex G.1 */
2348 { 0x05, 0x05, "IMEI not accepted"}, /* Annex G.1 */
2349 { 0x06, 0x06, "Illegal ME"},
2350 { 0x07, 0x07, "GPRS services not allowed"},
2351 { 0x08, 0x08, "GPRS services and non-GPRS services not allowed"},
2352 { 0x09, 0x09, "MS identity cannot be derived by the network"},
2353 { 0x0a, 0x0a, "Implicitly detached"},
2354 { 0x0b, 0x0b, "PLMN not allowed"},
2355 { 0x0c, 0x0c, "Location Area not allowed"},
2356 { 0x0d, 0x0d, "Roaming not allowed in this location area"},
2357 { 0x0e, 0x0e, "GPRS services not allowed in this PLMN"},
2358 { 0x0f, 0x0f, "No Suitable Cells In Location Area"},
2359 { 0x10, 0x10, "MSC temporarily not reachable"},
2360 { 0x11, 0x11, "Network failure"},
2361 { 0x12, 0x13, "Protocol error, unspecified(Not def in v8.6.0)"},
2362 { 0x14, 0x14, "MAC failure"},
2363 { 0x15, 0x15, "Synch failure"},
2364 { 0x16, 0x16, "Congestion"},
2365 { 0x17, 0x17, "GSM authentication unacceptable"},
2366 { 0x18, 0x18, "Protocol error, unspecified(Not def in v8.6.0)"},
2367 { 0x19, 0x19, "Not authorized for this CSG"},
2368 { 0x20, 0x20, "Service option not supported"}, /* Annex G.4 */
2369 { 0x21, 0x21, "Requested service option not subscribed"}, /* Annex G.4 */
2370 { 0x22, 0x22, "Service option temporarily out of order"}, /* Annex G.4 */
2372 { 0x23, 0x25, "Protocol error, unspecified(Not def in v8.6.0)"},
2374 { 0x26, 0x26, "Call cannot be identified(non-GPRS services only)"}, /* Annex G.4 */
2375 { 0x27, 0x27, "Protocol error, unspecified(Not def in v8.6.0)"},
2376 { 0x28, 0x28, "No PDP context activated"},
2377 { 0x29, 0x2f, "Protocol error, unspecified(Not def in v8.6.0)"},
2378 { 0x30, 0x3f, "Retry upon entry into a new cell"},
2380 { 0x40, 0x5e, "Protocol error, unspecified(Not def in v8.6.0)"},
2382 { 0x5f, 0x5f, "Semantically incorrect message"},
2383 { 0x60, 0x60, "Invalid mandatory information"},
2384 { 0x61, 0x61, "Message type non-existent or not implemented"},
2385 { 0x62, 0x62, "Message type not compatible with the protocol state"},
2386 { 0x63, 0x63, "Information element non-existent or notimplemented"},
2387 { 0x64, 0x64, "Conditional IE error"},
2388 { 0x65, 0x65, "Message not compatible with the protocol state"},
2390 { 0x66, 0x6e, "Protocol error, unspecified(Not def in v8.6.0)"},
2392 { 0x6f, 0x6f, "Protocol error, unspecified"},
2393 { 0x70, 0xff, "Protocol error, unspecified(Not def in v8.6.0)"},
2396 /* NOTE 1 TS 124 008 V8.6.0 (2009-07)
2397 "Any other value received by the mobile station shall be treated as 0110 1111, "Protocol
2398 error, unspecified". Any other value received by the network shall be treated as
2399 0110 1111, "Protocol error, unspecified".
2402 /* NOTE: The listed reject cause values are defined in annex G. */
2405 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_)
2407 guint32 curr_offset;
2409 curr_offset = offset;
2411 proto_tree_add_item(tree, hf_gsm_a_gm_cause, tvb, curr_offset, 1, FALSE);
2415 /* no length check possible */
2417 return(curr_offset - offset);
2421 * [7] 10.5.5.15 Routing area identification
2424 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_)
2426 proto_tree *subtree;
2432 guint32 curr_offset;
2434 curr_offset = offset;
2436 mcc = (tvb_get_guint8(tvb, curr_offset) & 0x0f) <<8;
2437 mcc |= (tvb_get_guint8(tvb, curr_offset) & 0xf0);
2438 mcc |= (tvb_get_guint8(tvb, curr_offset+1) & 0x0f);
2439 mnc = (tvb_get_guint8(tvb, curr_offset+2) & 0x0f) <<8;
2440 mnc |= (tvb_get_guint8(tvb, curr_offset+2) & 0xf0);
2441 mnc |= (tvb_get_guint8(tvb, curr_offset+1) & 0xf0) >>4;
2442 if ((mnc&0x000f) == 0x000f)
2445 lac = tvb_get_ntohs(tvb, curr_offset+3);
2446 rac = tvb_get_guint8(tvb, curr_offset+5);
2448 item = proto_tree_add_text(tree,
2449 tvb, curr_offset, 6,
2450 "Routing area identification: %x-%x-%u-%u",
2453 subtree = proto_item_add_subtree(item, ett_gmm_rai);
2454 dissect_e212_mcc_mnc(tvb, pinfo, subtree, offset, TRUE);
2456 proto_tree_add_item(subtree, hf_gsm_a_lac, tvb, curr_offset+3, 2, FALSE);
2457 proto_tree_add_item(subtree, hf_gsm_a_gm_rac, tvb, curr_offset+5, 1, FALSE);
2462 if (add_string[0] == '\0')
2464 g_snprintf(add_string, string_len, " - RAI: %x-%x-%u-%u", mcc,mnc,lac,rac);
2469 /* no length check possible */
2471 return(curr_offset - offset);
2478 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_)
2481 guint32 curr_offset;
2484 curr_offset = offset;
2486 oct = tvb_get_guint8(tvb, curr_offset);
2488 /* IMPORTANT - IT'S ASSUMED THAT THE INFORMATION IS IN THE HIGHER NIBBLE */
2493 case 0: str="RA updated"; break;
2494 case 1: str="combined RA/LA updated"; break;
2495 default: str="reserved";
2498 proto_tree_add_text(tree,
2499 tvb, curr_offset, 1,
2500 "Update Result: %s (%u)",
2506 /* no length check possible */
2508 return(curr_offset - offset);
2512 * [9] 10.5.5.18 Update Type
2514 static const value_string gsm_a_gm_update_type_vals[] = {
2515 { 0x00, "RA updating" },
2516 { 0x01, "combined RA/LA updating" },
2517 { 0x02, "combined RA/LA updating with IMSI attach" },
2518 { 0x03, "Periodic updating" },
2523 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_)
2525 proto_item *tf = NULL;
2526 proto_tree *tf_tree = NULL;
2528 proto_tree_add_bits_item(tree, hf_gsm_a_gm_ciph_key_seq_num, tvb, offset << 3, 4, FALSE);
2530 tf = proto_tree_add_text(tree,
2534 tf_tree = proto_item_add_subtree(tf, ett_gmm_update_type );
2536 proto_tree_add_item(tf_tree, hf_gsm_a_gm_for, tvb, offset, 1, FALSE);
2537 proto_tree_add_item(tf_tree, hf_gsm_a_gm_update_type, tvb, offset, 1, FALSE);
2539 /* no length check possible */
2544 * [9] 10.5.5.19 A&C reference number (lower nibble)
2547 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_)
2549 /* IMPORTANT - IT'S ASSUMED THAT THE INFORMATION IS IN THE LOWER NIBBLE */
2550 proto_tree_add_bits_item(tree, hf_gsm_a_gm_ac_ref_nr, tvb, (offset << 3) + 4, 4, FALSE);
2552 /* no length check possible */
2557 * [9] 10.5.5.19 A&C reference number (higher nibble)
2560 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_)
2562 /* IMPORTANT - IT'S ASSUMED THAT THE INFORMATION IS IN THE HIGHER NIBBLE */
2563 proto_tree_add_bits_item(tree, hf_gsm_a_gm_ac_ref_nr, tvb, offset << 3, 4, FALSE);
2565 /* no length check possible */
2570 * [9] 10.5.5.20 Service type
2572 static const value_string gsm_a_gm_serv_type_vals[] = {
2573 { 0x00, "Signalling" },
2575 { 0x02, "Paging response" },
2576 { 0x03, "MBMS Multicast Service Reception" },
2577 { 0x04, "MBMS Broadcast Service Reception" },
2582 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_)
2586 bit_offset = offset << 3;
2587 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, 1, FALSE);
2589 proto_tree_add_bits_item(tree, hf_gsm_a_gm_serv_type, tvb, bit_offset, 3, FALSE);
2591 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, 1, FALSE);
2593 proto_tree_add_bits_item(tree, hf_gsm_a_gm_ciph_key_seq_num, tvb, bit_offset, 3, FALSE);
2595 /* no length check possible */
2600 * [9] 10.5.5.21 Cell Notification
2605 * [9] 10.5.5.22 PS LCS Capability
2607 static const true_false_string gsm_a_gm_apc_vals = {
2608 "Additional Positioning Capabilities which can be retrieved by RRLP are supported",
2609 "Additional Positioning Capabilities which can be retrieved by RRLP are not supported"
2612 static const true_false_string gsm_a_gm_otd_a_vals = {
2613 "MS assisted E-OTD supported",
2614 "MS assisted E-OTD not supported"
2617 static const true_false_string gsm_a_gm_otd_b_vals = {
2618 "MS based E-OTD supported",
2619 "MS based E-OTD not supported"
2622 static const true_false_string gsm_a_gm_gps_a_vals = {
2623 "MS assisted GPS supported",
2624 "MS assisted GPS not supported"
2627 static const true_false_string gsm_a_gm_gps_b_vals = {
2628 "MS based GPS supported",
2629 "MS based GPS not supported"
2632 static const true_false_string gsm_a_gm_gps_c_vals = {
2633 "Conventional GPS supported",
2634 "Conventional GPS not supported"
2638 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_)
2640 guint32 curr_offset;
2642 curr_offset = offset;
2643 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, curr_offset << 3, 2, FALSE);
2644 proto_tree_add_item(tree, hf_gsm_a_gm_apc, tvb, curr_offset, 1, FALSE);
2645 proto_tree_add_item(tree, hf_gsm_a_gm_otd_a, tvb, curr_offset, 1, FALSE);
2646 proto_tree_add_item(tree, hf_gsm_a_gm_otd_b, tvb, curr_offset, 1, FALSE);
2647 proto_tree_add_item(tree, hf_gsm_a_gm_gps_a, tvb, curr_offset, 1, FALSE);
2648 proto_tree_add_item(tree, hf_gsm_a_gm_gps_b, tvb, curr_offset, 1, FALSE);
2649 proto_tree_add_item(tree, hf_gsm_a_gm_gps_c, tvb, curr_offset, 1, FALSE);
2653 EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo);
2655 return(curr_offset - offset);
2662 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_)
2665 guint32 curr_offset;
2668 curr_offset = offset;
2670 oct = tvb_get_guint8(tvb, curr_offset);
2674 case 8: str="LCS-MOLR via PS domain not supported"; break;
2675 default: str="LCS-MOLR via PS domain supported";
2678 proto_tree_add_text(tree,
2679 tvb, curr_offset, 1,
2680 "Network Feature Support: %s (%u)",
2686 /* no length check possible */
2688 return(curr_offset - offset);
2691 /* [7] 10.5.5.24 Inter RAT information container */
2693 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_)
2695 guint32 curr_offset;
2696 tvbuff_t *rrc_irat_ho_info_tvb;
2698 curr_offset = offset;
2700 /* The value part of the Inter RAT information container information element is the INTER RAT HANDOVER INFO as
2701 defined in 3GPP TS 25.331 [23c]. If this field includes padding bits, they are defined in 3GPP TS 25.331 [23c].*/
2702 rrc_irat_ho_info_tvb = tvb_new_subset(tvb, curr_offset, len, len);
2703 if (rrc_irat_ho_info_handle)
2704 call_dissector(rrc_irat_ho_info_handle, rrc_irat_ho_info_tvb,pinfo , tree);
2706 proto_tree_add_text(tree, tvb, curr_offset, len,"INTER RAT HANDOVER INFO - Not decoded");
2716 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_)
2720 guint32 curr_offset;
2721 proto_item *tf = NULL;
2722 proto_tree *tf_tree = NULL;
2724 curr_offset = offset;
2726 oct = tvb_get_guint8(tvb, curr_offset);
2728 tf = proto_tree_add_text(tree,
2729 tvb, curr_offset, 1,
2730 "PDP Context Status");
2732 tf_tree = proto_item_add_subtree(tf, ett_gmm_context_stat );
2734 oct = tvb_get_guint8(tvb, curr_offset);
2736 for ( pdp_nr=0;pdp_nr<16; pdp_nr++ )
2741 oct = tvb_get_guint8(tvb, curr_offset);
2743 proto_tree_add_text(tf_tree,
2744 tvb, curr_offset, 1,
2745 "NSAPI %d: %s (%u)",pdp_nr,
2753 EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo);
2755 return(curr_offset - offset);
2762 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_)
2765 guint32 curr_offset;
2768 curr_offset = offset;
2770 oct = tvb_get_guint8(tvb, curr_offset);
2774 case 1: str="priority level 1 (highest)"; break;
2775 case 2: str="priority level 2"; break;
2776 case 3: str="priority level 3"; break;
2777 case 4: str="priority level 4 (lowest)"; break;
2778 default: str="priority level 4 (lowest)";
2781 proto_tree_add_text(tree,
2782 tvb, curr_offset, 1,
2783 "Radio Priority (PDP or SMS): %s (%u)",
2789 return(curr_offset - offset);
2793 * [9] 10.5.7.3 GPRS Timer
2795 static const value_string gsm_a_gm_gprs_timer_unit_vals[] = {
2796 { 0x00, "value is incremented in multiples of 2 seconds" },
2797 { 0x01, "value is incremented in multiples of 1 minute" },
2798 { 0x02, "value is incremented in multiples of decihours" },
2799 { 0x07, "value indicates that the timer is deactivated" },
2804 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_)
2809 proto_tree *subtree;
2812 oct = tvb_get_guint8(tvb, offset);
2817 case 0: str="sec"; val*=2; break;
2818 case 1: str="min"; break;
2819 case 2: str="min"; val*=6; break;
2821 proto_tree_add_text(tree,
2823 "GPRS Timer: timer is deactivated");
2828 item = proto_tree_add_text(tree,
2830 "GPRS Timer: %u %s",
2834 subtree = proto_item_add_subtree(item, ett_gmm_gprs_timer);
2835 proto_tree_add_item(subtree, hf_gsm_a_gm_gprs_timer_unit, tvb, offset, 1, FALSE);
2836 proto_tree_add_item(subtree, hf_gsm_a_gm_gprs_timer_value, tvb, offset, 1, FALSE);
2838 /* no length check possible */
2846 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_)
2850 guint32 curr_offset;
2853 curr_offset = offset;
2855 oct = tvb_get_guint8(tvb, curr_offset);
2861 case 0: str="sec"; val*=2; break;
2862 case 1: str="min"; break;
2863 case 2: str="min"; val*=6; break;
2865 proto_tree_add_text(tree,
2866 tvb, curr_offset, 1,
2867 "GPRS Timer: timer is deactivated");
2872 proto_tree_add_text(tree,
2873 tvb, curr_offset, 1,
2874 "GPRS Timer: %u %s %s (%u)",
2876 str, add_string ? add_string : "", oct);
2880 return(curr_offset - offset);
2887 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_)
2890 guint32 curr_offset;
2893 curr_offset = offset;
2895 oct = tvb_get_guint8(tvb, curr_offset);
2897 /* IMPORTANT - IT'S ASSUMED THAT THE INFORMATION IS IN THE HIGHER NIBBLE */
2902 case 1: str="priority level 1 (highest)"; break;
2903 case 2: str="priority level 2"; break;
2904 case 3: str="priority level 3"; break;
2905 case 4: str="priority level 4 (lowest)"; break;
2906 default: str="priority level 4 (lowest)";
2909 proto_tree_add_text(tree,
2910 tvb, curr_offset, 1,
2911 "Radio Priority (TOM8): %s (%u)",
2917 return(curr_offset - offset);
2921 * [8] 10.5.7.6 MBMS context status
2924 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_)
2926 guint32 curr_offset;
2929 proto_item *tf = NULL;
2930 proto_tree *tf_tree = NULL;
2932 curr_offset = offset;
2934 oct = tvb_get_guint8(tvb, curr_offset);
2936 tf = proto_tree_add_text(tree,
2937 tvb, curr_offset, 1,
2938 "MBMS Context Status");
2940 tf_tree = proto_item_add_subtree(tf, ett_gmm_context_stat );
2942 for (i=0; i<len; i++)
2944 oct = tvb_get_guint8(tvb, curr_offset);
2948 proto_tree_add_text(tf_tree,
2949 tvb, curr_offset, 1,
2950 "NSAPI %d: %s (%u)",128+i*8+j,
2963 #define MAX_APN_LENGTH 50
2966 de_sm_apn(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len _U_)
2968 guint32 curr_offset;
2970 guint8 str[MAX_APN_LENGTH+1];
2972 curr_offset = offset;
2974 /* init buffer and copy it */
2975 memset ( str , 0 , MAX_APN_LENGTH );
2976 tvb_memcpy(tvb, str, offset, len<MAX_APN_LENGTH?len:MAX_APN_LENGTH);
2979 while (( curr_len < len ) && ( curr_len < MAX_APN_LENGTH ))
2981 guint step = str[curr_len];
2986 proto_tree_add_text(tree,
2987 tvb, curr_offset, len,
2988 "APN: %s %s", str+1 , add_string ? add_string : "");
2992 EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo);
2994 return(curr_offset - offset);
3001 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_)
3004 guint32 curr_offset;
3006 curr_offset = offset;
3008 oct = tvb_get_guint8(tvb, curr_offset);
3010 proto_tree_add_text(tree,
3011 tvb, curr_offset, 1,
3012 "NSAPI: 0x%02x (%u) %s",
3013 oct&0x0f, oct&0x0f,add_string ? add_string : "");
3017 return(curr_offset - offset);
3021 * [7] 10.5.6.3 Protocol configuration options
3023 static const value_string gsm_a_sm_pco_ms2net_prot_vals[] = {
3024 { 0x01, "P-CSCF IPv6 Address Request" },
3025 { 0x02, "IM CN Subsystem Signaling Flag" },
3026 { 0x03, "DNS Server IPv6 Address Request" },
3027 { 0x04, "Not Supported" },
3028 { 0x05, "MS Support of Network Requested Bearer Control indicator" },
3029 { 0x06, "Reserved" },
3030 { 0x07, "DSMIPv6 Home Agent Address Request" },
3031 { 0x08, "DSMIPv6 Home Network Prefix Request" },
3032 { 0x09, "DSMIPv6 IPv4 Home Agent Address Request" },
3033 { 0x0a, "IP address allocation via NAS signalling" },
3034 { 0x0b, "IPv4 address allocation via DHCPv4" },
3035 { 0x0c, "P-CSCF IPv4 Address Request" },
3036 { 0x0d, "DNS Server IPv4 Address Request" },
3037 { 0x0e, "MSISDN Request" },
3040 static const value_string gsm_a_sm_pco_net2ms_prot_vals[] = {
3041 { 0x01, "P-CSCF IPv6 Address" },
3042 { 0x02, "IM CN Subsystem Signaling Flag" },
3043 { 0x03, "DNS Server IPv6 Address" },
3044 { 0x04, "Policy Control rejection code" },
3045 { 0x05, "Selected Bearer Control Mode" },
3046 { 0x06, "Reserved" },
3047 { 0x07, "DSMIPv6 Home Agent Address" },
3048 { 0x08, "DSMIPv6 Home Network Prefix" },
3049 { 0x09, "DSMIPv6 IPv4 Home Agent Address" },
3050 { 0x0a, "Reserved" },
3051 { 0x0b, "Reserved" },
3052 { 0x0c, "P-CSCF IPv4 Address" },
3053 { 0x0d, "DNS Server IPv4 Address" },
3058 static const value_string gsm_a_gm_link_dir_vals[] = {
3060 { 0x0, "MS to network" },
3061 { 0x1, "Network to MS" },
3066 de_sm_pco(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
3068 proto_item *generated_item = NULL;
3069 guint32 curr_offset;
3072 struct e_in6_addr ipv6_addr;
3076 curr_offset = offset;
3078 oct = tvb_get_guint8(tvb, curr_offset);
3080 link_dir = pinfo->link_dir;
3081 generated_item =proto_tree_add_int(tree, hf_gsm_a_gm_link_dir, tvb, curr_offset, 0, link_dir);
3082 PROTO_ITEM_SET_GENERATED(generated_item);
3085 /* 1 ext 0 0 0 0 Spare Configuration protocol */
3086 proto_tree_add_item(tree, hf_gsm_a_gm_sm_ext, tvb, curr_offset, 1, FALSE);
3087 /* Configuration protocol (octet 3)
3090 * 0 0 0 PPP for use with IP PDP type or IP PDN type (see 3GPP TS 24.301 [120])
3092 * All other values are interpreted as PPP in this version of the protocol.
3093 * (3GPP TS 24.008 version 9.4.0 Release 9)
3095 proto_tree_add_text(tree,tvb, curr_offset, 1, "Configuration Protocol: PPP (%u)",oct&0x07);
3099 while ( curr_len > 0 )
3104 dissector_handle_t handle = NULL;
3106 /* Protocol ID 1 octet 4
3108 * Length of protocol ID 1 contents octet 6
3109 * Protocol ID 1 contents octet 7
3112 prot = tvb_get_ntohs(tvb,curr_offset);
3113 proto_tree_add_uint_format(tree, hf_gsm_a_gm_pco_pid, tvb, curr_offset, 2, (guint32)prot,
3114 "Protocol or Container ID: %s (%u)",
3116 val_to_str_const((guint32)prot, gsm_a_sm_pco_net2ms_prot_vals, val_to_str_ext_const(prot, &ppp_vals_ext, "Unknown")) :
3117 val_to_str_const((guint32)prot, gsm_a_sm_pco_ms2net_prot_vals, val_to_str_ext_const(prot, &ppp_vals_ext, "Unknown")),
3122 e_len = tvb_get_guint8(tvb, curr_offset);
3123 proto_tree_add_text(tree,tvb, curr_offset, 1, "Length: 0x%02x (%u)", e_len , e_len);
3132 tvb_get_ipv6(tvb, curr_offset, &ipv6_addr);
3133 proto_tree_add_text(tree,
3134 tvb, curr_offset, 16,
3135 "IPv6: %s", ip6_to_str(&ipv6_addr));
3144 tvb_get_ipv6(tvb, curr_offset, &ipv6_addr);
3145 proto_tree_add_text(tree,
3146 tvb, curr_offset, 16,
3147 "IPv6: %s", ip6_to_str(&ipv6_addr));
3152 oct = tvb_get_guint8(tvb, curr_offset);
3153 proto_tree_add_text(tree,tvb, curr_offset, 1, "Reject Code: 0x%02x (%u)", e_len , e_len);
3157 handle = dissector_get_uint_handle ( gprs_sm_pco_subdissector_table , prot );
3158 if ( handle != NULL )
3161 * dissect the embedded message
3163 l3_tvb = tvb_new_subset(tvb, curr_offset, e_len, e_len);
3164 call_dissector(handle, l3_tvb , pinfo , tree );
3169 * dissect the embedded DATA message
3171 l3_tvb = tvb_new_subset(tvb, curr_offset, e_len, e_len);
3172 call_dissector(data_handle, l3_tvb, pinfo , tree);
3178 curr_offset+= e_len;
3180 curr_offset+= curr_len;
3182 EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo);
3184 return(curr_offset - offset);
3188 * [9] 10.5.6.4 Packet data protocol address
3190 static const value_string gsm_a_sm_pdp_type_org_vals[] = {
3191 { 0x00, "ETSI allocated address" },
3192 { 0x01, "IETF allocated address" },
3193 { 0x0f, "Empty PDP type" },
3198 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_)
3200 guint32 curr_offset;
3203 guchar pdp_type_org, pdp_type_num;
3206 curr_offset = offset;
3208 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset << 3), 4, FALSE);
3209 proto_tree_add_item(tree, hf_gsm_a_sm_pdp_type_org, tvb, curr_offset, 1, FALSE);
3211 pdp_type_org = tvb_get_guint8(tvb, curr_offset) & 0x0f;
3213 pdp_type_num = tvb_get_guint8(tvb, curr_offset);
3215 if (pdp_type_org == 0 )
3217 /* ETSI allocated address */
3218 switch (pdp_type_num)
3220 case 0x00: str="Reserved, used in earlier version of this protocol"; break;
3221 case 0x01: str="PDP-type PPP"; break;
3222 default: str="reserved";
3225 else if (pdp_type_org == 1)
3227 /* IETF allocated addres */
3228 switch (pdp_type_num)
3230 case 0x21: str="IPv4 address"; break;
3231 case 0x57: str="IPv6 address"; break;
3232 case 0x8d: str="IPv4v6 address"; break;
3233 default: str="Unknown, interpreted as IPv4 address";
3236 else if ((pdp_type_num == 0) && (pdp_type_org == 0x0f))
3239 str="Not specified";
3241 proto_tree_add_text(tree,
3242 tvb, curr_offset, 1,
3243 "PDP type number: %s (%u)",str,pdp_type_num);
3245 if (( len == 2 ) && (( pdp_type_num == 0x21 ) || ( pdp_type_num == 0x57 ) || (pdp_type_num == 0x8d)))
3247 proto_tree_add_text(tree,
3248 tvb, curr_offset, 1,
3249 "Dynamic addressing");
3251 return(curr_offset - offset);
3253 else if ( len == 2 )
3255 proto_tree_add_text(tree,
3256 tvb, curr_offset, 1,
3257 "No PDP address is included");
3259 return(curr_offset - offset);
3263 if (pdp_type_org == 1)
3264 switch (pdp_type_num)
3267 proto_tree_add_item(tree,hf_gsm_a_sm_ip6_address,tvb,curr_offset,16,FALSE);
3272 proto_tree_add_item(tree,hf_gsm_a_sm_ip4_address,tvb,curr_offset,4,FALSE);
3274 proto_tree_add_item(tree,hf_gsm_a_sm_ip6_address,tvb,curr_offset,16,FALSE);
3279 proto_tree_add_item(tree,hf_gsm_a_sm_ip4_address,tvb,curr_offset,4,FALSE);
3283 EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo);
3285 return(curr_offset - offset);
3289 * [9] 10.5.6.5 Quality of service
3291 static const value_string gsm_a_qos_delay_cls_vals[] = {
3292 { 0x00, "Subscribed delay class (in MS to network direction)" },
3293 { 0x01, "Delay class 1" },
3294 { 0x02, "Delay class 2" },
3295 { 0x03, "Delay class 3" },
3296 { 0x04, "Delay class 4 (best effort)" },
3297 { 0x07, "Reserved" },
3301 static const value_string gsm_a_qos_reliability_vals[] = {
3302 { 0x00, "Subscribed reliability class (in MS to network direction)" },
3303 { 0x01, "Acknowledged GTP, LLC, and RLC; Protected data" },
3304 { 0x02, "Unacknowledged GTP, Ack LLC/RLC, Protected data" },
3305 { 0x03, "Unacknowledged GTP/LLC, Ack RLC, Protected data" },
3306 { 0x04, "Unacknowledged GTP/LLC/RLC, Protected data" },
3307 { 0x05, "Unacknowledged GTP/LLC/RLC, Unprotected data" },
3308 { 0x07, "Reserved" },
3311 /* Delivery of erroneous SDUs, octet 6 (see 3GPP TS 23.107) Bits 3 2 1 */
3312 const value_string gsm_a_qos_del_of_err_sdu_vals[] = {
3313 { 0, "Subscribed delivery of erroneous SDUs/Reserved" },
3314 { 1, "No detect('-')" },
3315 { 2, "Erroneous SDUs are delivered('yes')" },
3316 { 3, "Erroneous SDUs are not delivered('No')" },
3321 /* Delivery order, octet 6 (see 3GPP TS 23.107) Bits 5 4 3 */
3322 const value_string gsm_a_qos_del_order_vals[] = {
3323 { 0, "Subscribed delivery order/Reserved" },
3324 { 1, "With delivery order ('yes')" },
3325 { 2, "Without delivery order ('no')" },
3329 /* Traffic class, octet 6 (see 3GPP TS 23.107) Bits 8 7 6 */
3330 const value_string gsm_a_qos_traffic_cls_vals[] = {
3331 { 0, "Subscribed traffic class/Reserved" },
3332 { 1, "Conversational class" },
3333 { 2, "Streaming class" },
3334 { 3, "Interactive class" },
3335 { 4, "Background class" },
3340 /* Residual Bit Error Rate (BER), octet 10 (see 3GPP TS 23.107) Bits 8 7 6 5 */
3341 const value_string gsm_a_qos_ber_vals[] = {
3342 { 0, "Subscribed residual BER/Reserved" },
3356 /* SDU error ratio, octet 10 (see 3GPP TS 23.107) Bits 4 3 2 1 */
3357 const value_string gsm_a_qos_sdu_err_rat_vals[] = {
3358 { 0, "Subscribed SDU error ratio/Reserved" },
3370 /* Traffic handling priority, octet 11 (see 3GPP TS 23.107) Bits 2 1 */
3371 const value_string gsm_a_qos_traff_hdl_pri_vals[] = {
3372 { 0, "Subscribed traffic handling priority/Reserved" },
3373 { 1, "Priority level 1" },
3374 { 2, "Priority level 2" },
3375 { 3, "Priority level 3" },
3379 const range_string gsm_a_qos_peak_thr_vals[] = {
3380 { 0x00, 0x00, "Subscribed peak throughput/reserved" },
3381 { 0x01, 0x01, "Up to 1 000 octet/s" },
3382 { 0x02, 0x02, "Up to 2 000 octet/s" },
3383 { 0x03, 0x03, "Up to 4 000 octet/s" },
3384 { 0x04, 0x04, "Up to 8 000 octet/s" },
3385 { 0x05, 0x05, "Up to 16 000 octet/s" },
3386 { 0x06, 0x06, "Up to 32 000 octet/s" },
3387 { 0x07, 0x07, "Up to 64 000 octet/s" },
3388 { 0x08, 0x08, "Up to 128 000 octet/s" },
3389 { 0x09, 0x09, "Up to 256 000 octet/s" },
3390 { 0x0a, 0x0e, "Interpreted as Up to 1 000 octet/s" },
3391 { 0x0f, 0x0f, "Reserved" },
3395 const range_string gsm_a_qos_mean_thr_vals[] = {
3396 { 0x00, 0x00, "Subscribed peak throughput/reserved" },
3397 { 0x01, 0x01, "100 octet/h" },
3398 { 0x02, 0x02, "200 octet/h" },
3399 { 0x03, 0x03, "500 octet/h" },
3400 { 0x04, 0x04, "1 000 octet/h" },
3401 { 0x05, 0x05, "2 000 octet/h" },
3402 { 0x06, 0x06, "5 000 octet/h" },
3403 { 0x07, 0x07, "10 000 octet/h" },
3404 { 0x08, 0x08, "20 000 octet/h" },
3405 { 0x09, 0x09, "50 000 octet/h" },
3406 { 0x0a, 0x0a, "100 000 octet/h" },
3407 { 0x0b, 0x0b, "200 000 octet/h" },
3408 { 0x0c, 0x0c, "500 000 octet/h" },
3409 { 0x0d, 0x0d, "1 000 000 octet/h" },
3410 { 0x0e, 0x0e, "2 000 000 octet/h" },
3411 { 0x0f, 0x0f, "5 000 000 octet/h" },
3412 { 0x10, 0x10, "10 000 000 octet/h" },
3413 { 0x11, 0x11, "20 000 000 octet/h" },
3414 { 0x12, 0x12, "50 000 000 octet/h" },
3415 { 0x13, 0x1d, "Interpreted as Best effort" },
3416 { 0x1e, 0x1e, "Reserved" },
3417 { 0x1f, 0x1f, "Best effort" },
3421 const range_string gsm_a_qos_prec_class_vals[] = {
3422 { 0x00, 0x00, "Subscribed precedence/reserved" },
3423 { 0x01, 0x01, "High priority" },
3424 { 0x02, 0x02, "Normal priority" },
3425 { 0x03, 0x03, "Low priority" },
3426 { 0x04, 0x06, "Interpreted as Normal priority" },
3427 { 0x07, 0x07, "Reserved" },
3431 const true_false_string gsm_a_qos_signalling_ind_value = {
3432 "Optimised for signalling traffic",
3433 "Not optimised for signalling traffic"
3436 /* Helper function returning the main bitrates in kbps */
3438 qos_calc_bitrate(guint8 oct)
3443 return 64 + (oct-0x40) * 8;
3445 return 576 + (oct-0x80) * 64;
3448 /* Helper function returning the extended bitrates in kbps */
3450 qos_calc_ext_bitrate(guint8 oct)
3453 return 8600 + oct * 100;
3455 return 16000 + (oct-0x4a) * 1000;
3457 return 128000 + (oct - 0xba) * 2000;
3461 de_sm_qos(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
3463 guint32 curr_offset;
3464 guchar oct, tmp_oct;
3468 curr_offset = offset;
3471 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset << 3), 2, FALSE);
3472 proto_tree_add_item(tree, hf_gsm_a_qos_delay_cls, tvb, curr_offset, 1, FALSE);
3473 proto_tree_add_item(tree, hf_gsm_a_qos_reliability_cls, tvb, curr_offset, 1, FALSE);
3477 oct = tvb_get_guint8(tvb, curr_offset);
3478 proto_tree_add_item(tree, hf_gsm_a_qos_peak_thr, tvb, curr_offset, 1, FALSE);
3479 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset << 3) + 4, 1, FALSE);
3480 proto_tree_add_item(tree, hf_gsm_a_qos_prec_class, tvb, curr_offset, 1, FALSE);
3484 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset << 3), 3, FALSE);
3485 proto_tree_add_item(tree, hf_gsm_a_qos_mean_thr, tvb, curr_offset, 1, FALSE);
3488 NO_MORE_DATA_CHECK(len);
3491 proto_tree_add_item(tree, hf_gsm_a_qos_traffic_cls, tvb, curr_offset, 1, FALSE);
3492 proto_tree_add_item(tree, hf_gsm_a_qos_del_order, tvb, curr_offset, 1, FALSE);
3493 proto_tree_add_item(tree, hf_gsm_a_qos_del_of_err_sdu, tvb, curr_offset, 1, FALSE);
3496 NO_MORE_DATA_CHECK(len);
3499 oct = tvb_get_guint8(tvb, curr_offset);
3503 case 0x00: str="Subscribed maximum SDU size/reserved"; break;
3504 case 0x97: str="1502 octets"; break;
3505 case 0x98: str="1510 octets"; break;
3506 case 0x99: str="1520 octets"; break;
3507 case 0xff: str="Reserved"; break;
3508 default: str="Unspecified";
3511 if (( oct >= 1 ) && ( oct <= 0x96 ))
3512 proto_tree_add_text(tree,
3513 tvb, curr_offset, 1,
3514 "Maximum SDU size: %u octets (%u)",oct*10, oct);
3516 proto_tree_add_text(tree,
3517 tvb, curr_offset, 1,
3518 "Maximum SDU size: %s (%u)",str, oct);
3522 NO_MORE_DATA_CHECK(len);
3525 oct = tvb_get_guint8(tvb, curr_offset);
3529 case 0x00: str = "Subscribed maximum bit rate for uplink/reserved"; break;
3530 case 0xff: str = "0 kbps"; break;
3531 default: str = ep_strdup_printf("%u kbps", qos_calc_bitrate(oct));
3534 proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_max_bitrate_upl, tvb,
3535 curr_offset, 1, oct, "%s (%u)", str, oct);
3538 NO_MORE_DATA_CHECK(len);
3541 oct = tvb_get_guint8(tvb, curr_offset);
3545 case 0x00: str="Subscribed maximum bit rate for downlink/reserved"; break;
3546 case 0xff: str="0 kbps"; break;
3547 default: str = ep_strdup_printf("%u kbps", qos_calc_bitrate(oct));
3550 proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_max_bitrate_downl, tvb,
3551 curr_offset, 1, oct, "%s (%u)", str, oct);
3554 NO_MORE_DATA_CHECK(len);
3557 proto_tree_add_item(tree, hf_gsm_a_qos_ber, tvb, curr_offset, 1, FALSE);
3558 proto_tree_add_item(tree, hf_gsm_a_qos_sdu_err_rat, tvb, curr_offset, 1, FALSE);
3561 NO_MORE_DATA_CHECK(len);
3564 oct = tvb_get_guint8(tvb, curr_offset);
3569 case 0x00: str="Subscribed transfer delay/reserved"; break;
3570 case 0x3f: str="Reserved"; break;
3572 if (tmp_oct <= 0x0f)
3573 temp32 = tmp_oct * 10;
3574 else if (tmp_oct <= 0x1f)
3575 temp32 = (tmp_oct - 0x10) * 50 + 200;
3577 temp32 = (tmp_oct - 0x20) * 100 + 1000;
3578 str = ep_strdup_printf("%u ms", temp32);
3581 proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_trans_delay, tvb,
3582 curr_offset, 1, oct, "%s (%u)", str, tmp_oct);
3584 tmp_oct = oct & 0x03;
3586 str = "Subscribed traffic handling priority/reserved";
3588 str = ep_strdup_printf("Priority level %u", tmp_oct);
3590 proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_traf_handl_prio, tvb,
3591 curr_offset, 1, oct, "%s (%u)", str, tmp_oct);
3594 NO_MORE_DATA_CHECK(len);
3597 oct = tvb_get_guint8(tvb, curr_offset);
3601 case 0x00: str="Subscribed guaranteed bit rate for uplink/reserved"; break;
3602 case 0xff: str="0 kbps"; break;
3603 default: str = ep_strdup_printf("%u kbps", qos_calc_bitrate(oct));
3606 proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_guar_bitrate_upl, tvb,
3607 curr_offset, 1, oct, "%s (%u)", str, oct);
3610 NO_MORE_DATA_CHECK(len);
3613 oct = tvb_get_guint8(tvb, curr_offset);
3617 case 0x00: str="Subscribed guaranteed bit rate for downlink/reserved"; break;
3618 case 0xff: str="0 kbps"; break;
3619 default: str = ep_strdup_printf("%u kbps", qos_calc_bitrate(oct));
3622 proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_guar_bitrate_downl, tvb,
3623 curr_offset, 1, oct, "%s (%u)", str, oct);
3626 NO_MORE_DATA_CHECK(len);
3629 oct = tvb_get_guint8(tvb, curr_offset);
3630 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset << 3), 3, FALSE);
3631 proto_tree_add_item(tree, hf_gsm_a_qos_signalling_ind, tvb , curr_offset, 1, FALSE);
3634 if (tmp_oct == 0x01)
3639 proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_source_stat_desc, tvb,
3640 curr_offset, 1, oct, "%s (%u)", str, tmp_oct);
3643 NO_MORE_DATA_CHECK(len);
3646 oct = tvb_get_guint8(tvb, curr_offset);
3649 str = "Use the value indicated by the Maximum bit rate for downlink";
3652 temp32 = qos_calc_ext_bitrate(oct);
3653 if (temp32 % 1000 == 0)
3654 str = ep_strdup_printf("%u Mbps", temp32 / 1000);
3656 str = ep_strdup_printf("%u kbps", temp32);
3658 proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_max_bitrate_downl_ext, tvb,
3659 curr_offset, 1, oct, "%s (%u)", str, oct);
3662 NO_MORE_DATA_CHECK(len);
3665 oct = tvb_get_guint8(tvb, curr_offset);
3668 str = "Use the value indicated by the Guaranteed bit rate for downlink";
3671 temp32 = qos_calc_ext_bitrate(oct);
3672 if (temp32 % 1000 == 0)
3673 str = ep_strdup_printf("%u Mbps", temp32 / 1000);
3675 str = ep_strdup_printf("%u kbps", temp32);
3677 proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_guar_bitrate_downl_ext, tvb,
3678 curr_offset, 1, oct, "%s (%u)", str, oct);
3681 NO_MORE_DATA_CHECK(len);
3683 /* Maximum bit rate for uplink (extended) Octet 17 */
3684 oct = tvb_get_guint8(tvb, curr_offset);
3687 str = "Use the value indicated by the Maximum bit rate for uplink";
3690 temp32 = qos_calc_ext_bitrate(oct);
3691 if (temp32 % 1000 == 0)
3692 str = ep_strdup_printf("%u Mbps", temp32 / 1000);
3694 str = ep_strdup_printf("%u kbps", temp32);
3696 proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_max_bitrate_upl_ext, tvb,
3697 curr_offset, 1, oct, "%s (%u)", str, oct);
3700 NO_MORE_DATA_CHECK(len);
3702 /* Guaranteed bit rate for uplink (extended) Octet 18 */
3703 oct = tvb_get_guint8(tvb, curr_offset);
3706 str = "Use the value indicated by the Guaranteed bit rate for uplink";
3709 temp32 = qos_calc_ext_bitrate(oct);
3710 if (temp32 % 1000 == 0)
3711 str = ep_strdup_printf("%u Mbps", temp32 / 1000);
3713 str = ep_strdup_printf("%u kbps", temp32);
3715 proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_guar_bitrate_upl_ext, tvb,
3716 curr_offset, 1, oct, "%s (%u)", str, oct);
3720 EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo);
3722 return(curr_offset - offset);
3726 * [9] 10.5.6.6 SM cause
3728 static const value_string gsm_a_sm_cause_vals[] = {
3729 { 0x08, "Operator Determined Barring" },
3730 { 0x18, "MBMS bearer capabilities insufficient for the service" },
3731 { 0x19, "LLC or SNDCP failure(GSM only)" },
3732 { 0x1a, "Insufficient resources" },
3733 { 0x1b, "Missing or unknown APN" },
3734 { 0x1c, "Unknown PDP address or PDP type" },
3735 { 0x1d, "User Authentication failed" },
3736 { 0x1e, "Activation rejected by GGSN" },
3737 { 0x1f, "Activation rejected, unspecified" },
3738 { 0x20, "Service option not supported" },
3739 { 0x21, "Requested service option not subscribed" },
3740 { 0x22, "Service option temporarily out of order" },
3741 { 0x23, "NSAPI already used (not sent)" },
3742 { 0x24, "Regular deactivation" },
3743 { 0x25, "QoS not accepted" },
3744 { 0x26, "Network failure" },
3745 { 0x27, "Reactivation required" },
3746 { 0x28, "Feature not supported" },
3747 { 0x29, "Semantic error in the TFT operation" },
3748 { 0x2a, "Syntactical error in the TFT operation" },
3749 { 0x2b, "Unknown PDP context" },
3750 { 0x2c, "Semantic errors in packet filter(s)" },
3751 { 0x2d, "Syntactical errors in packet filter(s)" },
3752 { 0x2e, "PDP context without TFT already activated" },
3753 { 0x2f, "Multicast group membership time-out" },
3754 { 0x2c, "Semantic errors in packet filter(s)" },
3755 { 0x2d, "Syntactical errors in packet filter(s)" },
3756 { 0x30, "Activation rejected, BCM violation" },
3757 { 0x32, "PDP type IPv4 only allowed" },
3758 { 0x33, "PDP type IPv6 only allowed" },
3759 { 0x34, "Single address bearers only allowed" },
3760 { 0x51, "Invalid transaction identifier value" },
3761 { 0x5f, "Semantically incorrect message" },
3762 { 0x60, "Invalid mandatory information" },
3763 { 0x61, "Message type non-existent or not implemented" },
3764 { 0x62, "Message type not compatible with the protocol state" },
3765 { 0x63, "Information element non-existent or not implemented" },
3766 { 0x64, "Conditional IE error" },
3767 { 0x65, "Message not compatible with the protocol state" },
3768 { 0x6f, "Protocol error, unspecified" },
3769 { 0x70, "APN restriction value incompatible with active PDP context" },
3774 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_)
3779 oct = tvb_get_guint8(tvb, offset);
3780 str = match_strval(oct, gsm_a_sm_cause_vals);
3782 /* SM Cause can be sent in both directions */
3784 str = "Protocol error, unspecified / Service option temporarily out of order";
3786 proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_cause, tvb,
3787 offset, 1, oct, "%s (%u)", str, oct);
3789 /* no length check possible */
3794 * [9] 10.5.6.6a SM cause 2
3797 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_)
3802 oct = tvb_get_guint8(tvb, offset);
3803 str = match_strval(oct, gsm_a_sm_cause_vals);
3805 /* SM Cause 2 is sent only in the Network-to-MS direction */
3807 str = "Service option temporarily out of order";
3809 proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_cause_2, tvb,
3810 offset, 1, oct, "%s (%u)", str, oct);
3812 /* no length check possible */
3819 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_)
3821 guint32 curr_offset;
3825 static const gchar *ti_flag[2]={
3826 "The message is sent from the side that originates the TI" ,
3827 "The message is sent to the side that originates the TI" };
3830 curr_offset = offset;
3832 oct = tvb_get_guint8(tvb, curr_offset);
3834 proto_tree_add_text(tree,
3835 tvb, curr_offset, 1,
3836 "TI flag: %s (%u)",ti_flag[oct>>7],oct>>7);
3840 oct = tvb_get_guint8(tvb, curr_offset);
3842 proto_tree_add_text(tree,
3843 tvb, curr_offset, 1,
3844 "TI value: 0x%02x (%u)",oct&0x7f,oct&0x7f);
3846 proto_tree_add_text(tree,
3847 tvb, curr_offset, 1,
3848 "ext: 0x%02x (%u)",oct>>7,oct>>7);
3853 proto_tree_add_text(tree,
3854 tvb, curr_offset, 1,
3855 "TI value: 0x%02x (%u)",(oct>>4)&7,(oct>>4)&7);
3858 curr_offset+= curr_len;
3860 EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo);
3862 return(curr_offset - offset);
3866 * [9] 10.5.6.9 LLC service access point identifier
3868 static const value_string gsm_a_sm_llc_sapi_vals[] = {
3869 { 0, "LLC SAPI not assigned" },
3878 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_)
3880 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, offset << 3, 4, FALSE);
3881 proto_tree_add_item(tree, hf_gsm_a_sm_llc_sapi, tvb, offset, 1, FALSE);
3883 /* no length check possible */
3888 * [9] 10.5.6.10 Tear down indicator
3890 const true_false_string gsm_a_sm_tdi_value = {
3891 "Tear down requested",
3892 "Tear down not requested"
3896 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_)
3898 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (offset << 3) + 4, 3, FALSE);
3899 proto_tree_add_item(tree, hf_gsm_a_sm_tdi, tvb, offset, 1, FALSE);
3901 /* no length check possible */
3906 * [9] 10.5.6.11 Packet Flow Identifier
3908 static const range_string gsm_a_sm_packet_flow_id_vals[] = {
3909 { 0x00, 0x00, "Best Effort"},
3910 { 0x01, 0x01, "Signaling"},
3911 { 0x02, 0x02, "SMS"},
3912 { 0x03, 0x03, "TOM8"},
3913 { 0x04, 0x07, "Reserved"},
3914 { 0x08, 0x7f, "Dynamically assigned"},
3915 { 0x00, 0x00, NULL }
3919 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_)
3921 guint32 curr_offset;
3924 curr_offset = offset;
3925 value = tvb_get_guint8(tvb,curr_offset);
3926 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, curr_offset << 3, 1, FALSE);
3927 proto_tree_add_item(tree, hf_gsm_a_sm_packet_flow_id, tvb, curr_offset, 1, FALSE);
3931 g_snprintf(add_string, string_len, " - %s", rval_to_str(value, gsm_a_sm_packet_flow_id_vals, "Unknown"));
3933 EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo);
3935 return(curr_offset - offset);
3939 * [7] 10.5.6.12 TFT - Traffic Flow Template
3941 /* TFT operation code (octet 3) */
3942 static const value_string gsm_a_tft_op_code_vals[] = {
3944 { 1, "Create new TFT"},
3945 { 2, "Delete existing TFT"},
3946 { 3, "Add packet filters to existing TFT"},
3947 { 4, "Replace packet filters in existing TFT"},
3948 { 5, "Delete packet filters from existing TFT"},
3949 { 6, "No TFT operation"},
3954 static const true_false_string gsm_a_tft_e_bit = {
3955 "Parameters list is included",
3956 "Parameters list is not included"
3959 static const value_string gsm_a_tft_pkt_flt_dir_vals[] = {
3960 { 0, "Pre Rel-7 TFT filter"},
3961 { 1, "Downlink only"},
3962 { 2, "Uplink only"},
3963 { 3, "Bidirectional"},
3967 static const value_string gsm_a_tft_param_id_vals[] = {
3968 { 1, "Authorization Token"},
3969 { 2, "Flow Identifier"},
3970 { 3, "Packet Filter Identifier"},
3975 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_)
3977 guint32 curr_offset;
3979 proto_item *tf = NULL;
3980 proto_tree *tf_tree = NULL;
3981 proto_tree *comp_tree = NULL;
3983 guchar pkt_fil_count;
3990 gint pack_component_type;
3994 curr_offset = offset;
3997 * parse first octet. It contain TFT operation code, E bit and Number of packet filters
3999 oct = tvb_get_guint8(tvb, curr_offset);
4002 pkt_fil_count = oct&0x0f;
4005 proto_tree_add_item(tree,hf_gsm_a_tft_op_code,tvb,curr_offset,1,FALSE);
4006 proto_tree_add_item(tree,hf_gsm_a_tft_e_bit,tvb,curr_offset,1,FALSE);
4007 proto_tree_add_item(tree,hf_gsm_a_tft_pkt_flt,tvb,curr_offset,1,FALSE);
4012 /* Packet filter list dissect */
4015 if ( op_code == 2 ) /* delete TFT contains no packet filters. so we will jump over it */
4016 count = pkt_fil_count;
4017 while ( count < pkt_fil_count )
4019 tf = proto_tree_add_text(tree,
4020 tvb, curr_offset, 1,
4021 "Packet filter %d",count); /* 0-> 7 */
4023 tf_tree = proto_item_add_subtree(tf, ett_sm_tft );
4025 if ( op_code == 5 ) /* Delete packet filters from existing TFT - just a list of identifiers */
4027 if ((curr_offset-offset)<1) {
4028 proto_tree_add_text(tf_tree,tvb, curr_offset, 1,"Not enough data");
4031 proto_tree_add_bits_item(tf_tree, hf_gsm_a_spare_bits, tvb, (curr_offset<<3), 4, FALSE);
4032 proto_tree_add_item(tf_tree, hf_gsm_a_tft_pkt_flt_id, tvb, curr_offset, 1, FALSE);
4037 else /* create new, Add packet filters or Replace packet filters */
4040 if ((curr_offset-offset)<1) {
4041 proto_tree_add_text(tf_tree,tvb, curr_offset, 1,"Not enough data");
4044 proto_tree_add_bits_item(tf_tree, hf_gsm_a_spare_bits, tvb, (curr_offset<<3), 2, FALSE);
4045 proto_tree_add_item(tf_tree, hf_gsm_a_tft_pkt_flt_dir, tvb, curr_offset, 1, FALSE);
4046 proto_tree_add_item(tf_tree, hf_gsm_a_tft_pkt_flt_id, tvb, curr_offset, 1, FALSE);
4050 if ((curr_offset-offset)<1) {
4051 proto_tree_add_text(tf_tree,tvb, curr_offset, 1,"Not enough data");
4054 oct = tvb_get_guint8(tvb, curr_offset);
4058 proto_tree_add_text(tf_tree,
4059 tvb, curr_offset-1, 1,
4060 "Packet evaluation precedence: 0x%02x (%u)",oct,oct );
4062 if ((curr_offset-offset)<1) { proto_tree_add_text(tf_tree,tvb, curr_offset, 1,"Not enough data"); return(len);}
4063 pf_length = tvb_get_guint8(tvb, curr_offset);
4067 proto_tree_add_text(tf_tree,
4068 tvb, curr_offset-1, 1,
4069 "Packet filter length: 0x%02x (%u)",pf_length,pf_length );
4070 /* New tree for component */
4072 /* Dissect Packet filter Component */
4073 /* while ( filter_len > 1 ) */
4074 /* packet filter component type identifier: */
4076 while (pf_length > 0 ){
4077 if ((curr_offset-offset)<1) {
4078 proto_tree_add_text(tf_tree,tvb, curr_offset, 1,"Not enough data");
4081 pack_component_type = tvb_get_guint8(tvb, curr_offset);
4086 tf=proto_tree_add_text(tf_tree,tvb, curr_offset-1, 1,"Packet filter component type identifier: ");
4087 comp_tree = proto_item_add_subtree(tf, ett_sm_tft );
4089 switch ( pack_component_type ){
4092 str="IPv4 remote address type";
4093 proto_tree_add_item(comp_tree,hf_gsm_a_sm_ip4_address,tvb,curr_offset,4,FALSE);
4096 proto_tree_add_item(comp_tree,hf_gsm_a_sm_ip4_mask,tvb,curr_offset,4,FALSE);
4103 str="IPv6 remote address type";
4104 proto_tree_add_item(comp_tree,hf_gsm_a_sm_ip6_address,tvb,curr_offset,16,FALSE);
4107 proto_tree_add_item(comp_tree,hf_gsm_a_sm_ip6_mask,tvb,curr_offset,16,FALSE);
4114 str="Protocol identifier/Next header type";
4115 proto_tree_add_item(comp_tree,hf_gsm_a_tft_protocol_header,tvb,curr_offset,1,FALSE);
4122 str="Single local port type";
4123 proto_tree_add_item(comp_tree,hf_gsm_a_tft_port,tvb,curr_offset,2,FALSE);
4130 str="Local port range type";
4131 proto_tree_add_item(comp_tree,hf_gsm_a_tft_port_low,tvb,curr_offset,2,FALSE);
4133 proto_tree_add_item(comp_tree,hf_gsm_a_tft_port_high,tvb,curr_offset,2,FALSE);
4140 str="Single remote port type";
4141 proto_tree_add_item(comp_tree,hf_gsm_a_tft_port,tvb,curr_offset,2,FALSE);
4148 str="Remote port range type";
4149 proto_tree_add_item(comp_tree,hf_gsm_a_tft_port_low,tvb,curr_offset,2,FALSE);
4151 proto_tree_add_item(comp_tree,hf_gsm_a_tft_port_high,tvb,curr_offset,2,FALSE);
4158 str="Security parameter index type";
4159 proto_tree_add_item(comp_tree,hf_gsm_a_tft_security,tvb,curr_offset,4,FALSE);
4167 str="Type of service/Traffic class type";
4168 proto_tree_add_item(comp_tree,hf_gsm_a_qos_traffic_cls,tvb,curr_offset,1,FALSE);
4170 proto_tree_add_item(comp_tree,hf_gsm_a_tft_traffic_mask,tvb,curr_offset,1,FALSE);
4177 str="Flow label type";
4178 proto_tree_add_bits_item(comp_tree, hf_gsm_a_spare_bits, tvb, (curr_offset<<3), 4, FALSE);
4179 proto_tree_add_item(comp_tree,hf_gsm_a_tft_flow_label_type,tvb,curr_offset,3,FALSE);
4186 str="not specified";
4187 curr_offset+=pf_length;
4188 curr_len-=pf_length;
4191 proto_item_append_text(tf, "%s (%u)", str, pack_component_type);
4197 /* The parameters list contains a variable number of parameters that might need to be
4198 * transferred in addition to the packet filters. If the parameters list is included, the E
4199 * bit is set to 1; otherwise, the E bit is set to 0.
4201 if ((e_bit == 1) && curr_len) {
4204 pf_length = tvb_get_guint8(tvb, curr_offset+1);
4205 tf = proto_tree_add_text(tree, tvb, curr_offset, pf_length+2, "Parameter %d" ,count);
4206 tf_tree = proto_item_add_subtree(tf, ett_sm_tft );
4207 param = tvb_get_guint8(tvb, curr_offset);
4208 proto_tree_add_item(tf_tree, hf_gsm_a_tft_param_id, tvb, curr_offset, 1, FALSE);
4213 proto_tree_add_text(tf_tree, tvb, curr_offset, pf_length, "Authorization token value: 0x%s",
4214 tvb_bytes_to_str(tvb, curr_offset, pf_length));
4218 proto_tree_add_text(tf_tree, tvb, curr_offset, 2, "Media Component number value: 0x%x",
4219 tvb_get_bits16(tvb, curr_offset<<3, 16, FALSE));
4220 proto_tree_add_text(tf_tree, tvb, curr_offset+2, 2, "IP flow number: 0x%x",
4221 tvb_get_bits16(tvb, (curr_offset+2)<<3, 16, FALSE));
4225 for (i = 0; i < pf_length; i++) {
4226 proto_tree_add_text(tf_tree, tvb, curr_offset+i, 1, "Packet filter identifier %d: %d",
4227 i, tvb_get_guint8(tvb, curr_offset+i));
4232 proto_tree_add_text(tf_tree, tvb, curr_offset, pf_length, "Parameter content: 0x%s",
4233 tvb_bytes_to_str(tvb, curr_offset, pf_length));
4236 curr_offset += pf_length;
4237 curr_len -= pf_length;
4242 EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo);
4248 * [9] 10.5.6.13 Temporary Mobile Group Identity (TMGI)
4251 de_sm_tmgi(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
4253 guint32 curr_offset;
4255 curr_offset = offset;
4257 proto_tree_add_item(tree, hf_gsm_a_sm_tmgi, tvb, curr_offset, 3, FALSE);
4260 NO_MORE_DATA_CHECK(len);
4261 curr_offset = dissect_e212_mcc_mnc(tvb, gsm_a_dtap_pinfo, tree, curr_offset, TRUE);
4263 EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo);
4265 return(curr_offset - offset);
4269 * [9] 10.5.6.14 MBMS bearer capabilities
4272 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_)
4274 guint32 curr_offset, temp32;
4278 curr_offset = offset;
4280 oct = tvb_get_guint8(tvb, curr_offset);
4284 case 0x00: str="Subscribed maximum bit rate for downlink/reserved"; break;
4285 case 0xff: str="0 kbps"; break;
4286 default: str = ep_strdup_printf("%u kbps", qos_calc_bitrate(oct));
4289 proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_max_bitrate_downl, tvb,
4290 curr_offset, 1, oct, "%s (%u)", str, oct);
4293 NO_MORE_DATA_CHECK(len);
4295 oct = tvb_get_guint8(tvb, curr_offset);
4298 str = "Use the value indicated by the Maximum bit rate for downlink";
4301 temp32 = qos_calc_ext_bitrate(oct);
4302 if (temp32 % 1000 == 0)
4303 str = ep_strdup_printf("%u Mbps", temp32 / 1000);
4305 str = ep_strdup_printf("%u kbps", temp32);
4307 proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_max_bitrate_downl_ext, tvb,
4308 curr_offset, 1, oct, "%s (%u)", str, oct);
4312 EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo);
4314 return(curr_offset - offset);
4318 * [9] 10.5.6.15 MBMS protocol configuration options
4321 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_)
4323 guint32 curr_offset;
4325 curr_offset = offset;
4326 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset<<3), 8, FALSE);
4329 EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo);
4331 return(curr_offset - offset);
4335 * [9] 10.5.6.16 Enhanced network service access point identifier
4338 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_)
4343 oct = tvb_get_guint8(tvb, offset);
4347 else if (oct < 0xff)
4348 str = ep_strdup_printf("NSAPI %u for Multimedia Broadcast/Multicast Service (MBMS) Multicast mode", oct);
4350 str = "Reserved for use by lower layers in the p2p radio bearer allocation message for MBMS Broadcast mode";
4353 proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_enh_nsapi, tvb,
4354 offset, 1, oct, "%s (%u)", str, oct);
4356 /* no length check possible */
4361 * [9] 10.5.6.17 Request type
4363 static const value_string gsm_a_sm_req_type_vals[] = {
4364 { 0x01, "Initial request" },
4365 { 0x02, "Handover" },
4366 { 0x03, "Unused. If received, the network shall interpret this as \"Initial request\"." },
4371 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_)
4373 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (offset<<3) + 4, 1, FALSE);
4374 proto_tree_add_item(tree, hf_gsm_a_sm_req_type, tvb, offset, 1, FALSE);
4376 /* no length check possible */
4380 guint16 (*gm_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string, int string_len) = {
4381 /* GPRS Mobility Management Information Elements 10.5.5 */
4382 de_gmm_attach_res, /* Attach Result */
4383 de_gmm_attach_type, /* Attach Type */
4384 de_gmm_ciph_alg, /* Cipher Algorithm */
4385 de_gmm_tmsi_stat, /* TMSI Status */
4386 de_gmm_detach_type, /* Detach Type */
4387 de_gmm_drx_param, /* DRX Parameter */
4388 de_gmm_ftostby, /* Force to Standby */
4389 de_gmm_ftostby_h, /* Force to Standby - Info is in the high nibble */
4390 de_gmm_ptmsi_sig, /* P-TMSI Signature */
4391 de_gmm_ptmsi_sig2, /* P-TMSI Signature 2 */
4392 de_gmm_ident_type2, /* Identity Type 2 */
4393 de_gmm_imeisv_req, /* IMEISV Request */
4394 de_gmm_rec_npdu_lst, /* Receive N-PDU Numbers List */
4395 de_gmm_ms_net_cap, /* MS Network Capability */
4396 de_gmm_ms_radio_acc_cap,/* MS Radio Access Capability */
4397 de_gmm_cause, /* GMM Cause */
4398 de_gmm_rai, /* Routing Area Identification */
4399 de_gmm_update_res, /* Update Result */
4400 de_gmm_update_type, /* Update Type */
4401 de_gmm_ac_ref_nr, /* A&C Reference Number */
4402 de_gmm_ac_ref_nr_h, /* A&C Reference Numer - Info is in the high nibble */
4403 de_gmm_service_type, /* Service Type */
4404 NULL /* no associated data */, /* Cell Notification */
4405 de_gmm_ps_lcs_cap, /* PS LCS Capability */
4406 de_gmm_net_feat_supp, /* Network Feature Support */
4407 de_gmm_rat_info_container, /* Inter RAT information container */
4408 /* Session Management Information Elements 10.5.6 */
4409 de_sm_apn, /* Access Point Name */
4410 de_sm_nsapi, /* Network Service Access Point Identifier */
4411 de_sm_pco, /* Protocol Configuration Options */
4412 de_sm_pdp_addr, /* Packet Data Protocol Address */
4413 de_sm_qos, /* Quality Of Service */
4414 de_sm_cause, /* SM Cause */
4415 de_sm_cause_2, /* SM Cause 2 */
4416 de_sm_linked_ti, /* Linked TI */
4417 de_sm_sapi, /* LLC Service Access Point Identifier */
4418 de_sm_tear_down, /* Tear Down Indicator */
4419 de_sm_pflow_id, /* Packet Flow Identifier */
4420 de_sm_tflow_temp, /* Traffic Flow Template */
4421 de_sm_tmgi, /* Temporary Mobile Group Identity (TMGI) */
4422 de_sm_mbms_bearer_cap, /* MBMS bearer capabilities */
4423 de_sm_mbms_prot_conf_opt, /* MBMS protocol configuration options */
4424 de_sm_enh_nsapi, /* Enhanced network service access point identifier */
4425 de_sm_req_type, /* Request type */
4426 /* GPRS Common Information Elements 10.5.7 */
4427 de_gc_context_stat, /* PDP Context Status */
4428 de_gc_radio_prio, /* Radio Priority */
4429 de_gc_timer, /* GPRS Timer */
4430 de_gc_timer2, /* GPRS Timer 2 */
4431 de_gc_radio_prio2, /* Radio Priority 2 */
4432 de_gc_mbms_context_stat,/* 10.5.7.6 MBMS context status */
4436 /* MESSAGE FUNCTIONS */
4442 dtap_gmm_attach_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
4444 guint32 curr_offset;
4448 curr_offset = offset;
4451 pinfo->p2p_dir = P2P_DIR_RECV;
4453 ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_MS_NET_CAP, NULL);
4455 /* Included in attach type
4457 ELEM_MAND_V(GSM_A_PDU_TYPE_COMMON, DE_CIPH_KEY_SEQ_NUM, NULL);
4462 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_ATTACH_TYPE, NULL);
4464 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_DRX_PARAM, NULL);
4466 ELEM_MAND_LV(GSM_A_PDU_TYPE_COMMON, DE_MID , NULL);
4468 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_RAI, " - Old routing area identification");
4470 ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_MS_RAD_ACC_CAP , NULL);
4472 ELEM_OPT_TV( 0x19 , GSM_A_PDU_TYPE_GM, DE_P_TMSI_SIG, " - Old P-TMSI Signature");
4474 ELEM_OPT_TV( 0x17 , GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER , " - Ready Timer" );
4476 ELEM_OPT_TV_SHORT( 0x90 , GSM_A_PDU_TYPE_GM, DE_TMSI_STAT , NULL);
4478 ELEM_OPT_TLV( 0x33 , GSM_A_PDU_TYPE_GM, DE_PS_LCS_CAP , NULL);
4480 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
4487 dtap_gmm_attach_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
4489 guint32 curr_offset;
4493 curr_offset = offset;
4496 pinfo->p2p_dir = P2P_DIR_SENT;
4498 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND_H, NULL);
4502 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_ATTACH_RES, NULL);
4504 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER, NULL);
4506 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_RAD_PRIO_2, " - Radio priority for TOM8");
4510 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_RAD_PRIO, " - Radio priority for SMS");
4512 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_RAI, NULL);
4514 ELEM_OPT_TV( 0x19 , GSM_A_PDU_TYPE_GM, DE_P_TMSI_SIG, NULL);
4516 ELEM_OPT_TV( 0x17 , GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER , " - Negotiated Ready Timer" );
4518 ELEM_OPT_TLV( 0x18 , GSM_A_PDU_TYPE_COMMON, DE_MID , " - Allocated P-TMSI" );
4520 ELEM_OPT_TLV( 0x23 , GSM_A_PDU_TYPE_COMMON, DE_MID , NULL);
4522 ELEM_OPT_TV( 0x25 , GSM_A_PDU_TYPE_GM, DE_GMM_CAUSE , NULL);
4524 ELEM_OPT_TLV( 0x2A , GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2 , " - T3302" );
4526 ELEM_OPT_T( 0x8C , GSM_A_PDU_TYPE_GM, DE_CELL_NOT , NULL);
4528 ELEM_OPT_TLV( 0x4A , GSM_A_PDU_TYPE_COMMON, DE_PLMN_LIST , NULL);
4530 ELEM_OPT_TV_SHORT( 0xB0 , GSM_A_PDU_TYPE_GM, DE_NET_FEAT_SUP , NULL);
4532 ELEM_OPT_TLV( 0x34 , GSM_A_PDU_TYPE_DTAP, DE_EMERGENCY_NUM_LIST , NULL);
4534 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
4541 dtap_gmm_attach_com(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
4544 guint32 curr_offset;
4545 /* guint32 consumed; */
4548 curr_offset = offset;
4551 pinfo->p2p_dir = P2P_DIR_RECV;
4553 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
4560 dtap_gmm_attach_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
4562 guint32 curr_offset;
4566 curr_offset = offset;
4569 pinfo->p2p_dir = P2P_DIR_SENT;
4571 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_GMM_CAUSE, NULL);
4573 ELEM_OPT_TLV( 0x2A , GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2 , " - T3302" );
4575 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
4582 dtap_gmm_detach_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
4584 guint32 curr_offset;
4588 curr_offset = offset;
4591 pinfo->p2p_dir = P2P_DIR_SENT;
4593 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND_H, NULL);
4594 /* Force to standy might be wrong - To decode it correct, we need the direction */
4598 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_DETACH_TYPE, NULL);
4600 ELEM_OPT_TV( 0x25 , GSM_A_PDU_TYPE_GM, DE_GMM_CAUSE , NULL);
4602 ELEM_OPT_TLV( 0x18 , GSM_A_PDU_TYPE_COMMON, DE_MID , " - P-TMSI" );
4604 ELEM_OPT_TLV( 0x19 , GSM_A_PDU_TYPE_GM, DE_P_TMSI_SIG , NULL);
4606 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
4613 dtap_gmm_detach_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
4615 guint32 curr_offset;
4619 curr_offset = offset;
4622 pinfo->p2p_dir = P2P_DIR_RECV;
4624 if ( curr_len != 0 )
4626 ELEM_MAND_V(GSM_A_PDU_TYPE_COMMON, DE_SPARE_NIBBLE, NULL);
4630 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND, NULL);
4633 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
4640 dtap_gmm_ptmsi_realloc_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
4642 guint32 curr_offset;
4646 curr_offset = offset;
4649 pinfo->p2p_dir = P2P_DIR_SENT;
4651 ELEM_MAND_LV(GSM_A_PDU_TYPE_COMMON, DE_MID , " - Allocated P-TMSI" );
4653 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_RAI, NULL);
4655 ELEM_MAND_V(GSM_A_PDU_TYPE_COMMON, DE_SPARE_NIBBLE, NULL);
4659 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND, NULL);
4661 ELEM_OPT_TV( 0x19 , GSM_A_PDU_TYPE_COMMON, DE_MID , " - P-TMSI Signature" );
4663 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
4670 dtap_gmm_ptmsi_realloc_com(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
4672 guint32 curr_offset;
4673 /* guint32 consumed; */
4676 curr_offset = offset;
4679 pinfo->p2p_dir = P2P_DIR_RECV;
4681 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
4688 dtap_gmm_auth_ciph_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
4690 guint32 curr_offset;
4695 curr_offset = offset;
4698 pinfo->p2p_dir = P2P_DIR_SENT;
4700 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_IMEISV_REQ, NULL);
4704 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_CIPH_ALG, NULL);
4706 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_AC_REF_NUM_H, NULL);
4710 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND, NULL);
4712 ELEM_OPT_TV( 0x21 , GSM_A_PDU_TYPE_DTAP, DE_AUTH_PARAM_RAND , NULL);
4715 ELEM_OPT_TV_SHORT( 0x08 , GSM_A_PDU_TYPE_COMMON, DE_CIPH_KEY_SEQ_NUM , NULL);
4719 oct = tvb_get_guint8(tvb, curr_offset);
4720 if (( oct & 0xf0 ) == 0x80 )
4722 /* The ciphering key sequence number is added here */
4723 proto_tree_add_text(tree,
4724 tvb, curr_offset, 1,
4725 "Ciphering key sequence number: 0x%02x (%u)",
4734 if ( curr_len == 0 )
4736 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
4740 ELEM_OPT_TLV( 0x28 , GSM_A_PDU_TYPE_DTAP, DE_AUTH_PARAM_AUTN , NULL);
4742 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
4749 dtap_gmm_auth_ciph_resp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
4751 guint32 curr_offset;
4755 curr_offset = offset;
4758 pinfo->p2p_dir = P2P_DIR_RECV;
4760 ELEM_MAND_V(GSM_A_PDU_TYPE_COMMON, DE_SPARE_NIBBLE, NULL);
4764 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_AC_REF_NUM, NULL);
4766 ELEM_OPT_TV( 0x22 , GSM_A_PDU_TYPE_DTAP, DE_AUTH_RESP_PARAM , NULL);
4768 ELEM_OPT_TLV( 0x23 , GSM_A_PDU_TYPE_COMMON, DE_MID , " - IMEISV" );
4770 ELEM_OPT_TLV( 0x29 , GSM_A_PDU_TYPE_DTAP, DE_AUTH_RESP_PARAM_EXT , NULL);
4772 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
4779 dtap_gmm_auth_ciph_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
4781 guint32 curr_offset;
4784 curr_offset = offset;
4787 pinfo->p2p_dir = P2P_DIR_SENT;
4789 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
4796 dtap_gmm_auth_ciph_fail(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
4798 guint32 curr_offset;
4802 curr_offset = offset;
4805 pinfo->p2p_dir = P2P_DIR_RECV;
4807 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_GMM_CAUSE, NULL);
4809 ELEM_OPT_TLV( 0x30 , GSM_A_PDU_TYPE_DTAP, DE_AUTH_FAIL_PARAM , NULL);
4811 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
4818 dtap_gmm_ident_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
4820 guint32 curr_offset;
4823 curr_offset = offset;
4826 pinfo->p2p_dir = P2P_DIR_SENT;
4828 /* 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. */
4830 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_ID_TYPE_2, NULL);
4833 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND_H, NULL);
4836 elem_v(tvb, tree, pinfo, GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND_H, curr_offset, NULL);
4837 elem_v(tvb, tree, pinfo, GSM_A_PDU_TYPE_GM, DE_ID_TYPE_2, curr_offset, NULL);
4842 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
4849 dtap_gmm_ident_res(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
4851 guint32 curr_offset;
4855 curr_offset = offset;
4858 pinfo->p2p_dir = P2P_DIR_RECV;
4860 ELEM_MAND_LV(GSM_A_PDU_TYPE_COMMON, DE_MID , NULL);
4862 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
4869 dtap_gmm_rau_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
4871 guint32 curr_offset;
4875 curr_offset = offset;
4878 pinfo->p2p_dir = P2P_DIR_RECV;
4880 /* is included in update type
4881 ELEM_MAND_V(GSM_A_PDU_TYPE_COMMON, DE_CIPH_KEY_SEQ_NUM, NULL);
4886 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_UPD_TYPE, NULL);
4888 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_RAI, " - Old routing area identification");
4890 ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_MS_RAD_ACC_CAP , NULL);
4892 ELEM_OPT_TV( 0x19 , GSM_A_PDU_TYPE_GM, DE_P_TMSI_SIG , " - Old P-TMSI Signature" );
4894 ELEM_OPT_TV( 0x17 , GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER , " - Requested Ready Timer" );
4896 ELEM_OPT_TV( 0x27 , GSM_A_PDU_TYPE_GM, DE_DRX_PARAM , NULL);
4898 ELEM_OPT_TV_SHORT( 0x90 , GSM_A_PDU_TYPE_GM, DE_TMSI_STAT , NULL);
4900 ELEM_OPT_TLV( 0x18 , GSM_A_PDU_TYPE_COMMON, DE_MID , " - P-TMSI" );
4902 ELEM_OPT_TLV( 0x31 , GSM_A_PDU_TYPE_GM, DE_MS_NET_CAP , NULL);
4904 ELEM_OPT_TLV( 0x32 , GSM_A_PDU_TYPE_GM, DE_PDP_CONTEXT_STAT , NULL);
4906 ELEM_OPT_TLV( 0x33 , GSM_A_PDU_TYPE_GM, DE_PS_LCS_CAP , NULL);
4908 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
4915 dtap_gmm_rau_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
4917 guint32 curr_offset;
4921 curr_offset = offset;
4924 pinfo->p2p_dir = P2P_DIR_SENT;
4926 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_UPD_RES, NULL);
4930 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND, NULL);
4932 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER, " - Periodic RA update timer");
4934 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_RAI, NULL);
4936 ELEM_OPT_TV( 0x19 , GSM_A_PDU_TYPE_GM, DE_P_TMSI_SIG , NULL);
4938 ELEM_OPT_TLV( 0x18 , GSM_A_PDU_TYPE_COMMON, DE_MID , " - Allocated P-TMSI");
4940 ELEM_OPT_TLV( 0x23 , GSM_A_PDU_TYPE_COMMON, DE_MID , NULL);
4942 ELEM_OPT_TLV( 0x26 , GSM_A_PDU_TYPE_GM, DE_REC_N_PDU_NUM_LIST , NULL);
4944 ELEM_OPT_TV( 0x17 , GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER , " - Negotiated Ready Timer" );
4946 ELEM_OPT_TV( 0x25 , GSM_A_PDU_TYPE_GM, DE_GMM_CAUSE , NULL);
4948 ELEM_OPT_TLV( 0x2A , GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2 , " - T3302" );
4950 ELEM_OPT_T( 0x8C , GSM_A_PDU_TYPE_GM, DE_CELL_NOT , NULL);
4952 ELEM_OPT_TLV( 0x4A , GSM_A_PDU_TYPE_COMMON, DE_PLMN_LIST , NULL);
4954 ELEM_OPT_TLV( 0x32 , GSM_A_PDU_TYPE_GM, DE_PDP_CONTEXT_STAT , NULL);
4956 ELEM_OPT_TV_SHORT ( 0xB0 , GSM_A_PDU_TYPE_GM, DE_NET_FEAT_SUP , NULL);
4958 ELEM_OPT_TLV( 0x34 , GSM_A_PDU_TYPE_DTAP, DE_EMERGENCY_NUM_LIST , NULL);
4960 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
4967 dtap_gmm_rau_com(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
4969 guint32 curr_offset;
4973 curr_offset = offset;
4976 pinfo->p2p_dir = P2P_DIR_RECV;
4978 ELEM_OPT_TLV( 0x26 , GSM_A_PDU_TYPE_GM, DE_REC_N_PDU_NUM_LIST , NULL);
4979 /* Inter RAT information container 10.5.5.24 TS 24.008 version 6.8.0 Release 6 */
4980 /*TO DO: Implement */
4981 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_RAT_INFO_CONTAINER , NULL);
4983 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
4990 dtap_gmm_rau_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
4992 guint32 curr_offset;
4996 curr_offset = offset;
4999 pinfo->p2p_dir = P2P_DIR_SENT;
5001 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_GMM_CAUSE, NULL);
5003 ELEM_MAND_V(GSM_A_PDU_TYPE_COMMON, DE_SPARE_NIBBLE, NULL);
5007 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND, NULL);
5009 ELEM_OPT_TLV( 0x26 , GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2 , " - T3302" );
5011 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5018 dtap_gmm_status(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5020 guint32 curr_offset;
5024 curr_offset = offset;
5027 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
5029 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_GMM_CAUSE, NULL);
5031 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5035 * [8] 9.4.19 GMM Information
5038 dtap_gmm_information(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5040 guint32 curr_offset;
5044 curr_offset = offset;
5047 pinfo->p2p_dir = P2P_DIR_SENT;
5049 ELEM_OPT_TLV( 0x43 , GSM_A_PDU_TYPE_DTAP, DE_NETWORK_NAME , " - Full Name" );
5051 ELEM_OPT_TLV( 0x45 , GSM_A_PDU_TYPE_DTAP, DE_NETWORK_NAME , " - Short Name" );
5053 ELEM_OPT_TV( 0x46 , GSM_A_PDU_TYPE_DTAP, DE_TIME_ZONE , NULL);
5055 ELEM_OPT_TV( 0x47 , GSM_A_PDU_TYPE_DTAP, DE_TIME_ZONE_TIME , NULL);
5057 ELEM_OPT_TLV( 0x48 , GSM_A_PDU_TYPE_DTAP, DE_LSA_ID , NULL);
5059 ELEM_OPT_TLV( 0x49 , GSM_A_PDU_TYPE_DTAP, DE_DAY_SAVING_TIME , NULL);
5061 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5068 dtap_gmm_service_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5070 guint32 curr_offset;
5074 curr_offset = offset;
5077 pinfo->p2p_dir = P2P_DIR_RECV;
5079 /* Is included in SRVC TYPE
5080 ELEM_MAND_V(GSM_A_PDU_TYPE_COMMON, DE_CIPH_KEY_SEQ_NUM, NULL);
5085 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_SRVC_TYPE, NULL);
5087 /* P-TMSI Mobile station identity 10.5.1.4 M LV 6 */
5088 ELEM_MAND_LV(GSM_A_PDU_TYPE_COMMON, DE_MID, NULL);
5090 ELEM_OPT_TLV( 0x32 , GSM_A_PDU_TYPE_GM, DE_PDP_CONTEXT_STAT , NULL);
5092 /* MBMS context status 10.5.7.6 TLV 2 - 18 */
5093 ELEM_OPT_TLV( 0x35 , GSM_A_PDU_TYPE_GM, DE_MBMS_CTX_STATUS , NULL);
5095 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5102 dtap_gmm_service_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5104 guint32 curr_offset;
5108 curr_offset = offset;
5111 pinfo->p2p_dir = P2P_DIR_SENT;
5113 ELEM_OPT_TLV( 0x32 , GSM_A_PDU_TYPE_GM, DE_PDP_CONTEXT_STAT , NULL);
5115 /* MBMS context status 10.5.7.6 TLV 2 - 18 */
5116 ELEM_OPT_TLV( 0x35 , GSM_A_PDU_TYPE_GM, DE_MBMS_CTX_STATUS , NULL);
5118 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5125 dtap_gmm_service_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5127 guint32 curr_offset;
5131 curr_offset = offset;
5134 pinfo->p2p_dir = P2P_DIR_SENT;
5136 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_GMM_CAUSE, NULL);
5138 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5142 * [8] 9.5.1 Activate PDP context request
5143 * Direction: MS to network
5146 dtap_sm_act_pdp_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5148 guint32 curr_offset;
5152 curr_offset = offset;
5155 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
5157 pinfo->link_dir = P2P_DIR_UL;
5159 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_NET_SAPI, " - Requested NSAPI");
5161 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_LLC_SAPI, " - Requested LLC SAPI");
5163 ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_QOS , " - Requested QoS" );
5165 ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_PD_PRO_ADDR , " - Requested PDP address" );
5167 ELEM_OPT_TLV( 0x28 , GSM_A_PDU_TYPE_GM, DE_ACC_POINT_NAME , NULL);
5169 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL);
5171 ELEM_OPT_TV_SHORT(0xA0, GSM_A_PDU_TYPE_GM, DE_REQ_TYPE, NULL);
5173 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5177 * [9] 9.5.2 Activate PDP context accept
5178 * Direction: network to MS
5181 dtap_sm_act_pdp_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5183 guint32 curr_offset;
5187 curr_offset = offset;
5190 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
5192 pinfo->link_dir = P2P_DIR_DL;
5194 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_LLC_SAPI, " - Negotiated LLC SAPI");
5196 ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_QOS , " - Negotiated QoS" );
5199 /* This is done automatically */
5200 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_SPARE, NULL);
5205 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_RAD_PRIO, NULL);
5207 ELEM_OPT_TLV( 0x2B , GSM_A_PDU_TYPE_GM, DE_PD_PRO_ADDR , NULL);
5209 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL);
5211 ELEM_OPT_TLV( 0x34 , GSM_A_PDU_TYPE_GM, DE_PACKET_FLOW_ID , NULL);
5213 ELEM_OPT_TLV( 0x39 , GSM_A_PDU_TYPE_GM, DE_SM_CAUSE_2, NULL );
5215 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5219 * [8] 9.5.3 Activate PDP context reject
5220 * Direction: network to MS
5223 dtap_sm_act_pdp_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5225 guint32 curr_offset;
5229 curr_offset = offset;
5232 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
5234 pinfo->link_dir = P2P_DIR_DL;
5236 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL);
5238 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL);
5240 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5244 * [8] 9.5.4 Activate Secondary PDP Context Request
5245 * Direction: MS to network
5248 dtap_sm_act_sec_pdp_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5250 guint32 curr_offset;
5254 curr_offset = offset;
5257 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
5259 pinfo->link_dir = P2P_DIR_UL;
5261 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_NET_SAPI, " - Requested NSAPI");
5263 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_LLC_SAPI, " - Requested LLC SAPI");
5265 ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_QOS , " - Requested QoS" );
5267 ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_LINKED_TI , NULL);
5269 /* 3GPP TS 24.008 version 6.8.0 Release 6, 36 TFT Traffic Flow Template 10.5.6.12 O TLV 3-257 */
5270 ELEM_OPT_TLV( 0x36 , GSM_A_PDU_TYPE_GM, DE_TRAFFIC_FLOW_TEMPLATE , NULL);
5272 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL);
5274 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5278 * [7] 9.5.5 Activate Secondary PDP Context Accept
5279 * Direction: network to MS
5282 dtap_sm_act_sec_pdp_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5284 guint32 curr_offset;
5288 curr_offset = offset;
5291 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
5293 pinfo->link_dir = P2P_DIR_DL;
5295 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_LLC_SAPI, " - Negotiated LLC SAPI");
5297 ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_QOS , " - Negotiated QoS" );
5299 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_RAD_PRIO, NULL);
5302 /* This is done automatically */
5303 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_SPARE, NULL);
5308 ELEM_OPT_TLV( 0x34 , GSM_A_PDU_TYPE_GM, DE_PACKET_FLOW_ID , NULL);
5310 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL);
5312 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5316 * [8] 9.5.6 Activate Secondary PDP Context Reject
5317 * Direction: network to MS
5320 dtap_sm_act_sec_pdp_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5322 guint32 curr_offset;
5326 curr_offset = offset;
5329 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
5331 pinfo->link_dir = P2P_DIR_DL;
5333 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL);
5335 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL);
5337 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5341 * [8] 9.5.7 Request PDP context activation
5342 * Direction: network to MS
5345 dtap_sm_req_pdp_act(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5347 guint32 curr_offset;
5351 curr_offset = offset;
5354 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
5356 pinfo->link_dir = P2P_DIR_DL;
5358 ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_PD_PRO_ADDR , " - Offered PDP address" );
5360 ELEM_OPT_TLV( 0x28 , GSM_A_PDU_TYPE_GM, DE_ACC_POINT_NAME , NULL);
5362 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL);
5364 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5368 * [8] 9.5.8 Request PDP context activation reject
5369 * Direction: MS to network
5372 dtap_sm_req_pdp_act_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5374 guint32 curr_offset;
5378 curr_offset = offset;
5381 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
5383 pinfo->link_dir = P2P_DIR_UL;
5385 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL);
5387 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL);
5389 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5393 * [8] 9.5.9 Modify PDP context request (Network to MS direction)
5394 * Direction: network to MS
5397 dtap_sm_mod_pdp_req_net(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5399 guint32 curr_offset;
5403 curr_offset = offset;
5406 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
5408 pinfo->link_dir = P2P_DIR_DL;
5410 ELEM_MAND_V(GSM_A_PDU_TYPE_GM,DE_RAD_PRIO, NULL);
5412 /* This is done automatically */
5413 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_SPARE, NULL);
5418 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_LLC_SAPI, " - Requested LLC SAPI");
5420 ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_QOS , " - New QoS" );
5422 ELEM_OPT_TLV( 0x2B , GSM_A_PDU_TYPE_GM, DE_PD_PRO_ADDR , NULL);
5424 ELEM_OPT_TLV( 0x34 , GSM_A_PDU_TYPE_GM, DE_PACKET_FLOW_ID , NULL);
5426 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL);
5428 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5432 * [8] 9.5.10 Modify PDP context request (MS to network direction)
5433 * Direction: MS to network
5436 dtap_sm_mod_pdp_req_ms(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5438 guint32 curr_offset;
5442 curr_offset = offset;
5445 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
5447 pinfo->link_dir = P2P_DIR_UL;
5449 ELEM_OPT_TV( 0x32 , GSM_A_PDU_TYPE_GM, DE_LLC_SAPI , " - Requested LLC SAPI" );
5451 ELEM_OPT_TLV( 0x30 , GSM_A_PDU_TYPE_GM, DE_QOS , " - Requested new QoS" );
5453 ELEM_OPT_TLV( 0x31 , GSM_A_PDU_TYPE_GM, DE_TRAFFIC_FLOW_TEMPLATE , " - New TFT" );
5455 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL);
5457 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5461 * [8] 9.5.11 Modify PDP context accept (MS to network direction)
5462 * Direction: MS to network
5465 dtap_sm_mod_pdp_acc_ms(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5467 guint32 curr_offset;
5471 curr_offset = offset;
5474 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
5476 pinfo->link_dir = P2P_DIR_UL;
5478 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL);
5480 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5484 * [8] 9.5.12 Modify PDP context accept (Network to MS direction)
5485 * Direction: Network to MS
5488 dtap_sm_mod_pdp_acc_net(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5490 guint32 curr_offset;
5494 curr_offset = offset;
5497 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
5499 pinfo->link_dir = P2P_DIR_DL;
5501 ELEM_OPT_TLV( 0x30 , GSM_A_PDU_TYPE_GM, DE_QOS , " - Negotiated QoS" );
5503 ELEM_OPT_TV( 0x32 , GSM_A_PDU_TYPE_GM, DE_LLC_SAPI , " - Negotiated LLC SAPI" );
5505 ELEM_OPT_TV_SHORT ( 0x80 , GSM_A_PDU_TYPE_GM , DE_RAD_PRIO , " - New radio priority" );
5507 ELEM_OPT_TLV( 0x34 , GSM_A_PDU_TYPE_GM, DE_PACKET_FLOW_ID , NULL);
5509 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL);
5511 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5515 * [8] 9.5.13 Modify PDP Context Reject
5519 dtap_sm_mod_pdp_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5521 guint32 curr_offset;
5525 curr_offset = offset;
5528 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
5529 /* Network or the MS */
5530 pinfo->link_dir = LINK_DIR_UNKNOWN;
5533 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL);
5535 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL);
5537 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5541 * [8] 9.5.14 Deactivate PDP context request
5545 dtap_sm_deact_pdp_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5547 guint32 curr_offset;
5551 curr_offset = offset;
5554 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
5555 pinfo->link_dir = LINK_DIR_UNKNOWN;
5557 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL);
5559 ELEM_OPT_TV_SHORT( 0x90 , GSM_A_PDU_TYPE_GM , DE_TEAR_DOWN_IND , NULL);
5561 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL);
5563 /* MBMS context status 10.5.7.6 TLV 2 - 18 */
5564 ELEM_OPT_TLV( 0x35 , GSM_A_PDU_TYPE_GM, DE_MBMS_CTX_STATUS , NULL);
5566 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5570 * [8] 9.5.15 Deactivate PDP context accept
5574 dtap_sm_deact_pdp_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5576 guint32 curr_offset;
5580 curr_offset = offset;
5583 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
5584 pinfo->link_dir = LINK_DIR_UNKNOWN;
5586 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL);
5588 /* MBMS context status 10.5.7.6 TLV 2 - 18 */
5589 ELEM_OPT_TLV( 0x35 , GSM_A_PDU_TYPE_GM, DE_MBMS_CTX_STATUS , NULL);
5591 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5595 * [8] 9.5.21 SM Status
5599 dtap_sm_status(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5601 guint32 curr_offset;
5605 curr_offset = offset;
5608 pinfo->p2p_dir = P2P_DIR_UNKNOWN;
5609 pinfo->link_dir = LINK_DIR_UNKNOWN;
5611 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL);
5613 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5617 * [9] 9.5.22 Activate MBMS Context Request
5618 * Direction: MS to network
5621 dtap_sm_act_mbms_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5623 guint32 curr_offset;
5627 curr_offset = offset;
5630 pinfo->p2p_dir = P2P_DIR_RECV;
5632 /* Requested MBMS NSAPI Enhanced Network service access point identifier 10.5.6.16 M V */
5633 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_ENH_NSAPI, " - Requested MBMS NSAPI");
5635 /* Requested LLC SAPI LLC service access point identifier 10.5.6.9 M V 1 */
5636 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_LLC_SAPI, " - Requested LLC SAPI");
5638 /* Supported MBMS bearer capabilities MBMS bearer capabilities 10.5.6.14 M LV 2 - 3 */
5639 ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_MBMS_BEARER_CAP , NULL );
5641 /* Requested multicast address Packet data protocol address 10.5.6.4 M LV 3 - 19 */
5642 ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_PD_PRO_ADDR , " - Requested multicast address" );
5644 /* Access point name Access point name 10.5.6.1 M LV 2 - 101 */
5645 ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_ACC_POINT_NAME , NULL );
5647 /* 35 MBMS protocol configuration options MBMS protocol configuration options 10.5.6.15 O TLV 3 - 253 */
5648 ELEM_OPT_TLV( 0x35 , GSM_A_PDU_TYPE_GM, DE_MBMS_PROT_CONF_OPT , NULL);
5650 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5654 * [9] 9.5.23 Activate MBMS Context Accept
5655 * Direction: network to MS
5658 dtap_sm_act_mbms_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5660 guint32 curr_offset;
5664 curr_offset = offset;
5667 pinfo->p2p_dir = P2P_DIR_SENT;
5669 ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_TMGI, NULL);
5671 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_LLC_SAPI, " - Negotiated LLC SAPI");
5673 ELEM_OPT_TLV( 0x35 , GSM_A_PDU_TYPE_GM, DE_MBMS_PROT_CONF_OPT , NULL);
5675 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5679 * [9] 9.5.24 Activate MBMS Context Reject
5680 * Direction: network to MS
5683 dtap_sm_act_mbms_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5685 guint32 curr_offset;
5689 curr_offset = offset;
5692 pinfo->p2p_dir = P2P_DIR_SENT;
5694 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL);
5696 ELEM_OPT_TLV( 0x35 , GSM_A_PDU_TYPE_GM, DE_MBMS_PROT_CONF_OPT , NULL);
5698 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5702 * [9] 9.5.25 Request MBMS Context Activation
5703 * Direction: network to MS
5706 dtap_sm_req_mbms_act(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5708 guint32 curr_offset;
5712 curr_offset = offset;
5715 pinfo->p2p_dir = P2P_DIR_SENT;
5717 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_NET_SAPI, " - Linked NSAPI");
5719 ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_PD_PRO_ADDR , " - Offered multicast address" );
5721 ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_ACC_POINT_NAME , NULL );
5723 ELEM_OPT_TLV( 0x35 , GSM_A_PDU_TYPE_GM, DE_MBMS_PROT_CONF_OPT , NULL);
5725 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5729 * [8] 9.5.26 Request MBMS Context Activation Reject
5730 * Direction: MS to network
5733 dtap_sm_req_mbms_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
5735 guint32 curr_offset;
5739 curr_offset = offset;
5742 pinfo->p2p_dir = P2P_DIR_RECV;
5744 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL);
5746 ELEM_OPT_TLV( 0x35 , GSM_A_PDU_TYPE_GM, DE_MBMS_PROT_CONF_OPT , NULL);
5748 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo);
5751 #define NUM_GSM_DTAP_MSG_GMM (sizeof(gsm_a_dtap_msg_gmm_strings)/sizeof(value_string))
5752 static gint ett_gsm_dtap_msg_gmm[NUM_GSM_DTAP_MSG_GMM];
5753 static void (*dtap_msg_gmm_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len) = {
5754 dtap_gmm_attach_req, /* Attach Request */
5755 dtap_gmm_attach_acc, /* Attach Accept */
5756 dtap_gmm_attach_com, /* Attach Complete */
5757 dtap_gmm_attach_rej, /* Attach Reject */
5758 dtap_gmm_detach_req, /* Detach Request */
5759 dtap_gmm_detach_acc, /* Detach Accept */
5760 dtap_gmm_rau_req, /* Routing Area Update Request */
5761 dtap_gmm_rau_acc, /* Routing Area Update Accept */
5762 dtap_gmm_rau_com, /* Routing Area Update Complete */
5763 dtap_gmm_rau_rej, /* Routing Area Update Reject */
5764 dtap_gmm_service_req, /* Service Request */
5765 dtap_gmm_service_acc, /* Service Accept */
5766 dtap_gmm_service_rej, /* Service Reject */
5767 dtap_gmm_ptmsi_realloc_cmd, /* P-TMSI Reallocation Command */
5768 dtap_gmm_ptmsi_realloc_com, /* P-TMSI Reallocation Complete */
5769 dtap_gmm_auth_ciph_req, /* Authentication and Ciphering Req */
5770 dtap_gmm_auth_ciph_resp, /* Authentication and Ciphering Resp */
5771 dtap_gmm_auth_ciph_rej, /* Authentication and Ciphering Rej */
5772 dtap_gmm_auth_ciph_fail, /* Authentication and Ciphering Failure */
5773 dtap_gmm_ident_req, /* Identity Request */
5774 dtap_gmm_ident_res, /* Identity Response */
5775 dtap_gmm_status, /* GMM Status */
5776 dtap_gmm_information, /* GMM Information */
5780 #define NUM_GSM_DTAP_MSG_SM (sizeof(gsm_a_dtap_msg_sm_strings)/sizeof(value_string))
5781 static gint ett_gsm_dtap_msg_sm[NUM_GSM_DTAP_MSG_SM];
5782 static void (*dtap_msg_sm_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len) = {
5783 dtap_sm_act_pdp_req, /* Activate PDP Context Request */
5784 dtap_sm_act_pdp_acc, /* Activate PDP Context Accept */
5785 dtap_sm_act_pdp_rej, /* Activate PDP Context Reject */
5786 dtap_sm_req_pdp_act, /* Request PDP Context Activation */
5787 dtap_sm_req_pdp_act_rej, /* Request PDP Context Activation rej. */
5788 dtap_sm_deact_pdp_req, /* Deactivate PDP Context Request */
5789 dtap_sm_deact_pdp_acc, /* Deactivate PDP Context Accept */
5790 dtap_sm_mod_pdp_req_net, /* Modify PDP Context Request(Network to MS direction) */
5791 dtap_sm_mod_pdp_acc_ms, /* Modify PDP Context Accept (MS to network direction) */
5792 dtap_sm_mod_pdp_req_ms, /* Modify PDP Context Request(MS to network direction) */
5793 dtap_sm_mod_pdp_acc_net, /* Modify PDP Context Accept (Network to MS direction) */
5794 dtap_sm_mod_pdp_rej, /* Modify PDP Context Reject */
5795 dtap_sm_act_sec_pdp_req, /* Activate Secondary PDP Context Request */
5796 dtap_sm_act_sec_pdp_acc, /* Activate Secondary PDP Context Accept */
5797 dtap_sm_act_sec_pdp_rej, /* Activate Secondary PDP Context Reject */
5798 NULL, /* Reserved: was allocated in earlier phases of the protocol */
5799 NULL, /* Reserved: was allocated in earlier phases of the protocol */
5800 NULL, /* Reserved: was allocated in earlier phases of the protocol */
5801 NULL, /* Reserved: was allocated in earlier phases of the protocol */
5802 NULL, /* Reserved: was allocated in earlier phases of the protocol */
5803 dtap_sm_status, /* SM Status */
5804 dtap_sm_act_mbms_req, /* Activate MBMS Context Request */
5805 dtap_sm_act_mbms_acc, /* Activate MBMS Context Accept */
5806 dtap_sm_act_mbms_rej, /* Activate MBMS Context Reject */
5807 dtap_sm_req_mbms_act, /* Request MBMS Context Activation */
5808 dtap_sm_req_mbms_rej, /* Request MBMS Context Activation Reject */
5812 void get_gmm_msg_params(guint8 oct, const gchar **msg_str, int *ett_tree, int *hf_idx, msg_fcn *dtap_msg_fcn)
5816 *msg_str = match_strval_idx((guint32) (oct & DTAP_GMM_IEI_MASK), gsm_a_dtap_msg_gmm_strings, &idx);
5817 *ett_tree = ett_gsm_dtap_msg_gmm[idx];
5818 *hf_idx = hf_gsm_a_dtap_msg_gmm_type;
5819 *dtap_msg_fcn = dtap_msg_gmm_fcn[idx];
5824 void get_sm_msg_params(guint8 oct, const gchar **msg_str, int *ett_tree, int *hf_idx, msg_fcn *dtap_msg_fcn)
5828 *msg_str = match_strval_idx((guint32) (oct & DTAP_SM_IEI_MASK), gsm_a_dtap_msg_sm_strings, &idx);
5829 *ett_tree = ett_gsm_dtap_msg_sm[idx];
5830 *hf_idx = hf_gsm_a_dtap_msg_sm_type;
5831 *dtap_msg_fcn = dtap_msg_sm_fcn[idx];
5836 /* Register the protocol with Wireshark */
5838 proto_register_gsm_a_gm(void)
5843 /* Setup list of header fields */
5845 static hf_register_info hf[] =
5847 { &hf_gsm_a_dtap_msg_gmm_type,
5848 { "DTAP GPRS Mobility Management Message Type", "gsm_a.dtap_msg_gmm_type",
5849 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_msg_gmm_strings), 0x0,
5852 { &hf_gsm_a_dtap_msg_sm_type,
5853 { "DTAP GPRS Session Management Message Type", "gsm_a.dtap_msg_sm_type",
5854 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_msg_sm_strings), 0x0,
5857 { &hf_gsm_a_gm_elem_id,
5858 { "Element ID", "gsm_a_gm.elem_id",
5859 FT_UINT8, BASE_DEC, NULL, 0,
5862 { &hf_gsm_a_qos_delay_cls,
5863 { "Quality of Service Delay class", "gsm_a.qos.delay_cls",
5864 FT_UINT8, BASE_DEC, VALS(gsm_a_qos_delay_cls_vals), 0x38,
5867 { &hf_gsm_a_qos_reliability_cls,
5868 { "Reliability class", "gsm_a.qos.delay_cls",
5869 FT_UINT8, BASE_DEC, VALS(gsm_a_qos_delay_cls_vals), 0x07,
5872 { &hf_gsm_a_qos_traffic_cls,
5873 { "Traffic class", "gsm_a.qos.traffic_cls",
5874 FT_UINT8, BASE_DEC, VALS(gsm_a_qos_traffic_cls_vals), 0xe0,
5877 { &hf_gsm_a_qos_del_order,
5878 { "Delivery order", "gsm_a.qos.del_order",
5879 FT_UINT8, BASE_DEC, VALS(gsm_a_qos_traffic_cls_vals), 0x18,
5882 { &hf_gsm_a_qos_del_of_err_sdu,
5883 { "Delivery of erroneous SDUs", "gsm_a.qos.del_of_err_sdu",
5884 FT_UINT8, BASE_DEC, VALS(gsm_a_qos_del_of_err_sdu_vals), 0x03,
5887 { &hf_gsm_a_qos_ber,
5888 { "Residual Bit Error Rate (BER)", "gsm_a.qos.ber",
5889 FT_UINT8, BASE_DEC, VALS(gsm_a_qos_ber_vals), 0xf0,
5892 { &hf_gsm_a_qos_sdu_err_rat,
5893 { "SDU error ratio", "gsm_a.qos.sdu_err_rat",
5894 FT_UINT8, BASE_DEC, VALS(gsm_a_qos_sdu_err_rat_vals), 0x0f,
5897 { &hf_gsm_a_qos_traff_hdl_pri,
5898 { "Traffic handling priority", "gsm_a.qos.traff_hdl_pri",
5899 FT_UINT8, BASE_DEC, VALS(gsm_a_qos_traff_hdl_pri_vals), 0x03,
5902 { &hf_gsm_a_gmm_split_on_ccch,
5903 { "SPLIT on CCCH","gsm_a.gmm.split_on_ccch",
5904 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_split_on_ccch_value), 0x08,
5907 { &hf_gsm_a_gmm_non_drx_timer,
5908 { "Non-DRX timer","gsm_a.gmm.non_drx_timer",
5909 FT_UINT8, BASE_DEC, VALS(gsm_a_gmm_non_drx_timer_strings), 0x07,
5912 { &hf_gsm_a_gmm_cn_spec_drs_cycle_len_coef,
5913 { "CN Specific DRX cycle length coefficient","gsm_a.gmm.cn_spec_drs_cycle_len_coef",
5914 FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gsm_a_gmm_cn_spec_drs_cycle_len_coef_strings), 0xf0,
5917 { &hf_gsm_a_tft_op_code,
5918 { "TFT operation code", "gsm_a.tft.op_code",
5919 FT_UINT8, BASE_DEC, VALS(gsm_a_tft_op_code_vals), 0xe0,
5922 { &hf_gsm_a_tft_e_bit,
5923 { "E bit","gsm_a.tft.e_bit",
5924 FT_BOOLEAN, 8, TFS(&gsm_a_tft_e_bit), 0x10,
5927 { &hf_gsm_a_tft_pkt_flt,
5928 { "Number of packet filters", "gsm_a.tft.pkt_flt",
5929 FT_UINT8, BASE_DEC, NULL, 0x0f,
5932 { &hf_gsm_a_tft_pkt_flt_dir,
5933 { "Packet filter direction", "gsm_a.tft.pkt_flt_dir",
5934 FT_UINT8, BASE_DEC, VALS(gsm_a_tft_pkt_flt_dir_vals), 0x30,
5937 { &hf_gsm_a_tft_pkt_flt_id,
5938 { "Packet filter identifier", "gsm_a.tft.pkt_flt_id",
5939 FT_UINT8, BASE_DEC, NULL, 0x0f,
5942 { &hf_gsm_a_sm_ip4_address,
5943 { "IPv4 address", "gsm_a.sm.ip4_address",
5944 FT_IPv4, BASE_NONE, NULL, 0x0,
5947 { &hf_gsm_a_sm_ip4_mask,
5948 { "IPv4 address mask", "gsm_a.sm.ip4_mask",
5949 FT_IPv4, BASE_NONE, NULL, 0x0,
5952 { &hf_gsm_a_sm_ip6_address,
5953 { "IPv6 address", "gsm_a.sm.ip6_address",
5954 FT_IPv6, BASE_NONE, NULL, 0x0,
5957 { &hf_gsm_a_sm_ip6_mask,
5958 { "IPv6 address mask", "gsm_a.sm.ip6_mask",
5959 FT_IPv6, BASE_NONE, NULL, 0x0,
5962 { &hf_gsm_a_tft_protocol_header,
5963 { "Protocol/header", "gsm_a.tft.protocol_header",
5964 FT_UINT8, BASE_HEX, NULL, 0x0,
5967 { &hf_gsm_a_tft_port,
5968 { "Port", "gsm_a.tft.port",
5969 FT_UINT16, BASE_DEC, NULL, 0x0,
5972 { &hf_gsm_a_tft_port_low,
5973 { "Low limit port", "gsm_a.tft.port_low",
5974 FT_UINT16, BASE_DEC, NULL, 0x0,
5977 { &hf_gsm_a_tft_port_high,
5978 { "High limit port", "gsm_a.tft.port_high",
5979 FT_UINT16, BASE_DEC, NULL, 0x0,
5982 { &hf_gsm_a_tft_security,
5983 { "IPSec security parameter index", "gsm_a.tft.security",
5984 FT_UINT32, BASE_HEX, NULL, 0x0,
5987 { &hf_gsm_a_tft_traffic_mask,
5988 { "Mask field", "gsm_a.tft.traffic_mask",
5989 FT_UINT8, BASE_HEX, NULL, 0x0,
5992 { &hf_gsm_a_tft_flow_label_type,
5993 { "Flow Label Type", "gsm_a.tft.flow_label_type",
5994 FT_UINT24, BASE_HEX, NULL, 0x0FFFFF,
5997 { &hf_gsm_a_tft_param_id,
5998 { "Parameter identifier", "gsm_a.tft.param_id",
5999 FT_UINT8, BASE_DEC, VALS(gsm_a_tft_param_id_vals), 0x0,
6002 { &hf_gsm_a_ptmsi_sig,
6003 { "P-TMSI Signature", "gsm_a.ptmsi_sig",
6004 FT_UINT24, BASE_HEX, NULL, 0x0,
6007 { &hf_gsm_a_ptmsi_sig2,
6008 { "P-TMSI Signature 2", "gsm_a.ptmsi_sig2",
6009 FT_UINT24, BASE_HEX, NULL, 0x0,
6012 { &hf_gsm_a_gm_acc_tech_type,
6013 { "Access Technology Type", "gsm_a.gm.acc_tech_type",
6014 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_acc_tech_type_vals), 0x0,
6017 { &hf_gsm_a_gm_acc_cap_struct_len,
6018 { "Length in bits", "gsm_a.gm.acc_cap_struct_len",
6019 FT_UINT8, BASE_HEX_DEC,NULL, 0x0,
6022 { &hf_gsm_a_gm_sms_value,
6023 { "SMS_VALUE (Switch-Measure-Switch)", "gsm_a.gm.sms",
6024 FT_UINT8, BASE_DEC, VALS(gsm_a_sms_vals), 0x0,
6027 { &hf_gsm_a_gm_sm_value,
6028 { "(SM_VALUE) Switch-Measure", "gsm_a.gm.sm",
6029 FT_UINT8, BASE_DEC, VALS(gsm_a_sms_vals), 0x0,
6032 { &hf_gsm_a_gm_sm_ext,
6033 { "Ext", "gsm_a.gm.sm.ext",
6034 FT_UINT8, BASE_HEX, NULL, 0x80,
6037 { &hf_gsm_a_gm_link_dir,
6038 { "Link direction", "gsm_a.gm.link_dir",
6039 FT_INT32, BASE_DEC, VALS(gsm_a_gm_link_dir_vals), 0x0,
6042 { &hf_gsm_a_gm_cause,
6043 { "gmm Cause", "gsm_a.gm.cause",
6044 FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gmm_cause_vals), 0x0,
6048 { "Follow-on proceed", "gsm_a.gm.fop",
6049 FT_BOOLEAN, 8, NULL, 0x08,
6052 { &hf_gsm_a_gm_res_of_attach,
6053 { "Result of attach", "gsm_a.gm.res_of_attach",
6054 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_res_of_attach_vals), 0x07,
6057 { &hf_gsm_a_gm_type_of_ciph_alg,
6058 { "Type of ciphering algorithm", "gsm_a.gm.type_of_ciph_alg",
6059 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_type_of_ciph_alg_vals), 0x07,
6062 { &hf_gsm_a_gm_imeisv_req,
6063 { "IMEISV request", "gsm_a.gm.imeisv_req",
6064 FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gsm_a_gm_imeisv_req_vals), 0x00,
6067 { &hf_gsm_a_gm_ac_ref_nr,
6068 { "A&C reference number", "gsm_a.gm.ac_ref_nr",
6069 FT_UINT8, BASE_DEC, NULL, 0x0,
6072 { &hf_gsm_a_gm_force_to_standby,
6073 { "Force to standby", "gsm_a.gm.force_to_standby",
6074 FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gsm_a_gm_force_to_standby_vals), 0x00,
6077 { &hf_gsm_a_gm_ciph_key_seq_num,
6078 { "Ciphering key sequence number", "gsm_a.gm.ciph_key_seq_num",
6079 FT_UINT8, BASE_DEC, NULL, 0x00,
6082 { &hf_gsm_a_gm_serv_type,
6083 { "Service type", "gsm_a.gm.serv_type",
6084 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_serv_type_vals), 0x00,
6088 { "Follow-on request pending", "gsm_a.gm.for",
6089 FT_BOOLEAN, 8, NULL, 0x08,
6092 { &hf_gsm_a_gm_type_of_attach,
6093 { "Type of attach", "gsm_a.gm.type_of_attach",
6094 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_type_of_attach_vals), 0x07,
6097 { &hf_gsm_a_gm_tmsi_flag,
6098 { "TMSI flag", "gsm_a.gm.tmsi_flag",
6099 FT_BOOLEAN, 8, TFS(&gsm_a_gm_tmsi_flag_value), 0x01,
6102 { &hf_gsm_a_gm_update_type,
6103 { "Update type", "gsm_a.gm.update_type",
6104 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_update_type_vals), 0x07,
6107 { &hf_gsm_a_gm_gprs_timer_unit,
6108 { "Unit", "gsm_a.gm.gprs_timer_unit",
6109 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_gprs_timer_unit_vals), 0xe0,
6112 { &hf_gsm_a_gm_gprs_timer_value,
6113 { "Timer value", "gsm_a.gm.gprs_timer_value",
6114 FT_UINT8, BASE_DEC, NULL, 0x1f,
6117 { &hf_gsm_a_gm_pco_pid,
6118 { "Protocol or Container ID", "gsm_a.gm.pco_pid",
6119 FT_UINT16, BASE_DEC, NULL, 0x0,
6122 { &hf_gsm_a_gm_type_of_identity,
6123 { "Type of identity", "gsm_a.gm.type_of_identity",
6124 FT_UINT8, BASE_DEC, VALS(gsm_a_gm_type_of_identity_vals), 0x07,
6128 { "Routing Area Code (RAC)","gsm_a.gm.rac",
6129 FT_UINT8, BASE_HEX_DEC, NULL, 0x00,
6133 { "APC","gsm_a.gm.apc",
6134 FT_BOOLEAN, 8, TFS(&gsm_a_gm_apc_vals), 0x20,
6137 { &hf_gsm_a_gm_otd_a,
6138 { "OTD-A","gsm_a.gm.otd_a",
6139 FT_BOOLEAN, 8, TFS(&gsm_a_gm_otd_a_vals), 0x10,
6142 { &hf_gsm_a_gm_otd_b,
6143 { "OTD-B","gsm_a.gm.otd_b",
6144 FT_BOOLEAN, 8, TFS(&gsm_a_gm_otd_b_vals), 0x08,
6147 { &hf_gsm_a_gm_gps_a,
6148 { "GPS-A","gsm_a.gm.gps_a",
6149 FT_BOOLEAN, 8, TFS(&gsm_a_gm_gps_a_vals), 0x04,
6152 { &hf_gsm_a_gm_gps_b,
6153 { "GPS-B","gsm_a.gm.gps_b",
6154 FT_BOOLEAN, 8, TFS(&gsm_a_gm_gps_b_vals), 0x02,
6157 { &hf_gsm_a_gm_gps_c,
6158 { "GPS-C","gsm_a.gm.gps_c",
6159 FT_BOOLEAN, 8, TFS(&gsm_a_gm_gps_c_vals), 0x01,
6162 { &hf_gsm_a_sm_pdp_type_org,
6163 { "PDP type organization", "gsm_a.sm.pdp_type_org",
6164 FT_UINT8, BASE_DEC, VALS(gsm_a_sm_pdp_type_org_vals), 0x0f,
6167 { &hf_gsm_a_qos_mean_thr,
6168 { "Mean throughput", "gsm_a.qos.mean_throughput",
6169 FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gsm_a_qos_mean_thr_vals), 0x1f,
6172 { &hf_gsm_a_qos_peak_thr,
6173 { "Peak throughput", "gsm_a.qos.peak_throughput",
6174 FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gsm_a_qos_peak_thr_vals), 0xf0,
6177 { &hf_gsm_a_qos_prec_class,
6178 { "Precedence class", "gsm_a.qos.prec_class",
6179 FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gsm_a_qos_prec_class_vals), 0x07,
6182 { &hf_gsm_a_qos_traf_handl_prio,
6183 { "Traffic handling priority", "gsm_a.qos.traf_handl_prio",
6184 FT_UINT8, BASE_DEC, NULL, 0x03,
6187 { &hf_gsm_a_qos_trans_delay,
6188 { "Transfer delay", "gsm_a.qos.trans_delay",
6189 FT_UINT8, BASE_DEC, NULL, 0xfc,
6192 { &hf_gsm_a_qos_signalling_ind,
6193 { "Signalling indication", "gsm_a.qos.signalling_ind",
6194 FT_BOOLEAN, 8, TFS(&gsm_a_qos_signalling_ind_value), 0x10,
6197 { &hf_gsm_a_qos_source_stat_desc,
6198 { "Source statistics description", "gsm_a.qos.source_stat_desc",
6199 FT_UINT8, BASE_DEC, NULL, 0x0f,
6202 { &hf_gsm_a_qos_max_bitrate_upl,
6203 { "Maximum bitrate for uplink", "gsm_a.qos.max_bitrate_upl",
6204 FT_UINT8, BASE_DEC, NULL, 0x0,
6207 { &hf_gsm_a_qos_max_bitrate_downl,
6208 { "Maximum bitrate for downlink", "gsm_a.qos.max_bitrate_downl",
6209 FT_UINT8, BASE_DEC, NULL, 0x0,
6212 { &hf_gsm_a_qos_guar_bitrate_upl,
6213 { "Guaranteed bitrate for uplink", "gsm_a.qos.guar_bitrate_upl",
6214 FT_UINT8, BASE_DEC, NULL, 0x0,
6217 { &hf_gsm_a_qos_guar_bitrate_downl,
6218 { "Guaranteed bitrate for downlink", "gsm_a.qos.guar_bitrate_downl",
6219 FT_UINT8, BASE_DEC, NULL, 0x0,
6222 { &hf_gsm_a_qos_max_bitrate_upl_ext,
6223 { "Maximum bitrate for uplink (extended)", "gsm_a.qos.max_bitrate_upl_ext",
6224 FT_UINT8, BASE_DEC, NULL, 0x0,
6227 { &hf_gsm_a_qos_max_bitrate_downl_ext,
6228 { "Maximum bitrate for downlink (extended)", "gsm_a.qos.max_bitrate_downl_ext",
6229 FT_UINT8, BASE_DEC, NULL, 0x0,
6232 { &hf_gsm_a_qos_guar_bitrate_upl_ext,
6233 { "Guaranteed bitrate for uplink (extended)", "gsm_a.qos.guar_bitrate_upl_ext",
6234 FT_UINT8, BASE_DEC, NULL, 0x0,
6237 { &hf_gsm_a_qos_guar_bitrate_downl_ext,
6238 { "Guaranteed bitrate for downlink (extended)", "gsm_a.qos.guar_bitrate_downl_ext",
6239 FT_UINT8, BASE_DEC, NULL, 0x0,
6242 { &hf_gsm_a_sm_cause,
6243 { "SM Cause", "gsm_a.sm.cause",
6244 FT_UINT8, BASE_DEC, NULL, 0x0,
6247 { &hf_gsm_a_sm_cause_2,
6248 { "SM Cause 2", "gsm_a.sm.cause_2",
6249 FT_UINT8, BASE_DEC, NULL, 0x0,
6252 { &hf_gsm_a_sm_llc_sapi,
6253 { "LLC SAPI", "gsm_a.sm.llc_sapi",
6254 FT_UINT8, BASE_DEC, VALS(gsm_a_sm_llc_sapi_vals), 0x0f,
6258 { "Tear Down Indicator (TDI)", "gsm_a.sm.tdi",
6259 FT_BOOLEAN, 8, TFS(&gsm_a_sm_tdi_value), 0x01,
6262 { &hf_gsm_a_sm_packet_flow_id,
6263 { "Packet Flow Identifier (PFI)", "gsm_a.sm.packet_flow_id",
6264 FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gsm_a_sm_packet_flow_id_vals), 0x7f,
6267 { &hf_gsm_a_gmm_net_cap_gea1,
6268 { "GEA/1", "gsm_a.gmm.net_cap.gea1",
6269 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_gea_vals), 0x80,
6272 { &hf_gsm_a_gmm_net_cap_smdch,
6273 { "SM capabilities via dedicated channels", "gsm_a.gmm.net_cap.smdch",
6274 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_smdch_vals), 0x40,
6277 { &hf_gsm_a_gmm_net_cap_smgprs,
6278 { "SM capabilities via GPRS channels", "gsm_a.gmm.net_cap.smgprs",
6279 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_smgprs_vals), 0x20,
6282 { &hf_gsm_a_gmm_net_cap_ucs2,
6283 { "UCS2 support", "gsm_a.gmm.net_cap.ucs2",
6284 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_smgprs_vals), 0x10,
6287 { &hf_gsm_a_gmm_net_cap_ss_scr_ind,
6288 { "SS Screening Indicator", "gsm_a.gmm.net_cap.ss_scr_ind",
6289 FT_UINT8, BASE_HEX, VALS(gsm_a_gmm_net_cap_ss_scr_ind_vals), 0x0c,
6292 { &hf_gsm_a_gmm_net_cap_solsa,
6293 { "SoLSA Capability", "gsm_a.gmm.net_cap.solsa",
6294 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_solsa_vals), 0x02,
6297 { &hf_gsm_a_gmm_net_cap_rev,
6298 { "Revision level indicator", "gsm_a.gmm.net_cap.rev",
6299 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_rev_vals), 0x01,
6302 { &hf_gsm_a_gmm_net_cap_pfc,
6303 { "PFC feature mode", "gsm_a.gmm.net_cap.pfc",
6304 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_pfc_vals), 0x80,
6307 { &hf_gsm_a_gmm_net_cap_ext_gea_bits,
6308 { "Extended GEA bits", "gsm_a.gmm.net_cap.ext_gea_bits",
6309 FT_UINT8, BASE_HEX, NULL, 0x7e,
6312 { &hf_gsm_a_gmm_net_cap_gea2,
6313 { "GEA/2", "gsm_a.gmm.net_cap.gea2",
6314 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_gea_vals), 0x40,
6317 { &hf_gsm_a_gmm_net_cap_gea3,
6318 { "GEA/3", "gsm_a.gmm.net_cap.gea3",
6319 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_gea_vals), 0x20,
6322 { &hf_gsm_a_gmm_net_cap_gea4,
6323 { "GEA/4", "gsm_a.gmm.net_cap.gea4",
6324 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_gea_vals), 0x10,
6327 { &hf_gsm_a_gmm_net_cap_gea5,
6328 { "GEA/5", "gsm_a.gmm.net_cap.gea5",
6329 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_gea_vals), 0x08,
6332 { &hf_gsm_a_gmm_net_cap_gea6,
6333 { "GEA/6", "gsm_a.gmm.net_cap.gea6",
6334 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_gea_vals), 0x04,
6337 { &hf_gsm_a_gmm_net_cap_gea7,
6338 { "GEA/7", "gsm_a.gmm.net_cap.gea7",
6339 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_gea_vals), 0x02,
6342 { &hf_gsm_a_gmm_net_cap_lcs,
6343 { "LCS VA capability", "gsm_a.gmm.net_cap.lcs",
6344 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_lcs_vals), 0x01,
6347 { &hf_gsm_a_gmm_net_cap_ps_irat_iu,
6348 { "PS inter-RAT HO to UTRAN Iu mode capability", "gsm_a.gmm.net_cap.ps_irat_iu",
6349 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_ps_irat_iu_vals), 0x80,
6352 { &hf_gsm_a_gmm_net_cap_ps_irat_s1,
6353 { "PS inter-RAT HO to E-UTRAN S1 mode capability", "gsm_a.gmm.net_cap.ps_irat_s1",
6354 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_ps_irat_s1_vals), 0x40,
6357 { &hf_gsm_a_gmm_net_cap_csfb,
6358 { "CSFB Capability", "gsm_a.gmm.net_cap.csfb",
6359 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_csfb_vals), 0x20,
6362 { &hf_gsm_a_gmm_net_cap_isr,
6363 { "ISR support", "gsm_a.gmm.net_cap.isr",
6364 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_isr_vals), 0x10,
6367 { &hf_gsm_a_gmm_net_cap_srvcc_to_geran,
6368 { "SRVCC to GERAN/UTRAN capability", "gsm_a.gmm.net_cap.srvcc_to_geran",
6369 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_srvcc_to_geran_vals), 0x08,
6372 { &hf_gsm_a_gmm_net_cap_epc,
6373 { "EPC Capability", "gsm_a.gmm.net_cap.epc",
6374 FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_epc_vals), 0x04,
6377 { &hf_gsm_a_sm_tmgi,
6378 { "Temporary Mobile Group Identity (TMGI)", "gsm_a.sm.tmgi",
6379 FT_UINT24, BASE_HEX, NULL, 0x0,
6382 { &hf_gsm_a_sm_enh_nsapi,
6383 { "Enhanced NSAPI", "gsm_a.sm.enh_nsapi",
6384 FT_UINT8, BASE_DEC, NULL, 0x0,
6387 { &hf_gsm_a_sm_req_type,
6388 { "Request type", "gsm_a.sm.req_type",
6389 FT_UINT8, BASE_DEC, VALS(gsm_a_sm_req_type_vals), 0x07,
6392 { &hf_gsm_a_gm_rac_ctrled_early_cm_sending,
6393 { "Controlled early Classmark Sending", "gsm_a.gm.rac.comp_int_meas_cap",
6394 FT_BOOLEAN, 8, TFS(&tfs_implemented_not_implemented), 0x0,
6397 { &hf_gsm_a_gm_rac_multislot_capability,
6398 { "Multislot capability struct", "gsm_a.gm.rac.multislot_capability",
6399 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x0,
6403 { &hf_gsm_a_gm_rac_single_slt_dtm,
6404 { "Single Slot DTM", "gsm_a.gm.rac.single_slt_dtm",
6405 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
6408 { &hf_gsm_a_gm_rac_dtm_egprs_multi_slot_cls_pres,
6409 { "DTM EGPRS Multi Slot Class", "gsm_a.gm.rac.dtm_egprs_multi_slot_cls_pres",
6410 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x0,
6413 { &hf_gsm_a_gm_rac_8psk_pow_cap_pres,
6414 { "8PSK Power Capability Bits", "gsm_a.gm.rac.8psk_pow_cap_pres",
6415 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x0,
6418 { &hf_gsm_a_gm_rac_comp_int_meas_cap,
6419 { "COMPACT Interference Measurement Capability", "gsm_a.gm.rac.comp_int_meas_cap",
6420 FT_BOOLEAN, 8, TFS(&tfs_implemented_not_implemented), 0x0,
6423 { &hf_gsm_a_gm_rel_lev_ind,
6424 { "Revision Level Indicator", "gsm_a.gm.rel_lev_ind",
6425 FT_UINT8, BASE_HEX, VALS(gsm_a_gm_revision_level_indicator_vals), 0x0,
6428 { &hf_gsm_a_gm_rac_umts_fdd_cap,
6429 { "UMTS FDD Radio Access Technology Capability", "gsm_a.gm.rac.umts_fdd_cap",
6430 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
6433 { &hf_gsm_a_gm_rac_umts_384_tdd_ra_cap,
6434 { "UMTS 3.84 Mcps TDD Radio Access Technology Capability", "gsm_a.gm.rac.umts_384_tdd_ra_cap",
6435 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
6438 { &hf_gsm_a_gm_rac_cdma2000_cap,
6439 { "CDMA 2000 Radio Access Technology Capability", "gsm_a.gm.rac.cdma2000_cap",
6440 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
6443 { &hf_gsm_a_gm_rac_umts_128_tdd_ra_cap,
6444 { "UMTS 1.28 Mcps TDD Radio Access Technology Capability", "gsm_a.gm.rac.umts_128_tdd_ra_cap",
6445 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
6448 { &hf_gsm_a_gm_rac_geran_feat_pkg,
6449 { "GERAN Feature Package 1", "gsm_a.gm.rac.geran_feat_pkg",
6450 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0,
6455 /* Setup protocol subtree array */
6456 #define NUM_INDIVIDUAL_ELEMS 18
6457 gint *ett[NUM_INDIVIDUAL_ELEMS +
6458 NUM_GSM_DTAP_MSG_GMM + NUM_GSM_DTAP_MSG_SM +
6461 ett[0] = &ett_tc_component;
6462 ett[1] = &ett_tc_invoke_id;
6463 ett[2] = &ett_tc_linked_id;
6464 ett[3] = &ett_tc_opr_code;
6465 ett[4] = &ett_tc_err_code;
6466 ett[5] = &ett_tc_prob_code;
6467 ett[6] = &ett_tc_sequence;
6468 ett[7] = &ett_gmm_drx;
6469 ett[8] = &ett_gmm_detach_type;
6470 ett[9] = &ett_gmm_attach_type;
6471 ett[10] = &ett_gmm_context_stat;
6472 ett[11] = &ett_gmm_update_type;
6473 ett[12] = &ett_gmm_radio_cap;
6474 ett[13] = &ett_gmm_rai;
6475 ett[14] = &ett_sm_tft;
6476 ett[15] = &ett_gmm_gprs_timer;
6477 ett[16] = &ett_gmm_network_cap;
6478 ett[17] = &ett_gsm_a_gm_msrac_multislot_capability;
6480 last_offset = NUM_INDIVIDUAL_ELEMS;
6482 for (i=0; i < NUM_GSM_DTAP_MSG_GMM; i++, last_offset++)
6484 ett_gsm_dtap_msg_gmm[i] = -1;
6485 ett[last_offset] = &ett_gsm_dtap_msg_gmm[i];
6488 for (i=0; i < NUM_GSM_DTAP_MSG_SM; i++, last_offset++)
6490 ett_gsm_dtap_msg_sm[i] = -1;
6491 ett[last_offset] = &ett_gsm_dtap_msg_sm[i];
6494 for (i=0; i < NUM_GSM_GM_ELEM; i++, last_offset++)
6496 ett_gsm_gm_elem[i] = -1;
6497 ett[last_offset] = &ett_gsm_gm_elem[i];
6501 proto_register_protocol("GSM A-I/F GPRS Mobility and Session Management", "GSM Management", "gsm_a_gm");
6503 proto_register_field_array(proto_a_gm, hf, array_length(hf));
6505 proto_register_subtree_array(ett, array_length(ett));
6507 /* subdissector code */
6508 gprs_sm_pco_subdissector_table = register_dissector_table("sm_pco.protocol",
6509 "GPRS SM PCO PPP protocol", FT_UINT16, BASE_HEX);
6513 proto_reg_handoff_gsm_a_gm(void)
6515 data_handle = find_dissector("data");
6516 rrc_irat_ho_info_handle = find_dissector("rrc.irat.irat_ho_info");