2 * Routines for GSM A Interface (BSSMAP/DTAP) dissection
4 * Copyright 2003, Michael Lum <mlum [AT] telostech.com>
5 * In association with Telos Technology Inc.
8 * Added the GPRS Mobility Managment Protocol and
9 * the GPRS Session Managment Protocol
10 * Copyright 2004, Rene Pilz <rene.pilz [AT] ftw.com>
11 * In association with Telecommunications Research Center
12 * Vienna (ftw.)Betriebs-GmbH within the Project Metawin.
14 * Added Dissection of Radio Resource Management Information Elements
15 * and othere enhancements and fixes.
16 * Copyright 2005 - 2006, Anders Broman [AT] ericsson.com
17 * Small bugfixes, mainly in Qos and TFT by Nils Ljungberg and Stefan Boman [AT] ericsson.com
22 * Mobile radio interface signalling layer 3;
24 * (3GPP TS 24.007 version 3.9.0 Release 1999)
27 * Mobile-services Switching Centre - Base Station System
28 * (MSC - BSS) interface;
29 * Layer 3 specification
30 * (GSM 08.08 version 7.7.0 Release 1998) TS 100 590 v7.7.0
33 * Mobile radio interface Layer 3 specification;
34 * Core network protocols;
36 * (3GPP TS 24.008 version 4.7.0 Release 4)
37 * (ETSI TS 124 008 V6.8.0 (2005-03))
40 * Mobile radio interface layer 3 specification;
41 * Radio Resource Control Protocol
42 * (GSM 04.18 version 8.4.1 Release 1999)
43 * (3GPP TS 04.18 version 8.26.0 Release 1999)
46 * Point-to-Point (PP) Short Message Service (SMS)
47 * support on mobile radio interface
48 * (3GPP TS 24.011 version 4.1.1 Release 4)
51 * Mobile radio Layer 3 supplementary service specification;
53 * (3GPP TS 24.080 version 4.3.0 Release 4)
56 * Mobile radio interface Layer 3 specification;
57 * Core network protocols;
59 * (3GPP TS 24.008 version 5.9.0 Release 5)
62 * Mobile radio interface Layer 3 specification;
63 * Core network protocols;
65 * (3GPP TS 24.008 version 6.7.0 Release 6)
66 * (3GPP TS 24.008 version 6.8.0 Release 6)
70 * Wireshark - Network traffic analyzer
71 * By Gerald Combs <gerald@wireshark.org>
72 * Copyright 1998 Gerald Combs
74 * This program is free software; you can redistribute it and/or
75 * modify it under the terms of the GNU General Public License
76 * as published by the Free Software Foundation; either version 2
77 * of the License, or (at your option) any later version.
79 * This program is distributed in the hope that it will be useful,
80 * but WITHOUT ANY WARRANTY; without even the implied warranty of
81 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
82 * GNU General Public License for more details.
84 * You should have received a copy of the GNU General Public License
85 * along with this program; if not, write to the Free Software
86 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
98 #include <epan/packet.h>
99 #include <epan/prefs.h>
100 #include <epan/tap.h>
101 #include <epan/emem.h>
103 #include "packet-bssap.h"
104 #include "packet-gsm_ss.h"
105 #include "packet-ber.h"
106 #include "packet-q931.h"
107 #include "packet-gsm_a.h"
108 #include "packet-ipv6.h"
109 #include "packet-sccp.h"
111 #include "packet-ppp.h"
113 /* PROTOTYPES/FORWARDS */
115 const value_string gsm_a_bssmap_msg_strings[] = {
116 { 0x01, "Assignment Request" },
117 { 0x02, "Assignment Complete" },
118 { 0x03, "Assignment Failure" },
119 { 0x10, "Handover Request" },
120 { 0x11, "Handover Required" },
121 { 0x12, "Handover Request Acknowledge" },
122 { 0x13, "Handover Command" },
123 { 0x14, "Handover Complete" },
124 { 0x15, "Handover Succeeded" },
125 { 0x16, "Handover Failure" },
126 { 0x17, "Handover Performed" },
127 { 0x18, "Handover Candidate Enquire" },
128 { 0x19, "Handover Candidate Response" },
129 { 0x1a, "Handover Required Reject" },
130 { 0x1b, "Handover Detect" },
131 { 0x20, "Clear Command" },
132 { 0x21, "Clear Complete" },
133 { 0x22, "Clear Request" },
134 { 0x23, "Reserved" },
135 { 0x24, "Reserved" },
136 { 0x25, "SAPI 'n' Reject" },
137 { 0x26, "Confusion" },
140 { 0x2a, "Connection Oriented Information" },
141 { 0x2b, "Perform Location Request" },
142 { 0x2c, "LSA Information" },
143 { 0x2d, "Perform Location Response" },
144 { 0x2e, "Perform Location Abort" },
145 { 0x2f, "Common Id" },
147 { 0x31, "Reset Acknowledge" },
148 { 0x32, "Overload" },
149 { 0x33, "Reserved" },
150 { 0x34, "Reset Circuit" },
151 { 0x35, "Reset Circuit Acknowledge" },
152 { 0x36, "MSC Invoke Trace" },
153 { 0x37, "BSS Invoke Trace" },
154 { 0x3a, "Connectionless Information" },
156 { 0x41, "Blocking Acknowledge" },
158 { 0x43, "Unblocking Acknowledge" },
159 { 0x44, "Circuit Group Block" },
160 { 0x45, "Circuit Group Blocking Acknowledge" },
161 { 0x46, "Circuit Group Unblock" },
162 { 0x47, "Circuit Group Unblocking Acknowledge" },
163 { 0x48, "Unequipped Circuit" },
164 { 0x4e, "Change Circuit" },
165 { 0x4f, "Change Circuit Acknowledge" },
166 { 0x50, "Resource Request" },
167 { 0x51, "Resource Indication" },
169 { 0x53, "Cipher Mode Command" },
170 { 0x54, "Classmark Update" },
171 { 0x55, "Cipher Mode Complete" },
172 { 0x56, "Queuing Indication" },
173 { 0x57, "Complete Layer 3 Information" },
174 { 0x58, "Classmark Request" },
175 { 0x59, "Cipher Mode Reject" },
176 { 0x5a, "Load Indication" },
177 { 0x04, "VGCS/VBS Setup" },
178 { 0x05, "VGCS/VBS Setup Ack" },
179 { 0x06, "VGCS/VBS Setup Refuse" },
180 { 0x07, "VGCS/VBS Assignment Request" },
181 { 0x1c, "VGCS/VBS Assignment Result" },
182 { 0x1d, "VGCS/VBS Assignment Failure" },
183 { 0x1e, "VGCS/VBS Queuing Indication" },
184 { 0x1f, "Uplink Request" },
185 { 0x27, "Uplink Request Acknowledge" },
186 { 0x49, "Uplink Request Confirmation" },
187 { 0x4a, "Uplink Release Indication" },
188 { 0x4b, "Uplink Reject Command" },
189 { 0x4c, "Uplink Release Command" },
190 { 0x4d, "Uplink Seized Command" },
194 const value_string gsm_a_dtap_msg_mm_strings[] = {
195 { 0x01, "IMSI Detach Indication" },
196 { 0x02, "Location Updating Accept" },
197 { 0x04, "Location Updating Reject" },
198 { 0x08, "Location Updating Request" },
199 { 0x11, "Authentication Reject" },
200 { 0x12, "Authentication Request" },
201 { 0x14, "Authentication Response" },
202 { 0x1c, "Authentication Failure" },
203 { 0x18, "Identity Request" },
204 { 0x19, "Identity Response" },
205 { 0x1a, "TMSI Reallocation Command" },
206 { 0x1b, "TMSI Reallocation Complete" },
207 { 0x21, "CM Service Accept" },
208 { 0x22, "CM Service Reject" },
209 { 0x23, "CM Service Abort" },
210 { 0x24, "CM Service Request" },
211 { 0x25, "CM Service Prompt" },
212 { 0x26, "Reserved: was allocated in earlier phases of the protocol" },
213 { 0x28, "CM Re-establishment Request" },
216 { 0x31, "MM Status" },
217 { 0x32, "MM Information" },
221 const value_string gsm_a_dtap_msg_rr_strings[] = {
222 { 0x3c, "RR Initialisation Request" },
223 { 0x3b, "Additional Assignment" },
224 { 0x3f, "Immediate Assignment" },
225 { 0x39, "Immediate Assignment Extended" },
226 { 0x3a, "Immediate Assignment Reject" },
228 { 0x48, "DTM Assignment Failure" },
229 { 0x49, "DTM Reject" },
230 { 0x4a, "DTM Request" },
231 { 0x4b, "Main DCCH Assignment Command" },
232 { 0x4c, "Packet Assignment Command" },
234 { 0x35, "Ciphering Mode Command" },
235 { 0x32, "Ciphering Mode Complete" },
237 { 0x30, "Configuration Change Command" },
238 { 0x31, "Configuration Change Ack." },
239 { 0x33, "Configuration Change Reject" },
241 { 0x2e, "Assignment Command" },
242 { 0x29, "Assignment Complete" },
243 { 0x2f, "Assignment Failure" },
244 { 0x2b, "Handover Command" },
245 { 0x2c, "Handover Complete" },
246 { 0x28, "Handover Failure" },
247 { 0x2d, "Physical Information" },
248 { 0x4d, "DTM Assignment Command" },
250 { 0x08, "RR-cell Change Order" },
251 { 0x23, "PDCH Assignment Command" },
253 { 0x0d, "Channel Release" },
254 { 0x0a, "Partial Release" },
255 { 0x0f, "Partial Release Complete" },
257 { 0x21, "Paging Request Type 1" },
258 { 0x22, "Paging Request Type 2" },
259 { 0x24, "Paging Request Type 3" },
260 { 0x27, "Paging Response" },
261 { 0x20, "Notification/NCH" },
262 { 0x25, "Reserved" },
263 { 0x26, "Notification/Response" },
265 { 0x0b, "Reserved" },
267 /* ETSI TS 101 503 V8.5.0 Seems to give Other def for this Messages???
268 { 0xc0, "Utran Classmark Change" }, CONFLICTS WITH Handover To UTRAN Command
269 { 0xc1, "UE RAB Preconfiguration" },
270 { 0xc2, "cdma2000 Classmark Change" },*/
272 /* ETSI TS 101 503 V8.5.0 */
273 { 0x60, "Utran Classmark Change" },
274 { 0x61, "UE RAB Preconfiguration" },
275 { 0x62, "cdma2000 Classmark Change" },
276 { 0x63, "Inter System to UTRAN Handover Command" },
277 { 0x64, "Inter System to cdma2000 Handover Command" },
278 { 0x18, "System Information Type 8" },
279 { 0x19, "System Information Type 1" },
280 { 0x1a, "System Information Type 2" },
281 { 0x1b, "System Information Type 3" },
282 { 0x1c, "System Information Type 4" },
283 { 0x1d, "System Information Type 5" },
284 { 0x1e, "System Information Type 6" },
285 { 0x1f, "System Information Type 7" },
287 { 0x02, "System Information Type 2bis" },
288 { 0x03, "System Information Type 2ter" },
289 { 0x07, "System Information Type 2quater" },
290 { 0x05, "System Information Type 5bis" },
291 { 0x06, "System Information Type 5ter" },
292 { 0x04, "System Information Type 9" },
293 { 0x00, "System Information Type 13" },
295 { 0x3d, "System Information Type 16" },
296 { 0x3e, "System Information Type 17" },
298 { 0x40, "System Information Type 18" },
299 { 0x41, "System Information Type 19" },
300 { 0x42, "System Information Type 20" },
302 { 0x10, "Channel Mode Modify" },
303 { 0x12, "RR Status" },
304 { 0x17, "Channel Mode Modify Acknowledge" },
305 { 0x14, "Frequency Redefinition" },
306 { 0x15, "Measurement Report" },
307 { 0x16, "Classmark Change" },
308 { 0x13, "Classmark Enquiry" },
309 { 0x36, "Extended Measurement Report" },
310 { 0x37, "Extended Measurement Order" },
311 { 0x34, "GPRS Suspension Request" },
313 { 0x09, "VGCS Uplink Grant" },
314 { 0x0e, "Uplink Release" },
315 { 0x0c, "Reserved" },
316 { 0x2a, "Uplink Busy" },
317 { 0x11, "Talker Indication" },
319 { 0xc0, "UTRAN Classmark Change/Handover To UTRAN Command" }, /* spec conflict */
321 { 0x38, "Application Information" },
326 const value_string gsm_a_dtap_msg_cc_strings[] = {
327 { 0x01, "Alerting" },
328 { 0x08, "Call Confirmed" },
329 { 0x02, "Call Proceeding" },
331 { 0x0f, "Connect Acknowledge" },
332 { 0x0e, "Emergency Setup" },
333 { 0x03, "Progress" },
334 { 0x04, "CC-Establishment" },
335 { 0x06, "CC-Establishment Confirmed" },
337 { 0x09, "Start CC" },
340 { 0x1f, "Modify Complete" },
341 { 0x13, "Modify Reject" },
342 { 0x10, "User Information" },
344 { 0x19, "Hold Acknowledge" },
345 { 0x1a, "Hold Reject" },
346 { 0x1c, "Retrieve" },
347 { 0x1d, "Retrieve Acknowledge" },
348 { 0x1e, "Retrieve Reject" },
349 { 0x25, "Disconnect" },
351 { 0x2a, "Release Complete" },
352 { 0x39, "Congestion Control" },
355 { 0x34, "Status Enquiry" },
356 { 0x35, "Start DTMF" },
357 { 0x31, "Stop DTMF" },
358 { 0x32, "Stop DTMF Acknowledge" },
359 { 0x36, "Start DTMF Acknowledge" },
360 { 0x37, "Start DTMF Reject" },
361 { 0x3a, "Facility" },
365 const value_string gsm_a_dtap_msg_gmm_strings[] = {
366 { 0x01, "Attach Request" },
367 { 0x02, "Attach Accept" },
368 { 0x03, "Attach Complete" },
369 { 0x04, "Attach Reject" },
370 { 0x05, "Detach Request" },
371 { 0x06, "Detach Accept" },
372 { 0x08, "Routing Area Update Request" },
373 { 0x09, "Routing Area Update Accept" },
374 { 0x0a, "Routing Area Update Complete" },
375 { 0x0b, "Routing Area Update Reject" },
376 { 0x0c, "Service Request" },
377 { 0x0d, "Service Accept" },
378 { 0x0e, "Service Reject" },
379 { 0x10, "P-TMSI Reallocation Command" },
380 { 0x11, "P-TMSI Reallocation Complete" },
381 { 0x12, "Authentication and Ciphering Req" },
382 { 0x13, "Authentication and Ciphering Resp" },
383 { 0x14, "Authentication and Ciphering Rej" },
384 { 0x1c, "Authentication and Ciphering Failure" },
385 { 0x15, "Identity Request" },
386 { 0x16, "Identity Response" },
387 { 0x20, "GMM Status" },
388 { 0x21, "GMM Information" },
392 const value_string gsm_a_dtap_msg_sms_strings[] = {
395 { 0x10, "CP-ERROR" },
399 const value_string gsm_a_dtap_msg_sm_strings[] = {
400 { 0x41, "Activate PDP Context Request" },
401 { 0x42, "Activate PDP Context Accept" },
402 { 0x43, "Activate PDP Context Reject" },
403 { 0x44, "Request PDP Context Activation" },
404 { 0x45, "Request PDP Context Activation rej." },
405 { 0x46, "Deactivate PDP Context Request" },
406 { 0x47, "Deactivate PDP Context Accept" },
407 { 0x48, "Modify PDP Context Request(Network to MS direction)" },
408 { 0x49, "Modify PDP Context Accept (MS to network direction)" },
409 { 0x4a, "Modify PDP Context Request(MS to network direction)" },
410 { 0x4b, "Modify PDP Context Accept (Network to MS direction)" },
411 { 0x4c, "Modify PDP Context Reject" },
412 { 0x4d, "Activate Secondary PDP Context Request" },
413 { 0x4e, "Activate Secondary PDP Context Accept" },
414 { 0x4f, "Activate Secondary PDP Context Reject" },
415 { 0x50, "Reserved: was allocated in earlier phases of the protocol" },
416 { 0x51, "Reserved: was allocated in earlier phases of the protocol" },
417 { 0x52, "Reserved: was allocated in earlier phases of the protocol" },
418 { 0x53, "Reserved: was allocated in earlier phases of the protocol" },
419 { 0x54, "Reserved: was allocated in earlier phases of the protocol" },
420 { 0x55, "SM Status" },
421 { 0x56, "Activate MBMS Context Request" },
422 { 0x57, "Activate MBMS Context Accept" },
423 { 0x58, "Activate MBMS Context Reject" },
424 { 0x59, "Request MBMS Context Activation" },
425 { 0x5a, "Request MBMS Context Activation Reject" },
429 const value_string gsm_a_dtap_msg_ss_strings[] = {
430 { 0x2a, "Release Complete" },
431 { 0x3a, "Facility" },
432 { 0x3b, "Register" },
436 static const value_string gsm_rp_msg_strings[] = {
437 { 0x00, "RP-DATA (MS to Network)" },
438 { 0x01, "RP-DATA (Network to MS)" },
439 { 0x02, "RP-ACK (MS to Network)" },
440 { 0x03, "RP-ACK (Network to MS)" },
441 { 0x04, "RP-ERROR (MS to Network)" },
442 { 0x05, "RP-ERROR (Network to MS)" },
443 { 0x06, "RP-SMMA (MS to Network)" },
447 static const value_string gsm_bssmap_elem_strings[] = {
448 { 0x01, "Circuit Identity Code" },
449 { 0x02, "Reserved" },
450 { 0x03, "Resource Available" },
452 { 0x05, "Cell Identifier" },
453 { 0x06, "Priority" },
454 { 0x07, "Layer 3 Header Information" },
457 { 0x0a, "Encryption Information" },
458 { 0x0b, "Channel Type" },
459 { 0x0c, "Periodicity" },
460 { 0x0d, "Extended Resource Indicator" },
461 { 0x0e, "Number Of MSs" },
462 { 0x0f, "Reserved" },
463 { 0x10, "Reserved" },
464 { 0x11, "Reserved" },
465 { 0x12, "Classmark Information Type 2" },
466 { 0x13, "Classmark Information Type 3" },
467 { 0x14, "Interference Band To Be Used" },
468 { 0x15, "RR Cause" },
469 { 0x16, "Reserved" },
470 { 0x17, "Layer 3 Information" },
472 { 0x19, "Downlink DTX Flag" },
473 { 0x1a, "Cell Identifier List" },
474 { 0x1b, "Response Request" },
475 { 0x1c, "Resource Indication Method" },
476 { 0x1d, "Classmark Information Type 1" },
477 { 0x1e, "Circuit Identity Code List" },
478 { 0x1f, "Diagnostic" },
479 { 0x20, "Layer 3 Message Contents" },
480 { 0x21, "Chosen Channel" },
481 { 0x22, "Total Resource Accessible" },
482 { 0x23, "Cipher Response Mode" },
483 { 0x24, "Channel Needed" },
484 { 0x25, "Trace Type" },
485 { 0x26, "TriggerID" },
486 { 0x27, "Trace Reference" },
487 { 0x28, "TransactionID" },
488 { 0x29, "Mobile Identity" },
490 { 0x2b, "Forward Indicator" },
491 { 0x2c, "Chosen Encryption Algorithm" },
492 { 0x2d, "Circuit Pool" },
493 { 0x2e, "Circuit Pool List" },
494 { 0x2f, "Time Indication" },
495 { 0x30, "Resource Situation" },
496 { 0x31, "Current Channel Type 1" },
497 { 0x32, "Queuing Indicator" },
498 { 0x40, "Speech Version" },
499 { 0x33, "Assignment Requirement" },
500 { 0x35, "Talker Flag" },
501 { 0x36, "Connection Release Requested" },
502 { 0x37, "Group Call Reference" },
503 { 0x38, "eMLPP Priority" },
504 { 0x39, "Configuration Evolution Indication" },
505 { 0x3a, "Old BSS to New BSS Information" },
506 { 0x3b, "LSA Identifier" },
507 { 0x3c, "LSA Identifier List" },
508 { 0x3d, "LSA Information" },
510 { 0x3f, "LSA access control suppression" },
511 { 0x43, "LCS Priority" },
512 { 0x44, "Location Type" },
513 { 0x45, "Location Estimate" },
514 { 0x46, "Positioning Data" },
515 { 0x47, "LCS Cause" },
516 { 0x48, "LCS Client Type" },
518 { 0x4a, "Network Element Identity" },
519 { 0x4b, "GPS Assistance Data" },
520 { 0x4c, "Deciphering Keys" },
521 { 0x4d, "Return Error Request" },
522 { 0x4e, "Return Error Cause" },
523 { 0x4f, "Segmentation" },
527 static const value_string gsm_dtap_elem_strings[] = {
528 /* Common Information Elements 10.5.1 */
529 { 0x00, "Cell Identity" },
530 { 0x00, "Ciphering Key Sequence Number" },
531 { 0x00, "Location Area Identification" },
532 { 0x00, "Mobile Identity" },
533 { 0x00, "Mobile Station Classmark 1" },
534 { 0x00, "Mobile Station Classmark 2" },
535 { 0x00, "Mobile Station Classmark 3" },
536 { 0x00, "Descriptive group or broadcast call reference" },
537 { 0x00, "Group Cipher Key Number" },
538 { 0x00, "PD and SAPI $(CCBS)$" },
540 { 0x00, "Priority Level" },
541 { 0x00, "PLMN List" },
542 /* Radio Resource Management Information Elements 10.5.2, most are from 10.5.1 */
544 * [3] 10.5.2.1a BA Range
546 { 0x00, "Cell Channel Description" }, /* [3] 10.5.2.1b */
547 /* [3] 10.5.2.1c BA List Pref
548 * [3] 10.5.2.1d UTRAN Frequency List
549 * [3] 10.5.2.1e Cell selection indicator after release of all TCH and SDCCH IE
551 { 0x00, "Cell Description" }, /* 10.5.2.2 */
553 * [3] 10.5.2.3 Cell Options (BCCH)
554 * [3] 10.5.2.3a Cell Options (SACCH)
555 * [3] 10.5.2.4 Cell Selection Parameters
556 * [3] 10.5.2.4a (void) */
557 { 0x00, "Channel Description" }, /* 10.5.2.5 */
558 { 0x00, "Channel Description 2" }, /* 10.5.2.5a */
560 { 0x00, "Channel Mode" }, /* [3] 10.5.2.6 */
561 { 0x00, "Channel Mode 2" }, /* [3] 10.5.2.7 */
562 /* [3] 10.5.2.7a UTRAN predefined configuration status information / START-CS / UE CapabilityUTRAN Classmark information element 218
563 * [3] 10.5.2.7b (void) */
564 { 0x00, "Classmark Enquiry Mask" }, /* [3] 10.5.2.7c */
565 /* [3] 10.5.2.7d GERAN Iu Mode Classmark information element */
566 { 0x00, "Channel Needed"}, /* [3] 10.5.2.8 */
567 /* [3] 10.5.2.8a (void) */
568 /* [3] 10.5.2.8b Channel Request Description 2 */
570 { 0x00, "Cipher Mode Setting" }, /* [3] 10.5.2.9 */
571 /* [3] 10.5.2.10 Cipher Response
572 * [3] 10.5.2.11 Control Channel Description
573 * [3] 10.5.2.11a DTM Information Details */
574 { 0x00, "Dynamic ARFCN Mapping" }, /* [3] 10.5.2.11b */
575 { 0x00, "Frequency Channel Sequence" }, /* [3] 10.5.2.12 */
576 { 0x00, "Frequency List" }, /* 10.5.2.13 */
577 { 0x00, "Frequency Short List" }, /* 10.5.2.14 */
578 { 0x00, "Frequency Short List2" }, /* 10.5.2.14a */
579 /* [3] 10.5.2.14b Group Channel Description
580 * [3] 10.5.2.14c GPRS Resumption
581 * [3] 10.5.2.14d GPRS broadcast information
582 * [3] 10.5.2.14e Enhanced DTM CS Release Indication
584 { 0x00, "Handover Reference" }, /* 10.5.2.15 */
586 * [3] 10.5.2.16 IA Rest Octets
587 * [3] 10.5.2.17 IAR Rest Octets
588 * [3] 10.5.2.18 IAX Rest Octets
589 * [3] 10.5.2.19 L2 Pseudo Length
590 * [3] 10.5.2.20 Measurement Results
591 * [3] 10.5.2.20a GPRS Measurement Results
593 { 0x00, "Mobile Allocation" }, /* [3] 10.5.2.21 */
594 { 0x00, "Mobile Time Difference" }, /* [3] 10.5.2.21a */
595 { 0x00, "MultiRate configuration" }, /* [3] 10.5.2.21aa */
597 { 0x00, "Multislot Allocation" }, /* [3] 10.5.2.21b */
599 * [3] 10.5.2.21c NC mode
600 * [3] 10.5.2.22 Neighbour Cell Description
601 * [3] 10.5.2.22a Neighbour Cell Description 2
602 * [3] 10.5.2.22b (void)
603 * [3] 10.5.2.22c NT/N Rest Octets
604 * [3] 10.5.2.23 P1 Rest Octets
605 * [3] 10.5.2.24 P2 Rest Octets
606 * [3] 10.5.2.25 P3 Rest Octets
607 * [3] 10.5.2.25a Packet Channel Description
608 * [3] 10.5.2.25b Dedicated mode or TBF
609 * [3] 10.5.2.25c RR Packet Uplink Assignment
610 * [3] 10.5.2.25d RR Packet Downlink Assignment
611 * [3] 10.5.2.26 Page Mode
612 * [3] 10.5.2.26a (void)
613 * [3] 10.5.2.26b (void)
614 * [3] 10.5.2.26c (void)
615 * [3] 10.5.2.26d (void)
616 * [3] 10.5.2.27 NCC Permitted
618 { 0x00, "Power Command" }, /* 10.5.2.28 */
619 { 0x00, "Power Command and access type" }, /* 10.5.2.28a */
621 * [3] 10.5.2.29 RACH Control Parameters
622 * [3] 10.5.2.30 Request Reference
624 { 0x00, "RR Cause" }, /* 10.5.2.31 */
625 { 0x00, "Synchronization Indication" }, /* 10.5.2.39 */
626 /* [3] 10.5.2.32 SI 1 Rest Octets
627 * [3] 10.5.2.33 SI 2bis Rest Octets
628 * [3] 10.5.2.33a SI 2ter Rest Octets
629 * [3] 10.5.2.33b SI 2quater Rest Octets
630 * [3] 10.5.2.34 SI 3 Rest Octets
631 * [3] 10.5.2.35 SI 4 Rest Octets
632 * [3] 10.5.2.35a SI 6 Rest Octets
633 * [3] 10.5.2.36 SI 7 Rest Octets
634 * [3] 10.5.2.37 SI 8 Rest Octets
635 * [3] 10.5.2.37a SI 9 Rest Octets
636 * [3] 10.5.2.37b SI 13 Rest Octets
637 * [3] 10.5.2.37c (void)
638 * [3] 10.5.2.37d (void)
639 * [3] 10.5.2.37e SI 16 Rest Octets
640 * [3] 10.5.2.37f SI 17 Rest Octets
641 * [3] 10.5.2.37g SI 19 Rest Octets
642 * [3] 10.5.2.37h SI 18 Rest Octets
643 * [3] 10.5.2.37i SI 20 Rest Octets */
644 { 0x00, "Starting Time" }, /* [3] 10.5.2.38 Starting Time */
645 { 0x00, "Timing Advance" }, /* [3] 10.5.2.40 Timing Advance */
646 { 0x00, "Time Difference" }, /* [3] 10.5.2.41 Time Difference */
647 { 0x00, "TLLI" }, /* [3] 10.5.2.41a TLLI */
649 * [3] 10.5.2.42 TMSI/P-TMSI */
650 { 0x00, "VGCS target mode Indication" }, /* [3] 10.5.2.42a */
652 { 0x00, "VGCS Ciphering Parameters" }, /* [3] 10.5.2.42b */
653 /* [3] 10.5.2.43 Wait Indication
654 * [3] 10.5.2.44 SI10 rest octets $(ASCI)$
655 * [3] 10.5.2.45 EXTENDED MEASUREMENT RESULTS
656 * [3] 10.5.2.46 Extended Measurement Frequency List */
657 { 0x00, "Suspension Cause" }, /* [3] 10.5.2.47 */
658 /* [3] 10.5.2.48 APDU ID
659 * [3] 10.5.2.49 APDU Flags
660 * [3] 10.5.2.50 APDU Data
661 * [3] 10.5.2.51 Handover To UTRAN Command
662 * [3] 10.5.2.52 Handover To cdma2000 Command
663 * [3] 10.5.2.53 (void)
664 * [3] 10.5.2.54 (void)
665 * [3] 10.5.2.55 (void)
666 * [3] 10.5.2.56 3G Target Cell */
667 { 0x00, "Dedicated Service Information" }, /* [3] 10.5.2.59 */
670 /* Mobility Management Information Elements 10.5.3 */
671 { 0x00, "Authentication Parameter RAND" },
672 { 0x00, "Authentication Parameter AUTN (UMTS authentication challenge only)" },
673 { 0x00, "Authentication Response Parameter" },
674 { 0x00, "Authentication Response Parameter (extension) (UMTS authentication challenge only)" },
675 { 0x00, "Authentication Failure Parameter (UMTS authentication challenge only)" },
676 { 0x00, "CM Service Type" },
677 { 0x00, "Identity Type" },
679 { 0x00, "Location Updating Type" },
680 { 0x00, "Network Name" },
681 { 0x00, "Reject Cause" },
682 { 0x00, "Follow-on Proceed" },
683 { 0x00, "Time Zone" },
684 { 0x00, "Time Zone and Time" },
685 { 0x00, "CTS Permission" },
686 { 0x00, "LSA Identifier" },
687 { 0x00, "Daylight Saving Time" },
688 { 0x00, "Emergency Number List" },
689 /* Call Control Information Elements 10.5.4 */
691 { 0x00, "Auxiliary States" }, /* 10.5.4.4 Auxiliary states */
692 { 0x00, "Bearer Capability" }, /* 10.5.4.4a Backup bearer capability */
693 { 0x00, "Call Control Capabilities" },
694 { 0x00, "Call State" },
695 { 0x00, "Called Party BCD Number" },
696 { 0x00, "Called Party Subaddress" },
697 { 0x00, "Calling Party BCD Number" },
698 { 0x00, "Calling Party Subaddress" },
700 { 0x00, "CLIR Suppression" },
701 { 0x00, "CLIR Invocation" },
702 { 0x00, "Congestion Level" },
703 { 0x00, "Connected Number" },
704 { 0x00, "Connected Subaddress" },
705 { 0x00, "Facility" },
706 { 0x00, "High Layer Compatibility" },
707 { 0x00, "Keypad Facility" },
708 { 0x00, "Low Layer Compatibility" },
709 { 0x00, "More Data" },
710 { 0x00, "Notification Indicator" },
711 { 0x00, "Progress Indicator" },
712 { 0x00, "Recall type $(CCBS)$" },
713 { 0x00, "Redirecting Party BCD Number" },
714 { 0x00, "Redirecting Party Subaddress" },
715 { 0x00, "Repeat Indicator" },
716 { 0x00, "Reverse Call Setup Direction" },
717 { 0x00, "SETUP Container $(CCBS)$" },
719 { 0x00, "SS Version Indicator" },
720 { 0x00, "User-user" },
721 { 0x00, "Alerting Pattern $(NIA)$" }, /* 10.5.4.26 Alerting Pattern $(NIA)$ */
722 { 0x00, "Allowed Actions $(CCBS)$" },
723 { 0x00, "Stream Identifier" },
724 { 0x00, "Network Call Control Capabilities" },
725 { 0x00, "Cause of No CLI" },
726 { 0x00, "Immediate Modification Indicator" }, /* 10.5.4.30 Cause of No CLI */
728 { 0x00, "Supported Codec List" }, /* 10.5.4.32 Supported codec list */
729 { 0x00, "Service Category" }, /* 10.5.4.33 Service category */
730 /* 10.5.4.34 Redial */
731 /* 10.5.4.35 Network-initiated Service Upgrade indicator */
732 /* GPRS Mobility Management Information Elements 10.5.5 */
733 { 0x00, "Attach Result" },
734 { 0x00, "Attach Type" },
735 { 0x00, "Cipher Algorithm" },
736 { 0x00, "TMSI Status" },
737 { 0x00, "Detach Type" },
738 { 0x00, "DRX Parameter" },
739 { 0x00, "Force to Standby" },
740 { 0x00, "Force to Standby" },
741 { 0x00, "P-TMSI Signature" },
742 { 0x00, "P-TMSI Signature 2" },
743 { 0x00, "Identity Type 2" },
744 { 0x00, "IMEISV Request" },
745 { 0x00, "Receive N-PDU Numbers List" },
746 { 0x00, "MS Network Capability" },
747 { 0x00, "MS Radio Access Capability" },
748 { 0x00, "GMM Cause" },
749 { 0x00, "Routing Area Identification" },
750 { 0x00, "Update Result" },
751 { 0x00, "Update Type" },
752 { 0x00, "A&C Reference Number" },
753 { 0x00, "A&C Reference Number" },
754 { 0x00, "Service Type" },
755 { 0x00, "Cell Notification" },
756 { 0x00, "PS LCS Capability" },
757 { 0x00, "Network Feature Support" },
758 { 0x00, "Inter RAT information container" },
759 /* Short Message Service Information Elements [5] 8.1.4 */
760 { 0x00, "CP-User Data" },
761 { 0x00, "CP-Cause" },
762 /* Short Message Service Information Elements [5] 8.2 */
763 { 0x00, "RP-Message Reference" },
764 { 0x00, "RP-Origination Address" },
765 { 0x00, "RP-Destination Address" },
766 { 0x00, "RP-User Data" },
767 { 0x00, "RP-Cause" },
768 /* Session Management Information Elements 10.5.6 */
769 { 0x00, "Access Point Name" },
770 { 0x00, "Network Service Access Point Identifier" },
771 { 0x00, "Protocol Configuration Options" },
772 { 0x00, "Packet Data Protocol Address" },
773 { 0x00, "Quality Of Service" },
774 { 0x00, "SM Cause" },
775 { 0x00, "Linked TI" },
776 { 0x00, "LLC Service Access Point Identifier" },
777 { 0x00, "Tear Down Indicator" },
778 { 0x00, "Packet Flow Identifier" },
779 { 0x00, "Traffic Flow Template" },
780 /* GPRS Common Information Elements 10.5.7 */
781 { 0x00, "PDP Context Status" },
782 { 0x00, "Radio Priority" },
783 { 0x00, "GPRS Timer" },
784 { 0x00, "GPRS Timer 2" },
785 { 0x00, "Radio Priority 2"},
786 { 0x00, "MBMS context status"},
787 { 0x00, "Spare Nibble"},
791 const gchar *gsm_a_pd_str[] = {
792 "Group Call Control",
793 "Broadcast Call Control",
794 "Reserved: was allocated in earlier phases of the protocol",
795 "Call Control; call related SS messages",
796 "GPRS Transparent Transport Protocol (GTTP)",
797 "Mobility Management messages",
798 "Radio Resources Management messages",
800 "GPRS Mobility Management messages",
802 "GPRS Session Management messages",
803 "Non call related SS messages",
806 "Reserved for extension of the PD to one octet length",
807 "Reserved for tests procedures"
809 /* L3 Protocol discriminator values according to TS 24 007 (6.4.0) */
810 static const value_string protocol_discriminator_vals[] = {
811 {0x0, "Group call control"},
812 {0x1, "Broadcast call control"},
813 {0x2, "Reserved: was allocated in earlier phases of the protocol"},
814 {0x3, "Call Control; call related SS messages"},
815 {0x4, "GPRS Transparent Transport Protocol (GTTP)"},
816 {0x5, "Mobility Management messages"},
817 {0x6, "Radio Resources Management messages"},
819 {0x8, "GPRS mobility management messages"},
820 {0x9, "SMS messages"},
821 {0xa, "GPRS session management messages"},
822 {0xb, "Non call related SS messages"},
823 {0xc, "Location services specified in 3GPP TS 44.071 [8a]"},
825 {0xe, "Reserved for extension of the PD to one octet length "},
826 {0xf, "Reserved for tests procedures described in 3GPP TS 44.014 [5a] and 3GPP TS 34.109 [17a]."},
830 static const value_string gsm_a_pd_short_str_vals[] = {
831 {0x0, "GCC"}, /* Group Call Control */
832 {0x1, "BCC"}, /* Broadcast Call Control */
833 {0x2, "Reserved"}, /* : was allocated in earlier phases of the protocol */
834 {0x3, "CC"}, /* Call Control; call related SS messages */
835 {0x4, "GTTP"}, /* GPRS Transparent Transport Protocol (GTTP) */
836 {0x5, "MM"}, /* Mobility Management messages */
837 {0x6, "RR"}, /* Radio Resources Management messages */
839 {0x8, "GMM"}, /* GPRS Session Management messages */
841 {0xa, "SM"}, /* GPRS Session Management messages */
843 {0xc, "LS"}, /* Location Services */
845 {0xe, "Reserved"}, /* for extension of the PD to one octet length */
846 {0xf, "Reserved"}, /* for tests procedures described in 3GPP TS 44.014 [5a] and 3GPP TS 34.109 [17a].*/
849 static const value_string bssap_cc_values[] = {
850 { 0x00, "not further specified" },
851 { 0x80, "FACCH or SDCCH" },
855 static const value_string bssap_sapi_values[] = {
856 { 0x00, "RR/MM/CC" },
860 /* Mobile Station Classmark Value strings
863 /* Mobile Station Classmark
866 const value_string gsm_a_msc_rev_vals[] = {
867 { 0, "Reserved for GSM phase 1"},
868 { 1, "Used by GSM phase 2 mobile stations"},
869 { 2, "Used by mobile stations supporting R99 or later versions of the protocol"},
870 { 3, "Reserved for future use"},
874 /* ES IND (octet 3, bit 5) "Controlled Early Classmark Sending" option implementation */
875 static const value_string ES_IND_vals[] = {
876 { 0, "Controlled Early Classmark Sending option is not implemented in the MS"},
877 { 1, "Controlled Early Classmark Sending option is implemented in the MS"},
880 /* A5/1 algorithm supported (octet 3, bit 4 */
881 static const value_string A5_1_algorithm_sup_vals[] = {
882 { 0, "encryption algorithm A5/1 available"},
883 { 1, "encryption algorithm A5/1 not available"},
886 /* RF Power Capability (Octet 3) */
887 static const value_string RF_power_capability_vals[] = {
893 { 7, "RF Power capability is irrelevant in this information element"},
896 /* PS capability (pseudo-synchronization capability) (octet 4) */
897 static const value_string ps_sup_cap_vals[] = {
898 { 0, "PS capability not present"},
899 { 1, "PS capability present"},
902 /* SS Screening Indicator (octet 4)defined in 3GPP TS 24.080 */
903 static const value_string SS_screening_indicator_vals[] = {
904 { 0, "Default value of phase 1"},
905 { 1, "Capability of handling of ellipsis notation and phase 2 error handling "},
906 { 2, "For future use"},
907 { 3, "For future use"},
910 /* SM capability (MT SMS pt to pt capability) (octet 4)*/
911 static const value_string SM_capability_vals[] = {
912 { 0, "Mobile station does not support mobile terminated point to point SMS"},
913 { 1, "Mobile station supports mobile terminated point to point SMS"},
916 /* VBS notification reception (octet 4) */
917 static const value_string VBS_notification_rec_vals[] = {
918 { 0, "no VBS capability or no notifications wanted"},
919 { 1, "VBS capability and notifications wanted"},
922 /* VGCS notification reception (octet 4) */
923 static const value_string VGCS_notification_rec_vals[] = {
924 { 0, "no VGCS capability or no notifications wanted"},
925 { 1, "VGCS capability and notifications wanted"},
928 /* FC Frequency Capability (octet 4 ) */
929 static const value_string FC_frequency_cap_vals[] = {
930 { 0, "The MS does not support the E-GSM or R-GSM band"},
931 { 1, "The MS does support the E-GSM or R-GSM "},
934 /* CM3 (octet 5, bit 8) */
935 static const value_string CM3_vals[] = {
936 { 0, "The MS does not support any options that are indicated in CM3"},
937 { 1, "The MS supports options that are indicated in classmark 3 IE"},
940 /* LCS VA capability (LCS value added location request notification capability) (octet 5,bit 6) */
941 static const value_string LCS_VA_cap_vals[] = {
942 { 0, "LCS value added location request notification capability not supported"},
943 { 1, "LCS value added location request notification capability supported"},
946 /* UCS2 treatment (octet 5, bit 5) */
947 static const value_string UCS2_treatment_vals[] = {
948 { 0, "the ME has a preference for the default alphabet"},
949 { 1, "the ME has no preference between the use of the default alphabet and the use of UCS2"},
952 /* SoLSA (octet 5, bit 4) */
953 static const value_string SoLSA_vals[] = {
954 { 0, "The ME does not support SoLSA"},
955 { 1, "The ME supports SoLSA"},
958 /* CMSP: CM Service Prompt (octet 5, bit 3) */
959 static const value_string CMSP_vals[] = {
960 { 0, "Network initiated MO CM connection request not supported"},
961 { 1, "Network initiated MO CM connection request supported for at least one CM protocol"},
964 /* A5/3 algorithm supported (octet 5, bit 2) */
965 static const value_string A5_3_algorithm_sup_vals[] = {
966 { 0, "encryption algorithm A5/3 not available"},
967 { 1, "encryption algorithm A5/3 available"},
971 /* A5/2 algorithm supported (octet 5, bit 1) */
972 static const value_string A5_2_algorithm_sup_vals[] = {
973 { 0, "encryption algorithm A5/2 not available"},
974 { 1, "encryption algorithm A5/2 available"},
978 static const value_string gsm_a_algorithm_identifier_vals[] = {
979 { 0, "Cipher with algorithm A5/1"},
980 { 1, "Cipher with algorithm A5/2"},
981 { 2, "Cipher with algorithm A5/3"},
982 { 3, "Cipher with algorithm A5/4"},
983 { 4, "Cipher with algorithm A5/5"},
984 { 5, "Cipher with algorithm A5/6"},
985 { 6, "Cipher with algorithm A5/7"},
990 static const value_string mobile_identity_type_vals[] = {
995 { 5, "TMGI and optional MBMS Session Identity"}, /* ETSI TS 124 008 V6.8.0 (2005-03) p326 */
1000 static const value_string oddevenind_vals[] = {
1001 { 0, "Even number of identity digits"},
1002 { 1, "Odd number of identity digits"},
1006 /* RR cause value (octet 2) TS 44.018 6.11.0*/
1007 static const value_string gsm_a_rr_RR_cause_vals[] = {
1008 { 0, "Normal event"},
1009 { 1, "Abnormal release, unspecified"},
1010 { 2, "Abnormal release, channel unacceptable"},
1011 { 3, "Abnormal release, timer expired"},
1012 { 4, "Abnormal release, no activity on the radio path"},
1013 { 5, "Preemptive release"},
1014 { 6, "UTRAN configuration unknown"},
1015 { 8, "Handover impossible, timing advance out of range"},
1016 { 9, "Channel mode unacceptable"},
1017 { 10, "Frequency not implemented"},
1018 { 13, "Originator or talker leaving group call area"},
1019 { 12, "Lower layer failure"},
1020 { 0x41, "Call already cleared"},
1021 { 0x5f, "Semantically incorrect message"},
1022 { 0x60, "Invalid mandatory information"},
1023 { 0x61, "Message type non-existent or not implemented"},
1024 { 0x62, "Message type not compatible with protocol state"},
1025 { 0x64, "Conditional IE error"},
1026 { 0x65, "No cell allocation available"},
1027 { 0x6f, "Protocol error unspecified"},
1030 /* Cell identification discriminator */
1031 static const value_string gsm_a_rr_cell_id_disc_vals[] = {
1032 { 0, "The whole Cell Global Identification, CGI, is used to identify the cells."},
1033 { 1, "Location Area Code, LAC, and Cell Identify, CI, is used to identify the cells."},
1034 { 2, "Cell Identity, CI, is used to identify the cells."},
1035 { 3, "No cell is associated with the transaction."},
1036 { 4, "Location Area Identification, LAI, is used to identify all cells within a Location Area."},
1037 { 5, "Location Area Code, LAC, is used to identify all cells within a location area."},
1038 { 6, "All cells on the BSS are identified."},
1039 { 8, "Intersystem Handover to UTRAN or cdma2000. PLMN-ID, LAC, and RNC-ID, are encoded to identify the target RNC."},
1040 { 9, "Intersystem Handover to UTRAN or cdma2000. The RNC-ID is coded to identify the target RNC."},
1041 { 10, "Intersystem Handover to UTRAN or cdma2000. LAC and RNC-ID are encoded to identify the target RNC."},
1046 #define DTAP_PD_MASK 0x0f
1047 #define DTAP_SKIP_MASK 0xf0
1048 #define DTAP_TI_MASK DTAP_SKIP_MASK
1049 #define DTAP_TIE_PRES_MASK 0x07 /* after TI shifted to right */
1050 #define DTAP_TIE_MASK 0x7f
1052 #define DTAP_MM_IEI_MASK 0x3f
1053 #define DTAP_RR_IEI_MASK 0xff
1054 #define DTAP_CC_IEI_MASK 0x3f
1055 #define DTAP_GMM_IEI_MASK 0xff
1056 #define DTAP_SMS_IEI_MASK 0xff
1057 #define DTAP_SM_IEI_MASK 0xff
1058 #define DTAP_SS_IEI_MASK 0x3f
1060 /* Initialize the protocol and registered fields */
1061 static int proto_a_bssmap = -1;
1062 static int proto_a_dtap = -1;
1063 static int proto_a_rp = -1;
1065 static int gsm_a_tap = -1;
1067 static int hf_gsm_a_none = -1;
1068 static int hf_gsm_a_bssmap_msg_type = -1;
1069 static int hf_gsm_a_dtap_msg_mm_type = -1;
1070 static int hf_gsm_a_dtap_msg_rr_type = -1;
1071 static int hf_gsm_a_dtap_msg_cc_type = -1;
1072 static int hf_gsm_a_dtap_msg_gmm_type = -1;
1073 static int hf_gsm_a_dtap_msg_sms_type = -1;
1074 static int hf_gsm_a_dtap_msg_sm_type = -1;
1075 static int hf_gsm_a_dtap_msg_ss_type = -1;
1076 static int hf_gsm_a_rp_msg_type = -1;
1077 static int hf_gsm_a_length = -1;
1078 static int hf_gsm_a_bssmap_elem_id = -1;
1079 static int hf_gsm_a_dtap_elem_id = -1;
1080 static int hf_gsm_a_imsi = -1;
1081 static int hf_gsm_a_tmsi = -1;
1082 static int hf_gsm_a_imei = -1;
1083 static int hf_gsm_a_imeisv = -1;
1084 static int hf_gsm_a_cld_party_bcd_num = -1;
1085 static int hf_gsm_a_clg_party_bcd_num = -1;
1086 static int hf_gsm_a_cell_ci = -1;
1087 static int hf_gsm_a_cell_lac = -1;
1088 static int hf_gsm_a_dlci_cc = -1;
1089 static int hf_gsm_a_dlci_spare = -1;
1090 static int hf_gsm_a_dlci_sapi = -1;
1091 static int hf_gsm_a_bssmap_cause = -1;
1092 static int hf_gsm_a_dtap_cause = -1;
1094 static int hf_gsm_a_MSC_rev = -1;
1095 static int hf_gsm_a_ES_IND = -1;
1096 static int hf_gsm_a_qos_traffic_cls = -1;
1097 static int hf_gsm_a_qos_del_order = -1;
1098 static int hf_gsm_a_qos_del_of_err_sdu = -1;
1099 static int hf_gsm_a_qos_ber = -1;
1100 static int hf_gsm_a_qos_sdu_err_rat = -1;
1101 static int hf_gsm_a_qos_traff_hdl_pri = -1;
1102 static int hf_gsm_a_A5_1_algorithm_sup = -1;
1103 static int hf_gsm_a_RF_power_capability = -1;
1104 static int hf_gsm_a_ps_sup_cap = -1;
1105 static int hf_gsm_a_SS_screening_indicator = -1;
1106 static int hf_gsm_a_SM_capability = -1;
1107 static int hf_gsm_a_VBS_notification_rec = -1;
1108 static int hf_gsm_a_VGCS_notification_rec = -1;
1109 static int hf_gsm_a_FC_frequency_cap = -1;
1110 static int hf_gsm_a_CM3 = -1;
1111 static int hf_gsm_a_LCS_VA_cap = -1;
1112 static int hf_gsm_a_UCS2_treatment = -1;
1113 static int hf_gsm_a_SoLSA = -1;
1114 static int hf_gsm_a_CMSP = -1;
1115 static int hf_gsm_a_A5_3_algorithm_sup= -1;
1116 static int hf_gsm_a_A5_2_algorithm_sup = -1;
1118 static int hf_gsm_a_odd_even_ind = -1;
1119 static int hf_gsm_a_mobile_identity_type = -1;
1120 static int hf_gsm_a_L3_protocol_discriminator = -1;
1121 static int hf_gsm_a_skip_ind = -1;
1123 static int hf_gsm_a_bcc = -1;
1124 static int hf_gsm_a_ncc = -1;
1125 static int hf_gsm_a_bcch_arfcn = -1;
1126 static int hf_gsm_a_rr_ho_ref_val = -1;
1127 static int hf_gsm_a_b7spare = -1;
1128 static int hf_gsm_a_b8spare = -1;
1129 static int hf_gsm_a_rr_pow_cmd_atc = -1;
1130 static int hf_gsm_a_rr_pow_cmd_epc = -1;
1131 static int hf_gsm_a_rr_pow_cmd_fpcepc = -1;
1132 static int hf_gsm_a_rr_pow_cmd_powlev = -1;
1133 static int hf_gsm_a_rr_sync_ind_nci = -1;
1134 static int hf_gsm_a_rr_sync_ind_rot = -1;
1135 static int hf_gsm_a_rr_sync_ind_si = -1;
1136 static int hf_gsm_a_rr_format_id = -1;
1137 static int hf_gsm_a_rr_channel_mode = -1;
1138 static int hf_gsm_a_rr_channel_mode2 = -1;
1139 static int hf_gsm_a_rr_sc = -1;
1140 static int hf_gsm_a_algorithm_id = -1;
1141 static int hf_gsm_a_rr_multirate_speech_ver = -1;
1142 static int hf_gsm_a_rr_NCSB = -1;
1143 static int hf_gsm_a_rr_ICMI = -1;
1144 static int hf_gsm_a_rr_start_mode = -1;
1145 static int hf_gsm_a_rr_timing_adv = -1;
1146 static int hf_gsm_a_rr_time_diff = -1;
1147 static int hf_gsm_a_rr_tlli = -1;
1148 static int hf_gsm_a_rr_target_mode = -1;
1149 static int hf_gsm_a_rr_group_cipher_key_number = -1;
1150 static int hf_gsm_a_rr_last_segment = -1;
1151 static int hf_gsm_a_gmm_split_on_ccch = -1;
1152 static int hf_gsm_a_gmm_non_drx_timer = -1;
1153 static int hf_gsm_a_gmm_cn_spec_drs_cycle_len_coef = -1;
1154 static int hf_gsm_a_rr_RR_cause = -1;
1155 static int hf_gsm_a_be_cell_id_disc = -1;
1156 static int hf_gsm_a_be_rnc_id = -1;
1157 static int hf_gsm_a_rr_cm_cng_msg_req = -1;
1158 static int hf_gsm_a_rr_utran_cm_cng_msg_req = -1;
1159 static int hf_gsm_a_rr_cdma200_cm_cng_msg_req = -1;
1160 static int hf_gsm_a_rr_geran_iu_cm_cng_msg_req = -1;
1161 static int hf_gsm_a_rr_chnl_needed_ch1 = -1;
1162 static int hf_gsm_a_rr_chnl_needed_ch2 = -1;
1163 static int hf_gsm_a_rr_suspension_cause = -1;
1164 static int hf_ROS_component = -1;
1165 static int hf_ROS_invoke = -1; /* Invoke */
1166 static int hf_ROS_returnResultLast = -1; /* ReturnResult */
1167 static int hf_ROS_returnError = -1; /* ReturnError */
1168 static int hf_ROS_reject = -1; /* Reject */
1169 static int hf_ROS_invokeID = -1; /* InvokeIdType */
1170 static int hf_ROS_linkedID = -1; /* InvokeIdType */
1171 static int hf_ROS_opCode = -1; /* OPERATION */
1172 static int hf_ROS_parameter = -1; /* Parameter */
1173 static int hf_ROS_resultretres = -1; /* T_resultretres */
1174 static int hf_ROS_errorCode = -1; /* ErrorCode */
1175 static int hf_ROS_invokeIDRej = -1; /* T_invokeIDRej */
1176 static int hf_ROS_derivable = -1; /* InvokeIdType */
1177 static int hf_ROS_not_derivable = -1; /* NULL */
1178 static int hf_ROS_problem = -1; /* T_problem */
1179 static int hf_ROS_generalProblem = -1; /* GeneralProblem */
1180 static int hf_ROS_invokeProblem = -1; /* InvokeProblem */
1181 static int hf_ROS_returnResultProblem = -1; /* ReturnResultProblem */
1182 static int hf_ROS_returnErrorProblem = -1; /* ReturnErrorProblem */
1183 static int hf_ROS_localValue = -1; /* INTEGER */
1184 static int hf_ROS_globalValue = -1; /* OBJECT_IDENTIFIER */
1185 static int hf_ROS_nationaler = -1; /* INTEGER_M32768_32767 */
1186 static int hf_ROS_privateer = -1; /* INTEGER */
1187 static int hf_gsm_a_rr_set_of_amr_codec_modes_v1_b8 = -1;
1188 static int hf_gsm_a_rr_set_of_amr_codec_modes_v1_b7 = -1;
1189 static int hf_gsm_a_rr_set_of_amr_codec_modes_v1_b6 = -1;
1190 static int hf_gsm_a_rr_set_of_amr_codec_modes_v1_b5 = -1;
1191 static int hf_gsm_a_rr_set_of_amr_codec_modes_v1_b4 = -1;
1192 static int hf_gsm_a_rr_set_of_amr_codec_modes_v1_b3 = -1;
1193 static int hf_gsm_a_rr_set_of_amr_codec_modes_v1_b2 = -1;
1194 static int hf_gsm_a_rr_set_of_amr_codec_modes_v1_b1 = -1;
1195 static int hf_gsm_a_rr_set_of_amr_codec_modes_v2_b5 = -1;
1196 static int hf_gsm_a_rr_set_of_amr_codec_modes_v2_b4 = -1;
1197 static int hf_gsm_a_rr_set_of_amr_codec_modes_v2_b3 = -1;
1198 static int hf_gsm_a_rr_set_of_amr_codec_modes_v2_b2 = -1;
1199 static int hf_gsm_a_rr_set_of_amr_codec_modes_v2_b1 = -1;
1201 static int hf_gsm_a_extension = -1;
1202 static int hf_gsm_a_type_of_number = -1;
1203 static int hf_gsm_a_numbering_plan_id = -1;
1205 static int hf_gsm_a_ptmsi_sig =-1;
1206 static int hf_gsm_a_ptmsi_sig2 =-1;
1208 static int hf_gsm_a_tft_op_code = -1;
1209 static int hf_gsm_a_tft_e_bit = -1;
1210 static int hf_gsm_a_tft_pkt_flt = -1;
1211 static int hf_gsm_a_tft_ip4_address = -1;
1212 static int hf_gsm_a_tft_ip4_mask = -1;
1213 static int hf_gsm_a_tft_ip6_address = -1;
1214 static int hf_gsm_a_tft_ip6_mask = -1;
1215 static int hf_gsm_a_tft_protocol_header = -1;
1216 static int hf_gsm_a_tft_port = -1;
1217 static int hf_gsm_a_tft_port_low = -1;
1218 static int hf_gsm_a_tft_port_high = -1;
1219 static int hf_gsm_a_tft_security = -1;
1220 static int hf_gsm_a_tft_traffic_mask = -1;
1221 static int hf_gsm_a_tft_flow = -1;
1223 static int hf_gsm_a_apdu_protocol_id = -1;
1224 static int hf_gsm_a_lsa_id = -1;
1226 /* Initialize the subtree pointers */
1227 static gint ett_bssmap_msg = -1;
1228 static gint ett_dtap_msg = -1;
1229 static gint ett_rp_msg = -1;
1230 static gint ett_elems = -1;
1231 static gint ett_elem = -1;
1232 static gint ett_dtap_oct_1 = -1;
1233 static gint ett_cm_srvc_type = -1;
1234 static gint ett_gsm_enc_info = -1;
1235 static gint ett_cell_list = -1;
1236 static gint ett_dlci = -1;
1237 static gint ett_bc_oct_3a = -1;
1238 static gint ett_bc_oct_4 = -1;
1239 static gint ett_bc_oct_5 = -1;
1240 static gint ett_bc_oct_5a = -1;
1241 static gint ett_bc_oct_5b = -1;
1242 static gint ett_bc_oct_6 = -1;
1243 static gint ett_bc_oct_6a = -1;
1244 static gint ett_bc_oct_6b = -1;
1245 static gint ett_bc_oct_6c = -1;
1246 static gint ett_bc_oct_6d = -1;
1247 static gint ett_bc_oct_6e = -1;
1248 static gint ett_bc_oct_6f = -1;
1249 static gint ett_bc_oct_6g = -1;
1250 static gint ett_bc_oct_7 = -1;
1252 static gint ett_tc_component = -1;
1253 static gint ett_tc_invoke_id = -1;
1254 static gint ett_tc_linked_id = -1;
1255 static gint ett_tc_opr_code = -1;
1256 static gint ett_tc_err_code = -1;
1257 static gint ett_tc_prob_code = -1;
1258 static gint ett_tc_sequence = -1;
1260 static gint ett_gmm_drx = -1;
1261 static gint ett_gmm_detach_type = -1;
1262 static gint ett_gmm_attach_type = -1;
1263 static gint ett_gmm_context_stat = -1;
1264 static gint ett_gmm_update_type = -1;
1265 static gint ett_gmm_radio_cap = -1;
1267 static gint ett_ros = -1;
1268 static gint ett_ROS_Component = -1;
1269 static gint ett_ROS_Invoke = -1;
1270 static gint ett_ROS_ReturnResult = -1;
1271 static gint ett_ROS_T_resultretres = -1;
1272 static gint ett_ROS_ReturnError = -1;
1273 static gint ett_ROS_Reject = -1;
1274 static gint ett_ROS_T_invokeIDRej = -1;
1275 static gint ett_ROS_T_problem = -1;
1276 static gint ett_ROS_OPERATION = -1;
1277 static gint ett_ROS_ERROR = -1;
1278 static gint ett_ROS_ErrorCode = -1;
1280 static gint ett_sm_tft = -1;
1282 static char a_bigbuf[1024];
1284 static dissector_handle_t data_handle;
1285 static dissector_handle_t bssmap_handle;
1286 static dissector_handle_t dtap_handle;
1287 static dissector_handle_t rp_handle;
1288 static dissector_table_t sms_dissector_table; /* SMS TPDU */
1289 static dissector_table_t gprs_sm_pco_subdissector_table; /* GPRS SM PCO PPP Protocols */
1291 static packet_info *g_pinfo;
1292 static proto_tree *g_tree;
1293 static gint comp_type_tag;
1294 static guint32 localValue;
1296 static sccp_msg_info_t* sccp_msg;
1297 static sccp_assoc_info_t* sccp_assoc;
1300 * this should be set on a per message basis, if possible
1302 #define IS_UPLINK_FALSE 0
1303 #define IS_UPLINK_TRUE 1
1304 #define IS_UPLINK_UNKNOWN 2
1305 static gint is_uplink;
1308 typedef struct dgt_set_t
1310 unsigned char out[15];
1314 static dgt_set_t Dgt_mbcd = {
1316 /* 0 1 2 3 4 5 6 7 8 9 a b c d e */
1317 '0','1','2','3','4','5','6','7','8','9','*','#','a','b','c'
1321 static dgt_set_t Dgt_tbcd = {
1323 /* 0 1 2 3 4 5 6 7 8 9 a b c d e */
1324 '0','1','2','3','4','5','6','7','8','9','?','B','C','*','#'
1328 static dgt_set_t Dgt1_9_bcd = {
1330 /* 0 1 2 3 4 5 6 7 8 9 a b c d e */
1331 '0','1','2','3','4','5','6','7','8','9','?','?','?','?','?'
1338 * Unpack BCD input pattern into output ASCII pattern
1340 * Input Pattern is supplied using the same format as the digits
1342 * Returns: length of unpacked pattern
1346 char *out, /* ASCII pattern out */
1347 guchar *in, /* packed pattern in */
1348 int num_octs, /* Number of octets to unpack */
1349 dgt_set_t *dgt /* Digit definitions */
1358 * unpack first value in byte
1361 *out++ = dgt->out[i & 0x0f];
1365 * unpack second value in byte
1369 if (i == 0x0f) /* odd number bytes - hit filler */
1372 *out++ = dgt->out[i];
1383 /* ELEMENT FUNCTIONS */
1385 #define EXTRANEOUS_DATA_CHECK(edc_len, edc_max_len) \
1386 if ((edc_len) > (edc_max_len)) \
1388 proto_tree_add_text(tree, tvb, \
1389 curr_offset, (edc_len) - (edc_max_len), "Extraneous Data"); \
1390 curr_offset += ((edc_len) - (edc_max_len)); \
1393 #define SHORT_DATA_CHECK(sdc_len, sdc_min_len) \
1394 if ((sdc_len) < (sdc_min_len)) \
1396 proto_tree_add_text(tree, tvb, \
1397 curr_offset, (sdc_len), "Short Data (?)"); \
1398 curr_offset += (sdc_len); \
1399 return(curr_offset - offset); \
1402 #define EXACT_DATA_CHECK(edc_len, edc_eq_len) \
1403 if ((edc_len) != (edc_eq_len)) \
1405 proto_tree_add_text(tree, tvb, \
1406 curr_offset, (edc_len), "Unexpected Data Length"); \
1407 curr_offset += (edc_len); \
1408 return(curr_offset - offset); \
1411 #define NO_MORE_DATA_CHECK(nmdc_len) \
1412 if ((nmdc_len) == (curr_offset - offset)) return(nmdc_len);
1415 * Decode the MCC/MNC from 3 octets in 'octs'
1418 mcc_mnc_aux(guint8 *octs, gchar *mcc, gchar *mnc)
1420 if ((octs[0] & 0x0f) <= 9)
1422 mcc[0] = Dgt_tbcd.out[octs[0] & 0x0f];
1426 mcc[0] = (octs[0] & 0x0f) + 55;
1429 if (((octs[0] & 0xf0) >> 4) <= 9)
1431 mcc[1] = Dgt_tbcd.out[(octs[0] & 0xf0) >> 4];
1435 mcc[1] = ((octs[0] & 0xf0) >> 4) + 55;
1438 if ((octs[1] & 0x0f) <= 9)
1440 mcc[2] = Dgt_tbcd.out[octs[1] & 0x0f];
1444 mcc[2] = (octs[1] & 0x0f) + 55;
1449 if (((octs[1] & 0xf0) >> 4) <= 9)
1451 mnc[2] = Dgt_tbcd.out[(octs[1] & 0xf0) >> 4];
1455 mnc[2] = ((octs[1] & 0xf0) >> 4) + 55;
1458 if ((octs[2] & 0x0f) <= 9)
1460 mnc[0] = Dgt_tbcd.out[octs[2] & 0x0f];
1464 mnc[0] = (octs[2] & 0x0f) + 55;
1467 if (((octs[2] & 0xf0) >> 4) <= 9)
1469 mnc[1] = Dgt_tbcd.out[(octs[2] & 0xf0) >> 4];
1473 mnc[1] = ((octs[2] & 0xf0) >> 4) + 55;
1479 * only a 1 digit MNC (very old)
1483 else if (mnc[2] == 'F')
1486 * only a 2 digit MNC
1498 BE_CIC, /* Circuit Identity Code */
1499 BE_RSVD_1, /* Reserved */
1500 BE_RES_AVAIL, /* Resource Available */
1501 BE_CAUSE, /* Cause */
1502 BE_CELL_ID, /* Cell Identifier */
1503 BE_PRIO, /* Priority */
1504 BE_L3_HEADER_INFO, /* Layer 3 Header Information */
1507 BE_ENC_INFO, /* Encryption Information */
1508 BE_CHAN_TYPE, /* Channel Type */
1509 BE_PERIODICITY, /* Periodicity */
1510 BE_EXT_RES_IND, /* Extended Resource Indicator */
1511 BE_NUM_MS, /* Number Of MSs */
1512 BE_RSVD_2, /* Reserved */
1513 BE_RSVD_3, /* Reserved */
1514 BE_RSVD_4, /* Reserved */
1515 BE_CM_INFO_2, /* Classmark Information Type 2 */
1516 BE_CM_INFO_3, /* Classmark Information Type 3 */
1517 BE_INT_BAND, /* Interference Band To Be Used */
1518 BE_RR_CAUSE, /* RR Cause */
1519 BE_RSVD_5, /* Reserved */
1520 BE_L3_INFO, /* Layer 3 Information */
1522 BE_DOWN_DTX_FLAG, /* Downlink DTX Flag */
1523 BE_CELL_ID_LIST, /* Cell Identifier List */
1524 BE_RESP_REQ, /* Response Request */
1525 BE_RES_IND_METHOD, /* Resource Indication Method */
1526 BE_CM_INFO_1, /* Classmark Information Type 1 */
1527 BE_CIC_LIST, /* Circuit Identity Code List */
1528 BE_DIAG, /* Diagnostic */
1529 BE_L3_MSG, /* Layer 3 Message Contents */
1530 BE_CHOSEN_CHAN, /* Chosen Channel */
1531 BE_TOT_RES_ACC, /* Total Resource Accessible */
1532 BE_CIPH_RESP_MODE, /* Cipher Response Mode */
1533 BE_CHAN_NEEDED, /* Channel Needed */
1534 BE_TRACE_TYPE, /* Trace Type */
1535 BE_TRIGGERID, /* TriggerID */
1536 BE_TRACE_REF, /* Trace Reference */
1537 BE_TRANSID, /* TransactionID */
1538 BE_MID, /* Mobile Identity */
1539 BE_OMCID, /* OMCID */
1540 BE_FOR_IND, /* Forward Indicator */
1541 BE_CHOSEN_ENC_ALG, /* Chosen Encryption Algorithm */
1542 BE_CCT_POOL, /* Circuit Pool */
1543 BE_CCT_POOL_LIST, /* Circuit Pool List */
1544 BE_TIME_IND, /* Time Indication */
1545 BE_RES_SIT, /* Resource Situation */
1546 BE_CURR_CHAN_1, /* Current Channel Type 1 */
1547 BE_QUE_IND, /* Queueing Indicator */
1548 BE_SPEECH_VER, /* Speech Version */
1549 BE_ASS_REQ, /* Assignment Requirement */
1550 BE_TALKER_FLAG, /* Talker Flag */
1551 BE_CONN_REL_REQ, /* Connection Release Requested */
1552 BE_GROUP_CALL_REF, /* Group Call Reference */
1553 BE_EMLPP_PRIO, /* eMLPP Priority */
1554 BE_CONF_EVO_IND, /* Configuration Evolution Indication */
1555 BE_OLD2NEW_INFO, /* Old BSS to New BSS Information */
1556 BE_LSA_ID, /* LSA Identifier */
1557 BE_LSA_ID_LIST, /* LSA Identifier List */
1558 BE_LSA_INFO, /* LSA Information */
1559 BE_LCS_QOS, /* LCS QoS */
1560 BE_LSA_ACC_CTRL, /* LSA access control suppression */
1561 BE_LCS_PRIO, /* LCS Priority */
1562 BE_LOC_TYPE, /* Location Type */
1563 BE_LOC_EST, /* Location Estimate */
1564 BE_POS_DATA, /* Positioning Data */
1565 BE_LCS_CAUSE, /* LCS Cause */
1566 BE_LCS_CLIENT, /* LCS Client Type */
1568 BE_NE_ID, /* Network Element Identity */
1569 BE_GSP_ASSIST_DATA, /* GPS Assistance Data */
1570 BE_DECIPH_KEYS, /* Deciphering Keys */
1571 BE_RET_ERR_REQ, /* Return Error Request */
1572 BE_RET_ERR_CAUSE, /* Return Error Cause */
1573 BE_SEG, /* Segmentation */
1578 #define NUM_GSM_BSSMAP_ELEM (sizeof(gsm_bssmap_elem_strings)/sizeof(value_string))
1579 static gint ett_gsm_bssmap_elem[NUM_GSM_BSSMAP_ELEM];
1585 be_cic(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
1587 guint32 curr_offset;
1591 curr_offset = offset;
1593 value = tvb_get_ntohs(tvb, curr_offset);
1595 other_decode_bitfield_value(a_bigbuf, value, 0xffe0, 16);
1596 proto_tree_add_text(tree,
1597 tvb, curr_offset, 2,
1598 "%s : PCM Multiplexer: %u",
1600 (value & 0xffe0) >> 5);
1602 other_decode_bitfield_value(a_bigbuf, value, 0x001f, 16);
1603 proto_tree_add_text(tree,
1604 tvb, curr_offset, 2,
1605 "%s : Timeslot: %u",
1612 g_snprintf(add_string, string_len, " - (%u) (0x%04x)", value, value);
1614 /* no length check possible */
1616 return(curr_offset - offset);
1623 be_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
1627 guint32 curr_offset;
1628 const gchar *str = NULL;
1630 curr_offset = offset;
1632 oct = tvb_get_guint8(tvb, curr_offset);
1634 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
1635 proto_tree_add_text(tree,
1636 tvb, curr_offset, 1,
1637 "%s : Extension: %s",
1639 (oct & 0x80) ? "extended" : "not extended");
1645 if ((oct & 0x0f) == 0x00)
1647 /* national cause */
1648 switch ((oct & 0x70) >> 4)
1650 case 0: str = "Normal Event"; break;
1651 case 1: str = "Normal Event"; break;
1652 case 2: str = "Resource Unavailable"; break;
1653 case 3: str = "Service or option not available"; break;
1654 case 4: str = "Service or option not implemented"; break;
1655 case 5: str = "Invalid message (e.g., parameter out of range)"; break;
1656 case 6: str = "Protocol error"; break;
1658 str = "Interworking";
1662 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
1663 proto_tree_add_text(tree,
1664 tvb, curr_offset, 1,
1665 "%s : Cause Class: %s",
1669 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
1670 proto_tree_add_text(tree,
1671 tvb, curr_offset, 1,
1672 "%s : National Cause",
1677 proto_tree_add_text(tree, tvb, curr_offset, 1,
1683 g_snprintf(add_string, string_len, " - (National Cause)");
1687 value = tvb_get_guint8(tvb, curr_offset + 1);
1689 other_decode_bitfield_value(a_bigbuf, oct, 0x7f, 8);
1690 proto_tree_add_text(tree,
1691 tvb, curr_offset, 1,
1692 "%s : Cause (MSB): %u",
1694 ((oct & 0x7f) << 8) | value);
1698 other_decode_bitfield_value(a_bigbuf, value, 0xff, 8);
1699 proto_tree_add_text(tree, tvb, curr_offset, 1,
1710 case 0x00: str = "Radio interface message failure"; break;
1711 case 0x01: str = "Radio interface failure"; break;
1712 case 0x02: str = "Uplink quality"; break;
1713 case 0x03: str = "Uplink strength"; break;
1714 case 0x04: str = "Downlink quality"; break;
1715 case 0x05: str = "Downlink strength"; break;
1716 case 0x06: str = "Distance"; break;
1717 case 0x07: str = "O and M intervention"; break;
1718 case 0x08: str = "Response to MSC invocation"; break;
1719 case 0x09: str = "Call control"; break;
1720 case 0x0a: str = "Radio interface failure, reversion to old channel"; break;
1721 case 0x0b: str = "Handover successful"; break;
1722 case 0x0c: str = "Better Cell"; break;
1723 case 0x0d: str = "Directed Retry"; break;
1724 case 0x0e: str = "Joined group call channel"; break;
1725 case 0x0f: str = "Traffic"; break;
1727 case 0x20: str = "Equipment failure"; break;
1728 case 0x21: str = "No radio resource available"; break;
1729 case 0x22: str = "Requested terrestrial resource unavailable"; break;
1730 case 0x23: str = "CCCH overload"; break;
1731 case 0x24: str = "Processor overload"; break;
1732 case 0x25: str = "BSS not equipped"; break;
1733 case 0x26: str = "MS not equipped"; break;
1734 case 0x27: str = "Invalid cell"; break;
1735 case 0x28: str = "Traffic Load"; break;
1736 case 0x29: str = "Preemption"; break;
1738 case 0x30: str = "Requested transcoding/rate adaption unavailable"; break;
1739 case 0x31: str = "Circuit pool mismatch"; break;
1740 case 0x32: str = "Switch circuit pool"; break;
1741 case 0x33: str = "Requested speech version unavailable"; break;
1742 case 0x34: str = "LSA not allowed"; break;
1744 case 0x40: str = "Ciphering algorithm not supported"; break;
1746 case 0x50: str = "Terrestrial circuit already allocated"; break;
1747 case 0x51: str = "Invalid message contents"; break;
1748 case 0x52: str = "Information element or field missing"; break;
1749 case 0x53: str = "Incorrect value"; break;
1750 case 0x54: str = "Unknown Message type"; break;
1751 case 0x55: str = "Unknown Information Element"; break;
1753 case 0x60: str = "Protocol Error between BSS and MSC"; break;
1754 case 0x61: str = "VGCS/VBS call non existent"; break;
1757 if ((oct >= 0x10) && (oct <= 0x17)) { str = "Reserved for international use"; }
1758 else if ((oct >= 0x18) && (oct <= 0x1f)) { str = "Reserved for national use"; }
1759 else if ((oct >= 0x2a) && (oct <= 0x2f)) { str = "Reserved for national use"; }
1760 else if ((oct >= 0x35) && (oct <= 0x3f)) { str = "Reserved for international use"; }
1761 else if ((oct >= 0x41) && (oct <= 0x47)) { str = "Reserved for international use"; }
1762 else if ((oct >= 0x48) && (oct <= 0x4f)) { str = "Reserved for national use"; }
1763 else if ((oct >= 0x56) && (oct <= 0x57)) { str = "Reserved for international use"; }
1764 else if ((oct >= 0x58) && (oct <= 0x5f)) { str = "Reserved for national use"; }
1765 else if ((oct >= 0x62) && (oct <= 0x67)) { str = "Reserved for international use"; }
1766 else if ((oct >= 0x68) && (oct <= 0x6f)) { str = "Reserved for national use"; }
1767 else if ((oct >= 0x70) && (oct <= 0x77)) { str = "Reserved for international use"; }
1768 else if ((oct >= 0x78) && (oct <= 0x7f)) { str = "Reserved for national use"; }
1772 other_decode_bitfield_value(a_bigbuf, oct, 0x7f, 8);
1773 proto_tree_add_uint_format(tree, hf_gsm_a_bssmap_cause,
1774 tvb, curr_offset, 1, oct & 0x7f,
1775 "%s : Cause: (%u) %s",
1783 g_snprintf(add_string, string_len, " - (%u) %s", oct & 0x7f, str);
1786 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
1788 return(curr_offset - offset);
1795 be_tmsi(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
1797 guint32 curr_offset;
1800 curr_offset = offset;
1802 value = tvb_get_ntohl(tvb, curr_offset);
1804 proto_tree_add_uint(tree, hf_gsm_a_tmsi,
1805 tvb, curr_offset, 4,
1809 g_snprintf(add_string, string_len, " - (0x%04x)", value);
1813 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
1815 return(curr_offset - offset);
1822 be_l3_header_info(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
1825 guint32 curr_offset;
1827 curr_offset = offset;
1829 oct = tvb_get_guint8(tvb, curr_offset);
1831 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
1832 proto_tree_add_text(tree,
1833 tvb, curr_offset, 1,
1837 proto_tree_add_item(tree, hf_gsm_a_L3_protocol_discriminator, tvb, curr_offset, 1, FALSE);
1842 NO_MORE_DATA_CHECK(len);
1844 oct = tvb_get_guint8(tvb, curr_offset);
1846 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
1847 proto_tree_add_text(tree,
1848 tvb, curr_offset, 1,
1852 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
1853 proto_tree_add_text(tree,
1854 tvb, curr_offset, 1,
1857 ((oct & 0x08) ? "allocated by receiver" : "allocated by sender"));
1859 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
1860 proto_tree_add_text(tree,
1861 tvb, curr_offset, 1,
1868 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
1870 return(curr_offset - offset);
1877 be_enc_info(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
1882 guint32 curr_offset;
1884 curr_offset = offset;
1886 oct = tvb_get_guint8(tvb, curr_offset);
1893 other_decode_bitfield_value(a_bigbuf, oct, mask, 8);
1894 proto_tree_add_text(tree,
1895 tvb, curr_offset, 1,
1896 "%s : GSM A5/%u: %spermitted",
1899 (mask & oct) ? "" : "not ");
1904 while (mask != 0x01);
1906 other_decode_bitfield_value(a_bigbuf, oct, mask, 8);
1907 proto_tree_add_text(tree,
1908 tvb, curr_offset, 1,
1909 "%s : No encryption: %spermitted",
1911 (mask & oct) ? "" : "not ");
1915 NO_MORE_DATA_CHECK(len);
1917 proto_tree_add_text(tree,
1918 tvb, curr_offset, len - (curr_offset - offset),
1920 tvb_bytes_to_str(tvb, curr_offset, len-(curr_offset-offset) ));
1922 curr_offset += len - (curr_offset - offset);
1924 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
1926 return(curr_offset - offset);
1933 be_chan_type(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
1938 guint32 curr_offset;
1941 curr_offset = offset;
1943 oct = tvb_get_guint8(tvb, curr_offset);
1945 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
1946 proto_tree_add_text(tree,
1947 tvb, curr_offset, 1,
1954 case 1: str = "Speech"; break;
1955 case 2: str = "Data"; break;
1956 case 3: str = "Signalling"; break;
1962 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
1963 proto_tree_add_text(tree,
1964 tvb, curr_offset, 1,
1965 "%s : Speech/Data Indicator: %s",
1970 g_snprintf(add_string, string_len, " - (%s)", str);
1974 NO_MORE_DATA_CHECK(len);
1976 oct = tvb_get_guint8(tvb, curr_offset);
1984 case 0x08: str = "Full rate TCH channel Bm. Prefer full rate TCH"; break;
1985 case 0x09: str = "Half rate TCH channel Lm. Prefer half rate TCH"; break;
1986 case 0x0a: str = "Full or Half rate channel, Full rate preferred changes allowed after first allocation"; break;
1987 case 0x0b: str = "Full or Half rate channel, Half rate preferred changes allowed after first allocation"; break;
1988 case 0x1a: str = "Full or Half rate channel, Full rate preferred changes between full and half rate not allowed after first allocation"; break;
1989 case 0x1b: str = "Full or Half rate channel, Half rate preferred changes between full and half rate not allowed after first allocation"; break;
1990 case 0x0f: str = "Full or Half rate channel, changes allowed after first allocation"; break;
1991 case 0x1f: str = "Full or Half rate channel, changes between full and half rate not allowed after first allocation"; break;
1997 proto_tree_add_text(tree,
1998 tvb, curr_offset, 1,
1999 "Channel Rate and Type: %s",
2004 NO_MORE_DATA_CHECK(len);
2008 oct = tvb_get_guint8(tvb, curr_offset);
2010 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
2011 proto_tree_add_text(tree,
2012 tvb, curr_offset, 1,
2013 "%s : Extension: %s",
2015 (oct & 0x80) ? "extended" : "not extended");
2019 case 0x01: str = "GSM speech full rate version 1"; break;
2020 case 0x11: str = "GSM speech full rate version 2"; break;
2021 case 0x21: str = "GSM speech full rate version 3 (AMR)"; break;
2023 case 0x05: str = "GSM speech half rate version 1"; break;
2024 case 0x15: str = "GSM speech half rate version 2"; break;
2025 case 0x25: str = "GSM speech half rate version 3 (AMR)"; break;
2032 other_decode_bitfield_value(a_bigbuf, oct, 0x7f, 8);
2033 proto_tree_add_text(tree,
2034 tvb, curr_offset, 1,
2035 "%s : Speech version identifier: %s",
2041 while ((len - (curr_offset - offset)) > 0);
2043 else if (sdi == 0x02)
2051 case 0x08: str = "Full rate TCH channel Bm"; break;
2052 case 0x09: str = "Half rate TCH channel Lm"; break;
2053 case 0x0a: str = "Full or Half rate TCH channel, Full rate preferred, changes allowed also after first channel allocation as a result of the request"; break;
2054 case 0x0b: str = "Full or Half rate TCH channel, Half rate preferred, changes allowed also after first channel allocation as a result of the request"; break;
2055 case 0x1a: str = "Full or Half rate TCH channel, Full rate preferred, changes not allowed after first channel allocation as a result of the request"; break;
2056 case 0x1b: str = "Full or Half rate TCH channel. Half rate preferred, changes not allowed after first channel allocation as a result of the request"; break;
2058 if ((oct >= 0x20) && (oct <= 0x27))
2060 str = "Full rate TCH channels in a multislot configuration, changes by the BSS of the the number of TCHs and if applicable the used radio interface rate per channel allowed after first channel allocation as a result of the request";
2062 num_chan = (oct - 0x20) + 1;
2064 else if ((oct >= 0x30) && (oct <= 0x37))
2066 str = "Full rate TCH channels in a multislot configuration, changes by the BSS of the number of TCHs or the used radio interface rate per channel not allowed after first channel allocation as a result of the request";
2068 num_chan = (oct - 0x30) + 1;
2079 proto_tree_add_text(tree,
2080 tvb, curr_offset, 1,
2081 "Channel Rate and Type: Max channels %u, %s",
2087 proto_tree_add_text(tree,
2088 tvb, curr_offset, 1,
2089 "Channel Rate and Type: %s",
2095 NO_MORE_DATA_CHECK(len);
2097 oct = tvb_get_guint8(tvb, curr_offset);
2099 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
2100 proto_tree_add_text(tree,
2101 tvb, curr_offset, 1,
2102 "%s : Extension: %s",
2104 (oct & 0x80) ? "extended" : "not extended");
2106 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
2107 proto_tree_add_text(tree,
2108 tvb, curr_offset, 1,
2109 "%s : %sTransparent service",
2111 (oct & 0x40) ? "Non-" : "");
2117 /* non-transparent */
2121 case 0x00: str = "12 kbit/s if the channel is a full rate TCH, or 6 kbit/s if the channel is a half rate TCH"; break;
2122 case 0x18: str = "14.5 kbit/s"; break;
2123 case 0x10: str = "12 kbits/s"; break;
2124 case 0x11: str = "6 kbits/s"; break;
2134 case 0x18: str = "14.4 kbit/s"; break;
2135 case 0x10: str = "9.6kbit/s"; break;
2136 case 0x11: str = "4.8kbit/s"; break;
2137 case 0x12: str = "2.4kbit/s"; break;
2138 case 0x13: str = "1.2Kbit/s"; break;
2139 case 0x14: str = "600 bit/s"; break;
2140 case 0x15: str = "1200/75 bit/s (1200 network-to-MS / 75 MS-to-network)"; break;
2151 /* non-transparent */
2155 case 0x16: str = "58 kbit/s (4x14.5 kbit/s)"; break;
2156 case 0x14: str = "48.0 / 43.5 kbit/s (4x12 kbit/s or 3x14.5 kbit/s)"; break;
2157 case 0x13: str = "36.0 / 29.0 kbit/s (3x12 kbit/s or 2x14.5 kbit/s)"; break;
2158 case 0x12: str = "24.0 / 24.0 (4x6 kbit/s or 2x12 kbit/s)"; break;
2159 case 0x11: str = "18.0 / 14.5 kbit/s (3x6 kbit/s or 1x14.5 kbit/s)"; break;
2160 case 0x10: str = "12.0 / 12.0 kbit/s (2x6 kbit/s or 1x12 kbit/s)"; break;
2170 case 0x1f: str = "64 kbit/s, bit transparent"; break;
2171 case 0x1e: str = "56 kbit/s, bit transparent"; break;
2172 case 0x1d: str = "56 kbit/s"; break;
2173 case 0x1c: str = "48 kbit/s"; break;
2174 case 0x1b: str = "38.4 kbit/s"; break;
2175 case 0x1a: str = "28.8 kbit/s"; break;
2176 case 0x19: str = "19.2 kbit/s"; break;
2177 case 0x18: str = "14.4 kbit/s"; break;
2178 case 0x10: str = "9.6 kbit/s"; break;
2186 other_decode_bitfield_value(a_bigbuf, oct, 0x3f, 8);
2187 proto_tree_add_text(tree,
2188 tvb, curr_offset, 1,
2195 NO_MORE_DATA_CHECK(len);
2197 oct = tvb_get_guint8(tvb, curr_offset);
2199 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
2200 proto_tree_add_text(tree,
2201 tvb, curr_offset, 1,
2202 "%s : Extension: %s",
2204 (oct & 0x80) ? "extended" : "not extended");
2206 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
2207 proto_tree_add_text(tree,
2208 tvb, curr_offset, 1,
2214 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
2215 proto_tree_add_text(tree,
2216 tvb, curr_offset, 1,
2217 "%s : 14.5 kbit/s (TCH/F14.4) %sallowed",
2219 (oct & 0x08) ? "" : "not ");
2221 other_decode_bitfield_value(a_bigbuf, oct, 0x04, 8);
2222 proto_tree_add_text(tree,
2223 tvb, curr_offset, 1,
2227 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
2228 proto_tree_add_text(tree,
2229 tvb, curr_offset, 1,
2230 "%s : 12.0 kbit/s (TCH F/9.6) %sallowed",
2232 (oct & 0x02) ? "" : "not ");
2234 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
2235 proto_tree_add_text(tree,
2236 tvb, curr_offset, 1,
2237 "%s : 6.0 kbit/s (TCH F/4.8) %sallowed",
2239 (oct & 0x01) ? "" : "not ");
2243 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
2244 proto_tree_add_text(tree,
2245 tvb, curr_offset, 1,
2246 "%s : 14.5/14.4 kbit/s (TCH/F14.4) %sallowed",
2248 (oct & 0x08) ? "" : "not ");
2250 other_decode_bitfield_value(a_bigbuf, oct, 0x04, 8);
2251 proto_tree_add_text(tree,
2252 tvb, curr_offset, 1,
2256 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
2257 proto_tree_add_text(tree,
2258 tvb, curr_offset, 1,
2259 "%s : 12.0/9.6 kbit/s (TCH F/9.6) %sallowed",
2261 (oct & 0x02) ? "" : "not ");
2263 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
2264 proto_tree_add_text(tree,
2265 tvb, curr_offset, 1,
2266 "%s : 6.0/4.8 kbit/s (TCH F/4.8) %sallowed",
2268 (oct & 0x01) ? "" : "not ");
2273 else if (sdi == 0x03)
2279 case 0x00: str = "SDCCH or Full rate TCH channel Bm or Half rate TCH channel Lm"; break;
2280 case 0x01: str = "SDCCH"; break;
2281 case 0x02: str = "SDCCH or Full rate TCH channel Bm"; break;
2282 case 0x03: str = "SDCCH or Half rate TCH channel Lm"; break;
2283 case 0x08: str = "Full rate TCH channel Bm"; break;
2284 case 0x09: str = "Half rate TCH channel Lm"; break;
2285 case 0x0a: str = "Full or Half rate TCH channel, Full rate preferred, changes allowed also after first channel allocation as a result of the request"; break;
2286 case 0x0b: str = "Full or Half rate TCH channel, Half rate preferred, changes allowed also after first channel allocation as a result of the request"; break;
2287 case 0x1a: str = "Full or Half rate TCH channel, Full rate preferred, changes not allowed after first channel allocation as a result of the request"; break;
2288 case 0x1b: str = "Full or Half rate TCH channel. Half rate preferred, changes not allowed after first channel allocation as a result of the request"; break;
2294 proto_tree_add_text(tree,
2295 tvb, curr_offset, 1,
2296 "Channel Rate and Type: %s",
2301 NO_MORE_DATA_CHECK(len);
2303 proto_tree_add_text(tree,
2304 tvb, curr_offset, len - (curr_offset - offset),
2307 curr_offset += len - (curr_offset - offset);
2311 /* unknown format */
2313 proto_tree_add_text(tree,
2314 tvb, curr_offset, len - (curr_offset - offset),
2317 curr_offset += len - (curr_offset - offset);
2320 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
2322 return(curr_offset - offset);
2327 * Formats everything after the discriminator, shared function
2330 be_cell_id_aux(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len, guint8 disc)
2334 guint32 curr_offset;
2339 add_string[0] = '\0';
2340 curr_offset = offset;
2350 case 0x08: /* For intersystem handover from GSM to UMTS or cdma2000: */
2351 octs[0] = tvb_get_guint8(tvb, curr_offset);
2352 octs[1] = tvb_get_guint8(tvb, curr_offset + 1);
2353 octs[2] = tvb_get_guint8(tvb, curr_offset + 2);
2355 mcc_mnc_aux(octs, mcc, mnc);
2357 proto_tree_add_text(tree,
2358 tvb, curr_offset, 3,
2359 "Mobile Country Code (MCC): %s, Mobile Network Code (MNC): %s",
2369 case 0x0a: /*For intersystem handover from GSM to UMTS or cdma2000: */
2373 value = tvb_get_ntohs(tvb, curr_offset);
2375 proto_tree_add_item(tree, hf_gsm_a_cell_lac, tvb, curr_offset, 2, FALSE);
2380 g_snprintf(add_string, string_len, " - LAC (0x%04x)", value);
2384 case 0x09: /* For intersystem handover from GSM to UMTS or cdma2000: */
2386 if ((disc == 0x08) ||(disc == 0x09) || (disc == 0x0a)){
2388 value = tvb_get_ntohs(tvb, curr_offset);
2389 proto_tree_add_item(tree, hf_gsm_a_be_rnc_id, tvb, curr_offset, 2, FALSE);
2393 if (add_string[0] == '\0')
2395 g_snprintf(add_string, string_len, " - RNC-ID (%u)", value);
2399 g_snprintf(add_string, string_len, "%s/RNC-ID (%u)", add_string, value);
2405 if ((disc == 0x04) || (disc == 0x05) || (disc == 0x08)) break;
2413 value = tvb_get_ntohs(tvb, curr_offset);
2415 proto_tree_add_uint(tree, hf_gsm_a_cell_ci, tvb,
2416 curr_offset, 2, value);
2422 if (add_string[0] == '\0')
2424 g_snprintf(add_string, string_len, " - CI (%u)", value);
2428 g_snprintf(add_string, string_len, "%s/CI (%u)", add_string, value);
2434 proto_tree_add_text(tree, tvb, curr_offset, len,
2435 "Cell ID - Unknown format");
2437 curr_offset += (len);
2441 return(curr_offset - offset);
2445 be_cell_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
2449 guint32 curr_offset;
2452 curr_offset = offset;
2454 oct = tvb_get_guint8(tvb, curr_offset);
2456 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
2457 proto_tree_add_text(tree,
2458 tvb, curr_offset, 1,
2462 proto_tree_add_item(tree, hf_gsm_a_be_cell_id_disc, tvb, curr_offset, 1, FALSE);
2466 NO_MORE_DATA_CHECK(len);
2469 be_cell_id_aux(tvb, tree, curr_offset, len - (curr_offset - offset), add_string, string_len, disc);
2471 /* no length check possible */
2473 return(curr_offset - offset);
2480 be_prio(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
2483 guint32 curr_offset;
2487 curr_offset = offset;
2489 oct = tvb_get_guint8(tvb, curr_offset);
2491 proto_tree_add_item(tree, hf_gsm_a_b8spare, tvb, curr_offset, 1, FALSE);
2493 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
2494 proto_tree_add_text(tree,
2495 tvb, curr_offset, 1,
2496 "%s : Preemption Capability Indicator (PCI): this allocation request %s preempt an existing connection",
2498 (oct & 0x40) ? "may" : "shall not");
2500 switch ((oct & 0x3c) >> 2)
2502 case 0x00: str = "Spare"; break;
2503 case 0x0f: str = "priority not used"; break;
2505 str = "1 is highest";
2509 other_decode_bitfield_value(a_bigbuf, oct, 0x3c, 8);
2510 proto_tree_add_text(tree,
2511 tvb, curr_offset, 1,
2512 "%s : Priority Level: (%u) %s",
2518 g_snprintf(add_string, string_len, " - (%u)", (oct & 0x3c) >> 2);
2520 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
2521 proto_tree_add_text(tree,
2522 tvb, curr_offset, 1,
2523 "%s : Queuing Allowed Indicator (QA): queuing %sallowed",
2525 (oct & 0x02) ? "" : "not ");
2527 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
2528 proto_tree_add_text(tree,
2529 tvb, curr_offset, 1,
2530 "%s : Preemption Vulnerability Indicator (PVI): this connection %s be preempted by another allocation request",
2532 (oct & 0x01) ? "might" : "shall not");
2536 /* no length check possible */
2538 return(curr_offset - offset);
2545 be_l3_info(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
2547 guint32 curr_offset;
2550 curr_offset = offset;
2552 proto_tree_add_text(tree, tvb, curr_offset, len,
2553 "Layer 3 Information value");
2556 * dissect the embedded DTAP message
2558 l3_tvb = tvb_new_subset(tvb, curr_offset, len, len);
2560 call_dissector(dtap_handle, l3_tvb, g_pinfo, g_tree);
2564 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
2566 return(curr_offset - offset);
2573 be_dlci(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
2576 guint32 curr_offset;
2577 proto_item *item = NULL;
2578 proto_tree *subtree = NULL;
2581 curr_offset = offset;
2584 proto_tree_add_text(tree, tvb, curr_offset, 1,
2585 "Data Link Connection Identifier");
2587 subtree = proto_item_add_subtree(item, ett_dlci);
2589 oct = tvb_get_guint8(tvb, curr_offset);
2591 proto_tree_add_uint(subtree, hf_gsm_a_dlci_cc, tvb, curr_offset, 1, oct);
2592 proto_tree_add_uint(subtree, hf_gsm_a_dlci_spare, tvb, curr_offset, 1, oct);
2593 proto_tree_add_uint(subtree, hf_gsm_a_dlci_sapi, tvb, curr_offset, 1, oct);
2597 /* no length check possible */
2599 return(curr_offset - offset);
2606 be_down_dtx_flag(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
2609 guint32 curr_offset;
2612 curr_offset = offset;
2614 oct = tvb_get_guint8(tvb, curr_offset);
2616 other_decode_bitfield_value(a_bigbuf, oct, 0xfe, 8);
2617 proto_tree_add_text(tree,
2618 tvb, curr_offset, 1,
2622 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
2623 proto_tree_add_text(tree,
2624 tvb, curr_offset, 1,
2625 "%s : BSS is %s to activate DTX in the downlink direction",
2627 (oct & 0x01) ? "forbidden" : "allowed");
2631 /* no length check possible */
2633 return(curr_offset - offset);
2640 be_cell_id_list(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
2646 guint32 curr_offset;
2647 proto_item *item = NULL;
2648 proto_tree *subtree = NULL;
2650 curr_offset = offset;
2652 oct = tvb_get_guint8(tvb, curr_offset);
2654 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
2655 proto_tree_add_text(tree,
2656 tvb, curr_offset, 1,
2661 proto_tree_add_item(tree, hf_gsm_a_be_cell_id_disc, tvb, curr_offset, 1, FALSE);
2664 NO_MORE_DATA_CHECK(len);
2670 proto_tree_add_text(tree,
2671 tvb, curr_offset, -1,
2675 subtree = proto_item_add_subtree(item, ett_cell_list);
2678 add_string[0] = '\0';
2680 be_cell_id_aux(tvb, subtree, curr_offset, len - (curr_offset - offset), add_string, string_len, disc);
2682 if (add_string && add_string[0] != '\0')
2684 proto_item_append_text(item, "%s", add_string ? add_string : "");
2687 proto_item_set_len(item, consumed);
2689 curr_offset += consumed;
2693 while ((len - (curr_offset - offset)) > 0 && consumed > 0);
2696 g_snprintf(add_string, string_len, " - %u cell%s",
2697 num_cells, plurality(num_cells, "", "s"));
2700 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
2702 return(curr_offset - offset);
2709 be_chosen_chan(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
2712 guint32 curr_offset;
2713 const gchar *str = NULL;
2716 curr_offset = offset;
2718 oct = tvb_get_guint8(tvb, curr_offset);
2720 switch ((oct & 0xf0) >> 4)
2722 case 0: str = "No channel mode indication"; break;
2723 case 9: str = "Speech (full rate or half rate)"; break;
2724 case 14: str = "Data, 14.5 kbit/s radio interface rate"; break;
2725 case 11: str = "Data, 12.0 kbit/s radio interface rate"; break;
2726 case 12: str = "Data, 6.0 kbit/s radio interface rate"; break;
2727 case 13: str = "Data, 3.6 kbit/s radio interface rate"; break;
2728 case 8: str = "Signalling only"; break;
2734 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
2735 proto_tree_add_text(tree,
2736 tvb, curr_offset, 1,
2737 "%s : Channel mode: %s",
2743 case 0: str = "None"; break;
2744 case 1: str = "SDCCH"; break;
2745 case 8: str = "1 Full rate TCH"; break;
2746 case 9: str = "1 Half rate TCH"; break;
2747 case 10: str = "2 Full Rate TCHs"; break;
2748 case 11: str = "3 Full Rate TCHs"; break;
2749 case 12: str = "4 Full Rate TCHs"; break;
2750 case 13: str = "5 Full Rate TCHs"; break;
2751 case 14: str = "6 Full Rate TCHs"; break;
2752 case 15: str = "7 Full Rate TCHs"; break;
2753 case 4: str = "8 Full Rate TCHs"; break;
2759 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
2760 proto_tree_add_text(tree,
2761 tvb, curr_offset, 1,
2768 /* no length check possible */
2770 return(curr_offset - offset);
2777 be_ciph_resp_mode(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
2780 guint32 curr_offset;
2783 curr_offset = offset;
2785 oct = tvb_get_guint8(tvb, curr_offset);
2787 other_decode_bitfield_value(a_bigbuf, oct, 0xfe, 8);
2788 proto_tree_add_text(tree,
2789 tvb, curr_offset, 1,
2793 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
2794 proto_tree_add_text(tree,
2795 tvb, curr_offset, 1,
2796 "%s : IMEISV must %sbe included by the mobile station",
2798 (oct & 0x01) ? "" : "not ");
2802 /* no length check possible */
2804 return(curr_offset - offset);
2812 be_l3_msg(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
2814 guint32 curr_offset;
2817 curr_offset = offset;
2819 proto_tree_add_text(tree, tvb, curr_offset, len,
2820 "Layer 3 Message Contents");
2823 * dissect the embedded DTAP message
2825 l3_tvb = tvb_new_subset(tvb, curr_offset, len, len);
2827 call_dissector(dtap_handle, l3_tvb, g_pinfo, g_tree);
2831 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
2833 return(curr_offset - offset);
2837 * [2] 3.2.2.36 Channel Needed
2839 be_cha_needed(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
2841 guint32 curr_offset;
2844 curr_offset = offset;
2846 /* no length check possible */
2847 proto_tree_add_item(tree, hf_gsm_a_rr_chnl_needed_ch1, tvb, curr_offset, 1, FALSE);
2849 return(curr_offset - offset);
2857 be_for_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
2860 guint32 curr_offset;
2861 const gchar *str = NULL;
2864 curr_offset = offset;
2866 oct = tvb_get_guint8(tvb, curr_offset);
2868 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
2869 proto_tree_add_text(tree,
2870 tvb, curr_offset, 1,
2876 case 1: str = "forward to subsequent BSS, no trace at MSC"; break;
2877 case 2: str = "forward to subsequent BSS, and trace at MSC"; break;
2883 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
2884 proto_tree_add_text(tree,
2885 tvb, curr_offset, 1,
2892 /* no length check possible */
2894 return(curr_offset - offset);
2901 be_chosen_enc_alg(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
2904 guint32 curr_offset;
2905 const gchar *str = NULL;
2908 curr_offset = offset;
2910 oct = tvb_get_guint8(tvb, curr_offset);
2914 case 0x01: str = "No encryption used"; break;
2915 case 0x02: str = "GSM A5/1"; break;
2916 case 0x03: str = "GSM A5/2"; break;
2917 case 0x04: str = "GSM A5/3"; break;
2918 case 0x05: str = "GSM A5/4"; break;
2919 case 0x06: str = "GSM A5/5"; break;
2920 case 0x07: str = "GSM A5/6"; break;
2921 case 0x08: str = "GSM A5/7"; break;
2927 proto_tree_add_text(tree,
2928 tvb, curr_offset, 1,
2929 "Algorithm Identifier: %s",
2935 g_snprintf(add_string, string_len, " - %s", str);
2937 /* no length check possible */
2939 return(curr_offset - offset);
2946 be_cct_pool(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
2949 guint32 curr_offset;
2950 const gchar *str = NULL;
2953 curr_offset = offset;
2955 oct = tvb_get_guint8(tvb, curr_offset);
2961 else if ((oct >= 0x80) && (oct <= 0x8f))
2963 str = ", for national/local use";
2967 str = ", reserved for future international use";
2970 proto_tree_add_text(tree,
2971 tvb, curr_offset, 1,
2972 "Circuit pool number: %u%s",
2979 g_snprintf(add_string, string_len, " - (%u)", oct);
2981 /* no length check possible */
2983 return(curr_offset - offset);
2990 be_curr_chan_1(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
2993 guint32 curr_offset;
2997 curr_offset = offset;
2999 oct = tvb_get_guint8(tvb, curr_offset);
3001 switch ((oct & 0xf0) >> 4)
3003 case 0x00: str = "Signalling only"; break;
3004 case 0x01: str = "Speech (full rate or half rate)"; break;
3005 case 0x06: str = "Data, 14.5 kbit/s radio interface rate"; break;
3006 case 0x03: str = "Data, 12.0 kbit/s radio interface rate"; break;
3007 case 0x04: str = "Data, 6.0 kbit/s radio interface rate"; break;
3008 case 0x05: str = "Data, 3.6 kbit/s radio interface rate"; break;
3014 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
3015 proto_tree_add_text(tree,
3016 tvb, curr_offset, 1,
3017 "%s : Channel Mode: %s",
3023 case 0x01: str = "SDCCH"; break;
3024 case 0x08: str = "1 Full rate TCH"; break;
3025 case 0x09: str = "1 Half rate TCH"; break;
3026 case 0x0a: str = "2 Full Rate TCHs"; break;
3027 case 0x0b: str = "3 Full Rate TCHs"; break;
3028 case 0x0c: str = "4 Full Rate TCHs"; break;
3029 case 0x0d: str = "5 Full Rate TCHs"; break;
3030 case 0x0e: str = "6 Full Rate TCHs"; break;
3031 case 0x0f: str = "7 Full Rate TCHs"; break;
3032 case 0x04: str = "8 Full Rate TCHs"; break;
3038 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
3039 proto_tree_add_text(tree,
3040 tvb, curr_offset, 1,
3041 "%s : Channel: (%u) %s",
3048 /* no length check possible */
3050 return(curr_offset - offset);
3057 be_que_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
3060 guint32 curr_offset;
3063 curr_offset = offset;
3065 oct = tvb_get_guint8(tvb, curr_offset);
3067 other_decode_bitfield_value(a_bigbuf, oct, 0xfc, 8);
3068 proto_tree_add_text(tree,
3069 tvb, curr_offset, 1,
3073 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
3074 proto_tree_add_text(tree,
3075 tvb, curr_offset, 1,
3076 "%s : qri: it is recommended %sto allow queuing",
3078 (oct & 0x02) ? "" : "not ");
3080 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
3081 proto_tree_add_text(tree,
3082 tvb, curr_offset, 1,
3088 /* no length check possible */
3090 return(curr_offset - offset);
3097 be_speech_ver(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
3100 guint32 curr_offset;
3101 const gchar *str = NULL;
3102 const gchar *short_str = NULL;
3105 curr_offset = offset;
3107 oct = tvb_get_guint8(tvb, curr_offset);
3109 proto_tree_add_item(tree, hf_gsm_a_b8spare, tvb, curr_offset, 1, FALSE);
3113 case 0x01: str = "GSM speech full rate version 1"; short_str = "FR1"; break;
3114 case 0x11: str = "GSM speech full rate version 2"; short_str = "FR2"; break;
3115 case 0x21: str = "GSM speech full rate version 3 (AMR)"; short_str = "FR3 (AMR)"; break;
3117 case 0x05: str = "GSM speech half rate version 1"; short_str = "HR1"; break;
3118 case 0x15: str = "GSM speech half rate version 2"; short_str = "HR2"; break;
3119 case 0x25: str = "GSM speech half rate version 3 (AMR)"; short_str = "HR3 (AMR)"; break;
3127 other_decode_bitfield_value(a_bigbuf, oct, 0x7f, 8);
3128 proto_tree_add_text(tree,
3129 tvb, curr_offset, 1,
3130 "%s : Speech version identifier: %s",
3137 g_snprintf(add_string, string_len, " - (%s)", short_str);
3139 /* no length check possible */
3141 return(curr_offset - offset);
3145 * 3.2.2.68 3GPP TS 48.008 version 6.9.0 Release 6
3148 /* BSSLAP the embedded message is as defined in 3GPP TS 48.071
3149 * LLP the embedded message contains a Facility Information Element as defined in 3GPP TS 44.071
3150 * excluding the Facility IEI and length of Facility IEI octets defined in 3GPP TS 44.071.
3151 * SMLCPP the embedded message is as defined in 3GPP TS 48.031
3153 static const value_string gsm_a_apdu_protocol_id_strings[] = {
3162 be_apdu(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
3164 guint32 curr_offset;
3166 curr_offset = offset;
3168 proto_tree_add_text(tree, tvb, curr_offset, len,
3169 "APDU (not displayed)");
3172 * dissect the embedded APDU message
3173 * if someone writes a TS 09.31 dissector
3175 * The APDU octets 4 to n are coded in the same way as the
3176 * equivalent octet in the APDU element of 3GPP TS 49.031.
3179 proto_tree_add_item(tree, hf_gsm_a_apdu_protocol_id, tvb, curr_offset, 1, FALSE);
3183 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3185 return(curr_offset - offset);
3190 /* Common Information Elements 10.5.1 */
3192 DE_CELL_ID, /* Cell Identity */
3193 DE_CIPH_KEY_SEQ_NUM, /* Ciphering Key Sequence Number */
3194 DE_LAI, /* Location Area Identification */
3195 DE_MID, /* Mobile Identity */
3196 DE_MS_CM_1, /* Mobile Station Classmark 1 */
3197 DE_MS_CM_2, /* Mobile Station Classmark 2 */
3198 DE_MS_CM_3, /* Mobile Station Classmark 3 */
3199 DE_D_GB_CALL_REF, /* Descriptive group or broadcast call reference */
3200 DE_G_CIPH_KEY_NUM, /* Group Cipher Key Number */
3201 DE_PD_SAPI, /* PD and SAPI $(CCBS)$ */
3203 DE_PRIO, /* Priority Level */
3204 DE_PLMN_LIST, /* PLMN List */
3206 /* Radio Resource Management Information Elements 10.5.2, most are from 10.5.1 */
3208 * [3] 10.5.2.1a BA Range
3210 DE_RR_CELL_CH_DSC, /* [3] 10.5.2.1b Cell Channel Description */
3212 /* [3] 10.5.2.1c BA List Pref
3213 * [3] 10.5.2.1d UTRAN Frequency List
3214 * [3] 10.5.2.1e Cell selection indicator after release of all TCH and SDCCH IE
3216 DE_RR_CELL_DSC, /* 10.5.2.2 RR Cell Description */
3218 * [3] 10.5.2.3 Cell Options (BCCH)
3219 * [3] 10.5.2.3a Cell Options (SACCH)
3220 * [3] 10.5.2.4 Cell Selection Parameters
3221 * [3] 10.5.2.4a (void)
3223 DE_RR_CH_DSC, /* [3] 10.5.2.5 Channel Description */
3224 DE_RR_CH_DSC2, /* [3] 10.5.2.5a Channel Description 2 */
3225 DE_RR_CH_MODE, /* [3] 10.5.2.6 Channel Mode */
3226 DE_RR_CH_MODE2, /* [3] 10.5.2.7 Channel Mode 2 */
3227 /* [3] 10.5.2.7a UTRAN predefined configuration status information / START-CS / UE CapabilityUTRAN Classmark information element 218
3228 * [3] 10.5.2.7b (void) */
3229 DE_RR_CM_ENQ_MASK, /* [3] 10.5.2.7c Classmark Enquiry Mask */
3230 /* [3] 10.5.2.7d GERAN Iu Mode Classmark information element */
3231 DE_RR_CHNL_NEEDED, /* [3] 10.5.2.8 Channel Needed
3232 * [3] 10.5.2.8a (void)
3233 * [3] 10.5.2.8b Channel Request Description 2 */
3235 DE_RR_CIP_MODE_SET, /* [3] 10.5.2.9 Cipher Mode Setting */
3236 /* [3] 10.5.2.10 Cipher Response
3237 * [3] 10.5.2.11 Control Channel Description
3238 * [3] 10.5.2.11a DTM Information Details */
3239 DE_RR_DYN_ARFCN_MAP, /* [3] 10.5.2.11b Dynamic ARFCN Mapping */
3240 DE_RR_FREQ_CH_SEQ, /* [3] 10.5.2.12 Frequency Channel Sequence */
3241 DE_RR_FREQ_LIST, /* [3] 10.5.2.13 Frequency List */
3242 DE_RR_FREQ_SHORT_LIST, /* [3] 10.5.2.14 Frequency Short List */
3243 DE_RR_FREQ_SHORT_LIST2, /* [3] 10.5.2.14a Frequency Short List 2 */
3244 /* [3] 10.5.2.14b Group Channel Description
3245 * [3] 10.5.2.14c GPRS Resumption
3246 * [3] 10.5.2.14d GPRS broadcast information
3247 * [3] 10.5.2.14e Enhanced DTM CS Release Indication
3250 DE_RR_HO_REF, /* 10.5.2.15 Handover Reference */
3252 * [3] 10.5.2.16 IA Rest Octets
3253 * [3] 10.5.2.17 IAR Rest Octets
3254 * [3] 10.5.2.18 IAX Rest Octets
3255 * [3] 10.5.2.19 L2 Pseudo Length
3256 * [3] 10.5.2.20 Measurement Results
3257 * [3] 10.5.2.20a GPRS Measurement Results
3259 DE_RR_MOB_ALL, /* [3] 10.5.2.21 Mobile Allocation */
3260 DE_RR_MOB_TIME_DIFF, /* [3] 10.5.2.21a Mobile Time Difference */
3261 DE_RR_MULTIRATE_CONF, /* [3] 10.5.2.21aa MultiRate configuration */
3263 DE_RR_MULT_ALL, /* [3] 10.5.2.21b Multislot Allocation */
3266 * [3] 10.5.2.21c NC mode
3267 * [3] 10.5.2.22 Neighbour Cell Description
3268 * [3] 10.5.2.22a Neighbour Cell Description 2
3269 * [3] 10.5.2.22b (void)
3270 * [3] 10.5.2.22c NT/N Rest Octets
3271 * [3] 10.5.2.23 P1 Rest Octets
3272 * [3] 10.5.2.24 P2 Rest Octets
3273 * [3] 10.5.2.25 P3 Rest Octets
3274 * [3] 10.5.2.25a Packet Channel Description
3275 * [3] 10.5.2.25b Dedicated mode or TBF
3276 * [3] 10.5.2.25c RR Packet Uplink Assignment
3277 * [3] 10.5.2.25d RR Packet Downlink Assignment
3278 * [3] 10.5.2.26 Page Mode
3279 * [3] 10.5.2.26a (void)
3280 * [3] 10.5.2.26b (void)
3281 * [3] 10.5.2.26c (void)
3282 * [3] 10.5.2.26d (void)
3283 * [3] 10.5.2.27 NCC Permitted
3285 DE_RR_POW_CMD, /* 10.5.2.28 Power Command */
3286 DE_RR_POW_CMD_AND_ACC_TYPE, /* 10.5.2.28a Power Command and access type */
3288 * [3] 10.5.2.29 RACH Control Parameters
3289 * [3] 10.5.2.30 Request Reference
3291 DE_RR_CAUSE, /* 10.5.2.31 RR Cause */
3292 DE_RR_SYNC_IND, /* 10.5.2.39 Synchronization Indication */
3293 /* [3] 10.5.2.32 SI 1 Rest Octets
3294 * [3] 10.5.2.33 SI 2bis Rest Octets
3295 * [3] 10.5.2.33a SI 2ter Rest Octets
3296 * [3] 10.5.2.33b SI 2quater Rest Octets
3297 * [3] 10.5.2.34 SI 3 Rest Octets
3298 * [3] 10.5.2.35 SI 4 Rest Octets
3299 * [3] 10.5.2.35a SI 6 Rest Octets
3300 * [3] 10.5.2.36 SI 7 Rest Octets
3301 * [3] 10.5.2.37 SI 8 Rest Octets
3302 * [3] 10.5.2.37a SI 9 Rest Octets
3303 * [3] 10.5.2.37b SI 13 Rest Octets
3304 * [3] 10.5.2.37c (void)
3305 * [3] 10.5.2.37d (void)
3306 * [3] 10.5.2.37e SI 16 Rest Octets
3307 * [3] 10.5.2.37f SI 17 Rest Octets
3308 * [3] 10.5.2.37g SI 19 Rest Octets
3309 * [3] 10.5.2.37h SI 18 Rest Octets
3310 * [3] 10.5.2.37i SI 20 Rest Octets */
3311 DE_RR_STARTING_TIME, /* [3] 10.5.2.38 Starting Time */
3312 DE_RR_TIMING_ADV, /* [3] 10.5.2.40 Timing Advance */
3313 DE_RR_TIME_DIFF, /* [3] 10.5.2.41 Time Difference */
3314 DE_RR_TLLI, /* [3] 10.5.2.41a TLLI */
3316 * [3] 10.5.2.42 TMSI/P-TMSI */
3317 DE_RR_VGCS_TAR_MODE_IND, /* [3] 10.5.2.42a VGCS target mode Indication */
3319 DE_RR_VGCS_CIP_PAR, /* [3] 10.5.2.42b VGCS Ciphering Parameters */
3321 /* [3] 10.5.2.43 Wait Indication
3322 * [3] 10.5.2.44 SI10 rest octets $(ASCI)$
3323 * [3] 10.5.2.45 EXTENDED MEASUREMENT RESULTS
3324 * [3] 10.5.2.46 Extended Measurement Frequency List */
3325 DE_RR_SUS_CAU, /* [3] 10.5.2.47 Suspension Cause */
3326 /* [3] 10.5.2.48 APDU ID
3327 * [3] 10.5.2.49 APDU Flags
3328 * [3] 10.5.2.50 APDU Data
3329 * [3] 10.5.2.51 Handover To UTRAN Command
3330 * [3] 10.5.2.52 Handover To cdma2000 Command
3331 * [3] 10.5.2.53 (void)
3332 * [3] 10.5.2.54 (void)
3333 * [3] 10.5.2.55 (void)
3334 * [3] 10.5.2.56 3G Target Cell */
3335 DE_RR_DED_SERV_INF, /* [3] 10.5.2.59 Dedicated Service Information */
3338 /* Mobility Management Information Elements 10.5.3 */
3339 DE_AUTH_PARAM_RAND, /* Authentication Parameter RAND */
3340 DE_AUTH_PARAM_AUTN, /* Authentication Parameter AUTN (UMTS authentication challenge only) */
3341 DE_AUTH_RESP_PARAM, /* Authentication Response Parameter */
3342 DE_AUTH_RESP_PARAM_EXT, /* Authentication Response Parameter (extension) (UMTS authentication challenge only) */
3343 DE_AUTH_FAIL_PARAM, /* Authentication Failure Parameter (UMTS authentication challenge only) */
3344 DE_CM_SRVC_TYPE, /* CM Service Type */
3345 DE_ID_TYPE, /* Identity Type */
3347 DE_LOC_UPD_TYPE, /* Location Updating Type */
3348 DE_NETWORK_NAME, /* Network Name */
3349 DE_REJ_CAUSE, /* Reject Cause */
3350 DE_FOP, /* Follow-on Proceed */
3351 DE_TIME_ZONE, /* Time Zone */
3352 DE_TIME_ZONE_TIME, /* Time Zone and Time */
3353 DE_CTS_PERM, /* CTS Permission */
3354 DE_LSA_ID, /* LSA Identifier */
3355 DE_DAY_SAVING_TIME, /* Daylight Saving Time */
3356 DE_EMERGENCY_NUM_LIST, /* Emergency Number List */
3357 /* Call Control Information Elements 10.5.4 */
3359 DE_AUX_STATES, /* Auxiliary States */
3360 DE_BEARER_CAP, /* Bearer Capability */
3361 DE_CC_CAP, /* Call Control Capabilities */
3362 DE_CALL_STATE, /* Call State */
3363 DE_CLD_PARTY_BCD_NUM, /* Called Party BCD Number */
3364 DE_CLD_PARTY_SUB_ADDR, /* Called Party Subaddress */
3365 DE_CLG_PARTY_BCD_NUM, /* Calling Party BCD Number */
3366 DE_CLG_PARTY_SUB_ADDR, /* Calling Party Subaddress */
3367 DE_CAUSE, /* Cause */
3368 DE_CLIR_SUP, /* CLIR Suppression */
3369 DE_CLIR_INV, /* CLIR Invocation */
3370 DE_CONGESTION, /* Congestion Level */
3371 DE_CONN_NUM, /* Connected Number */
3372 DE_CONN_SUB_ADDR, /* Connected Subaddress */
3373 DE_FACILITY, /* Facility */
3374 DE_HLC, /* High Layer Compatibility */
3375 DE_KEYPAD_FACILITY, /* Keypad Facility */
3376 DE_LLC, /* Low Layer Compatibility */
3377 DE_MORE_DATA, /* More Data */
3378 DE_NOT_IND, /* Notification Indicator */
3379 DE_PROG_IND, /* Progress Indicator */
3380 DE_RECALL_TYPE, /* Recall type $(CCBS)$ */
3381 DE_RED_PARTY_BCD_NUM, /* Redirecting Party BCD Number */
3382 DE_RED_PARTY_SUB_ADDR, /* Redirecting Party Subaddress */
3383 DE_REPEAT_IND, /* Repeat Indicator */
3384 DE_REV_CALL_SETUP_DIR, /* Reverse Call Setup Direction */
3385 DE_SETUP_CONTAINER, /* SETUP Container $(CCBS)$ */
3386 DE_SIGNAL, /* Signal */
3387 DE_SS_VER_IND, /* SS Version Indicator */
3388 DE_USER_USER, /* User-user */
3389 DE_ALERT_PATTERN, /* Alerting Pattern $(NIA)$ */
3390 DE_ALLOWED_ACTIONS, /* Allowed Actions $(CCBS)$ */
3391 DE_SI, /* Stream Identifier */
3392 DE_NET_CC_CAP, /* Network Call Control Capabilities */
3393 DE_CAUSE_NO_CLI, /* Cause of No CLI */
3394 DE_IMM_MOD_IND, /* Immediate Modification Indicator */
3395 DE_SUP_CODEC_LIST, /* Supported Codec List */
3396 DE_SRVC_CAT, /* Service Category */
3397 /* GPRS Mobility Management Information Elements 10.5.5 */
3398 DE_ATTACH_RES, /* [7] 10.5.1 Attach Result*/
3399 DE_ATTACH_TYPE, /* [7] 10.5.2 Attach Type */
3400 DE_CIPH_ALG, /* [7] 10.5.3 Cipher Algorithm */
3401 DE_TMSI_STAT, /* [7] 10.5.4 TMSI Status */
3402 DE_DETACH_TYPE, /* [7] 10.5.5 Detach Type */
3403 DE_DRX_PARAM, /* [7] 10.5.6 DRX Parameter */
3404 DE_FORCE_TO_STAND, /* [7] 10.5.7 Force to Standby */
3405 DE_FORCE_TO_STAND_H, /* [7] 10.5.8 Force to Standby - Info is in the high nibble */
3406 DE_P_TMSI_SIG, /* [7] 10.5.9 P-TMSI Signature */
3407 DE_P_TMSI_SIG_2, /* [7] 10.5.10 P-TMSI Signature 2 */
3408 DE_ID_TYPE_2, /* [7] 10.5.11 Identity Type 2 */
3409 DE_IMEISV_REQ, /* [7] 10.5.12 IMEISV Request */
3410 DE_REC_N_PDU_NUM_LIST, /* [7] 10.5.13 Receive N-PDU Numbers List */
3411 DE_MS_NET_CAP, /* [7] 10.5.14 MS Network Capability */
3412 DE_MS_RAD_ACC_CAP, /* [7] 10.5.15 MS Radio Access Capability */
3413 DE_GMM_CAUSE, /* [7] 10.5.16 GMM Cause */
3414 DE_RAI, /* [7] 10.5.17 Routing Area Identification */
3415 DE_UPD_RES, /* [7] 10.5.18 Update Result */
3416 DE_UPD_TYPE, /* [7] 10.5.19 Update Type */
3417 DE_AC_REF_NUM, /* [7] 10.5.20 A&C Reference Number */
3418 DE_AC_REF_NUM_H, /* A&C Reference Number - Info is in the high nibble */
3419 DE_SRVC_TYPE, /* [7] 10.5.20 Service Type */
3420 DE_CELL_NOT, /* [7] 10.5.21 Cell Notification */
3421 DE_PS_LCS_CAP, /* [7] 10.5.22 PS LCS Capability */
3422 DE_NET_FEAT_SUP, /* [7] 10.5.23 Network Feature Support */
3423 DE_RAT_INFO_CONTAINER, /* [7] 10.5.24 Inter RAT information container */
3424 /* [7] 10.5.25 Requested MS information */
3426 /* Short Message Service Information Elements [5] 8.1.4 */
3427 DE_CP_USER_DATA, /* CP-User Data */
3428 DE_CP_CAUSE, /* CP-Cause */
3429 /* Short Message Service Information Elements [5] 8.2 */
3430 DE_RP_MESSAGE_REF, /* RP-Message Reference */
3431 DE_RP_ORIG_ADDR, /* RP-Origination Address */
3432 DE_RP_DEST_ADDR, /* RP-Destination Address */
3433 DE_RP_USER_DATA, /* RP-User Data */
3434 DE_RP_CAUSE, /* RP-Cause */
3435 /* Session Management Information Elements 10.5.6 */
3436 DE_ACC_POINT_NAME, /* Access Point Name */
3437 DE_NET_SAPI, /* Network Service Access Point Identifier */
3438 DE_PRO_CONF_OPT, /* Protocol Configuration Options */
3439 DE_PD_PRO_ADDR, /* Packet Data Protocol Address */
3440 DE_QOS, /* Quality Of Service */
3441 DE_SM_CAUSE, /* SM Cause */
3442 DE_LINKED_TI, /* Linked TI */
3443 DE_LLC_SAPI, /* LLC Service Access Point Identifier */
3444 DE_TEAR_DOWN_IND, /* Tear Down Indicator */
3445 DE_PACKET_FLOW_ID, /* Packet Flow Identifier */
3446 DE_TRAFFIC_FLOW_TEMPLATE, /* Traffic Flow Template */
3447 /* GPRS Common Information Elements 10.5.7 */
3448 DE_PDP_CONTEXT_STAT, /* [8] 10.5.7.1 PDP Context Status */
3449 DE_RAD_PRIO, /* [8] 10.5.7.2 Radio Priority */
3450 DE_GPRS_TIMER, /* [8] 10.5.7.3 GPRS Timer */
3451 DE_GPRS_TIMER_2, /* [8] 10.5.7.4 GPRS Timer 2 */
3452 DE_RAD_PRIO_2, /* [8] 10.5.7.5 Radio Priority 2 */
3453 DE_MBMS_CTX_STATUS, /* [8] 10.5.7.6 MBMS context status */
3454 DE_SPARE_NIBBLE, /* Spare Nibble */
3459 #define NUM_GSM_DTAP_ELEM (sizeof(gsm_dtap_elem_strings)/sizeof(value_string))
3460 static gint ett_gsm_dtap_elem[NUM_GSM_DTAP_ELEM];
3463 * [3] 10.5.1.1 Cell Identity
3466 de_cell_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
3468 guint32 curr_offset;
3470 curr_offset = offset;
3474 be_cell_id_aux(tvb, tree, offset, len, add_string, string_len, 0x02);
3476 /* no length check possible */
3478 return(curr_offset - offset);
3485 de_lai(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
3489 guint32 curr_offset;
3490 proto_tree *subtree;
3496 curr_offset = offset;
3499 proto_tree_add_text(tree,
3500 tvb, curr_offset, 5,
3501 gsm_dtap_elem_strings[DE_LAI].strptr);
3503 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_LAI]);
3505 octs[0] = tvb_get_guint8(tvb, curr_offset);
3506 octs[1] = tvb_get_guint8(tvb, curr_offset + 1);
3507 octs[2] = tvb_get_guint8(tvb, curr_offset + 2);
3509 mcc_mnc_aux(octs, mcc, mnc);
3512 proto_tree_add_text(subtree,
3513 tvb, curr_offset, 3,
3514 "Mobile Country Code (MCC): %s, Mobile Network Code (MNC): %s",
3520 value = tvb_get_ntohs(tvb, curr_offset);
3522 proto_tree_add_text(subtree,
3523 tvb, curr_offset, 2,
3524 "Location Area Code (LAC): 0x%04x (%u)",
3528 proto_item_append_text(item, " - LAC (0x%04x)", value);
3532 /* no length check possible */
3534 return(curr_offset - offset);
3541 de_mid(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
3544 guint32 curr_offset;
3549 curr_offset = offset;
3552 oct = tvb_get_guint8(tvb, curr_offset);
3556 case 0: /* No Identity */
3557 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
3558 proto_tree_add_text(tree,
3559 tvb, curr_offset, 1,
3563 proto_tree_add_item(tree, hf_gsm_a_odd_even_ind, tvb, curr_offset, 1, FALSE);
3565 proto_tree_add_item(tree, hf_gsm_a_mobile_identity_type, tvb, curr_offset, 1, FALSE);
3568 g_snprintf(add_string, string_len, " - No Identity Code");
3574 proto_tree_add_text(tree, tvb, curr_offset, len - 1,
3575 "Format not supported");
3578 curr_offset += len - 1;
3581 case 3: /* IMEISV */
3587 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
3588 proto_tree_add_text(tree,
3589 tvb, curr_offset, 1,
3590 "%s : Identity Digit 1: %c",
3592 Dgt1_9_bcd.out[(oct & 0xf0) >> 4]);
3596 proto_tree_add_item(tree, hf_gsm_a_odd_even_ind, tvb, curr_offset, 1, FALSE);
3598 proto_tree_add_item(tree, hf_gsm_a_mobile_identity_type, tvb, curr_offset, 1, FALSE);
3601 a_bigbuf[0] = Dgt1_9_bcd.out[(oct & 0xf0) >> 4];
3604 poctets = tvb_get_ephemeral_string(tvb, curr_offset, len - (curr_offset - offset));
3606 my_dgt_tbcd_unpack(&a_bigbuf[1], poctets, len - (curr_offset - offset),
3609 proto_tree_add_string_format(tree,
3610 ((oct & 0x07) == 3) ? hf_gsm_a_imeisv : hf_gsm_a_imsi,
3611 tvb, curr_offset, len - (curr_offset - offset),
3616 if (sccp_assoc && ! sccp_assoc->calling_party) {
3617 sccp_assoc->calling_party = se_strdup_printf(
3618 ((oct & 0x07) == 3) ? "IMEISV: %s" : "IMSI: %s",
3623 g_snprintf(add_string, string_len, " - %s (%s)",
3624 ((oct & 0x07) == 3) ? "IMEISV" : "IMSI",
3627 curr_offset += len - (curr_offset - offset);
3631 oct = tvb_get_guint8(tvb, curr_offset - 1);
3633 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
3634 proto_tree_add_text(tree,
3635 tvb, curr_offset - 1, 1,
3642 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
3643 proto_tree_add_text(tree,
3644 tvb, curr_offset, 1,
3645 "%s : Identity Digit 1: %c",
3647 Dgt1_9_bcd.out[(oct & 0xf0) >> 4]);
3649 proto_tree_add_item(tree, hf_gsm_a_odd_even_ind, tvb, curr_offset, 1, FALSE);
3651 proto_tree_add_item(tree, hf_gsm_a_mobile_identity_type, tvb, curr_offset, 1, FALSE);
3654 a_bigbuf[0] = Dgt1_9_bcd.out[(oct & 0xf0) >> 4];
3657 poctets = tvb_get_ephemeral_string(tvb, curr_offset, len - (curr_offset - offset));
3659 my_dgt_tbcd_unpack(&a_bigbuf[1], poctets, len - (curr_offset - offset),
3662 proto_tree_add_string_format(tree,
3664 tvb, curr_offset, len - (curr_offset - offset),
3670 g_snprintf(add_string, string_len, " - IMEI (%s)", a_bigbuf);
3672 curr_offset += len - (curr_offset - offset);
3675 case 4: /* TMSI/P-TMSI */
3676 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
3677 proto_tree_add_text(tree,
3678 tvb, curr_offset, 1,
3682 proto_tree_add_item(tree, hf_gsm_a_odd_even_ind, tvb, curr_offset, 1, FALSE);
3684 proto_tree_add_item(tree, hf_gsm_a_mobile_identity_type, tvb, curr_offset, 1, FALSE);
3689 value = tvb_get_ntohl(tvb, curr_offset);
3691 proto_tree_add_uint(tree, hf_gsm_a_tmsi,
3692 tvb, curr_offset, 4,
3696 g_snprintf(add_string, string_len, " - TMSI/P-TMSI (0x%04x)", value);
3701 default: /* Reserved */
3702 proto_tree_add_item(tree, hf_gsm_a_odd_even_ind, tvb, curr_offset, 1, FALSE);
3703 proto_tree_add_item(tree, hf_gsm_a_mobile_identity_type, tvb, curr_offset, 1, FALSE);
3704 proto_tree_add_text(tree, tvb, curr_offset, len,
3705 "Mobile station identity Format %u, Format Unknown",(oct & 0x07));
3708 g_snprintf(add_string, string_len, " - Format Unknown");
3714 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3716 return(curr_offset - offset);
3723 de_ms_cm_1(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
3726 guint32 curr_offset;
3727 proto_tree *subtree;
3730 curr_offset = offset;
3732 oct = tvb_get_guint8(tvb, curr_offset);
3735 proto_tree_add_text(tree,
3736 tvb, curr_offset, 1,
3737 gsm_dtap_elem_strings[DE_MS_CM_1].strptr);
3739 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_MS_CM_1]);
3741 proto_tree_add_item(tree, hf_gsm_a_b8spare, tvb, curr_offset, 1, FALSE);
3743 proto_tree_add_item(subtree, hf_gsm_a_MSC_rev, tvb, curr_offset, 1, FALSE);
3745 proto_tree_add_item(subtree, hf_gsm_a_ES_IND, tvb, curr_offset, 1, FALSE);
3747 proto_tree_add_item(subtree, hf_gsm_a_A5_1_algorithm_sup, tvb, curr_offset, 1, FALSE);
3749 proto_tree_add_item(subtree, hf_gsm_a_RF_power_capability, tvb, curr_offset, 1, FALSE);
3753 /* no length check possible */
3755 return(curr_offset - offset);
3762 de_ms_cm_2(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
3764 guint32 curr_offset;
3765 curr_offset = offset;
3768 proto_tree_add_item(tree, hf_gsm_a_b8spare, tvb, curr_offset, 1, FALSE);
3770 proto_tree_add_item(tree, hf_gsm_a_MSC_rev, tvb, curr_offset, 1, FALSE);
3772 proto_tree_add_item(tree, hf_gsm_a_ES_IND, tvb, curr_offset, 1, FALSE);
3774 proto_tree_add_item(tree, hf_gsm_a_A5_1_algorithm_sup, tvb, curr_offset, 1, FALSE);
3776 proto_tree_add_item(tree, hf_gsm_a_RF_power_capability, tvb, curr_offset, 1, FALSE);
3780 NO_MORE_DATA_CHECK(len);
3782 proto_tree_add_item(tree, hf_gsm_a_b8spare, tvb, curr_offset, 1, FALSE);
3784 proto_tree_add_item(tree, hf_gsm_a_ps_sup_cap, tvb, curr_offset, 1, FALSE);
3786 proto_tree_add_item(tree, hf_gsm_a_SS_screening_indicator, tvb, curr_offset, 1, FALSE);
3788 /* SM capability (MT SMS pt to pt capability) (octet 4)*/
3789 proto_tree_add_item(tree, hf_gsm_a_SM_capability, tvb, curr_offset, 1, FALSE);
3790 /* VBS notification reception (octet 4) */
3791 proto_tree_add_item(tree, hf_gsm_a_VBS_notification_rec, tvb, curr_offset, 1, FALSE);
3792 /*VGCS notification reception (octet 4)*/
3793 proto_tree_add_item(tree, hf_gsm_a_VGCS_notification_rec, tvb, curr_offset, 1, FALSE);
3794 /* FC Frequency Capability (octet 4 ) */
3795 proto_tree_add_item(tree, hf_gsm_a_FC_frequency_cap, tvb, curr_offset, 1, FALSE);
3799 NO_MORE_DATA_CHECK(len);
3801 /* CM3 (octet 5, bit 8) */
3802 proto_tree_add_item(tree, hf_gsm_a_CM3, tvb, curr_offset, 1, FALSE);
3804 proto_tree_add_item(tree, hf_gsm_a_b7spare, tvb, curr_offset, 1, FALSE);
3805 /* LCS VA capability (LCS value added location request notification capability) (octet 5,bit 6) */
3806 proto_tree_add_item(tree, hf_gsm_a_LCS_VA_cap, tvb, curr_offset, 1, FALSE);
3807 /* UCS2 treatment (octet 5, bit 5) */
3808 proto_tree_add_item(tree, hf_gsm_a_UCS2_treatment, tvb, curr_offset, 1, FALSE);
3809 /* SoLSA (octet 5, bit 4) */
3810 proto_tree_add_item(tree, hf_gsm_a_SoLSA, tvb, curr_offset, 1, FALSE);
3811 /* CMSP: CM Service Prompt (octet 5, bit 3) */
3812 proto_tree_add_item(tree, hf_gsm_a_CMSP, tvb, curr_offset, 1, FALSE);
3813 /* A5/3 algorithm supported (octet 5, bit 2) */
3814 proto_tree_add_item(tree, hf_gsm_a_A5_3_algorithm_sup, tvb, curr_offset, 1, FALSE);
3815 /* A5/2 algorithm supported (octet 5, bit 1) */
3816 proto_tree_add_item(tree, hf_gsm_a_A5_2_algorithm_sup, tvb, curr_offset, 1, FALSE);
3820 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3822 return(curr_offset - offset);
3830 de_d_gb_call_ref(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
3834 guint32 curr_offset;
3838 curr_offset = offset;
3840 value = tvb_get_ntohl(tvb, curr_offset);
3842 other_decode_bitfield_value(a_bigbuf, value, 0xffffffe0, 32);
3843 proto_tree_add_text(tree, tvb, curr_offset, 4,
3844 "%s : Group or Broadcast call reference: %u (0x%04x)",
3846 (value & 0xffffffe0) >> 5,
3847 (value & 0xffffffe0) >> 5);
3849 other_decode_bitfield_value(a_bigbuf, value, 0x00000010, 32);
3850 proto_tree_add_text(tree, tvb, curr_offset, 4,
3851 "%s : SF Service Flag: %s",
3853 (value & 0x00000010) ?
3854 "VGCS (Group call reference)" : "VBS (Broadcast call reference)");
3856 other_decode_bitfield_value(a_bigbuf, value, 0x00000008, 32);
3857 proto_tree_add_text(tree, tvb, curr_offset, 4,
3858 "%s : AF Acknowledgement Flag: acknowledgment is %srequired",
3860 (value & 0x00000008) ? "" : "not ");
3862 switch (value & 0x00000007)
3864 case 1: str = "call priority level 4"; break;
3865 case 2: str = "call priority level 3"; break;
3866 case 3: str = "call priority level 2"; break;
3867 case 4: str = "call priority level 1"; break;
3868 case 5: str = "call priority level 0"; break;
3869 case 6: str = "call priority level B"; break;
3870 case 7: str = "call priority level A"; break;
3872 str = "no priority applied";
3876 other_decode_bitfield_value(a_bigbuf, value, 0x00000007, 32);
3877 proto_tree_add_text(tree, tvb, curr_offset, 4,
3878 "%s : Call Priority: %s",
3884 oct = tvb_get_guint8(tvb, curr_offset);
3886 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
3887 proto_tree_add_text(tree, tvb, curr_offset, 1,
3888 "%s : Ciphering Information",
3891 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
3892 proto_tree_add_text(tree, tvb, curr_offset, 1,
3898 /* no length check possible */
3900 return(curr_offset - offset);
3907 de_pd_sapi(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
3910 guint32 curr_offset;
3911 proto_tree *subtree;
3916 curr_offset = offset;
3918 oct = tvb_get_guint8(tvb, curr_offset);
3921 proto_tree_add_text(tree,
3922 tvb, curr_offset, 1,
3923 gsm_dtap_elem_strings[DE_PD_SAPI].strptr);
3925 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_PD_SAPI]);
3927 other_decode_bitfield_value(a_bigbuf, oct, 0xc0, 8);
3928 proto_tree_add_text(subtree, tvb, curr_offset, 1,
3932 switch ((oct & 0x30) >> 4)
3934 case 0: str = "SAPI 0"; break;
3935 case 3: str = "SAPI 3"; break;
3941 other_decode_bitfield_value(a_bigbuf, oct, 0x30, 8);
3942 proto_tree_add_text(subtree, tvb, curr_offset, 1,
3943 "%s : SAPI (Sevice Access Point Identifier): %s",
3947 proto_tree_add_item(tree, hf_gsm_a_L3_protocol_discriminator, tvb, curr_offset, 1, FALSE);
3951 /* no length check possible */
3953 return(curr_offset - offset);
3961 de_prio(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
3964 guint32 curr_offset;
3968 curr_offset = offset;
3970 oct = tvb_get_guint8(tvb, curr_offset);
3972 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
3973 proto_tree_add_text(tree,
3974 tvb, curr_offset, 1,
3980 case 1: str = "Call priority level 4"; break;
3981 case 2: str = "Call priority level 3"; break;
3982 case 3: str = "Call priority level 2"; break;
3983 case 4: str = "Call priority level 1"; break;
3984 case 5: str = "Call priority level 0"; break;
3985 case 6: str = "Call priority level B"; break;
3986 case 7: str = "Call priority level A"; break;
3988 str = "No priority applied";
3992 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
3993 proto_tree_add_text(tree,
3994 tvb, curr_offset, 1,
4001 /* no length check possible */
4003 return(curr_offset - offset);
4010 de_plmn_list(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
4013 guint32 curr_offset;
4018 curr_offset = offset;
4021 while ((len - (curr_offset - offset)) >= 3)
4023 octs[0] = tvb_get_guint8(tvb, curr_offset);
4024 octs[1] = tvb_get_guint8(tvb, curr_offset + 1);
4025 octs[2] = tvb_get_guint8(tvb, curr_offset + 2);
4027 mcc_mnc_aux(octs, mcc, mnc);
4029 proto_tree_add_text(tree,
4030 tvb, curr_offset, 3,
4031 "PLMN[%u] Mobile Country Code (MCC): %s, Mobile Network Code (MNC): %s",
4042 g_snprintf(add_string, string_len, " - %u PLMN%s",
4043 num_plmn, plurality(num_plmn, "", "s"));
4045 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
4047 return(curr_offset - offset);
4050 10.5.2 Radio Resource management information elements
4051 * [3] 10.5.2.1a BA Range
4054 * [3] 10.5.2.1b Cell Channel Description
4057 de_rr_cell_ch_dsc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
4059 guint32 curr_offset;
4060 guint8 oct,bit,byte;
4066 curr_offset = offset;
4068 oct = tvb_get_guint8(tvb, curr_offset);
4070 /* FORMAT-ID, Format Identifier (part of octet 3)*/
4071 proto_tree_add_item(tree, hf_gsm_a_rr_format_id, tvb, curr_offset, 1, FALSE);
4072 /* Cell Channel Description */
4074 if ((oct & 0xc0) == 0x00)
4077 item = proto_tree_add_text(tree,tvb, curr_offset, 16,"list of ARFCN for hopping = ");
4080 for (byte = 0;byte <= 15;byte++)
4082 oct = tvb_get_guint8(tvb, curr_offset);
4086 if (((oct >> bit) & 1) == 1)
4088 proto_item_append_text(item," %4d",arfcn);
4095 else if ((oct & 0xf8) == 0x80)
4098 proto_tree_add_text(tree,tvb, curr_offset, 16,"Cell Channel Description (1024 range) (Not decoded)");
4099 curr_offset = curr_offset + 16;
4101 else if ((oct & 0xfe) == 0x88)
4104 proto_tree_add_text(tree,tvb, curr_offset, 16,"Cell Channel Description (512 range) (Not decoded)");
4105 curr_offset = curr_offset + 16;
4107 else if ((oct & 0xfe) == 0x8a)
4110 proto_tree_add_text(tree,tvb, curr_offset, 16,"Cell Channel Description (256 range) (Not decoded)");
4111 curr_offset = curr_offset + 16;
4113 else if ((oct & 0xfe) == 0x8c)
4116 proto_tree_add_text(tree,tvb, curr_offset, 16,"Cell Channel Description (128 range) (Not decoded)");
4117 curr_offset = curr_offset + 16;
4119 else if ((oct & 0xfe) == 0x8e)
4121 /* variable bit map */
4122 arfcn = ((oct & 0x01) << 9) | (tvb_get_guint8(tvb, curr_offset+1) << 1) | ((tvb_get_guint8(tvb, curr_offset + 2) & 0x80) >> 7);
4123 item = proto_tree_add_text(tree,tvb, curr_offset, 16,"list of ARFCN for hopping = %d",arfcn);
4124 curr_offset = curr_offset + 2;
4126 for (byte = 0;byte <= 13;byte++)
4128 oct = tvb_get_guint8(tvb, curr_offset);
4132 if (((oct >> bit) & 1) == 1)
4134 proto_item_append_text(item," %4d",arfcn);
4143 return(curr_offset - offset);
4146 * [3] 10.5.2.1c BA List Pref
4147 * [3] 10.5.2.1d UTRAN Frequency List
4150 * [3] 10.5.2.2 Cell Description
4153 de_rr_cell_dsc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
4155 proto_tree *subtree;
4158 guint32 curr_offset;
4162 curr_offset = offset;
4164 oct = tvb_get_guint8(tvb, curr_offset);
4166 proto_tree_add_text(tree,
4167 tvb, curr_offset, 2,
4168 gsm_dtap_elem_strings[DE_RR_CELL_DSC].strptr);
4170 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_RR_CELL_DSC]);
4172 proto_tree_add_item(subtree, hf_gsm_a_ncc, tvb, curr_offset, 1, FALSE);
4173 proto_tree_add_item(subtree, hf_gsm_a_bcc, tvb, curr_offset, 1, FALSE);
4174 bcch_arfcn = (tvb_get_guint8(tvb,curr_offset) & 0xc0) << 2;
4175 bcch_arfcn = bcch_arfcn | tvb_get_guint8(tvb,curr_offset+1);
4176 proto_tree_add_uint(subtree, hf_gsm_a_bcch_arfcn , tvb, curr_offset, 2, bcch_arfcn );
4179 curr_offset = curr_offset + 2;
4182 return(curr_offset - offset);
4185 * [3] 10.5.2.3 Cell Options (BCCH)
4186 * [3] 10.5.2.3a Cell Options (SACCH)
4187 * [3] 10.5.2.4 Cell Selection Parameters
4188 * [3] 10.5.2.4a MAC Mode and Channel Coding Requested
4189 * [3] 10.5.2.5 Channel Description
4192 de_rr_ch_dsc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
4194 guint32 curr_offset;
4195 guint8 oct8,subchannel;
4196 guint16 arfcn, hsn, maio;
4197 proto_tree *subtree;
4202 curr_offset = offset;
4204 item = proto_tree_add_text(tree,tvb, curr_offset, 3,gsm_dtap_elem_strings[DE_RR_CH_DSC].strptr);
4206 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_RR_CH_DSC]);
4209 oct8 = tvb_get_guint8(tvb, curr_offset);
4211 if ((oct8 & 0xf8) == 0x08)
4213 str = "TCH/F + ACCHs";
4214 other_decode_bitfield_value(a_bigbuf, oct8, 0xf8, 8);
4215 proto_tree_add_text(subtree,tvb, curr_offset, 1,"%s = %s",a_bigbuf,str);
4219 if ((oct8 & 0xf0) == 0x10)
4221 str = "TCH/H + ACCHs, Subchannel";
4222 subchannel = ((oct8 & 0x08)>>3);
4224 else if ((oct8 & 0xe0) == 0x20)
4226 str = "SDCCH/4 + SACCH/C4 or CBCH (SDCCH/4), Subchannel";
4227 subchannel = ((oct8 & 0x18)>>3);
4229 else if ((oct8 & 0xc0) == 0x40)
4231 str = "SDCCH/8 + SACCH/C8 or CBCH (SDCCH/8), Subchannel";
4232 subchannel = ((oct8 % 0x38)>>3);
4236 DISSECTOR_ASSERT_NOT_REACHED();
4239 other_decode_bitfield_value(a_bigbuf, oct8, 0xf8, 8);
4240 proto_tree_add_text(subtree,tvb, curr_offset, 1,"%s = %s %d",a_bigbuf,str,subchannel);
4243 other_decode_bitfield_value(a_bigbuf, oct8, 0x07, 8);
4244 proto_tree_add_text(subtree,tvb, curr_offset, 1,"%s = Timeslot: %d",a_bigbuf,(oct8 & 0x07));
4249 oct8 = tvb_get_guint8(tvb, curr_offset);
4250 other_decode_bitfield_value(a_bigbuf, oct8, 0xe0, 8);
4251 proto_tree_add_text(subtree,tvb, curr_offset, 1,"%s = Training Sequence: %d",a_bigbuf,((oct8 & 0xe0)>>5));
4254 if ((oct8 & 0x10) == 0x10)
4256 /* Hopping sequence */
4257 maio = ((oct8 & 0x0f)<<2) | ((tvb_get_guint8(tvb,curr_offset+1) & 0xc0) >> 6);
4258 hsn = (tvb_get_guint8(tvb,curr_offset+1) & 0x3f);
4261 other_decode_bitfield_value(a_bigbuf, oct8, 0x10, 8);
4262 proto_tree_add_text(subtree,tvb, curr_offset, 1,"%s = Hopping channel: %s",a_bigbuf,str);
4263 proto_tree_add_text(subtree,tvb, curr_offset, 2,"Hopping channel: MAIO %d",maio);
4264 proto_tree_add_text(subtree,tvb, curr_offset, 2,"Hopping channel: HSN %d",hsn);
4269 arfcn = ((oct8 & 0x03) << 8) | tvb_get_guint8(tvb,curr_offset+1);
4272 other_decode_bitfield_value(a_bigbuf, oct8, 0x10, 8);
4273 proto_tree_add_text(subtree,tvb, curr_offset, 1,"%s = Hopping channel: %s",a_bigbuf,str);
4274 other_decode_bitfield_value(a_bigbuf, oct8, 0x0c, 8);
4275 proto_tree_add_text(subtree,tvb, curr_offset, 1,"%s = Spare",a_bigbuf);
4276 proto_tree_add_text(subtree,tvb, curr_offset, 2,"Single channel : ARFCN %d",arfcn);
4279 curr_offset = curr_offset + 2;
4281 return(curr_offset - offset);
4284 * [3] 10.5.2.5a Channel Description 2
4287 de_rr_ch_dsc2(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
4289 guint32 curr_offset;
4290 guint8 oct8,subchannel;
4291 guint16 arfcn, hsn, maio;
4292 proto_tree *subtree;
4297 curr_offset = offset;
4299 item = proto_tree_add_text(tree,tvb, curr_offset, 3,gsm_dtap_elem_strings[DE_RR_CH_DSC2].strptr);
4301 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_RR_CH_DSC2]);
4304 oct8 = tvb_get_guint8(tvb, curr_offset);
4306 if ((oct8 & 0xf8) == 0x0)
4308 str = "TCH/F + FACCH/F and SACCH/M";
4309 other_decode_bitfield_value(a_bigbuf, oct8, 0xf8, 8);
4310 proto_tree_add_text(subtree,tvb, curr_offset, 1,"%s = %s",a_bigbuf,str);
4312 else if ((oct8 & 0xf8) == 0x08)
4314 str = "TCH/F + FACCH/F and SACCH/F";
4315 other_decode_bitfield_value(a_bigbuf, oct8, 0xf8, 8);
4316 proto_tree_add_text(subtree,tvb, curr_offset, 1,"%s = %s",a_bigbuf,str);
4318 else if ((oct8 & 0xf8) == 0xf0)
4320 str = "TCH/F + FACCH/F and SACCH/M + bi- and unidirectional channels";
4321 other_decode_bitfield_value(a_bigbuf, oct8, 0xf8, 8);
4322 proto_tree_add_text(subtree,tvb, curr_offset, 1,"%s = %s",a_bigbuf,str);
4326 if ((oct8 & 0xf0) == 0x10)
4328 str = "TCH/H + ACCHs, Subchannel";
4329 subchannel = ((oct8 & 0x08)>>3);
4331 else if ((oct8 & 0xe0) == 0x20)
4333 str = "SDCCH/4 + SACCH/C4 or CBCH (SDCCH/4), Subchannel";
4334 subchannel = ((oct8 & 0x18)>>3);
4336 else if ((oct8 & 0xc0) == 0x40)
4338 str = "SDCCH/8 + SACCH/C8 or CBCH (SDCCH/8), Subchannel";
4339 subchannel = ((oct8 % 0x38)>>3);
4341 else if ((oct8 & 0xc0) == 0x80)
4343 str = "TCH/F + FACCH/F and SACCH/M + bidirectional channels at timeslot";
4344 subchannel = ((oct8 % 0x38)>>3);
4346 else if ((oct8 & 0xe0) == 0xc0)
4348 str = "TCH/F + FACCH/F and SACCH/M + unidirectional channels at timeslot";
4349 subchannel = ((oct8 % 0x38)>>3);
4353 DISSECTOR_ASSERT_NOT_REACHED();
4355 other_decode_bitfield_value(a_bigbuf, oct8, 0xf8, 8);
4356 proto_tree_add_text(subtree,tvb, curr_offset, 1,"%s = %s %d",a_bigbuf,str,subchannel);
4359 other_decode_bitfield_value(a_bigbuf, oct8, 0x07, 8);
4360 proto_tree_add_text(subtree,tvb, curr_offset, 1,"%s = Timeslot: %d",a_bigbuf,(oct8 & 0x07));
4365 oct8 = tvb_get_guint8(tvb, curr_offset);
4366 other_decode_bitfield_value(a_bigbuf, oct8, 0xe0, 8);
4367 proto_tree_add_text(subtree,tvb, curr_offset, 1,"%s = Training Sequence: %d",a_bigbuf,((oct8 & 0xe0)>>5));
4370 if ((oct8 & 0x10) == 0x10)
4372 /* Hopping sequence */
4373 maio = ((oct8 & 0x0f)<<2) | ((tvb_get_guint8(tvb,curr_offset+1) & 0xc0) >> 6);
4374 hsn = (tvb_get_guint8(tvb,curr_offset+1) & 0x3f);
4377 other_decode_bitfield_value(a_bigbuf, oct8, 0x10, 8);
4378 proto_tree_add_text(subtree,tvb, curr_offset, 1,"%s = Hopping channel: %s",a_bigbuf,str);
4379 proto_tree_add_text(subtree,tvb, curr_offset, 2,"Hopping channel: MAIO %d",maio);
4380 proto_tree_add_text(subtree,tvb, curr_offset, 2,"Hopping channel: HSN %d",hsn);
4385 arfcn = ((oct8 & 0x03) << 8) | tvb_get_guint8(tvb,curr_offset+1);
4388 other_decode_bitfield_value(a_bigbuf, oct8, 0x10, 8);
4389 proto_tree_add_text(subtree,tvb, curr_offset, 1,"%s = Hopping channel: %s",a_bigbuf,str);
4390 other_decode_bitfield_value(a_bigbuf, oct8, 0x0c, 8);
4391 proto_tree_add_text(subtree,tvb, curr_offset, 1,"%s = Spare",a_bigbuf);
4392 proto_tree_add_text(subtree,tvb, curr_offset, 2,"Single channel : ARFCN %d",arfcn);
4395 curr_offset = curr_offset + 2;
4397 return(curr_offset - offset);
4400 * [3] 10.5.2.6 Channel Mode
4404 static const value_string gsm_a_rr_channel_mode_vals[] = {
4405 { 0x00, "signalling only"},
4406 { 0x01, "speech full rate or half rate version 1(GSM FR or GSM HR)"},
4407 { 0x21, "speech full rate or half rate version 2(GSM EFR)"},
4408 { 0x41, "speech full rate or half rate version 3(FR AMR or HR AMR)"},
4409 { 0x81, "speech full rate or half rate version 4(OFR AMR-WB or OHR AMR-WB)"},
4410 { 0x82, "speech full rate or half rate version 5(FR AMR-WB )"},
4411 { 0x83, "speech full rate or half rate version 6(OHR AMR )"},
4412 { 0x61, "data, 43.5 kbit/s (downlink)+14.5 kbps (uplink)"},
4413 { 0x62, "data, 29.0 kbit/s (downlink)+14.5 kbps (uplink)"},
4414 { 0x64, "data, 43.5 kbit/s (downlink)+29.0 kbps (uplink)"},
4415 { 0x67, "data, 14.5 kbit/s (downlink)+43.5 kbps (uplink)"},
4416 { 0x65, "data, 14.5 kbit/s (downlink)+29.0 kbps (uplink)"},
4417 { 0x66, "data, 29.0 kbit/s (downlink)+43.5 kbps (uplink)"},
4418 { 0x27, "data, 43.5 kbit/s radio interface rate"},
4419 { 0x63, "data, 32.0 kbit/s radio interface rate"},
4420 { 0x43, "data, 29.0 kbit/s radio interface rate"},
4421 { 0x0f, "data, 14.5 kbit/s radio interface rate"},
4422 { 0x03, "data, 12.0 kbit/s radio interface rate"},
4423 { 0x0b, "data, 6.0 kbit/s radio interface rate"},
4424 { 0x13, "data, 3.6 kbit/s radio interface rate"},
4429 de_rr_ch_mode(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
4431 guint32 curr_offset;
4434 curr_offset = offset;
4436 proto_tree_add_item(tree, hf_gsm_a_rr_channel_mode, tvb, curr_offset, 1, FALSE);
4438 curr_offset = curr_offset + 1;
4440 return(curr_offset - offset);
4443 * [3] 10.5.2.7 Channel Mode 2
4446 static const value_string gsm_a_rr_channel_mode2_vals[] = {
4447 { 0x00, "signalling only"},
4448 { 0x05, "speech half rate version 1(GSM HR)"},
4449 { 0x25, "speech half rate version 2(GSM EFR)"},
4450 { 0x45, "speech half rate version 3(HR AMR)"},
4451 { 0x85, "speech half rate version 4(OHR AMR-WB)"},
4452 { 0x06, "speech half rate version 6(OHR AMR )"},
4453 { 0x0f, "data, 6.0 kbit/s radio interface rate"},
4454 { 0x17, "data, 3.6 kbit/s radio interface rate"},
4459 de_rr_ch_mode2(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
4461 guint32 curr_offset;
4464 curr_offset = offset;
4466 proto_tree_add_item(tree, hf_gsm_a_rr_channel_mode2, tvb, curr_offset, 1, FALSE);
4468 curr_offset = curr_offset + 1;
4470 return(curr_offset - offset);
4473 * [3] 10.5.2.7a UTRAN Classmark information element
4474 * [3] 10.5.2.7b (void)
4477 * [3] 10.5.2.7c Classmark Enquiry Mask
4479 * 0 CLASSMARK CHANGE message is requested
4480 * 1 CLASSMARK CHANGE message is not requested
4482 * 000 UTRAN CLASSMARK CHANGE message including status on predefined configurations (i.e. Sequence Description) is requested
4483 * 111 UTRAN CLASSMARK CHANGE message including status on predefined configurations (i.e. Sequence Description) is not requested.
4484 * All other values shall not be sent. If received, they shall be interpreted as '000'.
4486 * 0 CDMA2000 CLASSMARK CHANGE message requested
4487 * 1 CDMA2000 CLASSMARK CHANGE message not requested.
4489 * 0 GERAN IU MODE CLASSMARK CHANGE message requested
4490 * 1 GERAN IU MODE CLASSMARK CHANGE message not requested.
4491 * Bits 2 - 1: spare(0).
4493 static const true_false_string gsm_a_msg_req_value = {
4494 "message is not requested",
4495 "message is requested"
4497 static const value_string gsm_a_rr_utran_cm_cng_msg_req_vals[] = {
4498 { 0x0, "message including status on predefined configurations (i.e. Sequence Description) is requested"},
4499 { 0x1, "message including status on predefined configurations (i.e. Sequence Description) is requested"},
4500 { 0x2, "message including status on predefined configurations (i.e. Sequence Description) is requested"},
4501 { 0x3, "message including status on predefined configurations (i.e. Sequence Description) is requested"},
4502 { 0x4, "message including status on predefined configurations (i.e. Sequence Description) is requested"},
4503 { 0x5, "message including status on predefined configurations (i.e. Sequence Description) is requested"},
4504 { 0x6, "message including status on predefined configurations (i.e. Sequence Description) is requested"},
4505 { 0x7, "message including status on predefined configurations (i.e. Sequence Description) is not requested."},
4509 de_rr_cm_enq_mask(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
4511 guint32 curr_offset;
4514 curr_offset = offset;
4516 proto_tree_add_item(tree, hf_gsm_a_rr_cm_cng_msg_req, tvb, curr_offset, 1, FALSE);
4517 proto_tree_add_item(tree, hf_gsm_a_rr_utran_cm_cng_msg_req, tvb, curr_offset, 1, FALSE);
4518 proto_tree_add_item(tree, hf_gsm_a_rr_cdma200_cm_cng_msg_req, tvb, curr_offset, 1, FALSE);
4519 proto_tree_add_item(tree, hf_gsm_a_rr_geran_iu_cm_cng_msg_req, tvb, curr_offset, 1, FALSE);
4521 curr_offset = curr_offset + 1;
4523 return(curr_offset - offset);
4526 * [3] 10.5.2.8 Channel Needed
4528 static const value_string gsm_a_rr_channel_needed_vals[] = {
4529 { 0x00, "Any channel"},
4531 { 0x02, "TCH/F (Full rate)"},
4532 { 0x03, "TCH/H or TCH/F (Dual rate)"},
4536 de_rr_chnl_needed(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
4538 guint32 curr_offset;
4541 curr_offset = offset;
4543 proto_tree_add_item(tree, hf_gsm_a_rr_chnl_needed_ch1, tvb, curr_offset, 1, FALSE);
4544 proto_tree_add_item(tree, hf_gsm_a_rr_chnl_needed_ch2, tvb, curr_offset, 1, FALSE);
4546 curr_offset = curr_offset + 1;
4548 return(curr_offset - offset);
4551 * [3] 10.5.2.8a Channel Request Description
4552 * [3] 10.5.2.8b Channel Request Description 2
4555 * [3] 10.5.2.9 Cipher Mode Setting
4558 static const value_string gsm_a_rr_sc_vals[] = {
4559 { 0, "No ciphering"},
4560 { 1, "Start ciphering"},
4563 /* algorithm identifier
4570 de_rr_cip_mode_set(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
4572 guint32 curr_offset;
4576 curr_offset = offset;
4578 /* Cipher Mode Setting
4579 * Note: The coding of fields SC and algorithm identifier is defined in [44.018]
4580 * as part of the Cipher Mode Setting IE.
4582 proto_tree_add_item(tree, hf_gsm_a_rr_sc, tvb, curr_offset, 1, FALSE);
4583 oct = tvb_get_guint8(tvb,curr_offset);
4584 if ( (oct & 1) == 1){ /* Start ciphering */
4585 /* algorithm identifier */
4586 proto_tree_add_item(tree, hf_gsm_a_algorithm_id, tvb, curr_offset, 1, FALSE);
4588 curr_offset = curr_offset + 1;
4590 return(curr_offset - offset);
4593 * [3] 10.5.2.10 Cipher Response
4594 * [3] 10.5.2.11 Control Channel Description
4595 * [3] 10.5.2.11a DTM Information Details
4598 * [3] 10.5.2.11b Dynamic ARFCN Mapping
4601 de_rr_dyn_arfcn_map(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
4603 guint32 curr_offset;
4606 curr_offset = offset;
4608 proto_tree_add_text(tree,tvb, curr_offset, len,"Dynamic ARFCN Mapping content(Not decoded)");
4611 curr_offset = curr_offset + len;
4613 return(curr_offset - offset);
4616 * [3] 10.5.2.12 Frequency Channel Sequence
4619 de_rr_freq_ch_seq(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
4621 guint32 curr_offset;
4624 curr_offset = offset;
4626 proto_tree_add_text(tree,tvb, curr_offset, 9,"Frequency Channel Sequence(Not decoded)");
4629 curr_offset = curr_offset + 9;
4631 return(curr_offset - offset);
4634 * [3] 10.5.2.13 Frequency List
4636 * Bit Bit Bit Bit Bit format notation
4638 * 0 0 X X X bit map 0
4639 * 1 0 0 X X 1024 range
4640 * 1 0 1 0 0 512 range
4641 * 1 0 1 0 1 256 range
4642 * 1 0 1 1 0 128 range
4643 * 1 0 1 1 1 variable bit map
4645 /* The mask 0xce (1100 1110) will produce the result 0110 0111*/
4646 static const value_string gsm_a_rr_freq_list_format_id_vals[] = {
4647 { 0x00, "bit map 0"},
4648 { 0x02, "bit map 0"},
4649 { 0x04, "bit map 0"},
4650 { 0x06, "bit map 0"},
4651 { 0x08, "bit map 0"},
4652 { 0x0a, "bit map 0"},
4653 { 0x0c, "bit map 0"},
4654 { 0x0e, "bit map 0"},
4655 { 0x40, "1024 range"},
4656 { 0x41, "1024 range"},
4657 { 0x42, "1024 range"},
4658 { 0x43, "1024 range"},
4659 { 0x44, "512 range"},
4660 { 0x45, "256 range"},
4661 { 0x46, "128 range"},
4662 { 0x47, "variable bit map"},
4666 de_rr_freq_list(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
4668 guint32 curr_offset;
4671 curr_offset = offset;
4673 /* FORMAT-ID, Format Identifier (part of octet 3)*/
4674 proto_tree_add_item(tree, hf_gsm_a_rr_format_id, tvb, curr_offset, 1, FALSE);
4675 /* Frequency list */
4676 proto_tree_add_text(tree,tvb, curr_offset, len-1,"Frequency Data(Not decoded)");
4678 curr_offset = curr_offset + len;
4679 return(curr_offset - offset);
4683 * [3] 10.5.2.13.1 General description
4684 * [3] 10.5.2.13.2 Bit map 0 format
4685 * [3] 10.5.2.13.3 Range 1024 format
4686 * [3] 10.5.2.13.4 Range 512 format
4687 * [3] 10.5.2.13.5 Range 256 format
4688 * [3] 10.5.2.13.6 Range 128 format
4689 * [3] 10.5.2.13.7 Variable bit map format
4692 * [3] 10.5.2.14 Frequency Short List
4694 *The Frequency Short List information element is a type 3 information element of 10 octet length.
4696 * This element is encoded exactly as the Frequency List information element,
4697 * except that it has a fixed length instead of a variable length and does
4698 * not contain a length indicator and that it shall not be encoded in bitmap 0 format.
4701 de_rr_freq_short_list(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
4703 guint32 curr_offset;
4706 curr_offset = offset;
4708 /* FORMAT-ID, Format Identifier (part of octet 3)*/
4709 proto_tree_add_item(tree, hf_gsm_a_rr_format_id, tvb, curr_offset, 1, FALSE);
4710 /* Frequency list */
4711 proto_tree_add_text(tree,tvb, curr_offset, 9,"Frequency Data(Not decoded)");
4713 curr_offset = curr_offset + 9;
4714 return(curr_offset - offset);
4718 * [3] 10.5.2.14a Frequency Short List 2
4720 * The Frequency Short List information element is a type 3 information element of 8 octet length.
4722 * This element is encoded exactly as the Frequency List information element,
4723 * except that it has a fixed length instead of a variable length and does
4724 * not contain a length indicator and that it shall not be encoded in bitmap 0 format.
4727 de_rr_freq_short_list2(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
4729 guint32 curr_offset;
4732 curr_offset = offset;
4734 /* FORMAT-ID, Format Identifier (part of octet 3)*/
4735 proto_tree_add_item(tree, hf_gsm_a_rr_format_id, tvb, curr_offset, 1, FALSE);
4737 /* Frequency list */
4738 proto_tree_add_text(tree,tvb, curr_offset, 7,"Frequency Data(Not decoded)");
4740 curr_offset = curr_offset + 8;
4741 return(curr_offset - offset);
4745 * [3] 10.5.2.14b Group Channel Description
4746 * [3] 10.5.2.14c GPRS Resumption
4747 * [3] 10.5.2.14d GPRS broadcast information
4750 * [3] 10.5.2.15 Handover Reference
4753 de_rr_ho_ref(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
4755 proto_tree *subtree;
4757 guint32 curr_offset;
4760 curr_offset = offset;
4763 proto_tree_add_text(tree,
4764 tvb, curr_offset, 1,
4765 gsm_dtap_elem_strings[DE_RR_HO_REF].strptr);
4767 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_RR_HO_REF]);
4769 /* Handover reference value */
4770 proto_tree_add_item(subtree, hf_gsm_a_rr_ho_ref_val, tvb, curr_offset, 1, FALSE);
4772 curr_offset = curr_offset + 1;
4774 return(curr_offset - offset);
4777 * [3] 10.5.2.16 IA Rest Octets
4778 * [3] 10.5.2.17 IAR Rest Octets
4779 * [3] 10.5.2.18 IAX Rest Octets
4780 * [3] 10.5.2.19 L2 Pseudo Length
4781 * [3] 10.5.2.20 Measurement Results
4782 * [3] 10.5.2.20a GPRS Measurement Results
4785 * [3] 10.5.2.21 Mobile Allocation
4788 de_rr_mob_all(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
4790 guint32 curr_offset;
4793 curr_offset = offset;
4795 proto_tree_add_text(tree,tvb, curr_offset, len ,"Data(Not decoded)");
4797 curr_offset = curr_offset + len;
4798 return(curr_offset - offset);
4802 * [3] 10.5.2.21a Mobile Time Difference
4805 de_rr_mob_time_diff(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
4807 guint32 curr_offset;
4810 curr_offset = offset;
4812 proto_tree_add_text(tree,tvb, curr_offset, len ,"Data(Not decoded)");
4814 curr_offset = curr_offset + len;
4815 return(curr_offset - offset);
4819 * [3] 10.5.2.21aa MultiRate configuration
4821 /* Multirate speech version Octet 3 Bits 8 7 6 */
4822 static const value_string multirate_speech_ver_vals[] = {
4823 { 1, "Adaptive Multirate speech version 1"},
4824 { 2, "Adaptive Multirate speech version 2"},
4827 /* Bit 5 NSCB: Noise Suppression Control Bit */
4828 static const value_string NSCB_vals[] = {
4829 { 0, "Noise Suppression can be used (default)"},
4830 { 1, "Noise Suppression shall be turned off"},
4833 /* Bit 4 ICMI: Initial Codec Mode Indicator */
4834 static const value_string ICMI_vals[] = {
4835 { 0, "The initial codec mode is defined by the implicit rule provided in 3GPP TS 05.09"},
4836 { 1, "The initial codec mode is defined by the Start Mode field"},
4840 Table 10.5.2.21aa.2: Set of adaptive multirate codec modes field (octet 4)
4841 for the Multirate speech version 1
4843 static const true_false_string gsm_a_rr_set_of_amr_codec_modes = {
4844 "is part of the subset",
4845 "is not part of the subset"
4851 de_rr_multirate_conf(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
4853 guint32 curr_offset;
4857 curr_offset = offset;
4859 proto_tree_add_item(tree, hf_gsm_a_rr_multirate_speech_ver, tvb, curr_offset, 1, FALSE);
4860 proto_tree_add_item(tree, hf_gsm_a_rr_NCSB, tvb, curr_offset, 1, FALSE);
4861 proto_tree_add_item(tree, hf_gsm_a_rr_ICMI, tvb, curr_offset, 1, FALSE);
4862 /* The initial codec mode is coded as in 3GPP TS 45.009 */
4863 proto_tree_add_item(tree, hf_gsm_a_rr_start_mode, tvb, curr_offset, 1, FALSE);
4864 oct = ( tvb_get_guint8(tvb,curr_offset) &0xe0 ) >> 5;
4868 /* Adaptive Multirate speech version 1 */
4869 /* Set of AMR codec modes */
4870 proto_tree_add_item(tree, hf_gsm_a_rr_set_of_amr_codec_modes_v1_b8, tvb, curr_offset, 1, FALSE);
4871 proto_tree_add_item(tree, hf_gsm_a_rr_set_of_amr_codec_modes_v1_b7, tvb, curr_offset, 1, FALSE);
4872 proto_tree_add_item(tree, hf_gsm_a_rr_set_of_amr_codec_modes_v1_b6, tvb, curr_offset, 1, FALSE);
4873 proto_tree_add_item(tree, hf_gsm_a_rr_set_of_amr_codec_modes_v1_b5, tvb, curr_offset, 1, FALSE);
4874 proto_tree_add_item(tree, hf_gsm_a_rr_set_of_amr_codec_modes_v1_b4, tvb, curr_offset, 1, FALSE);
4875 proto_tree_add_item(tree, hf_gsm_a_rr_set_of_amr_codec_modes_v1_b3, tvb, curr_offset, 1, FALSE);
4876 proto_tree_add_item(tree, hf_gsm_a_rr_set_of_amr_codec_modes_v1_b2, tvb, curr_offset, 1, FALSE);
4877 proto_tree_add_item(tree, hf_gsm_a_rr_set_of_amr_codec_modes_v1_b1, tvb, curr_offset, 1, FALSE);
4880 proto_tree_add_text(tree,tvb, curr_offset, len-2 ,"Parameters for multirate speech field(Not decoded)");
4884 /* Adaptive Multirate speech version 2 */
4885 proto_tree_add_item(tree, hf_gsm_a_rr_set_of_amr_codec_modes_v2_b5, tvb, curr_offset, 1, FALSE);
4886 proto_tree_add_item(tree, hf_gsm_a_rr_set_of_amr_codec_modes_v2_b4, tvb, curr_offset, 1, FALSE);
4887 proto_tree_add_item(tree, hf_gsm_a_rr_set_of_amr_codec_modes_v2_b3, tvb, curr_offset, 1, FALSE);
4888 proto_tree_add_item(tree, hf_gsm_a_rr_set_of_amr_codec_modes_v2_b2, tvb, curr_offset, 1, FALSE);
4889 proto_tree_add_item(tree, hf_gsm_a_rr_set_of_amr_codec_modes_v2_b1, tvb, curr_offset, 1, FALSE);
4892 proto_tree_add_text(tree,tvb, curr_offset, len-2 ,"Parameters for multirate speech field(Not decoded)");
4895 proto_tree_add_text(tree,tvb,offset,1,"Unknown version");
4896 proto_tree_add_text(tree,tvb, curr_offset, len-1 ,"Data(Not decoded)");
4900 curr_offset = offset + len;
4901 return(curr_offset - offset);
4905 * [3] 10.5.2.21b Multislot Allocation
4908 de_rr_mult_all(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
4910 guint32 curr_offset;
4913 curr_offset = offset;
4915 proto_tree_add_text(tree,tvb, curr_offset, len ,"Data(Not decoded)");
4917 curr_offset = curr_offset + len;
4918 return(curr_offset - offset);
4922 * [3] 10.5.2.21c NC mode
4923 * [3] 10.5.2.22 Neighbour Cell Description
4924 * [3] 10.5.2.22a Neighbour Cell Description 2
4925 * [3] 10.5.2.22b (void)
4926 * [3] 10.5.2.22c NT/N Rest Octets
4927 * [3] 10.5.2.23 P1 Rest Octets
4928 * [3] 10.5.2.24 P2 Rest Octets
4929 * [3] 10.5.2.25 P3 Rest Octets
4930 * [3] 10.5.2.25a Packet Channel Description
4931 * [3] 10.5.2.25b Dedicated mode or TBF
4932 * [3] 10.5.2.25c RR Packet Uplink Assignment
4933 * [3] 10.5.2.25d RR Packet Downlink Assignment
4934 * [3] 10.5.2.26 Page Mode
4935 * [3] 10.5.2.26a (void)
4936 * [3] 10.5.2.26b (void)
4937 * [3] 10.5.2.26c (void)
4938 * [3] 10.5.2.26d (void)
4939 * [3] 10.5.2.27 NCC Permitted
4942 * [3] 10.5.2.28 Power Command
4945 * ATC (Access Type Control) (octet 2)Bit 8
4946 * 0 Sending of Handover access is mandatory
4947 * 1 Sending of Handover access is optional
4949 static const true_false_string gsm_a_rr_pow_cmd_atc_value = {
4950 "Sending of Handover access is optional",
4951 "Sending of Handover access is mandatory"
4954 * The EPC mode field (octet 2) indicates whether the assigned channel(s)
4955 * shall be in enhanced power control (EPC) mode. It is only valid for channels
4956 * on which EPC may be used. It is coded as follows:
4958 static const true_false_string gsm_a_rr_pow_cmd_epc_value = {
4959 "Channel(s) in EPC mode",
4960 "Channel(s) not in EPC mode"
4964 * The FPC_EPC field (octet 2) has different interpretation depending
4965 * on the channel mode of the assigned channel (s) and the value
4966 * of the EPC mode field.
4967 * If the channel mode is such that fast power control (FPC) may be
4968 * used, the FPC_EPC field indicates whether Fast Measurement
4969 * Reporting and Power Control mechanism is used.
4970 * It is coded as follows:
4971 * Value 0 FPC not in use
4973 * If the channel mode is such that EPC may be used and the EPC mode
4974 * field indicates that the channel is in EPC mode, the FPC_EPC
4975 * field indicates whether EPC shall be used for uplink power control.
4976 * It is coded as follows:
4977 * Value 0 EPC not in use for uplink power control
4978 * 1 EPC in use for uplink power control
4981 static const true_false_string gsm_a_rr_pow_cmd_fpcepc_value = {
4982 "FPC in use/EPC in use for uplink power control",
4983 "FPC not in use/C not in use for uplink power control"
4987 * Power level (octet 2)The power level field is coded as the binaryRepresentation
4988 * of the "power control level", see 3GPP TS 3GPP TS 45.005. This value shall be used
4989 * by the mobile station According to 3GPP TS 45.008.Range: 0 to 31.
4993 de_rr_pow_cmd(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
4995 proto_tree *subtree;
4997 guint32 curr_offset;
5000 curr_offset = offset;
5003 proto_tree_add_text(tree,
5004 tvb, curr_offset, 1,
5005 gsm_dtap_elem_strings[DE_RR_POW_CMD].strptr);
5007 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_RR_POW_CMD]);
5009 proto_tree_add_item(subtree, hf_gsm_a_b8spare, tvb, curr_offset, 1, FALSE);
5011 proto_tree_add_item(subtree, hf_gsm_a_rr_pow_cmd_epc, tvb, curr_offset, 1, FALSE);
5013 proto_tree_add_item(subtree, hf_gsm_a_rr_pow_cmd_fpcepc, tvb, curr_offset, 1, FALSE);
5015 proto_tree_add_item(subtree, hf_gsm_a_rr_pow_cmd_powlev, tvb, curr_offset, 1, FALSE);
5017 curr_offset = curr_offset + 1;
5019 return(curr_offset - offset);
5023 * [3] 10.5.2.28a Power Command and access type
5026 de_rr_pow_cmd_and_acc_type(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
5028 proto_tree *subtree;
5030 guint32 curr_offset;
5033 curr_offset = offset;
5036 proto_tree_add_text(tree,
5037 tvb, curr_offset, 1,
5038 gsm_dtap_elem_strings[DE_RR_POW_CMD_AND_ACC_TYPE].strptr);
5040 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_RR_POW_CMD_AND_ACC_TYPE]);
5043 proto_tree_add_item(subtree, hf_gsm_a_rr_pow_cmd_atc, tvb, curr_offset, 1, FALSE);
5045 proto_tree_add_item(subtree, hf_gsm_a_rr_pow_cmd_epc, tvb, curr_offset, 1, FALSE);
5047 proto_tree_add_item(subtree, hf_gsm_a_rr_pow_cmd_fpcepc, tvb, curr_offset, 1, FALSE);
5049 proto_tree_add_item(subtree, hf_gsm_a_rr_pow_cmd_powlev, tvb, curr_offset, 1, FALSE);
5051 curr_offset = curr_offset + 1;
5053 return(curr_offset - offset);
5056 * [3] 10.5.2.29 RACH Control Parameters
5057 * [3] 10.5.2.30 Request Reference
5064 de_rr_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
5066 guint32 curr_offset;
5069 curr_offset = offset;
5071 proto_tree_add_item(tree, hf_gsm_a_rr_RR_cause, tvb, curr_offset, 1, FALSE);
5075 return(curr_offset - offset);
5078 * [3] 10.5.2.32 SI 1 Rest Octets
5079 * [3] 10.5.2.33 SI 2bis Rest Octets
5080 * [3] 10.5.2.33a SI 2ter Rest Octets
5081 * [3] 10.5.2.33b SI 2quater Rest Octets
5082 * [3] 10.5.2.34 SI 3 Rest Octets
5083 * [3] 10.5.2.35 SI 4 Rest Octets
5084 * [3] 10.5.2.35a SI 6 Rest Octets
5085 * [3] 10.5.2.36 SI 7 Rest Octets
5086 * [3] 10.5.2.37 SI 8 Rest Octets
5087 * [3] 10.5.2.37a SI 9 Rest Octets
5088 * [3] 10.5.2.37b SI 13 Rest Octets
5089 * [3] 10.5.2.37c (void)
5090 * [3] 10.5.2.37d (void)
5091 * [3] 10.5.2.37e SI 16 Rest Octets
5092 * [3] 10.5.2.37f SI 17 Rest Octets
5093 * [3] 10.5.2.37g SI 19 Rest Octets
5094 * [3] 10.5.2.37h SI 18 Rest Octets
5095 * [3] 10.5.2.37i SI 20 Rest Octets
5098 * [3] 10.5.2.38 Starting Time
5101 de_rr_starting_time(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
5103 guint32 curr_offset;
5106 curr_offset = offset;
5108 proto_tree_add_text(tree,tvb, curr_offset, 3 ,"Data(Not decoded)");
5110 curr_offset = curr_offset + 2;
5111 return(curr_offset - offset);
5114 * [3] 10.5.2.39 Synchronization Indication
5117 * ROT: Report Observed Time Difference (Octet1 bit 3) */
5119 static const true_false_string sm_a_rr_sync_ind_rot_value = {
5120 "Mobile Time Difference IE shall be included in the HANDOVER COMPLETE message",
5121 "Mobile Time Difference IE shall not be included in the HANDOVER COMPLETE message"
5124 /* SI: Synchronization indication (octet 1)Bit2 1 */
5126 static const value_string gsm_a_rr_sync_ind_si_vals[] = {
5127 { 0, "Non-synchronized"},
5128 { 1, "Synchronized"},
5129 { 2, "Pre-synchronised"},
5130 { 3, "Pseudo-synchronised"},
5133 /* NCI: Normal cell indication (octet 1, bit 4) */
5135 static const true_false_string gsm_a_rr_sync_ind_nci_value = {
5136 "Out of range timing advance shall trigger a handover failure procedure",
5137 "Out of range timing advance is ignored"
5142 de_rr_sync_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
5144 guint32 curr_offset;
5147 curr_offset = offset;
5150 proto_tree_add_item(tree, hf_gsm_a_rr_sync_ind_nci, tvb, curr_offset, 1, FALSE);
5152 proto_tree_add_item(tree, hf_gsm_a_rr_sync_ind_rot, tvb, curr_offset, 1, FALSE);
5154 proto_tree_add_item(tree, hf_gsm_a_rr_sync_ind_si, tvb, curr_offset, 1, FALSE);
5156 curr_offset = curr_offset + 1;
5158 return(curr_offset - offset);
5162 * [3] 10.5.2.40 Timing Advance
5165 de_rr_timing_adv(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
5167 guint32 curr_offset;
5170 curr_offset = offset;
5172 proto_tree_add_item(tree, hf_gsm_a_rr_timing_adv, tvb, curr_offset, 1, FALSE);
5173 curr_offset = curr_offset + 1;
5175 return(curr_offset - offset);
5179 * [3] 10.5.2.41 Time Difference
5182 de_rr_time_diff(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
5184 guint32 curr_offset;
5187 curr_offset = offset;
5189 proto_tree_add_item(tree, hf_gsm_a_rr_time_diff, tvb, curr_offset, 1, FALSE);
5190 curr_offset = curr_offset + 1;
5192 return(curr_offset - offset);
5195 * [3] 10.5.2.41a TLLI
5196 * The TLLI is encoded as a binary number with a length of 4 octets. TLLI is defined in 3GPP TS 23.003
5199 de_rr_tlli(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
5201 guint32 curr_offset;
5204 curr_offset = offset;
5206 proto_tree_add_item(tree, hf_gsm_a_rr_tlli, tvb, curr_offset, 4, FALSE);
5207 curr_offset = curr_offset + 4;
5209 return(curr_offset - offset);
5212 * [3] 10.5.2.42 TMSI/P-TMSI
5215 * [3] 10.5.2.42a VGCS target mode Indication
5218 Target mode (octet 3)
5221 0 1 group transmit mode
5222 Other values are reserved for future use.
5224 static const value_string gsm_a_rr_target_mode_vals[] = {
5225 { 0, "Dedicated mode"},
5226 { 1, "Group transmit mode"},
5230 de_rr_vgcs_tar_mode_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
5232 guint32 curr_offset;
5235 curr_offset = offset;
5237 proto_tree_add_item(tree, hf_gsm_a_rr_target_mode, tvb, curr_offset, 1, FALSE);
5238 proto_tree_add_item(tree, hf_gsm_a_rr_group_cipher_key_number, tvb, curr_offset, 1, FALSE);
5239 curr_offset = curr_offset + 1;
5241 return(curr_offset - offset);
5245 * [3] 10.5.2.42b VGCS Ciphering Parameters
5248 de_rr_vgcs_cip_par(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
5250 guint32 curr_offset;
5253 curr_offset = offset;
5255 proto_tree_add_text(tree,tvb, curr_offset, len ,"Data(Not decoded)");
5257 curr_offset = curr_offset + 2;
5258 return(curr_offset - offset);
5261 * [3] 10.5.2.43 Wait Indication
5262 * [3] 10.5.2.44 SI10 rest octets $(ASCI)$
5263 * [3] 10.5.2.45 EXTENDED MEASUREMENT RESULTS
5264 * [3] 10.5.2.46 Extended Measurement Frequency List
5267 * [3] 10.5.2.47 Suspension Cause
5269 /*Suspension cause value (octet 2)*/
5270 static const value_string gsm_a_rr_suspension_cause_vals[] = {
5271 { 0, "Emergency call, mobile originating call or call re-establishment"},
5272 { 1, "Location Area Update"},
5273 { 2, "MO Short message service"},
5274 { 3, "Other procedure which can be completed with an SDCCH"},
5275 { 4, "MO Voice broadcast or group call"},
5276 { 5, "Mobile terminating CS connection"},
5277 { 6, "DTM not supported in the cell"},
5281 de_rr_sus_cau(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
5283 guint32 curr_offset;
5286 curr_offset = offset;
5288 proto_tree_add_item(tree, hf_gsm_a_rr_suspension_cause, tvb, curr_offset, 1, FALSE);
5290 curr_offset = curr_offset + 1;
5291 return(curr_offset - offset);
5294 * [3] 10.5.2.48 APDU ID
5295 * [3] 10.5.2.49 APDU Flags
5296 * [3] 10.5.2.50 APDU Data
5297 * [3] 10.5.2.51 Handover To UTRAN Command
5298 * [3] 10.5.2.52 Handover To cdma2000 Command
5299 * [3] 10.5.2.53 (void)
5300 * [3] 10.5.2.54 (void)
5301 * [3] 10.5.2.55 (void)
5302 * [3] 10.5.2.56 3G Target Cell
5305 * [3] 10.5.2.59 Dedicated Service Information
5308 Last Segment (octet 2)
5310 0 mobile station shall not perform Service Information Sending procedure on new cell.
5311 1 mobile station shall perform Service Information Sending procedure on new cell.
5313 static const true_false_string gsm_a_rr_last_segment_value = {
5314 "Mobile station shall perform Service Information Sending procedure on new cell.",
5315 "mobile station shall not perform Service Information Sending procedure on new cell."
5318 de_rr_ded_serv_inf(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
5320 guint32 curr_offset;
5323 curr_offset = offset;
5325 proto_tree_add_item(tree, hf_gsm_a_rr_last_segment, tvb, curr_offset, 1, FALSE);
5327 curr_offset = curr_offset + 3;
5328 return(curr_offset - offset);
5337 de_auth_param_rand(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
5339 guint32 curr_offset;
5342 curr_offset = offset;
5345 * 16 octets == 128 bits
5347 #define AUTH_PARAM_RAND_LEN 16
5349 proto_tree_add_text(tree,
5350 tvb, curr_offset, AUTH_PARAM_RAND_LEN,
5352 tvb_bytes_to_str(tvb, curr_offset, AUTH_PARAM_RAND_LEN));
5354 curr_offset += AUTH_PARAM_RAND_LEN;
5356 /* no length check possible */
5358 return(curr_offset - offset);
5365 de_auth_param_autn(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
5367 guint32 curr_offset;
5369 curr_offset = offset;
5371 proto_tree_add_text(tree,
5372 tvb, curr_offset, len,
5374 tvb_bytes_to_str(tvb, curr_offset, len));
5378 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
5380 return(curr_offset - offset);
5387 de_auth_resp_param(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
5389 guint32 curr_offset;
5392 curr_offset = offset;
5395 * 4 octets == 32 bits
5397 #define AUTH_PARAM_SRES_LEN 4
5399 proto_tree_add_text(tree,
5400 tvb, curr_offset, AUTH_PARAM_SRES_LEN,
5402 tvb_bytes_to_str(tvb, curr_offset, AUTH_PARAM_SRES_LEN));
5404 curr_offset += AUTH_PARAM_SRES_LEN;
5406 /* no length check possible */
5408 return(curr_offset - offset);
5415 de_auth_resp_param_ext(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
5417 guint32 curr_offset;
5419 curr_offset = offset;
5421 proto_tree_add_text(tree,
5422 tvb, curr_offset, len,
5424 tvb_bytes_to_str(tvb, curr_offset, len));
5428 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
5430 return(curr_offset - offset);
5437 de_auth_fail_param(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
5439 guint32 curr_offset;
5441 curr_offset = offset;
5443 proto_tree_add_text(tree,
5444 tvb, curr_offset, len,
5446 tvb_bytes_to_str(tvb, curr_offset, len));
5450 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
5452 return(curr_offset - offset);
5459 de_network_name(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
5462 guint32 curr_offset;
5465 curr_offset = offset;
5467 oct = tvb_get_guint8(tvb, curr_offset);
5469 proto_tree_add_item(tree, hf_gsm_a_extension, tvb, curr_offset, 1, FALSE);
5471 switch ((oct & 0x70) >> 4)
5473 case 0x00: str = "Cell Broadcast data coding scheme, GSM default alphabet, language unspecified, defined in 3GPP TS 03.38"; break;
5474 case 0x01: str = "UCS2 (16 bit)"; break;
5480 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
5481 proto_tree_add_text(tree,
5482 tvb, curr_offset, 1,
5483 "%s : Coding Scheme: %s",
5487 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
5488 proto_tree_add_text(tree,
5489 tvb, curr_offset, 1,
5490 "%s : Add CI: The MS should %s",
5493 "add the letters for the Country's Initials and a separator (e.g. a space) to the text string" :
5494 "The MS should not add the letters for the Country's Initials to the text string");
5498 case 1: str = "bit 8 is spare and set to '0' in octet n"; break;
5499 case 2: str = "bits 7 and 8 are spare and set to '0' in octet n"; break;
5500 case 3: str = "bits 6 to 8(inclusive) are spare and set to '0' in octet n"; break;
5501 case 4: str = "bits 5 to 8(inclusive) are spare and set to '0' in octet n"; break;
5502 case 5: str = "bits 4 to 8(inclusive) are spare and set to '0' in octet n"; break;
5503 case 6: str = "bits 3 to 8(inclusive) are spare and set to '0' in octet n"; break;
5504 case 7: str = "bits 2 to 8(inclusive) are spare and set to '0' in octet n"; break;
5506 str = "this field carries no information about the number of spare bits in octet n";
5510 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
5511 proto_tree_add_text(tree,
5512 tvb, curr_offset, 1,
5513 "%s : Number of spare bits in last octet: %s",
5519 NO_MORE_DATA_CHECK(len);
5521 proto_tree_add_text(tree,
5522 tvb, curr_offset, len - 1,
5523 "Text string encoded according to Coding Scheme");
5525 curr_offset += len - 1;
5527 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
5529 return(curr_offset - offset);
5533 * [3] 10.5.3.6 Reject cause
5536 de_rej_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
5539 guint32 curr_offset;
5543 curr_offset = offset;
5545 oct = tvb_get_guint8(tvb, curr_offset);
5549 case 0x02: str = "IMSI unknown in HLR"; break;
5550 case 0x03: str = "Illegal MS"; break;
5551 case 0x04: str = "IMSI unknown in VLR"; break;
5552 case 0x05: str = "IMEI not accepted"; break;
5553 case 0x06: str = "Illegal ME"; break;
5554 case 0x0b: str = "PLMN not allowed"; break;
5555 case 0x0c: str = "Location Area not allowed"; break;
5556 case 0x0d: str = "Roaming not allowed in this location area"; break;
5557 case 0x0f: str = "No Suitable Cells In Location Area"; break;
5558 case 0x11: str = "Network failure"; break;
5559 case 0x14: str = "MAC failure"; break;
5560 case 0x15: str = "Synch failure"; break;
5561 case 0x16: str = "Congestion"; break;
5562 case 0x17: str = "GSM authentication unacceptable"; break;
5563 case 0x20: str = "Service option not supported"; break;
5564 case 0x21: str = "Requested service option not subscribed"; break;
5565 case 0x22: str = "Service option temporarily out of order"; break;
5566 case 0x26: str = "Call cannot be identified"; break;
5567 case 0x5f: str = "Semantically incorrect message"; break;
5568 case 0x60: str = "Invalid mandatory information"; break;
5569 case 0x61: str = "Message type non-existent or not implemented"; break;
5570 case 0x62: str = "Message type not compatible with the protocol state"; break;
5571 case 0x63: str = "Information element non-existent or not implemented"; break;
5572 case 0x64: str = "Conditional IE error"; break;
5573 case 0x65: str = "Message not compatible with the protocol state"; break;
5574 case 0x6f: str = "Protocol error, unspecified"; break;
5578 case IS_UPLINK_FALSE:
5579 str = "Service option temporarily out of order";
5582 str = "Protocol error, unspecified";
5588 proto_tree_add_text(tree,
5589 tvb, curr_offset, 1,
5590 "Reject Cause value: 0x%02x (%u) %s",
5597 /* no length check possible */
5599 return(curr_offset - offset);
5606 de_time_zone(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
5609 guint32 curr_offset;
5613 curr_offset = offset;
5615 /* 3GPP TS 23.040 version 6.6.0 Release 6
5616 * 9.2.3.11 TP-Service-Centre-Time-Stamp (TP-SCTS)
5618 * The Time Zone indicates the difference, expressed in quarters of an hour,
5619 * between the local time and GMT. In the first of the two semi-octets,
5620 * the first bit (bit 3 of the seventh octet of the TP-Service-Centre-Time-Stamp field)
5621 * represents the algebraic sign of this difference (0: positive, 1: negative).
5624 oct = tvb_get_guint8(tvb, curr_offset);
5625 sign = (oct & 0x08)?'-':'+';
5626 oct = (oct >> 4) + (oct & 0x07) * 10;
5628 proto_tree_add_text(tree,
5630 "Timezone: GMT %c %d hours %d minutes",
5631 sign, oct / 4, oct % 4 * 15);
5634 /* no length check possible */
5636 return(curr_offset - offset);
5643 de_time_zone_time(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
5645 guint8 oct, oct2, oct3;
5646 guint32 curr_offset;
5650 curr_offset = offset;
5652 oct = tvb_get_guint8(tvb, curr_offset);
5653 oct2 = tvb_get_guint8(tvb, curr_offset+1);
5654 oct3 = tvb_get_guint8(tvb, curr_offset+2);
5656 proto_tree_add_text(tree,
5657 tvb, curr_offset, 3,
5658 "Year %u%u, Month %u%u, Day %u%u",
5664 (oct3 & 0xf0) >> 4);
5668 oct = tvb_get_guint8(tvb, curr_offset);
5669 oct2 = tvb_get_guint8(tvb, curr_offset+1);
5670 oct3 = tvb_get_guint8(tvb, curr_offset+2);
5672 proto_tree_add_text(tree,
5673 tvb, curr_offset, 3,
5674 "Hour %u%u, Minutes %u%u, Seconds %u%u",
5680 (oct3 & 0xf0) >> 4);
5684 /* 3GPP TS 23.040 version 6.6.0 Release 6
5685 * 9.2.3.11 TP-Service-Centre-Time-Stamp (TP-SCTS)
5687 * The Time Zone indicates the difference, expressed in quarters of an hour,
5688 * between the local time and GMT. In the first of the two semi-octets,
5689 * the first bit (bit 3 of the seventh octet of the TP-Service-Centre-Time-Stamp field)
5690 * represents the algebraic sign of this difference (0: positive, 1: negative).
5693 oct = tvb_get_guint8(tvb, curr_offset);
5694 sign = (oct & 0x08)?'-':'+';
5695 oct = (oct >> 4) + (oct & 0x07) * 10;
5697 proto_tree_add_text(tree,
5699 "Timezone: GMT %c %d hours %d minutes",
5700 sign, oct / 4, oct % 4 * 15);
5704 /* no length check possible */
5706 return(curr_offset - offset);
5710 * [3] 10.5.3.11 3GPP TS 24.008 version 6.8.0 Release 6
5713 de_lsa_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
5715 guint32 curr_offset;
5717 curr_offset = offset;
5720 proto_tree_add_text(tree,tvb, curr_offset, len,"LSA ID not included");
5722 proto_tree_add_item(tree, hf_gsm_a_lsa_id, tvb, curr_offset, 3, FALSE);
5727 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
5729 return(curr_offset - offset);
5736 de_day_saving_time(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
5739 guint32 curr_offset;
5742 curr_offset = offset;
5744 oct = tvb_get_guint8(tvb, curr_offset);
5746 other_decode_bitfield_value(a_bigbuf, oct, 0xfc, 8);
5747 proto_tree_add_text(tree,
5748 tvb, curr_offset, 1,
5754 case 0: str = "No adjustment for Daylight Saving Time"; break;
5755 case 1: str = "+1 hour adjustment for Daylight Saving Time"; break;
5756 case 2: str = "+2 hours adjustment for Daylight Saving Time"; break;
5762 other_decode_bitfield_value(a_bigbuf, oct, 0x03, 8);
5763 proto_tree_add_text(tree,
5764 tvb, curr_offset, 1,
5771 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
5773 return(curr_offset - offset);
5780 de_aux_states(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
5783 guint32 curr_offset;
5786 curr_offset = offset;
5788 oct = tvb_get_guint8(tvb, curr_offset);
5790 proto_tree_add_item(tree, hf_gsm_a_extension, tvb, curr_offset, 1, FALSE);
5792 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
5793 proto_tree_add_text(tree,
5794 tvb, curr_offset, 1,
5798 switch ((oct & 0x0c) >> 2)
5800 case 0: str = "Idle"; break;
5801 case 1: str = "Hold request"; break;
5802 case 2: str = "Call held"; break;
5804 str = "Retrieve request";
5808 other_decode_bitfield_value(a_bigbuf, oct, 0x0c, 8);
5809 proto_tree_add_text(tree,
5810 tvb, curr_offset, 1,
5811 "%s : Hold auxiliary state: %s",
5817 case 0: str = "Idle"; break;
5818 case 1: str = "MPTY request"; break;
5819 case 2: str = "Call in MPTY"; break;
5821 str = "Split request";
5825 other_decode_bitfield_value(a_bigbuf, oct, 0x03, 8);
5826 proto_tree_add_text(tree,
5827 tvb, curr_offset, 1,
5828 "%s : Multi party auxiliary state: %s",
5834 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
5836 return(curr_offset - offset);
5843 de_bearer_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
5848 guint32 curr_offset;
5849 guint32 saved_offset;
5850 proto_tree *subtree;
5854 #define DE_BC_ITC_SPEECH 0x00
5855 #define DE_BC_ITC_UDI 0x01
5856 #define DE_BC_ITC_EX_PLMN 0x02
5857 #define DE_BC_ITC_FASC_G3 0x03
5858 #define DE_BC_ITC_OTHER_ITC 0x05
5859 #define DE_BC_ITC_RSVD_NET 0x07
5861 curr_offset = offset;
5863 oct = tvb_get_guint8(tvb, curr_offset);
5868 * warning, bearer cap uses extended values that
5869 * are reversed from other parameters!
5871 extended = (oct & 0x80) ? FALSE : TRUE;
5874 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
5875 proto_tree_add_text(tree,
5876 tvb, curr_offset, 1,
5877 "%s : Extension: %s",
5879 extended ? "extended" : "not extended");
5883 case IS_UPLINK_FALSE:
5887 case IS_UPLINK_TRUE:
5889 * depends on Information transfer capability
5893 case DE_BC_ITC_SPEECH:
5896 switch ((oct & 0x60) >> 5)
5898 case 1: str = "MS supports at least full rate speech version 1 but does not support half rate speech version 1"; break;
5899 case 2: str = "MS supports at least full rate speech version 1 and half rate speech version 1. MS has a greater preference for half rate speech version 1 than for full rate speech version 1"; break;
5900 case 3: str = "MS supports at least full rate speech version 1 and half rate speech version 1. MS has a greater preference for full rate speech version 1 than for half rate speech version 1"; break;
5909 switch ((oct & 0x60) >> 5)
5911 case 1: str = "Full rate support only MS/fullrate speech version 1 supported"; break;
5912 case 2: str = "Dual rate support MS/half rate speech version 1 preferred, full rate speech version 1 also supported"; break;
5913 case 3: str = "Dual rate support MS/full rate speech version 1 preferred, half rate speech version 1 also supported"; break;
5923 switch ((oct & 0x60) >> 5)
5925 case 1: str = "Full rate support only MS"; break;
5926 case 2: str = "Dual rate support MS/half rate preferred"; break;
5927 case 3: str = "Dual rate support MS/full rate preferred"; break;
5937 str = "(dissect problem)";
5941 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
5942 proto_tree_add_text(tree,
5943 tvb, curr_offset, 1,
5944 "%s : Radio channel requirement: %s",
5948 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
5949 proto_tree_add_text(tree,
5950 tvb, curr_offset, 1,
5951 "%s : Coding standard: %s",
5953 (oct & 0x10) ? "reserved" : "GSM standardized coding");
5955 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
5956 proto_tree_add_text(tree,
5957 tvb, curr_offset, 1,
5958 "%s : Transfer mode: %s",
5960 (oct & 0x08) ? "packet" : "circuit");
5964 case DE_BC_ITC_SPEECH: str = "Speech"; break;
5965 case DE_BC_ITC_UDI: str = "Unrestricted digital information"; break;
5966 case DE_BC_ITC_EX_PLMN: str = "3.1 kHz audio, ex PLMN"; break;
5967 case DE_BC_ITC_FASC_G3: str = "Facsimile group 3"; break;
5968 case DE_BC_ITC_OTHER_ITC: str = "Other ITC (See Octet 5a)"; break;
5969 case DE_BC_ITC_RSVD_NET: str = "Reserved, to be used in the network"; break;
5975 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
5976 proto_tree_add_text(tree,
5977 tvb, curr_offset, 1,
5978 "%s : Information transfer capability: %s",
5983 g_snprintf(add_string, string_len, " - (%s)", str);
5987 NO_MORE_DATA_CHECK(len);
5991 case DE_BC_ITC_SPEECH:
5995 proto_tree_add_text(tree,
5996 tvb, curr_offset, -1,
5997 "Octets 3a - Speech Versions");
5999 subtree = proto_item_add_subtree(item, ett_bc_oct_3a);
6001 saved_offset = curr_offset;
6005 oct = tvb_get_guint8(tvb, curr_offset);
6007 extended = (oct & 0x80) ? FALSE : TRUE;
6009 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
6010 proto_tree_add_text(subtree,
6011 tvb, curr_offset, 1,
6012 "%s : Extension: %s",
6014 extended ? "extended" : "not extended");
6016 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
6017 proto_tree_add_text(subtree,
6018 tvb, curr_offset, 1,
6019 "%s : Coding: octet used for %s",
6021 (oct & 0x40) ? "other extension of octet 3" :
6022 "extension of information transfer capability");
6024 other_decode_bitfield_value(a_bigbuf, oct, 0x30, 8);
6025 proto_tree_add_text(subtree,
6026 tvb, curr_offset, 1,
6032 case 0: str = "GSM full rate speech version 1"; break;
6033 case 2: str = "GSM full rate speech version 2"; break;
6034 case 4: str = "GSM full rate speech version 3"; break;
6035 case 1: str = "GSM half rate speech version 1"; break;
6036 case 5: str = "GSM half rate speech version 3"; break;
6038 str = "Speech version TBD";
6042 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
6043 proto_tree_add_text(subtree,
6044 tvb, curr_offset, 1,
6045 "%s : Speech version indication: %s",
6052 ((len - (curr_offset - offset)) > 0));
6054 proto_item_set_len(item, curr_offset - saved_offset);
6061 proto_tree_add_text(tree,
6062 tvb, curr_offset, 1,
6065 subtree = proto_item_add_subtree(item, ett_bc_oct_4);
6067 oct = tvb_get_guint8(tvb, curr_offset);
6069 extended = (oct & 0x80) ? FALSE : TRUE;
6071 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
6072 proto_tree_add_text(subtree,
6073 tvb, curr_offset, 1,
6074 "%s : Extension: %s",
6076 extended ? "extended" : "not extended");
6078 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
6079 proto_tree_add_text(subtree,
6080 tvb, curr_offset, 1,
6081 "%s : Compression: data compression %s%s",
6083 (oct & 0x40) ? "" : "not ",
6084 is_uplink ? "allowed" : "possible");
6086 switch ((oct & 0x30) >> 4)
6088 case 0x00: str = "Service data unit integrity"; break;
6089 case 0x03: str = "Unstructured"; break;
6095 other_decode_bitfield_value(a_bigbuf, oct, 0x30, 8);
6096 proto_tree_add_text(subtree,
6097 tvb, curr_offset, 1,
6098 "%s : Structure: %s",
6102 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
6103 proto_tree_add_text(subtree,
6104 tvb, curr_offset, 1,
6105 "%s : Duplex mode: %s",
6107 (oct & 0x08) ? "Full" : "Half");
6109 other_decode_bitfield_value(a_bigbuf, oct, 0x04, 8);
6110 proto_tree_add_text(subtree,
6111 tvb, curr_offset, 1,
6112 "%s : Configuration: %s",
6114 (oct & 0x04) ? "Reserved" : "Point-to-point");
6116 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
6117 proto_tree_add_text(subtree,
6118 tvb, curr_offset, 1,
6122 "Data up to and including 4.8 kb/s, full rate, non-transparent, 6 kb/s radio interface rate is requested" :
6123 "No meaning is associated with this value");
6125 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
6126 proto_tree_add_text(subtree,
6127 tvb, curr_offset, 1,
6128 "%s : Establishment: %s",
6130 (oct & 0x01) ? "Reserved" : "Demand");
6134 NO_MORE_DATA_CHECK(len);
6139 proto_tree_add_text(tree,
6140 tvb, curr_offset, 1,
6143 subtree = proto_item_add_subtree(item, ett_bc_oct_5);
6145 oct = tvb_get_guint8(tvb, curr_offset);
6147 extended = (oct & 0x80) ? FALSE : TRUE;
6149 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
6150 proto_tree_add_text(subtree,
6151 tvb, curr_offset, 1,
6152 "%s : Extension: %s",
6154 extended ? "extended" : "not extended");
6156 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
6157 proto_tree_add_text(subtree,
6158 tvb, curr_offset, 1,
6159 "%s : Access Identity: %s",
6161 (oct & 0x60) ? "Reserved" : "Octet identifier");
6163 switch ((oct & 0x18) >> 3)
6165 case 0x00: str = "No rate adaption"; break;
6166 case 0x01: str = "V.110, I.460/X.30 rate adaptation"; break;
6167 case 0x02: str = "ITU-T X.31 flag stuffing"; break;
6169 str = "Other rate adaption (see octet 5a)"; break;
6173 other_decode_bitfield_value(a_bigbuf, oct, 0x18, 8);
6174 proto_tree_add_text(subtree,
6175 tvb, curr_offset, 1,
6176 "%s : Rate Adaption: %s",
6182 case 0x01: str = "I.440/450"; break;
6183 case 0x02: str = "Reserved: was allocated in earlier phases of the protocol"; break;
6184 case 0x03: str = "Reserved: was allocated in earlier phases of the protocol"; break;
6185 case 0x04: str = "Reserved: was allocated in earlier phases of the protocol"; break;
6186 case 0x05: str = "Reserved: was allocated in earlier phases of the protocol"; break;
6187 case 0x06: str = "Reserved: was allocated in earlier phases of the protocol"; break;
6189 str = "Reserved"; break;
6193 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
6194 proto_tree_add_text(subtree,
6195 tvb, curr_offset, 1,
6196 "%s : Signalling Access Protocol: %s",
6202 NO_MORE_DATA_CHECK(len);
6204 if (!extended) goto bc_octet_6;
6209 proto_tree_add_text(tree,
6210 tvb, curr_offset, 1,
6213 subtree = proto_item_add_subtree(item, ett_bc_oct_5a);
6215 oct = tvb_get_guint8(tvb, curr_offset);
6217 extended = (oct & 0x80) ? FALSE : TRUE;
6219 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
6220 proto_tree_add_text(subtree,
6221 tvb, curr_offset, 1,
6222 "%s : Extension: %s",
6224 extended ? "extended" : "not extended");
6226 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
6227 proto_tree_add_text(subtree,
6228 tvb, curr_offset, 1,
6229 "%s : Other ITC: %s",
6231 (oct & 0x60) ? "Reserved" : "Restricted digital information");
6233 switch ((oct & 0x18) >> 3)
6235 case 0x00: str = "V.120"; break;
6236 case 0x01: str = "H.223 & H.245"; break;
6237 case 0x02: str = "PIAFS"; break;
6243 other_decode_bitfield_value(a_bigbuf, oct, 0x18, 8);
6244 proto_tree_add_text(subtree,
6245 tvb, curr_offset, 1,
6246 "%s : Other Rate Adaption: %s",
6250 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
6251 proto_tree_add_text(subtree,
6252 tvb, curr_offset, 1,
6258 NO_MORE_DATA_CHECK(len);
6260 if (!extended) goto bc_octet_6;
6265 proto_tree_add_text(tree,
6266 tvb, curr_offset, 1,
6269 subtree = proto_item_add_subtree(item, ett_bc_oct_5b);
6271 oct = tvb_get_guint8(tvb, curr_offset);
6273 extended = (oct & 0x80) ? FALSE : TRUE;
6275 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
6276 proto_tree_add_text(subtree,
6277 tvb, curr_offset, 1,
6278 "%s : Extension: %s",
6280 extended ? "extended" : "not extended");
6282 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
6283 proto_tree_add_text(subtree,
6284 tvb, curr_offset, 1,
6285 "%s : Rate Adaption Header: %sincluded",
6287 (oct & 0x40) ? "" : "not ");
6289 other_decode_bitfield_value(a_bigbuf, oct, 0x20, 8);
6290 proto_tree_add_text(subtree,
6291 tvb, curr_offset, 1,
6292 "%s : Multiple frame establishment support in data link: %s",
6294 (oct & 0x20) ? "Supported" : "Not supported, only UI frames allowed");
6296 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
6297 proto_tree_add_text(subtree,
6298 tvb, curr_offset, 1,
6299 "%s : Mode of operation: %s",
6301 (oct & 0x10) ? "Protocol sensitive" : "Bit transparent");
6303 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
6304 proto_tree_add_text(subtree,
6305 tvb, curr_offset, 1,
6306 "%s : Logical link identifier negotiation: %s",
6308 (oct & 0x08) ? "Full protocol negotiation" : "Default, LLI=256 only");
6310 other_decode_bitfield_value(a_bigbuf, oct, 0x04, 8);
6311 proto_tree_add_text(subtree,
6312 tvb, curr_offset, 1,
6313 "%s : Assignor/Assignee: Message originator is '%s'",
6315 (oct & 0x04) ? "assignor only" : "default assignee");
6317 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
6318 proto_tree_add_text(subtree,
6319 tvb, curr_offset, 1,
6320 "%s : In band/Out of band negotiation: Negotiation is done %s",
6323 "with USER INFORMATION messages on a temporary signalling connection" :
6324 "in-band using logical link zero");
6326 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
6327 proto_tree_add_text(subtree,
6328 tvb, curr_offset, 1,
6334 NO_MORE_DATA_CHECK(len);
6341 proto_tree_add_text(tree,
6342 tvb, curr_offset, 1,
6345 subtree = proto_item_add_subtree(item, ett_bc_oct_6);
6347 oct = tvb_get_guint8(tvb, curr_offset);
6349 extended = (oct & 0x80) ? FALSE : TRUE;
6351 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
6352 proto_tree_add_text(subtree,
6353 tvb, curr_offset, 1,
6354 "%s : Extension: %s",
6356 extended ? "extended" : "not extended");
6358 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
6359 proto_tree_add_text(subtree,
6360 tvb, curr_offset, 1,
6361 "%s : Layer 1 Identity: %s",
6363 ((oct & 0x60) == 0x20) ? "Octet identifier" : "Reserved");
6365 other_decode_bitfield_value(a_bigbuf, oct, 0x1e, 8);
6366 proto_tree_add_text(subtree,
6367 tvb, curr_offset, 1,
6368 "%s : User information layer 1 protocol: %s",
6370 (oct & 0x1e) ? "Reserved" : "Default layer 1 protocol");
6372 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
6373 proto_tree_add_text(subtree,
6374 tvb, curr_offset, 1,
6375 "%s : Synchronous/asynchronous: %s",
6377 (oct & 0x01) ? "Asynchronous" : "Synchronous");
6381 NO_MORE_DATA_CHECK(len);
6383 if (!extended) goto bc_octet_7;
6388 proto_tree_add_text(tree,
6389 tvb, curr_offset, 1,
6392 subtree = proto_item_add_subtree(item, ett_bc_oct_6a);
6394 oct = tvb_get_guint8(tvb, curr_offset);
6396 extended = (oct & 0x80) ? FALSE : TRUE;
6398 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
6399 proto_tree_add_text(subtree,
6400 tvb, curr_offset, 1,
6401 "%s : Extension: %s",
6403 extended ? "extended" : "not extended");
6405 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
6406 proto_tree_add_text(subtree,
6407 tvb, curr_offset, 1,
6408 "%s : Number of Stop Bits: %s",
6410 (oct & 0x40) ? "2" : "1");
6412 other_decode_bitfield_value(a_bigbuf, oct, 0x20, 8);
6413 proto_tree_add_text(subtree,
6414 tvb, curr_offset, 1,
6415 "%s : Negotiation: %s",
6417 (oct & 0x20) ? "Reserved" : "In-band negotiation not possible");
6419 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
6420 proto_tree_add_text(subtree,
6421 tvb, curr_offset, 1,
6422 "%s : Number of data bits excluding parity bit if present: %s",
6424 (oct & 0x10) ? "8" : "7");
6428 case 0x01: str = "0.3 kbit/s Recommendation X.1 and V.110"; break;
6429 case 0x02: str = "1.2 kbit/s Recommendation X.1 and V.110"; break;
6430 case 0x03: str = "2.4 kbit/s Recommendation X.1 and V.110"; break;
6431 case 0x04: str = "4.8 kbit/s Recommendation X.1 and V.110"; break;
6432 case 0x05: str = "9.6 kbit/s Recommendation X.1 and V.110"; break;
6433 case 0x06: str = "12.0 kbit/s transparent (non compliance with X.1 and V.110)"; break;
6434 case 0x07: str = "Reserved: was allocated in earlier phases of the protocol"; break;
6440 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
6441 proto_tree_add_text(subtree,
6442 tvb, curr_offset, 1,
6443 "%s : User rate: %s",
6449 NO_MORE_DATA_CHECK(len);
6451 if (!extended) goto bc_octet_7;
6456 proto_tree_add_text(tree,
6457 tvb, curr_offset, 1,
6460 subtree = proto_item_add_subtree(item, ett_bc_oct_6b);
6462 oct = tvb_get_guint8(tvb, curr_offset);
6464 extended = (oct & 0x80) ? FALSE : TRUE;
6466 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
6467 proto_tree_add_text(subtree,
6468 tvb, curr_offset, 1,
6469 "%s : Extension: %s",
6471 extended ? "extended" : "not extended");
6473 switch ((oct & 0x60) >> 5)
6475 case 0x02: str = "8 kbit/s"; break;
6476 case 0x03: str = "16 kbit/s"; break;
6482 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
6483 proto_tree_add_text(subtree,
6484 tvb, curr_offset, 1,
6485 "%s : V.110/X.30 rate adaptation Intermediate rate: %s",
6489 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
6490 proto_tree_add_text(subtree,
6491 tvb, curr_offset, 1,
6492 "%s : Network independent clock (NIC) on transmission (Tx): %s to send data with network independent clock",
6494 (oct & 0x10) ? "requires" : "does not require");
6496 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
6497 proto_tree_add_text(subtree,
6498 tvb, curr_offset, 1,
6499 "%s : Network independent clock (NIC) on reception (Rx): %s accept data with network independent clock",
6501 (oct & 0x08) ? "can" : "cannot");
6505 case 0x00: str = "Odd"; break;
6506 case 0x02: str = "Even"; break;
6507 case 0x03: str = "None"; break;
6508 case 0x04: str = "Forced to 0"; break;
6509 case 0x05: str = "Forced to 1"; break;
6515 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
6516 proto_tree_add_text(subtree,
6517 tvb, curr_offset, 1,
6518 "%s : Parity information: %s",
6524 NO_MORE_DATA_CHECK(len);
6526 if (!extended) goto bc_octet_7;
6531 proto_tree_add_text(tree,
6532 tvb, curr_offset, 1,
6535 subtree = proto_item_add_subtree(item, ett_bc_oct_6c);
6537 oct = tvb_get_guint8(tvb, curr_offset);
6539 extended = (oct & 0x80) ? FALSE : TRUE;
6541 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
6542 proto_tree_add_text(subtree,
6543 tvb, curr_offset, 1,
6544 "%s : Extension: %s",
6546 extended ? "extended" : "not extended");
6548 switch ((oct & 0x60) >> 5)
6550 case 0x01: str = "Non transparent (RLP)"; break;
6551 case 0x02: str = "Both, transparent preferred"; break;
6552 case 0x03: str = "Both, non transparent preferred"; break;
6554 str = "Transparent";
6558 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
6559 proto_tree_add_text(subtree,
6560 tvb, curr_offset, 1,
6561 "%s : Connection element: %s",
6567 case 0x00: str = "None"; break;
6568 case 0x01: str = "V.21"; break;
6569 case 0x02: str = "V.22"; break;
6570 case 0x03: str = "V.22 bis"; break;
6571 case 0x04: str = "Reserved: was allocated in earlier phases of the protocol"; break;
6572 case 0x05: str = "V.26 ter"; break;
6573 case 0x06: str = "V.32"; break;
6574 case 0x07: str = "Modem for undefined interface"; break;
6575 case 0x08: str = "Autobauding type 1"; break;
6581 other_decode_bitfield_value(a_bigbuf, oct, 0x1f, 8);
6582 proto_tree_add_text(subtree,
6583 tvb, curr_offset, 1,
6584 "%s : Modem type: %s",
6590 NO_MORE_DATA_CHECK(len);
6592 if (!extended) goto bc_octet_7;
6597 proto_tree_add_text(tree,
6598 tvb, curr_offset, 1,
6601 subtree = proto_item_add_subtree(item, ett_bc_oct_6d);
6603 oct = tvb_get_guint8(tvb, curr_offset);
6605 extended = (oct & 0x80) ? FALSE : TRUE;
6607 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
6608 proto_tree_add_text(subtree,
6609 tvb, curr_offset, 1,
6610 "%s : Extension: %s",
6612 extended ? "extended" : "not extended");
6614 switch ((oct & 0x60) >> 5)
6616 case 0x00: str = "No other modem type specified in this field"; break;
6617 case 0x02: str = "V.34"; break;
6623 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
6624 proto_tree_add_text(subtree,
6625 tvb, curr_offset, 1,
6626 "%s : Other modem type: %s",
6632 case 0x00: str = "Fixed network user rate not applicable/No meaning is associated with this value"; break;
6633 case 0x01: str = "9.6 kbit/s Recommendation X.1 and V.110"; break;
6634 case 0x02: str = "14.4 kbit/s Recommendation X.1 and V.110"; break;
6635 case 0x03: str = "19.2 kbit/s Recommendation X.1 and V.110"; break;
6636 case 0x04: str = "28.8 kbit/s Recommendation X.1 and V.110"; break;
6637 case 0x05: str = "38.4 kbit/s Recommendation X.1 and V.110"; break;
6638 case 0x06: str = "48.0 kbit/s Recommendation X.1 and V.110(synch)"; break;
6639 case 0x07: str = "56.0 kbit/s Recommendation X.1 and V.110(synch) /bit transparent"; break;
6640 case 0x08: str = "64.0 kbit/s bit transparent"; break;
6641 case 0x09: str = "33.6 kbit/s bit transparent"; break;
6642 case 0x0a: str = "32.0 kbit/s Recommendation I.460"; break;
6643 case 0x0b: str = "31.2 kbit/s Recommendation V.34"; break;
6649 other_decode_bitfield_value(a_bigbuf, oct, 0x1f, 8);
6650 proto_tree_add_text(subtree,
6651 tvb, curr_offset, 1,
6652 "%s : Fixed network user rate: %s",
6658 NO_MORE_DATA_CHECK(len);
6660 if (!extended) goto bc_octet_7;
6665 proto_tree_add_text(tree,
6666 tvb, curr_offset, 1,
6669 subtree = proto_item_add_subtree(item, ett_bc_oct_6e);
6671 oct = tvb_get_guint8(tvb, curr_offset);
6673 extended = (oct & 0x80) ? FALSE : TRUE;
6675 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
6676 proto_tree_add_text(subtree,
6677 tvb, curr_offset, 1,
6678 "%s : Extension: %s",
6680 extended ? "extended" : "not extended");
6682 if (is_uplink == IS_UPLINK_TRUE)
6684 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
6685 proto_tree_add_text(subtree,
6686 tvb, curr_offset, 1,
6687 "%s : Acceptable channel codings: TCH/F14.4 %sacceptable",
6689 (oct & 0x40) ? "" : "not ");
6691 other_decode_bitfield_value(a_bigbuf, oct, 0x20, 8);
6692 proto_tree_add_text(subtree,
6693 tvb, curr_offset, 1,
6694 "%s : Acceptable channel codings: Spare",
6697 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
6698 proto_tree_add_text(subtree,
6699 tvb, curr_offset, 1,
6700 "%s : Acceptable channel codings: TCH/F9.6 %sacceptable",
6702 (oct & 0x10) ? "" : "not ");
6704 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
6705 proto_tree_add_text(subtree,
6706 tvb, curr_offset, 1,
6707 "%s : Acceptable channel codings: TCH/F4.8 %sacceptable",
6709 (oct & 0x08) ? "" : "not ");
6711 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
6712 proto_tree_add_text(subtree,
6713 tvb, curr_offset, 1,
6714 "%s : Maximum number of traffic channels: %u TCH",
6720 other_decode_bitfield_value(a_bigbuf, oct, 0x78, 8);
6721 proto_tree_add_text(subtree,
6722 tvb, curr_offset, 1,
6723 "%s : Acceptable channel codings: Spare",
6726 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
6727 proto_tree_add_text(subtree,
6728 tvb, curr_offset, 1,
6729 "%s : Maximum number of traffic channels: Spare",
6735 NO_MORE_DATA_CHECK(len);
6737 if (!extended) goto bc_octet_7;
6742 proto_tree_add_text(tree,
6743 tvb, curr_offset, 1,
6746 subtree = proto_item_add_subtree(item, ett_bc_oct_6f);
6748 oct = tvb_get_guint8(tvb, curr_offset);
6750 extended = (oct & 0x80) ? FALSE : TRUE;
6752 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
6753 proto_tree_add_text(subtree,
6754 tvb, curr_offset, 1,
6755 "%s : Extension: %s",
6757 extended ? "extended" : "not extended");
6759 switch ((oct & 0x70) >> 4)
6761 case 0x00: str = "not allowed/required/applicable"; break;
6762 case 0x01: str = "up to 1 TCH/F allowed/may be requested"; break;
6763 case 0x02: str = "up to 2 TCH/F allowed/may be requested"; break;
6764 case 0x03: str = "up to 3 TCH/F allowed/may be requested"; break;
6765 case 0x04: str = "up to 4 TCH/F allowed/may be requested"; break;
6767 str = "up to 4 TCH/F may be requested";
6771 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
6772 proto_tree_add_text(subtree,
6773 tvb, curr_offset, 1,
6774 "%s : UIMI, User initiated modification indication: %s",
6778 if (is_uplink == IS_UPLINK_TRUE)
6782 case 0x00: str = "Air interface user rate not applicable/No meaning associated with this value"; break;
6783 case 0x01: str = "9.6 kbit/s"; break;
6784 case 0x02: str = "14.4 kbit/s"; break;
6785 case 0x03: str = "19.2 kbit/s"; break;
6786 case 0x05: str = "28.8 kbit/s"; break;
6787 case 0x06: str = "38.4 kbit/s"; break;
6788 case 0x07: str = "43.2 kbit/s"; break;
6789 case 0x08: str = "57.6 kbit/s"; break;
6790 case 0x09: str = "interpreted by the network as 38.4 kbit/s in this version of the protocol"; break;
6791 case 0x0a: str = "interpreted by the network as 38.4 kbit/s in this version of the protocol"; break;
6792 case 0x0b: str = "interpreted by the network as 38.4 kbit/s in this version of the protocol"; break;
6793 case 0x0c: str = "interpreted by the network as 38.4 kbit/s in this version of the protocol"; break;
6799 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
6800 proto_tree_add_text(subtree,
6801 tvb, curr_offset, 1,
6802 "%s : Wanted air interface user rate: %s",
6808 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
6809 proto_tree_add_text(subtree,
6810 tvb, curr_offset, 1,
6811 "%s : Wanted air interface user rate: Spare",
6817 NO_MORE_DATA_CHECK(len);
6819 if (!extended) goto bc_octet_7;
6824 proto_tree_add_text(tree,
6825 tvb, curr_offset, 1,
6828 subtree = proto_item_add_subtree(item, ett_bc_oct_6g);
6830 oct = tvb_get_guint8(tvb, curr_offset);
6832 extended = (oct & 0x80) ? FALSE : TRUE;
6834 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
6835 proto_tree_add_text(subtree,
6836 tvb, curr_offset, 1,
6837 "%s : Extension: %s",
6839 extended ? "extended" : "not extended");
6841 if (is_uplink == IS_UPLINK_TRUE)
6843 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
6844 proto_tree_add_text(subtree,
6845 tvb, curr_offset, 1,
6846 "%s : Acceptable channel codings extended: TCH/F28.8 %sacceptable",
6848 (oct & 0x40) ? "" : "not ");
6850 other_decode_bitfield_value(a_bigbuf, oct, 0x20, 8);
6851 proto_tree_add_text(subtree,
6852 tvb, curr_offset, 1,
6853 "%s : Acceptable channel codings extended: TCH/F32.0 %sacceptable",
6855 (oct & 0x20) ? "" : "not ");
6857 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
6858 proto_tree_add_text(subtree,
6859 tvb, curr_offset, 1,
6860 "%s : Acceptable channel codings extended: TCH/F43.2 %sacceptable",
6862 (oct & 0x10) ? "" : "not ");
6864 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
6865 proto_tree_add_text(subtree,
6866 tvb, curr_offset, 1,
6867 "%s : Acceptable channel codings extended: TCH/F43.2 %sacceptable",
6869 (oct & 0x10) ? "" : "not ");
6871 switch ((oct & 0x0c) >> 2)
6873 case 0: str = "Channel coding symmetry preferred"; break;
6874 case 2: str = "Downlink biased channel coding asymmetry is preferred"; break;
6875 case 1: str = "Uplink biased channel coding asymmetry is preferred"; break;
6877 str = "Unused, treat as Channel coding symmetry preferred";
6881 other_decode_bitfield_value(a_bigbuf, oct, 0x0c, 8);
6882 proto_tree_add_text(subtree,
6883 tvb, curr_offset, 1,
6884 "%s : Channel Coding Asymmetry Indication: %s",
6890 other_decode_bitfield_value(a_bigbuf, oct, 0x7c, 8);
6891 proto_tree_add_text(subtree,
6892 tvb, curr_offset, 1,
6893 "%s : EDGE Channel Codings: Spare",
6897 other_decode_bitfield_value(a_bigbuf, oct, 0x03, 8);
6898 proto_tree_add_text(subtree,
6899 tvb, curr_offset, 1,
6905 NO_MORE_DATA_CHECK(len);
6912 proto_tree_add_text(tree,
6913 tvb, curr_offset, 1,
6916 subtree = proto_item_add_subtree(item, ett_bc_oct_7);
6918 extended = (oct & 0x80) ? FALSE : TRUE;
6920 oct = tvb_get_guint8(tvb, curr_offset);
6922 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
6923 proto_tree_add_text(subtree,
6924 tvb, curr_offset, 1,
6925 "%s : Extension: %s",
6927 extended ? "extended" : "not extended");
6929 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
6930 proto_tree_add_text(subtree,
6931 tvb, curr_offset, 1,
6932 "%s : Layer 2 Identity: %s",
6934 ((oct & 0x60) == 0x40) ? "Octet identifier" : "Reserved");
6938 case 0x06: str = "Reserved: was allocated in earlier phases of the protocol"; break;
6939 case 0x08: str = "ISO 6429, codeset 0 (DC1/DC3)"; break;
6940 case 0x09: str = "Reserved: was allocated but never used in earlier phases of the protocol"; break;
6941 case 0x0a: str = "Videotex profile 1"; break;
6942 case 0x0c: str = "COPnoFlCt (Character oriented Protocol with no Flow Control mechanism)"; break;
6943 case 0x0d: str = "Reserved: was allocated in earlier phases of the protocol"; break;
6949 other_decode_bitfield_value(a_bigbuf, oct, 0x1f, 8);
6950 proto_tree_add_text(subtree,
6951 tvb, curr_offset, 1,
6952 "%s : User information layer 2 protocol: %s",
6958 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
6960 return(curr_offset - offset);
6967 de_cc_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
6970 guint32 curr_offset;
6972 curr_offset = offset;
6974 oct = tvb_get_guint8(tvb, curr_offset);
6976 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
6978 switch ((oct & 0xf0) >> 4)
6981 proto_tree_add_text(tree,
6982 tvb, curr_offset, 1,
6983 "%s : Maximum number of supported bearers: 1",
6988 proto_tree_add_text(tree,
6989 tvb, curr_offset, 1,
6990 "%s : Maximum number of supported bearers: %u",
6996 other_decode_bitfield_value(a_bigbuf, oct, 0x0c, 8);
6997 proto_tree_add_text(tree,
6998 tvb, curr_offset, 1,
7002 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
7003 proto_tree_add_text(tree,
7004 tvb, curr_offset, 1,
7005 "%s : PCP: the mobile station %s the Prolonged Clearing Procedure",
7007 (oct & 0x02) ? "supports" : "does not support");
7009 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
7010 proto_tree_add_text(tree,
7011 tvb, curr_offset, 1,
7015 "the mobile station supports DTMF as specified in subclause 5.5.7 of TS 24.008" :
7016 "reserved for earlier versions of the protocol");
7020 NO_MORE_DATA_CHECK(len);
7022 oct = tvb_get_guint8(tvb, curr_offset);
7024 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
7025 proto_tree_add_text(tree,
7026 tvb, curr_offset, 1,
7030 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
7031 proto_tree_add_text(tree,
7032 tvb, curr_offset, 1,
7033 "%s : Maximum number of speech bearers: %u",
7039 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
7041 return(curr_offset - offset);
7048 de_call_state(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
7051 guint32 curr_offset;
7052 proto_tree *subtree;
7057 curr_offset = offset;
7059 oct = tvb_get_guint8(tvb, curr_offset);
7062 proto_tree_add_text(tree,
7063 tvb, curr_offset, 1,
7064 gsm_dtap_elem_strings[DE_CALL_STATE].strptr);
7066 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_CALL_STATE]);
7068 switch ((oct & 0xc0) >> 6)
7070 case 0: str = "Coding as specified in ITU-T Rec. Q.931"; break;
7071 case 1: str = "Reserved for other international standards"; break;
7072 case 2: str = "National standard"; break;
7074 str = "Standard defined for the GSM PLMNS";
7078 other_decode_bitfield_value(a_bigbuf, oct, 0xc0, 8);
7079 proto_tree_add_text(subtree,
7080 tvb, curr_offset, 1,
7081 "%s : Coding standard: %s",
7087 case 0x00: str = "UO - null NO - null"; break;
7088 case 0x02: str = "U0.1- MM connection pending N0.1- MM connection pending"; break;
7089 case 0x22: str = "U0.2- CC prompt present N0.2- CC connection pending"; break;
7090 case 0x23: str = "U0.3- Wait for network information N0.3- Network answer pending"; break;
7091 case 0x24: str = "U0.4- CC-Establishment present N0.4- CC-Establishment present"; break;
7092 case 0x25: str = "U0.5- CC-Establishment confirmed N0.5- CC-Establishment confirmed"; break;
7093 case 0x26: str = "U0.6- Recall present N0.6- Recall present"; break;
7094 case 0x01: str = "U1 - call initiated N1 - call initiated"; break;
7095 case 0x03: str = "U3 - mobile originating call proceeding N3 - mobile originating call proceeding"; break;
7096 case 0x04: str = "U4 - call delivered N4 - call delivered"; break;
7097 case 0x06: str = "U6 - call present N6 - call present"; break;
7098 case 0x07: str = "U7 - call received N7 - call received"; break;
7099 case 0x08: str = "U8 - connect request N8 - connect request"; break;
7100 case 0x09: str = "U9 - mobile terminating call confirmed N9 - mobile terminating call confirmed"; break;
7101 case 0x0a: str = "U10- active N10- active"; break;
7102 case 0x0b: str = "U11- disconnect request"; break;
7103 case 0x0c: str = "U12- disconnect indication N12-disconnect indication"; break;
7104 case 0x13: str = "U19- release request N19- release request"; break;
7105 case 0x1a: str = "U26- mobile originating modify N26- mobile originating modify"; break;
7106 case 0x1b: str = "U27- mobile terminating modify N27- mobile terminating modify"; break;
7107 case 0x1c: str = " N28- connect indication"; break;
7113 other_decode_bitfield_value(a_bigbuf, oct, 0x3f, 8);
7114 proto_tree_add_text(subtree,
7115 tvb, curr_offset, 1,
7116 "%s : Call state value: %s",
7122 /* no length check possible */
7124 return(curr_offset - offset);
7127 static const true_false_string gsm_a_extension_value = {
7132 const value_string gsm_a_type_of_number_values[] = {
7133 { 0x00, "unknown" },
7134 { 0x01, "International Number" },
7135 { 0x02, "National number" },
7136 { 0x03, "Network Specific Number" },
7137 { 0x04, "Dedicated access, short code" },
7138 { 0x05, "Reserved" },
7139 { 0x06, "Reserved" },
7140 { 0x07, "Reserved for extension" },
7144 const value_string gsm_a_numbering_plan_id_values[] = {
7145 { 0x00, "unknown" },
7146 { 0x01, "ISDN/Telephony Numbering (Rec ITU-T E.164)" },
7148 { 0x03, "Data Numbering (ITU-T Rec. X.121)" },
7149 { 0x04, "Telex Numbering (ITU-T Rec. F.69)" },
7150 { 0x08, "National Numbering" },
7151 { 0x09, "Private Numbering" },
7152 { 0x0d, "reserved for CTS (see 3GPP TS 44.056 [91])" },
7153 { 0x0f, "Reserved for extension" },
7161 de_cld_party_bcd_num(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
7164 guint32 curr_offset;
7166 curr_offset = offset;
7168 proto_tree_add_item(tree, hf_gsm_a_extension, tvb, curr_offset, 1, FALSE);
7169 proto_tree_add_item(tree, hf_gsm_a_type_of_number , tvb, curr_offset, 1, FALSE);
7170 proto_tree_add_item(tree, hf_gsm_a_numbering_plan_id , tvb, curr_offset, 1, FALSE);
7174 NO_MORE_DATA_CHECK(len);
7176 poctets = tvb_get_ephemeral_string(tvb, curr_offset, len - (curr_offset - offset));
7178 my_dgt_tbcd_unpack(a_bigbuf, poctets, len - (curr_offset - offset),
7181 proto_tree_add_string_format(tree, hf_gsm_a_cld_party_bcd_num,
7182 tvb, curr_offset, len - (curr_offset - offset),
7187 if (sccp_assoc && ! sccp_assoc->called_party) {
7188 sccp_assoc->called_party = se_strdup(a_bigbuf);
7191 curr_offset += len - (curr_offset - offset);
7194 g_snprintf(add_string, string_len, " - (%s)", a_bigbuf);
7196 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
7198 return(curr_offset - offset);
7205 de_cld_party_sub_addr(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
7208 guint32 curr_offset;
7211 curr_offset = offset;
7213 oct = tvb_get_guint8(tvb, curr_offset);
7215 proto_tree_add_item(tree, hf_gsm_a_extension, tvb, curr_offset, 1, FALSE);
7217 switch ((oct & 0x70) >> 4)
7219 case 0: str = "NSAP (X.213/ISO 8348 AD2)"; break;
7220 case 2: str = "User specified"; break;
7226 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
7227 proto_tree_add_text(tree,
7228 tvb, curr_offset, 1,
7229 "%s : Type of subaddress: %s",
7233 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
7234 proto_tree_add_text(tree,
7235 tvb, curr_offset, 1,
7236 "%s : Odd/Even indicator: %s",
7239 "odd number of address signals" : "even number of address signals");
7241 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
7242 proto_tree_add_text(tree,
7243 tvb, curr_offset, 1,
7249 NO_MORE_DATA_CHECK(len);
7251 proto_tree_add_text(tree,
7252 tvb, curr_offset, len - (curr_offset - offset),
7253 "Subaddress information");
7255 curr_offset += len - (curr_offset - offset);
7257 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
7259 return(curr_offset - offset);
7266 de_clg_party_bcd_num(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
7270 guint32 curr_offset;
7273 curr_offset = offset;
7275 proto_tree_add_item(tree, hf_gsm_a_extension, tvb, curr_offset, 1, FALSE);
7276 proto_tree_add_item(tree, hf_gsm_a_type_of_number , tvb, curr_offset, 1, FALSE);
7277 proto_tree_add_item(tree, hf_gsm_a_numbering_plan_id , tvb, curr_offset, 1, FALSE);
7281 oct = tvb_get_guint8(tvb, curr_offset);
7283 proto_tree_add_item(tree, hf_gsm_a_extension, tvb, curr_offset, 1, FALSE);
7285 switch ((oct & 0x60) >> 5)
7287 case 0: str = "Presentation allowed"; break;
7288 case 1: str = "Presentation restricted"; break;
7289 case 2: str = "Number not available due to interworking"; break;
7295 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
7296 proto_tree_add_text(tree,
7297 tvb, curr_offset, 1,
7298 "%s : Presentation indicator: %s",
7302 other_decode_bitfield_value(a_bigbuf, oct, 0x1c, 8);
7303 proto_tree_add_text(tree,
7304 tvb, curr_offset, 1,
7310 case 0: str = "User-provided, not screened"; break;
7311 case 1: str = "User-provided, verified and passed"; break;
7312 case 2: str = "User-provided, verified and failed"; break;
7314 str = "Network provided";
7318 other_decode_bitfield_value(a_bigbuf, oct, 0x03, 8);
7319 proto_tree_add_text(tree,
7320 tvb, curr_offset, 1,
7321 "%s : Screening indicator: %s",
7327 NO_MORE_DATA_CHECK(len);
7329 poctets = tvb_get_ephemeral_string(tvb, curr_offset, len - (curr_offset - offset));
7331 my_dgt_tbcd_unpack(a_bigbuf, poctets, len - (curr_offset - offset),
7334 proto_tree_add_string_format(tree, hf_gsm_a_clg_party_bcd_num,
7335 tvb, curr_offset, len - (curr_offset - offset),
7340 curr_offset += len - (curr_offset - offset);
7343 g_snprintf(add_string, string_len, " - (%s)", a_bigbuf);
7345 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
7347 return(curr_offset - offset);
7354 de_clg_party_sub_addr(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
7357 guint32 curr_offset;
7360 curr_offset = offset;
7362 oct = tvb_get_guint8(tvb, curr_offset);
7364 proto_tree_add_item(tree, hf_gsm_a_extension, tvb, curr_offset, 1, FALSE);
7366 switch ((oct & 0x70) >> 4)
7368 case 0: str = "NSAP (X.213/ISO 8348 AD2)"; break;
7369 case 2: str = "User specified"; break;
7375 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
7376 proto_tree_add_text(tree,
7377 tvb, curr_offset, 1,
7378 "%s : Type of subaddress: %s",
7382 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
7383 proto_tree_add_text(tree,
7384 tvb, curr_offset, 1,
7385 "%s : Odd/Even indicator: %s",
7388 "odd number of address signals" : "even number of address signals");
7390 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
7391 proto_tree_add_text(tree,
7392 tvb, curr_offset, 1,
7398 NO_MORE_DATA_CHECK(len);
7400 proto_tree_add_text(tree,
7401 tvb, curr_offset, len - (curr_offset - offset),
7402 "Subaddress information");
7404 curr_offset += len - (curr_offset - offset);
7406 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
7408 return(curr_offset - offset);
7415 de_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
7419 guint32 curr_offset;
7422 curr_offset = offset;
7424 oct = tvb_get_guint8(tvb, curr_offset);
7426 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
7427 proto_tree_add_text(tree,
7428 tvb, curr_offset, 1,
7429 "%s : Extension: %s",
7431 (oct & 0x80) ? "not extended" : "extended");
7433 switch ((oct & 0x60) >> 5)
7435 case 0: str = "Coding as specified in ITU-T Rec. Q.931"; break;
7436 case 1: str = "Reserved for other international standards"; break;
7437 case 2: str = "National standard"; break;
7439 str = "Standard defined for the GSM PLMNS";
7443 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
7444 proto_tree_add_text(tree,
7445 tvb, curr_offset, 1,
7446 "%s : Coding standard: %s",
7450 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
7451 proto_tree_add_text(tree,
7452 tvb, curr_offset, 1,
7458 case 0: str = "User"; break;
7459 case 1: str = "Private network serving the local user"; break;
7460 case 2: str = "Public network serving the local user"; break;
7461 case 3: str = "Transit network"; break;
7462 case 4: str = "Public network serving the remote user"; break;
7463 case 5: str = "Private network serving the remote user"; break;
7464 case 7: str = "International network"; break;
7465 case 10: str = "Network beyond interworking point"; break;
7471 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
7472 proto_tree_add_text(tree,
7473 tvb, curr_offset, 1,
7474 "%s : Location: %s",
7480 oct = tvb_get_guint8(tvb, curr_offset);
7484 proto_tree_add_item(tree, hf_gsm_a_extension, tvb, curr_offset, 1, FALSE);
7486 other_decode_bitfield_value(a_bigbuf, oct, 0x7f, 8);
7487 proto_tree_add_text(tree,
7488 tvb, curr_offset, 1,
7489 "%s : Recommendation",
7494 oct = tvb_get_guint8(tvb, curr_offset);
7497 proto_tree_add_item(tree, hf_gsm_a_extension, tvb, curr_offset, 1, FALSE);
7502 case 1: str = "Unassigned (unallocated) number"; break;
7503 case 3: str = "No route to destination"; break;
7504 case 6: str = "Channel unacceptable"; break;
7505 case 8: str = "Operator determined barring"; break;
7506 case 16: str = "Normal call clearing"; break;
7507 case 17: str = "User busy"; break;
7508 case 18: str = "No user responding"; break;
7509 case 19: str = "User alerting, no answer"; break;
7510 case 21: str = "Call rejected"; break;
7511 case 22: str = "Number changed"; break;
7512 case 25: str = "Pre-emption"; break;
7513 case 26: str = "Non selected user clearing"; break;
7514 case 27: str = "Destination out of order"; break;
7515 case 28: str = "Invalid number format (incomplete number)"; break;
7516 case 29: str = "Facility rejected"; break;
7517 case 30: str = "Response to STATUS ENQUIRY"; break;
7518 case 31: str = "Normal, unspecified"; break;
7519 case 34: str = "No circuit/channel available"; break;
7520 case 38: str = "Network out of order"; break;
7521 case 41: str = "Temporary failure"; break;
7522 case 42: str = "Switching equipment congestion"; break;
7523 case 43: str = "Access information discarded"; break;
7524 case 44: str = "requested circuit/channel not available"; break;
7525 case 47: str = "Resources unavailable, unspecified"; break;
7526 case 49: str = "Quality of service unavailable"; break;
7527 case 50: str = "Requested facility not subscribed"; break;
7528 case 55: str = "Incoming calls barred within the CUG"; break;
7529 case 57: str = "Bearer capability not authorized"; break;
7530 case 58: str = "Bearer capability not presently available"; break;
7531 case 63: str = "Service or option not available, unspecified"; break;
7532 case 65: str = "Bearer service not implemented"; break;
7533 case 68: str = "ACM equal to or greater than ACMmax"; break;
7534 case 69: str = "Requested facility not implemented"; break;
7535 case 70: str = "Only restricted digital information bearer capability is available"; break;
7536 case 79: str = "Service or option not implemented, unspecified"; break;
7537 case 81: str = "Invalid transaction identifier value"; break;
7538 case 87: str = "User not member of CUG"; break;
7539 case 88: str = "Incompatible destination"; break;
7540 case 91: str = "Invalid transit network selection"; break;
7541 case 95: str = "Semantically incorrect message"; break;
7542 case 96: str = "Invalid mandatory information"; break;
7543 case 97: str = "Message type non-existent or not implemented"; break;
7544 case 98: str = "Message type not compatible with protocol state"; break;
7545 case 99: str = "Information element non-existent or not implemented"; break;
7546 case 100: str = "Conditional IE error"; break;
7547 case 101: str = "Message not compatible with protocol state"; break;
7548 case 102: str = "Recovery on timer expiry"; break;
7549 case 111: str = "Protocol error, unspecified"; break;
7550 case 127: str = "Interworking, unspecified"; break;
7552 if (cause <= 31) { str = "Treat as Normal, unspecified"; }
7553 else if ((cause >= 32) && (cause <= 47)) { str = "Treat as Resources unavailable, unspecified"; }
7554 else if ((cause >= 48) && (cause <= 63)) { str = "Treat as Service or option not available, unspecified"; }
7555 else if ((cause >= 64) && (cause <= 79)) { str = "Treat as Service or option not implemented, unspecified"; }
7556 else if ((cause >= 80) && (cause <= 95)) { str = "Treat as Semantically incorrect message"; }
7557 else if ((cause >= 96) && (cause <= 111)) { str = "Treat as Protocol error, unspecified"; }
7558 else if ((cause >= 112) && (cause <= 127)) { str = "Treat as Interworking, unspecified"; }
7562 other_decode_bitfield_value(a_bigbuf, oct, 0x7f, 8);
7563 proto_tree_add_uint_format(tree, hf_gsm_a_dtap_cause,
7564 tvb, curr_offset, 1, cause,
7565 "%s : Cause: (%u) %s",
7573 g_snprintf(add_string, string_len, " - (%u) %s", cause, str);
7575 NO_MORE_DATA_CHECK(len);
7577 proto_tree_add_text(tree,
7578 tvb, curr_offset, len - (curr_offset - offset),
7581 curr_offset += len - (curr_offset - offset);
7583 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
7585 return(curr_offset - offset);
7589 * 10.5.4.18 Low layer compatibility
7592 de_llc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
7594 guint32 curr_offset;
7596 curr_offset = offset;
7598 dissect_q931_bearer_capability_ie(tvb, offset, len, tree);
7600 curr_offset = curr_offset + len;
7601 return(curr_offset - offset);
7608 dissect_ROS_InvokeIdType(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
7609 offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
7614 static int dissect_invokeID(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
7615 return dissect_ROS_InvokeIdType(FALSE, tvb, offset, pinfo, tree, hf_ROS_invokeID);
7617 static int dissect_linkedID_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
7618 return dissect_ROS_InvokeIdType(TRUE, tvb, offset, pinfo, tree, hf_ROS_linkedID);
7620 static int dissect_derivable(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
7621 return dissect_ROS_InvokeIdType(FALSE, tvb, offset, pinfo, tree, hf_ROS_derivable);
7627 dissect_ROS_INTEGER(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
7628 offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
7633 static int dissect_localValue(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
7634 return dissect_ROS_INTEGER(FALSE, tvb, offset, pinfo, tree, hf_ROS_localValue);
7636 static int dissect_privateer_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
7637 return dissect_ROS_INTEGER(TRUE, tvb, offset, pinfo, tree, hf_ROS_privateer);
7643 dissect_ROS_OBJECT_IDENTIFIER(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
7644 offset = dissect_ber_object_identifier(implicit_tag, pinfo, tree, tvb, offset, hf_index,
7649 static int dissect_globalValue(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
7650 return dissect_ROS_OBJECT_IDENTIFIER(FALSE, tvb, offset, pinfo, tree, hf_ROS_globalValue);
7654 static const value_string ROS_OPERATION_vals[] = {
7655 { 0, "localValue" },
7656 { 1, "globalValue" },
7660 static const ber_choice_t OPERATION_choice[] = {
7661 { 0, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_localValue },
7662 { 1, BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_globalValue },
7663 { 0, 0, 0, 0, NULL }
7667 dissect_ROS_OPERATION(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
7668 offset = dissect_ber_choice(pinfo, tree, tvb, offset,
7669 OPERATION_choice, hf_index, ett_ROS_OPERATION, NULL);
7673 static int dissect_opCode(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
7674 return dissect_ROS_OPERATION(FALSE, tvb, offset, pinfo, tree, hf_ROS_opCode);
7680 dissect_ROS_Parameter(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
7681 offset = gsm_ss_dissect(tvb, pinfo, tree, offset, localValue, comp_type_tag);
7685 static int dissect_parameter(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
7686 return dissect_ROS_Parameter(FALSE, tvb, offset, pinfo, tree, hf_ROS_parameter);
7689 static const ber_sequence_t Invoke_sequence[] = {
7690 { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_invokeID },
7691 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_linkedID_impl },
7692 { BER_CLASS_UNI, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_opCode },
7693 { BER_CLASS_ANY, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_parameter },
7698 dissect_ROS_Invoke(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
7699 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
7700 Invoke_sequence, hf_index, ett_ROS_Invoke);
7704 static int dissect_invoke_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
7705 return dissect_ROS_Invoke(TRUE, tvb, offset, pinfo, tree, hf_ROS_invoke);
7708 static const ber_sequence_t T_resultretres_sequence[] = {
7709 { BER_CLASS_UNI, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_opCode },
7710 { BER_CLASS_ANY, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_parameter },
7715 dissect_ROS_T_resultretres(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
7716 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
7717 T_resultretres_sequence, hf_index, ett_ROS_T_resultretres);
7721 static int dissect_resultretres(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
7722 return dissect_ROS_T_resultretres(FALSE, tvb, offset, pinfo, tree, hf_ROS_resultretres);
7725 static const ber_sequence_t ReturnResult_sequence[] = {
7726 { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_invokeID },
7727 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_resultretres },
7732 dissect_ROS_ReturnResult(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
7733 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
7734 ReturnResult_sequence, hf_index, ett_ROS_ReturnResult);
7738 static int dissect_returnResultLast_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
7739 return dissect_ROS_ReturnResult(TRUE, tvb, offset, pinfo, tree, hf_ROS_returnResultLast);
7745 dissect_ROS_INTEGER_M32768_32767(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
7746 offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
7751 static int dissect_nationaler_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
7752 return dissect_ROS_INTEGER_M32768_32767(TRUE, tvb, offset, pinfo, tree, hf_ROS_nationaler);
7756 static const value_string ROS_ErrorCode_vals[] = {
7757 { 19, "nationaler" },
7758 { 20, "privateer" },
7762 static const ber_choice_t ErrorCode_choice[] = {
7763 { 19, BER_CLASS_PRI, 19, BER_FLAGS_IMPLTAG, dissect_nationaler_impl },
7764 { 20, BER_CLASS_PRI, 20, BER_FLAGS_IMPLTAG, dissect_privateer_impl },
7765 { 0, 0, 0, 0, NULL }
7769 dissect_ROS_ErrorCode(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
7770 offset = dissect_ber_choice(pinfo, tree, tvb, offset,
7771 ErrorCode_choice, hf_index, ett_ROS_ErrorCode, NULL);
7775 static int dissect_errorCode(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
7776 return dissect_ROS_ErrorCode(FALSE, tvb, offset, pinfo, tree, hf_ROS_errorCode);
7779 static const ber_sequence_t ReturnError_sequence[] = {
7780 { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_invokeID },
7781 { BER_CLASS_PRI, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_errorCode },
7782 { BER_CLASS_ANY, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_parameter },
7787 dissect_ROS_ReturnError(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
7788 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
7789 ReturnError_sequence, hf_index, ett_ROS_ReturnError);
7793 static int dissect_returnError_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
7794 return dissect_ROS_ReturnError(TRUE, tvb, offset, pinfo, tree, hf_ROS_returnError);
7800 dissect_ROS_NULL(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
7801 offset = dissect_ber_null(implicit_tag, pinfo, tree, tvb, offset, hf_index);
7805 static int dissect_not_derivable(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
7806 return dissect_ROS_NULL(FALSE, tvb, offset, pinfo, tree, hf_ROS_not_derivable);
7810 static const value_string ROS_T_invokeIDRej_vals[] = {
7812 { 1, "not-derivable" },
7816 static const ber_choice_t T_invokeIDRej_choice[] = {
7817 { 0, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_derivable },
7818 { 1, BER_CLASS_UNI, BER_UNI_TAG_NULL, BER_FLAGS_NOOWNTAG, dissect_not_derivable },
7819 { 0, 0, 0, 0, NULL }
7823 dissect_ROS_T_invokeIDRej(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
7824 offset = dissect_ber_choice(pinfo, tree, tvb, offset,
7825 T_invokeIDRej_choice, hf_index, ett_ROS_T_invokeIDRej, NULL);
7829 static int dissect_invokeIDRej(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
7830 return dissect_ROS_T_invokeIDRej(FALSE, tvb, offset, pinfo, tree, hf_ROS_invokeIDRej);
7834 static const value_string ROS_GeneralProblem_vals[] = {
7835 { 0, "unrecognizedComponent" },
7836 { 1, "mistypedComponent" },
7837 { 2, "badlyStructuredComponent" },
7843 dissect_ROS_GeneralProblem(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
7844 offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
7849 static int dissect_generalProblem_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
7850 return dissect_ROS_GeneralProblem(TRUE, tvb, offset, pinfo, tree, hf_ROS_generalProblem);
7854 static const value_string ROS_InvokeProblem_vals[] = {
7855 { 0, "duplicateInvokeID" },
7856 { 1, "unrecognizedOperation" },
7857 { 2, "mistypedParameter" },
7858 { 3, "resourceLimitation" },
7859 { 4, "initiatingRelease" },
7860 { 5, "unrecognizedLinkedID" },
7861 { 6, "linkedResponseUnexpected" },
7862 { 7, "unexpectedLinkedOperation" },
7868 dissect_ROS_InvokeProblem(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
7869 offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
7874 static int dissect_invokeProblem_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
7875 return dissect_ROS_InvokeProblem(TRUE, tvb, offset, pinfo, tree, hf_ROS_invokeProblem);
7879 static const value_string ROS_ReturnResultProblem_vals[] = {
7880 { 0, "unrecognizedInvokeID" },
7881 { 1, "returnResultUnexpected" },
7882 { 2, "mistypedParameter" },
7888 dissect_ROS_ReturnResultProblem(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
7889 offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
7894 static int dissect_returnResultProblem_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
7895 return dissect_ROS_ReturnResultProblem(TRUE, tvb, offset, pinfo, tree, hf_ROS_returnResultProblem);
7899 static const value_string ROS_ReturnErrorProblem_vals[] = {
7900 { 0, "unrecognizedInvokeID" },
7901 { 1, "returnErrorUnexpected" },
7902 { 2, "unrecognizedError" },
7903 { 3, "unexpectedError" },
7904 { 4, "mistypedParameter" },
7910 dissect_ROS_ReturnErrorProblem(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
7911 offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
7916 static int dissect_returnErrorProblem_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
7917 return dissect_ROS_ReturnErrorProblem(TRUE, tvb, offset, pinfo, tree, hf_ROS_returnErrorProblem);
7921 static const value_string ROS_T_problem_vals[] = {
7922 { 0, "generalProblem" },
7923 { 1, "invokeProblem" },
7924 { 2, "returnResultProblem" },
7925 { 3, "returnErrorProblem" },
7929 static const ber_choice_t T_problem_choice[] = {
7930 { 0, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_generalProblem_impl },
7931 { 1, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_invokeProblem_impl },
7932 { 2, BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_returnResultProblem_impl },
7933 { 3, BER_CLASS_CON, 3, BER_FLAGS_IMPLTAG, dissect_returnErrorProblem_impl },
7934 { 0, 0, 0, 0, NULL }
7938 dissect_ROS_T_problem(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
7939 offset = dissect_ber_choice(pinfo, tree, tvb, offset,
7940 T_problem_choice, hf_index, ett_ROS_T_problem, NULL);
7944 static int dissect_problem(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
7945 return dissect_ROS_T_problem(FALSE, tvb, offset, pinfo, tree, hf_ROS_problem);
7948 static const ber_sequence_t Reject_sequence[] = {
7949 { BER_CLASS_UNI, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_invokeIDRej },
7950 { BER_CLASS_CON, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_problem },
7955 dissect_ROS_Reject(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
7956 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
7957 Reject_sequence, hf_index, ett_ROS_Reject);
7961 static int dissect_reject_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
7962 return dissect_ROS_Reject(TRUE, tvb, offset, pinfo, tree, hf_ROS_reject);
7966 static const value_string ROS_Component_vals[] = {
7968 { 2, "returnResultLast" },
7969 { 3, "returnError" },
7974 static const ber_choice_t Component_choice[] = {
7975 { 1, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_invoke_impl },
7976 { 2, BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_returnResultLast_impl },
7977 { 3, BER_CLASS_CON, 3, BER_FLAGS_IMPLTAG, dissect_returnError_impl },
7978 { 4, BER_CLASS_CON, 4, BER_FLAGS_IMPLTAG, dissect_reject_impl },
7979 { 0, 0, 0, 0, NULL }
7983 dissect_ROS_Component(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
7985 offset = dissect_ber_choice(pinfo, tree, tvb, offset,
7986 Component_choice, hf_index, ett_ROS_Component, NULL);
7987 /* branch taken will be component type -1 */
7993 static const value_string ROS_ERROR_vals[] = {
7994 { 0, "localValue" },
7995 { 1, "globalValue" },
7999 static const ber_choice_t ERROR_choice[] = {
8000 { 0, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_localValue },
8001 { 1, BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_globalValue },
8002 { 0, 0, 0, 0, NULL }
8007 dissect_ROS_ERROR(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
8008 offset = dissect_ber_choice(pinfo, tree, tvb, offset,
8009 ERROR_choice, hf_index, ett_ROS_ERROR, NULL);
8016 de_facility(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint fac_len, gchar *add_string _U_, int string_len _U_)
8021 gboolean ind = FALSE;
8022 guint32 component_len = 0;
8023 guint32 header_end_offset;
8027 saved_offset = offset;
8028 while ( fac_len > (offset - saved_offset)){
8030 /* Get the length of the component there can be more tnan one component in a facility message */
8032 header_end_offset = get_ber_identifier(tvb, offset, &class, &pc, &comp_type_tag);
8033 header_end_offset = get_ber_length(tree, tvb, header_end_offset, &component_len, &ind);
8035 proto_tree_add_text(tree, tvb, offset+1, 1,
8036 "Indefinte length, ignoring component");
8039 header_len = header_end_offset - offset;
8040 component_len = header_len + component_len;
8041 dissect_ROS_Component(FALSE, tvb, offset, g_pinfo, tree, hf_ROS_component);
8042 offset = offset + component_len;
8054 de_keypad_facility(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
8057 guint32 curr_offset;
8060 curr_offset = offset;
8062 oct = tvb_get_guint8(tvb, curr_offset);
8064 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
8065 proto_tree_add_text(tree,
8066 tvb, curr_offset, 1,
8070 other_decode_bitfield_value(a_bigbuf, oct, 0x7f, 8);
8071 proto_tree_add_text(tree,
8072 tvb, curr_offset, 1,
8073 "%s : Keypad information: %c",
8080 g_snprintf(add_string, string_len, " - %c", oct & 0x7f);
8082 /* no length check possible */
8084 return(curr_offset - offset);
8091 de_prog_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
8094 guint32 curr_offset;
8098 curr_offset = offset;
8100 oct = tvb_get_guint8(tvb, curr_offset);
8102 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
8103 proto_tree_add_text(tree,
8104 tvb, curr_offset, 1,
8105 "%s : Extension: %s",
8107 (oct & 0x80) ? "extended" : "not extended");
8109 switch ((oct & 0x60) >> 5)
8111 case 0: str = "Coding as specified in ITU-T Rec. Q.931"; break;
8112 case 1: str = "Reserved for other international standards"; break;
8113 case 2: str = "National standard"; break;
8115 str = "Standard defined for the GSM PLMNS";
8119 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
8120 proto_tree_add_text(tree,
8121 tvb, curr_offset, 1,
8122 "%s : Coding standard: %s",
8126 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
8127 proto_tree_add_text(tree,
8128 tvb, curr_offset, 1,
8134 case 0: str = "User"; break;
8135 case 1: str = "Private network serving the local user"; break;
8136 case 2: str = "Public network serving the local user"; break;
8137 case 4: str = "Public network serving the remote user"; break;
8138 case 5: str = "Private network serving the remote user"; break;
8139 case 10: str = "Network beyond interworking point"; break;
8145 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
8146 proto_tree_add_text(tree,
8147 tvb, curr_offset, 1,
8148 "%s : Location: %s",
8154 oct = tvb_get_guint8(tvb, curr_offset);
8156 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
8157 proto_tree_add_text(tree,
8158 tvb, curr_offset, 1,
8159 "%s : Extension: %s",
8161 (oct & 0x80) ? "extended" : "not extended");
8165 case 1: str = "Call is not end-to-end PLMN/ISDN, further call progress information may be available in-band"; break;
8166 case 2: str = "Destination address in non-PLMN/ISDN"; break;
8167 case 3: str = "Origination address in non-PLMN/ISDN"; break;
8168 case 4: str = "Call has returned to the PLMN/ISDN"; break;
8169 case 8: str = "In-band information or appropriate pattern now available"; break;
8170 case 32: str = "Call is end-to-end PLMN/ISDN"; break;
8171 case 64: str = "Queueing"; break;
8177 other_decode_bitfield_value(a_bigbuf, oct, 0x7f, 8);
8178 proto_tree_add_text(tree,
8179 tvb, curr_offset, 1,
8180 "%s : Progress Description: %s (%d)",
8186 g_snprintf(add_string, string_len, " - %d", oct & 0x7f);
8190 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
8192 return(curr_offset - offset);
8199 de_repeat_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
8202 guint32 curr_offset;
8206 curr_offset = offset;
8208 oct = tvb_get_guint8(tvb, curr_offset);
8212 case 1: str = "Circular for successive selection 'mode 1 alternate mode 2'"; break;
8213 case 2: str = "Support of fallback mode 1 preferred, mode 2 selected if setup of mode 1 fails"; break;
8214 case 3: str = "Reserved: was allocated in earlier phases of the protocol"; break;
8220 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
8221 proto_tree_add_text(tree,
8222 tvb, curr_offset, 1,
8229 /* no length check possible */
8231 return(curr_offset - offset);
8238 de_ss_ver_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
8241 guint32 curr_offset;
8244 curr_offset = offset;
8246 oct = tvb_get_guint8(tvb, curr_offset);
8250 case 0: str = "Phase 2 service, ellipsis notation, and phase 2 error handling is supported"; break;
8251 case 1: str = "SS-Protocol version 3 is supported, and phase 2 error handling is supported"; break;
8257 proto_tree_add_text(tree,
8258 tvb, curr_offset, 1,
8264 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
8266 return(curr_offset - offset);
8270 * [5] 8.1.4.1 3GPP TS 24.011 version 6.1.0 Release 6
8273 de_cp_user_data(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
8275 guint32 curr_offset;
8278 curr_offset = offset;
8280 proto_tree_add_text(tree, tvb, curr_offset, len,
8281 "RPDU (not displayed)");
8284 * dissect the embedded RP message
8286 rp_tvb = tvb_new_subset(tvb, curr_offset, len, len);
8288 call_dissector(rp_handle, rp_tvb, g_pinfo, g_tree);
8292 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
8294 return(curr_offset - offset);
8301 de_cp_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
8304 guint32 curr_offset;
8308 curr_offset = offset;
8310 oct = tvb_get_guint8(tvb, curr_offset);
8314 case 17: str = "Network failure"; break;
8315 case 22: str = "Congestion"; break;
8316 case 81: str = "Invalid Transaction Identifier value"; break;
8317 case 95: str = "Semantically incorrect message"; break;
8318 case 96: str = "Invalid mandatory information"; break;
8319 case 97: str = "Message type non-existent or not implemented"; break;
8320 case 98: str = "Message not compatible with the short message protocol state"; break;
8321 case 99: str = "Information element non-existent or not implemented"; break;
8322 case 111: str = "Protocol error, unspecified"; break;
8324 str = "Reserved, treat as Protocol error, unspecified";
8328 proto_tree_add_text(tree,
8329 tvb, curr_offset, 1,
8337 g_snprintf(add_string, string_len, " - (%u) %s", oct, str);
8339 /* no length check possible */
8341 return(curr_offset - offset);
8348 de_rp_message_ref(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
8351 guint32 curr_offset;
8354 curr_offset = offset;
8356 oct = tvb_get_guint8(tvb, curr_offset);
8358 proto_tree_add_text(tree,
8359 tvb, curr_offset, 1,
8360 "RP-Message Reference: 0x%02x (%u)",
8366 /* no length check possible */
8368 return(curr_offset - offset);
8375 de_rp_orig_addr(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
8377 return(de_cld_party_bcd_num(tvb, tree, offset, len, add_string, string_len));
8384 de_rp_dest_addr(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
8386 return(de_cld_party_bcd_num(tvb, tree, offset, len, add_string, string_len));
8393 de_rp_user_data(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
8395 guint32 curr_offset;
8398 curr_offset = offset;
8400 proto_tree_add_text(tree, tvb, curr_offset, len,
8401 "TPDU (not displayed)");
8404 * dissect the embedded TPDU message
8406 tpdu_tvb = tvb_new_subset(tvb, curr_offset, len, len);
8408 dissector_try_port(sms_dissector_table, 0, tpdu_tvb, g_pinfo, g_tree);
8412 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
8414 return(curr_offset - offset);
8421 de_rp_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
8424 guint32 curr_offset;
8427 curr_offset = offset;
8429 oct = tvb_get_guint8(tvb, curr_offset);
8431 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
8432 proto_tree_add_text(tree,
8433 tvb, curr_offset, 1,
8434 "%s : Extension: %s",
8436 (oct & 0x80) ? "extended" : "not extended");
8440 case 1: str = "Unassigned (unallocated) number"; break;
8441 case 8: str = "Operator determined barring"; break;
8442 case 10: str = "Call barred"; break;
8443 case 11: str = "Reserved"; break;
8444 case 21: str = "Short message transfer rejected"; break;
8445 case 22: str = "Memory capacity exceeded"; break;
8446 case 27: str = "Destination out of order"; break;
8447 case 28: str = "Unidentified subscriber"; break;
8448 case 29: str = "Facility rejected"; break;
8449 case 30: str = "Unknown subscriber"; break;
8450 case 38: str = "Network out of order"; break;
8451 case 41: str = "Temporary failure"; break;
8452 case 42: str = "Congestion"; break;
8453 case 47: str = "Resources unavailable, unspecified"; break;
8454 case 50: str = "Requested facility not subscribed"; break;
8455 case 69: str = "Requested facility not implemented"; break;
8456 case 81: str = "Invalid short message transfer reference value"; break;
8457 case 95: str = "Semantically incorrect message"; break;
8458 case 96: str = "Invalid mandatory information"; break;
8459 case 97: str = "Message type non-existent or not implemented"; break;
8460 case 98: str = "Message not compatible with short message protocol state"; break;
8461 case 99: str = "Information element non-existent or not implemented"; break;
8462 case 111: str = "Protocol error, unspecified"; break;
8463 case 127: str = "Interworking, unspecified"; break;
8469 other_decode_bitfield_value(a_bigbuf, oct, 0x7f, 8);
8470 proto_tree_add_text(tree,
8471 tvb, curr_offset, 1,
8472 "%s : Cause: (%u) %s",
8480 g_snprintf(add_string, string_len, " - (%u) %s", oct & 0x7f, str);
8482 NO_MORE_DATA_CHECK(len);
8484 proto_tree_add_text(tree,
8485 tvb, curr_offset, len - (curr_offset - offset),
8486 "Diagnostic field");
8488 curr_offset += len - (curr_offset - offset);
8490 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
8492 return(curr_offset - offset);
8499 de_gmm_attach_res(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
8502 guint32 curr_offset;
8506 curr_offset = offset;
8508 oct = tvb_get_guint8(tvb, curr_offset);
8512 case 1: str="GPRS only attached"; break;
8513 case 3: str="Combined GPRS/IMSI attached"; break;
8514 default: str="reserved";
8517 proto_tree_add_text(tree,
8518 tvb, curr_offset, 1,
8519 "Attach Result: (%u) %s",
8525 /* no length check possible */
8527 return(curr_offset - offset);
8534 de_gmm_attach_type(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
8538 guint32 curr_offset;
8539 const gchar *str_follow;
8540 const gchar *str_attach;
8541 proto_item *tf = NULL;
8542 proto_tree *tf_tree = NULL;
8545 curr_offset = offset;
8547 oct = tvb_get_guint8(tvb, curr_offset);
8554 case 1: str_attach="GPRS attach"; break;
8555 case 2: str_attach="GPRS attach while IMSI attached"; break;
8556 case 3: str_attach="Combined GPRS/IMSI attach"; break;
8557 default: str_attach="reserved";
8561 case 8: str_follow="Follow-on request pending"; break;
8562 default: str_follow="No follow-on request pending";
8565 tf = proto_tree_add_text(tree,
8566 tvb, curr_offset, 1,
8569 tf_tree = proto_item_add_subtree(tf, ett_gmm_attach_type );
8571 proto_tree_add_text(tf_tree,
8572 tvb, curr_offset, 1,
8576 proto_tree_add_text(tf_tree,
8577 tvb, curr_offset, 1,
8582 /* The ciphering key sequence number is added here */
8583 proto_tree_add_text(tree,
8584 tvb, curr_offset, 1,
8585 "Ciphering key sequence number: 0x%02x (%u)",
8591 /* no length check possible */
8593 return(curr_offset - offset);
8600 de_gmm_ciph_alg(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
8603 guint32 curr_offset;
8607 curr_offset = offset;
8609 oct = tvb_get_guint8(tvb, curr_offset);
8613 case 0: str="ciphering not used"; break;
8614 case 1: str="GPRS Encryption Algorithm GEA/1"; break;
8615 case 2: str="GPRS Encryption Algorithm GEA/2"; break;
8616 case 3: str="GPRS Encryption Algorithm GEA/3"; break;
8617 case 4: str="GPRS Encryption Algorithm GEA/4"; break;
8618 case 5: str="GPRS Encryption Algorithm GEA/5"; break;
8619 case 6: str="GPRS Encryption Algorithm GEA/6"; break;
8620 case 7: str="GPRS Encryption Algorithm GEA/7"; break;
8621 default: str="This should never happen";
8624 proto_tree_add_text(tree,
8625 tvb, curr_offset, 1,
8626 "Ciphering Algorithm: (%u) %s",
8632 /* no length check possible */
8634 return(curr_offset - offset);
8641 de_gmm_tmsi_stat(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
8644 guint32 curr_offset;
8648 curr_offset = offset;
8650 oct = tvb_get_guint8(tvb, curr_offset);
8654 case 0: str="no valid TMSI available"; break;
8655 case 1: str="valid TMSI available"; break;
8656 default: str="This should never happen";
8659 proto_tree_add_text(tree,
8660 tvb, curr_offset, 1,
8661 "TMSI Status: (%u) %s",
8665 /* curr_offset++; - It is encoded in the octed before */
8667 /* no length check possible */
8669 return(curr_offset - offset);
8676 de_gmm_detach_type(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
8679 guint32 curr_offset;
8681 const gchar *str_power;
8682 proto_item *tf = NULL;
8683 proto_tree *tf_tree = NULL;
8686 curr_offset = offset;
8688 oct = tvb_get_guint8(tvb, curr_offset);
8692 case 1: str="GPRS detach/re-attach required"; break;
8693 case 2: str="IMSI detach/re-attach not required"; break;
8694 case 3: str="Combined GPRS/IMSI detach/IMSI detach (after VLR failure)"; break;
8695 default: str="Combined GPRS/IMSI detach/re-attach not required";
8700 case 8: str_power="power switched off"; break;
8701 default: str_power="normal detach"; break;
8704 tf = proto_tree_add_text(tree,
8705 tvb, curr_offset, 1,
8708 tf_tree = proto_item_add_subtree(tf, ett_gmm_detach_type );
8710 proto_tree_add_text(tf_tree,
8711 tvb, curr_offset, 1,
8716 proto_tree_add_text(tf_tree,
8717 tvb, curr_offset, 1,
8724 /* no length check possible */
8726 return(curr_offset - offset);
8732 * SPLIT on CCCH, octet 3 (bit 4)
8733 * 0 Split pg cycle on CCCH is not supported by the mobile station
8734 * 1 Split pg cycle on CCCH is supported by the mobile station
8736 static const true_false_string gsm_a_gmm_split_on_ccch_value = {
8737 "Split pg cycle on CCCH is supported by the mobile station",
8738 "Split pg cycle on CCCH is not supported by the mobile station"
8741 /* non-DRX timer, octet 3
8745 static const value_string gsm_a_gmm_non_drx_timer_strings[] = {
8746 { 0x00, "no non-DRX mode after transfer state" },
8747 { 0x01, "max. 1 sec non-DRX mode after transfer state" },
8748 { 0x02, "max. 2 sec non-DRX mode after transfer state" },
8749 { 0x03, "max. 4 sec non-DRX mode after transfer state" },
8750 { 0x04, "max. 8 sec non-DRX mode after transfer state" },
8751 { 0x05, "max. 16 sec non-DRX mode after transfer state" },
8752 { 0x06, "max. 32 sec non-DRX mode after transfer state" },
8753 { 0x07, "max. 64 sec non-DRX mode after transfer state" },
8757 * CN Specific DRX cycle length coefficient, octet 3
8759 * 8 7 6 5 Iu mode specific
8760 * 0 0 0 0 CN Specific DRX cycle length coefficient not specified by the MS, ie. the
8761 * system information value 'CN domain specific DRX cycle length' is used.
8762 * (Ref 3GPP TS 25.331)
8763 * 0 1 1 0 CN Specific DRX cycle length coefficient 6
8764 * 0 1 1 1 CN Specific DRX cycle length coefficient 7
8765 * 1 0 0 0 CN Specific DRX cycle length coefficient 8
8766 * 1 0 0 1 CN Specific DRX cycle length coefficient 9
8767 * All other values shall be interpreted as "CN Specific DRX cycle length coefficient not
8768 * specified by the MS " by this version of the protocol.
8769 * NOTE: In Iu mode this field (octet 3 bits 8 to 5) is used, but was spare in earlier
8770 * versions of this protocol.
8772 static const value_string gsm_a_gmm_cn_spec_drs_cycle_len_coef_strings[] = {
8773 { 0x00, "CN Specific DRX cycle length coefficient not specified by the MS" },
8774 { 0x01, "CN Specific DRX cycle length coefficient not specified by the MS" },
8775 { 0x02, "CN Specific DRX cycle length coefficient not specified by the MS" },
8776 { 0x03, "CN Specific DRX cycle length coefficient not specified by the MS" },
8777 { 0x04, "CN Specific DRX cycle length coefficient not specified by the MS" },
8778 { 0x05, "CN Specific DRX cycle length coefficient not specified by the MS" },
8779 { 0x06, "CN Specific DRX cycle length coefficient 6" },
8780 { 0x07, "CN Specific DRX cycle length coefficient 7" },
8781 { 0x08, "CN Specific DRX cycle length coefficient 8" },
8782 { 0x09, "CN Specific DRX cycle length coefficient 9" },
8783 { 0x0a, "CN Specific DRX cycle length coefficient not specified by the MS" },
8784 { 0x0b, "CN Specific DRX cycle length coefficient not specified by the MS" },
8785 { 0x0c, "CN Specific DRX cycle length coefficient not specified by the MS" },
8786 { 0x0d, "CN Specific DRX cycle length coefficient not specified by the MS" },
8787 { 0x0e, "CN Specific DRX cycle length coefficient not specified by the MS" },
8788 { 0x0f, "CN Specific DRX cycle length coefficient not specified by the MS" },
8792 de_gmm_drx_param(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
8795 guint32 curr_offset;
8798 proto_item *tf = NULL;
8799 proto_tree *tf_tree = NULL;
8802 curr_offset = offset;
8804 tf = proto_tree_add_text(tree,
8805 tvb, curr_offset, 2,
8808 tf_tree = proto_item_add_subtree(tf, ett_gmm_drx );
8810 oct = tvb_get_guint8(tvb, curr_offset);
8814 case 0: str="704"; break;
8815 case 65: str="71"; break;
8816 case 66: str="72"; break;
8817 case 67: str="74"; break;
8818 case 68: str="75"; break;
8819 case 69: str="77"; break;
8820 case 70: str="79"; break;
8821 case 71: str="80"; break;
8822 case 72: str="83"; break;
8823 case 73: str="86"; break;
8824 case 74: str="88"; break;
8825 case 75: str="90"; break;
8826 case 76: str="92"; break;
8827 case 77: str="96"; break;
8828 case 78: str="101"; break;
8829 case 79: str="103"; break;
8830 case 80: str="107"; break;
8831 case 81: str="112"; break;
8832 case 82: str="116"; break;
8833 case 83: str="118"; break;
8834 case 84: str="128"; break;
8835 case 85: str="141"; break;
8836 case 86: str="144"; break;
8837 case 87: str="150"; break;
8838 case 88: str="160"; break;
8839 case 89: str="171"; break;
8840 case 90: str="176"; break;
8841 case 91: str="192"; break;
8842 case 92: str="214"; break;
8843 case 93: str="224"; break;
8844 case 94: str="235"; break;
8845 case 95: str="256"; break;
8846 case 96: str="288"; break;
8847 case 97: str="320"; break;
8848 case 98: str="352"; break;
8850 str_val[0]=oct/10+'0';
8851 str_val[1]=oct%10+'0';
8856 proto_tree_add_text(tf_tree,
8857 tvb, curr_offset, 1,
8858 "Split PG Cycle Code: (%u) %s",
8863 proto_tree_add_item(tf_tree, hf_gsm_a_gmm_cn_spec_drs_cycle_len_coef, tvb, curr_offset, 1, FALSE);
8864 proto_tree_add_item(tf_tree, hf_gsm_a_gmm_split_on_ccch, tvb, curr_offset, 1, FALSE);
8865 proto_tree_add_item(tf_tree, hf_gsm_a_gmm_non_drx_timer, tvb, curr_offset, 1, FALSE);
8869 /* no length check possible */
8871 return(curr_offset - offset);
8878 de_gmm_ftostby(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
8881 guint32 curr_offset;
8885 curr_offset = offset;
8887 oct = tvb_get_guint8(tvb, curr_offset);
8891 case 1: str="Force to standby indicated"; break;
8892 default: str="force to standby not indicated";
8895 proto_tree_add_text(tree,
8896 tvb, curr_offset, 1,
8897 "Force to Standby: (%u) %s",
8903 /* no length check possible */
8905 return(curr_offset - offset);
8912 de_gmm_ftostby_h(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
8915 guint32 curr_offset;
8919 curr_offset = offset;
8921 oct = tvb_get_guint8(tvb, curr_offset);
8923 /* IMPORTANT - IT'S ASSUMED THAT THE INFORMATION IS IN THE HIGHER NIBBLE */
8928 case 1: str="Force to standby indicated"; break;
8929 default: str="force to standby not indicated";
8932 proto_tree_add_text(tree,
8933 tvb, curr_offset, 1,
8934 "Force to Standby: (%u) %s",
8940 /* no length check possible */
8942 return(curr_offset - offset);
8949 de_gmm_ptmsi_sig(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
8951 guint32 curr_offset;
8952 proto_item *curr_item;
8953 curr_offset = offset;
8954 curr_item= proto_tree_add_item(tree,hf_gsm_a_ptmsi_sig,tvb,curr_offset,3,FALSE);
8955 proto_item_append_text(curr_item,"%s",add_string ? add_string : "");
8959 /* no length check possible */
8961 return(curr_offset - offset);
8968 de_gmm_ptmsi_sig2(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len _U_)
8970 guint32 curr_offset;
8971 proto_item *curr_item;
8972 curr_offset = offset;
8974 curr_item= proto_tree_add_item(tree,hf_gsm_a_ptmsi_sig2,tvb,curr_offset,3,FALSE);
8975 proto_item_append_text(curr_item,"%s",add_string ? add_string : "");
8978 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
8980 return(curr_offset - offset);
8987 de_gmm_ident_type2(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
8990 guint32 curr_offset;
8994 curr_offset = offset;
8996 oct = tvb_get_guint8(tvb, curr_offset);
9000 case 2: str="IMEI"; break;
9001 case 3: str="IMEISV"; break;
9002 case 4: str="TMSI"; break;
9003 default: str="IMSI";
9006 proto_tree_add_text(tree,
9007 tvb, curr_offset, 1,
9008 "Identity Type 2: (%u) %s",
9014 /* no length check possible */
9016 return(curr_offset - offset);
9023 de_gmm_imeisv_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
9026 guint32 curr_offset;
9030 curr_offset = offset;
9032 oct = tvb_get_guint8(tvb, curr_offset);
9034 /* IMPORTANT - IT'S ASSUMED THAT THE INFORMATION IS IN THE HIGHER NIBBLE */
9039 case 1: str="IMEISV requested"; break;
9040 default: str="IMEISV not requested";
9043 proto_tree_add_text(tree,
9044 tvb, curr_offset, 1,
9045 "IMEISV Request: (%u) %s",
9051 /* no length check possible */
9053 return(curr_offset - offset);
9060 de_gmm_rec_npdu_lst(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
9062 guint32 curr_offset;
9066 curr_offset = offset;
9068 if ( len == 0 ) return 0;
9073 oct = tvb_get_guint8(tvb, curr_offset);
9075 oct |= tvb_get_guint8(tvb, curr_offset+1);
9079 proto_tree_add_text(tree,
9080 tvb, curr_offset, 2,
9081 "NSAPI %d: 0x%02x (%u)",
9089 oct |= tvb_get_guint8(tvb, curr_offset+2);
9093 proto_tree_add_text(tree,
9094 tvb, curr_offset-1, 2,
9095 "NSAPI %d: 0x%02x (%u)",
9103 } while ( curr_len > 1 );
9105 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
9107 return(curr_offset - offset);
9114 de_gmm_ms_net_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
9117 guint32 curr_offset;
9121 gchar answer_gea[2][40]={ "encryption algorithm not available",
9122 "encryption algorithm available" };
9123 gchar answer_smdch[2][120]={ "Mobile station does not support mobile terminated point to point SMS via dedicated signalling channels",
9124 "Mobile station supports mobile terminated point to point SMS via dedicated signalling channels" };
9125 gchar answer_smgprs[2][100]={ "Mobile station does not support mobile terminated point to point SMS via GPRS packet data channels",
9126 "Mobile station supports mobile terminated point to point SMS via GPRS packet data channels" };
9127 gchar answer_ucs2[2][100]={ "the ME has a preference for the default alphabet (defined in 3GPP TS 23.038 [8b]) over UCS2",
9128 "the ME has no preference between the use of the default alphabet and the use of UCS2" };
9130 gchar answer_ssid[4][80]={ "default value of phase 1",
9131 "capability of handling of ellipsis notation and phase 2 error handling",
9132 "capability of handling of ellipsis notation and phase 2 error handling",
9133 "capability of handling of ellipsis notation and phase 2 error handling" };
9135 gchar answer_solsa[2][40]={ "The ME does not support SoLSA",
9136 "The ME supports SoLSA" };
9138 gchar answer_rev[2][80]={ "used by a mobile station not supporting R99 or later versions of the protocol",
9139 "used by a mobile station supporting R99 or later versions of the protocol" };
9141 gchar answer_pfc[2][80]={ "Mobile station does not support BSS packet flow procedures",
9142 "Mobile station does support BSS packet flow procedures" };
9144 gchar answer_lcs[2][80]={ "LCS value added location request notification capability not supported" ,
9145 "LCS value added location request notification capability supported" };
9148 curr_offset = offset;
9150 if ( curr_len == 0 ){ EXTRANEOUS_DATA_CHECK(len, curr_offset - offset); return(curr_offset - offset); }
9151 oct = tvb_get_guint8(tvb, curr_offset);
9155 proto_tree_add_text(tree,
9156 tvb, curr_offset, 1,
9159 answer_gea[oct>>7]);
9163 proto_tree_add_text(tree,
9164 tvb, curr_offset, 1,
9165 "SM capabilities via dedicated channels: (%u) %s",
9167 answer_smdch[oct>>7]);
9171 proto_tree_add_text(tree,
9172 tvb, curr_offset, 1,
9173 "SM capabilities via GPRS channels: (%u) %s",
9175 answer_smgprs[oct>>7]);
9179 proto_tree_add_text(tree,
9180 tvb, curr_offset, 1,
9181 "UCS2 support: (%u) %s",
9183 answer_ucs2[oct>>7]);
9187 proto_tree_add_text(tree,
9188 tvb, curr_offset, 1,
9189 "SS Screening Indicator: (%u) %s",
9191 answer_ssid[oct>>6]);
9195 proto_tree_add_text(tree,
9196 tvb, curr_offset, 1,
9197 "SoLSA Capability: (%u) %s",
9199 answer_solsa[oct>>7]);
9203 proto_tree_add_text(tree,
9204 tvb, curr_offset, 1,
9205 "Revision level indicator: (%u) %s",
9207 answer_rev[oct>>7]);
9211 if ( curr_len == 0 ){ EXTRANEOUS_DATA_CHECK(len, curr_offset - offset); return(curr_offset - offset); }
9212 oct = tvb_get_guint8(tvb, curr_offset);
9215 proto_tree_add_text(tree,
9216 tvb, curr_offset, 1,
9217 "PFC feature mode: (%u) %s",
9219 answer_pfc[oct>>7]);
9222 for( gea_val=2; gea_val<8 ; gea_val++ )
9224 proto_tree_add_text(tree,
9225 tvb, curr_offset, 1,
9226 "GEA%d: (%u) %s", gea_val,
9228 answer_gea[oct>>7]);
9232 proto_tree_add_text(tree,
9233 tvb, curr_offset, 1,
9234 "LCS VA capability:: (%u) %s",
9236 answer_lcs[oct>>7]);
9240 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
9242 return(curr_offset - offset);
9248 #define GET_DATA /* check if we have enough bits left */ \
9249 if ( curr_bits_length < bits_needed ) \
9251 /* check if oct has enougth bits */ \
9252 if ( bits_in_oct < bits_needed ) \
9255 if ( curr_len == 0 ) \
9257 proto_tree_add_text(tf_tree, \
9258 tvb, curr_offset, 1, \
9259 "Not enough data available"); \
9261 tmp_oct = tvb_get_guint8(tvb, curr_offset); \
9262 oct |= tmp_oct<<(32-8-bits_in_oct); \
9265 if ( bits_in_oct != 0 ) \
9276 de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
9278 guint32 curr_offset;
9280 proto_item *tf = NULL;
9281 proto_tree *tf_tree = NULL;
9286 guint add_ocetets; /* octets which are covered by one element -1 */
9287 guint curr_bits_length;
9290 gchar multi_slot_str[64][230] = {
9291 "Not specified", /* 00 */
9292 "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 */
9293 "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 */
9294 "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 */
9295 "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 */
9296 "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 */
9297 "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 */
9298 "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 */
9299 "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 */
9300 "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 */
9301 "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 */
9302 "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 */
9303 "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 */
9304 "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 */
9305 "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 */
9306 "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 */
9307 "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 */
9308 "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 */
9309 "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 */
9310 "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 */
9311 "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 */
9312 "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 */
9313 "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 */
9314 "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 */
9315 "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 */
9316 "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 */
9317 "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 */
9318 "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 */
9319 "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 */
9320 "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 */
9321 "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 */
9322 "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 */
9323 "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 */
9324 "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 */
9325 "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 */
9326 "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 */
9327 "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 */
9328 "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 */
9329 "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 */
9330 "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 */
9331 "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 */
9332 "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 */
9333 "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 */
9334 "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 */
9335 "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 */
9336 "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 */
9337 "Not specified", /* 46 */
9338 "Not specified", /* 47 */
9339 "Not specified", /* 48 */
9340 "Not specified", /* 49 */
9341 "Not specified", /* 50 */
9342 "Not specified", /* 51 */
9343 "Not specified", /* 52 */
9344 "Not specified", /* 53 */
9345 "Not specified", /* 54 */
9346 "Not specified", /* 55 */
9347 "Not specified", /* 56 */
9348 "Not specified", /* 57 */
9349 "Not specified", /* 58 */
9350 "Not specified", /* 59 */
9351 "Not specified", /* 60 */
9352 "Not specified", /* 61 */
9353 "Not specified", /* 62 */
9354 "Not specified", /* 63 */
9357 guchar dtm_gprs_mslot = 0;
9358 guchar dtm_egprs_mslot = 4;
9359 gboolean finished = TRUE;
9362 curr_offset = offset;
9369 /* check for a new round */
9370 if (( curr_len*8 + bits_in_oct ) < 11 )
9373 /* now read the first 11 bits */
9374 curr_bits_length = 11;
9378 if ( curr_len != len )
9383 if (( oct>>(32-bits_needed) ) == 1 )
9385 curr_bits_length -= bits_needed;
9386 oct <<= bits_needed;
9387 bits_in_oct -= bits_needed;
9389 if (( curr_len*8 + bits_in_oct ) < 11 )
9391 curr_bits_length = 11;
9395 curr_bits_length -= bits_needed;
9396 oct <<= bits_needed;
9397 bits_in_oct -= bits_needed;
9403 tf = proto_tree_add_text(tree,
9404 tvb, curr_offset, 1,
9405 "MS RA capability %d",index);
9407 tf_tree = proto_item_add_subtree(tf, ett_gmm_radio_cap );
9415 acc_type = oct>>(32-bits_needed);
9418 case 0x00: str="GSM P"; break;
9419 case 0x01: str="GSM E --note that GSM E covers GSM P"; break;
9420 case 0x02: str="GSM R --note that GSM R covers GSM E and GSM P"; break;
9421 case 0x03: str="GSM 1800"; break;
9422 case 0x04: str="GSM 1900"; break;
9423 case 0x05: str="GSM 450"; break;
9424 case 0x06: str="GSM 480"; break;
9425 case 0x07: str="GSM 850"; break;
9426 case 0x08: str="GSM 700"; break;
9427 case 0x0f: str="Indicates the presence of a list of Additional access technologies"; break;
9428 default: str="unknown";
9431 proto_tree_add_text(tf_tree,
9432 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9433 "Access Technology Type: (%u) %s",acc_type,str);
9434 curr_bits_length -= bits_needed;
9435 oct <<= bits_needed;
9436 bits_in_oct -= bits_needed;
9444 bits_length = curr_bits_length = oct>>(32-bits_needed);
9445 proto_tree_add_text(tf_tree,
9446 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9447 "Length: 0x%02x bits (%u)",bits_length,bits_length);
9448 /* This is already done - length doesn't contain this field
9449 curr_bits_length -= bits_needed;
9451 oct <<= bits_needed;
9452 bits_in_oct -= bits_needed;
9454 if ( acc_type == 0x0f )
9459 * Additional access technologies:
9461 finished = TRUE; /* Break out of the loop unless proven unfinished */
9470 switch ( oct>>(32-bits_needed) )
9472 case 0x00: str="Not Present"; finished = TRUE; break;
9473 case 0x01: str="Present"; finished = FALSE; break;
9474 default: str="This should not happen";
9477 proto_tree_add_text(tf_tree,
9478 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9479 "Presence: (%u) %s",oct>>(32-bits_needed),str);
9480 curr_bits_length -= bits_needed;
9481 oct <<= bits_needed;
9482 bits_in_oct -= bits_needed;
9487 * No more valid data, get spare bits if any
9489 while ( curr_bits_length > 0 )
9491 if ( curr_bits_length > 8 )
9494 bits_needed = curr_bits_length;
9496 curr_bits_length -= bits_needed;
9497 oct <<= bits_needed;
9498 bits_in_oct -= bits_needed;
9509 acc_type = oct>>(32-bits_needed);
9512 case 0x00: str="GSM P"; break;
9513 case 0x01: str="GSM E --note that GSM E covers GSM P"; break;
9514 case 0x02: str="GSM R --note that GSM R covers GSM E and GSM P"; break;
9515 case 0x03: str="GSM 1800"; break;
9516 case 0x04: str="GSM 1900"; break;
9517 case 0x05: str="GSM 450"; break;
9518 case 0x06: str="GSM 480"; break;
9519 case 0x07: str="GSM 850"; break;
9520 case 0x08: str="GSM 700"; break;
9521 case 0x0f: str="Indicates the presence of a list of Additional access technologies"; break;
9522 default: str="unknown";
9525 proto_tree_add_text(tf_tree,
9526 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9527 "Access Technology Type: (%u) %s",acc_type,str);
9528 curr_bits_length -= bits_needed;
9529 oct <<= bits_needed;
9530 bits_in_oct -= bits_needed;
9539 if ( acc_type == 0x04 ) /* GSM 1900 */
9541 switch ( oct>>(32-bits_needed) )
9543 case 0x01: str="1 W (30 dBm)"; break;
9544 case 0x02: str="0,25 W (24 dBm)"; break;
9545 case 0x03: str="2 W (33 dBm)"; break;
9546 default: str="Not specified";
9549 else if ( acc_type == 0x03 )
9551 switch ( oct>>(32-bits_needed) )
9553 case 0x01: str="1 W (30 dBm)"; break;
9554 case 0x02: str="0,25 W (24 dBm)"; break;
9555 case 0x03: str="4 W (36 dBm)"; break;
9556 default: str="Not specified";
9559 else if ( acc_type <= 0x08 )
9561 switch ( oct>>(32-bits_needed) )
9563 case 0x02: str="8 W (39 dBm)"; break;
9564 case 0x03: str="5 W (37 dBm)"; break;
9565 case 0x04: str="2 W (33 dBm)"; break;
9566 case 0x05: str="0,8 W (29 dBm)"; break;
9567 default: str="Not specified";
9571 str="Not specified??";
9573 proto_tree_add_text(tf_tree,
9574 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9575 "RF Power Capability, GMSK Power Class: (%u) %s",oct>>(32-bits_needed),str);
9576 curr_bits_length -= bits_needed;
9577 oct <<= bits_needed;
9578 bits_in_oct -= bits_needed;
9587 switch ( oct>>(32-bits_needed) )
9589 case 0x00: str="8PSK modulation not supported for uplink"; break;
9590 case 0x01: str="Power class E1"; break;
9591 case 0x02: str="Power class E2"; break;
9592 case 0x03: str="Power class E3"; break;
9593 default: str="This should not happen";
9596 proto_tree_add_text(tf_tree,
9597 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9598 "8PSK Power Class: (%u) %s",oct>>(32-bits_needed),str);
9599 curr_bits_length -= bits_needed;
9600 oct <<= bits_needed;
9601 bits_in_oct -= bits_needed;
9603 } while (!finished);
9615 if ( acc_type == 0x04 ) /* GSM 1900 */
9617 switch ( oct>>(32-bits_needed) )
9619 case 0x01: str="1 W (30 dBm)"; break;
9620 case 0x02: str="0,25 W (24 dBm)"; break;
9621 case 0x03: str="2 W (33 dBm)"; break;
9622 default: str="Not specified";
9625 else if ( acc_type == 0x03 )
9627 switch ( oct>>(32-bits_needed) )
9629 case 0x01: str="1 W (30 dBm)"; break;
9630 case 0x02: str="0,25 W (24 dBm)"; break;
9631 case 0x03: str="4 W (36 dBm)"; break;
9632 default: str="Not specified";
9635 else if ( acc_type <= 0x08 )
9637 switch ( oct>>(32-bits_needed) )
9639 case 0x02: str="8 W (39 dBm)"; break;
9640 case 0x03: str="5 W (37 dBm)"; break;
9641 case 0x04: str="2 W (33 dBm)"; break;
9642 case 0x05: str="0,8 W (29 dBm)"; break;
9643 default: str="Not specified";
9647 str="Not specified??";
9649 proto_tree_add_text(tf_tree,
9650 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9651 "RF Power Capability, GMSK Power Class: (%u) %s",oct>>(32-bits_needed),str);
9652 curr_bits_length -= bits_needed;
9653 oct <<= bits_needed;
9654 bits_in_oct -= bits_needed;
9663 if ((oct>>(32-bits_needed))==0)
9665 proto_tree_add_text(tf_tree,
9666 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9667 "A5 Bits: (%u) same values apply for parameters as in the immediately preceding Access capabilities field within this IE",oct>>(32-bits_needed));
9668 curr_bits_length -= bits_needed;
9669 oct <<= bits_needed;
9670 bits_in_oct -= bits_needed;
9676 proto_tree_add_text(tf_tree,
9677 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9678 "A5 Bits: (%u) A5 bits follows",oct>>(32-bits_needed));
9680 curr_bits_length -= bits_needed;
9681 oct <<= bits_needed;
9682 bits_in_oct -= bits_needed;
9684 for (i=1; i<= 7 ; i++ )
9693 switch ( oct>>(32-bits_needed) )
9695 case 0x00: str="encryption algorithm not available"; break;
9696 case 0x01: str="encryption algorithm available"; break;
9697 default: str="This should not happen";
9700 proto_tree_add_text(tf_tree,
9701 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9702 "A5/%d: (%u) %s",i,oct>>(32-bits_needed),str);
9703 curr_bits_length -= bits_needed;
9704 oct <<= bits_needed;
9705 bits_in_oct -= bits_needed;
9716 switch ( oct>>(32-bits_needed) )
9718 case 0x00: str="controlled early Classmark Sending option is not implemented"; break;
9719 case 0x01: str="controlled early Classmark Sending option is implemented"; break;
9720 default: str="This should not happen";
9723 proto_tree_add_text(tf_tree,
9724 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9725 "Controlled early Classmark Sending: (%u) %s",oct>>(32-bits_needed),str);
9726 curr_bits_length -= bits_needed;
9727 oct <<= bits_needed;
9728 bits_in_oct -= bits_needed;
9737 switch ( oct>>(32-bits_needed) )
9739 case 0x00: str="PS capability not present"; break;
9740 case 0x01: str="PS capability present"; break;
9741 default: str="This should not happen";
9744 proto_tree_add_text(tf_tree,
9745 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9746 "Pseudo Synchronisation: (%u) %s",oct>>(32-bits_needed),str);
9747 curr_bits_length -= bits_needed;
9748 oct <<= bits_needed;
9749 bits_in_oct -= bits_needed;
9758 switch ( oct>>(32-bits_needed) )
9760 case 0x00: str="no VGCS capability or no notifications wanted"; break;
9761 case 0x01: str="VGCS capability and notifications wanted"; break;
9762 default: str="This should not happen";
9765 proto_tree_add_text(tf_tree,
9766 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9767 "Voice Group Call Service: (%u) %s",oct>>(32-bits_needed),str);
9768 curr_bits_length -= bits_needed;
9769 oct <<= bits_needed;
9770 bits_in_oct -= bits_needed;
9779 switch ( oct>>(32-bits_needed) )
9781 case 0x00: str="no VBS capability or no notifications wanted"; break;
9782 case 0x01: str="VBS capability and notifications wanted"; break;
9783 default: str="This should not happen";
9786 proto_tree_add_text(tf_tree,
9787 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9788 "Voice Broadcast Service: (%u) %s",oct>>(32-bits_needed),str);
9789 curr_bits_length -= bits_needed;
9790 oct <<= bits_needed;
9791 bits_in_oct -= bits_needed;
9794 * Multislot capability?
9800 if ((oct>>(32-bits_needed))==0)
9802 proto_tree_add_text(tf_tree,
9803 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9804 "Multislot capability: (%u) same values apply for parameters as in the immediately preceding Access capabilities field within this IE",oct>>(32-bits_needed));
9805 curr_bits_length -= bits_needed;
9806 oct <<= bits_needed;
9807 bits_in_oct -= bits_needed;
9811 proto_tree_add_text(tf_tree,
9812 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9813 "Multislot capability: (%u) Multislot capability struct available",oct>>(32-bits_needed));
9815 curr_bits_length -= bits_needed;
9816 oct <<= bits_needed;
9817 bits_in_oct -= bits_needed;
9820 * HSCSD multislot class?
9826 if ((oct>>(32-bits_needed))==0)
9828 proto_tree_add_text(tf_tree,
9829 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9830 "HSCSD multislot class: (%u) Bits are not available",oct>>(32-bits_needed));
9831 curr_bits_length -= bits_needed;
9832 oct <<= bits_needed;
9833 bits_in_oct -= bits_needed;
9837 curr_bits_length -= bits_needed;
9838 oct <<= bits_needed;
9839 bits_in_oct -= bits_needed;
9842 * HSCSD multislot class
9848 proto_tree_add_text(tf_tree,
9849 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9850 "HSCSD multislot class: (%u) %s",oct>>(32-bits_needed),multi_slot_str[oct>>(32-bits_needed)]);
9851 curr_bits_length -= bits_needed;
9852 oct <<= bits_needed;
9853 bits_in_oct -= bits_needed;
9857 * GPRS multislot class?
9863 if ((oct>>(32-bits_needed))==0)
9865 proto_tree_add_text(tf_tree,
9866 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9867 "GPRS multislot class: (%u) Bits are not available",oct>>(32-bits_needed));
9868 curr_bits_length -= bits_needed;
9869 oct <<= bits_needed;
9870 bits_in_oct -= bits_needed;
9874 curr_bits_length -= bits_needed;
9875 oct <<= bits_needed;
9876 bits_in_oct -= bits_needed;
9879 * GPRS multislot class
9885 proto_tree_add_text(tf_tree,
9886 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9887 "GPRS multislot class: (%u) %s",oct>>(32-bits_needed),multi_slot_str[oct>>(32-bits_needed)]);
9888 curr_bits_length -= bits_needed;
9889 oct <<= bits_needed;
9890 bits_in_oct -= bits_needed;
9893 * GPRS Extended Dynamic Allocation Capability
9899 switch ( oct>>(32-bits_needed) )
9901 case 0x00: str="Extended Dynamic Allocation Capability for GPRS is not implemented"; break;
9902 case 0x01: str="Extended Dynamic Allocation Capability for GPRS is implemented"; break;
9903 default: str="This should not happen";
9905 proto_tree_add_text(tf_tree,
9906 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9907 "GPRS Extended Dynamic Allocation Capability: (%u) %s",oct>>(32-bits_needed),str);
9908 curr_bits_length -= bits_needed;
9909 oct <<= bits_needed;
9910 bits_in_oct -= bits_needed;
9920 if ((oct>>(32-bits_needed))==0)
9922 proto_tree_add_text(tf_tree,
9923 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9924 "SMS/SM values: (%u) Bits are not available",oct>>(32-bits_needed));
9925 curr_bits_length -= bits_needed;
9926 oct <<= bits_needed;
9927 bits_in_oct -= bits_needed;
9931 curr_bits_length -= bits_needed;
9932 oct <<= bits_needed;
9933 bits_in_oct -= bits_needed;
9936 * Switch-Measure-Switch value
9942 proto_tree_add_text(tf_tree,
9943 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9944 "Switch-Measure-Switch value: (%u) %d/4 timeslot (~%d microseconds)",
9945 oct>>(32-bits_needed),oct>>(32-bits_needed),(oct>>(32-bits_needed))*144);
9946 curr_bits_length -= bits_needed;
9947 oct <<= bits_needed;
9948 bits_in_oct -= bits_needed;
9951 * Switch-Measure value
9957 proto_tree_add_text(tf_tree,
9958 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9959 "Switch-Measure value: (%u) %d/4 timeslot (~%d microseconds)",
9960 oct>>(32-bits_needed),oct>>(32-bits_needed),(oct>>(32-bits_needed))*144);
9961 curr_bits_length -= bits_needed;
9962 oct <<= bits_needed;
9963 bits_in_oct -= bits_needed;
9967 * ECSD multislot class?
9973 if ((oct>>(32-bits_needed))==0)
9975 proto_tree_add_text(tf_tree,
9976 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9977 "ECSD multislot class: (%u) Bits are not available",oct>>(32-bits_needed));
9978 curr_bits_length -= bits_needed;
9979 oct <<= bits_needed;
9980 bits_in_oct -= bits_needed;
9984 curr_bits_length -= bits_needed;
9985 oct <<= bits_needed;
9986 bits_in_oct -= bits_needed;
9989 * ECSD multislot class
9995 proto_tree_add_text(tf_tree,
9996 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9997 "ECSD multislot class: (%u) %s",oct>>(32-bits_needed),multi_slot_str[oct>>(32-bits_needed)]);
9998 curr_bits_length -= bits_needed;
9999 oct <<= bits_needed;
10000 bits_in_oct -= bits_needed;
10004 * EGPRS multislot class?
10010 if ((oct>>(32-bits_needed))==0)
10012 proto_tree_add_text(tf_tree,
10013 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
10014 "EGPRS multislot class: (%u) Bits are not available",oct>>(32-bits_needed));
10015 curr_bits_length -= bits_needed;
10016 oct <<= bits_needed;
10017 bits_in_oct -= bits_needed;
10021 curr_bits_length -= bits_needed;
10022 oct <<= bits_needed;
10023 bits_in_oct -= bits_needed;
10026 * EGPRS multislot class
10032 proto_tree_add_text(tf_tree,
10033 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
10034 "EGPRS multislot class: (%u) %s",oct>>(32-bits_needed),multi_slot_str[oct>>(32-bits_needed)]);
10035 curr_bits_length -= bits_needed;
10036 oct <<= bits_needed;
10037 bits_in_oct -= bits_needed;
10040 * EGPRS Extended Dynamic Allocation Capability
10046 switch ( oct>>(32-bits_needed) )
10048 case 0x00: str="Extended Dynamic Allocation Capability for EGPRS is not implemented"; break;
10049 case 0x01: str="Extended Dynamic Allocation Capability for EGPRS is implemented"; break;
10050 default: str="This should not happen";
10052 proto_tree_add_text(tf_tree,
10053 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
10054 "EGPRS Extended Dynamic Allocation Capability: (%u) %s",oct>>(32-bits_needed),str);
10055 curr_bits_length -= bits_needed;
10056 oct <<= bits_needed;
10057 bits_in_oct -= bits_needed;
10061 * DTM GPRS Multi Slot Class ?
10067 if ((oct>>(32-bits_needed))==0)
10069 proto_tree_add_text(tf_tree,
10070 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
10071 "DTM GPRS Multi Slot Class: (%u) Bits are not available",oct>>(32-bits_needed));
10072 curr_bits_length -= bits_needed;
10073 oct <<= bits_needed;
10074 bits_in_oct -= bits_needed;
10078 curr_bits_length -= bits_needed;
10079 oct <<= bits_needed;
10080 bits_in_oct -= bits_needed;
10083 * DTM GPRS Multi Slot Class
10089 dtm_gprs_mslot = oct>>(32-bits_needed);
10091 switch ( oct>>(32-bits_needed) )
10093 case 0: str="Unused. If received, the network shall interpret this as Multislot class 5"; break;
10094 case 1: str="Multislot class 5 supported"; break;
10095 case 2: str="Multislot class 9 supported"; break;
10096 case 3: str="Multislot class 11 supported"; break;
10097 default: str="This should not happen";
10100 proto_tree_add_text(tf_tree,
10101 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
10102 "DTM GPRS Multi Slot Class: (%u) %s",oct>>(32-bits_needed),str);
10103 curr_bits_length -= bits_needed;
10104 oct <<= bits_needed;
10105 bits_in_oct -= bits_needed;
10114 switch ( oct>>(32-bits_needed) )
10116 case 0x00: str="Single Slot DTM not supported"; break;
10117 case 0x01: str="Single Slot DTM supported"; break;
10118 default: str="This should not happen";
10120 proto_tree_add_text(tf_tree,
10121 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
10122 "Single Slot DTM: (%u) %s",oct>>(32-bits_needed),str);
10123 curr_bits_length -= bits_needed;
10124 oct <<= bits_needed;
10125 bits_in_oct -= bits_needed;
10128 * DTM EGPRS Multi Slot Class ?
10134 dtm_egprs_mslot = oct>>(32-bits_needed);
10136 if ((oct>>(32-bits_needed))==0)
10138 proto_tree_add_text(tf_tree,
10139 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
10140 "DTM EGPRS Multi Slot Class: (%u) Bits are not available",oct>>(32-bits_needed));
10141 curr_bits_length -= bits_needed;
10142 oct <<= bits_needed;
10143 bits_in_oct -= bits_needed;
10147 curr_bits_length -= bits_needed;
10148 oct <<= bits_needed;
10149 bits_in_oct -= bits_needed;
10152 * DTM EGPRS Multi Slot Class
10158 switch ( oct>>(32-bits_needed) )
10160 case 0: str="Unused. If received, the network shall interpret this as Multislot class 5"; break;
10161 case 1: str="Multislot class 5 supported"; break;
10162 case 2: str="Multislot class 9 supported"; break;
10163 case 3: str="Multislot class 11 supported"; break;
10164 default: str="This should not happen";
10167 proto_tree_add_text(tf_tree,
10168 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
10169 "DTM EGPRS Multi Slot Class: (%u) %s",oct>>(32-bits_needed),str);
10170 curr_bits_length -= bits_needed;
10171 oct <<= bits_needed;
10172 bits_in_oct -= bits_needed;
10178 * 8PSK Power Capability?
10184 if ((oct>>(32-bits_needed))==0)
10186 proto_tree_add_text(tf_tree,
10187 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
10188 "8PSK Power Capability: (%u) Bits are not available",oct>>(32-bits_needed));
10189 curr_bits_length -= bits_needed;
10190 oct <<= bits_needed;
10191 bits_in_oct -= bits_needed;
10195 curr_bits_length -= bits_needed;
10196 oct <<= bits_needed;
10197 bits_in_oct -= bits_needed;
10200 * 8PSK Power Capability
10206 switch ( oct>>(32-bits_needed) )
10208 case 0x00: str="Reserved"; break;
10209 case 0x01: str="Power class E1"; break;
10210 case 0x02: str="Power class E2"; break;
10211 case 0x03: str="Power class E3"; break;
10212 default: str="This should not happen";
10215 proto_tree_add_text(tf_tree,
10216 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
10217 "8PSK Power Capability: (%u) %s",oct>>(32-bits_needed),str);
10218 curr_bits_length -= bits_needed;
10219 oct <<= bits_needed;
10220 bits_in_oct -= bits_needed;
10224 * COMPACT Interference Measurement Capability
10230 switch ( oct>>(32-bits_needed) )
10232 case 0x00: str="COMPACT Interference Measurement Capability is not implemented"; break;
10233 case 0x01: str="COMPACT Interference Measurement Capability is implemented"; break;
10234 default: str="This should not happen";
10237 proto_tree_add_text(tf_tree,
10238 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
10239 "COMPACT Interference Measurement Capability: (%u) %s",oct>>(32-bits_needed),str);
10240 curr_bits_length -= bits_needed;
10241 oct <<= bits_needed;
10242 bits_in_oct -= bits_needed;
10245 * Revision Level Indicator
10251 switch ( oct>>(32-bits_needed) )
10253 case 0x00: str="The ME is Release 98 or older"; break;
10254 case 0x01: str="The ME is Release 99 onwards"; break;
10255 default: str="This should not happen";
10258 proto_tree_add_text(tf_tree,
10259 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
10260 "Revision Level Indicator: (%u) %s",oct>>(32-bits_needed),str);
10261 curr_bits_length -= bits_needed;
10262 oct <<= bits_needed;
10263 bits_in_oct -= bits_needed;
10266 * UMTS FDD Radio Access Technology Capability
10272 switch ( oct>>(32-bits_needed) )
10274 case 0x00: str="UMTS FDD not supported"; break;
10275 case 0x01: str="UMTS FDD supported"; break;
10276 default: str="This should not happen";
10279 proto_tree_add_text(tf_tree,
10280 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
10281 "UMTS FDD Radio Access Technology Capability: (%u) %s",oct>>(32-bits_needed),str);
10282 curr_bits_length -= bits_needed;
10283 oct <<= bits_needed;
10284 bits_in_oct -= bits_needed;
10287 * UMTS 3.84 Mcps TDD Radio Access Technology Capability
10293 switch ( oct>>(32-bits_needed) )
10295 case 0x00: str="UMTS 3.84 Mcps TDD not supported"; break;
10296 case 0x01: str="UMTS 3.84 Mcps TDD supported"; break;
10297 default: str="This should not happen";
10300 proto_tree_add_text(tf_tree,
10301 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
10302 "UMTS 3.84 Mcps TDD Radio Access Technology Capability: (%u) %s",oct>>(32-bits_needed),str);
10303 curr_bits_length -= bits_needed;
10304 oct <<= bits_needed;
10305 bits_in_oct -= bits_needed;
10308 * CDMA 2000 Radio Access Technology Capability
10314 switch ( oct>>(32-bits_needed) )
10316 case 0x00: str="CDMA 2000 not supported"; break;
10317 case 0x01: str="CDMA 2000 supported"; break;
10318 default: str="This should not happen";
10321 proto_tree_add_text(tf_tree,
10322 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
10323 "CDMA 2000 Radio Access Technology Capability: (%u) %s",oct>>(32-bits_needed),str);
10324 curr_bits_length -= bits_needed;
10325 oct <<= bits_needed;
10326 bits_in_oct -= bits_needed;
10329 * UMTS 1.28 Mcps TDD Radio Access Technology Capability
10335 switch ( oct>>(32-bits_needed) )
10337 case 0x00: str="UMTS 1.28 Mcps TDD not supported"; break;
10338 case 0x01: str="UMTS 1.28 Mcps TDD supported"; break;
10339 default: str="This should not happen";
10342 proto_tree_add_text(tf_tree,
10343 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
10344 "UMTS 1.28 Mcps TDD Radio Access Technology Capability: (%u) %s",oct>>(32-bits_needed),str);
10345 curr_bits_length -= bits_needed;
10346 oct <<= bits_needed;
10347 bits_in_oct -= bits_needed;
10350 * GERAN Feature Package 1
10356 switch ( oct>>(32-bits_needed) )
10358 case 0x00: str="GERAN feature package 1 not supported"; break;
10359 case 0x01: str="GERAN feature package 1 supported"; break;
10360 default: str="This should not happen";
10363 proto_tree_add_text(tf_tree,
10364 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
10365 "GERAN Feature Package 1: (%u) %s",oct>>(32-bits_needed),str);
10366 curr_bits_length -= bits_needed;
10367 oct <<= bits_needed;
10368 bits_in_oct -= bits_needed;
10371 * Extended DTM (E)GPRS Multi Slot Class
10377 if ((oct>>(32-bits_needed))==0)
10379 proto_tree_add_text(tf_tree,
10380 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
10381 "Extended DTM (E)GPRS Multi Slot Class: (%u) Bits are not available",oct>>(32-bits_needed));
10382 curr_bits_length -= bits_needed;
10383 oct <<= bits_needed;
10384 bits_in_oct -= bits_needed;
10388 curr_bits_length -= bits_needed;
10389 oct <<= bits_needed;
10390 bits_in_oct -= bits_needed;
10393 * Extended DTM GPRS Multi Slot Class
10399 switch ( (oct>>(32-bits_needed))|(dtm_gprs_mslot<<4) )
10401 case 0x00: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
10402 case 0x01: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
10403 case 0x02: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
10404 case 0x03: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
10405 case 0x10: str="Multislot class 5 supported"; break;
10406 case 0x11: str="Multislot class 6 supported"; break;
10407 case 0x12: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
10408 case 0x13: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
10409 case 0x20: str="Multislot class 9 supported"; break;
10410 case 0x21: str="Multislot class 10 supported"; break;
10411 case 0x22: str="Unused. If received, it shall be interpreted as Multislot class 9 supported"; break;
10412 case 0x23: str="Unused. If received, it shall be interpreted as Multislot class 9 supported"; break;
10413 case 0x30: str="Multislot class 11 supported"; break;
10414 case 0x31: str="Unused. If received, it shall be interpreted as Multislot class 11 supported"; break;
10415 case 0x32: str="Unused. If received, it shall be interpreted as Multislot class 11 supported"; break;
10416 case 0x33: str="Unused. If received, it shall be interpreted as Multislot class 11 supported"; break;
10417 default: str="This should not happen";
10420 proto_tree_add_text(tf_tree,
10421 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
10422 "Extended DTM GPRS Multi Slot Class: (%u) %s",oct>>(32-bits_needed),str);
10423 curr_bits_length -= bits_needed;
10424 oct <<= bits_needed;
10425 bits_in_oct -= bits_needed;
10427 if ( dtm_egprs_mslot <= 3 )
10430 * Extended DTM EGPRS Multi Slot Class
10436 switch ( (oct>>(32-bits_needed))|(dtm_egprs_mslot<<4) )
10438 case 0x00: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
10439 case 0x01: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
10440 case 0x02: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
10441 case 0x03: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
10442 case 0x10: str="Multislot class 5 supported"; break;
10443 case 0x11: str="Multislot class 6 supported"; break;
10444 case 0x12: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
10445 case 0x13: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
10446 case 0x20: str="Multislot class 9 supported"; break;
10447 case 0x21: str="Multislot class 10 supported"; break;
10448 case 0x22: str="Unused. If received, it shall be interpreted as Multislot class 9 supported"; break;
10449 case 0x23: str="Unused. If received, it shall be interpreted as Multislot class 9 supported"; break;
10450 case 0x30: str="Multislot class 11 supported"; break;
10451 case 0x31: str="Unused. If received, it shall be interpreted as Multislot class 11 supported"; break;
10452 case 0x32: str="Unused. If received, it shall be interpreted as Multislot class 11 supported"; break;
10453 case 0x33: str="Unused. If received, it shall be interpreted as Multislot class 11 supported"; break;
10454 default: str="This should not happen";
10457 proto_tree_add_text(tf_tree,
10458 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
10459 "Extended DTM EGPRS Multi Slot Class: (%u) %s",oct>>(32-bits_needed),str);
10460 curr_bits_length -= bits_needed;
10461 oct <<= bits_needed;
10462 bits_in_oct -= bits_needed;
10467 * Modulation based multislot class support
10473 switch ( oct>>(32-bits_needed) )
10475 case 0x00: str="Modulation based multislot class not supported"; break;
10476 case 0x01: str="Modulation based multislot class supported"; break;
10477 default: str="This should not happen";
10480 proto_tree_add_text(tf_tree,
10481 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
10482 "Modulation based multislot class support: (%u) %s",oct>>(32-bits_needed),str);
10483 curr_bits_length -= bits_needed;
10484 oct <<= bits_needed;
10485 bits_in_oct -= bits_needed;
10488 * High Multislot Capability
10494 if ((oct>>(32-bits_needed))==0)
10496 proto_tree_add_text(tf_tree,
10497 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
10498 "High Multislot Capability: (%u) Bits are not available",oct>>(32-bits_needed));
10499 curr_bits_length -= bits_needed;
10500 oct <<= bits_needed;
10501 bits_in_oct -= bits_needed;
10505 curr_bits_length -= bits_needed;
10506 oct <<= bits_needed;
10507 bits_in_oct -= bits_needed;
10510 * High Multislot Capability
10516 proto_tree_add_text(tf_tree,
10517 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
10518 "High Multislot Capability: 0x%02x (%u) - This field effect all other multislot fields. To understand the value please read TS 24.008 5.6.0 Release 5 Chap 10.5.5.12 Page 406",oct>>(32-bits_needed),oct>>(32-bits_needed));
10519 curr_bits_length -= bits_needed;
10520 oct <<= bits_needed;
10521 bits_in_oct -= bits_needed;
10526 * GERAN Iu Mode Capability
10532 switch ( oct>>(32-bits_needed) )
10534 case 0x00: str="GERAN Iu mode not supported"; break;
10535 case 0x01: str="GERAN Iu mode supported"; break;
10536 default: str="This should not happen";
10539 proto_tree_add_text(tf_tree,
10540 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
10541 "GERAN Iu Mode Capability: (%u) %s",oct>>(32-bits_needed),str);
10542 curr_bits_length -= bits_needed;
10543 oct <<= bits_needed;
10544 bits_in_oct -= bits_needed;
10547 * GMSK/8-PSK Multislot Power Profile
10553 if ((oct>>(32-bits_needed))==0)
10555 proto_tree_add_text(tf_tree,
10556 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
10557 "GMSK/8-PSK Multislot Power Profile: (%u) Bits are not available",oct>>(32-bits_needed));
10558 curr_bits_length -= bits_needed;
10559 oct <<= bits_needed;
10560 bits_in_oct -= bits_needed;
10564 curr_bits_length -= bits_needed;
10565 oct <<= bits_needed;
10566 bits_in_oct -= bits_needed;
10569 * GMSK Multislot Power Profile
10575 switch ( oct>>(32-bits_needed) )
10577 case 0x00: str="GMSK_MULTISLOT_POWER_PROFILE 0"; break;
10578 case 0x01: str="GMSK_MULTISLOT_POWER_PROFILE 1"; break;
10579 case 0x02: str="GMSK_MULTISLOT_POWER_PROFILE 2"; break;
10580 case 0x03: str="GMSK_MULTISLOT_POWER_PROFILE 3"; break;
10581 default: str="This should not happen";
10584 proto_tree_add_text(tf_tree,
10585 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
10586 "GMSK Multislot Power Profile: (%u) %s",oct>>(32-bits_needed),str);
10587 curr_bits_length -= bits_needed;
10588 oct <<= bits_needed;
10589 bits_in_oct -= bits_needed;
10592 * 8-PSK Multislot Power Profile
10598 switch ( oct>>(32-bits_needed) )
10600 case 0x00: str="8-PSK_MULTISLOT_POWER_PROFILE 0"; break;
10601 case 0x01: str="8-PSK_MULTISLOT_POWER_PROFILE 1"; break;
10602 case 0x02: str="8-PSK_MULTISLOT_POWER_PROFILE 2"; break;
10603 case 0x03: str="8-PSK_MULTISLOT_POWER_PROFILE 3"; break;
10604 default: str="This should not happen";
10607 proto_tree_add_text(tf_tree,
10608 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
10609 "8-PSK Multislot Power Profile: (%u) %s",oct>>(32-bits_needed),str);
10610 curr_bits_length -= bits_needed;
10611 oct <<= bits_needed;
10612 bits_in_oct -= bits_needed;
10617 * we are too long ... so jump over it
10619 while ( curr_bits_length > 0 )
10621 if ( curr_bits_length > 8 )
10624 bits_needed = curr_bits_length;
10626 curr_bits_length -= bits_needed;
10627 oct <<= bits_needed;
10628 bits_in_oct -= bits_needed;
10633 curr_offset+= curr_len;
10635 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
10637 return(curr_offset - offset);
10644 de_gc_spare(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
10646 guint32 curr_offset;
10649 curr_offset = offset;
10651 proto_tree_add_text(tree,
10652 tvb, curr_offset, 1,
10657 /* no length check possible */
10659 return(curr_offset - offset);
10666 de_gmm_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
10669 guint32 curr_offset;
10673 curr_offset = offset;
10675 oct = tvb_get_guint8(tvb, curr_offset);
10679 /* additional causes can be found in annex g */
10680 case 0x02: str="IMSI unknown in HLR"; break;
10681 case 0x03: str="Illegal MS"; break;
10682 case 0x04: str="IMSI unknown in VLR"; break;
10683 case 0x05: str="IMEI not accepted"; break;
10684 case 0x06: str="Illegal ME"; break;
10685 case 0x07: str="GPRS services not allowed"; break;
10686 case 0x08: str="GPRS services and non-GPRS services not allowed"; break;
10687 case 0x09: str="MS identity cannot be derived by the network"; break;
10688 case 0x0a: str="Implicitly detached"; break;
10689 case 0x0b: str="PLMN not allowed"; break;
10690 case 0x0c: str="Location Area not allowed"; break;
10691 case 0x0d: str="Roaming not allowed in this location area"; break;
10692 case 0x0e: str="GPRS services not allowed in this PLMN"; break;
10693 case 0x0f: str="No Suitable Cells In Location Area"; break;
10694 case 0x10: str="MSC temporarily not reachable"; break;
10695 case 0x11: str="Network failure"; break;
10696 case 0x14: str="MAC failure"; break;
10697 case 0x15: str="Synch failure"; break;
10698 case 0x16: str="Congestion"; break;
10699 case 0x17: str="GSM authentication unacceptable"; break;
10700 case 0x20: str="Service option not supported"; break;
10701 case 0x21: str="Requested service option not subscribed"; break;
10702 case 0x22: str="Service option temporarily out of order"; break;
10703 case 0x26: str="Call cannot be identified"; break;
10704 case 0x28: str="No PDP context activated"; break;
10705 case 0x30: str="retry upon entry into a new cell"; break;
10706 case 0x31: str="retry upon entry into a new cell"; break;
10707 case 0x32: str="retry upon entry into a new cell"; break;
10708 case 0x33: str="retry upon entry into a new cell"; break;
10709 case 0x34: str="retry upon entry into a new cell"; break;
10710 case 0x35: str="retry upon entry into a new cell"; break;
10711 case 0x36: str="retry upon entry into a new cell"; break;
10712 case 0x37: str="retry upon entry into a new cell"; break;
10713 case 0x38: str="retry upon entry into a new cell"; break;
10714 case 0x39: str="retry upon entry into a new cell"; break;
10715 case 0x3a: str="retry upon entry into a new cell"; break;
10716 case 0x3b: str="retry upon entry into a new cell"; break;
10717 case 0x3c: str="retry upon entry into a new cell"; break;
10718 case 0x3d: str="retry upon entry into a new cell"; break;
10719 case 0x3e: str="retry upon entry into a new cell"; break;
10720 case 0x3f: str="retry upon entry into a new cell"; break;
10721 case 0x5f: str="Semantically incorrect message"; break;
10722 case 0x60: str="Invalid mandatory information"; break;
10723 case 0x61: str="Message type non-existent or not implemented"; break;
10724 case 0x62: str="Message type not compatible with the protocol state"; break;
10725 case 0x63: str="Information element non-existent or not implemented"; break;
10726 case 0x64: str="Conditional IE error"; break;
10727 case 0x65: str="Message not compatible with the protocol state"; break;
10728 case 0x6f: str="Protocol error, unspecified"; break;
10729 default: str="Protocol error, unspecified";
10732 proto_tree_add_text(tree,
10733 tvb, curr_offset, 1,
10734 "gmm Cause: (%u) %s",
10740 /* no length check possible */
10742 return(curr_offset - offset);
10746 * [7] 10.5.5.15 Routing area identification
10749 de_gmm_rai(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
10755 guint32 curr_offset;
10758 curr_offset = offset;
10760 mcc = (tvb_get_guint8(tvb, curr_offset) & 0x0f) <<8;
10761 mcc |= (tvb_get_guint8(tvb, curr_offset) & 0xf0);
10762 mcc |= (tvb_get_guint8(tvb, curr_offset+1) & 0x0f);
10763 mnc = (tvb_get_guint8(tvb, curr_offset+2) & 0x0f) <<8;
10764 mnc |= (tvb_get_guint8(tvb, curr_offset+2) & 0xf0);
10765 mnc |= (tvb_get_guint8(tvb, curr_offset+1) & 0xf0) >>4;
10766 if ((mnc&0x000f) == 0x000f)
10769 lac = tvb_get_guint8(tvb, curr_offset+3);
10771 lac |= tvb_get_guint8(tvb, curr_offset+4);
10772 rac = tvb_get_guint8(tvb, curr_offset+5);
10774 proto_tree_add_text(tree,
10775 tvb, curr_offset, 6,
10776 "Routing area identification: %x-%x-%x-%x",
10781 /* no length check possible */
10783 return(curr_offset - offset);
10790 de_gmm_update_res(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
10793 guint32 curr_offset;
10797 curr_offset = offset;
10799 oct = tvb_get_guint8(tvb, curr_offset);
10801 /* IMPORTANT - IT'S ASSUMED THAT THE INFORMATION IS IN THE HIGHER NIBBLE */
10806 case 0: str="RA updated"; break;
10807 case 1: str="combined RA/LA updated"; break;
10808 default: str="reserved";
10811 proto_tree_add_text(tree,
10812 tvb, curr_offset, 1,
10813 "Update Result: (%u) %s",
10819 /* no length check possible */
10821 return(curr_offset - offset);
10828 de_gmm_update_type(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
10832 guint32 curr_offset;
10833 const gchar *str_follow;
10834 const gchar *str_update;
10835 proto_item *tf = NULL;
10836 proto_tree *tf_tree = NULL;
10839 curr_offset = offset;
10841 oct = tvb_get_guint8(tvb, curr_offset);
10848 case 0: str_update="RA updating"; break;
10849 case 1: str_update="combined RA/LA updating"; break;
10850 case 2: str_update="combined RA/LA updating with IMSI attach"; break;
10851 case 3: str_update="Periodic updating"; break;
10852 default: str_update="reserved";
10856 case 8: str_follow="Follow-on request pending"; break;
10857 default: str_follow="No follow-on request pending";
10860 tf = proto_tree_add_text(tree,
10861 tvb, curr_offset, 1,
10864 tf_tree = proto_item_add_subtree(tf, ett_gmm_update_type );
10866 proto_tree_add_text(tf_tree,
10867 tvb, curr_offset, 1,
10871 proto_tree_add_text(tf_tree,
10872 tvb, curr_offset, 1,
10877 /* The ciphering key sequence number is added here */
10878 proto_tree_add_text(tree,
10879 tvb, curr_offset, 1,
10880 "Ciphering key sequence number: 0x%02x (%u)",
10886 /* no length check possible */
10888 return(curr_offset - offset);
10895 de_gmm_ac_ref_nr(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
10898 guint32 curr_offset;
10901 curr_offset = offset;
10903 oct = tvb_get_guint8(tvb, curr_offset);
10905 proto_tree_add_text(tree,
10906 tvb, curr_offset, 1,
10907 "A&C reference number: 0x%02x (%u)",
10913 /* no length check possible */
10915 return(curr_offset - offset);
10922 de_gmm_ac_ref_nr_h(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
10925 guint32 curr_offset;
10928 curr_offset = offset;
10930 oct = tvb_get_guint8(tvb, curr_offset);
10932 /* IMPORTANT - IT'S ASSUMED THAT THE INFORMATION IS IN THE HIGHER NIBBLE */
10935 proto_tree_add_text(tree,
10936 tvb, curr_offset, 1,
10937 "A&C reference number: 0x%02x (%u)",
10943 /* no length check possible */
10945 return(curr_offset - offset);
10952 de_gmm_service_type(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
10956 guint32 curr_offset;
10960 curr_offset = offset;
10962 oct = tvb_get_guint8(tvb, curr_offset);
10970 case 0: str="Signalling"; break;
10971 case 1: str="Data"; break;
10972 case 2: str="Paging Response"; break;
10973 case 3: str="MBMS Notification Response"; break;/* reponse->response*/
10974 default: str="reserved";
10977 /* The ciphering key sequence number is added here */
10978 proto_tree_add_text(tree,
10979 tvb, curr_offset, 1,
10980 "Ciphering key sequence number: 0x%02x (%u)",
10984 proto_tree_add_text(tree,
10985 tvb, curr_offset, 1,
10986 "Service Type: (%u) %s",
10992 /* no length check possible */
10994 return(curr_offset - offset);
11001 de_gmm_cell_notfi(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
11003 guint32 curr_offset;
11006 curr_offset = offset;
11008 proto_tree_add_text(tree,
11009 tvb, curr_offset, 0,
11010 "Cell Notification");
11012 /* no length check possible */
11014 return(curr_offset - offset);
11021 de_gmm_ps_lcs_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
11024 guint32 curr_offset;
11026 gchar str_otd[2][40]={ "MS assisted E-OTD not supported",
11027 "MS assisted E-OTD supported" };
11028 gchar str_gps[2][40]={ "MS assisted GPS not supported",
11029 "MS assisted GPS supported" };
11032 curr_offset = offset;
11034 oct = tvb_get_guint8(tvb, curr_offset);
11036 oct <<=3; /* move away the spare bits */
11038 proto_tree_add_text(tree,
11039 tvb, curr_offset, 1,
11044 proto_tree_add_text(tree,
11045 tvb, curr_offset, 1,
11051 proto_tree_add_text(tree,
11052 tvb, curr_offset, 1,
11057 proto_tree_add_text(tree,
11058 tvb, curr_offset, 1,
11063 proto_tree_add_text(tree,
11064 tvb, curr_offset, 1,
11071 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
11073 return(curr_offset - offset);
11080 de_gmm_net_feat_supp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
11083 guint32 curr_offset;
11087 curr_offset = offset;
11089 oct = tvb_get_guint8(tvb, curr_offset);
11093 case 8: str="LCS-MOLR via PS domain not supported"; break;
11094 default: str="LCS-MOLR via PS domain supported";
11097 proto_tree_add_text(tree,
11098 tvb, curr_offset, 1,
11099 "Network Feature Support: (%u) %s",
11105 /* no length check possible */
11107 return(curr_offset - offset);
11110 /* [7] 10.5.24 Inter RAT information container */
11112 de_gmm_rat_info_container(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
11114 guint32 curr_offset;
11117 curr_offset = offset;
11119 /* The value part of the Inter RAT information container information element is the INTER RAT HANDOVER INFO as
11120 defined in 3GPP TS 25.331 [23c]. If this field includes padding bits, they are defined in 3GPP TS 25.331 [23c].*/
11121 proto_tree_add_text(tree, tvb, curr_offset, len,"INTER RAT HANDOVER INFO - Not decoded");
11131 de_gc_context_stat(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
11135 guint32 curr_offset;
11136 proto_item *tf = NULL;
11137 proto_tree *tf_tree = NULL;
11139 gchar str[2][20]={ "PDP-INACTIVE", "PDP-ACTIVE" };
11142 curr_offset = offset;
11144 oct = tvb_get_guint8(tvb, curr_offset);
11146 tf = proto_tree_add_text(tree,
11147 tvb, curr_offset, 1,
11148 "PDP Context Status");
11150 tf_tree = proto_item_add_subtree(tf, ett_gmm_context_stat );
11152 oct = tvb_get_guint8(tvb, curr_offset);
11154 for ( pdp_nr=0;pdp_nr<16; pdp_nr++ )
11159 oct = tvb_get_guint8(tvb, curr_offset);
11161 proto_tree_add_text(tf_tree,
11162 tvb, curr_offset, 1,
11163 "NSAPI %d: (%u) %s",pdp_nr,
11171 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
11173 return(curr_offset - offset);
11180 de_gc_radio_prio(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
11183 guint32 curr_offset;
11187 curr_offset = offset;
11189 oct = tvb_get_guint8(tvb, curr_offset);
11193 case 1: str="priority level 1 (highest)"; break;
11194 case 2: str="priority level 2"; break;
11195 case 3: str="priority level 3"; break;
11196 case 4: str="priority level 4 (lowest)"; break;
11197 default: str="priority level 4 (lowest)";
11200 proto_tree_add_text(tree,
11201 tvb, curr_offset, 1,
11202 "Radio Priority (PDP or SMS): (%u) %s",
11208 return(curr_offset - offset);
11215 de_gc_timer(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
11219 guint32 curr_offset;
11223 curr_offset = offset;
11225 oct = tvb_get_guint8(tvb, curr_offset);
11231 case 0: str="sec"; val*=2; break;
11232 case 1: str="min"; break;
11233 case 2: str="min"; val*=6; break;
11235 proto_tree_add_text(tree,
11236 tvb, curr_offset, 1,
11237 "GPRS Timer: timer is deactivated");
11239 default: str="min";
11242 proto_tree_add_text(tree,
11243 tvb, curr_offset, 1,
11244 "GPRS Timer: (%u) %u %s",
11250 /* no length check possible */
11252 return(curr_offset - offset);
11259 de_gc_timer2(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len _U_)
11263 guint32 curr_offset;
11267 curr_offset = offset;
11269 oct = tvb_get_guint8(tvb, curr_offset);
11275 case 0: str="sec"; val*=2; break;
11276 case 1: str="min"; break;
11277 case 2: str="min"; val*=6; break;
11279 proto_tree_add_text(tree,
11280 tvb, curr_offset, 1,
11281 "GPRS Timer: timer is deactivated");
11283 default: str="min";
11286 proto_tree_add_text(tree,
11287 tvb, curr_offset, 1,
11288 "GPRS Timer: (%u) %u %s %s",
11290 str, add_string ? add_string : "");
11294 return(curr_offset - offset);
11302 de_gc_radio_prio2(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
11305 guint32 curr_offset;
11309 curr_offset = offset;
11311 oct = tvb_get_guint8(tvb, curr_offset);
11313 /* IMPORTANT - IT'S ASSUMED THAT THE INFORMATION IS IN THE HIGHER NIBBLE */
11318 case 1: str="priority level 1 (highest)"; break;
11319 case 2: str="priority level 2"; break;
11320 case 3: str="priority level 3"; break;
11321 case 4: str="priority level 4 (lowest)"; break;
11322 default: str="priority level 4 (lowest)";
11325 proto_tree_add_text(tree,
11326 tvb, curr_offset, 1,
11327 "Radio Priority (TOM8): (%u) %s",
11333 return(curr_offset - offset);
11337 * [8] 10.5.7.6 MBMS context status
11340 de_gc_mbms_context_stat(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
11342 guint32 curr_offset;
11345 curr_offset = offset;
11347 proto_tree_add_text(tree,tvb, curr_offset, len, "MBMS context status - Not decoded");
11354 #define MAX_APN_LENGTH 50
11357 de_sm_apn(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len _U_)
11359 guint32 curr_offset;
11361 const guint8 *cptr;
11362 guint8 str[MAX_APN_LENGTH+1];
11364 cptr = tvb_get_ptr(tvb, offset, len);
11367 curr_offset = offset;
11369 /* init buffer and copy it */
11370 memset ( str , 0 , MAX_APN_LENGTH );
11371 memcpy ( str , cptr , len<MAX_APN_LENGTH?len:MAX_APN_LENGTH );
11374 while (( curr_len < len ) && ( curr_len < MAX_APN_LENGTH ))
11376 guint step = str[curr_len];
11378 curr_len += step+1;
11381 proto_tree_add_text(tree,
11382 tvb, curr_offset, len,
11383 "APN: %s %s", str+1 , add_string ? add_string : "");
11387 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
11389 return(curr_offset - offset);
11396 de_sm_nsapi(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len _U_)
11399 guint32 curr_offset;
11402 curr_offset = offset;
11404 oct = tvb_get_guint8(tvb, curr_offset);
11406 proto_tree_add_text(tree,
11407 tvb, curr_offset, 1,
11408 "NSAPI: 0x%02x (%u) %s",
11409 oct&0x0f, oct&0x0f,add_string ? add_string : "");
11413 return(curr_offset - offset);
11420 de_sm_pco(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
11422 guint32 curr_offset;
11425 struct e_in6_addr ipv6_addr;
11428 curr_offset = offset;
11430 oct = tvb_get_guint8(tvb, curr_offset);
11434 proto_tree_add_text(tree,tvb, curr_offset, 1, "Ext: 0x%02x (%u)",oct>>7,oct>>7);
11435 proto_tree_add_text(tree,tvb, curr_offset, 1, "Configuration Protocol: PPP (%u)",oct&0x0f);
11437 while ( curr_len > 0 )
11442 dissector_handle_t handle = NULL;
11443 static packet_info p_info;
11445 prot = tvb_get_guint8(tvb, curr_offset);
11447 prot |= tvb_get_guint8(tvb, curr_offset+1);
11448 e_len = tvb_get_guint8(tvb, curr_offset+2);
11456 proto_tree_add_text(tree,tvb, curr_offset-3, 2, "Parameter: (%u) P-CSCF Address" , prot );
11457 proto_tree_add_text(tree,tvb, curr_offset-1, 1, "Length: 0x%02x (%u)", e_len , e_len);
11459 tvb_get_ipv6(tvb, curr_offset, &ipv6_addr);
11460 proto_tree_add_text(tree,
11461 tvb, curr_offset, 16,
11462 "IPv6: %s", ip6_to_str(&ipv6_addr));
11466 proto_tree_add_text(tree,tvb, curr_offset-3, 2, "Parameter: (%u) IM CN Subsystem Signaling Flag" , prot );
11467 proto_tree_add_text(tree,tvb, curr_offset-1, 1, "Length: 0x%02x (%u)", e_len , e_len);
11471 proto_tree_add_text(tree,tvb, curr_offset-3, 2, "Parameter: (%u) DNS Server Address" , prot );
11472 proto_tree_add_text(tree,tvb, curr_offset-1, 1, "Length: 0x%02x (%u)", e_len , e_len);
11474 tvb_get_ipv6(tvb, curr_offset, &ipv6_addr);
11475 proto_tree_add_text(tree,
11476 tvb, curr_offset, 16,
11477 "IPv6: %s", ip6_to_str(&ipv6_addr));
11481 proto_tree_add_text(tree,tvb, curr_offset-3, 2, "Parameter: (%u) Policy Control rejection code" , prot );
11482 proto_tree_add_text(tree,tvb, curr_offset-1, 1, "Length: 0x%02x (%u)", e_len , e_len);
11483 oct = tvb_get_guint8(tvb, curr_offset);
11484 proto_tree_add_text(tree,tvb, curr_offset, 1, "Reject Code: 0x%02x (%u)", e_len , e_len);
11487 handle = dissector_get_port_handle ( gprs_sm_pco_subdissector_table , prot );
11488 if ( handle != NULL )
11490 proto_tree_add_text(tree,tvb, curr_offset-3, 2, "Protocol: (%u) %s" ,
11491 prot , val_to_str(prot, ppp_vals, "Unknown"));
11492 proto_tree_add_text(tree,tvb, curr_offset-1, 1, "Length: 0x%02x (%u)", e_len , e_len);
11494 * dissect the embedded message
11496 l3_tvb = tvb_new_subset(tvb, curr_offset, e_len, e_len);
11497 call_dissector(handle, l3_tvb , &p_info , tree );
11501 proto_tree_add_text(tree,tvb, curr_offset-3, 2, "Protocol/Parameter: (%u) unknwown" , prot );
11502 proto_tree_add_text(tree,tvb, curr_offset-1, 1, "Length: 0x%02x (%u)", e_len , e_len);
11504 * dissect the embedded DATA message
11506 l3_tvb = tvb_new_subset(tvb, curr_offset, e_len, e_len);
11507 call_dissector(data_handle, l3_tvb, &p_info , tree);
11512 curr_offset+= e_len;
11514 curr_offset+= curr_len;
11516 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
11518 return(curr_offset - offset);
11525 de_sm_pdp_addr(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
11527 guint32 curr_offset;
11532 struct e_in6_addr ipv6_addr;
11535 curr_offset = offset;
11537 oct = tvb_get_guint8(tvb, curr_offset);
11539 switch ( oct&0x0f )
11541 case 0x00: str="ETSI allocated address"; break;
11542 case 0x01: str="IETF allocated address"; break;
11543 case 0x0f: str="Empty PDP type";
11544 default: str="reserved";
11547 proto_tree_add_text(tree,
11548 tvb, curr_offset, 1,
11549 "PDP type organisation: (%u) %s",oct&0x0f,str);
11551 oct2 = tvb_get_guint8(tvb, curr_offset+1);
11553 if (( oct&0x0f ) == 0 )
11557 case 0x00: str="Reserved, used in earlier version of this protocol"; break;
11558 case 0x01: str="PDP-type PPP"; break;
11559 default: str="reserved";
11562 else if (( oct&0x0f) == 1 )
11566 case 0x21: str="IPv4 address"; break;
11567 case 0x57: str="IPv6 address"; break;
11568 default: str="IPv4 address";
11571 else if ((oct2==0) && (( oct&0x0f) == 0x0f ))
11574 str="Not specified";
11576 proto_tree_add_text(tree,
11577 tvb, curr_offset+1, 1,
11578 "PDP type number: (%u) %s",oct2,str);
11580 if (( len == 2 ) && (( oct2 == 0x21 ) || ( oct2 == 0x57 )))
11582 proto_tree_add_text(tree,
11583 tvb, curr_offset+1, 1,
11584 "Dynamic addressing");
11586 curr_offset+= curr_len;
11588 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
11590 return(curr_offset - offset);
11592 else if ( len == 2 )
11594 proto_tree_add_text(tree,
11595 tvb, curr_offset+1, 1,
11596 "No PDP address is included");
11598 curr_offset+= curr_len;
11600 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
11602 return(curr_offset - offset);
11604 else if ( len < 2 )
11606 proto_tree_add_text(tree,
11607 tvb, curr_offset+1, 1,
11608 "Length is bogus - should be >= 2");
11610 curr_offset+= curr_len;
11612 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
11614 return(curr_offset - offset);
11617 if ((( oct2 == 0x21 ) && ( len != 6 )) ||
11618 (( oct2 == 0x57 ) && ( len != 18 )))
11620 proto_tree_add_text(tree,
11621 tvb, curr_offset+2, len-2,
11622 "Can't display address");
11630 proto_tree_add_text(tree,
11631 tvb, curr_offset+2, 0,
11632 "IPv4: length is wrong");
11634 proto_tree_add_text(tree,
11635 tvb, curr_offset+2, len-2,
11636 "IPv4: %s", ip_to_str(tvb_get_ptr(tvb, offset+2, 4)));
11642 proto_tree_add_text(tree,
11643 tvb, curr_offset+2, 0,
11644 "IPv6: length is wrong");
11646 tvb_get_ipv6(tvb, curr_offset+2, &ipv6_addr);
11647 proto_tree_add_text(tree,
11648 tvb, curr_offset+2, len-2,
11649 "IPv6: %s", ip6_to_str(&ipv6_addr));
11654 curr_offset+= curr_len;
11656 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
11658 return(curr_offset - offset);
11664 /* Delivery of erroneous SDUs, octet 6 (see 3GPP TS 23.107) Bits 3 2 1 */
11665 const value_string gsm_a_qos_del_of_err_sdu_vals[] = {
11666 { 0, "Subscribed delivery of erroneous SDUs/Reserved" },
11667 { 1, "No detect('-')" },
11668 { 2, "Erroneous SDUs are delivered('yes')" },
11669 { 3, "Erroneous SDUs are not delivered('No')" },
11674 /* Delivery order, octet 6 (see 3GPP TS 23.107) Bits 5 4 3 */
11675 const value_string gsm_a_qos_del_order_vals[] = {
11676 { 0, "Subscribed delivery order/Reserved" },
11677 { 1, "With delivery order ('yes')" },
11678 { 2, "Without delivery order ('no')" },
11682 /* Traffic class, octet 6 (see 3GPP TS 23.107) Bits 8 7 6 */
11683 const value_string gsm_a_qos_traffic_cls_vals[] = {
11684 { 0, "Subscribed traffic class/Reserved" },
11685 { 1, "Conversational class" },
11686 { 2, "Streaming class" },
11687 { 3, "Interactive class" },
11688 { 4, "Background class" },
11693 /* Residual Bit Error Rate (BER), octet 10 (see 3GPP TS 23.107) Bits 8 7 6 5 */
11694 const value_string gsm_a_qos_ber_vals[] = {
11695 { 0, "Subscribed residual BER/Reserved" },
11705 { 10, "Reserved" },
11709 /* SDU error ratio, octet 10 (see 3GPP TS 23.107) Bits 4 3 2 1 */
11710 const value_string gsm_a_qos_sdu_err_rat_vals[] = {
11711 { 0, "Subscribed SDU error ratio/Reserved" },
11719 { 15, "Reserved" },
11723 /* Traffic handling priority, octet 11 (see 3GPP TS 23.107) Bits 2 1 */
11724 const value_string gsm_a_qos_traff_hdl_pri_vals[] = {
11725 { 0, "Subscribed traffic handling priority/Reserved" },
11726 { 1, "Priority level 1" },
11727 { 2, "Priority level 2" },
11728 { 3, "Priority level 3" },
11733 de_sm_qos(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
11735 guint32 curr_offset;
11737 guchar oct, tmp_oct;
11741 curr_offset = offset;
11743 oct = tvb_get_guint8(tvb, curr_offset);
11745 switch ( (oct>>3)&7 )
11747 case 0x00: str="Subscribed delay class/reserved"; break;
11748 case 0x01: str="Delay class 1"; break;
11749 case 0x02: str="Delay class 2"; break;
11750 case 0x03: str="Delay class 3"; break;
11751 case 0x04: str="Delay class 4 (best effort)"; break;
11752 case 0x07: str="Reserved"; break;
11753 default: str="Delay class 4 (best effort)";
11756 proto_tree_add_text(tree,
11757 tvb, curr_offset, 1,
11758 "Delay class: (%u) %s",(oct>>3)&7,str);
11762 case 0x00: str="Subscribed reliability class/reserved"; break;
11763 case 0x01: str="Acknowledged GTP, LLC, and RLC; Protected data"; break;
11764 case 0x02: str="Unacknowledged GTP; Acknowledged LLC and RLC, Protected data"; break;
11765 case 0x03: str="Unacknowledged GTP and LLC; Acknowledged RLC, Protected data"; break;
11766 case 0x04: str="Unacknowledged GTP, LLC, and RLC, Protected data"; break;
11767 case 0x05: str="Unacknowledged GTP, LLC, and RLC, Unprotected data"; break;
11768 case 0x07: str="Reserved"; break;
11769 default: str="Unacknowledged GTP and LLC; Acknowledged RLC, Protected data";
11772 proto_tree_add_text(tree,
11773 tvb, curr_offset, 1,
11774 "Reliability class: (%u) %s",oct&7,str);
11779 if ( curr_len == 0 )
11781 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
11783 return(curr_offset - offset);
11786 oct = tvb_get_guint8(tvb, curr_offset);
11790 case 0x00: str="Subscribed peak throughput/reserved"; break;
11791 case 0x01: str="Up to 1 000 octet/s"; break;
11792 case 0x02: str="Up to 2 000 octet/s"; break;
11793 case 0x03: str="Up to 4 000 octet/s"; break;
11794 case 0x04: str="Up to 8 000 octet/s"; break;
11795 case 0x05: str="Up to 16 000 octet/s"; break;
11796 case 0x06: str="Up to 32 000 octet/s"; break;
11797 case 0x07: str="Up to 64 000 octet/s"; break;
11798 case 0x08: str="Up to 128 000 octet/s"; break;
11799 case 0x09: str="Up to 256 000 octet/s"; break;
11800 case 0x0f: str="Reserved"; break;
11801 default: str="Up to 1 000 octet/s";
11804 proto_tree_add_text(tree,
11805 tvb, curr_offset, 1,
11806 "Peak throughput: (%u) %s",oct>>4,str);
11810 case 0x00: str="Subscribed precedence/reserved"; break;
11811 case 0x01: str="High priority"; break;
11812 case 0x02: str="Normal priority"; break;
11813 case 0x03: str="Low priority"; break;
11814 case 0x07: str="Reserved"; break;
11815 default: str="Normal priority";
11818 proto_tree_add_text(tree,
11819 tvb, curr_offset, 1,
11820 "Precedence class: (%u) %s",oct&7,str);
11825 if ( curr_len == 0 )
11827 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
11829 return(curr_offset - offset);
11832 oct = tvb_get_guint8(tvb, curr_offset);
11834 switch ( oct&0x1f )
11836 case 0x00: str="Subscribed peak throughput/reserved"; break;
11837 case 0x01: str="100 octet/h"; break;
11838 case 0x02: str="200 octet/h"; break;
11839 case 0x03: str="500 octet/h"; break;
11840 case 0x04: str="1 000 octet/h"; break;
11841 case 0x05: str="2 000 octet/h"; break;
11842 case 0x06: str="5 000 octet/h"; break;
11843 case 0x07: str="10 000 octet/h"; break;
11844 case 0x08: str="20 000 octet/h"; break;
11845 case 0x09: str="50 000 octet/h"; break;
11846 case 0x0a: str="100 000 octet/h"; break;
11847 case 0x0b: str="200 000 octet/h"; break;
11848 case 0x0c: str="500 000 octet/h"; break;
11849 case 0x0d: str="1 000 000 octet/h"; break;
11850 case 0x0e: str="2 000 000 octet/h"; break;
11851 case 0x0f: str="5 000 000 octet/h"; break;
11852 case 0x10: str="10 000 000 octet/h"; break;
11853 case 0x11: str="20 000 000 octet/h"; break;
11854 case 0x12: str="50 000 000 octet/h"; break;
11855 case 0x1e: str="Reserved"; break;
11856 case 0x1f: str="Best effort"; break;
11857 default: str="Best effort";
11860 proto_tree_add_text(tree,
11861 tvb, curr_offset, 1,
11862 "Mean throughput: (%u) %s",oct&0x1f,str);
11867 if ( curr_len == 0 )
11869 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
11871 return(curr_offset - offset);
11874 proto_tree_add_item(tree, hf_gsm_a_qos_traffic_cls, tvb, curr_offset, 1, FALSE);
11875 proto_tree_add_item(tree, hf_gsm_a_qos_del_order, tvb, curr_offset, 1, FALSE);
11876 proto_tree_add_item(tree, hf_gsm_a_qos_del_of_err_sdu, tvb, curr_offset, 1, FALSE);
11881 if ( curr_len == 0 )
11883 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
11885 return(curr_offset - offset);
11888 oct = tvb_get_guint8(tvb, curr_offset);
11892 case 0x00: str="Subscribed maximum SDU size/reserved"; break;
11893 case 0x97: str="1502 octets"; break;
11894 case 0x98: str="1510 octets"; break;
11895 case 0x99: str="1520 octets"; break;
11896 case 0xff: str="Reserved"; break;
11897 default: str="Unspecified";
11900 if (( oct >= 1 ) && ( oct <= 0x96 ))
11901 proto_tree_add_text(tree,
11902 tvb, curr_offset, 1,
11903 "Maximum SDU size: (%u) %u octets",oct,oct*10);
11905 proto_tree_add_text(tree,
11906 tvb, curr_offset, 1,
11907 "Maximum SDU size: (%u) %s",oct,str);
11912 if ( curr_len == 0 )
11914 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
11916 return(curr_offset - offset);
11919 oct = tvb_get_guint8(tvb, curr_offset);
11923 case 0x00: str="Subscribed maximum bit rate for uplink/reserved"; break;
11924 case 0xff: str="0kbps"; break;
11925 default: str="This should not happen - BUG";
11928 if (( oct >= 1 ) && ( oct <= 0x3f ))
11929 proto_tree_add_text(tree,
11930 tvb, curr_offset, 1,
11931 "Maximum bit rate for uplink: (%u) %ukbps",oct,oct);
11932 else if (( oct >= 0x40 ) && ( oct <= 0x7f ))
11933 proto_tree_add_text(tree,
11934 tvb, curr_offset, 1,
11935 "Maximum bit rate for uplink: (%u) %ukbps",oct,(oct-0x40)*8+64); /* - was (oct-0x40)*8 */
11936 else if (( oct >= 0x80 ) && ( oct <= 0xfe ))
11937 proto_tree_add_text(tree,
11938 tvb, curr_offset, 1,
11939 "Maximum bit rate for uplink: (%u) %ukbps",oct,(oct-0x80)*64+576); /* - was (oct-0x80)*64 */
11941 proto_tree_add_text(tree,
11942 tvb, curr_offset, 1,
11943 "Maximum bit rate for uplink: (%u) %s",oct,str);
11948 if ( curr_len == 0 )
11950 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
11952 return(curr_offset - offset);
11955 oct = tvb_get_guint8(tvb, curr_offset);
11959 case 0x00: str="Subscribed maximum bit rate for uplink/reserved"; break;
11960 case 0xff: str="0kbps"; break;
11961 default: str="This should not happen - BUG";
11964 if (( oct >= 1 ) && ( oct <= 0x3f ))
11965 proto_tree_add_text(tree,
11966 tvb, curr_offset, 1,
11967 "Maximum bit rate for downlink: (%u) %ukbps",oct,oct);
11968 else if (( oct >= 0x40 ) && ( oct <= 0x7f ))
11969 proto_tree_add_text(tree,
11970 tvb, curr_offset, 1,
11971 "Maximum bit rate for downlink: (%u) %ukbps",oct,(oct-0x40)*8+64);/*same as above*/
11972 else if (( oct >= 0x80 ) && ( oct <= 0xfe ))
11973 proto_tree_add_text(tree,
11974 tvb, curr_offset, 1,
11975 "Maximum bit rate for downlink: (%u) %ukbps",oct,(oct-0x80)*64+576);/*same as above*/
11977 proto_tree_add_text(tree,
11978 tvb, curr_offset, 1,
11979 "Maximum bit rate for downlink: (%u) %s",oct,str);
11984 if ( curr_len == 0 )
11986 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
11988 return(curr_offset - offset);
11991 proto_tree_add_item(tree, hf_gsm_a_qos_ber, tvb, curr_offset, 1, FALSE);
11992 proto_tree_add_item(tree, hf_gsm_a_qos_sdu_err_rat, tvb, curr_offset, 1, FALSE);
11997 if ( curr_len == 0 )
11999 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
12001 return(curr_offset - offset);
12004 oct = tvb_get_guint8(tvb, curr_offset);
12008 case 0x00: str="Subscribed transfer delay/reserved"; break;
12009 case 0x3f: str="Reserved"; break;
12010 default: str="This should not happen - BUG";
12015 if (( tmp_oct >= 1 ) && ( tmp_oct <= 0x0f ))
12016 proto_tree_add_text(tree,
12017 tvb, curr_offset, 1,
12018 "Transfer Delay: (%u) %ums",oct>>2,(oct>>2)*10);
12019 else if (( tmp_oct >= 0x10 ) && ( tmp_oct <= 0x1f ))
12020 proto_tree_add_text(tree,
12021 tvb, curr_offset, 1,
12022 "Transfer Delay: (%u) %ums",oct>>2,((oct>>2)-0x10)*50+200);
12023 else if (( tmp_oct >= 0x20 ) && ( tmp_oct <= 0x3e ))
12024 proto_tree_add_text(tree,
12025 tvb, curr_offset, 1,
12026 "Transfer Delay: (%u) %ums",oct>>2,((oct>>2)-0x20)*100+1000);
12028 proto_tree_add_text(tree,
12029 tvb, curr_offset, 1,
12030 "Transfer Delay: (%u) %s",oct>>2,str);
12032 switch ( oct&0x03 )
12034 case 0x00: str="Subscribed traffic handling priority/reserved"; break;
12035 case 0x01: str="Priority level 1"; break;
12036 case 0x02: str="Priority level 2"; break;
12037 case 0x03: str="Priority level 3"; break;
12038 default: str="This should not happen - BUG";
12041 proto_tree_add_text(tree,
12042 tvb, curr_offset, 1,
12043 "Traffic Handling priority: (%u) %s",oct&0x03,str);
12048 if ( curr_len == 0 )
12050 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
12052 return(curr_offset - offset);
12055 oct = tvb_get_guint8(tvb, curr_offset);
12059 case 0x00: str="Subscribed guaranteed bit rate for uplink/reserved"; break;
12060 case 0xff: str="0kbps"; break;
12061 default: str="This should not happen - BUG";
12064 if (( oct >= 1 ) && ( oct <= 0x3f ))
12065 proto_tree_add_text(tree,
12066 tvb, curr_offset, 1,
12067 "Guaranteed bit rate for uplink: (%u) %ukbps",oct,oct);
12068 else if (( oct >= 0x40 ) && ( oct <= 0x7f ))
12069 proto_tree_add_text(tree,
12070 tvb, curr_offset, 1,
12071 "Guaranteed bit rate for uplink: (%u) %ukbps",oct,(oct-0x40)*8+64);/*same as for max bit rate*/
12072 else if (( oct >= 0x80 ) && ( oct <= 0xfe ))
12073 proto_tree_add_text(tree,
12074 tvb, curr_offset, 1,
12075 "Guaranteed bit rate for uplink: (%u) %ukbps",oct,(oct-0x80)*64+576);/*same as for max bit rate*/
12077 proto_tree_add_text(tree,
12078 tvb, curr_offset, 1,
12079 "Guaranteed bit rate for uplink: (%u) %s",oct,str);
12084 if ( curr_len == 0 )
12086 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
12088 return(curr_offset - offset);
12091 oct = tvb_get_guint8(tvb, curr_offset);
12095 case 0x00: str="Subscribed guaranteed bit rate for uplink/reserved"; break;
12096 case 0xff: str="0kbps"; break;
12097 default: str="This should not happen - BUG";
12100 if (( oct >= 1 ) && ( oct <= 0x3f ))
12101 proto_tree_add_text(tree,
12102 tvb, curr_offset, 1,
12103 "Guaranteed bit rate for downlink: (%u) %ukbps",oct,oct);
12104 else if (( oct >= 0x40 ) && ( oct <= 0x7f ))
12105 proto_tree_add_text(tree,
12106 tvb, curr_offset, 1,
12107 "Guaranteed bit rate for downlink: (%u) %ukbps",oct,(oct-0x40)*8+64);/*same as above*/
12108 else if (( oct >= 0x80 ) && ( oct <= 0xfe ))
12109 proto_tree_add_text(tree,
12110 tvb, curr_offset, 1,
12111 "Guaranteed bit rate for downlink: (%u) %ukbps",oct,(oct-0x80)*64+576);/*same as above*/
12113 proto_tree_add_text(tree,
12114 tvb, curr_offset, 1,
12115 "Guaranteed bit rate for downlink: (%u) %s",oct,str);
12120 if ( curr_len == 0 )
12122 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
12124 return(curr_offset - offset);
12127 oct = tvb_get_guint8(tvb, curr_offset);
12129 switch ( (oct>>4)&1 )
12131 case 0x00: str="Not optimised for signalling traffic"; break;
12132 case 0x01: str="Optimised for signalling traffic"; break;
12133 default: str="This should not happen - BUG";
12136 proto_tree_add_text(tree,
12137 tvb, curr_offset, 1,
12138 "Signalling Indication: (%u) %s",(oct>>4)&1,str);
12142 case 0x00: str="unknown"; break;
12143 case 0x01: str="speech"; break;
12144 default: str="unknown";
12147 proto_tree_add_text(tree,
12148 tvb, curr_offset, 1,
12149 "Source Statistics Descriptor: (%u) %s",oct&7,str);
12154 if ( curr_len == 0 )
12156 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
12158 return(curr_offset - offset);
12162 oct = tvb_get_guint8(tvb, curr_offset);
12166 case 0x00: str="Use the value indicated by the Maximum bit rate for downlink"; break;
12167 default: str="Unspecified";
12170 if (( oct >= 1 ) && ( oct <= 0x3f ))
12171 proto_tree_add_text(tree,
12172 tvb, curr_offset, 1,
12173 "Maximum bit rate for downlink (extended): (%u) %ukbps",oct,oct*100);
12175 proto_tree_add_text(tree,
12176 tvb, curr_offset, 1,
12177 "Maximum bit rate for downlink (extended): (%u) %s",oct,str);
12182 if ( curr_len == 0 )
12184 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
12186 return(curr_offset - offset);
12189 oct = tvb_get_guint8(tvb, curr_offset);
12193 case 0x00: str="Use the value indicated by the Guaranteed bit rate for downlink"; break;
12194 default: str="Unspecified";
12197 if (( oct >= 1 ) && ( oct <= 0x4a ))
12198 proto_tree_add_text(tree,
12199 tvb, curr_offset, 1,
12200 "Guaranteed bit rate for downlink (extended): (%u) %ukbps",oct,oct*100);
12202 proto_tree_add_text(tree,
12203 tvb, curr_offset, 1,
12204 "Guaranteed bit rate for downlink (extended): (%u) %s",oct,str);
12209 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
12211 return(curr_offset - offset);
12215 * [8] 10.5.6.6 SM cause
12218 de_sm_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len _U_)
12221 guint32 curr_offset;
12225 curr_offset = offset;
12227 oct = tvb_get_guint8(tvb, curr_offset);
12231 case 0x08: str="Operator Determined Barring"; break;
12232 case 0x18: str="MBMS bearer capabilities insufficient for the service"; break;
12233 case 0x19: str="LLC or SNDCP failure(GSM only)"; break;
12234 case 0x1a: str="Insufficient resources"; break;
12235 case 0x1b: str="Missing or unknown APN"; break;
12236 case 0x1c: str="Unknown PDP address or PDP type"; break;
12237 case 0x1d: str="User Aauthentication failed"; break;
12238 case 0x1e: str="Activation rejected by GGSN"; break;
12239 case 0x1f: str="Activation rejected, unspecified"; break;
12240 case 0x20: str="Service option not supported"; break;
12241 case 0x21: str="Requested service option not subscribed"; break;
12242 case 0x22: str="Service option temporarily out of order"; break;
12243 case 0x23: str="NSAPI already used (not sent)"; break;
12244 case 0x24: str="Regular deactivation"; break;
12245 case 0x25: str="QoS not accepted"; break;
12246 case 0x26: str="Network failure"; break;
12247 case 0x27: str="Reactivation required"; break;
12248 case 0x28: str="Feature not supported"; break;
12249 case 0x29: str="Semantic error in the TFT operation"; break;
12250 case 0x2a: str="Syntactical error in the TFT operation"; break;
12251 case 0x2b: str="Unknown PDP context"; break;
12252 case 0x2e: str="PDP context without TFT already activated"; break;
12253 case 0x2f: str="Multicast group membership time-out"; break;
12254 case 0x2c: str="Semantic errors in packet filter(s)"; break;
12255 case 0x2d: str="Syntactical errors in packet filter(s)"; break;
12256 case 0x51: str="Invalid transaction identifier value"; break;
12257 case 0x5f: str="Semantically incorrect message"; break;
12258 case 0x60: str="Invalid mandatory information"; break;
12259 case 0x61: str="Message type non-existent or not implemented"; break;
12260 case 0x62: str="Message type not compatible with the protocol state"; break;
12261 case 0x63: str="Information element non-existent or not implemented"; break;
12262 case 0x64: str="Conditional IE error"; break;
12263 case 0x65: str="Message not compatible with the protocol state"; break;
12264 case 0x6f: str="Protocol error, unspecified"; break;
12265 case 0x70: str="APN restriction value incompatible with active PDP context"; break;
12266 default: str="Protocol error, unspecified"; break;
12269 proto_tree_add_text(tree,
12270 tvb, curr_offset, 1,
12271 "Cause: (%u) %s %s",
12272 oct, str,add_string ? add_string : "");
12276 return(curr_offset - offset);
12283 de_sm_linked_ti(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
12285 guint32 curr_offset;
12289 gchar ti_flag[2][80]={ "The message is sent from the side that originates the TI" ,
12290 "The message is sent to the side that originates the TI" };
12293 curr_offset = offset;
12295 oct = tvb_get_guint8(tvb, curr_offset);
12297 proto_tree_add_text(tree,
12298 tvb, curr_offset, 1,
12299 "TI flag: (%u) %s",oct>>7,ti_flag[oct>>7]);
12301 if ( curr_len > 1 )
12303 oct = tvb_get_guint8(tvb, curr_offset);
12305 proto_tree_add_text(tree,
12306 tvb, curr_offset, 1,
12307 "TI value: 0x%02x (%u)",oct&0x7f,oct&0x7f);
12309 proto_tree_add_text(tree,
12310 tvb, curr_offset, 1,
12311 "ext: 0x%02x (%u)",oct>>7,oct>>7);
12316 proto_tree_add_text(tree,
12317 tvb, curr_offset, 1,
12318 "TI value: 0x%02x (%u)",(oct>>4)&7,(oct>>4)&7);
12321 curr_offset+= curr_len;
12323 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
12325 return(curr_offset - offset);
12332 de_sm_sapi(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len _U_)
12335 guint32 curr_offset;
12338 curr_offset = offset;
12340 oct = tvb_get_guint8(tvb, curr_offset);
12342 proto_tree_add_text(tree,
12343 tvb, curr_offset, 1,
12344 "LLC SAPI: 0x%02x (%u) %s",
12345 oct&0x0f, oct&0x0f,add_string ? add_string : "");
12349 return(curr_offset - offset);
12356 de_sm_tear_down(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len _U_)
12359 guint32 curr_offset;
12360 gchar str[2][30] = { "tear down not requested" , "tear down requested" };
12363 curr_offset = offset;
12365 oct = tvb_get_guint8(tvb, curr_offset);
12367 proto_tree_add_text(tree,
12368 tvb, curr_offset, 1,
12369 "Tear Down Indicator: (%u) %s %s",
12370 oct&1, str[oct&1],add_string ? add_string : "");
12374 return(curr_offset - offset);
12380 /* Packet Flow Identifier value (octet 3) */
12381 static const value_string gsm_a_packet_flow_id_vals[] = {
12382 { 0, "Best Effort"},
12393 de_sm_pflow_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
12395 guint32 curr_offset;
12400 curr_offset = offset;
12402 oct = tvb_get_guint8(tvb, curr_offset);
12404 proto_tree_add_text(tree,
12405 tvb, curr_offset, 1,
12406 "Packet Flow Identifier: (%u) %s",oct&0x7f,
12407 val_to_str(oct&0x7f, gsm_a_packet_flow_id_vals, "dynamically assigned (%u)"));
12409 curr_offset+= curr_len;
12411 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
12413 return(curr_offset - offset);
12417 * [7] 10.5.6.12 TFT - Traffic Flow Template
12419 /* TFT operation code (octet 3) */
12420 static const value_string gsm_a_tft_op_code_vals[] = {
12422 { 1, "Create new TFT"},
12423 { 2, "Delete existing TFT"},
12424 { 3, "Add packet filters to existing TFT"},
12425 { 4, "Replace packet filters in existing TFT"},
12426 { 5, "Delete packet filters from existing TFT"},
12427 { 6, "No TFT operation"},
12432 static const true_false_string gsm_a_tft_e_bit = {
12433 "parameters list is included",
12434 "parameters list is not included"
12439 de_sm_tflow_temp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
12441 guint32 curr_offset;
12443 proto_item *tf = NULL;
12444 proto_tree *tf_tree = NULL;
12445 proto_tree *comp_tree = NULL;
12447 guchar pkt_fil_count;
12453 gint pf_identifier;
12454 gint pack_component_type;
12457 curr_offset = offset;
12460 * parse first octet. It contain TFT operation code, E bit and Number of packet filters
12462 oct = tvb_get_guint8(tvb, curr_offset);
12465 pkt_fil_count = oct&0x0f;
12466 e_bit = (oct>>4)&1;
12468 proto_tree_add_item(tree,hf_gsm_a_tft_op_code,tvb,curr_offset,1,FALSE);
12469 proto_tree_add_item(tree,hf_gsm_a_tft_e_bit,tvb,curr_offset,1,FALSE);
12470 proto_tree_add_item(tree,hf_gsm_a_tft_pkt_flt,tvb,curr_offset,1,FALSE);
12475 /* Packet filter list dissect */
12478 if ( op_code == 2 ) /* delete TFT contains no packet filters. so we will jump over it */
12479 count = pkt_fil_count;
12480 while ( count < pkt_fil_count )
12482 tf = proto_tree_add_text(tree,
12483 tvb, curr_offset, 1,
12484 "Packet filter %d",count); /* 0-> 7 */
12486 tf_tree = proto_item_add_subtree(tf, ett_sm_tft );
12488 if ( op_code == 5 ) /* Delete packet filters from existing TFT - just a list of identifiers */
12491 if ((curr_offset-offset)<1) {
12492 proto_tree_add_text(tf_tree,tvb, curr_offset, 1,"Not enough data");
12493 return(curr_offset-offset);
12495 oct = tvb_get_guint8(tvb, curr_offset);
12499 proto_tree_add_text(tf_tree,
12500 tvb, curr_offset-1, 1,
12501 "Packet filter identifier: 0x%02x (%u)",oct,oct );
12503 else /* create new, Add packet filters or Replace packet filters */
12506 if ((curr_offset-offset)<1) {
12507 proto_tree_add_text(tf_tree,tvb, curr_offset, 1,"Not enough data");
12508 return(curr_offset-offset);
12510 pf_identifier = tvb_get_guint8(tvb, curr_offset);
12514 proto_tree_add_text(tf_tree,
12515 tvb, curr_offset-1, 1,
12516 "Packet filter identifier: %u (%u)",pf_identifier, pf_identifier);
12518 if ((curr_offset-offset)<1) {
12519 proto_tree_add_text(tf_tree,tvb, curr_offset, 1,"Not enough data");
12520 return(curr_offset-offset);
12522 oct = tvb_get_guint8(tvb, curr_offset);
12526 proto_tree_add_text(tf_tree,
12527 tvb, curr_offset-1, 1,
12528 "Packet evaluation precedence: 0x%02x (%u)",oct,oct );
12530 if ((curr_offset-offset)<1) { proto_tree_add_text(tf_tree,tvb, curr_offset, 1,"Not enough data"); return(curr_offset-offset);}
12531 pf_length = tvb_get_guint8(tvb, curr_offset);
12535 proto_tree_add_text(tf_tree,
12536 tvb, curr_offset-1, 1,
12537 "Packet filter length: 0x%02x (%u)",pf_length,pf_length );
12538 /* New tree for component */
12540 /* Dissect Packet filter Component */
12541 /* while ( filter_len > 1 ) */
12542 /* packet filter component type identifier: */
12544 if (pf_length > 0 ){
12545 if ((curr_offset-offset)<1) {
12546 proto_tree_add_text(tf_tree,tvb, curr_offset, 1,"Not enough data");
12547 return(curr_offset-offset);
12549 pack_component_type = tvb_get_guint8(tvb, curr_offset);
12553 tf=proto_tree_add_text(tf_tree,tvb, curr_offset-1, 1,"Packet filter component type identifier: ");
12554 comp_tree = proto_item_add_subtree(tf, ett_sm_tft );
12556 switch ( pack_component_type ){
12559 str="IPv4 source address type";
12560 proto_tree_add_item(comp_tree,hf_gsm_a_tft_ip4_address,tvb,curr_offset,4,FALSE);
12563 proto_tree_add_item(comp_tree,hf_gsm_a_tft_ip4_mask,tvb,curr_offset,4,FALSE);
12570 str="IPv6 source address type";
12571 proto_tree_add_item(comp_tree,hf_gsm_a_tft_ip6_address,tvb,curr_offset,16,FALSE);
12574 proto_tree_add_item(comp_tree,hf_gsm_a_tft_ip6_mask,tvb,curr_offset,16,FALSE);
12580 str="Protocol identifier/Next header type";
12581 proto_tree_add_item(comp_tree,hf_gsm_a_tft_protocol_header,tvb,curr_offset,1,FALSE);
12587 str="Single destination port type";
12588 proto_tree_add_item(comp_tree,hf_gsm_a_tft_port,tvb,curr_offset,2,FALSE);
12593 str="Destination port range type";
12594 proto_tree_add_item(comp_tree,hf_gsm_a_tft_port_low,tvb,curr_offset,2,FALSE);
12595 proto_tree_add_item(comp_tree,hf_gsm_a_tft_port_high,tvb,curr_offset,2,FALSE);
12601 str="Single source port type";
12602 proto_tree_add_item(comp_tree,hf_gsm_a_tft_port,tvb,curr_offset,2,FALSE);
12608 str="Source port range type";
12609 proto_tree_add_item(comp_tree,hf_gsm_a_tft_port_low,tvb,curr_offset,2,FALSE);
12610 proto_tree_add_item(comp_tree,hf_gsm_a_tft_port_high,tvb,curr_offset,2,FALSE);
12616 str="Security parameter index type";
12617 proto_tree_add_item(comp_tree,hf_gsm_a_tft_security,tvb,curr_offset,4,FALSE);
12624 str="Type of service/Traffic class type";
12625 proto_tree_add_item(comp_tree,hf_gsm_a_qos_traffic_cls,tvb,curr_offset,1,FALSE);
12626 proto_tree_add_item(comp_tree,hf_gsm_a_tft_traffic_mask,tvb,curr_offset,1,FALSE);
12632 str="Flow label type";
12633 proto_tree_add_item(comp_tree,hf_gsm_a_tft_traffic_mask,tvb,curr_offset,1,FALSE);
12639 str="not specified";
12641 proto_item_append_text(tf, "(%u) %s", pack_component_type, str );
12648 /* The parameters list contains a variable number of parameters that might need to be
12649 * transferred in addition to the packet filters. If the parameters list is included, the E
12650 * bit is set to 1; otherwise, the E bit is set to 0.
12653 proto_tree_add_text(tf_tree, tvb, curr_offset, 1, "Note: Possible Authorizaton Token/Flow Identifier not decoded yet");
12655 return(curr_offset - offset);
12658 static guint8 (*bssmap_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len) = {
12659 be_cic, /* Circuit Identity Code */
12660 NULL, /* Reserved */
12661 NULL, /* Resource Available */
12662 be_cause, /* Cause */
12663 be_cell_id, /* Cell Identifier */
12664 be_prio, /* Priority */
12665 be_l3_header_info, /* Layer 3 Header Information */
12667 be_tmsi, /* TMSI */
12668 be_enc_info, /* Encryption Information */
12669 be_chan_type, /* Channel Type */
12670 NULL, /* Periodicity */
12671 NULL, /* Extended Resource Indicator */
12672 NULL, /* Number Of MSs */
12673 NULL, /* Reserved */
12674 NULL, /* Reserved */
12675 NULL, /* Reserved */
12676 de_ms_cm_2, /* Classmark Information Type 2 */
12677 NULL, /* Classmark Information Type 3 */
12678 NULL, /* Interference Band To Be Used */
12679 de_rr_cause, /* RR Cause */
12680 NULL, /* Reserved */
12681 be_l3_info, /* Layer 3 Information */
12682 be_dlci, /* DLCI */
12683 be_down_dtx_flag, /* Downlink DTX Flag */
12684 be_cell_id_list, /* Cell Identifier List */
12685 NULL /* no associated data */, /* Response Request */
12686 NULL, /* Resource Indication Method */
12687 de_ms_cm_1, /* Classmark Information Type 1 */
12688 NULL, /* Circuit Identity Code List */
12689 NULL, /* Diagnostic */
12690 be_l3_msg, /* Layer 3 Message Contents */
12691 be_chosen_chan, /* Chosen Channel */
12692 NULL, /* Total Resource Accessible */
12693 be_ciph_resp_mode, /* Cipher Response Mode */
12694 be_cha_needed, /* Channel Needed */
12695 NULL, /* Trace Type */
12696 NULL, /* TriggerID */
12697 NULL, /* Trace Reference */
12698 NULL, /* TransactionID */
12699 de_mid, /* Mobile Identity */
12701 be_for_ind, /* Forward Indicator */
12702 be_chosen_enc_alg, /* Chosen Encryption Algorithm */
12703 be_cct_pool, /* Circuit Pool */
12704 NULL, /* Circuit Pool List */
12705 NULL, /* Time Indication */
12706 NULL, /* Resource Situation */
12707 be_curr_chan_1, /* Current Channel Type 1 */
12708 be_que_ind, /* Queueing Indicator */
12709 be_speech_ver, /* Speech Version */
12710 NULL, /* Assignment Requirement */
12711 NULL /* no associated data */, /* Talker Flag */
12712 NULL /* no associated data */, /* Connection Release Requested */
12713 NULL, /* Group Call Reference */
12714 NULL, /* eMLPP Priority */
12715 NULL, /* Configuration Evolution Indication */
12716 NULL /* no decode required */, /* Old BSS to New BSS Information */
12717 NULL, /* LSA Identifier */
12718 NULL, /* LSA Identifier List */
12719 NULL, /* LSA Information */
12720 NULL, /* LCS QoS */
12721 NULL, /* LSA access control suppression */
12722 NULL, /* LCS Priority */
12723 NULL, /* Location Type */
12724 NULL, /* Location Estimate */
12725 NULL, /* Positioning Data */
12726 NULL, /* LCS Cause */
12727 NULL, /* LCS Client Type */
12728 be_apdu, /* APDU */
12729 NULL, /* Network Element Identity */
12730 NULL, /* GPS Assistance Data */
12731 NULL, /* Deciphering Keys */
12732 NULL, /* Return Error Request */
12733 NULL, /* Return Error Cause */
12734 NULL, /* Segmentation */
12738 static guint8 (*dtap_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len) = {
12739 /* Common Information Elements 10.5.1 */
12740 de_cell_id, /* Cell Identity */
12741 NULL /* handled inline */, /* Ciphering Key Sequence Number */
12742 de_lai, /* Location Area Identification */
12743 de_mid, /* Mobile Identity */
12744 de_ms_cm_1, /* Mobile Station Classmark 1 */
12745 de_ms_cm_2, /* Mobile Station Classmark 2 */
12746 NULL, /* Mobile Station Classmark 3 */
12747 de_d_gb_call_ref, /* Descriptive group or broadcast call reference */
12748 NULL /* handled inline */, /* Group Cipher Key Number */
12749 de_pd_sapi, /* PD and SAPI $(CCBS)$ */
12751 de_prio /* handled inline */, /* Priority Level */
12752 de_plmn_list, /* PLMN List */
12753 /* Radio Resource Management Information Elements 10.5.2, most are from 10.5.1 */
12755 * [3] 10.5.2.1a BA Range
12757 de_rr_cell_ch_dsc, /* [3] 10.5.2.1b Cell Channel Description */
12758 /* [3] 10.5.2.1c BA List Pref
12759 * [3] 10.5.2.1d UTRAN Frequency List
12760 * [3] 10.5.2.1e Cell selection indicator after release of all TCH and SDCCH IE
12762 de_rr_cell_dsc, /* 10.5.2.2 RR Cell Description */
12764 * [3] 10.5.2.3 Cell Options (BCCH)
12765 * [3] 10.5.2.3a Cell Options (SACCH)
12766 * [3] 10.5.2.4 Cell Selection Parameters
12767 * [3] 10.5.2.4a (void)
12769 de_rr_ch_dsc, /* [3] 10.5.2.5 Channel Description */
12770 de_rr_ch_dsc2, /* [3] 10.5.2.5a RR Channel Description 2 */
12771 de_rr_ch_mode, /* [3] 10.5.2.6 Channel Mode */
12772 de_rr_ch_mode2, /* [3] 10.5.2.7 Channel Mode 2 */
12774 * [3] 10.5.2.7a UTRAN predefined configuration status information / START-CS / UE CapabilityUTRAN Classmark information element 218
12775 * [3] 10.5.2.7b (void) */
12777 de_rr_cm_enq_mask, /* [3] 10.5.2.7c Classmark Enquiry Mask */
12778 /* [3] 10.5.2.7d GERAN Iu Mode Classmark information element */
12779 de_rr_chnl_needed, /* [3] 10.5.2.8 Channel Needed
12780 * [3] 10.5.2.8a (void)
12781 * [3] 10.5.2.8b Channel Request Description 2 */
12783 de_rr_cip_mode_set, /* [3] 10.5.2.9 Cipher Mode Setting */
12784 /* [3] 10.5.2.10 Cipher Response
12785 * [3] 10.5.2.11 Control Channel Description
12786 * [3] 10.5.2.11a DTM Information Details */
12787 de_rr_dyn_arfcn_map, /* [3] 10.5.2.11b Dynamic ARFCN Mapping */
12788 de_rr_freq_ch_seq, /* [3] 10.5.2.12 Frequency Channel Sequence */
12789 de_rr_freq_list, /* [3] 10.5.2.13 Frequency List */
12790 de_rr_freq_short_list, /* [3] 10.5.2.14 Frequency Short List */
12791 de_rr_freq_short_list2, /* [3] 10.5.2.14a Frequency Short List 2 */
12792 /* [3] 10.5.2.14b Group Channel Description
12793 * [3] 10.5.2.14c GPRS Resumption
12794 * [3] 10.5.2.14d GPRS broadcast information
12795 * [3] 10.5.2.14e Enhanced DTM CS Release Indication
12797 de_rr_ho_ref, /* 10.5.2.15 Handover Reference */
12799 * [3] 10.5.2.16 IA Rest Octets
12800 * [3] 10.5.2.17 IAR Rest Octets
12801 * [3] 10.5.2.18 IAX Rest Octets
12802 * [3] 10.5.2.19 L2 Pseudo Length
12803 * [3] 10.5.2.20 Measurement Results
12804 * [3] 10.5.2.20a GPRS Measurement Results
12806 de_rr_mob_all, /* [3] 10.5.2.21 Mobile Allocation */
12807 de_rr_mob_time_diff, /* [3] 10.5.2.21a Mobile Time Difference */
12808 de_rr_multirate_conf, /* [3] 10.5.2.21aa MultiRate configuration */
12810 de_rr_mult_all, /* [3] 10.5.2.21b Multislot Allocation */
12812 * [3] 10.5.2.21c NC mode
12813 * [3] 10.5.2.22 Neighbour Cell Description
12814 * [3] 10.5.2.22a Neighbour Cell Description 2
12815 * [3] 10.5.2.22b (void)
12816 * [3] 10.5.2.22c NT/N Rest Octets
12817 * [3] 10.5.2.23 P1 Rest Octets
12818 * [3] 10.5.2.24 P2 Rest Octets
12819 * [3] 10.5.2.25 P3 Rest Octets
12820 * [3] 10.5.2.25a Packet Channel Description
12821 * [3] 10.5.2.25b Dedicated mode or TBF
12822 * [3] 10.5.2.25c RR Packet Uplink Assignment
12823 * [3] 10.5.2.25d RR Packet Downlink Assignment
12824 * [3] 10.5.2.26 Page Mode
12825 * [3] 10.5.2.26a (void)
12826 * [3] 10.5.2.26b (void)
12827 * [3] 10.5.2.26c (void)
12828 * [3] 10.5.2.26d (void)
12829 * [3] 10.5.2.27 NCC Permitted
12831 de_rr_pow_cmd, /* 10.5.2.28 Power Command */
12832 de_rr_pow_cmd_and_acc_type, /* 10.5.2.28a Power Command and access type */
12834 * [3] 10.5.2.29 RACH Control Parameters
12835 * [3] 10.5.2.30 Request Reference
12837 de_rr_cause, /* 10.5.2.31 RR Cause */
12838 de_rr_sync_ind, /* 10.5.2.39 Synchronization Indication */
12839 /* [3] 10.5.2.32 SI 1 Rest Octets
12840 * [3] 10.5.2.33 SI 2bis Rest Octets
12841 * [3] 10.5.2.33a SI 2ter Rest Octets
12842 * [3] 10.5.2.33b SI 2quater Rest Octets
12843 * [3] 10.5.2.34 SI 3 Rest Octets
12844 * [3] 10.5.2.35 SI 4 Rest Octets
12845 * [3] 10.5.2.35a SI 6 Rest Octets
12846 * [3] 10.5.2.36 SI 7 Rest Octets
12847 * [3] 10.5.2.37 SI 8 Rest Octets
12848 * [3] 10.5.2.37a SI 9 Rest Octets
12849 * [3] 10.5.2.37b SI 13 Rest Octets
12850 * [3] 10.5.2.37c (void)
12851 * [3] 10.5.2.37d (void)
12852 * [3] 10.5.2.37e SI 16 Rest Octets
12853 * [3] 10.5.2.37f SI 17 Rest Octets
12854 * [3] 10.5.2.37g SI 19 Rest Octets
12855 * [3] 10.5.2.37h SI 18 Rest Octets
12856 * [3] 10.5.2.37i SI 20 Rest Octets */
12857 de_rr_starting_time, /* [3] 10.5.2.38 Starting Time */
12858 de_rr_timing_adv, /* [3] 10.5.2.40 Timing Advance */
12859 de_rr_time_diff, /* [3] 10.5.2.41 Time Difference */
12860 de_rr_tlli, /* [3] 10.5.2.41a TLLI */
12862 * [3] 10.5.2.42 TMSI/P-TMSI */
12863 de_rr_vgcs_tar_mode_ind, /* [3] 10.5.2.42a VGCS target mode Indication */
12865 de_rr_vgcs_cip_par, /* [3] 10.5.2.42b VGCS Ciphering Parameters */
12866 /* [3] 10.5.2.43 Wait Indication
12867 * [3] 10.5.2.44 SI10 rest octets $(ASCI)$
12868 * [3] 10.5.2.45 EXTENDED MEASUREMENT RESULTS
12869 * [3] 10.5.2.46 Extended Measurement Frequency List */
12870 de_rr_sus_cau, /* [3] 10.5.2.47 Suspension Cause */
12871 /* [3] 10.5.2.48 APDU ID
12872 * [3] 10.5.2.49 APDU Flags
12873 * [3] 10.5.2.50 APDU Data
12874 * [3] 10.5.2.51 Handover To UTRAN Command
12875 * [3] 10.5.2.52 Handover To cdma2000 Command
12876 * [3] 10.5.2.53 (void)
12877 * [3] 10.5.2.54 (void)
12878 * [3] 10.5.2.55 (void)
12879 * [3] 10.5.2.56 3G Target Cell
12881 de_rr_ded_serv_inf, /* [3] 10.5.2.59 Dedicated Service Information */
12883 /* Mobility Management Information Elements 10.5.3 */
12884 de_auth_param_rand, /* Authentication Parameter RAND */
12885 de_auth_param_autn, /* Authentication Parameter AUTN (UMTS authentication challenge only) */
12886 de_auth_resp_param, /* Authentication Response Parameter */
12887 de_auth_resp_param_ext, /* Authentication Response Parameter (extension) (UMTS authentication challenge only) */
12888 de_auth_fail_param, /* Authentication Failure Parameter (UMTS authentication challenge only) */
12889 NULL /* handled inline */, /* CM Service Type */
12890 NULL /* handled inline */, /* Identity Type */
12892 NULL /* handled inline */, /* Location Updating Type */
12893 de_network_name, /* Network Name */
12894 de_rej_cause, /* Reject Cause */
12895 NULL /* no associated data */, /* Follow-on Proceed */
12896 de_time_zone, /* Time Zone */
12897 de_time_zone_time, /* Time Zone and Time */
12898 NULL /* no associated data */, /* CTS Permission */
12899 de_lsa_id, /* LSA Identifier */
12900 de_day_saving_time, /* Daylight Saving Time */
12901 NULL, /* Emergency Number List */
12902 /* Call Control Information Elements 10.5.4 */
12904 de_aux_states, /* Auxiliary States */
12905 de_bearer_cap, /* Bearer Capability */
12906 de_cc_cap, /* Call Control Capabilities */
12907 de_call_state, /* Call State */
12908 de_cld_party_bcd_num, /* Called Party BCD Number */
12909 de_cld_party_sub_addr, /* Called Party Subaddress */
12910 de_clg_party_bcd_num, /* Calling Party BCD Number */
12911 de_clg_party_sub_addr, /* Calling Party Subaddress */
12912 de_cause, /* Cause */
12913 NULL /* no associated data */, /* CLIR Suppression */
12914 NULL /* no associated data */, /* CLIR Invocation */
12915 NULL /* handled inline */, /* Congestion Level */
12916 NULL, /* Connected Number */
12917 NULL, /* Connected Subaddress */
12918 de_facility, /* Facility */
12919 NULL, /* High Layer Compatibility */
12920 de_keypad_facility, /* Keypad Facility */
12921 de_llc, /* 10.5.4.18 Low layer compatibility */
12922 NULL, /* More Data */
12923 NULL, /* Notification Indicator */
12924 de_prog_ind, /* Progress Indicator */
12925 NULL, /* Recall type $(CCBS)$ */
12926 NULL, /* Redirecting Party BCD Number */
12927 NULL, /* Redirecting Party Subaddress */
12928 de_repeat_ind, /* Repeat Indicator */
12929 NULL /* no associated data */, /* Reverse Call Setup Direction */
12930 NULL, /* SETUP Container $(CCBS)$ */
12932 de_ss_ver_ind, /* SS Version Indicator */
12933 NULL, /* User-user */
12934 NULL, /* Alerting Pattern $(NIA)$ */
12935 NULL, /* Allowed Actions $(CCBS)$ */
12936 NULL, /* Stream Identifier */
12937 NULL, /* Network Call Control Capabilities */
12938 NULL, /* Cause of No CLI */
12939 NULL, /* Immediate Modification Indicator */
12940 NULL, /* Supported Codec List */
12941 NULL, /* Service Category */
12942 /* GPRS Mobility Management Information Elements 10.5.5 */
12943 de_gmm_attach_res, /* Attach Result */
12944 de_gmm_attach_type, /* Attach Type */
12945 de_gmm_ciph_alg, /* Cipher Algorithm */
12946 de_gmm_tmsi_stat, /* TMSI Status */
12947 de_gmm_detach_type, /* Detach Type */
12948 de_gmm_drx_param, /* DRX Parameter */
12949 de_gmm_ftostby, /* Force to Standby */
12950 de_gmm_ftostby_h, /* Force to Standby - Info is in the high nibble */
12951 de_gmm_ptmsi_sig, /* P-TMSI Signature */
12952 de_gmm_ptmsi_sig2, /* P-TMSI Signature 2 */
12953 de_gmm_ident_type2, /* Identity Type 2 */
12954 de_gmm_imeisv_req, /* IMEISV Request */
12955 de_gmm_rec_npdu_lst, /* Receive N-PDU Numbers List */
12956 de_gmm_ms_net_cap, /* MS Network Capability */
12957 de_gmm_ms_radio_acc_cap, /* MS Radio Access Capability */
12958 de_gmm_cause, /* GMM Cause */
12959 de_gmm_rai, /* Routing Area Identification */
12960 de_gmm_update_res, /* Update Result */
12961 de_gmm_update_type, /* Update Type */
12962 de_gmm_ac_ref_nr, /* A&C Reference Number */
12963 de_gmm_ac_ref_nr_h, /* A&C Reference Numer - Info is in the high nibble */
12964 de_gmm_service_type, /* Service Type */
12965 de_gmm_cell_notfi, /* Cell Notification */
12966 de_gmm_ps_lcs_cap, /* PS LCS Capability */
12967 de_gmm_net_feat_supp, /* Network Feature Support */
12968 de_gmm_rat_info_container, /* Inter RAT information container */
12969 /* Short Message Service Information Elements [5] 8.1.4 */
12970 de_cp_user_data, /* CP-User Data */
12971 de_cp_cause, /* CP-Cause */
12972 /* Short Message Service Information Elements [5] 8.2 */
12973 de_rp_message_ref, /* RP-Message Reference */
12974 de_rp_orig_addr, /* RP-Origination Address */
12975 de_rp_dest_addr, /* RP-Destination Address */
12976 de_rp_user_data, /* RP-User Data */
12977 de_rp_cause, /* RP-Cause */
12978 /* Session Management Information Elements 10.5.6 */
12979 de_sm_apn, /* Access Point Name */
12980 de_sm_nsapi, /* Network Service Access Point Identifier */
12981 de_sm_pco, /* Protocol Configuration Options */
12982 de_sm_pdp_addr, /* Packet Data Protocol Address */
12983 de_sm_qos, /* Quality Of Service */
12984 de_sm_cause, /* SM Cause */
12985 de_sm_linked_ti, /* Linked TI */
12986 de_sm_sapi, /* LLC Service Access Point Identifier */
12987 de_sm_tear_down, /* Tear Down Indicator */
12988 de_sm_pflow_id, /* Packet Flow Identifier */
12989 de_sm_tflow_temp, /* Traffic Flow Template */
12990 /* GPRS Common Information Elements 10.5.7 */
12991 de_gc_context_stat, /* PDP Context Status */
12992 de_gc_radio_prio, /* Radio Priority */
12993 de_gc_timer, /* GPRS Timer */
12994 de_gc_timer2, /* GPRS Timer 2 */
12995 de_gc_radio_prio2, /* Radio Priority 2 */
12996 de_gc_mbms_context_stat, /* 10.5.7.6 MBMS context status */
12997 de_gc_spare, /* Spare Nibble */
13001 #define SET_ELEM_VARS(SEV_pdu_type, SEV_elem_names, SEV_elem_ett, SEV_elem_funcs) \
13002 switch (SEV_pdu_type) \
13004 case BSSAP_PDU_TYPE_BSSMAP: \
13005 SEV_elem_names = gsm_bssmap_elem_strings; \
13006 SEV_elem_ett = ett_gsm_bssmap_elem; \
13007 SEV_elem_funcs = bssmap_elem_fcn; \
13009 case BSSAP_PDU_TYPE_DTAP: \
13010 SEV_elem_names = gsm_dtap_elem_strings; \
13011 SEV_elem_ett = ett_gsm_dtap_elem; \
13012 SEV_elem_funcs = dtap_elem_fcn; \
13015 proto_tree_add_text(tree, \
13016 tvb, curr_offset, -1, \
13017 "Unknown PDU type (%u)", SEV_pdu_type); \
13018 return(consumed); \
13022 * Type Length Value (TLV) element dissector
13025 elem_tlv(tvbuff_t *tvb, proto_tree *tree, guint8 iei, gint pdu_type, int idx, guint32 offset, guint len, const gchar *name_add)
13027 guint8 oct, parm_len;
13029 guint32 curr_offset;
13030 proto_tree *subtree;
13032 const value_string *elem_names;
13034 guint8 (**elem_funcs)(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
13037 curr_offset = offset;
13040 SET_ELEM_VARS(pdu_type, elem_names, elem_ett, elem_funcs);
13042 oct = tvb_get_guint8(tvb, curr_offset);
13046 parm_len = tvb_get_guint8(tvb, curr_offset + 1);
13049 proto_tree_add_text(tree,
13050 tvb, curr_offset, parm_len + 2,
13052 elem_names[idx].strptr,
13053 (name_add == NULL) || (name_add[0] == '\0') ? "" : name_add);
13055 subtree = proto_item_add_subtree(item, elem_ett[idx]);
13057 proto_tree_add_uint(subtree,
13058 (BSSAP_PDU_TYPE_BSSMAP == pdu_type) ? hf_gsm_a_bssmap_elem_id : hf_gsm_a_dtap_elem_id, tvb,
13059 curr_offset, 1, oct);
13061 proto_tree_add_uint(subtree, hf_gsm_a_length, tvb,
13062 curr_offset + 1, 1, parm_len);
13066 if (elem_funcs[idx] == NULL)
13068 proto_tree_add_text(subtree,
13069 tvb, curr_offset + 2, parm_len,
13072 consumed = parm_len;
13076 gchar *a_add_string;
13078 a_add_string=ep_alloc(1024);
13079 a_add_string[0] = '\0';
13081 (*elem_funcs[idx])(tvb, subtree, curr_offset + 2,
13082 parm_len, a_add_string, 1024);
13084 if (a_add_string[0] != '\0')
13086 proto_item_append_text(item, "%s", a_add_string);
13098 * Type Value (TV) element dissector
13100 * Length cannot be used in these functions, big problem if a element dissector
13101 * is not defined for these.
13104 elem_tv(tvbuff_t *tvb, proto_tree *tree, guint8 iei, gint pdu_type, int idx, guint32 offset, const gchar *name_add)
13108 guint32 curr_offset;
13109 proto_tree *subtree;
13111 const value_string *elem_names;
13113 guint8 (**elem_funcs)(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
13115 curr_offset = offset;
13118 SET_ELEM_VARS(pdu_type, elem_names, elem_ett, elem_funcs);
13120 oct = tvb_get_guint8(tvb, curr_offset);
13125 proto_tree_add_text(tree,
13126 tvb, curr_offset, -1,
13128 elem_names[idx].strptr,
13129 (name_add == NULL) || (name_add[0] == '\0') ? "" : name_add);
13131 subtree = proto_item_add_subtree(item, elem_ett[idx]);
13133 proto_tree_add_uint(subtree,
13134 (BSSAP_PDU_TYPE_BSSMAP == pdu_type) ? hf_gsm_a_bssmap_elem_id : hf_gsm_a_dtap_elem_id, tvb,
13135 curr_offset, 1, oct);
13137 if (elem_funcs[idx] == NULL)
13139 /* BAD THING, CANNOT DETERMINE LENGTH */
13141 proto_tree_add_text(subtree,
13142 tvb, curr_offset + 1, 1,
13143 "No element dissector, rest of dissection may be incorrect");
13149 gchar *a_add_string;
13151 a_add_string=ep_alloc(1024);
13152 a_add_string[0] = '\0';
13153 consumed = (*elem_funcs[idx])(tvb, subtree, curr_offset + 1, -1, a_add_string, 1024);
13155 if (a_add_string[0] != '\0')
13157 proto_item_append_text(item, "%s", a_add_string);
13163 proto_item_set_len(item, consumed);
13170 * Type Value (TV) element dissector
13171 * Where top half nibble is IEI and bottom half nibble is value.
13173 * Length cannot be used in these functions, big problem if a element dissector
13174 * is not defined for these.
13177 elem_tv_short(tvbuff_t *tvb, proto_tree *tree, guint8 iei, gint pdu_type, int idx, guint32 offset, const gchar *name_add)
13181 guint32 curr_offset;
13182 proto_tree *subtree;
13184 const value_string *elem_names;
13186 guint8 (**elem_funcs)(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
13188 curr_offset = offset;
13191 SET_ELEM_VARS(pdu_type, elem_names, elem_ett, elem_funcs);
13193 oct = tvb_get_guint8(tvb, curr_offset);
13195 if ((oct & 0xf0) == (iei & 0xf0))
13198 proto_tree_add_text(tree,
13199 tvb, curr_offset, -1,
13201 elem_names[idx].strptr,
13202 (name_add == NULL) || (name_add[0] == '\0') ? "" : name_add);
13204 subtree = proto_item_add_subtree(item, elem_ett[idx]);
13206 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
13207 proto_tree_add_text(subtree,
13208 tvb, curr_offset, 1,
13212 if (elem_funcs[idx] == NULL)
13214 /* BAD THING, CANNOT DETERMINE LENGTH */
13216 proto_tree_add_text(subtree,
13217 tvb, curr_offset, 1,
13218 "No element dissector, rest of dissection may be incorrect");
13224 gchar *a_add_string;
13226 a_add_string=ep_alloc(1024);
13227 a_add_string[0] = '\0';
13228 consumed = (*elem_funcs[idx])(tvb, subtree, curr_offset, -1, a_add_string, 1024);
13230 if (a_add_string[0] != '\0')
13232 proto_item_append_text(item, "%s", a_add_string);
13236 proto_item_set_len(item, consumed);
13243 * Type (T) element dissector
13246 elem_t(tvbuff_t *tvb, proto_tree *tree, guint8 iei, gint pdu_type, int idx, guint32 offset, const gchar *name_add)
13249 guint32 curr_offset;
13251 const value_string *elem_names;
13253 guint8 (**elem_funcs)(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
13255 curr_offset = offset;
13258 SET_ELEM_VARS(pdu_type, elem_names, elem_ett, elem_funcs);
13260 oct = tvb_get_guint8(tvb, curr_offset);
13264 proto_tree_add_uint_format(tree,
13265 (BSSAP_PDU_TYPE_BSSMAP == pdu_type) ? hf_gsm_a_bssmap_elem_id : hf_gsm_a_dtap_elem_id, tvb,
13266 curr_offset, 1, oct,
13268 elem_names[idx].strptr,
13269 (name_add == NULL) || (name_add[0] == '\0') ? "" : name_add);
13278 * Length Value (LV) element dissector
13281 elem_lv(tvbuff_t *tvb, proto_tree *tree, gint pdu_type, int idx, guint32 offset, guint len, const gchar *name_add)
13285 guint32 curr_offset;
13286 proto_tree *subtree;
13288 const value_string *elem_names;
13290 guint8 (**elem_funcs)(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
13293 curr_offset = offset;
13296 SET_ELEM_VARS(pdu_type, elem_names, elem_ett, elem_funcs);
13298 parm_len = tvb_get_guint8(tvb, curr_offset);
13301 proto_tree_add_text(tree,
13302 tvb, curr_offset, parm_len + 1,
13304 elem_names[idx].strptr,
13305 (name_add == NULL) || (name_add[0] == '\0') ? "" : name_add);
13307 subtree = proto_item_add_subtree(item, elem_ett[idx]);
13309 proto_tree_add_uint(subtree, hf_gsm_a_length, tvb,
13310 curr_offset, 1, parm_len);
13314 if (elem_funcs[idx] == NULL)
13316 proto_tree_add_text(subtree,
13317 tvb, curr_offset + 1, parm_len,
13320 consumed = parm_len;
13324 gchar *a_add_string;
13326 a_add_string=ep_alloc(1024);
13327 a_add_string[0] = '\0';
13329 (*elem_funcs[idx])(tvb, subtree, curr_offset + 1,
13330 parm_len, a_add_string, 1024);
13332 if (a_add_string[0] != '\0')
13334 proto_item_append_text(item, "%s", a_add_string);
13339 return(consumed + 1);
13343 * Value (V) element dissector
13345 * Length cannot be used in these functions, big problem if a element dissector
13346 * is not defined for these.
13349 elem_v(tvbuff_t *tvb, proto_tree *tree, gint pdu_type, int idx, guint32 offset)
13352 guint32 curr_offset;
13353 const value_string *elem_names;
13355 guint8 (**elem_funcs)(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
13357 curr_offset = offset;
13360 SET_ELEM_VARS(pdu_type, elem_names, elem_ett, elem_funcs);
13362 if (elem_funcs[idx] == NULL)
13364 /* BAD THING, CANNOT DETERMINE LENGTH */
13366 proto_tree_add_text(tree,
13367 tvb, curr_offset, 1,
13368 "No element dissector, rest of dissection may be incorrect");
13374 gchar *a_add_string;
13376 a_add_string=ep_alloc(1024);
13377 a_add_string[0] = '\0';
13378 consumed = (*elem_funcs[idx])(tvb, tree, curr_offset, -1, a_add_string, 1024);
13384 #define ELEM_MAND_TLV(EMT_iei, EMT_pdu_type, EMT_elem_idx, EMT_elem_name_addition) \
13386 if ((consumed = elem_tlv(tvb, tree, (guint8) EMT_iei, EMT_pdu_type, EMT_elem_idx, curr_offset, curr_len, EMT_elem_name_addition)) > 0) \
13388 curr_offset += consumed; \
13389 curr_len -= consumed; \
13393 proto_tree_add_text(tree, \
13394 tvb, curr_offset, 0, \
13395 "Missing Mandatory element (0x%02x) %s%s, rest of dissection is suspect", \
13397 (EMT_pdu_type == BSSAP_PDU_TYPE_BSSMAP) ? \
13398 gsm_bssmap_elem_strings[EMT_elem_idx].strptr : gsm_dtap_elem_strings[EMT_elem_idx].strptr, \
13399 (EMT_elem_name_addition == NULL) || (EMT_elem_name_addition[0] == '\0') ? "" : EMT_elem_name_addition \
13402 if (curr_len <= 0) return; \
13405 #define ELEM_OPT_TLV(EOT_iei, EOT_pdu_type, EOT_elem_idx, EOT_elem_name_addition) \
13407 if ((consumed = elem_tlv(tvb, tree, (guint8) EOT_iei, EOT_pdu_type, EOT_elem_idx, curr_offset, curr_len, EOT_elem_name_addition)) > 0) \
13409 curr_offset += consumed; \
13410 curr_len -= consumed; \
13412 if (curr_len <= 0) return; \
13415 #define ELEM_MAND_TV(EMT_iei, EMT_pdu_type, EMT_elem_idx, EMT_elem_name_addition) \
13417 if ((consumed = elem_tv(tvb, tree, (guint8) EMT_iei, EMT_pdu_type, EMT_elem_idx, curr_offset, EMT_elem_name_addition)) > 0) \
13419 curr_offset += consumed; \
13420 curr_len -= consumed; \
13424 proto_tree_add_text(tree, \
13425 tvb, curr_offset, 0, \
13426 "Missing Mandatory element (0x%02x) %s%s, rest of dissection is suspect", \
13428 (EMT_pdu_type == BSSAP_PDU_TYPE_BSSMAP) ? \
13429 gsm_bssmap_elem_strings[EMT_elem_idx].strptr : gsm_dtap_elem_strings[EMT_elem_idx].strptr, \
13430 (EMT_elem_name_addition == NULL) || (EMT_elem_name_addition[0] == '\0') ? "" : EMT_elem_name_addition \
13433 if (curr_len <= 0) return; \
13436 #define ELEM_OPT_TV(EOT_iei, EOT_pdu_type, EOT_elem_idx, EOT_elem_name_addition) \
13438 if ((consumed = elem_tv(tvb, tree, (guint8) EOT_iei, EOT_pdu_type, EOT_elem_idx, curr_offset, EOT_elem_name_addition)) > 0) \
13440 curr_offset += consumed; \
13441 curr_len -= consumed; \
13443 if (curr_len <= 0) return; \
13446 #define ELEM_OPT_TV_SHORT(EOT_iei, EOT_pdu_type, EOT_elem_idx, EOT_elem_name_addition) \
13448 if ((consumed = elem_tv_short(tvb, tree, EOT_iei, EOT_pdu_type, EOT_elem_idx, curr_offset, EOT_elem_name_addition)) > 0) \
13450 curr_offset += consumed; \
13451 curr_len -= consumed; \
13453 if (curr_len <= 0) return; \
13456 #define ELEM_OPT_T(EOT_iei, EOT_pdu_type, EOT_elem_idx, EOT_elem_name_addition) \
13458 if ((consumed = elem_t(tvb, tree, (guint8) EOT_iei, EOT_pdu_type, EOT_elem_idx, curr_offset, EOT_elem_name_addition)) > 0) \
13460 curr_offset += consumed; \
13461 curr_len -= consumed; \
13463 if (curr_len <= 0) return; \
13466 #define ELEM_MAND_LV(EML_pdu_type, EML_elem_idx, EML_elem_name_addition) \
13468 if ((consumed = elem_lv(tvb, tree, EML_pdu_type, EML_elem_idx, curr_offset, curr_len, EML_elem_name_addition)) > 0) \
13470 curr_offset += consumed; \
13471 curr_len -= consumed; \
13475 /* Mandatory, but nothing we can do */ \
13477 if (curr_len <= 0) return; \
13480 #define ELEM_MAND_V(EMV_pdu_type, EMV_elem_idx) \
13482 if ((consumed = elem_v(tvb, tree, EMV_pdu_type, EMV_elem_idx, curr_offset)) > 0) \
13484 curr_offset += consumed; \
13485 curr_len -= consumed; \
13489 /* Mandatory, but nothing we can do */ \
13491 if (curr_len <= 0) return; \
13495 /* MESSAGE FUNCTIONS */
13501 bssmap_ass_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
13503 guint32 curr_offset;
13507 curr_offset = offset;
13510 is_uplink = IS_UPLINK_FALSE;
13512 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CHAN_TYPE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CHAN_TYPE, "");
13514 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_L3_HEADER_INFO].value, BSSAP_PDU_TYPE_BSSMAP, BE_L3_HEADER_INFO, "");
13516 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_PRIO].value, BSSAP_PDU_TYPE_BSSMAP, BE_PRIO, "");
13518 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
13520 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_DOWN_DTX_FLAG].value, BSSAP_PDU_TYPE_BSSMAP, BE_DOWN_DTX_FLAG, "");
13522 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_INT_BAND].value, BSSAP_PDU_TYPE_BSSMAP, BE_INT_BAND, "");
13524 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_CM_INFO_2].value, BSSAP_PDU_TYPE_BSSMAP, BE_CM_INFO_2, "");
13526 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_GROUP_CALL_REF].value, BSSAP_PDU_TYPE_BSSMAP, BE_GROUP_CALL_REF, "");
13528 ELEM_OPT_T(gsm_bssmap_elem_strings[BE_TALKER_FLAG].value, BSSAP_PDU_TYPE_BSSMAP, BE_TALKER_FLAG, "");
13530 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_LSA_ACC_CTRL].value, BSSAP_PDU_TYPE_BSSMAP, BE_LSA_ACC_CTRL, "");
13532 EXTRANEOUS_DATA_CHECK(curr_len, 0);
13539 bssmap_ass_complete(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
13541 guint32 curr_offset;
13545 curr_offset = offset;
13548 is_uplink = IS_UPLINK_TRUE;
13550 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_RR_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_RR_CAUSE, "");
13552 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
13554 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_CELL_ID].value, BSSAP_PDU_TYPE_BSSMAP, BE_CELL_ID, "");
13556 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CHOSEN_CHAN].value, BSSAP_PDU_TYPE_BSSMAP, BE_CHOSEN_CHAN, "");
13558 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CHOSEN_ENC_ALG].value, BSSAP_PDU_TYPE_BSSMAP, BE_CHOSEN_ENC_ALG, "");
13560 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CCT_POOL].value, BSSAP_PDU_TYPE_BSSMAP, BE_CCT_POOL, "");
13562 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_SPEECH_VER].value, BSSAP_PDU_TYPE_BSSMAP, BE_SPEECH_VER, " (Chosen)");
13564 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_LSA_ID].value, BSSAP_PDU_TYPE_BSSMAP, BE_LSA_ID, "");
13566 EXTRANEOUS_DATA_CHECK(curr_len, 0);
13573 bssmap_ass_failure(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
13575 guint32 curr_offset;
13579 curr_offset = offset;
13582 is_uplink = IS_UPLINK_TRUE;
13584 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
13586 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_RR_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_RR_CAUSE, "");
13588 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CCT_POOL].value, BSSAP_PDU_TYPE_BSSMAP, BE_CCT_POOL, "");
13590 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_CCT_POOL_LIST].value, BSSAP_PDU_TYPE_BSSMAP, BE_CCT_POOL_LIST, "");
13592 EXTRANEOUS_DATA_CHECK(curr_len, 0);
13599 bssmap_block(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
13601 guint32 curr_offset;
13605 curr_offset = offset;
13608 is_uplink = IS_UPLINK_TRUE;
13610 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
13612 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
13614 ELEM_OPT_T(gsm_bssmap_elem_strings[BE_CONN_REL_REQ].value, BSSAP_PDU_TYPE_BSSMAP, BE_CONN_REL_REQ, "");
13616 EXTRANEOUS_DATA_CHECK(curr_len, 0);
13623 bssmap_block_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
13625 guint32 curr_offset;
13629 curr_offset = offset;
13632 is_uplink = IS_UPLINK_TRUE;
13634 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
13636 EXTRANEOUS_DATA_CHECK(curr_len, 0);
13643 bssmap_unblock(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
13645 guint32 curr_offset;
13649 curr_offset = offset;
13652 is_uplink = IS_UPLINK_TRUE;
13654 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
13656 ELEM_OPT_T(gsm_bssmap_elem_strings[BE_CONN_REL_REQ].value, BSSAP_PDU_TYPE_BSSMAP, BE_CONN_REL_REQ, "");
13658 EXTRANEOUS_DATA_CHECK(curr_len, 0);
13665 bssmap_unblock_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
13667 guint32 curr_offset;
13671 curr_offset = offset;
13674 is_uplink = IS_UPLINK_TRUE;
13676 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
13678 EXTRANEOUS_DATA_CHECK(curr_len, 0);
13685 bssmap_ho_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
13687 guint32 curr_offset;
13691 curr_offset = offset;
13694 is_uplink = IS_UPLINK_FALSE;
13696 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CHAN_TYPE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CHAN_TYPE, "");
13698 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_ENC_INFO].value, BSSAP_PDU_TYPE_BSSMAP, BE_ENC_INFO, "");
13700 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CM_INFO_1].value, BSSAP_PDU_TYPE_BSSMAP, BE_CM_INFO_1, "");
13702 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_CM_INFO_2].value, BSSAP_PDU_TYPE_BSSMAP, BE_CM_INFO_2, "");
13704 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CELL_ID].value, BSSAP_PDU_TYPE_BSSMAP, BE_CELL_ID, " (Serving)");
13706 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_PRIO].value, BSSAP_PDU_TYPE_BSSMAP, BE_PRIO, "");
13708 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
13710 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_DOWN_DTX_FLAG].value, BSSAP_PDU_TYPE_BSSMAP, BE_DOWN_DTX_FLAG, "");
13712 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CELL_ID].value, BSSAP_PDU_TYPE_BSSMAP, BE_CELL_ID, " (Target)");
13714 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_INT_BAND].value, BSSAP_PDU_TYPE_BSSMAP, BE_INT_BAND, "");
13716 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
13718 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_CM_INFO_3].value, BSSAP_PDU_TYPE_BSSMAP, BE_CM_INFO_3, "");
13720 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CURR_CHAN_1].value, BSSAP_PDU_TYPE_BSSMAP, BE_CURR_CHAN_1, "");
13722 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_SPEECH_VER].value, BSSAP_PDU_TYPE_BSSMAP, BE_SPEECH_VER, " (Used)");
13724 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_GROUP_CALL_REF].value, BSSAP_PDU_TYPE_BSSMAP, BE_GROUP_CALL_REF, "");
13726 ELEM_OPT_T(gsm_bssmap_elem_strings[BE_TALKER_FLAG].value, BSSAP_PDU_TYPE_BSSMAP, BE_TALKER_FLAG, "");
13728 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CONF_EVO_IND].value, BSSAP_PDU_TYPE_BSSMAP, BE_CONF_EVO_IND, "");
13730 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CHOSEN_ENC_ALG].value, BSSAP_PDU_TYPE_BSSMAP, BE_CHOSEN_ENC_ALG, " (Serving)");
13732 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_OLD2NEW_INFO].value, BSSAP_PDU_TYPE_BSSMAP, BE_OLD2NEW_INFO, "");
13734 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_LSA_INFO].value, BSSAP_PDU_TYPE_BSSMAP, BE_LSA_INFO, "");
13736 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_LSA_ACC_CTRL].value, BSSAP_PDU_TYPE_BSSMAP, BE_LSA_ACC_CTRL, "");
13738 EXTRANEOUS_DATA_CHECK(curr_len, 0);
13745 bssmap_ho_reqd(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
13747 guint32 curr_offset;
13751 curr_offset = offset;
13754 is_uplink = IS_UPLINK_TRUE;
13756 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
13758 ELEM_OPT_T(gsm_bssmap_elem_strings[BE_RESP_REQ].value, BSSAP_PDU_TYPE_BSSMAP, BE_RESP_REQ, "");
13760 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CELL_ID_LIST].value, BSSAP_PDU_TYPE_BSSMAP, BE_CELL_ID_LIST, " (Preferred)");
13762 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_CCT_POOL_LIST].value, BSSAP_PDU_TYPE_BSSMAP, BE_CCT_POOL_LIST, "");
13764 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CURR_CHAN_1].value, BSSAP_PDU_TYPE_BSSMAP, BE_CURR_CHAN_1, "");
13766 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_SPEECH_VER].value, BSSAP_PDU_TYPE_BSSMAP, BE_SPEECH_VER, " (Used)");
13768 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_QUE_IND].value, BSSAP_PDU_TYPE_BSSMAP, BE_QUE_IND, "");
13770 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_OLD2NEW_INFO].value, BSSAP_PDU_TYPE_BSSMAP, BE_OLD2NEW_INFO, "");
13772 EXTRANEOUS_DATA_CHECK(curr_len, 0);
13779 bssmap_ho_req_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
13781 guint32 curr_offset;
13785 curr_offset = offset;
13788 is_uplink = IS_UPLINK_TRUE;
13790 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_L3_INFO].value, BSSAP_PDU_TYPE_BSSMAP, BE_L3_INFO, "");
13792 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CHOSEN_CHAN].value, BSSAP_PDU_TYPE_BSSMAP, BE_CHOSEN_CHAN, "");
13794 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CHOSEN_ENC_ALG].value, BSSAP_PDU_TYPE_BSSMAP, BE_CHOSEN_ENC_ALG, "");
13796 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CCT_POOL].value, BSSAP_PDU_TYPE_BSSMAP, BE_CCT_POOL, "");
13798 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_SPEECH_VER].value, BSSAP_PDU_TYPE_BSSMAP, BE_SPEECH_VER, " (Chosen)");
13800 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
13802 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_LSA_ID].value, BSSAP_PDU_TYPE_BSSMAP, BE_LSA_ID, "");
13804 EXTRANEOUS_DATA_CHECK(curr_len, 0);
13811 bssmap_ho_cmd(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
13813 guint32 curr_offset;
13817 curr_offset = offset;
13820 is_uplink = IS_UPLINK_FALSE;
13822 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_L3_INFO].value, BSSAP_PDU_TYPE_BSSMAP, BE_L3_INFO, "");
13824 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_CELL_ID].value, BSSAP_PDU_TYPE_BSSMAP, BE_CELL_ID, "");
13826 EXTRANEOUS_DATA_CHECK(curr_len, 0);
13833 bssmap_ho_complete(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
13835 guint32 curr_offset;
13839 curr_offset = offset;
13842 is_uplink = IS_UPLINK_TRUE;
13844 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_RR_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_RR_CAUSE, "");
13846 EXTRANEOUS_DATA_CHECK(curr_len, 0);
13853 bssmap_ho_cand_enq(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
13855 guint32 curr_offset;
13859 curr_offset = offset;
13862 is_uplink = IS_UPLINK_FALSE;
13864 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_NUM_MS].value, BSSAP_PDU_TYPE_BSSMAP, BE_NUM_MS, "");
13866 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CELL_ID_LIST].value, BSSAP_PDU_TYPE_BSSMAP, BE_CELL_ID_LIST, "");
13868 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CELL_ID].value, BSSAP_PDU_TYPE_BSSMAP, BE_CELL_ID, "");
13870 EXTRANEOUS_DATA_CHECK(curr_len, 0);
13877 bssmap_ho_cand_resp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
13879 guint32 curr_offset;
13883 curr_offset = offset;
13886 is_uplink = IS_UPLINK_TRUE;
13888 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_NUM_MS].value, BSSAP_PDU_TYPE_BSSMAP, BE_NUM_MS, "");
13890 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CELL_ID].value, BSSAP_PDU_TYPE_BSSMAP, BE_CELL_ID, "");
13892 EXTRANEOUS_DATA_CHECK(curr_len, 0);
13899 bssmap_ho_failure(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
13901 guint32 curr_offset;
13905 curr_offset = offset;
13908 is_uplink = IS_UPLINK_TRUE;
13910 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
13912 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_RR_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_RR_CAUSE, "");
13914 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CCT_POOL].value, BSSAP_PDU_TYPE_BSSMAP, BE_CCT_POOL, "");
13916 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_CCT_POOL_LIST].value, BSSAP_PDU_TYPE_BSSMAP, BE_CCT_POOL_LIST, "");
13918 EXTRANEOUS_DATA_CHECK(curr_len, 0);
13925 bssmap_paging(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
13927 guint32 curr_offset;
13931 curr_offset = offset;
13934 is_uplink = IS_UPLINK_FALSE;
13936 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_IMSI].value, BSSAP_PDU_TYPE_BSSMAP, BE_IMSI, "");
13938 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_TMSI].value, BSSAP_PDU_TYPE_BSSMAP, BE_TMSI, "");
13940 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CELL_ID_LIST].value, BSSAP_PDU_TYPE_BSSMAP, BE_CELL_ID_LIST, "");
13942 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CHAN_NEEDED].value, BSSAP_PDU_TYPE_BSSMAP, BE_CHAN_NEEDED, "");
13944 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_EMLPP_PRIO].value, BSSAP_PDU_TYPE_BSSMAP, BE_EMLPP_PRIO, "");
13946 EXTRANEOUS_DATA_CHECK(curr_len, 0);
13953 bssmap_clear_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
13955 guint32 curr_offset;
13959 curr_offset = offset;
13962 is_uplink = IS_UPLINK_TRUE;
13964 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
13966 EXTRANEOUS_DATA_CHECK(curr_len, 0);
13973 bssmap_clear_cmd(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
13975 guint32 curr_offset;
13979 curr_offset = offset;
13982 is_uplink = IS_UPLINK_FALSE;
13984 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_L3_HEADER_INFO].value, BSSAP_PDU_TYPE_BSSMAP, BE_L3_HEADER_INFO, "");
13986 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
13988 EXTRANEOUS_DATA_CHECK(curr_len, 0);
13995 bssmap_reset(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
13997 guint32 curr_offset;
14001 curr_offset = offset;
14004 is_uplink = IS_UPLINK_UNKNOWN;
14006 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
14008 EXTRANEOUS_DATA_CHECK(curr_len, 0);
14015 bssmap_ho_performed(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
14017 guint32 curr_offset;
14021 curr_offset = offset;
14024 is_uplink = IS_UPLINK_TRUE;
14026 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
14028 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CELL_ID].value, BSSAP_PDU_TYPE_BSSMAP, BE_CELL_ID, "");
14030 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CHOSEN_CHAN].value, BSSAP_PDU_TYPE_BSSMAP, BE_CHOSEN_CHAN, "");
14032 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CHOSEN_ENC_ALG].value, BSSAP_PDU_TYPE_BSSMAP, BE_CHOSEN_ENC_ALG, "");
14034 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_SPEECH_VER].value, BSSAP_PDU_TYPE_BSSMAP, BE_SPEECH_VER, " (Chosen)");
14036 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_LSA_ID].value, BSSAP_PDU_TYPE_BSSMAP, BE_LSA_ID, "");
14038 EXTRANEOUS_DATA_CHECK(curr_len, 0);
14045 bssmap_overload(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
14047 guint32 curr_offset;
14051 curr_offset = offset;
14054 is_uplink = IS_UPLINK_TRUE;
14056 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
14058 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_CELL_ID].value, BSSAP_PDU_TYPE_BSSMAP, BE_CELL_ID, "");
14060 EXTRANEOUS_DATA_CHECK(curr_len, 0);
14067 bssmap_cm_upd(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
14069 guint32 curr_offset;
14073 curr_offset = offset;
14076 is_uplink = IS_UPLINK_FALSE;
14078 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CM_INFO_2].value, BSSAP_PDU_TYPE_BSSMAP, BE_CM_INFO_2, "");
14080 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_CM_INFO_3].value, BSSAP_PDU_TYPE_BSSMAP, BE_CM_INFO_3, "");
14082 EXTRANEOUS_DATA_CHECK(curr_len, 0);
14089 bssmap_ciph_mode_cmd(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
14091 guint32 curr_offset;
14095 curr_offset = offset;
14098 is_uplink = IS_UPLINK_FALSE;
14100 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_L3_HEADER_INFO].value, BSSAP_PDU_TYPE_BSSMAP, BE_L3_HEADER_INFO, "");
14102 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_ENC_INFO].value, BSSAP_PDU_TYPE_BSSMAP, BE_ENC_INFO, "");
14104 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CIPH_RESP_MODE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIPH_RESP_MODE, "");
14106 EXTRANEOUS_DATA_CHECK(curr_len, 0);
14113 bssmap_ciph_mode_complete(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
14115 guint32 curr_offset;
14119 curr_offset = offset;
14122 is_uplink = IS_UPLINK_TRUE;
14124 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_L3_MSG].value, BSSAP_PDU_TYPE_BSSMAP, BE_L3_MSG, "");
14126 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CHOSEN_ENC_ALG].value, BSSAP_PDU_TYPE_BSSMAP, BE_CHOSEN_ENC_ALG, "");
14128 EXTRANEOUS_DATA_CHECK(curr_len, 0);
14135 bssmap_cl3_info(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
14138 guint32 curr_offset;
14141 curr_offset = offset;
14144 is_uplink = IS_UPLINK_TRUE;
14146 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CELL_ID].value, BSSAP_PDU_TYPE_BSSMAP, BE_CELL_ID, "");
14148 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_L3_INFO].value, BSSAP_PDU_TYPE_BSSMAP, BE_L3_INFO, "");
14150 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CHOSEN_CHAN].value, BSSAP_PDU_TYPE_BSSMAP, BE_CHOSEN_CHAN, "");
14152 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_LSA_ID_LIST].value, BSSAP_PDU_TYPE_BSSMAP, BE_LSA_ID_LIST, "");
14154 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_APDU].value, BSSAP_PDU_TYPE_BSSMAP, BE_APDU, "");
14156 EXTRANEOUS_DATA_CHECK(curr_len, 0);
14163 bssmap_sapi_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
14166 guint32 curr_offset;
14169 curr_offset = offset;
14172 is_uplink = IS_UPLINK_TRUE;
14174 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_DLCI].value, BSSAP_PDU_TYPE_BSSMAP, BE_DLCI, "");
14176 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
14178 EXTRANEOUS_DATA_CHECK(curr_len, 0);
14185 bssmap_ho_reqd_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
14187 guint32 curr_offset;
14191 curr_offset = offset;
14194 is_uplink = IS_UPLINK_FALSE;
14196 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
14198 EXTRANEOUS_DATA_CHECK(curr_len, 0);
14205 bssmap_reset_cct(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
14207 guint32 curr_offset;
14211 curr_offset = offset;
14214 is_uplink = IS_UPLINK_TRUE;
14216 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
14218 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
14220 EXTRANEOUS_DATA_CHECK(curr_len, 0);
14227 bssmap_reset_cct_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
14229 guint32 curr_offset;
14233 curr_offset = offset;
14236 is_uplink = IS_UPLINK_TRUE;
14238 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
14240 EXTRANEOUS_DATA_CHECK(curr_len, 0);
14247 bssmap_cct_group_block(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
14249 guint32 curr_offset;
14253 curr_offset = offset;
14256 is_uplink = IS_UPLINK_TRUE;
14258 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
14260 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
14262 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC_LIST].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC_LIST, "");
14264 EXTRANEOUS_DATA_CHECK(curr_len, 0);
14271 bssmap_cct_group_block_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
14273 guint32 curr_offset;
14277 curr_offset = offset;
14280 is_uplink = IS_UPLINK_TRUE;
14282 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
14284 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC_LIST].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC_LIST, "");
14286 EXTRANEOUS_DATA_CHECK(curr_len, 0);
14293 bssmap_cct_group_unblock(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
14295 guint32 curr_offset;
14299 curr_offset = offset;
14302 is_uplink = IS_UPLINK_TRUE;
14304 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
14306 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC_LIST].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC_LIST, "");
14308 EXTRANEOUS_DATA_CHECK(curr_len, 0);
14315 bssmap_cct_group_unblock_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
14317 guint32 curr_offset;
14321 curr_offset = offset;
14324 is_uplink = IS_UPLINK_TRUE;
14326 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
14328 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC_LIST].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC_LIST, "");
14330 EXTRANEOUS_DATA_CHECK(curr_len, 0);
14337 bssmap_confusion(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
14339 guint32 curr_offset;
14343 curr_offset = offset;
14346 is_uplink = IS_UPLINK_TRUE;
14348 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
14350 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_DIAG].value, BSSAP_PDU_TYPE_BSSMAP, BE_DIAG, "");
14352 EXTRANEOUS_DATA_CHECK(curr_len, 0);
14359 bssmap_unequipped_cct(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
14361 guint32 curr_offset;
14365 curr_offset = offset;
14368 is_uplink = IS_UPLINK_TRUE;
14370 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
14372 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CIC_LIST].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC_LIST, "");
14374 EXTRANEOUS_DATA_CHECK(curr_len, 0);
14381 bssmap_ciph_mode_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
14383 guint32 curr_offset;
14387 curr_offset = offset;
14390 is_uplink = IS_UPLINK_TRUE;
14392 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
14394 EXTRANEOUS_DATA_CHECK(curr_len, 0);
14401 bssmap_load_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
14403 guint32 curr_offset;
14407 curr_offset = offset;
14410 is_uplink = IS_UPLINK_TRUE;
14412 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_TIME_IND].value, BSSAP_PDU_TYPE_BSSMAP, BE_TIME_IND, "");
14414 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CELL_ID].value, BSSAP_PDU_TYPE_BSSMAP, BE_CELL_ID, "");
14416 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CELL_ID_LIST].value, BSSAP_PDU_TYPE_BSSMAP, BE_CELL_ID_LIST, " (Target)");
14418 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_RES_SIT].value, BSSAP_PDU_TYPE_BSSMAP, BE_RES_SIT, "");
14420 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
14422 EXTRANEOUS_DATA_CHECK(curr_len, 0);
14429 bssmap_change_cct(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
14431 guint32 curr_offset;
14435 curr_offset = offset;
14438 is_uplink = IS_UPLINK_FALSE;
14440 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
14442 EXTRANEOUS_DATA_CHECK(curr_len, 0);
14449 bssmap_change_cct_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
14451 guint32 curr_offset;
14455 curr_offset = offset;
14458 is_uplink = IS_UPLINK_TRUE;
14460 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
14462 EXTRANEOUS_DATA_CHECK(curr_len, 0);
14469 bssmap_common_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
14471 guint32 curr_offset;
14475 curr_offset = offset;
14478 is_uplink = IS_UPLINK_FALSE;
14480 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_IMSI].value, BSSAP_PDU_TYPE_BSSMAP, BE_IMSI, "");
14482 EXTRANEOUS_DATA_CHECK(curr_len, 0);
14489 bssmap_lsa_info(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
14491 guint32 curr_offset;
14495 curr_offset = offset;
14498 is_uplink = IS_UPLINK_FALSE;
14500 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_LSA_INFO].value, BSSAP_PDU_TYPE_BSSMAP, BE_LSA_INFO, "");
14502 EXTRANEOUS_DATA_CHECK(curr_len, 0);
14509 bssmap_conn_oriented(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
14511 guint32 curr_offset;
14515 curr_offset = offset;
14518 is_uplink = IS_UPLINK_FALSE;
14520 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_APDU].value, BSSAP_PDU_TYPE_BSSMAP, BE_APDU, "");
14522 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_SEG].value, BSSAP_PDU_TYPE_BSSMAP, BE_SEG, "");
14524 EXTRANEOUS_DATA_CHECK(curr_len, 0);
14528 #define NUM_GSM_BSSMAP_MSG (sizeof(gsm_a_bssmap_msg_strings)/sizeof(value_string))
14529 static gint ett_gsm_bssmap_msg[NUM_GSM_BSSMAP_MSG];
14530 static void (*bssmap_msg_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) = {
14531 bssmap_ass_req, /* Assignment Request */
14532 bssmap_ass_complete, /* Assignment Complete */
14533 bssmap_ass_failure, /* Assignment Failure */
14534 bssmap_ho_req, /* Handover Request */
14535 bssmap_ho_reqd, /* Handover Required */
14536 bssmap_ho_req_ack, /* Handover Request Acknowledge */
14537 bssmap_ho_cmd, /* Handover Command */
14538 bssmap_ho_complete, /* Handover Complete */
14539 NULL /* no associated data */, /* Handover Succeeded */
14540 bssmap_ho_failure, /* Handover Failure */
14541 bssmap_ho_performed, /* Handover Performed */
14542 bssmap_ho_cand_enq, /* Handover Candidate Enquire */
14543 bssmap_ho_cand_resp, /* Handover Candidate Response */
14544 bssmap_ho_reqd_rej, /* Handover Required Reject */
14545 NULL /* no associated data */, /* Handover Detect */
14546 bssmap_clear_cmd, /* Clear Command */
14547 NULL /* no associated data */, /* Clear Complete */
14548 bssmap_clear_req, /* Clear Request */
14549 NULL, /* Reserved */
14550 NULL, /* Reserved */
14551 bssmap_sapi_rej, /* SAPI 'n' Reject */
14552 bssmap_confusion, /* Confusion */
14553 NULL, /* Suspend */
14555 bssmap_conn_oriented, /* Connection Oriented Information */
14556 NULL, /* Perform Location Request */
14557 bssmap_lsa_info, /* LSA Information */
14558 NULL, /* Perform Location Response */
14559 NULL, /* Perform Location Abort */
14560 bssmap_common_id, /* Common Id */
14561 bssmap_reset, /* Reset */
14562 NULL /* no associated data */, /* Reset Acknowledge */
14563 bssmap_overload, /* Overload */
14564 NULL, /* Reserved */
14565 bssmap_reset_cct, /* Reset Circuit */
14566 bssmap_reset_cct_ack, /* Reset Circuit Acknowledge */
14567 NULL, /* MSC Invoke Trace */
14568 NULL, /* BSS Invoke Trace */
14569 NULL, /* Connectionless Information */
14570 bssmap_block, /* Block */
14571 bssmap_block_ack, /* Blocking Acknowledge */
14572 bssmap_unblock, /* Unblock */
14573 bssmap_unblock_ack, /* Unblocking Acknowledge */
14574 bssmap_cct_group_block, /* Circuit Group Block */
14575 bssmap_cct_group_block_ack, /* Circuit Group Blocking Acknowledge */
14576 bssmap_cct_group_unblock, /* Circuit Group Unblock */
14577 bssmap_cct_group_unblock_ack, /* Circuit Group Unblocking Acknowledge */
14578 bssmap_unequipped_cct, /* Unequipped Circuit */
14579 bssmap_change_cct, /* Change Circuit */
14580 bssmap_change_cct_ack, /* Change Circuit Acknowledge */
14581 NULL, /* Resource Request */
14582 NULL, /* Resource Indication */
14583 bssmap_paging, /* Paging */
14584 bssmap_ciph_mode_cmd, /* Cipher Mode Command */
14585 bssmap_cm_upd, /* Classmark Update */
14586 bssmap_ciph_mode_complete, /* Cipher Mode Complete */
14587 NULL /* no associated data */, /* Queuing Indication */
14588 bssmap_cl3_info, /* Complete Layer 3 Information */
14589 NULL /* no associated data */, /* Classmark Request */
14590 bssmap_ciph_mode_rej, /* Cipher Mode Reject */
14591 bssmap_load_ind, /* Load Indication */
14592 NULL, /* VGCS/VBS Setup */
14593 NULL, /* VGCS/VBS Setup Ack */
14594 NULL, /* VGCS/VBS Setup Refuse */
14595 NULL, /* VGCS/VBS Assignment Request */
14596 NULL, /* VGCS/VBS Assignment Result */
14597 NULL, /* VGCS/VBS Assignment Failure */
14598 NULL, /* VGCS/VBS Queuing Indication */
14599 NULL, /* Uplink Request */
14600 NULL, /* Uplink Request Acknowledge */
14601 NULL, /* Uplink Request Confirmation */
14602 NULL, /* Uplink Release Indication */
14603 NULL, /* Uplink Reject Command */
14604 NULL, /* Uplink Release Command */
14605 NULL, /* Uplink Seized Command */
14613 dtap_mm_auth_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
14615 guint32 curr_offset;
14619 proto_tree *subtree;
14622 curr_offset = offset;
14625 is_uplink = IS_UPLINK_FALSE;
14628 * special dissection for Cipher Key Sequence Number
14630 oct = tvb_get_guint8(tvb, curr_offset);
14632 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
14633 proto_tree_add_text(tree,
14634 tvb, curr_offset, 1,
14639 proto_tree_add_text(tree,
14640 tvb, curr_offset, 1,
14641 gsm_dtap_elem_strings[DE_CIPH_KEY_SEQ_NUM].strptr);
14643 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_CIPH_KEY_SEQ_NUM]);
14645 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
14646 proto_tree_add_text(subtree,
14647 tvb, curr_offset, 1,
14651 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
14653 switch (oct & 0x07)
14656 proto_tree_add_text(subtree,
14657 tvb, curr_offset, 1,
14658 "%s : Ciphering Key Sequence Number: No key is available",
14663 proto_tree_add_text(subtree,
14664 tvb, curr_offset, 1,
14665 "%s : Ciphering Key Sequence Number: %u",
14674 if (curr_len <= 0) return;
14676 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_AUTH_PARAM_RAND);
14678 ELEM_OPT_TLV(0x20, BSSAP_PDU_TYPE_DTAP, DE_AUTH_PARAM_AUTN, "");
14680 EXTRANEOUS_DATA_CHECK(curr_len, 0);
14687 dtap_mm_auth_resp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
14689 guint32 curr_offset;
14693 curr_offset = offset;
14696 is_uplink = IS_UPLINK_TRUE;
14698 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_AUTH_RESP_PARAM);
14700 ELEM_OPT_TLV(0x21, BSSAP_PDU_TYPE_DTAP, DE_AUTH_RESP_PARAM_EXT, "");
14702 EXTRANEOUS_DATA_CHECK(curr_len, 0);
14709 dtap_mm_auth_fail(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
14711 guint32 curr_offset;
14715 curr_offset = offset;
14718 is_uplink = IS_UPLINK_TRUE;
14720 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_REJ_CAUSE);
14722 ELEM_OPT_TLV(0x22, BSSAP_PDU_TYPE_DTAP, DE_AUTH_FAIL_PARAM, "");
14724 EXTRANEOUS_DATA_CHECK(curr_len, 0);
14731 dtap_mm_cm_reestab_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
14733 guint32 curr_offset;
14737 proto_tree *subtree;
14740 curr_offset = offset;
14743 is_uplink = IS_UPLINK_TRUE;
14746 * special dissection for Cipher Key Sequence Number
14748 oct = tvb_get_guint8(tvb, curr_offset);
14750 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
14751 proto_tree_add_text(tree,
14752 tvb, curr_offset, 1,
14757 proto_tree_add_text(tree,
14758 tvb, curr_offset, 1,
14759 gsm_dtap_elem_strings[DE_CIPH_KEY_SEQ_NUM].strptr);
14761 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_CIPH_KEY_SEQ_NUM]);
14763 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
14764 proto_tree_add_text(subtree,
14765 tvb, curr_offset, 1,
14769 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
14771 switch (oct & 0x07)
14774 proto_tree_add_text(subtree,
14775 tvb, curr_offset, 1,
14776 "%s : Ciphering Key Sequence Number: No key is available",
14781 proto_tree_add_text(subtree,
14782 tvb, curr_offset, 1,
14783 "%s : Ciphering Key Sequence Number: %u",
14792 if (curr_len <= 0) return;
14794 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_MS_CM_2, "");
14796 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_MID, "");
14798 ELEM_OPT_TV(0x13, BSSAP_PDU_TYPE_DTAP, DE_LAI, "");
14800 EXTRANEOUS_DATA_CHECK(curr_len, 0);
14807 dtap_mm_cm_srvc_prompt(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
14809 guint32 curr_offset;
14813 curr_offset = offset;
14816 is_uplink = IS_UPLINK_FALSE;
14818 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_PD_SAPI);
14820 EXTRANEOUS_DATA_CHECK(curr_len, 0);
14827 dtap_mm_cm_srvc_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
14829 guint32 curr_offset;
14833 curr_offset = offset;
14836 is_uplink = IS_UPLINK_FALSE;
14838 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_REJ_CAUSE);
14840 EXTRANEOUS_DATA_CHECK(curr_len, 0);
14847 dtap_mm_abort(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
14849 guint32 curr_offset;
14853 curr_offset = offset;
14856 is_uplink = IS_UPLINK_FALSE;
14858 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_REJ_CAUSE);
14860 EXTRANEOUS_DATA_CHECK(curr_len, 0);
14867 dtap_mm_cm_srvc_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
14869 guint32 curr_offset;
14873 proto_tree *subtree;
14877 curr_offset = offset;
14880 is_uplink = IS_UPLINK_TRUE;
14883 * special dissection for CM Service Type
14885 oct = tvb_get_guint8(tvb, curr_offset);
14888 proto_tree_add_text(tree,
14889 tvb, curr_offset, 1,
14890 gsm_dtap_elem_strings[DE_CIPH_KEY_SEQ_NUM].strptr);
14892 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_CIPH_KEY_SEQ_NUM]);
14894 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
14895 proto_tree_add_text(subtree,
14896 tvb, curr_offset, 1,
14900 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
14902 switch ((oct & 0x70) >> 4)
14905 proto_tree_add_text(subtree,
14906 tvb, curr_offset, 1,
14907 "%s : Ciphering Key Sequence Number: No key is available",
14912 proto_tree_add_text(subtree,
14913 tvb, curr_offset, 1,
14914 "%s : Ciphering Key Sequence Number: %u",
14916 (oct & 0x70) >> 4);
14921 proto_tree_add_text(tree,
14922 tvb, curr_offset, 1,
14923 gsm_dtap_elem_strings[DE_CM_SRVC_TYPE].strptr);
14925 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_CM_SRVC_TYPE]);
14927 switch (oct & 0x0f)
14929 case 0x01: str = "Mobile originating call establishment or packet mode connection establishment"; break;
14930 case 0x02: str = "Emergency call establishment"; break;
14931 case 0x04: str = "Short message service"; break;
14932 case 0x08: str = "Supplementary service activation"; break;
14933 case 0x09: str = "Voice group call establishment"; break;
14934 case 0x0a: str = "Voice broadcast call establishment"; break;
14935 case 0x0b: str = "Location Services"; break;
14941 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
14942 proto_tree_add_text(subtree,
14943 tvb, curr_offset, 1,
14944 "%s : Service Type: (%u) %s",
14952 if (curr_len <= 0) return;
14954 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_MS_CM_2, "");
14956 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_MID, "");
14958 ELEM_OPT_TV_SHORT(0x80, BSSAP_PDU_TYPE_DTAP, DE_PRIO, "");
14960 EXTRANEOUS_DATA_CHECK(curr_len, 0);
14967 dtap_mm_id_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
14970 guint32 curr_offset;
14972 proto_tree *subtree;
14976 curr_offset = offset;
14979 is_uplink = IS_UPLINK_FALSE;
14982 * special dissection for Identity Type
14984 oct = tvb_get_guint8(tvb, curr_offset);
14986 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
14987 proto_tree_add_text(tree,
14988 tvb, curr_offset, 1,
14993 proto_tree_add_text(tree,
14994 tvb, curr_offset, 1,
14995 gsm_dtap_elem_strings[DE_ID_TYPE].strptr);
14997 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_ID_TYPE]);
14999 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
15000 proto_tree_add_text(subtree,
15001 tvb, curr_offset, 1,
15005 switch (oct & 0x07)
15007 case 1: str = "IMSI"; break;
15008 case 2: str = "IMEI"; break;
15009 case 3: str = "IMEISV"; break;
15010 case 4: str = "TMSI"; break;
15016 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
15017 proto_tree_add_text(subtree,
15018 tvb, curr_offset, 1,
15019 "%s : Type of identity: %s",
15026 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15033 dtap_mm_id_resp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15035 guint32 curr_offset;
15039 curr_offset = offset;
15042 is_uplink = IS_UPLINK_TRUE;
15044 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_MID, "");
15046 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15053 dtap_mm_imsi_det_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15055 guint32 curr_offset;
15059 curr_offset = offset;
15062 is_uplink = IS_UPLINK_TRUE;
15064 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_MS_CM_1);
15066 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_MID, "");
15068 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15075 dtap_mm_loc_upd_acc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15077 guint32 curr_offset;
15081 curr_offset = offset;
15084 is_uplink = IS_UPLINK_FALSE;
15086 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_LAI);
15088 ELEM_OPT_TLV(0x17, BSSAP_PDU_TYPE_DTAP, DE_MID, "");
15090 ELEM_OPT_T(0xa1, BSSAP_PDU_TYPE_DTAP, DE_FOP, "");
15092 ELEM_OPT_T(0xa2, BSSAP_PDU_TYPE_DTAP, DE_CTS_PERM, "");
15094 ELEM_OPT_TLV(0x4a, BSSAP_PDU_TYPE_DTAP, DE_PLMN_LIST, " Equivalent");
15096 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15103 dtap_mm_loc_upd_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15105 guint32 curr_offset;
15109 curr_offset = offset;
15112 is_uplink = IS_UPLINK_FALSE;
15114 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_REJ_CAUSE);
15116 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15123 dtap_mm_loc_upd_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15125 guint32 curr_offset;
15129 proto_tree *subtree;
15133 curr_offset = offset;
15136 is_uplink = IS_UPLINK_TRUE;
15139 * special dissection for Location Updating Type
15141 oct = tvb_get_guint8(tvb, curr_offset);
15144 proto_tree_add_text(tree,
15145 tvb, curr_offset, 1,
15146 gsm_dtap_elem_strings[DE_CIPH_KEY_SEQ_NUM].strptr);
15148 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_CIPH_KEY_SEQ_NUM]);
15150 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
15151 proto_tree_add_text(subtree,
15152 tvb, curr_offset, 1,
15156 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
15158 switch ((oct & 0x70) >> 4)
15161 proto_tree_add_text(subtree,
15162 tvb, curr_offset, 1,
15163 "%s : Ciphering Key Sequence Number: No key is available",
15168 proto_tree_add_text(subtree,
15169 tvb, curr_offset, 1,
15170 "%s : Ciphering Key Sequence Number: %u",
15172 (oct & 0x70) >> 4);
15177 proto_tree_add_text(tree,
15178 tvb, curr_offset, 1,
15179 gsm_dtap_elem_strings[DE_LOC_UPD_TYPE].strptr);
15181 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_LOC_UPD_TYPE]);
15183 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
15184 proto_tree_add_text(subtree,
15185 tvb, curr_offset, 1,
15186 "%s : Follow-On Request (FOR): %s",
15188 (oct & 0x08) ? "Follow-on request pending" : "No follow-on request pending");
15190 other_decode_bitfield_value(a_bigbuf, oct, 0x04, 8);
15191 proto_tree_add_text(subtree,
15192 tvb, curr_offset, 1,
15196 switch (oct & 0x03)
15198 case 0: str = "Normal"; break;
15199 case 1: str = "Periodic"; break;
15200 case 2: str = "IMSI attach"; break;
15206 other_decode_bitfield_value(a_bigbuf, oct, 0x03, 8);
15207 proto_tree_add_text(subtree,
15208 tvb, curr_offset, 1,
15209 "%s : Updating Type: %s",
15213 proto_item_append_text(item, " - %s", str);
15218 if (curr_len <= 0) return;
15220 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_LAI);
15222 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_MS_CM_1);
15224 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_MID, "");
15226 ELEM_OPT_TLV(0x33, BSSAP_PDU_TYPE_DTAP, DE_MS_CM_2, "");
15228 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15235 dtap_mm_mm_info(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15237 guint32 curr_offset;
15241 curr_offset = offset;
15244 is_uplink = IS_UPLINK_TRUE;
15246 ELEM_OPT_TLV(0x43, BSSAP_PDU_TYPE_DTAP, DE_NETWORK_NAME, " - Full Name");
15248 ELEM_OPT_TLV(0x45, BSSAP_PDU_TYPE_DTAP, DE_NETWORK_NAME, " - Short Name");
15250 ELEM_OPT_TV(0x46, BSSAP_PDU_TYPE_DTAP, DE_TIME_ZONE, " - Local");
15252 ELEM_OPT_TV(0x47, BSSAP_PDU_TYPE_DTAP, DE_TIME_ZONE_TIME, " - Universal Time and Local Time Zone");
15254 ELEM_OPT_TLV(0x48, BSSAP_PDU_TYPE_DTAP, DE_LSA_ID, "");
15256 ELEM_OPT_TLV(0x49, BSSAP_PDU_TYPE_DTAP, DE_DAY_SAVING_TIME, "");
15258 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15265 dtap_mm_mm_status(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15267 guint32 curr_offset;
15271 curr_offset = offset;
15274 is_uplink = IS_UPLINK_TRUE;
15276 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_REJ_CAUSE);
15278 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15285 dtap_mm_tmsi_realloc_cmd(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15287 guint32 curr_offset;
15291 curr_offset = offset;
15294 is_uplink = IS_UPLINK_FALSE;
15296 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_LAI);
15298 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_MID, "");
15300 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15302 /* 3GPP TS 24.008 version 4.7.0 Release 4
15306 dtap_rr_ho_cmd(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15308 guint32 curr_offset;
15311 curr_offset = offset;
15314 /* Mandatory Elemets
15315 * Cell description 10.5.2.2
15317 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RR_CELL_DSC);
15319 /* Description of the first channel,after time
15320 * Channel Description 2 10.5.2.5a
15322 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RR_CH_DSC2);
15324 /* Handover Reference 10.5.2.15 */
15325 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RR_HO_REF);
15327 /* Power Command and Access type 10.5.2.28a */
15328 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RR_POW_CMD_AND_ACC_TYPE);
15330 /* optional elements */
15332 /* Synchronization Indication 10.5.2.39 */
15333 ELEM_OPT_TV_SHORT(0xD0,BSSAP_PDU_TYPE_DTAP, DE_RR_SYNC_IND,"");
15335 /* Frequency Short List 10.5.2.14 */
15336 ELEM_OPT_TV(0x02,BSSAP_PDU_TYPE_DTAP, DE_RR_FREQ_SHORT_LIST," - Frequency Short List, after time");
15338 /* Frequency List 10.5.2.13 */
15339 ELEM_OPT_TLV(0x05, BSSAP_PDU_TYPE_DTAP, DE_RR_FREQ_LIST, " - Frequency List, after time");
15341 /* Cell Channel Description 10.5.2.1b */
15342 ELEM_OPT_TV(0x62,BSSAP_PDU_TYPE_DTAP, DE_RR_CELL_CH_DSC, "");
15344 /* Multislot Allocation 10.5.2.21b */
15345 ELEM_OPT_TLV(0x10,BSSAP_PDU_TYPE_DTAP, DE_RR_MULT_ALL, "");
15347 /* Mode of the First Channel(Channel Set 1)) Channel Mode 10.5.2.6*/
15348 ELEM_OPT_TV(0x63,BSSAP_PDU_TYPE_DTAP, DE_RR_CH_MODE, " - Mode of the First Channel(Channel Set 1))");
15350 /* Mode of Channel Set 2 Channel Mode 10.5.2.6*/
15351 ELEM_OPT_TV(0x11,BSSAP_PDU_TYPE_DTAP, DE_RR_CH_MODE, " - Mode of Channel Set 2");
15353 /* Mode of Channel Set 3 Channel Mode 10.5.2.6*/
15354 ELEM_OPT_TV(0x13,BSSAP_PDU_TYPE_DTAP, DE_RR_CH_MODE, " - Mode of Channel Set 3");
15356 /* Mode of Channel Set 4 Channel Mode 10.5.2.6*/
15357 ELEM_OPT_TV(0x14,BSSAP_PDU_TYPE_DTAP, DE_RR_CH_MODE, " - Mode of Channel Set 4");
15359 /* Mode of Channel Set 5 Channel Mode 10.5.2.6*/
15360 ELEM_OPT_TV(0x15,BSSAP_PDU_TYPE_DTAP, DE_RR_CH_MODE, " - Mode of Channel Set 5");
15362 /* Mode of Channel Set 6 Channel Mode 10.5.2.6*/
15363 ELEM_OPT_TV(0x16,BSSAP_PDU_TYPE_DTAP, DE_RR_CH_MODE, " - Mode of Channel Set 6");
15365 /* Mode of Channel Set 7 Channel Mode 10.5.2.6*/
15366 ELEM_OPT_TV(0x17,BSSAP_PDU_TYPE_DTAP, DE_RR_CH_MODE, " - Mode of Channel Set 7");
15368 /* Mode of Channel Set 8 Channel Mode 10.5.2.6*/
15369 ELEM_OPT_TV(0x18,BSSAP_PDU_TYPE_DTAP, DE_RR_CH_MODE, " - Mode of Channel Set 8");
15371 /* Description of the Second Channel, after time, Channel Description 10.5.2.5 */
15372 ELEM_OPT_TV(0x64,BSSAP_PDU_TYPE_DTAP, DE_RR_CH_DSC, " - Description of the Second Channel, after time");
15374 /* Mode of the Second Channel, Channel Mode 2 10.5.2.7 */
15375 ELEM_OPT_TV(0x66,BSSAP_PDU_TYPE_DTAP, DE_RR_CH_MODE2, " - Mode of the Second Channel");
15377 /* Frequency Channel Sequence, after time, Frequency Channel Sequence 10.5.2.12 */
15378 ELEM_OPT_TV(0x69,BSSAP_PDU_TYPE_DTAP, DE_RR_FREQ_CH_SEQ, " - Frequency Channel Sequence, after time");
15380 /* Mobile Allocation, after time, Mobile Allocation 10.5.2.21 */
15381 ELEM_OPT_TLV(0x72,BSSAP_PDU_TYPE_DTAP, DE_RR_MOB_ALL, " - Mobile Allocation, after time");
15383 /* Starting Time 10.5.2.38 */
15384 ELEM_OPT_TV(0x7C,BSSAP_PDU_TYPE_DTAP, DE_RR_STARTING_TIME, "");
15386 /* Real Time Difference, Time Difference 10.5.2.41 */
15387 ELEM_OPT_TV(0x7B,BSSAP_PDU_TYPE_DTAP, DE_RR_TIME_DIFF, " - Real Time Difference");
15389 /* Timing Advance, Timing Advance 10.5.2.40 */
15390 ELEM_OPT_TV(0x7D,BSSAP_PDU_TYPE_DTAP, DE_RR_TIMING_ADV, "");
15392 /* Frequency Short List, before time, Frequency Short List 10.5.2.14 */
15393 ELEM_OPT_TLV(0x19,BSSAP_PDU_TYPE_DTAP, DE_RR_FREQ_SHORT_LIST, " - Frequency Short List, before time");
15395 /* Frequency List, before time, Frequency List 10.5.2.13 */
15396 ELEM_OPT_TV(0x12,BSSAP_PDU_TYPE_DTAP, DE_RR_FREQ_LIST, " - Frequency List, before time");
15398 /* Description of the First Channel, before time, Channel Description 2 10.5.2.5a*/
15399 ELEM_OPT_TV(0x1c,BSSAP_PDU_TYPE_DTAP, DE_RR_CH_DSC2, " - Description of the First Channel, before time");
15401 /* Description of the Second Channel, before time, Channel Description 10.5.2.5*/
15402 ELEM_OPT_TV(0x1d,BSSAP_PDU_TYPE_DTAP, DE_RR_CH_DSC, " - Description of the Second Channel, before time");
15404 /* Frequency channel sequence before time, Frequency channel sequence 10.5.2.12*/
15405 ELEM_OPT_TV(0x1e,BSSAP_PDU_TYPE_DTAP, DE_RR_FREQ_CH_SEQ, " - Frequency channel sequence before time");
15407 /* Mobile Allocation, before time, Mobile Allocation 10.5.2.21*/
15408 ELEM_OPT_TLV(0x21,BSSAP_PDU_TYPE_DTAP, DE_RR_MOB_ALL, " - Mobile Allocation, before time");
15410 /* Cipher Mode Setting, Cipher Mode Setting 10.5.2.9*/
15411 ELEM_OPT_TV_SHORT(0x90,BSSAP_PDU_TYPE_DTAP, DE_RR_CIP_MODE_SET, "");
15413 /* VGCS target mode Indication, VGCS target mode Indication 10.5.2.42a*/
15414 ELEM_OPT_TLV(0x01,BSSAP_PDU_TYPE_DTAP, DE_RR_VGCS_TAR_MODE_IND, "");
15416 /* Multi-Rate configuration, MultiRate configuration 10.5.2.21aa*/
15417 ELEM_OPT_TLV(0x03,BSSAP_PDU_TYPE_DTAP, DE_RR_MULTIRATE_CONF, "");
15419 /* Dynamic ARFCN Mapping, Dynamic ARFCN Mapping 10.5.2.11b*/
15420 ELEM_OPT_TLV(0x76,BSSAP_PDU_TYPE_DTAP, DE_RR_DYN_ARFCN_MAP, "");
15422 /* VGCS Ciphering Parameters, VGCS Ciphering Parameters 10.5.2.42b*/
15423 ELEM_OPT_TLV(0x04,BSSAP_PDU_TYPE_DTAP, DE_RR_VGCS_CIP_PAR, "");
15425 /* Dedicated Service Information, Dedicated Service Information 10.5.2.59*/
15426 ELEM_OPT_TV(0x51,BSSAP_PDU_TYPE_DTAP, DE_RR_DED_SERV_INF, "");
15428 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
15435 dtap_rr_paging_resp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15437 guint32 curr_offset;
15441 proto_tree *subtree;
15444 curr_offset = offset;
15447 is_uplink = IS_UPLINK_TRUE;
15450 * special dissection for Cipher Key Sequence Number
15452 oct = tvb_get_guint8(tvb, curr_offset);
15454 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
15455 proto_tree_add_text(tree,
15456 tvb, curr_offset, 1,
15461 proto_tree_add_text(tree,
15462 tvb, curr_offset, 1,
15463 gsm_dtap_elem_strings[DE_CIPH_KEY_SEQ_NUM].strptr);
15465 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_CIPH_KEY_SEQ_NUM]);
15467 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
15468 proto_tree_add_text(subtree,
15469 tvb, curr_offset, 1,
15473 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
15475 switch (oct & 0x07)
15478 proto_tree_add_text(subtree,
15479 tvb, curr_offset, 1,
15480 "%s : Ciphering Key Sequence Number: No key is available",
15485 proto_tree_add_text(subtree,
15486 tvb, curr_offset, 1,
15487 "%s : Ciphering Key Sequence Number: %u",
15496 if (curr_len <= 0) return;
15498 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_MS_CM_2, "");
15500 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_MID, "");
15502 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15509 dtap_rr_rr_status(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15511 guint32 curr_offset;
15515 curr_offset = offset;
15518 is_uplink = IS_UPLINK_TRUE;
15520 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RR_CAUSE);
15522 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15529 dtap_cc_alerting(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15531 guint32 curr_offset;
15535 curr_offset = offset;
15538 is_uplink = IS_UPLINK_TRUE;
15540 ELEM_OPT_TLV(0x1c, BSSAP_PDU_TYPE_DTAP, DE_FACILITY, "");
15542 ELEM_OPT_TLV(0x1e, BSSAP_PDU_TYPE_DTAP, DE_PROG_IND, "");
15544 ELEM_OPT_TLV(0x7e, BSSAP_PDU_TYPE_DTAP, DE_USER_USER, "");
15548 ELEM_OPT_TLV(0x7f, BSSAP_PDU_TYPE_DTAP, DE_SS_VER_IND, "");
15550 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15557 dtap_cc_call_conf(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15559 guint32 curr_offset;
15563 curr_offset = offset;
15566 is_uplink = IS_UPLINK_TRUE;
15568 ELEM_OPT_TV_SHORT(0xd0, BSSAP_PDU_TYPE_DTAP, DE_REPEAT_IND, " BC repeat indicator");
15570 ELEM_OPT_TLV(0x04, BSSAP_PDU_TYPE_DTAP, DE_BEARER_CAP, " 1");
15572 ELEM_OPT_TLV(0x04, BSSAP_PDU_TYPE_DTAP, DE_BEARER_CAP, " 2");
15574 ELEM_OPT_TLV(0x08, BSSAP_PDU_TYPE_DTAP, DE_CAUSE, "");
15576 ELEM_OPT_TLV(0x15, BSSAP_PDU_TYPE_DTAP, DE_CC_CAP, "");
15578 ELEM_OPT_TLV(0x2d, BSSAP_PDU_TYPE_DTAP, DE_SI, "");
15580 ELEM_OPT_TLV(0x40, BSSAP_PDU_TYPE_DTAP, DE_SUP_CODEC_LIST, "");
15582 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15589 dtap_cc_call_proceed(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15591 guint32 curr_offset;
15595 curr_offset = offset;
15598 is_uplink = IS_UPLINK_FALSE;
15600 ELEM_OPT_TV_SHORT(0xd0, BSSAP_PDU_TYPE_DTAP, DE_REPEAT_IND, " BC repeat indicator");
15602 ELEM_OPT_TLV(0x04, BSSAP_PDU_TYPE_DTAP, DE_BEARER_CAP, " 1");
15604 ELEM_OPT_TLV(0x04, BSSAP_PDU_TYPE_DTAP, DE_BEARER_CAP, " 2");
15606 ELEM_OPT_TLV(0x1c, BSSAP_PDU_TYPE_DTAP, DE_FACILITY, "");
15608 ELEM_OPT_TLV(0x1e, BSSAP_PDU_TYPE_DTAP, DE_PROG_IND, "");
15610 ELEM_OPT_TV_SHORT(0x80, BSSAP_PDU_TYPE_DTAP, DE_PRIO, "");
15612 ELEM_OPT_TLV(0x2f, BSSAP_PDU_TYPE_DTAP, DE_NET_CC_CAP, "");
15614 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15621 dtap_cc_congestion_control(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15623 guint32 curr_offset;
15627 proto_tree *subtree;
15631 curr_offset = offset;
15634 is_uplink = IS_UPLINK_FALSE;
15637 * special dissection for Congestion Level
15639 oct = tvb_get_guint8(tvb, curr_offset);
15641 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
15642 proto_tree_add_text(tree,
15643 tvb, curr_offset, 1,
15648 proto_tree_add_text(tree,
15649 tvb, curr_offset, 1,
15650 gsm_dtap_elem_strings[DE_CONGESTION].strptr);
15652 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_CONGESTION]);
15654 switch (oct & 0x0f)
15656 case 0: str = "Receiver ready"; break;
15657 case 15: str = "Receiver not ready"; break;
15663 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
15664 proto_tree_add_text(subtree,
15665 tvb, curr_offset, 1,
15666 "%s : Congestion level: %s",
15673 if (curr_len <= 0) return;
15675 ELEM_OPT_TLV(0x08, BSSAP_PDU_TYPE_DTAP, DE_CAUSE, "");
15677 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15684 dtap_cc_connect(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15686 guint32 curr_offset;
15690 curr_offset = offset;
15693 is_uplink = IS_UPLINK_TRUE;
15695 ELEM_OPT_TLV(0x1c, BSSAP_PDU_TYPE_DTAP, DE_FACILITY, "");
15697 ELEM_OPT_TLV(0x1e, BSSAP_PDU_TYPE_DTAP, DE_PROG_IND, "");
15699 ELEM_OPT_TLV(0x4c, BSSAP_PDU_TYPE_DTAP, DE_CONN_NUM, "");
15701 ELEM_OPT_TLV(0x4d, BSSAP_PDU_TYPE_DTAP, DE_CONN_SUB_ADDR, "");
15703 ELEM_OPT_TLV(0x7e, BSSAP_PDU_TYPE_DTAP, DE_USER_USER, "");
15707 ELEM_OPT_TLV(0x7f, BSSAP_PDU_TYPE_DTAP, DE_SS_VER_IND, "");
15709 ELEM_OPT_TLV(0x2d, BSSAP_PDU_TYPE_DTAP, DE_SI, "");
15711 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15718 dtap_cc_disconnect(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15720 guint32 curr_offset;
15724 curr_offset = offset;
15727 is_uplink = IS_UPLINK_TRUE;
15729 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_CAUSE, "");
15731 ELEM_OPT_TLV(0x1c, BSSAP_PDU_TYPE_DTAP, DE_FACILITY, "");
15733 ELEM_OPT_TLV(0x1e, BSSAP_PDU_TYPE_DTAP, DE_PROG_IND, "");
15735 ELEM_OPT_TLV(0x7e, BSSAP_PDU_TYPE_DTAP, DE_USER_USER, "");
15737 ELEM_OPT_TLV(0x7b, BSSAP_PDU_TYPE_DTAP, DE_ALLOWED_ACTIONS, "");
15741 ELEM_OPT_TLV(0x7f, BSSAP_PDU_TYPE_DTAP, DE_SS_VER_IND, "");
15743 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15750 dtap_cc_emerg_setup(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15752 guint32 curr_offset;
15756 curr_offset = offset;
15759 is_uplink = IS_UPLINK_TRUE;
15761 ELEM_OPT_TLV(0x04, BSSAP_PDU_TYPE_DTAP, DE_BEARER_CAP, "");
15763 ELEM_OPT_TLV(0x2d, BSSAP_PDU_TYPE_DTAP, DE_SI, "");
15765 ELEM_OPT_TLV(0x40, BSSAP_PDU_TYPE_DTAP, DE_SUP_CODEC_LIST, "");
15767 ELEM_OPT_TLV(0x2e, BSSAP_PDU_TYPE_DTAP, DE_SRVC_CAT, " Emergency");
15769 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15776 dtap_cc_facility(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15778 guint32 curr_offset;
15782 curr_offset = offset;
15785 is_uplink = IS_UPLINK_TRUE;
15787 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_FACILITY, "");
15791 ELEM_OPT_TLV(0x7f, BSSAP_PDU_TYPE_DTAP, DE_SS_VER_IND, "");
15793 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15800 dtap_cc_hold_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15802 guint32 curr_offset;
15806 curr_offset = offset;
15809 is_uplink = IS_UPLINK_FALSE;
15811 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_CAUSE, "");
15813 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15820 dtap_cc_modify(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15822 guint32 curr_offset;
15826 curr_offset = offset;
15829 is_uplink = IS_UPLINK_TRUE;
15831 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_BEARER_CAP, "");
15833 ELEM_OPT_TLV(0x7c, BSSAP_PDU_TYPE_DTAP, DE_LLC, "");
15835 ELEM_OPT_TLV(0x7d, BSSAP_PDU_TYPE_DTAP, DE_HLC, "");
15837 ELEM_OPT_T(0xa3, BSSAP_PDU_TYPE_DTAP, DE_REV_CALL_SETUP_DIR, "");
15839 ELEM_OPT_T(0xa4, BSSAP_PDU_TYPE_DTAP, DE_IMM_MOD_IND, "");
15841 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15848 dtap_cc_modify_complete(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15850 guint32 curr_offset;
15854 curr_offset = offset;
15857 is_uplink = IS_UPLINK_TRUE;
15859 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_BEARER_CAP, "");
15861 ELEM_OPT_TLV(0x7c, BSSAP_PDU_TYPE_DTAP, DE_LLC, "");
15863 ELEM_OPT_TLV(0x7d, BSSAP_PDU_TYPE_DTAP, DE_HLC, "");
15865 ELEM_OPT_T(0xa3, BSSAP_PDU_TYPE_DTAP, DE_REV_CALL_SETUP_DIR, "");
15867 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15874 dtap_cc_modify_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15876 guint32 curr_offset;
15880 curr_offset = offset;
15883 is_uplink = IS_UPLINK_FALSE;
15885 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_BEARER_CAP, "");
15887 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_CAUSE, "");
15889 ELEM_OPT_TLV(0x7c, BSSAP_PDU_TYPE_DTAP, DE_LLC, "");
15891 ELEM_OPT_TLV(0x7d, BSSAP_PDU_TYPE_DTAP, DE_HLC, "");
15893 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15900 dtap_cc_notify(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15902 guint32 curr_offset;
15906 curr_offset = offset;
15909 is_uplink = IS_UPLINK_FALSE;
15911 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_NOT_IND);
15913 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15920 dtap_cc_progress(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15922 guint32 curr_offset;
15926 curr_offset = offset;
15929 is_uplink = IS_UPLINK_FALSE;
15931 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_PROG_IND, "");
15933 ELEM_OPT_TLV(0x7e, BSSAP_PDU_TYPE_DTAP, DE_USER_USER, "");
15935 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15942 dtap_cc_cc_est(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15944 guint32 curr_offset;
15948 curr_offset = offset;
15951 is_uplink = IS_UPLINK_FALSE;
15953 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_SETUP_CONTAINER, "");
15955 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15962 dtap_cc_cc_est_conf(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15964 guint32 curr_offset;
15968 curr_offset = offset;
15971 is_uplink = IS_UPLINK_TRUE;
15973 ELEM_OPT_TV_SHORT(0xd0, BSSAP_PDU_TYPE_DTAP, DE_REPEAT_IND, " Repeat indicator");
15975 ELEM_MAND_TLV(0x04, BSSAP_PDU_TYPE_DTAP, DE_BEARER_CAP, " 1");
15977 ELEM_OPT_TLV(0x04, BSSAP_PDU_TYPE_DTAP, DE_BEARER_CAP, " 2");
15979 ELEM_OPT_TLV(0x08, BSSAP_PDU_TYPE_DTAP, DE_CAUSE, "");
15981 ELEM_OPT_TLV(0x40, BSSAP_PDU_TYPE_DTAP, DE_SUP_CODEC_LIST, "");
15983 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15990 dtap_cc_release(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15992 guint32 curr_offset;
15996 curr_offset = offset;
15999 is_uplink = IS_UPLINK_TRUE;
16001 ELEM_OPT_TLV(0x08, BSSAP_PDU_TYPE_DTAP, DE_CAUSE, "");
16003 ELEM_OPT_TLV(0x08, BSSAP_PDU_TYPE_DTAP, DE_CAUSE, " 2");
16005 ELEM_OPT_TLV(0x1c, BSSAP_PDU_TYPE_DTAP, DE_FACILITY, "");
16007 ELEM_OPT_TLV(0x7e, BSSAP_PDU_TYPE_DTAP, DE_USER_USER, "");
16011 ELEM_OPT_TLV(0x7f, BSSAP_PDU_TYPE_DTAP, DE_SS_VER_IND, "");
16013 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16020 dtap_cc_recall(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16022 guint32 curr_offset;
16026 curr_offset = offset;
16029 is_uplink = IS_UPLINK_FALSE;
16031 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RECALL_TYPE);
16033 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_FACILITY, "");
16035 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16042 dtap_cc_release_complete(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16044 guint32 curr_offset;
16048 curr_offset = offset;
16051 is_uplink = IS_UPLINK_FALSE;
16053 ELEM_OPT_TLV(0x08, BSSAP_PDU_TYPE_DTAP, DE_CAUSE, "");
16055 ELEM_OPT_TLV(0x1c, BSSAP_PDU_TYPE_DTAP, DE_FACILITY, "");
16057 ELEM_OPT_TLV(0x7e, BSSAP_PDU_TYPE_DTAP, DE_USER_USER, "");
16061 ELEM_OPT_TLV(0x7f, BSSAP_PDU_TYPE_DTAP, DE_SS_VER_IND, "");
16063 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16070 dtap_cc_retrieve_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16072 guint32 curr_offset;
16076 curr_offset = offset;
16079 is_uplink = IS_UPLINK_FALSE;
16081 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_CAUSE, "");
16083 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16088 * 3GPP TS 24.008 version 7.5.0 Release 7
16091 dtap_cc_setup(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16093 guint32 curr_offset;
16097 curr_offset = offset;
16100 is_uplink = IS_UPLINK_TRUE;
16102 ELEM_OPT_TV_SHORT(0xd0, BSSAP_PDU_TYPE_DTAP, DE_REPEAT_IND, " BC repeat indicator");
16104 ELEM_OPT_TLV(0x04, BSSAP_PDU_TYPE_DTAP, DE_BEARER_CAP, " 1");
16106 ELEM_OPT_TLV(0x04, BSSAP_PDU_TYPE_DTAP, DE_BEARER_CAP, " 2");
16108 ELEM_OPT_TLV(0x1c, BSSAP_PDU_TYPE_DTAP, DE_FACILITY, "");
16110 ELEM_OPT_TLV(0x1e, BSSAP_PDU_TYPE_DTAP, DE_PROG_IND, "");
16112 ELEM_OPT_TV(0x34, BSSAP_PDU_TYPE_DTAP, DE_SIGNAL, "");
16114 ELEM_OPT_TLV(0x5c, BSSAP_PDU_TYPE_DTAP, DE_CLG_PARTY_BCD_NUM, "");
16116 ELEM_OPT_TLV(0x5d, BSSAP_PDU_TYPE_DTAP, DE_CLG_PARTY_SUB_ADDR, "");
16118 ELEM_OPT_TLV(0x5e, BSSAP_PDU_TYPE_DTAP, DE_CLD_PARTY_BCD_NUM, "");
16120 ELEM_OPT_TLV(0x6d, BSSAP_PDU_TYPE_DTAP, DE_CLD_PARTY_SUB_ADDR, "");
16122 ELEM_OPT_TLV(0x74, BSSAP_PDU_TYPE_DTAP, DE_RED_PARTY_BCD_NUM, "");
16124 ELEM_OPT_TLV(0x75, BSSAP_PDU_TYPE_DTAP, DE_RED_PARTY_SUB_ADDR, "");
16126 ELEM_OPT_TV_SHORT(0xd0, BSSAP_PDU_TYPE_DTAP, DE_REPEAT_IND, " LLC repeat indicator");
16128 ELEM_OPT_TLV(0x7c, BSSAP_PDU_TYPE_DTAP, DE_LLC, " 1");
16130 ELEM_OPT_TLV(0x7c, BSSAP_PDU_TYPE_DTAP, DE_LLC, " 2");
16132 ELEM_OPT_TV_SHORT(0xd0, BSSAP_PDU_TYPE_DTAP, DE_REPEAT_IND, " HLC repeat indicator");
16134 ELEM_OPT_TLV(0x7d, BSSAP_PDU_TYPE_DTAP, DE_HLC, " 1");
16136 ELEM_OPT_TLV(0x7d, BSSAP_PDU_TYPE_DTAP, DE_HLC, " 2");
16138 ELEM_OPT_TLV(0x7e, BSSAP_PDU_TYPE_DTAP, DE_USER_USER, "");
16140 /* downlink only */
16142 ELEM_OPT_TV_SHORT(0x80, BSSAP_PDU_TYPE_DTAP, DE_PRIO, "");
16144 ELEM_OPT_TLV(0x19, BSSAP_PDU_TYPE_DTAP, DE_ALERT_PATTERN, "");
16146 ELEM_OPT_TLV(0x2f, BSSAP_PDU_TYPE_DTAP, DE_NET_CC_CAP, "");
16148 ELEM_OPT_TLV(0x3a, BSSAP_PDU_TYPE_DTAP, DE_CAUSE_NO_CLI, "");
16150 /* Backup bearer capability O TLV 3-15 10.5.4.4a */
16151 ELEM_OPT_TLV(0x41, BSSAP_PDU_TYPE_DTAP, DE_BEARER_CAP, "");
16155 ELEM_OPT_TLV(0x7f, BSSAP_PDU_TYPE_DTAP, DE_SS_VER_IND, "");
16157 ELEM_OPT_T(0xa1, BSSAP_PDU_TYPE_DTAP, DE_CLIR_SUP, "");
16159 ELEM_OPT_T(0xa2, BSSAP_PDU_TYPE_DTAP, DE_CLIR_INV, "");
16161 ELEM_OPT_TLV(0x15, BSSAP_PDU_TYPE_DTAP, DE_CC_CAP, "");
16163 ELEM_OPT_TLV(0x1d, BSSAP_PDU_TYPE_DTAP, DE_FACILITY, " $(CCBS)$ (advanced recall alignment)");
16165 ELEM_OPT_TLV(0x1b, BSSAP_PDU_TYPE_DTAP, DE_FACILITY, " (recall alignment Not essential) $(CCBS)$");
16167 ELEM_OPT_TLV(0x2d, BSSAP_PDU_TYPE_DTAP, DE_SI, "");
16169 ELEM_OPT_TLV(0x40, BSSAP_PDU_TYPE_DTAP, DE_SUP_CODEC_LIST, "");
16171 /*A3 Redial Redial O T 1 10.5.4.34
16172 * TODO add this element
16173 * ELEM_OPT_T(0xA3, BSSAP_PDU_TYPE_DTAP, DE_REDIAL, "");
16176 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16183 dtap_cc_start_cc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16185 guint32 curr_offset;
16189 curr_offset = offset;
16192 is_uplink = IS_UPLINK_FALSE;
16194 ELEM_OPT_TLV(0x15, BSSAP_PDU_TYPE_DTAP, DE_CC_CAP, "");
16196 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16203 dtap_cc_start_dtmf(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16205 guint32 curr_offset;
16209 curr_offset = offset;
16212 is_uplink = IS_UPLINK_TRUE;
16214 ELEM_MAND_TV(0x2c, BSSAP_PDU_TYPE_DTAP, DE_KEYPAD_FACILITY, "");
16216 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16223 dtap_cc_start_dtmf_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16225 guint32 curr_offset;
16229 curr_offset = offset;
16232 is_uplink = IS_UPLINK_FALSE;
16234 ELEM_MAND_TV(0x2c, BSSAP_PDU_TYPE_DTAP, DE_KEYPAD_FACILITY, "");
16236 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16243 dtap_cc_start_dtmf_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16245 guint32 curr_offset;
16249 curr_offset = offset;
16252 is_uplink = IS_UPLINK_FALSE;
16254 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_CAUSE, "");
16256 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16263 dtap_cc_status(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16265 guint32 curr_offset;
16269 curr_offset = offset;
16272 is_uplink = IS_UPLINK_FALSE;
16274 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_CAUSE, "");
16276 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_CALL_STATE);
16278 ELEM_OPT_TLV(0x24, BSSAP_PDU_TYPE_DTAP, DE_AUX_STATES, "");
16280 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16287 dtap_cc_user_info(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16289 guint32 curr_offset;
16293 curr_offset = offset;
16296 is_uplink = IS_UPLINK_TRUE;
16298 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_USER_USER, "");
16300 ELEM_OPT_T(0xa0, BSSAP_PDU_TYPE_DTAP, DE_MORE_DATA, "");
16302 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16309 dtap_ss_register(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16311 guint32 curr_offset;
16315 curr_offset = offset;
16318 is_uplink = IS_UPLINK_TRUE;
16320 ELEM_MAND_TLV(0x1c, BSSAP_PDU_TYPE_DTAP, DE_FACILITY, "");
16322 ELEM_OPT_TLV(0x7f, BSSAP_PDU_TYPE_DTAP, DE_SS_VER_IND, "");
16324 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16331 dtap_sms_cp_data(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16333 guint32 curr_offset;
16337 curr_offset = offset;
16340 is_uplink = IS_UPLINK_TRUE;
16342 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_CP_USER_DATA, "");
16344 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16351 dtap_sms_cp_error(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16353 guint32 curr_offset;
16357 curr_offset = offset;
16360 is_uplink = IS_UPLINK_TRUE;
16362 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_CP_CAUSE);
16364 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16371 rp_data_n_ms(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16373 guint32 curr_offset;
16377 curr_offset = offset;
16380 is_uplink = IS_UPLINK_FALSE;
16381 g_pinfo->p2p_dir = P2P_DIR_SENT;
16383 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RP_MESSAGE_REF);
16385 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_RP_ORIG_ADDR, "");
16387 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_RP_DEST_ADDR, "");
16389 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_RP_USER_DATA, "");
16391 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16398 rp_data_ms_n(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16400 guint32 curr_offset;
16404 curr_offset = offset;
16407 is_uplink = IS_UPLINK_TRUE;
16408 g_pinfo->p2p_dir = P2P_DIR_RECV;
16410 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RP_MESSAGE_REF);
16412 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_RP_ORIG_ADDR, "");
16414 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_RP_DEST_ADDR, "");
16416 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_RP_USER_DATA, "");
16418 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16425 rp_smma(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16427 guint32 curr_offset;
16431 curr_offset = offset;
16434 is_uplink = IS_UPLINK_TRUE;
16436 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RP_MESSAGE_REF);
16438 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16445 rp_ack_n_ms(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16447 guint32 curr_offset;
16451 curr_offset = offset;
16454 is_uplink = IS_UPLINK_FALSE;
16455 g_pinfo->p2p_dir = P2P_DIR_SENT;
16457 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RP_MESSAGE_REF);
16459 ELEM_OPT_TLV(0x41, BSSAP_PDU_TYPE_DTAP, DE_RP_USER_DATA, "");
16461 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16468 rp_ack_ms_n(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16470 guint32 curr_offset;
16474 curr_offset = offset;
16477 is_uplink = IS_UPLINK_TRUE;
16478 g_pinfo->p2p_dir = P2P_DIR_RECV;
16480 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RP_MESSAGE_REF);
16482 ELEM_OPT_TLV(0x41, BSSAP_PDU_TYPE_DTAP, DE_RP_USER_DATA, "");
16484 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16491 rp_error_n_ms(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16493 guint32 curr_offset;
16497 curr_offset = offset;
16500 is_uplink = IS_UPLINK_FALSE;
16501 g_pinfo->p2p_dir = P2P_DIR_SENT;
16503 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RP_MESSAGE_REF);
16505 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_RP_CAUSE, "");
16507 ELEM_OPT_TLV(0x41, BSSAP_PDU_TYPE_DTAP, DE_RP_USER_DATA, "");
16509 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16516 rp_error_ms_n(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16518 guint32 curr_offset;
16522 curr_offset = offset;
16525 is_uplink = IS_UPLINK_TRUE;
16526 g_pinfo->p2p_dir = P2P_DIR_RECV;
16528 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RP_MESSAGE_REF);
16530 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_RP_CAUSE, "");
16532 ELEM_OPT_TLV(0x41, BSSAP_PDU_TYPE_DTAP, DE_RP_USER_DATA, "");
16534 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16541 dtap_gmm_attach_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16543 guint32 curr_offset;
16547 curr_offset = offset;
16550 is_uplink = IS_UPLINK_TRUE;
16551 g_pinfo->p2p_dir = P2P_DIR_RECV;
16553 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_MS_NET_CAP, "");
16555 /* Included in attach type
16557 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_CIPH_KEY_SEQ_NUM );
16562 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_ATTACH_TYPE );
16564 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_DRX_PARAM );
16566 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_MID , "" );
16568 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RAI );
16570 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_MS_RAD_ACC_CAP , "" );
16572 ELEM_OPT_TV( 0x19 , BSSAP_PDU_TYPE_DTAP, DE_P_TMSI_SIG, " - Old P-TMSI Signature");
16574 ELEM_OPT_TV( 0x17 , BSSAP_PDU_TYPE_DTAP, DE_GPRS_TIMER , " - Ready Timer" );
16576 ELEM_OPT_TV_SHORT( 0x90 , BSSAP_PDU_TYPE_DTAP, DE_TMSI_STAT , "" );
16578 ELEM_OPT_TLV( 0x33 , BSSAP_PDU_TYPE_DTAP, DE_PS_LCS_CAP , "" );
16580 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16587 dtap_gmm_attach_acc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16589 guint32 curr_offset;
16593 curr_offset = offset;
16596 is_uplink = IS_UPLINK_FALSE;
16597 g_pinfo->p2p_dir = P2P_DIR_SENT;
16599 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_FORCE_TO_STAND_H );
16603 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_ATTACH_RES );
16605 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_GPRS_TIMER );
16607 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RAD_PRIO_2 );
16611 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RAD_PRIO );
16613 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RAI );
16615 ELEM_OPT_TV( 0x19 , BSSAP_PDU_TYPE_DTAP, DE_P_TMSI_SIG, "" );
16617 ELEM_OPT_TV( 0x17 , BSSAP_PDU_TYPE_DTAP, DE_GPRS_TIMER , " - Negotiated Ready Timer" );
16619 ELEM_OPT_TLV( 0x18 , BSSAP_PDU_TYPE_DTAP, DE_MID , " - Allocated P-TMSI" );
16621 ELEM_OPT_TLV( 0x23 , BSSAP_PDU_TYPE_DTAP, DE_MID , "" );
16623 ELEM_OPT_TV( 0x25 , BSSAP_PDU_TYPE_DTAP, DE_GMM_CAUSE , "" );
16625 ELEM_OPT_TLV( 0x2A , BSSAP_PDU_TYPE_DTAP, DE_GPRS_TIMER_2 , " - T3302" );
16627 ELEM_OPT_T( 0x8C , BSSAP_PDU_TYPE_DTAP, DE_CELL_NOT , "" );
16629 ELEM_OPT_TLV( 0x4A , BSSAP_PDU_TYPE_DTAP, DE_PLMN_LIST , "" );
16631 ELEM_OPT_TV_SHORT( 0xB0 , BSSAP_PDU_TYPE_DTAP, DE_NET_FEAT_SUP , "" );
16633 ELEM_OPT_TLV( 0x34 , BSSAP_PDU_TYPE_DTAP, DE_EMERGENCY_NUM_LIST , "" );
16635 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16642 dtap_gmm_attach_com(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16645 guint32 curr_offset;
16646 /* guint32 consumed; */
16649 curr_offset = offset;
16652 is_uplink = IS_UPLINK_TRUE;
16653 g_pinfo->p2p_dir = P2P_DIR_RECV;
16655 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16662 dtap_gmm_attach_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16664 guint32 curr_offset;
16668 curr_offset = offset;
16671 is_uplink = IS_UPLINK_FALSE;
16672 g_pinfo->p2p_dir = P2P_DIR_SENT;
16674 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_GMM_CAUSE );
16676 ELEM_OPT_TLV( 0x2A , BSSAP_PDU_TYPE_DTAP, DE_GPRS_TIMER_2 , " - T3302" );
16678 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16685 dtap_gmm_detach_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16687 guint32 curr_offset;
16691 curr_offset = offset;
16694 is_uplink = IS_UPLINK_FALSE;
16695 g_pinfo->p2p_dir = P2P_DIR_SENT;
16697 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_FORCE_TO_STAND_H );
16698 /* Force to standy might be wrong - To decode it correct, we need the direction */
16702 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_DETACH_TYPE );
16704 ELEM_OPT_TV( 0x25 , BSSAP_PDU_TYPE_DTAP, DE_GMM_CAUSE , "" );
16706 ELEM_OPT_TLV( 0x18 , BSSAP_PDU_TYPE_DTAP, DE_MID , " - P-TMSI" );
16708 ELEM_OPT_TLV( 0x19 , BSSAP_PDU_TYPE_DTAP, DE_P_TMSI_SIG , "" );
16710 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16717 dtap_gmm_detach_acc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16719 guint32 curr_offset;
16723 curr_offset = offset;
16726 is_uplink = IS_UPLINK_TRUE;
16727 g_pinfo->p2p_dir = P2P_DIR_RECV;
16729 if ( curr_len != 0 )
16731 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_SPARE_NIBBLE );
16735 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_FORCE_TO_STAND );
16738 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16745 dtap_gmm_ptmsi_realloc_cmd(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16747 guint32 curr_offset;
16751 curr_offset = offset;
16754 is_uplink = IS_UPLINK_FALSE;
16755 g_pinfo->p2p_dir = P2P_DIR_SENT;
16757 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_MID , " - Allocated P-TMSI" );
16759 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RAI );
16761 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_SPARE_NIBBLE );
16765 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_FORCE_TO_STAND );
16767 ELEM_OPT_TV( 0x19 , BSSAP_PDU_TYPE_DTAP, DE_MID , " - P-TMSI Signature" );
16769 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16776 dtap_gmm_ptmsi_realloc_com(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16778 guint32 curr_offset;
16779 /* guint32 consumed; */
16782 curr_offset = offset;
16785 is_uplink = IS_UPLINK_TRUE;
16786 g_pinfo->p2p_dir = P2P_DIR_RECV;
16788 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16795 dtap_gmm_auth_ciph_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16797 guint32 curr_offset;
16802 curr_offset = offset;
16805 is_uplink = IS_UPLINK_FALSE;
16806 g_pinfo->p2p_dir = P2P_DIR_SENT;
16808 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_IMEISV_REQ );
16812 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_CIPH_ALG );
16814 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_AC_REF_NUM_H );
16818 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_FORCE_TO_STAND );
16820 ELEM_OPT_TV( 0x21 , BSSAP_PDU_TYPE_DTAP, DE_AUTH_PARAM_RAND , "" );
16823 ELEM_OPT_TV_SHORT( 0x08 , BSSAP_PDU_TYPE_DTAP, DE_CIPH_KEY_SEQ_NUM , "" );
16825 if ( curr_len > 0 )
16827 oct = tvb_get_guint8(tvb, curr_offset);
16828 if (( oct & 0xf0 ) == 0x80 )
16830 /* The ciphering key sequence number is added here */
16831 proto_tree_add_text(tree,
16832 tvb, curr_offset, 1,
16833 "Ciphering key sequence number: 0x%02x (%u)",
16842 if ( curr_len == 0 )
16844 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16848 ELEM_OPT_TLV( 0x28 , BSSAP_PDU_TYPE_DTAP, DE_AUTH_PARAM_AUTN , "" );
16850 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16857 dtap_gmm_auth_ciph_resp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16859 guint32 curr_offset;
16863 curr_offset = offset;
16866 is_uplink = IS_UPLINK_TRUE;
16867 g_pinfo->p2p_dir = P2P_DIR_RECV;
16869 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_SPARE_NIBBLE );
16873 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_AC_REF_NUM );
16875 ELEM_OPT_TV( 0x22 , BSSAP_PDU_TYPE_DTAP, DE_AUTH_RESP_PARAM , "" );
16877 ELEM_OPT_TLV( 0x23 , BSSAP_PDU_TYPE_DTAP, DE_MID , " - IMEISV" );
16879 ELEM_OPT_TLV( 0x29 , BSSAP_PDU_TYPE_DTAP, DE_AUTH_RESP_PARAM_EXT , "" );
16881 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16888 dtap_gmm_auth_ciph_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16890 guint32 curr_offset;
16891 /* guint32 consumed; */
16894 curr_offset = offset;
16897 is_uplink = IS_UPLINK_FALSE;
16898 g_pinfo->p2p_dir = P2P_DIR_SENT;
16900 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16907 dtap_gmm_auth_ciph_fail(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16909 guint32 curr_offset;
16913 curr_offset = offset;
16916 is_uplink = IS_UPLINK_TRUE;
16917 g_pinfo->p2p_dir = P2P_DIR_RECV;
16919 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_GMM_CAUSE );
16921 ELEM_OPT_TLV( 0x30 , BSSAP_PDU_TYPE_DTAP, DE_AUTH_FAIL_PARAM , "" );
16923 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16930 dtap_gmm_ident_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16932 guint32 curr_offset;
16935 curr_offset = offset;
16938 is_uplink = IS_UPLINK_FALSE;
16939 g_pinfo->p2p_dir = P2P_DIR_SENT;
16941 /* 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. */
16942 /* ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_ID_TYPE_2 );
16945 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_FORCE_TO_STAND_H );*/
16947 elem_v(tvb, tree, BSSAP_PDU_TYPE_DTAP, DE_FORCE_TO_STAND_H, curr_offset);
16948 elem_v(tvb, tree, BSSAP_PDU_TYPE_DTAP, DE_ID_TYPE_2, curr_offset);
16953 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16960 dtap_gmm_ident_res(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16962 guint32 curr_offset;
16966 curr_offset = offset;
16969 is_uplink = IS_UPLINK_TRUE;
16970 g_pinfo->p2p_dir = P2P_DIR_RECV;
16972 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_MID , "" );
16974 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16981 dtap_gmm_rau_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16983 guint32 curr_offset;
16987 curr_offset = offset;
16990 is_uplink = IS_UPLINK_TRUE;
16991 g_pinfo->p2p_dir = P2P_DIR_RECV;
16993 /* is included in update type
16994 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_CIPH_KEY_SEQ_NUM );
17000 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_UPD_TYPE );
17002 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RAI );
17004 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_MS_RAD_ACC_CAP , "" );
17006 ELEM_OPT_TV( 0x19 , BSSAP_PDU_TYPE_DTAP, DE_P_TMSI_SIG , " - Old P-TMSI Signature" );
17008 ELEM_OPT_TV( 0x17 , BSSAP_PDU_TYPE_DTAP, DE_GPRS_TIMER , " - Requested Ready Timer" );
17010 ELEM_OPT_TV( 0x27 , BSSAP_PDU_TYPE_DTAP, DE_DRX_PARAM , "" );
17012 ELEM_OPT_TV_SHORT( 0x90 , BSSAP_PDU_TYPE_DTAP, DE_TMSI_STAT , "" );
17014 ELEM_OPT_TLV( 0x18 , BSSAP_PDU_TYPE_DTAP, DE_MID , " - P-TMSI" );
17016 ELEM_OPT_TLV( 0x31 , BSSAP_PDU_TYPE_DTAP, DE_MS_NET_CAP , "" );
17018 ELEM_OPT_TLV( 0x32 , BSSAP_PDU_TYPE_DTAP, DE_PDP_CONTEXT_STAT , "" );
17020 ELEM_OPT_TLV( 0x33 , BSSAP_PDU_TYPE_DTAP, DE_PS_LCS_CAP , "" );
17022 EXTRANEOUS_DATA_CHECK(curr_len, 0);
17029 dtap_gmm_rau_acc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
17031 guint32 curr_offset;
17035 curr_offset = offset;
17038 is_uplink = IS_UPLINK_FALSE;
17039 g_pinfo->p2p_dir = P2P_DIR_SENT;
17041 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_UPD_RES );
17045 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_FORCE_TO_STAND );
17047 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_GPRS_TIMER );
17049 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RAI );
17051 ELEM_OPT_TV( 0x19 , BSSAP_PDU_TYPE_DTAP, DE_P_TMSI_SIG , "" );
17053 ELEM_OPT_TLV( 0x18 , BSSAP_PDU_TYPE_DTAP, DE_MID , " - Allocated P-TMSI");
17055 ELEM_OPT_TLV( 0x23 , BSSAP_PDU_TYPE_DTAP, DE_MID , "" );
17057 ELEM_OPT_TLV( 0x26 , BSSAP_PDU_TYPE_DTAP, DE_REC_N_PDU_NUM_LIST , "" );
17059 ELEM_OPT_TV( 0x17 , BSSAP_PDU_TYPE_DTAP, DE_GPRS_TIMER , " - Negotiated Ready Timer" );
17061 ELEM_OPT_TV( 0x25 , BSSAP_PDU_TYPE_DTAP, DE_GMM_CAUSE , "" );
17063 ELEM_OPT_TLV( 0x2A , BSSAP_PDU_TYPE_DTAP, DE_GPRS_TIMER_2 , " - T3302" );
17065 ELEM_OPT_T( 0x8C , BSSAP_PDU_TYPE_DTAP, DE_CELL_NOT , "" );
17067 ELEM_OPT_TLV( 0x4A , BSSAP_PDU_TYPE_DTAP, DE_PLMN_LIST , "" );
17069 ELEM_OPT_TLV( 0x32 , BSSAP_PDU_TYPE_DTAP, DE_PDP_CONTEXT_STAT , "" );
17071 ELEM_OPT_TV_SHORT ( 0xB0 , BSSAP_PDU_TYPE_DTAP, DE_NET_FEAT_SUP , "" );
17073 ELEM_OPT_TLV( 0x34 , BSSAP_PDU_TYPE_DTAP, DE_EMERGENCY_NUM_LIST , "" );
17075 EXTRANEOUS_DATA_CHECK(curr_len, 0);
17082 dtap_gmm_rau_com(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
17084 guint32 curr_offset;
17088 curr_offset = offset;
17091 is_uplink = IS_UPLINK_TRUE;
17092 g_pinfo->p2p_dir = P2P_DIR_RECV;
17093 /* [7] 10.5.5.11 */
17094 ELEM_OPT_TLV( 0x26 , BSSAP_PDU_TYPE_DTAP, DE_REC_N_PDU_NUM_LIST , "" );
17095 /* Inter RAT information container 10.5.5.24 TS 24.008 version 6.8.0 Release 6 */
17096 /*TO DO: Implement */
17097 ELEM_OPT_TLV( 0x27 , BSSAP_PDU_TYPE_DTAP, DE_RAT_INFO_CONTAINER , "" );
17098 EXTRANEOUS_DATA_CHECK(curr_len, 0);
17105 dtap_gmm_rau_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
17107 guint32 curr_offset;
17111 curr_offset = offset;
17114 is_uplink = IS_UPLINK_FALSE;
17115 g_pinfo->p2p_dir = P2P_DIR_SENT;
17117 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_GMM_CAUSE );
17119 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_SPARE_NIBBLE );
17123 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_FORCE_TO_STAND );
17125 ELEM_OPT_TLV( 0x26 , BSSAP_PDU_TYPE_DTAP, DE_GPRS_TIMER_2 , " - T3302" );
17127 EXTRANEOUS_DATA_CHECK(curr_len, 0);
17134 dtap_gmm_status(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
17136 guint32 curr_offset;
17140 curr_offset = offset;
17143 is_uplink = IS_UPLINK_UNKNOWN;
17144 g_pinfo->p2p_dir = P2P_DIR_UNKNOWN;
17146 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_GMM_CAUSE );
17148 EXTRANEOUS_DATA_CHECK(curr_len, 0);
17152 * [8] 9.4.19 GMM Information
17155 dtap_gmm_information(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
17157 guint32 curr_offset;
17161 curr_offset = offset;
17164 is_uplink = IS_UPLINK_FALSE;
17165 g_pinfo->p2p_dir = P2P_DIR_SENT;
17167 ELEM_OPT_TLV( 0x43 , BSSAP_PDU_TYPE_DTAP, DE_NETWORK_NAME , " - Full Name" );
17169 ELEM_OPT_TLV( 0x45 , BSSAP_PDU_TYPE_DTAP, DE_NETWORK_NAME , " - Short Name" );
17171 ELEM_OPT_TV( 0x46 , BSSAP_PDU_TYPE_DTAP, DE_TIME_ZONE , "" );
17173 ELEM_OPT_TV( 0x47 , BSSAP_PDU_TYPE_DTAP, DE_TIME_ZONE_TIME , "" );
17175 ELEM_OPT_TLV( 0x48 , BSSAP_PDU_TYPE_DTAP, DE_LSA_ID , "" );
17177 ELEM_OPT_TLV( 0x49 , BSSAP_PDU_TYPE_DTAP, DE_DAY_SAVING_TIME , "" );
17179 EXTRANEOUS_DATA_CHECK(curr_len, 0);
17186 dtap_gmm_service_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
17188 guint32 curr_offset;
17192 curr_offset = offset;
17195 is_uplink = IS_UPLINK_TRUE;
17196 g_pinfo->p2p_dir = P2P_DIR_RECV;
17198 /* Is included in SRVC TYPE
17199 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_CIPH_KEY_SEQ_NUM );
17204 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_SRVC_TYPE );
17206 /* P-TMSI Mobile station identity 10.5.1.4 M LV 6 */
17207 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_MID, "");
17209 ELEM_OPT_TLV( 0x32 , BSSAP_PDU_TYPE_DTAP, DE_PDP_CONTEXT_STAT , "" );
17211 /* MBMS context status 10.5.7.6 TLV 2 - 18 */
17212 ELEM_OPT_TLV( 0x35 , BSSAP_PDU_TYPE_DTAP, DE_MBMS_CTX_STATUS , "" );
17214 EXTRANEOUS_DATA_CHECK(curr_len, 0);
17221 dtap_gmm_service_acc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
17223 guint32 curr_offset;
17227 curr_offset = offset;
17230 is_uplink = IS_UPLINK_FALSE;
17231 g_pinfo->p2p_dir = P2P_DIR_SENT;
17233 ELEM_OPT_TLV( 0x32 , BSSAP_PDU_TYPE_DTAP, DE_PDP_CONTEXT_STAT , "" );
17235 /* MBMS context status 10.5.7.6 TLV 2 - 18 */
17236 ELEM_OPT_TLV( 0x35 , BSSAP_PDU_TYPE_DTAP, DE_MBMS_CTX_STATUS , "" );
17238 EXTRANEOUS_DATA_CHECK(curr_len, 0);
17245 dtap_gmm_service_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
17247 guint32 curr_offset;
17251 curr_offset = offset;
17254 is_uplink = IS_UPLINK_FALSE;
17255 g_pinfo->p2p_dir = P2P_DIR_SENT;
17257 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_GMM_CAUSE );
17259 EXTRANEOUS_DATA_CHECK(curr_len, 0);
17263 * [8] 9.5.1 Activate PDP context request
17266 dtap_sm_act_pdp_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
17268 guint32 curr_offset;
17272 curr_offset = offset;
17275 is_uplink = IS_UPLINK_UNKNOWN;
17276 g_pinfo->p2p_dir = P2P_DIR_UNKNOWN;
17278 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_NET_SAPI );
17280 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_LLC_SAPI );
17282 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_QOS , " - Requested QoS" );
17284 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_PD_PRO_ADDR , " - Requested PDP address" );
17286 ELEM_OPT_TLV( 0x28 , BSSAP_PDU_TYPE_DTAP, DE_ACC_POINT_NAME , "" );
17288 ELEM_OPT_TLV( 0x27 , BSSAP_PDU_TYPE_DTAP, DE_PRO_CONF_OPT , "" );
17290 EXTRANEOUS_DATA_CHECK(curr_len, 0);
17294 * [8] 9.5.2 Activate PDP context accept
17297 dtap_sm_act_pdp_acc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
17299 guint32 curr_offset;
17303 curr_offset = offset;
17306 is_uplink = IS_UPLINK_UNKNOWN;
17307 g_pinfo->p2p_dir = P2P_DIR_UNKNOWN;
17309 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_LLC_SAPI );
17311 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_QOS , " - Negotiated QoS" );
17314 /* This is done automatically */
17315 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_SPARE );
17320 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RAD_PRIO );
17322 ELEM_OPT_TLV( 0x2B , BSSAP_PDU_TYPE_DTAP, DE_PD_PRO_ADDR , "" );
17324 ELEM_OPT_TLV( 0x27 , BSSAP_PDU_TYPE_DTAP, DE_PRO_CONF_OPT , "" );
17326 ELEM_OPT_TLV( 0x34 , BSSAP_PDU_TYPE_DTAP, DE_PACKET_FLOW_ID , "" );
17328 EXTRANEOUS_DATA_CHECK(curr_len, 0);
17332 * [8] 9.5.3 Activate PDP context reject
17335 dtap_sm_act_pdp_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
17337 guint32 curr_offset;
17341 curr_offset = offset;
17344 is_uplink = IS_UPLINK_UNKNOWN;
17345 g_pinfo->p2p_dir = P2P_DIR_UNKNOWN;
17347 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_SM_CAUSE );
17349 ELEM_OPT_TLV( 0x27 , BSSAP_PDU_TYPE_DTAP, DE_PRO_CONF_OPT , "" );
17351 EXTRANEOUS_DATA_CHECK(curr_len, 0);
17355 * [8] 9.5.4 Activate Secondary PDP Context Request
17358 dtap_sm_act_sec_pdp_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
17360 guint32 curr_offset;
17364 curr_offset = offset;
17367 is_uplink = IS_UPLINK_UNKNOWN;
17368 g_pinfo->p2p_dir = P2P_DIR_UNKNOWN;
17370 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_NET_SAPI );
17372 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_LLC_SAPI );
17374 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_QOS , " - Requested QoS" );
17376 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_LINKED_TI , "" );
17378 /* 3GPP TS 24.008 version 6.8.0 Release 6, 36 TFT Traffic Flow Template 10.5.6.12 O TLV 3-257 */
17379 ELEM_OPT_TLV( 0x36 , BSSAP_PDU_TYPE_DTAP, DE_TRAFFIC_FLOW_TEMPLATE , "" );
17381 ELEM_OPT_TLV( 0x27 , BSSAP_PDU_TYPE_DTAP, DE_PRO_CONF_OPT , "" );
17383 EXTRANEOUS_DATA_CHECK(curr_len, 0);
17390 dtap_sm_act_sec_pdp_acc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
17392 guint32 curr_offset;
17396 curr_offset = offset;
17399 is_uplink = IS_UPLINK_UNKNOWN;
17400 g_pinfo->p2p_dir = P2P_DIR_UNKNOWN;
17402 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_LLC_SAPI );
17404 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_QOS , " - Negotiated QoS" );
17406 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RAD_PRIO);
17409 /* This is done automatically */
17410 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_SPARE );
17415 ELEM_OPT_TLV( 0x34 , BSSAP_PDU_TYPE_DTAP, DE_PACKET_FLOW_ID , "" );
17417 ELEM_OPT_TLV( 0x27 , BSSAP_PDU_TYPE_DTAP, DE_PRO_CONF_OPT , "" );
17419 EXTRANEOUS_DATA_CHECK(curr_len, 0);
17423 * [8] 9.5.6 Activate Secondary PDP Context Reject
17426 dtap_sm_act_sec_pdp_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
17428 guint32 curr_offset;
17432 curr_offset = offset;
17435 is_uplink = IS_UPLINK_UNKNOWN;
17436 g_pinfo->p2p_dir = P2P_DIR_UNKNOWN;
17438 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_SM_CAUSE );
17440 ELEM_OPT_TLV( 0x27 , BSSAP_PDU_TYPE_DTAP, DE_PRO_CONF_OPT , "" );
17442 EXTRANEOUS_DATA_CHECK(curr_len, 0);
17446 * [8] 9.5.7 Request PDP context activation
17449 dtap_sm_req_pdp_act(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
17451 guint32 curr_offset;
17455 curr_offset = offset;
17458 is_uplink = IS_UPLINK_UNKNOWN;
17459 g_pinfo->p2p_dir = P2P_DIR_UNKNOWN;
17461 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_PD_PRO_ADDR , " - Offered PDP address" );
17463 ELEM_OPT_TLV( 0x28 , BSSAP_PDU_TYPE_DTAP, DE_ACC_POINT_NAME , "" );
17465 ELEM_OPT_TLV( 0x27 , BSSAP_PDU_TYPE_DTAP, DE_PRO_CONF_OPT , "" );
17467 EXTRANEOUS_DATA_CHECK(curr_len, 0);
17471 * [8] 9.5.8 Request PDP context activation reject
17474 dtap_sm_req_pdp_act_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
17476 guint32 curr_offset;
17480 curr_offset = offset;
17483 is_uplink = IS_UPLINK_UNKNOWN;
17484 g_pinfo->p2p_dir = P2P_DIR_UNKNOWN;
17486 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_SM_CAUSE );
17488 ELEM_OPT_TLV( 0x27 , BSSAP_PDU_TYPE_DTAP, DE_PRO_CONF_OPT , "" );
17490 EXTRANEOUS_DATA_CHECK(curr_len, 0);
17494 * [8] 9.5.9 Modify PDP context request (Network to MS direction)
17497 dtap_sm_mod_pdp_req_net(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
17499 guint32 curr_offset;
17503 curr_offset = offset;
17506 is_uplink = IS_UPLINK_UNKNOWN;
17507 g_pinfo->p2p_dir = P2P_DIR_UNKNOWN;
17509 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP,DE_RAD_PRIO);
17511 /* This is done automatically */
17512 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_SPARE );
17517 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_LLC_SAPI );
17519 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_QOS , " - New QoS" );
17521 ELEM_OPT_TLV( 0x2B , BSSAP_PDU_TYPE_DTAP, DE_PD_PRO_ADDR , "" );
17523 ELEM_OPT_TLV( 0x34 , BSSAP_PDU_TYPE_DTAP, DE_PACKET_FLOW_ID , "" );
17525 ELEM_OPT_TLV( 0x27 , BSSAP_PDU_TYPE_DTAP, DE_PRO_CONF_OPT , "" );
17527 EXTRANEOUS_DATA_CHECK(curr_len, 0);
17531 * [8] 9.5.10 Modify PDP context request (MS to network direction)
17534 dtap_sm_mod_pdp_req_ms(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
17536 guint32 curr_offset;
17540 curr_offset = offset;
17543 is_uplink = IS_UPLINK_UNKNOWN;
17544 g_pinfo->p2p_dir = P2P_DIR_UNKNOWN;
17546 ELEM_OPT_TV( 0x32 , BSSAP_PDU_TYPE_DTAP, DE_LLC_SAPI , " - Requested LLC SAPI" );
17548 ELEM_OPT_TLV( 0x30 , BSSAP_PDU_TYPE_DTAP, DE_QOS , " - Requested new QoS" );
17550 ELEM_OPT_TLV( 0x31 , BSSAP_PDU_TYPE_DTAP, DE_TRAFFIC_FLOW_TEMPLATE , " - New TFT" );
17552 ELEM_OPT_TLV( 0x27 , BSSAP_PDU_TYPE_DTAP, DE_PRO_CONF_OPT , "" );
17554 EXTRANEOUS_DATA_CHECK(curr_len, 0);
17558 * [8] 9.5.11 Modify PDP context accept (MS to network direction)
17561 dtap_sm_mod_pdp_acc_ms(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
17563 guint32 curr_offset;
17567 curr_offset = offset;
17570 is_uplink = IS_UPLINK_UNKNOWN;
17571 g_pinfo->p2p_dir = P2P_DIR_UNKNOWN;
17573 ELEM_OPT_TLV( 0x27 , BSSAP_PDU_TYPE_DTAP, DE_PRO_CONF_OPT , "" );
17575 EXTRANEOUS_DATA_CHECK(curr_len, 0);
17579 * [8] 9.5.12 Modify PDP context accept (Network to MS direction)
17582 dtap_sm_mod_pdp_acc_net(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
17584 guint32 curr_offset;
17588 curr_offset = offset;
17591 is_uplink = IS_UPLINK_UNKNOWN;
17592 g_pinfo->p2p_dir = P2P_DIR_UNKNOWN;
17594 ELEM_OPT_TLV( 0x30 , BSSAP_PDU_TYPE_DTAP, DE_QOS , " - Negotiated QoS" );
17596 ELEM_OPT_TV( 0x32 , BSSAP_PDU_TYPE_DTAP, DE_LLC_SAPI , " - Negotiated LLC SAPI" );
17598 ELEM_OPT_TV_SHORT ( 0x80 , BSSAP_PDU_TYPE_DTAP , DE_RAD_PRIO , " - New radio priority" );
17600 ELEM_OPT_TLV( 0x34 , BSSAP_PDU_TYPE_DTAP, DE_PACKET_FLOW_ID , "" );
17602 ELEM_OPT_TLV( 0x27 , BSSAP_PDU_TYPE_DTAP, DE_PRO_CONF_OPT , "" );
17604 EXTRANEOUS_DATA_CHECK(curr_len, 0);
17608 * [8] 9.5.13 Modify PDP Context Reject
17611 dtap_sm_mod_pdp_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
17613 guint32 curr_offset;
17617 curr_offset = offset;
17620 is_uplink = IS_UPLINK_UNKNOWN;
17621 g_pinfo->p2p_dir = P2P_DIR_UNKNOWN;
17623 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_SM_CAUSE );
17625 ELEM_OPT_TLV( 0x27 , BSSAP_PDU_TYPE_DTAP, DE_PRO_CONF_OPT , "" );
17627 EXTRANEOUS_DATA_CHECK(curr_len, 0);
17631 * [8] 9.5.14 Deactivate PDP context request
17634 dtap_sm_deact_pdp_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
17636 guint32 curr_offset;
17640 curr_offset = offset;
17643 is_uplink = IS_UPLINK_UNKNOWN;
17644 g_pinfo->p2p_dir = P2P_DIR_UNKNOWN;
17646 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_SM_CAUSE );
17648 ELEM_OPT_TV_SHORT( 0x90 , BSSAP_PDU_TYPE_DTAP , DE_TEAR_DOWN_IND , "" );
17650 ELEM_OPT_TLV( 0x27 , BSSAP_PDU_TYPE_DTAP, DE_PRO_CONF_OPT , "" );
17652 /* MBMS context status 10.5.7.6 TLV 2 - 18 */
17653 ELEM_OPT_TLV( 0x35 , BSSAP_PDU_TYPE_DTAP, DE_MBMS_CTX_STATUS , "" );
17655 EXTRANEOUS_DATA_CHECK(curr_len, 0);
17660 * [8] 9.5.15 Deactivate PDP context accept
17663 dtap_sm_deact_pdp_acc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
17665 guint32 curr_offset;
17669 curr_offset = offset;
17672 is_uplink = IS_UPLINK_UNKNOWN;
17673 g_pinfo->p2p_dir = P2P_DIR_UNKNOWN;
17675 ELEM_OPT_TLV( 0x27 , BSSAP_PDU_TYPE_DTAP, DE_PRO_CONF_OPT , "" );
17677 /* MBMS context status 10.5.7.6 TLV 2 - 18 */
17678 ELEM_OPT_TLV( 0x35 , BSSAP_PDU_TYPE_DTAP, DE_MBMS_CTX_STATUS , "" );
17680 EXTRANEOUS_DATA_CHECK(curr_len, 0);
17684 * [8] 9.5.21 SM Status
17687 dtap_sm_status(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
17689 guint32 curr_offset;
17693 curr_offset = offset;
17696 is_uplink = IS_UPLINK_UNKNOWN;
17697 g_pinfo->p2p_dir = P2P_DIR_UNKNOWN;
17699 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_SM_CAUSE );
17701 EXTRANEOUS_DATA_CHECK(curr_len, 0);
17705 * [8] 9.5.22 Activate MBMS Context Request
17708 /* Requested MBMS NSAPI Enhanced Network service access point identifier 10.5.6.15 M V */
17709 /* Requested LLC SAPI LLC service access point identifier 10.5.6.9 M V 1 */
17710 /* Supported MBMS bearer capabilities MBMS bearer capabilities 10.5.6.14 M LV 2 - 3 */
17711 /* Requested multicast address Packet data protocol address 10.5.6.4 M LV 3 - 19 */
17712 /* Access point name Access point name 10.5.6.1 M LV 2 - 101 */
17713 /* 35 MBMS protocol configuration options MBMS protocol configuration options 10.5.6.15 O TLV 3 - 253 */
17716 * [8] 9.5.23 Activate MBMS Context Accept
17720 * [8] 9.5.24 Activate MBMS Context Reject
17724 * [8] 9.5.25 Request MBMS Context Activation
17728 * [8] 9.5.26 Request MBMS Context Activation Reject
17731 #define NUM_GSM_DTAP_MSG_MM (sizeof(gsm_a_dtap_msg_mm_strings)/sizeof(value_string))
17732 static gint ett_gsm_dtap_msg_mm[NUM_GSM_DTAP_MSG_MM];
17733 static void (*dtap_msg_mm_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) = {
17734 dtap_mm_imsi_det_ind, /* IMSI Detach Indication */
17735 dtap_mm_loc_upd_acc, /* Location Updating Accept */
17736 dtap_mm_loc_upd_rej, /* Location Updating Reject */
17737 dtap_mm_loc_upd_req, /* Location Updating Request */
17738 NULL /* no associated data */, /* Authentication Reject */
17739 dtap_mm_auth_req, /* Authentication Request */
17740 dtap_mm_auth_resp, /* Authentication Response */
17741 dtap_mm_auth_fail, /* Authentication Failure */
17742 dtap_mm_id_req, /* Identity Request */
17743 dtap_mm_id_resp, /* Identity Response */
17744 dtap_mm_tmsi_realloc_cmd, /* TMSI Reallocation Command */
17745 NULL /* no associated data */, /* TMSI Reallocation Complete */
17746 NULL /* no associated data */, /* CM Service Accept */
17747 dtap_mm_cm_srvc_rej, /* CM Service Reject */
17748 NULL /* no associated data */, /* CM Service Abort */
17749 dtap_mm_cm_srvc_req, /* CM Service Request */
17750 dtap_mm_cm_srvc_prompt, /* CM Service Prompt */
17751 NULL, /* Reserved: was allocated in earlier phases of the protocol */
17752 dtap_mm_cm_reestab_req, /* CM Re-establishment Request */
17753 dtap_mm_abort, /* Abort */
17754 NULL /* no associated data */, /* MM Null */
17755 dtap_mm_mm_status, /* MM Status */
17756 dtap_mm_mm_info, /* MM Information */
17760 #define NUM_GSM_DTAP_MSG_RR (sizeof(gsm_a_dtap_msg_rr_strings)/sizeof(value_string))
17761 static gint ett_gsm_dtap_msg_rr[NUM_GSM_DTAP_MSG_RR];
17762 static void (*dtap_msg_rr_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) = {
17763 NULL, /* RR Initialisation Request */
17764 NULL, /* Additional Assignment */
17765 NULL, /* Immediate Assignment */
17766 NULL, /* Immediate Assignment Extended */
17767 NULL, /* Immediate Assignment Reject */
17769 NULL, /* DTM Assignment Failure */
17770 NULL, /* DTM Reject */
17771 NULL, /* DTM Request */
17772 NULL, /* Main DCCH Assignment Command */
17773 NULL, /* Packet Assignment Command */
17775 NULL, /* Ciphering Mode Command */
17776 NULL, /* Ciphering Mode Complete */
17778 NULL, /* Configuration Change Command */
17779 NULL, /* Configuration Change Ack. */
17780 NULL, /* Configuration Change Reject */
17782 NULL, /* Assignment Command */
17783 NULL, /* Assignment Complete */
17784 NULL, /* Assignment Failure */
17785 dtap_rr_ho_cmd, /* Handover Command */
17786 NULL, /* Handover Complete */
17787 NULL, /* Handover Failure */
17788 NULL, /* Physical Information */
17789 NULL, /* DTM Assignment Command */
17791 NULL, /* RR-cell Change Order */
17792 NULL, /* PDCH Assignment Command */
17794 NULL, /* Channel Release */
17795 NULL, /* Partial Release */
17796 NULL, /* Partial Release Complete */
17798 NULL, /* Paging Request Type 1 */
17799 NULL, /* Paging Request Type 2 */
17800 NULL, /* Paging Request Type 3 */
17801 dtap_rr_paging_resp, /* Paging Response */
17802 NULL, /* Notification/NCH */
17803 NULL, /* Reserved */
17804 NULL, /* Notification/Response */
17806 NULL, /* Reserved */
17808 NULL, /* Utran Classmark Change */
17809 NULL, /* UE RAB Preconfiguration */
17810 NULL, /* cdma2000 Classmark Change */
17811 NULL, /* Inter System to UTRAN Handover Command */
17812 NULL, /* Inter System to cdma2000 Handover Command */
17814 NULL, /* System Information Type 8 */
17815 NULL, /* System Information Type 1 */
17816 NULL, /* System Information Type 2 */
17817 NULL, /* System Information Type 3 */
17818 NULL, /* System Information Type 4 */
17819 NULL, /* System Information Type 5 */
17820 NULL, /* System Information Type 6 */
17821 NULL, /* System Information Type 7 */
17823 NULL, /* System Information Type 2bis */
17824 NULL, /* System Information Type 2ter */
17825 NULL, /* System Information Type 2quater */
17826 NULL, /* System Information Type 5bis */
17827 NULL, /* System Information Type 5ter */
17828 NULL, /* System Information Type 9 */
17829 NULL, /* System Information Type 13 */
17831 NULL, /* System Information Type 16 */
17832 NULL, /* System Information Type 17 */
17834 NULL, /* System Information Type 18 */
17835 NULL, /* System Information Type 19 */
17836 NULL, /* System Information Type 20 */
17838 NULL, /* Channel Mode Modify */
17839 dtap_rr_rr_status, /* RR Status */
17840 NULL, /* Channel Mode Modify Acknowledge */
17841 NULL, /* Frequency Redefinition */
17842 NULL, /* Measurement Report */
17843 NULL, /* Classmark Change */
17844 NULL, /* Classmark Enquiry */
17845 NULL, /* Extended Measurement Report */
17846 NULL, /* Extended Measurement Order */
17847 NULL, /* GPRS Suspension Request */
17849 NULL, /* VGCS Uplink Grant */
17850 NULL, /* Uplink Release */
17851 NULL, /* Reserved */
17852 NULL, /* Uplink Busy */
17853 NULL, /* Talker Indication */
17855 NULL, /* UTRAN Classmark Change/Handover To UTRAN Command */ /* spec conflict */
17857 NULL, /* Application Information */
17862 #define NUM_GSM_DTAP_MSG_CC (sizeof(gsm_a_dtap_msg_cc_strings)/sizeof(value_string))
17863 static gint ett_gsm_dtap_msg_cc[NUM_GSM_DTAP_MSG_CC];
17864 static void (*dtap_msg_cc_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) = {
17865 dtap_cc_alerting, /* Alerting */
17866 dtap_cc_call_conf, /* Call Confirmed */
17867 dtap_cc_call_proceed, /* Call Proceeding */
17868 dtap_cc_connect, /* Connect */
17869 NULL /* no associated data */, /* Connect Acknowledge */
17870 dtap_cc_emerg_setup, /* Emergency Setup */
17871 dtap_cc_progress, /* Progress */
17872 dtap_cc_cc_est, /* CC-Establishment */
17873 dtap_cc_cc_est_conf, /* CC-Establishment Confirmed */
17874 dtap_cc_recall, /* Recall */
17875 dtap_cc_start_cc, /* Start CC */
17876 dtap_cc_setup, /* Setup */
17877 dtap_cc_modify, /* Modify */
17878 dtap_cc_modify_complete, /* Modify Complete */
17879 dtap_cc_modify_rej, /* Modify Reject */
17880 dtap_cc_user_info, /* User Information */
17881 NULL /* no associated data */, /* Hold */
17882 NULL /* no associated data */, /* Hold Acknowledge */
17883 dtap_cc_hold_rej, /* Hold Reject */
17884 NULL /* no associated data */, /* Retrieve */
17885 NULL /* no associated data */, /* Retrieve Acknowledge */
17886 dtap_cc_retrieve_rej, /* Retrieve Reject */
17887 dtap_cc_disconnect, /* Disconnect */
17888 dtap_cc_release, /* Release */
17889 dtap_cc_release_complete, /* Release Complete */
17890 dtap_cc_congestion_control, /* Congestion Control */
17891 dtap_cc_notify, /* Notify */
17892 dtap_cc_status, /* Status */
17893 NULL /* no associated data */, /* Status Enquiry */
17894 dtap_cc_start_dtmf, /* Start DTMF */
17895 NULL /* no associated data */, /* Stop DTMF */
17896 NULL /* no associated data */, /* Stop DTMF Acknowledge */
17897 dtap_cc_start_dtmf_ack, /* Start DTMF Acknowledge */
17898 dtap_cc_start_dtmf_rej, /* Start DTMF Reject */
17899 dtap_cc_facility, /* Facility */
17903 #define NUM_GSM_DTAP_MSG_GMM (sizeof(gsm_a_dtap_msg_gmm_strings)/sizeof(value_string))
17904 static gint ett_gsm_dtap_msg_gmm[NUM_GSM_DTAP_MSG_GMM];
17905 static void (*dtap_msg_gmm_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) = {
17906 dtap_gmm_attach_req, /* Attach Request */
17907 dtap_gmm_attach_acc, /* Attach Accept */
17908 dtap_gmm_attach_com, /* Attach Complete */
17909 dtap_gmm_attach_rej, /* Attach Reject */
17910 dtap_gmm_detach_req, /* Detach Request */
17911 dtap_gmm_detach_acc, /* Detach Accept */
17912 dtap_gmm_rau_req, /* Routing Area Update Request */
17913 dtap_gmm_rau_acc, /* Routing Area Update Accept */
17914 dtap_gmm_rau_com, /* Routing Area Update Complete */
17915 dtap_gmm_rau_rej, /* Routing Area Update Reject */
17916 dtap_gmm_service_req, /* Service Request */
17917 dtap_gmm_service_acc, /* Service Accept */
17918 dtap_gmm_service_rej, /* Service Reject */
17919 dtap_gmm_ptmsi_realloc_cmd, /* P-TMSI Reallocation Command */
17920 dtap_gmm_ptmsi_realloc_com, /* P-TMSI Reallocation Complete */
17921 dtap_gmm_auth_ciph_req, /* Authentication and Ciphering Req */
17922 dtap_gmm_auth_ciph_resp, /* Authentication and Ciphering Resp */
17923 dtap_gmm_auth_ciph_rej, /* Authentication and Ciphering Rej */
17924 dtap_gmm_auth_ciph_fail, /* Authentication and Ciphering Failure */
17925 dtap_gmm_ident_req, /* Identity Request */
17926 dtap_gmm_ident_res, /* Identity Response */
17927 dtap_gmm_status, /* GMM Status */
17928 dtap_gmm_information, /* GMM Information */
17932 #define NUM_GSM_DTAP_MSG_SMS (sizeof(gsm_a_dtap_msg_sms_strings)/sizeof(value_string))
17933 static gint ett_gsm_dtap_msg_sms[NUM_GSM_DTAP_MSG_SMS];
17934 static void (*dtap_msg_sms_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) = {
17935 dtap_sms_cp_data, /* CP-DATA */
17936 NULL /* no associated data */, /* CP-ACK */
17937 dtap_sms_cp_error, /* CP-ERROR */
17941 #define NUM_GSM_DTAP_MSG_SM (sizeof(gsm_a_dtap_msg_sm_strings)/sizeof(value_string))
17942 static gint ett_gsm_dtap_msg_sm[NUM_GSM_DTAP_MSG_SM];
17943 static void (*dtap_msg_sm_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) = {
17944 dtap_sm_act_pdp_req, /* Activate PDP Context Request */
17945 dtap_sm_act_pdp_acc, /* Activate PDP Context Accept */
17946 dtap_sm_act_pdp_rej, /* Activate PDP Context Reject */
17947 dtap_sm_req_pdp_act, /* Request PDP Context Activation */
17948 dtap_sm_req_pdp_act_rej, /* Request PDP Context Activation rej. */
17949 dtap_sm_deact_pdp_req, /* Deactivate PDP Context Request */
17950 dtap_sm_deact_pdp_acc, /* Deactivate PDP Context Accept */
17951 dtap_sm_mod_pdp_req_net, /* Modify PDP Context Request(Network to MS direction) */
17952 dtap_sm_mod_pdp_acc_ms, /* Modify PDP Context Accept (MS to network direction) */
17953 dtap_sm_mod_pdp_req_ms, /* Modify PDP Context Request(MS to network direction) */
17954 dtap_sm_mod_pdp_acc_net, /* Modify PDP Context Accept (Network to MS direction) */
17955 dtap_sm_mod_pdp_rej, /* Modify PDP Context Reject */
17956 dtap_sm_act_sec_pdp_req, /* Activate Secondary PDP Context Request */
17957 dtap_sm_act_sec_pdp_acc, /* Activate Secondary PDP Context Accept */
17958 dtap_sm_act_sec_pdp_rej, /* Activate Secondary PDP Context Reject */
17959 NULL, /* Reserved: was allocated in earlier phases of the protocol */
17960 NULL, /* Reserved: was allocated in earlier phases of the protocol */
17961 NULL, /* Reserved: was allocated in earlier phases of the protocol */
17962 NULL, /* Reserved: was allocated in earlier phases of the protocol */
17963 NULL, /* Reserved: was allocated in earlier phases of the protocol */
17964 dtap_sm_status, /* SM Status */
17965 /* Activate MBMS Context Request */
17966 /* Activate MBMS Context Accept */
17967 /* Activate MBMS Context Reject */
17968 /* Request MBMS Context Activation */
17969 /* Request MBMS Context Activation Reject */
17973 #define NUM_GSM_DTAP_MSG_SS (sizeof(gsm_a_dtap_msg_ss_strings)/sizeof(value_string))
17974 static gint ett_gsm_dtap_msg_ss[NUM_GSM_DTAP_MSG_SS];
17975 static void (*dtap_msg_ss_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) = {
17976 dtap_cc_release_complete, /* Release Complete */
17977 dtap_cc_facility, /* Facility */
17978 dtap_ss_register, /* Register */
17982 #define NUM_GSM_RP_MSG (sizeof(gsm_rp_msg_strings)/sizeof(value_string))
17983 static gint ett_gsm_rp_msg[NUM_GSM_RP_MSG];
17984 static void (*rp_msg_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) = {
17985 rp_data_ms_n, /* RP-DATA (MS to Network) */
17986 rp_data_n_ms, /* RP-DATA (Network to MS */
17987 rp_ack_ms_n, /* RP-ACK (MS to Network) */
17988 rp_ack_n_ms, /* RP-ACK (Network to MS) */
17989 rp_error_ms_n, /* RP-ERROR (MS to Network) */
17990 rp_error_n_ms, /* RP-ERROR (Network to MS) */
17991 rp_smma, /* RP-SMMA (MS to Network) */
17995 /* GENERIC DISSECTOR FUNCTIONS */
17998 dissect_rp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
18001 guint32 offset, saved_offset;
18004 proto_item *rp_item = NULL;
18005 proto_tree *rp_tree = NULL;
18009 if (check_col(pinfo->cinfo, COL_INFO))
18011 col_append_str(pinfo->cinfo, COL_INFO, "(RP) ");
18015 * In the interest of speed, if "tree" is NULL, don't do any work
18016 * not necessary to generate protocol tree items.
18024 saved_offset = offset;
18029 len = tvb_length(tvb);
18032 * add RP message name
18034 oct = tvb_get_guint8(tvb, offset++);
18036 str = match_strval_idx((guint32) oct, gsm_rp_msg_strings, &idx);
18039 * create the protocol tree
18044 proto_tree_add_protocol_format(tree, proto_a_rp, tvb, 0, len,
18045 "GSM A-I/F RP - Unknown RP Message Type (0x%02x)",
18048 rp_tree = proto_item_add_subtree(rp_item, ett_rp_msg);
18053 proto_tree_add_protocol_format(tree, proto_a_rp, tvb, 0, -1,
18054 "GSM A-I/F RP - %s",
18057 rp_tree = proto_item_add_subtree(rp_item, ett_gsm_rp_msg[idx]);
18059 if (check_col(pinfo->cinfo, COL_INFO))
18061 col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", str);
18066 * add RP message name
18068 proto_tree_add_uint_format(rp_tree, hf_gsm_a_rp_msg_type,
18069 tvb, saved_offset, 1, oct, "Message Type %s", str ? str : "(Unknown)");
18071 if (str == NULL) return;
18073 if ((len - offset) <= 0) return;
18078 if (rp_msg_fcn[idx] == NULL)
18080 proto_tree_add_text(rp_tree,
18081 tvb, offset, len - offset,
18082 "Message Elements");
18086 (*rp_msg_fcn[idx])(tvb, rp_tree, offset, len - offset);
18092 dissect_bssmap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
18094 static gsm_a_tap_rec_t tap_rec[4];
18095 static gsm_a_tap_rec_t *tap_p;
18096 static int tap_current=0;
18098 guint32 offset, saved_offset;
18101 proto_item *bssmap_item = NULL;
18102 proto_tree *bssmap_tree = NULL;
18106 sccp_msg = pinfo->sccp_info;
18108 if (sccp_msg && sccp_msg->assoc) {
18109 sccp_assoc = sccp_msg->assoc;
18115 if (check_col(pinfo->cinfo, COL_INFO))
18117 col_append_str(pinfo->cinfo, COL_INFO, "(BSSMAP) ");
18121 * set tap record pointer
18124 if (tap_current == 4)
18128 tap_p = &tap_rec[tap_current];
18132 saved_offset = offset;
18137 len = tvb_length(tvb);
18140 * add BSSMAP message name
18142 oct = tvb_get_guint8(tvb, offset++);
18144 str = match_strval_idx((guint32) oct, gsm_a_bssmap_msg_strings, &idx);
18146 if (sccp_msg && !sccp_msg->label) {
18147 sccp_msg->label = se_strdup(val_to_str((guint32) oct, gsm_a_bssmap_msg_strings, "BSSMAP (0x%02x)"));
18151 * create the protocol tree
18156 proto_tree_add_protocol_format(tree, proto_a_bssmap, tvb, 0, len,
18157 "GSM A-I/F BSSMAP - Unknown BSSMAP Message Type (0x%02x)",
18160 bssmap_tree = proto_item_add_subtree(bssmap_item, ett_bssmap_msg);
18165 proto_tree_add_protocol_format(tree, proto_a_bssmap, tvb, 0, -1,
18166 "GSM A-I/F BSSMAP - %s",
18169 bssmap_tree = proto_item_add_subtree(bssmap_item, ett_gsm_bssmap_msg[idx]);
18171 if (check_col(pinfo->cinfo, COL_INFO))
18173 col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", str);
18177 * add BSSMAP message name
18179 proto_tree_add_uint_format(bssmap_tree, hf_gsm_a_bssmap_msg_type,
18180 tvb, saved_offset, 1, oct, "Message Type %s",str);
18183 tap_p->pdu_type = BSSAP_PDU_TYPE_BSSMAP;
18184 tap_p->message_type = oct;
18186 tap_queue_packet(gsm_a_tap, pinfo, tap_p);
18188 if (str == NULL) return;
18190 if ((len - offset) <= 0) return;
18195 if (bssmap_msg_fcn[idx] == NULL)
18197 proto_tree_add_text(bssmap_tree,
18198 tvb, offset, len - offset,
18199 "Message Elements");
18203 (*bssmap_msg_fcn[idx])(tvb, bssmap_tree, offset, len - offset);
18209 dissect_dtap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
18211 static gsm_a_tap_rec_t tap_rec[4];
18212 static gsm_a_tap_rec_t *tap_p;
18213 static int tap_current=0;
18214 void (*msg_fcn)(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len);
18219 guint32 oct_1, oct_2;
18221 proto_item *dtap_item = NULL;
18222 proto_tree *dtap_tree = NULL;
18223 proto_item *oct_1_item = NULL;
18224 proto_tree *pd_tree = NULL;
18225 const gchar *msg_str;
18232 len = tvb_length(tvb);
18237 * too short to be DTAP
18239 call_dissector(data_handle, tvb, pinfo, tree);
18243 if (check_col(pinfo->cinfo, COL_INFO))
18245 col_append_str(pinfo->cinfo, COL_INFO, "(DTAP) ");
18249 * set tap record pointer
18252 if (tap_current == 4)
18256 tap_p = &tap_rec[tap_current];
18266 * get protocol discriminator
18268 oct_1 = tvb_get_guint8(tvb, offset++);
18270 if ((((oct_1 & DTAP_TI_MASK) >> 4) & DTAP_TIE_PRES_MASK) == DTAP_TIE_PRES_MASK)
18273 * eventhough we don't know if a TI should be in the message yet
18274 * we rely on the TI/SKIP indicator to be 0 to avoid taking this
18277 oct_2 = tvb_get_guint8(tvb, offset++);
18280 oct = tvb_get_guint8(tvb, offset);
18282 pd = oct_1 & DTAP_PD_MASK;
18289 if (check_col(pinfo->cinfo, COL_INFO))
18291 col_append_fstr(pinfo->cinfo, COL_INFO, "(%s) ",val_to_str(pd,gsm_a_pd_short_str_vals,"unknown"));
18300 msg_str = match_strval_idx((guint32) (oct & DTAP_CC_IEI_MASK), gsm_a_dtap_msg_cc_strings, &idx);
18301 ett_tree = ett_gsm_dtap_msg_cc[idx];
18302 hf_idx = hf_gsm_a_dtap_msg_cc_type;
18303 msg_fcn = dtap_msg_cc_fcn[idx];
18304 ti = (oct_1 & DTAP_TI_MASK) >> 4;
18309 msg_str = match_strval_idx((guint32) (oct & DTAP_MM_IEI_MASK), gsm_a_dtap_msg_mm_strings, &idx);
18310 ett_tree = ett_gsm_dtap_msg_mm[idx];
18311 hf_idx = hf_gsm_a_dtap_msg_mm_type;
18312 msg_fcn = dtap_msg_mm_fcn[idx];
18317 msg_str = match_strval_idx((guint32) (oct & DTAP_RR_IEI_MASK), gsm_a_dtap_msg_rr_strings, &idx);
18318 ett_tree = ett_gsm_dtap_msg_rr[idx];
18319 hf_idx = hf_gsm_a_dtap_msg_rr_type;
18320 msg_fcn = dtap_msg_rr_fcn[idx];
18324 msg_str = match_strval_idx((guint32) (oct & DTAP_GMM_IEI_MASK), gsm_a_dtap_msg_gmm_strings, &idx);
18325 ett_tree = ett_gsm_dtap_msg_gmm[idx];
18326 hf_idx = hf_gsm_a_dtap_msg_gmm_type;
18327 msg_fcn = dtap_msg_gmm_fcn[idx];
18331 msg_str = match_strval_idx((guint32) (oct & DTAP_SMS_IEI_MASK), gsm_a_dtap_msg_sms_strings, &idx);
18332 ett_tree = ett_gsm_dtap_msg_sms[idx];
18333 hf_idx = hf_gsm_a_dtap_msg_sms_type;
18334 msg_fcn = dtap_msg_sms_fcn[idx];
18335 ti = (oct_1 & DTAP_TI_MASK) >> 4;
18339 msg_str = match_strval_idx((guint32) (oct & DTAP_SM_IEI_MASK), gsm_a_dtap_msg_sm_strings, &idx);
18340 ett_tree = ett_gsm_dtap_msg_sm[idx];
18341 hf_idx = hf_gsm_a_dtap_msg_sm_type;
18342 msg_fcn = dtap_msg_sm_fcn[idx];
18343 ti = (oct_1 & DTAP_TI_MASK) >> 4;
18347 msg_str = match_strval_idx((guint32) (oct & DTAP_SS_IEI_MASK), gsm_a_dtap_msg_ss_strings, &idx);
18348 ett_tree = ett_gsm_dtap_msg_ss[idx];
18349 hf_idx = hf_gsm_a_dtap_msg_ss_type;
18350 msg_fcn = dtap_msg_ss_fcn[idx];
18351 ti = (oct_1 & DTAP_TI_MASK) >> 4;
18356 /* XXX - hf_idx is still -1! this is a bug in the implementation, and I don't know how to fix it so simple return here */
18361 sccp_msg = pinfo->sccp_info;
18363 if (sccp_msg && sccp_msg->assoc) {
18364 sccp_assoc = sccp_msg->assoc;
18371 * create the protocol tree
18373 if (msg_str == NULL)
18376 proto_tree_add_protocol_format(tree, proto_a_dtap, tvb, 0, len,
18377 "GSM A-I/F DTAP - Unknown DTAP Message Type (0x%02x)",
18380 dtap_tree = proto_item_add_subtree(dtap_item, ett_dtap_msg);
18382 if (sccp_msg && !sccp_msg->label) {
18383 sccp_msg->label = se_strdup_printf("DTAP (0x%02x)",oct);
18391 proto_tree_add_protocol_format(tree, proto_a_dtap, tvb, 0, -1,
18392 "GSM A-I/F DTAP - %s",
18395 dtap_tree = proto_item_add_subtree(dtap_item, ett_tree);
18397 if (sccp_msg && !sccp_msg->label) {
18398 sccp_msg->label = se_strdup(msg_str);
18401 if (check_col(pinfo->cinfo, COL_INFO))
18403 col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", msg_str);
18408 proto_tree_add_text(dtap_tree,
18410 "Protocol Discriminator: %s",
18411 val_to_str(pd, protocol_discriminator_vals, "Unknown (%u)"));
18413 pd_tree = proto_item_add_subtree(oct_1_item, ett_dtap_oct_1);
18417 proto_tree_add_item(pd_tree, hf_gsm_a_skip_ind, tvb, 0, 1, FALSE);
18421 other_decode_bitfield_value(a_bigbuf, oct_1, 0x80, 8);
18422 proto_tree_add_text(pd_tree,
18424 "%s : TI flag: %s",
18426 ((oct_1 & 0x80) ? "allocated by receiver" : "allocated by sender"));
18428 if ((ti & DTAP_TIE_PRES_MASK) == DTAP_TIE_PRES_MASK)
18430 /* ti is extended to next octet */
18432 other_decode_bitfield_value(a_bigbuf, oct_1, 0x70, 8);
18433 proto_tree_add_text(pd_tree,
18435 "%s : TIO: The TI value is given by the TIE in octet 2",
18440 other_decode_bitfield_value(a_bigbuf, oct_1, 0x70, 8);
18441 proto_tree_add_text(pd_tree,
18445 ti & DTAP_TIE_PRES_MASK);
18449 proto_tree_add_item(pd_tree, hf_gsm_a_L3_protocol_discriminator, tvb, 0, 1, FALSE);
18452 (ti & DTAP_TIE_PRES_MASK) == DTAP_TIE_PRES_MASK)
18454 proto_tree_add_item(tree, hf_gsm_a_extension, tvb, 1, 1, FALSE);
18456 other_decode_bitfield_value(a_bigbuf, oct_2, DTAP_TIE_MASK, 8);
18457 proto_tree_add_text(pd_tree,
18461 oct_2 & DTAP_TIE_MASK);
18467 if ((pinfo->p2p_dir == P2P_DIR_RECV) &&
18474 * add DTAP message name
18476 proto_tree_add_uint_format(dtap_tree, hf_idx,
18477 tvb, offset, 1, oct,
18478 "Message Type %s",msg_str ? msg_str : "(Unknown)");
18482 tap_p->pdu_type = BSSAP_PDU_TYPE_DTAP;
18483 tap_p->message_type = (nsd ? (oct & 0x3f) : oct);
18484 tap_p->protocol_disc = pd;
18486 tap_queue_packet(gsm_a_tap, pinfo, tap_p);
18488 if (msg_str == NULL) return;
18490 if ((len - offset) <= 0) return;
18495 if (msg_fcn == NULL)
18497 proto_tree_add_text(dtap_tree,
18498 tvb, offset, len - offset,
18499 "Message Elements");
18503 (*msg_fcn)(tvb, dtap_tree, offset, len - offset);
18508 /* Register the protocol with Wireshark */
18510 proto_register_gsm_a(void)
18515 /* Setup list of header fields */
18517 static hf_register_info hf[] =
18519 { &hf_gsm_a_bssmap_msg_type,
18520 { "BSSMAP Message Type", "gsm_a.bssmap_msgtype",
18521 FT_UINT8, BASE_HEX, VALS(gsm_a_bssmap_msg_strings), 0x0,
18524 { &hf_gsm_a_dtap_msg_mm_type,
18525 { "DTAP Mobility Management Message Type", "gsm_a.dtap_msg_mm_type",
18526 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_msg_mm_strings), 0x0,
18529 { &hf_gsm_a_dtap_msg_rr_type,
18530 { "DTAP Radio Resources Management Message Type", "gsm_a.dtap_msg_rr_type",
18531 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_msg_rr_strings), 0x0,
18534 { &hf_gsm_a_dtap_msg_cc_type,
18535 { "DTAP Call Control Message Type", "gsm_a.dtap_msg_cc_type",
18536 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_msg_cc_strings), 0x0,
18539 { &hf_gsm_a_dtap_msg_gmm_type,
18540 { "DTAP GPRS Mobility Management Message Type", "gsm_a.dtap_msg_gmm_type",
18541 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_msg_gmm_strings), 0x0,
18544 { &hf_gsm_a_dtap_msg_sms_type,
18545 { "DTAP Short Message Service Message Type", "gsm_a.dtap_msg_sms_type",
18546 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_msg_sms_strings), 0x0,
18549 { &hf_gsm_a_dtap_msg_sm_type,
18550 { "DTAP GPRS Session Management Message Type", "gsm_a.dtap_msg_sm_type",
18551 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_msg_sm_strings), 0x0,
18554 { &hf_gsm_a_dtap_msg_ss_type,
18555 { "DTAP Non call Supplementary Service Message Type", "gsm_a.dtap_msg_ss_type",
18556 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_msg_ss_strings), 0x0,
18559 { &hf_gsm_a_rp_msg_type,
18560 { "RP Message Type", "gsm_a.rp_msg_type",
18561 FT_UINT8, BASE_HEX, VALS(gsm_rp_msg_strings), 0x0,
18564 { &hf_gsm_a_bssmap_elem_id,
18565 { "Element ID", "gsm_a_bssmap.elem_id",
18566 FT_UINT8, BASE_DEC, NULL, 0,
18569 { &hf_gsm_a_dtap_elem_id,
18570 { "Element ID", "gsm_a_dtap.elem_id",
18571 FT_UINT8, BASE_DEC, NULL, 0,
18574 { &hf_gsm_a_length,
18575 { "Length", "gsm_a.len",
18576 FT_UINT8, BASE_DEC, NULL, 0,
18580 { "Sub tree", "gsm_a.none",
18585 { "IMSI", "gsm_a.imsi",
18586 FT_STRING, BASE_DEC, 0, 0,
18590 { "TMSI/P-TMSI", "gsm_a.tmsi",
18591 FT_UINT32, BASE_HEX, 0, 0x0,
18595 { "IMEI", "gsm_a.imei",
18596 FT_STRING, BASE_DEC, 0, 0,
18599 { &hf_gsm_a_imeisv,
18600 { "IMEISV", "gsm_a.imeisv",
18601 FT_STRING, BASE_DEC, 0, 0,
18604 { &hf_gsm_a_cld_party_bcd_num,
18605 { "Called Party BCD Number", "gsm_a.cld_party_bcd_num",
18606 FT_STRING, BASE_DEC, 0, 0,
18609 { &hf_gsm_a_clg_party_bcd_num,
18610 { "Calling Party BCD Number", "gsm_a.clg_party_bcd_num",
18611 FT_STRING, BASE_DEC, 0, 0,
18614 { &hf_gsm_a_cell_ci,
18615 { "Cell CI", "gsm_a.cell_ci",
18616 FT_UINT16, BASE_HEX_DEC, 0, 0x0,
18619 { &hf_gsm_a_cell_lac,
18620 { "Cell LAC", "gsm_a.cell_lac",
18621 FT_UINT16, BASE_HEX_DEC, 0, 0x0,
18624 { &hf_gsm_a_dlci_cc,
18625 { "Control Channel", "bssap.dlci.cc",
18626 FT_UINT8, BASE_HEX, VALS(bssap_cc_values), 0xc0,
18629 { &hf_gsm_a_dlci_spare,
18630 { "Spare", "bssap.dlci.spare",
18631 FT_UINT8, BASE_HEX, NULL, 0x38,
18634 { &hf_gsm_a_dlci_sapi,
18635 { "SAPI", "bssap.dlci.sapi",
18636 FT_UINT8, BASE_HEX, VALS(bssap_sapi_values), 0x07,
18639 { &hf_gsm_a_bssmap_cause,
18640 { "BSSMAP Cause", "gsm_a_bssmap.cause",
18641 FT_UINT8, BASE_HEX, 0, 0x0,
18644 { &hf_gsm_a_dtap_cause,
18645 { "DTAP Cause", "gsm_a_dtap.cause",
18646 FT_UINT8, BASE_HEX, 0, 0x0,
18649 { &hf_gsm_a_MSC_rev,
18650 { "Revision Level","gsm_a.MSC2_rev",
18651 FT_UINT8,BASE_DEC, VALS(gsm_a_msc_rev_vals), 0x60,
18652 "Revision level", HFILL }
18654 { &hf_gsm_a_ES_IND,
18655 { "ES IND","gsm_a.MSC2_rev",
18656 FT_UINT8,BASE_DEC, VALS(ES_IND_vals), 0x10,
18659 { &hf_gsm_a_qos_traffic_cls,
18660 { "Traffic class", "gsm_a.qos.traffic_cls",
18661 FT_UINT8, BASE_DEC, VALS(gsm_a_qos_traffic_cls_vals), 0xe0,
18662 "Traffic class", HFILL }},
18663 { &hf_gsm_a_qos_del_order,
18664 { "Delivery order", "gsm_a.qos.del_order",
18665 FT_UINT8, BASE_DEC, VALS(gsm_a_qos_traffic_cls_vals), 0x18,
18666 "Delivery order", HFILL }},
18667 { &hf_gsm_a_qos_del_of_err_sdu,
18668 { "Delivery of erroneous SDUs", "gsm_a.qos.del_of_err_sdu",
18669 FT_UINT8, BASE_DEC, VALS(gsm_a_qos_del_of_err_sdu_vals), 0x03,
18670 "Delivery of erroneous SDUs", HFILL }},
18671 { &hf_gsm_a_qos_ber,
18672 { "Residual Bit Error Rate (BER)", "gsm_a.qos.ber",
18673 FT_UINT8, BASE_DEC, VALS(gsm_a_qos_ber_vals), 0xf0,
18674 "Residual Bit Error Rate (BER)", HFILL }},
18675 { &hf_gsm_a_qos_sdu_err_rat,
18676 { "SDU error ratio", "gsm_a.qos.sdu_err_rat",
18677 FT_UINT8, BASE_DEC, VALS(gsm_a_qos_sdu_err_rat_vals), 0x0f,
18678 "SDU error ratio", HFILL }},
18679 { &hf_gsm_a_qos_traff_hdl_pri,
18680 { "Traffic handling priority", "gsm_a.qos.traff_hdl_pri",
18681 FT_UINT8, BASE_DEC, VALS(gsm_a_qos_traff_hdl_pri_vals), 0x03,
18682 "Traffic handling priority", HFILL }},
18683 { &hf_gsm_a_A5_1_algorithm_sup,
18684 { "A5/1 algorithm supported","gsm_a.MSC2_rev",
18685 FT_UINT8,BASE_DEC, VALS(A5_1_algorithm_sup_vals), 0x08,
18686 "A5/1 algorithm supported ", HFILL }
18688 { &hf_gsm_a_RF_power_capability,
18689 { "RF Power Capability","gsm_a.MSC2_rev",
18690 FT_UINT8,BASE_DEC, VALS(RF_power_capability_vals), 0x07,
18691 "RF Power Capability", HFILL }
18693 { &hf_gsm_a_ps_sup_cap,
18694 { "PS capability (pseudo-synchronization capability)","gsm_a.ps_sup_cap",
18695 FT_UINT8,BASE_DEC, VALS(ps_sup_cap_vals), 0x40,
18696 "PS capability (pseudo-synchronization capability)", HFILL }
18698 { &hf_gsm_a_SS_screening_indicator,
18699 { "SS Screening Indicator","gsm_a.SS_screening_indicator",
18700 FT_UINT8,BASE_DEC, VALS(SS_screening_indicator_vals), 0x30,
18701 "SS Screening Indicator", HFILL }
18703 { &hf_gsm_a_SM_capability,
18704 { "SM capability (MT SMS pt to pt capability)","gsm_a.SM_cap",
18705 FT_UINT8,BASE_DEC, VALS(SM_capability_vals), 0x08,
18706 "SM capability (MT SMS pt to pt capability)", HFILL }
18708 { &hf_gsm_a_VBS_notification_rec,
18709 { "VBS notification reception ","gsm_a.VBS_notification_rec",
18710 FT_UINT8,BASE_DEC, VALS(VBS_notification_rec_vals), 0x04,
18711 "VBS notification reception ", HFILL }
18713 { &hf_gsm_a_VGCS_notification_rec,
18714 { "VGCS notification reception ","gsm_a.VGCS_notification_rec",
18715 FT_UINT8,BASE_DEC, VALS(VGCS_notification_rec_vals), 0x02,
18716 "VGCS notification reception", HFILL }
18718 { &hf_gsm_a_FC_frequency_cap,
18719 { "FC Frequency Capability","gsm_a.FC_frequency_cap",
18720 FT_UINT8,BASE_DEC, VALS(FC_frequency_cap_vals), 0x01,
18721 "FC Frequency Capability", HFILL }
18724 { "CM3","gsm_a.CM3",
18725 FT_UINT8,BASE_DEC, VALS(CM3_vals), 0x80,
18728 { &hf_gsm_a_LCS_VA_cap,
18729 { "LCS VA capability (LCS value added location request notification capability) ","gsm_a.LCS_VA_cap",
18730 FT_UINT8,BASE_DEC, VALS(LCS_VA_cap_vals), 0x20,
18731 "LCS VA capability (LCS value added location request notification capability) ", HFILL }
18733 { &hf_gsm_a_UCS2_treatment,
18734 { "UCS2 treatment ","gsm_a.UCS2_treatment",
18735 FT_UINT8,BASE_DEC, VALS(UCS2_treatment_vals), 0x10,
18736 "UCS2 treatment ", HFILL }
18739 { "SoLSA","gsm_a.SoLSA",
18740 FT_UINT8,BASE_DEC, VALS(SoLSA_vals), 0x08,
18744 { "CMSP: CM Service Prompt","gsm_a.CMSP",
18745 FT_UINT8,BASE_DEC, VALS(CMSP_vals), 0x04,
18746 "CMSP: CM Service Prompt", HFILL }
18748 { &hf_gsm_a_A5_3_algorithm_sup,
18749 { "A5/3 algorithm supported","gsm_a.A5_3_algorithm_sup",
18750 FT_UINT8,BASE_DEC, VALS(A5_3_algorithm_sup_vals), 0x02,
18751 "A5/3 algorithm supported", HFILL }
18753 { &hf_gsm_a_A5_2_algorithm_sup,
18754 { "A5/2 algorithm supported","gsm_a.A5_2_algorithm_sup",
18755 FT_UINT8,BASE_DEC, VALS(A5_2_algorithm_sup_vals), 0x01,
18756 "A5/2 algorithm supported", HFILL }
18758 { &hf_gsm_a_mobile_identity_type,
18759 { "Mobile Identity Type","gsm_a.ie.mobileid.type",
18760 FT_UINT8, BASE_DEC, VALS(mobile_identity_type_vals), 0x07,
18761 "Mobile Identity Type", HFILL }
18763 { &hf_gsm_a_odd_even_ind,
18764 { "Odd/even indication","gsm_a.oddevenind",
18765 FT_UINT8, BASE_DEC, oddevenind_vals, 0x08,
18766 "Mobile Identity", HFILL }
18768 { &hf_gsm_a_L3_protocol_discriminator,
18769 { "Protocol discriminator","gsm_a.L3_protocol_discriminator",
18770 FT_UINT8,BASE_DEC, VALS(protocol_discriminator_vals), 0x0f,
18771 "Protocol discriminator", HFILL }
18773 { &hf_gsm_a_skip_ind,
18774 { "Skip Indicator", "gsm_a.skip.ind",
18775 FT_UINT8, BASE_DEC, NULL, 0xf0,
18776 "Skip Indicator", HFILL }
18779 { "BCC","gsm_a.bcc",
18780 FT_UINT8,BASE_DEC, NULL, 0x07,
18784 { "NCC","gsm_a.ncc",
18785 FT_UINT8,BASE_DEC, NULL, 0x38,
18788 { &hf_gsm_a_bcch_arfcn,
18789 { "BCCH ARFCN(RF channel number)","gsm_a.bcch_arfcn",
18790 FT_UINT16,BASE_DEC, NULL, 0x0,
18791 "BCCH ARFCN", HFILL }
18793 { &hf_gsm_a_rr_ho_ref_val,
18794 { "Handover reference value","gsm_a.rr.ho_ref_val",
18795 FT_UINT8,BASE_DEC, NULL, 0x0,
18796 "Handover reference value", HFILL }
18798 { &hf_gsm_a_b7spare,
18799 { "Spare","gsm_a.spareb7",
18800 FT_UINT8,BASE_DEC, NULL, 0x40,
18803 { &hf_gsm_a_b8spare,
18804 { "Spare","gsm_a.spareb8",
18805 FT_UINT8,BASE_DEC, NULL, 0x80,
18808 { &hf_gsm_a_rr_pow_cmd_atc,
18809 { "Spare","gsm_a.rr.pow_cmd_atc",
18810 FT_BOOLEAN,8, TFS(&gsm_a_rr_pow_cmd_atc_value), 0x80,
18813 { &hf_gsm_a_rr_pow_cmd_epc,
18814 { "EPC_mode","gsm_a.rr.pow_cmd_epc",
18815 FT_BOOLEAN,8, TFS(&gsm_a_rr_pow_cmd_epc_value), 0x40,
18816 "EPC_mode", HFILL }
18818 { &hf_gsm_a_rr_pow_cmd_fpcepc,
18819 { "FPC_EPC","gsm_a.rr.pow_cmd_fpcepc",
18820 FT_BOOLEAN,8, TFS(&gsm_a_rr_pow_cmd_fpcepc_value), 0x20,
18823 { &hf_gsm_a_rr_pow_cmd_powlev,
18824 { "POWER LEVEL","sm_a.rr.pow_cmd_pow",
18825 FT_UINT8,BASE_DEC, NULL, 0x1f,
18826 "POWER LEVEL", HFILL }
18828 { &hf_gsm_a_rr_sync_ind_nci,
18829 { "Normal cell indication(NCI)","gsm_a.rr.sync_ind_nci",
18830 FT_BOOLEAN,8, TFS(&gsm_a_rr_sync_ind_nci_value), 0x08,
18831 "Normal cell indication(NCI)", HFILL }
18833 { &hf_gsm_a_rr_sync_ind_rot,
18834 { "Report Observed Time Difference(ROT)","gsm_a.rr.sync_ind_rot",
18835 FT_BOOLEAN,8, TFS(&sm_a_rr_sync_ind_rot_value), 0x04,
18836 "Report Observed Time Difference(ROT)", HFILL }
18838 { &hf_gsm_a_rr_sync_ind_si,
18839 { "Synchronization indication(SI)","gsm_a.rr_sync_ind_si",
18840 FT_UINT8,BASE_DEC, VALS(gsm_a_rr_sync_ind_si_vals), 0x03,
18841 "Synchronization indication(SI)", HFILL }
18843 { &hf_gsm_a_rr_format_id,
18844 { "Format Identifier","gsm_a.rr_format_id",
18845 FT_UINT8,BASE_HEX, VALS(gsm_a_rr_freq_list_format_id_vals), 0xce,
18846 "Format Identifier", HFILL }
18848 { &hf_gsm_a_rr_channel_mode,
18849 { "Channel Mode","gsm_a.rr.channel_mode",
18850 FT_UINT8,BASE_DEC, VALS(gsm_a_rr_channel_mode_vals), 0x0,
18851 "Channel Mode", HFILL }
18853 { &hf_gsm_a_rr_channel_mode2,
18854 { "Channel Mode 2","gsm_a.rr.channel_mode2",
18855 FT_UINT8,BASE_DEC, VALS(gsm_a_rr_channel_mode2_vals), 0x0,
18856 "Channel Mode 2", HFILL }
18859 { "SC","gsm_a.rr.SC",
18860 FT_UINT8,BASE_DEC, VALS(gsm_a_rr_sc_vals), 0x1,
18863 { &hf_gsm_a_algorithm_id,
18864 { "Algorithm identifier","gsm_a.algorithm_identifier",
18865 FT_UINT8,BASE_DEC, VALS(gsm_a_algorithm_identifier_vals), 0xe,
18866 "Algorithm_identifier", HFILL }
18869 { &hf_gsm_a_rr_multirate_speech_ver,
18870 { "Multirate speech version","gsm_a.rr.multirate_speech_ver",
18871 FT_UINT8,BASE_DEC, VALS(multirate_speech_ver_vals), 0xe0,
18872 "Multirate speech version", HFILL }
18874 { &hf_gsm_a_rr_NCSB,
18875 { "NSCB: Noise Suppression Control Bit","gsm_a.rr.NCSB",
18876 FT_UINT8,BASE_DEC, VALS(NSCB_vals), 0x10,
18877 "NSCB: Noise Suppression Control Bit", HFILL }
18879 { &hf_gsm_a_rr_ICMI,
18880 { "ICMI: Initial Codec Mode Indicator","gsm_a.rr.ICMI",
18881 FT_UINT8,BASE_DEC, VALS(ICMI_vals), 0x8,
18882 "ICMI: Initial Codec Mode Indicator", HFILL }
18884 { &hf_gsm_a_rr_start_mode,
18885 { "Start Mode","gsm_a.rr.start_mode",
18886 FT_UINT8,BASE_DEC, NULL, 0x3,
18887 "Start Mode", HFILL }
18889 { &hf_gsm_a_rr_timing_adv,
18890 { "Timing advance value","gsm_a.rr.timing_adv",
18891 FT_UINT8,BASE_DEC, NULL, 0x0,
18892 "Timing advance value", HFILL }
18894 { &hf_gsm_a_rr_time_diff,
18895 { "Time difference value","gsm_a.rr.time_diff",
18896 FT_UINT8,BASE_DEC, NULL, 0x0,
18897 "Time difference value", HFILL }
18899 { &hf_gsm_a_rr_tlli,
18900 { "TLLI","gsm_a.rr.tlli",
18901 FT_UINT32,BASE_HEX, NULL, 0x0,
18904 { &hf_gsm_a_rr_target_mode,
18905 { "Target mode","gsm_a.rr.target_mode",
18906 FT_UINT8,BASE_DEC, NULL, 0xc0,
18907 "Target mode", HFILL }
18909 { &hf_gsm_a_rr_group_cipher_key_number,
18910 { "Group cipher key number","gsm_a.rr.Group_cipher_key_number",
18911 FT_UINT8,BASE_DEC, NULL, 0x3c,
18912 "Group cipher key number", HFILL }
18914 { &hf_gsm_a_rr_last_segment,
18915 { "Last Segment","gsm_a.rr.last_segment",
18916 FT_BOOLEAN,8, TFS(&gsm_a_rr_last_segment_value), 0x01,
18917 "Last Segment", HFILL }
18919 { &hf_gsm_a_gmm_split_on_ccch,
18920 { "SPLIT on CCCH","gsm_a.gmm.split_on_ccch",
18921 FT_BOOLEAN,8, TFS(&gsm_a_gmm_split_on_ccch_value), 0x08,
18922 "SPLIT on CCCH", HFILL }
18924 { &hf_gsm_a_gmm_non_drx_timer,
18925 { "Non-DRX timer","gsm_a.gmm.non_drx_timer",
18926 FT_UINT8,BASE_DEC, VALS(gsm_a_gmm_non_drx_timer_strings), 0x07,
18927 "Non-DRX timer", HFILL }
18929 { &hf_gsm_a_gmm_cn_spec_drs_cycle_len_coef,
18930 { "CN Specific DRX cycle length coefficient","gsm_a.gmm.cn_spec_drs_cycle_len_coef",
18931 FT_UINT8,BASE_DEC, VALS(gsm_a_gmm_cn_spec_drs_cycle_len_coef_strings), 0xf0,
18932 "CN Specific DRX cycle length coefficient", HFILL }
18934 { &hf_gsm_a_rr_RR_cause,
18935 { "RR cause value","gsm_a.rr.RRcause",
18936 FT_UINT8,BASE_DEC, VALS(gsm_a_rr_RR_cause_vals), 0x0,
18937 "RR cause value", HFILL }
18939 { &hf_gsm_a_be_cell_id_disc,
18940 { "Cell identification discriminator","gsm_a.be.cell_id_disc",
18941 FT_UINT8,BASE_DEC, VALS(gsm_a_rr_cell_id_disc_vals), 0x0f,
18942 "Cell identificationdiscriminator", HFILL }
18944 { &hf_gsm_a_be_rnc_id,
18945 { "RNC-ID","gsm_a.be.rnc_id",
18946 FT_UINT16,BASE_DEC, NULL, 0x0,
18949 { &hf_gsm_a_rr_cm_cng_msg_req,
18950 { "CLASSMARK CHANGE","gsm_a.rr_cm_cng_msg_req",
18951 FT_BOOLEAN,8, TFS(&gsm_a_msg_req_value), 0x80,
18952 "CLASSMARK CHANGE ", HFILL }
18954 { &hf_gsm_a_rr_utran_cm_cng_msg_req,
18955 { "UTRAN CLASSMARK CHANGE","gsm_a.rr_utran_cm_cng_msg_req",
18956 FT_UINT8,BASE_DEC, VALS(gsm_a_rr_utran_cm_cng_msg_req_vals), 0x70,
18957 "UTRAN CLASSMARK CHANGE", HFILL }
18959 { &hf_gsm_a_rr_cdma200_cm_cng_msg_req,
18960 { "CDMA2000 CLASSMARK CHANGE ","gsm_a.rr_cdma200_cm_cng_msg_req",
18961 FT_BOOLEAN,8, TFS(&gsm_a_msg_req_value), 0x08,
18962 "CDMA2000 CLASSMARK CHANGE ", HFILL }
18964 { &hf_gsm_a_rr_geran_iu_cm_cng_msg_req,
18965 { "GERAN IU MODE CLASSMARK CHANGE","gsm_a.rr_geran_iu_cm_cng_msg_req",
18966 FT_BOOLEAN,8, TFS(&gsm_a_msg_req_value), 0x04,
18967 "GERAN IU MODE CLASSMARK CHANGE", HFILL }
18969 { &hf_gsm_a_rr_chnl_needed_ch1,
18970 { "Channel 1","gsm_a.rr_chnl_needed_ch1",
18971 FT_UINT8,BASE_DEC, VALS(gsm_a_rr_channel_needed_vals), 0x03,
18972 "Channel 1", HFILL }
18974 { &hf_gsm_a_rr_chnl_needed_ch2,
18975 { "Channel 2","gsm_a.rr_chnl_needed_ch1",
18976 FT_UINT8,BASE_DEC, VALS(gsm_a_rr_channel_needed_vals), 0x0c,
18977 "Channel 2", HFILL }
18979 { &hf_gsm_a_rr_suspension_cause,
18980 { "Suspension cause value","gsm_a.rr.suspension_cause",
18981 FT_UINT8,BASE_DEC, VALS(gsm_a_rr_suspension_cause_vals), 0x0,
18982 "Suspension cause value", HFILL }
18984 { &hf_ROS_component,
18985 { "component", "ROS.component",
18986 FT_UINT8, BASE_DEC, VALS(ROS_Component_vals), 0,
18987 "Component", HFILL }},
18989 { "invoke", "ROS.invoke",
18990 FT_NONE, BASE_NONE, NULL, 0,
18991 "Component/invoke", HFILL }},
18992 { &hf_ROS_returnResultLast,
18993 { "returnResultLast", "ROS.returnResultLast",
18994 FT_NONE, BASE_NONE, NULL, 0,
18995 "Component/returnResultLast", HFILL }},
18996 { &hf_ROS_returnError,
18997 { "returnError", "ROS.returnError",
18998 FT_NONE, BASE_NONE, NULL, 0,
18999 "Component/returnError", HFILL }},
19001 { "reject", "ROS.reject",
19002 FT_NONE, BASE_NONE, NULL, 0,
19003 "Component/reject", HFILL }},
19004 { &hf_ROS_invokeID,
19005 { "invokeID", "ROS.invokeID",
19006 FT_UINT32, BASE_DEC, NULL, 0,
19008 { &hf_ROS_linkedID,
19009 { "linkedID", "ROS.linkedID",
19010 FT_UINT32, BASE_DEC, NULL, 0,
19011 "Invoke/linkedID", HFILL }},
19013 { "opCode", "ROS.opCode",
19014 FT_UINT32, BASE_DEC, VALS(ROS_OPERATION_vals), 0,
19016 { &hf_ROS_parameter,
19017 { "parameter", "ROS.parameter",
19018 FT_NONE, BASE_NONE, NULL, 0,
19020 { &hf_ROS_resultretres,
19021 { "resultretres", "ROS.resultretres",
19022 FT_NONE, BASE_NONE, NULL, 0,
19023 "ReturnResult/resultretres", HFILL }},
19024 { &hf_ROS_errorCode,
19025 { "errorCode", "ROS.errorCode",
19026 FT_UINT32, BASE_DEC, VALS(ROS_ErrorCode_vals), 0,
19027 "ReturnError/errorCode", HFILL }},
19028 { &hf_ROS_invokeIDRej,
19029 { "invokeIDRej", "ROS.invokeIDRej",
19030 FT_UINT32, BASE_DEC, VALS(ROS_T_invokeIDRej_vals), 0,
19031 "Reject/invokeIDRej", HFILL }},
19032 { &hf_ROS_derivable,
19033 { "derivable", "ROS.derivable",
19034 FT_UINT32, BASE_DEC, NULL, 0,
19035 "Reject/invokeIDRej/derivable", HFILL }},
19036 { &hf_ROS_not_derivable,
19037 { "not-derivable", "ROS.not_derivable",
19038 FT_NONE, BASE_NONE, NULL, 0,
19039 "Reject/invokeIDRej/not-derivable", HFILL }},
19041 { "problem", "ROS.problem",
19042 FT_UINT32, BASE_DEC, VALS(ROS_T_problem_vals), 0,
19043 "Reject/problem", HFILL }},
19044 { &hf_ROS_generalProblem,
19045 { "generalProblem", "ROS.generalProblem",
19046 FT_INT32, BASE_DEC, VALS(ROS_GeneralProblem_vals), 0,
19047 "Reject/problem/generalProblem", HFILL }},
19048 { &hf_ROS_invokeProblem,
19049 { "invokeProblem", "ROS.invokeProblem",
19050 FT_INT32, BASE_DEC, VALS(ROS_InvokeProblem_vals), 0,
19051 "Reject/problem/invokeProblem", HFILL }},
19052 { &hf_ROS_returnResultProblem,
19053 { "returnResultProblem", "ROS.returnResultProblem",
19054 FT_INT32, BASE_DEC, VALS(ROS_ReturnResultProblem_vals), 0,
19055 "Reject/problem/returnResultProblem", HFILL }},
19056 { &hf_ROS_returnErrorProblem,
19057 { "returnErrorProblem", "ROS.returnErrorProblem",
19058 FT_INT32, BASE_DEC, VALS(ROS_ReturnErrorProblem_vals), 0,
19059 "Reject/problem/returnErrorProblem", HFILL }},
19060 { &hf_ROS_localValue,
19061 { "localValue", "ROS.localValue",
19062 FT_INT32, BASE_DEC, VALS(gsm_ss_opr_code_strings), 0,
19064 { &hf_ROS_globalValue,
19065 { "globalValue", "ROS.globalValue",
19066 FT_STRING, BASE_NONE, NULL, 0,
19068 { &hf_ROS_nationaler,
19069 { "nationaler", "ROS.nationaler",
19070 FT_UINT32, BASE_DEC, NULL, 0,
19071 "ErrorCode/nationaler", HFILL }},
19072 { &hf_ROS_privateer,
19073 { "privateer", "ROS.privateer",
19074 FT_INT32, BASE_DEC, NULL, 0,
19075 "ErrorCode/privateer", HFILL }},
19076 { &hf_gsm_a_rr_set_of_amr_codec_modes_v1_b8,
19077 { "12,2 kbit/s codec rate", "gsm_a.rr.set_of_amr_codec_modes_v1b8",
19078 FT_BOOLEAN,8, TFS(&gsm_a_rr_set_of_amr_codec_modes), 0x80,
19079 "12,2 kbit/s codec rate", HFILL }
19081 { &hf_gsm_a_rr_set_of_amr_codec_modes_v1_b7,
19082 { "10,2 kbit/s codec rate", "gsm_a.rr.set_of_amr_codec_modes_v1b7",
19083 FT_BOOLEAN,8, TFS(&gsm_a_rr_set_of_amr_codec_modes), 0x40,
19084 "10,2 kbit/s codec rate", HFILL }
19086 { &hf_gsm_a_rr_set_of_amr_codec_modes_v1_b6,
19087 { "7,95 kbit/s codec rate", "gsm_a.rr.set_of_amr_codec_modes_v1b6",
19088 FT_BOOLEAN,8, TFS(&gsm_a_rr_set_of_amr_codec_modes), 0x20,
19089 "7,95 kbit/s codec rate", HFILL }
19091 { &hf_gsm_a_rr_set_of_amr_codec_modes_v1_b5,
19092 { "7,40 kbit/s codec rate", "gsm_a.rr.set_of_amr_codec_modes_v1b5",
19093 FT_BOOLEAN,8, TFS(&gsm_a_rr_set_of_amr_codec_modes), 0x10,
19094 "7,40 kbit/s codec rate", HFILL }
19096 { &hf_gsm_a_rr_set_of_amr_codec_modes_v1_b4,
19097 { "6,70 kbit/s codec rate", "gsm_a.rr.set_of_amr_codec_modes_v1b4",
19098 FT_BOOLEAN,8, TFS(&gsm_a_rr_set_of_amr_codec_modes), 0x08,
19099 "6,70 kbit/s codec rate", HFILL }
19101 { &hf_gsm_a_rr_set_of_amr_codec_modes_v1_b3,
19102 { "5,90 kbit/s codec rate", "gsm_a.rr.set_of_amr_codec_modes_v1b3",
19103 FT_BOOLEAN,8, TFS(&gsm_a_rr_set_of_amr_codec_modes), 0x04,
19104 "5,90 kbit/s codec rate", HFILL }
19106 { &hf_gsm_a_rr_set_of_amr_codec_modes_v1_b2,
19107 { "5,15 kbit/s codec rate", "gsm_a.rr.set_of_amr_codec_modes_v1b2",
19108 FT_BOOLEAN,8, TFS(&gsm_a_rr_set_of_amr_codec_modes), 0x02,
19109 "5,15 kbit/s codec rate", HFILL }
19111 { &hf_gsm_a_rr_set_of_amr_codec_modes_v1_b1,
19112 { "4,75 kbit/s codec rate", "gsm_a.rr.set_of_amr_codec_modes_v1b1",
19113 FT_BOOLEAN,8, TFS(&gsm_a_rr_set_of_amr_codec_modes), 0x01,
19114 "4,75 kbit/s codec rate", HFILL }
19116 { &hf_gsm_a_rr_set_of_amr_codec_modes_v2_b5,
19117 { "23,85 kbit/s codec rate", "gsm_a.rr.set_of_amr_codec_modes_v2b5",
19118 FT_BOOLEAN,8, TFS(&gsm_a_rr_set_of_amr_codec_modes), 0x10,
19119 "23,85 kbit/s codec rate", HFILL }
19121 { &hf_gsm_a_rr_set_of_amr_codec_modes_v2_b4,
19122 { "15,85 kbit/s codec rate", "gsm_a.rr.set_of_amr_codec_modes_v2b4",
19123 FT_BOOLEAN,8, TFS(&gsm_a_rr_set_of_amr_codec_modes), 0x08,
19124 "15,85 kbit/s codec rate", HFILL }
19126 { &hf_gsm_a_rr_set_of_amr_codec_modes_v2_b3,
19127 { "12,65 kbit/s codec rate", "gsm_a.rr.set_of_amr_codec_modes_v2b3",
19128 FT_BOOLEAN,8, TFS(&gsm_a_rr_set_of_amr_codec_modes), 0x04,
19129 "12,65 kbit/s codec rate", HFILL }
19131 { &hf_gsm_a_rr_set_of_amr_codec_modes_v2_b2,
19132 { "8,85 kbit/s codec rate", "gsm_a.rr.set_of_amr_codec_modes_v2b2",
19133 FT_BOOLEAN,8, TFS(&gsm_a_rr_set_of_amr_codec_modes), 0x02,
19134 "8,85 kbit/s codec rate", HFILL }
19136 { &hf_gsm_a_rr_set_of_amr_codec_modes_v2_b1,
19137 { "6,60 kbit/s codec rate", "gsm_a.rr.set_of_amr_codec_modes_v2b1",
19138 FT_BOOLEAN,8, TFS(&gsm_a_rr_set_of_amr_codec_modes), 0x01,
19139 "6,60 kbit/s codec rate", HFILL }
19141 { &hf_gsm_a_extension,
19142 { "Extension", "gsm_a.extension",
19143 FT_BOOLEAN, 8, TFS(&gsm_a_extension_value), 0x80,
19144 "Extension", HFILL }},
19145 { &hf_gsm_a_type_of_number,
19146 { "Type of number", "gsm_a.type_of_number",
19147 FT_UINT8, BASE_HEX, VALS(gsm_a_type_of_number_values), 0x70,
19148 "Type of number", HFILL }},
19149 { &hf_gsm_a_numbering_plan_id,
19150 { "Numbering plan identification", "gsm_a.numbering_plan_id",
19151 FT_UINT8, BASE_HEX, VALS(gsm_a_numbering_plan_id_values), 0x0f,
19152 "Numbering plan identification", HFILL }},
19153 { &hf_gsm_a_tft_op_code,
19154 { "TFT operation code", "gsm_a.tft.op_code",
19155 FT_UINT8, BASE_DEC, VALS(gsm_a_tft_op_code_vals), 0xe0,
19156 "TFT operation code", HFILL }
19158 { &hf_gsm_a_tft_e_bit,
19159 { "E bit","gsm_a.tft.e_bit",
19160 FT_BOOLEAN,8, TFS(&gsm_a_tft_e_bit), 0x10,
19163 { &hf_gsm_a_tft_pkt_flt,
19164 { "Number of packet filters", "gsm_a.tft.pkt_flt",
19165 FT_UINT8, BASE_DEC, NULL, 0x0f,
19166 "Number of packet filters", HFILL }
19169 { &hf_gsm_a_tft_ip4_address,
19170 { "IPv4 adress", "gsm_a.tft.ip4_address", FT_IPv4, BASE_NONE, NULL, 0x0,
19171 "IPv4 address", HFILL }},
19172 { &hf_gsm_a_tft_ip4_mask,
19173 { "IPv4 address mask", "gsm_a.tft.ip4_mask", FT_IPv4, BASE_NONE, NULL, 0x0,
19174 "IPv4 address mask", HFILL }},
19175 { &hf_gsm_a_tft_ip6_address,
19176 { "IPv6 adress", "gsm_a.tft.ip6_address", FT_IPv6, BASE_NONE, NULL, 0x0,
19177 "IPv6 address", HFILL }},
19178 { &hf_gsm_a_tft_ip6_mask,
19179 { "IPv6 adress mask", "gsm_a.tft.ip6_mask", FT_IPv6, BASE_NONE, NULL, 0x0,
19180 "IPv6 address mask", HFILL }},
19181 { &hf_gsm_a_tft_protocol_header,
19182 { "Protocol/header", "gsm_a.tft.protocol_header", FT_UINT8, BASE_HEX, NULL, 0x0,
19183 "Protocol/header", HFILL }},
19184 { &hf_gsm_a_tft_port,
19185 { "Port", "gsm_a.tft.port", FT_UINT16, BASE_DEC, NULL, 0x0,
19187 { &hf_gsm_a_tft_port_low,
19188 { "Low limit port", "gsm_a.tft.port_low", FT_UINT16, BASE_DEC, NULL, 0x0,
19189 "Low limit port", HFILL }},
19190 { &hf_gsm_a_tft_port_high,
19191 { "High limit port", "gsm_a.tft.port_high", FT_UINT16, BASE_DEC, NULL, 0x0,
19192 "High limit port", HFILL }},
19193 { &hf_gsm_a_tft_security,
19194 { "IPSec security parameter index", "gsm_a.tft.security", FT_UINT32, BASE_HEX, NULL, 0x0,
19195 "IPSec security parameter index", HFILL }},
19196 { &hf_gsm_a_tft_traffic_mask,
19197 { "Mask field", "gsm_a.tft.traffic_mask", FT_UINT8, BASE_HEX, NULL, 0x0,
19198 "Mask field", HFILL }},
19199 { &hf_gsm_a_tft_flow,
19200 { "IPv6 flow label", "gsm_a.tft.flow", FT_UINT24, BASE_HEX, NULL, 0x0FFFFF,
19201 "IPv6 flow label", HFILL }},
19203 { &hf_gsm_a_ptmsi_sig,
19204 { "P-TMSI Signature", "gsm_a.ptmsi_sig", FT_UINT24, BASE_HEX, NULL, 0x0,
19205 "P-TMSI Signature", HFILL }},
19206 { &hf_gsm_a_ptmsi_sig2,
19207 { "P-TMSI Signature 2", "gsm_a.ptmsi_sig2", FT_UINT24, BASE_HEX, NULL, 0x0,
19208 "P-TMSI Signature 2", HFILL }},
19210 { &hf_gsm_a_apdu_protocol_id,
19211 { "Protocol ID", "gsm_a.apdu_protocol_id",
19212 FT_UINT8, BASE_DEC, VALS(gsm_a_apdu_protocol_id_strings), 0x0,
19213 "APDU embedded protocol id", HFILL }
19215 { &hf_gsm_a_lsa_id,
19216 { "LSA Identifier", "gsm_a.lsa_id",
19217 FT_UINT24, BASE_HEX, NULL, 0x0,
19218 "LSA Identifier", HFILL }
19222 /* Setup protocol subtree array */
19223 #define NUM_INDIVIDUAL_ELEMS 50
19224 static gint *ett[NUM_INDIVIDUAL_ELEMS + NUM_GSM_BSSMAP_MSG +
19225 NUM_GSM_DTAP_MSG_MM + NUM_GSM_DTAP_MSG_RR + NUM_GSM_DTAP_MSG_CC +
19226 NUM_GSM_DTAP_MSG_GMM + NUM_GSM_DTAP_MSG_SMS +
19227 NUM_GSM_DTAP_MSG_SM + NUM_GSM_DTAP_MSG_SS + NUM_GSM_RP_MSG +
19228 NUM_GSM_BSSMAP_ELEM + NUM_GSM_DTAP_ELEM];
19230 ett[0] = &ett_bssmap_msg;
19231 ett[1] = &ett_dtap_msg;
19232 ett[2] = &ett_rp_msg;
19233 ett[3] = &ett_elems;
19234 ett[4] = &ett_elem;
19235 ett[5] = &ett_dtap_oct_1;
19236 ett[6] = &ett_cm_srvc_type;
19237 ett[7] = &ett_gsm_enc_info;
19238 ett[8] = &ett_cell_list;
19239 ett[9] = &ett_dlci;
19240 ett[10] = &ett_bc_oct_3a;
19241 ett[11] = &ett_bc_oct_4;
19242 ett[12] = &ett_bc_oct_5;
19243 ett[13] = &ett_bc_oct_5a;
19244 ett[14] = &ett_bc_oct_5b;
19245 ett[15] = &ett_bc_oct_6;
19246 ett[16] = &ett_bc_oct_6a;
19247 ett[17] = &ett_bc_oct_6b;
19248 ett[18] = &ett_bc_oct_6c;
19249 ett[19] = &ett_bc_oct_6d;
19250 ett[20] = &ett_bc_oct_6e;
19251 ett[21] = &ett_bc_oct_6f;
19252 ett[22] = &ett_bc_oct_6g;
19253 ett[23] = &ett_bc_oct_7;
19255 ett[24] = &ett_tc_component;
19256 ett[25] = &ett_tc_invoke_id;
19257 ett[26] = &ett_tc_linked_id;
19258 ett[27] = &ett_tc_opr_code;
19259 ett[28] = &ett_tc_err_code;
19260 ett[29] = &ett_tc_prob_code;
19261 ett[30] = &ett_tc_sequence;
19263 ett[31] = &ett_gmm_drx;
19264 ett[32] = &ett_gmm_detach_type;
19265 ett[33] = &ett_gmm_attach_type;
19266 ett[34] = &ett_gmm_context_stat;
19267 ett[35] = &ett_gmm_update_type;
19268 ett[36] = &ett_gmm_radio_cap;
19270 ett[37] = &ett_sm_tft;
19272 ett[38] = &ett_ros,
19273 ett[39] = &ett_ROS_Component,
19274 ett[40] = &ett_ROS_Invoke,
19275 ett[41] = &ett_ROS_ReturnResult,
19276 ett[42] = &ett_ROS_T_resultretres,
19277 ett[43] = &ett_ROS_ReturnError,
19278 ett[44] = &ett_ROS_Reject,
19279 ett[45] = &ett_ROS_T_invokeIDRej,
19280 ett[46] = &ett_ROS_T_problem,
19281 ett[47] = &ett_ROS_OPERATION,
19282 ett[48] = &ett_ROS_ERROR,
19283 ett[49] = &ett_ROS_ErrorCode,
19285 last_offset = NUM_INDIVIDUAL_ELEMS;
19287 for (i=0; i < NUM_GSM_BSSMAP_MSG; i++, last_offset++)
19289 ett_gsm_bssmap_msg[i] = -1;
19290 ett[last_offset] = &ett_gsm_bssmap_msg[i];
19293 for (i=0; i < NUM_GSM_DTAP_MSG_MM; i++, last_offset++)
19295 ett_gsm_dtap_msg_mm[i] = -1;
19296 ett[last_offset] = &ett_gsm_dtap_msg_mm[i];
19299 for (i=0; i < NUM_GSM_DTAP_MSG_RR; i++, last_offset++)
19301 ett_gsm_dtap_msg_rr[i] = -1;
19302 ett[last_offset] = &ett_gsm_dtap_msg_rr[i];
19305 for (i=0; i < NUM_GSM_DTAP_MSG_CC; i++, last_offset++)
19307 ett_gsm_dtap_msg_cc[i] = -1;
19308 ett[last_offset] = &ett_gsm_dtap_msg_cc[i];
19311 for (i=0; i < NUM_GSM_DTAP_MSG_GMM; i++, last_offset++)
19313 ett_gsm_dtap_msg_gmm[i] = -1;
19314 ett[last_offset] = &ett_gsm_dtap_msg_gmm[i];
19317 for (i=0; i < NUM_GSM_DTAP_MSG_SMS; i++, last_offset++)
19319 ett_gsm_dtap_msg_sms[i] = -1;
19320 ett[last_offset] = &ett_gsm_dtap_msg_sms[i];
19323 for (i=0; i < NUM_GSM_DTAP_MSG_SM; i++, last_offset++)
19325 ett_gsm_dtap_msg_sm[i] = -1;
19326 ett[last_offset] = &ett_gsm_dtap_msg_sm[i];
19329 for (i=0; i < NUM_GSM_DTAP_MSG_SS; i++, last_offset++)
19331 ett_gsm_dtap_msg_ss[i] = -1;
19332 ett[last_offset] = &ett_gsm_dtap_msg_ss[i];
19335 for (i=0; i < NUM_GSM_RP_MSG; i++, last_offset++)
19337 ett_gsm_rp_msg[i] = -1;
19338 ett[last_offset] = &ett_gsm_rp_msg[i];
19341 for (i=0; i < NUM_GSM_BSSMAP_ELEM; i++, last_offset++)
19343 ett_gsm_bssmap_elem[i] = -1;
19344 ett[last_offset] = &ett_gsm_bssmap_elem[i];
19347 for (i=0; i < NUM_GSM_DTAP_ELEM; i++, last_offset++)
19349 ett_gsm_dtap_elem[i] = -1;
19350 ett[last_offset] = &ett_gsm_dtap_elem[i];
19354 /* Register the protocol name and description */
19357 proto_register_protocol("GSM A-I/F BSSMAP", "GSM BSSMAP", "gsm_a_bssmap");
19359 proto_register_field_array(proto_a_bssmap, hf, array_length(hf));
19362 proto_register_protocol("GSM A-I/F DTAP", "GSM DTAP", "gsm_a_dtap");
19365 proto_register_protocol("GSM A-I/F RP", "GSM RP", "gsm_a_rp");
19367 sms_dissector_table =
19368 register_dissector_table("gsm_a.sms_tpdu", "GSM SMS TPDU",
19369 FT_UINT8, BASE_DEC);
19371 proto_register_subtree_array(ett, array_length(ett));
19373 /* subdissector code */
19374 gprs_sm_pco_subdissector_table = register_dissector_table("sm_pco.protocol",
19375 "GPRS SM PCO PPP protocol", FT_UINT16, BASE_HEX);
19377 gsm_a_tap = register_tap("gsm_a");
19379 register_dissector("gsm_a_dtap", dissect_dtap, proto_a_dtap);
19380 register_dissector("gsm_a_rp", dissect_rp, proto_a_rp);
19381 register_dissector("gsm_a_bssmap", dissect_bssmap, proto_a_bssmap);
19386 proto_reg_handoff_gsm_a(void)
19389 bssmap_handle = create_dissector_handle(dissect_bssmap, proto_a_bssmap);
19390 dtap_handle = find_dissector("gsm_a_dtap");
19391 rp_handle = create_dissector_handle(dissect_rp, proto_a_rp);
19393 dissector_add("bssap.pdu_type", BSSAP_PDU_TYPE_BSSMAP, bssmap_handle);
19394 dissector_add("bssap.pdu_type", BSSAP_PDU_TYPE_DTAP, dtap_handle);
19395 dissector_add("ranap.nas_pdu", BSSAP_PDU_TYPE_DTAP, dtap_handle);
19396 dissector_add("llcgprs.sapi", 1 , dtap_handle);
19397 data_handle = find_dissector("data");