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>
102 #include <epan/asn1.h>
104 #include "packet-bssap.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_gsm_a_rr_set_of_amr_codec_modes_v1_b8 = -1;
1165 static int hf_gsm_a_rr_set_of_amr_codec_modes_v1_b7 = -1;
1166 static int hf_gsm_a_rr_set_of_amr_codec_modes_v1_b6 = -1;
1167 static int hf_gsm_a_rr_set_of_amr_codec_modes_v1_b5 = -1;
1168 static int hf_gsm_a_rr_set_of_amr_codec_modes_v1_b4 = -1;
1169 static int hf_gsm_a_rr_set_of_amr_codec_modes_v1_b3 = -1;
1170 static int hf_gsm_a_rr_set_of_amr_codec_modes_v1_b2 = -1;
1171 static int hf_gsm_a_rr_set_of_amr_codec_modes_v1_b1 = -1;
1172 static int hf_gsm_a_rr_set_of_amr_codec_modes_v2_b5 = -1;
1173 static int hf_gsm_a_rr_set_of_amr_codec_modes_v2_b4 = -1;
1174 static int hf_gsm_a_rr_set_of_amr_codec_modes_v2_b3 = -1;
1175 static int hf_gsm_a_rr_set_of_amr_codec_modes_v2_b2 = -1;
1176 static int hf_gsm_a_rr_set_of_amr_codec_modes_v2_b1 = -1;
1178 static int hf_gsm_a_extension = -1;
1179 static int hf_gsm_a_type_of_number = -1;
1180 static int hf_gsm_a_numbering_plan_id = -1;
1182 static int hf_gsm_a_ptmsi_sig =-1;
1183 static int hf_gsm_a_ptmsi_sig2 =-1;
1185 static int hf_gsm_a_tft_op_code = -1;
1186 static int hf_gsm_a_tft_e_bit = -1;
1187 static int hf_gsm_a_tft_pkt_flt = -1;
1188 static int hf_gsm_a_tft_ip4_address = -1;
1189 static int hf_gsm_a_tft_ip4_mask = -1;
1190 static int hf_gsm_a_tft_ip6_address = -1;
1191 static int hf_gsm_a_tft_ip6_mask = -1;
1192 static int hf_gsm_a_tft_protocol_header = -1;
1193 static int hf_gsm_a_tft_port = -1;
1194 static int hf_gsm_a_tft_port_low = -1;
1195 static int hf_gsm_a_tft_port_high = -1;
1196 static int hf_gsm_a_tft_security = -1;
1197 static int hf_gsm_a_tft_traffic_mask = -1;
1198 static int hf_gsm_a_tft_flow = -1;
1200 static int hf_gsm_a_apdu_protocol_id = -1;
1201 static int hf_gsm_a_lsa_id = -1;
1203 /* Initialize the subtree pointers */
1204 static gint ett_bssmap_msg = -1;
1205 static gint ett_dtap_msg = -1;
1206 static gint ett_rp_msg = -1;
1207 static gint ett_elems = -1;
1208 static gint ett_elem = -1;
1209 static gint ett_dtap_oct_1 = -1;
1210 static gint ett_cm_srvc_type = -1;
1211 static gint ett_gsm_enc_info = -1;
1212 static gint ett_cell_list = -1;
1213 static gint ett_dlci = -1;
1214 static gint ett_bc_oct_3a = -1;
1215 static gint ett_bc_oct_4 = -1;
1216 static gint ett_bc_oct_5 = -1;
1217 static gint ett_bc_oct_5a = -1;
1218 static gint ett_bc_oct_5b = -1;
1219 static gint ett_bc_oct_6 = -1;
1220 static gint ett_bc_oct_6a = -1;
1221 static gint ett_bc_oct_6b = -1;
1222 static gint ett_bc_oct_6c = -1;
1223 static gint ett_bc_oct_6d = -1;
1224 static gint ett_bc_oct_6e = -1;
1225 static gint ett_bc_oct_6f = -1;
1226 static gint ett_bc_oct_6g = -1;
1227 static gint ett_bc_oct_7 = -1;
1229 static gint ett_tc_component = -1;
1230 static gint ett_tc_invoke_id = -1;
1231 static gint ett_tc_linked_id = -1;
1232 static gint ett_tc_opr_code = -1;
1233 static gint ett_tc_err_code = -1;
1234 static gint ett_tc_prob_code = -1;
1235 static gint ett_tc_sequence = -1;
1237 static gint ett_gmm_drx = -1;
1238 static gint ett_gmm_detach_type = -1;
1239 static gint ett_gmm_attach_type = -1;
1240 static gint ett_gmm_context_stat = -1;
1241 static gint ett_gmm_update_type = -1;
1242 static gint ett_gmm_radio_cap = -1;
1245 static gint ett_sm_tft = -1;
1247 static char a_bigbuf[1024];
1249 static dissector_handle_t data_handle;
1250 static dissector_handle_t gsm_map_handle;
1251 static dissector_handle_t bssmap_handle;
1252 static dissector_handle_t dtap_handle;
1253 static dissector_handle_t rp_handle;
1254 static dissector_table_t sms_dissector_table; /* SMS TPDU */
1255 static dissector_table_t gprs_sm_pco_subdissector_table; /* GPRS SM PCO PPP Protocols */
1257 static packet_info *g_pinfo;
1258 static proto_tree *g_tree;
1259 static gint comp_type_tag;
1261 static sccp_msg_info_t* sccp_msg;
1262 static sccp_assoc_info_t* sccp_assoc;
1265 * this should be set on a per message basis, if possible
1267 #define IS_UPLINK_FALSE 0
1268 #define IS_UPLINK_TRUE 1
1269 #define IS_UPLINK_UNKNOWN 2
1270 static gint is_uplink;
1273 typedef struct dgt_set_t
1275 unsigned char out[15];
1279 static dgt_set_t Dgt_mbcd = {
1281 /* 0 1 2 3 4 5 6 7 8 9 a b c d e */
1282 '0','1','2','3','4','5','6','7','8','9','*','#','a','b','c'
1286 static dgt_set_t Dgt_tbcd = {
1288 /* 0 1 2 3 4 5 6 7 8 9 a b c d e */
1289 '0','1','2','3','4','5','6','7','8','9','?','B','C','*','#'
1293 static dgt_set_t Dgt1_9_bcd = {
1295 /* 0 1 2 3 4 5 6 7 8 9 a b c d e */
1296 '0','1','2','3','4','5','6','7','8','9','?','?','?','?','?'
1303 * Unpack BCD input pattern into output ASCII pattern
1305 * Input Pattern is supplied using the same format as the digits
1307 * Returns: length of unpacked pattern
1311 char *out, /* ASCII pattern out */
1312 guchar *in, /* packed pattern in */
1313 int num_octs, /* Number of octets to unpack */
1314 dgt_set_t *dgt /* Digit definitions */
1323 * unpack first value in byte
1326 *out++ = dgt->out[i & 0x0f];
1330 * unpack second value in byte
1334 if (i == 0x0f) /* odd number bytes - hit filler */
1337 *out++ = dgt->out[i];
1348 /* ELEMENT FUNCTIONS */
1350 #define EXTRANEOUS_DATA_CHECK(edc_len, edc_max_len) \
1351 if ((edc_len) > (edc_max_len)) \
1353 proto_tree_add_text(tree, tvb, \
1354 curr_offset, (edc_len) - (edc_max_len), "Extraneous Data"); \
1355 curr_offset += ((edc_len) - (edc_max_len)); \
1358 #define SHORT_DATA_CHECK(sdc_len, sdc_min_len) \
1359 if ((sdc_len) < (sdc_min_len)) \
1361 proto_tree_add_text(tree, tvb, \
1362 curr_offset, (sdc_len), "Short Data (?)"); \
1363 curr_offset += (sdc_len); \
1364 return(curr_offset - offset); \
1367 #define EXACT_DATA_CHECK(edc_len, edc_eq_len) \
1368 if ((edc_len) != (edc_eq_len)) \
1370 proto_tree_add_text(tree, tvb, \
1371 curr_offset, (edc_len), "Unexpected Data Length"); \
1372 curr_offset += (edc_len); \
1373 return(curr_offset - offset); \
1376 #define NO_MORE_DATA_CHECK(nmdc_len) \
1377 if ((nmdc_len) == (curr_offset - offset)) return(nmdc_len);
1380 * Decode the MCC/MNC from 3 octets in 'octs'
1383 mcc_mnc_aux(guint8 *octs, gchar *mcc, gchar *mnc)
1385 if ((octs[0] & 0x0f) <= 9)
1387 mcc[0] = Dgt_tbcd.out[octs[0] & 0x0f];
1391 mcc[0] = (octs[0] & 0x0f) + 55;
1394 if (((octs[0] & 0xf0) >> 4) <= 9)
1396 mcc[1] = Dgt_tbcd.out[(octs[0] & 0xf0) >> 4];
1400 mcc[1] = ((octs[0] & 0xf0) >> 4) + 55;
1403 if ((octs[1] & 0x0f) <= 9)
1405 mcc[2] = Dgt_tbcd.out[octs[1] & 0x0f];
1409 mcc[2] = (octs[1] & 0x0f) + 55;
1414 if (((octs[1] & 0xf0) >> 4) <= 9)
1416 mnc[2] = Dgt_tbcd.out[(octs[1] & 0xf0) >> 4];
1420 mnc[2] = ((octs[1] & 0xf0) >> 4) + 55;
1423 if ((octs[2] & 0x0f) <= 9)
1425 mnc[0] = Dgt_tbcd.out[octs[2] & 0x0f];
1429 mnc[0] = (octs[2] & 0x0f) + 55;
1432 if (((octs[2] & 0xf0) >> 4) <= 9)
1434 mnc[1] = Dgt_tbcd.out[(octs[2] & 0xf0) >> 4];
1438 mnc[1] = ((octs[2] & 0xf0) >> 4) + 55;
1444 * only a 1 digit MNC (very old)
1448 else if (mnc[2] == 'F')
1451 * only a 2 digit MNC
1463 BE_CIC, /* Circuit Identity Code */
1464 BE_RSVD_1, /* Reserved */
1465 BE_RES_AVAIL, /* Resource Available */
1466 BE_CAUSE, /* Cause */
1467 BE_CELL_ID, /* Cell Identifier */
1468 BE_PRIO, /* Priority */
1469 BE_L3_HEADER_INFO, /* Layer 3 Header Information */
1472 BE_ENC_INFO, /* Encryption Information */
1473 BE_CHAN_TYPE, /* Channel Type */
1474 BE_PERIODICITY, /* Periodicity */
1475 BE_EXT_RES_IND, /* Extended Resource Indicator */
1476 BE_NUM_MS, /* Number Of MSs */
1477 BE_RSVD_2, /* Reserved */
1478 BE_RSVD_3, /* Reserved */
1479 BE_RSVD_4, /* Reserved */
1480 BE_CM_INFO_2, /* Classmark Information Type 2 */
1481 BE_CM_INFO_3, /* Classmark Information Type 3 */
1482 BE_INT_BAND, /* Interference Band To Be Used */
1483 BE_RR_CAUSE, /* RR Cause */
1484 BE_RSVD_5, /* Reserved */
1485 BE_L3_INFO, /* Layer 3 Information */
1487 BE_DOWN_DTX_FLAG, /* Downlink DTX Flag */
1488 BE_CELL_ID_LIST, /* Cell Identifier List */
1489 BE_RESP_REQ, /* Response Request */
1490 BE_RES_IND_METHOD, /* Resource Indication Method */
1491 BE_CM_INFO_1, /* Classmark Information Type 1 */
1492 BE_CIC_LIST, /* Circuit Identity Code List */
1493 BE_DIAG, /* Diagnostic */
1494 BE_L3_MSG, /* Layer 3 Message Contents */
1495 BE_CHOSEN_CHAN, /* Chosen Channel */
1496 BE_TOT_RES_ACC, /* Total Resource Accessible */
1497 BE_CIPH_RESP_MODE, /* Cipher Response Mode */
1498 BE_CHAN_NEEDED, /* Channel Needed */
1499 BE_TRACE_TYPE, /* Trace Type */
1500 BE_TRIGGERID, /* TriggerID */
1501 BE_TRACE_REF, /* Trace Reference */
1502 BE_TRANSID, /* TransactionID */
1503 BE_MID, /* Mobile Identity */
1504 BE_OMCID, /* OMCID */
1505 BE_FOR_IND, /* Forward Indicator */
1506 BE_CHOSEN_ENC_ALG, /* Chosen Encryption Algorithm */
1507 BE_CCT_POOL, /* Circuit Pool */
1508 BE_CCT_POOL_LIST, /* Circuit Pool List */
1509 BE_TIME_IND, /* Time Indication */
1510 BE_RES_SIT, /* Resource Situation */
1511 BE_CURR_CHAN_1, /* Current Channel Type 1 */
1512 BE_QUE_IND, /* Queueing Indicator */
1513 BE_SPEECH_VER, /* Speech Version */
1514 BE_ASS_REQ, /* Assignment Requirement */
1515 BE_TALKER_FLAG, /* Talker Flag */
1516 BE_CONN_REL_REQ, /* Connection Release Requested */
1517 BE_GROUP_CALL_REF, /* Group Call Reference */
1518 BE_EMLPP_PRIO, /* eMLPP Priority */
1519 BE_CONF_EVO_IND, /* Configuration Evolution Indication */
1520 BE_OLD2NEW_INFO, /* Old BSS to New BSS Information */
1521 BE_LSA_ID, /* LSA Identifier */
1522 BE_LSA_ID_LIST, /* LSA Identifier List */
1523 BE_LSA_INFO, /* LSA Information */
1524 BE_LCS_QOS, /* LCS QoS */
1525 BE_LSA_ACC_CTRL, /* LSA access control suppression */
1526 BE_LCS_PRIO, /* LCS Priority */
1527 BE_LOC_TYPE, /* Location Type */
1528 BE_LOC_EST, /* Location Estimate */
1529 BE_POS_DATA, /* Positioning Data */
1530 BE_LCS_CAUSE, /* LCS Cause */
1531 BE_LCS_CLIENT, /* LCS Client Type */
1533 BE_NE_ID, /* Network Element Identity */
1534 BE_GSP_ASSIST_DATA, /* GPS Assistance Data */
1535 BE_DECIPH_KEYS, /* Deciphering Keys */
1536 BE_RET_ERR_REQ, /* Return Error Request */
1537 BE_RET_ERR_CAUSE, /* Return Error Cause */
1538 BE_SEG, /* Segmentation */
1543 #define NUM_GSM_BSSMAP_ELEM (sizeof(gsm_bssmap_elem_strings)/sizeof(value_string))
1544 static gint ett_gsm_bssmap_elem[NUM_GSM_BSSMAP_ELEM];
1550 be_cic(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
1552 guint32 curr_offset;
1556 curr_offset = offset;
1558 value = tvb_get_ntohs(tvb, curr_offset);
1560 other_decode_bitfield_value(a_bigbuf, value, 0xffe0, 16);
1561 proto_tree_add_text(tree,
1562 tvb, curr_offset, 2,
1563 "%s : PCM Multiplexer: %u",
1565 (value & 0xffe0) >> 5);
1567 other_decode_bitfield_value(a_bigbuf, value, 0x001f, 16);
1568 proto_tree_add_text(tree,
1569 tvb, curr_offset, 2,
1570 "%s : Timeslot: %u",
1577 g_snprintf(add_string, string_len, " - (%u) (0x%04x)", value, value);
1579 /* no length check possible */
1581 return(curr_offset - offset);
1588 be_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
1592 guint32 curr_offset;
1593 const gchar *str = NULL;
1595 curr_offset = offset;
1597 oct = tvb_get_guint8(tvb, curr_offset);
1599 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
1600 proto_tree_add_text(tree,
1601 tvb, curr_offset, 1,
1602 "%s : Extension: %s",
1604 (oct & 0x80) ? "extended" : "not extended");
1610 if ((oct & 0x0f) == 0x00)
1612 /* national cause */
1613 switch ((oct & 0x70) >> 4)
1615 case 0: str = "Normal Event"; break;
1616 case 1: str = "Normal Event"; break;
1617 case 2: str = "Resource Unavailable"; break;
1618 case 3: str = "Service or option not available"; break;
1619 case 4: str = "Service or option not implemented"; break;
1620 case 5: str = "Invalid message (e.g., parameter out of range)"; break;
1621 case 6: str = "Protocol error"; break;
1623 str = "Interworking";
1627 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
1628 proto_tree_add_text(tree,
1629 tvb, curr_offset, 1,
1630 "%s : Cause Class: %s",
1634 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
1635 proto_tree_add_text(tree,
1636 tvb, curr_offset, 1,
1637 "%s : National Cause",
1642 proto_tree_add_text(tree, tvb, curr_offset, 1,
1648 g_snprintf(add_string, string_len, " - (National Cause)");
1652 value = tvb_get_guint8(tvb, curr_offset + 1);
1654 other_decode_bitfield_value(a_bigbuf, oct, 0x7f, 8);
1655 proto_tree_add_text(tree,
1656 tvb, curr_offset, 1,
1657 "%s : Cause (MSB): %u",
1659 ((oct & 0x7f) << 8) | value);
1663 other_decode_bitfield_value(a_bigbuf, value, 0xff, 8);
1664 proto_tree_add_text(tree, tvb, curr_offset, 1,
1675 case 0x00: str = "Radio interface message failure"; break;
1676 case 0x01: str = "Radio interface failure"; break;
1677 case 0x02: str = "Uplink quality"; break;
1678 case 0x03: str = "Uplink strength"; break;
1679 case 0x04: str = "Downlink quality"; break;
1680 case 0x05: str = "Downlink strength"; break;
1681 case 0x06: str = "Distance"; break;
1682 case 0x07: str = "O and M intervention"; break;
1683 case 0x08: str = "Response to MSC invocation"; break;
1684 case 0x09: str = "Call control"; break;
1685 case 0x0a: str = "Radio interface failure, reversion to old channel"; break;
1686 case 0x0b: str = "Handover successful"; break;
1687 case 0x0c: str = "Better Cell"; break;
1688 case 0x0d: str = "Directed Retry"; break;
1689 case 0x0e: str = "Joined group call channel"; break;
1690 case 0x0f: str = "Traffic"; break;
1692 case 0x20: str = "Equipment failure"; break;
1693 case 0x21: str = "No radio resource available"; break;
1694 case 0x22: str = "Requested terrestrial resource unavailable"; break;
1695 case 0x23: str = "CCCH overload"; break;
1696 case 0x24: str = "Processor overload"; break;
1697 case 0x25: str = "BSS not equipped"; break;
1698 case 0x26: str = "MS not equipped"; break;
1699 case 0x27: str = "Invalid cell"; break;
1700 case 0x28: str = "Traffic Load"; break;
1701 case 0x29: str = "Preemption"; break;
1703 case 0x30: str = "Requested transcoding/rate adaption unavailable"; break;
1704 case 0x31: str = "Circuit pool mismatch"; break;
1705 case 0x32: str = "Switch circuit pool"; break;
1706 case 0x33: str = "Requested speech version unavailable"; break;
1707 case 0x34: str = "LSA not allowed"; break;
1709 case 0x40: str = "Ciphering algorithm not supported"; break;
1711 case 0x50: str = "Terrestrial circuit already allocated"; break;
1712 case 0x51: str = "Invalid message contents"; break;
1713 case 0x52: str = "Information element or field missing"; break;
1714 case 0x53: str = "Incorrect value"; break;
1715 case 0x54: str = "Unknown Message type"; break;
1716 case 0x55: str = "Unknown Information Element"; break;
1718 case 0x60: str = "Protocol Error between BSS and MSC"; break;
1719 case 0x61: str = "VGCS/VBS call non existent"; break;
1722 if ((oct >= 0x10) && (oct <= 0x17)) { str = "Reserved for international use"; }
1723 else if ((oct >= 0x18) && (oct <= 0x1f)) { str = "Reserved for national use"; }
1724 else if ((oct >= 0x2a) && (oct <= 0x2f)) { str = "Reserved for national use"; }
1725 else if ((oct >= 0x35) && (oct <= 0x3f)) { str = "Reserved for international use"; }
1726 else if ((oct >= 0x41) && (oct <= 0x47)) { str = "Reserved for international use"; }
1727 else if ((oct >= 0x48) && (oct <= 0x4f)) { str = "Reserved for national use"; }
1728 else if ((oct >= 0x56) && (oct <= 0x57)) { str = "Reserved for international use"; }
1729 else if ((oct >= 0x58) && (oct <= 0x5f)) { str = "Reserved for national use"; }
1730 else if ((oct >= 0x62) && (oct <= 0x67)) { str = "Reserved for international use"; }
1731 else if ((oct >= 0x68) && (oct <= 0x6f)) { str = "Reserved for national use"; }
1732 else if ((oct >= 0x70) && (oct <= 0x77)) { str = "Reserved for international use"; }
1733 else if ((oct >= 0x78) && (oct <= 0x7f)) { str = "Reserved for national use"; }
1737 other_decode_bitfield_value(a_bigbuf, oct, 0x7f, 8);
1738 proto_tree_add_uint_format(tree, hf_gsm_a_bssmap_cause,
1739 tvb, curr_offset, 1, oct & 0x7f,
1740 "%s : Cause: (%u) %s",
1748 g_snprintf(add_string, string_len, " - (%u) %s", oct & 0x7f, str);
1751 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
1753 return(curr_offset - offset);
1760 be_tmsi(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
1762 guint32 curr_offset;
1765 curr_offset = offset;
1767 value = tvb_get_ntohl(tvb, curr_offset);
1769 proto_tree_add_uint(tree, hf_gsm_a_tmsi,
1770 tvb, curr_offset, 4,
1774 g_snprintf(add_string, string_len, " - (0x%04x)", value);
1778 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
1780 return(curr_offset - offset);
1787 be_l3_header_info(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
1790 guint32 curr_offset;
1792 curr_offset = offset;
1794 oct = tvb_get_guint8(tvb, curr_offset);
1796 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
1797 proto_tree_add_text(tree,
1798 tvb, curr_offset, 1,
1802 proto_tree_add_item(tree, hf_gsm_a_L3_protocol_discriminator, tvb, curr_offset, 1, FALSE);
1807 NO_MORE_DATA_CHECK(len);
1809 oct = tvb_get_guint8(tvb, curr_offset);
1811 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
1812 proto_tree_add_text(tree,
1813 tvb, curr_offset, 1,
1817 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
1818 proto_tree_add_text(tree,
1819 tvb, curr_offset, 1,
1822 ((oct & 0x08) ? "allocated by receiver" : "allocated by sender"));
1824 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
1825 proto_tree_add_text(tree,
1826 tvb, curr_offset, 1,
1833 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
1835 return(curr_offset - offset);
1842 be_enc_info(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
1847 guint32 curr_offset;
1849 curr_offset = offset;
1851 oct = tvb_get_guint8(tvb, curr_offset);
1858 other_decode_bitfield_value(a_bigbuf, oct, mask, 8);
1859 proto_tree_add_text(tree,
1860 tvb, curr_offset, 1,
1861 "%s : GSM A5/%u: %spermitted",
1864 (mask & oct) ? "" : "not ");
1869 while (mask != 0x01);
1871 other_decode_bitfield_value(a_bigbuf, oct, mask, 8);
1872 proto_tree_add_text(tree,
1873 tvb, curr_offset, 1,
1874 "%s : No encryption: %spermitted",
1876 (mask & oct) ? "" : "not ");
1880 NO_MORE_DATA_CHECK(len);
1882 proto_tree_add_text(tree,
1883 tvb, curr_offset, len - (curr_offset - offset),
1885 tvb_bytes_to_str(tvb, curr_offset, len-(curr_offset-offset) ));
1887 curr_offset += len - (curr_offset - offset);
1889 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
1891 return(curr_offset - offset);
1898 be_chan_type(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
1903 guint32 curr_offset;
1906 curr_offset = offset;
1908 oct = tvb_get_guint8(tvb, curr_offset);
1910 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
1911 proto_tree_add_text(tree,
1912 tvb, curr_offset, 1,
1919 case 1: str = "Speech"; break;
1920 case 2: str = "Data"; break;
1921 case 3: str = "Signalling"; break;
1927 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
1928 proto_tree_add_text(tree,
1929 tvb, curr_offset, 1,
1930 "%s : Speech/Data Indicator: %s",
1935 g_snprintf(add_string, string_len, " - (%s)", str);
1939 NO_MORE_DATA_CHECK(len);
1941 oct = tvb_get_guint8(tvb, curr_offset);
1949 case 0x08: str = "Full rate TCH channel Bm. Prefer full rate TCH"; break;
1950 case 0x09: str = "Half rate TCH channel Lm. Prefer half rate TCH"; break;
1951 case 0x0a: str = "Full or Half rate channel, Full rate preferred changes allowed after first allocation"; break;
1952 case 0x0b: str = "Full or Half rate channel, Half rate preferred changes allowed after first allocation"; break;
1953 case 0x1a: str = "Full or Half rate channel, Full rate preferred changes between full and half rate not allowed after first allocation"; break;
1954 case 0x1b: str = "Full or Half rate channel, Half rate preferred changes between full and half rate not allowed after first allocation"; break;
1955 case 0x0f: str = "Full or Half rate channel, changes allowed after first allocation"; break;
1956 case 0x1f: str = "Full or Half rate channel, changes between full and half rate not allowed after first allocation"; break;
1962 proto_tree_add_text(tree,
1963 tvb, curr_offset, 1,
1964 "Channel Rate and Type: %s",
1969 NO_MORE_DATA_CHECK(len);
1973 oct = tvb_get_guint8(tvb, curr_offset);
1975 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
1976 proto_tree_add_text(tree,
1977 tvb, curr_offset, 1,
1978 "%s : Extension: %s",
1980 (oct & 0x80) ? "extended" : "not extended");
1984 case 0x01: str = "GSM speech full rate version 1"; break;
1985 case 0x11: str = "GSM speech full rate version 2"; break;
1986 case 0x21: str = "GSM speech full rate version 3 (AMR)"; break;
1988 case 0x05: str = "GSM speech half rate version 1"; break;
1989 case 0x15: str = "GSM speech half rate version 2"; break;
1990 case 0x25: str = "GSM speech half rate version 3 (AMR)"; break;
1997 other_decode_bitfield_value(a_bigbuf, oct, 0x7f, 8);
1998 proto_tree_add_text(tree,
1999 tvb, curr_offset, 1,
2000 "%s : Speech version identifier: %s",
2006 while ((len - (curr_offset - offset)) > 0);
2008 else if (sdi == 0x02)
2016 case 0x08: str = "Full rate TCH channel Bm"; break;
2017 case 0x09: str = "Half rate TCH channel Lm"; break;
2018 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;
2019 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;
2020 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;
2021 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;
2023 if ((oct >= 0x20) && (oct <= 0x27))
2025 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";
2027 num_chan = (oct - 0x20) + 1;
2029 else if ((oct >= 0x30) && (oct <= 0x37))
2031 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";
2033 num_chan = (oct - 0x30) + 1;
2044 proto_tree_add_text(tree,
2045 tvb, curr_offset, 1,
2046 "Channel Rate and Type: Max channels %u, %s",
2052 proto_tree_add_text(tree,
2053 tvb, curr_offset, 1,
2054 "Channel Rate and Type: %s",
2060 NO_MORE_DATA_CHECK(len);
2062 oct = tvb_get_guint8(tvb, curr_offset);
2064 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
2065 proto_tree_add_text(tree,
2066 tvb, curr_offset, 1,
2067 "%s : Extension: %s",
2069 (oct & 0x80) ? "extended" : "not extended");
2071 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
2072 proto_tree_add_text(tree,
2073 tvb, curr_offset, 1,
2074 "%s : %sTransparent service",
2076 (oct & 0x40) ? "Non-" : "");
2082 /* non-transparent */
2086 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;
2087 case 0x18: str = "14.5 kbit/s"; break;
2088 case 0x10: str = "12 kbits/s"; break;
2089 case 0x11: str = "6 kbits/s"; break;
2099 case 0x18: str = "14.4 kbit/s"; break;
2100 case 0x10: str = "9.6kbit/s"; break;
2101 case 0x11: str = "4.8kbit/s"; break;
2102 case 0x12: str = "2.4kbit/s"; break;
2103 case 0x13: str = "1.2Kbit/s"; break;
2104 case 0x14: str = "600 bit/s"; break;
2105 case 0x15: str = "1200/75 bit/s (1200 network-to-MS / 75 MS-to-network)"; break;
2116 /* non-transparent */
2120 case 0x16: str = "58 kbit/s (4x14.5 kbit/s)"; break;
2121 case 0x14: str = "48.0 / 43.5 kbit/s (4x12 kbit/s or 3x14.5 kbit/s)"; break;
2122 case 0x13: str = "36.0 / 29.0 kbit/s (3x12 kbit/s or 2x14.5 kbit/s)"; break;
2123 case 0x12: str = "24.0 / 24.0 (4x6 kbit/s or 2x12 kbit/s)"; break;
2124 case 0x11: str = "18.0 / 14.5 kbit/s (3x6 kbit/s or 1x14.5 kbit/s)"; break;
2125 case 0x10: str = "12.0 / 12.0 kbit/s (2x6 kbit/s or 1x12 kbit/s)"; break;
2135 case 0x1f: str = "64 kbit/s, bit transparent"; break;
2136 case 0x1e: str = "56 kbit/s, bit transparent"; break;
2137 case 0x1d: str = "56 kbit/s"; break;
2138 case 0x1c: str = "48 kbit/s"; break;
2139 case 0x1b: str = "38.4 kbit/s"; break;
2140 case 0x1a: str = "28.8 kbit/s"; break;
2141 case 0x19: str = "19.2 kbit/s"; break;
2142 case 0x18: str = "14.4 kbit/s"; break;
2143 case 0x10: str = "9.6 kbit/s"; break;
2151 other_decode_bitfield_value(a_bigbuf, oct, 0x3f, 8);
2152 proto_tree_add_text(tree,
2153 tvb, curr_offset, 1,
2160 NO_MORE_DATA_CHECK(len);
2162 oct = tvb_get_guint8(tvb, curr_offset);
2164 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
2165 proto_tree_add_text(tree,
2166 tvb, curr_offset, 1,
2167 "%s : Extension: %s",
2169 (oct & 0x80) ? "extended" : "not extended");
2171 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
2172 proto_tree_add_text(tree,
2173 tvb, curr_offset, 1,
2179 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
2180 proto_tree_add_text(tree,
2181 tvb, curr_offset, 1,
2182 "%s : 14.5 kbit/s (TCH/F14.4) %sallowed",
2184 (oct & 0x08) ? "" : "not ");
2186 other_decode_bitfield_value(a_bigbuf, oct, 0x04, 8);
2187 proto_tree_add_text(tree,
2188 tvb, curr_offset, 1,
2192 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
2193 proto_tree_add_text(tree,
2194 tvb, curr_offset, 1,
2195 "%s : 12.0 kbit/s (TCH F/9.6) %sallowed",
2197 (oct & 0x02) ? "" : "not ");
2199 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
2200 proto_tree_add_text(tree,
2201 tvb, curr_offset, 1,
2202 "%s : 6.0 kbit/s (TCH F/4.8) %sallowed",
2204 (oct & 0x01) ? "" : "not ");
2208 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
2209 proto_tree_add_text(tree,
2210 tvb, curr_offset, 1,
2211 "%s : 14.5/14.4 kbit/s (TCH/F14.4) %sallowed",
2213 (oct & 0x08) ? "" : "not ");
2215 other_decode_bitfield_value(a_bigbuf, oct, 0x04, 8);
2216 proto_tree_add_text(tree,
2217 tvb, curr_offset, 1,
2221 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
2222 proto_tree_add_text(tree,
2223 tvb, curr_offset, 1,
2224 "%s : 12.0/9.6 kbit/s (TCH F/9.6) %sallowed",
2226 (oct & 0x02) ? "" : "not ");
2228 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
2229 proto_tree_add_text(tree,
2230 tvb, curr_offset, 1,
2231 "%s : 6.0/4.8 kbit/s (TCH F/4.8) %sallowed",
2233 (oct & 0x01) ? "" : "not ");
2238 else if (sdi == 0x03)
2244 case 0x00: str = "SDCCH or Full rate TCH channel Bm or Half rate TCH channel Lm"; break;
2245 case 0x01: str = "SDCCH"; break;
2246 case 0x02: str = "SDCCH or Full rate TCH channel Bm"; break;
2247 case 0x03: str = "SDCCH or Half rate TCH channel Lm"; break;
2248 case 0x08: str = "Full rate TCH channel Bm"; break;
2249 case 0x09: str = "Half rate TCH channel Lm"; break;
2250 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;
2251 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;
2252 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;
2253 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;
2259 proto_tree_add_text(tree,
2260 tvb, curr_offset, 1,
2261 "Channel Rate and Type: %s",
2266 NO_MORE_DATA_CHECK(len);
2268 proto_tree_add_text(tree,
2269 tvb, curr_offset, len - (curr_offset - offset),
2272 curr_offset += len - (curr_offset - offset);
2276 /* unknown format */
2278 proto_tree_add_text(tree,
2279 tvb, curr_offset, len - (curr_offset - offset),
2282 curr_offset += len - (curr_offset - offset);
2285 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
2287 return(curr_offset - offset);
2292 * Formats everything after the discriminator, shared function
2295 be_cell_id_aux(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len, guint8 disc)
2299 guint32 curr_offset;
2304 add_string[0] = '\0';
2305 curr_offset = offset;
2315 case 0x08: /* For intersystem handover from GSM to UMTS or cdma2000: */
2316 octs[0] = tvb_get_guint8(tvb, curr_offset);
2317 octs[1] = tvb_get_guint8(tvb, curr_offset + 1);
2318 octs[2] = tvb_get_guint8(tvb, curr_offset + 2);
2320 mcc_mnc_aux(octs, mcc, mnc);
2322 proto_tree_add_text(tree,
2323 tvb, curr_offset, 3,
2324 "Mobile Country Code (MCC): %s, Mobile Network Code (MNC): %s",
2334 case 0x0a: /*For intersystem handover from GSM to UMTS or cdma2000: */
2338 value = tvb_get_ntohs(tvb, curr_offset);
2340 proto_tree_add_item(tree, hf_gsm_a_cell_lac, tvb, curr_offset, 2, FALSE);
2345 g_snprintf(add_string, string_len, " - LAC (0x%04x)", value);
2349 case 0x09: /* For intersystem handover from GSM to UMTS or cdma2000: */
2351 if ((disc == 0x08) ||(disc == 0x09) || (disc == 0x0a)){
2353 value = tvb_get_ntohs(tvb, curr_offset);
2354 proto_tree_add_item(tree, hf_gsm_a_be_rnc_id, tvb, curr_offset, 2, FALSE);
2358 if (add_string[0] == '\0')
2360 g_snprintf(add_string, string_len, " - RNC-ID (%u)", value);
2364 g_snprintf(add_string, string_len, "%s/RNC-ID (%u)", add_string, value);
2370 if ((disc == 0x04) || (disc == 0x05) || (disc == 0x08)) break;
2378 value = tvb_get_ntohs(tvb, curr_offset);
2380 proto_tree_add_uint(tree, hf_gsm_a_cell_ci, tvb,
2381 curr_offset, 2, value);
2387 if (add_string[0] == '\0')
2389 g_snprintf(add_string, string_len, " - CI (%u)", value);
2393 g_snprintf(add_string, string_len, "%s/CI (%u)", add_string, value);
2399 proto_tree_add_text(tree, tvb, curr_offset, len,
2400 "Cell ID - Unknown format");
2402 curr_offset += (len);
2406 return(curr_offset - offset);
2410 be_cell_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
2414 guint32 curr_offset;
2417 curr_offset = offset;
2419 oct = tvb_get_guint8(tvb, curr_offset);
2421 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
2422 proto_tree_add_text(tree,
2423 tvb, curr_offset, 1,
2427 proto_tree_add_item(tree, hf_gsm_a_be_cell_id_disc, tvb, curr_offset, 1, FALSE);
2431 NO_MORE_DATA_CHECK(len);
2434 be_cell_id_aux(tvb, tree, curr_offset, len - (curr_offset - offset), add_string, string_len, disc);
2436 /* no length check possible */
2438 return(curr_offset - offset);
2445 be_prio(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
2448 guint32 curr_offset;
2452 curr_offset = offset;
2454 oct = tvb_get_guint8(tvb, curr_offset);
2456 proto_tree_add_item(tree, hf_gsm_a_b8spare, tvb, curr_offset, 1, FALSE);
2458 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
2459 proto_tree_add_text(tree,
2460 tvb, curr_offset, 1,
2461 "%s : Preemption Capability Indicator (PCI): this allocation request %s preempt an existing connection",
2463 (oct & 0x40) ? "may" : "shall not");
2465 switch ((oct & 0x3c) >> 2)
2467 case 0x00: str = "Spare"; break;
2468 case 0x0f: str = "priority not used"; break;
2470 str = "1 is highest";
2474 other_decode_bitfield_value(a_bigbuf, oct, 0x3c, 8);
2475 proto_tree_add_text(tree,
2476 tvb, curr_offset, 1,
2477 "%s : Priority Level: (%u) %s",
2483 g_snprintf(add_string, string_len, " - (%u)", (oct & 0x3c) >> 2);
2485 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
2486 proto_tree_add_text(tree,
2487 tvb, curr_offset, 1,
2488 "%s : Queuing Allowed Indicator (QA): queuing %sallowed",
2490 (oct & 0x02) ? "" : "not ");
2492 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
2493 proto_tree_add_text(tree,
2494 tvb, curr_offset, 1,
2495 "%s : Preemption Vulnerability Indicator (PVI): this connection %s be preempted by another allocation request",
2497 (oct & 0x01) ? "might" : "shall not");
2501 /* no length check possible */
2503 return(curr_offset - offset);
2510 be_l3_info(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
2512 guint32 curr_offset;
2515 curr_offset = offset;
2517 proto_tree_add_text(tree, tvb, curr_offset, len,
2518 "Layer 3 Information value");
2521 * dissect the embedded DTAP message
2523 l3_tvb = tvb_new_subset(tvb, curr_offset, len, len);
2525 call_dissector(dtap_handle, l3_tvb, g_pinfo, g_tree);
2529 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
2531 return(curr_offset - offset);
2538 be_dlci(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
2541 guint32 curr_offset;
2542 proto_item *item = NULL;
2543 proto_tree *subtree = NULL;
2546 curr_offset = offset;
2549 proto_tree_add_text(tree, tvb, curr_offset, 1,
2550 "Data Link Connection Identifier");
2552 subtree = proto_item_add_subtree(item, ett_dlci);
2554 oct = tvb_get_guint8(tvb, curr_offset);
2556 proto_tree_add_uint(subtree, hf_gsm_a_dlci_cc, tvb, curr_offset, 1, oct);
2557 proto_tree_add_uint(subtree, hf_gsm_a_dlci_spare, tvb, curr_offset, 1, oct);
2558 proto_tree_add_uint(subtree, hf_gsm_a_dlci_sapi, tvb, curr_offset, 1, oct);
2562 /* no length check possible */
2564 return(curr_offset - offset);
2571 be_down_dtx_flag(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
2574 guint32 curr_offset;
2577 curr_offset = offset;
2579 oct = tvb_get_guint8(tvb, curr_offset);
2581 other_decode_bitfield_value(a_bigbuf, oct, 0xfe, 8);
2582 proto_tree_add_text(tree,
2583 tvb, curr_offset, 1,
2587 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
2588 proto_tree_add_text(tree,
2589 tvb, curr_offset, 1,
2590 "%s : BSS is %s to activate DTX in the downlink direction",
2592 (oct & 0x01) ? "forbidden" : "allowed");
2596 /* no length check possible */
2598 return(curr_offset - offset);
2605 be_cell_id_list(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
2611 guint32 curr_offset;
2612 proto_item *item = NULL;
2613 proto_tree *subtree = NULL;
2615 curr_offset = offset;
2617 oct = tvb_get_guint8(tvb, curr_offset);
2619 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
2620 proto_tree_add_text(tree,
2621 tvb, curr_offset, 1,
2626 proto_tree_add_item(tree, hf_gsm_a_be_cell_id_disc, tvb, curr_offset, 1, FALSE);
2629 NO_MORE_DATA_CHECK(len);
2635 proto_tree_add_text(tree,
2636 tvb, curr_offset, -1,
2640 subtree = proto_item_add_subtree(item, ett_cell_list);
2643 add_string[0] = '\0';
2645 be_cell_id_aux(tvb, subtree, curr_offset, len - (curr_offset - offset), add_string, string_len, disc);
2647 if (add_string && add_string[0] != '\0')
2649 proto_item_append_text(item, "%s", add_string ? add_string : "");
2652 proto_item_set_len(item, consumed);
2654 curr_offset += consumed;
2658 while ((len - (curr_offset - offset)) > 0 && consumed > 0);
2661 g_snprintf(add_string, string_len, " - %u cell%s",
2662 num_cells, plurality(num_cells, "", "s"));
2665 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
2667 return(curr_offset - offset);
2674 be_chosen_chan(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
2677 guint32 curr_offset;
2678 const gchar *str = NULL;
2681 curr_offset = offset;
2683 oct = tvb_get_guint8(tvb, curr_offset);
2685 switch ((oct & 0xf0) >> 4)
2687 case 0: str = "No channel mode indication"; break;
2688 case 9: str = "Speech (full rate or half rate)"; break;
2689 case 14: str = "Data, 14.5 kbit/s radio interface rate"; break;
2690 case 11: str = "Data, 12.0 kbit/s radio interface rate"; break;
2691 case 12: str = "Data, 6.0 kbit/s radio interface rate"; break;
2692 case 13: str = "Data, 3.6 kbit/s radio interface rate"; break;
2693 case 8: str = "Signalling only"; break;
2699 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
2700 proto_tree_add_text(tree,
2701 tvb, curr_offset, 1,
2702 "%s : Channel mode: %s",
2708 case 0: str = "None"; break;
2709 case 1: str = "SDCCH"; break;
2710 case 8: str = "1 Full rate TCH"; break;
2711 case 9: str = "1 Half rate TCH"; break;
2712 case 10: str = "2 Full Rate TCHs"; break;
2713 case 11: str = "3 Full Rate TCHs"; break;
2714 case 12: str = "4 Full Rate TCHs"; break;
2715 case 13: str = "5 Full Rate TCHs"; break;
2716 case 14: str = "6 Full Rate TCHs"; break;
2717 case 15: str = "7 Full Rate TCHs"; break;
2718 case 4: str = "8 Full Rate TCHs"; break;
2724 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
2725 proto_tree_add_text(tree,
2726 tvb, curr_offset, 1,
2733 /* no length check possible */
2735 return(curr_offset - offset);
2742 be_ciph_resp_mode(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
2745 guint32 curr_offset;
2748 curr_offset = offset;
2750 oct = tvb_get_guint8(tvb, curr_offset);
2752 other_decode_bitfield_value(a_bigbuf, oct, 0xfe, 8);
2753 proto_tree_add_text(tree,
2754 tvb, curr_offset, 1,
2758 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
2759 proto_tree_add_text(tree,
2760 tvb, curr_offset, 1,
2761 "%s : IMEISV must %sbe included by the mobile station",
2763 (oct & 0x01) ? "" : "not ");
2767 /* no length check possible */
2769 return(curr_offset - offset);
2777 be_l3_msg(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
2779 guint32 curr_offset;
2782 curr_offset = offset;
2784 proto_tree_add_text(tree, tvb, curr_offset, len,
2785 "Layer 3 Message Contents");
2788 * dissect the embedded DTAP message
2790 l3_tvb = tvb_new_subset(tvb, curr_offset, len, len);
2792 call_dissector(dtap_handle, l3_tvb, g_pinfo, g_tree);
2796 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
2798 return(curr_offset - offset);
2802 * [2] 3.2.2.36 Channel Needed
2804 be_cha_needed(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
2806 guint32 curr_offset;
2809 curr_offset = offset;
2811 /* no length check possible */
2812 proto_tree_add_item(tree, hf_gsm_a_rr_chnl_needed_ch1, tvb, curr_offset, 1, FALSE);
2814 return(curr_offset - offset);
2822 be_for_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
2825 guint32 curr_offset;
2826 const gchar *str = NULL;
2829 curr_offset = offset;
2831 oct = tvb_get_guint8(tvb, curr_offset);
2833 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
2834 proto_tree_add_text(tree,
2835 tvb, curr_offset, 1,
2841 case 1: str = "forward to subsequent BSS, no trace at MSC"; break;
2842 case 2: str = "forward to subsequent BSS, and trace at MSC"; break;
2848 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
2849 proto_tree_add_text(tree,
2850 tvb, curr_offset, 1,
2857 /* no length check possible */
2859 return(curr_offset - offset);
2866 be_chosen_enc_alg(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
2869 guint32 curr_offset;
2870 const gchar *str = NULL;
2873 curr_offset = offset;
2875 oct = tvb_get_guint8(tvb, curr_offset);
2879 case 0x01: str = "No encryption used"; break;
2880 case 0x02: str = "GSM A5/1"; break;
2881 case 0x03: str = "GSM A5/2"; break;
2882 case 0x04: str = "GSM A5/3"; break;
2883 case 0x05: str = "GSM A5/4"; break;
2884 case 0x06: str = "GSM A5/5"; break;
2885 case 0x07: str = "GSM A5/6"; break;
2886 case 0x08: str = "GSM A5/7"; break;
2892 proto_tree_add_text(tree,
2893 tvb, curr_offset, 1,
2894 "Algorithm Identifier: %s",
2900 g_snprintf(add_string, string_len, " - %s", str);
2902 /* no length check possible */
2904 return(curr_offset - offset);
2911 be_cct_pool(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
2914 guint32 curr_offset;
2915 const gchar *str = NULL;
2918 curr_offset = offset;
2920 oct = tvb_get_guint8(tvb, curr_offset);
2926 else if ((oct >= 0x80) && (oct <= 0x8f))
2928 str = ", for national/local use";
2932 str = ", reserved for future international use";
2935 proto_tree_add_text(tree,
2936 tvb, curr_offset, 1,
2937 "Circuit pool number: %u%s",
2944 g_snprintf(add_string, string_len, " - (%u)", oct);
2946 /* no length check possible */
2948 return(curr_offset - offset);
2955 be_curr_chan_1(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
2958 guint32 curr_offset;
2962 curr_offset = offset;
2964 oct = tvb_get_guint8(tvb, curr_offset);
2966 switch ((oct & 0xf0) >> 4)
2968 case 0x00: str = "Signalling only"; break;
2969 case 0x01: str = "Speech (full rate or half rate)"; break;
2970 case 0x06: str = "Data, 14.5 kbit/s radio interface rate"; break;
2971 case 0x03: str = "Data, 12.0 kbit/s radio interface rate"; break;
2972 case 0x04: str = "Data, 6.0 kbit/s radio interface rate"; break;
2973 case 0x05: str = "Data, 3.6 kbit/s radio interface rate"; break;
2979 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
2980 proto_tree_add_text(tree,
2981 tvb, curr_offset, 1,
2982 "%s : Channel Mode: %s",
2988 case 0x01: str = "SDCCH"; break;
2989 case 0x08: str = "1 Full rate TCH"; break;
2990 case 0x09: str = "1 Half rate TCH"; break;
2991 case 0x0a: str = "2 Full Rate TCHs"; break;
2992 case 0x0b: str = "3 Full Rate TCHs"; break;
2993 case 0x0c: str = "4 Full Rate TCHs"; break;
2994 case 0x0d: str = "5 Full Rate TCHs"; break;
2995 case 0x0e: str = "6 Full Rate TCHs"; break;
2996 case 0x0f: str = "7 Full Rate TCHs"; break;
2997 case 0x04: str = "8 Full Rate TCHs"; break;
3003 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
3004 proto_tree_add_text(tree,
3005 tvb, curr_offset, 1,
3006 "%s : Channel: (%u) %s",
3013 /* no length check possible */
3015 return(curr_offset - offset);
3022 be_que_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
3025 guint32 curr_offset;
3028 curr_offset = offset;
3030 oct = tvb_get_guint8(tvb, curr_offset);
3032 other_decode_bitfield_value(a_bigbuf, oct, 0xfc, 8);
3033 proto_tree_add_text(tree,
3034 tvb, curr_offset, 1,
3038 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
3039 proto_tree_add_text(tree,
3040 tvb, curr_offset, 1,
3041 "%s : qri: it is recommended %sto allow queuing",
3043 (oct & 0x02) ? "" : "not ");
3045 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
3046 proto_tree_add_text(tree,
3047 tvb, curr_offset, 1,
3053 /* no length check possible */
3055 return(curr_offset - offset);
3062 be_speech_ver(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
3065 guint32 curr_offset;
3066 const gchar *str = NULL;
3067 const gchar *short_str = NULL;
3070 curr_offset = offset;
3072 oct = tvb_get_guint8(tvb, curr_offset);
3074 proto_tree_add_item(tree, hf_gsm_a_b8spare, tvb, curr_offset, 1, FALSE);
3078 case 0x01: str = "GSM speech full rate version 1"; short_str = "FR1"; break;
3079 case 0x11: str = "GSM speech full rate version 2"; short_str = "FR2"; break;
3080 case 0x21: str = "GSM speech full rate version 3 (AMR)"; short_str = "FR3 (AMR)"; break;
3082 case 0x05: str = "GSM speech half rate version 1"; short_str = "HR1"; break;
3083 case 0x15: str = "GSM speech half rate version 2"; short_str = "HR2"; break;
3084 case 0x25: str = "GSM speech half rate version 3 (AMR)"; short_str = "HR3 (AMR)"; break;
3092 other_decode_bitfield_value(a_bigbuf, oct, 0x7f, 8);
3093 proto_tree_add_text(tree,
3094 tvb, curr_offset, 1,
3095 "%s : Speech version identifier: %s",
3102 g_snprintf(add_string, string_len, " - (%s)", short_str);
3104 /* no length check possible */
3106 return(curr_offset - offset);
3110 * 3.2.2.68 3GPP TS 48.008 version 6.9.0 Release 6
3113 /* BSSLAP the embedded message is as defined in 3GPP TS 48.071
3114 * LLP the embedded message contains a Facility Information Element as defined in 3GPP TS 44.071
3115 * excluding the Facility IEI and length of Facility IEI octets defined in 3GPP TS 44.071.
3116 * SMLCPP the embedded message is as defined in 3GPP TS 48.031
3118 static const value_string gsm_a_apdu_protocol_id_strings[] = {
3127 be_apdu(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
3129 guint32 curr_offset;
3131 curr_offset = offset;
3133 proto_tree_add_text(tree, tvb, curr_offset, len,
3134 "APDU (not displayed)");
3137 * dissect the embedded APDU message
3138 * if someone writes a TS 09.31 dissector
3140 * The APDU octets 4 to n are coded in the same way as the
3141 * equivalent octet in the APDU element of 3GPP TS 49.031.
3144 proto_tree_add_item(tree, hf_gsm_a_apdu_protocol_id, tvb, curr_offset, 1, FALSE);
3148 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3150 return(curr_offset - offset);
3155 /* Common Information Elements 10.5.1 */
3157 DE_CELL_ID, /* Cell Identity */
3158 DE_CIPH_KEY_SEQ_NUM, /* Ciphering Key Sequence Number */
3159 DE_LAI, /* Location Area Identification */
3160 DE_MID, /* Mobile Identity */
3161 DE_MS_CM_1, /* Mobile Station Classmark 1 */
3162 DE_MS_CM_2, /* Mobile Station Classmark 2 */
3163 DE_MS_CM_3, /* Mobile Station Classmark 3 */
3164 DE_D_GB_CALL_REF, /* Descriptive group or broadcast call reference */
3165 DE_G_CIPH_KEY_NUM, /* Group Cipher Key Number */
3166 DE_PD_SAPI, /* PD and SAPI $(CCBS)$ */
3168 DE_PRIO, /* Priority Level */
3169 DE_PLMN_LIST, /* PLMN List */
3171 /* Radio Resource Management Information Elements 10.5.2, most are from 10.5.1 */
3173 * [3] 10.5.2.1a BA Range
3175 DE_RR_CELL_CH_DSC, /* [3] 10.5.2.1b Cell Channel Description */
3177 /* [3] 10.5.2.1c BA List Pref
3178 * [3] 10.5.2.1d UTRAN Frequency List
3179 * [3] 10.5.2.1e Cell selection indicator after release of all TCH and SDCCH IE
3181 DE_RR_CELL_DSC, /* 10.5.2.2 RR Cell Description */
3183 * [3] 10.5.2.3 Cell Options (BCCH)
3184 * [3] 10.5.2.3a Cell Options (SACCH)
3185 * [3] 10.5.2.4 Cell Selection Parameters
3186 * [3] 10.5.2.4a (void)
3188 DE_RR_CH_DSC, /* [3] 10.5.2.5 Channel Description */
3189 DE_RR_CH_DSC2, /* [3] 10.5.2.5a Channel Description 2 */
3190 DE_RR_CH_MODE, /* [3] 10.5.2.6 Channel Mode */
3191 DE_RR_CH_MODE2, /* [3] 10.5.2.7 Channel Mode 2 */
3192 /* [3] 10.5.2.7a UTRAN predefined configuration status information / START-CS / UE CapabilityUTRAN Classmark information element 218
3193 * [3] 10.5.2.7b (void) */
3194 DE_RR_CM_ENQ_MASK, /* [3] 10.5.2.7c Classmark Enquiry Mask */
3195 /* [3] 10.5.2.7d GERAN Iu Mode Classmark information element */
3196 DE_RR_CHNL_NEEDED, /* [3] 10.5.2.8 Channel Needed
3197 * [3] 10.5.2.8a (void)
3198 * [3] 10.5.2.8b Channel Request Description 2 */
3200 DE_RR_CIP_MODE_SET, /* [3] 10.5.2.9 Cipher Mode Setting */
3201 /* [3] 10.5.2.10 Cipher Response
3202 * [3] 10.5.2.11 Control Channel Description
3203 * [3] 10.5.2.11a DTM Information Details */
3204 DE_RR_DYN_ARFCN_MAP, /* [3] 10.5.2.11b Dynamic ARFCN Mapping */
3205 DE_RR_FREQ_CH_SEQ, /* [3] 10.5.2.12 Frequency Channel Sequence */
3206 DE_RR_FREQ_LIST, /* [3] 10.5.2.13 Frequency List */
3207 DE_RR_FREQ_SHORT_LIST, /* [3] 10.5.2.14 Frequency Short List */
3208 DE_RR_FREQ_SHORT_LIST2, /* [3] 10.5.2.14a Frequency Short List 2 */
3209 /* [3] 10.5.2.14b Group Channel Description
3210 * [3] 10.5.2.14c GPRS Resumption
3211 * [3] 10.5.2.14d GPRS broadcast information
3212 * [3] 10.5.2.14e Enhanced DTM CS Release Indication
3215 DE_RR_HO_REF, /* 10.5.2.15 Handover Reference */
3217 * [3] 10.5.2.16 IA Rest Octets
3218 * [3] 10.5.2.17 IAR Rest Octets
3219 * [3] 10.5.2.18 IAX Rest Octets
3220 * [3] 10.5.2.19 L2 Pseudo Length
3221 * [3] 10.5.2.20 Measurement Results
3222 * [3] 10.5.2.20a GPRS Measurement Results
3224 DE_RR_MOB_ALL, /* [3] 10.5.2.21 Mobile Allocation */
3225 DE_RR_MOB_TIME_DIFF, /* [3] 10.5.2.21a Mobile Time Difference */
3226 DE_RR_MULTIRATE_CONF, /* [3] 10.5.2.21aa MultiRate configuration */
3228 DE_RR_MULT_ALL, /* [3] 10.5.2.21b Multislot Allocation */
3231 * [3] 10.5.2.21c NC mode
3232 * [3] 10.5.2.22 Neighbour Cell Description
3233 * [3] 10.5.2.22a Neighbour Cell Description 2
3234 * [3] 10.5.2.22b (void)
3235 * [3] 10.5.2.22c NT/N Rest Octets
3236 * [3] 10.5.2.23 P1 Rest Octets
3237 * [3] 10.5.2.24 P2 Rest Octets
3238 * [3] 10.5.2.25 P3 Rest Octets
3239 * [3] 10.5.2.25a Packet Channel Description
3240 * [3] 10.5.2.25b Dedicated mode or TBF
3241 * [3] 10.5.2.25c RR Packet Uplink Assignment
3242 * [3] 10.5.2.25d RR Packet Downlink Assignment
3243 * [3] 10.5.2.26 Page Mode
3244 * [3] 10.5.2.26a (void)
3245 * [3] 10.5.2.26b (void)
3246 * [3] 10.5.2.26c (void)
3247 * [3] 10.5.2.26d (void)
3248 * [3] 10.5.2.27 NCC Permitted
3250 DE_RR_POW_CMD, /* 10.5.2.28 Power Command */
3251 DE_RR_POW_CMD_AND_ACC_TYPE, /* 10.5.2.28a Power Command and access type */
3253 * [3] 10.5.2.29 RACH Control Parameters
3254 * [3] 10.5.2.30 Request Reference
3256 DE_RR_CAUSE, /* 10.5.2.31 RR Cause */
3257 DE_RR_SYNC_IND, /* 10.5.2.39 Synchronization Indication */
3258 /* [3] 10.5.2.32 SI 1 Rest Octets
3259 * [3] 10.5.2.33 SI 2bis Rest Octets
3260 * [3] 10.5.2.33a SI 2ter Rest Octets
3261 * [3] 10.5.2.33b SI 2quater Rest Octets
3262 * [3] 10.5.2.34 SI 3 Rest Octets
3263 * [3] 10.5.2.35 SI 4 Rest Octets
3264 * [3] 10.5.2.35a SI 6 Rest Octets
3265 * [3] 10.5.2.36 SI 7 Rest Octets
3266 * [3] 10.5.2.37 SI 8 Rest Octets
3267 * [3] 10.5.2.37a SI 9 Rest Octets
3268 * [3] 10.5.2.37b SI 13 Rest Octets
3269 * [3] 10.5.2.37c (void)
3270 * [3] 10.5.2.37d (void)
3271 * [3] 10.5.2.37e SI 16 Rest Octets
3272 * [3] 10.5.2.37f SI 17 Rest Octets
3273 * [3] 10.5.2.37g SI 19 Rest Octets
3274 * [3] 10.5.2.37h SI 18 Rest Octets
3275 * [3] 10.5.2.37i SI 20 Rest Octets */
3276 DE_RR_STARTING_TIME, /* [3] 10.5.2.38 Starting Time */
3277 DE_RR_TIMING_ADV, /* [3] 10.5.2.40 Timing Advance */
3278 DE_RR_TIME_DIFF, /* [3] 10.5.2.41 Time Difference */
3279 DE_RR_TLLI, /* [3] 10.5.2.41a TLLI */
3281 * [3] 10.5.2.42 TMSI/P-TMSI */
3282 DE_RR_VGCS_TAR_MODE_IND, /* [3] 10.5.2.42a VGCS target mode Indication */
3284 DE_RR_VGCS_CIP_PAR, /* [3] 10.5.2.42b VGCS Ciphering Parameters */
3286 /* [3] 10.5.2.43 Wait Indication
3287 * [3] 10.5.2.44 SI10 rest octets $(ASCI)$
3288 * [3] 10.5.2.45 EXTENDED MEASUREMENT RESULTS
3289 * [3] 10.5.2.46 Extended Measurement Frequency List */
3290 DE_RR_SUS_CAU, /* [3] 10.5.2.47 Suspension Cause */
3291 /* [3] 10.5.2.48 APDU ID
3292 * [3] 10.5.2.49 APDU Flags
3293 * [3] 10.5.2.50 APDU Data
3294 * [3] 10.5.2.51 Handover To UTRAN Command
3295 * [3] 10.5.2.52 Handover To cdma2000 Command
3296 * [3] 10.5.2.53 (void)
3297 * [3] 10.5.2.54 (void)
3298 * [3] 10.5.2.55 (void)
3299 * [3] 10.5.2.56 3G Target Cell */
3300 DE_RR_DED_SERV_INF, /* [3] 10.5.2.59 Dedicated Service Information */
3303 /* Mobility Management Information Elements 10.5.3 */
3304 DE_AUTH_PARAM_RAND, /* Authentication Parameter RAND */
3305 DE_AUTH_PARAM_AUTN, /* Authentication Parameter AUTN (UMTS authentication challenge only) */
3306 DE_AUTH_RESP_PARAM, /* Authentication Response Parameter */
3307 DE_AUTH_RESP_PARAM_EXT, /* Authentication Response Parameter (extension) (UMTS authentication challenge only) */
3308 DE_AUTH_FAIL_PARAM, /* Authentication Failure Parameter (UMTS authentication challenge only) */
3309 DE_CM_SRVC_TYPE, /* CM Service Type */
3310 DE_ID_TYPE, /* Identity Type */
3312 DE_LOC_UPD_TYPE, /* Location Updating Type */
3313 DE_NETWORK_NAME, /* Network Name */
3314 DE_REJ_CAUSE, /* Reject Cause */
3315 DE_FOP, /* Follow-on Proceed */
3316 DE_TIME_ZONE, /* Time Zone */
3317 DE_TIME_ZONE_TIME, /* Time Zone and Time */
3318 DE_CTS_PERM, /* CTS Permission */
3319 DE_LSA_ID, /* LSA Identifier */
3320 DE_DAY_SAVING_TIME, /* Daylight Saving Time */
3321 DE_EMERGENCY_NUM_LIST, /* Emergency Number List */
3322 /* Call Control Information Elements 10.5.4 */
3324 DE_AUX_STATES, /* Auxiliary States */
3325 DE_BEARER_CAP, /* Bearer Capability */
3326 DE_CC_CAP, /* Call Control Capabilities */
3327 DE_CALL_STATE, /* Call State */
3328 DE_CLD_PARTY_BCD_NUM, /* Called Party BCD Number */
3329 DE_CLD_PARTY_SUB_ADDR, /* Called Party Subaddress */
3330 DE_CLG_PARTY_BCD_NUM, /* Calling Party BCD Number */
3331 DE_CLG_PARTY_SUB_ADDR, /* Calling Party Subaddress */
3332 DE_CAUSE, /* Cause */
3333 DE_CLIR_SUP, /* CLIR Suppression */
3334 DE_CLIR_INV, /* CLIR Invocation */
3335 DE_CONGESTION, /* Congestion Level */
3336 DE_CONN_NUM, /* Connected Number */
3337 DE_CONN_SUB_ADDR, /* Connected Subaddress */
3338 DE_FACILITY, /* Facility */
3339 DE_HLC, /* High Layer Compatibility */
3340 DE_KEYPAD_FACILITY, /* Keypad Facility */
3341 DE_LLC, /* Low Layer Compatibility */
3342 DE_MORE_DATA, /* More Data */
3343 DE_NOT_IND, /* Notification Indicator */
3344 DE_PROG_IND, /* Progress Indicator */
3345 DE_RECALL_TYPE, /* Recall type $(CCBS)$ */
3346 DE_RED_PARTY_BCD_NUM, /* Redirecting Party BCD Number */
3347 DE_RED_PARTY_SUB_ADDR, /* Redirecting Party Subaddress */
3348 DE_REPEAT_IND, /* Repeat Indicator */
3349 DE_REV_CALL_SETUP_DIR, /* Reverse Call Setup Direction */
3350 DE_SETUP_CONTAINER, /* SETUP Container $(CCBS)$ */
3351 DE_SIGNAL, /* Signal */
3352 DE_SS_VER_IND, /* SS Version Indicator */
3353 DE_USER_USER, /* User-user */
3354 DE_ALERT_PATTERN, /* Alerting Pattern $(NIA)$ */
3355 DE_ALLOWED_ACTIONS, /* Allowed Actions $(CCBS)$ */
3356 DE_SI, /* Stream Identifier */
3357 DE_NET_CC_CAP, /* Network Call Control Capabilities */
3358 DE_CAUSE_NO_CLI, /* Cause of No CLI */
3359 DE_IMM_MOD_IND, /* Immediate Modification Indicator */
3360 DE_SUP_CODEC_LIST, /* Supported Codec List */
3361 DE_SRVC_CAT, /* Service Category */
3362 /* GPRS Mobility Management Information Elements 10.5.5 */
3363 DE_ATTACH_RES, /* [7] 10.5.1 Attach Result*/
3364 DE_ATTACH_TYPE, /* [7] 10.5.2 Attach Type */
3365 DE_CIPH_ALG, /* [7] 10.5.3 Cipher Algorithm */
3366 DE_TMSI_STAT, /* [7] 10.5.4 TMSI Status */
3367 DE_DETACH_TYPE, /* [7] 10.5.5 Detach Type */
3368 DE_DRX_PARAM, /* [7] 10.5.6 DRX Parameter */
3369 DE_FORCE_TO_STAND, /* [7] 10.5.7 Force to Standby */
3370 DE_FORCE_TO_STAND_H, /* [7] 10.5.8 Force to Standby - Info is in the high nibble */
3371 DE_P_TMSI_SIG, /* [7] 10.5.9 P-TMSI Signature */
3372 DE_P_TMSI_SIG_2, /* [7] 10.5.10 P-TMSI Signature 2 */
3373 DE_ID_TYPE_2, /* [7] 10.5.11 Identity Type 2 */
3374 DE_IMEISV_REQ, /* [7] 10.5.12 IMEISV Request */
3375 DE_REC_N_PDU_NUM_LIST, /* [7] 10.5.13 Receive N-PDU Numbers List */
3376 DE_MS_NET_CAP, /* [7] 10.5.14 MS Network Capability */
3377 DE_MS_RAD_ACC_CAP, /* [7] 10.5.15 MS Radio Access Capability */
3378 DE_GMM_CAUSE, /* [7] 10.5.16 GMM Cause */
3379 DE_RAI, /* [7] 10.5.17 Routing Area Identification */
3380 DE_UPD_RES, /* [7] 10.5.18 Update Result */
3381 DE_UPD_TYPE, /* [7] 10.5.19 Update Type */
3382 DE_AC_REF_NUM, /* [7] 10.5.20 A&C Reference Number */
3383 DE_AC_REF_NUM_H, /* A&C Reference Number - Info is in the high nibble */
3384 DE_SRVC_TYPE, /* [7] 10.5.20 Service Type */
3385 DE_CELL_NOT, /* [7] 10.5.21 Cell Notification */
3386 DE_PS_LCS_CAP, /* [7] 10.5.22 PS LCS Capability */
3387 DE_NET_FEAT_SUP, /* [7] 10.5.23 Network Feature Support */
3388 DE_RAT_INFO_CONTAINER, /* [7] 10.5.24 Inter RAT information container */
3389 /* [7] 10.5.25 Requested MS information */
3391 /* Short Message Service Information Elements [5] 8.1.4 */
3392 DE_CP_USER_DATA, /* CP-User Data */
3393 DE_CP_CAUSE, /* CP-Cause */
3394 /* Short Message Service Information Elements [5] 8.2 */
3395 DE_RP_MESSAGE_REF, /* RP-Message Reference */
3396 DE_RP_ORIG_ADDR, /* RP-Origination Address */
3397 DE_RP_DEST_ADDR, /* RP-Destination Address */
3398 DE_RP_USER_DATA, /* RP-User Data */
3399 DE_RP_CAUSE, /* RP-Cause */
3400 /* Session Management Information Elements 10.5.6 */
3401 DE_ACC_POINT_NAME, /* Access Point Name */
3402 DE_NET_SAPI, /* Network Service Access Point Identifier */
3403 DE_PRO_CONF_OPT, /* Protocol Configuration Options */
3404 DE_PD_PRO_ADDR, /* Packet Data Protocol Address */
3405 DE_QOS, /* Quality Of Service */
3406 DE_SM_CAUSE, /* SM Cause */
3407 DE_LINKED_TI, /* Linked TI */
3408 DE_LLC_SAPI, /* LLC Service Access Point Identifier */
3409 DE_TEAR_DOWN_IND, /* Tear Down Indicator */
3410 DE_PACKET_FLOW_ID, /* Packet Flow Identifier */
3411 DE_TRAFFIC_FLOW_TEMPLATE, /* Traffic Flow Template */
3412 /* GPRS Common Information Elements 10.5.7 */
3413 DE_PDP_CONTEXT_STAT, /* [8] 10.5.7.1 PDP Context Status */
3414 DE_RAD_PRIO, /* [8] 10.5.7.2 Radio Priority */
3415 DE_GPRS_TIMER, /* [8] 10.5.7.3 GPRS Timer */
3416 DE_GPRS_TIMER_2, /* [8] 10.5.7.4 GPRS Timer 2 */
3417 DE_RAD_PRIO_2, /* [8] 10.5.7.5 Radio Priority 2 */
3418 DE_MBMS_CTX_STATUS, /* [8] 10.5.7.6 MBMS context status */
3419 DE_SPARE_NIBBLE, /* Spare Nibble */
3424 #define NUM_GSM_DTAP_ELEM (sizeof(gsm_dtap_elem_strings)/sizeof(value_string))
3425 static gint ett_gsm_dtap_elem[NUM_GSM_DTAP_ELEM];
3428 * [3] 10.5.1.1 Cell Identity
3431 de_cell_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
3433 guint32 curr_offset;
3435 curr_offset = offset;
3439 be_cell_id_aux(tvb, tree, offset, len, add_string, string_len, 0x02);
3441 /* no length check possible */
3443 return(curr_offset - offset);
3450 de_lai(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
3454 guint32 curr_offset;
3455 proto_tree *subtree;
3461 curr_offset = offset;
3464 proto_tree_add_text(tree,
3465 tvb, curr_offset, 5,
3466 gsm_dtap_elem_strings[DE_LAI].strptr);
3468 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_LAI]);
3470 octs[0] = tvb_get_guint8(tvb, curr_offset);
3471 octs[1] = tvb_get_guint8(tvb, curr_offset + 1);
3472 octs[2] = tvb_get_guint8(tvb, curr_offset + 2);
3474 mcc_mnc_aux(octs, mcc, mnc);
3477 proto_tree_add_text(subtree,
3478 tvb, curr_offset, 3,
3479 "Mobile Country Code (MCC): %s, Mobile Network Code (MNC): %s",
3485 value = tvb_get_ntohs(tvb, curr_offset);
3487 proto_tree_add_text(subtree,
3488 tvb, curr_offset, 2,
3489 "Location Area Code (LAC): 0x%04x (%u)",
3493 proto_item_append_text(item, " - LAC (0x%04x)", value);
3497 /* no length check possible */
3499 return(curr_offset - offset);
3506 de_mid(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
3509 guint32 curr_offset;
3514 curr_offset = offset;
3517 oct = tvb_get_guint8(tvb, curr_offset);
3521 case 0: /* No Identity */
3522 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
3523 proto_tree_add_text(tree,
3524 tvb, curr_offset, 1,
3528 proto_tree_add_item(tree, hf_gsm_a_odd_even_ind, tvb, curr_offset, 1, FALSE);
3530 proto_tree_add_item(tree, hf_gsm_a_mobile_identity_type, tvb, curr_offset, 1, FALSE);
3533 g_snprintf(add_string, string_len, " - No Identity Code");
3539 proto_tree_add_text(tree, tvb, curr_offset, len - 1,
3540 "Format not supported");
3543 curr_offset += len - 1;
3546 case 3: /* IMEISV */
3552 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
3553 proto_tree_add_text(tree,
3554 tvb, curr_offset, 1,
3555 "%s : Identity Digit 1: %c",
3557 Dgt1_9_bcd.out[(oct & 0xf0) >> 4]);
3561 proto_tree_add_item(tree, hf_gsm_a_odd_even_ind, tvb, curr_offset, 1, FALSE);
3563 proto_tree_add_item(tree, hf_gsm_a_mobile_identity_type, tvb, curr_offset, 1, FALSE);
3566 a_bigbuf[0] = Dgt1_9_bcd.out[(oct & 0xf0) >> 4];
3569 poctets = tvb_get_ephemeral_string(tvb, curr_offset, len - (curr_offset - offset));
3571 my_dgt_tbcd_unpack(&a_bigbuf[1], poctets, len - (curr_offset - offset),
3574 proto_tree_add_string_format(tree,
3575 ((oct & 0x07) == 3) ? hf_gsm_a_imeisv : hf_gsm_a_imsi,
3576 tvb, curr_offset, len - (curr_offset - offset),
3581 if (sccp_assoc && ! sccp_assoc->calling_party) {
3582 sccp_assoc->calling_party = se_strdup_printf(
3583 ((oct & 0x07) == 3) ? "IMEISV: %s" : "IMSI: %s",
3588 g_snprintf(add_string, string_len, " - %s (%s)",
3589 ((oct & 0x07) == 3) ? "IMEISV" : "IMSI",
3592 curr_offset += len - (curr_offset - offset);
3596 oct = tvb_get_guint8(tvb, curr_offset - 1);
3598 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
3599 proto_tree_add_text(tree,
3600 tvb, curr_offset - 1, 1,
3607 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
3608 proto_tree_add_text(tree,
3609 tvb, curr_offset, 1,
3610 "%s : Identity Digit 1: %c",
3612 Dgt1_9_bcd.out[(oct & 0xf0) >> 4]);
3614 proto_tree_add_item(tree, hf_gsm_a_odd_even_ind, tvb, curr_offset, 1, FALSE);
3616 proto_tree_add_item(tree, hf_gsm_a_mobile_identity_type, tvb, curr_offset, 1, FALSE);
3619 a_bigbuf[0] = Dgt1_9_bcd.out[(oct & 0xf0) >> 4];
3622 poctets = tvb_get_ephemeral_string(tvb, curr_offset, len - (curr_offset - offset));
3624 my_dgt_tbcd_unpack(&a_bigbuf[1], poctets, len - (curr_offset - offset),
3627 proto_tree_add_string_format(tree,
3629 tvb, curr_offset, len - (curr_offset - offset),
3635 g_snprintf(add_string, string_len, " - IMEI (%s)", a_bigbuf);
3637 curr_offset += len - (curr_offset - offset);
3640 case 4: /* TMSI/P-TMSI */
3641 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
3642 proto_tree_add_text(tree,
3643 tvb, curr_offset, 1,
3647 proto_tree_add_item(tree, hf_gsm_a_odd_even_ind, tvb, curr_offset, 1, FALSE);
3649 proto_tree_add_item(tree, hf_gsm_a_mobile_identity_type, tvb, curr_offset, 1, FALSE);
3654 value = tvb_get_ntohl(tvb, curr_offset);
3656 proto_tree_add_uint(tree, hf_gsm_a_tmsi,
3657 tvb, curr_offset, 4,
3661 g_snprintf(add_string, string_len, " - TMSI/P-TMSI (0x%04x)", value);
3666 default: /* Reserved */
3667 proto_tree_add_item(tree, hf_gsm_a_odd_even_ind, tvb, curr_offset, 1, FALSE);
3668 proto_tree_add_item(tree, hf_gsm_a_mobile_identity_type, tvb, curr_offset, 1, FALSE);
3669 proto_tree_add_text(tree, tvb, curr_offset, len,
3670 "Mobile station identity Format %u, Format Unknown",(oct & 0x07));
3673 g_snprintf(add_string, string_len, " - Format Unknown");
3679 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3681 return(curr_offset - offset);
3688 de_ms_cm_1(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
3691 guint32 curr_offset;
3692 proto_tree *subtree;
3695 curr_offset = offset;
3697 oct = tvb_get_guint8(tvb, curr_offset);
3700 proto_tree_add_text(tree,
3701 tvb, curr_offset, 1,
3702 gsm_dtap_elem_strings[DE_MS_CM_1].strptr);
3704 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_MS_CM_1]);
3706 proto_tree_add_item(tree, hf_gsm_a_b8spare, tvb, curr_offset, 1, FALSE);
3708 proto_tree_add_item(subtree, hf_gsm_a_MSC_rev, tvb, curr_offset, 1, FALSE);
3710 proto_tree_add_item(subtree, hf_gsm_a_ES_IND, tvb, curr_offset, 1, FALSE);
3712 proto_tree_add_item(subtree, hf_gsm_a_A5_1_algorithm_sup, tvb, curr_offset, 1, FALSE);
3714 proto_tree_add_item(subtree, hf_gsm_a_RF_power_capability, tvb, curr_offset, 1, FALSE);
3718 /* no length check possible */
3720 return(curr_offset - offset);
3727 de_ms_cm_2(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
3729 guint32 curr_offset;
3730 curr_offset = offset;
3733 proto_tree_add_item(tree, hf_gsm_a_b8spare, tvb, curr_offset, 1, FALSE);
3735 proto_tree_add_item(tree, hf_gsm_a_MSC_rev, tvb, curr_offset, 1, FALSE);
3737 proto_tree_add_item(tree, hf_gsm_a_ES_IND, tvb, curr_offset, 1, FALSE);
3739 proto_tree_add_item(tree, hf_gsm_a_A5_1_algorithm_sup, tvb, curr_offset, 1, FALSE);
3741 proto_tree_add_item(tree, hf_gsm_a_RF_power_capability, tvb, curr_offset, 1, FALSE);
3745 NO_MORE_DATA_CHECK(len);
3747 proto_tree_add_item(tree, hf_gsm_a_b8spare, tvb, curr_offset, 1, FALSE);
3749 proto_tree_add_item(tree, hf_gsm_a_ps_sup_cap, tvb, curr_offset, 1, FALSE);
3751 proto_tree_add_item(tree, hf_gsm_a_SS_screening_indicator, tvb, curr_offset, 1, FALSE);
3753 /* SM capability (MT SMS pt to pt capability) (octet 4)*/
3754 proto_tree_add_item(tree, hf_gsm_a_SM_capability, tvb, curr_offset, 1, FALSE);
3755 /* VBS notification reception (octet 4) */
3756 proto_tree_add_item(tree, hf_gsm_a_VBS_notification_rec, tvb, curr_offset, 1, FALSE);
3757 /*VGCS notification reception (octet 4)*/
3758 proto_tree_add_item(tree, hf_gsm_a_VGCS_notification_rec, tvb, curr_offset, 1, FALSE);
3759 /* FC Frequency Capability (octet 4 ) */
3760 proto_tree_add_item(tree, hf_gsm_a_FC_frequency_cap, tvb, curr_offset, 1, FALSE);
3764 NO_MORE_DATA_CHECK(len);
3766 /* CM3 (octet 5, bit 8) */
3767 proto_tree_add_item(tree, hf_gsm_a_CM3, tvb, curr_offset, 1, FALSE);
3769 proto_tree_add_item(tree, hf_gsm_a_b7spare, tvb, curr_offset, 1, FALSE);
3770 /* LCS VA capability (LCS value added location request notification capability) (octet 5,bit 6) */
3771 proto_tree_add_item(tree, hf_gsm_a_LCS_VA_cap, tvb, curr_offset, 1, FALSE);
3772 /* UCS2 treatment (octet 5, bit 5) */
3773 proto_tree_add_item(tree, hf_gsm_a_UCS2_treatment, tvb, curr_offset, 1, FALSE);
3774 /* SoLSA (octet 5, bit 4) */
3775 proto_tree_add_item(tree, hf_gsm_a_SoLSA, tvb, curr_offset, 1, FALSE);
3776 /* CMSP: CM Service Prompt (octet 5, bit 3) */
3777 proto_tree_add_item(tree, hf_gsm_a_CMSP, tvb, curr_offset, 1, FALSE);
3778 /* A5/3 algorithm supported (octet 5, bit 2) */
3779 proto_tree_add_item(tree, hf_gsm_a_A5_3_algorithm_sup, tvb, curr_offset, 1, FALSE);
3780 /* A5/2 algorithm supported (octet 5, bit 1) */
3781 proto_tree_add_item(tree, hf_gsm_a_A5_2_algorithm_sup, tvb, curr_offset, 1, FALSE);
3785 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3787 return(curr_offset - offset);
3795 de_d_gb_call_ref(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
3799 guint32 curr_offset;
3803 curr_offset = offset;
3805 value = tvb_get_ntohl(tvb, curr_offset);
3807 other_decode_bitfield_value(a_bigbuf, value, 0xffffffe0, 32);
3808 proto_tree_add_text(tree, tvb, curr_offset, 4,
3809 "%s : Group or Broadcast call reference: %u (0x%04x)",
3811 (value & 0xffffffe0) >> 5,
3812 (value & 0xffffffe0) >> 5);
3814 other_decode_bitfield_value(a_bigbuf, value, 0x00000010, 32);
3815 proto_tree_add_text(tree, tvb, curr_offset, 4,
3816 "%s : SF Service Flag: %s",
3818 (value & 0x00000010) ?
3819 "VGCS (Group call reference)" : "VBS (Broadcast call reference)");
3821 other_decode_bitfield_value(a_bigbuf, value, 0x00000008, 32);
3822 proto_tree_add_text(tree, tvb, curr_offset, 4,
3823 "%s : AF Acknowledgement Flag: acknowledgment is %srequired",
3825 (value & 0x00000008) ? "" : "not ");
3827 switch (value & 0x00000007)
3829 case 1: str = "call priority level 4"; break;
3830 case 2: str = "call priority level 3"; break;
3831 case 3: str = "call priority level 2"; break;
3832 case 4: str = "call priority level 1"; break;
3833 case 5: str = "call priority level 0"; break;
3834 case 6: str = "call priority level B"; break;
3835 case 7: str = "call priority level A"; break;
3837 str = "no priority applied";
3841 other_decode_bitfield_value(a_bigbuf, value, 0x00000007, 32);
3842 proto_tree_add_text(tree, tvb, curr_offset, 4,
3843 "%s : Call Priority: %s",
3849 oct = tvb_get_guint8(tvb, curr_offset);
3851 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
3852 proto_tree_add_text(tree, tvb, curr_offset, 1,
3853 "%s : Ciphering Information",
3856 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
3857 proto_tree_add_text(tree, tvb, curr_offset, 1,
3863 /* no length check possible */
3865 return(curr_offset - offset);
3872 de_pd_sapi(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
3875 guint32 curr_offset;
3876 proto_tree *subtree;
3881 curr_offset = offset;
3883 oct = tvb_get_guint8(tvb, curr_offset);
3886 proto_tree_add_text(tree,
3887 tvb, curr_offset, 1,
3888 gsm_dtap_elem_strings[DE_PD_SAPI].strptr);
3890 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_PD_SAPI]);
3892 other_decode_bitfield_value(a_bigbuf, oct, 0xc0, 8);
3893 proto_tree_add_text(subtree, tvb, curr_offset, 1,
3897 switch ((oct & 0x30) >> 4)
3899 case 0: str = "SAPI 0"; break;
3900 case 3: str = "SAPI 3"; break;
3906 other_decode_bitfield_value(a_bigbuf, oct, 0x30, 8);
3907 proto_tree_add_text(subtree, tvb, curr_offset, 1,
3908 "%s : SAPI (Sevice Access Point Identifier): %s",
3912 proto_tree_add_item(tree, hf_gsm_a_L3_protocol_discriminator, tvb, curr_offset, 1, FALSE);
3916 /* no length check possible */
3918 return(curr_offset - offset);
3926 de_prio(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
3929 guint32 curr_offset;
3933 curr_offset = offset;
3935 oct = tvb_get_guint8(tvb, curr_offset);
3937 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
3938 proto_tree_add_text(tree,
3939 tvb, curr_offset, 1,
3945 case 1: str = "Call priority level 4"; break;
3946 case 2: str = "Call priority level 3"; break;
3947 case 3: str = "Call priority level 2"; break;
3948 case 4: str = "Call priority level 1"; break;
3949 case 5: str = "Call priority level 0"; break;
3950 case 6: str = "Call priority level B"; break;
3951 case 7: str = "Call priority level A"; break;
3953 str = "No priority applied";
3957 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
3958 proto_tree_add_text(tree,
3959 tvb, curr_offset, 1,
3966 /* no length check possible */
3968 return(curr_offset - offset);
3975 de_plmn_list(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
3978 guint32 curr_offset;
3983 curr_offset = offset;
3986 while ((len - (curr_offset - offset)) >= 3)
3988 octs[0] = tvb_get_guint8(tvb, curr_offset);
3989 octs[1] = tvb_get_guint8(tvb, curr_offset + 1);
3990 octs[2] = tvb_get_guint8(tvb, curr_offset + 2);
3992 mcc_mnc_aux(octs, mcc, mnc);
3994 proto_tree_add_text(tree,
3995 tvb, curr_offset, 3,
3996 "PLMN[%u] Mobile Country Code (MCC): %s, Mobile Network Code (MNC): %s",
4007 g_snprintf(add_string, string_len, " - %u PLMN%s",
4008 num_plmn, plurality(num_plmn, "", "s"));
4010 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
4012 return(curr_offset - offset);
4015 10.5.2 Radio Resource management information elements
4016 * [3] 10.5.2.1a BA Range
4019 * [3] 10.5.2.1b Cell Channel Description
4022 de_rr_cell_ch_dsc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
4024 guint32 curr_offset;
4025 guint8 oct,bit,byte;
4031 curr_offset = offset;
4033 oct = tvb_get_guint8(tvb, curr_offset);
4035 /* FORMAT-ID, Format Identifier (part of octet 3)*/
4036 proto_tree_add_item(tree, hf_gsm_a_rr_format_id, tvb, curr_offset, 1, FALSE);
4037 /* Cell Channel Description */
4039 if ((oct & 0xc0) == 0x00)
4042 item = proto_tree_add_text(tree,tvb, curr_offset, 16,"list of ARFCN for hopping = ");
4045 for (byte = 0;byte <= 15;byte++)
4047 oct = tvb_get_guint8(tvb, curr_offset);
4051 if (((oct >> bit) & 1) == 1)
4053 proto_item_append_text(item," %4d",arfcn);
4060 else if ((oct & 0xf8) == 0x80)
4063 proto_tree_add_text(tree,tvb, curr_offset, 16,"Cell Channel Description (1024 range) (Not decoded)");
4064 curr_offset = curr_offset + 16;
4066 else if ((oct & 0xfe) == 0x88)
4069 proto_tree_add_text(tree,tvb, curr_offset, 16,"Cell Channel Description (512 range) (Not decoded)");
4070 curr_offset = curr_offset + 16;
4072 else if ((oct & 0xfe) == 0x8a)
4075 proto_tree_add_text(tree,tvb, curr_offset, 16,"Cell Channel Description (256 range) (Not decoded)");
4076 curr_offset = curr_offset + 16;
4078 else if ((oct & 0xfe) == 0x8c)
4081 proto_tree_add_text(tree,tvb, curr_offset, 16,"Cell Channel Description (128 range) (Not decoded)");
4082 curr_offset = curr_offset + 16;
4084 else if ((oct & 0xfe) == 0x8e)
4086 /* variable bit map */
4087 arfcn = ((oct & 0x01) << 9) | (tvb_get_guint8(tvb, curr_offset+1) << 1) | ((tvb_get_guint8(tvb, curr_offset + 2) & 0x80) >> 7);
4088 item = proto_tree_add_text(tree,tvb, curr_offset, 16,"list of ARFCN for hopping = %d",arfcn);
4089 curr_offset = curr_offset + 2;
4091 for (byte = 0;byte <= 13;byte++)
4093 oct = tvb_get_guint8(tvb, curr_offset);
4097 if (((oct >> bit) & 1) == 1)
4099 proto_item_append_text(item," %4d",arfcn);
4108 return(curr_offset - offset);
4111 * [3] 10.5.2.1c BA List Pref
4112 * [3] 10.5.2.1d UTRAN Frequency List
4115 * [3] 10.5.2.2 Cell Description
4118 de_rr_cell_dsc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
4120 proto_tree *subtree;
4123 guint32 curr_offset;
4127 curr_offset = offset;
4129 oct = tvb_get_guint8(tvb, curr_offset);
4131 proto_tree_add_text(tree,
4132 tvb, curr_offset, 2,
4133 gsm_dtap_elem_strings[DE_RR_CELL_DSC].strptr);
4135 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_RR_CELL_DSC]);
4137 proto_tree_add_item(subtree, hf_gsm_a_ncc, tvb, curr_offset, 1, FALSE);
4138 proto_tree_add_item(subtree, hf_gsm_a_bcc, tvb, curr_offset, 1, FALSE);
4139 bcch_arfcn = (tvb_get_guint8(tvb,curr_offset) & 0xc0) << 2;
4140 bcch_arfcn = bcch_arfcn | tvb_get_guint8(tvb,curr_offset+1);
4141 proto_tree_add_uint(subtree, hf_gsm_a_bcch_arfcn , tvb, curr_offset, 2, bcch_arfcn );
4144 curr_offset = curr_offset + 2;
4147 return(curr_offset - offset);
4150 * [3] 10.5.2.3 Cell Options (BCCH)
4151 * [3] 10.5.2.3a Cell Options (SACCH)
4152 * [3] 10.5.2.4 Cell Selection Parameters
4153 * [3] 10.5.2.4a MAC Mode and Channel Coding Requested
4154 * [3] 10.5.2.5 Channel Description
4157 de_rr_ch_dsc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
4159 guint32 curr_offset;
4160 guint8 oct8,subchannel;
4161 guint16 arfcn, hsn, maio;
4162 proto_tree *subtree;
4167 curr_offset = offset;
4169 item = proto_tree_add_text(tree,tvb, curr_offset, 3,gsm_dtap_elem_strings[DE_RR_CH_DSC].strptr);
4171 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_RR_CH_DSC]);
4174 oct8 = tvb_get_guint8(tvb, curr_offset);
4176 if ((oct8 & 0xf8) == 0x08)
4178 str = "TCH/F + ACCHs";
4179 other_decode_bitfield_value(a_bigbuf, oct8, 0xf8, 8);
4180 proto_tree_add_text(subtree,tvb, curr_offset, 1,"%s = %s",a_bigbuf,str);
4184 if ((oct8 & 0xf0) == 0x10)
4186 str = "TCH/H + ACCHs, Subchannel";
4187 subchannel = ((oct8 & 0x08)>>3);
4189 else if ((oct8 & 0xe0) == 0x20)
4191 str = "SDCCH/4 + SACCH/C4 or CBCH (SDCCH/4), Subchannel";
4192 subchannel = ((oct8 & 0x18)>>3);
4194 else if ((oct8 & 0xc0) == 0x40)
4196 str = "SDCCH/8 + SACCH/C8 or CBCH (SDCCH/8), Subchannel";
4197 subchannel = ((oct8 % 0x38)>>3);
4201 DISSECTOR_ASSERT_NOT_REACHED();
4204 other_decode_bitfield_value(a_bigbuf, oct8, 0xf8, 8);
4205 proto_tree_add_text(subtree,tvb, curr_offset, 1,"%s = %s %d",a_bigbuf,str,subchannel);
4208 other_decode_bitfield_value(a_bigbuf, oct8, 0x07, 8);
4209 proto_tree_add_text(subtree,tvb, curr_offset, 1,"%s = Timeslot: %d",a_bigbuf,(oct8 & 0x07));
4214 oct8 = tvb_get_guint8(tvb, curr_offset);
4215 other_decode_bitfield_value(a_bigbuf, oct8, 0xe0, 8);
4216 proto_tree_add_text(subtree,tvb, curr_offset, 1,"%s = Training Sequence: %d",a_bigbuf,((oct8 & 0xe0)>>5));
4219 if ((oct8 & 0x10) == 0x10)
4221 /* Hopping sequence */
4222 maio = ((oct8 & 0x0f)<<2) | ((tvb_get_guint8(tvb,curr_offset+1) & 0xc0) >> 6);
4223 hsn = (tvb_get_guint8(tvb,curr_offset+1) & 0x3f);
4226 other_decode_bitfield_value(a_bigbuf, oct8, 0x10, 8);
4227 proto_tree_add_text(subtree,tvb, curr_offset, 1,"%s = Hopping channel: %s",a_bigbuf,str);
4228 proto_tree_add_text(subtree,tvb, curr_offset, 2,"Hopping channel: MAIO %d",maio);
4229 proto_tree_add_text(subtree,tvb, curr_offset, 2,"Hopping channel: HSN %d",hsn);
4234 arfcn = ((oct8 & 0x03) << 8) | tvb_get_guint8(tvb,curr_offset+1);
4237 other_decode_bitfield_value(a_bigbuf, oct8, 0x10, 8);
4238 proto_tree_add_text(subtree,tvb, curr_offset, 1,"%s = Hopping channel: %s",a_bigbuf,str);
4239 other_decode_bitfield_value(a_bigbuf, oct8, 0x0c, 8);
4240 proto_tree_add_text(subtree,tvb, curr_offset, 1,"%s = Spare",a_bigbuf);
4241 proto_tree_add_text(subtree,tvb, curr_offset, 2,"Single channel : ARFCN %d",arfcn);
4244 curr_offset = curr_offset + 2;
4246 return(curr_offset - offset);
4249 * [3] 10.5.2.5a Channel Description 2
4252 de_rr_ch_dsc2(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
4254 guint32 curr_offset;
4255 guint8 oct8,subchannel;
4256 guint16 arfcn, hsn, maio;
4257 proto_tree *subtree;
4262 curr_offset = offset;
4264 item = proto_tree_add_text(tree,tvb, curr_offset, 3,gsm_dtap_elem_strings[DE_RR_CH_DSC2].strptr);
4266 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_RR_CH_DSC2]);
4269 oct8 = tvb_get_guint8(tvb, curr_offset);
4271 if ((oct8 & 0xf8) == 0x0)
4273 str = "TCH/F + FACCH/F and SACCH/M";
4274 other_decode_bitfield_value(a_bigbuf, oct8, 0xf8, 8);
4275 proto_tree_add_text(subtree,tvb, curr_offset, 1,"%s = %s",a_bigbuf,str);
4277 else if ((oct8 & 0xf8) == 0x08)
4279 str = "TCH/F + FACCH/F and SACCH/F";
4280 other_decode_bitfield_value(a_bigbuf, oct8, 0xf8, 8);
4281 proto_tree_add_text(subtree,tvb, curr_offset, 1,"%s = %s",a_bigbuf,str);
4283 else if ((oct8 & 0xf8) == 0xf0)
4285 str = "TCH/F + FACCH/F and SACCH/M + bi- and unidirectional channels";
4286 other_decode_bitfield_value(a_bigbuf, oct8, 0xf8, 8);
4287 proto_tree_add_text(subtree,tvb, curr_offset, 1,"%s = %s",a_bigbuf,str);
4291 if ((oct8 & 0xf0) == 0x10)
4293 str = "TCH/H + ACCHs, Subchannel";
4294 subchannel = ((oct8 & 0x08)>>3);
4296 else if ((oct8 & 0xe0) == 0x20)
4298 str = "SDCCH/4 + SACCH/C4 or CBCH (SDCCH/4), Subchannel";
4299 subchannel = ((oct8 & 0x18)>>3);
4301 else if ((oct8 & 0xc0) == 0x40)
4303 str = "SDCCH/8 + SACCH/C8 or CBCH (SDCCH/8), Subchannel";
4304 subchannel = ((oct8 % 0x38)>>3);
4306 else if ((oct8 & 0xc0) == 0x80)
4308 str = "TCH/F + FACCH/F and SACCH/M + bidirectional channels at timeslot";
4309 subchannel = ((oct8 % 0x38)>>3);
4311 else if ((oct8 & 0xe0) == 0xc0)
4313 str = "TCH/F + FACCH/F and SACCH/M + unidirectional channels at timeslot";
4314 subchannel = ((oct8 % 0x38)>>3);
4318 DISSECTOR_ASSERT_NOT_REACHED();
4320 other_decode_bitfield_value(a_bigbuf, oct8, 0xf8, 8);
4321 proto_tree_add_text(subtree,tvb, curr_offset, 1,"%s = %s %d",a_bigbuf,str,subchannel);
4324 other_decode_bitfield_value(a_bigbuf, oct8, 0x07, 8);
4325 proto_tree_add_text(subtree,tvb, curr_offset, 1,"%s = Timeslot: %d",a_bigbuf,(oct8 & 0x07));
4330 oct8 = tvb_get_guint8(tvb, curr_offset);
4331 other_decode_bitfield_value(a_bigbuf, oct8, 0xe0, 8);
4332 proto_tree_add_text(subtree,tvb, curr_offset, 1,"%s = Training Sequence: %d",a_bigbuf,((oct8 & 0xe0)>>5));
4335 if ((oct8 & 0x10) == 0x10)
4337 /* Hopping sequence */
4338 maio = ((oct8 & 0x0f)<<2) | ((tvb_get_guint8(tvb,curr_offset+1) & 0xc0) >> 6);
4339 hsn = (tvb_get_guint8(tvb,curr_offset+1) & 0x3f);
4342 other_decode_bitfield_value(a_bigbuf, oct8, 0x10, 8);
4343 proto_tree_add_text(subtree,tvb, curr_offset, 1,"%s = Hopping channel: %s",a_bigbuf,str);
4344 proto_tree_add_text(subtree,tvb, curr_offset, 2,"Hopping channel: MAIO %d",maio);
4345 proto_tree_add_text(subtree,tvb, curr_offset, 2,"Hopping channel: HSN %d",hsn);
4350 arfcn = ((oct8 & 0x03) << 8) | tvb_get_guint8(tvb,curr_offset+1);
4353 other_decode_bitfield_value(a_bigbuf, oct8, 0x10, 8);
4354 proto_tree_add_text(subtree,tvb, curr_offset, 1,"%s = Hopping channel: %s",a_bigbuf,str);
4355 other_decode_bitfield_value(a_bigbuf, oct8, 0x0c, 8);
4356 proto_tree_add_text(subtree,tvb, curr_offset, 1,"%s = Spare",a_bigbuf);
4357 proto_tree_add_text(subtree,tvb, curr_offset, 2,"Single channel : ARFCN %d",arfcn);
4360 curr_offset = curr_offset + 2;
4362 return(curr_offset - offset);
4365 * [3] 10.5.2.6 Channel Mode
4369 static const value_string gsm_a_rr_channel_mode_vals[] = {
4370 { 0x00, "signalling only"},
4371 { 0x01, "speech full rate or half rate version 1(GSM FR or GSM HR)"},
4372 { 0x21, "speech full rate or half rate version 2(GSM EFR)"},
4373 { 0x41, "speech full rate or half rate version 3(FR AMR or HR AMR)"},
4374 { 0x81, "speech full rate or half rate version 4(OFR AMR-WB or OHR AMR-WB)"},
4375 { 0x82, "speech full rate or half rate version 5(FR AMR-WB )"},
4376 { 0x83, "speech full rate or half rate version 6(OHR AMR )"},
4377 { 0x61, "data, 43.5 kbit/s (downlink)+14.5 kbps (uplink)"},
4378 { 0x62, "data, 29.0 kbit/s (downlink)+14.5 kbps (uplink)"},
4379 { 0x64, "data, 43.5 kbit/s (downlink)+29.0 kbps (uplink)"},
4380 { 0x67, "data, 14.5 kbit/s (downlink)+43.5 kbps (uplink)"},
4381 { 0x65, "data, 14.5 kbit/s (downlink)+29.0 kbps (uplink)"},
4382 { 0x66, "data, 29.0 kbit/s (downlink)+43.5 kbps (uplink)"},
4383 { 0x27, "data, 43.5 kbit/s radio interface rate"},
4384 { 0x63, "data, 32.0 kbit/s radio interface rate"},
4385 { 0x43, "data, 29.0 kbit/s radio interface rate"},
4386 { 0x0f, "data, 14.5 kbit/s radio interface rate"},
4387 { 0x03, "data, 12.0 kbit/s radio interface rate"},
4388 { 0x0b, "data, 6.0 kbit/s radio interface rate"},
4389 { 0x13, "data, 3.6 kbit/s radio interface rate"},
4394 de_rr_ch_mode(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
4396 guint32 curr_offset;
4399 curr_offset = offset;
4401 proto_tree_add_item(tree, hf_gsm_a_rr_channel_mode, tvb, curr_offset, 1, FALSE);
4403 curr_offset = curr_offset + 1;
4405 return(curr_offset - offset);
4408 * [3] 10.5.2.7 Channel Mode 2
4411 static const value_string gsm_a_rr_channel_mode2_vals[] = {
4412 { 0x00, "signalling only"},
4413 { 0x05, "speech half rate version 1(GSM HR)"},
4414 { 0x25, "speech half rate version 2(GSM EFR)"},
4415 { 0x45, "speech half rate version 3(HR AMR)"},
4416 { 0x85, "speech half rate version 4(OHR AMR-WB)"},
4417 { 0x06, "speech half rate version 6(OHR AMR )"},
4418 { 0x0f, "data, 6.0 kbit/s radio interface rate"},
4419 { 0x17, "data, 3.6 kbit/s radio interface rate"},
4424 de_rr_ch_mode2(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
4426 guint32 curr_offset;
4429 curr_offset = offset;
4431 proto_tree_add_item(tree, hf_gsm_a_rr_channel_mode2, tvb, curr_offset, 1, FALSE);
4433 curr_offset = curr_offset + 1;
4435 return(curr_offset - offset);
4438 * [3] 10.5.2.7a UTRAN Classmark information element
4439 * [3] 10.5.2.7b (void)
4442 * [3] 10.5.2.7c Classmark Enquiry Mask
4444 * 0 CLASSMARK CHANGE message is requested
4445 * 1 CLASSMARK CHANGE message is not requested
4447 * 000 UTRAN CLASSMARK CHANGE message including status on predefined configurations (i.e. Sequence Description) is requested
4448 * 111 UTRAN CLASSMARK CHANGE message including status on predefined configurations (i.e. Sequence Description) is not requested.
4449 * All other values shall not be sent. If received, they shall be interpreted as '000'.
4451 * 0 CDMA2000 CLASSMARK CHANGE message requested
4452 * 1 CDMA2000 CLASSMARK CHANGE message not requested.
4454 * 0 GERAN IU MODE CLASSMARK CHANGE message requested
4455 * 1 GERAN IU MODE CLASSMARK CHANGE message not requested.
4456 * Bits 2 - 1: spare(0).
4458 static const true_false_string gsm_a_msg_req_value = {
4459 "message is not requested",
4460 "message is requested"
4462 static const value_string gsm_a_rr_utran_cm_cng_msg_req_vals[] = {
4463 { 0x0, "message including status on predefined configurations (i.e. Sequence Description) is requested"},
4464 { 0x1, "message including status on predefined configurations (i.e. Sequence Description) is requested"},
4465 { 0x2, "message including status on predefined configurations (i.e. Sequence Description) is requested"},
4466 { 0x3, "message including status on predefined configurations (i.e. Sequence Description) is requested"},
4467 { 0x4, "message including status on predefined configurations (i.e. Sequence Description) is requested"},
4468 { 0x5, "message including status on predefined configurations (i.e. Sequence Description) is requested"},
4469 { 0x6, "message including status on predefined configurations (i.e. Sequence Description) is requested"},
4470 { 0x7, "message including status on predefined configurations (i.e. Sequence Description) is not requested."},
4474 de_rr_cm_enq_mask(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
4476 guint32 curr_offset;
4479 curr_offset = offset;
4481 proto_tree_add_item(tree, hf_gsm_a_rr_cm_cng_msg_req, tvb, curr_offset, 1, FALSE);
4482 proto_tree_add_item(tree, hf_gsm_a_rr_utran_cm_cng_msg_req, tvb, curr_offset, 1, FALSE);
4483 proto_tree_add_item(tree, hf_gsm_a_rr_cdma200_cm_cng_msg_req, tvb, curr_offset, 1, FALSE);
4484 proto_tree_add_item(tree, hf_gsm_a_rr_geran_iu_cm_cng_msg_req, tvb, curr_offset, 1, FALSE);
4486 curr_offset = curr_offset + 1;
4488 return(curr_offset - offset);
4491 * [3] 10.5.2.8 Channel Needed
4493 static const value_string gsm_a_rr_channel_needed_vals[] = {
4494 { 0x00, "Any channel"},
4496 { 0x02, "TCH/F (Full rate)"},
4497 { 0x03, "TCH/H or TCH/F (Dual rate)"},
4501 de_rr_chnl_needed(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
4503 guint32 curr_offset;
4506 curr_offset = offset;
4508 proto_tree_add_item(tree, hf_gsm_a_rr_chnl_needed_ch1, tvb, curr_offset, 1, FALSE);
4509 proto_tree_add_item(tree, hf_gsm_a_rr_chnl_needed_ch2, tvb, curr_offset, 1, FALSE);
4511 curr_offset = curr_offset + 1;
4513 return(curr_offset - offset);
4516 * [3] 10.5.2.8a Channel Request Description
4517 * [3] 10.5.2.8b Channel Request Description 2
4520 * [3] 10.5.2.9 Cipher Mode Setting
4523 static const value_string gsm_a_rr_sc_vals[] = {
4524 { 0, "No ciphering"},
4525 { 1, "Start ciphering"},
4528 /* algorithm identifier
4535 de_rr_cip_mode_set(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
4537 guint32 curr_offset;
4541 curr_offset = offset;
4543 /* Cipher Mode Setting
4544 * Note: The coding of fields SC and algorithm identifier is defined in [44.018]
4545 * as part of the Cipher Mode Setting IE.
4547 proto_tree_add_item(tree, hf_gsm_a_rr_sc, tvb, curr_offset, 1, FALSE);
4548 oct = tvb_get_guint8(tvb,curr_offset);
4549 if ( (oct & 1) == 1){ /* Start ciphering */
4550 /* algorithm identifier */
4551 proto_tree_add_item(tree, hf_gsm_a_algorithm_id, tvb, curr_offset, 1, FALSE);
4553 curr_offset = curr_offset + 1;
4555 return(curr_offset - offset);
4558 * [3] 10.5.2.10 Cipher Response
4559 * [3] 10.5.2.11 Control Channel Description
4560 * [3] 10.5.2.11a DTM Information Details
4563 * [3] 10.5.2.11b Dynamic ARFCN Mapping
4566 de_rr_dyn_arfcn_map(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
4568 guint32 curr_offset;
4571 curr_offset = offset;
4573 proto_tree_add_text(tree,tvb, curr_offset, len,"Dynamic ARFCN Mapping content(Not decoded)");
4576 curr_offset = curr_offset + len;
4578 return(curr_offset - offset);
4581 * [3] 10.5.2.12 Frequency Channel Sequence
4584 de_rr_freq_ch_seq(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
4586 guint32 curr_offset;
4589 curr_offset = offset;
4591 proto_tree_add_text(tree,tvb, curr_offset, 9,"Frequency Channel Sequence(Not decoded)");
4594 curr_offset = curr_offset + 9;
4596 return(curr_offset - offset);
4599 * [3] 10.5.2.13 Frequency List
4601 * Bit Bit Bit Bit Bit format notation
4603 * 0 0 X X X bit map 0
4604 * 1 0 0 X X 1024 range
4605 * 1 0 1 0 0 512 range
4606 * 1 0 1 0 1 256 range
4607 * 1 0 1 1 0 128 range
4608 * 1 0 1 1 1 variable bit map
4610 /* The mask 0xce (1100 1110) will produce the result 0110 0111*/
4611 static const value_string gsm_a_rr_freq_list_format_id_vals[] = {
4612 { 0x00, "bit map 0"},
4613 { 0x02, "bit map 0"},
4614 { 0x04, "bit map 0"},
4615 { 0x06, "bit map 0"},
4616 { 0x08, "bit map 0"},
4617 { 0x0a, "bit map 0"},
4618 { 0x0c, "bit map 0"},
4619 { 0x0e, "bit map 0"},
4620 { 0x40, "1024 range"},
4621 { 0x41, "1024 range"},
4622 { 0x42, "1024 range"},
4623 { 0x43, "1024 range"},
4624 { 0x44, "512 range"},
4625 { 0x45, "256 range"},
4626 { 0x46, "128 range"},
4627 { 0x47, "variable bit map"},
4631 de_rr_freq_list(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
4633 guint32 curr_offset;
4636 curr_offset = offset;
4638 /* FORMAT-ID, Format Identifier (part of octet 3)*/
4639 proto_tree_add_item(tree, hf_gsm_a_rr_format_id, tvb, curr_offset, 1, FALSE);
4640 /* Frequency list */
4641 proto_tree_add_text(tree,tvb, curr_offset, len-1,"Frequency Data(Not decoded)");
4643 curr_offset = curr_offset + len;
4644 return(curr_offset - offset);
4648 * [3] 10.5.2.13.1 General description
4649 * [3] 10.5.2.13.2 Bit map 0 format
4650 * [3] 10.5.2.13.3 Range 1024 format
4651 * [3] 10.5.2.13.4 Range 512 format
4652 * [3] 10.5.2.13.5 Range 256 format
4653 * [3] 10.5.2.13.6 Range 128 format
4654 * [3] 10.5.2.13.7 Variable bit map format
4657 * [3] 10.5.2.14 Frequency Short List
4659 *The Frequency Short List information element is a type 3 information element of 10 octet length.
4661 * This element is encoded exactly as the Frequency List information element,
4662 * except that it has a fixed length instead of a variable length and does
4663 * not contain a length indicator and that it shall not be encoded in bitmap 0 format.
4666 de_rr_freq_short_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, 9,"Frequency Data(Not decoded)");
4678 curr_offset = curr_offset + 9;
4679 return(curr_offset - offset);
4683 * [3] 10.5.2.14a Frequency Short List 2
4685 * The Frequency Short List information element is a type 3 information element of 8 octet length.
4687 * This element is encoded exactly as the Frequency List information element,
4688 * except that it has a fixed length instead of a variable length and does
4689 * not contain a length indicator and that it shall not be encoded in bitmap 0 format.
4692 de_rr_freq_short_list2(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
4694 guint32 curr_offset;
4697 curr_offset = offset;
4699 /* FORMAT-ID, Format Identifier (part of octet 3)*/
4700 proto_tree_add_item(tree, hf_gsm_a_rr_format_id, tvb, curr_offset, 1, FALSE);
4702 /* Frequency list */
4703 proto_tree_add_text(tree,tvb, curr_offset, 7,"Frequency Data(Not decoded)");
4705 curr_offset = curr_offset + 8;
4706 return(curr_offset - offset);
4710 * [3] 10.5.2.14b Group Channel Description
4711 * [3] 10.5.2.14c GPRS Resumption
4712 * [3] 10.5.2.14d GPRS broadcast information
4715 * [3] 10.5.2.15 Handover Reference
4718 de_rr_ho_ref(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
4720 proto_tree *subtree;
4722 guint32 curr_offset;
4725 curr_offset = offset;
4728 proto_tree_add_text(tree,
4729 tvb, curr_offset, 1,
4730 gsm_dtap_elem_strings[DE_RR_HO_REF].strptr);
4732 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_RR_HO_REF]);
4734 /* Handover reference value */
4735 proto_tree_add_item(subtree, hf_gsm_a_rr_ho_ref_val, tvb, curr_offset, 1, FALSE);
4737 curr_offset = curr_offset + 1;
4739 return(curr_offset - offset);
4742 * [3] 10.5.2.16 IA Rest Octets
4743 * [3] 10.5.2.17 IAR Rest Octets
4744 * [3] 10.5.2.18 IAX Rest Octets
4745 * [3] 10.5.2.19 L2 Pseudo Length
4746 * [3] 10.5.2.20 Measurement Results
4747 * [3] 10.5.2.20a GPRS Measurement Results
4750 * [3] 10.5.2.21 Mobile Allocation
4753 de_rr_mob_all(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
4755 guint32 curr_offset;
4758 curr_offset = offset;
4760 proto_tree_add_text(tree,tvb, curr_offset, len ,"Data(Not decoded)");
4762 curr_offset = curr_offset + len;
4763 return(curr_offset - offset);
4767 * [3] 10.5.2.21a Mobile Time Difference
4770 de_rr_mob_time_diff(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
4772 guint32 curr_offset;
4775 curr_offset = offset;
4777 proto_tree_add_text(tree,tvb, curr_offset, len ,"Data(Not decoded)");
4779 curr_offset = curr_offset + len;
4780 return(curr_offset - offset);
4784 * [3] 10.5.2.21aa MultiRate configuration
4786 /* Multirate speech version Octet 3 Bits 8 7 6 */
4787 static const value_string multirate_speech_ver_vals[] = {
4788 { 1, "Adaptive Multirate speech version 1"},
4789 { 2, "Adaptive Multirate speech version 2"},
4792 /* Bit 5 NSCB: Noise Suppression Control Bit */
4793 static const value_string NSCB_vals[] = {
4794 { 0, "Noise Suppression can be used (default)"},
4795 { 1, "Noise Suppression shall be turned off"},
4798 /* Bit 4 ICMI: Initial Codec Mode Indicator */
4799 static const value_string ICMI_vals[] = {
4800 { 0, "The initial codec mode is defined by the implicit rule provided in 3GPP TS 05.09"},
4801 { 1, "The initial codec mode is defined by the Start Mode field"},
4805 Table 10.5.2.21aa.2: Set of adaptive multirate codec modes field (octet 4)
4806 for the Multirate speech version 1
4808 static const true_false_string gsm_a_rr_set_of_amr_codec_modes = {
4809 "is part of the subset",
4810 "is not part of the subset"
4816 de_rr_multirate_conf(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
4818 guint32 curr_offset;
4822 curr_offset = offset;
4824 proto_tree_add_item(tree, hf_gsm_a_rr_multirate_speech_ver, tvb, curr_offset, 1, FALSE);
4825 proto_tree_add_item(tree, hf_gsm_a_rr_NCSB, tvb, curr_offset, 1, FALSE);
4826 proto_tree_add_item(tree, hf_gsm_a_rr_ICMI, tvb, curr_offset, 1, FALSE);
4827 /* The initial codec mode is coded as in 3GPP TS 45.009 */
4828 proto_tree_add_item(tree, hf_gsm_a_rr_start_mode, tvb, curr_offset, 1, FALSE);
4829 oct = ( tvb_get_guint8(tvb,curr_offset) &0xe0 ) >> 5;
4833 /* Adaptive Multirate speech version 1 */
4834 /* Set of AMR codec modes */
4835 proto_tree_add_item(tree, hf_gsm_a_rr_set_of_amr_codec_modes_v1_b8, tvb, curr_offset, 1, FALSE);
4836 proto_tree_add_item(tree, hf_gsm_a_rr_set_of_amr_codec_modes_v1_b7, tvb, curr_offset, 1, FALSE);
4837 proto_tree_add_item(tree, hf_gsm_a_rr_set_of_amr_codec_modes_v1_b6, tvb, curr_offset, 1, FALSE);
4838 proto_tree_add_item(tree, hf_gsm_a_rr_set_of_amr_codec_modes_v1_b5, tvb, curr_offset, 1, FALSE);
4839 proto_tree_add_item(tree, hf_gsm_a_rr_set_of_amr_codec_modes_v1_b4, tvb, curr_offset, 1, FALSE);
4840 proto_tree_add_item(tree, hf_gsm_a_rr_set_of_amr_codec_modes_v1_b3, tvb, curr_offset, 1, FALSE);
4841 proto_tree_add_item(tree, hf_gsm_a_rr_set_of_amr_codec_modes_v1_b2, tvb, curr_offset, 1, FALSE);
4842 proto_tree_add_item(tree, hf_gsm_a_rr_set_of_amr_codec_modes_v1_b1, tvb, curr_offset, 1, FALSE);
4845 proto_tree_add_text(tree,tvb, curr_offset, len-2 ,"Parameters for multirate speech field(Not decoded)");
4849 /* Adaptive Multirate speech version 2 */
4850 proto_tree_add_item(tree, hf_gsm_a_rr_set_of_amr_codec_modes_v2_b5, tvb, curr_offset, 1, FALSE);
4851 proto_tree_add_item(tree, hf_gsm_a_rr_set_of_amr_codec_modes_v2_b4, tvb, curr_offset, 1, FALSE);
4852 proto_tree_add_item(tree, hf_gsm_a_rr_set_of_amr_codec_modes_v2_b3, tvb, curr_offset, 1, FALSE);
4853 proto_tree_add_item(tree, hf_gsm_a_rr_set_of_amr_codec_modes_v2_b2, tvb, curr_offset, 1, FALSE);
4854 proto_tree_add_item(tree, hf_gsm_a_rr_set_of_amr_codec_modes_v2_b1, tvb, curr_offset, 1, FALSE);
4857 proto_tree_add_text(tree,tvb, curr_offset, len-2 ,"Parameters for multirate speech field(Not decoded)");
4860 proto_tree_add_text(tree,tvb,offset,1,"Unknown version");
4861 proto_tree_add_text(tree,tvb, curr_offset, len-1 ,"Data(Not decoded)");
4865 curr_offset = offset + len;
4866 return(curr_offset - offset);
4870 * [3] 10.5.2.21b Multislot Allocation
4873 de_rr_mult_all(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
4875 guint32 curr_offset;
4878 curr_offset = offset;
4880 proto_tree_add_text(tree,tvb, curr_offset, len ,"Data(Not decoded)");
4882 curr_offset = curr_offset + len;
4883 return(curr_offset - offset);
4887 * [3] 10.5.2.21c NC mode
4888 * [3] 10.5.2.22 Neighbour Cell Description
4889 * [3] 10.5.2.22a Neighbour Cell Description 2
4890 * [3] 10.5.2.22b (void)
4891 * [3] 10.5.2.22c NT/N Rest Octets
4892 * [3] 10.5.2.23 P1 Rest Octets
4893 * [3] 10.5.2.24 P2 Rest Octets
4894 * [3] 10.5.2.25 P3 Rest Octets
4895 * [3] 10.5.2.25a Packet Channel Description
4896 * [3] 10.5.2.25b Dedicated mode or TBF
4897 * [3] 10.5.2.25c RR Packet Uplink Assignment
4898 * [3] 10.5.2.25d RR Packet Downlink Assignment
4899 * [3] 10.5.2.26 Page Mode
4900 * [3] 10.5.2.26a (void)
4901 * [3] 10.5.2.26b (void)
4902 * [3] 10.5.2.26c (void)
4903 * [3] 10.5.2.26d (void)
4904 * [3] 10.5.2.27 NCC Permitted
4907 * [3] 10.5.2.28 Power Command
4910 * ATC (Access Type Control) (octet 2)Bit 8
4911 * 0 Sending of Handover access is mandatory
4912 * 1 Sending of Handover access is optional
4914 static const true_false_string gsm_a_rr_pow_cmd_atc_value = {
4915 "Sending of Handover access is optional",
4916 "Sending of Handover access is mandatory"
4919 * The EPC mode field (octet 2) indicates whether the assigned channel(s)
4920 * shall be in enhanced power control (EPC) mode. It is only valid for channels
4921 * on which EPC may be used. It is coded as follows:
4923 static const true_false_string gsm_a_rr_pow_cmd_epc_value = {
4924 "Channel(s) in EPC mode",
4925 "Channel(s) not in EPC mode"
4929 * The FPC_EPC field (octet 2) has different interpretation depending
4930 * on the channel mode of the assigned channel (s) and the value
4931 * of the EPC mode field.
4932 * If the channel mode is such that fast power control (FPC) may be
4933 * used, the FPC_EPC field indicates whether Fast Measurement
4934 * Reporting and Power Control mechanism is used.
4935 * It is coded as follows:
4936 * Value 0 FPC not in use
4938 * If the channel mode is such that EPC may be used and the EPC mode
4939 * field indicates that the channel is in EPC mode, the FPC_EPC
4940 * field indicates whether EPC shall be used for uplink power control.
4941 * It is coded as follows:
4942 * Value 0 EPC not in use for uplink power control
4943 * 1 EPC in use for uplink power control
4946 static const true_false_string gsm_a_rr_pow_cmd_fpcepc_value = {
4947 "FPC in use/EPC in use for uplink power control",
4948 "FPC not in use/C not in use for uplink power control"
4952 * Power level (octet 2)The power level field is coded as the binaryRepresentation
4953 * of the "power control level", see 3GPP TS 3GPP TS 45.005. This value shall be used
4954 * by the mobile station According to 3GPP TS 45.008.Range: 0 to 31.
4958 de_rr_pow_cmd(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
4960 proto_tree *subtree;
4962 guint32 curr_offset;
4965 curr_offset = offset;
4968 proto_tree_add_text(tree,
4969 tvb, curr_offset, 1,
4970 gsm_dtap_elem_strings[DE_RR_POW_CMD].strptr);
4972 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_RR_POW_CMD]);
4974 proto_tree_add_item(subtree, hf_gsm_a_b8spare, tvb, curr_offset, 1, FALSE);
4976 proto_tree_add_item(subtree, hf_gsm_a_rr_pow_cmd_epc, tvb, curr_offset, 1, FALSE);
4978 proto_tree_add_item(subtree, hf_gsm_a_rr_pow_cmd_fpcepc, tvb, curr_offset, 1, FALSE);
4980 proto_tree_add_item(subtree, hf_gsm_a_rr_pow_cmd_powlev, tvb, curr_offset, 1, FALSE);
4982 curr_offset = curr_offset + 1;
4984 return(curr_offset - offset);
4988 * [3] 10.5.2.28a Power Command and access type
4991 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_)
4993 proto_tree *subtree;
4995 guint32 curr_offset;
4998 curr_offset = offset;
5001 proto_tree_add_text(tree,
5002 tvb, curr_offset, 1,
5003 gsm_dtap_elem_strings[DE_RR_POW_CMD_AND_ACC_TYPE].strptr);
5005 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_RR_POW_CMD_AND_ACC_TYPE]);
5008 proto_tree_add_item(subtree, hf_gsm_a_rr_pow_cmd_atc, tvb, curr_offset, 1, FALSE);
5010 proto_tree_add_item(subtree, hf_gsm_a_rr_pow_cmd_epc, tvb, curr_offset, 1, FALSE);
5012 proto_tree_add_item(subtree, hf_gsm_a_rr_pow_cmd_fpcepc, tvb, curr_offset, 1, FALSE);
5014 proto_tree_add_item(subtree, hf_gsm_a_rr_pow_cmd_powlev, tvb, curr_offset, 1, FALSE);
5016 curr_offset = curr_offset + 1;
5018 return(curr_offset - offset);
5021 * [3] 10.5.2.29 RACH Control Parameters
5022 * [3] 10.5.2.30 Request Reference
5029 de_rr_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
5031 guint32 curr_offset;
5034 curr_offset = offset;
5036 proto_tree_add_item(tree, hf_gsm_a_rr_RR_cause, tvb, curr_offset, 1, FALSE);
5040 return(curr_offset - offset);
5043 * [3] 10.5.2.32 SI 1 Rest Octets
5044 * [3] 10.5.2.33 SI 2bis Rest Octets
5045 * [3] 10.5.2.33a SI 2ter Rest Octets
5046 * [3] 10.5.2.33b SI 2quater Rest Octets
5047 * [3] 10.5.2.34 SI 3 Rest Octets
5048 * [3] 10.5.2.35 SI 4 Rest Octets
5049 * [3] 10.5.2.35a SI 6 Rest Octets
5050 * [3] 10.5.2.36 SI 7 Rest Octets
5051 * [3] 10.5.2.37 SI 8 Rest Octets
5052 * [3] 10.5.2.37a SI 9 Rest Octets
5053 * [3] 10.5.2.37b SI 13 Rest Octets
5054 * [3] 10.5.2.37c (void)
5055 * [3] 10.5.2.37d (void)
5056 * [3] 10.5.2.37e SI 16 Rest Octets
5057 * [3] 10.5.2.37f SI 17 Rest Octets
5058 * [3] 10.5.2.37g SI 19 Rest Octets
5059 * [3] 10.5.2.37h SI 18 Rest Octets
5060 * [3] 10.5.2.37i SI 20 Rest Octets
5063 * [3] 10.5.2.38 Starting Time
5066 de_rr_starting_time(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
5068 guint32 curr_offset;
5071 curr_offset = offset;
5073 proto_tree_add_text(tree,tvb, curr_offset, 3 ,"Data(Not decoded)");
5075 curr_offset = curr_offset + 2;
5076 return(curr_offset - offset);
5079 * [3] 10.5.2.39 Synchronization Indication
5082 * ROT: Report Observed Time Difference (Octet1 bit 3) */
5084 static const true_false_string sm_a_rr_sync_ind_rot_value = {
5085 "Mobile Time Difference IE shall be included in the HANDOVER COMPLETE message",
5086 "Mobile Time Difference IE shall not be included in the HANDOVER COMPLETE message"
5089 /* SI: Synchronization indication (octet 1)Bit2 1 */
5091 static const value_string gsm_a_rr_sync_ind_si_vals[] = {
5092 { 0, "Non-synchronized"},
5093 { 1, "Synchronized"},
5094 { 2, "Pre-synchronised"},
5095 { 3, "Pseudo-synchronised"},
5098 /* NCI: Normal cell indication (octet 1, bit 4) */
5100 static const true_false_string gsm_a_rr_sync_ind_nci_value = {
5101 "Out of range timing advance shall trigger a handover failure procedure",
5102 "Out of range timing advance is ignored"
5107 de_rr_sync_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
5109 guint32 curr_offset;
5112 curr_offset = offset;
5115 proto_tree_add_item(tree, hf_gsm_a_rr_sync_ind_nci, tvb, curr_offset, 1, FALSE);
5117 proto_tree_add_item(tree, hf_gsm_a_rr_sync_ind_rot, tvb, curr_offset, 1, FALSE);
5119 proto_tree_add_item(tree, hf_gsm_a_rr_sync_ind_si, tvb, curr_offset, 1, FALSE);
5121 curr_offset = curr_offset + 1;
5123 return(curr_offset - offset);
5127 * [3] 10.5.2.40 Timing Advance
5130 de_rr_timing_adv(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
5132 guint32 curr_offset;
5135 curr_offset = offset;
5137 proto_tree_add_item(tree, hf_gsm_a_rr_timing_adv, tvb, curr_offset, 1, FALSE);
5138 curr_offset = curr_offset + 1;
5140 return(curr_offset - offset);
5144 * [3] 10.5.2.41 Time Difference
5147 de_rr_time_diff(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
5149 guint32 curr_offset;
5152 curr_offset = offset;
5154 proto_tree_add_item(tree, hf_gsm_a_rr_time_diff, tvb, curr_offset, 1, FALSE);
5155 curr_offset = curr_offset + 1;
5157 return(curr_offset - offset);
5160 * [3] 10.5.2.41a TLLI
5161 * The TLLI is encoded as a binary number with a length of 4 octets. TLLI is defined in 3GPP TS 23.003
5164 de_rr_tlli(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
5166 guint32 curr_offset;
5169 curr_offset = offset;
5171 proto_tree_add_item(tree, hf_gsm_a_rr_tlli, tvb, curr_offset, 4, FALSE);
5172 curr_offset = curr_offset + 4;
5174 return(curr_offset - offset);
5177 * [3] 10.5.2.42 TMSI/P-TMSI
5180 * [3] 10.5.2.42a VGCS target mode Indication
5183 Target mode (octet 3)
5186 0 1 group transmit mode
5187 Other values are reserved for future use.
5189 static const value_string gsm_a_rr_target_mode_vals[] _U_ = {
5190 { 0, "Dedicated mode"},
5191 { 1, "Group transmit mode"},
5195 de_rr_vgcs_tar_mode_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
5197 guint32 curr_offset;
5200 curr_offset = offset;
5202 proto_tree_add_item(tree, hf_gsm_a_rr_target_mode, tvb, curr_offset, 1, FALSE);
5203 proto_tree_add_item(tree, hf_gsm_a_rr_group_cipher_key_number, tvb, curr_offset, 1, FALSE);
5204 curr_offset = curr_offset + 1;
5206 return(curr_offset - offset);
5210 * [3] 10.5.2.42b VGCS Ciphering Parameters
5213 de_rr_vgcs_cip_par(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
5215 guint32 curr_offset;
5218 curr_offset = offset;
5220 proto_tree_add_text(tree,tvb, curr_offset, len ,"Data(Not decoded)");
5222 curr_offset = curr_offset + 2;
5223 return(curr_offset - offset);
5226 * [3] 10.5.2.43 Wait Indication
5227 * [3] 10.5.2.44 SI10 rest octets $(ASCI)$
5228 * [3] 10.5.2.45 EXTENDED MEASUREMENT RESULTS
5229 * [3] 10.5.2.46 Extended Measurement Frequency List
5232 * [3] 10.5.2.47 Suspension Cause
5234 /*Suspension cause value (octet 2)*/
5235 static const value_string gsm_a_rr_suspension_cause_vals[] = {
5236 { 0, "Emergency call, mobile originating call or call re-establishment"},
5237 { 1, "Location Area Update"},
5238 { 2, "MO Short message service"},
5239 { 3, "Other procedure which can be completed with an SDCCH"},
5240 { 4, "MO Voice broadcast or group call"},
5241 { 5, "Mobile terminating CS connection"},
5242 { 6, "DTM not supported in the cell"},
5246 de_rr_sus_cau(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
5248 guint32 curr_offset;
5251 curr_offset = offset;
5253 proto_tree_add_item(tree, hf_gsm_a_rr_suspension_cause, tvb, curr_offset, 1, FALSE);
5255 curr_offset = curr_offset + 1;
5256 return(curr_offset - offset);
5259 * [3] 10.5.2.48 APDU ID
5260 * [3] 10.5.2.49 APDU Flags
5261 * [3] 10.5.2.50 APDU Data
5262 * [3] 10.5.2.51 Handover To UTRAN Command
5263 * [3] 10.5.2.52 Handover To cdma2000 Command
5264 * [3] 10.5.2.53 (void)
5265 * [3] 10.5.2.54 (void)
5266 * [3] 10.5.2.55 (void)
5267 * [3] 10.5.2.56 3G Target Cell
5270 * [3] 10.5.2.59 Dedicated Service Information
5273 Last Segment (octet 2)
5275 0 mobile station shall not perform Service Information Sending procedure on new cell.
5276 1 mobile station shall perform Service Information Sending procedure on new cell.
5278 static const true_false_string gsm_a_rr_last_segment_value = {
5279 "Mobile station shall perform Service Information Sending procedure on new cell.",
5280 "mobile station shall not perform Service Information Sending procedure on new cell."
5283 de_rr_ded_serv_inf(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
5285 guint32 curr_offset;
5288 curr_offset = offset;
5290 proto_tree_add_item(tree, hf_gsm_a_rr_last_segment, tvb, curr_offset, 1, FALSE);
5292 curr_offset = curr_offset + 3;
5293 return(curr_offset - offset);
5302 de_auth_param_rand(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
5304 guint32 curr_offset;
5307 curr_offset = offset;
5310 * 16 octets == 128 bits
5312 #define AUTH_PARAM_RAND_LEN 16
5314 proto_tree_add_text(tree,
5315 tvb, curr_offset, AUTH_PARAM_RAND_LEN,
5317 tvb_bytes_to_str(tvb, curr_offset, AUTH_PARAM_RAND_LEN));
5319 curr_offset += AUTH_PARAM_RAND_LEN;
5321 /* no length check possible */
5323 return(curr_offset - offset);
5330 de_auth_param_autn(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
5332 guint32 curr_offset;
5334 curr_offset = offset;
5336 proto_tree_add_text(tree,
5337 tvb, curr_offset, len,
5339 tvb_bytes_to_str(tvb, curr_offset, len));
5343 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
5345 return(curr_offset - offset);
5352 de_auth_resp_param(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
5354 guint32 curr_offset;
5357 curr_offset = offset;
5360 * 4 octets == 32 bits
5362 #define AUTH_PARAM_SRES_LEN 4
5364 proto_tree_add_text(tree,
5365 tvb, curr_offset, AUTH_PARAM_SRES_LEN,
5367 tvb_bytes_to_str(tvb, curr_offset, AUTH_PARAM_SRES_LEN));
5369 curr_offset += AUTH_PARAM_SRES_LEN;
5371 /* no length check possible */
5373 return(curr_offset - offset);
5380 de_auth_resp_param_ext(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
5382 guint32 curr_offset;
5384 curr_offset = offset;
5386 proto_tree_add_text(tree,
5387 tvb, curr_offset, len,
5389 tvb_bytes_to_str(tvb, curr_offset, len));
5393 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
5395 return(curr_offset - offset);
5402 de_auth_fail_param(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
5404 guint32 curr_offset;
5406 curr_offset = offset;
5408 proto_tree_add_text(tree,
5409 tvb, curr_offset, len,
5411 tvb_bytes_to_str(tvb, curr_offset, len));
5415 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
5417 return(curr_offset - offset);
5424 de_network_name(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
5427 guint32 curr_offset;
5430 curr_offset = offset;
5432 oct = tvb_get_guint8(tvb, curr_offset);
5434 proto_tree_add_item(tree, hf_gsm_a_extension, tvb, curr_offset, 1, FALSE);
5436 switch ((oct & 0x70) >> 4)
5438 case 0x00: str = "Cell Broadcast data coding scheme, GSM default alphabet, language unspecified, defined in 3GPP TS 03.38"; break;
5439 case 0x01: str = "UCS2 (16 bit)"; break;
5445 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
5446 proto_tree_add_text(tree,
5447 tvb, curr_offset, 1,
5448 "%s : Coding Scheme: %s",
5452 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
5453 proto_tree_add_text(tree,
5454 tvb, curr_offset, 1,
5455 "%s : Add CI: The MS should %s",
5458 "add the letters for the Country's Initials and a separator (e.g. a space) to the text string" :
5459 "The MS should not add the letters for the Country's Initials to the text string");
5463 case 1: str = "bit 8 is spare and set to '0' in octet n"; break;
5464 case 2: str = "bits 7 and 8 are spare and set to '0' in octet n"; break;
5465 case 3: str = "bits 6 to 8(inclusive) are spare and set to '0' in octet n"; break;
5466 case 4: str = "bits 5 to 8(inclusive) are spare and set to '0' in octet n"; break;
5467 case 5: str = "bits 4 to 8(inclusive) are spare and set to '0' in octet n"; break;
5468 case 6: str = "bits 3 to 8(inclusive) are spare and set to '0' in octet n"; break;
5469 case 7: str = "bits 2 to 8(inclusive) are spare and set to '0' in octet n"; break;
5471 str = "this field carries no information about the number of spare bits in octet n";
5475 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
5476 proto_tree_add_text(tree,
5477 tvb, curr_offset, 1,
5478 "%s : Number of spare bits in last octet: %s",
5484 NO_MORE_DATA_CHECK(len);
5486 proto_tree_add_text(tree,
5487 tvb, curr_offset, len - 1,
5488 "Text string encoded according to Coding Scheme");
5490 curr_offset += len - 1;
5492 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
5494 return(curr_offset - offset);
5498 * [3] 10.5.3.6 Reject cause
5501 de_rej_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
5504 guint32 curr_offset;
5508 curr_offset = offset;
5510 oct = tvb_get_guint8(tvb, curr_offset);
5514 case 0x02: str = "IMSI unknown in HLR"; break;
5515 case 0x03: str = "Illegal MS"; break;
5516 case 0x04: str = "IMSI unknown in VLR"; break;
5517 case 0x05: str = "IMEI not accepted"; break;
5518 case 0x06: str = "Illegal ME"; break;
5519 case 0x0b: str = "PLMN not allowed"; break;
5520 case 0x0c: str = "Location Area not allowed"; break;
5521 case 0x0d: str = "Roaming not allowed in this location area"; break;
5522 case 0x0f: str = "No Suitable Cells In Location Area"; break;
5523 case 0x11: str = "Network failure"; break;
5524 case 0x14: str = "MAC failure"; break;
5525 case 0x15: str = "Synch failure"; break;
5526 case 0x16: str = "Congestion"; break;
5527 case 0x17: str = "GSM authentication unacceptable"; break;
5528 case 0x20: str = "Service option not supported"; break;
5529 case 0x21: str = "Requested service option not subscribed"; break;
5530 case 0x22: str = "Service option temporarily out of order"; break;
5531 case 0x26: str = "Call cannot be identified"; break;
5532 case 0x5f: str = "Semantically incorrect message"; break;
5533 case 0x60: str = "Invalid mandatory information"; break;
5534 case 0x61: str = "Message type non-existent or not implemented"; break;
5535 case 0x62: str = "Message type not compatible with the protocol state"; break;
5536 case 0x63: str = "Information element non-existent or not implemented"; break;
5537 case 0x64: str = "Conditional IE error"; break;
5538 case 0x65: str = "Message not compatible with the protocol state"; break;
5539 case 0x6f: str = "Protocol error, unspecified"; break;
5543 case IS_UPLINK_FALSE:
5544 str = "Service option temporarily out of order";
5547 str = "Protocol error, unspecified";
5553 proto_tree_add_text(tree,
5554 tvb, curr_offset, 1,
5555 "Reject Cause value: 0x%02x (%u) %s",
5562 /* no length check possible */
5564 return(curr_offset - offset);
5571 de_time_zone(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
5574 guint32 curr_offset;
5578 curr_offset = offset;
5580 /* 3GPP TS 23.040 version 6.6.0 Release 6
5581 * 9.2.3.11 TP-Service-Centre-Time-Stamp (TP-SCTS)
5583 * The Time Zone indicates the difference, expressed in quarters of an hour,
5584 * between the local time and GMT. In the first of the two semi-octets,
5585 * the first bit (bit 3 of the seventh octet of the TP-Service-Centre-Time-Stamp field)
5586 * represents the algebraic sign of this difference (0: positive, 1: negative).
5589 oct = tvb_get_guint8(tvb, curr_offset);
5590 sign = (oct & 0x08)?'-':'+';
5591 oct = (oct >> 4) + (oct & 0x07) * 10;
5593 proto_tree_add_text(tree,
5595 "Timezone: GMT %c %d hours %d minutes",
5596 sign, oct / 4, oct % 4 * 15);
5599 /* no length check possible */
5601 return(curr_offset - offset);
5608 de_time_zone_time(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
5610 guint8 oct, oct2, oct3;
5611 guint32 curr_offset;
5615 curr_offset = offset;
5617 oct = tvb_get_guint8(tvb, curr_offset);
5618 oct2 = tvb_get_guint8(tvb, curr_offset+1);
5619 oct3 = tvb_get_guint8(tvb, curr_offset+2);
5621 proto_tree_add_text(tree,
5622 tvb, curr_offset, 3,
5623 "Year %u%u, Month %u%u, Day %u%u",
5629 (oct3 & 0xf0) >> 4);
5633 oct = tvb_get_guint8(tvb, curr_offset);
5634 oct2 = tvb_get_guint8(tvb, curr_offset+1);
5635 oct3 = tvb_get_guint8(tvb, curr_offset+2);
5637 proto_tree_add_text(tree,
5638 tvb, curr_offset, 3,
5639 "Hour %u%u, Minutes %u%u, Seconds %u%u",
5645 (oct3 & 0xf0) >> 4);
5649 /* 3GPP TS 23.040 version 6.6.0 Release 6
5650 * 9.2.3.11 TP-Service-Centre-Time-Stamp (TP-SCTS)
5652 * The Time Zone indicates the difference, expressed in quarters of an hour,
5653 * between the local time and GMT. In the first of the two semi-octets,
5654 * the first bit (bit 3 of the seventh octet of the TP-Service-Centre-Time-Stamp field)
5655 * represents the algebraic sign of this difference (0: positive, 1: negative).
5658 oct = tvb_get_guint8(tvb, curr_offset);
5659 sign = (oct & 0x08)?'-':'+';
5660 oct = (oct >> 4) + (oct & 0x07) * 10;
5662 proto_tree_add_text(tree,
5664 "Timezone: GMT %c %d hours %d minutes",
5665 sign, oct / 4, oct % 4 * 15);
5669 /* no length check possible */
5671 return(curr_offset - offset);
5675 * [3] 10.5.3.11 3GPP TS 24.008 version 6.8.0 Release 6
5678 de_lsa_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
5680 guint32 curr_offset;
5682 curr_offset = offset;
5685 proto_tree_add_text(tree,tvb, curr_offset, len,"LSA ID not included");
5687 proto_tree_add_item(tree, hf_gsm_a_lsa_id, tvb, curr_offset, 3, FALSE);
5692 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
5694 return(curr_offset - offset);
5701 de_day_saving_time(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
5704 guint32 curr_offset;
5707 curr_offset = offset;
5709 oct = tvb_get_guint8(tvb, curr_offset);
5711 other_decode_bitfield_value(a_bigbuf, oct, 0xfc, 8);
5712 proto_tree_add_text(tree,
5713 tvb, curr_offset, 1,
5719 case 0: str = "No adjustment for Daylight Saving Time"; break;
5720 case 1: str = "+1 hour adjustment for Daylight Saving Time"; break;
5721 case 2: str = "+2 hours adjustment for Daylight Saving Time"; break;
5727 other_decode_bitfield_value(a_bigbuf, oct, 0x03, 8);
5728 proto_tree_add_text(tree,
5729 tvb, curr_offset, 1,
5736 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
5738 return(curr_offset - offset);
5745 de_aux_states(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
5748 guint32 curr_offset;
5751 curr_offset = offset;
5753 oct = tvb_get_guint8(tvb, curr_offset);
5755 proto_tree_add_item(tree, hf_gsm_a_extension, tvb, curr_offset, 1, FALSE);
5757 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
5758 proto_tree_add_text(tree,
5759 tvb, curr_offset, 1,
5763 switch ((oct & 0x0c) >> 2)
5765 case 0: str = "Idle"; break;
5766 case 1: str = "Hold request"; break;
5767 case 2: str = "Call held"; break;
5769 str = "Retrieve request";
5773 other_decode_bitfield_value(a_bigbuf, oct, 0x0c, 8);
5774 proto_tree_add_text(tree,
5775 tvb, curr_offset, 1,
5776 "%s : Hold auxiliary state: %s",
5782 case 0: str = "Idle"; break;
5783 case 1: str = "MPTY request"; break;
5784 case 2: str = "Call in MPTY"; break;
5786 str = "Split request";
5790 other_decode_bitfield_value(a_bigbuf, oct, 0x03, 8);
5791 proto_tree_add_text(tree,
5792 tvb, curr_offset, 1,
5793 "%s : Multi party auxiliary state: %s",
5799 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
5801 return(curr_offset - offset);
5808 de_bearer_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
5813 guint32 curr_offset;
5814 guint32 saved_offset;
5815 proto_tree *subtree;
5819 #define DE_BC_ITC_SPEECH 0x00
5820 #define DE_BC_ITC_UDI 0x01
5821 #define DE_BC_ITC_EX_PLMN 0x02
5822 #define DE_BC_ITC_FASC_G3 0x03
5823 #define DE_BC_ITC_OTHER_ITC 0x05
5824 #define DE_BC_ITC_RSVD_NET 0x07
5826 curr_offset = offset;
5828 oct = tvb_get_guint8(tvb, curr_offset);
5833 * warning, bearer cap uses extended values that
5834 * are reversed from other parameters!
5836 extended = (oct & 0x80) ? FALSE : TRUE;
5839 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
5840 proto_tree_add_text(tree,
5841 tvb, curr_offset, 1,
5842 "%s : Extension: %s",
5844 extended ? "extended" : "not extended");
5848 case IS_UPLINK_FALSE:
5852 case IS_UPLINK_TRUE:
5854 * depends on Information transfer capability
5858 case DE_BC_ITC_SPEECH:
5861 switch ((oct & 0x60) >> 5)
5863 case 1: str = "MS supports at least full rate speech version 1 but does not support half rate speech version 1"; break;
5864 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;
5865 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;
5874 switch ((oct & 0x60) >> 5)
5876 case 1: str = "Full rate support only MS/fullrate speech version 1 supported"; break;
5877 case 2: str = "Dual rate support MS/half rate speech version 1 preferred, full rate speech version 1 also supported"; break;
5878 case 3: str = "Dual rate support MS/full rate speech version 1 preferred, half rate speech version 1 also supported"; break;
5888 switch ((oct & 0x60) >> 5)
5890 case 1: str = "Full rate support only MS"; break;
5891 case 2: str = "Dual rate support MS/half rate preferred"; break;
5892 case 3: str = "Dual rate support MS/full rate preferred"; break;
5902 str = "(dissect problem)";
5906 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
5907 proto_tree_add_text(tree,
5908 tvb, curr_offset, 1,
5909 "%s : Radio channel requirement: %s",
5913 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
5914 proto_tree_add_text(tree,
5915 tvb, curr_offset, 1,
5916 "%s : Coding standard: %s",
5918 (oct & 0x10) ? "reserved" : "GSM standardized coding");
5920 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
5921 proto_tree_add_text(tree,
5922 tvb, curr_offset, 1,
5923 "%s : Transfer mode: %s",
5925 (oct & 0x08) ? "packet" : "circuit");
5929 case DE_BC_ITC_SPEECH: str = "Speech"; break;
5930 case DE_BC_ITC_UDI: str = "Unrestricted digital information"; break;
5931 case DE_BC_ITC_EX_PLMN: str = "3.1 kHz audio, ex PLMN"; break;
5932 case DE_BC_ITC_FASC_G3: str = "Facsimile group 3"; break;
5933 case DE_BC_ITC_OTHER_ITC: str = "Other ITC (See Octet 5a)"; break;
5934 case DE_BC_ITC_RSVD_NET: str = "Reserved, to be used in the network"; break;
5940 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
5941 proto_tree_add_text(tree,
5942 tvb, curr_offset, 1,
5943 "%s : Information transfer capability: %s",
5948 g_snprintf(add_string, string_len, " - (%s)", str);
5952 NO_MORE_DATA_CHECK(len);
5956 case DE_BC_ITC_SPEECH:
5960 proto_tree_add_text(tree,
5961 tvb, curr_offset, -1,
5962 "Octets 3a - Speech Versions");
5964 subtree = proto_item_add_subtree(item, ett_bc_oct_3a);
5966 saved_offset = curr_offset;
5970 oct = tvb_get_guint8(tvb, curr_offset);
5972 extended = (oct & 0x80) ? FALSE : TRUE;
5974 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
5975 proto_tree_add_text(subtree,
5976 tvb, curr_offset, 1,
5977 "%s : Extension: %s",
5979 extended ? "extended" : "not extended");
5981 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
5982 proto_tree_add_text(subtree,
5983 tvb, curr_offset, 1,
5984 "%s : Coding: octet used for %s",
5986 (oct & 0x40) ? "other extension of octet 3" :
5987 "extension of information transfer capability");
5989 other_decode_bitfield_value(a_bigbuf, oct, 0x30, 8);
5990 proto_tree_add_text(subtree,
5991 tvb, curr_offset, 1,
5997 case 0: str = "GSM full rate speech version 1"; break;
5998 case 2: str = "GSM full rate speech version 2"; break;
5999 case 4: str = "GSM full rate speech version 3"; break;
6000 case 1: str = "GSM half rate speech version 1"; break;
6001 case 5: str = "GSM half rate speech version 3"; break;
6003 str = "Speech version TBD";
6007 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
6008 proto_tree_add_text(subtree,
6009 tvb, curr_offset, 1,
6010 "%s : Speech version indication: %s",
6017 ((len - (curr_offset - offset)) > 0));
6019 proto_item_set_len(item, curr_offset - saved_offset);
6026 proto_tree_add_text(tree,
6027 tvb, curr_offset, 1,
6030 subtree = proto_item_add_subtree(item, ett_bc_oct_4);
6032 oct = tvb_get_guint8(tvb, curr_offset);
6034 extended = (oct & 0x80) ? FALSE : TRUE;
6036 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
6037 proto_tree_add_text(subtree,
6038 tvb, curr_offset, 1,
6039 "%s : Extension: %s",
6041 extended ? "extended" : "not extended");
6043 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
6044 proto_tree_add_text(subtree,
6045 tvb, curr_offset, 1,
6046 "%s : Compression: data compression %s%s",
6048 (oct & 0x40) ? "" : "not ",
6049 is_uplink ? "allowed" : "possible");
6051 switch ((oct & 0x30) >> 4)
6053 case 0x00: str = "Service data unit integrity"; break;
6054 case 0x03: str = "Unstructured"; break;
6060 other_decode_bitfield_value(a_bigbuf, oct, 0x30, 8);
6061 proto_tree_add_text(subtree,
6062 tvb, curr_offset, 1,
6063 "%s : Structure: %s",
6067 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
6068 proto_tree_add_text(subtree,
6069 tvb, curr_offset, 1,
6070 "%s : Duplex mode: %s",
6072 (oct & 0x08) ? "Full" : "Half");
6074 other_decode_bitfield_value(a_bigbuf, oct, 0x04, 8);
6075 proto_tree_add_text(subtree,
6076 tvb, curr_offset, 1,
6077 "%s : Configuration: %s",
6079 (oct & 0x04) ? "Reserved" : "Point-to-point");
6081 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
6082 proto_tree_add_text(subtree,
6083 tvb, curr_offset, 1,
6087 "Data up to and including 4.8 kb/s, full rate, non-transparent, 6 kb/s radio interface rate is requested" :
6088 "No meaning is associated with this value");
6090 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
6091 proto_tree_add_text(subtree,
6092 tvb, curr_offset, 1,
6093 "%s : Establishment: %s",
6095 (oct & 0x01) ? "Reserved" : "Demand");
6099 NO_MORE_DATA_CHECK(len);
6104 proto_tree_add_text(tree,
6105 tvb, curr_offset, 1,
6108 subtree = proto_item_add_subtree(item, ett_bc_oct_5);
6110 oct = tvb_get_guint8(tvb, curr_offset);
6112 extended = (oct & 0x80) ? FALSE : TRUE;
6114 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
6115 proto_tree_add_text(subtree,
6116 tvb, curr_offset, 1,
6117 "%s : Extension: %s",
6119 extended ? "extended" : "not extended");
6121 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
6122 proto_tree_add_text(subtree,
6123 tvb, curr_offset, 1,
6124 "%s : Access Identity: %s",
6126 (oct & 0x60) ? "Reserved" : "Octet identifier");
6128 switch ((oct & 0x18) >> 3)
6130 case 0x00: str = "No rate adaption"; break;
6131 case 0x01: str = "V.110, I.460/X.30 rate adaptation"; break;
6132 case 0x02: str = "ITU-T X.31 flag stuffing"; break;
6134 str = "Other rate adaption (see octet 5a)"; break;
6138 other_decode_bitfield_value(a_bigbuf, oct, 0x18, 8);
6139 proto_tree_add_text(subtree,
6140 tvb, curr_offset, 1,
6141 "%s : Rate Adaption: %s",
6147 case 0x01: str = "I.440/450"; break;
6148 case 0x02: str = "Reserved: was allocated in earlier phases of the protocol"; break;
6149 case 0x03: str = "Reserved: was allocated in earlier phases of the protocol"; break;
6150 case 0x04: str = "Reserved: was allocated in earlier phases of the protocol"; break;
6151 case 0x05: str = "Reserved: was allocated in earlier phases of the protocol"; break;
6152 case 0x06: str = "Reserved: was allocated in earlier phases of the protocol"; break;
6154 str = "Reserved"; break;
6158 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
6159 proto_tree_add_text(subtree,
6160 tvb, curr_offset, 1,
6161 "%s : Signalling Access Protocol: %s",
6167 NO_MORE_DATA_CHECK(len);
6169 if (!extended) goto bc_octet_6;
6174 proto_tree_add_text(tree,
6175 tvb, curr_offset, 1,
6178 subtree = proto_item_add_subtree(item, ett_bc_oct_5a);
6180 oct = tvb_get_guint8(tvb, curr_offset);
6182 extended = (oct & 0x80) ? FALSE : TRUE;
6184 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
6185 proto_tree_add_text(subtree,
6186 tvb, curr_offset, 1,
6187 "%s : Extension: %s",
6189 extended ? "extended" : "not extended");
6191 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
6192 proto_tree_add_text(subtree,
6193 tvb, curr_offset, 1,
6194 "%s : Other ITC: %s",
6196 (oct & 0x60) ? "Reserved" : "Restricted digital information");
6198 switch ((oct & 0x18) >> 3)
6200 case 0x00: str = "V.120"; break;
6201 case 0x01: str = "H.223 & H.245"; break;
6202 case 0x02: str = "PIAFS"; break;
6208 other_decode_bitfield_value(a_bigbuf, oct, 0x18, 8);
6209 proto_tree_add_text(subtree,
6210 tvb, curr_offset, 1,
6211 "%s : Other Rate Adaption: %s",
6215 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
6216 proto_tree_add_text(subtree,
6217 tvb, curr_offset, 1,
6223 NO_MORE_DATA_CHECK(len);
6225 if (!extended) goto bc_octet_6;
6230 proto_tree_add_text(tree,
6231 tvb, curr_offset, 1,
6234 subtree = proto_item_add_subtree(item, ett_bc_oct_5b);
6236 oct = tvb_get_guint8(tvb, curr_offset);
6238 extended = (oct & 0x80) ? FALSE : TRUE;
6240 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
6241 proto_tree_add_text(subtree,
6242 tvb, curr_offset, 1,
6243 "%s : Extension: %s",
6245 extended ? "extended" : "not extended");
6247 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
6248 proto_tree_add_text(subtree,
6249 tvb, curr_offset, 1,
6250 "%s : Rate Adaption Header: %sincluded",
6252 (oct & 0x40) ? "" : "not ");
6254 other_decode_bitfield_value(a_bigbuf, oct, 0x20, 8);
6255 proto_tree_add_text(subtree,
6256 tvb, curr_offset, 1,
6257 "%s : Multiple frame establishment support in data link: %s",
6259 (oct & 0x20) ? "Supported" : "Not supported, only UI frames allowed");
6261 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
6262 proto_tree_add_text(subtree,
6263 tvb, curr_offset, 1,
6264 "%s : Mode of operation: %s",
6266 (oct & 0x10) ? "Protocol sensitive" : "Bit transparent");
6268 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
6269 proto_tree_add_text(subtree,
6270 tvb, curr_offset, 1,
6271 "%s : Logical link identifier negotiation: %s",
6273 (oct & 0x08) ? "Full protocol negotiation" : "Default, LLI=256 only");
6275 other_decode_bitfield_value(a_bigbuf, oct, 0x04, 8);
6276 proto_tree_add_text(subtree,
6277 tvb, curr_offset, 1,
6278 "%s : Assignor/Assignee: Message originator is '%s'",
6280 (oct & 0x04) ? "assignor only" : "default assignee");
6282 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
6283 proto_tree_add_text(subtree,
6284 tvb, curr_offset, 1,
6285 "%s : In band/Out of band negotiation: Negotiation is done %s",
6288 "with USER INFORMATION messages on a temporary signalling connection" :
6289 "in-band using logical link zero");
6291 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
6292 proto_tree_add_text(subtree,
6293 tvb, curr_offset, 1,
6299 NO_MORE_DATA_CHECK(len);
6306 proto_tree_add_text(tree,
6307 tvb, curr_offset, 1,
6310 subtree = proto_item_add_subtree(item, ett_bc_oct_6);
6312 oct = tvb_get_guint8(tvb, curr_offset);
6314 extended = (oct & 0x80) ? FALSE : TRUE;
6316 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
6317 proto_tree_add_text(subtree,
6318 tvb, curr_offset, 1,
6319 "%s : Extension: %s",
6321 extended ? "extended" : "not extended");
6323 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
6324 proto_tree_add_text(subtree,
6325 tvb, curr_offset, 1,
6326 "%s : Layer 1 Identity: %s",
6328 ((oct & 0x60) == 0x20) ? "Octet identifier" : "Reserved");
6330 other_decode_bitfield_value(a_bigbuf, oct, 0x1e, 8);
6331 proto_tree_add_text(subtree,
6332 tvb, curr_offset, 1,
6333 "%s : User information layer 1 protocol: %s",
6335 (oct & 0x1e) ? "Reserved" : "Default layer 1 protocol");
6337 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
6338 proto_tree_add_text(subtree,
6339 tvb, curr_offset, 1,
6340 "%s : Synchronous/asynchronous: %s",
6342 (oct & 0x01) ? "Asynchronous" : "Synchronous");
6346 NO_MORE_DATA_CHECK(len);
6348 if (!extended) goto bc_octet_7;
6353 proto_tree_add_text(tree,
6354 tvb, curr_offset, 1,
6357 subtree = proto_item_add_subtree(item, ett_bc_oct_6a);
6359 oct = tvb_get_guint8(tvb, curr_offset);
6361 extended = (oct & 0x80) ? FALSE : TRUE;
6363 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
6364 proto_tree_add_text(subtree,
6365 tvb, curr_offset, 1,
6366 "%s : Extension: %s",
6368 extended ? "extended" : "not extended");
6370 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
6371 proto_tree_add_text(subtree,
6372 tvb, curr_offset, 1,
6373 "%s : Number of Stop Bits: %s",
6375 (oct & 0x40) ? "2" : "1");
6377 other_decode_bitfield_value(a_bigbuf, oct, 0x20, 8);
6378 proto_tree_add_text(subtree,
6379 tvb, curr_offset, 1,
6380 "%s : Negotiation: %s",
6382 (oct & 0x20) ? "Reserved" : "In-band negotiation not possible");
6384 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
6385 proto_tree_add_text(subtree,
6386 tvb, curr_offset, 1,
6387 "%s : Number of data bits excluding parity bit if present: %s",
6389 (oct & 0x10) ? "8" : "7");
6393 case 0x01: str = "0.3 kbit/s Recommendation X.1 and V.110"; break;
6394 case 0x02: str = "1.2 kbit/s Recommendation X.1 and V.110"; break;
6395 case 0x03: str = "2.4 kbit/s Recommendation X.1 and V.110"; break;
6396 case 0x04: str = "4.8 kbit/s Recommendation X.1 and V.110"; break;
6397 case 0x05: str = "9.6 kbit/s Recommendation X.1 and V.110"; break;
6398 case 0x06: str = "12.0 kbit/s transparent (non compliance with X.1 and V.110)"; break;
6399 case 0x07: str = "Reserved: was allocated in earlier phases of the protocol"; break;
6405 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
6406 proto_tree_add_text(subtree,
6407 tvb, curr_offset, 1,
6408 "%s : User rate: %s",
6414 NO_MORE_DATA_CHECK(len);
6416 if (!extended) goto bc_octet_7;
6421 proto_tree_add_text(tree,
6422 tvb, curr_offset, 1,
6425 subtree = proto_item_add_subtree(item, ett_bc_oct_6b);
6427 oct = tvb_get_guint8(tvb, curr_offset);
6429 extended = (oct & 0x80) ? FALSE : TRUE;
6431 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
6432 proto_tree_add_text(subtree,
6433 tvb, curr_offset, 1,
6434 "%s : Extension: %s",
6436 extended ? "extended" : "not extended");
6438 switch ((oct & 0x60) >> 5)
6440 case 0x02: str = "8 kbit/s"; break;
6441 case 0x03: str = "16 kbit/s"; break;
6447 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
6448 proto_tree_add_text(subtree,
6449 tvb, curr_offset, 1,
6450 "%s : V.110/X.30 rate adaptation Intermediate rate: %s",
6454 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
6455 proto_tree_add_text(subtree,
6456 tvb, curr_offset, 1,
6457 "%s : Network independent clock (NIC) on transmission (Tx): %s to send data with network independent clock",
6459 (oct & 0x10) ? "requires" : "does not require");
6461 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
6462 proto_tree_add_text(subtree,
6463 tvb, curr_offset, 1,
6464 "%s : Network independent clock (NIC) on reception (Rx): %s accept data with network independent clock",
6466 (oct & 0x08) ? "can" : "cannot");
6470 case 0x00: str = "Odd"; break;
6471 case 0x02: str = "Even"; break;
6472 case 0x03: str = "None"; break;
6473 case 0x04: str = "Forced to 0"; break;
6474 case 0x05: str = "Forced to 1"; break;
6480 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
6481 proto_tree_add_text(subtree,
6482 tvb, curr_offset, 1,
6483 "%s : Parity information: %s",
6489 NO_MORE_DATA_CHECK(len);
6491 if (!extended) goto bc_octet_7;
6496 proto_tree_add_text(tree,
6497 tvb, curr_offset, 1,
6500 subtree = proto_item_add_subtree(item, ett_bc_oct_6c);
6502 oct = tvb_get_guint8(tvb, curr_offset);
6504 extended = (oct & 0x80) ? FALSE : TRUE;
6506 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
6507 proto_tree_add_text(subtree,
6508 tvb, curr_offset, 1,
6509 "%s : Extension: %s",
6511 extended ? "extended" : "not extended");
6513 switch ((oct & 0x60) >> 5)
6515 case 0x01: str = "Non transparent (RLP)"; break;
6516 case 0x02: str = "Both, transparent preferred"; break;
6517 case 0x03: str = "Both, non transparent preferred"; break;
6519 str = "Transparent";
6523 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
6524 proto_tree_add_text(subtree,
6525 tvb, curr_offset, 1,
6526 "%s : Connection element: %s",
6532 case 0x00: str = "None"; break;
6533 case 0x01: str = "V.21"; break;
6534 case 0x02: str = "V.22"; break;
6535 case 0x03: str = "V.22 bis"; break;
6536 case 0x04: str = "Reserved: was allocated in earlier phases of the protocol"; break;
6537 case 0x05: str = "V.26 ter"; break;
6538 case 0x06: str = "V.32"; break;
6539 case 0x07: str = "Modem for undefined interface"; break;
6540 case 0x08: str = "Autobauding type 1"; break;
6546 other_decode_bitfield_value(a_bigbuf, oct, 0x1f, 8);
6547 proto_tree_add_text(subtree,
6548 tvb, curr_offset, 1,
6549 "%s : Modem type: %s",
6555 NO_MORE_DATA_CHECK(len);
6557 if (!extended) goto bc_octet_7;
6562 proto_tree_add_text(tree,
6563 tvb, curr_offset, 1,
6566 subtree = proto_item_add_subtree(item, ett_bc_oct_6d);
6568 oct = tvb_get_guint8(tvb, curr_offset);
6570 extended = (oct & 0x80) ? FALSE : TRUE;
6572 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
6573 proto_tree_add_text(subtree,
6574 tvb, curr_offset, 1,
6575 "%s : Extension: %s",
6577 extended ? "extended" : "not extended");
6579 switch ((oct & 0x60) >> 5)
6581 case 0x00: str = "No other modem type specified in this field"; break;
6582 case 0x02: str = "V.34"; break;
6588 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
6589 proto_tree_add_text(subtree,
6590 tvb, curr_offset, 1,
6591 "%s : Other modem type: %s",
6597 case 0x00: str = "Fixed network user rate not applicable/No meaning is associated with this value"; break;
6598 case 0x01: str = "9.6 kbit/s Recommendation X.1 and V.110"; break;
6599 case 0x02: str = "14.4 kbit/s Recommendation X.1 and V.110"; break;
6600 case 0x03: str = "19.2 kbit/s Recommendation X.1 and V.110"; break;
6601 case 0x04: str = "28.8 kbit/s Recommendation X.1 and V.110"; break;
6602 case 0x05: str = "38.4 kbit/s Recommendation X.1 and V.110"; break;
6603 case 0x06: str = "48.0 kbit/s Recommendation X.1 and V.110(synch)"; break;
6604 case 0x07: str = "56.0 kbit/s Recommendation X.1 and V.110(synch) /bit transparent"; break;
6605 case 0x08: str = "64.0 kbit/s bit transparent"; break;
6606 case 0x09: str = "33.6 kbit/s bit transparent"; break;
6607 case 0x0a: str = "32.0 kbit/s Recommendation I.460"; break;
6608 case 0x0b: str = "31.2 kbit/s Recommendation V.34"; break;
6614 other_decode_bitfield_value(a_bigbuf, oct, 0x1f, 8);
6615 proto_tree_add_text(subtree,
6616 tvb, curr_offset, 1,
6617 "%s : Fixed network user rate: %s",
6623 NO_MORE_DATA_CHECK(len);
6625 if (!extended) goto bc_octet_7;
6630 proto_tree_add_text(tree,
6631 tvb, curr_offset, 1,
6634 subtree = proto_item_add_subtree(item, ett_bc_oct_6e);
6636 oct = tvb_get_guint8(tvb, curr_offset);
6638 extended = (oct & 0x80) ? FALSE : TRUE;
6640 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
6641 proto_tree_add_text(subtree,
6642 tvb, curr_offset, 1,
6643 "%s : Extension: %s",
6645 extended ? "extended" : "not extended");
6647 if (is_uplink == IS_UPLINK_TRUE)
6649 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
6650 proto_tree_add_text(subtree,
6651 tvb, curr_offset, 1,
6652 "%s : Acceptable channel codings: TCH/F14.4 %sacceptable",
6654 (oct & 0x40) ? "" : "not ");
6656 other_decode_bitfield_value(a_bigbuf, oct, 0x20, 8);
6657 proto_tree_add_text(subtree,
6658 tvb, curr_offset, 1,
6659 "%s : Acceptable channel codings: Spare",
6662 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
6663 proto_tree_add_text(subtree,
6664 tvb, curr_offset, 1,
6665 "%s : Acceptable channel codings: TCH/F9.6 %sacceptable",
6667 (oct & 0x10) ? "" : "not ");
6669 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
6670 proto_tree_add_text(subtree,
6671 tvb, curr_offset, 1,
6672 "%s : Acceptable channel codings: TCH/F4.8 %sacceptable",
6674 (oct & 0x08) ? "" : "not ");
6676 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
6677 proto_tree_add_text(subtree,
6678 tvb, curr_offset, 1,
6679 "%s : Maximum number of traffic channels: %u TCH",
6685 other_decode_bitfield_value(a_bigbuf, oct, 0x78, 8);
6686 proto_tree_add_text(subtree,
6687 tvb, curr_offset, 1,
6688 "%s : Acceptable channel codings: Spare",
6691 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
6692 proto_tree_add_text(subtree,
6693 tvb, curr_offset, 1,
6694 "%s : Maximum number of traffic channels: Spare",
6700 NO_MORE_DATA_CHECK(len);
6702 if (!extended) goto bc_octet_7;
6707 proto_tree_add_text(tree,
6708 tvb, curr_offset, 1,
6711 subtree = proto_item_add_subtree(item, ett_bc_oct_6f);
6713 oct = tvb_get_guint8(tvb, curr_offset);
6715 extended = (oct & 0x80) ? FALSE : TRUE;
6717 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
6718 proto_tree_add_text(subtree,
6719 tvb, curr_offset, 1,
6720 "%s : Extension: %s",
6722 extended ? "extended" : "not extended");
6724 switch ((oct & 0x70) >> 4)
6726 case 0x00: str = "not allowed/required/applicable"; break;
6727 case 0x01: str = "up to 1 TCH/F allowed/may be requested"; break;
6728 case 0x02: str = "up to 2 TCH/F allowed/may be requested"; break;
6729 case 0x03: str = "up to 3 TCH/F allowed/may be requested"; break;
6730 case 0x04: str = "up to 4 TCH/F allowed/may be requested"; break;
6732 str = "up to 4 TCH/F may be requested";
6736 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
6737 proto_tree_add_text(subtree,
6738 tvb, curr_offset, 1,
6739 "%s : UIMI, User initiated modification indication: %s",
6743 if (is_uplink == IS_UPLINK_TRUE)
6747 case 0x00: str = "Air interface user rate not applicable/No meaning associated with this value"; break;
6748 case 0x01: str = "9.6 kbit/s"; break;
6749 case 0x02: str = "14.4 kbit/s"; break;
6750 case 0x03: str = "19.2 kbit/s"; break;
6751 case 0x05: str = "28.8 kbit/s"; break;
6752 case 0x06: str = "38.4 kbit/s"; break;
6753 case 0x07: str = "43.2 kbit/s"; break;
6754 case 0x08: str = "57.6 kbit/s"; break;
6755 case 0x09: str = "interpreted by the network as 38.4 kbit/s in this version of the protocol"; break;
6756 case 0x0a: str = "interpreted by the network as 38.4 kbit/s in this version of the protocol"; break;
6757 case 0x0b: str = "interpreted by the network as 38.4 kbit/s in this version of the protocol"; break;
6758 case 0x0c: str = "interpreted by the network as 38.4 kbit/s in this version of the protocol"; break;
6764 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
6765 proto_tree_add_text(subtree,
6766 tvb, curr_offset, 1,
6767 "%s : Wanted air interface user rate: %s",
6773 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
6774 proto_tree_add_text(subtree,
6775 tvb, curr_offset, 1,
6776 "%s : Wanted air interface user rate: Spare",
6782 NO_MORE_DATA_CHECK(len);
6784 if (!extended) goto bc_octet_7;
6789 proto_tree_add_text(tree,
6790 tvb, curr_offset, 1,
6793 subtree = proto_item_add_subtree(item, ett_bc_oct_6g);
6795 oct = tvb_get_guint8(tvb, curr_offset);
6797 extended = (oct & 0x80) ? FALSE : TRUE;
6799 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
6800 proto_tree_add_text(subtree,
6801 tvb, curr_offset, 1,
6802 "%s : Extension: %s",
6804 extended ? "extended" : "not extended");
6806 if (is_uplink == IS_UPLINK_TRUE)
6808 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
6809 proto_tree_add_text(subtree,
6810 tvb, curr_offset, 1,
6811 "%s : Acceptable channel codings extended: TCH/F28.8 %sacceptable",
6813 (oct & 0x40) ? "" : "not ");
6815 other_decode_bitfield_value(a_bigbuf, oct, 0x20, 8);
6816 proto_tree_add_text(subtree,
6817 tvb, curr_offset, 1,
6818 "%s : Acceptable channel codings extended: TCH/F32.0 %sacceptable",
6820 (oct & 0x20) ? "" : "not ");
6822 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
6823 proto_tree_add_text(subtree,
6824 tvb, curr_offset, 1,
6825 "%s : Acceptable channel codings extended: TCH/F43.2 %sacceptable",
6827 (oct & 0x10) ? "" : "not ");
6829 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
6830 proto_tree_add_text(subtree,
6831 tvb, curr_offset, 1,
6832 "%s : Acceptable channel codings extended: TCH/F43.2 %sacceptable",
6834 (oct & 0x10) ? "" : "not ");
6836 switch ((oct & 0x0c) >> 2)
6838 case 0: str = "Channel coding symmetry preferred"; break;
6839 case 2: str = "Downlink biased channel coding asymmetry is preferred"; break;
6840 case 1: str = "Uplink biased channel coding asymmetry is preferred"; break;
6842 str = "Unused, treat as Channel coding symmetry preferred";
6846 other_decode_bitfield_value(a_bigbuf, oct, 0x0c, 8);
6847 proto_tree_add_text(subtree,
6848 tvb, curr_offset, 1,
6849 "%s : Channel Coding Asymmetry Indication: %s",
6855 other_decode_bitfield_value(a_bigbuf, oct, 0x7c, 8);
6856 proto_tree_add_text(subtree,
6857 tvb, curr_offset, 1,
6858 "%s : EDGE Channel Codings: Spare",
6862 other_decode_bitfield_value(a_bigbuf, oct, 0x03, 8);
6863 proto_tree_add_text(subtree,
6864 tvb, curr_offset, 1,
6870 NO_MORE_DATA_CHECK(len);
6877 proto_tree_add_text(tree,
6878 tvb, curr_offset, 1,
6881 subtree = proto_item_add_subtree(item, ett_bc_oct_7);
6883 extended = (oct & 0x80) ? FALSE : TRUE;
6885 oct = tvb_get_guint8(tvb, curr_offset);
6887 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
6888 proto_tree_add_text(subtree,
6889 tvb, curr_offset, 1,
6890 "%s : Extension: %s",
6892 extended ? "extended" : "not extended");
6894 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
6895 proto_tree_add_text(subtree,
6896 tvb, curr_offset, 1,
6897 "%s : Layer 2 Identity: %s",
6899 ((oct & 0x60) == 0x40) ? "Octet identifier" : "Reserved");
6903 case 0x06: str = "Reserved: was allocated in earlier phases of the protocol"; break;
6904 case 0x08: str = "ISO 6429, codeset 0 (DC1/DC3)"; break;
6905 case 0x09: str = "Reserved: was allocated but never used in earlier phases of the protocol"; break;
6906 case 0x0a: str = "Videotex profile 1"; break;
6907 case 0x0c: str = "COPnoFlCt (Character oriented Protocol with no Flow Control mechanism)"; break;
6908 case 0x0d: str = "Reserved: was allocated in earlier phases of the protocol"; break;
6914 other_decode_bitfield_value(a_bigbuf, oct, 0x1f, 8);
6915 proto_tree_add_text(subtree,
6916 tvb, curr_offset, 1,
6917 "%s : User information layer 2 protocol: %s",
6923 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
6925 return(curr_offset - offset);
6932 de_cc_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
6935 guint32 curr_offset;
6937 curr_offset = offset;
6939 oct = tvb_get_guint8(tvb, curr_offset);
6941 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
6943 switch ((oct & 0xf0) >> 4)
6946 proto_tree_add_text(tree,
6947 tvb, curr_offset, 1,
6948 "%s : Maximum number of supported bearers: 1",
6953 proto_tree_add_text(tree,
6954 tvb, curr_offset, 1,
6955 "%s : Maximum number of supported bearers: %u",
6961 other_decode_bitfield_value(a_bigbuf, oct, 0x0c, 8);
6962 proto_tree_add_text(tree,
6963 tvb, curr_offset, 1,
6967 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
6968 proto_tree_add_text(tree,
6969 tvb, curr_offset, 1,
6970 "%s : PCP: the mobile station %s the Prolonged Clearing Procedure",
6972 (oct & 0x02) ? "supports" : "does not support");
6974 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
6975 proto_tree_add_text(tree,
6976 tvb, curr_offset, 1,
6980 "the mobile station supports DTMF as specified in subclause 5.5.7 of TS 24.008" :
6981 "reserved for earlier versions of the protocol");
6985 NO_MORE_DATA_CHECK(len);
6987 oct = tvb_get_guint8(tvb, curr_offset);
6989 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
6990 proto_tree_add_text(tree,
6991 tvb, curr_offset, 1,
6995 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
6996 proto_tree_add_text(tree,
6997 tvb, curr_offset, 1,
6998 "%s : Maximum number of speech bearers: %u",
7004 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
7006 return(curr_offset - offset);
7013 de_call_state(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
7016 guint32 curr_offset;
7017 proto_tree *subtree;
7022 curr_offset = offset;
7024 oct = tvb_get_guint8(tvb, curr_offset);
7027 proto_tree_add_text(tree,
7028 tvb, curr_offset, 1,
7029 gsm_dtap_elem_strings[DE_CALL_STATE].strptr);
7031 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_CALL_STATE]);
7033 switch ((oct & 0xc0) >> 6)
7035 case 0: str = "Coding as specified in ITU-T Rec. Q.931"; break;
7036 case 1: str = "Reserved for other international standards"; break;
7037 case 2: str = "National standard"; break;
7039 str = "Standard defined for the GSM PLMNS";
7043 other_decode_bitfield_value(a_bigbuf, oct, 0xc0, 8);
7044 proto_tree_add_text(subtree,
7045 tvb, curr_offset, 1,
7046 "%s : Coding standard: %s",
7052 case 0x00: str = "UO - null NO - null"; break;
7053 case 0x02: str = "U0.1- MM connection pending N0.1- MM connection pending"; break;
7054 case 0x22: str = "U0.2- CC prompt present N0.2- CC connection pending"; break;
7055 case 0x23: str = "U0.3- Wait for network information N0.3- Network answer pending"; break;
7056 case 0x24: str = "U0.4- CC-Establishment present N0.4- CC-Establishment present"; break;
7057 case 0x25: str = "U0.5- CC-Establishment confirmed N0.5- CC-Establishment confirmed"; break;
7058 case 0x26: str = "U0.6- Recall present N0.6- Recall present"; break;
7059 case 0x01: str = "U1 - call initiated N1 - call initiated"; break;
7060 case 0x03: str = "U3 - mobile originating call proceeding N3 - mobile originating call proceeding"; break;
7061 case 0x04: str = "U4 - call delivered N4 - call delivered"; break;
7062 case 0x06: str = "U6 - call present N6 - call present"; break;
7063 case 0x07: str = "U7 - call received N7 - call received"; break;
7064 case 0x08: str = "U8 - connect request N8 - connect request"; break;
7065 case 0x09: str = "U9 - mobile terminating call confirmed N9 - mobile terminating call confirmed"; break;
7066 case 0x0a: str = "U10- active N10- active"; break;
7067 case 0x0b: str = "U11- disconnect request"; break;
7068 case 0x0c: str = "U12- disconnect indication N12-disconnect indication"; break;
7069 case 0x13: str = "U19- release request N19- release request"; break;
7070 case 0x1a: str = "U26- mobile originating modify N26- mobile originating modify"; break;
7071 case 0x1b: str = "U27- mobile terminating modify N27- mobile terminating modify"; break;
7072 case 0x1c: str = " N28- connect indication"; break;
7078 other_decode_bitfield_value(a_bigbuf, oct, 0x3f, 8);
7079 proto_tree_add_text(subtree,
7080 tvb, curr_offset, 1,
7081 "%s : Call state value: %s",
7087 /* no length check possible */
7089 return(curr_offset - offset);
7092 static const true_false_string gsm_a_extension_value = {
7097 const value_string gsm_a_type_of_number_values[] = {
7098 { 0x00, "unknown" },
7099 { 0x01, "International Number" },
7100 { 0x02, "National number" },
7101 { 0x03, "Network Specific Number" },
7102 { 0x04, "Dedicated access, short code" },
7103 { 0x05, "Reserved" },
7104 { 0x06, "Reserved" },
7105 { 0x07, "Reserved for extension" },
7109 const value_string gsm_a_numbering_plan_id_values[] = {
7110 { 0x00, "unknown" },
7111 { 0x01, "ISDN/Telephony Numbering (Rec ITU-T E.164)" },
7113 { 0x03, "Data Numbering (ITU-T Rec. X.121)" },
7114 { 0x04, "Telex Numbering (ITU-T Rec. F.69)" },
7115 { 0x08, "National Numbering" },
7116 { 0x09, "Private Numbering" },
7117 { 0x0d, "reserved for CTS (see 3GPP TS 44.056 [91])" },
7118 { 0x0f, "Reserved for extension" },
7126 de_cld_party_bcd_num(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
7129 guint32 curr_offset;
7131 curr_offset = offset;
7133 proto_tree_add_item(tree, hf_gsm_a_extension, tvb, curr_offset, 1, FALSE);
7134 proto_tree_add_item(tree, hf_gsm_a_type_of_number , tvb, curr_offset, 1, FALSE);
7135 proto_tree_add_item(tree, hf_gsm_a_numbering_plan_id , tvb, curr_offset, 1, FALSE);
7139 NO_MORE_DATA_CHECK(len);
7141 poctets = tvb_get_ephemeral_string(tvb, curr_offset, len - (curr_offset - offset));
7143 my_dgt_tbcd_unpack(a_bigbuf, poctets, len - (curr_offset - offset),
7146 proto_tree_add_string_format(tree, hf_gsm_a_cld_party_bcd_num,
7147 tvb, curr_offset, len - (curr_offset - offset),
7152 if (sccp_assoc && ! sccp_assoc->called_party) {
7153 sccp_assoc->called_party = se_strdup(a_bigbuf);
7156 curr_offset += len - (curr_offset - offset);
7159 g_snprintf(add_string, string_len, " - (%s)", a_bigbuf);
7161 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
7163 return(curr_offset - offset);
7170 de_cld_party_sub_addr(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
7173 guint32 curr_offset;
7176 curr_offset = offset;
7178 oct = tvb_get_guint8(tvb, curr_offset);
7180 proto_tree_add_item(tree, hf_gsm_a_extension, tvb, curr_offset, 1, FALSE);
7182 switch ((oct & 0x70) >> 4)
7184 case 0: str = "NSAP (X.213/ISO 8348 AD2)"; break;
7185 case 2: str = "User specified"; break;
7191 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
7192 proto_tree_add_text(tree,
7193 tvb, curr_offset, 1,
7194 "%s : Type of subaddress: %s",
7198 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
7199 proto_tree_add_text(tree,
7200 tvb, curr_offset, 1,
7201 "%s : Odd/Even indicator: %s",
7204 "odd number of address signals" : "even number of address signals");
7206 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
7207 proto_tree_add_text(tree,
7208 tvb, curr_offset, 1,
7214 NO_MORE_DATA_CHECK(len);
7216 proto_tree_add_text(tree,
7217 tvb, curr_offset, len - (curr_offset - offset),
7218 "Subaddress information");
7220 curr_offset += len - (curr_offset - offset);
7222 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
7224 return(curr_offset - offset);
7231 de_clg_party_bcd_num(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
7235 guint32 curr_offset;
7238 curr_offset = offset;
7240 proto_tree_add_item(tree, hf_gsm_a_extension, tvb, curr_offset, 1, FALSE);
7241 proto_tree_add_item(tree, hf_gsm_a_type_of_number , tvb, curr_offset, 1, FALSE);
7242 proto_tree_add_item(tree, hf_gsm_a_numbering_plan_id , tvb, curr_offset, 1, FALSE);
7246 oct = tvb_get_guint8(tvb, curr_offset);
7248 proto_tree_add_item(tree, hf_gsm_a_extension, tvb, curr_offset, 1, FALSE);
7250 switch ((oct & 0x60) >> 5)
7252 case 0: str = "Presentation allowed"; break;
7253 case 1: str = "Presentation restricted"; break;
7254 case 2: str = "Number not available due to interworking"; break;
7260 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
7261 proto_tree_add_text(tree,
7262 tvb, curr_offset, 1,
7263 "%s : Presentation indicator: %s",
7267 other_decode_bitfield_value(a_bigbuf, oct, 0x1c, 8);
7268 proto_tree_add_text(tree,
7269 tvb, curr_offset, 1,
7275 case 0: str = "User-provided, not screened"; break;
7276 case 1: str = "User-provided, verified and passed"; break;
7277 case 2: str = "User-provided, verified and failed"; break;
7279 str = "Network provided";
7283 other_decode_bitfield_value(a_bigbuf, oct, 0x03, 8);
7284 proto_tree_add_text(tree,
7285 tvb, curr_offset, 1,
7286 "%s : Screening indicator: %s",
7292 NO_MORE_DATA_CHECK(len);
7294 poctets = tvb_get_ephemeral_string(tvb, curr_offset, len - (curr_offset - offset));
7296 my_dgt_tbcd_unpack(a_bigbuf, poctets, len - (curr_offset - offset),
7299 proto_tree_add_string_format(tree, hf_gsm_a_clg_party_bcd_num,
7300 tvb, curr_offset, len - (curr_offset - offset),
7305 curr_offset += len - (curr_offset - offset);
7308 g_snprintf(add_string, string_len, " - (%s)", a_bigbuf);
7310 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
7312 return(curr_offset - offset);
7319 de_clg_party_sub_addr(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
7322 guint32 curr_offset;
7325 curr_offset = offset;
7327 oct = tvb_get_guint8(tvb, curr_offset);
7329 proto_tree_add_item(tree, hf_gsm_a_extension, tvb, curr_offset, 1, FALSE);
7331 switch ((oct & 0x70) >> 4)
7333 case 0: str = "NSAP (X.213/ISO 8348 AD2)"; break;
7334 case 2: str = "User specified"; break;
7340 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
7341 proto_tree_add_text(tree,
7342 tvb, curr_offset, 1,
7343 "%s : Type of subaddress: %s",
7347 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
7348 proto_tree_add_text(tree,
7349 tvb, curr_offset, 1,
7350 "%s : Odd/Even indicator: %s",
7353 "odd number of address signals" : "even number of address signals");
7355 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
7356 proto_tree_add_text(tree,
7357 tvb, curr_offset, 1,
7363 NO_MORE_DATA_CHECK(len);
7365 proto_tree_add_text(tree,
7366 tvb, curr_offset, len - (curr_offset - offset),
7367 "Subaddress information");
7369 curr_offset += len - (curr_offset - offset);
7371 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
7373 return(curr_offset - offset);
7380 de_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
7384 guint32 curr_offset;
7387 curr_offset = offset;
7389 oct = tvb_get_guint8(tvb, curr_offset);
7391 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
7392 proto_tree_add_text(tree,
7393 tvb, curr_offset, 1,
7394 "%s : Extension: %s",
7396 (oct & 0x80) ? "not extended" : "extended");
7398 switch ((oct & 0x60) >> 5)
7400 case 0: str = "Coding as specified in ITU-T Rec. Q.931"; break;
7401 case 1: str = "Reserved for other international standards"; break;
7402 case 2: str = "National standard"; break;
7404 str = "Standard defined for the GSM PLMNS";
7408 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
7409 proto_tree_add_text(tree,
7410 tvb, curr_offset, 1,
7411 "%s : Coding standard: %s",
7415 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
7416 proto_tree_add_text(tree,
7417 tvb, curr_offset, 1,
7423 case 0: str = "User"; break;
7424 case 1: str = "Private network serving the local user"; break;
7425 case 2: str = "Public network serving the local user"; break;
7426 case 3: str = "Transit network"; break;
7427 case 4: str = "Public network serving the remote user"; break;
7428 case 5: str = "Private network serving the remote user"; break;
7429 case 7: str = "International network"; break;
7430 case 10: str = "Network beyond interworking point"; break;
7436 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
7437 proto_tree_add_text(tree,
7438 tvb, curr_offset, 1,
7439 "%s : Location: %s",
7445 oct = tvb_get_guint8(tvb, curr_offset);
7449 proto_tree_add_item(tree, hf_gsm_a_extension, tvb, curr_offset, 1, FALSE);
7451 other_decode_bitfield_value(a_bigbuf, oct, 0x7f, 8);
7452 proto_tree_add_text(tree,
7453 tvb, curr_offset, 1,
7454 "%s : Recommendation",
7459 oct = tvb_get_guint8(tvb, curr_offset);
7462 proto_tree_add_item(tree, hf_gsm_a_extension, tvb, curr_offset, 1, FALSE);
7467 case 1: str = "Unassigned (unallocated) number"; break;
7468 case 3: str = "No route to destination"; break;
7469 case 6: str = "Channel unacceptable"; break;
7470 case 8: str = "Operator determined barring"; break;
7471 case 16: str = "Normal call clearing"; break;
7472 case 17: str = "User busy"; break;
7473 case 18: str = "No user responding"; break;
7474 case 19: str = "User alerting, no answer"; break;
7475 case 21: str = "Call rejected"; break;
7476 case 22: str = "Number changed"; break;
7477 case 25: str = "Pre-emption"; break;
7478 case 26: str = "Non selected user clearing"; break;
7479 case 27: str = "Destination out of order"; break;
7480 case 28: str = "Invalid number format (incomplete number)"; break;
7481 case 29: str = "Facility rejected"; break;
7482 case 30: str = "Response to STATUS ENQUIRY"; break;
7483 case 31: str = "Normal, unspecified"; break;
7484 case 34: str = "No circuit/channel available"; break;
7485 case 38: str = "Network out of order"; break;
7486 case 41: str = "Temporary failure"; break;
7487 case 42: str = "Switching equipment congestion"; break;
7488 case 43: str = "Access information discarded"; break;
7489 case 44: str = "requested circuit/channel not available"; break;
7490 case 47: str = "Resources unavailable, unspecified"; break;
7491 case 49: str = "Quality of service unavailable"; break;
7492 case 50: str = "Requested facility not subscribed"; break;
7493 case 55: str = "Incoming calls barred within the CUG"; break;
7494 case 57: str = "Bearer capability not authorized"; break;
7495 case 58: str = "Bearer capability not presently available"; break;
7496 case 63: str = "Service or option not available, unspecified"; break;
7497 case 65: str = "Bearer service not implemented"; break;
7498 case 68: str = "ACM equal to or greater than ACMmax"; break;
7499 case 69: str = "Requested facility not implemented"; break;
7500 case 70: str = "Only restricted digital information bearer capability is available"; break;
7501 case 79: str = "Service or option not implemented, unspecified"; break;
7502 case 81: str = "Invalid transaction identifier value"; break;
7503 case 87: str = "User not member of CUG"; break;
7504 case 88: str = "Incompatible destination"; break;
7505 case 91: str = "Invalid transit network selection"; break;
7506 case 95: str = "Semantically incorrect message"; break;
7507 case 96: str = "Invalid mandatory information"; break;
7508 case 97: str = "Message type non-existent or not implemented"; break;
7509 case 98: str = "Message type not compatible with protocol state"; break;
7510 case 99: str = "Information element non-existent or not implemented"; break;
7511 case 100: str = "Conditional IE error"; break;
7512 case 101: str = "Message not compatible with protocol state"; break;
7513 case 102: str = "Recovery on timer expiry"; break;
7514 case 111: str = "Protocol error, unspecified"; break;
7515 case 127: str = "Interworking, unspecified"; break;
7517 if (cause <= 31) { str = "Treat as Normal, unspecified"; }
7518 else if ((cause >= 32) && (cause <= 47)) { str = "Treat as Resources unavailable, unspecified"; }
7519 else if ((cause >= 48) && (cause <= 63)) { str = "Treat as Service or option not available, unspecified"; }
7520 else if ((cause >= 64) && (cause <= 79)) { str = "Treat as Service or option not implemented, unspecified"; }
7521 else if ((cause >= 80) && (cause <= 95)) { str = "Treat as Semantically incorrect message"; }
7522 else if ((cause >= 96) && (cause <= 111)) { str = "Treat as Protocol error, unspecified"; }
7523 else if ((cause >= 112) && (cause <= 127)) { str = "Treat as Interworking, unspecified"; }
7527 other_decode_bitfield_value(a_bigbuf, oct, 0x7f, 8);
7528 proto_tree_add_uint_format(tree, hf_gsm_a_dtap_cause,
7529 tvb, curr_offset, 1, cause,
7530 "%s : Cause: (%u) %s",
7538 g_snprintf(add_string, string_len, " - (%u) %s", cause, str);
7540 NO_MORE_DATA_CHECK(len);
7542 proto_tree_add_text(tree,
7543 tvb, curr_offset, len - (curr_offset - offset),
7546 curr_offset += len - (curr_offset - offset);
7548 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
7550 return(curr_offset - offset);
7554 * 10.5.4.18 Low layer compatibility
7557 de_llc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
7559 guint32 curr_offset;
7561 curr_offset = offset;
7563 dissect_q931_bearer_capability_ie(tvb, offset, len, tree);
7565 curr_offset = curr_offset + len;
7566 return(curr_offset - offset);
7575 de_facility(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint fac_len, gchar *add_string _U_, int string_len _U_)
7580 gboolean ind = FALSE;
7581 guint32 component_len = 0;
7582 guint32 header_end_offset;
7584 asn1_ctx_t asn1_ctx;
7585 tvbuff_t *SS_tvb = NULL;
7586 void *save_private_data;
7588 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, g_pinfo);
7591 save_private_data= g_pinfo->private_data;
7592 saved_offset = offset;
7593 g_pinfo->private_data = NULL;
7594 while ( fac_len > (offset - saved_offset)){
7596 /* Get the length of the component there can be more tnan one component in a facility message */
7598 header_end_offset = get_ber_identifier(tvb, offset, &class, &pc, &comp_type_tag);
7599 header_end_offset = get_ber_length(tvb, header_end_offset, &component_len, &ind);
7601 proto_tree_add_text(tree, tvb, offset+1, 1,
7602 "Indefinte length, ignoring component");
7605 header_len = header_end_offset - offset;
7606 component_len = header_len + component_len;
7608 dissect_ROS_Component(FALSE, tvb, offset, &asn1_ctx, tree, hf_ROS_component);
7609 TODO Call gsm map here
7611 SS_tvb = tvb_new_subset(tvb, offset, component_len, component_len);
7612 call_dissector(gsm_map_handle, SS_tvb, g_pinfo, tree);
7613 offset = offset + component_len;
7615 g_pinfo->private_data = save_private_data;
7625 de_keypad_facility(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
7628 guint32 curr_offset;
7631 curr_offset = offset;
7633 oct = tvb_get_guint8(tvb, curr_offset);
7635 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
7636 proto_tree_add_text(tree,
7637 tvb, curr_offset, 1,
7641 other_decode_bitfield_value(a_bigbuf, oct, 0x7f, 8);
7642 proto_tree_add_text(tree,
7643 tvb, curr_offset, 1,
7644 "%s : Keypad information: %c",
7651 g_snprintf(add_string, string_len, " - %c", oct & 0x7f);
7653 /* no length check possible */
7655 return(curr_offset - offset);
7662 de_prog_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
7665 guint32 curr_offset;
7669 curr_offset = offset;
7671 oct = tvb_get_guint8(tvb, curr_offset);
7673 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
7674 proto_tree_add_text(tree,
7675 tvb, curr_offset, 1,
7676 "%s : Extension: %s",
7678 (oct & 0x80) ? "extended" : "not extended");
7680 switch ((oct & 0x60) >> 5)
7682 case 0: str = "Coding as specified in ITU-T Rec. Q.931"; break;
7683 case 1: str = "Reserved for other international standards"; break;
7684 case 2: str = "National standard"; break;
7686 str = "Standard defined for the GSM PLMNS";
7690 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
7691 proto_tree_add_text(tree,
7692 tvb, curr_offset, 1,
7693 "%s : Coding standard: %s",
7697 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
7698 proto_tree_add_text(tree,
7699 tvb, curr_offset, 1,
7705 case 0: str = "User"; break;
7706 case 1: str = "Private network serving the local user"; break;
7707 case 2: str = "Public network serving the local user"; break;
7708 case 4: str = "Public network serving the remote user"; break;
7709 case 5: str = "Private network serving the remote user"; break;
7710 case 10: str = "Network beyond interworking point"; break;
7716 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
7717 proto_tree_add_text(tree,
7718 tvb, curr_offset, 1,
7719 "%s : Location: %s",
7725 oct = tvb_get_guint8(tvb, curr_offset);
7727 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
7728 proto_tree_add_text(tree,
7729 tvb, curr_offset, 1,
7730 "%s : Extension: %s",
7732 (oct & 0x80) ? "extended" : "not extended");
7736 case 1: str = "Call is not end-to-end PLMN/ISDN, further call progress information may be available in-band"; break;
7737 case 2: str = "Destination address in non-PLMN/ISDN"; break;
7738 case 3: str = "Origination address in non-PLMN/ISDN"; break;
7739 case 4: str = "Call has returned to the PLMN/ISDN"; break;
7740 case 8: str = "In-band information or appropriate pattern now available"; break;
7741 case 32: str = "Call is end-to-end PLMN/ISDN"; break;
7742 case 64: str = "Queueing"; break;
7748 other_decode_bitfield_value(a_bigbuf, oct, 0x7f, 8);
7749 proto_tree_add_text(tree,
7750 tvb, curr_offset, 1,
7751 "%s : Progress Description: %s (%d)",
7757 g_snprintf(add_string, string_len, " - %d", oct & 0x7f);
7761 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
7763 return(curr_offset - offset);
7770 de_repeat_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
7773 guint32 curr_offset;
7777 curr_offset = offset;
7779 oct = tvb_get_guint8(tvb, curr_offset);
7783 case 1: str = "Circular for successive selection 'mode 1 alternate mode 2'"; break;
7784 case 2: str = "Support of fallback mode 1 preferred, mode 2 selected if setup of mode 1 fails"; break;
7785 case 3: str = "Reserved: was allocated in earlier phases of the protocol"; break;
7791 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
7792 proto_tree_add_text(tree,
7793 tvb, curr_offset, 1,
7800 /* no length check possible */
7802 return(curr_offset - offset);
7809 de_ss_ver_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
7812 guint32 curr_offset;
7815 curr_offset = offset;
7817 oct = tvb_get_guint8(tvb, curr_offset);
7821 case 0: str = "Phase 2 service, ellipsis notation, and phase 2 error handling is supported"; break;
7822 case 1: str = "SS-Protocol version 3 is supported, and phase 2 error handling is supported"; break;
7828 proto_tree_add_text(tree,
7829 tvb, curr_offset, 1,
7835 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
7837 return(curr_offset - offset);
7841 * [5] 8.1.4.1 3GPP TS 24.011 version 6.1.0 Release 6
7844 de_cp_user_data(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
7846 guint32 curr_offset;
7849 curr_offset = offset;
7851 proto_tree_add_text(tree, tvb, curr_offset, len,
7852 "RPDU (not displayed)");
7855 * dissect the embedded RP message
7857 rp_tvb = tvb_new_subset(tvb, curr_offset, len, len);
7859 call_dissector(rp_handle, rp_tvb, g_pinfo, g_tree);
7863 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
7865 return(curr_offset - offset);
7872 de_cp_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
7875 guint32 curr_offset;
7879 curr_offset = offset;
7881 oct = tvb_get_guint8(tvb, curr_offset);
7885 case 17: str = "Network failure"; break;
7886 case 22: str = "Congestion"; break;
7887 case 81: str = "Invalid Transaction Identifier value"; break;
7888 case 95: str = "Semantically incorrect message"; break;
7889 case 96: str = "Invalid mandatory information"; break;
7890 case 97: str = "Message type non-existent or not implemented"; break;
7891 case 98: str = "Message not compatible with the short message protocol state"; break;
7892 case 99: str = "Information element non-existent or not implemented"; break;
7893 case 111: str = "Protocol error, unspecified"; break;
7895 str = "Reserved, treat as Protocol error, unspecified";
7899 proto_tree_add_text(tree,
7900 tvb, curr_offset, 1,
7908 g_snprintf(add_string, string_len, " - (%u) %s", oct, str);
7910 /* no length check possible */
7912 return(curr_offset - offset);
7919 de_rp_message_ref(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
7922 guint32 curr_offset;
7925 curr_offset = offset;
7927 oct = tvb_get_guint8(tvb, curr_offset);
7929 proto_tree_add_text(tree,
7930 tvb, curr_offset, 1,
7931 "RP-Message Reference: 0x%02x (%u)",
7937 /* no length check possible */
7939 return(curr_offset - offset);
7946 de_rp_orig_addr(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
7948 return(de_cld_party_bcd_num(tvb, tree, offset, len, add_string, string_len));
7955 de_rp_dest_addr(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
7957 return(de_cld_party_bcd_num(tvb, tree, offset, len, add_string, string_len));
7964 de_rp_user_data(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
7966 guint32 curr_offset;
7969 curr_offset = offset;
7971 proto_tree_add_text(tree, tvb, curr_offset, len,
7972 "TPDU (not displayed)");
7975 * dissect the embedded TPDU message
7977 tpdu_tvb = tvb_new_subset(tvb, curr_offset, len, len);
7979 dissector_try_port(sms_dissector_table, 0, tpdu_tvb, g_pinfo, g_tree);
7983 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
7985 return(curr_offset - offset);
7992 de_rp_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
7995 guint32 curr_offset;
7998 curr_offset = offset;
8000 oct = tvb_get_guint8(tvb, curr_offset);
8002 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
8003 proto_tree_add_text(tree,
8004 tvb, curr_offset, 1,
8005 "%s : Extension: %s",
8007 (oct & 0x80) ? "extended" : "not extended");
8011 case 1: str = "Unassigned (unallocated) number"; break;
8012 case 8: str = "Operator determined barring"; break;
8013 case 10: str = "Call barred"; break;
8014 case 11: str = "Reserved"; break;
8015 case 21: str = "Short message transfer rejected"; break;
8016 case 22: str = "Memory capacity exceeded"; break;
8017 case 27: str = "Destination out of order"; break;
8018 case 28: str = "Unidentified subscriber"; break;
8019 case 29: str = "Facility rejected"; break;
8020 case 30: str = "Unknown subscriber"; break;
8021 case 38: str = "Network out of order"; break;
8022 case 41: str = "Temporary failure"; break;
8023 case 42: str = "Congestion"; break;
8024 case 47: str = "Resources unavailable, unspecified"; break;
8025 case 50: str = "Requested facility not subscribed"; break;
8026 case 69: str = "Requested facility not implemented"; break;
8027 case 81: str = "Invalid short message transfer reference value"; break;
8028 case 95: str = "Semantically incorrect message"; break;
8029 case 96: str = "Invalid mandatory information"; break;
8030 case 97: str = "Message type non-existent or not implemented"; break;
8031 case 98: str = "Message not compatible with short message protocol state"; break;
8032 case 99: str = "Information element non-existent or not implemented"; break;
8033 case 111: str = "Protocol error, unspecified"; break;
8034 case 127: str = "Interworking, unspecified"; break;
8040 other_decode_bitfield_value(a_bigbuf, oct, 0x7f, 8);
8041 proto_tree_add_text(tree,
8042 tvb, curr_offset, 1,
8043 "%s : Cause: (%u) %s",
8051 g_snprintf(add_string, string_len, " - (%u) %s", oct & 0x7f, str);
8053 NO_MORE_DATA_CHECK(len);
8055 proto_tree_add_text(tree,
8056 tvb, curr_offset, len - (curr_offset - offset),
8057 "Diagnostic field");
8059 curr_offset += len - (curr_offset - offset);
8061 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
8063 return(curr_offset - offset);
8070 de_gmm_attach_res(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
8073 guint32 curr_offset;
8077 curr_offset = offset;
8079 oct = tvb_get_guint8(tvb, curr_offset);
8083 case 1: str="GPRS only attached"; break;
8084 case 3: str="Combined GPRS/IMSI attached"; break;
8085 default: str="reserved";
8088 proto_tree_add_text(tree,
8089 tvb, curr_offset, 1,
8090 "Attach Result: (%u) %s",
8096 /* no length check possible */
8098 return(curr_offset - offset);
8105 de_gmm_attach_type(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
8109 guint32 curr_offset;
8110 const gchar *str_follow;
8111 const gchar *str_attach;
8112 proto_item *tf = NULL;
8113 proto_tree *tf_tree = NULL;
8116 curr_offset = offset;
8118 oct = tvb_get_guint8(tvb, curr_offset);
8125 case 1: str_attach="GPRS attach"; break;
8126 case 2: str_attach="GPRS attach while IMSI attached"; break;
8127 case 3: str_attach="Combined GPRS/IMSI attach"; break;
8128 default: str_attach="reserved";
8132 case 8: str_follow="Follow-on request pending"; break;
8133 default: str_follow="No follow-on request pending";
8136 tf = proto_tree_add_text(tree,
8137 tvb, curr_offset, 1,
8140 tf_tree = proto_item_add_subtree(tf, ett_gmm_attach_type );
8142 proto_tree_add_text(tf_tree,
8143 tvb, curr_offset, 1,
8147 proto_tree_add_text(tf_tree,
8148 tvb, curr_offset, 1,
8153 /* The ciphering key sequence number is added here */
8154 proto_tree_add_text(tree,
8155 tvb, curr_offset, 1,
8156 "Ciphering key sequence number: 0x%02x (%u)",
8162 /* no length check possible */
8164 return(curr_offset - offset);
8171 de_gmm_ciph_alg(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
8174 guint32 curr_offset;
8178 curr_offset = offset;
8180 oct = tvb_get_guint8(tvb, curr_offset);
8184 case 0: str="ciphering not used"; break;
8185 case 1: str="GPRS Encryption Algorithm GEA/1"; break;
8186 case 2: str="GPRS Encryption Algorithm GEA/2"; break;
8187 case 3: str="GPRS Encryption Algorithm GEA/3"; break;
8188 case 4: str="GPRS Encryption Algorithm GEA/4"; break;
8189 case 5: str="GPRS Encryption Algorithm GEA/5"; break;
8190 case 6: str="GPRS Encryption Algorithm GEA/6"; break;
8191 case 7: str="GPRS Encryption Algorithm GEA/7"; break;
8192 default: str="This should never happen";
8195 proto_tree_add_text(tree,
8196 tvb, curr_offset, 1,
8197 "Ciphering Algorithm: (%u) %s",
8203 /* no length check possible */
8205 return(curr_offset - offset);
8212 de_gmm_tmsi_stat(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
8215 guint32 curr_offset;
8219 curr_offset = offset;
8221 oct = tvb_get_guint8(tvb, curr_offset);
8225 case 0: str="no valid TMSI available"; break;
8226 case 1: str="valid TMSI available"; break;
8227 default: str="This should never happen";
8230 proto_tree_add_text(tree,
8231 tvb, curr_offset, 1,
8232 "TMSI Status: (%u) %s",
8236 /* curr_offset++; - It is encoded in the octed before */
8238 /* no length check possible */
8240 return(curr_offset - offset);
8247 de_gmm_detach_type(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
8250 guint32 curr_offset;
8252 const gchar *str_power;
8253 proto_item *tf = NULL;
8254 proto_tree *tf_tree = NULL;
8257 curr_offset = offset;
8259 oct = tvb_get_guint8(tvb, curr_offset);
8263 case 1: str="GPRS detach/re-attach required"; break;
8264 case 2: str="IMSI detach/re-attach not required"; break;
8265 case 3: str="Combined GPRS/IMSI detach/IMSI detach (after VLR failure)"; break;
8266 default: str="Combined GPRS/IMSI detach/re-attach not required";
8271 case 8: str_power="power switched off"; break;
8272 default: str_power="normal detach"; break;
8275 tf = proto_tree_add_text(tree,
8276 tvb, curr_offset, 1,
8279 tf_tree = proto_item_add_subtree(tf, ett_gmm_detach_type );
8281 proto_tree_add_text(tf_tree,
8282 tvb, curr_offset, 1,
8287 proto_tree_add_text(tf_tree,
8288 tvb, curr_offset, 1,
8295 /* no length check possible */
8297 return(curr_offset - offset);
8303 * SPLIT on CCCH, octet 3 (bit 4)
8304 * 0 Split pg cycle on CCCH is not supported by the mobile station
8305 * 1 Split pg cycle on CCCH is supported by the mobile station
8307 static const true_false_string gsm_a_gmm_split_on_ccch_value = {
8308 "Split pg cycle on CCCH is supported by the mobile station",
8309 "Split pg cycle on CCCH is not supported by the mobile station"
8312 /* non-DRX timer, octet 3
8316 static const value_string gsm_a_gmm_non_drx_timer_strings[] = {
8317 { 0x00, "no non-DRX mode after transfer state" },
8318 { 0x01, "max. 1 sec non-DRX mode after transfer state" },
8319 { 0x02, "max. 2 sec non-DRX mode after transfer state" },
8320 { 0x03, "max. 4 sec non-DRX mode after transfer state" },
8321 { 0x04, "max. 8 sec non-DRX mode after transfer state" },
8322 { 0x05, "max. 16 sec non-DRX mode after transfer state" },
8323 { 0x06, "max. 32 sec non-DRX mode after transfer state" },
8324 { 0x07, "max. 64 sec non-DRX mode after transfer state" },
8328 * CN Specific DRX cycle length coefficient, octet 3
8330 * 8 7 6 5 Iu mode specific
8331 * 0 0 0 0 CN Specific DRX cycle length coefficient not specified by the MS, ie. the
8332 * system information value 'CN domain specific DRX cycle length' is used.
8333 * (Ref 3GPP TS 25.331)
8334 * 0 1 1 0 CN Specific DRX cycle length coefficient 6
8335 * 0 1 1 1 CN Specific DRX cycle length coefficient 7
8336 * 1 0 0 0 CN Specific DRX cycle length coefficient 8
8337 * 1 0 0 1 CN Specific DRX cycle length coefficient 9
8338 * All other values shall be interpreted as "CN Specific DRX cycle length coefficient not
8339 * specified by the MS " by this version of the protocol.
8340 * NOTE: In Iu mode this field (octet 3 bits 8 to 5) is used, but was spare in earlier
8341 * versions of this protocol.
8343 static const value_string gsm_a_gmm_cn_spec_drs_cycle_len_coef_strings[] = {
8344 { 0x00, "CN Specific DRX cycle length coefficient not specified by the MS" },
8345 { 0x01, "CN Specific DRX cycle length coefficient not specified by the MS" },
8346 { 0x02, "CN Specific DRX cycle length coefficient not specified by the MS" },
8347 { 0x03, "CN Specific DRX cycle length coefficient not specified by the MS" },
8348 { 0x04, "CN Specific DRX cycle length coefficient not specified by the MS" },
8349 { 0x05, "CN Specific DRX cycle length coefficient not specified by the MS" },
8350 { 0x06, "CN Specific DRX cycle length coefficient 6" },
8351 { 0x07, "CN Specific DRX cycle length coefficient 7" },
8352 { 0x08, "CN Specific DRX cycle length coefficient 8" },
8353 { 0x09, "CN Specific DRX cycle length coefficient 9" },
8354 { 0x0a, "CN Specific DRX cycle length coefficient not specified by the MS" },
8355 { 0x0b, "CN Specific DRX cycle length coefficient not specified by the MS" },
8356 { 0x0c, "CN Specific DRX cycle length coefficient not specified by the MS" },
8357 { 0x0d, "CN Specific DRX cycle length coefficient not specified by the MS" },
8358 { 0x0e, "CN Specific DRX cycle length coefficient not specified by the MS" },
8359 { 0x0f, "CN Specific DRX cycle length coefficient not specified by the MS" },
8363 de_gmm_drx_param(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
8366 guint32 curr_offset;
8369 proto_item *tf = NULL;
8370 proto_tree *tf_tree = NULL;
8373 curr_offset = offset;
8375 tf = proto_tree_add_text(tree,
8376 tvb, curr_offset, 2,
8379 tf_tree = proto_item_add_subtree(tf, ett_gmm_drx );
8381 oct = tvb_get_guint8(tvb, curr_offset);
8385 case 0: str="704"; break;
8386 case 65: str="71"; break;
8387 case 66: str="72"; break;
8388 case 67: str="74"; break;
8389 case 68: str="75"; break;
8390 case 69: str="77"; break;
8391 case 70: str="79"; break;
8392 case 71: str="80"; break;
8393 case 72: str="83"; break;
8394 case 73: str="86"; break;
8395 case 74: str="88"; break;
8396 case 75: str="90"; break;
8397 case 76: str="92"; break;
8398 case 77: str="96"; break;
8399 case 78: str="101"; break;
8400 case 79: str="103"; break;
8401 case 80: str="107"; break;
8402 case 81: str="112"; break;
8403 case 82: str="116"; break;
8404 case 83: str="118"; break;
8405 case 84: str="128"; break;
8406 case 85: str="141"; break;
8407 case 86: str="144"; break;
8408 case 87: str="150"; break;
8409 case 88: str="160"; break;
8410 case 89: str="171"; break;
8411 case 90: str="176"; break;
8412 case 91: str="192"; break;
8413 case 92: str="214"; break;
8414 case 93: str="224"; break;
8415 case 94: str="235"; break;
8416 case 95: str="256"; break;
8417 case 96: str="288"; break;
8418 case 97: str="320"; break;
8419 case 98: str="352"; break;
8421 str_val[0]=oct/10+'0';
8422 str_val[1]=oct%10+'0';
8427 proto_tree_add_text(tf_tree,
8428 tvb, curr_offset, 1,
8429 "Split PG Cycle Code: (%u) %s",
8434 proto_tree_add_item(tf_tree, hf_gsm_a_gmm_cn_spec_drs_cycle_len_coef, tvb, curr_offset, 1, FALSE);
8435 proto_tree_add_item(tf_tree, hf_gsm_a_gmm_split_on_ccch, tvb, curr_offset, 1, FALSE);
8436 proto_tree_add_item(tf_tree, hf_gsm_a_gmm_non_drx_timer, tvb, curr_offset, 1, FALSE);
8440 /* no length check possible */
8442 return(curr_offset - offset);
8449 de_gmm_ftostby(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
8452 guint32 curr_offset;
8456 curr_offset = offset;
8458 oct = tvb_get_guint8(tvb, curr_offset);
8462 case 1: str="Force to standby indicated"; break;
8463 default: str="force to standby not indicated";
8466 proto_tree_add_text(tree,
8467 tvb, curr_offset, 1,
8468 "Force to Standby: (%u) %s",
8474 /* no length check possible */
8476 return(curr_offset - offset);
8483 de_gmm_ftostby_h(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
8486 guint32 curr_offset;
8490 curr_offset = offset;
8492 oct = tvb_get_guint8(tvb, curr_offset);
8494 /* IMPORTANT - IT'S ASSUMED THAT THE INFORMATION IS IN THE HIGHER NIBBLE */
8499 case 1: str="Force to standby indicated"; break;
8500 default: str="force to standby not indicated";
8503 proto_tree_add_text(tree,
8504 tvb, curr_offset, 1,
8505 "Force to Standby: (%u) %s",
8511 /* no length check possible */
8513 return(curr_offset - offset);
8520 de_gmm_ptmsi_sig(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
8522 guint32 curr_offset;
8523 proto_item *curr_item;
8524 curr_offset = offset;
8525 curr_item= proto_tree_add_item(tree,hf_gsm_a_ptmsi_sig,tvb,curr_offset,3,FALSE);
8526 proto_item_append_text(curr_item,"%s",add_string ? add_string : "");
8530 /* no length check possible */
8532 return(curr_offset - offset);
8539 de_gmm_ptmsi_sig2(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len _U_)
8541 guint32 curr_offset;
8542 proto_item *curr_item;
8543 curr_offset = offset;
8545 curr_item= proto_tree_add_item(tree,hf_gsm_a_ptmsi_sig2,tvb,curr_offset,3,FALSE);
8546 proto_item_append_text(curr_item,"%s",add_string ? add_string : "");
8549 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
8551 return(curr_offset - offset);
8558 de_gmm_ident_type2(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
8561 guint32 curr_offset;
8565 curr_offset = offset;
8567 oct = tvb_get_guint8(tvb, curr_offset);
8571 case 2: str="IMEI"; break;
8572 case 3: str="IMEISV"; break;
8573 case 4: str="TMSI"; break;
8574 default: str="IMSI";
8577 proto_tree_add_text(tree,
8578 tvb, curr_offset, 1,
8579 "Identity Type 2: (%u) %s",
8585 /* no length check possible */
8587 return(curr_offset - offset);
8594 de_gmm_imeisv_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
8597 guint32 curr_offset;
8601 curr_offset = offset;
8603 oct = tvb_get_guint8(tvb, curr_offset);
8605 /* IMPORTANT - IT'S ASSUMED THAT THE INFORMATION IS IN THE HIGHER NIBBLE */
8610 case 1: str="IMEISV requested"; break;
8611 default: str="IMEISV not requested";
8614 proto_tree_add_text(tree,
8615 tvb, curr_offset, 1,
8616 "IMEISV Request: (%u) %s",
8622 /* no length check possible */
8624 return(curr_offset - offset);
8631 de_gmm_rec_npdu_lst(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
8633 guint32 curr_offset;
8637 curr_offset = offset;
8639 if ( len == 0 ) return 0;
8644 oct = tvb_get_guint8(tvb, curr_offset);
8646 oct |= tvb_get_guint8(tvb, curr_offset+1);
8650 proto_tree_add_text(tree,
8651 tvb, curr_offset, 2,
8652 "NSAPI %d: 0x%02x (%u)",
8660 oct |= tvb_get_guint8(tvb, curr_offset+2);
8664 proto_tree_add_text(tree,
8665 tvb, curr_offset-1, 2,
8666 "NSAPI %d: 0x%02x (%u)",
8674 } while ( curr_len > 1 );
8676 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
8678 return(curr_offset - offset);
8685 de_gmm_ms_net_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
8688 guint32 curr_offset;
8692 gchar answer_gea[2][40]={ "encryption algorithm not available",
8693 "encryption algorithm available" };
8694 gchar answer_smdch[2][120]={ "Mobile station does not support mobile terminated point to point SMS via dedicated signalling channels",
8695 "Mobile station supports mobile terminated point to point SMS via dedicated signalling channels" };
8696 gchar answer_smgprs[2][100]={ "Mobile station does not support mobile terminated point to point SMS via GPRS packet data channels",
8697 "Mobile station supports mobile terminated point to point SMS via GPRS packet data channels" };
8698 gchar answer_ucs2[2][100]={ "the ME has a preference for the default alphabet (defined in 3GPP TS 23.038 [8b]) over UCS2",
8699 "the ME has no preference between the use of the default alphabet and the use of UCS2" };
8701 gchar answer_ssid[4][80]={ "default value of phase 1",
8702 "capability of handling of ellipsis notation and phase 2 error handling",
8703 "capability of handling of ellipsis notation and phase 2 error handling",
8704 "capability of handling of ellipsis notation and phase 2 error handling" };
8706 gchar answer_solsa[2][40]={ "The ME does not support SoLSA",
8707 "The ME supports SoLSA" };
8709 gchar answer_rev[2][80]={ "used by a mobile station not supporting R99 or later versions of the protocol",
8710 "used by a mobile station supporting R99 or later versions of the protocol" };
8712 gchar answer_pfc[2][80]={ "Mobile station does not support BSS packet flow procedures",
8713 "Mobile station does support BSS packet flow procedures" };
8715 gchar answer_lcs[2][80]={ "LCS value added location request notification capability not supported" ,
8716 "LCS value added location request notification capability supported" };
8719 curr_offset = offset;
8721 if ( curr_len == 0 ){ EXTRANEOUS_DATA_CHECK(len, curr_offset - offset); return(curr_offset - offset); }
8722 oct = tvb_get_guint8(tvb, curr_offset);
8726 proto_tree_add_text(tree,
8727 tvb, curr_offset, 1,
8730 answer_gea[oct>>7]);
8734 proto_tree_add_text(tree,
8735 tvb, curr_offset, 1,
8736 "SM capabilities via dedicated channels: (%u) %s",
8738 answer_smdch[oct>>7]);
8742 proto_tree_add_text(tree,
8743 tvb, curr_offset, 1,
8744 "SM capabilities via GPRS channels: (%u) %s",
8746 answer_smgprs[oct>>7]);
8750 proto_tree_add_text(tree,
8751 tvb, curr_offset, 1,
8752 "UCS2 support: (%u) %s",
8754 answer_ucs2[oct>>7]);
8758 proto_tree_add_text(tree,
8759 tvb, curr_offset, 1,
8760 "SS Screening Indicator: (%u) %s",
8762 answer_ssid[oct>>6]);
8766 proto_tree_add_text(tree,
8767 tvb, curr_offset, 1,
8768 "SoLSA Capability: (%u) %s",
8770 answer_solsa[oct>>7]);
8774 proto_tree_add_text(tree,
8775 tvb, curr_offset, 1,
8776 "Revision level indicator: (%u) %s",
8778 answer_rev[oct>>7]);
8782 if ( curr_len == 0 ){ EXTRANEOUS_DATA_CHECK(len, curr_offset - offset); return(curr_offset - offset); }
8783 oct = tvb_get_guint8(tvb, curr_offset);
8786 proto_tree_add_text(tree,
8787 tvb, curr_offset, 1,
8788 "PFC feature mode: (%u) %s",
8790 answer_pfc[oct>>7]);
8793 for( gea_val=2; gea_val<8 ; gea_val++ )
8795 proto_tree_add_text(tree,
8796 tvb, curr_offset, 1,
8797 "GEA%d: (%u) %s", gea_val,
8799 answer_gea[oct>>7]);
8803 proto_tree_add_text(tree,
8804 tvb, curr_offset, 1,
8805 "LCS VA capability:: (%u) %s",
8807 answer_lcs[oct>>7]);
8811 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
8813 return(curr_offset - offset);
8819 #define GET_DATA /* check if we have enough bits left */ \
8820 if ( curr_bits_length < bits_needed ) \
8822 /* check if oct has enougth bits */ \
8823 if ( bits_in_oct < bits_needed ) \
8826 if ( curr_len == 0 ) \
8828 proto_tree_add_text(tf_tree, \
8829 tvb, curr_offset, 1, \
8830 "Not enough data available"); \
8832 tmp_oct = tvb_get_guint8(tvb, curr_offset); \
8833 oct |= tmp_oct<<(32-8-bits_in_oct); \
8836 if ( bits_in_oct != 0 ) \
8847 de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
8849 guint32 curr_offset;
8851 proto_item *tf = NULL;
8852 proto_tree *tf_tree = NULL;
8857 guint add_ocetets; /* octets which are covered by one element -1 */
8858 guint curr_bits_length;
8861 gchar multi_slot_str[64][230] = {
8862 "Not specified", /* 00 */
8863 "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 */
8864 "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 */
8865 "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 */
8866 "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 */
8867 "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 */
8868 "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 */
8869 "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 */
8870 "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 */
8871 "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 */
8872 "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 */
8873 "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 */
8874 "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 */
8875 "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 */
8876 "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 */
8877 "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 */
8878 "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 */
8879 "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 */
8880 "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 */
8881 "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 */
8882 "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 */
8883 "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 */
8884 "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 */
8885 "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 */
8886 "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 */
8887 "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 */
8888 "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 */
8889 "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 */
8890 "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 */
8891 "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 */
8892 "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 */
8893 "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 */
8894 "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 */
8895 "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 */
8896 "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 */
8897 "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 */
8898 "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 */
8899 "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 */
8900 "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 */
8901 "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 */
8902 "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 */
8903 "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 */
8904 "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 */
8905 "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 */
8906 "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 */
8907 "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 */
8908 "Not specified", /* 46 */
8909 "Not specified", /* 47 */
8910 "Not specified", /* 48 */
8911 "Not specified", /* 49 */
8912 "Not specified", /* 50 */
8913 "Not specified", /* 51 */
8914 "Not specified", /* 52 */
8915 "Not specified", /* 53 */
8916 "Not specified", /* 54 */
8917 "Not specified", /* 55 */
8918 "Not specified", /* 56 */
8919 "Not specified", /* 57 */
8920 "Not specified", /* 58 */
8921 "Not specified", /* 59 */
8922 "Not specified", /* 60 */
8923 "Not specified", /* 61 */
8924 "Not specified", /* 62 */
8925 "Not specified", /* 63 */
8928 guchar dtm_gprs_mslot = 0;
8929 guchar dtm_egprs_mslot = 4;
8930 gboolean finished = TRUE;
8933 curr_offset = offset;
8940 /* check for a new round */
8941 if (( curr_len*8 + bits_in_oct ) < 11 )
8944 /* now read the first 11 bits */
8945 curr_bits_length = 11;
8949 if ( curr_len != len )
8954 if (( oct>>(32-bits_needed) ) == 1 )
8956 curr_bits_length -= bits_needed;
8957 oct <<= bits_needed;
8958 bits_in_oct -= bits_needed;
8960 if (( curr_len*8 + bits_in_oct ) < 11 )
8962 curr_bits_length = 11;
8966 curr_bits_length -= bits_needed;
8967 oct <<= bits_needed;
8968 bits_in_oct -= bits_needed;
8974 tf = proto_tree_add_text(tree,
8975 tvb, curr_offset, 1,
8976 "MS RA capability %d",index);
8978 tf_tree = proto_item_add_subtree(tf, ett_gmm_radio_cap );
8986 acc_type = oct>>(32-bits_needed);
8989 case 0x00: str="GSM P"; break;
8990 case 0x01: str="GSM E --note that GSM E covers GSM P"; break;
8991 case 0x02: str="GSM R --note that GSM R covers GSM E and GSM P"; break;
8992 case 0x03: str="GSM 1800"; break;
8993 case 0x04: str="GSM 1900"; break;
8994 case 0x05: str="GSM 450"; break;
8995 case 0x06: str="GSM 480"; break;
8996 case 0x07: str="GSM 850"; break;
8997 case 0x08: str="GSM 700"; break;
8998 case 0x0f: str="Indicates the presence of a list of Additional access technologies"; break;
8999 default: str="unknown";
9002 proto_tree_add_text(tf_tree,
9003 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9004 "Access Technology Type: (%u) %s",acc_type,str);
9005 curr_bits_length -= bits_needed;
9006 oct <<= bits_needed;
9007 bits_in_oct -= bits_needed;
9015 bits_length = curr_bits_length = oct>>(32-bits_needed);
9016 proto_tree_add_text(tf_tree,
9017 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9018 "Length: 0x%02x bits (%u)",bits_length,bits_length);
9019 /* This is already done - length doesn't contain this field
9020 curr_bits_length -= bits_needed;
9022 oct <<= bits_needed;
9023 bits_in_oct -= bits_needed;
9025 if ( acc_type == 0x0f )
9030 * Additional access technologies:
9032 finished = TRUE; /* Break out of the loop unless proven unfinished */
9041 switch ( oct>>(32-bits_needed) )
9043 case 0x00: str="Not Present"; finished = TRUE; break;
9044 case 0x01: str="Present"; finished = FALSE; break;
9045 default: str="This should not happen";
9048 proto_tree_add_text(tf_tree,
9049 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9050 "Presence: (%u) %s",oct>>(32-bits_needed),str);
9051 curr_bits_length -= bits_needed;
9052 oct <<= bits_needed;
9053 bits_in_oct -= bits_needed;
9058 * No more valid data, get spare bits if any
9060 while ( curr_bits_length > 0 )
9062 if ( curr_bits_length > 8 )
9065 bits_needed = curr_bits_length;
9067 curr_bits_length -= bits_needed;
9068 oct <<= bits_needed;
9069 bits_in_oct -= bits_needed;
9080 acc_type = oct>>(32-bits_needed);
9083 case 0x00: str="GSM P"; break;
9084 case 0x01: str="GSM E --note that GSM E covers GSM P"; break;
9085 case 0x02: str="GSM R --note that GSM R covers GSM E and GSM P"; break;
9086 case 0x03: str="GSM 1800"; break;
9087 case 0x04: str="GSM 1900"; break;
9088 case 0x05: str="GSM 450"; break;
9089 case 0x06: str="GSM 480"; break;
9090 case 0x07: str="GSM 850"; break;
9091 case 0x08: str="GSM 700"; break;
9092 case 0x0f: str="Indicates the presence of a list of Additional access technologies"; break;
9093 default: str="unknown";
9096 proto_tree_add_text(tf_tree,
9097 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9098 "Access Technology Type: (%u) %s",acc_type,str);
9099 curr_bits_length -= bits_needed;
9100 oct <<= bits_needed;
9101 bits_in_oct -= bits_needed;
9110 if ( acc_type == 0x04 ) /* GSM 1900 */
9112 switch ( oct>>(32-bits_needed) )
9114 case 0x01: str="1 W (30 dBm)"; break;
9115 case 0x02: str="0,25 W (24 dBm)"; break;
9116 case 0x03: str="2 W (33 dBm)"; break;
9117 default: str="Not specified";
9120 else if ( acc_type == 0x03 )
9122 switch ( oct>>(32-bits_needed) )
9124 case 0x01: str="1 W (30 dBm)"; break;
9125 case 0x02: str="0,25 W (24 dBm)"; break;
9126 case 0x03: str="4 W (36 dBm)"; break;
9127 default: str="Not specified";
9130 else if ( acc_type <= 0x08 )
9132 switch ( oct>>(32-bits_needed) )
9134 case 0x02: str="8 W (39 dBm)"; break;
9135 case 0x03: str="5 W (37 dBm)"; break;
9136 case 0x04: str="2 W (33 dBm)"; break;
9137 case 0x05: str="0,8 W (29 dBm)"; break;
9138 default: str="Not specified";
9142 str="Not specified??";
9144 proto_tree_add_text(tf_tree,
9145 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9146 "RF Power Capability, GMSK Power Class: (%u) %s",oct>>(32-bits_needed),str);
9147 curr_bits_length -= bits_needed;
9148 oct <<= bits_needed;
9149 bits_in_oct -= bits_needed;
9158 switch ( oct>>(32-bits_needed) )
9160 case 0x00: str="8PSK modulation not supported for uplink"; break;
9161 case 0x01: str="Power class E1"; break;
9162 case 0x02: str="Power class E2"; break;
9163 case 0x03: str="Power class E3"; break;
9164 default: str="This should not happen";
9167 proto_tree_add_text(tf_tree,
9168 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9169 "8PSK Power Class: (%u) %s",oct>>(32-bits_needed),str);
9170 curr_bits_length -= bits_needed;
9171 oct <<= bits_needed;
9172 bits_in_oct -= bits_needed;
9174 } while (!finished);
9186 if ( acc_type == 0x04 ) /* GSM 1900 */
9188 switch ( oct>>(32-bits_needed) )
9190 case 0x01: str="1 W (30 dBm)"; break;
9191 case 0x02: str="0,25 W (24 dBm)"; break;
9192 case 0x03: str="2 W (33 dBm)"; break;
9193 default: str="Not specified";
9196 else if ( acc_type == 0x03 )
9198 switch ( oct>>(32-bits_needed) )
9200 case 0x01: str="1 W (30 dBm)"; break;
9201 case 0x02: str="0,25 W (24 dBm)"; break;
9202 case 0x03: str="4 W (36 dBm)"; break;
9203 default: str="Not specified";
9206 else if ( acc_type <= 0x08 )
9208 switch ( oct>>(32-bits_needed) )
9210 case 0x02: str="8 W (39 dBm)"; break;
9211 case 0x03: str="5 W (37 dBm)"; break;
9212 case 0x04: str="2 W (33 dBm)"; break;
9213 case 0x05: str="0,8 W (29 dBm)"; break;
9214 default: str="Not specified";
9218 str="Not specified??";
9220 proto_tree_add_text(tf_tree,
9221 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9222 "RF Power Capability, GMSK Power Class: (%u) %s",oct>>(32-bits_needed),str);
9223 curr_bits_length -= bits_needed;
9224 oct <<= bits_needed;
9225 bits_in_oct -= bits_needed;
9234 if ((oct>>(32-bits_needed))==0)
9236 proto_tree_add_text(tf_tree,
9237 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9238 "A5 Bits: (%u) same values apply for parameters as in the immediately preceding Access capabilities field within this IE",oct>>(32-bits_needed));
9239 curr_bits_length -= bits_needed;
9240 oct <<= bits_needed;
9241 bits_in_oct -= bits_needed;
9247 proto_tree_add_text(tf_tree,
9248 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9249 "A5 Bits: (%u) A5 bits follows",oct>>(32-bits_needed));
9251 curr_bits_length -= bits_needed;
9252 oct <<= bits_needed;
9253 bits_in_oct -= bits_needed;
9255 for (i=1; i<= 7 ; i++ )
9264 switch ( oct>>(32-bits_needed) )
9266 case 0x00: str="encryption algorithm not available"; break;
9267 case 0x01: str="encryption algorithm available"; break;
9268 default: str="This should not happen";
9271 proto_tree_add_text(tf_tree,
9272 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9273 "A5/%d: (%u) %s",i,oct>>(32-bits_needed),str);
9274 curr_bits_length -= bits_needed;
9275 oct <<= bits_needed;
9276 bits_in_oct -= bits_needed;
9287 switch ( oct>>(32-bits_needed) )
9289 case 0x00: str="controlled early Classmark Sending option is not implemented"; break;
9290 case 0x01: str="controlled early Classmark Sending option is implemented"; break;
9291 default: str="This should not happen";
9294 proto_tree_add_text(tf_tree,
9295 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9296 "Controlled early Classmark Sending: (%u) %s",oct>>(32-bits_needed),str);
9297 curr_bits_length -= bits_needed;
9298 oct <<= bits_needed;
9299 bits_in_oct -= bits_needed;
9308 switch ( oct>>(32-bits_needed) )
9310 case 0x00: str="PS capability not present"; break;
9311 case 0x01: str="PS capability present"; break;
9312 default: str="This should not happen";
9315 proto_tree_add_text(tf_tree,
9316 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9317 "Pseudo Synchronisation: (%u) %s",oct>>(32-bits_needed),str);
9318 curr_bits_length -= bits_needed;
9319 oct <<= bits_needed;
9320 bits_in_oct -= bits_needed;
9329 switch ( oct>>(32-bits_needed) )
9331 case 0x00: str="no VGCS capability or no notifications wanted"; break;
9332 case 0x01: str="VGCS capability and notifications wanted"; break;
9333 default: str="This should not happen";
9336 proto_tree_add_text(tf_tree,
9337 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9338 "Voice Group Call Service: (%u) %s",oct>>(32-bits_needed),str);
9339 curr_bits_length -= bits_needed;
9340 oct <<= bits_needed;
9341 bits_in_oct -= bits_needed;
9350 switch ( oct>>(32-bits_needed) )
9352 case 0x00: str="no VBS capability or no notifications wanted"; break;
9353 case 0x01: str="VBS capability and notifications wanted"; break;
9354 default: str="This should not happen";
9357 proto_tree_add_text(tf_tree,
9358 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9359 "Voice Broadcast Service: (%u) %s",oct>>(32-bits_needed),str);
9360 curr_bits_length -= bits_needed;
9361 oct <<= bits_needed;
9362 bits_in_oct -= bits_needed;
9365 * Multislot capability?
9371 if ((oct>>(32-bits_needed))==0)
9373 proto_tree_add_text(tf_tree,
9374 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9375 "Multislot capability: (%u) same values apply for parameters as in the immediately preceding Access capabilities field within this IE",oct>>(32-bits_needed));
9376 curr_bits_length -= bits_needed;
9377 oct <<= bits_needed;
9378 bits_in_oct -= bits_needed;
9382 proto_tree_add_text(tf_tree,
9383 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9384 "Multislot capability: (%u) Multislot capability struct available",oct>>(32-bits_needed));
9386 curr_bits_length -= bits_needed;
9387 oct <<= bits_needed;
9388 bits_in_oct -= bits_needed;
9391 * HSCSD multislot class?
9397 if ((oct>>(32-bits_needed))==0)
9399 proto_tree_add_text(tf_tree,
9400 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9401 "HSCSD multislot class: (%u) Bits are not available",oct>>(32-bits_needed));
9402 curr_bits_length -= bits_needed;
9403 oct <<= bits_needed;
9404 bits_in_oct -= bits_needed;
9408 curr_bits_length -= bits_needed;
9409 oct <<= bits_needed;
9410 bits_in_oct -= bits_needed;
9413 * HSCSD multislot class
9419 proto_tree_add_text(tf_tree,
9420 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9421 "HSCSD multislot class: (%u) %s",oct>>(32-bits_needed),multi_slot_str[oct>>(32-bits_needed)]);
9422 curr_bits_length -= bits_needed;
9423 oct <<= bits_needed;
9424 bits_in_oct -= bits_needed;
9428 * GPRS multislot class?
9434 if ((oct>>(32-bits_needed))==0)
9436 proto_tree_add_text(tf_tree,
9437 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9438 "GPRS multislot class: (%u) Bits are not available",oct>>(32-bits_needed));
9439 curr_bits_length -= bits_needed;
9440 oct <<= bits_needed;
9441 bits_in_oct -= bits_needed;
9445 curr_bits_length -= bits_needed;
9446 oct <<= bits_needed;
9447 bits_in_oct -= bits_needed;
9450 * GPRS multislot class
9456 proto_tree_add_text(tf_tree,
9457 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9458 "GPRS multislot class: (%u) %s",oct>>(32-bits_needed),multi_slot_str[oct>>(32-bits_needed)]);
9459 curr_bits_length -= bits_needed;
9460 oct <<= bits_needed;
9461 bits_in_oct -= bits_needed;
9464 * GPRS Extended Dynamic Allocation Capability
9470 switch ( oct>>(32-bits_needed) )
9472 case 0x00: str="Extended Dynamic Allocation Capability for GPRS is not implemented"; break;
9473 case 0x01: str="Extended Dynamic Allocation Capability for GPRS is implemented"; break;
9474 default: str="This should not happen";
9476 proto_tree_add_text(tf_tree,
9477 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9478 "GPRS Extended Dynamic Allocation Capability: (%u) %s",oct>>(32-bits_needed),str);
9479 curr_bits_length -= bits_needed;
9480 oct <<= bits_needed;
9481 bits_in_oct -= bits_needed;
9491 if ((oct>>(32-bits_needed))==0)
9493 proto_tree_add_text(tf_tree,
9494 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9495 "SMS/SM values: (%u) Bits are not available",oct>>(32-bits_needed));
9496 curr_bits_length -= bits_needed;
9497 oct <<= bits_needed;
9498 bits_in_oct -= bits_needed;
9502 curr_bits_length -= bits_needed;
9503 oct <<= bits_needed;
9504 bits_in_oct -= bits_needed;
9507 * Switch-Measure-Switch value
9513 proto_tree_add_text(tf_tree,
9514 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9515 "Switch-Measure-Switch value: (%u) %d/4 timeslot (~%d microseconds)",
9516 oct>>(32-bits_needed),oct>>(32-bits_needed),(oct>>(32-bits_needed))*144);
9517 curr_bits_length -= bits_needed;
9518 oct <<= bits_needed;
9519 bits_in_oct -= bits_needed;
9522 * Switch-Measure value
9528 proto_tree_add_text(tf_tree,
9529 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9530 "Switch-Measure value: (%u) %d/4 timeslot (~%d microseconds)",
9531 oct>>(32-bits_needed),oct>>(32-bits_needed),(oct>>(32-bits_needed))*144);
9532 curr_bits_length -= bits_needed;
9533 oct <<= bits_needed;
9534 bits_in_oct -= bits_needed;
9538 * ECSD multislot class?
9544 if ((oct>>(32-bits_needed))==0)
9546 proto_tree_add_text(tf_tree,
9547 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9548 "ECSD multislot class: (%u) Bits are not available",oct>>(32-bits_needed));
9549 curr_bits_length -= bits_needed;
9550 oct <<= bits_needed;
9551 bits_in_oct -= bits_needed;
9555 curr_bits_length -= bits_needed;
9556 oct <<= bits_needed;
9557 bits_in_oct -= bits_needed;
9560 * ECSD multislot class
9566 proto_tree_add_text(tf_tree,
9567 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9568 "ECSD multislot class: (%u) %s",oct>>(32-bits_needed),multi_slot_str[oct>>(32-bits_needed)]);
9569 curr_bits_length -= bits_needed;
9570 oct <<= bits_needed;
9571 bits_in_oct -= bits_needed;
9575 * EGPRS multislot class?
9581 if ((oct>>(32-bits_needed))==0)
9583 proto_tree_add_text(tf_tree,
9584 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9585 "EGPRS multislot class: (%u) Bits are not available",oct>>(32-bits_needed));
9586 curr_bits_length -= bits_needed;
9587 oct <<= bits_needed;
9588 bits_in_oct -= bits_needed;
9592 curr_bits_length -= bits_needed;
9593 oct <<= bits_needed;
9594 bits_in_oct -= bits_needed;
9597 * EGPRS multislot class
9603 proto_tree_add_text(tf_tree,
9604 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9605 "EGPRS multislot class: (%u) %s",oct>>(32-bits_needed),multi_slot_str[oct>>(32-bits_needed)]);
9606 curr_bits_length -= bits_needed;
9607 oct <<= bits_needed;
9608 bits_in_oct -= bits_needed;
9611 * EGPRS Extended Dynamic Allocation Capability
9617 switch ( oct>>(32-bits_needed) )
9619 case 0x00: str="Extended Dynamic Allocation Capability for EGPRS is not implemented"; break;
9620 case 0x01: str="Extended Dynamic Allocation Capability for EGPRS is implemented"; break;
9621 default: str="This should not happen";
9623 proto_tree_add_text(tf_tree,
9624 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9625 "EGPRS Extended Dynamic Allocation Capability: (%u) %s",oct>>(32-bits_needed),str);
9626 curr_bits_length -= bits_needed;
9627 oct <<= bits_needed;
9628 bits_in_oct -= bits_needed;
9632 * DTM GPRS Multi Slot Class ?
9638 if ((oct>>(32-bits_needed))==0)
9640 proto_tree_add_text(tf_tree,
9641 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9642 "DTM GPRS Multi Slot Class: (%u) Bits are not available",oct>>(32-bits_needed));
9643 curr_bits_length -= bits_needed;
9644 oct <<= bits_needed;
9645 bits_in_oct -= bits_needed;
9649 curr_bits_length -= bits_needed;
9650 oct <<= bits_needed;
9651 bits_in_oct -= bits_needed;
9654 * DTM GPRS Multi Slot Class
9660 dtm_gprs_mslot = oct>>(32-bits_needed);
9662 switch ( oct>>(32-bits_needed) )
9664 case 0: str="Unused. If received, the network shall interpret this as Multislot class 5"; break;
9665 case 1: str="Multislot class 5 supported"; break;
9666 case 2: str="Multislot class 9 supported"; break;
9667 case 3: str="Multislot class 11 supported"; break;
9668 default: str="This should not happen";
9671 proto_tree_add_text(tf_tree,
9672 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9673 "DTM GPRS Multi Slot Class: (%u) %s",oct>>(32-bits_needed),str);
9674 curr_bits_length -= bits_needed;
9675 oct <<= bits_needed;
9676 bits_in_oct -= bits_needed;
9685 switch ( oct>>(32-bits_needed) )
9687 case 0x00: str="Single Slot DTM not supported"; break;
9688 case 0x01: str="Single Slot DTM supported"; break;
9689 default: str="This should not happen";
9691 proto_tree_add_text(tf_tree,
9692 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9693 "Single Slot DTM: (%u) %s",oct>>(32-bits_needed),str);
9694 curr_bits_length -= bits_needed;
9695 oct <<= bits_needed;
9696 bits_in_oct -= bits_needed;
9699 * DTM EGPRS Multi Slot Class ?
9705 dtm_egprs_mslot = oct>>(32-bits_needed);
9707 if ((oct>>(32-bits_needed))==0)
9709 proto_tree_add_text(tf_tree,
9710 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9711 "DTM EGPRS Multi Slot Class: (%u) Bits are not available",oct>>(32-bits_needed));
9712 curr_bits_length -= bits_needed;
9713 oct <<= bits_needed;
9714 bits_in_oct -= bits_needed;
9718 curr_bits_length -= bits_needed;
9719 oct <<= bits_needed;
9720 bits_in_oct -= bits_needed;
9723 * DTM EGPRS Multi Slot Class
9729 switch ( oct>>(32-bits_needed) )
9731 case 0: str="Unused. If received, the network shall interpret this as Multislot class 5"; break;
9732 case 1: str="Multislot class 5 supported"; break;
9733 case 2: str="Multislot class 9 supported"; break;
9734 case 3: str="Multislot class 11 supported"; break;
9735 default: str="This should not happen";
9738 proto_tree_add_text(tf_tree,
9739 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9740 "DTM EGPRS Multi Slot Class: (%u) %s",oct>>(32-bits_needed),str);
9741 curr_bits_length -= bits_needed;
9742 oct <<= bits_needed;
9743 bits_in_oct -= bits_needed;
9749 * 8PSK Power Capability?
9755 if ((oct>>(32-bits_needed))==0)
9757 proto_tree_add_text(tf_tree,
9758 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9759 "8PSK Power Capability: (%u) Bits are not available",oct>>(32-bits_needed));
9760 curr_bits_length -= bits_needed;
9761 oct <<= bits_needed;
9762 bits_in_oct -= bits_needed;
9766 curr_bits_length -= bits_needed;
9767 oct <<= bits_needed;
9768 bits_in_oct -= bits_needed;
9771 * 8PSK Power Capability
9777 switch ( oct>>(32-bits_needed) )
9779 case 0x00: str="Reserved"; break;
9780 case 0x01: str="Power class E1"; break;
9781 case 0x02: str="Power class E2"; break;
9782 case 0x03: str="Power class E3"; 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 "8PSK Power Capability: (%u) %s",oct>>(32-bits_needed),str);
9789 curr_bits_length -= bits_needed;
9790 oct <<= bits_needed;
9791 bits_in_oct -= bits_needed;
9795 * COMPACT Interference Measurement Capability
9801 switch ( oct>>(32-bits_needed) )
9803 case 0x00: str="COMPACT Interference Measurement Capability is not implemented"; break;
9804 case 0x01: str="COMPACT Interference Measurement Capability is implemented"; break;
9805 default: str="This should not happen";
9808 proto_tree_add_text(tf_tree,
9809 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9810 "COMPACT Interference Measurement Capability: (%u) %s",oct>>(32-bits_needed),str);
9811 curr_bits_length -= bits_needed;
9812 oct <<= bits_needed;
9813 bits_in_oct -= bits_needed;
9816 * Revision Level Indicator
9822 switch ( oct>>(32-bits_needed) )
9824 case 0x00: str="The ME is Release 98 or older"; break;
9825 case 0x01: str="The ME is Release 99 onwards"; break;
9826 default: str="This should not happen";
9829 proto_tree_add_text(tf_tree,
9830 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9831 "Revision Level Indicator: (%u) %s",oct>>(32-bits_needed),str);
9832 curr_bits_length -= bits_needed;
9833 oct <<= bits_needed;
9834 bits_in_oct -= bits_needed;
9837 * UMTS FDD Radio Access Technology Capability
9843 switch ( oct>>(32-bits_needed) )
9845 case 0x00: str="UMTS FDD not supported"; break;
9846 case 0x01: str="UMTS FDD supported"; break;
9847 default: str="This should not happen";
9850 proto_tree_add_text(tf_tree,
9851 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9852 "UMTS FDD Radio Access Technology Capability: (%u) %s",oct>>(32-bits_needed),str);
9853 curr_bits_length -= bits_needed;
9854 oct <<= bits_needed;
9855 bits_in_oct -= bits_needed;
9858 * UMTS 3.84 Mcps TDD Radio Access Technology Capability
9864 switch ( oct>>(32-bits_needed) )
9866 case 0x00: str="UMTS 3.84 Mcps TDD not supported"; break;
9867 case 0x01: str="UMTS 3.84 Mcps TDD supported"; break;
9868 default: str="This should not happen";
9871 proto_tree_add_text(tf_tree,
9872 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9873 "UMTS 3.84 Mcps TDD Radio Access Technology Capability: (%u) %s",oct>>(32-bits_needed),str);
9874 curr_bits_length -= bits_needed;
9875 oct <<= bits_needed;
9876 bits_in_oct -= bits_needed;
9879 * CDMA 2000 Radio Access Technology Capability
9885 switch ( oct>>(32-bits_needed) )
9887 case 0x00: str="CDMA 2000 not supported"; break;
9888 case 0x01: str="CDMA 2000 supported"; break;
9889 default: str="This should not happen";
9892 proto_tree_add_text(tf_tree,
9893 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9894 "CDMA 2000 Radio Access Technology Capability: (%u) %s",oct>>(32-bits_needed),str);
9895 curr_bits_length -= bits_needed;
9896 oct <<= bits_needed;
9897 bits_in_oct -= bits_needed;
9900 * UMTS 1.28 Mcps TDD Radio Access Technology Capability
9906 switch ( oct>>(32-bits_needed) )
9908 case 0x00: str="UMTS 1.28 Mcps TDD not supported"; break;
9909 case 0x01: str="UMTS 1.28 Mcps TDD supported"; break;
9910 default: str="This should not happen";
9913 proto_tree_add_text(tf_tree,
9914 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9915 "UMTS 1.28 Mcps TDD Radio Access Technology Capability: (%u) %s",oct>>(32-bits_needed),str);
9916 curr_bits_length -= bits_needed;
9917 oct <<= bits_needed;
9918 bits_in_oct -= bits_needed;
9921 * GERAN Feature Package 1
9927 switch ( oct>>(32-bits_needed) )
9929 case 0x00: str="GERAN feature package 1 not supported"; break;
9930 case 0x01: str="GERAN feature package 1 supported"; break;
9931 default: str="This should not happen";
9934 proto_tree_add_text(tf_tree,
9935 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9936 "GERAN Feature Package 1: (%u) %s",oct>>(32-bits_needed),str);
9937 curr_bits_length -= bits_needed;
9938 oct <<= bits_needed;
9939 bits_in_oct -= bits_needed;
9942 * Extended DTM (E)GPRS Multi Slot Class
9948 if ((oct>>(32-bits_needed))==0)
9950 proto_tree_add_text(tf_tree,
9951 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9952 "Extended DTM (E)GPRS Multi Slot Class: (%u) Bits are not available",oct>>(32-bits_needed));
9953 curr_bits_length -= bits_needed;
9954 oct <<= bits_needed;
9955 bits_in_oct -= bits_needed;
9959 curr_bits_length -= bits_needed;
9960 oct <<= bits_needed;
9961 bits_in_oct -= bits_needed;
9964 * Extended DTM GPRS Multi Slot Class
9970 switch ( (oct>>(32-bits_needed))|(dtm_gprs_mslot<<4) )
9972 case 0x00: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
9973 case 0x01: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
9974 case 0x02: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
9975 case 0x03: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
9976 case 0x10: str="Multislot class 5 supported"; break;
9977 case 0x11: str="Multislot class 6 supported"; break;
9978 case 0x12: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
9979 case 0x13: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
9980 case 0x20: str="Multislot class 9 supported"; break;
9981 case 0x21: str="Multislot class 10 supported"; break;
9982 case 0x22: str="Unused. If received, it shall be interpreted as Multislot class 9 supported"; break;
9983 case 0x23: str="Unused. If received, it shall be interpreted as Multislot class 9 supported"; break;
9984 case 0x30: str="Multislot class 11 supported"; break;
9985 case 0x31: str="Unused. If received, it shall be interpreted as Multislot class 11 supported"; break;
9986 case 0x32: str="Unused. If received, it shall be interpreted as Multislot class 11 supported"; break;
9987 case 0x33: str="Unused. If received, it shall be interpreted as Multislot class 11 supported"; break;
9988 default: str="This should not happen";
9991 proto_tree_add_text(tf_tree,
9992 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
9993 "Extended DTM GPRS Multi Slot Class: (%u) %s",oct>>(32-bits_needed),str);
9994 curr_bits_length -= bits_needed;
9995 oct <<= bits_needed;
9996 bits_in_oct -= bits_needed;
9998 if ( dtm_egprs_mslot <= 3 )
10001 * Extended DTM EGPRS Multi Slot Class
10007 switch ( (oct>>(32-bits_needed))|(dtm_egprs_mslot<<4) )
10009 case 0x00: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
10010 case 0x01: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
10011 case 0x02: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
10012 case 0x03: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
10013 case 0x10: str="Multislot class 5 supported"; break;
10014 case 0x11: str="Multislot class 6 supported"; break;
10015 case 0x12: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
10016 case 0x13: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break;
10017 case 0x20: str="Multislot class 9 supported"; break;
10018 case 0x21: str="Multislot class 10 supported"; break;
10019 case 0x22: str="Unused. If received, it shall be interpreted as Multislot class 9 supported"; break;
10020 case 0x23: str="Unused. If received, it shall be interpreted as Multislot class 9 supported"; break;
10021 case 0x30: str="Multislot class 11 supported"; break;
10022 case 0x31: str="Unused. If received, it shall be interpreted as Multislot class 11 supported"; break;
10023 case 0x32: str="Unused. If received, it shall be interpreted as Multislot class 11 supported"; break;
10024 case 0x33: str="Unused. If received, it shall be interpreted as Multislot class 11 supported"; break;
10025 default: str="This should not happen";
10028 proto_tree_add_text(tf_tree,
10029 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
10030 "Extended DTM EGPRS Multi Slot Class: (%u) %s",oct>>(32-bits_needed),str);
10031 curr_bits_length -= bits_needed;
10032 oct <<= bits_needed;
10033 bits_in_oct -= bits_needed;
10038 * Modulation based multislot class support
10044 switch ( oct>>(32-bits_needed) )
10046 case 0x00: str="Modulation based multislot class not supported"; break;
10047 case 0x01: str="Modulation based multislot class supported"; break;
10048 default: str="This should not happen";
10051 proto_tree_add_text(tf_tree,
10052 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
10053 "Modulation based multislot class support: (%u) %s",oct>>(32-bits_needed),str);
10054 curr_bits_length -= bits_needed;
10055 oct <<= bits_needed;
10056 bits_in_oct -= bits_needed;
10059 * High Multislot Capability
10065 if ((oct>>(32-bits_needed))==0)
10067 proto_tree_add_text(tf_tree,
10068 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
10069 "High Multislot Capability: (%u) Bits are not available",oct>>(32-bits_needed));
10070 curr_bits_length -= bits_needed;
10071 oct <<= bits_needed;
10072 bits_in_oct -= bits_needed;
10076 curr_bits_length -= bits_needed;
10077 oct <<= bits_needed;
10078 bits_in_oct -= bits_needed;
10081 * High Multislot Capability
10087 proto_tree_add_text(tf_tree,
10088 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
10089 "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));
10090 curr_bits_length -= bits_needed;
10091 oct <<= bits_needed;
10092 bits_in_oct -= bits_needed;
10097 * GERAN Iu Mode Capability
10103 switch ( oct>>(32-bits_needed) )
10105 case 0x00: str="GERAN Iu mode not supported"; break;
10106 case 0x01: str="GERAN Iu mode supported"; break;
10107 default: str="This should not happen";
10110 proto_tree_add_text(tf_tree,
10111 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
10112 "GERAN Iu Mode Capability: (%u) %s",oct>>(32-bits_needed),str);
10113 curr_bits_length -= bits_needed;
10114 oct <<= bits_needed;
10115 bits_in_oct -= bits_needed;
10118 * GMSK/8-PSK Multislot Power Profile
10124 if ((oct>>(32-bits_needed))==0)
10126 proto_tree_add_text(tf_tree,
10127 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
10128 "GMSK/8-PSK Multislot Power Profile: (%u) Bits are not available",oct>>(32-bits_needed));
10129 curr_bits_length -= bits_needed;
10130 oct <<= bits_needed;
10131 bits_in_oct -= bits_needed;
10135 curr_bits_length -= bits_needed;
10136 oct <<= bits_needed;
10137 bits_in_oct -= bits_needed;
10140 * GMSK Multislot Power Profile
10146 switch ( oct>>(32-bits_needed) )
10148 case 0x00: str="GMSK_MULTISLOT_POWER_PROFILE 0"; break;
10149 case 0x01: str="GMSK_MULTISLOT_POWER_PROFILE 1"; break;
10150 case 0x02: str="GMSK_MULTISLOT_POWER_PROFILE 2"; break;
10151 case 0x03: str="GMSK_MULTISLOT_POWER_PROFILE 3"; break;
10152 default: str="This should not happen";
10155 proto_tree_add_text(tf_tree,
10156 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
10157 "GMSK Multislot Power Profile: (%u) %s",oct>>(32-bits_needed),str);
10158 curr_bits_length -= bits_needed;
10159 oct <<= bits_needed;
10160 bits_in_oct -= bits_needed;
10163 * 8-PSK Multislot Power Profile
10169 switch ( oct>>(32-bits_needed) )
10171 case 0x00: str="8-PSK_MULTISLOT_POWER_PROFILE 0"; break;
10172 case 0x01: str="8-PSK_MULTISLOT_POWER_PROFILE 1"; break;
10173 case 0x02: str="8-PSK_MULTISLOT_POWER_PROFILE 2"; break;
10174 case 0x03: str="8-PSK_MULTISLOT_POWER_PROFILE 3"; break;
10175 default: str="This should not happen";
10178 proto_tree_add_text(tf_tree,
10179 tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
10180 "8-PSK Multislot Power Profile: (%u) %s",oct>>(32-bits_needed),str);
10181 curr_bits_length -= bits_needed;
10182 oct <<= bits_needed;
10183 bits_in_oct -= bits_needed;
10188 * we are too long ... so jump over it
10190 while ( curr_bits_length > 0 )
10192 if ( curr_bits_length > 8 )
10195 bits_needed = curr_bits_length;
10197 curr_bits_length -= bits_needed;
10198 oct <<= bits_needed;
10199 bits_in_oct -= bits_needed;
10204 curr_offset+= curr_len;
10206 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
10208 return(curr_offset - offset);
10215 de_gc_spare(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
10217 guint32 curr_offset;
10220 curr_offset = offset;
10222 proto_tree_add_text(tree,
10223 tvb, curr_offset, 1,
10228 /* no length check possible */
10230 return(curr_offset - offset);
10237 de_gmm_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
10240 guint32 curr_offset;
10244 curr_offset = offset;
10246 oct = tvb_get_guint8(tvb, curr_offset);
10250 /* additional causes can be found in annex g */
10251 case 0x02: str="IMSI unknown in HLR"; break;
10252 case 0x03: str="Illegal MS"; break;
10253 case 0x04: str="IMSI unknown in VLR"; break;
10254 case 0x05: str="IMEI not accepted"; break;
10255 case 0x06: str="Illegal ME"; break;
10256 case 0x07: str="GPRS services not allowed"; break;
10257 case 0x08: str="GPRS services and non-GPRS services not allowed"; break;
10258 case 0x09: str="MS identity cannot be derived by the network"; break;
10259 case 0x0a: str="Implicitly detached"; break;
10260 case 0x0b: str="PLMN not allowed"; break;
10261 case 0x0c: str="Location Area not allowed"; break;
10262 case 0x0d: str="Roaming not allowed in this location area"; break;
10263 case 0x0e: str="GPRS services not allowed in this PLMN"; break;
10264 case 0x0f: str="No Suitable Cells In Location Area"; break;
10265 case 0x10: str="MSC temporarily not reachable"; break;
10266 case 0x11: str="Network failure"; break;
10267 case 0x14: str="MAC failure"; break;
10268 case 0x15: str="Synch failure"; break;
10269 case 0x16: str="Congestion"; break;
10270 case 0x17: str="GSM authentication unacceptable"; break;
10271 case 0x20: str="Service option not supported"; break;
10272 case 0x21: str="Requested service option not subscribed"; break;
10273 case 0x22: str="Service option temporarily out of order"; break;
10274 case 0x26: str="Call cannot be identified"; break;
10275 case 0x28: str="No PDP context activated"; break;
10276 case 0x30: str="retry upon entry into a new cell"; break;
10277 case 0x31: str="retry upon entry into a new cell"; break;
10278 case 0x32: str="retry upon entry into a new cell"; break;
10279 case 0x33: str="retry upon entry into a new cell"; break;
10280 case 0x34: str="retry upon entry into a new cell"; break;
10281 case 0x35: str="retry upon entry into a new cell"; break;
10282 case 0x36: str="retry upon entry into a new cell"; break;
10283 case 0x37: str="retry upon entry into a new cell"; break;
10284 case 0x38: str="retry upon entry into a new cell"; break;
10285 case 0x39: str="retry upon entry into a new cell"; break;
10286 case 0x3a: str="retry upon entry into a new cell"; break;
10287 case 0x3b: str="retry upon entry into a new cell"; break;
10288 case 0x3c: str="retry upon entry into a new cell"; break;
10289 case 0x3d: str="retry upon entry into a new cell"; break;
10290 case 0x3e: str="retry upon entry into a new cell"; break;
10291 case 0x3f: str="retry upon entry into a new cell"; break;
10292 case 0x5f: str="Semantically incorrect message"; break;
10293 case 0x60: str="Invalid mandatory information"; break;
10294 case 0x61: str="Message type non-existent or not implemented"; break;
10295 case 0x62: str="Message type not compatible with the protocol state"; break;
10296 case 0x63: str="Information element non-existent or not implemented"; break;
10297 case 0x64: str="Conditional IE error"; break;
10298 case 0x65: str="Message not compatible with the protocol state"; break;
10299 case 0x6f: str="Protocol error, unspecified"; break;
10300 default: str="Protocol error, unspecified";
10303 proto_tree_add_text(tree,
10304 tvb, curr_offset, 1,
10305 "gmm Cause: (%u) %s",
10311 /* no length check possible */
10313 return(curr_offset - offset);
10317 * [7] 10.5.5.15 Routing area identification
10320 de_gmm_rai(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
10326 guint32 curr_offset;
10329 curr_offset = offset;
10331 mcc = (tvb_get_guint8(tvb, curr_offset) & 0x0f) <<8;
10332 mcc |= (tvb_get_guint8(tvb, curr_offset) & 0xf0);
10333 mcc |= (tvb_get_guint8(tvb, curr_offset+1) & 0x0f);
10334 mnc = (tvb_get_guint8(tvb, curr_offset+2) & 0x0f) <<8;
10335 mnc |= (tvb_get_guint8(tvb, curr_offset+2) & 0xf0);
10336 mnc |= (tvb_get_guint8(tvb, curr_offset+1) & 0xf0) >>4;
10337 if ((mnc&0x000f) == 0x000f)
10340 lac = tvb_get_guint8(tvb, curr_offset+3);
10342 lac |= tvb_get_guint8(tvb, curr_offset+4);
10343 rac = tvb_get_guint8(tvb, curr_offset+5);
10345 proto_tree_add_text(tree,
10346 tvb, curr_offset, 6,
10347 "Routing area identification: %x-%x-%x-%x",
10352 /* no length check possible */
10354 return(curr_offset - offset);
10361 de_gmm_update_res(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
10364 guint32 curr_offset;
10368 curr_offset = offset;
10370 oct = tvb_get_guint8(tvb, curr_offset);
10372 /* IMPORTANT - IT'S ASSUMED THAT THE INFORMATION IS IN THE HIGHER NIBBLE */
10377 case 0: str="RA updated"; break;
10378 case 1: str="combined RA/LA updated"; break;
10379 default: str="reserved";
10382 proto_tree_add_text(tree,
10383 tvb, curr_offset, 1,
10384 "Update Result: (%u) %s",
10390 /* no length check possible */
10392 return(curr_offset - offset);
10399 de_gmm_update_type(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
10403 guint32 curr_offset;
10404 const gchar *str_follow;
10405 const gchar *str_update;
10406 proto_item *tf = NULL;
10407 proto_tree *tf_tree = NULL;
10410 curr_offset = offset;
10412 oct = tvb_get_guint8(tvb, curr_offset);
10419 case 0: str_update="RA updating"; break;
10420 case 1: str_update="combined RA/LA updating"; break;
10421 case 2: str_update="combined RA/LA updating with IMSI attach"; break;
10422 case 3: str_update="Periodic updating"; break;
10423 default: str_update="reserved";
10427 case 8: str_follow="Follow-on request pending"; break;
10428 default: str_follow="No follow-on request pending";
10431 tf = proto_tree_add_text(tree,
10432 tvb, curr_offset, 1,
10435 tf_tree = proto_item_add_subtree(tf, ett_gmm_update_type );
10437 proto_tree_add_text(tf_tree,
10438 tvb, curr_offset, 1,
10442 proto_tree_add_text(tf_tree,
10443 tvb, curr_offset, 1,
10448 /* The ciphering key sequence number is added here */
10449 proto_tree_add_text(tree,
10450 tvb, curr_offset, 1,
10451 "Ciphering key sequence number: 0x%02x (%u)",
10457 /* no length check possible */
10459 return(curr_offset - offset);
10466 de_gmm_ac_ref_nr(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
10469 guint32 curr_offset;
10472 curr_offset = offset;
10474 oct = tvb_get_guint8(tvb, curr_offset);
10476 proto_tree_add_text(tree,
10477 tvb, curr_offset, 1,
10478 "A&C reference number: 0x%02x (%u)",
10484 /* no length check possible */
10486 return(curr_offset - offset);
10493 de_gmm_ac_ref_nr_h(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
10496 guint32 curr_offset;
10499 curr_offset = offset;
10501 oct = tvb_get_guint8(tvb, curr_offset);
10503 /* IMPORTANT - IT'S ASSUMED THAT THE INFORMATION IS IN THE HIGHER NIBBLE */
10506 proto_tree_add_text(tree,
10507 tvb, curr_offset, 1,
10508 "A&C reference number: 0x%02x (%u)",
10514 /* no length check possible */
10516 return(curr_offset - offset);
10523 de_gmm_service_type(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
10527 guint32 curr_offset;
10531 curr_offset = offset;
10533 oct = tvb_get_guint8(tvb, curr_offset);
10541 case 0: str="Signalling"; break;
10542 case 1: str="Data"; break;
10543 case 2: str="Paging Response"; break;
10544 case 3: str="MBMS Notification Response"; break;/* reponse->response*/
10545 default: str="reserved";
10548 /* The ciphering key sequence number is added here */
10549 proto_tree_add_text(tree,
10550 tvb, curr_offset, 1,
10551 "Ciphering key sequence number: 0x%02x (%u)",
10555 proto_tree_add_text(tree,
10556 tvb, curr_offset, 1,
10557 "Service Type: (%u) %s",
10563 /* no length check possible */
10565 return(curr_offset - offset);
10572 de_gmm_cell_notfi(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
10574 guint32 curr_offset;
10577 curr_offset = offset;
10579 proto_tree_add_text(tree,
10580 tvb, curr_offset, 0,
10581 "Cell Notification");
10583 /* no length check possible */
10585 return(curr_offset - offset);
10592 de_gmm_ps_lcs_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
10595 guint32 curr_offset;
10597 gchar str_otd[2][40]={ "MS assisted E-OTD not supported",
10598 "MS assisted E-OTD supported" };
10599 gchar str_gps[2][40]={ "MS assisted GPS not supported",
10600 "MS assisted GPS supported" };
10603 curr_offset = offset;
10605 oct = tvb_get_guint8(tvb, curr_offset);
10607 oct <<=3; /* move away the spare bits */
10609 proto_tree_add_text(tree,
10610 tvb, curr_offset, 1,
10615 proto_tree_add_text(tree,
10616 tvb, curr_offset, 1,
10622 proto_tree_add_text(tree,
10623 tvb, curr_offset, 1,
10628 proto_tree_add_text(tree,
10629 tvb, curr_offset, 1,
10634 proto_tree_add_text(tree,
10635 tvb, curr_offset, 1,
10642 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
10644 return(curr_offset - offset);
10651 de_gmm_net_feat_supp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
10654 guint32 curr_offset;
10658 curr_offset = offset;
10660 oct = tvb_get_guint8(tvb, curr_offset);
10664 case 8: str="LCS-MOLR via PS domain not supported"; break;
10665 default: str="LCS-MOLR via PS domain supported";
10668 proto_tree_add_text(tree,
10669 tvb, curr_offset, 1,
10670 "Network Feature Support: (%u) %s",
10676 /* no length check possible */
10678 return(curr_offset - offset);
10681 /* [7] 10.5.24 Inter RAT information container */
10683 de_gmm_rat_info_container(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
10685 guint32 curr_offset;
10688 curr_offset = offset;
10690 /* The value part of the Inter RAT information container information element is the INTER RAT HANDOVER INFO as
10691 defined in 3GPP TS 25.331 [23c]. If this field includes padding bits, they are defined in 3GPP TS 25.331 [23c].*/
10692 proto_tree_add_text(tree, tvb, curr_offset, len,"INTER RAT HANDOVER INFO - Not decoded");
10702 de_gc_context_stat(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
10706 guint32 curr_offset;
10707 proto_item *tf = NULL;
10708 proto_tree *tf_tree = NULL;
10710 gchar str[2][20]={ "PDP-INACTIVE", "PDP-ACTIVE" };
10713 curr_offset = offset;
10715 oct = tvb_get_guint8(tvb, curr_offset);
10717 tf = proto_tree_add_text(tree,
10718 tvb, curr_offset, 1,
10719 "PDP Context Status");
10721 tf_tree = proto_item_add_subtree(tf, ett_gmm_context_stat );
10723 oct = tvb_get_guint8(tvb, curr_offset);
10725 for ( pdp_nr=0;pdp_nr<16; pdp_nr++ )
10730 oct = tvb_get_guint8(tvb, curr_offset);
10732 proto_tree_add_text(tf_tree,
10733 tvb, curr_offset, 1,
10734 "NSAPI %d: (%u) %s",pdp_nr,
10742 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
10744 return(curr_offset - offset);
10751 de_gc_radio_prio(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
10754 guint32 curr_offset;
10758 curr_offset = offset;
10760 oct = tvb_get_guint8(tvb, curr_offset);
10764 case 1: str="priority level 1 (highest)"; break;
10765 case 2: str="priority level 2"; break;
10766 case 3: str="priority level 3"; break;
10767 case 4: str="priority level 4 (lowest)"; break;
10768 default: str="priority level 4 (lowest)";
10771 proto_tree_add_text(tree,
10772 tvb, curr_offset, 1,
10773 "Radio Priority (PDP or SMS): (%u) %s",
10779 return(curr_offset - offset);
10786 de_gc_timer(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
10790 guint32 curr_offset;
10794 curr_offset = offset;
10796 oct = tvb_get_guint8(tvb, curr_offset);
10802 case 0: str="sec"; val*=2; break;
10803 case 1: str="min"; break;
10804 case 2: str="min"; val*=6; break;
10806 proto_tree_add_text(tree,
10807 tvb, curr_offset, 1,
10808 "GPRS Timer: timer is deactivated");
10810 default: str="min";
10813 proto_tree_add_text(tree,
10814 tvb, curr_offset, 1,
10815 "GPRS Timer: (%u) %u %s",
10821 /* no length check possible */
10823 return(curr_offset - offset);
10830 de_gc_timer2(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len _U_)
10834 guint32 curr_offset;
10838 curr_offset = offset;
10840 oct = tvb_get_guint8(tvb, curr_offset);
10846 case 0: str="sec"; val*=2; break;
10847 case 1: str="min"; break;
10848 case 2: str="min"; val*=6; break;
10850 proto_tree_add_text(tree,
10851 tvb, curr_offset, 1,
10852 "GPRS Timer: timer is deactivated");
10854 default: str="min";
10857 proto_tree_add_text(tree,
10858 tvb, curr_offset, 1,
10859 "GPRS Timer: (%u) %u %s %s",
10861 str, add_string ? add_string : "");
10865 return(curr_offset - offset);
10873 de_gc_radio_prio2(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
10876 guint32 curr_offset;
10880 curr_offset = offset;
10882 oct = tvb_get_guint8(tvb, curr_offset);
10884 /* IMPORTANT - IT'S ASSUMED THAT THE INFORMATION IS IN THE HIGHER NIBBLE */
10889 case 1: str="priority level 1 (highest)"; break;
10890 case 2: str="priority level 2"; break;
10891 case 3: str="priority level 3"; break;
10892 case 4: str="priority level 4 (lowest)"; break;
10893 default: str="priority level 4 (lowest)";
10896 proto_tree_add_text(tree,
10897 tvb, curr_offset, 1,
10898 "Radio Priority (TOM8): (%u) %s",
10904 return(curr_offset - offset);
10908 * [8] 10.5.7.6 MBMS context status
10911 de_gc_mbms_context_stat(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
10913 guint32 curr_offset;
10916 curr_offset = offset;
10918 proto_tree_add_text(tree,tvb, curr_offset, len, "MBMS context status - Not decoded");
10925 #define MAX_APN_LENGTH 50
10928 de_sm_apn(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len _U_)
10930 guint32 curr_offset;
10932 const guint8 *cptr;
10933 guint8 str[MAX_APN_LENGTH+1];
10935 cptr = tvb_get_ptr(tvb, offset, len);
10938 curr_offset = offset;
10940 /* init buffer and copy it */
10941 memset ( str , 0 , MAX_APN_LENGTH );
10942 memcpy ( str , cptr , len<MAX_APN_LENGTH?len:MAX_APN_LENGTH );
10945 while (( curr_len < len ) && ( curr_len < MAX_APN_LENGTH ))
10947 guint step = str[curr_len];
10949 curr_len += step+1;
10952 proto_tree_add_text(tree,
10953 tvb, curr_offset, len,
10954 "APN: %s %s", str+1 , add_string ? add_string : "");
10958 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
10960 return(curr_offset - offset);
10967 de_sm_nsapi(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len _U_)
10970 guint32 curr_offset;
10973 curr_offset = offset;
10975 oct = tvb_get_guint8(tvb, curr_offset);
10977 proto_tree_add_text(tree,
10978 tvb, curr_offset, 1,
10979 "NSAPI: 0x%02x (%u) %s",
10980 oct&0x0f, oct&0x0f,add_string ? add_string : "");
10984 return(curr_offset - offset);
10991 de_sm_pco(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
10993 guint32 curr_offset;
10996 struct e_in6_addr ipv6_addr;
10999 curr_offset = offset;
11001 oct = tvb_get_guint8(tvb, curr_offset);
11005 proto_tree_add_text(tree,tvb, curr_offset, 1, "Ext: 0x%02x (%u)",oct>>7,oct>>7);
11006 proto_tree_add_text(tree,tvb, curr_offset, 1, "Configuration Protocol: PPP (%u)",oct&0x0f);
11008 while ( curr_len > 0 )
11013 dissector_handle_t handle = NULL;
11014 static packet_info p_info;
11016 prot = tvb_get_guint8(tvb, curr_offset);
11018 prot |= tvb_get_guint8(tvb, curr_offset+1);
11019 e_len = tvb_get_guint8(tvb, curr_offset+2);
11027 proto_tree_add_text(tree,tvb, curr_offset-3, 2, "Parameter: (%u) P-CSCF Address" , prot );
11028 proto_tree_add_text(tree,tvb, curr_offset-1, 1, "Length: 0x%02x (%u)", e_len , e_len);
11030 tvb_get_ipv6(tvb, curr_offset, &ipv6_addr);
11031 proto_tree_add_text(tree,
11032 tvb, curr_offset, 16,
11033 "IPv6: %s", ip6_to_str(&ipv6_addr));
11037 proto_tree_add_text(tree,tvb, curr_offset-3, 2, "Parameter: (%u) IM CN Subsystem Signaling Flag" , prot );
11038 proto_tree_add_text(tree,tvb, curr_offset-1, 1, "Length: 0x%02x (%u)", e_len , e_len);
11042 proto_tree_add_text(tree,tvb, curr_offset-3, 2, "Parameter: (%u) DNS Server Address" , prot );
11043 proto_tree_add_text(tree,tvb, curr_offset-1, 1, "Length: 0x%02x (%u)", e_len , e_len);
11045 tvb_get_ipv6(tvb, curr_offset, &ipv6_addr);
11046 proto_tree_add_text(tree,
11047 tvb, curr_offset, 16,
11048 "IPv6: %s", ip6_to_str(&ipv6_addr));
11052 proto_tree_add_text(tree,tvb, curr_offset-3, 2, "Parameter: (%u) Policy Control rejection code" , prot );
11053 proto_tree_add_text(tree,tvb, curr_offset-1, 1, "Length: 0x%02x (%u)", e_len , e_len);
11054 oct = tvb_get_guint8(tvb, curr_offset);
11055 proto_tree_add_text(tree,tvb, curr_offset, 1, "Reject Code: 0x%02x (%u)", e_len , e_len);
11058 handle = dissector_get_port_handle ( gprs_sm_pco_subdissector_table , prot );
11059 if ( handle != NULL )
11061 proto_tree_add_text(tree,tvb, curr_offset-3, 2, "Protocol: (%u) %s" ,
11062 prot , val_to_str(prot, ppp_vals, "Unknown"));
11063 proto_tree_add_text(tree,tvb, curr_offset-1, 1, "Length: 0x%02x (%u)", e_len , e_len);
11065 * dissect the embedded message
11067 l3_tvb = tvb_new_subset(tvb, curr_offset, e_len, e_len);
11068 call_dissector(handle, l3_tvb , &p_info , tree );
11072 proto_tree_add_text(tree,tvb, curr_offset-3, 2, "Protocol/Parameter: (%u) unknwown" , prot );
11073 proto_tree_add_text(tree,tvb, curr_offset-1, 1, "Length: 0x%02x (%u)", e_len , e_len);
11075 * dissect the embedded DATA message
11077 l3_tvb = tvb_new_subset(tvb, curr_offset, e_len, e_len);
11078 call_dissector(data_handle, l3_tvb, &p_info , tree);
11083 curr_offset+= e_len;
11085 curr_offset+= curr_len;
11087 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
11089 return(curr_offset - offset);
11096 de_sm_pdp_addr(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
11098 guint32 curr_offset;
11103 struct e_in6_addr ipv6_addr;
11106 curr_offset = offset;
11108 oct = tvb_get_guint8(tvb, curr_offset);
11110 switch ( oct&0x0f )
11112 case 0x00: str="ETSI allocated address"; break;
11113 case 0x01: str="IETF allocated address"; break;
11114 case 0x0f: str="Empty PDP type";
11115 default: str="reserved";
11118 proto_tree_add_text(tree,
11119 tvb, curr_offset, 1,
11120 "PDP type organisation: (%u) %s",oct&0x0f,str);
11122 oct2 = tvb_get_guint8(tvb, curr_offset+1);
11124 if (( oct&0x0f ) == 0 )
11128 case 0x00: str="Reserved, used in earlier version of this protocol"; break;
11129 case 0x01: str="PDP-type PPP"; break;
11130 default: str="reserved";
11133 else if (( oct&0x0f) == 1 )
11137 case 0x21: str="IPv4 address"; break;
11138 case 0x57: str="IPv6 address"; break;
11139 default: str="IPv4 address";
11142 else if ((oct2==0) && (( oct&0x0f) == 0x0f ))
11145 str="Not specified";
11147 proto_tree_add_text(tree,
11148 tvb, curr_offset+1, 1,
11149 "PDP type number: (%u) %s",oct2,str);
11151 if (( len == 2 ) && (( oct2 == 0x21 ) || ( oct2 == 0x57 )))
11153 proto_tree_add_text(tree,
11154 tvb, curr_offset+1, 1,
11155 "Dynamic addressing");
11157 curr_offset+= curr_len;
11159 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
11161 return(curr_offset - offset);
11163 else if ( len == 2 )
11165 proto_tree_add_text(tree,
11166 tvb, curr_offset+1, 1,
11167 "No PDP address is included");
11169 curr_offset+= curr_len;
11171 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
11173 return(curr_offset - offset);
11175 else if ( len < 2 )
11177 proto_tree_add_text(tree,
11178 tvb, curr_offset+1, 1,
11179 "Length is bogus - should be >= 2");
11181 curr_offset+= curr_len;
11183 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
11185 return(curr_offset - offset);
11188 if ((( oct2 == 0x21 ) && ( len != 6 )) ||
11189 (( oct2 == 0x57 ) && ( len != 18 )))
11191 proto_tree_add_text(tree,
11192 tvb, curr_offset+2, len-2,
11193 "Can't display address");
11201 proto_tree_add_text(tree,
11202 tvb, curr_offset+2, 0,
11203 "IPv4: length is wrong");
11205 proto_tree_add_text(tree,
11206 tvb, curr_offset+2, len-2,
11207 "IPv4: %s", ip_to_str(tvb_get_ptr(tvb, offset+2, 4)));
11213 proto_tree_add_text(tree,
11214 tvb, curr_offset+2, 0,
11215 "IPv6: length is wrong");
11217 tvb_get_ipv6(tvb, curr_offset+2, &ipv6_addr);
11218 proto_tree_add_text(tree,
11219 tvb, curr_offset+2, len-2,
11220 "IPv6: %s", ip6_to_str(&ipv6_addr));
11225 curr_offset+= curr_len;
11227 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
11229 return(curr_offset - offset);
11235 /* Delivery of erroneous SDUs, octet 6 (see 3GPP TS 23.107) Bits 3 2 1 */
11236 const value_string gsm_a_qos_del_of_err_sdu_vals[] = {
11237 { 0, "Subscribed delivery of erroneous SDUs/Reserved" },
11238 { 1, "No detect('-')" },
11239 { 2, "Erroneous SDUs are delivered('yes')" },
11240 { 3, "Erroneous SDUs are not delivered('No')" },
11245 /* Delivery order, octet 6 (see 3GPP TS 23.107) Bits 5 4 3 */
11246 const value_string gsm_a_qos_del_order_vals[] = {
11247 { 0, "Subscribed delivery order/Reserved" },
11248 { 1, "With delivery order ('yes')" },
11249 { 2, "Without delivery order ('no')" },
11253 /* Traffic class, octet 6 (see 3GPP TS 23.107) Bits 8 7 6 */
11254 const value_string gsm_a_qos_traffic_cls_vals[] = {
11255 { 0, "Subscribed traffic class/Reserved" },
11256 { 1, "Conversational class" },
11257 { 2, "Streaming class" },
11258 { 3, "Interactive class" },
11259 { 4, "Background class" },
11264 /* Residual Bit Error Rate (BER), octet 10 (see 3GPP TS 23.107) Bits 8 7 6 5 */
11265 const value_string gsm_a_qos_ber_vals[] = {
11266 { 0, "Subscribed residual BER/Reserved" },
11276 { 10, "Reserved" },
11280 /* SDU error ratio, octet 10 (see 3GPP TS 23.107) Bits 4 3 2 1 */
11281 const value_string gsm_a_qos_sdu_err_rat_vals[] = {
11282 { 0, "Subscribed SDU error ratio/Reserved" },
11290 { 15, "Reserved" },
11294 /* Traffic handling priority, octet 11 (see 3GPP TS 23.107) Bits 2 1 */
11295 const value_string gsm_a_qos_traff_hdl_pri_vals[] = {
11296 { 0, "Subscribed traffic handling priority/Reserved" },
11297 { 1, "Priority level 1" },
11298 { 2, "Priority level 2" },
11299 { 3, "Priority level 3" },
11304 de_sm_qos(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
11306 guint32 curr_offset;
11308 guchar oct, tmp_oct;
11312 curr_offset = offset;
11314 oct = tvb_get_guint8(tvb, curr_offset);
11316 switch ( (oct>>3)&7 )
11318 case 0x00: str="Subscribed delay class/reserved"; break;
11319 case 0x01: str="Delay class 1"; break;
11320 case 0x02: str="Delay class 2"; break;
11321 case 0x03: str="Delay class 3"; break;
11322 case 0x04: str="Delay class 4 (best effort)"; break;
11323 case 0x07: str="Reserved"; break;
11324 default: str="Delay class 4 (best effort)";
11327 proto_tree_add_text(tree,
11328 tvb, curr_offset, 1,
11329 "Delay class: (%u) %s",(oct>>3)&7,str);
11333 case 0x00: str="Subscribed reliability class/reserved"; break;
11334 case 0x01: str="Acknowledged GTP, LLC, and RLC; Protected data"; break;
11335 case 0x02: str="Unacknowledged GTP; Acknowledged LLC and RLC, Protected data"; break;
11336 case 0x03: str="Unacknowledged GTP and LLC; Acknowledged RLC, Protected data"; break;
11337 case 0x04: str="Unacknowledged GTP, LLC, and RLC, Protected data"; break;
11338 case 0x05: str="Unacknowledged GTP, LLC, and RLC, Unprotected data"; break;
11339 case 0x07: str="Reserved"; break;
11340 default: str="Unacknowledged GTP and LLC; Acknowledged RLC, Protected data";
11343 proto_tree_add_text(tree,
11344 tvb, curr_offset, 1,
11345 "Reliability class: (%u) %s",oct&7,str);
11350 if ( curr_len == 0 )
11352 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
11354 return(curr_offset - offset);
11357 oct = tvb_get_guint8(tvb, curr_offset);
11361 case 0x00: str="Subscribed peak throughput/reserved"; break;
11362 case 0x01: str="Up to 1 000 octet/s"; break;
11363 case 0x02: str="Up to 2 000 octet/s"; break;
11364 case 0x03: str="Up to 4 000 octet/s"; break;
11365 case 0x04: str="Up to 8 000 octet/s"; break;
11366 case 0x05: str="Up to 16 000 octet/s"; break;
11367 case 0x06: str="Up to 32 000 octet/s"; break;
11368 case 0x07: str="Up to 64 000 octet/s"; break;
11369 case 0x08: str="Up to 128 000 octet/s"; break;
11370 case 0x09: str="Up to 256 000 octet/s"; break;
11371 case 0x0f: str="Reserved"; break;
11372 default: str="Up to 1 000 octet/s";
11375 proto_tree_add_text(tree,
11376 tvb, curr_offset, 1,
11377 "Peak throughput: (%u) %s",oct>>4,str);
11381 case 0x00: str="Subscribed precedence/reserved"; break;
11382 case 0x01: str="High priority"; break;
11383 case 0x02: str="Normal priority"; break;
11384 case 0x03: str="Low priority"; break;
11385 case 0x07: str="Reserved"; break;
11386 default: str="Normal priority";
11389 proto_tree_add_text(tree,
11390 tvb, curr_offset, 1,
11391 "Precedence class: (%u) %s",oct&7,str);
11396 if ( curr_len == 0 )
11398 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
11400 return(curr_offset - offset);
11403 oct = tvb_get_guint8(tvb, curr_offset);
11405 switch ( oct&0x1f )
11407 case 0x00: str="Subscribed peak throughput/reserved"; break;
11408 case 0x01: str="100 octet/h"; break;
11409 case 0x02: str="200 octet/h"; break;
11410 case 0x03: str="500 octet/h"; break;
11411 case 0x04: str="1 000 octet/h"; break;
11412 case 0x05: str="2 000 octet/h"; break;
11413 case 0x06: str="5 000 octet/h"; break;
11414 case 0x07: str="10 000 octet/h"; break;
11415 case 0x08: str="20 000 octet/h"; break;
11416 case 0x09: str="50 000 octet/h"; break;
11417 case 0x0a: str="100 000 octet/h"; break;
11418 case 0x0b: str="200 000 octet/h"; break;
11419 case 0x0c: str="500 000 octet/h"; break;
11420 case 0x0d: str="1 000 000 octet/h"; break;
11421 case 0x0e: str="2 000 000 octet/h"; break;
11422 case 0x0f: str="5 000 000 octet/h"; break;
11423 case 0x10: str="10 000 000 octet/h"; break;
11424 case 0x11: str="20 000 000 octet/h"; break;
11425 case 0x12: str="50 000 000 octet/h"; break;
11426 case 0x1e: str="Reserved"; break;
11427 case 0x1f: str="Best effort"; break;
11428 default: str="Best effort";
11431 proto_tree_add_text(tree,
11432 tvb, curr_offset, 1,
11433 "Mean throughput: (%u) %s",oct&0x1f,str);
11438 if ( curr_len == 0 )
11440 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
11442 return(curr_offset - offset);
11445 proto_tree_add_item(tree, hf_gsm_a_qos_traffic_cls, tvb, curr_offset, 1, FALSE);
11446 proto_tree_add_item(tree, hf_gsm_a_qos_del_order, tvb, curr_offset, 1, FALSE);
11447 proto_tree_add_item(tree, hf_gsm_a_qos_del_of_err_sdu, tvb, curr_offset, 1, FALSE);
11452 if ( curr_len == 0 )
11454 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
11456 return(curr_offset - offset);
11459 oct = tvb_get_guint8(tvb, curr_offset);
11463 case 0x00: str="Subscribed maximum SDU size/reserved"; break;
11464 case 0x97: str="1502 octets"; break;
11465 case 0x98: str="1510 octets"; break;
11466 case 0x99: str="1520 octets"; break;
11467 case 0xff: str="Reserved"; break;
11468 default: str="Unspecified";
11471 if (( oct >= 1 ) && ( oct <= 0x96 ))
11472 proto_tree_add_text(tree,
11473 tvb, curr_offset, 1,
11474 "Maximum SDU size: (%u) %u octets",oct,oct*10);
11476 proto_tree_add_text(tree,
11477 tvb, curr_offset, 1,
11478 "Maximum SDU size: (%u) %s",oct,str);
11483 if ( curr_len == 0 )
11485 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
11487 return(curr_offset - offset);
11490 oct = tvb_get_guint8(tvb, curr_offset);
11494 case 0x00: str="Subscribed maximum bit rate for uplink/reserved"; break;
11495 case 0xff: str="0kbps"; break;
11496 default: str="This should not happen - BUG";
11499 if (( oct >= 1 ) && ( oct <= 0x3f ))
11500 proto_tree_add_text(tree,
11501 tvb, curr_offset, 1,
11502 "Maximum bit rate for uplink: (%u) %ukbps",oct,oct);
11503 else if (( oct >= 0x40 ) && ( oct <= 0x7f ))
11504 proto_tree_add_text(tree,
11505 tvb, curr_offset, 1,
11506 "Maximum bit rate for uplink: (%u) %ukbps",oct,(oct-0x40)*8+64); /* - was (oct-0x40)*8 */
11507 else if (( oct >= 0x80 ) && ( oct <= 0xfe ))
11508 proto_tree_add_text(tree,
11509 tvb, curr_offset, 1,
11510 "Maximum bit rate for uplink: (%u) %ukbps",oct,(oct-0x80)*64+576); /* - was (oct-0x80)*64 */
11512 proto_tree_add_text(tree,
11513 tvb, curr_offset, 1,
11514 "Maximum bit rate for uplink: (%u) %s",oct,str);
11519 if ( curr_len == 0 )
11521 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
11523 return(curr_offset - offset);
11526 oct = tvb_get_guint8(tvb, curr_offset);
11530 case 0x00: str="Subscribed maximum bit rate for uplink/reserved"; break;
11531 case 0xff: str="0kbps"; break;
11532 default: str="This should not happen - BUG";
11535 if (( oct >= 1 ) && ( oct <= 0x3f ))
11536 proto_tree_add_text(tree,
11537 tvb, curr_offset, 1,
11538 "Maximum bit rate for downlink: (%u) %ukbps",oct,oct);
11539 else if (( oct >= 0x40 ) && ( oct <= 0x7f ))
11540 proto_tree_add_text(tree,
11541 tvb, curr_offset, 1,
11542 "Maximum bit rate for downlink: (%u) %ukbps",oct,(oct-0x40)*8+64);/*same as above*/
11543 else if (( oct >= 0x80 ) && ( oct <= 0xfe ))
11544 proto_tree_add_text(tree,
11545 tvb, curr_offset, 1,
11546 "Maximum bit rate for downlink: (%u) %ukbps",oct,(oct-0x80)*64+576);/*same as above*/
11548 proto_tree_add_text(tree,
11549 tvb, curr_offset, 1,
11550 "Maximum bit rate for downlink: (%u) %s",oct,str);
11555 if ( curr_len == 0 )
11557 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
11559 return(curr_offset - offset);
11562 proto_tree_add_item(tree, hf_gsm_a_qos_ber, tvb, curr_offset, 1, FALSE);
11563 proto_tree_add_item(tree, hf_gsm_a_qos_sdu_err_rat, tvb, curr_offset, 1, FALSE);
11568 if ( curr_len == 0 )
11570 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
11572 return(curr_offset - offset);
11575 oct = tvb_get_guint8(tvb, curr_offset);
11579 case 0x00: str="Subscribed transfer delay/reserved"; break;
11580 case 0x3f: str="Reserved"; break;
11581 default: str="This should not happen - BUG";
11586 if (( tmp_oct >= 1 ) && ( tmp_oct <= 0x0f ))
11587 proto_tree_add_text(tree,
11588 tvb, curr_offset, 1,
11589 "Transfer Delay: (%u) %ums",oct>>2,(oct>>2)*10);
11590 else if (( tmp_oct >= 0x10 ) && ( tmp_oct <= 0x1f ))
11591 proto_tree_add_text(tree,
11592 tvb, curr_offset, 1,
11593 "Transfer Delay: (%u) %ums",oct>>2,((oct>>2)-0x10)*50+200);
11594 else if (( tmp_oct >= 0x20 ) && ( tmp_oct <= 0x3e ))
11595 proto_tree_add_text(tree,
11596 tvb, curr_offset, 1,
11597 "Transfer Delay: (%u) %ums",oct>>2,((oct>>2)-0x20)*100+1000);
11599 proto_tree_add_text(tree,
11600 tvb, curr_offset, 1,
11601 "Transfer Delay: (%u) %s",oct>>2,str);
11603 switch ( oct&0x03 )
11605 case 0x00: str="Subscribed traffic handling priority/reserved"; break;
11606 case 0x01: str="Priority level 1"; break;
11607 case 0x02: str="Priority level 2"; break;
11608 case 0x03: str="Priority level 3"; break;
11609 default: str="This should not happen - BUG";
11612 proto_tree_add_text(tree,
11613 tvb, curr_offset, 1,
11614 "Traffic Handling priority: (%u) %s",oct&0x03,str);
11619 if ( curr_len == 0 )
11621 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
11623 return(curr_offset - offset);
11626 oct = tvb_get_guint8(tvb, curr_offset);
11630 case 0x00: str="Subscribed guaranteed bit rate for uplink/reserved"; break;
11631 case 0xff: str="0kbps"; break;
11632 default: str="This should not happen - BUG";
11635 if (( oct >= 1 ) && ( oct <= 0x3f ))
11636 proto_tree_add_text(tree,
11637 tvb, curr_offset, 1,
11638 "Guaranteed bit rate for uplink: (%u) %ukbps",oct,oct);
11639 else if (( oct >= 0x40 ) && ( oct <= 0x7f ))
11640 proto_tree_add_text(tree,
11641 tvb, curr_offset, 1,
11642 "Guaranteed bit rate for uplink: (%u) %ukbps",oct,(oct-0x40)*8+64);/*same as for max bit rate*/
11643 else if (( oct >= 0x80 ) && ( oct <= 0xfe ))
11644 proto_tree_add_text(tree,
11645 tvb, curr_offset, 1,
11646 "Guaranteed bit rate for uplink: (%u) %ukbps",oct,(oct-0x80)*64+576);/*same as for max bit rate*/
11648 proto_tree_add_text(tree,
11649 tvb, curr_offset, 1,
11650 "Guaranteed bit rate for uplink: (%u) %s",oct,str);
11655 if ( curr_len == 0 )
11657 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
11659 return(curr_offset - offset);
11662 oct = tvb_get_guint8(tvb, curr_offset);
11666 case 0x00: str="Subscribed guaranteed bit rate for uplink/reserved"; break;
11667 case 0xff: str="0kbps"; break;
11668 default: str="This should not happen - BUG";
11671 if (( oct >= 1 ) && ( oct <= 0x3f ))
11672 proto_tree_add_text(tree,
11673 tvb, curr_offset, 1,
11674 "Guaranteed bit rate for downlink: (%u) %ukbps",oct,oct);
11675 else if (( oct >= 0x40 ) && ( oct <= 0x7f ))
11676 proto_tree_add_text(tree,
11677 tvb, curr_offset, 1,
11678 "Guaranteed bit rate for downlink: (%u) %ukbps",oct,(oct-0x40)*8+64);/*same as above*/
11679 else if (( oct >= 0x80 ) && ( oct <= 0xfe ))
11680 proto_tree_add_text(tree,
11681 tvb, curr_offset, 1,
11682 "Guaranteed bit rate for downlink: (%u) %ukbps",oct,(oct-0x80)*64+576);/*same as above*/
11684 proto_tree_add_text(tree,
11685 tvb, curr_offset, 1,
11686 "Guaranteed bit rate for downlink: (%u) %s",oct,str);
11691 if ( curr_len == 0 )
11693 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
11695 return(curr_offset - offset);
11698 oct = tvb_get_guint8(tvb, curr_offset);
11700 switch ( (oct>>4)&1 )
11702 case 0x00: str="Not optimised for signalling traffic"; break;
11703 case 0x01: str="Optimised for signalling traffic"; break;
11704 default: str="This should not happen - BUG";
11707 proto_tree_add_text(tree,
11708 tvb, curr_offset, 1,
11709 "Signalling Indication: (%u) %s",(oct>>4)&1,str);
11713 case 0x00: str="unknown"; break;
11714 case 0x01: str="speech"; break;
11715 default: str="unknown";
11718 proto_tree_add_text(tree,
11719 tvb, curr_offset, 1,
11720 "Source Statistics Descriptor: (%u) %s",oct&7,str);
11725 if ( curr_len == 0 )
11727 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
11729 return(curr_offset - offset);
11733 oct = tvb_get_guint8(tvb, curr_offset);
11737 case 0x00: str="Use the value indicated by the Maximum bit rate for downlink"; break;
11738 default: str="Unspecified";
11741 if (( oct >= 1 ) && ( oct <= 0x3f ))
11742 proto_tree_add_text(tree,
11743 tvb, curr_offset, 1,
11744 "Maximum bit rate for downlink (extended): (%u) %ukbps",oct,oct*100);
11746 proto_tree_add_text(tree,
11747 tvb, curr_offset, 1,
11748 "Maximum bit rate for downlink (extended): (%u) %s",oct,str);
11753 if ( curr_len == 0 )
11755 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
11757 return(curr_offset - offset);
11760 oct = tvb_get_guint8(tvb, curr_offset);
11764 case 0x00: str="Use the value indicated by the Guaranteed bit rate for downlink"; break;
11765 default: str="Unspecified";
11768 if (( oct >= 1 ) && ( oct <= 0x4a ))
11769 proto_tree_add_text(tree,
11770 tvb, curr_offset, 1,
11771 "Guaranteed bit rate for downlink (extended): (%u) %ukbps",oct,oct*100);
11773 proto_tree_add_text(tree,
11774 tvb, curr_offset, 1,
11775 "Guaranteed bit rate for downlink (extended): (%u) %s",oct,str);
11780 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
11782 return(curr_offset - offset);
11786 * [8] 10.5.6.6 SM cause
11789 de_sm_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len _U_)
11792 guint32 curr_offset;
11796 curr_offset = offset;
11798 oct = tvb_get_guint8(tvb, curr_offset);
11802 case 0x08: str="Operator Determined Barring"; break;
11803 case 0x18: str="MBMS bearer capabilities insufficient for the service"; break;
11804 case 0x19: str="LLC or SNDCP failure(GSM only)"; break;
11805 case 0x1a: str="Insufficient resources"; break;
11806 case 0x1b: str="Missing or unknown APN"; break;
11807 case 0x1c: str="Unknown PDP address or PDP type"; break;
11808 case 0x1d: str="User Aauthentication failed"; break;
11809 case 0x1e: str="Activation rejected by GGSN"; break;
11810 case 0x1f: str="Activation rejected, unspecified"; break;
11811 case 0x20: str="Service option not supported"; break;
11812 case 0x21: str="Requested service option not subscribed"; break;
11813 case 0x22: str="Service option temporarily out of order"; break;
11814 case 0x23: str="NSAPI already used (not sent)"; break;
11815 case 0x24: str="Regular deactivation"; break;
11816 case 0x25: str="QoS not accepted"; break;
11817 case 0x26: str="Network failure"; break;
11818 case 0x27: str="Reactivation required"; break;
11819 case 0x28: str="Feature not supported"; break;
11820 case 0x29: str="Semantic error in the TFT operation"; break;
11821 case 0x2a: str="Syntactical error in the TFT operation"; break;
11822 case 0x2b: str="Unknown PDP context"; break;
11823 case 0x2e: str="PDP context without TFT already activated"; break;
11824 case 0x2f: str="Multicast group membership time-out"; break;
11825 case 0x2c: str="Semantic errors in packet filter(s)"; break;
11826 case 0x2d: str="Syntactical errors in packet filter(s)"; break;
11827 case 0x51: str="Invalid transaction identifier value"; break;
11828 case 0x5f: str="Semantically incorrect message"; break;
11829 case 0x60: str="Invalid mandatory information"; break;
11830 case 0x61: str="Message type non-existent or not implemented"; break;
11831 case 0x62: str="Message type not compatible with the protocol state"; break;
11832 case 0x63: str="Information element non-existent or not implemented"; break;
11833 case 0x64: str="Conditional IE error"; break;
11834 case 0x65: str="Message not compatible with the protocol state"; break;
11835 case 0x6f: str="Protocol error, unspecified"; break;
11836 case 0x70: str="APN restriction value incompatible with active PDP context"; break;
11837 default: str="Protocol error, unspecified"; break;
11840 proto_tree_add_text(tree,
11841 tvb, curr_offset, 1,
11842 "Cause: (%u) %s %s",
11843 oct, str,add_string ? add_string : "");
11847 return(curr_offset - offset);
11854 de_sm_linked_ti(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
11856 guint32 curr_offset;
11860 gchar ti_flag[2][80]={ "The message is sent from the side that originates the TI" ,
11861 "The message is sent to the side that originates the TI" };
11864 curr_offset = offset;
11866 oct = tvb_get_guint8(tvb, curr_offset);
11868 proto_tree_add_text(tree,
11869 tvb, curr_offset, 1,
11870 "TI flag: (%u) %s",oct>>7,ti_flag[oct>>7]);
11872 if ( curr_len > 1 )
11874 oct = tvb_get_guint8(tvb, curr_offset);
11876 proto_tree_add_text(tree,
11877 tvb, curr_offset, 1,
11878 "TI value: 0x%02x (%u)",oct&0x7f,oct&0x7f);
11880 proto_tree_add_text(tree,
11881 tvb, curr_offset, 1,
11882 "ext: 0x%02x (%u)",oct>>7,oct>>7);
11887 proto_tree_add_text(tree,
11888 tvb, curr_offset, 1,
11889 "TI value: 0x%02x (%u)",(oct>>4)&7,(oct>>4)&7);
11892 curr_offset+= curr_len;
11894 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
11896 return(curr_offset - offset);
11903 de_sm_sapi(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len _U_)
11906 guint32 curr_offset;
11909 curr_offset = offset;
11911 oct = tvb_get_guint8(tvb, curr_offset);
11913 proto_tree_add_text(tree,
11914 tvb, curr_offset, 1,
11915 "LLC SAPI: 0x%02x (%u) %s",
11916 oct&0x0f, oct&0x0f,add_string ? add_string : "");
11920 return(curr_offset - offset);
11927 de_sm_tear_down(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len _U_)
11930 guint32 curr_offset;
11931 gchar str[2][30] = { "tear down not requested" , "tear down requested" };
11934 curr_offset = offset;
11936 oct = tvb_get_guint8(tvb, curr_offset);
11938 proto_tree_add_text(tree,
11939 tvb, curr_offset, 1,
11940 "Tear Down Indicator: (%u) %s %s",
11941 oct&1, str[oct&1],add_string ? add_string : "");
11945 return(curr_offset - offset);
11951 /* Packet Flow Identifier value (octet 3) */
11952 static const value_string gsm_a_packet_flow_id_vals[] = {
11953 { 0, "Best Effort"},
11964 de_sm_pflow_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
11966 guint32 curr_offset;
11971 curr_offset = offset;
11973 oct = tvb_get_guint8(tvb, curr_offset);
11975 proto_tree_add_text(tree,
11976 tvb, curr_offset, 1,
11977 "Packet Flow Identifier: (%u) %s",oct&0x7f,
11978 val_to_str(oct&0x7f, gsm_a_packet_flow_id_vals, "dynamically assigned (%u)"));
11980 curr_offset+= curr_len;
11982 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
11984 return(curr_offset - offset);
11988 * [7] 10.5.6.12 TFT - Traffic Flow Template
11990 /* TFT operation code (octet 3) */
11991 static const value_string gsm_a_tft_op_code_vals[] = {
11993 { 1, "Create new TFT"},
11994 { 2, "Delete existing TFT"},
11995 { 3, "Add packet filters to existing TFT"},
11996 { 4, "Replace packet filters in existing TFT"},
11997 { 5, "Delete packet filters from existing TFT"},
11998 { 6, "No TFT operation"},
12003 static const true_false_string gsm_a_tft_e_bit = {
12004 "parameters list is included",
12005 "parameters list is not included"
12010 de_sm_tflow_temp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
12012 guint32 curr_offset;
12014 proto_item *tf = NULL;
12015 proto_tree *tf_tree = NULL;
12016 proto_tree *comp_tree = NULL;
12018 guchar pkt_fil_count;
12024 gint pf_identifier;
12025 gint pack_component_type;
12028 curr_offset = offset;
12031 * parse first octet. It contain TFT operation code, E bit and Number of packet filters
12033 oct = tvb_get_guint8(tvb, curr_offset);
12036 pkt_fil_count = oct&0x0f;
12037 e_bit = (oct>>4)&1;
12039 proto_tree_add_item(tree,hf_gsm_a_tft_op_code,tvb,curr_offset,1,FALSE);
12040 proto_tree_add_item(tree,hf_gsm_a_tft_e_bit,tvb,curr_offset,1,FALSE);
12041 proto_tree_add_item(tree,hf_gsm_a_tft_pkt_flt,tvb,curr_offset,1,FALSE);
12046 /* Packet filter list dissect */
12049 if ( op_code == 2 ) /* delete TFT contains no packet filters. so we will jump over it */
12050 count = pkt_fil_count;
12051 while ( count < pkt_fil_count )
12053 tf = proto_tree_add_text(tree,
12054 tvb, curr_offset, 1,
12055 "Packet filter %d",count); /* 0-> 7 */
12057 tf_tree = proto_item_add_subtree(tf, ett_sm_tft );
12059 if ( op_code == 5 ) /* Delete packet filters from existing TFT - just a list of identifiers */
12062 if ((curr_offset-offset)<1) {
12063 proto_tree_add_text(tf_tree,tvb, curr_offset, 1,"Not enough data");
12064 return(curr_offset-offset);
12066 oct = tvb_get_guint8(tvb, curr_offset);
12070 proto_tree_add_text(tf_tree,
12071 tvb, curr_offset-1, 1,
12072 "Packet filter identifier: 0x%02x (%u)",oct,oct );
12074 else /* create new, Add packet filters or Replace packet filters */
12077 if ((curr_offset-offset)<1) {
12078 proto_tree_add_text(tf_tree,tvb, curr_offset, 1,"Not enough data");
12079 return(curr_offset-offset);
12081 pf_identifier = tvb_get_guint8(tvb, curr_offset);
12085 proto_tree_add_text(tf_tree,
12086 tvb, curr_offset-1, 1,
12087 "Packet filter identifier: %u (%u)",pf_identifier, pf_identifier);
12089 if ((curr_offset-offset)<1) {
12090 proto_tree_add_text(tf_tree,tvb, curr_offset, 1,"Not enough data");
12091 return(curr_offset-offset);
12093 oct = tvb_get_guint8(tvb, curr_offset);
12097 proto_tree_add_text(tf_tree,
12098 tvb, curr_offset-1, 1,
12099 "Packet evaluation precedence: 0x%02x (%u)",oct,oct );
12101 if ((curr_offset-offset)<1) { proto_tree_add_text(tf_tree,tvb, curr_offset, 1,"Not enough data"); return(curr_offset-offset);}
12102 pf_length = tvb_get_guint8(tvb, curr_offset);
12106 proto_tree_add_text(tf_tree,
12107 tvb, curr_offset-1, 1,
12108 "Packet filter length: 0x%02x (%u)",pf_length,pf_length );
12109 /* New tree for component */
12111 /* Dissect Packet filter Component */
12112 /* while ( filter_len > 1 ) */
12113 /* packet filter component type identifier: */
12115 if (pf_length > 0 ){
12116 if ((curr_offset-offset)<1) {
12117 proto_tree_add_text(tf_tree,tvb, curr_offset, 1,"Not enough data");
12118 return(curr_offset-offset);
12120 pack_component_type = tvb_get_guint8(tvb, curr_offset);
12124 tf=proto_tree_add_text(tf_tree,tvb, curr_offset-1, 1,"Packet filter component type identifier: ");
12125 comp_tree = proto_item_add_subtree(tf, ett_sm_tft );
12127 switch ( pack_component_type ){
12130 str="IPv4 source address type";
12131 proto_tree_add_item(comp_tree,hf_gsm_a_tft_ip4_address,tvb,curr_offset,4,FALSE);
12134 proto_tree_add_item(comp_tree,hf_gsm_a_tft_ip4_mask,tvb,curr_offset,4,FALSE);
12141 str="IPv6 source address type";
12142 proto_tree_add_item(comp_tree,hf_gsm_a_tft_ip6_address,tvb,curr_offset,16,FALSE);
12145 proto_tree_add_item(comp_tree,hf_gsm_a_tft_ip6_mask,tvb,curr_offset,16,FALSE);
12151 str="Protocol identifier/Next header type";
12152 proto_tree_add_item(comp_tree,hf_gsm_a_tft_protocol_header,tvb,curr_offset,1,FALSE);
12158 str="Single destination port type";
12159 proto_tree_add_item(comp_tree,hf_gsm_a_tft_port,tvb,curr_offset,2,FALSE);
12164 str="Destination port range type";
12165 proto_tree_add_item(comp_tree,hf_gsm_a_tft_port_low,tvb,curr_offset,2,FALSE);
12166 proto_tree_add_item(comp_tree,hf_gsm_a_tft_port_high,tvb,curr_offset,2,FALSE);
12172 str="Single source port type";
12173 proto_tree_add_item(comp_tree,hf_gsm_a_tft_port,tvb,curr_offset,2,FALSE);
12179 str="Source port range type";
12180 proto_tree_add_item(comp_tree,hf_gsm_a_tft_port_low,tvb,curr_offset,2,FALSE);
12181 proto_tree_add_item(comp_tree,hf_gsm_a_tft_port_high,tvb,curr_offset,2,FALSE);
12187 str="Security parameter index type";
12188 proto_tree_add_item(comp_tree,hf_gsm_a_tft_security,tvb,curr_offset,4,FALSE);
12195 str="Type of service/Traffic class type";
12196 proto_tree_add_item(comp_tree,hf_gsm_a_qos_traffic_cls,tvb,curr_offset,1,FALSE);
12197 proto_tree_add_item(comp_tree,hf_gsm_a_tft_traffic_mask,tvb,curr_offset,1,FALSE);
12203 str="Flow label type";
12204 proto_tree_add_item(comp_tree,hf_gsm_a_tft_traffic_mask,tvb,curr_offset,1,FALSE);
12210 str="not specified";
12212 proto_item_append_text(tf, "(%u) %s", pack_component_type, str );
12219 /* The parameters list contains a variable number of parameters that might need to be
12220 * transferred in addition to the packet filters. If the parameters list is included, the E
12221 * bit is set to 1; otherwise, the E bit is set to 0.
12224 proto_tree_add_text(tf_tree, tvb, curr_offset, 1, "Note: Possible Authorizaton Token/Flow Identifier not decoded yet");
12226 return(curr_offset - offset);
12229 static guint8 (*bssmap_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len) = {
12230 be_cic, /* Circuit Identity Code */
12231 NULL, /* Reserved */
12232 NULL, /* Resource Available */
12233 be_cause, /* Cause */
12234 be_cell_id, /* Cell Identifier */
12235 be_prio, /* Priority */
12236 be_l3_header_info, /* Layer 3 Header Information */
12238 be_tmsi, /* TMSI */
12239 be_enc_info, /* Encryption Information */
12240 be_chan_type, /* Channel Type */
12241 NULL, /* Periodicity */
12242 NULL, /* Extended Resource Indicator */
12243 NULL, /* Number Of MSs */
12244 NULL, /* Reserved */
12245 NULL, /* Reserved */
12246 NULL, /* Reserved */
12247 de_ms_cm_2, /* Classmark Information Type 2 */
12248 NULL, /* Classmark Information Type 3 */
12249 NULL, /* Interference Band To Be Used */
12250 de_rr_cause, /* RR Cause */
12251 NULL, /* Reserved */
12252 be_l3_info, /* Layer 3 Information */
12253 be_dlci, /* DLCI */
12254 be_down_dtx_flag, /* Downlink DTX Flag */
12255 be_cell_id_list, /* Cell Identifier List */
12256 NULL /* no associated data */, /* Response Request */
12257 NULL, /* Resource Indication Method */
12258 de_ms_cm_1, /* Classmark Information Type 1 */
12259 NULL, /* Circuit Identity Code List */
12260 NULL, /* Diagnostic */
12261 be_l3_msg, /* Layer 3 Message Contents */
12262 be_chosen_chan, /* Chosen Channel */
12263 NULL, /* Total Resource Accessible */
12264 be_ciph_resp_mode, /* Cipher Response Mode */
12265 be_cha_needed, /* Channel Needed */
12266 NULL, /* Trace Type */
12267 NULL, /* TriggerID */
12268 NULL, /* Trace Reference */
12269 NULL, /* TransactionID */
12270 de_mid, /* Mobile Identity */
12272 be_for_ind, /* Forward Indicator */
12273 be_chosen_enc_alg, /* Chosen Encryption Algorithm */
12274 be_cct_pool, /* Circuit Pool */
12275 NULL, /* Circuit Pool List */
12276 NULL, /* Time Indication */
12277 NULL, /* Resource Situation */
12278 be_curr_chan_1, /* Current Channel Type 1 */
12279 be_que_ind, /* Queueing Indicator */
12280 be_speech_ver, /* Speech Version */
12281 NULL, /* Assignment Requirement */
12282 NULL /* no associated data */, /* Talker Flag */
12283 NULL /* no associated data */, /* Connection Release Requested */
12284 NULL, /* Group Call Reference */
12285 NULL, /* eMLPP Priority */
12286 NULL, /* Configuration Evolution Indication */
12287 NULL /* no decode required */, /* Old BSS to New BSS Information */
12288 NULL, /* LSA Identifier */
12289 NULL, /* LSA Identifier List */
12290 NULL, /* LSA Information */
12291 NULL, /* LCS QoS */
12292 NULL, /* LSA access control suppression */
12293 NULL, /* LCS Priority */
12294 NULL, /* Location Type */
12295 NULL, /* Location Estimate */
12296 NULL, /* Positioning Data */
12297 NULL, /* LCS Cause */
12298 NULL, /* LCS Client Type */
12299 be_apdu, /* APDU */
12300 NULL, /* Network Element Identity */
12301 NULL, /* GPS Assistance Data */
12302 NULL, /* Deciphering Keys */
12303 NULL, /* Return Error Request */
12304 NULL, /* Return Error Cause */
12305 NULL, /* Segmentation */
12309 static guint8 (*dtap_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len) = {
12310 /* Common Information Elements 10.5.1 */
12311 de_cell_id, /* Cell Identity */
12312 NULL /* handled inline */, /* Ciphering Key Sequence Number */
12313 de_lai, /* Location Area Identification */
12314 de_mid, /* Mobile Identity */
12315 de_ms_cm_1, /* Mobile Station Classmark 1 */
12316 de_ms_cm_2, /* Mobile Station Classmark 2 */
12317 NULL, /* Mobile Station Classmark 3 */
12318 de_d_gb_call_ref, /* Descriptive group or broadcast call reference */
12319 NULL /* handled inline */, /* Group Cipher Key Number */
12320 de_pd_sapi, /* PD and SAPI $(CCBS)$ */
12322 de_prio /* handled inline */, /* Priority Level */
12323 de_plmn_list, /* PLMN List */
12324 /* Radio Resource Management Information Elements 10.5.2, most are from 10.5.1 */
12326 * [3] 10.5.2.1a BA Range
12328 de_rr_cell_ch_dsc, /* [3] 10.5.2.1b Cell Channel Description */
12329 /* [3] 10.5.2.1c BA List Pref
12330 * [3] 10.5.2.1d UTRAN Frequency List
12331 * [3] 10.5.2.1e Cell selection indicator after release of all TCH and SDCCH IE
12333 de_rr_cell_dsc, /* 10.5.2.2 RR Cell Description */
12335 * [3] 10.5.2.3 Cell Options (BCCH)
12336 * [3] 10.5.2.3a Cell Options (SACCH)
12337 * [3] 10.5.2.4 Cell Selection Parameters
12338 * [3] 10.5.2.4a (void)
12340 de_rr_ch_dsc, /* [3] 10.5.2.5 Channel Description */
12341 de_rr_ch_dsc2, /* [3] 10.5.2.5a RR Channel Description 2 */
12342 de_rr_ch_mode, /* [3] 10.5.2.6 Channel Mode */
12343 de_rr_ch_mode2, /* [3] 10.5.2.7 Channel Mode 2 */
12345 * [3] 10.5.2.7a UTRAN predefined configuration status information / START-CS / UE CapabilityUTRAN Classmark information element 218
12346 * [3] 10.5.2.7b (void) */
12348 de_rr_cm_enq_mask, /* [3] 10.5.2.7c Classmark Enquiry Mask */
12349 /* [3] 10.5.2.7d GERAN Iu Mode Classmark information element */
12350 de_rr_chnl_needed, /* [3] 10.5.2.8 Channel Needed
12351 * [3] 10.5.2.8a (void)
12352 * [3] 10.5.2.8b Channel Request Description 2 */
12354 de_rr_cip_mode_set, /* [3] 10.5.2.9 Cipher Mode Setting */
12355 /* [3] 10.5.2.10 Cipher Response
12356 * [3] 10.5.2.11 Control Channel Description
12357 * [3] 10.5.2.11a DTM Information Details */
12358 de_rr_dyn_arfcn_map, /* [3] 10.5.2.11b Dynamic ARFCN Mapping */
12359 de_rr_freq_ch_seq, /* [3] 10.5.2.12 Frequency Channel Sequence */
12360 de_rr_freq_list, /* [3] 10.5.2.13 Frequency List */
12361 de_rr_freq_short_list, /* [3] 10.5.2.14 Frequency Short List */
12362 de_rr_freq_short_list2, /* [3] 10.5.2.14a Frequency Short List 2 */
12363 /* [3] 10.5.2.14b Group Channel Description
12364 * [3] 10.5.2.14c GPRS Resumption
12365 * [3] 10.5.2.14d GPRS broadcast information
12366 * [3] 10.5.2.14e Enhanced DTM CS Release Indication
12368 de_rr_ho_ref, /* 10.5.2.15 Handover Reference */
12370 * [3] 10.5.2.16 IA Rest Octets
12371 * [3] 10.5.2.17 IAR Rest Octets
12372 * [3] 10.5.2.18 IAX Rest Octets
12373 * [3] 10.5.2.19 L2 Pseudo Length
12374 * [3] 10.5.2.20 Measurement Results
12375 * [3] 10.5.2.20a GPRS Measurement Results
12377 de_rr_mob_all, /* [3] 10.5.2.21 Mobile Allocation */
12378 de_rr_mob_time_diff, /* [3] 10.5.2.21a Mobile Time Difference */
12379 de_rr_multirate_conf, /* [3] 10.5.2.21aa MultiRate configuration */
12381 de_rr_mult_all, /* [3] 10.5.2.21b Multislot Allocation */
12383 * [3] 10.5.2.21c NC mode
12384 * [3] 10.5.2.22 Neighbour Cell Description
12385 * [3] 10.5.2.22a Neighbour Cell Description 2
12386 * [3] 10.5.2.22b (void)
12387 * [3] 10.5.2.22c NT/N Rest Octets
12388 * [3] 10.5.2.23 P1 Rest Octets
12389 * [3] 10.5.2.24 P2 Rest Octets
12390 * [3] 10.5.2.25 P3 Rest Octets
12391 * [3] 10.5.2.25a Packet Channel Description
12392 * [3] 10.5.2.25b Dedicated mode or TBF
12393 * [3] 10.5.2.25c RR Packet Uplink Assignment
12394 * [3] 10.5.2.25d RR Packet Downlink Assignment
12395 * [3] 10.5.2.26 Page Mode
12396 * [3] 10.5.2.26a (void)
12397 * [3] 10.5.2.26b (void)
12398 * [3] 10.5.2.26c (void)
12399 * [3] 10.5.2.26d (void)
12400 * [3] 10.5.2.27 NCC Permitted
12402 de_rr_pow_cmd, /* 10.5.2.28 Power Command */
12403 de_rr_pow_cmd_and_acc_type, /* 10.5.2.28a Power Command and access type */
12405 * [3] 10.5.2.29 RACH Control Parameters
12406 * [3] 10.5.2.30 Request Reference
12408 de_rr_cause, /* 10.5.2.31 RR Cause */
12409 de_rr_sync_ind, /* 10.5.2.39 Synchronization Indication */
12410 /* [3] 10.5.2.32 SI 1 Rest Octets
12411 * [3] 10.5.2.33 SI 2bis Rest Octets
12412 * [3] 10.5.2.33a SI 2ter Rest Octets
12413 * [3] 10.5.2.33b SI 2quater Rest Octets
12414 * [3] 10.5.2.34 SI 3 Rest Octets
12415 * [3] 10.5.2.35 SI 4 Rest Octets
12416 * [3] 10.5.2.35a SI 6 Rest Octets
12417 * [3] 10.5.2.36 SI 7 Rest Octets
12418 * [3] 10.5.2.37 SI 8 Rest Octets
12419 * [3] 10.5.2.37a SI 9 Rest Octets
12420 * [3] 10.5.2.37b SI 13 Rest Octets
12421 * [3] 10.5.2.37c (void)
12422 * [3] 10.5.2.37d (void)
12423 * [3] 10.5.2.37e SI 16 Rest Octets
12424 * [3] 10.5.2.37f SI 17 Rest Octets
12425 * [3] 10.5.2.37g SI 19 Rest Octets
12426 * [3] 10.5.2.37h SI 18 Rest Octets
12427 * [3] 10.5.2.37i SI 20 Rest Octets */
12428 de_rr_starting_time, /* [3] 10.5.2.38 Starting Time */
12429 de_rr_timing_adv, /* [3] 10.5.2.40 Timing Advance */
12430 de_rr_time_diff, /* [3] 10.5.2.41 Time Difference */
12431 de_rr_tlli, /* [3] 10.5.2.41a TLLI */
12433 * [3] 10.5.2.42 TMSI/P-TMSI */
12434 de_rr_vgcs_tar_mode_ind, /* [3] 10.5.2.42a VGCS target mode Indication */
12436 de_rr_vgcs_cip_par, /* [3] 10.5.2.42b VGCS Ciphering Parameters */
12437 /* [3] 10.5.2.43 Wait Indication
12438 * [3] 10.5.2.44 SI10 rest octets $(ASCI)$
12439 * [3] 10.5.2.45 EXTENDED MEASUREMENT RESULTS
12440 * [3] 10.5.2.46 Extended Measurement Frequency List */
12441 de_rr_sus_cau, /* [3] 10.5.2.47 Suspension Cause */
12442 /* [3] 10.5.2.48 APDU ID
12443 * [3] 10.5.2.49 APDU Flags
12444 * [3] 10.5.2.50 APDU Data
12445 * [3] 10.5.2.51 Handover To UTRAN Command
12446 * [3] 10.5.2.52 Handover To cdma2000 Command
12447 * [3] 10.5.2.53 (void)
12448 * [3] 10.5.2.54 (void)
12449 * [3] 10.5.2.55 (void)
12450 * [3] 10.5.2.56 3G Target Cell
12452 de_rr_ded_serv_inf, /* [3] 10.5.2.59 Dedicated Service Information */
12454 /* Mobility Management Information Elements 10.5.3 */
12455 de_auth_param_rand, /* Authentication Parameter RAND */
12456 de_auth_param_autn, /* Authentication Parameter AUTN (UMTS authentication challenge only) */
12457 de_auth_resp_param, /* Authentication Response Parameter */
12458 de_auth_resp_param_ext, /* Authentication Response Parameter (extension) (UMTS authentication challenge only) */
12459 de_auth_fail_param, /* Authentication Failure Parameter (UMTS authentication challenge only) */
12460 NULL /* handled inline */, /* CM Service Type */
12461 NULL /* handled inline */, /* Identity Type */
12463 NULL /* handled inline */, /* Location Updating Type */
12464 de_network_name, /* Network Name */
12465 de_rej_cause, /* Reject Cause */
12466 NULL /* no associated data */, /* Follow-on Proceed */
12467 de_time_zone, /* Time Zone */
12468 de_time_zone_time, /* Time Zone and Time */
12469 NULL /* no associated data */, /* CTS Permission */
12470 de_lsa_id, /* LSA Identifier */
12471 de_day_saving_time, /* Daylight Saving Time */
12472 NULL, /* Emergency Number List */
12473 /* Call Control Information Elements 10.5.4 */
12475 de_aux_states, /* Auxiliary States */
12476 de_bearer_cap, /* Bearer Capability */
12477 de_cc_cap, /* Call Control Capabilities */
12478 de_call_state, /* Call State */
12479 de_cld_party_bcd_num, /* Called Party BCD Number */
12480 de_cld_party_sub_addr, /* Called Party Subaddress */
12481 de_clg_party_bcd_num, /* Calling Party BCD Number */
12482 de_clg_party_sub_addr, /* Calling Party Subaddress */
12483 de_cause, /* Cause */
12484 NULL /* no associated data */, /* CLIR Suppression */
12485 NULL /* no associated data */, /* CLIR Invocation */
12486 NULL /* handled inline */, /* Congestion Level */
12487 NULL, /* Connected Number */
12488 NULL, /* Connected Subaddress */
12489 de_facility, /* Facility */
12490 NULL, /* High Layer Compatibility */
12491 de_keypad_facility, /* Keypad Facility */
12492 de_llc, /* 10.5.4.18 Low layer compatibility */
12493 NULL, /* More Data */
12494 NULL, /* Notification Indicator */
12495 de_prog_ind, /* Progress Indicator */
12496 NULL, /* Recall type $(CCBS)$ */
12497 NULL, /* Redirecting Party BCD Number */
12498 NULL, /* Redirecting Party Subaddress */
12499 de_repeat_ind, /* Repeat Indicator */
12500 NULL /* no associated data */, /* Reverse Call Setup Direction */
12501 NULL, /* SETUP Container $(CCBS)$ */
12503 de_ss_ver_ind, /* SS Version Indicator */
12504 NULL, /* User-user */
12505 NULL, /* Alerting Pattern $(NIA)$ */
12506 NULL, /* Allowed Actions $(CCBS)$ */
12507 NULL, /* Stream Identifier */
12508 NULL, /* Network Call Control Capabilities */
12509 NULL, /* Cause of No CLI */
12510 NULL, /* Immediate Modification Indicator */
12511 NULL, /* Supported Codec List */
12512 NULL, /* Service Category */
12513 /* GPRS Mobility Management Information Elements 10.5.5 */
12514 de_gmm_attach_res, /* Attach Result */
12515 de_gmm_attach_type, /* Attach Type */
12516 de_gmm_ciph_alg, /* Cipher Algorithm */
12517 de_gmm_tmsi_stat, /* TMSI Status */
12518 de_gmm_detach_type, /* Detach Type */
12519 de_gmm_drx_param, /* DRX Parameter */
12520 de_gmm_ftostby, /* Force to Standby */
12521 de_gmm_ftostby_h, /* Force to Standby - Info is in the high nibble */
12522 de_gmm_ptmsi_sig, /* P-TMSI Signature */
12523 de_gmm_ptmsi_sig2, /* P-TMSI Signature 2 */
12524 de_gmm_ident_type2, /* Identity Type 2 */
12525 de_gmm_imeisv_req, /* IMEISV Request */
12526 de_gmm_rec_npdu_lst, /* Receive N-PDU Numbers List */
12527 de_gmm_ms_net_cap, /* MS Network Capability */
12528 de_gmm_ms_radio_acc_cap, /* MS Radio Access Capability */
12529 de_gmm_cause, /* GMM Cause */
12530 de_gmm_rai, /* Routing Area Identification */
12531 de_gmm_update_res, /* Update Result */
12532 de_gmm_update_type, /* Update Type */
12533 de_gmm_ac_ref_nr, /* A&C Reference Number */
12534 de_gmm_ac_ref_nr_h, /* A&C Reference Numer - Info is in the high nibble */
12535 de_gmm_service_type, /* Service Type */
12536 de_gmm_cell_notfi, /* Cell Notification */
12537 de_gmm_ps_lcs_cap, /* PS LCS Capability */
12538 de_gmm_net_feat_supp, /* Network Feature Support */
12539 de_gmm_rat_info_container, /* Inter RAT information container */
12540 /* Short Message Service Information Elements [5] 8.1.4 */
12541 de_cp_user_data, /* CP-User Data */
12542 de_cp_cause, /* CP-Cause */
12543 /* Short Message Service Information Elements [5] 8.2 */
12544 de_rp_message_ref, /* RP-Message Reference */
12545 de_rp_orig_addr, /* RP-Origination Address */
12546 de_rp_dest_addr, /* RP-Destination Address */
12547 de_rp_user_data, /* RP-User Data */
12548 de_rp_cause, /* RP-Cause */
12549 /* Session Management Information Elements 10.5.6 */
12550 de_sm_apn, /* Access Point Name */
12551 de_sm_nsapi, /* Network Service Access Point Identifier */
12552 de_sm_pco, /* Protocol Configuration Options */
12553 de_sm_pdp_addr, /* Packet Data Protocol Address */
12554 de_sm_qos, /* Quality Of Service */
12555 de_sm_cause, /* SM Cause */
12556 de_sm_linked_ti, /* Linked TI */
12557 de_sm_sapi, /* LLC Service Access Point Identifier */
12558 de_sm_tear_down, /* Tear Down Indicator */
12559 de_sm_pflow_id, /* Packet Flow Identifier */
12560 de_sm_tflow_temp, /* Traffic Flow Template */
12561 /* GPRS Common Information Elements 10.5.7 */
12562 de_gc_context_stat, /* PDP Context Status */
12563 de_gc_radio_prio, /* Radio Priority */
12564 de_gc_timer, /* GPRS Timer */
12565 de_gc_timer2, /* GPRS Timer 2 */
12566 de_gc_radio_prio2, /* Radio Priority 2 */
12567 de_gc_mbms_context_stat, /* 10.5.7.6 MBMS context status */
12568 de_gc_spare, /* Spare Nibble */
12572 #define SET_ELEM_VARS(SEV_pdu_type, SEV_elem_names, SEV_elem_ett, SEV_elem_funcs) \
12573 switch (SEV_pdu_type) \
12575 case BSSAP_PDU_TYPE_BSSMAP: \
12576 SEV_elem_names = gsm_bssmap_elem_strings; \
12577 SEV_elem_ett = ett_gsm_bssmap_elem; \
12578 SEV_elem_funcs = bssmap_elem_fcn; \
12580 case BSSAP_PDU_TYPE_DTAP: \
12581 SEV_elem_names = gsm_dtap_elem_strings; \
12582 SEV_elem_ett = ett_gsm_dtap_elem; \
12583 SEV_elem_funcs = dtap_elem_fcn; \
12586 proto_tree_add_text(tree, \
12587 tvb, curr_offset, -1, \
12588 "Unknown PDU type (%u)", SEV_pdu_type); \
12589 return(consumed); \
12593 * Type Length Value (TLV) element dissector
12596 elem_tlv(tvbuff_t *tvb, proto_tree *tree, guint8 iei, gint pdu_type, int idx, guint32 offset, guint len, const gchar *name_add)
12598 guint8 oct, parm_len;
12600 guint32 curr_offset;
12601 proto_tree *subtree;
12603 const value_string *elem_names;
12605 guint8 (**elem_funcs)(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
12608 curr_offset = offset;
12611 SET_ELEM_VARS(pdu_type, elem_names, elem_ett, elem_funcs);
12613 oct = tvb_get_guint8(tvb, curr_offset);
12617 parm_len = tvb_get_guint8(tvb, curr_offset + 1);
12620 proto_tree_add_text(tree,
12621 tvb, curr_offset, parm_len + 2,
12623 elem_names[idx].strptr,
12624 (name_add == NULL) || (name_add[0] == '\0') ? "" : name_add);
12626 subtree = proto_item_add_subtree(item, elem_ett[idx]);
12628 proto_tree_add_uint(subtree,
12629 (BSSAP_PDU_TYPE_BSSMAP == pdu_type) ? hf_gsm_a_bssmap_elem_id : hf_gsm_a_dtap_elem_id, tvb,
12630 curr_offset, 1, oct);
12632 proto_tree_add_uint(subtree, hf_gsm_a_length, tvb,
12633 curr_offset + 1, 1, parm_len);
12637 if (elem_funcs[idx] == NULL)
12639 proto_tree_add_text(subtree,
12640 tvb, curr_offset + 2, parm_len,
12643 consumed = parm_len;
12647 gchar *a_add_string;
12649 a_add_string=ep_alloc(1024);
12650 a_add_string[0] = '\0';
12652 (*elem_funcs[idx])(tvb, subtree, curr_offset + 2,
12653 parm_len, a_add_string, 1024);
12655 if (a_add_string[0] != '\0')
12657 proto_item_append_text(item, "%s", a_add_string);
12669 * Type Value (TV) element dissector
12671 * Length cannot be used in these functions, big problem if a element dissector
12672 * is not defined for these.
12675 elem_tv(tvbuff_t *tvb, proto_tree *tree, guint8 iei, gint pdu_type, int idx, guint32 offset, const gchar *name_add)
12679 guint32 curr_offset;
12680 proto_tree *subtree;
12682 const value_string *elem_names;
12684 guint8 (**elem_funcs)(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
12686 curr_offset = offset;
12689 SET_ELEM_VARS(pdu_type, elem_names, elem_ett, elem_funcs);
12691 oct = tvb_get_guint8(tvb, curr_offset);
12696 proto_tree_add_text(tree,
12697 tvb, curr_offset, -1,
12699 elem_names[idx].strptr,
12700 (name_add == NULL) || (name_add[0] == '\0') ? "" : name_add);
12702 subtree = proto_item_add_subtree(item, elem_ett[idx]);
12704 proto_tree_add_uint(subtree,
12705 (BSSAP_PDU_TYPE_BSSMAP == pdu_type) ? hf_gsm_a_bssmap_elem_id : hf_gsm_a_dtap_elem_id, tvb,
12706 curr_offset, 1, oct);
12708 if (elem_funcs[idx] == NULL)
12710 /* BAD THING, CANNOT DETERMINE LENGTH */
12712 proto_tree_add_text(subtree,
12713 tvb, curr_offset + 1, 1,
12714 "No element dissector, rest of dissection may be incorrect");
12720 gchar *a_add_string;
12722 a_add_string=ep_alloc(1024);
12723 a_add_string[0] = '\0';
12724 consumed = (*elem_funcs[idx])(tvb, subtree, curr_offset + 1, -1, a_add_string, 1024);
12726 if (a_add_string[0] != '\0')
12728 proto_item_append_text(item, "%s", a_add_string);
12734 proto_item_set_len(item, consumed);
12741 * Type Value (TV) element dissector
12742 * Where top half nibble is IEI and bottom half nibble is value.
12744 * Length cannot be used in these functions, big problem if a element dissector
12745 * is not defined for these.
12748 elem_tv_short(tvbuff_t *tvb, proto_tree *tree, guint8 iei, gint pdu_type, int idx, guint32 offset, const gchar *name_add)
12752 guint32 curr_offset;
12753 proto_tree *subtree;
12755 const value_string *elem_names;
12757 guint8 (**elem_funcs)(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
12759 curr_offset = offset;
12762 SET_ELEM_VARS(pdu_type, elem_names, elem_ett, elem_funcs);
12764 oct = tvb_get_guint8(tvb, curr_offset);
12766 if ((oct & 0xf0) == (iei & 0xf0))
12769 proto_tree_add_text(tree,
12770 tvb, curr_offset, -1,
12772 elem_names[idx].strptr,
12773 (name_add == NULL) || (name_add[0] == '\0') ? "" : name_add);
12775 subtree = proto_item_add_subtree(item, elem_ett[idx]);
12777 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
12778 proto_tree_add_text(subtree,
12779 tvb, curr_offset, 1,
12783 if (elem_funcs[idx] == NULL)
12785 /* BAD THING, CANNOT DETERMINE LENGTH */
12787 proto_tree_add_text(subtree,
12788 tvb, curr_offset, 1,
12789 "No element dissector, rest of dissection may be incorrect");
12795 gchar *a_add_string;
12797 a_add_string=ep_alloc(1024);
12798 a_add_string[0] = '\0';
12799 consumed = (*elem_funcs[idx])(tvb, subtree, curr_offset, -1, a_add_string, 1024);
12801 if (a_add_string[0] != '\0')
12803 proto_item_append_text(item, "%s", a_add_string);
12807 proto_item_set_len(item, consumed);
12814 * Type (T) element dissector
12817 elem_t(tvbuff_t *tvb, proto_tree *tree, guint8 iei, gint pdu_type, int idx, guint32 offset, const gchar *name_add)
12820 guint32 curr_offset;
12822 const value_string *elem_names;
12824 guint8 (**elem_funcs)(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
12826 curr_offset = offset;
12829 SET_ELEM_VARS(pdu_type, elem_names, elem_ett, elem_funcs);
12831 oct = tvb_get_guint8(tvb, curr_offset);
12835 proto_tree_add_uint_format(tree,
12836 (BSSAP_PDU_TYPE_BSSMAP == pdu_type) ? hf_gsm_a_bssmap_elem_id : hf_gsm_a_dtap_elem_id, tvb,
12837 curr_offset, 1, oct,
12839 elem_names[idx].strptr,
12840 (name_add == NULL) || (name_add[0] == '\0') ? "" : name_add);
12849 * Length Value (LV) element dissector
12852 elem_lv(tvbuff_t *tvb, proto_tree *tree, gint pdu_type, int idx, guint32 offset, guint len, const gchar *name_add)
12856 guint32 curr_offset;
12857 proto_tree *subtree;
12859 const value_string *elem_names;
12861 guint8 (**elem_funcs)(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
12864 curr_offset = offset;
12867 SET_ELEM_VARS(pdu_type, elem_names, elem_ett, elem_funcs);
12869 parm_len = tvb_get_guint8(tvb, curr_offset);
12872 proto_tree_add_text(tree,
12873 tvb, curr_offset, parm_len + 1,
12875 elem_names[idx].strptr,
12876 (name_add == NULL) || (name_add[0] == '\0') ? "" : name_add);
12878 subtree = proto_item_add_subtree(item, elem_ett[idx]);
12880 proto_tree_add_uint(subtree, hf_gsm_a_length, tvb,
12881 curr_offset, 1, parm_len);
12885 if (elem_funcs[idx] == NULL)
12887 proto_tree_add_text(subtree,
12888 tvb, curr_offset + 1, parm_len,
12891 consumed = parm_len;
12895 gchar *a_add_string;
12897 a_add_string=ep_alloc(1024);
12898 a_add_string[0] = '\0';
12900 (*elem_funcs[idx])(tvb, subtree, curr_offset + 1,
12901 parm_len, a_add_string, 1024);
12903 if (a_add_string[0] != '\0')
12905 proto_item_append_text(item, "%s", a_add_string);
12910 return(consumed + 1);
12914 * Value (V) element dissector
12916 * Length cannot be used in these functions, big problem if a element dissector
12917 * is not defined for these.
12920 elem_v(tvbuff_t *tvb, proto_tree *tree, gint pdu_type, int idx, guint32 offset)
12923 guint32 curr_offset;
12924 const value_string *elem_names;
12926 guint8 (**elem_funcs)(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
12928 curr_offset = offset;
12931 SET_ELEM_VARS(pdu_type, elem_names, elem_ett, elem_funcs);
12933 if (elem_funcs[idx] == NULL)
12935 /* BAD THING, CANNOT DETERMINE LENGTH */
12937 proto_tree_add_text(tree,
12938 tvb, curr_offset, 1,
12939 "No element dissector, rest of dissection may be incorrect");
12945 gchar *a_add_string;
12947 a_add_string=ep_alloc(1024);
12948 a_add_string[0] = '\0';
12949 consumed = (*elem_funcs[idx])(tvb, tree, curr_offset, -1, a_add_string, 1024);
12955 #define ELEM_MAND_TLV(EMT_iei, EMT_pdu_type, EMT_elem_idx, EMT_elem_name_addition) \
12957 if ((consumed = elem_tlv(tvb, tree, (guint8) EMT_iei, EMT_pdu_type, EMT_elem_idx, curr_offset, curr_len, EMT_elem_name_addition)) > 0) \
12959 curr_offset += consumed; \
12960 curr_len -= consumed; \
12964 proto_tree_add_text(tree, \
12965 tvb, curr_offset, 0, \
12966 "Missing Mandatory element (0x%02x) %s%s, rest of dissection is suspect", \
12968 (EMT_pdu_type == BSSAP_PDU_TYPE_BSSMAP) ? \
12969 gsm_bssmap_elem_strings[EMT_elem_idx].strptr : gsm_dtap_elem_strings[EMT_elem_idx].strptr, \
12970 (EMT_elem_name_addition == NULL) || (EMT_elem_name_addition[0] == '\0') ? "" : EMT_elem_name_addition \
12973 if (curr_len <= 0) return; \
12976 #define ELEM_OPT_TLV(EOT_iei, EOT_pdu_type, EOT_elem_idx, EOT_elem_name_addition) \
12978 if ((consumed = elem_tlv(tvb, tree, (guint8) EOT_iei, EOT_pdu_type, EOT_elem_idx, curr_offset, curr_len, EOT_elem_name_addition)) > 0) \
12980 curr_offset += consumed; \
12981 curr_len -= consumed; \
12983 if (curr_len <= 0) return; \
12986 #define ELEM_MAND_TV(EMT_iei, EMT_pdu_type, EMT_elem_idx, EMT_elem_name_addition) \
12988 if ((consumed = elem_tv(tvb, tree, (guint8) EMT_iei, EMT_pdu_type, EMT_elem_idx, curr_offset, EMT_elem_name_addition)) > 0) \
12990 curr_offset += consumed; \
12991 curr_len -= consumed; \
12995 proto_tree_add_text(tree, \
12996 tvb, curr_offset, 0, \
12997 "Missing Mandatory element (0x%02x) %s%s, rest of dissection is suspect", \
12999 (EMT_pdu_type == BSSAP_PDU_TYPE_BSSMAP) ? \
13000 gsm_bssmap_elem_strings[EMT_elem_idx].strptr : gsm_dtap_elem_strings[EMT_elem_idx].strptr, \
13001 (EMT_elem_name_addition == NULL) || (EMT_elem_name_addition[0] == '\0') ? "" : EMT_elem_name_addition \
13004 if (curr_len <= 0) return; \
13007 #define ELEM_OPT_TV(EOT_iei, EOT_pdu_type, EOT_elem_idx, EOT_elem_name_addition) \
13009 if ((consumed = elem_tv(tvb, tree, (guint8) EOT_iei, EOT_pdu_type, EOT_elem_idx, curr_offset, EOT_elem_name_addition)) > 0) \
13011 curr_offset += consumed; \
13012 curr_len -= consumed; \
13014 if (curr_len <= 0) return; \
13017 #define ELEM_OPT_TV_SHORT(EOT_iei, EOT_pdu_type, EOT_elem_idx, EOT_elem_name_addition) \
13019 if ((consumed = elem_tv_short(tvb, tree, EOT_iei, EOT_pdu_type, EOT_elem_idx, curr_offset, EOT_elem_name_addition)) > 0) \
13021 curr_offset += consumed; \
13022 curr_len -= consumed; \
13024 if (curr_len <= 0) return; \
13027 #define ELEM_OPT_T(EOT_iei, EOT_pdu_type, EOT_elem_idx, EOT_elem_name_addition) \
13029 if ((consumed = elem_t(tvb, tree, (guint8) EOT_iei, EOT_pdu_type, EOT_elem_idx, curr_offset, EOT_elem_name_addition)) > 0) \
13031 curr_offset += consumed; \
13032 curr_len -= consumed; \
13034 if (curr_len <= 0) return; \
13037 #define ELEM_MAND_LV(EML_pdu_type, EML_elem_idx, EML_elem_name_addition) \
13039 if ((consumed = elem_lv(tvb, tree, EML_pdu_type, EML_elem_idx, curr_offset, curr_len, EML_elem_name_addition)) > 0) \
13041 curr_offset += consumed; \
13042 curr_len -= consumed; \
13046 /* Mandatory, but nothing we can do */ \
13048 if (curr_len <= 0) return; \
13051 #define ELEM_MAND_V(EMV_pdu_type, EMV_elem_idx) \
13053 if ((consumed = elem_v(tvb, tree, EMV_pdu_type, EMV_elem_idx, curr_offset)) > 0) \
13055 curr_offset += consumed; \
13056 curr_len -= consumed; \
13060 /* Mandatory, but nothing we can do */ \
13062 if (curr_len <= 0) return; \
13066 /* MESSAGE FUNCTIONS */
13072 bssmap_ass_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
13074 guint32 curr_offset;
13078 curr_offset = offset;
13081 is_uplink = IS_UPLINK_FALSE;
13083 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CHAN_TYPE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CHAN_TYPE, "");
13085 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_L3_HEADER_INFO].value, BSSAP_PDU_TYPE_BSSMAP, BE_L3_HEADER_INFO, "");
13087 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_PRIO].value, BSSAP_PDU_TYPE_BSSMAP, BE_PRIO, "");
13089 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
13091 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_DOWN_DTX_FLAG].value, BSSAP_PDU_TYPE_BSSMAP, BE_DOWN_DTX_FLAG, "");
13093 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_INT_BAND].value, BSSAP_PDU_TYPE_BSSMAP, BE_INT_BAND, "");
13095 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_CM_INFO_2].value, BSSAP_PDU_TYPE_BSSMAP, BE_CM_INFO_2, "");
13097 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_GROUP_CALL_REF].value, BSSAP_PDU_TYPE_BSSMAP, BE_GROUP_CALL_REF, "");
13099 ELEM_OPT_T(gsm_bssmap_elem_strings[BE_TALKER_FLAG].value, BSSAP_PDU_TYPE_BSSMAP, BE_TALKER_FLAG, "");
13101 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_LSA_ACC_CTRL].value, BSSAP_PDU_TYPE_BSSMAP, BE_LSA_ACC_CTRL, "");
13103 EXTRANEOUS_DATA_CHECK(curr_len, 0);
13110 bssmap_ass_complete(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
13112 guint32 curr_offset;
13116 curr_offset = offset;
13119 is_uplink = IS_UPLINK_TRUE;
13121 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_RR_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_RR_CAUSE, "");
13123 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
13125 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_CELL_ID].value, BSSAP_PDU_TYPE_BSSMAP, BE_CELL_ID, "");
13127 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CHOSEN_CHAN].value, BSSAP_PDU_TYPE_BSSMAP, BE_CHOSEN_CHAN, "");
13129 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CHOSEN_ENC_ALG].value, BSSAP_PDU_TYPE_BSSMAP, BE_CHOSEN_ENC_ALG, "");
13131 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CCT_POOL].value, BSSAP_PDU_TYPE_BSSMAP, BE_CCT_POOL, "");
13133 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_SPEECH_VER].value, BSSAP_PDU_TYPE_BSSMAP, BE_SPEECH_VER, " (Chosen)");
13135 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_LSA_ID].value, BSSAP_PDU_TYPE_BSSMAP, BE_LSA_ID, "");
13137 EXTRANEOUS_DATA_CHECK(curr_len, 0);
13144 bssmap_ass_failure(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
13146 guint32 curr_offset;
13150 curr_offset = offset;
13153 is_uplink = IS_UPLINK_TRUE;
13155 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
13157 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_RR_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_RR_CAUSE, "");
13159 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CCT_POOL].value, BSSAP_PDU_TYPE_BSSMAP, BE_CCT_POOL, "");
13161 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_CCT_POOL_LIST].value, BSSAP_PDU_TYPE_BSSMAP, BE_CCT_POOL_LIST, "");
13163 EXTRANEOUS_DATA_CHECK(curr_len, 0);
13170 bssmap_block(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
13172 guint32 curr_offset;
13176 curr_offset = offset;
13179 is_uplink = IS_UPLINK_TRUE;
13181 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
13183 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
13185 ELEM_OPT_T(gsm_bssmap_elem_strings[BE_CONN_REL_REQ].value, BSSAP_PDU_TYPE_BSSMAP, BE_CONN_REL_REQ, "");
13187 EXTRANEOUS_DATA_CHECK(curr_len, 0);
13194 bssmap_block_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
13196 guint32 curr_offset;
13200 curr_offset = offset;
13203 is_uplink = IS_UPLINK_TRUE;
13205 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
13207 EXTRANEOUS_DATA_CHECK(curr_len, 0);
13214 bssmap_unblock(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
13216 guint32 curr_offset;
13220 curr_offset = offset;
13223 is_uplink = IS_UPLINK_TRUE;
13225 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
13227 ELEM_OPT_T(gsm_bssmap_elem_strings[BE_CONN_REL_REQ].value, BSSAP_PDU_TYPE_BSSMAP, BE_CONN_REL_REQ, "");
13229 EXTRANEOUS_DATA_CHECK(curr_len, 0);
13236 bssmap_unblock_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
13238 guint32 curr_offset;
13242 curr_offset = offset;
13245 is_uplink = IS_UPLINK_TRUE;
13247 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
13249 EXTRANEOUS_DATA_CHECK(curr_len, 0);
13256 bssmap_ho_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
13258 guint32 curr_offset;
13262 curr_offset = offset;
13265 is_uplink = IS_UPLINK_FALSE;
13267 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CHAN_TYPE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CHAN_TYPE, "");
13269 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_ENC_INFO].value, BSSAP_PDU_TYPE_BSSMAP, BE_ENC_INFO, "");
13271 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CM_INFO_1].value, BSSAP_PDU_TYPE_BSSMAP, BE_CM_INFO_1, "");
13273 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_CM_INFO_2].value, BSSAP_PDU_TYPE_BSSMAP, BE_CM_INFO_2, "");
13275 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CELL_ID].value, BSSAP_PDU_TYPE_BSSMAP, BE_CELL_ID, " (Serving)");
13277 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_PRIO].value, BSSAP_PDU_TYPE_BSSMAP, BE_PRIO, "");
13279 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
13281 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_DOWN_DTX_FLAG].value, BSSAP_PDU_TYPE_BSSMAP, BE_DOWN_DTX_FLAG, "");
13283 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CELL_ID].value, BSSAP_PDU_TYPE_BSSMAP, BE_CELL_ID, " (Target)");
13285 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_INT_BAND].value, BSSAP_PDU_TYPE_BSSMAP, BE_INT_BAND, "");
13287 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
13289 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_CM_INFO_3].value, BSSAP_PDU_TYPE_BSSMAP, BE_CM_INFO_3, "");
13291 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CURR_CHAN_1].value, BSSAP_PDU_TYPE_BSSMAP, BE_CURR_CHAN_1, "");
13293 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_SPEECH_VER].value, BSSAP_PDU_TYPE_BSSMAP, BE_SPEECH_VER, " (Used)");
13295 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_GROUP_CALL_REF].value, BSSAP_PDU_TYPE_BSSMAP, BE_GROUP_CALL_REF, "");
13297 ELEM_OPT_T(gsm_bssmap_elem_strings[BE_TALKER_FLAG].value, BSSAP_PDU_TYPE_BSSMAP, BE_TALKER_FLAG, "");
13299 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CONF_EVO_IND].value, BSSAP_PDU_TYPE_BSSMAP, BE_CONF_EVO_IND, "");
13301 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CHOSEN_ENC_ALG].value, BSSAP_PDU_TYPE_BSSMAP, BE_CHOSEN_ENC_ALG, " (Serving)");
13303 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_OLD2NEW_INFO].value, BSSAP_PDU_TYPE_BSSMAP, BE_OLD2NEW_INFO, "");
13305 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_LSA_INFO].value, BSSAP_PDU_TYPE_BSSMAP, BE_LSA_INFO, "");
13307 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_LSA_ACC_CTRL].value, BSSAP_PDU_TYPE_BSSMAP, BE_LSA_ACC_CTRL, "");
13309 EXTRANEOUS_DATA_CHECK(curr_len, 0);
13316 bssmap_ho_reqd(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
13318 guint32 curr_offset;
13322 curr_offset = offset;
13325 is_uplink = IS_UPLINK_TRUE;
13327 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
13329 ELEM_OPT_T(gsm_bssmap_elem_strings[BE_RESP_REQ].value, BSSAP_PDU_TYPE_BSSMAP, BE_RESP_REQ, "");
13331 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CELL_ID_LIST].value, BSSAP_PDU_TYPE_BSSMAP, BE_CELL_ID_LIST, " (Preferred)");
13333 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_CCT_POOL_LIST].value, BSSAP_PDU_TYPE_BSSMAP, BE_CCT_POOL_LIST, "");
13335 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CURR_CHAN_1].value, BSSAP_PDU_TYPE_BSSMAP, BE_CURR_CHAN_1, "");
13337 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_SPEECH_VER].value, BSSAP_PDU_TYPE_BSSMAP, BE_SPEECH_VER, " (Used)");
13339 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_QUE_IND].value, BSSAP_PDU_TYPE_BSSMAP, BE_QUE_IND, "");
13341 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_OLD2NEW_INFO].value, BSSAP_PDU_TYPE_BSSMAP, BE_OLD2NEW_INFO, "");
13343 EXTRANEOUS_DATA_CHECK(curr_len, 0);
13350 bssmap_ho_req_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
13352 guint32 curr_offset;
13356 curr_offset = offset;
13359 is_uplink = IS_UPLINK_TRUE;
13361 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_L3_INFO].value, BSSAP_PDU_TYPE_BSSMAP, BE_L3_INFO, "");
13363 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CHOSEN_CHAN].value, BSSAP_PDU_TYPE_BSSMAP, BE_CHOSEN_CHAN, "");
13365 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CHOSEN_ENC_ALG].value, BSSAP_PDU_TYPE_BSSMAP, BE_CHOSEN_ENC_ALG, "");
13367 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CCT_POOL].value, BSSAP_PDU_TYPE_BSSMAP, BE_CCT_POOL, "");
13369 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_SPEECH_VER].value, BSSAP_PDU_TYPE_BSSMAP, BE_SPEECH_VER, " (Chosen)");
13371 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
13373 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_LSA_ID].value, BSSAP_PDU_TYPE_BSSMAP, BE_LSA_ID, "");
13375 EXTRANEOUS_DATA_CHECK(curr_len, 0);
13382 bssmap_ho_cmd(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
13384 guint32 curr_offset;
13388 curr_offset = offset;
13391 is_uplink = IS_UPLINK_FALSE;
13393 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_L3_INFO].value, BSSAP_PDU_TYPE_BSSMAP, BE_L3_INFO, "");
13395 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_CELL_ID].value, BSSAP_PDU_TYPE_BSSMAP, BE_CELL_ID, "");
13397 EXTRANEOUS_DATA_CHECK(curr_len, 0);
13404 bssmap_ho_complete(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
13406 guint32 curr_offset;
13410 curr_offset = offset;
13413 is_uplink = IS_UPLINK_TRUE;
13415 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_RR_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_RR_CAUSE, "");
13417 EXTRANEOUS_DATA_CHECK(curr_len, 0);
13424 bssmap_ho_cand_enq(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
13426 guint32 curr_offset;
13430 curr_offset = offset;
13433 is_uplink = IS_UPLINK_FALSE;
13435 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_NUM_MS].value, BSSAP_PDU_TYPE_BSSMAP, BE_NUM_MS, "");
13437 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CELL_ID_LIST].value, BSSAP_PDU_TYPE_BSSMAP, BE_CELL_ID_LIST, "");
13439 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CELL_ID].value, BSSAP_PDU_TYPE_BSSMAP, BE_CELL_ID, "");
13441 EXTRANEOUS_DATA_CHECK(curr_len, 0);
13448 bssmap_ho_cand_resp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
13450 guint32 curr_offset;
13454 curr_offset = offset;
13457 is_uplink = IS_UPLINK_TRUE;
13459 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_NUM_MS].value, BSSAP_PDU_TYPE_BSSMAP, BE_NUM_MS, "");
13461 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CELL_ID].value, BSSAP_PDU_TYPE_BSSMAP, BE_CELL_ID, "");
13463 EXTRANEOUS_DATA_CHECK(curr_len, 0);
13470 bssmap_ho_failure(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
13472 guint32 curr_offset;
13476 curr_offset = offset;
13479 is_uplink = IS_UPLINK_TRUE;
13481 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
13483 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_RR_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_RR_CAUSE, "");
13485 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CCT_POOL].value, BSSAP_PDU_TYPE_BSSMAP, BE_CCT_POOL, "");
13487 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_CCT_POOL_LIST].value, BSSAP_PDU_TYPE_BSSMAP, BE_CCT_POOL_LIST, "");
13489 EXTRANEOUS_DATA_CHECK(curr_len, 0);
13496 bssmap_paging(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
13498 guint32 curr_offset;
13502 curr_offset = offset;
13505 is_uplink = IS_UPLINK_FALSE;
13507 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_IMSI].value, BSSAP_PDU_TYPE_BSSMAP, BE_IMSI, "");
13509 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_TMSI].value, BSSAP_PDU_TYPE_BSSMAP, BE_TMSI, "");
13511 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CELL_ID_LIST].value, BSSAP_PDU_TYPE_BSSMAP, BE_CELL_ID_LIST, "");
13513 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CHAN_NEEDED].value, BSSAP_PDU_TYPE_BSSMAP, BE_CHAN_NEEDED, "");
13515 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_EMLPP_PRIO].value, BSSAP_PDU_TYPE_BSSMAP, BE_EMLPP_PRIO, "");
13517 EXTRANEOUS_DATA_CHECK(curr_len, 0);
13524 bssmap_clear_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
13526 guint32 curr_offset;
13530 curr_offset = offset;
13533 is_uplink = IS_UPLINK_TRUE;
13535 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
13537 EXTRANEOUS_DATA_CHECK(curr_len, 0);
13544 bssmap_clear_cmd(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
13546 guint32 curr_offset;
13550 curr_offset = offset;
13553 is_uplink = IS_UPLINK_FALSE;
13555 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_L3_HEADER_INFO].value, BSSAP_PDU_TYPE_BSSMAP, BE_L3_HEADER_INFO, "");
13557 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
13559 EXTRANEOUS_DATA_CHECK(curr_len, 0);
13566 bssmap_reset(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
13568 guint32 curr_offset;
13572 curr_offset = offset;
13575 is_uplink = IS_UPLINK_UNKNOWN;
13577 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
13579 EXTRANEOUS_DATA_CHECK(curr_len, 0);
13586 bssmap_ho_performed(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
13588 guint32 curr_offset;
13592 curr_offset = offset;
13595 is_uplink = IS_UPLINK_TRUE;
13597 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
13599 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CELL_ID].value, BSSAP_PDU_TYPE_BSSMAP, BE_CELL_ID, "");
13601 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CHOSEN_CHAN].value, BSSAP_PDU_TYPE_BSSMAP, BE_CHOSEN_CHAN, "");
13603 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CHOSEN_ENC_ALG].value, BSSAP_PDU_TYPE_BSSMAP, BE_CHOSEN_ENC_ALG, "");
13605 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_SPEECH_VER].value, BSSAP_PDU_TYPE_BSSMAP, BE_SPEECH_VER, " (Chosen)");
13607 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_LSA_ID].value, BSSAP_PDU_TYPE_BSSMAP, BE_LSA_ID, "");
13609 EXTRANEOUS_DATA_CHECK(curr_len, 0);
13616 bssmap_overload(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
13618 guint32 curr_offset;
13622 curr_offset = offset;
13625 is_uplink = IS_UPLINK_TRUE;
13627 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
13629 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_CELL_ID].value, BSSAP_PDU_TYPE_BSSMAP, BE_CELL_ID, "");
13631 EXTRANEOUS_DATA_CHECK(curr_len, 0);
13638 bssmap_cm_upd(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
13640 guint32 curr_offset;
13644 curr_offset = offset;
13647 is_uplink = IS_UPLINK_FALSE;
13649 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CM_INFO_2].value, BSSAP_PDU_TYPE_BSSMAP, BE_CM_INFO_2, "");
13651 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_CM_INFO_3].value, BSSAP_PDU_TYPE_BSSMAP, BE_CM_INFO_3, "");
13653 EXTRANEOUS_DATA_CHECK(curr_len, 0);
13660 bssmap_ciph_mode_cmd(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
13662 guint32 curr_offset;
13666 curr_offset = offset;
13669 is_uplink = IS_UPLINK_FALSE;
13671 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_L3_HEADER_INFO].value, BSSAP_PDU_TYPE_BSSMAP, BE_L3_HEADER_INFO, "");
13673 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_ENC_INFO].value, BSSAP_PDU_TYPE_BSSMAP, BE_ENC_INFO, "");
13675 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CIPH_RESP_MODE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIPH_RESP_MODE, "");
13677 EXTRANEOUS_DATA_CHECK(curr_len, 0);
13684 bssmap_ciph_mode_complete(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
13686 guint32 curr_offset;
13690 curr_offset = offset;
13693 is_uplink = IS_UPLINK_TRUE;
13695 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_L3_MSG].value, BSSAP_PDU_TYPE_BSSMAP, BE_L3_MSG, "");
13697 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CHOSEN_ENC_ALG].value, BSSAP_PDU_TYPE_BSSMAP, BE_CHOSEN_ENC_ALG, "");
13699 EXTRANEOUS_DATA_CHECK(curr_len, 0);
13706 bssmap_cl3_info(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
13709 guint32 curr_offset;
13712 curr_offset = offset;
13715 is_uplink = IS_UPLINK_TRUE;
13717 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CELL_ID].value, BSSAP_PDU_TYPE_BSSMAP, BE_CELL_ID, "");
13719 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_L3_INFO].value, BSSAP_PDU_TYPE_BSSMAP, BE_L3_INFO, "");
13721 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CHOSEN_CHAN].value, BSSAP_PDU_TYPE_BSSMAP, BE_CHOSEN_CHAN, "");
13723 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_LSA_ID_LIST].value, BSSAP_PDU_TYPE_BSSMAP, BE_LSA_ID_LIST, "");
13725 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_APDU].value, BSSAP_PDU_TYPE_BSSMAP, BE_APDU, "");
13727 EXTRANEOUS_DATA_CHECK(curr_len, 0);
13734 bssmap_sapi_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
13737 guint32 curr_offset;
13740 curr_offset = offset;
13743 is_uplink = IS_UPLINK_TRUE;
13745 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_DLCI].value, BSSAP_PDU_TYPE_BSSMAP, BE_DLCI, "");
13747 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
13749 EXTRANEOUS_DATA_CHECK(curr_len, 0);
13756 bssmap_ho_reqd_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
13758 guint32 curr_offset;
13762 curr_offset = offset;
13765 is_uplink = IS_UPLINK_FALSE;
13767 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
13769 EXTRANEOUS_DATA_CHECK(curr_len, 0);
13776 bssmap_reset_cct(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
13778 guint32 curr_offset;
13782 curr_offset = offset;
13785 is_uplink = IS_UPLINK_TRUE;
13787 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
13789 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
13791 EXTRANEOUS_DATA_CHECK(curr_len, 0);
13798 bssmap_reset_cct_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
13800 guint32 curr_offset;
13804 curr_offset = offset;
13807 is_uplink = IS_UPLINK_TRUE;
13809 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
13811 EXTRANEOUS_DATA_CHECK(curr_len, 0);
13818 bssmap_cct_group_block(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
13820 guint32 curr_offset;
13824 curr_offset = offset;
13827 is_uplink = IS_UPLINK_TRUE;
13829 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
13831 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
13833 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC_LIST].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC_LIST, "");
13835 EXTRANEOUS_DATA_CHECK(curr_len, 0);
13842 bssmap_cct_group_block_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
13844 guint32 curr_offset;
13848 curr_offset = offset;
13851 is_uplink = IS_UPLINK_TRUE;
13853 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
13855 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC_LIST].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC_LIST, "");
13857 EXTRANEOUS_DATA_CHECK(curr_len, 0);
13864 bssmap_cct_group_unblock(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
13866 guint32 curr_offset;
13870 curr_offset = offset;
13873 is_uplink = IS_UPLINK_TRUE;
13875 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
13877 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC_LIST].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC_LIST, "");
13879 EXTRANEOUS_DATA_CHECK(curr_len, 0);
13886 bssmap_cct_group_unblock_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
13888 guint32 curr_offset;
13892 curr_offset = offset;
13895 is_uplink = IS_UPLINK_TRUE;
13897 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
13899 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC_LIST].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC_LIST, "");
13901 EXTRANEOUS_DATA_CHECK(curr_len, 0);
13908 bssmap_confusion(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
13910 guint32 curr_offset;
13914 curr_offset = offset;
13917 is_uplink = IS_UPLINK_TRUE;
13919 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
13921 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_DIAG].value, BSSAP_PDU_TYPE_BSSMAP, BE_DIAG, "");
13923 EXTRANEOUS_DATA_CHECK(curr_len, 0);
13930 bssmap_unequipped_cct(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
13932 guint32 curr_offset;
13936 curr_offset = offset;
13939 is_uplink = IS_UPLINK_TRUE;
13941 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
13943 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CIC_LIST].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC_LIST, "");
13945 EXTRANEOUS_DATA_CHECK(curr_len, 0);
13952 bssmap_ciph_mode_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
13954 guint32 curr_offset;
13958 curr_offset = offset;
13961 is_uplink = IS_UPLINK_TRUE;
13963 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
13965 EXTRANEOUS_DATA_CHECK(curr_len, 0);
13972 bssmap_load_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
13974 guint32 curr_offset;
13978 curr_offset = offset;
13981 is_uplink = IS_UPLINK_TRUE;
13983 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_TIME_IND].value, BSSAP_PDU_TYPE_BSSMAP, BE_TIME_IND, "");
13985 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CELL_ID].value, BSSAP_PDU_TYPE_BSSMAP, BE_CELL_ID, "");
13987 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CELL_ID_LIST].value, BSSAP_PDU_TYPE_BSSMAP, BE_CELL_ID_LIST, " (Target)");
13989 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_RES_SIT].value, BSSAP_PDU_TYPE_BSSMAP, BE_RES_SIT, "");
13991 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
13993 EXTRANEOUS_DATA_CHECK(curr_len, 0);
14000 bssmap_change_cct(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
14002 guint32 curr_offset;
14006 curr_offset = offset;
14009 is_uplink = IS_UPLINK_FALSE;
14011 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
14013 EXTRANEOUS_DATA_CHECK(curr_len, 0);
14020 bssmap_change_cct_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
14022 guint32 curr_offset;
14026 curr_offset = offset;
14029 is_uplink = IS_UPLINK_TRUE;
14031 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
14033 EXTRANEOUS_DATA_CHECK(curr_len, 0);
14040 bssmap_common_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
14042 guint32 curr_offset;
14046 curr_offset = offset;
14049 is_uplink = IS_UPLINK_FALSE;
14051 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_IMSI].value, BSSAP_PDU_TYPE_BSSMAP, BE_IMSI, "");
14053 EXTRANEOUS_DATA_CHECK(curr_len, 0);
14060 bssmap_lsa_info(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
14062 guint32 curr_offset;
14066 curr_offset = offset;
14069 is_uplink = IS_UPLINK_FALSE;
14071 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_LSA_INFO].value, BSSAP_PDU_TYPE_BSSMAP, BE_LSA_INFO, "");
14073 EXTRANEOUS_DATA_CHECK(curr_len, 0);
14080 bssmap_conn_oriented(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
14082 guint32 curr_offset;
14086 curr_offset = offset;
14089 is_uplink = IS_UPLINK_FALSE;
14091 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_APDU].value, BSSAP_PDU_TYPE_BSSMAP, BE_APDU, "");
14093 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_SEG].value, BSSAP_PDU_TYPE_BSSMAP, BE_SEG, "");
14095 EXTRANEOUS_DATA_CHECK(curr_len, 0);
14099 #define NUM_GSM_BSSMAP_MSG (sizeof(gsm_a_bssmap_msg_strings)/sizeof(value_string))
14100 static gint ett_gsm_bssmap_msg[NUM_GSM_BSSMAP_MSG];
14101 static void (*bssmap_msg_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) = {
14102 bssmap_ass_req, /* Assignment Request */
14103 bssmap_ass_complete, /* Assignment Complete */
14104 bssmap_ass_failure, /* Assignment Failure */
14105 bssmap_ho_req, /* Handover Request */
14106 bssmap_ho_reqd, /* Handover Required */
14107 bssmap_ho_req_ack, /* Handover Request Acknowledge */
14108 bssmap_ho_cmd, /* Handover Command */
14109 bssmap_ho_complete, /* Handover Complete */
14110 NULL /* no associated data */, /* Handover Succeeded */
14111 bssmap_ho_failure, /* Handover Failure */
14112 bssmap_ho_performed, /* Handover Performed */
14113 bssmap_ho_cand_enq, /* Handover Candidate Enquire */
14114 bssmap_ho_cand_resp, /* Handover Candidate Response */
14115 bssmap_ho_reqd_rej, /* Handover Required Reject */
14116 NULL /* no associated data */, /* Handover Detect */
14117 bssmap_clear_cmd, /* Clear Command */
14118 NULL /* no associated data */, /* Clear Complete */
14119 bssmap_clear_req, /* Clear Request */
14120 NULL, /* Reserved */
14121 NULL, /* Reserved */
14122 bssmap_sapi_rej, /* SAPI 'n' Reject */
14123 bssmap_confusion, /* Confusion */
14124 NULL, /* Suspend */
14126 bssmap_conn_oriented, /* Connection Oriented Information */
14127 NULL, /* Perform Location Request */
14128 bssmap_lsa_info, /* LSA Information */
14129 NULL, /* Perform Location Response */
14130 NULL, /* Perform Location Abort */
14131 bssmap_common_id, /* Common Id */
14132 bssmap_reset, /* Reset */
14133 NULL /* no associated data */, /* Reset Acknowledge */
14134 bssmap_overload, /* Overload */
14135 NULL, /* Reserved */
14136 bssmap_reset_cct, /* Reset Circuit */
14137 bssmap_reset_cct_ack, /* Reset Circuit Acknowledge */
14138 NULL, /* MSC Invoke Trace */
14139 NULL, /* BSS Invoke Trace */
14140 NULL, /* Connectionless Information */
14141 bssmap_block, /* Block */
14142 bssmap_block_ack, /* Blocking Acknowledge */
14143 bssmap_unblock, /* Unblock */
14144 bssmap_unblock_ack, /* Unblocking Acknowledge */
14145 bssmap_cct_group_block, /* Circuit Group Block */
14146 bssmap_cct_group_block_ack, /* Circuit Group Blocking Acknowledge */
14147 bssmap_cct_group_unblock, /* Circuit Group Unblock */
14148 bssmap_cct_group_unblock_ack, /* Circuit Group Unblocking Acknowledge */
14149 bssmap_unequipped_cct, /* Unequipped Circuit */
14150 bssmap_change_cct, /* Change Circuit */
14151 bssmap_change_cct_ack, /* Change Circuit Acknowledge */
14152 NULL, /* Resource Request */
14153 NULL, /* Resource Indication */
14154 bssmap_paging, /* Paging */
14155 bssmap_ciph_mode_cmd, /* Cipher Mode Command */
14156 bssmap_cm_upd, /* Classmark Update */
14157 bssmap_ciph_mode_complete, /* Cipher Mode Complete */
14158 NULL /* no associated data */, /* Queuing Indication */
14159 bssmap_cl3_info, /* Complete Layer 3 Information */
14160 NULL /* no associated data */, /* Classmark Request */
14161 bssmap_ciph_mode_rej, /* Cipher Mode Reject */
14162 bssmap_load_ind, /* Load Indication */
14163 NULL, /* VGCS/VBS Setup */
14164 NULL, /* VGCS/VBS Setup Ack */
14165 NULL, /* VGCS/VBS Setup Refuse */
14166 NULL, /* VGCS/VBS Assignment Request */
14167 NULL, /* VGCS/VBS Assignment Result */
14168 NULL, /* VGCS/VBS Assignment Failure */
14169 NULL, /* VGCS/VBS Queuing Indication */
14170 NULL, /* Uplink Request */
14171 NULL, /* Uplink Request Acknowledge */
14172 NULL, /* Uplink Request Confirmation */
14173 NULL, /* Uplink Release Indication */
14174 NULL, /* Uplink Reject Command */
14175 NULL, /* Uplink Release Command */
14176 NULL, /* Uplink Seized Command */
14184 dtap_mm_auth_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
14186 guint32 curr_offset;
14190 proto_tree *subtree;
14193 curr_offset = offset;
14196 is_uplink = IS_UPLINK_FALSE;
14199 * special dissection for Cipher Key Sequence Number
14201 oct = tvb_get_guint8(tvb, curr_offset);
14203 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
14204 proto_tree_add_text(tree,
14205 tvb, curr_offset, 1,
14210 proto_tree_add_text(tree,
14211 tvb, curr_offset, 1,
14212 gsm_dtap_elem_strings[DE_CIPH_KEY_SEQ_NUM].strptr);
14214 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_CIPH_KEY_SEQ_NUM]);
14216 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
14217 proto_tree_add_text(subtree,
14218 tvb, curr_offset, 1,
14222 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
14224 switch (oct & 0x07)
14227 proto_tree_add_text(subtree,
14228 tvb, curr_offset, 1,
14229 "%s : Ciphering Key Sequence Number: No key is available",
14234 proto_tree_add_text(subtree,
14235 tvb, curr_offset, 1,
14236 "%s : Ciphering Key Sequence Number: %u",
14245 if (curr_len <= 0) return;
14247 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_AUTH_PARAM_RAND);
14249 ELEM_OPT_TLV(0x20, BSSAP_PDU_TYPE_DTAP, DE_AUTH_PARAM_AUTN, "");
14251 EXTRANEOUS_DATA_CHECK(curr_len, 0);
14258 dtap_mm_auth_resp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
14260 guint32 curr_offset;
14264 curr_offset = offset;
14267 is_uplink = IS_UPLINK_TRUE;
14269 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_AUTH_RESP_PARAM);
14271 ELEM_OPT_TLV(0x21, BSSAP_PDU_TYPE_DTAP, DE_AUTH_RESP_PARAM_EXT, "");
14273 EXTRANEOUS_DATA_CHECK(curr_len, 0);
14280 dtap_mm_auth_fail(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
14282 guint32 curr_offset;
14286 curr_offset = offset;
14289 is_uplink = IS_UPLINK_TRUE;
14291 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_REJ_CAUSE);
14293 ELEM_OPT_TLV(0x22, BSSAP_PDU_TYPE_DTAP, DE_AUTH_FAIL_PARAM, "");
14295 EXTRANEOUS_DATA_CHECK(curr_len, 0);
14302 dtap_mm_cm_reestab_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
14304 guint32 curr_offset;
14308 proto_tree *subtree;
14311 curr_offset = offset;
14314 is_uplink = IS_UPLINK_TRUE;
14317 * special dissection for Cipher Key Sequence Number
14319 oct = tvb_get_guint8(tvb, curr_offset);
14321 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
14322 proto_tree_add_text(tree,
14323 tvb, curr_offset, 1,
14328 proto_tree_add_text(tree,
14329 tvb, curr_offset, 1,
14330 gsm_dtap_elem_strings[DE_CIPH_KEY_SEQ_NUM].strptr);
14332 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_CIPH_KEY_SEQ_NUM]);
14334 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
14335 proto_tree_add_text(subtree,
14336 tvb, curr_offset, 1,
14340 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
14342 switch (oct & 0x07)
14345 proto_tree_add_text(subtree,
14346 tvb, curr_offset, 1,
14347 "%s : Ciphering Key Sequence Number: No key is available",
14352 proto_tree_add_text(subtree,
14353 tvb, curr_offset, 1,
14354 "%s : Ciphering Key Sequence Number: %u",
14363 if (curr_len <= 0) return;
14365 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_MS_CM_2, "");
14367 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_MID, "");
14369 ELEM_OPT_TV(0x13, BSSAP_PDU_TYPE_DTAP, DE_LAI, "");
14371 EXTRANEOUS_DATA_CHECK(curr_len, 0);
14378 dtap_mm_cm_srvc_prompt(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
14380 guint32 curr_offset;
14384 curr_offset = offset;
14387 is_uplink = IS_UPLINK_FALSE;
14389 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_PD_SAPI);
14391 EXTRANEOUS_DATA_CHECK(curr_len, 0);
14398 dtap_mm_cm_srvc_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
14400 guint32 curr_offset;
14404 curr_offset = offset;
14407 is_uplink = IS_UPLINK_FALSE;
14409 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_REJ_CAUSE);
14411 EXTRANEOUS_DATA_CHECK(curr_len, 0);
14418 dtap_mm_abort(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
14420 guint32 curr_offset;
14424 curr_offset = offset;
14427 is_uplink = IS_UPLINK_FALSE;
14429 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_REJ_CAUSE);
14431 EXTRANEOUS_DATA_CHECK(curr_len, 0);
14438 dtap_mm_cm_srvc_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
14440 guint32 curr_offset;
14444 proto_tree *subtree;
14448 curr_offset = offset;
14451 is_uplink = IS_UPLINK_TRUE;
14454 * special dissection for CM Service Type
14456 oct = tvb_get_guint8(tvb, curr_offset);
14459 proto_tree_add_text(tree,
14460 tvb, curr_offset, 1,
14461 gsm_dtap_elem_strings[DE_CIPH_KEY_SEQ_NUM].strptr);
14463 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_CIPH_KEY_SEQ_NUM]);
14465 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
14466 proto_tree_add_text(subtree,
14467 tvb, curr_offset, 1,
14471 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
14473 switch ((oct & 0x70) >> 4)
14476 proto_tree_add_text(subtree,
14477 tvb, curr_offset, 1,
14478 "%s : Ciphering Key Sequence Number: No key is available",
14483 proto_tree_add_text(subtree,
14484 tvb, curr_offset, 1,
14485 "%s : Ciphering Key Sequence Number: %u",
14487 (oct & 0x70) >> 4);
14492 proto_tree_add_text(tree,
14493 tvb, curr_offset, 1,
14494 gsm_dtap_elem_strings[DE_CM_SRVC_TYPE].strptr);
14496 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_CM_SRVC_TYPE]);
14498 switch (oct & 0x0f)
14500 case 0x01: str = "Mobile originating call establishment or packet mode connection establishment"; break;
14501 case 0x02: str = "Emergency call establishment"; break;
14502 case 0x04: str = "Short message service"; break;
14503 case 0x08: str = "Supplementary service activation"; break;
14504 case 0x09: str = "Voice group call establishment"; break;
14505 case 0x0a: str = "Voice broadcast call establishment"; break;
14506 case 0x0b: str = "Location Services"; break;
14512 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
14513 proto_tree_add_text(subtree,
14514 tvb, curr_offset, 1,
14515 "%s : Service Type: (%u) %s",
14523 if (curr_len <= 0) return;
14525 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_MS_CM_2, "");
14527 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_MID, "");
14529 ELEM_OPT_TV_SHORT(0x80, BSSAP_PDU_TYPE_DTAP, DE_PRIO, "");
14531 EXTRANEOUS_DATA_CHECK(curr_len, 0);
14538 dtap_mm_id_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
14541 guint32 curr_offset;
14543 proto_tree *subtree;
14547 curr_offset = offset;
14550 is_uplink = IS_UPLINK_FALSE;
14553 * special dissection for Identity Type
14555 oct = tvb_get_guint8(tvb, curr_offset);
14557 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
14558 proto_tree_add_text(tree,
14559 tvb, curr_offset, 1,
14564 proto_tree_add_text(tree,
14565 tvb, curr_offset, 1,
14566 gsm_dtap_elem_strings[DE_ID_TYPE].strptr);
14568 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_ID_TYPE]);
14570 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
14571 proto_tree_add_text(subtree,
14572 tvb, curr_offset, 1,
14576 switch (oct & 0x07)
14578 case 1: str = "IMSI"; break;
14579 case 2: str = "IMEI"; break;
14580 case 3: str = "IMEISV"; break;
14581 case 4: str = "TMSI"; break;
14587 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
14588 proto_tree_add_text(subtree,
14589 tvb, curr_offset, 1,
14590 "%s : Type of identity: %s",
14597 EXTRANEOUS_DATA_CHECK(curr_len, 0);
14604 dtap_mm_id_resp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
14606 guint32 curr_offset;
14610 curr_offset = offset;
14613 is_uplink = IS_UPLINK_TRUE;
14615 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_MID, "");
14617 EXTRANEOUS_DATA_CHECK(curr_len, 0);
14624 dtap_mm_imsi_det_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
14626 guint32 curr_offset;
14630 curr_offset = offset;
14633 is_uplink = IS_UPLINK_TRUE;
14635 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_MS_CM_1);
14637 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_MID, "");
14639 EXTRANEOUS_DATA_CHECK(curr_len, 0);
14646 dtap_mm_loc_upd_acc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
14648 guint32 curr_offset;
14652 curr_offset = offset;
14655 is_uplink = IS_UPLINK_FALSE;
14657 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_LAI);
14659 ELEM_OPT_TLV(0x17, BSSAP_PDU_TYPE_DTAP, DE_MID, "");
14661 ELEM_OPT_T(0xa1, BSSAP_PDU_TYPE_DTAP, DE_FOP, "");
14663 ELEM_OPT_T(0xa2, BSSAP_PDU_TYPE_DTAP, DE_CTS_PERM, "");
14665 ELEM_OPT_TLV(0x4a, BSSAP_PDU_TYPE_DTAP, DE_PLMN_LIST, " Equivalent");
14667 EXTRANEOUS_DATA_CHECK(curr_len, 0);
14674 dtap_mm_loc_upd_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
14676 guint32 curr_offset;
14680 curr_offset = offset;
14683 is_uplink = IS_UPLINK_FALSE;
14685 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_REJ_CAUSE);
14687 EXTRANEOUS_DATA_CHECK(curr_len, 0);
14694 dtap_mm_loc_upd_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
14696 guint32 curr_offset;
14700 proto_tree *subtree;
14704 curr_offset = offset;
14707 is_uplink = IS_UPLINK_TRUE;
14710 * special dissection for Location Updating Type
14712 oct = tvb_get_guint8(tvb, curr_offset);
14715 proto_tree_add_text(tree,
14716 tvb, curr_offset, 1,
14717 gsm_dtap_elem_strings[DE_CIPH_KEY_SEQ_NUM].strptr);
14719 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_CIPH_KEY_SEQ_NUM]);
14721 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
14722 proto_tree_add_text(subtree,
14723 tvb, curr_offset, 1,
14727 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
14729 switch ((oct & 0x70) >> 4)
14732 proto_tree_add_text(subtree,
14733 tvb, curr_offset, 1,
14734 "%s : Ciphering Key Sequence Number: No key is available",
14739 proto_tree_add_text(subtree,
14740 tvb, curr_offset, 1,
14741 "%s : Ciphering Key Sequence Number: %u",
14743 (oct & 0x70) >> 4);
14748 proto_tree_add_text(tree,
14749 tvb, curr_offset, 1,
14750 gsm_dtap_elem_strings[DE_LOC_UPD_TYPE].strptr);
14752 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_LOC_UPD_TYPE]);
14754 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
14755 proto_tree_add_text(subtree,
14756 tvb, curr_offset, 1,
14757 "%s : Follow-On Request (FOR): %s",
14759 (oct & 0x08) ? "Follow-on request pending" : "No follow-on request pending");
14761 other_decode_bitfield_value(a_bigbuf, oct, 0x04, 8);
14762 proto_tree_add_text(subtree,
14763 tvb, curr_offset, 1,
14767 switch (oct & 0x03)
14769 case 0: str = "Normal"; break;
14770 case 1: str = "Periodic"; break;
14771 case 2: str = "IMSI attach"; break;
14777 other_decode_bitfield_value(a_bigbuf, oct, 0x03, 8);
14778 proto_tree_add_text(subtree,
14779 tvb, curr_offset, 1,
14780 "%s : Updating Type: %s",
14784 proto_item_append_text(item, " - %s", str);
14789 if (curr_len <= 0) return;
14791 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_LAI);
14793 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_MS_CM_1);
14795 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_MID, "");
14797 ELEM_OPT_TLV(0x33, BSSAP_PDU_TYPE_DTAP, DE_MS_CM_2, "");
14799 EXTRANEOUS_DATA_CHECK(curr_len, 0);
14806 dtap_mm_mm_info(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
14808 guint32 curr_offset;
14812 curr_offset = offset;
14815 is_uplink = IS_UPLINK_TRUE;
14817 ELEM_OPT_TLV(0x43, BSSAP_PDU_TYPE_DTAP, DE_NETWORK_NAME, " - Full Name");
14819 ELEM_OPT_TLV(0x45, BSSAP_PDU_TYPE_DTAP, DE_NETWORK_NAME, " - Short Name");
14821 ELEM_OPT_TV(0x46, BSSAP_PDU_TYPE_DTAP, DE_TIME_ZONE, " - Local");
14823 ELEM_OPT_TV(0x47, BSSAP_PDU_TYPE_DTAP, DE_TIME_ZONE_TIME, " - Universal Time and Local Time Zone");
14825 ELEM_OPT_TLV(0x48, BSSAP_PDU_TYPE_DTAP, DE_LSA_ID, "");
14827 ELEM_OPT_TLV(0x49, BSSAP_PDU_TYPE_DTAP, DE_DAY_SAVING_TIME, "");
14829 EXTRANEOUS_DATA_CHECK(curr_len, 0);
14836 dtap_mm_mm_status(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
14838 guint32 curr_offset;
14842 curr_offset = offset;
14845 is_uplink = IS_UPLINK_TRUE;
14847 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_REJ_CAUSE);
14849 EXTRANEOUS_DATA_CHECK(curr_len, 0);
14856 dtap_mm_tmsi_realloc_cmd(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
14858 guint32 curr_offset;
14862 curr_offset = offset;
14865 is_uplink = IS_UPLINK_FALSE;
14867 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_LAI);
14869 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_MID, "");
14871 EXTRANEOUS_DATA_CHECK(curr_len, 0);
14873 /* 3GPP TS 24.008 version 4.7.0 Release 4
14877 dtap_rr_ho_cmd(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
14879 guint32 curr_offset;
14882 curr_offset = offset;
14885 /* Mandatory Elemets
14886 * Cell description 10.5.2.2
14888 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RR_CELL_DSC);
14890 /* Description of the first channel,after time
14891 * Channel Description 2 10.5.2.5a
14893 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RR_CH_DSC2);
14895 /* Handover Reference 10.5.2.15 */
14896 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RR_HO_REF);
14898 /* Power Command and Access type 10.5.2.28a */
14899 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RR_POW_CMD_AND_ACC_TYPE);
14901 /* optional elements */
14903 /* Synchronization Indication 10.5.2.39 */
14904 ELEM_OPT_TV_SHORT(0xD0,BSSAP_PDU_TYPE_DTAP, DE_RR_SYNC_IND,"");
14906 /* Frequency Short List 10.5.2.14 */
14907 ELEM_OPT_TV(0x02,BSSAP_PDU_TYPE_DTAP, DE_RR_FREQ_SHORT_LIST," - Frequency Short List, after time");
14909 /* Frequency List 10.5.2.13 */
14910 ELEM_OPT_TLV(0x05, BSSAP_PDU_TYPE_DTAP, DE_RR_FREQ_LIST, " - Frequency List, after time");
14912 /* Cell Channel Description 10.5.2.1b */
14913 ELEM_OPT_TV(0x62,BSSAP_PDU_TYPE_DTAP, DE_RR_CELL_CH_DSC, "");
14915 /* Multislot Allocation 10.5.2.21b */
14916 ELEM_OPT_TLV(0x10,BSSAP_PDU_TYPE_DTAP, DE_RR_MULT_ALL, "");
14918 /* Mode of the First Channel(Channel Set 1)) Channel Mode 10.5.2.6*/
14919 ELEM_OPT_TV(0x63,BSSAP_PDU_TYPE_DTAP, DE_RR_CH_MODE, " - Mode of the First Channel(Channel Set 1))");
14921 /* Mode of Channel Set 2 Channel Mode 10.5.2.6*/
14922 ELEM_OPT_TV(0x11,BSSAP_PDU_TYPE_DTAP, DE_RR_CH_MODE, " - Mode of Channel Set 2");
14924 /* Mode of Channel Set 3 Channel Mode 10.5.2.6*/
14925 ELEM_OPT_TV(0x13,BSSAP_PDU_TYPE_DTAP, DE_RR_CH_MODE, " - Mode of Channel Set 3");
14927 /* Mode of Channel Set 4 Channel Mode 10.5.2.6*/
14928 ELEM_OPT_TV(0x14,BSSAP_PDU_TYPE_DTAP, DE_RR_CH_MODE, " - Mode of Channel Set 4");
14930 /* Mode of Channel Set 5 Channel Mode 10.5.2.6*/
14931 ELEM_OPT_TV(0x15,BSSAP_PDU_TYPE_DTAP, DE_RR_CH_MODE, " - Mode of Channel Set 5");
14933 /* Mode of Channel Set 6 Channel Mode 10.5.2.6*/
14934 ELEM_OPT_TV(0x16,BSSAP_PDU_TYPE_DTAP, DE_RR_CH_MODE, " - Mode of Channel Set 6");
14936 /* Mode of Channel Set 7 Channel Mode 10.5.2.6*/
14937 ELEM_OPT_TV(0x17,BSSAP_PDU_TYPE_DTAP, DE_RR_CH_MODE, " - Mode of Channel Set 7");
14939 /* Mode of Channel Set 8 Channel Mode 10.5.2.6*/
14940 ELEM_OPT_TV(0x18,BSSAP_PDU_TYPE_DTAP, DE_RR_CH_MODE, " - Mode of Channel Set 8");
14942 /* Description of the Second Channel, after time, Channel Description 10.5.2.5 */
14943 ELEM_OPT_TV(0x64,BSSAP_PDU_TYPE_DTAP, DE_RR_CH_DSC, " - Description of the Second Channel, after time");
14945 /* Mode of the Second Channel, Channel Mode 2 10.5.2.7 */
14946 ELEM_OPT_TV(0x66,BSSAP_PDU_TYPE_DTAP, DE_RR_CH_MODE2, " - Mode of the Second Channel");
14948 /* Frequency Channel Sequence, after time, Frequency Channel Sequence 10.5.2.12 */
14949 ELEM_OPT_TV(0x69,BSSAP_PDU_TYPE_DTAP, DE_RR_FREQ_CH_SEQ, " - Frequency Channel Sequence, after time");
14951 /* Mobile Allocation, after time, Mobile Allocation 10.5.2.21 */
14952 ELEM_OPT_TLV(0x72,BSSAP_PDU_TYPE_DTAP, DE_RR_MOB_ALL, " - Mobile Allocation, after time");
14954 /* Starting Time 10.5.2.38 */
14955 ELEM_OPT_TV(0x7C,BSSAP_PDU_TYPE_DTAP, DE_RR_STARTING_TIME, "");
14957 /* Real Time Difference, Time Difference 10.5.2.41 */
14958 ELEM_OPT_TV(0x7B,BSSAP_PDU_TYPE_DTAP, DE_RR_TIME_DIFF, " - Real Time Difference");
14960 /* Timing Advance, Timing Advance 10.5.2.40 */
14961 ELEM_OPT_TV(0x7D,BSSAP_PDU_TYPE_DTAP, DE_RR_TIMING_ADV, "");
14963 /* Frequency Short List, before time, Frequency Short List 10.5.2.14 */
14964 ELEM_OPT_TLV(0x19,BSSAP_PDU_TYPE_DTAP, DE_RR_FREQ_SHORT_LIST, " - Frequency Short List, before time");
14966 /* Frequency List, before time, Frequency List 10.5.2.13 */
14967 ELEM_OPT_TV(0x12,BSSAP_PDU_TYPE_DTAP, DE_RR_FREQ_LIST, " - Frequency List, before time");
14969 /* Description of the First Channel, before time, Channel Description 2 10.5.2.5a*/
14970 ELEM_OPT_TV(0x1c,BSSAP_PDU_TYPE_DTAP, DE_RR_CH_DSC2, " - Description of the First Channel, before time");
14972 /* Description of the Second Channel, before time, Channel Description 10.5.2.5*/
14973 ELEM_OPT_TV(0x1d,BSSAP_PDU_TYPE_DTAP, DE_RR_CH_DSC, " - Description of the Second Channel, before time");
14975 /* Frequency channel sequence before time, Frequency channel sequence 10.5.2.12*/
14976 ELEM_OPT_TV(0x1e,BSSAP_PDU_TYPE_DTAP, DE_RR_FREQ_CH_SEQ, " - Frequency channel sequence before time");
14978 /* Mobile Allocation, before time, Mobile Allocation 10.5.2.21*/
14979 ELEM_OPT_TLV(0x21,BSSAP_PDU_TYPE_DTAP, DE_RR_MOB_ALL, " - Mobile Allocation, before time");
14981 /* Cipher Mode Setting, Cipher Mode Setting 10.5.2.9*/
14982 ELEM_OPT_TV_SHORT(0x90,BSSAP_PDU_TYPE_DTAP, DE_RR_CIP_MODE_SET, "");
14984 /* VGCS target mode Indication, VGCS target mode Indication 10.5.2.42a*/
14985 ELEM_OPT_TLV(0x01,BSSAP_PDU_TYPE_DTAP, DE_RR_VGCS_TAR_MODE_IND, "");
14987 /* Multi-Rate configuration, MultiRate configuration 10.5.2.21aa*/
14988 ELEM_OPT_TLV(0x03,BSSAP_PDU_TYPE_DTAP, DE_RR_MULTIRATE_CONF, "");
14990 /* Dynamic ARFCN Mapping, Dynamic ARFCN Mapping 10.5.2.11b*/
14991 ELEM_OPT_TLV(0x76,BSSAP_PDU_TYPE_DTAP, DE_RR_DYN_ARFCN_MAP, "");
14993 /* VGCS Ciphering Parameters, VGCS Ciphering Parameters 10.5.2.42b*/
14994 ELEM_OPT_TLV(0x04,BSSAP_PDU_TYPE_DTAP, DE_RR_VGCS_CIP_PAR, "");
14996 /* Dedicated Service Information, Dedicated Service Information 10.5.2.59*/
14997 ELEM_OPT_TV(0x51,BSSAP_PDU_TYPE_DTAP, DE_RR_DED_SERV_INF, "");
14999 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
15006 dtap_rr_paging_resp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15008 guint32 curr_offset;
15012 proto_tree *subtree;
15015 curr_offset = offset;
15018 is_uplink = IS_UPLINK_TRUE;
15021 * special dissection for Cipher Key Sequence Number
15023 oct = tvb_get_guint8(tvb, curr_offset);
15025 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
15026 proto_tree_add_text(tree,
15027 tvb, curr_offset, 1,
15032 proto_tree_add_text(tree,
15033 tvb, curr_offset, 1,
15034 gsm_dtap_elem_strings[DE_CIPH_KEY_SEQ_NUM].strptr);
15036 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_CIPH_KEY_SEQ_NUM]);
15038 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
15039 proto_tree_add_text(subtree,
15040 tvb, curr_offset, 1,
15044 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
15046 switch (oct & 0x07)
15049 proto_tree_add_text(subtree,
15050 tvb, curr_offset, 1,
15051 "%s : Ciphering Key Sequence Number: No key is available",
15056 proto_tree_add_text(subtree,
15057 tvb, curr_offset, 1,
15058 "%s : Ciphering Key Sequence Number: %u",
15067 if (curr_len <= 0) return;
15069 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_MS_CM_2, "");
15071 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_MID, "");
15073 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15080 dtap_rr_rr_status(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15082 guint32 curr_offset;
15086 curr_offset = offset;
15089 is_uplink = IS_UPLINK_TRUE;
15091 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RR_CAUSE);
15093 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15100 dtap_cc_alerting(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15102 guint32 curr_offset;
15106 curr_offset = offset;
15109 is_uplink = IS_UPLINK_TRUE;
15111 ELEM_OPT_TLV(0x1c, BSSAP_PDU_TYPE_DTAP, DE_FACILITY, "");
15113 ELEM_OPT_TLV(0x1e, BSSAP_PDU_TYPE_DTAP, DE_PROG_IND, "");
15115 ELEM_OPT_TLV(0x7e, BSSAP_PDU_TYPE_DTAP, DE_USER_USER, "");
15119 ELEM_OPT_TLV(0x7f, BSSAP_PDU_TYPE_DTAP, DE_SS_VER_IND, "");
15121 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15128 dtap_cc_call_conf(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15130 guint32 curr_offset;
15134 curr_offset = offset;
15137 is_uplink = IS_UPLINK_TRUE;
15139 ELEM_OPT_TV_SHORT(0xd0, BSSAP_PDU_TYPE_DTAP, DE_REPEAT_IND, " BC repeat indicator");
15141 ELEM_OPT_TLV(0x04, BSSAP_PDU_TYPE_DTAP, DE_BEARER_CAP, " 1");
15143 ELEM_OPT_TLV(0x04, BSSAP_PDU_TYPE_DTAP, DE_BEARER_CAP, " 2");
15145 ELEM_OPT_TLV(0x08, BSSAP_PDU_TYPE_DTAP, DE_CAUSE, "");
15147 ELEM_OPT_TLV(0x15, BSSAP_PDU_TYPE_DTAP, DE_CC_CAP, "");
15149 ELEM_OPT_TLV(0x2d, BSSAP_PDU_TYPE_DTAP, DE_SI, "");
15151 ELEM_OPT_TLV(0x40, BSSAP_PDU_TYPE_DTAP, DE_SUP_CODEC_LIST, "");
15153 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15160 dtap_cc_call_proceed(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15162 guint32 curr_offset;
15166 curr_offset = offset;
15169 is_uplink = IS_UPLINK_FALSE;
15171 ELEM_OPT_TV_SHORT(0xd0, BSSAP_PDU_TYPE_DTAP, DE_REPEAT_IND, " BC repeat indicator");
15173 ELEM_OPT_TLV(0x04, BSSAP_PDU_TYPE_DTAP, DE_BEARER_CAP, " 1");
15175 ELEM_OPT_TLV(0x04, BSSAP_PDU_TYPE_DTAP, DE_BEARER_CAP, " 2");
15177 ELEM_OPT_TLV(0x1c, BSSAP_PDU_TYPE_DTAP, DE_FACILITY, "");
15179 ELEM_OPT_TLV(0x1e, BSSAP_PDU_TYPE_DTAP, DE_PROG_IND, "");
15181 ELEM_OPT_TV_SHORT(0x80, BSSAP_PDU_TYPE_DTAP, DE_PRIO, "");
15183 ELEM_OPT_TLV(0x2f, BSSAP_PDU_TYPE_DTAP, DE_NET_CC_CAP, "");
15185 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15192 dtap_cc_congestion_control(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15194 guint32 curr_offset;
15198 proto_tree *subtree;
15202 curr_offset = offset;
15205 is_uplink = IS_UPLINK_FALSE;
15208 * special dissection for Congestion Level
15210 oct = tvb_get_guint8(tvb, curr_offset);
15212 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
15213 proto_tree_add_text(tree,
15214 tvb, curr_offset, 1,
15219 proto_tree_add_text(tree,
15220 tvb, curr_offset, 1,
15221 gsm_dtap_elem_strings[DE_CONGESTION].strptr);
15223 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_CONGESTION]);
15225 switch (oct & 0x0f)
15227 case 0: str = "Receiver ready"; break;
15228 case 15: str = "Receiver not ready"; break;
15234 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
15235 proto_tree_add_text(subtree,
15236 tvb, curr_offset, 1,
15237 "%s : Congestion level: %s",
15244 if (curr_len <= 0) return;
15246 ELEM_OPT_TLV(0x08, BSSAP_PDU_TYPE_DTAP, DE_CAUSE, "");
15248 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15255 dtap_cc_connect(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15257 guint32 curr_offset;
15261 curr_offset = offset;
15264 is_uplink = IS_UPLINK_TRUE;
15266 ELEM_OPT_TLV(0x1c, BSSAP_PDU_TYPE_DTAP, DE_FACILITY, "");
15268 ELEM_OPT_TLV(0x1e, BSSAP_PDU_TYPE_DTAP, DE_PROG_IND, "");
15270 ELEM_OPT_TLV(0x4c, BSSAP_PDU_TYPE_DTAP, DE_CONN_NUM, "");
15272 ELEM_OPT_TLV(0x4d, BSSAP_PDU_TYPE_DTAP, DE_CONN_SUB_ADDR, "");
15274 ELEM_OPT_TLV(0x7e, BSSAP_PDU_TYPE_DTAP, DE_USER_USER, "");
15278 ELEM_OPT_TLV(0x7f, BSSAP_PDU_TYPE_DTAP, DE_SS_VER_IND, "");
15280 ELEM_OPT_TLV(0x2d, BSSAP_PDU_TYPE_DTAP, DE_SI, "");
15282 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15289 dtap_cc_disconnect(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15291 guint32 curr_offset;
15295 curr_offset = offset;
15298 is_uplink = IS_UPLINK_TRUE;
15300 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_CAUSE, "");
15302 ELEM_OPT_TLV(0x1c, BSSAP_PDU_TYPE_DTAP, DE_FACILITY, "");
15304 ELEM_OPT_TLV(0x1e, BSSAP_PDU_TYPE_DTAP, DE_PROG_IND, "");
15306 ELEM_OPT_TLV(0x7e, BSSAP_PDU_TYPE_DTAP, DE_USER_USER, "");
15308 ELEM_OPT_TLV(0x7b, BSSAP_PDU_TYPE_DTAP, DE_ALLOWED_ACTIONS, "");
15312 ELEM_OPT_TLV(0x7f, BSSAP_PDU_TYPE_DTAP, DE_SS_VER_IND, "");
15314 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15321 dtap_cc_emerg_setup(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15323 guint32 curr_offset;
15327 curr_offset = offset;
15330 is_uplink = IS_UPLINK_TRUE;
15332 ELEM_OPT_TLV(0x04, BSSAP_PDU_TYPE_DTAP, DE_BEARER_CAP, "");
15334 ELEM_OPT_TLV(0x2d, BSSAP_PDU_TYPE_DTAP, DE_SI, "");
15336 ELEM_OPT_TLV(0x40, BSSAP_PDU_TYPE_DTAP, DE_SUP_CODEC_LIST, "");
15338 ELEM_OPT_TLV(0x2e, BSSAP_PDU_TYPE_DTAP, DE_SRVC_CAT, " Emergency");
15340 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15347 dtap_cc_facility(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15349 guint32 curr_offset;
15353 curr_offset = offset;
15356 is_uplink = IS_UPLINK_TRUE;
15358 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_FACILITY, "");
15362 ELEM_OPT_TLV(0x7f, BSSAP_PDU_TYPE_DTAP, DE_SS_VER_IND, "");
15364 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15371 dtap_cc_hold_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15373 guint32 curr_offset;
15377 curr_offset = offset;
15380 is_uplink = IS_UPLINK_FALSE;
15382 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_CAUSE, "");
15384 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15391 dtap_cc_modify(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15393 guint32 curr_offset;
15397 curr_offset = offset;
15400 is_uplink = IS_UPLINK_TRUE;
15402 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_BEARER_CAP, "");
15404 ELEM_OPT_TLV(0x7c, BSSAP_PDU_TYPE_DTAP, DE_LLC, "");
15406 ELEM_OPT_TLV(0x7d, BSSAP_PDU_TYPE_DTAP, DE_HLC, "");
15408 ELEM_OPT_T(0xa3, BSSAP_PDU_TYPE_DTAP, DE_REV_CALL_SETUP_DIR, "");
15410 ELEM_OPT_T(0xa4, BSSAP_PDU_TYPE_DTAP, DE_IMM_MOD_IND, "");
15412 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15419 dtap_cc_modify_complete(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15421 guint32 curr_offset;
15425 curr_offset = offset;
15428 is_uplink = IS_UPLINK_TRUE;
15430 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_BEARER_CAP, "");
15432 ELEM_OPT_TLV(0x7c, BSSAP_PDU_TYPE_DTAP, DE_LLC, "");
15434 ELEM_OPT_TLV(0x7d, BSSAP_PDU_TYPE_DTAP, DE_HLC, "");
15436 ELEM_OPT_T(0xa3, BSSAP_PDU_TYPE_DTAP, DE_REV_CALL_SETUP_DIR, "");
15438 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15445 dtap_cc_modify_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15447 guint32 curr_offset;
15451 curr_offset = offset;
15454 is_uplink = IS_UPLINK_FALSE;
15456 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_BEARER_CAP, "");
15458 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_CAUSE, "");
15460 ELEM_OPT_TLV(0x7c, BSSAP_PDU_TYPE_DTAP, DE_LLC, "");
15462 ELEM_OPT_TLV(0x7d, BSSAP_PDU_TYPE_DTAP, DE_HLC, "");
15464 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15471 dtap_cc_notify(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15473 guint32 curr_offset;
15477 curr_offset = offset;
15480 is_uplink = IS_UPLINK_FALSE;
15482 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_NOT_IND);
15484 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15491 dtap_cc_progress(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15493 guint32 curr_offset;
15497 curr_offset = offset;
15500 is_uplink = IS_UPLINK_FALSE;
15502 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_PROG_IND, "");
15504 ELEM_OPT_TLV(0x7e, BSSAP_PDU_TYPE_DTAP, DE_USER_USER, "");
15506 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15513 dtap_cc_cc_est(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15515 guint32 curr_offset;
15519 curr_offset = offset;
15522 is_uplink = IS_UPLINK_FALSE;
15524 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_SETUP_CONTAINER, "");
15526 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15533 dtap_cc_cc_est_conf(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15535 guint32 curr_offset;
15539 curr_offset = offset;
15542 is_uplink = IS_UPLINK_TRUE;
15544 ELEM_OPT_TV_SHORT(0xd0, BSSAP_PDU_TYPE_DTAP, DE_REPEAT_IND, " Repeat indicator");
15546 ELEM_MAND_TLV(0x04, BSSAP_PDU_TYPE_DTAP, DE_BEARER_CAP, " 1");
15548 ELEM_OPT_TLV(0x04, BSSAP_PDU_TYPE_DTAP, DE_BEARER_CAP, " 2");
15550 ELEM_OPT_TLV(0x08, BSSAP_PDU_TYPE_DTAP, DE_CAUSE, "");
15552 ELEM_OPT_TLV(0x40, BSSAP_PDU_TYPE_DTAP, DE_SUP_CODEC_LIST, "");
15554 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15561 dtap_cc_release(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15563 guint32 curr_offset;
15567 curr_offset = offset;
15570 is_uplink = IS_UPLINK_TRUE;
15572 ELEM_OPT_TLV(0x08, BSSAP_PDU_TYPE_DTAP, DE_CAUSE, "");
15574 ELEM_OPT_TLV(0x08, BSSAP_PDU_TYPE_DTAP, DE_CAUSE, " 2");
15576 ELEM_OPT_TLV(0x1c, BSSAP_PDU_TYPE_DTAP, DE_FACILITY, "");
15578 ELEM_OPT_TLV(0x7e, BSSAP_PDU_TYPE_DTAP, DE_USER_USER, "");
15582 ELEM_OPT_TLV(0x7f, BSSAP_PDU_TYPE_DTAP, DE_SS_VER_IND, "");
15584 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15591 dtap_cc_recall(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15593 guint32 curr_offset;
15597 curr_offset = offset;
15600 is_uplink = IS_UPLINK_FALSE;
15602 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RECALL_TYPE);
15604 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_FACILITY, "");
15606 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15613 dtap_cc_release_complete(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15615 guint32 curr_offset;
15619 curr_offset = offset;
15622 is_uplink = IS_UPLINK_FALSE;
15624 ELEM_OPT_TLV(0x08, BSSAP_PDU_TYPE_DTAP, DE_CAUSE, "");
15626 ELEM_OPT_TLV(0x1c, BSSAP_PDU_TYPE_DTAP, DE_FACILITY, "");
15628 ELEM_OPT_TLV(0x7e, BSSAP_PDU_TYPE_DTAP, DE_USER_USER, "");
15632 ELEM_OPT_TLV(0x7f, BSSAP_PDU_TYPE_DTAP, DE_SS_VER_IND, "");
15634 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15641 dtap_cc_retrieve_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15643 guint32 curr_offset;
15647 curr_offset = offset;
15650 is_uplink = IS_UPLINK_FALSE;
15652 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_CAUSE, "");
15654 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15659 * 3GPP TS 24.008 version 7.5.0 Release 7
15662 dtap_cc_setup(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15664 guint32 curr_offset;
15668 curr_offset = offset;
15671 is_uplink = IS_UPLINK_TRUE;
15673 ELEM_OPT_TV_SHORT(0xd0, BSSAP_PDU_TYPE_DTAP, DE_REPEAT_IND, " BC repeat indicator");
15675 ELEM_OPT_TLV(0x04, BSSAP_PDU_TYPE_DTAP, DE_BEARER_CAP, " 1");
15677 ELEM_OPT_TLV(0x04, BSSAP_PDU_TYPE_DTAP, DE_BEARER_CAP, " 2");
15679 ELEM_OPT_TLV(0x1c, BSSAP_PDU_TYPE_DTAP, DE_FACILITY, "");
15681 ELEM_OPT_TLV(0x1e, BSSAP_PDU_TYPE_DTAP, DE_PROG_IND, "");
15683 ELEM_OPT_TV(0x34, BSSAP_PDU_TYPE_DTAP, DE_SIGNAL, "");
15685 ELEM_OPT_TLV(0x5c, BSSAP_PDU_TYPE_DTAP, DE_CLG_PARTY_BCD_NUM, "");
15687 ELEM_OPT_TLV(0x5d, BSSAP_PDU_TYPE_DTAP, DE_CLG_PARTY_SUB_ADDR, "");
15689 ELEM_OPT_TLV(0x5e, BSSAP_PDU_TYPE_DTAP, DE_CLD_PARTY_BCD_NUM, "");
15691 ELEM_OPT_TLV(0x6d, BSSAP_PDU_TYPE_DTAP, DE_CLD_PARTY_SUB_ADDR, "");
15693 ELEM_OPT_TLV(0x74, BSSAP_PDU_TYPE_DTAP, DE_RED_PARTY_BCD_NUM, "");
15695 ELEM_OPT_TLV(0x75, BSSAP_PDU_TYPE_DTAP, DE_RED_PARTY_SUB_ADDR, "");
15697 ELEM_OPT_TV_SHORT(0xd0, BSSAP_PDU_TYPE_DTAP, DE_REPEAT_IND, " LLC repeat indicator");
15699 ELEM_OPT_TLV(0x7c, BSSAP_PDU_TYPE_DTAP, DE_LLC, " 1");
15701 ELEM_OPT_TLV(0x7c, BSSAP_PDU_TYPE_DTAP, DE_LLC, " 2");
15703 ELEM_OPT_TV_SHORT(0xd0, BSSAP_PDU_TYPE_DTAP, DE_REPEAT_IND, " HLC repeat indicator");
15705 ELEM_OPT_TLV(0x7d, BSSAP_PDU_TYPE_DTAP, DE_HLC, " 1");
15707 ELEM_OPT_TLV(0x7d, BSSAP_PDU_TYPE_DTAP, DE_HLC, " 2");
15709 ELEM_OPT_TLV(0x7e, BSSAP_PDU_TYPE_DTAP, DE_USER_USER, "");
15711 /* downlink only */
15713 ELEM_OPT_TV_SHORT(0x80, BSSAP_PDU_TYPE_DTAP, DE_PRIO, "");
15715 ELEM_OPT_TLV(0x19, BSSAP_PDU_TYPE_DTAP, DE_ALERT_PATTERN, "");
15717 ELEM_OPT_TLV(0x2f, BSSAP_PDU_TYPE_DTAP, DE_NET_CC_CAP, "");
15719 ELEM_OPT_TLV(0x3a, BSSAP_PDU_TYPE_DTAP, DE_CAUSE_NO_CLI, "");
15721 /* Backup bearer capability O TLV 3-15 10.5.4.4a */
15722 ELEM_OPT_TLV(0x41, BSSAP_PDU_TYPE_DTAP, DE_BEARER_CAP, "");
15726 ELEM_OPT_TLV(0x7f, BSSAP_PDU_TYPE_DTAP, DE_SS_VER_IND, "");
15728 ELEM_OPT_T(0xa1, BSSAP_PDU_TYPE_DTAP, DE_CLIR_SUP, "");
15730 ELEM_OPT_T(0xa2, BSSAP_PDU_TYPE_DTAP, DE_CLIR_INV, "");
15732 ELEM_OPT_TLV(0x15, BSSAP_PDU_TYPE_DTAP, DE_CC_CAP, "");
15734 ELEM_OPT_TLV(0x1d, BSSAP_PDU_TYPE_DTAP, DE_FACILITY, " $(CCBS)$ (advanced recall alignment)");
15736 ELEM_OPT_TLV(0x1b, BSSAP_PDU_TYPE_DTAP, DE_FACILITY, " (recall alignment Not essential) $(CCBS)$");
15738 ELEM_OPT_TLV(0x2d, BSSAP_PDU_TYPE_DTAP, DE_SI, "");
15740 ELEM_OPT_TLV(0x40, BSSAP_PDU_TYPE_DTAP, DE_SUP_CODEC_LIST, "");
15742 /*A3 Redial Redial O T 1 10.5.4.34
15743 * TODO add this element
15744 * ELEM_OPT_T(0xA3, BSSAP_PDU_TYPE_DTAP, DE_REDIAL, "");
15747 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15754 dtap_cc_start_cc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15756 guint32 curr_offset;
15760 curr_offset = offset;
15763 is_uplink = IS_UPLINK_FALSE;
15765 ELEM_OPT_TLV(0x15, BSSAP_PDU_TYPE_DTAP, DE_CC_CAP, "");
15767 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15774 dtap_cc_start_dtmf(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15776 guint32 curr_offset;
15780 curr_offset = offset;
15783 is_uplink = IS_UPLINK_TRUE;
15785 ELEM_MAND_TV(0x2c, BSSAP_PDU_TYPE_DTAP, DE_KEYPAD_FACILITY, "");
15787 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15794 dtap_cc_start_dtmf_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15796 guint32 curr_offset;
15800 curr_offset = offset;
15803 is_uplink = IS_UPLINK_FALSE;
15805 ELEM_MAND_TV(0x2c, BSSAP_PDU_TYPE_DTAP, DE_KEYPAD_FACILITY, "");
15807 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15814 dtap_cc_start_dtmf_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15816 guint32 curr_offset;
15820 curr_offset = offset;
15823 is_uplink = IS_UPLINK_FALSE;
15825 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_CAUSE, "");
15827 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15834 dtap_cc_status(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15836 guint32 curr_offset;
15840 curr_offset = offset;
15843 is_uplink = IS_UPLINK_FALSE;
15845 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_CAUSE, "");
15847 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_CALL_STATE);
15849 ELEM_OPT_TLV(0x24, BSSAP_PDU_TYPE_DTAP, DE_AUX_STATES, "");
15851 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15858 dtap_cc_user_info(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15860 guint32 curr_offset;
15864 curr_offset = offset;
15867 is_uplink = IS_UPLINK_TRUE;
15869 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_USER_USER, "");
15871 ELEM_OPT_T(0xa0, BSSAP_PDU_TYPE_DTAP, DE_MORE_DATA, "");
15873 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15880 dtap_ss_register(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15882 guint32 curr_offset;
15886 curr_offset = offset;
15889 is_uplink = IS_UPLINK_TRUE;
15891 ELEM_MAND_TLV(0x1c, BSSAP_PDU_TYPE_DTAP, DE_FACILITY, "");
15893 ELEM_OPT_TLV(0x7f, BSSAP_PDU_TYPE_DTAP, DE_SS_VER_IND, "");
15895 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15902 dtap_sms_cp_data(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15904 guint32 curr_offset;
15908 curr_offset = offset;
15911 is_uplink = IS_UPLINK_TRUE;
15913 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_CP_USER_DATA, "");
15915 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15922 dtap_sms_cp_error(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15924 guint32 curr_offset;
15928 curr_offset = offset;
15931 is_uplink = IS_UPLINK_TRUE;
15933 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_CP_CAUSE);
15935 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15942 rp_data_n_ms(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15944 guint32 curr_offset;
15948 curr_offset = offset;
15951 is_uplink = IS_UPLINK_FALSE;
15952 g_pinfo->p2p_dir = P2P_DIR_SENT;
15954 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RP_MESSAGE_REF);
15956 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_RP_ORIG_ADDR, "");
15958 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_RP_DEST_ADDR, "");
15960 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_RP_USER_DATA, "");
15962 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15969 rp_data_ms_n(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15971 guint32 curr_offset;
15975 curr_offset = offset;
15978 is_uplink = IS_UPLINK_TRUE;
15979 g_pinfo->p2p_dir = P2P_DIR_RECV;
15981 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RP_MESSAGE_REF);
15983 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_RP_ORIG_ADDR, "");
15985 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_RP_DEST_ADDR, "");
15987 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_RP_USER_DATA, "");
15989 EXTRANEOUS_DATA_CHECK(curr_len, 0);
15996 rp_smma(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
15998 guint32 curr_offset;
16002 curr_offset = offset;
16005 is_uplink = IS_UPLINK_TRUE;
16007 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RP_MESSAGE_REF);
16009 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16016 rp_ack_n_ms(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16018 guint32 curr_offset;
16022 curr_offset = offset;
16025 is_uplink = IS_UPLINK_FALSE;
16026 g_pinfo->p2p_dir = P2P_DIR_SENT;
16028 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RP_MESSAGE_REF);
16030 ELEM_OPT_TLV(0x41, BSSAP_PDU_TYPE_DTAP, DE_RP_USER_DATA, "");
16032 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16039 rp_ack_ms_n(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16041 guint32 curr_offset;
16045 curr_offset = offset;
16048 is_uplink = IS_UPLINK_TRUE;
16049 g_pinfo->p2p_dir = P2P_DIR_RECV;
16051 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RP_MESSAGE_REF);
16053 ELEM_OPT_TLV(0x41, BSSAP_PDU_TYPE_DTAP, DE_RP_USER_DATA, "");
16055 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16062 rp_error_n_ms(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16064 guint32 curr_offset;
16068 curr_offset = offset;
16071 is_uplink = IS_UPLINK_FALSE;
16072 g_pinfo->p2p_dir = P2P_DIR_SENT;
16074 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RP_MESSAGE_REF);
16076 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_RP_CAUSE, "");
16078 ELEM_OPT_TLV(0x41, BSSAP_PDU_TYPE_DTAP, DE_RP_USER_DATA, "");
16080 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16087 rp_error_ms_n(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16089 guint32 curr_offset;
16093 curr_offset = offset;
16096 is_uplink = IS_UPLINK_TRUE;
16097 g_pinfo->p2p_dir = P2P_DIR_RECV;
16099 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RP_MESSAGE_REF);
16101 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_RP_CAUSE, "");
16103 ELEM_OPT_TLV(0x41, BSSAP_PDU_TYPE_DTAP, DE_RP_USER_DATA, "");
16105 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16112 dtap_gmm_attach_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16114 guint32 curr_offset;
16118 curr_offset = offset;
16121 is_uplink = IS_UPLINK_TRUE;
16122 g_pinfo->p2p_dir = P2P_DIR_RECV;
16124 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_MS_NET_CAP, "");
16126 /* Included in attach type
16128 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_CIPH_KEY_SEQ_NUM );
16133 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_ATTACH_TYPE );
16135 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_DRX_PARAM );
16137 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_MID , "" );
16139 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RAI );
16141 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_MS_RAD_ACC_CAP , "" );
16143 ELEM_OPT_TV( 0x19 , BSSAP_PDU_TYPE_DTAP, DE_P_TMSI_SIG, " - Old P-TMSI Signature");
16145 ELEM_OPT_TV( 0x17 , BSSAP_PDU_TYPE_DTAP, DE_GPRS_TIMER , " - Ready Timer" );
16147 ELEM_OPT_TV_SHORT( 0x90 , BSSAP_PDU_TYPE_DTAP, DE_TMSI_STAT , "" );
16149 ELEM_OPT_TLV( 0x33 , BSSAP_PDU_TYPE_DTAP, DE_PS_LCS_CAP , "" );
16151 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16158 dtap_gmm_attach_acc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16160 guint32 curr_offset;
16164 curr_offset = offset;
16167 is_uplink = IS_UPLINK_FALSE;
16168 g_pinfo->p2p_dir = P2P_DIR_SENT;
16170 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_FORCE_TO_STAND_H );
16174 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_ATTACH_RES );
16176 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_GPRS_TIMER );
16178 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RAD_PRIO_2 );
16182 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RAD_PRIO );
16184 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RAI );
16186 ELEM_OPT_TV( 0x19 , BSSAP_PDU_TYPE_DTAP, DE_P_TMSI_SIG, "" );
16188 ELEM_OPT_TV( 0x17 , BSSAP_PDU_TYPE_DTAP, DE_GPRS_TIMER , " - Negotiated Ready Timer" );
16190 ELEM_OPT_TLV( 0x18 , BSSAP_PDU_TYPE_DTAP, DE_MID , " - Allocated P-TMSI" );
16192 ELEM_OPT_TLV( 0x23 , BSSAP_PDU_TYPE_DTAP, DE_MID , "" );
16194 ELEM_OPT_TV( 0x25 , BSSAP_PDU_TYPE_DTAP, DE_GMM_CAUSE , "" );
16196 ELEM_OPT_TLV( 0x2A , BSSAP_PDU_TYPE_DTAP, DE_GPRS_TIMER_2 , " - T3302" );
16198 ELEM_OPT_T( 0x8C , BSSAP_PDU_TYPE_DTAP, DE_CELL_NOT , "" );
16200 ELEM_OPT_TLV( 0x4A , BSSAP_PDU_TYPE_DTAP, DE_PLMN_LIST , "" );
16202 ELEM_OPT_TV_SHORT( 0xB0 , BSSAP_PDU_TYPE_DTAP, DE_NET_FEAT_SUP , "" );
16204 ELEM_OPT_TLV( 0x34 , BSSAP_PDU_TYPE_DTAP, DE_EMERGENCY_NUM_LIST , "" );
16206 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16213 dtap_gmm_attach_com(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16216 guint32 curr_offset;
16217 /* guint32 consumed; */
16220 curr_offset = offset;
16223 is_uplink = IS_UPLINK_TRUE;
16224 g_pinfo->p2p_dir = P2P_DIR_RECV;
16226 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16233 dtap_gmm_attach_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16235 guint32 curr_offset;
16239 curr_offset = offset;
16242 is_uplink = IS_UPLINK_FALSE;
16243 g_pinfo->p2p_dir = P2P_DIR_SENT;
16245 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_GMM_CAUSE );
16247 ELEM_OPT_TLV( 0x2A , BSSAP_PDU_TYPE_DTAP, DE_GPRS_TIMER_2 , " - T3302" );
16249 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16256 dtap_gmm_detach_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16258 guint32 curr_offset;
16262 curr_offset = offset;
16265 is_uplink = IS_UPLINK_FALSE;
16266 g_pinfo->p2p_dir = P2P_DIR_SENT;
16268 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_FORCE_TO_STAND_H );
16269 /* Force to standy might be wrong - To decode it correct, we need the direction */
16273 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_DETACH_TYPE );
16275 ELEM_OPT_TV( 0x25 , BSSAP_PDU_TYPE_DTAP, DE_GMM_CAUSE , "" );
16277 ELEM_OPT_TLV( 0x18 , BSSAP_PDU_TYPE_DTAP, DE_MID , " - P-TMSI" );
16279 ELEM_OPT_TLV( 0x19 , BSSAP_PDU_TYPE_DTAP, DE_P_TMSI_SIG , "" );
16281 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16288 dtap_gmm_detach_acc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16290 guint32 curr_offset;
16294 curr_offset = offset;
16297 is_uplink = IS_UPLINK_TRUE;
16298 g_pinfo->p2p_dir = P2P_DIR_RECV;
16300 if ( curr_len != 0 )
16302 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_SPARE_NIBBLE );
16306 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_FORCE_TO_STAND );
16309 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16316 dtap_gmm_ptmsi_realloc_cmd(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16318 guint32 curr_offset;
16322 curr_offset = offset;
16325 is_uplink = IS_UPLINK_FALSE;
16326 g_pinfo->p2p_dir = P2P_DIR_SENT;
16328 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_MID , " - Allocated P-TMSI" );
16330 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RAI );
16332 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_SPARE_NIBBLE );
16336 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_FORCE_TO_STAND );
16338 ELEM_OPT_TV( 0x19 , BSSAP_PDU_TYPE_DTAP, DE_MID , " - P-TMSI Signature" );
16340 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16347 dtap_gmm_ptmsi_realloc_com(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16349 guint32 curr_offset;
16350 /* guint32 consumed; */
16353 curr_offset = offset;
16356 is_uplink = IS_UPLINK_TRUE;
16357 g_pinfo->p2p_dir = P2P_DIR_RECV;
16359 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16366 dtap_gmm_auth_ciph_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16368 guint32 curr_offset;
16373 curr_offset = offset;
16376 is_uplink = IS_UPLINK_FALSE;
16377 g_pinfo->p2p_dir = P2P_DIR_SENT;
16379 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_IMEISV_REQ );
16383 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_CIPH_ALG );
16385 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_AC_REF_NUM_H );
16389 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_FORCE_TO_STAND );
16391 ELEM_OPT_TV( 0x21 , BSSAP_PDU_TYPE_DTAP, DE_AUTH_PARAM_RAND , "" );
16394 ELEM_OPT_TV_SHORT( 0x08 , BSSAP_PDU_TYPE_DTAP, DE_CIPH_KEY_SEQ_NUM , "" );
16396 if ( curr_len > 0 )
16398 oct = tvb_get_guint8(tvb, curr_offset);
16399 if (( oct & 0xf0 ) == 0x80 )
16401 /* The ciphering key sequence number is added here */
16402 proto_tree_add_text(tree,
16403 tvb, curr_offset, 1,
16404 "Ciphering key sequence number: 0x%02x (%u)",
16413 if ( curr_len == 0 )
16415 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16419 ELEM_OPT_TLV( 0x28 , BSSAP_PDU_TYPE_DTAP, DE_AUTH_PARAM_AUTN , "" );
16421 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16428 dtap_gmm_auth_ciph_resp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16430 guint32 curr_offset;
16434 curr_offset = offset;
16437 is_uplink = IS_UPLINK_TRUE;
16438 g_pinfo->p2p_dir = P2P_DIR_RECV;
16440 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_SPARE_NIBBLE );
16444 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_AC_REF_NUM );
16446 ELEM_OPT_TV( 0x22 , BSSAP_PDU_TYPE_DTAP, DE_AUTH_RESP_PARAM , "" );
16448 ELEM_OPT_TLV( 0x23 , BSSAP_PDU_TYPE_DTAP, DE_MID , " - IMEISV" );
16450 ELEM_OPT_TLV( 0x29 , BSSAP_PDU_TYPE_DTAP, DE_AUTH_RESP_PARAM_EXT , "" );
16452 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16459 dtap_gmm_auth_ciph_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16461 guint32 curr_offset;
16462 /* guint32 consumed; */
16465 curr_offset = offset;
16468 is_uplink = IS_UPLINK_FALSE;
16469 g_pinfo->p2p_dir = P2P_DIR_SENT;
16471 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16478 dtap_gmm_auth_ciph_fail(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16480 guint32 curr_offset;
16484 curr_offset = offset;
16487 is_uplink = IS_UPLINK_TRUE;
16488 g_pinfo->p2p_dir = P2P_DIR_RECV;
16490 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_GMM_CAUSE );
16492 ELEM_OPT_TLV( 0x30 , BSSAP_PDU_TYPE_DTAP, DE_AUTH_FAIL_PARAM , "" );
16494 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16501 dtap_gmm_ident_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16503 guint32 curr_offset;
16506 curr_offset = offset;
16509 is_uplink = IS_UPLINK_FALSE;
16510 g_pinfo->p2p_dir = P2P_DIR_SENT;
16512 /* 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. */
16513 /* ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_ID_TYPE_2 );
16516 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_FORCE_TO_STAND_H );*/
16518 elem_v(tvb, tree, BSSAP_PDU_TYPE_DTAP, DE_FORCE_TO_STAND_H, curr_offset);
16519 elem_v(tvb, tree, BSSAP_PDU_TYPE_DTAP, DE_ID_TYPE_2, curr_offset);
16524 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16531 dtap_gmm_ident_res(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16533 guint32 curr_offset;
16537 curr_offset = offset;
16540 is_uplink = IS_UPLINK_TRUE;
16541 g_pinfo->p2p_dir = P2P_DIR_RECV;
16543 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_MID , "" );
16545 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16552 dtap_gmm_rau_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16554 guint32 curr_offset;
16558 curr_offset = offset;
16561 is_uplink = IS_UPLINK_TRUE;
16562 g_pinfo->p2p_dir = P2P_DIR_RECV;
16564 /* is included in update type
16565 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_CIPH_KEY_SEQ_NUM );
16571 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_UPD_TYPE );
16573 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RAI );
16575 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_MS_RAD_ACC_CAP , "" );
16577 ELEM_OPT_TV( 0x19 , BSSAP_PDU_TYPE_DTAP, DE_P_TMSI_SIG , " - Old P-TMSI Signature" );
16579 ELEM_OPT_TV( 0x17 , BSSAP_PDU_TYPE_DTAP, DE_GPRS_TIMER , " - Requested Ready Timer" );
16581 ELEM_OPT_TV( 0x27 , BSSAP_PDU_TYPE_DTAP, DE_DRX_PARAM , "" );
16583 ELEM_OPT_TV_SHORT( 0x90 , BSSAP_PDU_TYPE_DTAP, DE_TMSI_STAT , "" );
16585 ELEM_OPT_TLV( 0x18 , BSSAP_PDU_TYPE_DTAP, DE_MID , " - P-TMSI" );
16587 ELEM_OPT_TLV( 0x31 , BSSAP_PDU_TYPE_DTAP, DE_MS_NET_CAP , "" );
16589 ELEM_OPT_TLV( 0x32 , BSSAP_PDU_TYPE_DTAP, DE_PDP_CONTEXT_STAT , "" );
16591 ELEM_OPT_TLV( 0x33 , BSSAP_PDU_TYPE_DTAP, DE_PS_LCS_CAP , "" );
16593 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16600 dtap_gmm_rau_acc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16602 guint32 curr_offset;
16606 curr_offset = offset;
16609 is_uplink = IS_UPLINK_FALSE;
16610 g_pinfo->p2p_dir = P2P_DIR_SENT;
16612 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_UPD_RES );
16616 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_FORCE_TO_STAND );
16618 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_GPRS_TIMER );
16620 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RAI );
16622 ELEM_OPT_TV( 0x19 , BSSAP_PDU_TYPE_DTAP, DE_P_TMSI_SIG , "" );
16624 ELEM_OPT_TLV( 0x18 , BSSAP_PDU_TYPE_DTAP, DE_MID , " - Allocated P-TMSI");
16626 ELEM_OPT_TLV( 0x23 , BSSAP_PDU_TYPE_DTAP, DE_MID , "" );
16628 ELEM_OPT_TLV( 0x26 , BSSAP_PDU_TYPE_DTAP, DE_REC_N_PDU_NUM_LIST , "" );
16630 ELEM_OPT_TV( 0x17 , BSSAP_PDU_TYPE_DTAP, DE_GPRS_TIMER , " - Negotiated Ready Timer" );
16632 ELEM_OPT_TV( 0x25 , BSSAP_PDU_TYPE_DTAP, DE_GMM_CAUSE , "" );
16634 ELEM_OPT_TLV( 0x2A , BSSAP_PDU_TYPE_DTAP, DE_GPRS_TIMER_2 , " - T3302" );
16636 ELEM_OPT_T( 0x8C , BSSAP_PDU_TYPE_DTAP, DE_CELL_NOT , "" );
16638 ELEM_OPT_TLV( 0x4A , BSSAP_PDU_TYPE_DTAP, DE_PLMN_LIST , "" );
16640 ELEM_OPT_TLV( 0x32 , BSSAP_PDU_TYPE_DTAP, DE_PDP_CONTEXT_STAT , "" );
16642 ELEM_OPT_TV_SHORT ( 0xB0 , BSSAP_PDU_TYPE_DTAP, DE_NET_FEAT_SUP , "" );
16644 ELEM_OPT_TLV( 0x34 , BSSAP_PDU_TYPE_DTAP, DE_EMERGENCY_NUM_LIST , "" );
16646 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16653 dtap_gmm_rau_com(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16655 guint32 curr_offset;
16659 curr_offset = offset;
16662 is_uplink = IS_UPLINK_TRUE;
16663 g_pinfo->p2p_dir = P2P_DIR_RECV;
16664 /* [7] 10.5.5.11 */
16665 ELEM_OPT_TLV( 0x26 , BSSAP_PDU_TYPE_DTAP, DE_REC_N_PDU_NUM_LIST , "" );
16666 /* Inter RAT information container 10.5.5.24 TS 24.008 version 6.8.0 Release 6 */
16667 /*TO DO: Implement */
16668 ELEM_OPT_TLV( 0x27 , BSSAP_PDU_TYPE_DTAP, DE_RAT_INFO_CONTAINER , "" );
16669 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16676 dtap_gmm_rau_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16678 guint32 curr_offset;
16682 curr_offset = offset;
16685 is_uplink = IS_UPLINK_FALSE;
16686 g_pinfo->p2p_dir = P2P_DIR_SENT;
16688 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_GMM_CAUSE );
16690 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_SPARE_NIBBLE );
16694 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_FORCE_TO_STAND );
16696 ELEM_OPT_TLV( 0x26 , BSSAP_PDU_TYPE_DTAP, DE_GPRS_TIMER_2 , " - T3302" );
16698 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16705 dtap_gmm_status(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16707 guint32 curr_offset;
16711 curr_offset = offset;
16714 is_uplink = IS_UPLINK_UNKNOWN;
16715 g_pinfo->p2p_dir = P2P_DIR_UNKNOWN;
16717 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_GMM_CAUSE );
16719 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16723 * [8] 9.4.19 GMM Information
16726 dtap_gmm_information(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16728 guint32 curr_offset;
16732 curr_offset = offset;
16735 is_uplink = IS_UPLINK_FALSE;
16736 g_pinfo->p2p_dir = P2P_DIR_SENT;
16738 ELEM_OPT_TLV( 0x43 , BSSAP_PDU_TYPE_DTAP, DE_NETWORK_NAME , " - Full Name" );
16740 ELEM_OPT_TLV( 0x45 , BSSAP_PDU_TYPE_DTAP, DE_NETWORK_NAME , " - Short Name" );
16742 ELEM_OPT_TV( 0x46 , BSSAP_PDU_TYPE_DTAP, DE_TIME_ZONE , "" );
16744 ELEM_OPT_TV( 0x47 , BSSAP_PDU_TYPE_DTAP, DE_TIME_ZONE_TIME , "" );
16746 ELEM_OPT_TLV( 0x48 , BSSAP_PDU_TYPE_DTAP, DE_LSA_ID , "" );
16748 ELEM_OPT_TLV( 0x49 , BSSAP_PDU_TYPE_DTAP, DE_DAY_SAVING_TIME , "" );
16750 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16757 dtap_gmm_service_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16759 guint32 curr_offset;
16763 curr_offset = offset;
16766 is_uplink = IS_UPLINK_TRUE;
16767 g_pinfo->p2p_dir = P2P_DIR_RECV;
16769 /* Is included in SRVC TYPE
16770 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_CIPH_KEY_SEQ_NUM );
16775 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_SRVC_TYPE );
16777 /* P-TMSI Mobile station identity 10.5.1.4 M LV 6 */
16778 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_MID, "");
16780 ELEM_OPT_TLV( 0x32 , BSSAP_PDU_TYPE_DTAP, DE_PDP_CONTEXT_STAT , "" );
16782 /* MBMS context status 10.5.7.6 TLV 2 - 18 */
16783 ELEM_OPT_TLV( 0x35 , BSSAP_PDU_TYPE_DTAP, DE_MBMS_CTX_STATUS , "" );
16785 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16792 dtap_gmm_service_acc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16794 guint32 curr_offset;
16798 curr_offset = offset;
16801 is_uplink = IS_UPLINK_FALSE;
16802 g_pinfo->p2p_dir = P2P_DIR_SENT;
16804 ELEM_OPT_TLV( 0x32 , BSSAP_PDU_TYPE_DTAP, DE_PDP_CONTEXT_STAT , "" );
16806 /* MBMS context status 10.5.7.6 TLV 2 - 18 */
16807 ELEM_OPT_TLV( 0x35 , BSSAP_PDU_TYPE_DTAP, DE_MBMS_CTX_STATUS , "" );
16809 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16816 dtap_gmm_service_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16818 guint32 curr_offset;
16822 curr_offset = offset;
16825 is_uplink = IS_UPLINK_FALSE;
16826 g_pinfo->p2p_dir = P2P_DIR_SENT;
16828 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_GMM_CAUSE );
16830 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16834 * [8] 9.5.1 Activate PDP context request
16837 dtap_sm_act_pdp_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16839 guint32 curr_offset;
16843 curr_offset = offset;
16846 is_uplink = IS_UPLINK_UNKNOWN;
16847 g_pinfo->p2p_dir = P2P_DIR_UNKNOWN;
16849 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_NET_SAPI );
16851 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_LLC_SAPI );
16853 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_QOS , " - Requested QoS" );
16855 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_PD_PRO_ADDR , " - Requested PDP address" );
16857 ELEM_OPT_TLV( 0x28 , BSSAP_PDU_TYPE_DTAP, DE_ACC_POINT_NAME , "" );
16859 ELEM_OPT_TLV( 0x27 , BSSAP_PDU_TYPE_DTAP, DE_PRO_CONF_OPT , "" );
16861 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16865 * [8] 9.5.2 Activate PDP context accept
16868 dtap_sm_act_pdp_acc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16870 guint32 curr_offset;
16874 curr_offset = offset;
16877 is_uplink = IS_UPLINK_UNKNOWN;
16878 g_pinfo->p2p_dir = P2P_DIR_UNKNOWN;
16880 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_LLC_SAPI );
16882 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_QOS , " - Negotiated QoS" );
16885 /* This is done automatically */
16886 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_SPARE );
16891 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RAD_PRIO );
16893 ELEM_OPT_TLV( 0x2B , BSSAP_PDU_TYPE_DTAP, DE_PD_PRO_ADDR , "" );
16895 ELEM_OPT_TLV( 0x27 , BSSAP_PDU_TYPE_DTAP, DE_PRO_CONF_OPT , "" );
16897 ELEM_OPT_TLV( 0x34 , BSSAP_PDU_TYPE_DTAP, DE_PACKET_FLOW_ID , "" );
16899 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16903 * [8] 9.5.3 Activate PDP context reject
16906 dtap_sm_act_pdp_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16908 guint32 curr_offset;
16912 curr_offset = offset;
16915 is_uplink = IS_UPLINK_UNKNOWN;
16916 g_pinfo->p2p_dir = P2P_DIR_UNKNOWN;
16918 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_SM_CAUSE );
16920 ELEM_OPT_TLV( 0x27 , BSSAP_PDU_TYPE_DTAP, DE_PRO_CONF_OPT , "" );
16922 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16926 * [8] 9.5.4 Activate Secondary PDP Context Request
16929 dtap_sm_act_sec_pdp_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16931 guint32 curr_offset;
16935 curr_offset = offset;
16938 is_uplink = IS_UPLINK_UNKNOWN;
16939 g_pinfo->p2p_dir = P2P_DIR_UNKNOWN;
16941 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_NET_SAPI );
16943 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_LLC_SAPI );
16945 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_QOS , " - Requested QoS" );
16947 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_LINKED_TI , "" );
16949 /* 3GPP TS 24.008 version 6.8.0 Release 6, 36 TFT Traffic Flow Template 10.5.6.12 O TLV 3-257 */
16950 ELEM_OPT_TLV( 0x36 , BSSAP_PDU_TYPE_DTAP, DE_TRAFFIC_FLOW_TEMPLATE , "" );
16952 ELEM_OPT_TLV( 0x27 , BSSAP_PDU_TYPE_DTAP, DE_PRO_CONF_OPT , "" );
16954 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16961 dtap_sm_act_sec_pdp_acc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16963 guint32 curr_offset;
16967 curr_offset = offset;
16970 is_uplink = IS_UPLINK_UNKNOWN;
16971 g_pinfo->p2p_dir = P2P_DIR_UNKNOWN;
16973 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_LLC_SAPI );
16975 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_QOS , " - Negotiated QoS" );
16977 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RAD_PRIO);
16980 /* This is done automatically */
16981 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_SPARE );
16986 ELEM_OPT_TLV( 0x34 , BSSAP_PDU_TYPE_DTAP, DE_PACKET_FLOW_ID , "" );
16988 ELEM_OPT_TLV( 0x27 , BSSAP_PDU_TYPE_DTAP, DE_PRO_CONF_OPT , "" );
16990 EXTRANEOUS_DATA_CHECK(curr_len, 0);
16994 * [8] 9.5.6 Activate Secondary PDP Context Reject
16997 dtap_sm_act_sec_pdp_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
16999 guint32 curr_offset;
17003 curr_offset = offset;
17006 is_uplink = IS_UPLINK_UNKNOWN;
17007 g_pinfo->p2p_dir = P2P_DIR_UNKNOWN;
17009 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_SM_CAUSE );
17011 ELEM_OPT_TLV( 0x27 , BSSAP_PDU_TYPE_DTAP, DE_PRO_CONF_OPT , "" );
17013 EXTRANEOUS_DATA_CHECK(curr_len, 0);
17017 * [8] 9.5.7 Request PDP context activation
17020 dtap_sm_req_pdp_act(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
17022 guint32 curr_offset;
17026 curr_offset = offset;
17029 is_uplink = IS_UPLINK_UNKNOWN;
17030 g_pinfo->p2p_dir = P2P_DIR_UNKNOWN;
17032 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_PD_PRO_ADDR , " - Offered PDP address" );
17034 ELEM_OPT_TLV( 0x28 , BSSAP_PDU_TYPE_DTAP, DE_ACC_POINT_NAME , "" );
17036 ELEM_OPT_TLV( 0x27 , BSSAP_PDU_TYPE_DTAP, DE_PRO_CONF_OPT , "" );
17038 EXTRANEOUS_DATA_CHECK(curr_len, 0);
17042 * [8] 9.5.8 Request PDP context activation reject
17045 dtap_sm_req_pdp_act_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
17047 guint32 curr_offset;
17051 curr_offset = offset;
17054 is_uplink = IS_UPLINK_UNKNOWN;
17055 g_pinfo->p2p_dir = P2P_DIR_UNKNOWN;
17057 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_SM_CAUSE );
17059 ELEM_OPT_TLV( 0x27 , BSSAP_PDU_TYPE_DTAP, DE_PRO_CONF_OPT , "" );
17061 EXTRANEOUS_DATA_CHECK(curr_len, 0);
17065 * [8] 9.5.9 Modify PDP context request (Network to MS direction)
17068 dtap_sm_mod_pdp_req_net(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
17070 guint32 curr_offset;
17074 curr_offset = offset;
17077 is_uplink = IS_UPLINK_UNKNOWN;
17078 g_pinfo->p2p_dir = P2P_DIR_UNKNOWN;
17080 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP,DE_RAD_PRIO);
17082 /* This is done automatically */
17083 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_SPARE );
17088 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_LLC_SAPI );
17090 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_QOS , " - New QoS" );
17092 ELEM_OPT_TLV( 0x2B , BSSAP_PDU_TYPE_DTAP, DE_PD_PRO_ADDR , "" );
17094 ELEM_OPT_TLV( 0x34 , BSSAP_PDU_TYPE_DTAP, DE_PACKET_FLOW_ID , "" );
17096 ELEM_OPT_TLV( 0x27 , BSSAP_PDU_TYPE_DTAP, DE_PRO_CONF_OPT , "" );
17098 EXTRANEOUS_DATA_CHECK(curr_len, 0);
17102 * [8] 9.5.10 Modify PDP context request (MS to network direction)
17105 dtap_sm_mod_pdp_req_ms(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
17107 guint32 curr_offset;
17111 curr_offset = offset;
17114 is_uplink = IS_UPLINK_UNKNOWN;
17115 g_pinfo->p2p_dir = P2P_DIR_UNKNOWN;
17117 ELEM_OPT_TV( 0x32 , BSSAP_PDU_TYPE_DTAP, DE_LLC_SAPI , " - Requested LLC SAPI" );
17119 ELEM_OPT_TLV( 0x30 , BSSAP_PDU_TYPE_DTAP, DE_QOS , " - Requested new QoS" );
17121 ELEM_OPT_TLV( 0x31 , BSSAP_PDU_TYPE_DTAP, DE_TRAFFIC_FLOW_TEMPLATE , " - New TFT" );
17123 ELEM_OPT_TLV( 0x27 , BSSAP_PDU_TYPE_DTAP, DE_PRO_CONF_OPT , "" );
17125 EXTRANEOUS_DATA_CHECK(curr_len, 0);
17129 * [8] 9.5.11 Modify PDP context accept (MS to network direction)
17132 dtap_sm_mod_pdp_acc_ms(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
17134 guint32 curr_offset;
17138 curr_offset = offset;
17141 is_uplink = IS_UPLINK_UNKNOWN;
17142 g_pinfo->p2p_dir = P2P_DIR_UNKNOWN;
17144 ELEM_OPT_TLV( 0x27 , BSSAP_PDU_TYPE_DTAP, DE_PRO_CONF_OPT , "" );
17146 EXTRANEOUS_DATA_CHECK(curr_len, 0);
17150 * [8] 9.5.12 Modify PDP context accept (Network to MS direction)
17153 dtap_sm_mod_pdp_acc_net(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
17155 guint32 curr_offset;
17159 curr_offset = offset;
17162 is_uplink = IS_UPLINK_UNKNOWN;
17163 g_pinfo->p2p_dir = P2P_DIR_UNKNOWN;
17165 ELEM_OPT_TLV( 0x30 , BSSAP_PDU_TYPE_DTAP, DE_QOS , " - Negotiated QoS" );
17167 ELEM_OPT_TV( 0x32 , BSSAP_PDU_TYPE_DTAP, DE_LLC_SAPI , " - Negotiated LLC SAPI" );
17169 ELEM_OPT_TV_SHORT ( 0x80 , BSSAP_PDU_TYPE_DTAP , DE_RAD_PRIO , " - New radio priority" );
17171 ELEM_OPT_TLV( 0x34 , BSSAP_PDU_TYPE_DTAP, DE_PACKET_FLOW_ID , "" );
17173 ELEM_OPT_TLV( 0x27 , BSSAP_PDU_TYPE_DTAP, DE_PRO_CONF_OPT , "" );
17175 EXTRANEOUS_DATA_CHECK(curr_len, 0);
17179 * [8] 9.5.13 Modify PDP Context Reject
17182 dtap_sm_mod_pdp_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
17184 guint32 curr_offset;
17188 curr_offset = offset;
17191 is_uplink = IS_UPLINK_UNKNOWN;
17192 g_pinfo->p2p_dir = P2P_DIR_UNKNOWN;
17194 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_SM_CAUSE );
17196 ELEM_OPT_TLV( 0x27 , BSSAP_PDU_TYPE_DTAP, DE_PRO_CONF_OPT , "" );
17198 EXTRANEOUS_DATA_CHECK(curr_len, 0);
17202 * [8] 9.5.14 Deactivate PDP context request
17205 dtap_sm_deact_pdp_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
17207 guint32 curr_offset;
17211 curr_offset = offset;
17214 is_uplink = IS_UPLINK_UNKNOWN;
17215 g_pinfo->p2p_dir = P2P_DIR_UNKNOWN;
17217 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_SM_CAUSE );
17219 ELEM_OPT_TV_SHORT( 0x90 , BSSAP_PDU_TYPE_DTAP , DE_TEAR_DOWN_IND , "" );
17221 ELEM_OPT_TLV( 0x27 , BSSAP_PDU_TYPE_DTAP, DE_PRO_CONF_OPT , "" );
17223 /* MBMS context status 10.5.7.6 TLV 2 - 18 */
17224 ELEM_OPT_TLV( 0x35 , BSSAP_PDU_TYPE_DTAP, DE_MBMS_CTX_STATUS , "" );
17226 EXTRANEOUS_DATA_CHECK(curr_len, 0);
17231 * [8] 9.5.15 Deactivate PDP context accept
17234 dtap_sm_deact_pdp_acc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
17236 guint32 curr_offset;
17240 curr_offset = offset;
17243 is_uplink = IS_UPLINK_UNKNOWN;
17244 g_pinfo->p2p_dir = P2P_DIR_UNKNOWN;
17246 ELEM_OPT_TLV( 0x27 , BSSAP_PDU_TYPE_DTAP, DE_PRO_CONF_OPT , "" );
17248 /* MBMS context status 10.5.7.6 TLV 2 - 18 */
17249 ELEM_OPT_TLV( 0x35 , BSSAP_PDU_TYPE_DTAP, DE_MBMS_CTX_STATUS , "" );
17251 EXTRANEOUS_DATA_CHECK(curr_len, 0);
17255 * [8] 9.5.21 SM Status
17258 dtap_sm_status(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
17260 guint32 curr_offset;
17264 curr_offset = offset;
17267 is_uplink = IS_UPLINK_UNKNOWN;
17268 g_pinfo->p2p_dir = P2P_DIR_UNKNOWN;
17270 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_SM_CAUSE );
17272 EXTRANEOUS_DATA_CHECK(curr_len, 0);
17276 * [8] 9.5.22 Activate MBMS Context Request
17279 /* Requested MBMS NSAPI Enhanced Network service access point identifier 10.5.6.15 M V */
17280 /* Requested LLC SAPI LLC service access point identifier 10.5.6.9 M V 1 */
17281 /* Supported MBMS bearer capabilities MBMS bearer capabilities 10.5.6.14 M LV 2 - 3 */
17282 /* Requested multicast address Packet data protocol address 10.5.6.4 M LV 3 - 19 */
17283 /* Access point name Access point name 10.5.6.1 M LV 2 - 101 */
17284 /* 35 MBMS protocol configuration options MBMS protocol configuration options 10.5.6.15 O TLV 3 - 253 */
17287 * [8] 9.5.23 Activate MBMS Context Accept
17291 * [8] 9.5.24 Activate MBMS Context Reject
17295 * [8] 9.5.25 Request MBMS Context Activation
17299 * [8] 9.5.26 Request MBMS Context Activation Reject
17302 #define NUM_GSM_DTAP_MSG_MM (sizeof(gsm_a_dtap_msg_mm_strings)/sizeof(value_string))
17303 static gint ett_gsm_dtap_msg_mm[NUM_GSM_DTAP_MSG_MM];
17304 static void (*dtap_msg_mm_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) = {
17305 dtap_mm_imsi_det_ind, /* IMSI Detach Indication */
17306 dtap_mm_loc_upd_acc, /* Location Updating Accept */
17307 dtap_mm_loc_upd_rej, /* Location Updating Reject */
17308 dtap_mm_loc_upd_req, /* Location Updating Request */
17309 NULL /* no associated data */, /* Authentication Reject */
17310 dtap_mm_auth_req, /* Authentication Request */
17311 dtap_mm_auth_resp, /* Authentication Response */
17312 dtap_mm_auth_fail, /* Authentication Failure */
17313 dtap_mm_id_req, /* Identity Request */
17314 dtap_mm_id_resp, /* Identity Response */
17315 dtap_mm_tmsi_realloc_cmd, /* TMSI Reallocation Command */
17316 NULL /* no associated data */, /* TMSI Reallocation Complete */
17317 NULL /* no associated data */, /* CM Service Accept */
17318 dtap_mm_cm_srvc_rej, /* CM Service Reject */
17319 NULL /* no associated data */, /* CM Service Abort */
17320 dtap_mm_cm_srvc_req, /* CM Service Request */
17321 dtap_mm_cm_srvc_prompt, /* CM Service Prompt */
17322 NULL, /* Reserved: was allocated in earlier phases of the protocol */
17323 dtap_mm_cm_reestab_req, /* CM Re-establishment Request */
17324 dtap_mm_abort, /* Abort */
17325 NULL /* no associated data */, /* MM Null */
17326 dtap_mm_mm_status, /* MM Status */
17327 dtap_mm_mm_info, /* MM Information */
17331 #define NUM_GSM_DTAP_MSG_RR (sizeof(gsm_a_dtap_msg_rr_strings)/sizeof(value_string))
17332 static gint ett_gsm_dtap_msg_rr[NUM_GSM_DTAP_MSG_RR];
17333 static void (*dtap_msg_rr_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) = {
17334 NULL, /* RR Initialisation Request */
17335 NULL, /* Additional Assignment */
17336 NULL, /* Immediate Assignment */
17337 NULL, /* Immediate Assignment Extended */
17338 NULL, /* Immediate Assignment Reject */
17340 NULL, /* DTM Assignment Failure */
17341 NULL, /* DTM Reject */
17342 NULL, /* DTM Request */
17343 NULL, /* Main DCCH Assignment Command */
17344 NULL, /* Packet Assignment Command */
17346 NULL, /* Ciphering Mode Command */
17347 NULL, /* Ciphering Mode Complete */
17349 NULL, /* Configuration Change Command */
17350 NULL, /* Configuration Change Ack. */
17351 NULL, /* Configuration Change Reject */
17353 NULL, /* Assignment Command */
17354 NULL, /* Assignment Complete */
17355 NULL, /* Assignment Failure */
17356 dtap_rr_ho_cmd, /* Handover Command */
17357 NULL, /* Handover Complete */
17358 NULL, /* Handover Failure */
17359 NULL, /* Physical Information */
17360 NULL, /* DTM Assignment Command */
17362 NULL, /* RR-cell Change Order */
17363 NULL, /* PDCH Assignment Command */
17365 NULL, /* Channel Release */
17366 NULL, /* Partial Release */
17367 NULL, /* Partial Release Complete */
17369 NULL, /* Paging Request Type 1 */
17370 NULL, /* Paging Request Type 2 */
17371 NULL, /* Paging Request Type 3 */
17372 dtap_rr_paging_resp, /* Paging Response */
17373 NULL, /* Notification/NCH */
17374 NULL, /* Reserved */
17375 NULL, /* Notification/Response */
17377 NULL, /* Reserved */
17379 NULL, /* Utran Classmark Change */
17380 NULL, /* UE RAB Preconfiguration */
17381 NULL, /* cdma2000 Classmark Change */
17382 NULL, /* Inter System to UTRAN Handover Command */
17383 NULL, /* Inter System to cdma2000 Handover Command */
17385 NULL, /* System Information Type 8 */
17386 NULL, /* System Information Type 1 */
17387 NULL, /* System Information Type 2 */
17388 NULL, /* System Information Type 3 */
17389 NULL, /* System Information Type 4 */
17390 NULL, /* System Information Type 5 */
17391 NULL, /* System Information Type 6 */
17392 NULL, /* System Information Type 7 */
17394 NULL, /* System Information Type 2bis */
17395 NULL, /* System Information Type 2ter */
17396 NULL, /* System Information Type 2quater */
17397 NULL, /* System Information Type 5bis */
17398 NULL, /* System Information Type 5ter */
17399 NULL, /* System Information Type 9 */
17400 NULL, /* System Information Type 13 */
17402 NULL, /* System Information Type 16 */
17403 NULL, /* System Information Type 17 */
17405 NULL, /* System Information Type 18 */
17406 NULL, /* System Information Type 19 */
17407 NULL, /* System Information Type 20 */
17409 NULL, /* Channel Mode Modify */
17410 dtap_rr_rr_status, /* RR Status */
17411 NULL, /* Channel Mode Modify Acknowledge */
17412 NULL, /* Frequency Redefinition */
17413 NULL, /* Measurement Report */
17414 NULL, /* Classmark Change */
17415 NULL, /* Classmark Enquiry */
17416 NULL, /* Extended Measurement Report */
17417 NULL, /* Extended Measurement Order */
17418 NULL, /* GPRS Suspension Request */
17420 NULL, /* VGCS Uplink Grant */
17421 NULL, /* Uplink Release */
17422 NULL, /* Reserved */
17423 NULL, /* Uplink Busy */
17424 NULL, /* Talker Indication */
17426 NULL, /* UTRAN Classmark Change/Handover To UTRAN Command */ /* spec conflict */
17428 NULL, /* Application Information */
17433 #define NUM_GSM_DTAP_MSG_CC (sizeof(gsm_a_dtap_msg_cc_strings)/sizeof(value_string))
17434 static gint ett_gsm_dtap_msg_cc[NUM_GSM_DTAP_MSG_CC];
17435 static void (*dtap_msg_cc_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) = {
17436 dtap_cc_alerting, /* Alerting */
17437 dtap_cc_call_conf, /* Call Confirmed */
17438 dtap_cc_call_proceed, /* Call Proceeding */
17439 dtap_cc_connect, /* Connect */
17440 NULL /* no associated data */, /* Connect Acknowledge */
17441 dtap_cc_emerg_setup, /* Emergency Setup */
17442 dtap_cc_progress, /* Progress */
17443 dtap_cc_cc_est, /* CC-Establishment */
17444 dtap_cc_cc_est_conf, /* CC-Establishment Confirmed */
17445 dtap_cc_recall, /* Recall */
17446 dtap_cc_start_cc, /* Start CC */
17447 dtap_cc_setup, /* Setup */
17448 dtap_cc_modify, /* Modify */
17449 dtap_cc_modify_complete, /* Modify Complete */
17450 dtap_cc_modify_rej, /* Modify Reject */
17451 dtap_cc_user_info, /* User Information */
17452 NULL /* no associated data */, /* Hold */
17453 NULL /* no associated data */, /* Hold Acknowledge */
17454 dtap_cc_hold_rej, /* Hold Reject */
17455 NULL /* no associated data */, /* Retrieve */
17456 NULL /* no associated data */, /* Retrieve Acknowledge */
17457 dtap_cc_retrieve_rej, /* Retrieve Reject */
17458 dtap_cc_disconnect, /* Disconnect */
17459 dtap_cc_release, /* Release */
17460 dtap_cc_release_complete, /* Release Complete */
17461 dtap_cc_congestion_control, /* Congestion Control */
17462 dtap_cc_notify, /* Notify */
17463 dtap_cc_status, /* Status */
17464 NULL /* no associated data */, /* Status Enquiry */
17465 dtap_cc_start_dtmf, /* Start DTMF */
17466 NULL /* no associated data */, /* Stop DTMF */
17467 NULL /* no associated data */, /* Stop DTMF Acknowledge */
17468 dtap_cc_start_dtmf_ack, /* Start DTMF Acknowledge */
17469 dtap_cc_start_dtmf_rej, /* Start DTMF Reject */
17470 dtap_cc_facility, /* Facility */
17474 #define NUM_GSM_DTAP_MSG_GMM (sizeof(gsm_a_dtap_msg_gmm_strings)/sizeof(value_string))
17475 static gint ett_gsm_dtap_msg_gmm[NUM_GSM_DTAP_MSG_GMM];
17476 static void (*dtap_msg_gmm_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) = {
17477 dtap_gmm_attach_req, /* Attach Request */
17478 dtap_gmm_attach_acc, /* Attach Accept */
17479 dtap_gmm_attach_com, /* Attach Complete */
17480 dtap_gmm_attach_rej, /* Attach Reject */
17481 dtap_gmm_detach_req, /* Detach Request */
17482 dtap_gmm_detach_acc, /* Detach Accept */
17483 dtap_gmm_rau_req, /* Routing Area Update Request */
17484 dtap_gmm_rau_acc, /* Routing Area Update Accept */
17485 dtap_gmm_rau_com, /* Routing Area Update Complete */
17486 dtap_gmm_rau_rej, /* Routing Area Update Reject */
17487 dtap_gmm_service_req, /* Service Request */
17488 dtap_gmm_service_acc, /* Service Accept */
17489 dtap_gmm_service_rej, /* Service Reject */
17490 dtap_gmm_ptmsi_realloc_cmd, /* P-TMSI Reallocation Command */
17491 dtap_gmm_ptmsi_realloc_com, /* P-TMSI Reallocation Complete */
17492 dtap_gmm_auth_ciph_req, /* Authentication and Ciphering Req */
17493 dtap_gmm_auth_ciph_resp, /* Authentication and Ciphering Resp */
17494 dtap_gmm_auth_ciph_rej, /* Authentication and Ciphering Rej */
17495 dtap_gmm_auth_ciph_fail, /* Authentication and Ciphering Failure */
17496 dtap_gmm_ident_req, /* Identity Request */
17497 dtap_gmm_ident_res, /* Identity Response */
17498 dtap_gmm_status, /* GMM Status */
17499 dtap_gmm_information, /* GMM Information */
17503 #define NUM_GSM_DTAP_MSG_SMS (sizeof(gsm_a_dtap_msg_sms_strings)/sizeof(value_string))
17504 static gint ett_gsm_dtap_msg_sms[NUM_GSM_DTAP_MSG_SMS];
17505 static void (*dtap_msg_sms_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) = {
17506 dtap_sms_cp_data, /* CP-DATA */
17507 NULL /* no associated data */, /* CP-ACK */
17508 dtap_sms_cp_error, /* CP-ERROR */
17512 #define NUM_GSM_DTAP_MSG_SM (sizeof(gsm_a_dtap_msg_sm_strings)/sizeof(value_string))
17513 static gint ett_gsm_dtap_msg_sm[NUM_GSM_DTAP_MSG_SM];
17514 static void (*dtap_msg_sm_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) = {
17515 dtap_sm_act_pdp_req, /* Activate PDP Context Request */
17516 dtap_sm_act_pdp_acc, /* Activate PDP Context Accept */
17517 dtap_sm_act_pdp_rej, /* Activate PDP Context Reject */
17518 dtap_sm_req_pdp_act, /* Request PDP Context Activation */
17519 dtap_sm_req_pdp_act_rej, /* Request PDP Context Activation rej. */
17520 dtap_sm_deact_pdp_req, /* Deactivate PDP Context Request */
17521 dtap_sm_deact_pdp_acc, /* Deactivate PDP Context Accept */
17522 dtap_sm_mod_pdp_req_net, /* Modify PDP Context Request(Network to MS direction) */
17523 dtap_sm_mod_pdp_acc_ms, /* Modify PDP Context Accept (MS to network direction) */
17524 dtap_sm_mod_pdp_req_ms, /* Modify PDP Context Request(MS to network direction) */
17525 dtap_sm_mod_pdp_acc_net, /* Modify PDP Context Accept (Network to MS direction) */
17526 dtap_sm_mod_pdp_rej, /* Modify PDP Context Reject */
17527 dtap_sm_act_sec_pdp_req, /* Activate Secondary PDP Context Request */
17528 dtap_sm_act_sec_pdp_acc, /* Activate Secondary PDP Context Accept */
17529 dtap_sm_act_sec_pdp_rej, /* Activate Secondary PDP Context Reject */
17530 NULL, /* Reserved: was allocated in earlier phases of the protocol */
17531 NULL, /* Reserved: was allocated in earlier phases of the protocol */
17532 NULL, /* Reserved: was allocated in earlier phases of the protocol */
17533 NULL, /* Reserved: was allocated in earlier phases of the protocol */
17534 NULL, /* Reserved: was allocated in earlier phases of the protocol */
17535 dtap_sm_status, /* SM Status */
17536 /* Activate MBMS Context Request */
17537 /* Activate MBMS Context Accept */
17538 /* Activate MBMS Context Reject */
17539 /* Request MBMS Context Activation */
17540 /* Request MBMS Context Activation Reject */
17544 #define NUM_GSM_DTAP_MSG_SS (sizeof(gsm_a_dtap_msg_ss_strings)/sizeof(value_string))
17545 static gint ett_gsm_dtap_msg_ss[NUM_GSM_DTAP_MSG_SS];
17546 static void (*dtap_msg_ss_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) = {
17547 dtap_cc_release_complete, /* Release Complete */
17548 dtap_cc_facility, /* Facility */
17549 dtap_ss_register, /* Register */
17553 #define NUM_GSM_RP_MSG (sizeof(gsm_rp_msg_strings)/sizeof(value_string))
17554 static gint ett_gsm_rp_msg[NUM_GSM_RP_MSG];
17555 static void (*rp_msg_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) = {
17556 rp_data_ms_n, /* RP-DATA (MS to Network) */
17557 rp_data_n_ms, /* RP-DATA (Network to MS */
17558 rp_ack_ms_n, /* RP-ACK (MS to Network) */
17559 rp_ack_n_ms, /* RP-ACK (Network to MS) */
17560 rp_error_ms_n, /* RP-ERROR (MS to Network) */
17561 rp_error_n_ms, /* RP-ERROR (Network to MS) */
17562 rp_smma, /* RP-SMMA (MS to Network) */
17566 /* GENERIC DISSECTOR FUNCTIONS */
17569 dissect_rp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
17572 guint32 offset, saved_offset;
17575 proto_item *rp_item = NULL;
17576 proto_tree *rp_tree = NULL;
17580 if (check_col(pinfo->cinfo, COL_INFO))
17582 col_append_str(pinfo->cinfo, COL_INFO, "(RP) ");
17586 * In the interest of speed, if "tree" is NULL, don't do any work
17587 * not necessary to generate protocol tree items.
17595 saved_offset = offset;
17600 len = tvb_length(tvb);
17603 * add RP message name
17605 oct = tvb_get_guint8(tvb, offset++);
17607 str = match_strval_idx((guint32) oct, gsm_rp_msg_strings, &idx);
17610 * create the protocol tree
17615 proto_tree_add_protocol_format(tree, proto_a_rp, tvb, 0, len,
17616 "GSM A-I/F RP - Unknown RP Message Type (0x%02x)",
17619 rp_tree = proto_item_add_subtree(rp_item, ett_rp_msg);
17624 proto_tree_add_protocol_format(tree, proto_a_rp, tvb, 0, -1,
17625 "GSM A-I/F RP - %s",
17628 rp_tree = proto_item_add_subtree(rp_item, ett_gsm_rp_msg[idx]);
17630 if (check_col(pinfo->cinfo, COL_INFO))
17632 col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", str);
17637 * add RP message name
17639 proto_tree_add_uint_format(rp_tree, hf_gsm_a_rp_msg_type,
17640 tvb, saved_offset, 1, oct, "Message Type %s", str ? str : "(Unknown)");
17642 if (str == NULL) return;
17644 if ((len - offset) <= 0) return;
17649 if (rp_msg_fcn[idx] == NULL)
17651 proto_tree_add_text(rp_tree,
17652 tvb, offset, len - offset,
17653 "Message Elements");
17657 (*rp_msg_fcn[idx])(tvb, rp_tree, offset, len - offset);
17663 dissect_bssmap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
17665 static gsm_a_tap_rec_t tap_rec[4];
17666 static gsm_a_tap_rec_t *tap_p;
17667 static int tap_current=0;
17669 guint32 offset, saved_offset;
17672 proto_item *bssmap_item = NULL;
17673 proto_tree *bssmap_tree = NULL;
17677 sccp_msg = pinfo->sccp_info;
17679 if (sccp_msg && sccp_msg->data.co.assoc) {
17680 sccp_assoc = sccp_msg->data.co.assoc;
17686 if (check_col(pinfo->cinfo, COL_INFO))
17688 col_append_str(pinfo->cinfo, COL_INFO, "(BSSMAP) ");
17692 * set tap record pointer
17695 if (tap_current == 4)
17699 tap_p = &tap_rec[tap_current];
17703 saved_offset = offset;
17708 len = tvb_length(tvb);
17711 * add BSSMAP message name
17713 oct = tvb_get_guint8(tvb, offset++);
17715 str = match_strval_idx((guint32) oct, gsm_a_bssmap_msg_strings, &idx);
17717 if (sccp_msg && !sccp_msg->data.co.label) {
17718 sccp_msg->data.co.label = se_strdup(val_to_str((guint32) oct, gsm_a_bssmap_msg_strings, "BSSMAP (0x%02x)"));
17722 * create the protocol tree
17727 proto_tree_add_protocol_format(tree, proto_a_bssmap, tvb, 0, len,
17728 "GSM A-I/F BSSMAP - Unknown BSSMAP Message Type (0x%02x)",
17731 bssmap_tree = proto_item_add_subtree(bssmap_item, ett_bssmap_msg);
17736 proto_tree_add_protocol_format(tree, proto_a_bssmap, tvb, 0, -1,
17737 "GSM A-I/F BSSMAP - %s",
17740 bssmap_tree = proto_item_add_subtree(bssmap_item, ett_gsm_bssmap_msg[idx]);
17742 if (check_col(pinfo->cinfo, COL_INFO))
17744 col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", str);
17748 * add BSSMAP message name
17750 proto_tree_add_uint_format(bssmap_tree, hf_gsm_a_bssmap_msg_type,
17751 tvb, saved_offset, 1, oct, "Message Type %s",str);
17754 tap_p->pdu_type = BSSAP_PDU_TYPE_BSSMAP;
17755 tap_p->message_type = oct;
17757 tap_queue_packet(gsm_a_tap, pinfo, tap_p);
17759 if (str == NULL) return;
17761 if ((len - offset) <= 0) return;
17766 if (bssmap_msg_fcn[idx] == NULL)
17768 proto_tree_add_text(bssmap_tree,
17769 tvb, offset, len - offset,
17770 "Message Elements");
17774 (*bssmap_msg_fcn[idx])(tvb, bssmap_tree, offset, len - offset);
17780 dissect_dtap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
17782 static gsm_a_tap_rec_t tap_rec[4];
17783 static gsm_a_tap_rec_t *tap_p;
17784 static int tap_current=0;
17785 void (*msg_fcn)(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len);
17790 guint32 oct_1, oct_2;
17792 proto_item *dtap_item = NULL;
17793 proto_tree *dtap_tree = NULL;
17794 proto_item *oct_1_item = NULL;
17795 proto_tree *pd_tree = NULL;
17796 const gchar *msg_str;
17803 len = tvb_length(tvb);
17808 * too short to be DTAP
17810 call_dissector(data_handle, tvb, pinfo, tree);
17814 if (check_col(pinfo->cinfo, COL_INFO))
17816 col_append_str(pinfo->cinfo, COL_INFO, "(DTAP) ");
17820 * set tap record pointer
17823 if (tap_current == 4)
17827 tap_p = &tap_rec[tap_current];
17837 * get protocol discriminator
17839 oct_1 = tvb_get_guint8(tvb, offset++);
17841 if ((((oct_1 & DTAP_TI_MASK) >> 4) & DTAP_TIE_PRES_MASK) == DTAP_TIE_PRES_MASK)
17844 * eventhough we don't know if a TI should be in the message yet
17845 * we rely on the TI/SKIP indicator to be 0 to avoid taking this
17848 oct_2 = tvb_get_guint8(tvb, offset++);
17851 oct = tvb_get_guint8(tvb, offset);
17853 pd = oct_1 & DTAP_PD_MASK;
17860 if (check_col(pinfo->cinfo, COL_INFO))
17862 col_append_fstr(pinfo->cinfo, COL_INFO, "(%s) ",val_to_str(pd,gsm_a_pd_short_str_vals,"unknown"));
17871 msg_str = match_strval_idx((guint32) (oct & DTAP_CC_IEI_MASK), gsm_a_dtap_msg_cc_strings, &idx);
17872 ett_tree = ett_gsm_dtap_msg_cc[idx];
17873 hf_idx = hf_gsm_a_dtap_msg_cc_type;
17874 msg_fcn = dtap_msg_cc_fcn[idx];
17875 ti = (oct_1 & DTAP_TI_MASK) >> 4;
17880 msg_str = match_strval_idx((guint32) (oct & DTAP_MM_IEI_MASK), gsm_a_dtap_msg_mm_strings, &idx);
17881 ett_tree = ett_gsm_dtap_msg_mm[idx];
17882 hf_idx = hf_gsm_a_dtap_msg_mm_type;
17883 msg_fcn = dtap_msg_mm_fcn[idx];
17888 msg_str = match_strval_idx((guint32) (oct & DTAP_RR_IEI_MASK), gsm_a_dtap_msg_rr_strings, &idx);
17889 ett_tree = ett_gsm_dtap_msg_rr[idx];
17890 hf_idx = hf_gsm_a_dtap_msg_rr_type;
17891 msg_fcn = dtap_msg_rr_fcn[idx];
17895 msg_str = match_strval_idx((guint32) (oct & DTAP_GMM_IEI_MASK), gsm_a_dtap_msg_gmm_strings, &idx);
17896 ett_tree = ett_gsm_dtap_msg_gmm[idx];
17897 hf_idx = hf_gsm_a_dtap_msg_gmm_type;
17898 msg_fcn = dtap_msg_gmm_fcn[idx];
17902 msg_str = match_strval_idx((guint32) (oct & DTAP_SMS_IEI_MASK), gsm_a_dtap_msg_sms_strings, &idx);
17903 ett_tree = ett_gsm_dtap_msg_sms[idx];
17904 hf_idx = hf_gsm_a_dtap_msg_sms_type;
17905 msg_fcn = dtap_msg_sms_fcn[idx];
17906 ti = (oct_1 & DTAP_TI_MASK) >> 4;
17910 msg_str = match_strval_idx((guint32) (oct & DTAP_SM_IEI_MASK), gsm_a_dtap_msg_sm_strings, &idx);
17911 ett_tree = ett_gsm_dtap_msg_sm[idx];
17912 hf_idx = hf_gsm_a_dtap_msg_sm_type;
17913 msg_fcn = dtap_msg_sm_fcn[idx];
17914 ti = (oct_1 & DTAP_TI_MASK) >> 4;
17918 msg_str = match_strval_idx((guint32) (oct & DTAP_SS_IEI_MASK), gsm_a_dtap_msg_ss_strings, &idx);
17919 ett_tree = ett_gsm_dtap_msg_ss[idx];
17920 hf_idx = hf_gsm_a_dtap_msg_ss_type;
17921 msg_fcn = dtap_msg_ss_fcn[idx];
17922 ti = (oct_1 & DTAP_TI_MASK) >> 4;
17927 /* 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 */
17932 sccp_msg = pinfo->sccp_info;
17934 if (sccp_msg && sccp_msg->data.co.assoc) {
17935 sccp_assoc = sccp_msg->data.co.assoc;
17942 * create the protocol tree
17944 if (msg_str == NULL)
17947 proto_tree_add_protocol_format(tree, proto_a_dtap, tvb, 0, len,
17948 "GSM A-I/F DTAP - Unknown DTAP Message Type (0x%02x)",
17951 dtap_tree = proto_item_add_subtree(dtap_item, ett_dtap_msg);
17953 if (sccp_msg && !sccp_msg->data.co.label) {
17954 sccp_msg->data.co.label = se_strdup_printf("DTAP (0x%02x)",oct);
17962 proto_tree_add_protocol_format(tree, proto_a_dtap, tvb, 0, -1,
17963 "GSM A-I/F DTAP - %s",
17966 dtap_tree = proto_item_add_subtree(dtap_item, ett_tree);
17968 if (sccp_msg && !sccp_msg->data.co.label) {
17969 sccp_msg->data.co.label = se_strdup(msg_str);
17972 if (check_col(pinfo->cinfo, COL_INFO))
17974 col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", msg_str);
17979 proto_tree_add_text(dtap_tree,
17981 "Protocol Discriminator: %s",
17982 val_to_str(pd, protocol_discriminator_vals, "Unknown (%u)"));
17984 pd_tree = proto_item_add_subtree(oct_1_item, ett_dtap_oct_1);
17988 proto_tree_add_item(pd_tree, hf_gsm_a_skip_ind, tvb, 0, 1, FALSE);
17992 other_decode_bitfield_value(a_bigbuf, oct_1, 0x80, 8);
17993 proto_tree_add_text(pd_tree,
17995 "%s : TI flag: %s",
17997 ((oct_1 & 0x80) ? "allocated by receiver" : "allocated by sender"));
17999 if ((ti & DTAP_TIE_PRES_MASK) == DTAP_TIE_PRES_MASK)
18001 /* ti is extended to next octet */
18003 other_decode_bitfield_value(a_bigbuf, oct_1, 0x70, 8);
18004 proto_tree_add_text(pd_tree,
18006 "%s : TIO: The TI value is given by the TIE in octet 2",
18011 other_decode_bitfield_value(a_bigbuf, oct_1, 0x70, 8);
18012 proto_tree_add_text(pd_tree,
18016 ti & DTAP_TIE_PRES_MASK);
18020 proto_tree_add_item(pd_tree, hf_gsm_a_L3_protocol_discriminator, tvb, 0, 1, FALSE);
18023 (ti & DTAP_TIE_PRES_MASK) == DTAP_TIE_PRES_MASK)
18025 proto_tree_add_item(tree, hf_gsm_a_extension, tvb, 1, 1, FALSE);
18027 other_decode_bitfield_value(a_bigbuf, oct_2, DTAP_TIE_MASK, 8);
18028 proto_tree_add_text(pd_tree,
18032 oct_2 & DTAP_TIE_MASK);
18038 if ((pinfo->p2p_dir == P2P_DIR_RECV) &&
18045 * add DTAP message name
18047 proto_tree_add_uint_format(dtap_tree, hf_idx,
18048 tvb, offset, 1, oct,
18049 "Message Type %s",msg_str ? msg_str : "(Unknown)");
18053 tap_p->pdu_type = BSSAP_PDU_TYPE_DTAP;
18054 tap_p->message_type = (nsd ? (oct & 0x3f) : oct);
18055 tap_p->protocol_disc = pd;
18057 tap_queue_packet(gsm_a_tap, pinfo, tap_p);
18059 if (msg_str == NULL) return;
18061 if ((len - offset) <= 0) return;
18066 if (msg_fcn == NULL)
18068 proto_tree_add_text(dtap_tree,
18069 tvb, offset, len - offset,
18070 "Message Elements");
18074 (*msg_fcn)(tvb, dtap_tree, offset, len - offset);
18079 /* Register the protocol with Wireshark */
18081 proto_register_gsm_a(void)
18086 /* Setup list of header fields */
18088 static hf_register_info hf[] =
18090 { &hf_gsm_a_bssmap_msg_type,
18091 { "BSSMAP Message Type", "gsm_a.bssmap_msgtype",
18092 FT_UINT8, BASE_HEX, VALS(gsm_a_bssmap_msg_strings), 0x0,
18095 { &hf_gsm_a_dtap_msg_mm_type,
18096 { "DTAP Mobility Management Message Type", "gsm_a.dtap_msg_mm_type",
18097 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_msg_mm_strings), 0x0,
18100 { &hf_gsm_a_dtap_msg_rr_type,
18101 { "DTAP Radio Resources Management Message Type", "gsm_a.dtap_msg_rr_type",
18102 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_msg_rr_strings), 0x0,
18105 { &hf_gsm_a_dtap_msg_cc_type,
18106 { "DTAP Call Control Message Type", "gsm_a.dtap_msg_cc_type",
18107 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_msg_cc_strings), 0x0,
18110 { &hf_gsm_a_dtap_msg_gmm_type,
18111 { "DTAP GPRS Mobility Management Message Type", "gsm_a.dtap_msg_gmm_type",
18112 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_msg_gmm_strings), 0x0,
18115 { &hf_gsm_a_dtap_msg_sms_type,
18116 { "DTAP Short Message Service Message Type", "gsm_a.dtap_msg_sms_type",
18117 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_msg_sms_strings), 0x0,
18120 { &hf_gsm_a_dtap_msg_sm_type,
18121 { "DTAP GPRS Session Management Message Type", "gsm_a.dtap_msg_sm_type",
18122 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_msg_sm_strings), 0x0,
18125 { &hf_gsm_a_dtap_msg_ss_type,
18126 { "DTAP Non call Supplementary Service Message Type", "gsm_a.dtap_msg_ss_type",
18127 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_msg_ss_strings), 0x0,
18130 { &hf_gsm_a_rp_msg_type,
18131 { "RP Message Type", "gsm_a.rp_msg_type",
18132 FT_UINT8, BASE_HEX, VALS(gsm_rp_msg_strings), 0x0,
18135 { &hf_gsm_a_bssmap_elem_id,
18136 { "Element ID", "gsm_a_bssmap.elem_id",
18137 FT_UINT8, BASE_DEC, NULL, 0,
18140 { &hf_gsm_a_dtap_elem_id,
18141 { "Element ID", "gsm_a_dtap.elem_id",
18142 FT_UINT8, BASE_DEC, NULL, 0,
18145 { &hf_gsm_a_length,
18146 { "Length", "gsm_a.len",
18147 FT_UINT8, BASE_DEC, NULL, 0,
18151 { "Sub tree", "gsm_a.none",
18156 { "IMSI", "gsm_a.imsi",
18157 FT_STRING, BASE_DEC, 0, 0,
18161 { "TMSI/P-TMSI", "gsm_a.tmsi",
18162 FT_UINT32, BASE_HEX, 0, 0x0,
18166 { "IMEI", "gsm_a.imei",
18167 FT_STRING, BASE_DEC, 0, 0,
18170 { &hf_gsm_a_imeisv,
18171 { "IMEISV", "gsm_a.imeisv",
18172 FT_STRING, BASE_DEC, 0, 0,
18175 { &hf_gsm_a_cld_party_bcd_num,
18176 { "Called Party BCD Number", "gsm_a.cld_party_bcd_num",
18177 FT_STRING, BASE_DEC, 0, 0,
18180 { &hf_gsm_a_clg_party_bcd_num,
18181 { "Calling Party BCD Number", "gsm_a.clg_party_bcd_num",
18182 FT_STRING, BASE_DEC, 0, 0,
18185 { &hf_gsm_a_cell_ci,
18186 { "Cell CI", "gsm_a.cell_ci",
18187 FT_UINT16, BASE_HEX_DEC, 0, 0x0,
18190 { &hf_gsm_a_cell_lac,
18191 { "Cell LAC", "gsm_a.cell_lac",
18192 FT_UINT16, BASE_HEX_DEC, 0, 0x0,
18195 { &hf_gsm_a_dlci_cc,
18196 { "Control Channel", "bssap.dlci.cc",
18197 FT_UINT8, BASE_HEX, VALS(bssap_cc_values), 0xc0,
18200 { &hf_gsm_a_dlci_spare,
18201 { "Spare", "bssap.dlci.spare",
18202 FT_UINT8, BASE_HEX, NULL, 0x38,
18205 { &hf_gsm_a_dlci_sapi,
18206 { "SAPI", "bssap.dlci.sapi",
18207 FT_UINT8, BASE_HEX, VALS(bssap_sapi_values), 0x07,
18210 { &hf_gsm_a_bssmap_cause,
18211 { "BSSMAP Cause", "gsm_a_bssmap.cause",
18212 FT_UINT8, BASE_HEX, 0, 0x0,
18215 { &hf_gsm_a_dtap_cause,
18216 { "DTAP Cause", "gsm_a_dtap.cause",
18217 FT_UINT8, BASE_HEX, 0, 0x0,
18220 { &hf_gsm_a_MSC_rev,
18221 { "Revision Level","gsm_a.MSC2_rev",
18222 FT_UINT8,BASE_DEC, VALS(gsm_a_msc_rev_vals), 0x60,
18223 "Revision level", HFILL }
18225 { &hf_gsm_a_ES_IND,
18226 { "ES IND","gsm_a.MSC2_rev",
18227 FT_UINT8,BASE_DEC, VALS(ES_IND_vals), 0x10,
18230 { &hf_gsm_a_qos_traffic_cls,
18231 { "Traffic class", "gsm_a.qos.traffic_cls",
18232 FT_UINT8, BASE_DEC, VALS(gsm_a_qos_traffic_cls_vals), 0xe0,
18233 "Traffic class", HFILL }},
18234 { &hf_gsm_a_qos_del_order,
18235 { "Delivery order", "gsm_a.qos.del_order",
18236 FT_UINT8, BASE_DEC, VALS(gsm_a_qos_traffic_cls_vals), 0x18,
18237 "Delivery order", HFILL }},
18238 { &hf_gsm_a_qos_del_of_err_sdu,
18239 { "Delivery of erroneous SDUs", "gsm_a.qos.del_of_err_sdu",
18240 FT_UINT8, BASE_DEC, VALS(gsm_a_qos_del_of_err_sdu_vals), 0x03,
18241 "Delivery of erroneous SDUs", HFILL }},
18242 { &hf_gsm_a_qos_ber,
18243 { "Residual Bit Error Rate (BER)", "gsm_a.qos.ber",
18244 FT_UINT8, BASE_DEC, VALS(gsm_a_qos_ber_vals), 0xf0,
18245 "Residual Bit Error Rate (BER)", HFILL }},
18246 { &hf_gsm_a_qos_sdu_err_rat,
18247 { "SDU error ratio", "gsm_a.qos.sdu_err_rat",
18248 FT_UINT8, BASE_DEC, VALS(gsm_a_qos_sdu_err_rat_vals), 0x0f,
18249 "SDU error ratio", HFILL }},
18250 { &hf_gsm_a_qos_traff_hdl_pri,
18251 { "Traffic handling priority", "gsm_a.qos.traff_hdl_pri",
18252 FT_UINT8, BASE_DEC, VALS(gsm_a_qos_traff_hdl_pri_vals), 0x03,
18253 "Traffic handling priority", HFILL }},
18254 { &hf_gsm_a_A5_1_algorithm_sup,
18255 { "A5/1 algorithm supported","gsm_a.MSC2_rev",
18256 FT_UINT8,BASE_DEC, VALS(A5_1_algorithm_sup_vals), 0x08,
18257 "A5/1 algorithm supported ", HFILL }
18259 { &hf_gsm_a_RF_power_capability,
18260 { "RF Power Capability","gsm_a.MSC2_rev",
18261 FT_UINT8,BASE_DEC, VALS(RF_power_capability_vals), 0x07,
18262 "RF Power Capability", HFILL }
18264 { &hf_gsm_a_ps_sup_cap,
18265 { "PS capability (pseudo-synchronization capability)","gsm_a.ps_sup_cap",
18266 FT_UINT8,BASE_DEC, VALS(ps_sup_cap_vals), 0x40,
18267 "PS capability (pseudo-synchronization capability)", HFILL }
18269 { &hf_gsm_a_SS_screening_indicator,
18270 { "SS Screening Indicator","gsm_a.SS_screening_indicator",
18271 FT_UINT8,BASE_DEC, VALS(SS_screening_indicator_vals), 0x30,
18272 "SS Screening Indicator", HFILL }
18274 { &hf_gsm_a_SM_capability,
18275 { "SM capability (MT SMS pt to pt capability)","gsm_a.SM_cap",
18276 FT_UINT8,BASE_DEC, VALS(SM_capability_vals), 0x08,
18277 "SM capability (MT SMS pt to pt capability)", HFILL }
18279 { &hf_gsm_a_VBS_notification_rec,
18280 { "VBS notification reception ","gsm_a.VBS_notification_rec",
18281 FT_UINT8,BASE_DEC, VALS(VBS_notification_rec_vals), 0x04,
18282 "VBS notification reception ", HFILL }
18284 { &hf_gsm_a_VGCS_notification_rec,
18285 { "VGCS notification reception ","gsm_a.VGCS_notification_rec",
18286 FT_UINT8,BASE_DEC, VALS(VGCS_notification_rec_vals), 0x02,
18287 "VGCS notification reception", HFILL }
18289 { &hf_gsm_a_FC_frequency_cap,
18290 { "FC Frequency Capability","gsm_a.FC_frequency_cap",
18291 FT_UINT8,BASE_DEC, VALS(FC_frequency_cap_vals), 0x01,
18292 "FC Frequency Capability", HFILL }
18295 { "CM3","gsm_a.CM3",
18296 FT_UINT8,BASE_DEC, VALS(CM3_vals), 0x80,
18299 { &hf_gsm_a_LCS_VA_cap,
18300 { "LCS VA capability (LCS value added location request notification capability) ","gsm_a.LCS_VA_cap",
18301 FT_UINT8,BASE_DEC, VALS(LCS_VA_cap_vals), 0x20,
18302 "LCS VA capability (LCS value added location request notification capability) ", HFILL }
18304 { &hf_gsm_a_UCS2_treatment,
18305 { "UCS2 treatment ","gsm_a.UCS2_treatment",
18306 FT_UINT8,BASE_DEC, VALS(UCS2_treatment_vals), 0x10,
18307 "UCS2 treatment ", HFILL }
18310 { "SoLSA","gsm_a.SoLSA",
18311 FT_UINT8,BASE_DEC, VALS(SoLSA_vals), 0x08,
18315 { "CMSP: CM Service Prompt","gsm_a.CMSP",
18316 FT_UINT8,BASE_DEC, VALS(CMSP_vals), 0x04,
18317 "CMSP: CM Service Prompt", HFILL }
18319 { &hf_gsm_a_A5_3_algorithm_sup,
18320 { "A5/3 algorithm supported","gsm_a.A5_3_algorithm_sup",
18321 FT_UINT8,BASE_DEC, VALS(A5_3_algorithm_sup_vals), 0x02,
18322 "A5/3 algorithm supported", HFILL }
18324 { &hf_gsm_a_A5_2_algorithm_sup,
18325 { "A5/2 algorithm supported","gsm_a.A5_2_algorithm_sup",
18326 FT_UINT8,BASE_DEC, VALS(A5_2_algorithm_sup_vals), 0x01,
18327 "A5/2 algorithm supported", HFILL }
18329 { &hf_gsm_a_mobile_identity_type,
18330 { "Mobile Identity Type","gsm_a.ie.mobileid.type",
18331 FT_UINT8, BASE_DEC, VALS(mobile_identity_type_vals), 0x07,
18332 "Mobile Identity Type", HFILL }
18334 { &hf_gsm_a_odd_even_ind,
18335 { "Odd/even indication","gsm_a.oddevenind",
18336 FT_UINT8, BASE_DEC, oddevenind_vals, 0x08,
18337 "Mobile Identity", HFILL }
18339 { &hf_gsm_a_L3_protocol_discriminator,
18340 { "Protocol discriminator","gsm_a.L3_protocol_discriminator",
18341 FT_UINT8,BASE_DEC, VALS(protocol_discriminator_vals), 0x0f,
18342 "Protocol discriminator", HFILL }
18344 { &hf_gsm_a_skip_ind,
18345 { "Skip Indicator", "gsm_a.skip.ind",
18346 FT_UINT8, BASE_DEC, NULL, 0xf0,
18347 "Skip Indicator", HFILL }
18350 { "BCC","gsm_a.bcc",
18351 FT_UINT8,BASE_DEC, NULL, 0x07,
18355 { "NCC","gsm_a.ncc",
18356 FT_UINT8,BASE_DEC, NULL, 0x38,
18359 { &hf_gsm_a_bcch_arfcn,
18360 { "BCCH ARFCN(RF channel number)","gsm_a.bcch_arfcn",
18361 FT_UINT16,BASE_DEC, NULL, 0x0,
18362 "BCCH ARFCN", HFILL }
18364 { &hf_gsm_a_rr_ho_ref_val,
18365 { "Handover reference value","gsm_a.rr.ho_ref_val",
18366 FT_UINT8,BASE_DEC, NULL, 0x0,
18367 "Handover reference value", HFILL }
18369 { &hf_gsm_a_b7spare,
18370 { "Spare","gsm_a.spareb7",
18371 FT_UINT8,BASE_DEC, NULL, 0x40,
18374 { &hf_gsm_a_b8spare,
18375 { "Spare","gsm_a.spareb8",
18376 FT_UINT8,BASE_DEC, NULL, 0x80,
18379 { &hf_gsm_a_rr_pow_cmd_atc,
18380 { "Spare","gsm_a.rr.pow_cmd_atc",
18381 FT_BOOLEAN,8, TFS(&gsm_a_rr_pow_cmd_atc_value), 0x80,
18384 { &hf_gsm_a_rr_pow_cmd_epc,
18385 { "EPC_mode","gsm_a.rr.pow_cmd_epc",
18386 FT_BOOLEAN,8, TFS(&gsm_a_rr_pow_cmd_epc_value), 0x40,
18387 "EPC_mode", HFILL }
18389 { &hf_gsm_a_rr_pow_cmd_fpcepc,
18390 { "FPC_EPC","gsm_a.rr.pow_cmd_fpcepc",
18391 FT_BOOLEAN,8, TFS(&gsm_a_rr_pow_cmd_fpcepc_value), 0x20,
18394 { &hf_gsm_a_rr_pow_cmd_powlev,
18395 { "POWER LEVEL","gsm_a.rr.pow_cmd_pow",
18396 FT_UINT8,BASE_DEC, NULL, 0x1f,
18397 "POWER LEVEL", HFILL }
18399 { &hf_gsm_a_rr_sync_ind_nci,
18400 { "Normal cell indication(NCI)","gsm_a.rr.sync_ind_nci",
18401 FT_BOOLEAN,8, TFS(&gsm_a_rr_sync_ind_nci_value), 0x08,
18402 "Normal cell indication(NCI)", HFILL }
18404 { &hf_gsm_a_rr_sync_ind_rot,
18405 { "Report Observed Time Difference(ROT)","gsm_a.rr.sync_ind_rot",
18406 FT_BOOLEAN,8, TFS(&sm_a_rr_sync_ind_rot_value), 0x04,
18407 "Report Observed Time Difference(ROT)", HFILL }
18409 { &hf_gsm_a_rr_sync_ind_si,
18410 { "Synchronization indication(SI)","gsm_a.rr_sync_ind_si",
18411 FT_UINT8,BASE_DEC, VALS(gsm_a_rr_sync_ind_si_vals), 0x03,
18412 "Synchronization indication(SI)", HFILL }
18414 { &hf_gsm_a_rr_format_id,
18415 { "Format Identifier","gsm_a.rr_format_id",
18416 FT_UINT8,BASE_HEX, VALS(gsm_a_rr_freq_list_format_id_vals), 0xce,
18417 "Format Identifier", HFILL }
18419 { &hf_gsm_a_rr_channel_mode,
18420 { "Channel Mode","gsm_a.rr.channel_mode",
18421 FT_UINT8,BASE_DEC, VALS(gsm_a_rr_channel_mode_vals), 0x0,
18422 "Channel Mode", HFILL }
18424 { &hf_gsm_a_rr_channel_mode2,
18425 { "Channel Mode 2","gsm_a.rr.channel_mode2",
18426 FT_UINT8,BASE_DEC, VALS(gsm_a_rr_channel_mode2_vals), 0x0,
18427 "Channel Mode 2", HFILL }
18430 { "SC","gsm_a.rr.SC",
18431 FT_UINT8,BASE_DEC, VALS(gsm_a_rr_sc_vals), 0x1,
18434 { &hf_gsm_a_algorithm_id,
18435 { "Algorithm identifier","gsm_a.algorithm_identifier",
18436 FT_UINT8,BASE_DEC, VALS(gsm_a_algorithm_identifier_vals), 0xe,
18437 "Algorithm_identifier", HFILL }
18440 { &hf_gsm_a_rr_multirate_speech_ver,
18441 { "Multirate speech version","gsm_a.rr.multirate_speech_ver",
18442 FT_UINT8,BASE_DEC, VALS(multirate_speech_ver_vals), 0xe0,
18443 "Multirate speech version", HFILL }
18445 { &hf_gsm_a_rr_NCSB,
18446 { "NSCB: Noise Suppression Control Bit","gsm_a.rr.NCSB",
18447 FT_UINT8,BASE_DEC, VALS(NSCB_vals), 0x10,
18448 "NSCB: Noise Suppression Control Bit", HFILL }
18450 { &hf_gsm_a_rr_ICMI,
18451 { "ICMI: Initial Codec Mode Indicator","gsm_a.rr.ICMI",
18452 FT_UINT8,BASE_DEC, VALS(ICMI_vals), 0x8,
18453 "ICMI: Initial Codec Mode Indicator", HFILL }
18455 { &hf_gsm_a_rr_start_mode,
18456 { "Start Mode","gsm_a.rr.start_mode",
18457 FT_UINT8,BASE_DEC, NULL, 0x3,
18458 "Start Mode", HFILL }
18460 { &hf_gsm_a_rr_timing_adv,
18461 { "Timing advance value","gsm_a.rr.timing_adv",
18462 FT_UINT8,BASE_DEC, NULL, 0x0,
18463 "Timing advance value", HFILL }
18465 { &hf_gsm_a_rr_time_diff,
18466 { "Time difference value","gsm_a.rr.time_diff",
18467 FT_UINT8,BASE_DEC, NULL, 0x0,
18468 "Time difference value", HFILL }
18470 { &hf_gsm_a_rr_tlli,
18471 { "TLLI","gsm_a.rr.tlli",
18472 FT_UINT32,BASE_HEX, NULL, 0x0,
18475 { &hf_gsm_a_rr_target_mode,
18476 { "Target mode","gsm_a.rr.target_mode",
18477 FT_UINT8,BASE_DEC, NULL, 0xc0,
18478 "Target mode", HFILL }
18480 { &hf_gsm_a_rr_group_cipher_key_number,
18481 { "Group cipher key number","gsm_a.rr.Group_cipher_key_number",
18482 FT_UINT8,BASE_DEC, NULL, 0x3c,
18483 "Group cipher key number", HFILL }
18485 { &hf_gsm_a_rr_last_segment,
18486 { "Last Segment","gsm_a.rr.last_segment",
18487 FT_BOOLEAN,8, TFS(&gsm_a_rr_last_segment_value), 0x01,
18488 "Last Segment", HFILL }
18490 { &hf_gsm_a_gmm_split_on_ccch,
18491 { "SPLIT on CCCH","gsm_a.gmm.split_on_ccch",
18492 FT_BOOLEAN,8, TFS(&gsm_a_gmm_split_on_ccch_value), 0x08,
18493 "SPLIT on CCCH", HFILL }
18495 { &hf_gsm_a_gmm_non_drx_timer,
18496 { "Non-DRX timer","gsm_a.gmm.non_drx_timer",
18497 FT_UINT8,BASE_DEC, VALS(gsm_a_gmm_non_drx_timer_strings), 0x07,
18498 "Non-DRX timer", HFILL }
18500 { &hf_gsm_a_gmm_cn_spec_drs_cycle_len_coef,
18501 { "CN Specific DRX cycle length coefficient","gsm_a.gmm.cn_spec_drs_cycle_len_coef",
18502 FT_UINT8,BASE_DEC, VALS(gsm_a_gmm_cn_spec_drs_cycle_len_coef_strings), 0xf0,
18503 "CN Specific DRX cycle length coefficient", HFILL }
18505 { &hf_gsm_a_rr_RR_cause,
18506 { "RR cause value","gsm_a.rr.RRcause",
18507 FT_UINT8,BASE_DEC, VALS(gsm_a_rr_RR_cause_vals), 0x0,
18508 "RR cause value", HFILL }
18510 { &hf_gsm_a_be_cell_id_disc,
18511 { "Cell identification discriminator","gsm_a.be.cell_id_disc",
18512 FT_UINT8,BASE_DEC, VALS(gsm_a_rr_cell_id_disc_vals), 0x0f,
18513 "Cell identificationdiscriminator", HFILL }
18515 { &hf_gsm_a_be_rnc_id,
18516 { "RNC-ID","gsm_a.be.rnc_id",
18517 FT_UINT16,BASE_DEC, NULL, 0x0,
18520 { &hf_gsm_a_rr_cm_cng_msg_req,
18521 { "CLASSMARK CHANGE","gsm_a.rr_cm_cng_msg_req",
18522 FT_BOOLEAN,8, TFS(&gsm_a_msg_req_value), 0x80,
18523 "CLASSMARK CHANGE ", HFILL }
18525 { &hf_gsm_a_rr_utran_cm_cng_msg_req,
18526 { "UTRAN CLASSMARK CHANGE","gsm_a.rr_utran_cm_cng_msg_req",
18527 FT_UINT8,BASE_DEC, VALS(gsm_a_rr_utran_cm_cng_msg_req_vals), 0x70,
18528 "UTRAN CLASSMARK CHANGE", HFILL }
18530 { &hf_gsm_a_rr_cdma200_cm_cng_msg_req,
18531 { "CDMA2000 CLASSMARK CHANGE ","gsm_a.rr_cdma200_cm_cng_msg_req",
18532 FT_BOOLEAN,8, TFS(&gsm_a_msg_req_value), 0x08,
18533 "CDMA2000 CLASSMARK CHANGE ", HFILL }
18535 { &hf_gsm_a_rr_geran_iu_cm_cng_msg_req,
18536 { "GERAN IU MODE CLASSMARK CHANGE","gsm_a.rr_geran_iu_cm_cng_msg_req",
18537 FT_BOOLEAN,8, TFS(&gsm_a_msg_req_value), 0x04,
18538 "GERAN IU MODE CLASSMARK CHANGE", HFILL }
18540 { &hf_gsm_a_rr_chnl_needed_ch1,
18541 { "Channel 1","gsm_a.rr_chnl_needed_ch1",
18542 FT_UINT8,BASE_DEC, VALS(gsm_a_rr_channel_needed_vals), 0x03,
18543 "Channel 1", HFILL }
18545 { &hf_gsm_a_rr_chnl_needed_ch2,
18546 { "Channel 2","gsm_a.rr_chnl_needed_ch1",
18547 FT_UINT8,BASE_DEC, VALS(gsm_a_rr_channel_needed_vals), 0x0c,
18548 "Channel 2", HFILL }
18550 { &hf_gsm_a_rr_suspension_cause,
18551 { "Suspension cause value","gsm_a.rr.suspension_cause",
18552 FT_UINT8,BASE_DEC, VALS(gsm_a_rr_suspension_cause_vals), 0x0,
18553 "Suspension cause value", HFILL }
18555 { &hf_gsm_a_rr_set_of_amr_codec_modes_v1_b8,
18556 { "12,2 kbit/s codec rate", "gsm_a.rr.set_of_amr_codec_modes_v1b8",
18557 FT_BOOLEAN,8, TFS(&gsm_a_rr_set_of_amr_codec_modes), 0x80,
18558 "12,2 kbit/s codec rate", HFILL }
18560 { &hf_gsm_a_rr_set_of_amr_codec_modes_v1_b7,
18561 { "10,2 kbit/s codec rate", "gsm_a.rr.set_of_amr_codec_modes_v1b7",
18562 FT_BOOLEAN,8, TFS(&gsm_a_rr_set_of_amr_codec_modes), 0x40,
18563 "10,2 kbit/s codec rate", HFILL }
18565 { &hf_gsm_a_rr_set_of_amr_codec_modes_v1_b6,
18566 { "7,95 kbit/s codec rate", "gsm_a.rr.set_of_amr_codec_modes_v1b6",
18567 FT_BOOLEAN,8, TFS(&gsm_a_rr_set_of_amr_codec_modes), 0x20,
18568 "7,95 kbit/s codec rate", HFILL }
18570 { &hf_gsm_a_rr_set_of_amr_codec_modes_v1_b5,
18571 { "7,40 kbit/s codec rate", "gsm_a.rr.set_of_amr_codec_modes_v1b5",
18572 FT_BOOLEAN,8, TFS(&gsm_a_rr_set_of_amr_codec_modes), 0x10,
18573 "7,40 kbit/s codec rate", HFILL }
18575 { &hf_gsm_a_rr_set_of_amr_codec_modes_v1_b4,
18576 { "6,70 kbit/s codec rate", "gsm_a.rr.set_of_amr_codec_modes_v1b4",
18577 FT_BOOLEAN,8, TFS(&gsm_a_rr_set_of_amr_codec_modes), 0x08,
18578 "6,70 kbit/s codec rate", HFILL }
18580 { &hf_gsm_a_rr_set_of_amr_codec_modes_v1_b3,
18581 { "5,90 kbit/s codec rate", "gsm_a.rr.set_of_amr_codec_modes_v1b3",
18582 FT_BOOLEAN,8, TFS(&gsm_a_rr_set_of_amr_codec_modes), 0x04,
18583 "5,90 kbit/s codec rate", HFILL }
18585 { &hf_gsm_a_rr_set_of_amr_codec_modes_v1_b2,
18586 { "5,15 kbit/s codec rate", "gsm_a.rr.set_of_amr_codec_modes_v1b2",
18587 FT_BOOLEAN,8, TFS(&gsm_a_rr_set_of_amr_codec_modes), 0x02,
18588 "5,15 kbit/s codec rate", HFILL }
18590 { &hf_gsm_a_rr_set_of_amr_codec_modes_v1_b1,
18591 { "4,75 kbit/s codec rate", "gsm_a.rr.set_of_amr_codec_modes_v1b1",
18592 FT_BOOLEAN,8, TFS(&gsm_a_rr_set_of_amr_codec_modes), 0x01,
18593 "4,75 kbit/s codec rate", HFILL }
18595 { &hf_gsm_a_rr_set_of_amr_codec_modes_v2_b5,
18596 { "23,85 kbit/s codec rate", "gsm_a.rr.set_of_amr_codec_modes_v2b5",
18597 FT_BOOLEAN,8, TFS(&gsm_a_rr_set_of_amr_codec_modes), 0x10,
18598 "23,85 kbit/s codec rate", HFILL }
18600 { &hf_gsm_a_rr_set_of_amr_codec_modes_v2_b4,
18601 { "15,85 kbit/s codec rate", "gsm_a.rr.set_of_amr_codec_modes_v2b4",
18602 FT_BOOLEAN,8, TFS(&gsm_a_rr_set_of_amr_codec_modes), 0x08,
18603 "15,85 kbit/s codec rate", HFILL }
18605 { &hf_gsm_a_rr_set_of_amr_codec_modes_v2_b3,
18606 { "12,65 kbit/s codec rate", "gsm_a.rr.set_of_amr_codec_modes_v2b3",
18607 FT_BOOLEAN,8, TFS(&gsm_a_rr_set_of_amr_codec_modes), 0x04,
18608 "12,65 kbit/s codec rate", HFILL }
18610 { &hf_gsm_a_rr_set_of_amr_codec_modes_v2_b2,
18611 { "8,85 kbit/s codec rate", "gsm_a.rr.set_of_amr_codec_modes_v2b2",
18612 FT_BOOLEAN,8, TFS(&gsm_a_rr_set_of_amr_codec_modes), 0x02,
18613 "8,85 kbit/s codec rate", HFILL }
18615 { &hf_gsm_a_rr_set_of_amr_codec_modes_v2_b1,
18616 { "6,60 kbit/s codec rate", "gsm_a.rr.set_of_amr_codec_modes_v2b1",
18617 FT_BOOLEAN,8, TFS(&gsm_a_rr_set_of_amr_codec_modes), 0x01,
18618 "6,60 kbit/s codec rate", HFILL }
18620 { &hf_gsm_a_extension,
18621 { "Extension", "gsm_a.extension",
18622 FT_BOOLEAN, 8, TFS(&gsm_a_extension_value), 0x80,
18623 "Extension", HFILL }},
18624 { &hf_gsm_a_type_of_number,
18625 { "Type of number", "gsm_a.type_of_number",
18626 FT_UINT8, BASE_HEX, VALS(gsm_a_type_of_number_values), 0x70,
18627 "Type of number", HFILL }},
18628 { &hf_gsm_a_numbering_plan_id,
18629 { "Numbering plan identification", "gsm_a.numbering_plan_id",
18630 FT_UINT8, BASE_HEX, VALS(gsm_a_numbering_plan_id_values), 0x0f,
18631 "Numbering plan identification", HFILL }},
18632 { &hf_gsm_a_tft_op_code,
18633 { "TFT operation code", "gsm_a.tft.op_code",
18634 FT_UINT8, BASE_DEC, VALS(gsm_a_tft_op_code_vals), 0xe0,
18635 "TFT operation code", HFILL }
18637 { &hf_gsm_a_tft_e_bit,
18638 { "E bit","gsm_a.tft.e_bit",
18639 FT_BOOLEAN,8, TFS(&gsm_a_tft_e_bit), 0x10,
18642 { &hf_gsm_a_tft_pkt_flt,
18643 { "Number of packet filters", "gsm_a.tft.pkt_flt",
18644 FT_UINT8, BASE_DEC, NULL, 0x0f,
18645 "Number of packet filters", HFILL }
18648 { &hf_gsm_a_tft_ip4_address,
18649 { "IPv4 adress", "gsm_a.tft.ip4_address", FT_IPv4, BASE_NONE, NULL, 0x0,
18650 "IPv4 address", HFILL }},
18651 { &hf_gsm_a_tft_ip4_mask,
18652 { "IPv4 address mask", "gsm_a.tft.ip4_mask", FT_IPv4, BASE_NONE, NULL, 0x0,
18653 "IPv4 address mask", HFILL }},
18654 { &hf_gsm_a_tft_ip6_address,
18655 { "IPv6 adress", "gsm_a.tft.ip6_address", FT_IPv6, BASE_NONE, NULL, 0x0,
18656 "IPv6 address", HFILL }},
18657 { &hf_gsm_a_tft_ip6_mask,
18658 { "IPv6 adress mask", "gsm_a.tft.ip6_mask", FT_IPv6, BASE_NONE, NULL, 0x0,
18659 "IPv6 address mask", HFILL }},
18660 { &hf_gsm_a_tft_protocol_header,
18661 { "Protocol/header", "gsm_a.tft.protocol_header", FT_UINT8, BASE_HEX, NULL, 0x0,
18662 "Protocol/header", HFILL }},
18663 { &hf_gsm_a_tft_port,
18664 { "Port", "gsm_a.tft.port", FT_UINT16, BASE_DEC, NULL, 0x0,
18666 { &hf_gsm_a_tft_port_low,
18667 { "Low limit port", "gsm_a.tft.port_low", FT_UINT16, BASE_DEC, NULL, 0x0,
18668 "Low limit port", HFILL }},
18669 { &hf_gsm_a_tft_port_high,
18670 { "High limit port", "gsm_a.tft.port_high", FT_UINT16, BASE_DEC, NULL, 0x0,
18671 "High limit port", HFILL }},
18672 { &hf_gsm_a_tft_security,
18673 { "IPSec security parameter index", "gsm_a.tft.security", FT_UINT32, BASE_HEX, NULL, 0x0,
18674 "IPSec security parameter index", HFILL }},
18675 { &hf_gsm_a_tft_traffic_mask,
18676 { "Mask field", "gsm_a.tft.traffic_mask", FT_UINT8, BASE_HEX, NULL, 0x0,
18677 "Mask field", HFILL }},
18678 { &hf_gsm_a_tft_flow,
18679 { "IPv6 flow label", "gsm_a.tft.flow", FT_UINT24, BASE_HEX, NULL, 0x0FFFFF,
18680 "IPv6 flow label", HFILL }},
18682 { &hf_gsm_a_ptmsi_sig,
18683 { "P-TMSI Signature", "gsm_a.ptmsi_sig", FT_UINT24, BASE_HEX, NULL, 0x0,
18684 "P-TMSI Signature", HFILL }},
18685 { &hf_gsm_a_ptmsi_sig2,
18686 { "P-TMSI Signature 2", "gsm_a.ptmsi_sig2", FT_UINT24, BASE_HEX, NULL, 0x0,
18687 "P-TMSI Signature 2", HFILL }},
18689 { &hf_gsm_a_apdu_protocol_id,
18690 { "Protocol ID", "gsm_a.apdu_protocol_id",
18691 FT_UINT8, BASE_DEC, VALS(gsm_a_apdu_protocol_id_strings), 0x0,
18692 "APDU embedded protocol id", HFILL }
18694 { &hf_gsm_a_lsa_id,
18695 { "LSA Identifier", "gsm_a.lsa_id",
18696 FT_UINT24, BASE_HEX, NULL, 0x0,
18697 "LSA Identifier", HFILL }
18701 /* Setup protocol subtree array */
18702 #define NUM_INDIVIDUAL_ELEMS 38
18703 static gint *ett[NUM_INDIVIDUAL_ELEMS + NUM_GSM_BSSMAP_MSG +
18704 NUM_GSM_DTAP_MSG_MM + NUM_GSM_DTAP_MSG_RR + NUM_GSM_DTAP_MSG_CC +
18705 NUM_GSM_DTAP_MSG_GMM + NUM_GSM_DTAP_MSG_SMS +
18706 NUM_GSM_DTAP_MSG_SM + NUM_GSM_DTAP_MSG_SS + NUM_GSM_RP_MSG +
18707 NUM_GSM_BSSMAP_ELEM + NUM_GSM_DTAP_ELEM];
18709 ett[0] = &ett_bssmap_msg;
18710 ett[1] = &ett_dtap_msg;
18711 ett[2] = &ett_rp_msg;
18712 ett[3] = &ett_elems;
18713 ett[4] = &ett_elem;
18714 ett[5] = &ett_dtap_oct_1;
18715 ett[6] = &ett_cm_srvc_type;
18716 ett[7] = &ett_gsm_enc_info;
18717 ett[8] = &ett_cell_list;
18718 ett[9] = &ett_dlci;
18719 ett[10] = &ett_bc_oct_3a;
18720 ett[11] = &ett_bc_oct_4;
18721 ett[12] = &ett_bc_oct_5;
18722 ett[13] = &ett_bc_oct_5a;
18723 ett[14] = &ett_bc_oct_5b;
18724 ett[15] = &ett_bc_oct_6;
18725 ett[16] = &ett_bc_oct_6a;
18726 ett[17] = &ett_bc_oct_6b;
18727 ett[18] = &ett_bc_oct_6c;
18728 ett[19] = &ett_bc_oct_6d;
18729 ett[20] = &ett_bc_oct_6e;
18730 ett[21] = &ett_bc_oct_6f;
18731 ett[22] = &ett_bc_oct_6g;
18732 ett[23] = &ett_bc_oct_7;
18734 ett[24] = &ett_tc_component;
18735 ett[25] = &ett_tc_invoke_id;
18736 ett[26] = &ett_tc_linked_id;
18737 ett[27] = &ett_tc_opr_code;
18738 ett[28] = &ett_tc_err_code;
18739 ett[29] = &ett_tc_prob_code;
18740 ett[30] = &ett_tc_sequence;
18742 ett[31] = &ett_gmm_drx;
18743 ett[32] = &ett_gmm_detach_type;
18744 ett[33] = &ett_gmm_attach_type;
18745 ett[34] = &ett_gmm_context_stat;
18746 ett[35] = &ett_gmm_update_type;
18747 ett[36] = &ett_gmm_radio_cap;
18749 ett[37] = &ett_sm_tft;
18752 last_offset = NUM_INDIVIDUAL_ELEMS;
18754 for (i=0; i < NUM_GSM_BSSMAP_MSG; i++, last_offset++)
18756 ett_gsm_bssmap_msg[i] = -1;
18757 ett[last_offset] = &ett_gsm_bssmap_msg[i];
18760 for (i=0; i < NUM_GSM_DTAP_MSG_MM; i++, last_offset++)
18762 ett_gsm_dtap_msg_mm[i] = -1;
18763 ett[last_offset] = &ett_gsm_dtap_msg_mm[i];
18766 for (i=0; i < NUM_GSM_DTAP_MSG_RR; i++, last_offset++)
18768 ett_gsm_dtap_msg_rr[i] = -1;
18769 ett[last_offset] = &ett_gsm_dtap_msg_rr[i];
18772 for (i=0; i < NUM_GSM_DTAP_MSG_CC; i++, last_offset++)
18774 ett_gsm_dtap_msg_cc[i] = -1;
18775 ett[last_offset] = &ett_gsm_dtap_msg_cc[i];
18778 for (i=0; i < NUM_GSM_DTAP_MSG_GMM; i++, last_offset++)
18780 ett_gsm_dtap_msg_gmm[i] = -1;
18781 ett[last_offset] = &ett_gsm_dtap_msg_gmm[i];
18784 for (i=0; i < NUM_GSM_DTAP_MSG_SMS; i++, last_offset++)
18786 ett_gsm_dtap_msg_sms[i] = -1;
18787 ett[last_offset] = &ett_gsm_dtap_msg_sms[i];
18790 for (i=0; i < NUM_GSM_DTAP_MSG_SM; i++, last_offset++)
18792 ett_gsm_dtap_msg_sm[i] = -1;
18793 ett[last_offset] = &ett_gsm_dtap_msg_sm[i];
18796 for (i=0; i < NUM_GSM_DTAP_MSG_SS; i++, last_offset++)
18798 ett_gsm_dtap_msg_ss[i] = -1;
18799 ett[last_offset] = &ett_gsm_dtap_msg_ss[i];
18802 for (i=0; i < NUM_GSM_RP_MSG; i++, last_offset++)
18804 ett_gsm_rp_msg[i] = -1;
18805 ett[last_offset] = &ett_gsm_rp_msg[i];
18808 for (i=0; i < NUM_GSM_BSSMAP_ELEM; i++, last_offset++)
18810 ett_gsm_bssmap_elem[i] = -1;
18811 ett[last_offset] = &ett_gsm_bssmap_elem[i];
18814 for (i=0; i < NUM_GSM_DTAP_ELEM; i++, last_offset++)
18816 ett_gsm_dtap_elem[i] = -1;
18817 ett[last_offset] = &ett_gsm_dtap_elem[i];
18821 /* Register the protocol name and description */
18824 proto_register_protocol("GSM A-I/F BSSMAP", "GSM BSSMAP", "gsm_a_bssmap");
18826 proto_register_field_array(proto_a_bssmap, hf, array_length(hf));
18829 proto_register_protocol("GSM A-I/F DTAP", "GSM DTAP", "gsm_a_dtap");
18832 proto_register_protocol("GSM A-I/F RP", "GSM RP", "gsm_a_rp");
18834 sms_dissector_table =
18835 register_dissector_table("gsm_a.sms_tpdu", "GSM SMS TPDU",
18836 FT_UINT8, BASE_DEC);
18838 proto_register_subtree_array(ett, array_length(ett));
18840 /* subdissector code */
18841 gprs_sm_pco_subdissector_table = register_dissector_table("sm_pco.protocol",
18842 "GPRS SM PCO PPP protocol", FT_UINT16, BASE_HEX);
18844 gsm_a_tap = register_tap("gsm_a");
18846 register_dissector("gsm_a_dtap", dissect_dtap, proto_a_dtap);
18847 register_dissector("gsm_a_rp", dissect_rp, proto_a_rp);
18848 register_dissector("gsm_a_bssmap", dissect_bssmap, proto_a_bssmap);
18853 proto_reg_handoff_gsm_a(void)
18856 bssmap_handle = create_dissector_handle(dissect_bssmap, proto_a_bssmap);
18857 dtap_handle = find_dissector("gsm_a_dtap");
18858 rp_handle = create_dissector_handle(dissect_rp, proto_a_rp);
18860 dissector_add("bssap.pdu_type", BSSAP_PDU_TYPE_BSSMAP, bssmap_handle);
18861 dissector_add("bssap.pdu_type", BSSAP_PDU_TYPE_DTAP, dtap_handle);
18862 dissector_add("ranap.nas_pdu", BSSAP_PDU_TYPE_DTAP, dtap_handle);
18863 dissector_add("llcgprs.sapi", 1 , dtap_handle); /* GPRS Mobility Management */
18864 dissector_add("llcgprs.sapi", 7 , dtap_handle); /* SMS */
18865 data_handle = find_dissector("data");
18866 gsm_map_handle = find_dissector("gsm_map");