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.
10 * Mobile radio interface signalling layer 3;
12 * (3GPP TS 24.007 version 3.9.0 Release 1999)
15 * Mobile-services Switching Centre - Base Station System
16 * (MSC - BSS) interface;
17 * Layer 3 specification
18 * (GSM 08.08 version 7.7.0 Release 1998) TS 100 590 v7.7.0
21 * Mobile radio interface Layer 3 specification;
22 * Core network protocols;
24 * (3GPP TS 24.008 version 4.7.0 Release 4)
27 * Mobile radio interface layer 3 specification;
28 * Radio Resource Control Protocol
29 * (GSM 04.18 version 8.4.1 Release 1999)
32 * Point-to-Point (PP) Short Message Service (SMS)
33 * support on mobile radio interface
34 * (3GPP TS 24.011 version 4.1.1 Release 4)
37 * Mobile radio Layer 3 supplementary service specification;
39 * (3GPP TS 24.080 version 4.3.0 Release 4)
41 * $Id: packet-gsm_a.c,v 1.10 2003/12/21 04:31:56 jmayer Exp $
43 * Ethereal - Network traffic analyzer
44 * By Gerald Combs <gerald@ethereal.com>
45 * Copyright 1998 Gerald Combs
47 * This program is free software; you can redistribute it and/or
48 * modify it under the terms of the GNU General Public License
49 * as published by the Free Software Foundation; either version 2
50 * of the License, or (at your option) any later version.
52 * This program is distributed in the hope that it will be useful,
53 * but WITHOUT ANY WARRANTY; without even the implied warranty of
54 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
55 * GNU General Public License for more details.
57 * You should have received a copy of the GNU General Public License
58 * along with this program; if not, write to the Free Software
59 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
71 #include "epan/packet.h"
75 #include "packet-bssap.h"
76 #include "packet-gsm_a.h"
78 /* PROTOTYPES/FORWARDS */
80 const value_string gsm_a_bssmap_msg_strings[] = {
81 { 0x01, "Assignment Request" },
82 { 0x02, "Assignment Complete" },
83 { 0x03, "Assignment Failure" },
84 { 0x10, "Handover Request" },
85 { 0x11, "Handover Required" },
86 { 0x12, "Handover Request Acknowledge" },
87 { 0x13, "Handover Command" },
88 { 0x14, "Handover Complete" },
89 { 0x15, "Handover Succeeded" },
90 { 0x16, "Handover Failure" },
91 { 0x17, "Handover Performed" },
92 { 0x18, "Handover Candidate Enquire" },
93 { 0x19, "Handover Candidate Response" },
94 { 0x1a, "Handover Required Reject" },
95 { 0x1b, "Handover Detect" },
96 { 0x20, "Clear Command" },
97 { 0x21, "Clear Complete" },
98 { 0x22, "Clear Request" },
100 { 0x24, "Reserved" },
101 { 0x25, "SAPI 'n' Reject" },
102 { 0x26, "Confusion" },
105 { 0x2a, "Connection Oriented Information" },
106 { 0x2b, "Perform Location Request" },
107 { 0x2c, "LSA Information" },
108 { 0x2d, "Perform Location Response" },
109 { 0x2e, "Perform Location Abort" },
111 { 0x31, "Reset Acknowledge" },
112 { 0x32, "Overload" },
113 { 0x33, "Reserved" },
114 { 0x34, "Reset Circuit" },
115 { 0x35, "Reset Circuit Acknowledge" },
116 { 0x36, "MSC Invoke Trace" },
117 { 0x37, "BSS Invoke Trace" },
118 { 0x3a, "Connectionless Information" },
120 { 0x41, "Blocking Acknowledge" },
122 { 0x43, "Unblocking Acknowledge" },
123 { 0x44, "Circuit Group Block" },
124 { 0x45, "Circuit Group Blocking Acknowledge" },
125 { 0x46, "Circuit Group Unblock" },
126 { 0x47, "Circuit Group Unblocking Acknowledge" },
127 { 0x48, "Unequipped Circuit" },
128 { 0x4e, "Change Circuit" },
129 { 0x4f, "Change Circuit Acknowledge" },
130 { 0x50, "Resource Request" },
131 { 0x51, "Resource Indication" },
133 { 0x53, "Cipher Mode Command" },
134 { 0x54, "Classmark Update" },
135 { 0x55, "Cipher Mode Complete" },
136 { 0x56, "Queuing Indication" },
137 { 0x57, "Complete Layer 3 Information" },
138 { 0x58, "Classmark Request" },
139 { 0x59, "Cipher Mode Reject" },
140 { 0x5a, "Load Indication" },
141 { 0x04, "VGCS/VBS Setup" },
142 { 0x05, "VGCS/VBS Setup Ack" },
143 { 0x06, "VGCS/VBS Setup Refuse" },
144 { 0x07, "VGCS/VBS Assignment Request" },
145 { 0x1c, "VGCS/VBS Assignment Result" },
146 { 0x1d, "VGCS/VBS Assignment Failure" },
147 { 0x1e, "VGCS/VBS Queuing Indication" },
148 { 0x1f, "Uplink Request" },
149 { 0x27, "Uplink Request Acknowledge" },
150 { 0x49, "Uplink Request Confirmation" },
151 { 0x4a, "Uplink Release Indication" },
152 { 0x4b, "Uplink Reject Command" },
153 { 0x4c, "Uplink Release Command" },
154 { 0x4d, "Uplink Seized Command" },
158 const value_string gsm_a_dtap_msg_mm_strings[] = {
159 { 0x01, "IMSI Detach Indication" },
160 { 0x02, "Location Updating Accept" },
161 { 0x04, "Location Updating Reject" },
162 { 0x08, "Location Updating Request" },
163 { 0x11, "Authentication Reject" },
164 { 0x12, "Authentication Request" },
165 { 0x14, "Authentication Response" },
166 { 0x1c, "Authentication Failure" },
167 { 0x18, "Identity Request" },
168 { 0x19, "Identity Response" },
169 { 0x1a, "TMSI Reallocation Command" },
170 { 0x1b, "TMSI Reallocation Complete" },
171 { 0x21, "CM Service Accept" },
172 { 0x22, "CM Service Reject" },
173 { 0x23, "CM Service Abort" },
174 { 0x24, "CM Service Request" },
175 { 0x25, "CM Service Prompt" },
176 { 0x26, "Reserved: was allocated in earlier phases of the protocol" },
177 { 0x28, "CM Re-establishment Request" },
180 { 0x31, "MM Status" },
181 { 0x32, "MM Information" },
185 const value_string gsm_a_dtap_msg_rr_strings[] = {
186 { 0x3c, "RR Initialisation Request" },
187 { 0x3b, "Additional Assignment" },
188 { 0x3f, "Immediate Assignment" },
189 { 0x39, "Immediate Assignment Extended" },
190 { 0x3a, "Immediate Assignment Reject" },
192 { 0x48, "DTM Assignment Failure" },
193 { 0x49, "DTM Reject" },
194 { 0x4a, "DTM Request" },
195 { 0x4b, "Main DCCH Assignment Command" },
196 { 0x4c, "Packet Assignment Command" },
198 { 0x35, "Ciphering Mode Command" },
199 { 0x32, "Ciphering Mode Complete" },
201 { 0x30, "Configuration Change Command" },
202 { 0x31, "Configuration Change Ack." },
203 { 0x33, "Configuration Change Reject" },
205 { 0x2e, "Assignment Command" },
206 { 0x29, "Assignment Complete" },
207 { 0x2f, "Assignment Failure" },
208 { 0x2b, "Handover Command" },
209 { 0x2c, "Handover Complete" },
210 { 0x28, "Handover Failure" },
211 { 0x2d, "Physical Information" },
212 { 0x4d, "DTM Assignment Command" },
214 { 0x08, "RR-cell Change Order" },
215 { 0x23, "PDCH Assignment Command" },
217 { 0x0d, "Channel Release" },
218 { 0x0a, "Partial Release" },
219 { 0x0f, "Partial Release Complete" },
221 { 0x21, "Paging Request Type 1" },
222 { 0x22, "Paging Request Type 2" },
223 { 0x24, "Paging Request Type 3" },
224 { 0x27, "Paging Response" },
225 { 0x20, "Notification/NCH" },
226 { 0x25, "Reserved" },
227 { 0x26, "Notification/Response" },
229 { 0x0b, "Reserved" },
231 /* { 0xc0, "Utran Classmark Change" }, CONFLICTS WITH Handover To UTRAN Command */
232 { 0xc1, "UE RAB Preconfiguration" },
233 { 0xc2, "cdma2000 Classmark Change" },
235 { 0x18, "System Information Type 8" },
236 { 0x19, "System Information Type 1" },
237 { 0x1a, "System Information Type 2" },
238 { 0x1b, "System Information Type 3" },
239 { 0x1c, "System Information Type 4" },
240 { 0x1d, "System Information Type 5" },
241 { 0x1e, "System Information Type 6" },
242 { 0x1f, "System Information Type 7" },
244 { 0x02, "System Information Type 2bis" },
245 { 0x03, "System Information Type 2ter" },
246 { 0x07, "System Information Type 2quater" },
247 { 0x05, "System Information Type 5bis" },
248 { 0x06, "System Information Type 5ter" },
249 { 0x04, "System Information Type 9" },
250 { 0x00, "System Information Type 13" },
252 { 0x3d, "System Information Type 16" },
253 { 0x3e, "System Information Type 17" },
255 { 0x40, "System Information Type 18" },
256 { 0x41, "System Information Type 19" },
257 { 0x42, "System Information Type 20" },
259 { 0x10, "Channel Mode Modify" },
260 { 0x12, "RR Status" },
261 { 0x17, "Channel Mode Modify Acknowledge" },
262 { 0x14, "Frequency Redefinition" },
263 { 0x15, "Measurement Report" },
264 { 0x16, "Classmark Change" },
265 { 0x13, "Classmark Enquiry" },
266 { 0x36, "Extended Measurement Report" },
267 { 0x37, "Extended Measurement Order" },
268 { 0x34, "GPRS Suspension Request" },
270 { 0x09, "VGCS Uplink Grant" },
271 { 0x0e, "Uplink Release" },
272 { 0x0c, "Reserved" },
273 { 0x2a, "Uplink Busy" },
274 { 0x11, "Talker Indication" },
276 { 0xc0, "UTRAN Classmark Change/Handover To UTRAN Command" }, /* spec conflict */
278 { 0x38, "Application Information" },
283 const value_string gsm_a_dtap_msg_cc_strings[] = {
284 { 0x01, "Alerting" },
285 { 0x08, "Call Confirmed" },
286 { 0x02, "Call Proceeding" },
288 { 0x0f, "Connect Acknowledge" },
289 { 0x0e, "Emergency Setup" },
290 { 0x03, "Progress" },
291 { 0x04, "CC-Establishment" },
292 { 0x06, "CC-Establishment Confirmed" },
294 { 0x09, "Start CC" },
297 { 0x1f, "Modify Complete" },
298 { 0x13, "Modify Reject" },
299 { 0x10, "User Information" },
301 { 0x19, "Hold Acknowledge" },
302 { 0x1a, "Hold Reject" },
303 { 0x1c, "Retrieve" },
304 { 0x1d, "Retrieve Acknowledge" },
305 { 0x1e, "Retrieve Reject" },
306 { 0x25, "Disconnect" },
308 { 0x2a, "Release Complete" },
309 { 0x39, "Congestion Control" },
312 { 0x34, "Status Enquiry" },
313 { 0x35, "Start DTMF" },
314 { 0x31, "Stop DTMF" },
315 { 0x32, "Stop DTMF Acknowledge" },
316 { 0x36, "Start DTMF Acknowledge" },
317 { 0x37, "Start DTMF Reject" },
318 { 0x3a, "Facility" },
322 const value_string gsm_a_dtap_msg_gmm_strings[] = {
323 { 0x01, "Attach Request" },
324 { 0x02, "Attach Accept" },
325 { 0x03, "Attach Complete" },
326 { 0x04, "Attach Reject" },
327 { 0x05, "Detach Request" },
328 { 0x06, "Detach Accept" },
329 { 0x08, "Routing Area Update Request" },
330 { 0x09, "Routing Area Update Accept" },
331 { 0x0a, "Routing Area Update Complete" },
332 { 0x0b, "Routing Area Update Reject" },
333 { 0x0c, "Service Request" },
334 { 0x0d, "Service Accept" },
335 { 0x0e, "Service Reject" },
336 { 0x10, "P-TMSI Reallocation Command" },
337 { 0x11, "P-TMSI Reallocation Complete" },
338 { 0x12, "Authentication and Ciphering Req" },
339 { 0x13, "Authentication and Ciphering Resp" },
340 { 0x14, "Authentication and Ciphering Rej" },
341 { 0x1c, "Authentication and Ciphering Failure" },
342 { 0x15, "Identity Request" },
343 { 0x16, "Identity Response" },
344 { 0x20, "GMM Status" },
345 { 0x21, "GMM Information" },
349 const value_string gsm_a_dtap_msg_sms_strings[] = {
352 { 0x10, "CP-ERROR" },
356 const value_string gsm_a_dtap_msg_sm_strings[] = {
357 { 0x41, "Activate PDP Context Request" },
358 { 0x42, "Activate PDP Context Accept" },
359 { 0x43, "Activate PDP Context Reject" },
360 { 0x44, "Request PDP Context Activation" },
361 { 0x45, "Request PDP Context Activation rej." },
362 { 0x46, "Deactivate PDP Context Request" },
363 { 0x47, "Deactivate PDP Context Accept" },
364 { 0x48, "Modify PDP Context Request(Network to MS direction)" },
365 { 0x49, "Modify PDP Context Accept (MS to network direction)" },
366 { 0x4a, "Modify PDP Context Request(MS to network direction)" },
367 { 0x4b, "Modify PDP Context Accept (Network to MS direction)" },
368 { 0x4c, "Modify PDP Context Reject" },
369 { 0x4d, "Activate Secondary PDP Context Request" },
370 { 0x4e, "Activate Secondary PDP Context Accept" },
371 { 0x4f, "Activate Secondary PDP Context Reject" },
372 { 0x50, "Reserved: was allocated in earlier phases of the protocol" },
373 { 0x51, "Reserved: was allocated in earlier phases of the protocol" },
374 { 0x52, "Reserved: was allocated in earlier phases of the protocol" },
375 { 0x53, "Reserved: was allocated in earlier phases of the protocol" },
376 { 0x54, "Reserved: was allocated in earlier phases of the protocol" },
377 { 0x55, "SM Status" },
381 const value_string gsm_a_dtap_msg_ss_strings[] = {
382 { 0x2a, "Release Complete" },
383 { 0x3a, "Facility" },
384 { 0x3b, "Register" },
388 static const value_string gsm_rp_msg_strings[] = {
389 { 0x00, "RP-DATA (MS to Network)" },
390 { 0x01, "RP-DATA (Network to MS)" },
391 { 0x02, "RP-ACK (MS to Network)" },
392 { 0x03, "RP-ACK (Network to MS)" },
393 { 0x04, "RP-ERROR (MS to Network)" },
394 { 0x05, "RP-ERROR (Network to MS)" },
395 { 0x06, "RP-SMMA (MS to Network)" },
399 static const value_string gsm_bssmap_elem_strings[] = {
400 { 0x01, "Circuit Identity Code" },
401 { 0x02, "Reserved" },
402 { 0x03, "Resource Available" },
404 { 0x05, "Cell Identifier" },
405 { 0x06, "Priority" },
406 { 0x07, "Layer 3 Header Information" },
409 { 0x0a, "Encryption Information" },
410 { 0x0b, "Channel Type" },
411 { 0x0c, "Periodicity" },
412 { 0x0d, "Extended Resource Indicator" },
413 { 0x0e, "Number Of MSs" },
414 { 0x0f, "Reserved" },
415 { 0x10, "Reserved" },
416 { 0x11, "Reserved" },
417 { 0x12, "Classmark Information Type 2" },
418 { 0x13, "Classmark Information Type 3" },
419 { 0x14, "Interference Band To Be Used" },
420 { 0x15, "RR Cause" },
421 { 0x16, "Reserved" },
422 { 0x17, "Layer 3 Information" },
424 { 0x19, "Downlink DTX Flag" },
425 { 0x1a, "Cell Identifier List" },
426 { 0x1b, "Response Request" },
427 { 0x1c, "Resource Indication Method" },
428 { 0x1d, "Classmark Information Type 1" },
429 { 0x1e, "Circuit Identity Code List" },
430 { 0x1f, "Diagnostic" },
431 { 0x20, "Layer 3 Message Contents" },
432 { 0x21, "Chosen Channel" },
433 { 0x22, "Total Resource Accessible" },
434 { 0x23, "Cipher Response Mode" },
435 { 0x24, "Channel Needed" },
436 { 0x25, "Trace Type" },
437 { 0x26, "TriggerID" },
438 { 0x27, "Trace Reference" },
439 { 0x28, "TransactionID" },
440 { 0x29, "Mobile Identity" },
442 { 0x2b, "Forward Indicator" },
443 { 0x2c, "Chosen Encryption Algorithm" },
444 { 0x2d, "Circuit Pool" },
445 { 0x2e, "Circuit Pool List" },
446 { 0x2f, "Time Indication" },
447 { 0x30, "Resource Situation" },
448 { 0x31, "Current Channel Type 1" },
449 { 0x32, "Queueing Indicator" },
450 { 0x40, "Speech Version" },
451 { 0x33, "Assignment Requirement" },
452 { 0x35, "Talker Flag" },
453 { 0x36, "Connection Release Requested" },
454 { 0x37, "Group Call Reference" },
455 { 0x38, "eMLPP Priority" },
456 { 0x39, "Configuration Evolution Indication" },
457 { 0x3a, "Old BSS to New BSS Information" },
458 { 0x3b, "LSA Identifier" },
459 { 0x3c, "LSA Identifier List" },
460 { 0x3d, "LSA Information" },
462 { 0x3f, "LSA access control suppression" },
463 { 0x43, "LCS Priority" },
464 { 0x44, "Location Type" },
465 { 0x45, "Location Estimate" },
466 { 0x46, "Positioning Data" },
467 { 0x47, "LCS Cause" },
468 { 0x48, "LCS Client Type" },
470 { 0x4a, "Network Element Identity" },
471 { 0x4b, "GPS Assistance Data" },
472 { 0x4c, "Deciphering Keys" },
473 { 0x4d, "Return Error Request" },
474 { 0x4e, "Return Error Cause" },
475 { 0x4f, "Segmentation" },
479 static const value_string gsm_dtap_elem_strings[] = {
480 /* Common Information Elements 10.5.1 */
481 { 0x00, "Cell Identity" },
482 { 0x00, "Ciphering Key Sequence Number" },
483 { 0x00, "Location Area Identification" },
484 { 0x00, "Mobile Identity" },
485 { 0x00, "Mobile Station Classmark 1" },
486 { 0x00, "Mobile Station Classmark 2" },
487 { 0x00, "Mobile Station Classmark 3" },
488 { 0x00, "Descriptive group or broadcast call reference" },
489 { 0x00, "Group Cipher Key Number" },
490 { 0x00, "PD and SAPI $(CCBS)$" },
491 { 0x00, "Priority Level" },
492 { 0x00, "PLMN List" },
493 /* Radio Resource Management Information Elements 10.5.2, most are from 10.5.1 */
494 { 0x00, "RR Cause" },
495 /* Mobility Management Information Elements 10.5.3 */
496 { 0x00, "Authentication Parameter RAND" },
497 { 0x00, "Authentication Parameter AUTN (UMTS authentication challenge only)" },
498 { 0x00, "Authentication Response Parameter" },
499 { 0x00, "Authentication Response Parameter (extension) (UMTS authentication challenge only)" },
500 { 0x00, "Authentication Failure Parameter (UMTS authentication challenge only)" },
501 { 0x00, "CM Service Type" },
502 { 0x00, "Identity Type" },
503 { 0x00, "Location Updating Type" },
504 { 0x00, "Network Name" },
505 { 0x00, "Reject Cause" },
506 { 0x00, "Follow-on Proceed" },
507 { 0x00, "Time Zone" },
508 { 0x00, "Time Zone and Time" },
509 { 0x00, "CTS Permission" },
510 { 0x00, "LSA Identifier" },
511 { 0x00, "Daylight Saving Time" },
512 /* Call Control Information Elements 10.5.4 */
513 { 0x00, "Auxiliary States" },
514 { 0x00, "Bearer Capability" },
515 { 0x00, "Call Control Capabilities" },
516 { 0x00, "Call State" },
517 { 0x00, "Called Party BCD Number" },
518 { 0x00, "Called Party Subaddress" },
519 { 0x00, "Calling Party BCD Number" },
520 { 0x00, "Calling Party Subaddress" },
522 { 0x00, "CLIR Suppression" },
523 { 0x00, "CLIR Invocation" },
524 { 0x00, "Congestion Level" },
525 { 0x00, "Connected Number" },
526 { 0x00, "Connected Subaddress" },
527 { 0x00, "Facility" },
528 { 0x00, "High Layer Compatibility" },
529 { 0x00, "Keypad Facility" },
530 { 0x00, "Low Layer Compatibility" },
531 { 0x00, "More Data" },
532 { 0x00, "Notification Indicator" },
533 { 0x00, "Progress Indicator" },
534 { 0x00, "Recall type $(CCBS)$" },
535 { 0x00, "Redirecting Party BCD Number" },
536 { 0x00, "Redirecting Party Subaddress" },
537 { 0x00, "Repeat Indicator" },
538 { 0x00, "Reverse Call Setup Direction" },
539 { 0x00, "SETUP Container $(CCBS)$" },
541 { 0x00, "SS Version Indicator" },
542 { 0x00, "User-user" },
543 { 0x00, "Alerting Pattern $(NIA)$" },
544 { 0x00, "Allowed Actions $(CCBS)$" },
545 { 0x00, "Stream Identifier" },
546 { 0x00, "Network Call Control Capabilities" },
547 { 0x00, "Cause of No CLI" },
548 { 0x00, "Immediate Modification Indicator" },
549 { 0x00, "Supported Codec List" },
550 { 0x00, "Service Category" },
551 /* GPRS Mobility Management Information Elements 10.5.5 */
552 { 0x00, "Attach Result" },
553 { 0x00, "Attach Type" },
554 { 0x00, "TMSI Status" },
555 { 0x00, "Detach Type" },
556 { 0x00, "DRX Parameter" },
557 { 0x00, "Force to Standby" },
558 { 0x00, "P-TMSI Signature" },
559 { 0x00, "P-TMSI Signature 2" },
560 { 0x00, "Identity Type 2" },
561 { 0x00, "IMEISV Request" },
562 { 0x00, "Receive N-PDU Numbers List" },
563 { 0x00, "MS Network Capability" },
564 { 0x00, "MS Radio Access Capability" },
565 { 0x00, "GMM Cause" },
566 { 0x00, "Routing Area Identification" },
567 { 0x00, "Update Result" },
568 { 0x00, "A&C Reference Number" },
569 { 0x00, "Service Type" },
570 { 0x00, "Cell Notification" },
571 { 0x00, "Network Feature Support" },
572 /* Short Message Service Information Elements [5] 8.1.4 */
573 { 0x00, "CP-User Data" },
574 { 0x00, "CP-Cause" },
575 /* Short Message Service Information Elements [5] 8.2 */
576 { 0x00, "RP-Message Reference" },
577 { 0x00, "RP-Origination Address" },
578 { 0x00, "RP-Destination Address" },
579 { 0x00, "RP-User Data" },
580 { 0x00, "RP-Cause" },
581 /* Session Management Information Elements 10.5.6 */
582 { 0x00, "Access Point Name" },
583 { 0x00, "Network Service Access Point Identifier" },
584 { 0x00, "Protocol Configuration Options" },
585 { 0x00, "Packet Data Protocol Address" },
586 { 0x00, "Quality Of Service" },
587 { 0x00, "SM Cause" },
588 { 0x00, "Linked TI" },
589 { 0x00, "LLC Service Access Point Identifier" },
590 { 0x00, "Tear Down Indicator" },
591 { 0x00, "Packet Flow Identifier" },
592 { 0x00, "Traffic Flow Template" },
593 /* GPRS Common Information Elements 10.5.7 */
594 { 0x00, "PDP Context Status" },
595 { 0x00, "Radio Priority" },
596 { 0x00, "GPRS Timer" },
597 { 0x00, "GPRS Timer 2" },
601 const gchar *gsm_a_pd_str[] = {
602 "Group Call Control",
603 "Broadcast Call Control",
604 "Reserved: was allocated in earlier phases of the protocol",
605 "Call Control; call related SS messages",
606 "GPRS Transparent Transport Protocol (GTTP)",
607 "Mobility Management messages",
608 "Radio Resources Management messages",
610 "GPRS Mobility Management messages",
612 "GPRS Session Management messages",
613 "Non call related SS messages",
616 "Reserved for extension of the PD to one octet length",
617 "Reserved for tests procedures"
620 static const value_string bssap_cc_values[] = {
621 { 0x00, "not further specified" },
622 { 0x80, "FACCH or SDCCH" },
626 static const value_string bssap_sapi_values[] = {
627 { 0x00, "RR/MM/CC" },
631 static const gchar *cell_disc_str[] = {
632 "The whole Cell Global Identification, CGI, is used to identify the cells",
633 "Location Area Code, LAC, and Cell Identify, CI, is used to identify the cells",
634 "Cell Identity, CI, is used to identify the cells",
635 "No cell is associated with the transaction",
636 "Location Area Identification, LAI, is used to identify all cells within a Location Area",
637 "Location Area Code, LAC, is used to identify all cells within a location area",
638 "All cells on the BSS are identified"
640 #define NUM_CELL_DISC_STR (sizeof(cell_disc_str)/sizeof(gchar *))
642 #define DTAP_PD_MASK 0x0f
643 #define DTAP_SKIP_MASK 0xf0
644 #define DTAP_TI_MASK DTAP_SKIP_MASK
645 #define DTAP_TIE_PRES_MASK 0x07 /* after TI shifted to right */
646 #define DTAP_TIE_MASK 0x7f
648 #define DTAP_MM_IEI_MASK 0x3f
649 #define DTAP_RR_IEI_MASK 0xff
650 #define DTAP_CC_IEI_MASK 0x3f
651 #define DTAP_GMM_IEI_MASK 0xff
652 #define DTAP_SMS_IEI_MASK 0xff
653 #define DTAP_SM_IEI_MASK 0xff
654 #define DTAP_SS_IEI_MASK 0x3f
656 /* Initialize the protocol and registered fields */
657 static int proto_a_bssmap = -1;
658 static int proto_a_dtap = -1;
659 static int proto_a_rp = -1;
661 static int gsm_a_tap = -1;
663 static int hf_gsm_a_none = -1;
664 static int hf_gsm_a_bssmap_msg_type = -1;
665 static int hf_gsm_a_dtap_msg_mm_type = -1;
666 static int hf_gsm_a_dtap_msg_rr_type = -1;
667 static int hf_gsm_a_dtap_msg_cc_type = -1;
668 static int hf_gsm_a_dtap_msg_gmm_type = -1;
669 static int hf_gsm_a_dtap_msg_sms_type = -1;
670 static int hf_gsm_a_dtap_msg_sm_type = -1;
671 static int hf_gsm_a_dtap_msg_ss_type = -1;
672 static int hf_gsm_a_rp_msg_type = -1;
673 static int hf_gsm_a_length = -1;
674 static int hf_gsm_a_bssmap_elem_id = -1;
675 static int hf_gsm_a_dtap_elem_id = -1;
676 static int hf_gsm_a_imsi = -1;
677 static int hf_gsm_a_tmsi = -1;
678 static int hf_gsm_a_imei = -1;
679 static int hf_gsm_a_imeisv = -1;
680 static int hf_gsm_a_cld_party_bcd_num = -1;
681 static int hf_gsm_a_clg_party_bcd_num = -1;
682 static int hf_gsm_a_cell_ci = -1;
683 static int hf_gsm_a_cell_lac = -1;
684 static int hf_gsm_a_dlci_cc = -1;
685 static int hf_gsm_a_dlci_spare = -1;
686 static int hf_gsm_a_dlci_sapi = -1;
688 /* Initialize the subtree pointers */
689 static gint ett_bssmap_msg = -1;
690 static gint ett_dtap_msg = -1;
691 static gint ett_rp_msg = -1;
692 static gint ett_elems = -1;
693 static gint ett_elem = -1;
694 static gint ett_dtap_oct_1 = -1;
695 static gint ett_cm_srvc_type = -1;
696 static gint ett_gsm_enc_info = -1;
697 static gint ett_cell_list = -1;
698 static gint ett_dlci = -1;
699 static gint ett_bc_oct_3a = -1;
700 static gint ett_bc_oct_4 = -1;
701 static gint ett_bc_oct_5 = -1;
702 static gint ett_bc_oct_5a = -1;
703 static gint ett_bc_oct_5b = -1;
704 static gint ett_bc_oct_6 = -1;
705 static gint ett_bc_oct_6a = -1;
706 static gint ett_bc_oct_6b = -1;
707 static gint ett_bc_oct_6c = -1;
708 static gint ett_bc_oct_6d = -1;
709 static gint ett_bc_oct_6e = -1;
710 static gint ett_bc_oct_6f = -1;
711 static gint ett_bc_oct_6g = -1;
712 static gint ett_bc_oct_7 = -1;
714 static char a_bigbuf[1024];
715 static gchar a_add_string[1024];
717 static dissector_handle_t data_handle;
718 static dissector_handle_t bssmap_handle;
719 static dissector_handle_t dtap_handle;
720 static dissector_handle_t rp_handle;
721 static dissector_table_t sms_dissector_table; /* SMS TPDU */
723 static packet_info *g_pinfo;
724 static proto_tree *g_tree;
727 * current RP message type
729 static gint gsm_a_rp_type;
732 * this should be set on a per message basis, if possible
734 #define IS_UPLINK_FALSE 0
735 #define IS_UPLINK_TRUE 1
736 #define IS_UPLINK_UNKNOWN 2
737 static gint is_uplink;
740 typedef struct dgt_set_t
742 unsigned char out[15];
746 static dgt_set_t Dgt_mbcd = {
748 /* 0 1 2 3 4 5 6 7 8 9 a b c d e */
749 '0','1','2','3','4','5','6','7','8','9','*','#','a','b','c'
753 static dgt_set_t Dgt_tbcd = {
755 /* 0 1 2 3 4 5 6 7 8 9 a b c d e */
756 '0','1','2','3','4','5','6','7','8','9','?','B','C','*','#'
760 static dgt_set_t Dgt_msid = {
762 /* 0 1 2 3 4 5 6 7 8 9 a b c d e */
763 '0','1','2','3','4','5','6','7','8','9','?','?','?','?','?'
770 * Unpack BCD input pattern into output ASCII pattern
772 * Input Pattern is supplied using the same format as the digits
774 * Returns: length of unpacked pattern
778 char *out, /* ASCII pattern out */
779 guchar *in, /* packed pattern in */
780 int num_octs, /* Number of octets to unpack */
781 dgt_set_t *dgt /* Digit definitions */
790 * unpack first value in byte
793 *out++ = dgt->out[i & 0x0f];
797 * unpack second value in byte
801 if (i == 0x0f) /* odd number bytes - hit filler */
804 *out++ = dgt->out[i];
815 my_match_strval(guint32 val, const value_string *vs, gint *idx)
821 if (vs[i].value == val)
824 return(vs[i].strptr);
834 /* ELEMENT FUNCTIONS */
836 #define EXTRANEOUS_DATA_CHECK(edc_len, edc_max_len) \
837 if ((edc_len) > (edc_max_len)) \
839 proto_tree_add_text(tree, tvb, \
840 curr_offset, (edc_len) - (edc_max_len), "Extraneous Data"); \
841 curr_offset += ((edc_len) - (edc_max_len)); \
844 #define SHORT_DATA_CHECK(sdc_len, sdc_min_len) \
845 if ((sdc_len) < (sdc_min_len)) \
847 proto_tree_add_text(tree, tvb, \
848 curr_offset, (sdc_len), "Short Data (?)"); \
849 curr_offset += (sdc_len); \
850 return(curr_offset - offset); \
853 #define EXACT_DATA_CHECK(edc_len, edc_eq_len) \
854 if ((edc_len) != (edc_eq_len)) \
856 proto_tree_add_text(tree, tvb, \
857 curr_offset, (edc_len), "Unexpected Data Length"); \
858 curr_offset += (edc_len); \
859 return(curr_offset - offset); \
862 #define NO_MORE_DATA_CHECK(nmdc_len) \
863 if ((nmdc_len) == (curr_offset - offset)) return(nmdc_len);
866 * Decode the MCC/MNC from 3 octets in 'octs'
869 mcc_mnc_aux(guint8 *octs, gchar *mcc, gchar *mnc)
871 if ((octs[0] & 0x0f) <= 9)
873 mcc[0] = Dgt_tbcd.out[octs[0] & 0x0f];
877 mcc[0] = (octs[0] & 0x0f) + 55;
880 if (((octs[0] & 0xf0) >> 4) <= 9)
882 mcc[1] = Dgt_tbcd.out[(octs[0] & 0xf0) >> 4];
886 mcc[1] = ((octs[0] & 0xf0) >> 4) + 55;
889 if ((octs[1] & 0x0f) <= 9)
891 mcc[2] = Dgt_tbcd.out[octs[1] & 0x0f];
895 mcc[2] = (octs[1] & 0x0f) + 55;
900 if (((octs[1] & 0xf0) >> 4) <= 9)
902 mnc[2] = Dgt_tbcd.out[(octs[1] & 0xf0) >> 4];
906 mnc[2] = ((octs[1] & 0xf0) >> 4) + 55;
909 if ((octs[2] & 0x0f) <= 9)
911 mnc[0] = Dgt_tbcd.out[octs[2] & 0x0f];
915 mnc[0] = (octs[2] & 0x0f) + 55;
918 if (((octs[2] & 0xf0) >> 4) <= 9)
920 mnc[1] = Dgt_tbcd.out[(octs[2] & 0xf0) >> 4];
924 mnc[1] = ((octs[2] & 0xf0) >> 4) + 55;
930 * only a 1 digit MNC (very old)
934 else if (mnc[2] == 'F')
949 BE_CIC, /* Circuit Identity Code */
950 BE_RSVD_1, /* Reserved */
951 BE_RES_AVAIL, /* Resource Available */
952 BE_CAUSE, /* Cause */
953 BE_CELL_ID, /* Cell Identifier */
954 BE_PRIO, /* Priority */
955 BE_L3_HEADER_INFO, /* Layer 3 Header Information */
958 BE_ENC_INFO, /* Encryption Information */
959 BE_CHAN_TYPE, /* Channel Type */
960 BE_PERIODICITY, /* Periodicity */
961 BE_EXT_RES_IND, /* Extended Resource Indicator */
962 BE_NUM_MS, /* Number Of MSs */
963 BE_RSVD_2, /* Reserved */
964 BE_RSVD_3, /* Reserved */
965 BE_RSVD_4, /* Reserved */
966 BE_CM_INFO_2, /* Classmark Information Type 2 */
967 BE_CM_INFO_3, /* Classmark Information Type 3 */
968 BE_INT_BAND, /* Interference Band To Be Used */
969 BE_RR_CAUSE, /* RR Cause */
970 BE_RSVD_5, /* Reserved */
971 BE_L3_INFO, /* Layer 3 Information */
973 BE_DOWN_DTX_FLAG, /* Downlink DTX Flag */
974 BE_CELL_ID_LIST, /* Cell Identifier List */
975 BE_RESP_REQ, /* Response Request */
976 BE_RES_IND_METHOD, /* Resource Indication Method */
977 BE_CM_INFO_1, /* Classmark Information Type 1 */
978 BE_CIC_LIST, /* Circuit Identity Code List */
979 BE_DIAG, /* Diagnostic */
980 BE_L3_MSG, /* Layer 3 Message Contents */
981 BE_CHOSEN_CHAN, /* Chosen Channel */
982 BE_TOT_RES_ACC, /* Total Resource Accessible */
983 BE_CIPH_RESP_MODE, /* Cipher Response Mode */
984 BE_CHAN_NEEDED, /* Channel Needed */
985 BE_TRACE_TYPE, /* Trace Type */
986 BE_TRIGGERID, /* TriggerID */
987 BE_TRACE_REF, /* Trace Reference */
988 BE_TRANSID, /* TransactionID */
989 BE_MID, /* Mobile Identity */
990 BE_OMCID, /* OMCID */
991 BE_FOR_IND, /* Forward Indicator */
992 BE_CHOSEN_ENC_ALG, /* Chosen Encryption Algorithm */
993 BE_CCT_POOL, /* Circuit Pool */
994 BE_CCT_POOL_LIST, /* Circuit Pool List */
995 BE_TIME_IND, /* Time Indication */
996 BE_RES_SIT, /* Resource Situation */
997 BE_CURR_CHAN_1, /* Current Channel Type 1 */
998 BE_QUE_IND, /* Queueing Indicator */
999 BE_SPEECH_VER, /* Speech Version */
1000 BE_ASS_REQ, /* Assignment Requirement */
1001 BE_TALKER_FLAG, /* Talker Flag */
1002 BE_CONN_REL_REQ, /* Connection Release Requested */
1003 BE_GROUP_CALL_REF, /* Group Call Reference */
1004 BE_EMLPP_PRIO, /* eMLPP Priority */
1005 BE_CONF_EVO_IND, /* Configuration Evolution Indication */
1006 BE_OLD2NEW_INFO, /* Old BSS to New BSS Information */
1007 BE_LSA_ID, /* LSA Identifier */
1008 BE_LSA_ID_LIST, /* LSA Identifier List */
1009 BE_LSA_INFO, /* LSA Information */
1010 BE_LCS_QOS, /* LCS QoS */
1011 BE_LSA_ACC_CTRL, /* LSA access control suppression */
1012 BE_LCS_PRIO, /* LCS Priority */
1013 BE_LOC_TYPE, /* Location Type */
1014 BE_LOC_EST, /* Location Estimate */
1015 BE_POS_DATA, /* Positioning Data */
1016 BE_LCS_CAUSE, /* LCS Cause */
1017 BE_LCS_CLIENT, /* LCS Client Type */
1019 BE_NE_ID, /* Network Element Identity */
1020 BE_GSP_ASSIST_DATA, /* GPS Assistance Data */
1021 BE_DECIPH_KEYS, /* Deciphering Keys */
1022 BE_RET_ERR_REQ, /* Return Error Request */
1023 BE_RET_ERR_CAUSE, /* Return Error Cause */
1024 BE_SEG, /* Segmentation */
1029 #define NUM_GSM_BSSMAP_ELEM (sizeof(gsm_bssmap_elem_strings)/sizeof(value_string))
1030 static gint ett_gsm_bssmap_elem[NUM_GSM_BSSMAP_ELEM];
1036 be_cic(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
1038 guint32 curr_offset;
1042 curr_offset = offset;
1044 value = tvb_get_ntohs(tvb, curr_offset);
1046 other_decode_bitfield_value(a_bigbuf, value, 0xffe0, 16);
1047 proto_tree_add_text(tree,
1048 tvb, curr_offset, 2,
1049 "%s : PCM Multiplexer: %u",
1051 (value & 0xffe0) >> 5);
1053 other_decode_bitfield_value(a_bigbuf, value, 0x001f, 16);
1054 proto_tree_add_text(tree,
1055 tvb, curr_offset, 2,
1056 "%s : Timeslot: %u",
1062 sprintf(add_string, " - (%u) (0x%04x)", value, value);
1064 /* no length check possible */
1066 return(curr_offset - offset);
1073 be_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
1077 guint32 curr_offset;
1080 curr_offset = offset;
1082 oct = tvb_get_guint8(tvb, curr_offset);
1084 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
1085 proto_tree_add_text(tree,
1086 tvb, curr_offset, 1,
1087 "%s : Extension: %s",
1089 (oct & 0x80) ? "extended" : "not extended");
1095 if ((oct & 0x0f) == 0x00)
1097 /* national cause */
1098 switch ((oct & 0x70) >> 4)
1100 case 0: str = "Normal Event"; break;
1101 case 1: str = "Normal Event"; break;
1102 case 2: str = "Resource Unavailable"; break;
1103 case 3: str = "Service or option not available"; break;
1104 case 4: str = "Service or option not implemented"; break;
1105 case 5: str = "Invalid message (e.g., parameter out of range)"; break;
1106 case 6: str = "Protocol error"; break;
1108 str = "Interworking";
1112 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
1113 proto_tree_add_text(tree,
1114 tvb, curr_offset, 1,
1115 "%s : Cause Class: %s",
1119 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
1120 proto_tree_add_text(tree,
1121 tvb, curr_offset, 1,
1122 "%s : National Cause",
1127 proto_tree_add_text(tree, tvb, curr_offset, 1,
1132 strcpy(add_string, " - (National Cause)");
1136 value = tvb_get_guint8(tvb, curr_offset + 1);
1138 other_decode_bitfield_value(a_bigbuf, oct, 0x7f, 8);
1139 proto_tree_add_text(tree,
1140 tvb, curr_offset, 1,
1141 "%s : Cause (MSB): %u",
1143 ((oct & 0x7f) << 8) | value);
1147 other_decode_bitfield_value(a_bigbuf, value, 0xff, 8);
1148 proto_tree_add_text(tree, tvb, curr_offset, 1,
1159 case 0x00: str = "Radio interface message failure"; break;
1160 case 0x01: str = "Radio interface failure"; break;
1161 case 0x02: str = "Uplink quality"; break;
1162 case 0x03: str = "Uplink strength"; break;
1163 case 0x04: str = "Downlink quality"; break;
1164 case 0x05: str = "Downlink strength"; break;
1165 case 0x06: str = "Distance"; break;
1166 case 0x07: str = "O and M intervention"; break;
1167 case 0x08: str = "Response to MSC invocation"; break;
1168 case 0x09: str = "Call control"; break;
1169 case 0x0a: str = "Radio interface failure, reversion to old channel"; break;
1170 case 0x0b: str = "Handover successful"; break;
1171 case 0x0c: str = "Better Cell"; break;
1172 case 0x0d: str = "Directed Retry"; break;
1173 case 0x0e: str = "Joined group call channel"; break;
1174 case 0x0f: str = "Traffic"; break;
1176 case 0x20: str = "Equipment failure"; break;
1177 case 0x21: str = "No radio resource available"; break;
1178 case 0x22: str = "Requested terrestrial resource unavailable"; break;
1179 case 0x23: str = "CCCH overload"; break;
1180 case 0x24: str = "Processor overload"; break;
1181 case 0x25: str = "BSS not equipped"; break;
1182 case 0x26: str = "MS not equipped"; break;
1183 case 0x27: str = "Invalid cell"; break;
1184 case 0x28: str = "Traffic Load"; break;
1185 case 0x29: str = "Preemption"; break;
1187 case 0x30: str = "Requested transcoding/rate adaption unavailable"; break;
1188 case 0x31: str = "Circuit pool mismatch"; break;
1189 case 0x32: str = "Switch circuit pool"; break;
1190 case 0x33: str = "Requested speech version unavailable"; break;
1191 case 0x34: str = "LSA not allowed"; break;
1193 case 0x40: str = "Ciphering algorithm not supported"; break;
1195 case 0x50: str = "Terrestrial circuit already allocated"; break;
1196 case 0x51: str = "Invalid message contents"; break;
1197 case 0x52: str = "Information element or field missing"; break;
1198 case 0x53: str = "Incorrect value"; break;
1199 case 0x54: str = "Unknown Message type"; break;
1200 case 0x55: str = "Unknown Information Element"; break;
1202 case 0x60: str = "Protocol Error between BSS and MSC"; break;
1203 case 0x61: str = "VGCS/VBS call non existent"; break;
1206 if ((oct >= 0x10) && (oct <= 0x17)) { str = "Reserved for international use"; }
1207 else if ((oct >= 0x18) && (oct <= 0x1f)) { str = "Reserved for national use"; }
1208 else if ((oct >= 0x2a) && (oct <= 0x2f)) { str = "Reserved for national use"; }
1209 else if ((oct >= 0x35) && (oct <= 0x3f)) { str = "Reserved for international use"; }
1210 else if ((oct >= 0x41) && (oct <= 0x47)) { str = "Reserved for international use"; }
1211 else if ((oct >= 0x48) && (oct <= 0x4f)) { str = "Reserved for national use"; }
1212 else if ((oct >= 0x56) && (oct <= 0x57)) { str = "Reserved for international use"; }
1213 else if ((oct >= 0x58) && (oct <= 0x5f)) { str = "Reserved for national use"; }
1214 else if ((oct >= 0x62) && (oct <= 0x67)) { str = "Reserved for international use"; }
1215 else if ((oct >= 0x68) && (oct <= 0x6f)) { str = "Reserved for national use"; }
1216 else if ((oct >= 0x70) && (oct <= 0x77)) { str = "Reserved for international use"; }
1217 else if ((oct >= 0x78) && (oct <= 0x7f)) { str = "Reserved for national use"; }
1221 other_decode_bitfield_value(a_bigbuf, oct, 0x7f, 8);
1222 proto_tree_add_text(tree,
1223 tvb, curr_offset, 1,
1224 "%s : Cause: (%u) %s",
1231 sprintf(add_string, " - (%u) %s", oct & 0x7f, str);
1234 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
1236 return(curr_offset - offset);
1243 be_tmsi(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
1245 guint32 curr_offset;
1248 curr_offset = offset;
1250 value = tvb_get_ntohl(tvb, curr_offset);
1252 proto_tree_add_uint(tree, hf_gsm_a_tmsi,
1253 tvb, curr_offset, 4,
1256 sprintf(add_string, " - (0x%04x)", value);
1260 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
1262 return(curr_offset - offset);
1269 be_l3_header_info(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
1272 guint32 curr_offset;
1274 add_string = add_string;
1275 curr_offset = offset;
1277 oct = tvb_get_guint8(tvb, curr_offset);
1279 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
1280 proto_tree_add_text(tree,
1281 tvb, curr_offset, 1,
1285 other_decode_bitfield_value(a_bigbuf, oct, DTAP_PD_MASK, 8);
1286 proto_tree_add_text(tree,
1287 tvb, curr_offset, 1,
1288 "%s : Protocol Discriminator: %s",
1290 gsm_a_pd_str[oct & DTAP_PD_MASK]);
1294 NO_MORE_DATA_CHECK(len);
1296 oct = tvb_get_guint8(tvb, curr_offset);
1298 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
1299 proto_tree_add_text(tree,
1300 tvb, curr_offset, 1,
1304 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
1305 proto_tree_add_text(tree,
1306 tvb, curr_offset, 1,
1309 ((oct & 0x08) ? "allocated by receiver" : "allocated by sender"));
1311 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
1312 proto_tree_add_text(tree,
1313 tvb, curr_offset, 1,
1320 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
1322 return(curr_offset - offset);
1329 be_enc_info(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
1334 guint32 curr_offset;
1336 add_string = add_string;
1337 curr_offset = offset;
1339 oct = tvb_get_guint8(tvb, curr_offset);
1346 other_decode_bitfield_value(a_bigbuf, oct, mask, 8);
1347 proto_tree_add_text(tree,
1348 tvb, curr_offset, 1,
1349 "%s : GSM A5/%u: %spermitted",
1352 (mask & oct) ? "" : "not ");
1357 while (mask != 0x01);
1359 other_decode_bitfield_value(a_bigbuf, oct, mask, 8);
1360 proto_tree_add_text(tree,
1361 tvb, curr_offset, 1,
1362 "%s : No encryption: %spermitted",
1364 (mask & oct) ? "" : "not ");
1368 NO_MORE_DATA_CHECK(len);
1370 proto_tree_add_text(tree,
1371 tvb, curr_offset, len - (curr_offset - offset),
1374 curr_offset += len - (curr_offset - offset);
1376 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
1378 return(curr_offset - offset);
1385 be_chan_type(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
1390 guint32 curr_offset;
1393 curr_offset = offset;
1395 oct = tvb_get_guint8(tvb, curr_offset);
1397 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
1398 proto_tree_add_text(tree,
1399 tvb, curr_offset, 1,
1406 case 1: str = "Speech"; break;
1407 case 2: str = "Data"; break;
1408 case 3: str = "Signalling"; break;
1414 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
1415 proto_tree_add_text(tree,
1416 tvb, curr_offset, 1,
1417 "%s : Speech/Data Indicator: %s",
1421 sprintf(add_string, " - (%s)", str);
1425 NO_MORE_DATA_CHECK(len);
1427 oct = tvb_get_guint8(tvb, curr_offset);
1435 case 0x08: str = "Full rate TCH channel Bm. Prefer full rate TCH"; break;
1436 case 0x09: str = "Half rate TCH channel Lm. Prefer half rate TCH"; break;
1437 case 0x0a: str = "Full or Half rate channel, Full rate preferred changes allowed after first allocation"; break;
1438 case 0x0b: str = "Full or Half rate channel, Half rate preferred changes allowed after first allocation"; break;
1439 case 0x1a: str = "Full or Half rate channel, Full rate preferred changes between full and half rate not allowed after first allocation"; break;
1440 case 0x1b: str = "Full or Half rate channel, Half rate preferred changes between full and half rate not allowed after first allocation"; break;
1441 case 0x0f: str = "Full or Half rate channel, changes allowed after first allocation"; break;
1442 case 0x1f: str = "Full or Half rate channel, changes between full and half rate not allowed after first allocation"; break;
1448 proto_tree_add_text(tree,
1449 tvb, curr_offset, 1,
1450 "Channel Rate and Type: %s",
1455 NO_MORE_DATA_CHECK(len);
1459 oct = tvb_get_guint8(tvb, curr_offset);
1461 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
1462 proto_tree_add_text(tree,
1463 tvb, curr_offset, 1,
1464 "%s : Extension: %s",
1466 (oct & 0x80) ? "extended" : "not extended");
1470 case 0x01: str = "GSM speech full rate version 1"; break;
1471 case 0x11: str = "GSM speech full rate version 2"; break;
1472 case 0x21: str = "GSM speech full rate version 3 (AMR)"; break;
1474 case 0x05: str = "GSM speech half rate version 1"; break;
1475 case 0x15: str = "GSM speech half rate version 2"; break;
1476 case 0x25: str = "GSM speech half rate version 3 (AMR)"; break;
1483 other_decode_bitfield_value(a_bigbuf, oct, 0x7f, 8);
1484 proto_tree_add_text(tree,
1485 tvb, curr_offset, 1,
1486 "%s : Speech version identifier: %s",
1492 while ((len - (curr_offset - offset)) > 0);
1494 else if (sdi == 0x02)
1502 case 0x08: str = "Full rate TCH channel Bm"; break;
1503 case 0x09: str = "Half rate TCH channel Lm"; break;
1504 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;
1505 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;
1506 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;
1507 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;
1509 if ((oct >= 0x20) && (oct <= 0x27))
1511 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";
1513 num_chan = (oct - 0x20) + 1;
1515 else if ((oct >= 0x30) && (oct <= 0x37))
1517 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";
1519 num_chan = (oct - 0x30) + 1;
1530 proto_tree_add_text(tree,
1531 tvb, curr_offset, 1,
1532 "Channel Rate and Type: Max channels %u, %s",
1538 proto_tree_add_text(tree,
1539 tvb, curr_offset, 1,
1540 "Channel Rate and Type: %s",
1546 NO_MORE_DATA_CHECK(len);
1548 oct = tvb_get_guint8(tvb, curr_offset);
1550 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
1551 proto_tree_add_text(tree,
1552 tvb, curr_offset, 1,
1553 "%s : Extension: %s",
1555 (oct & 0x80) ? "extended" : "not extended");
1557 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
1558 proto_tree_add_text(tree,
1559 tvb, curr_offset, 1,
1560 "%s : %sTransparent service",
1562 (oct & 0x40) ? "Non-" : "");
1568 /* non-transparent */
1572 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;
1573 case 0x18: str = "14.5 kbit/s"; break;
1574 case 0x10: str = "12 kbits/s"; break;
1575 case 0x11: str = "6 kbits/s"; break;
1585 case 0x18: str = "14.4 kbit/s"; break;
1586 case 0x10: str = "9.6kbit/s"; break;
1587 case 0x11: str = "4.8kbit/s"; break;
1588 case 0x12: str = "2.4kbit/s"; break;
1589 case 0x13: str = "1.2Kbit/s"; break;
1590 case 0x14: str = "600 bit/s"; break;
1591 case 0x15: str = "1200/75 bit/s (1200 network-to-MS / 75 MS-to-network)"; break;
1602 /* non-transparent */
1606 case 0x16: str = "58 kbit/s (4x14.5 kbit/s)"; break;
1607 case 0x14: str = "48.0 / 43.5 kbit/s (4x12 kbit/s or 3x14.5 kbit/s)"; break;
1608 case 0x13: str = "36.0 / 29.0 kbit/s (3x12 kbit/s or 2x14.5 kbit/s)"; break;
1609 case 0x12: str = "24.0 / 24.0 (4x6 kbit/s or 2x12 kbit/s)"; break;
1610 case 0x11: str = "18.0 / 14.5 kbit/s (3x6 kbit/s or 1x14.5 kbit/s)"; break;
1611 case 0x10: str = "12.0 / 12.0 kbit/s (2x6 kbit/s or 1x12 kbit/s)"; break;
1621 case 0x1f: str = "64 kbit/s, bit transparent"; break;
1622 case 0x1e: str = "56 kbit/s, bit transparent"; break;
1623 case 0x1d: str = "56 kbit/s"; break;
1624 case 0x1c: str = "48 kbit/s"; break;
1625 case 0x1b: str = "38.4 kbit/s"; break;
1626 case 0x1a: str = "28.8 kbit/s"; break;
1627 case 0x19: str = "19.2 kbit/s"; break;
1628 case 0x18: str = "14.4 kbit/s"; break;
1629 case 0x10: str = "9.6 kbit/s"; break;
1637 other_decode_bitfield_value(a_bigbuf, oct, 0x3f, 8);
1638 proto_tree_add_text(tree,
1639 tvb, curr_offset, 1,
1646 NO_MORE_DATA_CHECK(len);
1648 oct = tvb_get_guint8(tvb, curr_offset);
1650 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
1651 proto_tree_add_text(tree,
1652 tvb, curr_offset, 1,
1653 "%s : Extension: %s",
1655 (oct & 0x80) ? "extended" : "not extended");
1657 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
1658 proto_tree_add_text(tree,
1659 tvb, curr_offset, 1,
1665 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
1666 proto_tree_add_text(tree,
1667 tvb, curr_offset, 1,
1668 "%s : 14.5 kbit/s (TCH/F14.4) %sallowed",
1670 (oct & 0x08) ? "" : "not ");
1672 other_decode_bitfield_value(a_bigbuf, oct, 0x04, 8);
1673 proto_tree_add_text(tree,
1674 tvb, curr_offset, 1,
1678 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
1679 proto_tree_add_text(tree,
1680 tvb, curr_offset, 1,
1681 "%s : 12.0 kbit/s (TCH F/9.6) %sallowed",
1683 (oct & 0x02) ? "" : "not ");
1685 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
1686 proto_tree_add_text(tree,
1687 tvb, curr_offset, 1,
1688 "%s : 6.0 kbit/s (TCH F/4.8) %sallowed",
1690 (oct & 0x01) ? "" : "not ");
1694 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
1695 proto_tree_add_text(tree,
1696 tvb, curr_offset, 1,
1697 "%s : 14.5/14.4 kbit/s (TCH/F14.4) %sallowed",
1699 (oct & 0x08) ? "" : "not ");
1701 other_decode_bitfield_value(a_bigbuf, oct, 0x04, 8);
1702 proto_tree_add_text(tree,
1703 tvb, curr_offset, 1,
1707 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
1708 proto_tree_add_text(tree,
1709 tvb, curr_offset, 1,
1710 "%s : 12.0/9.6 kbit/s (TCH F/9.6) %sallowed",
1712 (oct & 0x02) ? "" : "not ");
1714 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
1715 proto_tree_add_text(tree,
1716 tvb, curr_offset, 1,
1717 "%s : 6.0/4.8 kbit/s (TCH F/4.8) %sallowed",
1719 (oct & 0x01) ? "" : "not ");
1724 else if (sdi == 0x03)
1730 case 0x00: str = "SDCCH or Full rate TCH channel Bm or Half rate TCH channel Lm"; break;
1731 case 0x01: str = "SDCCH"; break;
1732 case 0x02: str = "SDCCH or Full rate TCH channel Bm"; break;
1733 case 0x03: str = "SDCCH or Half rate TCH channel Lm"; break;
1734 case 0x08: str = "Full rate TCH channel Bm"; break;
1735 case 0x09: str = "Half rate TCH channel Lm"; break;
1736 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;
1737 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;
1738 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;
1739 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;
1745 proto_tree_add_text(tree,
1746 tvb, curr_offset, 1,
1747 "Channel Rate and Type: %s",
1752 NO_MORE_DATA_CHECK(len);
1754 proto_tree_add_text(tree,
1755 tvb, curr_offset, len - (curr_offset - offset),
1758 curr_offset += len - (curr_offset - offset);
1762 /* unknown format */
1764 proto_tree_add_text(tree,
1765 tvb, curr_offset, len - (curr_offset - offset),
1768 curr_offset += len - (curr_offset - offset);
1771 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
1773 return(curr_offset - offset);
1778 * Formats everything after the discriminator, shared function
1781 be_cell_id_aux(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, guint8 disc)
1785 guint32 curr_offset;
1789 add_string[0] = '\0';
1790 curr_offset = offset;
1798 octs[0] = tvb_get_guint8(tvb, curr_offset);
1799 octs[1] = tvb_get_guint8(tvb, curr_offset + 1);
1800 octs[2] = tvb_get_guint8(tvb, curr_offset + 2);
1802 mcc_mnc_aux(octs, mcc, mnc);
1804 proto_tree_add_text(tree,
1805 tvb, curr_offset, 3,
1806 "Mobile Country Code (MCC): %s, Mobile Network Code (MNC): %s",
1819 value = tvb_get_ntohs(tvb, curr_offset);
1821 proto_tree_add_uint(tree, hf_gsm_a_cell_lac, tvb,
1822 curr_offset, 2, value);
1826 sprintf(add_string, " - LAC (0x%04x)", value);
1828 if ((disc == 0x04) || (disc == 0x05)) break;
1836 value = tvb_get_ntohs(tvb, curr_offset);
1838 proto_tree_add_uint(tree, hf_gsm_a_cell_ci, tvb,
1839 curr_offset, 2, value);
1843 if (add_string[0] == '\0')
1845 sprintf(add_string, " - CI (%u)", value);
1849 sprintf(add_string, "%s/CI (%u)", add_string, value);
1854 proto_tree_add_text(tree, tvb, curr_offset, len - 1,
1855 "Cell ID - Unknown format");
1857 curr_offset += (len - 1);
1861 return(curr_offset - offset);
1865 be_cell_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
1869 guint32 curr_offset;
1870 const gchar *str = NULL;
1873 add_string = add_string;
1874 curr_offset = offset;
1876 oct = tvb_get_guint8(tvb, curr_offset);
1878 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
1879 proto_tree_add_text(tree,
1880 tvb, curr_offset, 1,
1886 if (disc >= (gint) NUM_CELL_DISC_STR)
1892 str = cell_disc_str[disc];
1895 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
1896 proto_tree_add_text(tree,
1897 tvb, curr_offset, 1,
1898 "%s : Cell Identification Discriminator: (%u) %s",
1905 NO_MORE_DATA_CHECK(len);
1908 be_cell_id_aux(tvb, tree, curr_offset, len - (curr_offset - offset), add_string, disc);
1910 /* no length check possible */
1912 return(curr_offset - offset);
1919 be_prio(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
1922 guint32 curr_offset;
1926 curr_offset = offset;
1928 oct = tvb_get_guint8(tvb, curr_offset);
1930 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
1931 proto_tree_add_text(tree,
1932 tvb, curr_offset, 1,
1936 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
1937 proto_tree_add_text(tree,
1938 tvb, curr_offset, 1,
1939 "%s : Preemption Capability Indicator (PCI): this allocation request %s preempt an existing connection",
1941 (oct & 0x40) ? "may" : "shall not");
1943 switch ((oct & 0x3c) >> 2)
1945 case 0x00: str = "Spare"; break;
1946 case 0x0f: str = "priority not used"; break;
1948 str = "1 is highest";
1952 other_decode_bitfield_value(a_bigbuf, oct, 0x3c, 8);
1953 proto_tree_add_text(tree,
1954 tvb, curr_offset, 1,
1955 "%s : Priority Level: (%u) %s",
1960 sprintf(add_string, " - (%u)", (oct & 0x3c) >> 2);
1962 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
1963 proto_tree_add_text(tree,
1964 tvb, curr_offset, 1,
1965 "%s : Queuing Allowed Indicator (QA): queuing %sallowed",
1967 (oct & 0x02) ? "" : "not ");
1969 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
1970 proto_tree_add_text(tree,
1971 tvb, curr_offset, 1,
1972 "%s : Preemption Vulnerability Indicator (PVI): this connection %s be preempted by another allocation request",
1974 (oct & 0x01) ? "might" : "shall not");
1978 /* no length check possible */
1980 return(curr_offset - offset);
1987 be_l3_info(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
1989 guint32 curr_offset;
1992 add_string = add_string;
1993 curr_offset = offset;
1995 proto_tree_add_text(tree, tvb, curr_offset, len,
1996 "Layer 3 Information value");
1999 * dissect the embedded DTAP message
2001 l3_tvb = tvb_new_subset(tvb, curr_offset, len, len);
2003 call_dissector(dtap_handle, l3_tvb, g_pinfo, g_tree);
2007 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
2009 return(curr_offset - offset);
2016 be_dlci(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
2019 guint32 curr_offset;
2020 proto_item *item = NULL;
2021 proto_tree *subtree = NULL;
2024 add_string = add_string;
2025 curr_offset = offset;
2028 proto_tree_add_text(tree, tvb, curr_offset, 1,
2029 "Data Link Connection Identifier");
2031 subtree = proto_item_add_subtree(item, ett_dlci);
2033 oct = tvb_get_guint8(tvb, curr_offset);
2035 proto_tree_add_uint(subtree, hf_gsm_a_dlci_cc, tvb, curr_offset, 1, oct);
2036 proto_tree_add_uint(subtree, hf_gsm_a_dlci_spare, tvb, curr_offset, 1, oct);
2037 proto_tree_add_uint(subtree, hf_gsm_a_dlci_sapi, tvb, curr_offset, 1, oct);
2041 /* no length check possible */
2043 return(curr_offset - offset);
2050 be_down_dtx_flag(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
2053 guint32 curr_offset;
2056 add_string = add_string;
2057 curr_offset = offset;
2059 oct = tvb_get_guint8(tvb, curr_offset);
2061 other_decode_bitfield_value(a_bigbuf, oct, 0xfe, 8);
2062 proto_tree_add_text(tree,
2063 tvb, curr_offset, 1,
2067 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
2068 proto_tree_add_text(tree,
2069 tvb, curr_offset, 1,
2070 "%s : BSS is %s to activate DTX in the downlink direction",
2072 (oct & 0x01) ? "forbidden" : "allowed");
2076 /* no length check possible */
2078 return(curr_offset - offset);
2085 be_cell_id_list(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
2091 guint32 curr_offset;
2092 proto_item *item = NULL;
2093 proto_tree *subtree = NULL;
2094 const gchar *str = NULL;
2096 curr_offset = offset;
2098 oct = tvb_get_guint8(tvb, curr_offset);
2100 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
2101 proto_tree_add_text(tree,
2102 tvb, curr_offset, 1,
2108 if (disc >= (gint) NUM_CELL_DISC_STR)
2114 str = cell_disc_str[disc];
2117 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
2118 proto_tree_add_text(tree,
2119 tvb, curr_offset, 1,
2120 "%s : Cell Identification Discriminator: (%u) %s",
2127 NO_MORE_DATA_CHECK(len);
2133 proto_tree_add_text(tree,
2134 tvb, curr_offset, -1,
2138 subtree = proto_item_add_subtree(item, ett_cell_list);
2140 add_string[0] = '\0';
2142 be_cell_id_aux(tvb, subtree, curr_offset, len - (curr_offset - offset), add_string, disc);
2144 if (add_string[0] != '\0')
2146 proto_item_append_text(item, add_string);
2149 proto_item_set_len(item, consumed);
2151 curr_offset += consumed;
2155 while ((len - (curr_offset - offset)) > 0);
2157 sprintf(add_string, " - %u cell%s",
2158 num_cells, plurality(num_cells, "", "s"));
2160 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
2162 return(curr_offset - offset);
2169 be_chosen_chan(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
2172 guint32 curr_offset;
2176 add_string = add_string;
2177 curr_offset = offset;
2179 oct = tvb_get_guint8(tvb, curr_offset);
2181 switch ((oct & 0xf0) >> 4)
2183 case 0: str = "No channel mode indication"; break;
2184 case 9: str = "Speech (full rate or half rate)"; break;
2185 case 14: str = "Data, 14.5 kbit/s radio interface rate"; break;
2186 case 11: str = "Data, 12.0 kbit/s radio interface rate"; break;
2187 case 12: str = "Data, 6.0 kbit/s radio interface rate"; break;
2188 case 13: str = "Data, 3.6 kbit/s radio interface rate"; break;
2189 case 8: str = "Signalling only"; break;
2195 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
2196 proto_tree_add_text(tree,
2197 tvb, curr_offset, 1,
2198 "%s : Channel mode: %s",
2204 case 0: str = "None"; break;
2205 case 1: str = "SDCCH"; break;
2206 case 8: str = "1 Full rate TCH"; break;
2207 case 9: str = "1 Half rate TCH"; break;
2208 case 10: str = "2 Full Rate TCHs"; break;
2209 case 11: str = "3 Full Rate TCHs"; break;
2210 case 12: str = "4 Full Rate TCHs"; break;
2211 case 13: str = "5 Full Rate TCHs"; break;
2212 case 14: str = "6 Full Rate TCHs"; break;
2213 case 15: str = "7 Full Rate TCHs"; break;
2214 case 4: str = "8 Full Rate TCHs"; break;
2220 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
2221 proto_tree_add_text(tree,
2222 tvb, curr_offset, 1,
2229 /* no length check possible */
2231 return(curr_offset - offset);
2238 be_ciph_resp_mode(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
2241 guint32 curr_offset;
2244 add_string = add_string;
2245 curr_offset = offset;
2247 oct = tvb_get_guint8(tvb, curr_offset);
2249 other_decode_bitfield_value(a_bigbuf, oct, 0xfe, 8);
2250 proto_tree_add_text(tree,
2251 tvb, curr_offset, 1,
2255 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
2256 proto_tree_add_text(tree,
2257 tvb, curr_offset, 1,
2258 "%s : IMEISV must %sbe included by the mobile station",
2260 (oct & 0x01) ? "" : "not ");
2264 /* no length check possible */
2266 return(curr_offset - offset);
2273 be_l3_msg(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
2275 guint32 curr_offset;
2278 add_string = add_string;
2279 curr_offset = offset;
2281 proto_tree_add_text(tree, tvb, curr_offset, len,
2282 "Layer 3 Message Contents");
2285 * dissect the embedded DTAP message
2287 l3_tvb = tvb_new_subset(tvb, curr_offset, len, len);
2289 call_dissector(dtap_handle, l3_tvb, g_pinfo, g_tree);
2293 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
2295 return(curr_offset - offset);
2302 be_for_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
2305 guint32 curr_offset;
2309 add_string = add_string;
2310 curr_offset = offset;
2312 oct = tvb_get_guint8(tvb, curr_offset);
2314 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
2315 proto_tree_add_text(tree,
2316 tvb, curr_offset, 1,
2322 case 1: str = "forward to subsequent BSS, no trace at MSC"; break;
2323 case 2: str = "forward to subsequent BSS, and trace at MSC"; break;
2329 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
2330 proto_tree_add_text(tree,
2331 tvb, curr_offset, 1,
2338 /* no length check possible */
2340 return(curr_offset - offset);
2347 be_chosen_enc_alg(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
2350 guint32 curr_offset;
2354 curr_offset = offset;
2356 oct = tvb_get_guint8(tvb, curr_offset);
2360 case 0x01: str = "No encryption used"; break;
2361 case 0x02: str = "GSM A5/1"; break;
2362 case 0x03: str = "GSM A5/2"; break;
2363 case 0x04: str = "GSM A5/3"; break;
2364 case 0x05: str = "GSM A5/4"; break;
2365 case 0x06: str = "GSM A5/5"; break;
2366 case 0x07: str = "GSM A5/6"; break;
2367 case 0x08: str = "GSM A5/7"; break;
2373 proto_tree_add_text(tree,
2374 tvb, curr_offset, 1,
2375 "Algorithm Identifier: %s",
2380 sprintf(add_string, " - %s", str);
2382 /* no length check possible */
2384 return(curr_offset - offset);
2391 be_cct_pool(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
2394 guint32 curr_offset;
2398 curr_offset = offset;
2400 oct = tvb_get_guint8(tvb, curr_offset);
2406 else if ((oct >= 0x80) && (oct <= 0x8f))
2408 str = ", for national/local use";
2412 str = ", reserved for future international use";
2415 proto_tree_add_text(tree,
2416 tvb, curr_offset, 1,
2417 "Circuit pool number: %u%s",
2423 sprintf(add_string, " - (%u)", oct);
2425 /* no length check possible */
2427 return(curr_offset - offset);
2434 be_curr_chan_1(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
2437 guint32 curr_offset;
2441 add_string = add_string;
2442 curr_offset = offset;
2444 oct = tvb_get_guint8(tvb, curr_offset);
2446 switch ((oct & 0xf0) >> 4)
2448 case 0x00: str = "Signalling only"; break;
2449 case 0x01: str = "Speech (full rate or half rate)"; break;
2450 case 0x06: str = "Data, 14.5 kbit/s radio interface rate"; break;
2451 case 0x03: str = "Data, 12.0 kbit/s radio interface rate"; break;
2452 case 0x04: str = "Data, 6.0 kbit/s radio interface rate"; break;
2453 case 0x05: str = "Data, 3.6 kbit/s radio interface rate"; break;
2459 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
2460 proto_tree_add_text(tree,
2461 tvb, curr_offset, 1,
2462 "%s : Channel Mode: %s",
2468 case 0x01: str = "SDCCH"; break;
2469 case 0x08: str = "1 Full rate TCH"; break;
2470 case 0x09: str = "1 Half rate TCH"; break;
2471 case 0x0a: str = "2 Full Rate TCHs"; break;
2472 case 0x0b: str = "3 Full Rate TCHs"; break;
2473 case 0x0c: str = "4 Full Rate TCHs"; break;
2474 case 0x0d: str = "5 Full Rate TCHs"; break;
2475 case 0x0e: str = "6 Full Rate TCHs"; break;
2476 case 0x0f: str = "7 Full Rate TCHs"; break;
2477 case 0x04: str = "8 Full Rate TCHs"; break;
2483 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
2484 proto_tree_add_text(tree,
2485 tvb, curr_offset, 1,
2486 "%s : Channel: (%u) %s",
2493 /* no length check possible */
2495 return(curr_offset - offset);
2502 be_que_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
2505 guint32 curr_offset;
2508 add_string = add_string;
2509 curr_offset = offset;
2511 oct = tvb_get_guint8(tvb, curr_offset);
2513 other_decode_bitfield_value(a_bigbuf, oct, 0xfc, 8);
2514 proto_tree_add_text(tree,
2515 tvb, curr_offset, 1,
2519 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
2520 proto_tree_add_text(tree,
2521 tvb, curr_offset, 1,
2522 "%s : qri: it is recommended %sto allow queuing",
2524 (oct & 0x02) ? "" : "not ");
2526 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
2527 proto_tree_add_text(tree,
2528 tvb, curr_offset, 1,
2534 /* no length check possible */
2536 return(curr_offset - offset);
2543 be_speech_ver(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
2546 guint32 curr_offset;
2548 gchar *short_str = NULL;
2551 curr_offset = offset;
2553 oct = tvb_get_guint8(tvb, curr_offset);
2555 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
2556 proto_tree_add_text(tree,
2557 tvb, curr_offset, 1,
2563 case 0x01: str = "GSM speech full rate version 1"; short_str = "FR1"; break;
2564 case 0x11: str = "GSM speech full rate version 2"; short_str = "FR2"; break;
2565 case 0x21: str = "GSM speech full rate version 3 (AMR)"; short_str = "FR3 (AMR)"; break;
2567 case 0x05: str = "GSM speech half rate version 1"; short_str = "HR1"; break;
2568 case 0x15: str = "GSM speech half rate version 2"; short_str = "HR2"; break;
2569 case 0x25: str = "GSM speech half rate version 3 (AMR)"; short_str = "HR3 (AMR)"; break;
2577 other_decode_bitfield_value(a_bigbuf, oct, 0x7f, 8);
2578 proto_tree_add_text(tree,
2579 tvb, curr_offset, 1,
2580 "%s : Speech version identifier: %s",
2586 sprintf(add_string, " - (%s)", short_str);
2588 /* no length check possible */
2590 return(curr_offset - offset);
2597 be_apdu(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
2599 guint32 curr_offset;
2601 add_string = add_string;
2602 curr_offset = offset;
2604 proto_tree_add_text(tree, tvb, curr_offset, len,
2608 * dissect the embedded APDU message
2609 * if someone writes a TS 09.31 dissector
2614 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
2616 return(curr_offset - offset);
2621 /* Common Information Elements 10.5.1 */
2622 DE_CELL_ID, /* Cell Identity */
2623 DE_CIPH_KEY_SEQ_NUM, /* Ciphering Key Sequence Number */
2624 DE_LAI, /* Location Area Identification */
2625 DE_MID, /* Mobile Identity */
2626 DE_MS_CM_1, /* Mobile Station Classmark 1 */
2627 DE_MS_CM_2, /* Mobile Station Classmark 2 */
2628 DE_MS_CM_3, /* Mobile Station Classmark 3 */
2629 DE_D_GB_CALL_REF, /* Descriptive group or broadcast call reference */
2630 DE_G_CIPH_KEY_NUM, /* Group Cipher Key Number */
2631 DE_PD_SAPI, /* PD and SAPI $(CCBS)$ */
2632 DE_PRIO, /* Priority Level */
2633 DE_PLMN_LIST, /* PLMN List */
2634 /* Radio Resource Management Information Elements 10.5.2, most are from 10.5.1 */
2635 DE_RR_CAUSE, /* RR Cause */
2636 /* Mobility Management Information Elements 10.5.3 */
2637 DE_AUTH_PARAM_RAND, /* Authentication Parameter RAND */
2638 DE_AUTH_PARAM_AUTN, /* Authentication Parameter AUTN (UMTS authentication challenge only) */
2639 DE_AUTH_RESP_PARAM, /* Authentication Response Parameter */
2640 DE_AUTH_RESP_PARAM_EXT, /* Authentication Response Parameter (extension) (UMTS authentication challenge only) */
2641 DE_AUTH_FAIL_PARAM, /* Authentication Failure Parameter (UMTS authentication challenge only) */
2642 DE_CM_SRVC_TYPE, /* CM Service Type */
2643 DE_ID_TYPE, /* Identity Type */
2644 DE_LOC_UPD_TYPE, /* Location Updating Type */
2645 DE_NETWORK_NAME, /* Network Name */
2646 DE_REJ_CAUSE, /* Reject Cause */
2647 DE_FOP, /* Follow-on Proceed */
2648 DE_TIME_ZONE, /* Time Zone */
2649 DE_TIME_ZONE_TIME, /* Time Zone and Time */
2650 DE_CTS_PERM, /* CTS Permission */
2651 DE_LSA_ID, /* LSA Identifier */
2652 DE_DAY_SAVING_TIME, /* Daylight Saving Time */
2653 /* Call Control Information Elements 10.5.4 */
2654 DE_AUX_STATES, /* Auxiliary States */
2655 DE_BEARER_CAP, /* Bearer Capability */
2656 DE_CC_CAP, /* Call Control Capabilities */
2657 DE_CALL_STATE, /* Call State */
2658 DE_CLD_PARTY_BCD_NUM, /* Called Party BCD Number */
2659 DE_CLD_PARTY_SUB_ADDR, /* Called Party Subaddress */
2660 DE_CLG_PARTY_BCD_NUM, /* Calling Party BCD Number */
2661 DE_CLG_PARTY_SUB_ADDR, /* Calling Party Subaddress */
2662 DE_CAUSE, /* Cause */
2663 DE_CLIR_SUP, /* CLIR Suppression */
2664 DE_CLIR_INV, /* CLIR Invocation */
2665 DE_CONGESTION, /* Congestion Level */
2666 DE_CONN_NUM, /* Connected Number */
2667 DE_CONN_SUB_ADDR, /* Connected Subaddress */
2668 DE_FACILITY, /* Facility */
2669 DE_HLC, /* High Layer Compatibility */
2670 DE_KEYPAD_FACILITY, /* Keypad Facility */
2671 DE_LLC, /* Low Layer Compatibility */
2672 DE_MORE_DATA, /* More Data */
2673 DE_NOT_IND, /* Notification Indicator */
2674 DE_PROG_IND, /* Progress Indicator */
2675 DE_RECALL_TYPE, /* Recall type $(CCBS)$ */
2676 DE_RED_PARTY_BCD_NUM, /* Redirecting Party BCD Number */
2677 DE_RED_PARTY_SUB_ADDR, /* Redirecting Party Subaddress */
2678 DE_REPEAT_IND, /* Repeat Indicator */
2679 DE_REV_CALL_SETUP_DIR, /* Reverse Call Setup Direction */
2680 DE_SETUP_CONTAINER, /* SETUP Container $(CCBS)$ */
2681 DE_SIGNAL, /* Signal */
2682 DE_SS_VER_IND, /* SS Version Indicator */
2683 DE_USER_USER, /* User-user */
2684 DE_ALERT_PATTERN, /* Alerting Pattern $(NIA)$ */
2685 DE_ALLOWED_ACTIONS, /* Allowed Actions $(CCBS)$ */
2686 DE_SI, /* Stream Identifier */
2687 DE_NET_CC_CAP, /* Network Call Control Capabilities */
2688 DE_CAUSE_NO_CLI, /* Cause of No CLI */
2689 DE_IMM_MOD_IND, /* Immediate Modification Indicator */
2690 DE_SUP_CODEC_LIST, /* Supported Codec List */
2691 DE_SRVC_CAT, /* Service Category */
2692 /* GPRS Mobility Management Information Elements 10.5.5 */
2693 DE_ATTACH_RES, /* Attach Result */
2694 DE_ATTACH_TYPE, /* Attach Type */
2695 DE_TMSI_STAT, /* TMSI Status */
2696 DE_DETACH_TYPE, /* Detach Type */
2697 DE_DRX_PARAM, /* DRX Parameter */
2698 DE_FORCE_TO_STAND, /* Force to Standby */
2699 DE_P_TMSI_SIG, /* P-TMSI Signature */
2700 DE_P_TMSI_SIG_2, /* P-TMSI Signature 2 */
2701 DE_ID_TYPE_2, /* Identity Type 2 */
2702 DE_IMEISV_REQ, /* IMEISV Request */
2703 DE_REC_N_PDU_NUM_LIST, /* Receive N-PDU Numbers List */
2704 DE_MS_NET_CAP, /* MS Network Capability */
2705 DE_MS_RAD_ACC_CAP, /* MS Radio Access Capability */
2706 DE_GMM_CAUSE, /* GMM Cause */
2707 DE_RAI, /* Routing Area Identification */
2708 DE_UPD_RES, /* Update Result */
2709 DE_AC_REF_NUM, /* A&C Reference Number */
2710 DE_SRVC_TYPE, /* Service Type */
2711 DE_CELL_NOT, /* Cell Notification */
2712 DE_NET_FEAT_SUP, /* Network Feature Support */
2713 /* Short Message Service Information Elements [5] 8.1.4 */
2714 DE_CP_USER_DATA, /* CP-User Data */
2715 DE_CP_CAUSE, /* CP-Cause */
2716 /* Short Message Service Information Elements [5] 8.2 */
2717 DE_RP_MESSAGE_REF, /* RP-Message Reference */
2718 DE_RP_ORIG_ADDR, /* RP-Origination Address */
2719 DE_RP_DEST_ADDR, /* RP-Destination Address */
2720 DE_RP_USER_DATA, /* RP-User Data */
2721 DE_RP_CAUSE, /* RP-Cause */
2722 /* Session Management Information Elements 10.5.6 */
2723 DE_ACC_POINT_NAME, /* Access Point Name */
2724 DE_NET_SAPI, /* Network Service Access Point Identifier */
2725 DE_PRO_CONF_OPT, /* Protocol Configuration Options */
2726 DE_PD_PRO_ADDR, /* Packet Data Protocol Address */
2727 DE_QOS, /* Quality Of Service */
2728 DE_SM_CAUSE, /* SM Cause */
2729 DE_LINKED_TI, /* Linked TI */
2730 DE_LLC_SAPI, /* LLC Service Access Point Identifier */
2731 DE_TEAR_DOWN_IND, /* Tear Down Indicator */
2732 DE_PACKET_FLOW_ID, /* Packet Flow Identifier */
2733 DE_TRAFFIC_FLOW_TEMPLATE, /* Traffic Flow Template */
2734 /* GPRS Common Information Elements 10.5.7 */
2735 DE_PDP_CONTEXT_STAT, /* PDP Context Status */
2736 DE_RAD_PRIO, /* Radio Priority */
2737 DE_GPRS_TIMER, /* GPRS Timer */
2738 DE_GPRS_TIMER_2, /* GPRS Timer 2 */
2743 #define NUM_GSM_DTAP_ELEM (sizeof(gsm_dtap_elem_strings)/sizeof(value_string))
2744 static gint ett_gsm_dtap_elem[NUM_GSM_DTAP_ELEM];
2750 de_cell_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
2752 guint32 curr_offset;
2754 curr_offset = offset;
2757 be_cell_id_aux(tvb, tree, offset, len, add_string, 0x02);
2759 /* no length check possible */
2761 return(curr_offset - offset);
2768 de_lai(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
2772 guint32 curr_offset;
2773 proto_tree *subtree;
2779 add_string = add_string;
2780 curr_offset = offset;
2782 octs[0] = tvb_get_guint8(tvb, curr_offset);
2783 octs[1] = tvb_get_guint8(tvb, curr_offset + 1);
2784 octs[2] = tvb_get_guint8(tvb, curr_offset + 2);
2786 mcc_mnc_aux(octs, mcc, mnc);
2789 proto_tree_add_text(tree,
2790 tvb, curr_offset, 5,
2791 gsm_dtap_elem_strings[DE_LAI].strptr);
2793 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_LAI]);
2795 proto_tree_add_text(subtree,
2796 tvb, curr_offset, 3,
2797 "Mobile Country Code (MCC): %s, Mobile Network Code (MNC): %s",
2803 value = tvb_get_ntohs(tvb, curr_offset);
2805 proto_tree_add_text(subtree,
2806 tvb, curr_offset, 2,
2807 "Location Area Code (LAC): 0x%04x (%u)",
2811 proto_item_append_text(item, " - LAC (0x%04x)", value);
2815 /* no length check possible */
2817 return(curr_offset - offset);
2824 de_mid(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
2827 guint32 curr_offset;
2832 curr_offset = offset;
2835 oct = tvb_get_guint8(tvb, curr_offset);
2839 case 0: /* No Identity */
2840 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
2841 proto_tree_add_text(tree,
2842 tvb, curr_offset, 1,
2846 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
2847 proto_tree_add_text(tree,
2848 tvb, curr_offset, 1,
2849 "%s : Odd/Even Indicator: %s",
2851 (oct & 0x08) ? "ODD" : "EVEN");
2853 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
2854 proto_tree_add_text(tree,
2855 tvb, curr_offset, 1,
2856 "%s : Type of Identity: No Identity Code",
2859 strcpy(add_string, " - No Identity Code");
2865 proto_tree_add_text(tree, tvb, curr_offset, len - 1,
2866 "Format not supported");
2869 curr_offset += len - 1;
2872 case 3: /* IMEISV */
2878 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
2879 proto_tree_add_text(tree,
2880 tvb, curr_offset, 1,
2881 "%s : Identity Digit 1: %c",
2883 Dgt_msid.out[(oct & 0xf0) >> 4]);
2887 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
2888 proto_tree_add_text(tree,
2889 tvb, curr_offset, 1,
2890 "%s : Odd/Even Indicator: %s",
2892 odd ? "ODD" : "EVEN");
2894 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
2895 proto_tree_add_text(tree,
2896 tvb, curr_offset, 1,
2897 "%s : Type of Identity: %s",
2899 ((oct & 0x07) == 3) ? "IMEISV" : "IMSI");
2901 a_bigbuf[0] = Dgt_msid.out[(oct & 0xf0) >> 4];
2904 poctets = tvb_get_string(tvb, curr_offset, len - (curr_offset - offset));
2906 my_dgt_tbcd_unpack(&a_bigbuf[1], poctets, len - (curr_offset - offset),
2910 proto_tree_add_string_format(tree,
2911 ((oct & 0x07) == 3) ? hf_gsm_a_imeisv : hf_gsm_a_imsi,
2912 tvb, curr_offset, len - (curr_offset - offset),
2917 sprintf(add_string, " - %s (%s)",
2918 ((oct & 0x07) == 3) ? "IMEISV" : "IMSI",
2921 curr_offset += len - (curr_offset - offset);
2925 oct = tvb_get_guint8(tvb, curr_offset - 1);
2927 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
2928 proto_tree_add_text(tree,
2929 tvb, curr_offset - 1, 1,
2936 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
2937 proto_tree_add_text(tree,
2938 tvb, curr_offset, 1,
2939 "%s : Identity Digit 1: %c",
2941 Dgt_msid.out[(oct & 0xf0) >> 4]);
2943 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
2944 proto_tree_add_text(tree,
2945 tvb, curr_offset, 1,
2946 "%s : Odd/Even Indicator: %s",
2948 (oct & 0x08) ? "ODD" : "EVEN");
2950 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
2951 proto_tree_add_text(tree,
2952 tvb, curr_offset, 1,
2953 "%s : Type of Identity: IMEI",
2956 a_bigbuf[0] = Dgt_msid.out[(oct & 0xf0) >> 4];
2959 poctets = tvb_get_string(tvb, curr_offset, len - (curr_offset - offset));
2961 my_dgt_tbcd_unpack(&a_bigbuf[1], poctets, len - (curr_offset - offset),
2965 proto_tree_add_string_format(tree,
2967 tvb, curr_offset, len - (curr_offset - offset),
2972 sprintf(add_string, " - IMEI (%s)", a_bigbuf);
2974 curr_offset += len - (curr_offset - offset);
2977 case 4: /* TMSI/P-TMSI */
2978 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
2979 proto_tree_add_text(tree,
2980 tvb, curr_offset, 1,
2984 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
2985 proto_tree_add_text(tree,
2986 tvb, curr_offset, 1,
2987 "%s : Odd/Even Indicator: %s",
2989 (oct & 0x08) ? "ODD" : "EVEN");
2991 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
2992 proto_tree_add_text(tree,
2993 tvb, curr_offset, 1,
2994 "%s : Type of Identity: TMSI/P-TMSI",
2999 value = tvb_get_ntohl(tvb, curr_offset);
3001 proto_tree_add_uint(tree, hf_gsm_a_tmsi,
3002 tvb, curr_offset, 4,
3005 sprintf(add_string, " - TMSI/P-TMSI (0x%04x)", value);
3010 default: /* Reserved */
3011 proto_tree_add_text(tree, tvb, curr_offset, len,
3014 strcpy(add_string, " - Format Unknown");
3020 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3022 return(curr_offset - offset);
3029 de_ms_cm_1(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
3032 guint32 curr_offset;
3033 proto_tree *subtree;
3038 add_string = add_string;
3039 curr_offset = offset;
3041 oct = tvb_get_guint8(tvb, curr_offset);
3044 proto_tree_add_text(tree,
3045 tvb, curr_offset, 1,
3046 gsm_dtap_elem_strings[DE_MS_CM_1].strptr);
3048 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_MS_CM_1]);
3050 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
3051 proto_tree_add_text(subtree,
3052 tvb, curr_offset, 1,
3056 switch ((oct & 0x60) >> 5)
3058 case 0: str = "Reserved for GSM phase 1"; break;
3059 case 1: str = "Used by GSM phase 2 mobile stations"; break;
3060 case 2: str = "Used by mobile stations supporting R99 or later versions of the protocol"; break;
3062 str = "Reserved for future use";
3066 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
3067 proto_tree_add_text(subtree,
3068 tvb, curr_offset, 1,
3069 "%s : Revision Level: %s",
3073 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
3074 proto_tree_add_text(subtree,
3075 tvb, curr_offset, 1,
3076 "%s : ES IND: Controlled Early Classmark Sending is %simplemented",
3078 (oct & 0x10) ? "" : "not ");
3080 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
3081 proto_tree_add_text(subtree,
3082 tvb, curr_offset, 1,
3083 "%s : A5/1: encryption algorithm A5/1 %savailable",
3085 (oct & 0x08) ? "not " : "");
3089 case 0: str = "Class 1"; break;
3090 case 1: str = "Class 2"; break;
3091 case 2: str = "Class 3"; break;
3092 case 3: str = "Class 4"; break;
3093 case 4: str = "Class 5"; break;
3099 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
3100 proto_tree_add_text(subtree,
3101 tvb, curr_offset, 1,
3102 "%s : RF power capability: %s",
3108 /* no length check possible */
3110 return(curr_offset - offset);
3117 de_ms_cm_2(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
3120 guint32 curr_offset;
3123 add_string = add_string;
3124 curr_offset = offset;
3126 oct = tvb_get_guint8(tvb, curr_offset);
3128 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
3129 proto_tree_add_text(tree,
3130 tvb, curr_offset, 1,
3134 switch ((oct & 0x60) >> 5)
3136 case 0: str = "Reserved for GSM phase 1"; break;
3137 case 1: str = "Used by GSM phase 2 mobile stations"; break;
3138 case 2: str = "Used by mobile stations supporting R99 or later versions of the protocol"; break;
3140 str = "Reserved for future use";
3144 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
3145 proto_tree_add_text(tree,
3146 tvb, curr_offset, 1,
3147 "%s : Revision Level: %s",
3151 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
3152 proto_tree_add_text(tree,
3153 tvb, curr_offset, 1,
3154 "%s : ES IND: Controlled Early Classmark Sending is %simplemented",
3156 (oct & 0x10) ? "" : "not ");
3158 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
3159 proto_tree_add_text(tree,
3160 tvb, curr_offset, 1,
3161 "%s : A5/1: encryption algorithm A5/1 %savailable",
3163 (oct & 0x08) ? "not " : "");
3167 case 0: str = "Class 1"; break;
3168 case 1: str = "Class 2"; break;
3169 case 2: str = "Class 3"; break;
3170 case 3: str = "Class 4"; break;
3171 case 4: str = "Class 5"; break;
3177 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
3178 proto_tree_add_text(tree,
3179 tvb, curr_offset, 1,
3180 "%s : RF power capability: %s",
3186 NO_MORE_DATA_CHECK(len);
3188 oct = tvb_get_guint8(tvb, curr_offset);
3190 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
3191 proto_tree_add_text(tree,
3192 tvb, curr_offset, 1,
3196 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
3197 proto_tree_add_text(tree,
3198 tvb, curr_offset, 1,
3199 "%s : PS capability (pseudo-synchronization capability): %spresent",
3201 (oct & 0x40) ? "" : "not ");
3203 switch ((oct & 0x30) >> 4)
3205 case 0: str = "Default value for phase 1"; break;
3206 case 1: str = "Capability of handling of ellipsis notation and phase 2 error handling"; break;
3212 other_decode_bitfield_value(a_bigbuf, oct, 0x30, 8);
3213 proto_tree_add_text(tree,
3214 tvb, curr_offset, 1,
3215 "%s : SS Screening Indicator: %s",
3219 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
3220 proto_tree_add_text(tree,
3221 tvb, curr_offset, 1,
3222 "%s : SM capability (MT SMS pt to pt capability): MS %s MT SMS",
3224 (oct & 0x08) ? "supports" : "does not support");
3226 other_decode_bitfield_value(a_bigbuf, oct, 0x04, 8);
3227 proto_tree_add_text(tree,
3228 tvb, curr_offset, 1,
3229 "%s : VBS notification reception: %s",
3231 (oct & 0x04) ? "VBS capability and notifications wanted" :
3232 "no VBS capability or no notifications wanted");
3234 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
3235 proto_tree_add_text(tree,
3236 tvb, curr_offset, 1,
3237 "%s : VGCS notification reception: %s",
3239 (oct & 0x02) ? "VGCS capability and notifications wanted" :
3240 "no VGCS capability or no notifications wanted");
3242 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
3243 proto_tree_add_text(tree,
3244 tvb, curr_offset, 1,
3245 "%s : FC Frequency Capability",
3250 NO_MORE_DATA_CHECK(len);
3252 oct = tvb_get_guint8(tvb, curr_offset);
3254 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
3255 proto_tree_add_text(tree,
3256 tvb, curr_offset, 1,
3260 "The MS supports options that are indicated in classmark 3 IE" :
3261 "The MS does not support any options that are indicated in CM3");
3263 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
3264 proto_tree_add_text(tree,
3265 tvb, curr_offset, 1,
3269 other_decode_bitfield_value(a_bigbuf, oct, 0x20, 8);
3270 proto_tree_add_text(tree,
3271 tvb, curr_offset, 1,
3272 "%s : LCS VA capability: LCS value added location request notification capability %ssupported",
3274 (oct & 0x20) ? "" : "not ");
3276 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
3277 proto_tree_add_text(tree,
3278 tvb, curr_offset, 1,
3279 "%s : UCS2 treatment: %s",
3282 "the ME has no preference between the use of the default alphabet and the use of UCS2" :
3283 "the ME has a preference for the default alphabet (defined in 3GPP TS 03.38) over UCS2");
3285 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
3286 proto_tree_add_text(tree,
3287 tvb, curr_offset, 1,
3288 "%s : SoLSA: the ME %s SoLSA",
3290 (oct & 0x08) ? "supports" : "does not support");
3292 other_decode_bitfield_value(a_bigbuf, oct, 0x04, 8);
3293 proto_tree_add_text(tree,
3294 tvb, curr_offset, 1,
3295 "%s : CMSP (CM Service Prompt): %s",
3298 "'Network initiated MO CM connection request' supported for at least one CM protocol" :
3299 "'Network initiated MO CM connection request' not supported");
3301 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
3302 proto_tree_add_text(tree,
3303 tvb, curr_offset, 1,
3304 "%s : A5/3: encryption algorithm A5/3 %savailable",
3306 (oct & 0x02) ? "" : "not ");
3308 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
3309 proto_tree_add_text(tree,
3310 tvb, curr_offset, 1,
3311 "%s : A5/2: encryption algorithm A5/2 %savailable",
3313 (oct & 0x01) ? "" : "not ");
3317 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3319 return(curr_offset - offset);
3326 de_d_gb_call_ref(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
3330 guint32 curr_offset;
3334 add_string = add_string;
3335 curr_offset = offset;
3337 value = tvb_get_ntohl(tvb, curr_offset);
3339 other_decode_bitfield_value(a_bigbuf, value, 0xffffffe0, 32);
3340 proto_tree_add_text(tree, tvb, curr_offset, 4,
3341 "%s : Group or Broadcast call reference: %u (0x%04x)",
3343 (value & 0xffffffe0) >> 5,
3344 (value & 0xffffffe0) >> 5);
3346 other_decode_bitfield_value(a_bigbuf, value, 0x00000010, 32);
3347 proto_tree_add_text(tree, tvb, curr_offset, 4,
3348 "%s : SF Service Flag: %s",
3350 (value & 0x00000010) ?
3351 "VGCS (Group call reference)" : "VBS (Broadcast call reference)");
3353 other_decode_bitfield_value(a_bigbuf, value, 0x00000008, 32);
3354 proto_tree_add_text(tree, tvb, curr_offset, 4,
3355 "%s : AF Acknowledgement Flag: acknowledgment is %srequired",
3357 (value & 0x00000008) ? "" : "not ");
3359 switch (value & 0x00000007)
3361 case 1: str = "call priority level 4"; break;
3362 case 2: str = "call priority level 3"; break;
3363 case 3: str = "call priority level 2"; break;
3364 case 4: str = "call priority level 1"; break;
3365 case 5: str = "call priority level 0"; break;
3366 case 6: str = "call priority level B"; break;
3367 case 7: str = "call priority level A"; break;
3369 str = "no priority applied";
3373 other_decode_bitfield_value(a_bigbuf, value, 0x00000007, 32);
3374 proto_tree_add_text(tree, tvb, curr_offset, 4,
3375 "%s : Call Priority: %s",
3381 oct = tvb_get_guint8(tvb, curr_offset);
3383 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
3384 proto_tree_add_text(tree, tvb, curr_offset, 1,
3385 "%s : Ciphering Information",
3388 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
3389 proto_tree_add_text(tree, tvb, curr_offset, 1,
3395 /* no length check possible */
3397 return(curr_offset - offset);
3404 de_pd_sapi(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
3407 guint32 curr_offset;
3408 proto_tree *subtree;
3413 add_string = add_string;
3414 curr_offset = offset;
3416 oct = tvb_get_guint8(tvb, curr_offset);
3419 proto_tree_add_text(tree,
3420 tvb, curr_offset, 1,
3421 gsm_dtap_elem_strings[DE_PD_SAPI].strptr);
3423 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_PD_SAPI]);
3425 other_decode_bitfield_value(a_bigbuf, oct, 0xc0, 8);
3426 proto_tree_add_text(subtree, tvb, curr_offset, 1,
3430 switch ((oct & 0x30) >> 4)
3432 case 0: str = "SAPI 0"; break;
3433 case 3: str = "SAPI 3"; break;
3439 other_decode_bitfield_value(a_bigbuf, oct, 0x30, 8);
3440 proto_tree_add_text(subtree, tvb, curr_offset, 1,
3441 "%s : SAPI (Sevice Access Point Identifier): %s",
3445 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
3446 proto_tree_add_text(subtree, tvb, curr_offset, 1,
3447 "%s : PD (Protocol Discriminator): %s",
3449 gsm_a_pd_str[oct & 0x0f]);
3453 /* no length check possible */
3455 return(curr_offset - offset);
3462 de_prio(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
3465 guint32 curr_offset;
3469 add_string = add_string;
3470 curr_offset = offset;
3472 oct = tvb_get_guint8(tvb, curr_offset);
3474 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
3475 proto_tree_add_text(tree,
3476 tvb, curr_offset, 1,
3482 case 1: str = "Call priority level 4"; break;
3483 case 2: str = "Call priority level 3"; break;
3484 case 3: str = "Call priority level 2"; break;
3485 case 4: str = "Call priority level 1"; break;
3486 case 5: str = "Call priority level 0"; break;
3487 case 6: str = "Call priority level B"; break;
3488 case 7: str = "Call priority level A"; break;
3490 str = "No priority applied";
3494 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
3495 proto_tree_add_text(tree,
3496 tvb, curr_offset, 1,
3503 /* no length check possible */
3505 return(curr_offset - offset);
3512 de_plmn_list(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
3515 guint32 curr_offset;
3520 add_string = add_string;
3521 curr_offset = offset;
3524 while ((len - (curr_offset - offset)) >= 3)
3526 octs[0] = tvb_get_guint8(tvb, curr_offset);
3527 octs[1] = tvb_get_guint8(tvb, curr_offset + 1);
3528 octs[2] = tvb_get_guint8(tvb, curr_offset + 2);
3530 mcc_mnc_aux(octs, mcc, mnc);
3532 proto_tree_add_text(tree,
3533 tvb, curr_offset, 3,
3534 "PLMN[%u] Mobile Country Code (MCC): %s, Mobile Network Code (MNC): %s",
3544 sprintf(add_string, " - %u PLMN%s",
3545 num_plmn, plurality(num_plmn, "", "s"));
3547 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3549 return(curr_offset - offset);
3556 de_rr_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
3559 guint32 curr_offset;
3563 add_string = add_string;
3564 curr_offset = offset;
3566 oct = tvb_get_guint8(tvb, curr_offset);
3570 case 0x00: str = "Normal event"; break;
3571 case 0x01: str = "Abnormal release, unspecified"; break;
3572 case 0x02: str = "Abnormal release, channel unacceptable"; break;
3573 case 0x03: str = "Abnormal release, timer expired"; break;
3574 case 0x04: str = "Abnormal release, no activity on the radio path"; break;
3575 case 0x05: str = "Preemptive release"; break;
3576 case 0x08: str = "Handover impossible, timing advance out of range"; break;
3577 case 0x09: str = "Channel mode unacceptable"; break;
3578 case 0x0a: str = "Frequency not implemented"; break;
3579 case 0x41: str = "Call already cleared"; break;
3580 case 0x5f: str = "Semantically incorrect message"; break;
3581 case 0x60: str = "Invalid mandatory information"; break;
3582 case 0x61: str = "Message type non-existent or not implemented"; break;
3583 case 0x62: str = "Message type not compatible with protocol state"; break;
3584 case 0x64: str = "Conditional IE error"; break;
3585 case 0x65: str = "No cell allocation available"; break;
3586 case 0x6f: str = "Protocol error unspecified"; break;
3588 str = "Reserved, treat as Normal event";
3592 proto_tree_add_text(tree,
3593 tvb, curr_offset, 1,
3594 "RR Cause value: 0x%02x (%u) %s",
3601 /* no length check possible */
3603 return(curr_offset - offset);
3610 de_auth_param_rand(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
3612 guint32 curr_offset;
3615 add_string = add_string;
3616 curr_offset = offset;
3619 * 12 octets == 128 bits
3621 #define AUTH_PARAM_RAND_LEN 12
3623 proto_tree_add_text(tree,
3624 tvb, curr_offset, AUTH_PARAM_RAND_LEN,
3627 curr_offset += AUTH_PARAM_RAND_LEN;
3629 /* no length check possible */
3631 return(curr_offset - offset);
3638 de_auth_param_autn(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
3640 guint32 curr_offset;
3642 add_string = add_string;
3643 curr_offset = offset;
3645 proto_tree_add_text(tree,
3646 tvb, curr_offset, len,
3651 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3653 return(curr_offset - offset);
3660 de_auth_resp_param(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
3662 guint32 curr_offset;
3665 add_string = add_string;
3666 curr_offset = offset;
3669 * 4 octets == 32 bits
3671 #define AUTH_PARAM_RESP_LEN 4
3673 proto_tree_add_text(tree,
3674 tvb, curr_offset, AUTH_PARAM_RESP_LEN,
3677 curr_offset += AUTH_PARAM_RESP_LEN;
3679 /* no length check possible */
3681 return(curr_offset - offset);
3688 de_auth_resp_param_ext(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
3690 guint32 curr_offset;
3692 add_string = add_string;
3693 curr_offset = offset;
3695 proto_tree_add_text(tree,
3696 tvb, curr_offset, len,
3697 "RES (extension) value");
3701 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3703 return(curr_offset - offset);
3710 de_auth_fail_param(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
3712 guint32 curr_offset;
3714 add_string = add_string;
3715 curr_offset = offset;
3717 proto_tree_add_text(tree,
3718 tvb, curr_offset, len,
3723 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3725 return(curr_offset - offset);
3732 de_network_name(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
3735 guint32 curr_offset;
3738 add_string = add_string;
3739 curr_offset = offset;
3741 oct = tvb_get_guint8(tvb, curr_offset);
3743 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
3744 proto_tree_add_text(tree,
3745 tvb, curr_offset, 1,
3749 switch ((oct & 0x70) >> 4)
3751 case 0x00: str = "Cell Broadcast data coding scheme, GSM default alphabet, language unspecified, defined in 3GPP TS 03.38"; break;
3752 case 0x01: str = "UCS2 (16 bit)"; break;
3758 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
3759 proto_tree_add_text(tree,
3760 tvb, curr_offset, 1,
3761 "%s : Coding Scheme: %s",
3765 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
3766 proto_tree_add_text(tree,
3767 tvb, curr_offset, 1,
3768 "%s : Add CI: The MS should %s",
3771 "add the letters for the Country's Initials and a separator (e.g. a space) to the text string" :
3772 "The MS should not add the letters for the Country's Initials to the text string");
3776 case 1: str = "bit 8 is spare and set to '0' in octet n"; break;
3777 case 2: str = "bits 7 and 8 are spare and set to '0' in octet n"; break;
3778 case 3: str = "bits 6 to 8(inclusive) are spare and set to '0' in octet n"; break;
3779 case 4: str = "bits 5 to 8(inclusive) are spare and set to '0' in octet n"; break;
3780 case 5: str = "bits 4 to 8(inclusive) are spare and set to '0' in octet n"; break;
3781 case 6: str = "bits 3 to 8(inclusive) are spare and set to '0' in octet n"; break;
3782 case 7: str = "bits 2 to 8(inclusive) are spare and set to '0' in octet n"; break;
3784 str = "this field carries no information about the number of spare bits in octet n";
3788 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
3789 proto_tree_add_text(tree,
3790 tvb, curr_offset, 1,
3791 "%s : Number of spare bits in last octet: %s",
3797 NO_MORE_DATA_CHECK(len);
3799 proto_tree_add_text(tree,
3800 tvb, curr_offset, len - 1,
3801 "Text string encoded according to Coding Scheme");
3803 curr_offset += len - 1;
3805 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3807 return(curr_offset - offset);
3814 de_rej_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
3817 guint32 curr_offset;
3821 add_string = add_string;
3822 curr_offset = offset;
3824 oct = tvb_get_guint8(tvb, curr_offset);
3828 case 0x02: str = "IMSI unknown in HLR"; break;
3829 case 0x03: str = "Illegal MS"; break;
3830 case 0x04: str = "IMSI unknown in VLR"; break;
3831 case 0x05: str = "IMEI not accepted"; break;
3832 case 0x06: str = "Illegal ME"; break;
3833 case 0x0b: str = "PLMN not allowed"; break;
3834 case 0x0c: str = "Location Area not allowed"; break;
3835 case 0x0d: str = "Roaming not allowed in this location area"; break;
3836 case 0x0f: str = "No Suitable Cells In Location Area"; break;
3837 case 0x11: str = "Network failure"; break;
3838 case 0x14: str = "MAC failure"; break;
3839 case 0x15: str = "Synch failure"; break;
3840 case 0x16: str = "Congestion"; break;
3841 case 0x17: str = "GSM authentication unacceptable"; break;
3842 case 0x20: str = "Service option not supported"; break;
3843 case 0x21: str = "Requested service option not subscribed"; break;
3844 case 0x22: str = "Service option temporarily out of order"; break;
3845 case 0x26: str = "Call cannot be identified"; break;
3846 case 0x5f: str = "Semantically incorrect message"; break;
3847 case 0x60: str = "Invalid mandatory information"; break;
3848 case 0x61: str = "Message type non-existent or not implemented"; break;
3849 case 0x62: str = "Message type not compatible with the protocol state"; break;
3850 case 0x63: str = "Information element non-existent or not implemented"; break;
3851 case 0x64: str = "Conditional IE error"; break;
3852 case 0x65: str = "Message not compatible with the protocol state"; break;
3853 case 0x6f: str = "Protocol error, unspecified"; break;
3857 case IS_UPLINK_FALSE:
3858 str = "Service option temporarily out of order";
3861 str = "Protocol error, unspecified";
3867 proto_tree_add_text(tree,
3868 tvb, curr_offset, 1,
3869 "Reject Cause value: 0x%02x (%u) %s",
3876 /* no length check possible */
3878 return(curr_offset - offset);
3885 de_time_zone(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
3888 guint32 curr_offset;
3891 add_string = add_string;
3892 curr_offset = offset;
3894 oct = tvb_get_guint8(tvb, curr_offset);
3896 proto_tree_add_text(tree,
3897 tvb, curr_offset, 1,
3898 "Time Zone: 0x%02x (%u)",
3904 /* no length check possible */
3906 return(curr_offset - offset);
3913 de_time_zone_time(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
3915 guint8 oct, oct2, oct3;
3916 guint32 curr_offset;
3919 add_string = add_string;
3920 curr_offset = offset;
3922 oct = tvb_get_guint8(tvb, curr_offset);
3923 oct2 = tvb_get_guint8(tvb, curr_offset+1);
3924 oct3 = tvb_get_guint8(tvb, curr_offset+2);
3926 proto_tree_add_text(tree,
3927 tvb, curr_offset, 3,
3928 "Year %u%u, Month %u%u, Day %u%u",
3934 (oct3 & 0xf0) >> 4);
3938 oct = tvb_get_guint8(tvb, curr_offset);
3939 oct2 = tvb_get_guint8(tvb, curr_offset+1);
3940 oct3 = tvb_get_guint8(tvb, curr_offset+2);
3942 proto_tree_add_text(tree,
3943 tvb, curr_offset, 3,
3944 "Hour %u%u, Minutes %u%u, Seconds %u%u",
3950 (oct3 & 0xf0) >> 4);
3954 oct = tvb_get_guint8(tvb, curr_offset);
3956 proto_tree_add_text(tree,
3957 tvb, curr_offset, 1,
3958 "Time Zone: 0x%02x (%u)",
3964 /* no length check possible */
3966 return(curr_offset - offset);
3973 de_lsa_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
3975 guint32 curr_offset;
3977 add_string = add_string;
3978 curr_offset = offset;
3980 proto_tree_add_text(tree,
3981 tvb, curr_offset, len,
3986 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3988 return(curr_offset - offset);
3995 de_day_saving_time(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
3998 guint32 curr_offset;
4001 add_string = add_string;
4002 curr_offset = offset;
4004 oct = tvb_get_guint8(tvb, curr_offset);
4006 other_decode_bitfield_value(a_bigbuf, oct, 0xfc, 8);
4007 proto_tree_add_text(tree,
4008 tvb, curr_offset, 1,
4014 case 0: str = "No adjustment for Daylight Saving Time"; break;
4015 case 1: str = "+1 hour adjustment for Daylight Saving Time"; break;
4016 case 2: str = "+2 hours adjustment for Daylight Saving Time"; break;
4022 other_decode_bitfield_value(a_bigbuf, oct, 0x03, 8);
4023 proto_tree_add_text(tree,
4024 tvb, curr_offset, 1,
4031 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
4033 return(curr_offset - offset);
4040 de_aux_states(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
4043 guint32 curr_offset;
4046 add_string = add_string;
4047 curr_offset = offset;
4049 oct = tvb_get_guint8(tvb, curr_offset);
4051 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
4052 proto_tree_add_text(tree,
4053 tvb, curr_offset, 1,
4057 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
4058 proto_tree_add_text(tree,
4059 tvb, curr_offset, 1,
4063 switch ((oct & 0x0c) >> 2)
4065 case 0: str = "Idle"; break;
4066 case 1: str = "Hold request"; break;
4067 case 2: str = "Call held"; break;
4069 str = "Retrieve request";
4073 other_decode_bitfield_value(a_bigbuf, oct, 0x0c, 8);
4074 proto_tree_add_text(tree,
4075 tvb, curr_offset, 1,
4076 "%s : Hold auxiliary state: %s",
4082 case 0: str = "Idle"; break;
4083 case 1: str = "MPTY request"; break;
4084 case 2: str = "Call in MPTY"; break;
4086 str = "Split request";
4090 other_decode_bitfield_value(a_bigbuf, oct, 0x03, 8);
4091 proto_tree_add_text(tree,
4092 tvb, curr_offset, 1,
4093 "%s : Multi party auxiliary state: %s",
4099 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
4101 return(curr_offset - offset);
4108 de_bearer_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
4113 guint32 curr_offset;
4114 guint32 saved_offset;
4115 proto_tree *subtree;
4119 #define DE_BC_ITC_SPEECH 0x00
4120 #define DE_BC_ITC_UDI 0x01
4121 #define DE_BC_ITC_EX_PLMN 0x02
4122 #define DE_BC_ITC_FASC_G3 0x03
4123 #define DE_BC_ITC_OTHER_ITC 0x05
4124 #define DE_BC_ITC_RSVD_NET 0x07
4126 curr_offset = offset;
4128 oct = tvb_get_guint8(tvb, curr_offset);
4133 * warning, bearer cap uses extended values that
4134 * are reversed from other parameters!
4136 extended = (oct & 0x80) ? FALSE : TRUE;
4139 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
4140 proto_tree_add_text(tree,
4141 tvb, curr_offset, 1,
4142 "%s : Extension: %s",
4144 extended ? "extended" : "not extended");
4148 case IS_UPLINK_FALSE:
4152 case IS_UPLINK_TRUE:
4154 * depends on Information transfer capability
4158 case DE_BC_ITC_SPEECH:
4161 switch ((oct & 0x60) >> 5)
4163 case 1: str = "MS supports at least full rate speech version 1 but does not support half rate speech version 1"; break;
4164 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;
4165 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;
4174 switch ((oct & 0x60) >> 5)
4176 case 1: str = "Full rate support only MS/fullrate speech version 1 supported"; break;
4177 case 2: str = "Dual rate support MS/half rate speech version 1 preferred, full rate speech version 1 also supported"; break;
4178 case 3: str = "Dual rate support MS/full rate speech version 1 preferred, half rate speech version 1 also supported"; break;
4188 switch ((oct & 0x60) >> 5)
4190 case 1: str = "Full rate support only MS"; break;
4191 case 2: str = "Dual rate support MS/half rate preferred"; break;
4192 case 3: str = "Dual rate support MS/full rate preferred"; break;
4202 str = "(dissect problem)";
4206 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
4207 proto_tree_add_text(tree,
4208 tvb, curr_offset, 1,
4209 "%s : Radio channel requirement: %s",
4213 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
4214 proto_tree_add_text(tree,
4215 tvb, curr_offset, 1,
4216 "%s : Coding standard: %s",
4218 (oct & 0x10) ? "reserved" : "GSM standardized coding");
4220 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
4221 proto_tree_add_text(tree,
4222 tvb, curr_offset, 1,
4223 "%s : Transfer mode: %s",
4225 (oct & 0x08) ? "packet" : "circuit");
4229 case DE_BC_ITC_SPEECH: str = "Speech"; break;
4230 case DE_BC_ITC_UDI: str = "Unrestricted digital information"; break;
4231 case DE_BC_ITC_EX_PLMN: str = "3.1 kHz audio, ex PLMN"; break;
4232 case DE_BC_ITC_FASC_G3: str = "Facsimile group 3"; break;
4233 case DE_BC_ITC_OTHER_ITC: str = "Other ITC (See Octet 5a)"; break;
4234 case DE_BC_ITC_RSVD_NET: str = "Reserved, to be used in the network"; break;
4240 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
4241 proto_tree_add_text(tree,
4242 tvb, curr_offset, 1,
4243 "%s : Information transfer capability: %s",
4247 sprintf(add_string, " - (%s)", str);
4251 NO_MORE_DATA_CHECK(len);
4255 case DE_BC_ITC_SPEECH:
4259 proto_tree_add_text(tree,
4260 tvb, curr_offset, -1,
4261 "Octets 3a - Speech Versions");
4263 subtree = proto_item_add_subtree(item, ett_bc_oct_3a);
4265 saved_offset = curr_offset;
4269 oct = tvb_get_guint8(tvb, curr_offset);
4271 extended = (oct & 0x80) ? FALSE : TRUE;
4273 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
4274 proto_tree_add_text(subtree,
4275 tvb, curr_offset, 1,
4276 "%s : Extension: %s",
4278 extended ? "extended" : "not extended");
4280 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
4281 proto_tree_add_text(subtree,
4282 tvb, curr_offset, 1,
4283 "%s : Coding: octet used for %s",
4285 (oct & 0x40) ? "other extension of octet 3" :
4286 "extension of information transfer capability");
4288 other_decode_bitfield_value(a_bigbuf, oct, 0x30, 8);
4289 proto_tree_add_text(subtree,
4290 tvb, curr_offset, 1,
4296 case 0: str = "GSM full rate speech version 1"; break;
4297 case 2: str = "GSM full rate speech version 2"; break;
4298 case 4: str = "GSM full rate speech version 3"; break;
4299 case 1: str = "GSM half rate speech version 1"; break;
4300 case 5: str = "GSM half rate speech version 3"; break;
4302 str = "Speech version TBD";
4306 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
4307 proto_tree_add_text(subtree,
4308 tvb, curr_offset, 1,
4309 "%s : Speech version indication: %s",
4316 ((len - (curr_offset - offset)) > 0));
4318 proto_item_set_len(item, curr_offset - saved_offset);
4325 proto_tree_add_text(tree,
4326 tvb, curr_offset, 1,
4329 subtree = proto_item_add_subtree(item, ett_bc_oct_4);
4331 oct = tvb_get_guint8(tvb, curr_offset);
4333 extended = (oct & 0x80) ? FALSE : TRUE;
4335 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
4336 proto_tree_add_text(subtree,
4337 tvb, curr_offset, 1,
4338 "%s : Extension: %s",
4340 extended ? "extended" : "not extended");
4342 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
4343 proto_tree_add_text(subtree,
4344 tvb, curr_offset, 1,
4345 "%s : Compression: data compression %s%s",
4347 (oct & 0x40) ? "" : "not ",
4348 is_uplink ? "allowed" : "possible");
4350 switch ((oct & 0x30) >> 4)
4352 case 0x00: str = "Service data unit integrity"; break;
4353 case 0x03: str = "Unstructured"; break;
4359 other_decode_bitfield_value(a_bigbuf, oct, 0x30, 8);
4360 proto_tree_add_text(subtree,
4361 tvb, curr_offset, 1,
4362 "%s : Structure: %s",
4366 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
4367 proto_tree_add_text(subtree,
4368 tvb, curr_offset, 1,
4369 "%s : Duplex mode: %s",
4371 (oct & 0x08) ? "Full" : "Half");
4373 other_decode_bitfield_value(a_bigbuf, oct, 0x04, 8);
4374 proto_tree_add_text(subtree,
4375 tvb, curr_offset, 1,
4376 "%s : Configuration: %s",
4378 (oct & 0x04) ? "Reserved" : "Point-to-point");
4380 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
4381 proto_tree_add_text(subtree,
4382 tvb, curr_offset, 1,
4386 "Data up to and including 4.8 kb/s, full rate, non-transparent, 6 kb/s radio interface rate is requested" :
4387 "No meaning is associated with this value");
4389 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
4390 proto_tree_add_text(subtree,
4391 tvb, curr_offset, 1,
4392 "%s : Establishment: %s",
4394 (oct & 0x01) ? "Reserved" : "Demand");
4398 NO_MORE_DATA_CHECK(len);
4403 proto_tree_add_text(tree,
4404 tvb, curr_offset, 1,
4407 subtree = proto_item_add_subtree(item, ett_bc_oct_5);
4409 oct = tvb_get_guint8(tvb, curr_offset);
4411 extended = (oct & 0x80) ? FALSE : TRUE;
4413 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
4414 proto_tree_add_text(subtree,
4415 tvb, curr_offset, 1,
4416 "%s : Extension: %s",
4418 extended ? "extended" : "not extended");
4420 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
4421 proto_tree_add_text(subtree,
4422 tvb, curr_offset, 1,
4423 "%s : Access Identity: %s",
4425 (oct & 0x60) ? "Reserved" : "Octet identifier");
4427 switch ((oct & 0x18) >> 3)
4429 case 0x00: str = "No rate adaption"; break;
4430 case 0x01: str = "V.110, I.460/X.30 rate adaptation"; break;
4431 case 0x02: str = "ITU-T X.31 flag stuffing"; break;
4433 str = "Other rate adaption (see octet 5a)"; break;
4437 other_decode_bitfield_value(a_bigbuf, oct, 0x18, 8);
4438 proto_tree_add_text(subtree,
4439 tvb, curr_offset, 1,
4440 "%s : Rate Adaption: %s",
4446 case 0x01: str = "I.440/450"; break;
4447 case 0x02: str = "Reserved: was allocated in earlier phases of the protocol"; break;
4448 case 0x03: str = "Reserved: was allocated in earlier phases of the protocol"; break;
4449 case 0x04: str = "Reserved: was allocated in earlier phases of the protocol"; break;
4450 case 0x05: str = "Reserved: was allocated in earlier phases of the protocol"; break;
4451 case 0x06: str = "Reserved: was allocated in earlier phases of the protocol"; break;
4453 str = "Reserved"; break;
4457 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
4458 proto_tree_add_text(subtree,
4459 tvb, curr_offset, 1,
4460 "%s : Signalling Access Protocol: %s",
4466 NO_MORE_DATA_CHECK(len);
4468 if (!extended) goto bc_octet_6;
4473 proto_tree_add_text(tree,
4474 tvb, curr_offset, 1,
4477 subtree = proto_item_add_subtree(item, ett_bc_oct_5a);
4479 oct = tvb_get_guint8(tvb, curr_offset);
4481 extended = (oct & 0x80) ? FALSE : TRUE;
4483 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
4484 proto_tree_add_text(subtree,
4485 tvb, curr_offset, 1,
4486 "%s : Extension: %s",
4488 extended ? "extended" : "not extended");
4490 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
4491 proto_tree_add_text(subtree,
4492 tvb, curr_offset, 1,
4493 "%s : Other ITC: %s",
4495 (oct & 0x60) ? "Reserved" : "Restricted digital information");
4497 switch ((oct & 0x18) >> 3)
4499 case 0x00: str = "V.120"; break;
4500 case 0x01: str = "H.223 & H.245"; break;
4501 case 0x02: str = "PIAFS"; break;
4507 other_decode_bitfield_value(a_bigbuf, oct, 0x18, 8);
4508 proto_tree_add_text(subtree,
4509 tvb, curr_offset, 1,
4510 "%s : Other Rate Adaption: %s",
4514 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
4515 proto_tree_add_text(subtree,
4516 tvb, curr_offset, 1,
4522 NO_MORE_DATA_CHECK(len);
4524 if (!extended) goto bc_octet_6;
4529 proto_tree_add_text(tree,
4530 tvb, curr_offset, 1,
4533 subtree = proto_item_add_subtree(item, ett_bc_oct_5b);
4535 extended = (oct & 0x80) ? FALSE : TRUE;
4537 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
4538 proto_tree_add_text(subtree,
4539 tvb, curr_offset, 1,
4540 "%s : Extension: %s",
4542 extended ? "extended" : "not extended");
4544 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
4545 proto_tree_add_text(subtree,
4546 tvb, curr_offset, 1,
4547 "%s : Rate Adaption Header: %sincluded",
4549 (oct & 0x40) ? "" : "not ");
4551 other_decode_bitfield_value(a_bigbuf, oct, 0x20, 8);
4552 proto_tree_add_text(subtree,
4553 tvb, curr_offset, 1,
4554 "%s : Multiple frame establishment support in data link: %s",
4556 (oct & 0x20) ? "Supported" : "Not supported, only UI frames allowed");
4558 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
4559 proto_tree_add_text(subtree,
4560 tvb, curr_offset, 1,
4561 "%s : Mode of operation: %s",
4563 (oct & 0x10) ? "Protocol sensitive" : "Bit transparent");
4565 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
4566 proto_tree_add_text(subtree,
4567 tvb, curr_offset, 1,
4568 "%s : Logical link identifier negotiation: %s",
4570 (oct & 0x08) ? "Full protocol negotiation" : "Default, LLI=256 only");
4572 other_decode_bitfield_value(a_bigbuf, oct, 0x04, 8);
4573 proto_tree_add_text(subtree,
4574 tvb, curr_offset, 1,
4575 "%s : Assignor/Assignee: Message originator is '%s'",
4577 (oct & 0x04) ? "assignor only" : "default assignee");
4579 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
4580 proto_tree_add_text(subtree,
4581 tvb, curr_offset, 1,
4582 "%s : In band/Out of band negotiation: Negotiation is done %s",
4585 "with USER INFORMATION messages on a temporary signalling connection" :
4586 "in-band using logical link zero");
4588 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
4589 proto_tree_add_text(subtree,
4590 tvb, curr_offset, 1,
4596 NO_MORE_DATA_CHECK(len);
4603 proto_tree_add_text(tree,
4604 tvb, curr_offset, 1,
4607 subtree = proto_item_add_subtree(item, ett_bc_oct_6);
4609 extended = (oct & 0x80) ? FALSE : TRUE;
4611 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
4612 proto_tree_add_text(subtree,
4613 tvb, curr_offset, 1,
4614 "%s : Extension: %s",
4616 extended ? "extended" : "not extended");
4618 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
4619 proto_tree_add_text(subtree,
4620 tvb, curr_offset, 1,
4621 "%s : Layer 1 Identity: %s",
4623 ((oct & 0x60) == 0x20) ? "Octet identifier" : "Reserved");
4625 other_decode_bitfield_value(a_bigbuf, oct, 0x1e, 8);
4626 proto_tree_add_text(subtree,
4627 tvb, curr_offset, 1,
4628 "%s : User information layer 1 protocol: %s",
4630 (oct & 0x1e) ? "Reserved" : "Default layer 1 protocol");
4632 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
4633 proto_tree_add_text(subtree,
4634 tvb, curr_offset, 1,
4635 "%s : Synchronous/asynchronous: %s",
4637 (oct & 0x01) ? "Asynchronous" : "Synchronous");
4641 NO_MORE_DATA_CHECK(len);
4643 if (!extended) goto bc_octet_7;
4648 proto_tree_add_text(tree,
4649 tvb, curr_offset, 1,
4652 subtree = proto_item_add_subtree(item, ett_bc_oct_6a);
4654 extended = (oct & 0x80) ? FALSE : TRUE;
4656 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
4657 proto_tree_add_text(subtree,
4658 tvb, curr_offset, 1,
4659 "%s : Extension: %s",
4661 extended ? "extended" : "not extended");
4663 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
4664 proto_tree_add_text(subtree,
4665 tvb, curr_offset, 1,
4666 "%s : Number of Stop Bits: %s",
4668 (oct & 0x40) ? "2" : "1");
4670 other_decode_bitfield_value(a_bigbuf, oct, 0x20, 8);
4671 proto_tree_add_text(subtree,
4672 tvb, curr_offset, 1,
4673 "%s : Negotiation: %s",
4675 (oct & 0x20) ? "Reserved" : "In-band negotiation not possible");
4677 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
4678 proto_tree_add_text(subtree,
4679 tvb, curr_offset, 1,
4680 "%s : Number of data bits excluding parity bit if present: %s",
4682 (oct & 0x10) ? "8" : "7");
4686 case 0x01: str = "0.3 kbit/s Recommendation X.1 and V.110"; break;
4687 case 0x02: str = "1.2 kbit/s Recommendation X.1 and V.110"; break;
4688 case 0x03: str = "2.4 kbit/s Recommendation X.1 and V.110"; break;
4689 case 0x04: str = "4.8 kbit/s Recommendation X.1 and V.110"; break;
4690 case 0x05: str = "9.6 kbit/s Recommendation X.1 and V.110"; break;
4691 case 0x06: str = "12.0 kbit/s transparent (non compliance with X.1 and V.110)"; break;
4692 case 0x07: str = "Reserved: was allocated in earlier phases of the protocol"; break;
4698 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
4699 proto_tree_add_text(subtree,
4700 tvb, curr_offset, 1,
4701 "%s : User rate: %s",
4707 NO_MORE_DATA_CHECK(len);
4709 if (!extended) goto bc_octet_7;
4714 proto_tree_add_text(tree,
4715 tvb, curr_offset, 1,
4718 subtree = proto_item_add_subtree(item, ett_bc_oct_6b);
4720 extended = (oct & 0x80) ? FALSE : TRUE;
4722 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
4723 proto_tree_add_text(subtree,
4724 tvb, curr_offset, 1,
4725 "%s : Extension: %s",
4727 extended ? "extended" : "not extended");
4729 switch ((oct & 0x60) >> 5)
4731 case 0x02: str = "8 kbit/s"; break;
4732 case 0x03: str = "16 kbit/s"; break;
4738 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
4739 proto_tree_add_text(subtree,
4740 tvb, curr_offset, 1,
4741 "%s : V.110/X.30 rate adaptation Intermediate rate: %s",
4745 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
4746 proto_tree_add_text(subtree,
4747 tvb, curr_offset, 1,
4748 "%s : Network independent clock (NIC) on transmission (Tx): %s to send data with network independent clock",
4750 (oct & 0x10) ? "requires" : "does not require");
4752 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
4753 proto_tree_add_text(subtree,
4754 tvb, curr_offset, 1,
4755 "%s : Network independent clock (NIC) on reception (Rx): %s accept data with network independent clock",
4757 (oct & 0x08) ? "can" : "cannot");
4761 case 0x00: str = "Odd"; break;
4762 case 0x02: str = "Even"; break;
4763 case 0x03: str = "None"; break;
4764 case 0x04: str = "Forced to 0"; break;
4765 case 0x05: str = "Forced to 1"; break;
4771 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
4772 proto_tree_add_text(subtree,
4773 tvb, curr_offset, 1,
4774 "%s : Parity information: %s",
4780 NO_MORE_DATA_CHECK(len);
4782 if (!extended) goto bc_octet_7;
4787 proto_tree_add_text(tree,
4788 tvb, curr_offset, 1,
4791 subtree = proto_item_add_subtree(item, ett_bc_oct_6c);
4793 extended = (oct & 0x80) ? FALSE : TRUE;
4795 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
4796 proto_tree_add_text(subtree,
4797 tvb, curr_offset, 1,
4798 "%s : Extension: %s",
4800 extended ? "extended" : "not extended");
4802 switch ((oct & 0x60) >> 5)
4804 case 0x01: str = "Non transparent (RLP)"; break;
4805 case 0x02: str = "Both, transparent preferred"; break;
4806 case 0x03: str = "Both, non transparent preferred"; break;
4808 str = "Transparent";
4812 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
4813 proto_tree_add_text(subtree,
4814 tvb, curr_offset, 1,
4815 "%s : Connection element: %s",
4821 case 0x00: str = "None"; break;
4822 case 0x01: str = "V.21"; break;
4823 case 0x02: str = "V.22"; break;
4824 case 0x03: str = "V.22 bis"; break;
4825 case 0x04: str = "Reserved: was allocated in earlier phases of the protocol"; break;
4826 case 0x05: str = "V.26 ter"; break;
4827 case 0x06: str = "V.32"; break;
4828 case 0x07: str = "Modem for undefined interface"; break;
4829 case 0x08: str = "Autobauding type 1"; break;
4835 other_decode_bitfield_value(a_bigbuf, oct, 0x1f, 8);
4836 proto_tree_add_text(subtree,
4837 tvb, curr_offset, 1,
4838 "%s : Modem type: %s",
4844 NO_MORE_DATA_CHECK(len);
4846 if (!extended) goto bc_octet_7;
4851 proto_tree_add_text(tree,
4852 tvb, curr_offset, 1,
4855 subtree = proto_item_add_subtree(item, ett_bc_oct_6d);
4857 extended = (oct & 0x80) ? FALSE : TRUE;
4859 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
4860 proto_tree_add_text(subtree,
4861 tvb, curr_offset, 1,
4862 "%s : Extension: %s",
4864 extended ? "extended" : "not extended");
4866 switch ((oct & 0x60) >> 5)
4868 case 0x00: str = "No other modem type specified in this field"; break;
4869 case 0x02: str = "V.34"; break;
4875 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
4876 proto_tree_add_text(subtree,
4877 tvb, curr_offset, 1,
4878 "%s : Other modem type: %s",
4884 case 0x00: str = "Fixed network user rate not applicable/No meaning is associated with this value"; break;
4885 case 0x01: str = "9.6 kbit/s Recommendation X.1 and V.110"; break;
4886 case 0x02: str = "14.4 kbit/s Recommendation X.1 and V.110"; break;
4887 case 0x03: str = "19.2 kbit/s Recommendation X.1 and V.110"; break;
4888 case 0x04: str = "28.8 kbit/s Recommendation X.1 and V.110"; break;
4889 case 0x05: str = "38.4 kbit/s Recommendation X.1 and V.110"; break;
4890 case 0x06: str = "48.0 kbit/s Recommendation X.1 and V.110(synch)"; break;
4891 case 0x07: str = "56.0 kbit/s Recommendation X.1 and V.110(synch) /bit transparent"; break;
4892 case 0x08: str = "64.0 kbit/s bit transparent"; break;
4893 case 0x09: str = "33.6 kbit/s bit transparent"; break;
4894 case 0x0a: str = "32.0 kbit/s Recommendation I.460"; break;
4895 case 0x0b: str = "31.2 kbit/s Recommendation V.34"; break;
4901 other_decode_bitfield_value(a_bigbuf, oct, 0x1f, 8);
4902 proto_tree_add_text(subtree,
4903 tvb, curr_offset, 1,
4904 "%s : Fixed network user rate: %s",
4910 NO_MORE_DATA_CHECK(len);
4912 if (!extended) goto bc_octet_7;
4917 proto_tree_add_text(tree,
4918 tvb, curr_offset, 1,
4921 subtree = proto_item_add_subtree(item, ett_bc_oct_6e);
4923 extended = (oct & 0x80) ? FALSE : TRUE;
4925 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
4926 proto_tree_add_text(subtree,
4927 tvb, curr_offset, 1,
4928 "%s : Extension: %s",
4930 extended ? "extended" : "not extended");
4932 if (is_uplink == IS_UPLINK_TRUE)
4934 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
4935 proto_tree_add_text(subtree,
4936 tvb, curr_offset, 1,
4937 "%s : Acceptable channel codings: TCH/F14.4 %sacceptable",
4939 (oct & 0x40) ? "" : "not ");
4941 other_decode_bitfield_value(a_bigbuf, oct, 0x20, 8);
4942 proto_tree_add_text(subtree,
4943 tvb, curr_offset, 1,
4944 "%s : Acceptable channel codings: Spare",
4947 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
4948 proto_tree_add_text(subtree,
4949 tvb, curr_offset, 1,
4950 "%s : Acceptable channel codings: TCH/F9.6 %sacceptable",
4952 (oct & 0x10) ? "" : "not ");
4954 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
4955 proto_tree_add_text(subtree,
4956 tvb, curr_offset, 1,
4957 "%s : Acceptable channel codings: TCH/F4.8 %sacceptable",
4959 (oct & 0x08) ? "" : "not ");
4961 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
4962 proto_tree_add_text(subtree,
4963 tvb, curr_offset, 1,
4964 "%s : Maximum number of traffic channels: %u TCH",
4970 other_decode_bitfield_value(a_bigbuf, oct, 0x78, 8);
4971 proto_tree_add_text(subtree,
4972 tvb, curr_offset, 1,
4973 "%s : Acceptable channel codings: Spare",
4976 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
4977 proto_tree_add_text(subtree,
4978 tvb, curr_offset, 1,
4979 "%s : Maximum number of traffic channels: Spare",
4985 NO_MORE_DATA_CHECK(len);
4987 if (!extended) goto bc_octet_7;
4992 proto_tree_add_text(tree,
4993 tvb, curr_offset, 1,
4996 subtree = proto_item_add_subtree(item, ett_bc_oct_6f);
4998 extended = (oct & 0x80) ? FALSE : TRUE;
5000 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
5001 proto_tree_add_text(subtree,
5002 tvb, curr_offset, 1,
5003 "%s : Extension: %s",
5005 extended ? "extended" : "not extended");
5007 switch ((oct & 0x70) >> 4)
5009 case 0x00: str = "not allowed/required/applicable"; break;
5010 case 0x01: str = "up to 1 TCH/F allowed/may be requested"; break;
5011 case 0x02: str = "up to 2 TCH/F allowed/may be requested"; break;
5012 case 0x03: str = "up to 3 TCH/F allowed/may be requested"; break;
5013 case 0x04: str = "up to 4 TCH/F allowed/may be requested"; break;
5015 str = "up to 4 TCH/F may be requested";
5019 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
5020 proto_tree_add_text(subtree,
5021 tvb, curr_offset, 1,
5022 "%s : UIMI, User initiated modification indication: %s",
5026 if (is_uplink == IS_UPLINK_TRUE)
5030 case 0x00: str = "Air interface user rate not applicable/No meaning associated with this value"; break;
5031 case 0x01: str = "9.6 kbit/s"; break;
5032 case 0x02: str = "14.4 kbit/s"; break;
5033 case 0x03: str = "19.2 kbit/s"; break;
5034 case 0x05: str = "28.8 kbit/s"; break;
5035 case 0x06: str = "38.4 kbit/s"; break;
5036 case 0x07: str = "43.2 kbit/s"; break;
5037 case 0x08: str = "57.6 kbit/s"; break;
5038 case 0x09: str = "interpreted by the network as 38.4 kbit/s in this version of the protocol"; break;
5039 case 0x0a: str = "interpreted by the network as 38.4 kbit/s in this version of the protocol"; break;
5040 case 0x0b: str = "interpreted by the network as 38.4 kbit/s in this version of the protocol"; break;
5041 case 0x0c: str = "interpreted by the network as 38.4 kbit/s in this version of the protocol"; break;
5047 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
5048 proto_tree_add_text(subtree,
5049 tvb, curr_offset, 1,
5050 "%s : Wanted air interface user rate: %s",
5056 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
5057 proto_tree_add_text(subtree,
5058 tvb, curr_offset, 1,
5059 "%s : Wanted air interface user rate: Spare",
5065 NO_MORE_DATA_CHECK(len);
5067 if (!extended) goto bc_octet_7;
5072 proto_tree_add_text(tree,
5073 tvb, curr_offset, 1,
5076 subtree = proto_item_add_subtree(item, ett_bc_oct_6g);
5078 extended = (oct & 0x80) ? FALSE : TRUE;
5080 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
5081 proto_tree_add_text(subtree,
5082 tvb, curr_offset, 1,
5083 "%s : Extension: %s",
5085 extended ? "extended" : "not extended");
5087 if (is_uplink == IS_UPLINK_TRUE)
5089 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
5090 proto_tree_add_text(subtree,
5091 tvb, curr_offset, 1,
5092 "%s : Acceptable channel codings extended: TCH/F28.8 %sacceptable",
5094 (oct & 0x40) ? "" : "not ");
5096 other_decode_bitfield_value(a_bigbuf, oct, 0x20, 8);
5097 proto_tree_add_text(subtree,
5098 tvb, curr_offset, 1,
5099 "%s : Acceptable channel codings extended: TCH/F32.0 %sacceptable",
5101 (oct & 0x20) ? "" : "not ");
5103 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
5104 proto_tree_add_text(subtree,
5105 tvb, curr_offset, 1,
5106 "%s : Acceptable channel codings extended: TCH/F43.2 %sacceptable",
5108 (oct & 0x10) ? "" : "not ");
5110 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
5111 proto_tree_add_text(subtree,
5112 tvb, curr_offset, 1,
5113 "%s : Acceptable channel codings extended: TCH/F43.2 %sacceptable",
5115 (oct & 0x10) ? "" : "not ");
5117 switch ((oct & 0x0c) >> 2)
5119 case 0: str = "Channel coding symmetry preferred"; break;
5120 case 2: str = "Downlink biased channel coding asymmetry is preferred"; break;
5121 case 1: str = "Uplink biased channel coding asymmetry is preferred"; break;
5123 str = "Unused, treat as Channel coding symmetry preferred";
5127 other_decode_bitfield_value(a_bigbuf, oct, 0x0c, 8);
5128 proto_tree_add_text(subtree,
5129 tvb, curr_offset, 1,
5130 "%s : Channel Coding Asymmetry Indication: %s",
5136 other_decode_bitfield_value(a_bigbuf, oct, 0x7c, 8);
5137 proto_tree_add_text(subtree,
5138 tvb, curr_offset, 1,
5139 "%s : EDGE Channel Codings: Spare",
5143 other_decode_bitfield_value(a_bigbuf, oct, 0x03, 8);
5144 proto_tree_add_text(subtree,
5145 tvb, curr_offset, 1,
5151 NO_MORE_DATA_CHECK(len);
5158 proto_tree_add_text(tree,
5159 tvb, curr_offset, 1,
5162 subtree = proto_item_add_subtree(item, ett_bc_oct_7);
5164 extended = (oct & 0x80) ? FALSE : TRUE;
5166 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
5167 proto_tree_add_text(subtree,
5168 tvb, curr_offset, 1,
5169 "%s : Extension: %s",
5171 extended ? "extended" : "not extended");
5173 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
5174 proto_tree_add_text(subtree,
5175 tvb, curr_offset, 1,
5176 "%s : Layer 2 Identity: %s",
5178 ((oct & 0x60) == 0x40) ? "Octet identifier" : "Reserved");
5182 case 0x06: str = "Reserved: was allocated in earlier phases of the protocol"; break;
5183 case 0x08: str = "ISO 6429, codeset 0 (DC1/DC3)"; break;
5184 case 0x09: str = "Reserved: was allocated but never used in earlier phases of the protocol"; break;
5185 case 0x0a: str = "Videotex profile 1"; break;
5186 case 0x0c: str = "COPnoFlCt (Character oriented Protocol with no Flow Control mechanism)"; break;
5187 case 0x0d: str = "Reserved: was allocated in earlier phases of the protocol"; break;
5193 other_decode_bitfield_value(a_bigbuf, oct, 0x1f, 8);
5194 proto_tree_add_text(subtree,
5195 tvb, curr_offset, 1,
5196 "%s : User information layer 2 protocol: %s",
5202 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
5204 return(curr_offset - offset);
5211 de_cc_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
5214 guint32 curr_offset;
5216 add_string = add_string;
5217 curr_offset = offset;
5219 oct = tvb_get_guint8(tvb, curr_offset);
5221 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
5223 switch ((oct & 0xf0) >> 4)
5226 proto_tree_add_text(tree,
5227 tvb, curr_offset, 1,
5228 "%s : Maximum number of supported bearers: 1",
5233 proto_tree_add_text(tree,
5234 tvb, curr_offset, 1,
5235 "%s : Maximum number of supported bearers: %u",
5241 other_decode_bitfield_value(a_bigbuf, oct, 0x0c, 8);
5242 proto_tree_add_text(tree,
5243 tvb, curr_offset, 1,
5247 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
5248 proto_tree_add_text(tree,
5249 tvb, curr_offset, 1,
5250 "%s : PCP: the mobile station %s the Prolonged Clearing Procedure",
5252 (oct & 0x02) ? "supports" : "does not support");
5254 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
5255 proto_tree_add_text(tree,
5256 tvb, curr_offset, 1,
5260 "the mobile station supports DTMF as specified in subclause 5.5.7 of TS 24.008" :
5261 "reserved for earlier versions of the protocol");
5265 NO_MORE_DATA_CHECK(len);
5267 oct = tvb_get_guint8(tvb, curr_offset);
5269 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
5270 proto_tree_add_text(tree,
5271 tvb, curr_offset, 1,
5275 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
5276 proto_tree_add_text(tree,
5277 tvb, curr_offset, 1,
5278 "%s : Maximum number of speech bearers: %u",
5284 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
5286 return(curr_offset - offset);
5293 de_call_state(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
5296 guint32 curr_offset;
5297 proto_tree *subtree;
5302 add_string = add_string;
5303 curr_offset = offset;
5305 oct = tvb_get_guint8(tvb, curr_offset);
5308 proto_tree_add_text(tree,
5309 tvb, curr_offset, 1,
5310 gsm_dtap_elem_strings[DE_CALL_STATE].strptr);
5312 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_CALL_STATE]);
5314 switch ((oct & 0xc0) >> 6)
5316 case 0: str = "Coding as specified in ITU-T Rec. Q.931"; break;
5317 case 1: str = "Reserved for other international standards"; break;
5318 case 2: str = "National standard"; break;
5320 str = "Standard defined for the GSM PLMNS";
5324 other_decode_bitfield_value(a_bigbuf, oct, 0xc0, 8);
5325 proto_tree_add_text(subtree,
5326 tvb, curr_offset, 1,
5327 "%s : Coding standard: %s",
5333 case 0x00: str = "UO - null NO - null"; break;
5334 case 0x02: str = "U0.1- MM connection pending N0.1- MM connection pending"; break;
5335 case 0x22: str = "U0.2- CC prompt present N0.2- CC connection pending"; break;
5336 case 0x23: str = "U0.3- Wait for network information N0.3- Network answer pending"; break;
5337 case 0x24: str = "U0.4- CC-Establishment present N0.4- CC-Establishment present"; break;
5338 case 0x25: str = "U0.5- CC-Establishment confirmed N0.5- CC-Establishment confirmed"; break;
5339 case 0x26: str = "U0.6- Recall present N0.6- Recall present"; break;
5340 case 0x01: str = "U1 - call initiated N1 - call initiated"; break;
5341 case 0x03: str = "U3 - mobile originating call proceeding N3 - mobile originating call proceeding"; break;
5342 case 0x04: str = "U4 - call delivered N4 - call delivered"; break;
5343 case 0x06: str = "U6 - call present N6 - call present"; break;
5344 case 0x07: str = "U7 - call received N7 - call received"; break;
5345 case 0x08: str = "U8 - connect request N8 - connect request"; break;
5346 case 0x09: str = "U9 - mobile terminating call confirmed N9 - mobile terminating call confirmed"; break;
5347 case 0x0a: str = "U10- active N10- active"; break;
5348 case 0x0b: str = "U11- disconnect request"; break;
5349 case 0x0c: str = "U12- disconnect indication N12-disconnect indication"; break;
5350 case 0x13: str = "U19- release request N19- release request"; break;
5351 case 0x1a: str = "U26- mobile originating modify N26- mobile originating modify"; break;
5352 case 0x1b: str = "U27- mobile terminating modify N27- mobile terminating modify"; break;
5353 case 0x1c: str = " N28- connect indication"; break;
5359 other_decode_bitfield_value(a_bigbuf, oct, 0x3f, 8);
5360 proto_tree_add_text(subtree,
5361 tvb, curr_offset, 1,
5362 "%s : Call state value: %s",
5368 /* no length check possible */
5370 return(curr_offset - offset);
5377 de_cld_party_bcd_num(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
5382 guint32 curr_offset;
5385 curr_offset = offset;
5387 oct = tvb_get_guint8(tvb, curr_offset);
5389 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
5390 proto_tree_add_text(tree,
5391 tvb, curr_offset, 1,
5395 ton = (oct & 0x70) >> 4;
5398 case 0: str = "Unknown"; break;
5399 case 1: str = "International number"; break;
5400 case 2: str = "National number"; break;
5401 case 3: str = "Network specific number"; break;
5402 case 4: str = "Dedicated access, short code"; break;
5403 case 7: str = "Reserved for extension"; break;
5409 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
5410 proto_tree_add_text(tree,
5411 tvb, curr_offset, 1,
5412 "%s : Type of number: %s",
5423 case 0: str = "Unknown"; break;
5424 case 1: str = "ISDN/telephony numbering plan (Rec. E.164/E.163)"; break;
5425 case 3: str = "Data numbering plan (Recommendation X.121)"; break;
5426 case 4: str = "Telex numbering plan (Recommendation F.69)"; break;
5427 case 8: str = "National numbering plan"; break;
5428 case 9: str = "Private numbering plan"; break;
5429 case 11: str = "Reserved for CTS (see 3GPP TS 44.056)"; break;
5430 case 15: str = "Reserved for extension"; break;
5438 str = "not applicable";
5441 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
5442 proto_tree_add_text(tree,
5443 tvb, curr_offset, 1,
5444 "%s : Numbering plan identification: %s",
5450 NO_MORE_DATA_CHECK(len);
5452 poctets = tvb_get_string(tvb, curr_offset, len - (curr_offset - offset));
5454 my_dgt_tbcd_unpack(a_bigbuf, poctets, len - (curr_offset - offset),
5458 proto_tree_add_string_format(tree, hf_gsm_a_cld_party_bcd_num,
5459 tvb, curr_offset, len - (curr_offset - offset),
5464 curr_offset += len - (curr_offset - offset);
5466 sprintf(add_string, " - (%s)", a_bigbuf);
5468 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
5470 return(curr_offset - offset);
5477 de_cld_party_sub_addr(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
5480 guint32 curr_offset;
5483 add_string = add_string;
5484 curr_offset = offset;
5486 oct = tvb_get_guint8(tvb, curr_offset);
5488 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
5489 proto_tree_add_text(tree,
5490 tvb, curr_offset, 1,
5494 switch ((oct & 0x70) >> 4)
5496 case 0: str = "NSAP (X.213/ISO 8348 AD2)"; break;
5497 case 2: str = "User specified"; break;
5503 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
5504 proto_tree_add_text(tree,
5505 tvb, curr_offset, 1,
5506 "%s : Type of subaddress: %s",
5510 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
5511 proto_tree_add_text(tree,
5512 tvb, curr_offset, 1,
5513 "%s : Odd/Even indicator: %s",
5516 "odd number of address signals" : "even number of address signals");
5518 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
5519 proto_tree_add_text(tree,
5520 tvb, curr_offset, 1,
5526 NO_MORE_DATA_CHECK(len);
5528 proto_tree_add_text(tree,
5529 tvb, curr_offset, len - (curr_offset - offset),
5530 "Subaddress information");
5532 curr_offset += len - (curr_offset - offset);
5534 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
5536 return(curr_offset - offset);
5543 de_clg_party_bcd_num(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
5548 guint32 curr_offset;
5551 curr_offset = offset;
5553 oct = tvb_get_guint8(tvb, curr_offset);
5555 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
5556 proto_tree_add_text(tree,
5557 tvb, curr_offset, 1,
5561 ton = (oct & 0x70) >> 4;
5564 case 0: str = "Unknown"; break;
5565 case 1: str = "International number"; break;
5566 case 2: str = "National number"; break;
5567 case 3: str = "Network specific number"; break;
5568 case 4: str = "Dedicated access, short code"; break;
5569 case 7: str = "Reserved for extension"; break;
5575 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
5576 proto_tree_add_text(tree,
5577 tvb, curr_offset, 1,
5578 "%s : Type of number: %s",
5589 case 0: str = "Unknown"; break;
5590 case 1: str = "ISDN/telephony numbering plan (Rec. E.164/E.163)"; break;
5591 case 3: str = "Data numbering plan (Recommendation X.121)"; break;
5592 case 4: str = "Telex numbering plan (Recommendation F.69)"; break;
5593 case 8: str = "National numbering plan"; break;
5594 case 9: str = "Private numbering plan"; break;
5595 case 11: str = "Reserved for CTS (see 3GPP TS 44.056)"; break;
5596 case 15: str = "Reserved for extension"; break;
5604 str = "not applicable";
5607 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
5608 proto_tree_add_text(tree,
5609 tvb, curr_offset, 1,
5610 "%s : Numbering plan identification: %s",
5616 oct = tvb_get_guint8(tvb, curr_offset);
5618 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
5619 proto_tree_add_text(tree,
5620 tvb, curr_offset, 1,
5624 switch ((oct & 0x60) >> 5)
5626 case 0: str = "Presentation allowed"; break;
5627 case 1: str = "Presentation restricted"; break;
5628 case 2: str = "Number not available due to interworking"; break;
5634 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
5635 proto_tree_add_text(tree,
5636 tvb, curr_offset, 1,
5637 "%s : Presentation indicator: %s",
5641 other_decode_bitfield_value(a_bigbuf, oct, 0x1c, 8);
5642 proto_tree_add_text(tree,
5643 tvb, curr_offset, 1,
5649 case 0: str = "User-provided, not screened"; break;
5650 case 1: str = "User-provided, verified and passed"; break;
5651 case 2: str = "User-provided, verified and failed"; break;
5653 str = "Network provided";
5657 other_decode_bitfield_value(a_bigbuf, oct, 0x03, 8);
5658 proto_tree_add_text(tree,
5659 tvb, curr_offset, 1,
5660 "%s : Screening indicator: %s",
5666 NO_MORE_DATA_CHECK(len);
5668 poctets = tvb_get_string(tvb, curr_offset, len - (curr_offset - offset));
5670 my_dgt_tbcd_unpack(a_bigbuf, poctets, len - (curr_offset - offset),
5674 proto_tree_add_string_format(tree, hf_gsm_a_clg_party_bcd_num,
5675 tvb, curr_offset, len - (curr_offset - offset),
5680 curr_offset += len - (curr_offset - offset);
5682 sprintf(add_string, " - (%s)", a_bigbuf);
5684 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
5686 return(curr_offset - offset);
5693 de_clg_party_sub_addr(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
5696 guint32 curr_offset;
5699 add_string = add_string;
5700 curr_offset = offset;
5702 oct = tvb_get_guint8(tvb, curr_offset);
5704 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
5705 proto_tree_add_text(tree,
5706 tvb, curr_offset, 1,
5710 switch ((oct & 0x70) >> 4)
5712 case 0: str = "NSAP (X.213/ISO 8348 AD2)"; break;
5713 case 2: str = "User specified"; break;
5719 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
5720 proto_tree_add_text(tree,
5721 tvb, curr_offset, 1,
5722 "%s : Type of subaddress: %s",
5726 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
5727 proto_tree_add_text(tree,
5728 tvb, curr_offset, 1,
5729 "%s : Odd/Even indicator: %s",
5732 "odd number of address signals" : "even number of address signals");
5734 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
5735 proto_tree_add_text(tree,
5736 tvb, curr_offset, 1,
5742 NO_MORE_DATA_CHECK(len);
5744 proto_tree_add_text(tree,
5745 tvb, curr_offset, len - (curr_offset - offset),
5746 "Subaddress information");
5748 curr_offset += len - (curr_offset - offset);
5750 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
5752 return(curr_offset - offset);
5759 de_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
5763 guint32 curr_offset;
5766 curr_offset = offset;
5768 oct = tvb_get_guint8(tvb, curr_offset);
5770 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
5771 proto_tree_add_text(tree,
5772 tvb, curr_offset, 1,
5773 "%s : Extension: %s",
5775 (oct & 0x80) ? "not extended" : "extended");
5777 switch ((oct & 0x60) >> 5)
5779 case 0: str = "Coding as specified in ITU-T Rec. Q.931"; break;
5780 case 1: str = "Reserved for other international standards"; break;
5781 case 2: str = "National standard"; break;
5783 str = "Standard defined for the GSM PLMNS";
5787 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
5788 proto_tree_add_text(tree,
5789 tvb, curr_offset, 1,
5790 "%s : Coding standard: %s",
5794 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
5795 proto_tree_add_text(tree,
5796 tvb, curr_offset, 1,
5802 case 0: str = "User"; break;
5803 case 1: str = "Private network serving the local user"; break;
5804 case 2: str = "Public network serving the local user"; break;
5805 case 3: str = "Transit network"; break;
5806 case 4: str = "Public network serving the remote user"; break;
5807 case 5: str = "Private network serving the remote user"; break;
5808 case 7: str = "International network"; break;
5809 case 10: str = "Network beyond interworking point"; break;
5815 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
5816 proto_tree_add_text(tree,
5817 tvb, curr_offset, 1,
5818 "%s : Location: %s",
5824 oct = tvb_get_guint8(tvb, curr_offset);
5828 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
5829 proto_tree_add_text(tree,
5830 tvb, curr_offset, 1,
5834 other_decode_bitfield_value(a_bigbuf, oct, 0x7f, 8);
5835 proto_tree_add_text(tree,
5836 tvb, curr_offset, 1,
5837 "%s : Recommendation",
5842 oct = tvb_get_guint8(tvb, curr_offset);
5845 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
5846 proto_tree_add_text(tree,
5847 tvb, curr_offset, 1,
5854 case 1: str = "Unassigned (unallocated) number"; break;
5855 case 3: str = "No route to destination"; break;
5856 case 6: str = "Channel unacceptable"; break;
5857 case 8: str = "Operator determined barring"; break;
5858 case 16: str = "Normal call clearing"; break;
5859 case 17: str = "User busy"; break;
5860 case 18: str = "No user responding"; break;
5861 case 19: str = "User alerting, no answer"; break;
5862 case 21: str = "Call rejected"; break;
5863 case 22: str = "Number changed"; break;
5864 case 25: str = "Pre-emption"; break;
5865 case 26: str = "Non selected user clearing"; break;
5866 case 27: str = "Destination out of order"; break;
5867 case 28: str = "Invalid number format (incomplete number)"; break;
5868 case 29: str = "Facility rejected"; break;
5869 case 30: str = "Response to STATUS ENQUIRY"; break;
5870 case 31: str = "Normal, unspecified"; break;
5871 case 34: str = "No circuit/channel available"; break;
5872 case 38: str = "Network out of order"; break;
5873 case 41: str = "Temporary failure"; break;
5874 case 42: str = "Switching equipment congestion"; break;
5875 case 43: str = "Access information discarded"; break;
5876 case 44: str = "requested circuit/channel not available"; break;
5877 case 47: str = "Resources unavailable, unspecified"; break;
5878 case 49: str = "Quality of service unavailable"; break;
5879 case 50: str = "Requested facility not subscribed"; break;
5880 case 55: str = "Incoming calls barred within the CUG"; break;
5881 case 57: str = "Bearer capability not authorized"; break;
5882 case 58: str = "Bearer capability not presently available"; break;
5883 case 63: str = "Service or option not available, unspecified"; break;
5884 case 65: str = "Bearer service not implemented"; break;
5885 case 68: str = "ACM equal to or greater than ACMmax"; break;
5886 case 69: str = "Requested facility not implemented"; break;
5887 case 70: str = "Only restricted digital information bearer capability is available"; break;
5888 case 79: str = "Service or option not implemented, unspecified"; break;
5889 case 81: str = "Invalid transaction identifier value"; break;
5890 case 87: str = "User not member of CUG"; break;
5891 case 88: str = "Incompatible destination"; break;
5892 case 91: str = "Invalid transit network selection"; break;
5893 case 95: str = "Semantically incorrect message"; break;
5894 case 96: str = "Invalid mandatory information"; break;
5895 case 97: str = "Message type non-existent or not implemented"; break;
5896 case 98: str = "Message type not compatible with protocol state"; break;
5897 case 99: str = "Information element non-existent or not implemented"; break;
5898 case 100: str = "Conditional IE error"; break;
5899 case 101: str = "Message not compatible with protocol state"; break;
5900 case 102: str = "Recovery on timer expiry"; break;
5901 case 111: str = "Protocol error, unspecified"; break;
5902 case 127: str = "Interworking, unspecified"; break;
5904 if (cause <= 31) { str = "Treat as Normal, unspecified"; }
5905 else if ((cause >= 32) && (cause <= 47)) { str = "Treat as Resources unavailable, unspecified"; }
5906 else if ((cause >= 48) && (cause <= 63)) { str = "Treat as Service or option not available, unspecified"; }
5907 else if ((cause >= 64) && (cause <= 79)) { str = "Treat as Service or option not implemented, unspecified"; }
5908 else if ((cause >= 80) && (cause <= 95)) { str = "Treat as Semantically incorrect message"; }
5909 else if ((cause >= 96) && (cause <= 111)) { str = "Treat as Protocol error, unspecified"; }
5910 else if ((cause >= 112) && (cause <= 127)) { str = "Treat as Interworking, unspecified"; }
5914 other_decode_bitfield_value(a_bigbuf, oct, 0x7f, 8);
5915 proto_tree_add_text(tree,
5916 tvb, curr_offset, 1,
5917 "%s : Cause: (%u) %s",
5924 sprintf(add_string, " - (%u) %s", cause, str);
5926 NO_MORE_DATA_CHECK(len);
5928 proto_tree_add_text(tree,
5929 tvb, curr_offset, len - (curr_offset - offset),
5932 curr_offset += len - (curr_offset - offset);
5934 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
5936 return(curr_offset - offset);
5943 de_keypad_facility(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
5946 guint32 curr_offset;
5950 curr_offset = offset;
5952 oct = tvb_get_guint8(tvb, curr_offset);
5954 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
5955 proto_tree_add_text(tree,
5956 tvb, curr_offset, 1,
5960 switch ((oct & 0x60) >> 5)
5962 case 0: str = "Coding as specified in ITU-T Rec. Q.931"; break;
5963 case 1: str = "Reserved for other international standards"; break;
5964 case 2: str = "National standard"; break;
5966 str = "Standard defined for the GSM PLMNS";
5970 other_decode_bitfield_value(a_bigbuf, oct, 0x7f, 8);
5971 proto_tree_add_text(tree,
5972 tvb, curr_offset, 1,
5973 "%s : Keypad information: %c",
5979 sprintf(add_string, " - %c", oct & 0x7f);
5981 /* no length check possible */
5983 return(curr_offset - offset);
5990 de_repeat_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
5993 guint32 curr_offset;
5997 add_string = add_string;
5998 curr_offset = offset;
6000 oct = tvb_get_guint8(tvb, curr_offset);
6004 case 1: str = "Circular for successive selection 'mode 1 alternate mode 2'"; break;
6005 case 2: str = "Support of fallback mode 1 preferred, mode 2 selected if setup of mode 1 fails"; break;
6006 case 3: str = "Reserved: was allocated in earlier phases of the protocol"; break;
6012 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
6013 proto_tree_add_text(tree,
6014 tvb, curr_offset, 1,
6021 /* no length check possible */
6023 return(curr_offset - offset);
6030 de_ss_ver_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
6033 guint32 curr_offset;
6036 add_string = add_string;
6037 curr_offset = offset;
6039 oct = tvb_get_guint8(tvb, curr_offset);
6043 case 0: str = "Phase 2 service, ellipsis notation, and phase 2 error handling is supported"; break;
6044 case 1: str = "SS-Protocol version 3 is supported, and phase 2 error handling is supported"; break;
6050 proto_tree_add_text(tree,
6051 tvb, curr_offset, 1,
6057 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
6059 return(curr_offset - offset);
6066 de_cp_user_data(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
6068 guint32 curr_offset;
6071 add_string = add_string;
6072 curr_offset = offset;
6074 proto_tree_add_text(tree, tvb, curr_offset, len,
6078 * dissect the embedded RP message
6080 rp_tvb = tvb_new_subset(tvb, curr_offset, len, len);
6082 call_dissector(rp_handle, rp_tvb, g_pinfo, g_tree);
6086 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
6088 return(curr_offset - offset);
6095 de_cp_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
6098 guint32 curr_offset;
6102 curr_offset = offset;
6104 oct = tvb_get_guint8(tvb, curr_offset);
6108 case 17: str = "Network failure"; break;
6109 case 22: str = "Congestion"; break;
6110 case 81: str = "Invalid Transaction Identifier value"; break;
6111 case 95: str = "Semantically incorrect message"; break;
6112 case 96: str = "Invalid mandatory information"; break;
6113 case 97: str = "Message type non-existent or not implemented"; break;
6114 case 98: str = "Message not compatible with the short message protocol state"; break;
6115 case 99: str = "Information element non-existent or not implemented"; break;
6116 case 111: str = "Protocol error, unspecified"; break;
6118 str = "Reserved, treat as Protocol error, unspecified";
6122 proto_tree_add_text(tree,
6123 tvb, curr_offset, 1,
6130 sprintf(add_string, " - (%u) %s", oct, str);
6132 /* no length check possible */
6134 return(curr_offset - offset);
6141 de_rp_message_ref(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
6144 guint32 curr_offset;
6147 add_string = add_string;
6148 curr_offset = offset;
6150 oct = tvb_get_guint8(tvb, curr_offset);
6152 proto_tree_add_text(tree,
6153 tvb, curr_offset, 1,
6154 "RP-Message Reference: 0x%02x (%u)",
6160 /* no length check possible */
6162 return(curr_offset - offset);
6169 de_rp_orig_addr(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
6171 return(de_cld_party_bcd_num(tvb, tree, offset, len, add_string));
6178 de_rp_dest_addr(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
6180 return(de_cld_party_bcd_num(tvb, tree, offset, len, add_string));
6187 de_rp_user_data(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
6189 guint32 curr_offset;
6192 add_string = add_string;
6193 curr_offset = offset;
6195 proto_tree_add_text(tree, tvb, curr_offset, len,
6199 * dissect the embedded TPDU message
6201 tpdu_tvb = tvb_new_subset(tvb, curr_offset, len, len);
6203 dissector_try_port(sms_dissector_table, gsm_a_rp_type, tpdu_tvb, g_pinfo, g_tree);
6207 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
6209 return(curr_offset - offset);
6216 de_rp_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
6219 guint32 curr_offset;
6222 curr_offset = offset;
6224 oct = tvb_get_guint8(tvb, curr_offset);
6226 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
6227 proto_tree_add_text(tree,
6228 tvb, curr_offset, 1,
6229 "%s : Extension: %s",
6231 (oct & 0x80) ? "extended" : "not extended");
6235 case 1: str = "Unassigned (unallocated) number"; break;
6236 case 8: str = "Operator determined barring"; break;
6237 case 10: str = "Call barred"; break;
6238 case 11: str = "Reserved"; break;
6239 case 21: str = "Short message transfer rejected"; break;
6240 case 22: str = "Memory capacity exceeded"; break;
6241 case 27: str = "Destination out of order"; break;
6242 case 28: str = "Unidentified subscriber"; break;
6243 case 29: str = "Facility rejected"; break;
6244 case 30: str = "Unknown subscriber"; break;
6245 case 38: str = "Network out of order"; break;
6246 case 41: str = "Temporary failure"; break;
6247 case 42: str = "Congestion"; break;
6248 case 47: str = "Resources unavailable, unspecified"; break;
6249 case 50: str = "Requested facility not subscribed"; break;
6250 case 69: str = "Requested facility not implemented"; break;
6251 case 81: str = "Invalid short message transfer reference value"; break;
6252 case 95: str = "Semantically incorrect message"; break;
6253 case 96: str = "Invalid mandatory information"; break;
6254 case 97: str = "Message type non-existent or not implemented"; break;
6255 case 98: str = "Message not compatible with short message protocol state"; break;
6256 case 99: str = "Information element non-existent or not implemented"; break;
6257 case 111: str = "Protocol error, unspecified"; break;
6258 case 127: str = "Interworking, unspecified"; break;
6264 other_decode_bitfield_value(a_bigbuf, oct, 0x7f, 8);
6265 proto_tree_add_text(tree,
6266 tvb, curr_offset, 1,
6267 "%s : Cause: (%u) %s",
6274 sprintf(add_string, " - (%u) %s", oct & 0x7f, str);
6276 NO_MORE_DATA_CHECK(len);
6278 proto_tree_add_text(tree,
6279 tvb, curr_offset, len - (curr_offset - offset),
6280 "Diagnostic field");
6282 curr_offset += len - (curr_offset - offset);
6284 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
6286 return(curr_offset - offset);
6289 static guint8 (*bssmap_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string) = {
6290 be_cic, /* Circuit Identity Code */
6291 NULL, /* Reserved */
6292 NULL, /* Resource Available */
6293 be_cause, /* Cause */
6294 be_cell_id, /* Cell Identifier */
6295 be_prio, /* Priority */
6296 be_l3_header_info, /* Layer 3 Header Information */
6299 be_enc_info, /* Encryption Information */
6300 be_chan_type, /* Channel Type */
6301 NULL, /* Periodicity */
6302 NULL, /* Extended Resource Indicator */
6303 NULL, /* Number Of MSs */
6304 NULL, /* Reserved */
6305 NULL, /* Reserved */
6306 NULL, /* Reserved */
6307 de_ms_cm_2, /* Classmark Information Type 2 */
6308 NULL, /* Classmark Information Type 3 */
6309 NULL, /* Interference Band To Be Used */
6310 de_rr_cause, /* RR Cause */
6311 NULL, /* Reserved */
6312 be_l3_info, /* Layer 3 Information */
6314 be_down_dtx_flag, /* Downlink DTX Flag */
6315 be_cell_id_list, /* Cell Identifier List */
6316 NULL /* no associated data */, /* Response Request */
6317 NULL, /* Resource Indication Method */
6318 de_ms_cm_1, /* Classmark Information Type 1 */
6319 NULL, /* Circuit Identity Code List */
6320 NULL, /* Diagnostic */
6321 be_l3_msg, /* Layer 3 Message Contents */
6322 be_chosen_chan, /* Chosen Channel */
6323 NULL, /* Total Resource Accessible */
6324 be_ciph_resp_mode, /* Cipher Response Mode */
6325 NULL, /* Channel Needed */
6326 NULL, /* Trace Type */
6327 NULL, /* TriggerID */
6328 NULL, /* Trace Reference */
6329 NULL, /* TransactionID */
6330 de_mid, /* Mobile Identity */
6332 be_for_ind, /* Forward Indicator */
6333 be_chosen_enc_alg, /* Chosen Encryption Algorithm */
6334 be_cct_pool, /* Circuit Pool */
6335 NULL, /* Circuit Pool List */
6336 NULL, /* Time Indication */
6337 NULL, /* Resource Situation */
6338 be_curr_chan_1, /* Current Channel Type 1 */
6339 be_que_ind, /* Queueing Indicator */
6340 be_speech_ver, /* Speech Version */
6341 NULL, /* Assignment Requirement */
6342 NULL /* no associated data */, /* Talker Flag */
6343 NULL /* no associated data */, /* Connection Release Requested */
6344 NULL, /* Group Call Reference */
6345 NULL, /* eMLPP Priority */
6346 NULL, /* Configuration Evolution Indication */
6347 NULL /* no decode required */, /* Old BSS to New BSS Information */
6348 NULL, /* LSA Identifier */
6349 NULL, /* LSA Identifier List */
6350 NULL, /* LSA Information */
6352 NULL, /* LSA access control suppression */
6353 NULL, /* LCS Priority */
6354 NULL, /* Location Type */
6355 NULL, /* Location Estimate */
6356 NULL, /* Positioning Data */
6357 NULL, /* LCS Cause */
6358 NULL, /* LCS Client Type */
6360 NULL, /* Network Element Identity */
6361 NULL, /* GPS Assistance Data */
6362 NULL, /* Deciphering Keys */
6363 NULL, /* Return Error Request */
6364 NULL, /* Return Error Cause */
6365 NULL, /* Segmentation */
6369 static guint8 (*dtap_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string) = {
6370 /* Common Information Elements 10.5.1 */
6371 de_cell_id, /* Cell Identity */
6372 NULL /* handled inline */, /* Ciphering Key Sequence Number */
6373 de_lai, /* Location Area Identification */
6374 de_mid, /* Mobile Identity */
6375 de_ms_cm_1, /* Mobile Station Classmark 1 */
6376 de_ms_cm_2, /* Mobile Station Classmark 2 */
6377 NULL, /* Mobile Station Classmark 3 */
6378 de_d_gb_call_ref, /* Descriptive group or broadcast call reference */
6379 NULL /* handled inline */, /* Group Cipher Key Number */
6380 de_pd_sapi, /* PD and SAPI $(CCBS)$ */
6381 de_prio /* handled inline */, /* Priority Level */
6382 de_plmn_list, /* PLMN List */
6383 /* Radio Resource Management Information Elements 10.5.2, most are from 10.5.1 */
6384 de_rr_cause, /* RR Cause */
6385 /* Mobility Management Information Elements 10.5.3 */
6386 de_auth_param_rand, /* Authentication Parameter RAND */
6387 de_auth_param_autn, /* Authentication Parameter AUTN (UMTS authentication challenge only) */
6388 de_auth_resp_param, /* Authentication Response Parameter */
6389 de_auth_resp_param_ext, /* Authentication Response Parameter (extension) (UMTS authentication challenge only) */
6390 de_auth_fail_param, /* Authentication Failure Parameter (UMTS authentication challenge only) */
6391 NULL /* handled inline */, /* CM Service Type */
6392 NULL /* handled inline */, /* Identity Type */
6393 NULL /* handled inline */, /* Location Updating Type */
6394 de_network_name, /* Network Name */
6395 de_rej_cause, /* Reject Cause */
6396 NULL /* no associated data */, /* Follow-on Proceed */
6397 de_time_zone, /* Time Zone */
6398 de_time_zone_time, /* Time Zone and Time */
6399 NULL /* no associated data */, /* CTS Permission */
6400 de_lsa_id, /* LSA Identifier */
6401 de_day_saving_time, /* Daylight Saving Time */
6402 /* Call Control Information Elements 10.5.4 */
6403 de_aux_states, /* Auxiliary States */
6404 de_bearer_cap, /* Bearer Capability */
6405 de_cc_cap, /* Call Control Capabilities */
6406 de_call_state, /* Call State */
6407 de_cld_party_bcd_num, /* Called Party BCD Number */
6408 de_cld_party_sub_addr, /* Called Party Subaddress */
6409 de_clg_party_bcd_num, /* Calling Party BCD Number */
6410 de_clg_party_sub_addr, /* Calling Party Subaddress */
6411 de_cause, /* Cause */
6412 NULL /* no associated data */, /* CLIR Suppression */
6413 NULL /* no associated data */, /* CLIR Invocation */
6414 NULL /* handled inline */, /* Congestion Level */
6415 NULL, /* Connected Number */
6416 NULL, /* Connected Subaddress */
6417 NULL, /* Facility */
6418 NULL, /* High Layer Compatibility */
6419 de_keypad_facility, /* Keypad Facility */
6420 NULL, /* Low Layer Compatibility */
6421 NULL, /* More Data */
6422 NULL, /* Notification Indicator */
6423 NULL, /* Progress Indicator */
6424 NULL, /* Recall type $(CCBS)$ */
6425 NULL, /* Redirecting Party BCD Number */
6426 NULL, /* Redirecting Party Subaddress */
6427 de_repeat_ind, /* Repeat Indicator */
6428 NULL /* no associated data */, /* Reverse Call Setup Direction */
6429 NULL, /* SETUP Container $(CCBS)$ */
6431 de_ss_ver_ind, /* SS Version Indicator */
6432 NULL, /* User-user */
6433 NULL, /* Alerting Pattern $(NIA)$ */
6434 NULL, /* Allowed Actions $(CCBS)$ */
6435 NULL, /* Stream Identifier */
6436 NULL, /* Network Call Control Capabilities */
6437 NULL, /* Cause of No CLI */
6438 NULL, /* Immediate Modification Indicator */
6439 NULL, /* Supported Codec List */
6440 NULL, /* Service Category */
6441 /* GPRS Mobility Management Information Elements 10.5.5 */
6442 NULL, /* Attach Result */
6443 NULL, /* Attach Type */
6444 NULL, /* TMSI Status */
6445 NULL, /* Detach Type */
6446 NULL, /* DRX Parameter */
6447 NULL, /* Force to Standby */
6448 NULL, /* P-TMSI Signature */
6449 NULL, /* P-TMSI Signature 2 */
6450 NULL, /* Identity Type 2 */
6451 NULL, /* IMEISV Request */
6452 NULL, /* Receive N-PDU Numbers List */
6453 NULL, /* MS Network Capability */
6454 NULL, /* MS Radio Access Capability */
6455 NULL, /* GMM Cause */
6456 NULL, /* Routing Area Identification */
6457 NULL, /* Update Result */
6458 NULL, /* A&C Reference Number */
6459 NULL, /* Service Type */
6460 NULL, /* Cell Notification */
6461 NULL, /* Network Feature Support */
6462 /* Short Message Service Information Elements [5] 8.1.4 */
6463 de_cp_user_data, /* CP-User Data */
6464 de_cp_cause, /* CP-Cause */
6465 /* Short Message Service Information Elements [5] 8.2 */
6466 de_rp_message_ref, /* RP-Message Reference */
6467 de_rp_orig_addr, /* RP-Origination Address */
6468 de_rp_dest_addr, /* RP-Destination Address */
6469 de_rp_user_data, /* RP-User Data */
6470 de_rp_cause, /* RP-Cause */
6471 /* Session Management Information Elements 10.5.6 */
6472 NULL, /* Access Point Name */
6473 NULL, /* Network Service Access Point Identifier */
6474 NULL, /* Protocol Configuration Options */
6475 NULL, /* Packet Data Protocol Address */
6476 NULL, /* Quality Of Service */
6477 NULL, /* SM Cause */
6478 NULL, /* Linked TI */
6479 NULL, /* LLC Service Access Point Identifier */
6480 NULL, /* Tear Down Indicator */
6481 NULL, /* Packet Flow Identifier */
6482 NULL, /* Traffic Flow Template */
6483 /* GPRS Common Information Elements 10.5.7 */
6484 NULL, /* PDP Context Status */
6485 NULL, /* Radio Priority */
6486 NULL, /* GPRS Timer */
6487 NULL, /* GPRS Timer 2 */
6491 #define SET_ELEM_VARS(SEV_pdu_type, SEV_elem_names, SEV_elem_ett, SEV_elem_funcs) \
6492 switch (SEV_pdu_type) \
6494 case BSSAP_PDU_TYPE_BSSMAP: \
6495 SEV_elem_names = gsm_bssmap_elem_strings; \
6496 SEV_elem_ett = ett_gsm_bssmap_elem; \
6497 SEV_elem_funcs = bssmap_elem_fcn; \
6499 case BSSAP_PDU_TYPE_DTAP: \
6500 SEV_elem_names = gsm_dtap_elem_strings; \
6501 SEV_elem_ett = ett_gsm_dtap_elem; \
6502 SEV_elem_funcs = dtap_elem_fcn; \
6505 proto_tree_add_text(tree, \
6506 tvb, curr_offset, -1, \
6507 "Unknown PDU type (%u)", SEV_pdu_type); \
6512 * Type Length Value (TLV) element dissector
6515 elem_tlv(tvbuff_t *tvb, proto_tree *tree, guint8 iei, gint pdu_type, int idx, guint32 offset, guint len, gchar *name_add)
6517 guint8 oct, parm_len;
6519 guint32 curr_offset;
6520 proto_tree *subtree;
6522 const value_string *elem_names;
6524 guint8 (**elem_funcs)(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string);
6527 curr_offset = offset;
6530 SET_ELEM_VARS(pdu_type, elem_names, elem_ett, elem_funcs);
6532 oct = tvb_get_guint8(tvb, curr_offset);
6536 parm_len = tvb_get_guint8(tvb, curr_offset + 1);
6539 proto_tree_add_text(tree,
6540 tvb, curr_offset, parm_len + 2,
6542 elem_names[idx].strptr,
6543 (name_add == NULL) || (name_add[0] == '\0') ? "" : name_add);
6545 subtree = proto_item_add_subtree(item, elem_ett[idx]);
6547 proto_tree_add_uint(subtree,
6548 (BSSAP_PDU_TYPE_BSSMAP == pdu_type) ? hf_gsm_a_bssmap_elem_id : hf_gsm_a_dtap_elem_id, tvb,
6549 curr_offset, 1, oct);
6551 proto_tree_add_uint(subtree, hf_gsm_a_length, tvb,
6552 curr_offset + 1, 1, parm_len);
6556 if (elem_funcs[idx] == NULL)
6558 proto_tree_add_text(subtree,
6559 tvb, curr_offset + 2, parm_len,
6562 consumed = parm_len;
6566 a_add_string[0] = '\0';
6568 (*elem_funcs[idx])(tvb, subtree, curr_offset + 2,
6569 parm_len, a_add_string);
6571 if (a_add_string[0] != '\0')
6573 proto_item_append_text(item, a_add_string);
6574 a_add_string[0] = '\0';
6586 * Type Value (TV) element dissector
6588 * Length cannot be used in these functions, big problem if a element dissector
6589 * is not defined for these.
6592 elem_tv(tvbuff_t *tvb, proto_tree *tree, guint8 iei, gint pdu_type, int idx, guint32 offset, gchar *name_add)
6596 guint32 curr_offset;
6597 proto_tree *subtree;
6599 const value_string *elem_names;
6601 guint8 (**elem_funcs)(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string);
6603 curr_offset = offset;
6606 SET_ELEM_VARS(pdu_type, elem_names, elem_ett, elem_funcs);
6608 oct = tvb_get_guint8(tvb, curr_offset);
6613 proto_tree_add_text(tree,
6614 tvb, curr_offset, -1,
6616 elem_names[idx].strptr,
6617 (name_add == NULL) || (name_add[0] == '\0') ? "" : name_add);
6619 subtree = proto_item_add_subtree(item, elem_ett[idx]);
6621 proto_tree_add_uint(subtree,
6622 (BSSAP_PDU_TYPE_BSSMAP == pdu_type) ? hf_gsm_a_bssmap_elem_id : hf_gsm_a_dtap_elem_id, tvb,
6623 curr_offset, 1, oct);
6625 if (elem_funcs[idx] == NULL)
6627 /* BAD THING, CANNOT DETERMINE LENGTH */
6629 proto_tree_add_text(subtree,
6630 tvb, curr_offset + 1, 1,
6631 "No element dissector, rest of dissection may be incorrect");
6637 a_add_string[0] = '\0';
6638 consumed = (*elem_funcs[idx])(tvb, subtree, curr_offset + 1, -1, a_add_string);
6640 if (a_add_string[0] != '\0')
6642 proto_item_append_text(item, a_add_string);
6643 a_add_string[0] = '\0';
6649 proto_item_set_len(item, consumed);
6656 * Type Value (TV) element dissector
6657 * Where top half nibble is IEI and bottom half nibble is value.
6659 * Length cannot be used in these functions, big problem if a element dissector
6660 * is not defined for these.
6663 elem_tv_short(tvbuff_t *tvb, proto_tree *tree, guint8 iei, gint pdu_type, int idx, guint32 offset, gchar *name_add)
6667 guint32 curr_offset;
6668 proto_tree *subtree;
6670 const value_string *elem_names;
6672 guint8 (**elem_funcs)(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string);
6674 curr_offset = offset;
6677 SET_ELEM_VARS(pdu_type, elem_names, elem_ett, elem_funcs);
6679 oct = tvb_get_guint8(tvb, curr_offset);
6681 if ((oct & 0xf0) == (iei & 0xf0))
6684 proto_tree_add_text(tree,
6685 tvb, curr_offset, -1,
6687 elem_names[idx].strptr,
6688 (name_add == NULL) || (name_add[0] == '\0') ? "" : name_add);
6690 subtree = proto_item_add_subtree(item, elem_ett[idx]);
6692 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
6693 proto_tree_add_text(subtree,
6694 tvb, curr_offset, 1,
6698 if (elem_funcs[idx] == NULL)
6700 /* BAD THING, CANNOT DETERMINE LENGTH */
6702 proto_tree_add_text(subtree,
6703 tvb, curr_offset, 1,
6704 "No element dissector, rest of dissection may be incorrect");
6710 a_add_string[0] = '\0';
6711 consumed = (*elem_funcs[idx])(tvb, subtree, curr_offset, -1, a_add_string);
6713 if (a_add_string[0] != '\0')
6715 proto_item_append_text(item, a_add_string);
6716 a_add_string[0] = '\0';
6720 proto_item_set_len(item, consumed);
6727 * Type (T) element dissector
6730 elem_t(tvbuff_t *tvb, proto_tree *tree, guint8 iei, gint pdu_type, int idx, guint32 offset, gchar *name_add)
6733 guint32 curr_offset;
6735 const value_string *elem_names;
6737 guint8 (**elem_funcs)(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string);
6739 curr_offset = offset;
6742 SET_ELEM_VARS(pdu_type, elem_names, elem_ett, elem_funcs);
6744 oct = tvb_get_guint8(tvb, curr_offset);
6748 proto_tree_add_uint_format(tree,
6749 (BSSAP_PDU_TYPE_BSSMAP == pdu_type) ? hf_gsm_a_bssmap_elem_id : hf_gsm_a_dtap_elem_id, tvb,
6750 curr_offset, 1, oct,
6752 elem_names[idx].strptr,
6753 (name_add == NULL) || (name_add[0] == '\0') ? "" : name_add);
6762 * Length Value (LV) element dissector
6765 elem_lv(tvbuff_t *tvb, proto_tree *tree, gint pdu_type, int idx, guint32 offset, guint len, gchar *name_add)
6769 guint32 curr_offset;
6770 proto_tree *subtree;
6772 const value_string *elem_names;
6774 guint8 (**elem_funcs)(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string);
6777 curr_offset = offset;
6780 SET_ELEM_VARS(pdu_type, elem_names, elem_ett, elem_funcs);
6782 parm_len = tvb_get_guint8(tvb, curr_offset);
6785 proto_tree_add_text(tree,
6786 tvb, curr_offset, parm_len + 1,
6788 elem_names[idx].strptr,
6789 (name_add == NULL) || (name_add[0] == '\0') ? "" : name_add);
6791 subtree = proto_item_add_subtree(item, elem_ett[idx]);
6793 proto_tree_add_uint(subtree, hf_gsm_a_length, tvb,
6794 curr_offset, 1, parm_len);
6798 if (elem_funcs[idx] == NULL)
6800 proto_tree_add_text(subtree,
6801 tvb, curr_offset + 1, parm_len,
6804 consumed = parm_len;
6808 a_add_string[0] = '\0';
6810 (*elem_funcs[idx])(tvb, subtree, curr_offset + 1,
6811 parm_len, a_add_string);
6813 if (a_add_string[0] != '\0')
6815 proto_item_append_text(item, a_add_string);
6816 a_add_string[0] = '\0';
6821 return(consumed + 1);
6825 * Value (V) element dissector
6827 * Length cannot be used in these functions, big problem if a element dissector
6828 * is not defined for these.
6831 elem_v(tvbuff_t *tvb, proto_tree *tree, gint pdu_type, int idx, guint32 offset)
6834 guint32 curr_offset;
6835 const value_string *elem_names;
6837 guint8 (**elem_funcs)(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string);
6839 curr_offset = offset;
6842 SET_ELEM_VARS(pdu_type, elem_names, elem_ett, elem_funcs);
6844 if (elem_funcs[idx] == NULL)
6846 /* BAD THING, CANNOT DETERMINE LENGTH */
6848 proto_tree_add_text(tree,
6849 tvb, curr_offset, 1,
6850 "No element dissector, rest of dissection may be incorrect");
6856 a_add_string[0] = '\0';
6857 consumed = (*elem_funcs[idx])(tvb, tree, curr_offset, -1, a_add_string);
6858 a_add_string[0] = '\0';
6864 #define ELEM_MAND_TLV(EMT_iei, EMT_pdu_type, EMT_elem_idx, EMT_elem_name_addition) \
6866 if ((consumed = elem_tlv(tvb, tree, (guint8) EMT_iei, EMT_pdu_type, EMT_elem_idx, curr_offset, curr_len, EMT_elem_name_addition)) > 0) \
6868 curr_offset += consumed; \
6869 curr_len -= consumed; \
6873 proto_tree_add_text(tree, \
6874 tvb, curr_offset, 0, \
6875 "Missing Mandatory element (0x%02x) %s%s, rest of dissection is suspect", \
6877 (EMT_pdu_type == BSSAP_PDU_TYPE_BSSMAP) ? \
6878 gsm_bssmap_elem_strings[EMT_elem_idx].strptr : gsm_dtap_elem_strings[EMT_elem_idx].strptr, \
6879 (EMT_elem_name_addition == NULL) || (EMT_elem_name_addition[0] == '\0') ? "" : EMT_elem_name_addition \
6882 if (curr_len <= 0) return; \
6885 #define ELEM_OPT_TLV(EOT_iei, EOT_pdu_type, EOT_elem_idx, EOT_elem_name_addition) \
6887 if ((consumed = elem_tlv(tvb, tree, (guint8) EOT_iei, EOT_pdu_type, EOT_elem_idx, curr_offset, curr_len, EOT_elem_name_addition)) > 0) \
6889 curr_offset += consumed; \
6890 curr_len -= consumed; \
6892 if (curr_len <= 0) return; \
6895 #define ELEM_MAND_TV(EMT_iei, EMT_pdu_type, EMT_elem_idx, EMT_elem_name_addition) \
6897 if ((consumed = elem_tv(tvb, tree, (guint8) EMT_iei, EMT_pdu_type, EMT_elem_idx, curr_offset, EMT_elem_name_addition)) > 0) \
6899 curr_offset += consumed; \
6900 curr_len -= consumed; \
6904 proto_tree_add_text(tree, \
6905 tvb, curr_offset, 0, \
6906 "Missing Mandatory element (0x%02x) %s%s, rest of dissection is suspect", \
6908 (EMT_pdu_type == BSSAP_PDU_TYPE_BSSMAP) ? \
6909 gsm_bssmap_elem_strings[EMT_elem_idx].strptr : gsm_dtap_elem_strings[EMT_elem_idx].strptr, \
6910 (EMT_elem_name_addition == NULL) || (EMT_elem_name_addition[0] == '\0') ? "" : EMT_elem_name_addition \
6913 if (curr_len <= 0) return; \
6916 #define ELEM_OPT_TV(EOT_iei, EOT_pdu_type, EOT_elem_idx, EOT_elem_name_addition) \
6918 if ((consumed = elem_tv(tvb, tree, (guint8) EOT_iei, EOT_pdu_type, EOT_elem_idx, curr_offset, EOT_elem_name_addition)) > 0) \
6920 curr_offset += consumed; \
6921 curr_len -= consumed; \
6923 if (curr_len <= 0) return; \
6926 #define ELEM_OPT_TV_SHORT(EOT_iei, EOT_pdu_type, EOT_elem_idx, EOT_elem_name_addition) \
6928 if ((consumed = elem_tv_short(tvb, tree, EOT_iei, EOT_pdu_type, EOT_elem_idx, curr_offset, EOT_elem_name_addition)) > 0) \
6930 curr_offset += consumed; \
6931 curr_len -= consumed; \
6933 if (curr_len <= 0) return; \
6936 #define ELEM_OPT_T(EOT_iei, EOT_pdu_type, EOT_elem_idx, EOT_elem_name_addition) \
6938 if ((consumed = elem_t(tvb, tree, (guint8) EOT_iei, EOT_pdu_type, EOT_elem_idx, curr_offset, EOT_elem_name_addition)) > 0) \
6940 curr_offset += consumed; \
6941 curr_len -= consumed; \
6943 if (curr_len <= 0) return; \
6946 #define ELEM_MAND_LV(EML_pdu_type, EML_elem_idx, EML_elem_name_addition) \
6948 if ((consumed = elem_lv(tvb, tree, EML_pdu_type, EML_elem_idx, curr_offset, curr_len, EML_elem_name_addition)) > 0) \
6950 curr_offset += consumed; \
6951 curr_len -= consumed; \
6955 /* Mandatory, but nothing we can do */ \
6957 if (curr_len <= 0) return; \
6960 #define ELEM_MAND_V(EMV_pdu_type, EMV_elem_idx) \
6962 if ((consumed = elem_v(tvb, tree, EMV_pdu_type, EMV_elem_idx, curr_offset)) > 0) \
6964 curr_offset += consumed; \
6965 curr_len -= consumed; \
6969 /* Mandatory, but nothing we can do */ \
6971 if (curr_len <= 0) return; \
6975 /* MESSAGE FUNCTIONS */
6981 bssmap_ass_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
6983 guint32 curr_offset;
6987 curr_offset = offset;
6990 is_uplink = IS_UPLINK_FALSE;
6992 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CHAN_TYPE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CHAN_TYPE, "");
6994 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_L3_HEADER_INFO].value, BSSAP_PDU_TYPE_BSSMAP, BE_L3_HEADER_INFO, "");
6996 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_PRIO].value, BSSAP_PDU_TYPE_BSSMAP, BE_PRIO, "");
6998 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
7000 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_DOWN_DTX_FLAG].value, BSSAP_PDU_TYPE_BSSMAP, BE_DOWN_DTX_FLAG, "");
7002 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_INT_BAND].value, BSSAP_PDU_TYPE_BSSMAP, BE_INT_BAND, "");
7004 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_CM_INFO_2].value, BSSAP_PDU_TYPE_BSSMAP, BE_CM_INFO_2, "");
7006 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_GROUP_CALL_REF].value, BSSAP_PDU_TYPE_BSSMAP, BE_GROUP_CALL_REF, "");
7008 ELEM_OPT_T(gsm_bssmap_elem_strings[BE_TALKER_FLAG].value, BSSAP_PDU_TYPE_BSSMAP, BE_TALKER_FLAG, "");
7010 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_LSA_ACC_CTRL].value, BSSAP_PDU_TYPE_BSSMAP, BE_LSA_ACC_CTRL, "");
7012 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7019 bssmap_ass_complete(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7021 guint32 curr_offset;
7025 curr_offset = offset;
7028 is_uplink = IS_UPLINK_TRUE;
7030 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_RR_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_RR_CAUSE, "");
7032 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
7034 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_CELL_ID].value, BSSAP_PDU_TYPE_BSSMAP, BE_CELL_ID, "");
7036 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CHOSEN_CHAN].value, BSSAP_PDU_TYPE_BSSMAP, BE_CHOSEN_CHAN, "");
7038 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CHOSEN_ENC_ALG].value, BSSAP_PDU_TYPE_BSSMAP, BE_CHOSEN_ENC_ALG, "");
7040 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CCT_POOL].value, BSSAP_PDU_TYPE_BSSMAP, BE_CCT_POOL, "");
7042 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_SPEECH_VER].value, BSSAP_PDU_TYPE_BSSMAP, BE_SPEECH_VER, " (Chosen)");
7044 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_LSA_ID].value, BSSAP_PDU_TYPE_BSSMAP, BE_LSA_ID, "");
7046 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7053 bssmap_ass_failure(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7055 guint32 curr_offset;
7059 curr_offset = offset;
7062 is_uplink = IS_UPLINK_TRUE;
7064 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
7066 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_RR_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_RR_CAUSE, "");
7068 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CCT_POOL].value, BSSAP_PDU_TYPE_BSSMAP, BE_CCT_POOL, "");
7070 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_CCT_POOL_LIST].value, BSSAP_PDU_TYPE_BSSMAP, BE_CCT_POOL_LIST, "");
7072 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7079 bssmap_block(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7081 guint32 curr_offset;
7085 curr_offset = offset;
7088 is_uplink = IS_UPLINK_TRUE;
7090 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
7092 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
7094 ELEM_OPT_T(gsm_bssmap_elem_strings[BE_CONN_REL_REQ].value, BSSAP_PDU_TYPE_BSSMAP, BE_CONN_REL_REQ, "");
7096 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7103 bssmap_block_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7105 guint32 curr_offset;
7109 curr_offset = offset;
7112 is_uplink = IS_UPLINK_TRUE;
7114 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
7116 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7123 bssmap_unblock(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7125 guint32 curr_offset;
7129 curr_offset = offset;
7132 is_uplink = IS_UPLINK_TRUE;
7134 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
7136 ELEM_OPT_T(gsm_bssmap_elem_strings[BE_CONN_REL_REQ].value, BSSAP_PDU_TYPE_BSSMAP, BE_CONN_REL_REQ, "");
7138 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7145 bssmap_unblock_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7147 guint32 curr_offset;
7151 curr_offset = offset;
7154 is_uplink = IS_UPLINK_TRUE;
7156 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
7158 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7165 bssmap_ho_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7167 guint32 curr_offset;
7171 curr_offset = offset;
7174 is_uplink = IS_UPLINK_FALSE;
7176 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CHAN_TYPE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CHAN_TYPE, "");
7178 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_ENC_INFO].value, BSSAP_PDU_TYPE_BSSMAP, BE_ENC_INFO, "");
7180 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CM_INFO_1].value, BSSAP_PDU_TYPE_BSSMAP, BE_CM_INFO_1, "");
7182 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_CM_INFO_2].value, BSSAP_PDU_TYPE_BSSMAP, BE_CM_INFO_2, "");
7184 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CELL_ID].value, BSSAP_PDU_TYPE_BSSMAP, BE_CELL_ID, " (Serving)");
7186 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_PRIO].value, BSSAP_PDU_TYPE_BSSMAP, BE_PRIO, "");
7188 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
7190 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_DOWN_DTX_FLAG].value, BSSAP_PDU_TYPE_BSSMAP, BE_DOWN_DTX_FLAG, "");
7192 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CELL_ID].value, BSSAP_PDU_TYPE_BSSMAP, BE_CELL_ID, " (Target)");
7194 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_INT_BAND].value, BSSAP_PDU_TYPE_BSSMAP, BE_INT_BAND, "");
7196 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
7198 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_CM_INFO_3].value, BSSAP_PDU_TYPE_BSSMAP, BE_CM_INFO_3, "");
7200 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CURR_CHAN_1].value, BSSAP_PDU_TYPE_BSSMAP, BE_CURR_CHAN_1, "");
7202 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_SPEECH_VER].value, BSSAP_PDU_TYPE_BSSMAP, BE_SPEECH_VER, " (Used)");
7204 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_GROUP_CALL_REF].value, BSSAP_PDU_TYPE_BSSMAP, BE_GROUP_CALL_REF, "");
7206 ELEM_OPT_T(gsm_bssmap_elem_strings[BE_TALKER_FLAG].value, BSSAP_PDU_TYPE_BSSMAP, BE_TALKER_FLAG, "");
7208 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CONF_EVO_IND].value, BSSAP_PDU_TYPE_BSSMAP, BE_CONF_EVO_IND, "");
7210 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CHOSEN_ENC_ALG].value, BSSAP_PDU_TYPE_BSSMAP, BE_CHOSEN_ENC_ALG, " (Serving)");
7212 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_OLD2NEW_INFO].value, BSSAP_PDU_TYPE_BSSMAP, BE_OLD2NEW_INFO, "");
7214 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_LSA_INFO].value, BSSAP_PDU_TYPE_BSSMAP, BE_LSA_INFO, "");
7216 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_LSA_ACC_CTRL].value, BSSAP_PDU_TYPE_BSSMAP, BE_LSA_ACC_CTRL, "");
7218 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7225 bssmap_ho_reqd(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7227 guint32 curr_offset;
7231 curr_offset = offset;
7234 is_uplink = IS_UPLINK_TRUE;
7236 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
7238 ELEM_OPT_T(gsm_bssmap_elem_strings[BE_RESP_REQ].value, BSSAP_PDU_TYPE_BSSMAP, BE_RESP_REQ, "");
7240 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CELL_ID_LIST].value, BSSAP_PDU_TYPE_BSSMAP, BE_CELL_ID_LIST, " (Preferred)");
7242 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_CCT_POOL_LIST].value, BSSAP_PDU_TYPE_BSSMAP, BE_CCT_POOL_LIST, "");
7244 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CURR_CHAN_1].value, BSSAP_PDU_TYPE_BSSMAP, BE_CURR_CHAN_1, "");
7246 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_SPEECH_VER].value, BSSAP_PDU_TYPE_BSSMAP, BE_SPEECH_VER, " (Used)");
7248 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_QUE_IND].value, BSSAP_PDU_TYPE_BSSMAP, BE_QUE_IND, "");
7250 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_OLD2NEW_INFO].value, BSSAP_PDU_TYPE_BSSMAP, BE_OLD2NEW_INFO, "");
7252 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7259 bssmap_ho_req_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7261 guint32 curr_offset;
7265 curr_offset = offset;
7268 is_uplink = IS_UPLINK_TRUE;
7270 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_L3_INFO].value, BSSAP_PDU_TYPE_BSSMAP, BE_L3_INFO, "");
7272 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CHOSEN_CHAN].value, BSSAP_PDU_TYPE_BSSMAP, BE_CHOSEN_CHAN, "");
7274 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CHOSEN_ENC_ALG].value, BSSAP_PDU_TYPE_BSSMAP, BE_CHOSEN_ENC_ALG, "");
7276 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CCT_POOL].value, BSSAP_PDU_TYPE_BSSMAP, BE_CCT_POOL, "");
7278 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_SPEECH_VER].value, BSSAP_PDU_TYPE_BSSMAP, BE_SPEECH_VER, " (Chosen)");
7280 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
7282 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_LSA_ID].value, BSSAP_PDU_TYPE_BSSMAP, BE_LSA_ID, "");
7284 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7291 bssmap_ho_cmd(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7293 guint32 curr_offset;
7297 curr_offset = offset;
7300 is_uplink = IS_UPLINK_FALSE;
7302 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_L3_INFO].value, BSSAP_PDU_TYPE_BSSMAP, BE_L3_INFO, "");
7304 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_CELL_ID].value, BSSAP_PDU_TYPE_BSSMAP, BE_CELL_ID, "");
7306 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7313 bssmap_ho_complete(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7315 guint32 curr_offset;
7319 curr_offset = offset;
7322 is_uplink = IS_UPLINK_TRUE;
7324 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_RR_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_RR_CAUSE, "");
7326 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7333 bssmap_ho_cand_enq(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7335 guint32 curr_offset;
7339 curr_offset = offset;
7342 is_uplink = IS_UPLINK_FALSE;
7344 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_NUM_MS].value, BSSAP_PDU_TYPE_BSSMAP, BE_NUM_MS, "");
7346 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CELL_ID_LIST].value, BSSAP_PDU_TYPE_BSSMAP, BE_CELL_ID_LIST, "");
7348 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CELL_ID].value, BSSAP_PDU_TYPE_BSSMAP, BE_CELL_ID, "");
7350 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7357 bssmap_ho_cand_resp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7359 guint32 curr_offset;
7363 curr_offset = offset;
7366 is_uplink = IS_UPLINK_TRUE;
7368 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_NUM_MS].value, BSSAP_PDU_TYPE_BSSMAP, BE_NUM_MS, "");
7370 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CELL_ID].value, BSSAP_PDU_TYPE_BSSMAP, BE_CELL_ID, "");
7372 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7379 bssmap_ho_failure(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7381 guint32 curr_offset;
7385 curr_offset = offset;
7388 is_uplink = IS_UPLINK_TRUE;
7390 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
7392 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_RR_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_RR_CAUSE, "");
7394 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CCT_POOL].value, BSSAP_PDU_TYPE_BSSMAP, BE_CCT_POOL, "");
7396 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_CCT_POOL_LIST].value, BSSAP_PDU_TYPE_BSSMAP, BE_CCT_POOL_LIST, "");
7398 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7405 bssmap_paging(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7407 guint32 curr_offset;
7411 curr_offset = offset;
7414 is_uplink = IS_UPLINK_FALSE;
7416 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_IMSI].value, BSSAP_PDU_TYPE_BSSMAP, BE_IMSI, "");
7418 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_TMSI].value, BSSAP_PDU_TYPE_BSSMAP, BE_TMSI, "");
7420 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CELL_ID_LIST].value, BSSAP_PDU_TYPE_BSSMAP, BE_CELL_ID_LIST, "");
7422 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_CHAN_NEEDED].value, BSSAP_PDU_TYPE_BSSMAP, BE_CHAN_NEEDED, "");
7424 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_EMLPP_PRIO].value, BSSAP_PDU_TYPE_BSSMAP, BE_EMLPP_PRIO, "");
7426 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7433 bssmap_clear_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7435 guint32 curr_offset;
7439 curr_offset = offset;
7442 is_uplink = IS_UPLINK_TRUE;
7444 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
7446 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7453 bssmap_clear_cmd(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7455 guint32 curr_offset;
7459 curr_offset = offset;
7462 is_uplink = IS_UPLINK_FALSE;
7464 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_L3_HEADER_INFO].value, BSSAP_PDU_TYPE_BSSMAP, BE_L3_HEADER_INFO, "");
7466 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
7468 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7475 bssmap_reset(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7477 guint32 curr_offset;
7481 curr_offset = offset;
7484 is_uplink = IS_UPLINK_UNKNOWN;
7486 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
7488 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7495 bssmap_ho_performed(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7497 guint32 curr_offset;
7501 curr_offset = offset;
7504 is_uplink = IS_UPLINK_TRUE;
7506 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
7508 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CELL_ID].value, BSSAP_PDU_TYPE_BSSMAP, BE_CELL_ID, "");
7510 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CHOSEN_CHAN].value, BSSAP_PDU_TYPE_BSSMAP, BE_CHOSEN_CHAN, "");
7512 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CHOSEN_ENC_ALG].value, BSSAP_PDU_TYPE_BSSMAP, BE_CHOSEN_ENC_ALG, "");
7514 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_SPEECH_VER].value, BSSAP_PDU_TYPE_BSSMAP, BE_SPEECH_VER, " (Chosen)");
7516 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_LSA_ID].value, BSSAP_PDU_TYPE_BSSMAP, BE_LSA_ID, "");
7518 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7525 bssmap_overload(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7527 guint32 curr_offset;
7531 curr_offset = offset;
7534 is_uplink = IS_UPLINK_TRUE;
7536 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
7538 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_CELL_ID].value, BSSAP_PDU_TYPE_BSSMAP, BE_CELL_ID, "");
7540 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7547 bssmap_cm_upd(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7549 guint32 curr_offset;
7553 curr_offset = offset;
7556 is_uplink = IS_UPLINK_FALSE;
7558 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CM_INFO_2].value, BSSAP_PDU_TYPE_BSSMAP, BE_CM_INFO_2, "");
7560 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_CM_INFO_3].value, BSSAP_PDU_TYPE_BSSMAP, BE_CM_INFO_3, "");
7562 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7569 bssmap_ciph_mode_cmd(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7571 guint32 curr_offset;
7575 curr_offset = offset;
7578 is_uplink = IS_UPLINK_FALSE;
7580 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_L3_HEADER_INFO].value, BSSAP_PDU_TYPE_BSSMAP, BE_L3_HEADER_INFO, "");
7582 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_ENC_INFO].value, BSSAP_PDU_TYPE_BSSMAP, BE_ENC_INFO, "");
7584 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CIPH_RESP_MODE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIPH_RESP_MODE, "");
7586 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7593 bssmap_ciph_mode_complete(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7595 guint32 curr_offset;
7599 curr_offset = offset;
7602 is_uplink = IS_UPLINK_TRUE;
7604 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_L3_MSG].value, BSSAP_PDU_TYPE_BSSMAP, BE_L3_MSG, "");
7606 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CHOSEN_ENC_ALG].value, BSSAP_PDU_TYPE_BSSMAP, BE_CHOSEN_ENC_ALG, "");
7608 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7615 bssmap_cl3_info(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7618 guint32 curr_offset;
7621 curr_offset = offset;
7624 is_uplink = IS_UPLINK_TRUE;
7626 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CELL_ID].value, BSSAP_PDU_TYPE_BSSMAP, BE_CELL_ID, "");
7628 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_L3_INFO].value, BSSAP_PDU_TYPE_BSSMAP, BE_L3_INFO, "");
7630 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CHOSEN_CHAN].value, BSSAP_PDU_TYPE_BSSMAP, BE_CHOSEN_CHAN, "");
7632 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_LSA_ID_LIST].value, BSSAP_PDU_TYPE_BSSMAP, BE_LSA_ID_LIST, "");
7634 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_APDU].value, BSSAP_PDU_TYPE_BSSMAP, BE_APDU, "");
7636 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7643 bssmap_sapi_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7646 guint32 curr_offset;
7649 curr_offset = offset;
7652 is_uplink = IS_UPLINK_TRUE;
7654 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_DLCI].value, BSSAP_PDU_TYPE_BSSMAP, BE_DLCI, "");
7656 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
7658 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7665 bssmap_ho_reqd_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7667 guint32 curr_offset;
7671 curr_offset = offset;
7674 is_uplink = IS_UPLINK_FALSE;
7676 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
7678 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7685 bssmap_reset_cct(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7687 guint32 curr_offset;
7691 curr_offset = offset;
7694 is_uplink = IS_UPLINK_TRUE;
7696 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
7698 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
7700 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7707 bssmap_reset_cct_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7709 guint32 curr_offset;
7713 curr_offset = offset;
7716 is_uplink = IS_UPLINK_TRUE;
7718 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
7720 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7727 bssmap_cct_group_block(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7729 guint32 curr_offset;
7733 curr_offset = offset;
7736 is_uplink = IS_UPLINK_TRUE;
7738 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
7740 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
7742 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC_LIST].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC_LIST, "");
7744 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7751 bssmap_cct_group_block_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7753 guint32 curr_offset;
7757 curr_offset = offset;
7760 is_uplink = IS_UPLINK_TRUE;
7762 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
7764 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC_LIST].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC_LIST, "");
7766 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7773 bssmap_cct_group_unblock(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7775 guint32 curr_offset;
7779 curr_offset = offset;
7782 is_uplink = IS_UPLINK_TRUE;
7784 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
7786 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC_LIST].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC_LIST, "");
7788 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7795 bssmap_cct_group_unblock_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7797 guint32 curr_offset;
7801 curr_offset = offset;
7804 is_uplink = IS_UPLINK_TRUE;
7806 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
7808 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC_LIST].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC_LIST, "");
7810 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7817 bssmap_confusion(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7819 guint32 curr_offset;
7823 curr_offset = offset;
7826 is_uplink = IS_UPLINK_TRUE;
7828 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
7830 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_DIAG].value, BSSAP_PDU_TYPE_BSSMAP, BE_DIAG, "");
7832 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7839 bssmap_unequipped_cct(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7841 guint32 curr_offset;
7845 curr_offset = offset;
7848 is_uplink = IS_UPLINK_TRUE;
7850 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
7852 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CIC_LIST].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC_LIST, "");
7854 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7861 bssmap_ciph_mode_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7863 guint32 curr_offset;
7867 curr_offset = offset;
7870 is_uplink = IS_UPLINK_TRUE;
7872 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
7874 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7881 bssmap_load_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7883 guint32 curr_offset;
7887 curr_offset = offset;
7890 is_uplink = IS_UPLINK_TRUE;
7892 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_TIME_IND].value, BSSAP_PDU_TYPE_BSSMAP, BE_TIME_IND, "");
7894 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CELL_ID].value, BSSAP_PDU_TYPE_BSSMAP, BE_CELL_ID, "");
7896 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CELL_ID_LIST].value, BSSAP_PDU_TYPE_BSSMAP, BE_CELL_ID_LIST, " (Target)");
7898 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_RES_SIT].value, BSSAP_PDU_TYPE_BSSMAP, BE_RES_SIT, "");
7900 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
7902 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7909 bssmap_change_cct(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7911 guint32 curr_offset;
7915 curr_offset = offset;
7918 is_uplink = IS_UPLINK_FALSE;
7920 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
7922 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7929 bssmap_change_cct_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7931 guint32 curr_offset;
7935 curr_offset = offset;
7938 is_uplink = IS_UPLINK_TRUE;
7940 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
7942 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7949 bssmap_lsa_info(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7951 guint32 curr_offset;
7955 curr_offset = offset;
7958 is_uplink = IS_UPLINK_FALSE;
7960 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_LSA_INFO].value, BSSAP_PDU_TYPE_BSSMAP, BE_LSA_INFO, "");
7962 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7969 bssmap_conn_oriented(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7971 guint32 curr_offset;
7975 curr_offset = offset;
7978 is_uplink = IS_UPLINK_FALSE;
7980 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_APDU].value, BSSAP_PDU_TYPE_BSSMAP, BE_APDU, "");
7982 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_SEG].value, BSSAP_PDU_TYPE_BSSMAP, BE_SEG, "");
7984 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7987 #define NUM_GSM_BSSMAP_MSG (sizeof(gsm_a_bssmap_msg_strings)/sizeof(value_string))
7988 static gint ett_gsm_bssmap_msg[NUM_GSM_BSSMAP_MSG];
7989 static void (*bssmap_msg_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) = {
7990 bssmap_ass_req, /* Assignment Request */
7991 bssmap_ass_complete, /* Assignment Complete */
7992 bssmap_ass_failure, /* Assignment Failure */
7993 bssmap_ho_req, /* Handover Request */
7994 bssmap_ho_reqd, /* Handover Required */
7995 bssmap_ho_req_ack, /* Handover Request Acknowledge */
7996 bssmap_ho_cmd, /* Handover Command */
7997 bssmap_ho_complete, /* Handover Complete */
7998 NULL /* no associated data */, /* Handover Succeeded */
7999 bssmap_ho_failure, /* Handover Failure */
8000 bssmap_ho_performed, /* Handover Performed */
8001 bssmap_ho_cand_enq, /* Handover Candidate Enquire */
8002 bssmap_ho_cand_resp, /* Handover Candidate Response */
8003 bssmap_ho_reqd_rej, /* Handover Required Reject */
8004 NULL /* no associated data */, /* Handover Detect */
8005 bssmap_clear_cmd, /* Clear Command */
8006 NULL /* no associated data */, /* Clear Complete */
8007 bssmap_clear_req, /* Clear Request */
8008 NULL, /* Reserved */
8009 NULL, /* Reserved */
8010 bssmap_sapi_rej, /* SAPI 'n' Reject */
8011 bssmap_confusion, /* Confusion */
8014 bssmap_conn_oriented, /* Connection Oriented Information */
8015 NULL, /* Perform Location Request */
8016 bssmap_lsa_info, /* LSA Information */
8017 NULL, /* Perform Location Response */
8018 NULL, /* Perform Location Abort */
8019 bssmap_reset, /* Reset */
8020 NULL /* no associated data */, /* Reset Acknowledge */
8021 bssmap_overload, /* Overload */
8022 NULL, /* Reserved */
8023 bssmap_reset_cct, /* Reset Circuit */
8024 bssmap_reset_cct_ack, /* Reset Circuit Acknowledge */
8025 NULL, /* MSC Invoke Trace */
8026 NULL, /* BSS Invoke Trace */
8027 NULL, /* Connectionless Information */
8028 bssmap_block, /* Block */
8029 bssmap_block_ack, /* Blocking Acknowledge */
8030 bssmap_unblock, /* Unblock */
8031 bssmap_unblock_ack, /* Unblocking Acknowledge */
8032 bssmap_cct_group_block, /* Circuit Group Block */
8033 bssmap_cct_group_block_ack, /* Circuit Group Blocking Acknowledge */
8034 bssmap_cct_group_unblock, /* Circuit Group Unblock */
8035 bssmap_cct_group_unblock_ack, /* Circuit Group Unblocking Acknowledge */
8036 bssmap_unequipped_cct, /* Unequipped Circuit */
8037 bssmap_change_cct, /* Change Circuit */
8038 bssmap_change_cct_ack, /* Change Circuit Acknowledge */
8039 NULL, /* Resource Request */
8040 NULL, /* Resource Indication */
8041 bssmap_paging, /* Paging */
8042 bssmap_ciph_mode_cmd, /* Cipher Mode Command */
8043 bssmap_cm_upd, /* Classmark Update */
8044 bssmap_ciph_mode_complete, /* Cipher Mode Complete */
8045 NULL /* no associated data */, /* Queuing Indication */
8046 bssmap_cl3_info, /* Complete Layer 3 Information */
8047 NULL /* no associated data */, /* Classmark Request */
8048 bssmap_ciph_mode_rej, /* Cipher Mode Reject */
8049 bssmap_load_ind, /* Load Indication */
8050 NULL, /* VGCS/VBS Setup */
8051 NULL, /* VGCS/VBS Setup Ack */
8052 NULL, /* VGCS/VBS Setup Refuse */
8053 NULL, /* VGCS/VBS Assignment Request */
8054 NULL, /* VGCS/VBS Assignment Result */
8055 NULL, /* VGCS/VBS Assignment Failure */
8056 NULL, /* VGCS/VBS Queuing Indication */
8057 NULL, /* Uplink Request */
8058 NULL, /* Uplink Request Acknowledge */
8059 NULL, /* Uplink Request Confirmation */
8060 NULL, /* Uplink Release Indication */
8061 NULL, /* Uplink Reject Command */
8062 NULL, /* Uplink Release Command */
8063 NULL, /* Uplink Seized Command */
8071 dtap_mm_auth_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
8073 guint32 curr_offset;
8077 proto_tree *subtree;
8080 curr_offset = offset;
8083 is_uplink = IS_UPLINK_FALSE;
8086 * special dissection for Cipher Key Sequence Number
8088 oct = tvb_get_guint8(tvb, curr_offset);
8090 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
8091 proto_tree_add_text(tree,
8092 tvb, curr_offset, 1,
8097 proto_tree_add_text(tree,
8098 tvb, curr_offset, 1,
8099 gsm_dtap_elem_strings[DE_CIPH_KEY_SEQ_NUM].strptr);
8101 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_CIPH_KEY_SEQ_NUM]);
8103 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
8104 proto_tree_add_text(subtree,
8105 tvb, curr_offset, 1,
8109 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
8114 proto_tree_add_text(subtree,
8115 tvb, curr_offset, 1,
8116 "%s : Ciphering Key Sequence Number: No key is available",
8121 proto_tree_add_text(subtree,
8122 tvb, curr_offset, 1,
8123 "%s : Ciphering Key Sequence Number: %u",
8132 if (curr_len <= 0) return;
8134 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_AUTH_PARAM_RAND);
8136 ELEM_OPT_TLV(0x20, BSSAP_PDU_TYPE_DTAP, DE_AUTH_PARAM_AUTN, "");
8138 EXTRANEOUS_DATA_CHECK(curr_len, 0);
8145 dtap_mm_auth_resp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
8147 guint32 curr_offset;
8151 curr_offset = offset;
8154 is_uplink = IS_UPLINK_TRUE;
8156 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_AUTH_RESP_PARAM);
8158 ELEM_OPT_TLV(0x21, BSSAP_PDU_TYPE_DTAP, DE_AUTH_RESP_PARAM_EXT, "");
8160 EXTRANEOUS_DATA_CHECK(curr_len, 0);
8167 dtap_mm_auth_fail(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
8169 guint32 curr_offset;
8173 curr_offset = offset;
8176 is_uplink = IS_UPLINK_TRUE;
8178 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_REJ_CAUSE);
8180 ELEM_OPT_TLV(0x22, BSSAP_PDU_TYPE_DTAP, DE_AUTH_FAIL_PARAM, "");
8182 EXTRANEOUS_DATA_CHECK(curr_len, 0);
8189 dtap_mm_cm_reestab_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
8191 guint32 curr_offset;
8195 proto_tree *subtree;
8198 curr_offset = offset;
8201 is_uplink = IS_UPLINK_TRUE;
8204 * special dissection for Cipher Key Sequence Number
8206 oct = tvb_get_guint8(tvb, curr_offset);
8208 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
8209 proto_tree_add_text(tree,
8210 tvb, curr_offset, 1,
8215 proto_tree_add_text(tree,
8216 tvb, curr_offset, 1,
8217 gsm_dtap_elem_strings[DE_CIPH_KEY_SEQ_NUM].strptr);
8219 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_CIPH_KEY_SEQ_NUM]);
8221 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
8222 proto_tree_add_text(subtree,
8223 tvb, curr_offset, 1,
8227 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
8232 proto_tree_add_text(subtree,
8233 tvb, curr_offset, 1,
8234 "%s : Ciphering Key Sequence Number: No key is available",
8239 proto_tree_add_text(subtree,
8240 tvb, curr_offset, 1,
8241 "%s : Ciphering Key Sequence Number: %u",
8250 if (curr_len <= 0) return;
8252 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_MS_CM_2, "");
8254 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_MID, "");
8256 ELEM_OPT_TV(0x13, BSSAP_PDU_TYPE_DTAP, DE_LAI, "");
8258 EXTRANEOUS_DATA_CHECK(curr_len, 0);
8265 dtap_mm_cm_srvc_prompt(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
8267 guint32 curr_offset;
8271 curr_offset = offset;
8274 is_uplink = IS_UPLINK_FALSE;
8276 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_PD_SAPI);
8278 EXTRANEOUS_DATA_CHECK(curr_len, 0);
8285 dtap_mm_cm_srvc_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
8287 guint32 curr_offset;
8291 curr_offset = offset;
8294 is_uplink = IS_UPLINK_FALSE;
8296 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_REJ_CAUSE);
8298 EXTRANEOUS_DATA_CHECK(curr_len, 0);
8305 dtap_mm_abort(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
8307 guint32 curr_offset;
8311 curr_offset = offset;
8314 is_uplink = IS_UPLINK_FALSE;
8316 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_REJ_CAUSE);
8318 EXTRANEOUS_DATA_CHECK(curr_len, 0);
8325 dtap_mm_cm_srvc_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
8327 guint32 curr_offset;
8331 proto_tree *subtree;
8335 curr_offset = offset;
8338 is_uplink = IS_UPLINK_TRUE;
8341 * special dissection for CM Service Type
8343 oct = tvb_get_guint8(tvb, curr_offset);
8346 proto_tree_add_text(tree,
8347 tvb, curr_offset, 1,
8348 gsm_dtap_elem_strings[DE_CIPH_KEY_SEQ_NUM].strptr);
8350 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_CIPH_KEY_SEQ_NUM]);
8352 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
8353 proto_tree_add_text(subtree,
8354 tvb, curr_offset, 1,
8358 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
8360 switch ((oct & 0x70) >> 4)
8363 proto_tree_add_text(subtree,
8364 tvb, curr_offset, 1,
8365 "%s : Ciphering Key Sequence Number: No key is available",
8370 proto_tree_add_text(subtree,
8371 tvb, curr_offset, 1,
8372 "%s : Ciphering Key Sequence Number: %u",
8379 proto_tree_add_text(tree,
8380 tvb, curr_offset, 1,
8381 gsm_dtap_elem_strings[DE_CM_SRVC_TYPE].strptr);
8383 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_CM_SRVC_TYPE]);
8387 case 0x01: str = "Mobile originating call establishment or packet mode connection establishment"; break;
8388 case 0x02: str = "Emergency call establishment"; break;
8389 case 0x04: str = "Short message service"; break;
8390 case 0x08: str = "Supplementary service activation"; break;
8391 case 0x09: str = "Voice group call establishment"; break;
8392 case 0x0a: str = "Voice broadcast call establishment"; break;
8393 case 0x0b: str = "Location Services"; break;
8399 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
8400 proto_tree_add_text(subtree,
8401 tvb, curr_offset, 1,
8402 "%s : Service Type: (%u) %s",
8410 if (curr_len <= 0) return;
8412 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_MS_CM_2, "");
8414 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_MID, "");
8416 ELEM_OPT_TV_SHORT(0x80, BSSAP_PDU_TYPE_DTAP, DE_PRIO, "");
8418 EXTRANEOUS_DATA_CHECK(curr_len, 0);
8425 dtap_mm_id_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
8428 guint32 curr_offset;
8430 proto_tree *subtree;
8434 curr_offset = offset;
8437 is_uplink = IS_UPLINK_FALSE;
8440 * special dissection for Identity Type
8442 oct = tvb_get_guint8(tvb, curr_offset);
8444 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
8445 proto_tree_add_text(tree,
8446 tvb, curr_offset, 1,
8451 proto_tree_add_text(tree,
8452 tvb, curr_offset, 1,
8453 gsm_dtap_elem_strings[DE_ID_TYPE].strptr);
8455 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_ID_TYPE]);
8457 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
8458 proto_tree_add_text(subtree,
8459 tvb, curr_offset, 1,
8465 case 1: str = "IMSI"; break;
8466 case 2: str = "IMEI"; break;
8467 case 3: str = "IMEISV"; break;
8468 case 4: str = "TMSI"; break;
8474 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
8475 proto_tree_add_text(subtree,
8476 tvb, curr_offset, 1,
8477 "%s : Type of identity: %s",
8484 EXTRANEOUS_DATA_CHECK(curr_len, 0);
8491 dtap_mm_id_resp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
8493 guint32 curr_offset;
8497 curr_offset = offset;
8500 is_uplink = IS_UPLINK_TRUE;
8502 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_MID, "");
8504 EXTRANEOUS_DATA_CHECK(curr_len, 0);
8511 dtap_mm_imsi_det_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
8513 guint32 curr_offset;
8517 curr_offset = offset;
8520 is_uplink = IS_UPLINK_TRUE;
8522 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_MS_CM_1);
8524 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_MID, "");
8526 EXTRANEOUS_DATA_CHECK(curr_len, 0);
8533 dtap_mm_loc_upd_acc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
8535 guint32 curr_offset;
8539 curr_offset = offset;
8542 is_uplink = IS_UPLINK_FALSE;
8544 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_LAI);
8546 ELEM_OPT_TLV(0x17, BSSAP_PDU_TYPE_DTAP, DE_MID, "");
8548 ELEM_OPT_T(0xa1, BSSAP_PDU_TYPE_DTAP, DE_FOP, "");
8550 ELEM_OPT_T(0xa2, BSSAP_PDU_TYPE_DTAP, DE_CTS_PERM, "");
8552 ELEM_OPT_TLV(0x4a, BSSAP_PDU_TYPE_DTAP, DE_PLMN_LIST, " Equivalent");
8554 EXTRANEOUS_DATA_CHECK(curr_len, 0);
8561 dtap_mm_loc_upd_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
8563 guint32 curr_offset;
8567 curr_offset = offset;
8570 is_uplink = IS_UPLINK_FALSE;
8572 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_REJ_CAUSE);
8574 EXTRANEOUS_DATA_CHECK(curr_len, 0);
8581 dtap_mm_loc_upd_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
8583 guint32 curr_offset;
8587 proto_tree *subtree;
8591 curr_offset = offset;
8594 is_uplink = IS_UPLINK_TRUE;
8597 * special dissection for Location Updating Type
8599 oct = tvb_get_guint8(tvb, curr_offset);
8602 proto_tree_add_text(tree,
8603 tvb, curr_offset, 1,
8604 gsm_dtap_elem_strings[DE_CIPH_KEY_SEQ_NUM].strptr);
8606 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_CIPH_KEY_SEQ_NUM]);
8608 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
8609 proto_tree_add_text(subtree,
8610 tvb, curr_offset, 1,
8614 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
8616 switch ((oct & 0x70) >> 4)
8619 proto_tree_add_text(subtree,
8620 tvb, curr_offset, 1,
8621 "%s : Ciphering Key Sequence Number: No key is available",
8626 proto_tree_add_text(subtree,
8627 tvb, curr_offset, 1,
8628 "%s : Ciphering Key Sequence Number: %u",
8635 proto_tree_add_text(tree,
8636 tvb, curr_offset, 1,
8637 gsm_dtap_elem_strings[DE_LOC_UPD_TYPE].strptr);
8639 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_LOC_UPD_TYPE]);
8641 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
8642 proto_tree_add_text(subtree,
8643 tvb, curr_offset, 1,
8644 "%s : Follow-On Request (FOR): %s",
8646 (oct & 0x08) ? "Follow-on request pending" : "No follow-on request pending");
8648 other_decode_bitfield_value(a_bigbuf, oct, 0x04, 8);
8649 proto_tree_add_text(subtree,
8650 tvb, curr_offset, 1,
8656 case 0: str = "Normal"; break;
8657 case 1: str = "Periodic"; break;
8658 case 2: str = "IMSI attach"; break;
8664 other_decode_bitfield_value(a_bigbuf, oct, 0x03, 8);
8665 proto_tree_add_text(subtree,
8666 tvb, curr_offset, 1,
8667 "%s : Updating Type: %s",
8671 proto_item_append_text(item, " - %s", str);
8676 if (curr_len <= 0) return;
8678 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_LAI);
8680 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_MS_CM_1);
8682 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_MID, "");
8684 ELEM_OPT_TLV(0x33, BSSAP_PDU_TYPE_DTAP, DE_MS_CM_2, "");
8686 EXTRANEOUS_DATA_CHECK(curr_len, 0);
8693 dtap_mm_mm_info(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
8695 guint32 curr_offset;
8699 curr_offset = offset;
8702 is_uplink = IS_UPLINK_TRUE;
8704 ELEM_OPT_TLV(0x43, BSSAP_PDU_TYPE_DTAP, DE_NETWORK_NAME, " - Full Name");
8706 ELEM_OPT_TLV(0x45, BSSAP_PDU_TYPE_DTAP, DE_NETWORK_NAME, " - Short Name");
8708 ELEM_OPT_TV(0x46, BSSAP_PDU_TYPE_DTAP, DE_TIME_ZONE, " - Local");
8710 ELEM_OPT_TV(0x47, BSSAP_PDU_TYPE_DTAP, DE_TIME_ZONE_TIME, " - Universal Time and Local Time Zone");
8712 ELEM_OPT_TLV(0x48, BSSAP_PDU_TYPE_DTAP, DE_LSA_ID, "");
8714 ELEM_OPT_TLV(0x49, BSSAP_PDU_TYPE_DTAP, DE_DAY_SAVING_TIME, "");
8716 EXTRANEOUS_DATA_CHECK(curr_len, 0);
8723 dtap_mm_mm_status(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
8725 guint32 curr_offset;
8729 curr_offset = offset;
8732 is_uplink = IS_UPLINK_TRUE;
8734 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_REJ_CAUSE);
8736 EXTRANEOUS_DATA_CHECK(curr_len, 0);
8743 dtap_mm_tmsi_realloc_cmd(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
8745 guint32 curr_offset;
8749 curr_offset = offset;
8752 is_uplink = IS_UPLINK_FALSE;
8754 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_LAI);
8756 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_MID, "");
8758 EXTRANEOUS_DATA_CHECK(curr_len, 0);
8765 dtap_rr_paging_resp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
8767 guint32 curr_offset;
8771 proto_tree *subtree;
8774 curr_offset = offset;
8777 is_uplink = IS_UPLINK_TRUE;
8780 * special dissection for Cipher Key Sequence Number
8782 oct = tvb_get_guint8(tvb, curr_offset);
8784 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
8785 proto_tree_add_text(tree,
8786 tvb, curr_offset, 1,
8791 proto_tree_add_text(tree,
8792 tvb, curr_offset, 1,
8793 gsm_dtap_elem_strings[DE_CIPH_KEY_SEQ_NUM].strptr);
8795 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_CIPH_KEY_SEQ_NUM]);
8797 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
8798 proto_tree_add_text(subtree,
8799 tvb, curr_offset, 1,
8803 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
8808 proto_tree_add_text(subtree,
8809 tvb, curr_offset, 1,
8810 "%s : Ciphering Key Sequence Number: No key is available",
8815 proto_tree_add_text(subtree,
8816 tvb, curr_offset, 1,
8817 "%s : Ciphering Key Sequence Number: %u",
8826 if (curr_len <= 0) return;
8828 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_MS_CM_2, "");
8830 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_MID, "");
8832 EXTRANEOUS_DATA_CHECK(curr_len, 0);
8839 dtap_rr_rr_status(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
8841 guint32 curr_offset;
8845 curr_offset = offset;
8848 is_uplink = IS_UPLINK_TRUE;
8850 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RR_CAUSE);
8852 EXTRANEOUS_DATA_CHECK(curr_len, 0);
8859 dtap_cc_alerting(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
8861 guint32 curr_offset;
8865 curr_offset = offset;
8868 is_uplink = IS_UPLINK_TRUE;
8870 ELEM_OPT_TLV(0x1c, BSSAP_PDU_TYPE_DTAP, DE_FACILITY, "");
8872 ELEM_OPT_TLV(0x1e, BSSAP_PDU_TYPE_DTAP, DE_PROG_IND, "");
8874 ELEM_OPT_TLV(0x7e, BSSAP_PDU_TYPE_DTAP, DE_USER_USER, "");
8878 ELEM_OPT_TLV(0x7f, BSSAP_PDU_TYPE_DTAP, DE_SS_VER_IND, "");
8880 EXTRANEOUS_DATA_CHECK(curr_len, 0);
8887 dtap_cc_call_conf(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
8889 guint32 curr_offset;
8893 curr_offset = offset;
8896 is_uplink = IS_UPLINK_TRUE;
8898 ELEM_OPT_TV_SHORT(0xd0, BSSAP_PDU_TYPE_DTAP, DE_REPEAT_IND, " BC repeat indicator");
8900 ELEM_OPT_TLV(0x04, BSSAP_PDU_TYPE_DTAP, DE_BEARER_CAP, " 1");
8902 ELEM_OPT_TLV(0x04, BSSAP_PDU_TYPE_DTAP, DE_BEARER_CAP, " 2");
8904 ELEM_OPT_TLV(0x08, BSSAP_PDU_TYPE_DTAP, DE_CAUSE, "");
8906 ELEM_OPT_TLV(0x15, BSSAP_PDU_TYPE_DTAP, DE_CC_CAP, "");
8908 ELEM_OPT_TLV(0x2d, BSSAP_PDU_TYPE_DTAP, DE_SI, "");
8910 ELEM_OPT_TLV(0x40, BSSAP_PDU_TYPE_DTAP, DE_SUP_CODEC_LIST, "");
8912 EXTRANEOUS_DATA_CHECK(curr_len, 0);
8919 dtap_cc_call_proceed(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
8921 guint32 curr_offset;
8925 curr_offset = offset;
8928 is_uplink = IS_UPLINK_FALSE;
8930 ELEM_OPT_TV_SHORT(0xd0, BSSAP_PDU_TYPE_DTAP, DE_REPEAT_IND, " BC repeat indicator");
8932 ELEM_OPT_TLV(0x04, BSSAP_PDU_TYPE_DTAP, DE_BEARER_CAP, " 1");
8934 ELEM_OPT_TLV(0x04, BSSAP_PDU_TYPE_DTAP, DE_BEARER_CAP, " 2");
8936 ELEM_OPT_TLV(0x1c, BSSAP_PDU_TYPE_DTAP, DE_FACILITY, "");
8938 ELEM_OPT_TLV(0x1e, BSSAP_PDU_TYPE_DTAP, DE_PROG_IND, "");
8940 ELEM_OPT_TV_SHORT(0x80, BSSAP_PDU_TYPE_DTAP, DE_PRIO, "");
8942 ELEM_OPT_TLV(0x2f, BSSAP_PDU_TYPE_DTAP, DE_NET_CC_CAP, "");
8944 EXTRANEOUS_DATA_CHECK(curr_len, 0);
8951 dtap_cc_congestion_control(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
8953 guint32 curr_offset;
8957 proto_tree *subtree;
8961 curr_offset = offset;
8964 is_uplink = IS_UPLINK_FALSE;
8967 * special dissection for Congestion Level
8969 oct = tvb_get_guint8(tvb, curr_offset);
8971 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
8972 proto_tree_add_text(tree,
8973 tvb, curr_offset, 1,
8978 proto_tree_add_text(tree,
8979 tvb, curr_offset, 1,
8980 gsm_dtap_elem_strings[DE_CONGESTION].strptr);
8982 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_CONGESTION]);
8986 case 0: str = "Receiver ready"; break;
8987 case 15: str = "Receiver not ready"; break;
8993 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
8994 proto_tree_add_text(subtree,
8995 tvb, curr_offset, 1,
8996 "%s : Congestion level: %s",
9003 if (curr_len <= 0) return;
9005 ELEM_OPT_TLV(0x08, BSSAP_PDU_TYPE_DTAP, DE_CAUSE, "");
9007 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9014 dtap_cc_connect(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9016 guint32 curr_offset;
9020 curr_offset = offset;
9023 is_uplink = IS_UPLINK_TRUE;
9025 ELEM_OPT_TLV(0x1c, BSSAP_PDU_TYPE_DTAP, DE_FACILITY, "");
9027 ELEM_OPT_TLV(0x1e, BSSAP_PDU_TYPE_DTAP, DE_PROG_IND, "");
9029 ELEM_OPT_TLV(0x4c, BSSAP_PDU_TYPE_DTAP, DE_CONN_NUM, "");
9031 ELEM_OPT_TLV(0x4d, BSSAP_PDU_TYPE_DTAP, DE_CONN_SUB_ADDR, "");
9033 ELEM_OPT_TLV(0x7e, BSSAP_PDU_TYPE_DTAP, DE_USER_USER, "");
9037 ELEM_OPT_TLV(0x7f, BSSAP_PDU_TYPE_DTAP, DE_SS_VER_IND, "");
9039 ELEM_OPT_TLV(0x2d, BSSAP_PDU_TYPE_DTAP, DE_SI, "");
9041 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9048 dtap_cc_disconnect(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9050 guint32 curr_offset;
9054 curr_offset = offset;
9057 is_uplink = IS_UPLINK_TRUE;
9059 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_CAUSE, "");
9061 ELEM_OPT_TLV(0x1c, BSSAP_PDU_TYPE_DTAP, DE_FACILITY, "");
9063 ELEM_OPT_TLV(0x1e, BSSAP_PDU_TYPE_DTAP, DE_PROG_IND, "");
9065 ELEM_OPT_TLV(0x7e, BSSAP_PDU_TYPE_DTAP, DE_USER_USER, "");
9067 ELEM_OPT_TLV(0x7b, BSSAP_PDU_TYPE_DTAP, DE_ALLOWED_ACTIONS, "");
9071 ELEM_OPT_TLV(0x7f, BSSAP_PDU_TYPE_DTAP, DE_SS_VER_IND, "");
9073 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9080 dtap_cc_emerg_setup(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9082 guint32 curr_offset;
9086 curr_offset = offset;
9089 is_uplink = IS_UPLINK_TRUE;
9091 ELEM_OPT_TLV(0x04, BSSAP_PDU_TYPE_DTAP, DE_BEARER_CAP, "");
9093 ELEM_OPT_TLV(0x2d, BSSAP_PDU_TYPE_DTAP, DE_SI, "");
9095 ELEM_OPT_TLV(0x40, BSSAP_PDU_TYPE_DTAP, DE_SUP_CODEC_LIST, "");
9097 ELEM_OPT_TLV(0x2e, BSSAP_PDU_TYPE_DTAP, DE_SRVC_CAT, " Emergency");
9099 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9106 dtap_cc_facility(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9108 guint32 curr_offset;
9112 curr_offset = offset;
9115 is_uplink = IS_UPLINK_TRUE;
9117 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_FACILITY, "");
9121 ELEM_OPT_TLV(0x7f, BSSAP_PDU_TYPE_DTAP, DE_SS_VER_IND, "");
9123 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9130 dtap_cc_hold_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9132 guint32 curr_offset;
9136 curr_offset = offset;
9139 is_uplink = IS_UPLINK_FALSE;
9141 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_CAUSE, "");
9143 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9150 dtap_cc_modify(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9152 guint32 curr_offset;
9156 curr_offset = offset;
9159 is_uplink = IS_UPLINK_TRUE;
9161 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_BEARER_CAP, "");
9163 ELEM_OPT_TLV(0x7c, BSSAP_PDU_TYPE_DTAP, DE_LLC, "");
9165 ELEM_OPT_TLV(0x7d, BSSAP_PDU_TYPE_DTAP, DE_HLC, "");
9167 ELEM_OPT_T(0xa3, BSSAP_PDU_TYPE_DTAP, DE_REV_CALL_SETUP_DIR, "");
9169 ELEM_OPT_T(0xa4, BSSAP_PDU_TYPE_DTAP, DE_IMM_MOD_IND, "");
9171 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9178 dtap_cc_modify_complete(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9180 guint32 curr_offset;
9184 curr_offset = offset;
9187 is_uplink = IS_UPLINK_TRUE;
9189 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_BEARER_CAP, "");
9191 ELEM_OPT_TLV(0x7c, BSSAP_PDU_TYPE_DTAP, DE_LLC, "");
9193 ELEM_OPT_TLV(0x7d, BSSAP_PDU_TYPE_DTAP, DE_HLC, "");
9195 ELEM_OPT_T(0xa3, BSSAP_PDU_TYPE_DTAP, DE_REV_CALL_SETUP_DIR, "");
9197 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9204 dtap_cc_modify_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9206 guint32 curr_offset;
9210 curr_offset = offset;
9213 is_uplink = IS_UPLINK_FALSE;
9215 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_BEARER_CAP, "");
9217 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_CAUSE, "");
9219 ELEM_OPT_TLV(0x7c, BSSAP_PDU_TYPE_DTAP, DE_LLC, "");
9221 ELEM_OPT_TLV(0x7d, BSSAP_PDU_TYPE_DTAP, DE_HLC, "");
9223 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9230 dtap_cc_notify(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9232 guint32 curr_offset;
9236 curr_offset = offset;
9239 is_uplink = IS_UPLINK_FALSE;
9241 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_NOT_IND);
9243 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9250 dtap_cc_progress(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9252 guint32 curr_offset;
9256 curr_offset = offset;
9259 is_uplink = IS_UPLINK_FALSE;
9261 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_PROG_IND, "");
9263 ELEM_OPT_TLV(0x7e, BSSAP_PDU_TYPE_DTAP, DE_USER_USER, "");
9265 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9272 dtap_cc_cc_est(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9274 guint32 curr_offset;
9278 curr_offset = offset;
9281 is_uplink = IS_UPLINK_FALSE;
9283 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_SETUP_CONTAINER, "");
9285 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9292 dtap_cc_cc_est_conf(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9294 guint32 curr_offset;
9298 curr_offset = offset;
9301 is_uplink = IS_UPLINK_TRUE;
9303 ELEM_OPT_TV_SHORT(0xd0, BSSAP_PDU_TYPE_DTAP, DE_REPEAT_IND, " Repeat indicator");
9305 ELEM_MAND_TLV(0x04, BSSAP_PDU_TYPE_DTAP, DE_BEARER_CAP, " 1");
9307 ELEM_OPT_TLV(0x04, BSSAP_PDU_TYPE_DTAP, DE_BEARER_CAP, " 2");
9309 ELEM_OPT_TLV(0x08, BSSAP_PDU_TYPE_DTAP, DE_CAUSE, "");
9311 ELEM_OPT_TLV(0x40, BSSAP_PDU_TYPE_DTAP, DE_SUP_CODEC_LIST, "");
9313 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9320 dtap_cc_release(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9322 guint32 curr_offset;
9326 curr_offset = offset;
9329 is_uplink = IS_UPLINK_TRUE;
9331 ELEM_OPT_TLV(0x08, BSSAP_PDU_TYPE_DTAP, DE_CAUSE, "");
9333 ELEM_OPT_TLV(0x08, BSSAP_PDU_TYPE_DTAP, DE_CAUSE, " 2");
9335 ELEM_OPT_TLV(0x1c, BSSAP_PDU_TYPE_DTAP, DE_FACILITY, "");
9337 ELEM_OPT_TLV(0x7e, BSSAP_PDU_TYPE_DTAP, DE_USER_USER, "");
9341 ELEM_OPT_TLV(0x7f, BSSAP_PDU_TYPE_DTAP, DE_SS_VER_IND, "");
9343 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9350 dtap_cc_recall(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9352 guint32 curr_offset;
9356 curr_offset = offset;
9359 is_uplink = IS_UPLINK_FALSE;
9361 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RECALL_TYPE);
9363 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_FACILITY, "");
9365 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9372 dtap_cc_release_complete(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9374 guint32 curr_offset;
9378 curr_offset = offset;
9381 is_uplink = IS_UPLINK_FALSE;
9383 ELEM_OPT_TLV(0x08, BSSAP_PDU_TYPE_DTAP, DE_CAUSE, "");
9385 ELEM_OPT_TLV(0x1c, BSSAP_PDU_TYPE_DTAP, DE_FACILITY, "");
9387 ELEM_OPT_TLV(0x7e, BSSAP_PDU_TYPE_DTAP, DE_USER_USER, "");
9391 ELEM_OPT_TLV(0x7f, BSSAP_PDU_TYPE_DTAP, DE_SS_VER_IND, "");
9393 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9400 dtap_cc_retrieve_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9402 guint32 curr_offset;
9406 curr_offset = offset;
9409 is_uplink = IS_UPLINK_FALSE;
9411 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_CAUSE, "");
9413 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9420 dtap_cc_setup(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9422 guint32 curr_offset;
9426 curr_offset = offset;
9429 is_uplink = IS_UPLINK_TRUE;
9431 ELEM_OPT_TV_SHORT(0xd0, BSSAP_PDU_TYPE_DTAP, DE_REPEAT_IND, " BC repeat indicator");
9433 ELEM_OPT_TLV(0x04, BSSAP_PDU_TYPE_DTAP, DE_BEARER_CAP, " 1");
9435 ELEM_OPT_TLV(0x04, BSSAP_PDU_TYPE_DTAP, DE_BEARER_CAP, " 2");
9437 ELEM_OPT_TLV(0x1c, BSSAP_PDU_TYPE_DTAP, DE_FACILITY, "");
9439 ELEM_OPT_TLV(0x1e, BSSAP_PDU_TYPE_DTAP, DE_PROG_IND, "");
9441 ELEM_OPT_TV(0x34, BSSAP_PDU_TYPE_DTAP, DE_SIGNAL, "");
9443 ELEM_OPT_TLV(0x5c, BSSAP_PDU_TYPE_DTAP, DE_CLG_PARTY_BCD_NUM, "");
9445 ELEM_OPT_TLV(0x5d, BSSAP_PDU_TYPE_DTAP, DE_CLG_PARTY_SUB_ADDR, "");
9447 ELEM_OPT_TLV(0x5e, BSSAP_PDU_TYPE_DTAP, DE_CLD_PARTY_BCD_NUM, "");
9449 ELEM_OPT_TLV(0x6d, BSSAP_PDU_TYPE_DTAP, DE_CLD_PARTY_SUB_ADDR, "");
9451 ELEM_OPT_TLV(0x74, BSSAP_PDU_TYPE_DTAP, DE_RED_PARTY_BCD_NUM, "");
9453 ELEM_OPT_TLV(0x75, BSSAP_PDU_TYPE_DTAP, DE_RED_PARTY_SUB_ADDR, "");
9455 ELEM_OPT_TV_SHORT(0xd0, BSSAP_PDU_TYPE_DTAP, DE_REPEAT_IND, " LLC repeat indicator");
9457 ELEM_OPT_TLV(0x7c, BSSAP_PDU_TYPE_DTAP, DE_LLC, " 1");
9459 ELEM_OPT_TLV(0x7c, BSSAP_PDU_TYPE_DTAP, DE_LLC, " 2");
9461 ELEM_OPT_TV_SHORT(0xd0, BSSAP_PDU_TYPE_DTAP, DE_REPEAT_IND, " HLC repeat indicator");
9463 ELEM_OPT_TLV(0x7d, BSSAP_PDU_TYPE_DTAP, DE_HLC, " 1");
9465 ELEM_OPT_TLV(0x7d, BSSAP_PDU_TYPE_DTAP, DE_HLC, " 2");
9467 ELEM_OPT_TLV(0x7e, BSSAP_PDU_TYPE_DTAP, DE_USER_USER, "");
9471 ELEM_OPT_TV_SHORT(0x80, BSSAP_PDU_TYPE_DTAP, DE_PRIO, "");
9473 ELEM_OPT_TLV(0x19, BSSAP_PDU_TYPE_DTAP, DE_ALERT_PATTERN, "");
9475 ELEM_OPT_TLV(0x2f, BSSAP_PDU_TYPE_DTAP, DE_NET_CC_CAP, "");
9477 ELEM_OPT_TLV(0x3a, BSSAP_PDU_TYPE_DTAP, DE_CAUSE_NO_CLI, "");
9481 ELEM_OPT_TLV(0x7f, BSSAP_PDU_TYPE_DTAP, DE_SS_VER_IND, "");
9483 ELEM_OPT_T(0xa1, BSSAP_PDU_TYPE_DTAP, DE_FOP, "");
9485 ELEM_OPT_T(0xa2, BSSAP_PDU_TYPE_DTAP, DE_CTS_PERM, "");
9487 ELEM_OPT_TLV(0x15, BSSAP_PDU_TYPE_DTAP, DE_CC_CAP, "");
9489 ELEM_OPT_TLV(0x1d, BSSAP_PDU_TYPE_DTAP, DE_FACILITY, " $(CCBS)$ (advanced recall alignment)");
9491 ELEM_OPT_TLV(0x1b, BSSAP_PDU_TYPE_DTAP, DE_FACILITY, " (recall alignment Not essential) $(CCBS)$");
9493 ELEM_OPT_TLV(0x2d, BSSAP_PDU_TYPE_DTAP, DE_SI, "");
9495 ELEM_OPT_TLV(0x40, BSSAP_PDU_TYPE_DTAP, DE_SUP_CODEC_LIST, "");
9497 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9504 dtap_cc_start_cc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9506 guint32 curr_offset;
9510 curr_offset = offset;
9513 is_uplink = IS_UPLINK_FALSE;
9515 ELEM_OPT_TLV(0x15, BSSAP_PDU_TYPE_DTAP, DE_CC_CAP, "");
9517 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9524 dtap_cc_start_dtmf(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9526 guint32 curr_offset;
9530 curr_offset = offset;
9533 is_uplink = IS_UPLINK_TRUE;
9535 ELEM_MAND_TV(0x2c, BSSAP_PDU_TYPE_DTAP, DE_KEYPAD_FACILITY, "");
9537 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9544 dtap_cc_start_dtmf_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9546 guint32 curr_offset;
9550 curr_offset = offset;
9553 is_uplink = IS_UPLINK_FALSE;
9555 ELEM_MAND_TV(0x2c, BSSAP_PDU_TYPE_DTAP, DE_KEYPAD_FACILITY, "");
9557 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9564 dtap_cc_start_dtmf_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9566 guint32 curr_offset;
9570 curr_offset = offset;
9573 is_uplink = IS_UPLINK_FALSE;
9575 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_CAUSE, "");
9577 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9584 dtap_cc_status(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9586 guint32 curr_offset;
9590 curr_offset = offset;
9593 is_uplink = IS_UPLINK_FALSE;
9595 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_CAUSE, "");
9597 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_CALL_STATE);
9599 ELEM_OPT_TLV(0x24, BSSAP_PDU_TYPE_DTAP, DE_AUX_STATES, "");
9601 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9608 dtap_cc_user_info(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9610 guint32 curr_offset;
9614 curr_offset = offset;
9617 is_uplink = IS_UPLINK_TRUE;
9619 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_USER_USER, "");
9621 ELEM_OPT_T(0xa0, BSSAP_PDU_TYPE_DTAP, DE_MORE_DATA, "");
9623 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9630 dtap_ss_register(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9632 guint32 curr_offset;
9636 curr_offset = offset;
9639 is_uplink = IS_UPLINK_TRUE;
9641 ELEM_MAND_TLV(0x1c, BSSAP_PDU_TYPE_DTAP, DE_FACILITY, "");
9643 ELEM_OPT_TLV(0x7f, BSSAP_PDU_TYPE_DTAP, DE_SS_VER_IND, "");
9645 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9652 dtap_sms_cp_data(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9654 guint32 curr_offset;
9658 curr_offset = offset;
9661 is_uplink = IS_UPLINK_TRUE;
9663 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_CP_USER_DATA, "");
9665 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9672 dtap_sms_cp_error(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9674 guint32 curr_offset;
9678 curr_offset = offset;
9681 is_uplink = IS_UPLINK_TRUE;
9683 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_CP_CAUSE);
9685 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9692 rp_data_n_ms(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9694 guint32 curr_offset;
9698 curr_offset = offset;
9701 is_uplink = IS_UPLINK_FALSE;
9702 g_pinfo->p2p_dir = P2P_DIR_SENT;
9704 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RP_MESSAGE_REF);
9706 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_RP_ORIG_ADDR, "");
9708 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_RP_DEST_ADDR, "");
9710 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_RP_USER_DATA, "");
9712 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9719 rp_data_ms_n(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9721 guint32 curr_offset;
9725 curr_offset = offset;
9728 is_uplink = IS_UPLINK_TRUE;
9729 g_pinfo->p2p_dir = P2P_DIR_RECV;
9731 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RP_MESSAGE_REF);
9733 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_RP_ORIG_ADDR, "");
9735 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_RP_DEST_ADDR, "");
9737 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_RP_USER_DATA, "");
9739 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9746 rp_smma(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9748 guint32 curr_offset;
9752 curr_offset = offset;
9755 is_uplink = IS_UPLINK_TRUE;
9757 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RP_MESSAGE_REF);
9759 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9766 rp_ack_n_ms(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9768 guint32 curr_offset;
9772 curr_offset = offset;
9775 is_uplink = IS_UPLINK_FALSE;
9776 g_pinfo->p2p_dir = P2P_DIR_SENT;
9778 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RP_MESSAGE_REF);
9780 ELEM_OPT_TLV(0x41, BSSAP_PDU_TYPE_DTAP, DE_RP_USER_DATA, "");
9782 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9789 rp_ack_ms_n(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9791 guint32 curr_offset;
9795 curr_offset = offset;
9798 is_uplink = IS_UPLINK_TRUE;
9799 g_pinfo->p2p_dir = P2P_DIR_RECV;
9801 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RP_MESSAGE_REF);
9803 ELEM_OPT_TLV(0x41, BSSAP_PDU_TYPE_DTAP, DE_RP_USER_DATA, "");
9805 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9812 rp_error_n_ms(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9814 guint32 curr_offset;
9818 curr_offset = offset;
9821 is_uplink = IS_UPLINK_FALSE;
9822 g_pinfo->p2p_dir = P2P_DIR_SENT;
9824 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RP_MESSAGE_REF);
9826 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_RP_CAUSE, "");
9828 ELEM_OPT_TLV(0x41, BSSAP_PDU_TYPE_DTAP, DE_RP_USER_DATA, "");
9830 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9837 rp_error_ms_n(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9839 guint32 curr_offset;
9843 curr_offset = offset;
9846 is_uplink = IS_UPLINK_TRUE;
9847 g_pinfo->p2p_dir = P2P_DIR_RECV;
9849 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RP_MESSAGE_REF);
9851 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_RP_CAUSE, "");
9853 ELEM_OPT_TLV(0x41, BSSAP_PDU_TYPE_DTAP, DE_RP_USER_DATA, "");
9855 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9858 #define NUM_GSM_DTAP_MSG_MM (sizeof(gsm_a_dtap_msg_mm_strings)/sizeof(value_string))
9859 static gint ett_gsm_dtap_msg_mm[NUM_GSM_DTAP_MSG_MM];
9860 static void (*dtap_msg_mm_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) = {
9861 dtap_mm_imsi_det_ind, /* IMSI Detach Indication */
9862 dtap_mm_loc_upd_acc, /* Location Updating Accept */
9863 dtap_mm_loc_upd_rej, /* Location Updating Reject */
9864 dtap_mm_loc_upd_req, /* Location Updating Request */
9865 NULL /* no associated data */, /* Authentication Reject */
9866 dtap_mm_auth_req, /* Authentication Request */
9867 dtap_mm_auth_resp, /* Authentication Response */
9868 dtap_mm_auth_fail, /* Authentication Failure */
9869 dtap_mm_id_req, /* Identity Request */
9870 dtap_mm_id_resp, /* Identity Response */
9871 dtap_mm_tmsi_realloc_cmd, /* TMSI Reallocation Command */
9872 NULL /* no associated data */, /* TMSI Reallocation Complete */
9873 NULL /* no associated data */, /* CM Service Accept */
9874 dtap_mm_cm_srvc_rej, /* CM Service Reject */
9875 NULL /* no associated data */, /* CM Service Abort */
9876 dtap_mm_cm_srvc_req, /* CM Service Request */
9877 dtap_mm_cm_srvc_prompt, /* CM Service Prompt */
9878 NULL, /* Reserved: was allocated in earlier phases of the protocol */
9879 dtap_mm_cm_reestab_req, /* CM Re-establishment Request */
9880 dtap_mm_abort, /* Abort */
9881 NULL /* no associated data */, /* MM Null */
9882 dtap_mm_mm_status, /* MM Status */
9883 dtap_mm_mm_info, /* MM Information */
9887 #define NUM_GSM_DTAP_MSG_RR (sizeof(gsm_a_dtap_msg_rr_strings)/sizeof(value_string))
9888 static gint ett_gsm_dtap_msg_rr[NUM_GSM_DTAP_MSG_RR];
9889 static void (*dtap_msg_rr_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) = {
9890 NULL, /* RR Initialisation Request */
9891 NULL, /* Additional Assignment */
9892 NULL, /* Immediate Assignment */
9893 NULL, /* Immediate Assignment Extended */
9894 NULL, /* Immediate Assignment Reject */
9896 NULL, /* DTM Assignment Failure */
9897 NULL, /* DTM Reject */
9898 NULL, /* DTM Request */
9899 NULL, /* Main DCCH Assignment Command */
9900 NULL, /* Packet Assignment Command */
9902 NULL, /* Ciphering Mode Command */
9903 NULL, /* Ciphering Mode Complete */
9905 NULL, /* Configuration Change Command */
9906 NULL, /* Configuration Change Ack. */
9907 NULL, /* Configuration Change Reject */
9909 NULL, /* Assignment Command */
9910 NULL, /* Assignment Complete */
9911 NULL, /* Assignment Failure */
9912 NULL, /* Handover Command */
9913 NULL, /* Handover Complete */
9914 NULL, /* Handover Failure */
9915 NULL, /* Physical Information */
9916 NULL, /* DTM Assignment Command */
9918 NULL, /* RR-cell Change Order */
9919 NULL, /* PDCH Assignment Command */
9921 NULL, /* Channel Release */
9922 NULL, /* Partial Release */
9923 NULL, /* Partial Release Complete */
9925 NULL, /* Paging Request Type 1 */
9926 NULL, /* Paging Request Type 2 */
9927 NULL, /* Paging Request Type 3 */
9928 dtap_rr_paging_resp, /* Paging Response */
9929 NULL, /* Notification/NCH */
9930 NULL, /* Reserved */
9931 NULL, /* Notification/Response */
9933 NULL, /* Reserved */
9935 /* NULL, * Utran Classmark Change * CONFLICTS WITH Handover To UTRAN Command */
9936 NULL, /* UE RAB Preconfiguration */
9937 NULL, /* cdma2000 Classmark Change */
9939 NULL, /* System Information Type 8 */
9940 NULL, /* System Information Type 1 */
9941 NULL, /* System Information Type 2 */
9942 NULL, /* System Information Type 3 */
9943 NULL, /* System Information Type 4 */
9944 NULL, /* System Information Type 5 */
9945 NULL, /* System Information Type 6 */
9946 NULL, /* System Information Type 7 */
9948 NULL, /* System Information Type 2bis */
9949 NULL, /* System Information Type 2ter */
9950 NULL, /* System Information Type 2quater */
9951 NULL, /* System Information Type 5bis */
9952 NULL, /* System Information Type 5ter */
9953 NULL, /* System Information Type 9 */
9954 NULL, /* System Information Type 13 */
9956 NULL, /* System Information Type 16 */
9957 NULL, /* System Information Type 17 */
9959 NULL, /* System Information Type 18 */
9960 NULL, /* System Information Type 19 */
9961 NULL, /* System Information Type 20 */
9963 NULL, /* Channel Mode Modify */
9964 dtap_rr_rr_status, /* RR Status */
9965 NULL, /* Channel Mode Modify Acknowledge */
9966 NULL, /* Frequency Redefinition */
9967 NULL, /* Measurement Report */
9968 NULL, /* Classmark Change */
9969 NULL, /* Classmark Enquiry */
9970 NULL, /* Extended Measurement Report */
9971 NULL, /* Extended Measurement Order */
9972 NULL, /* GPRS Suspension Request */
9974 NULL, /* VGCS Uplink Grant */
9975 NULL, /* Uplink Release */
9976 NULL, /* Reserved */
9977 NULL, /* Uplink Busy */
9978 NULL, /* Talker Indication */
9980 NULL, /* UTRAN Classmark Change/Handover To UTRAN Command */ /* spec conflict */
9982 NULL, /* Application Information */
9987 #define NUM_GSM_DTAP_MSG_CC (sizeof(gsm_a_dtap_msg_cc_strings)/sizeof(value_string))
9988 static gint ett_gsm_dtap_msg_cc[NUM_GSM_DTAP_MSG_CC];
9989 static void (*dtap_msg_cc_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) = {
9990 dtap_cc_alerting, /* Alerting */
9991 dtap_cc_call_conf, /* Call Confirmed */
9992 dtap_cc_call_proceed, /* Call Proceeding */
9993 dtap_cc_connect, /* Connect */
9994 NULL /* no associated data */, /* Connect Acknowledge */
9995 dtap_cc_emerg_setup, /* Emergency Setup */
9996 dtap_cc_progress, /* Progress */
9997 dtap_cc_cc_est, /* CC-Establishment */
9998 dtap_cc_cc_est_conf, /* CC-Establishment Confirmed */
9999 dtap_cc_recall, /* Recall */
10000 dtap_cc_start_cc, /* Start CC */
10001 dtap_cc_setup, /* Setup */
10002 dtap_cc_modify, /* Modify */
10003 dtap_cc_modify_complete, /* Modify Complete */
10004 dtap_cc_modify_rej, /* Modify Reject */
10005 dtap_cc_user_info, /* User Information */
10006 NULL /* no associated data */, /* Hold */
10007 NULL /* no associated data */, /* Hold Acknowledge */
10008 dtap_cc_hold_rej, /* Hold Reject */
10009 NULL /* no associated data */, /* Retrieve */
10010 NULL /* no associated data */, /* Retrieve Acknowledge */
10011 dtap_cc_retrieve_rej, /* Retrieve Reject */
10012 dtap_cc_disconnect, /* Disconnect */
10013 dtap_cc_release, /* Release */
10014 dtap_cc_release_complete, /* Release Complete */
10015 dtap_cc_congestion_control, /* Congestion Control */
10016 dtap_cc_notify, /* Notify */
10017 dtap_cc_status, /* Status */
10018 NULL /* no associated data */, /* Status Enquiry */
10019 dtap_cc_start_dtmf, /* Start DTMF */
10020 NULL /* no associated data */, /* Stop DTMF */
10021 NULL /* no associated data */, /* Stop DTMF Acknowledge */
10022 dtap_cc_start_dtmf_ack, /* Start DTMF Acknowledge */
10023 dtap_cc_start_dtmf_rej, /* Start DTMF Reject */
10024 dtap_cc_facility, /* Facility */
10028 #define NUM_GSM_DTAP_MSG_GMM (sizeof(gsm_a_dtap_msg_gmm_strings)/sizeof(value_string))
10029 static gint ett_gsm_dtap_msg_gmm[NUM_GSM_DTAP_MSG_GMM];
10030 static void (*dtap_msg_gmm_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) = {
10031 NULL, /* Attach Request */
10032 NULL, /* Attach Accept */
10033 NULL, /* Attach Complete */
10034 NULL, /* Attach Reject */
10035 NULL, /* Detach Request */
10036 NULL, /* Detach Accept */
10037 NULL, /* Routing Area Update Request */
10038 NULL, /* Routing Area Update Accept */
10039 NULL, /* Routing Area Update Complete */
10040 NULL, /* Routing Area Update Reject */
10041 NULL, /* Service Request */
10042 NULL, /* Service Accept */
10043 NULL, /* Service Reject */
10044 NULL, /* P-TMSI Reallocation Command */
10045 NULL, /* P-TMSI Reallocation Complete */
10046 NULL, /* Authentication and Ciphering Req */
10047 NULL, /* Authentication and Ciphering Resp */
10048 NULL, /* Authentication and Ciphering Rej */
10049 NULL, /* Authentication and Ciphering Failure */
10050 NULL, /* Identity Request */
10051 NULL, /* Identity Response */
10052 NULL, /* GMM Status */
10053 NULL, /* GMM Information */
10057 #define NUM_GSM_DTAP_MSG_SMS (sizeof(gsm_a_dtap_msg_sms_strings)/sizeof(value_string))
10058 static gint ett_gsm_dtap_msg_sms[NUM_GSM_DTAP_MSG_SMS];
10059 static void (*dtap_msg_sms_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) = {
10060 dtap_sms_cp_data, /* CP-DATA */
10061 NULL /* no associated data */, /* CP-ACK */
10062 dtap_sms_cp_error, /* CP-ERROR */
10066 #define NUM_GSM_DTAP_MSG_SM (sizeof(gsm_a_dtap_msg_sm_strings)/sizeof(value_string))
10067 static gint ett_gsm_dtap_msg_sm[NUM_GSM_DTAP_MSG_SM];
10068 static void (*dtap_msg_sm_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) = {
10069 NULL, /* Activate PDP Context Request */
10070 NULL, /* Activate PDP Context Accept */
10071 NULL, /* Activate PDP Context Reject */
10072 NULL, /* Request PDP Context Activation */
10073 NULL, /* Request PDP Context Activation rej. */
10074 NULL, /* Deactivate PDP Context Request */
10075 NULL, /* Deactivate PDP Context Accept */
10076 NULL, /* Modify PDP Context Request(Network to MS direction) */
10077 NULL, /* Modify PDP Context Accept (MS to network direction) */
10078 NULL, /* Modify PDP Context Request(MS to network direction) */
10079 NULL, /* Modify PDP Context Accept (Network to MS direction) */
10080 NULL, /* Modify PDP Context Reject */
10081 NULL, /* Activate Secondary PDP Context Request */
10082 NULL, /* Activate Secondary PDP Context Accept */
10083 NULL, /* Activate Secondary PDP Context Reject */
10084 NULL, /* Reserved: was allocated in earlier phases of the protocol */
10085 NULL, /* Reserved: was allocated in earlier phases of the protocol */
10086 NULL, /* Reserved: was allocated in earlier phases of the protocol */
10087 NULL, /* Reserved: was allocated in earlier phases of the protocol */
10088 NULL, /* Reserved: was allocated in earlier phases of the protocol */
10089 NULL, /* SM Status */
10093 #define NUM_GSM_DTAP_MSG_SS (sizeof(gsm_a_dtap_msg_ss_strings)/sizeof(value_string))
10094 static gint ett_gsm_dtap_msg_ss[NUM_GSM_DTAP_MSG_SS];
10095 static void (*dtap_msg_ss_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) = {
10096 dtap_cc_release_complete, /* Release Complete */
10097 dtap_cc_facility, /* Facility */
10098 dtap_ss_register, /* Register */
10102 #define NUM_GSM_RP_MSG (sizeof(gsm_rp_msg_strings)/sizeof(value_string))
10103 static gint ett_gsm_rp_msg[NUM_GSM_RP_MSG];
10104 static void (*rp_msg_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) = {
10105 rp_data_ms_n, /* RP-DATA (MS to Network) */
10106 rp_data_n_ms, /* RP-DATA (Network to MS */
10107 rp_ack_ms_n, /* RP-ACK (MS to Network) */
10108 rp_ack_n_ms, /* RP-ACK (Network to MS) */
10109 rp_error_ms_n, /* RP-ERROR (MS to Network) */
10110 rp_error_n_ms, /* RP-ERROR (Network to MS) */
10111 rp_smma, /* RP-SMMA (MS to Network) */
10115 /* GENERIC DISSECTOR FUNCTIONS */
10118 dissect_rp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
10121 guint32 offset, saved_offset;
10124 proto_item *rp_item = NULL;
10125 proto_tree *rp_tree = NULL;
10129 if (check_col(pinfo->cinfo, COL_INFO))
10131 col_append_str(pinfo->cinfo, COL_INFO, "(RP) ");
10135 * In the interest of speed, if "tree" is NULL, don't do any work
10136 * not necessary to generate protocol tree items.
10144 saved_offset = offset;
10149 len = tvb_length(tvb);
10152 * add RP message name
10154 oct = tvb_get_guint8(tvb, offset++);
10156 str = my_match_strval((guint32) oct, gsm_rp_msg_strings, &idx);
10159 * create the protocol tree
10164 proto_tree_add_protocol_format(tree, proto_a_rp, tvb, 0, len,
10165 "GSM A-I/F RP - Unknown RP Message Type (0x%02x)",
10168 rp_tree = proto_item_add_subtree(rp_item, ett_rp_msg);
10172 gsm_a_rp_type = oct;
10175 proto_tree_add_protocol_format(tree, proto_a_rp, tvb, 0, -1,
10176 "GSM A-I/F RP - %s",
10179 rp_tree = proto_item_add_subtree(rp_item, ett_gsm_rp_msg[idx]);
10181 if (check_col(pinfo->cinfo, COL_INFO))
10183 col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", str);
10188 * add RP message name
10190 proto_tree_add_uint_format(rp_tree, hf_gsm_a_rp_msg_type,
10191 tvb, saved_offset, 1, oct, "Message Type");
10193 if (str == NULL) return;
10195 if ((len - offset) <= 0) return;
10200 if (rp_msg_fcn[idx] == NULL)
10202 proto_tree_add_text(rp_tree,
10203 tvb, offset, len - offset,
10204 "Message Elements");
10208 (*rp_msg_fcn[idx])(tvb, rp_tree, offset, len - offset);
10214 dissect_bssmap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
10216 static gsm_a_tap_rec_t tap_rec[4];
10217 static gsm_a_tap_rec_t *tap_p;
10218 static int tap_current=0;
10220 guint32 offset, saved_offset;
10223 proto_item *bssmap_item = NULL;
10224 proto_tree *bssmap_tree = NULL;
10228 if (check_col(pinfo->cinfo, COL_INFO))
10230 col_append_str(pinfo->cinfo, COL_INFO, "(BSSMAP) ");
10234 * set tap record pointer
10237 if (tap_current == 4)
10241 tap_p = &tap_rec[tap_current];
10245 saved_offset = offset;
10250 len = tvb_length(tvb);
10253 * add BSSMAP message name
10255 oct = tvb_get_guint8(tvb, offset++);
10257 str = my_match_strval((guint32) oct, gsm_a_bssmap_msg_strings, &idx);
10260 * create the protocol tree
10265 proto_tree_add_protocol_format(tree, proto_a_bssmap, tvb, 0, len,
10266 "GSM A-I/F BSSMAP - Unknown BSSMAP Message Type (0x%02x)",
10269 bssmap_tree = proto_item_add_subtree(bssmap_item, ett_bssmap_msg);
10274 proto_tree_add_protocol_format(tree, proto_a_bssmap, tvb, 0, -1,
10275 "GSM A-I/F BSSMAP - %s",
10278 bssmap_tree = proto_item_add_subtree(bssmap_item, ett_gsm_bssmap_msg[idx]);
10280 if (check_col(pinfo->cinfo, COL_INFO))
10282 col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", str);
10287 * add BSSMAP message name
10289 proto_tree_add_uint_format(bssmap_tree, hf_gsm_a_bssmap_msg_type,
10290 tvb, saved_offset, 1, oct, "Message Type");
10292 tap_p->pdu_type = BSSAP_PDU_TYPE_BSSMAP;
10293 tap_p->message_type = oct;
10295 tap_queue_packet(gsm_a_tap, pinfo, tap_p);
10297 if (str == NULL) return;
10299 if ((len - offset) <= 0) return;
10304 if (bssmap_msg_fcn[idx] == NULL)
10306 proto_tree_add_text(bssmap_tree,
10307 tvb, offset, len - offset,
10308 "Message Elements");
10312 (*bssmap_msg_fcn[idx])(tvb, bssmap_tree, offset, len - offset);
10318 dissect_dtap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
10320 static gsm_a_tap_rec_t tap_rec[4];
10321 static gsm_a_tap_rec_t *tap_p;
10322 static int tap_current=0;
10323 void (*msg_fcn)(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len);
10328 guint32 oct_1, oct_2;
10330 proto_item *dtap_item = NULL;
10331 proto_tree *dtap_tree = NULL;
10332 proto_item *oct_1_item = NULL;
10333 proto_tree *pd_tree = NULL;
10342 len = tvb_length(tvb);
10347 * too short to be DTAP
10349 call_dissector(data_handle, tvb, pinfo, tree);
10353 if (check_col(pinfo->cinfo, COL_INFO))
10355 col_append_str(pinfo->cinfo, COL_INFO, "(DTAP) ");
10359 * set tap record pointer
10362 if (tap_current == 4)
10366 tap_p = &tap_rec[tap_current];
10376 * get protocol discriminator
10378 oct_1 = tvb_get_guint8(tvb, offset++);
10380 if ((((oct_1 & DTAP_TI_MASK) >> 4) & DTAP_TIE_PRES_MASK) == DTAP_TIE_PRES_MASK)
10383 * eventhough we don't know if a TI should be in the message yet
10384 * we rely on the TI/SKIP indicator to be 0 to avoid taking this
10387 oct_2 = tvb_get_guint8(tvb, offset++);
10390 oct = tvb_get_guint8(tvb, offset);
10392 pd = oct_1 & DTAP_PD_MASK;
10406 str = gsm_a_pd_str[pd];
10407 msg_str = my_match_strval((guint32) (oct & DTAP_CC_IEI_MASK), gsm_a_dtap_msg_cc_strings, &idx);
10408 ett_tree = ett_gsm_dtap_msg_cc[idx];
10409 hf_idx = hf_gsm_a_dtap_msg_cc_type;
10410 msg_fcn = dtap_msg_cc_fcn[idx];
10411 ti = (oct_1 & DTAP_TI_MASK) >> 4;
10416 str = gsm_a_pd_str[pd];
10417 msg_str = my_match_strval((guint32) (oct & DTAP_MM_IEI_MASK), gsm_a_dtap_msg_mm_strings, &idx);
10418 ett_tree = ett_gsm_dtap_msg_mm[idx];
10419 hf_idx = hf_gsm_a_dtap_msg_mm_type;
10420 msg_fcn = dtap_msg_mm_fcn[idx];
10425 str = gsm_a_pd_str[pd];
10426 msg_str = my_match_strval((guint32) (oct & DTAP_RR_IEI_MASK), gsm_a_dtap_msg_rr_strings, &idx);
10427 ett_tree = ett_gsm_dtap_msg_rr[idx];
10428 hf_idx = hf_gsm_a_dtap_msg_rr_type;
10429 msg_fcn = dtap_msg_rr_fcn[idx];
10433 str = gsm_a_pd_str[pd];
10434 msg_str = my_match_strval((guint32) (oct & DTAP_GMM_IEI_MASK), gsm_a_dtap_msg_gmm_strings, &idx);
10435 ett_tree = ett_gsm_dtap_msg_gmm[idx];
10436 hf_idx = hf_gsm_a_dtap_msg_gmm_type;
10437 msg_fcn = dtap_msg_gmm_fcn[idx];
10441 str = gsm_a_pd_str[pd];
10442 msg_str = my_match_strval((guint32) (oct & DTAP_SMS_IEI_MASK), gsm_a_dtap_msg_sms_strings, &idx);
10443 ett_tree = ett_gsm_dtap_msg_sms[idx];
10444 hf_idx = hf_gsm_a_dtap_msg_sms_type;
10445 msg_fcn = dtap_msg_sms_fcn[idx];
10446 ti = (oct_1 & DTAP_TI_MASK) >> 4;
10450 str = gsm_a_pd_str[pd];
10451 msg_str = my_match_strval((guint32) (oct & DTAP_SM_IEI_MASK), gsm_a_dtap_msg_sm_strings, &idx);
10452 ett_tree = ett_gsm_dtap_msg_sm[idx];
10453 hf_idx = hf_gsm_a_dtap_msg_sm_type;
10454 msg_fcn = dtap_msg_sm_fcn[idx];
10455 ti = (oct_1 & DTAP_TI_MASK) >> 4;
10459 str = gsm_a_pd_str[pd];
10460 msg_str = my_match_strval((guint32) (oct & DTAP_SS_IEI_MASK), gsm_a_dtap_msg_ss_strings, &idx);
10461 ett_tree = ett_gsm_dtap_msg_ss[idx];
10462 hf_idx = hf_gsm_a_dtap_msg_ss_type;
10463 msg_fcn = dtap_msg_ss_fcn[idx];
10464 ti = (oct_1 & DTAP_TI_MASK) >> 4;
10469 str = gsm_a_pd_str[pd];
10474 * create the protocol tree
10476 if (msg_str == NULL)
10479 proto_tree_add_protocol_format(tree, proto_a_dtap, tvb, 0, len,
10480 "GSM A-I/F DTAP - Unknown DTAP Message Type (0x%02x)",
10483 dtap_tree = proto_item_add_subtree(dtap_item, ett_dtap_msg);
10488 proto_tree_add_protocol_format(tree, proto_a_dtap, tvb, 0, -1,
10489 "GSM A-I/F DTAP - %s",
10492 dtap_tree = proto_item_add_subtree(dtap_item, ett_tree);
10494 if (check_col(pinfo->cinfo, COL_INFO))
10496 col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", msg_str);
10501 proto_tree_add_text(dtap_tree,
10503 "Protocol Discriminator: %s",
10506 pd_tree = proto_item_add_subtree(oct_1_item, ett_dtap_oct_1);
10510 other_decode_bitfield_value(a_bigbuf, oct_1, 0xf0, 8);
10511 proto_tree_add_text(pd_tree,
10513 "%s : Skip Indicator",
10518 other_decode_bitfield_value(a_bigbuf, oct_1, 0x80, 8);
10519 proto_tree_add_text(pd_tree,
10521 "%s : TI flag: %s",
10523 ((oct_1 & 0x80) ? "allocated by receiver" : "allocated by sender"));
10525 if ((ti & DTAP_TIE_PRES_MASK) == DTAP_TIE_PRES_MASK)
10527 /* ti is extended to next octet */
10529 other_decode_bitfield_value(a_bigbuf, oct_1, 0x70, 8);
10530 proto_tree_add_text(pd_tree,
10532 "%s : TIO: The TI value is given by the TIE in octet 2",
10537 other_decode_bitfield_value(a_bigbuf, oct_1, 0x70, 8);
10538 proto_tree_add_text(pd_tree,
10542 ti & DTAP_TIE_PRES_MASK);
10546 other_decode_bitfield_value(a_bigbuf, oct_1, DTAP_PD_MASK, 8);
10547 proto_tree_add_text(pd_tree,
10549 "%s : Protocol Discriminator: %u",
10554 (ti & DTAP_TIE_PRES_MASK) == DTAP_TIE_PRES_MASK)
10556 other_decode_bitfield_value(a_bigbuf, oct_2, 0x80, 8);
10557 proto_tree_add_text(pd_tree,
10562 other_decode_bitfield_value(a_bigbuf, oct_2, DTAP_TIE_MASK, 8);
10563 proto_tree_add_text(pd_tree,
10567 oct_2 & DTAP_TIE_MASK);
10573 if ((pinfo->p2p_dir == P2P_DIR_RECV) &&
10580 * add DTAP message name
10582 proto_tree_add_uint_format(dtap_tree, hf_idx,
10583 tvb, offset, 1, oct,
10588 tap_p->pdu_type = BSSAP_PDU_TYPE_DTAP;
10589 tap_p->message_type = (nsd ? (oct & 0x3f) : oct);
10590 tap_p->protocol_disc = pd;
10592 tap_queue_packet(gsm_a_tap, pinfo, tap_p);
10594 if (msg_str == NULL) return;
10596 if ((len - offset) <= 0) return;
10601 if (msg_fcn == NULL)
10603 proto_tree_add_text(dtap_tree,
10604 tvb, offset, len - offset,
10605 "Message Elements");
10609 (*msg_fcn)(tvb, dtap_tree, offset, len - offset);
10614 /* Register the protocol with Ethereal */
10616 proto_register_gsm_a(void)
10621 /* Setup list of header fields */
10623 static hf_register_info hf[] =
10625 { &hf_gsm_a_bssmap_msg_type,
10626 { "BSSMAP Message Type", "gsm_a.bssmap_msgtype",
10627 FT_UINT8, BASE_HEX, VALS(gsm_a_bssmap_msg_strings), 0x0,
10630 { &hf_gsm_a_dtap_msg_mm_type,
10631 { "DTAP Mobility Management Message Type", "gsm_a.dtap_msg_mm_type",
10632 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_msg_mm_strings), 0x0,
10635 { &hf_gsm_a_dtap_msg_rr_type,
10636 { "DTAP Radio Resources Management Message Type", "gsm_a.dtap_msg_rr_type",
10637 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_msg_rr_strings), 0x0,
10640 { &hf_gsm_a_dtap_msg_cc_type,
10641 { "DTAP Call Control Message Type", "gsm_a.dtap_msg_cc_type",
10642 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_msg_cc_strings), 0x0,
10645 { &hf_gsm_a_dtap_msg_gmm_type,
10646 { "DTAP GPRS Mobility Management Message Type", "gsm_a.dtap_msg_gmm_type",
10647 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_msg_gmm_strings), 0x0,
10650 { &hf_gsm_a_dtap_msg_sms_type,
10651 { "DTAP Short Message Service Message Type", "gsm_a.dtap_msg_sms_type",
10652 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_msg_sms_strings), 0x0,
10655 { &hf_gsm_a_dtap_msg_sm_type,
10656 { "DTAP GPRS Session Management Message Type", "gsm_a.dtap_msg_sm_type",
10657 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_msg_sm_strings), 0x0,
10660 { &hf_gsm_a_dtap_msg_ss_type,
10661 { "DTAP Non call Supplementary Service Message Type", "gsm_a.dtap_msg_ss_type",
10662 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_msg_ss_strings), 0x0,
10665 { &hf_gsm_a_rp_msg_type,
10666 { "RP Message Type", "gsm_a.rp_msg_type",
10667 FT_UINT8, BASE_HEX, VALS(gsm_rp_msg_strings), 0x0,
10670 { &hf_gsm_a_bssmap_elem_id,
10671 { "Element ID", "gsm_a_bssmap.elem_id",
10672 FT_UINT8, BASE_DEC, NULL, 0,
10675 { &hf_gsm_a_dtap_elem_id,
10676 { "Element ID", "gsm_a_dtap.elem_id",
10677 FT_UINT8, BASE_DEC, NULL, 0,
10680 { &hf_gsm_a_length,
10681 { "Length", "gsm_a.len",
10682 FT_UINT8, BASE_DEC, NULL, 0,
10686 { "Sub tree", "gsm_a.none",
10691 { "IMSI", "gsm_a.imsi",
10692 FT_STRING, BASE_DEC, 0, 0,
10696 { "TMSI/P-TMSI", "gsm_a.tmsi",
10697 FT_UINT32, BASE_HEX, 0, 0x0,
10701 { "IMEI", "gsm_a.imei",
10702 FT_STRING, BASE_DEC, 0, 0,
10705 { &hf_gsm_a_imeisv,
10706 { "IMEISV", "gsm_a.imeisv",
10707 FT_STRING, BASE_DEC, 0, 0,
10710 { &hf_gsm_a_cld_party_bcd_num,
10711 { "Called Party BCD Number", "gsm_a.cld_party_bcd_num",
10712 FT_STRING, BASE_DEC, 0, 0,
10715 { &hf_gsm_a_clg_party_bcd_num,
10716 { "Calling Party BCD Number", "gsm_a.clg_party_bcd_num",
10717 FT_STRING, BASE_DEC, 0, 0,
10720 { &hf_gsm_a_cell_ci,
10721 { "Cell CI", "gsm_a.cell_ci",
10722 FT_UINT16, BASE_HEX, 0, 0x0,
10725 { &hf_gsm_a_cell_lac,
10726 { "Cell LAC", "gsm_a.cell_lac",
10727 FT_UINT16, BASE_HEX, 0, 0x0,
10730 { &hf_gsm_a_dlci_cc,
10731 { "Control Channel", "bssap.dlci.cc",
10732 FT_UINT8, BASE_HEX, VALS(bssap_cc_values), 0xc0,
10734 { &hf_gsm_a_dlci_spare,
10735 { "Spare", "bssap.dlci.spare",
10736 FT_UINT8, BASE_HEX, NULL, 0x38,
10738 { &hf_gsm_a_dlci_sapi,
10739 { "SAPI", "bssap.dlci.sapi",
10740 FT_UINT8, BASE_HEX, VALS(bssap_sapi_values), 0x07,
10744 /* Setup protocol subtree array */
10745 #define NUM_INDIVIDUAL_ELEMS 24
10746 static gint *ett[NUM_INDIVIDUAL_ELEMS + NUM_GSM_BSSMAP_MSG +
10747 NUM_GSM_DTAP_MSG_MM + NUM_GSM_DTAP_MSG_RR + NUM_GSM_DTAP_MSG_CC +
10748 NUM_GSM_DTAP_MSG_GMM + NUM_GSM_DTAP_MSG_SMS +
10749 NUM_GSM_DTAP_MSG_SM + NUM_GSM_DTAP_MSG_SS + NUM_GSM_RP_MSG +
10750 NUM_GSM_BSSMAP_ELEM + NUM_GSM_DTAP_ELEM];
10752 memset((void *) ett, -1, sizeof(ett));
10754 ett[0] = &ett_bssmap_msg;
10755 ett[1] = &ett_dtap_msg;
10756 ett[2] = &ett_rp_msg;
10757 ett[3] = &ett_elems;
10758 ett[4] = &ett_elem;
10759 ett[5] = &ett_dtap_oct_1;
10760 ett[6] = &ett_cm_srvc_type;
10761 ett[7] = &ett_gsm_enc_info;
10762 ett[8] = &ett_cell_list;
10763 ett[9] = &ett_dlci;
10764 ett[10] = &ett_bc_oct_3a;
10765 ett[11] = &ett_bc_oct_4;
10766 ett[12] = &ett_bc_oct_5;
10767 ett[13] = &ett_bc_oct_5a;
10768 ett[14] = &ett_bc_oct_5b;
10769 ett[15] = &ett_bc_oct_6;
10770 ett[16] = &ett_bc_oct_6a;
10771 ett[17] = &ett_bc_oct_6b;
10772 ett[18] = &ett_bc_oct_6c;
10773 ett[19] = &ett_bc_oct_6d;
10774 ett[20] = &ett_bc_oct_6e;
10775 ett[21] = &ett_bc_oct_6f;
10776 ett[22] = &ett_bc_oct_6g;
10777 ett[23] = &ett_bc_oct_7;
10779 last_offset = NUM_INDIVIDUAL_ELEMS;
10781 for (i=0; i < NUM_GSM_BSSMAP_MSG; i++, last_offset++)
10783 ett[last_offset] = &ett_gsm_bssmap_msg[i];
10786 for (i=0; i < NUM_GSM_DTAP_MSG_MM; i++, last_offset++)
10788 ett[last_offset] = &ett_gsm_dtap_msg_mm[i];
10791 for (i=0; i < NUM_GSM_DTAP_MSG_RR; i++, last_offset++)
10793 ett[last_offset] = &ett_gsm_dtap_msg_rr[i];
10796 for (i=0; i < NUM_GSM_DTAP_MSG_CC; i++, last_offset++)
10798 ett[last_offset] = &ett_gsm_dtap_msg_cc[i];
10801 for (i=0; i < NUM_GSM_DTAP_MSG_GMM; i++, last_offset++)
10803 ett[last_offset] = &ett_gsm_dtap_msg_gmm[i];
10806 for (i=0; i < NUM_GSM_DTAP_MSG_SMS; i++, last_offset++)
10808 ett[last_offset] = &ett_gsm_dtap_msg_sms[i];
10811 for (i=0; i < NUM_GSM_DTAP_MSG_SM; i++, last_offset++)
10813 ett[last_offset] = &ett_gsm_dtap_msg_sm[i];
10816 for (i=0; i < NUM_GSM_DTAP_MSG_SS; i++, last_offset++)
10818 ett[last_offset] = &ett_gsm_dtap_msg_ss[i];
10821 for (i=0; i < NUM_GSM_RP_MSG; i++, last_offset++)
10823 ett[last_offset] = &ett_gsm_rp_msg[i];
10826 for (i=0; i < NUM_GSM_BSSMAP_ELEM; i++, last_offset++)
10828 ett[last_offset] = &ett_gsm_bssmap_elem[i];
10831 for (i=0; i < NUM_GSM_DTAP_ELEM; i++, last_offset++)
10833 ett[last_offset] = &ett_gsm_dtap_elem[i];
10836 /* Register the protocol name and description */
10839 proto_register_protocol("GSM A-I/F BSSMAP", "GSM BSSMAP", "gsm_a_bssmap");
10841 proto_register_field_array(proto_a_bssmap, hf, array_length(hf));
10844 proto_register_protocol("GSM A-I/F DTAP", "GSM DTAP", "gsm_a_dtap");
10847 proto_register_protocol("GSM A-I/F RP", "GSM RP", "gsm_a_rp");
10849 sms_dissector_table =
10850 register_dissector_table("gsm_a.sms_tpdu", "GSM SMS TPDU",
10851 FT_UINT8, BASE_DEC);
10853 proto_register_subtree_array(ett, array_length(ett));
10855 gsm_a_tap = register_tap("gsm_a");
10860 proto_reg_handoff_gsm_a(void)
10863 bssmap_handle = create_dissector_handle(dissect_bssmap, proto_a_bssmap);
10864 dtap_handle = create_dissector_handle(dissect_dtap, proto_a_dtap);
10865 rp_handle = create_dissector_handle(dissect_rp, proto_a_rp);
10867 dissector_add("bssap.pdu_type", BSSAP_PDU_TYPE_BSSMAP, bssmap_handle);
10868 dissector_add("bssap.pdu_type", BSSAP_PDU_TYPE_DTAP, dtap_handle);
10869 dissector_add("ranap.nas_pdu", BSSAP_PDU_TYPE_DTAP, dtap_handle);
10871 data_handle = find_dissector("data");