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.11 2004/02/20 10:50:13 guy 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 * this should be set on a per message basis, if possible
729 #define IS_UPLINK_FALSE 0
730 #define IS_UPLINK_TRUE 1
731 #define IS_UPLINK_UNKNOWN 2
732 static gint is_uplink;
735 typedef struct dgt_set_t
737 unsigned char out[15];
741 static dgt_set_t Dgt_mbcd = {
743 /* 0 1 2 3 4 5 6 7 8 9 a b c d e */
744 '0','1','2','3','4','5','6','7','8','9','*','#','a','b','c'
748 static dgt_set_t Dgt_tbcd = {
750 /* 0 1 2 3 4 5 6 7 8 9 a b c d e */
751 '0','1','2','3','4','5','6','7','8','9','?','B','C','*','#'
755 static dgt_set_t Dgt_msid = {
757 /* 0 1 2 3 4 5 6 7 8 9 a b c d e */
758 '0','1','2','3','4','5','6','7','8','9','?','?','?','?','?'
765 * Unpack BCD input pattern into output ASCII pattern
767 * Input Pattern is supplied using the same format as the digits
769 * Returns: length of unpacked pattern
773 char *out, /* ASCII pattern out */
774 guchar *in, /* packed pattern in */
775 int num_octs, /* Number of octets to unpack */
776 dgt_set_t *dgt /* Digit definitions */
785 * unpack first value in byte
788 *out++ = dgt->out[i & 0x0f];
792 * unpack second value in byte
796 if (i == 0x0f) /* odd number bytes - hit filler */
799 *out++ = dgt->out[i];
810 my_match_strval(guint32 val, const value_string *vs, gint *idx)
816 if (vs[i].value == val)
819 return(vs[i].strptr);
829 /* ELEMENT FUNCTIONS */
831 #define EXTRANEOUS_DATA_CHECK(edc_len, edc_max_len) \
832 if ((edc_len) > (edc_max_len)) \
834 proto_tree_add_text(tree, tvb, \
835 curr_offset, (edc_len) - (edc_max_len), "Extraneous Data"); \
836 curr_offset += ((edc_len) - (edc_max_len)); \
839 #define SHORT_DATA_CHECK(sdc_len, sdc_min_len) \
840 if ((sdc_len) < (sdc_min_len)) \
842 proto_tree_add_text(tree, tvb, \
843 curr_offset, (sdc_len), "Short Data (?)"); \
844 curr_offset += (sdc_len); \
845 return(curr_offset - offset); \
848 #define EXACT_DATA_CHECK(edc_len, edc_eq_len) \
849 if ((edc_len) != (edc_eq_len)) \
851 proto_tree_add_text(tree, tvb, \
852 curr_offset, (edc_len), "Unexpected Data Length"); \
853 curr_offset += (edc_len); \
854 return(curr_offset - offset); \
857 #define NO_MORE_DATA_CHECK(nmdc_len) \
858 if ((nmdc_len) == (curr_offset - offset)) return(nmdc_len);
861 * Decode the MCC/MNC from 3 octets in 'octs'
864 mcc_mnc_aux(guint8 *octs, gchar *mcc, gchar *mnc)
866 if ((octs[0] & 0x0f) <= 9)
868 mcc[0] = Dgt_tbcd.out[octs[0] & 0x0f];
872 mcc[0] = (octs[0] & 0x0f) + 55;
875 if (((octs[0] & 0xf0) >> 4) <= 9)
877 mcc[1] = Dgt_tbcd.out[(octs[0] & 0xf0) >> 4];
881 mcc[1] = ((octs[0] & 0xf0) >> 4) + 55;
884 if ((octs[1] & 0x0f) <= 9)
886 mcc[2] = Dgt_tbcd.out[octs[1] & 0x0f];
890 mcc[2] = (octs[1] & 0x0f) + 55;
895 if (((octs[1] & 0xf0) >> 4) <= 9)
897 mnc[2] = Dgt_tbcd.out[(octs[1] & 0xf0) >> 4];
901 mnc[2] = ((octs[1] & 0xf0) >> 4) + 55;
904 if ((octs[2] & 0x0f) <= 9)
906 mnc[0] = Dgt_tbcd.out[octs[2] & 0x0f];
910 mnc[0] = (octs[2] & 0x0f) + 55;
913 if (((octs[2] & 0xf0) >> 4) <= 9)
915 mnc[1] = Dgt_tbcd.out[(octs[2] & 0xf0) >> 4];
919 mnc[1] = ((octs[2] & 0xf0) >> 4) + 55;
925 * only a 1 digit MNC (very old)
929 else if (mnc[2] == 'F')
944 BE_CIC, /* Circuit Identity Code */
945 BE_RSVD_1, /* Reserved */
946 BE_RES_AVAIL, /* Resource Available */
947 BE_CAUSE, /* Cause */
948 BE_CELL_ID, /* Cell Identifier */
949 BE_PRIO, /* Priority */
950 BE_L3_HEADER_INFO, /* Layer 3 Header Information */
953 BE_ENC_INFO, /* Encryption Information */
954 BE_CHAN_TYPE, /* Channel Type */
955 BE_PERIODICITY, /* Periodicity */
956 BE_EXT_RES_IND, /* Extended Resource Indicator */
957 BE_NUM_MS, /* Number Of MSs */
958 BE_RSVD_2, /* Reserved */
959 BE_RSVD_3, /* Reserved */
960 BE_RSVD_4, /* Reserved */
961 BE_CM_INFO_2, /* Classmark Information Type 2 */
962 BE_CM_INFO_3, /* Classmark Information Type 3 */
963 BE_INT_BAND, /* Interference Band To Be Used */
964 BE_RR_CAUSE, /* RR Cause */
965 BE_RSVD_5, /* Reserved */
966 BE_L3_INFO, /* Layer 3 Information */
968 BE_DOWN_DTX_FLAG, /* Downlink DTX Flag */
969 BE_CELL_ID_LIST, /* Cell Identifier List */
970 BE_RESP_REQ, /* Response Request */
971 BE_RES_IND_METHOD, /* Resource Indication Method */
972 BE_CM_INFO_1, /* Classmark Information Type 1 */
973 BE_CIC_LIST, /* Circuit Identity Code List */
974 BE_DIAG, /* Diagnostic */
975 BE_L3_MSG, /* Layer 3 Message Contents */
976 BE_CHOSEN_CHAN, /* Chosen Channel */
977 BE_TOT_RES_ACC, /* Total Resource Accessible */
978 BE_CIPH_RESP_MODE, /* Cipher Response Mode */
979 BE_CHAN_NEEDED, /* Channel Needed */
980 BE_TRACE_TYPE, /* Trace Type */
981 BE_TRIGGERID, /* TriggerID */
982 BE_TRACE_REF, /* Trace Reference */
983 BE_TRANSID, /* TransactionID */
984 BE_MID, /* Mobile Identity */
985 BE_OMCID, /* OMCID */
986 BE_FOR_IND, /* Forward Indicator */
987 BE_CHOSEN_ENC_ALG, /* Chosen Encryption Algorithm */
988 BE_CCT_POOL, /* Circuit Pool */
989 BE_CCT_POOL_LIST, /* Circuit Pool List */
990 BE_TIME_IND, /* Time Indication */
991 BE_RES_SIT, /* Resource Situation */
992 BE_CURR_CHAN_1, /* Current Channel Type 1 */
993 BE_QUE_IND, /* Queueing Indicator */
994 BE_SPEECH_VER, /* Speech Version */
995 BE_ASS_REQ, /* Assignment Requirement */
996 BE_TALKER_FLAG, /* Talker Flag */
997 BE_CONN_REL_REQ, /* Connection Release Requested */
998 BE_GROUP_CALL_REF, /* Group Call Reference */
999 BE_EMLPP_PRIO, /* eMLPP Priority */
1000 BE_CONF_EVO_IND, /* Configuration Evolution Indication */
1001 BE_OLD2NEW_INFO, /* Old BSS to New BSS Information */
1002 BE_LSA_ID, /* LSA Identifier */
1003 BE_LSA_ID_LIST, /* LSA Identifier List */
1004 BE_LSA_INFO, /* LSA Information */
1005 BE_LCS_QOS, /* LCS QoS */
1006 BE_LSA_ACC_CTRL, /* LSA access control suppression */
1007 BE_LCS_PRIO, /* LCS Priority */
1008 BE_LOC_TYPE, /* Location Type */
1009 BE_LOC_EST, /* Location Estimate */
1010 BE_POS_DATA, /* Positioning Data */
1011 BE_LCS_CAUSE, /* LCS Cause */
1012 BE_LCS_CLIENT, /* LCS Client Type */
1014 BE_NE_ID, /* Network Element Identity */
1015 BE_GSP_ASSIST_DATA, /* GPS Assistance Data */
1016 BE_DECIPH_KEYS, /* Deciphering Keys */
1017 BE_RET_ERR_REQ, /* Return Error Request */
1018 BE_RET_ERR_CAUSE, /* Return Error Cause */
1019 BE_SEG, /* Segmentation */
1024 #define NUM_GSM_BSSMAP_ELEM (sizeof(gsm_bssmap_elem_strings)/sizeof(value_string))
1025 static gint ett_gsm_bssmap_elem[NUM_GSM_BSSMAP_ELEM];
1031 be_cic(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
1033 guint32 curr_offset;
1037 curr_offset = offset;
1039 value = tvb_get_ntohs(tvb, curr_offset);
1041 other_decode_bitfield_value(a_bigbuf, value, 0xffe0, 16);
1042 proto_tree_add_text(tree,
1043 tvb, curr_offset, 2,
1044 "%s : PCM Multiplexer: %u",
1046 (value & 0xffe0) >> 5);
1048 other_decode_bitfield_value(a_bigbuf, value, 0x001f, 16);
1049 proto_tree_add_text(tree,
1050 tvb, curr_offset, 2,
1051 "%s : Timeslot: %u",
1057 sprintf(add_string, " - (%u) (0x%04x)", value, value);
1059 /* no length check possible */
1061 return(curr_offset - offset);
1068 be_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
1072 guint32 curr_offset;
1075 curr_offset = offset;
1077 oct = tvb_get_guint8(tvb, curr_offset);
1079 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
1080 proto_tree_add_text(tree,
1081 tvb, curr_offset, 1,
1082 "%s : Extension: %s",
1084 (oct & 0x80) ? "extended" : "not extended");
1090 if ((oct & 0x0f) == 0x00)
1092 /* national cause */
1093 switch ((oct & 0x70) >> 4)
1095 case 0: str = "Normal Event"; break;
1096 case 1: str = "Normal Event"; break;
1097 case 2: str = "Resource Unavailable"; break;
1098 case 3: str = "Service or option not available"; break;
1099 case 4: str = "Service or option not implemented"; break;
1100 case 5: str = "Invalid message (e.g., parameter out of range)"; break;
1101 case 6: str = "Protocol error"; break;
1103 str = "Interworking";
1107 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
1108 proto_tree_add_text(tree,
1109 tvb, curr_offset, 1,
1110 "%s : Cause Class: %s",
1114 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
1115 proto_tree_add_text(tree,
1116 tvb, curr_offset, 1,
1117 "%s : National Cause",
1122 proto_tree_add_text(tree, tvb, curr_offset, 1,
1127 strcpy(add_string, " - (National Cause)");
1131 value = tvb_get_guint8(tvb, curr_offset + 1);
1133 other_decode_bitfield_value(a_bigbuf, oct, 0x7f, 8);
1134 proto_tree_add_text(tree,
1135 tvb, curr_offset, 1,
1136 "%s : Cause (MSB): %u",
1138 ((oct & 0x7f) << 8) | value);
1142 other_decode_bitfield_value(a_bigbuf, value, 0xff, 8);
1143 proto_tree_add_text(tree, tvb, curr_offset, 1,
1154 case 0x00: str = "Radio interface message failure"; break;
1155 case 0x01: str = "Radio interface failure"; break;
1156 case 0x02: str = "Uplink quality"; break;
1157 case 0x03: str = "Uplink strength"; break;
1158 case 0x04: str = "Downlink quality"; break;
1159 case 0x05: str = "Downlink strength"; break;
1160 case 0x06: str = "Distance"; break;
1161 case 0x07: str = "O and M intervention"; break;
1162 case 0x08: str = "Response to MSC invocation"; break;
1163 case 0x09: str = "Call control"; break;
1164 case 0x0a: str = "Radio interface failure, reversion to old channel"; break;
1165 case 0x0b: str = "Handover successful"; break;
1166 case 0x0c: str = "Better Cell"; break;
1167 case 0x0d: str = "Directed Retry"; break;
1168 case 0x0e: str = "Joined group call channel"; break;
1169 case 0x0f: str = "Traffic"; break;
1171 case 0x20: str = "Equipment failure"; break;
1172 case 0x21: str = "No radio resource available"; break;
1173 case 0x22: str = "Requested terrestrial resource unavailable"; break;
1174 case 0x23: str = "CCCH overload"; break;
1175 case 0x24: str = "Processor overload"; break;
1176 case 0x25: str = "BSS not equipped"; break;
1177 case 0x26: str = "MS not equipped"; break;
1178 case 0x27: str = "Invalid cell"; break;
1179 case 0x28: str = "Traffic Load"; break;
1180 case 0x29: str = "Preemption"; break;
1182 case 0x30: str = "Requested transcoding/rate adaption unavailable"; break;
1183 case 0x31: str = "Circuit pool mismatch"; break;
1184 case 0x32: str = "Switch circuit pool"; break;
1185 case 0x33: str = "Requested speech version unavailable"; break;
1186 case 0x34: str = "LSA not allowed"; break;
1188 case 0x40: str = "Ciphering algorithm not supported"; break;
1190 case 0x50: str = "Terrestrial circuit already allocated"; break;
1191 case 0x51: str = "Invalid message contents"; break;
1192 case 0x52: str = "Information element or field missing"; break;
1193 case 0x53: str = "Incorrect value"; break;
1194 case 0x54: str = "Unknown Message type"; break;
1195 case 0x55: str = "Unknown Information Element"; break;
1197 case 0x60: str = "Protocol Error between BSS and MSC"; break;
1198 case 0x61: str = "VGCS/VBS call non existent"; break;
1201 if ((oct >= 0x10) && (oct <= 0x17)) { str = "Reserved for international use"; }
1202 else if ((oct >= 0x18) && (oct <= 0x1f)) { str = "Reserved for national use"; }
1203 else if ((oct >= 0x2a) && (oct <= 0x2f)) { str = "Reserved for national use"; }
1204 else if ((oct >= 0x35) && (oct <= 0x3f)) { str = "Reserved for international use"; }
1205 else if ((oct >= 0x41) && (oct <= 0x47)) { str = "Reserved for international use"; }
1206 else if ((oct >= 0x48) && (oct <= 0x4f)) { str = "Reserved for national use"; }
1207 else if ((oct >= 0x56) && (oct <= 0x57)) { str = "Reserved for international use"; }
1208 else if ((oct >= 0x58) && (oct <= 0x5f)) { str = "Reserved for national use"; }
1209 else if ((oct >= 0x62) && (oct <= 0x67)) { str = "Reserved for international use"; }
1210 else if ((oct >= 0x68) && (oct <= 0x6f)) { str = "Reserved for national use"; }
1211 else if ((oct >= 0x70) && (oct <= 0x77)) { str = "Reserved for international use"; }
1212 else if ((oct >= 0x78) && (oct <= 0x7f)) { str = "Reserved for national use"; }
1216 other_decode_bitfield_value(a_bigbuf, oct, 0x7f, 8);
1217 proto_tree_add_text(tree,
1218 tvb, curr_offset, 1,
1219 "%s : Cause: (%u) %s",
1226 sprintf(add_string, " - (%u) %s", oct & 0x7f, str);
1229 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
1231 return(curr_offset - offset);
1238 be_tmsi(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
1240 guint32 curr_offset;
1243 curr_offset = offset;
1245 value = tvb_get_ntohl(tvb, curr_offset);
1247 proto_tree_add_uint(tree, hf_gsm_a_tmsi,
1248 tvb, curr_offset, 4,
1251 sprintf(add_string, " - (0x%04x)", value);
1255 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
1257 return(curr_offset - offset);
1264 be_l3_header_info(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
1267 guint32 curr_offset;
1269 add_string = add_string;
1270 curr_offset = offset;
1272 oct = tvb_get_guint8(tvb, curr_offset);
1274 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
1275 proto_tree_add_text(tree,
1276 tvb, curr_offset, 1,
1280 other_decode_bitfield_value(a_bigbuf, oct, DTAP_PD_MASK, 8);
1281 proto_tree_add_text(tree,
1282 tvb, curr_offset, 1,
1283 "%s : Protocol Discriminator: %s",
1285 gsm_a_pd_str[oct & DTAP_PD_MASK]);
1289 NO_MORE_DATA_CHECK(len);
1291 oct = tvb_get_guint8(tvb, curr_offset);
1293 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
1294 proto_tree_add_text(tree,
1295 tvb, curr_offset, 1,
1299 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
1300 proto_tree_add_text(tree,
1301 tvb, curr_offset, 1,
1304 ((oct & 0x08) ? "allocated by receiver" : "allocated by sender"));
1306 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
1307 proto_tree_add_text(tree,
1308 tvb, curr_offset, 1,
1315 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
1317 return(curr_offset - offset);
1324 be_enc_info(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
1329 guint32 curr_offset;
1331 add_string = add_string;
1332 curr_offset = offset;
1334 oct = tvb_get_guint8(tvb, curr_offset);
1341 other_decode_bitfield_value(a_bigbuf, oct, mask, 8);
1342 proto_tree_add_text(tree,
1343 tvb, curr_offset, 1,
1344 "%s : GSM A5/%u: %spermitted",
1347 (mask & oct) ? "" : "not ");
1352 while (mask != 0x01);
1354 other_decode_bitfield_value(a_bigbuf, oct, mask, 8);
1355 proto_tree_add_text(tree,
1356 tvb, curr_offset, 1,
1357 "%s : No encryption: %spermitted",
1359 (mask & oct) ? "" : "not ");
1363 NO_MORE_DATA_CHECK(len);
1365 proto_tree_add_text(tree,
1366 tvb, curr_offset, len - (curr_offset - offset),
1369 curr_offset += len - (curr_offset - offset);
1371 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
1373 return(curr_offset - offset);
1380 be_chan_type(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
1385 guint32 curr_offset;
1388 curr_offset = offset;
1390 oct = tvb_get_guint8(tvb, curr_offset);
1392 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
1393 proto_tree_add_text(tree,
1394 tvb, curr_offset, 1,
1401 case 1: str = "Speech"; break;
1402 case 2: str = "Data"; break;
1403 case 3: str = "Signalling"; break;
1409 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
1410 proto_tree_add_text(tree,
1411 tvb, curr_offset, 1,
1412 "%s : Speech/Data Indicator: %s",
1416 sprintf(add_string, " - (%s)", str);
1420 NO_MORE_DATA_CHECK(len);
1422 oct = tvb_get_guint8(tvb, curr_offset);
1430 case 0x08: str = "Full rate TCH channel Bm. Prefer full rate TCH"; break;
1431 case 0x09: str = "Half rate TCH channel Lm. Prefer half rate TCH"; break;
1432 case 0x0a: str = "Full or Half rate channel, Full rate preferred changes allowed after first allocation"; break;
1433 case 0x0b: str = "Full or Half rate channel, Half rate preferred changes allowed after first allocation"; break;
1434 case 0x1a: str = "Full or Half rate channel, Full rate preferred changes between full and half rate not allowed after first allocation"; break;
1435 case 0x1b: str = "Full or Half rate channel, Half rate preferred changes between full and half rate not allowed after first allocation"; break;
1436 case 0x0f: str = "Full or Half rate channel, changes allowed after first allocation"; break;
1437 case 0x1f: str = "Full or Half rate channel, changes between full and half rate not allowed after first allocation"; break;
1443 proto_tree_add_text(tree,
1444 tvb, curr_offset, 1,
1445 "Channel Rate and Type: %s",
1450 NO_MORE_DATA_CHECK(len);
1454 oct = tvb_get_guint8(tvb, curr_offset);
1456 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
1457 proto_tree_add_text(tree,
1458 tvb, curr_offset, 1,
1459 "%s : Extension: %s",
1461 (oct & 0x80) ? "extended" : "not extended");
1465 case 0x01: str = "GSM speech full rate version 1"; break;
1466 case 0x11: str = "GSM speech full rate version 2"; break;
1467 case 0x21: str = "GSM speech full rate version 3 (AMR)"; break;
1469 case 0x05: str = "GSM speech half rate version 1"; break;
1470 case 0x15: str = "GSM speech half rate version 2"; break;
1471 case 0x25: str = "GSM speech half rate version 3 (AMR)"; break;
1478 other_decode_bitfield_value(a_bigbuf, oct, 0x7f, 8);
1479 proto_tree_add_text(tree,
1480 tvb, curr_offset, 1,
1481 "%s : Speech version identifier: %s",
1487 while ((len - (curr_offset - offset)) > 0);
1489 else if (sdi == 0x02)
1497 case 0x08: str = "Full rate TCH channel Bm"; break;
1498 case 0x09: str = "Half rate TCH channel Lm"; break;
1499 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;
1500 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;
1501 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;
1502 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;
1504 if ((oct >= 0x20) && (oct <= 0x27))
1506 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";
1508 num_chan = (oct - 0x20) + 1;
1510 else if ((oct >= 0x30) && (oct <= 0x37))
1512 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";
1514 num_chan = (oct - 0x30) + 1;
1525 proto_tree_add_text(tree,
1526 tvb, curr_offset, 1,
1527 "Channel Rate and Type: Max channels %u, %s",
1533 proto_tree_add_text(tree,
1534 tvb, curr_offset, 1,
1535 "Channel Rate and Type: %s",
1541 NO_MORE_DATA_CHECK(len);
1543 oct = tvb_get_guint8(tvb, curr_offset);
1545 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
1546 proto_tree_add_text(tree,
1547 tvb, curr_offset, 1,
1548 "%s : Extension: %s",
1550 (oct & 0x80) ? "extended" : "not extended");
1552 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
1553 proto_tree_add_text(tree,
1554 tvb, curr_offset, 1,
1555 "%s : %sTransparent service",
1557 (oct & 0x40) ? "Non-" : "");
1563 /* non-transparent */
1567 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;
1568 case 0x18: str = "14.5 kbit/s"; break;
1569 case 0x10: str = "12 kbits/s"; break;
1570 case 0x11: str = "6 kbits/s"; break;
1580 case 0x18: str = "14.4 kbit/s"; break;
1581 case 0x10: str = "9.6kbit/s"; break;
1582 case 0x11: str = "4.8kbit/s"; break;
1583 case 0x12: str = "2.4kbit/s"; break;
1584 case 0x13: str = "1.2Kbit/s"; break;
1585 case 0x14: str = "600 bit/s"; break;
1586 case 0x15: str = "1200/75 bit/s (1200 network-to-MS / 75 MS-to-network)"; break;
1597 /* non-transparent */
1601 case 0x16: str = "58 kbit/s (4x14.5 kbit/s)"; break;
1602 case 0x14: str = "48.0 / 43.5 kbit/s (4x12 kbit/s or 3x14.5 kbit/s)"; break;
1603 case 0x13: str = "36.0 / 29.0 kbit/s (3x12 kbit/s or 2x14.5 kbit/s)"; break;
1604 case 0x12: str = "24.0 / 24.0 (4x6 kbit/s or 2x12 kbit/s)"; break;
1605 case 0x11: str = "18.0 / 14.5 kbit/s (3x6 kbit/s or 1x14.5 kbit/s)"; break;
1606 case 0x10: str = "12.0 / 12.0 kbit/s (2x6 kbit/s or 1x12 kbit/s)"; break;
1616 case 0x1f: str = "64 kbit/s, bit transparent"; break;
1617 case 0x1e: str = "56 kbit/s, bit transparent"; break;
1618 case 0x1d: str = "56 kbit/s"; break;
1619 case 0x1c: str = "48 kbit/s"; break;
1620 case 0x1b: str = "38.4 kbit/s"; break;
1621 case 0x1a: str = "28.8 kbit/s"; break;
1622 case 0x19: str = "19.2 kbit/s"; break;
1623 case 0x18: str = "14.4 kbit/s"; break;
1624 case 0x10: str = "9.6 kbit/s"; break;
1632 other_decode_bitfield_value(a_bigbuf, oct, 0x3f, 8);
1633 proto_tree_add_text(tree,
1634 tvb, curr_offset, 1,
1641 NO_MORE_DATA_CHECK(len);
1643 oct = tvb_get_guint8(tvb, curr_offset);
1645 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
1646 proto_tree_add_text(tree,
1647 tvb, curr_offset, 1,
1648 "%s : Extension: %s",
1650 (oct & 0x80) ? "extended" : "not extended");
1652 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
1653 proto_tree_add_text(tree,
1654 tvb, curr_offset, 1,
1660 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
1661 proto_tree_add_text(tree,
1662 tvb, curr_offset, 1,
1663 "%s : 14.5 kbit/s (TCH/F14.4) %sallowed",
1665 (oct & 0x08) ? "" : "not ");
1667 other_decode_bitfield_value(a_bigbuf, oct, 0x04, 8);
1668 proto_tree_add_text(tree,
1669 tvb, curr_offset, 1,
1673 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
1674 proto_tree_add_text(tree,
1675 tvb, curr_offset, 1,
1676 "%s : 12.0 kbit/s (TCH F/9.6) %sallowed",
1678 (oct & 0x02) ? "" : "not ");
1680 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
1681 proto_tree_add_text(tree,
1682 tvb, curr_offset, 1,
1683 "%s : 6.0 kbit/s (TCH F/4.8) %sallowed",
1685 (oct & 0x01) ? "" : "not ");
1689 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
1690 proto_tree_add_text(tree,
1691 tvb, curr_offset, 1,
1692 "%s : 14.5/14.4 kbit/s (TCH/F14.4) %sallowed",
1694 (oct & 0x08) ? "" : "not ");
1696 other_decode_bitfield_value(a_bigbuf, oct, 0x04, 8);
1697 proto_tree_add_text(tree,
1698 tvb, curr_offset, 1,
1702 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
1703 proto_tree_add_text(tree,
1704 tvb, curr_offset, 1,
1705 "%s : 12.0/9.6 kbit/s (TCH F/9.6) %sallowed",
1707 (oct & 0x02) ? "" : "not ");
1709 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
1710 proto_tree_add_text(tree,
1711 tvb, curr_offset, 1,
1712 "%s : 6.0/4.8 kbit/s (TCH F/4.8) %sallowed",
1714 (oct & 0x01) ? "" : "not ");
1719 else if (sdi == 0x03)
1725 case 0x00: str = "SDCCH or Full rate TCH channel Bm or Half rate TCH channel Lm"; break;
1726 case 0x01: str = "SDCCH"; break;
1727 case 0x02: str = "SDCCH or Full rate TCH channel Bm"; break;
1728 case 0x03: str = "SDCCH or Half rate TCH channel Lm"; break;
1729 case 0x08: str = "Full rate TCH channel Bm"; break;
1730 case 0x09: str = "Half rate TCH channel Lm"; break;
1731 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;
1732 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;
1733 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;
1734 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;
1740 proto_tree_add_text(tree,
1741 tvb, curr_offset, 1,
1742 "Channel Rate and Type: %s",
1747 NO_MORE_DATA_CHECK(len);
1749 proto_tree_add_text(tree,
1750 tvb, curr_offset, len - (curr_offset - offset),
1753 curr_offset += len - (curr_offset - offset);
1757 /* unknown format */
1759 proto_tree_add_text(tree,
1760 tvb, curr_offset, len - (curr_offset - offset),
1763 curr_offset += len - (curr_offset - offset);
1766 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
1768 return(curr_offset - offset);
1773 * Formats everything after the discriminator, shared function
1776 be_cell_id_aux(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, guint8 disc)
1780 guint32 curr_offset;
1784 add_string[0] = '\0';
1785 curr_offset = offset;
1793 octs[0] = tvb_get_guint8(tvb, curr_offset);
1794 octs[1] = tvb_get_guint8(tvb, curr_offset + 1);
1795 octs[2] = tvb_get_guint8(tvb, curr_offset + 2);
1797 mcc_mnc_aux(octs, mcc, mnc);
1799 proto_tree_add_text(tree,
1800 tvb, curr_offset, 3,
1801 "Mobile Country Code (MCC): %s, Mobile Network Code (MNC): %s",
1814 value = tvb_get_ntohs(tvb, curr_offset);
1816 proto_tree_add_uint(tree, hf_gsm_a_cell_lac, tvb,
1817 curr_offset, 2, value);
1821 sprintf(add_string, " - LAC (0x%04x)", value);
1823 if ((disc == 0x04) || (disc == 0x05)) break;
1831 value = tvb_get_ntohs(tvb, curr_offset);
1833 proto_tree_add_uint(tree, hf_gsm_a_cell_ci, tvb,
1834 curr_offset, 2, value);
1838 if (add_string[0] == '\0')
1840 sprintf(add_string, " - CI (%u)", value);
1844 sprintf(add_string, "%s/CI (%u)", add_string, value);
1849 proto_tree_add_text(tree, tvb, curr_offset, len - 1,
1850 "Cell ID - Unknown format");
1852 curr_offset += (len - 1);
1856 return(curr_offset - offset);
1860 be_cell_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
1864 guint32 curr_offset;
1865 const gchar *str = NULL;
1868 add_string = add_string;
1869 curr_offset = offset;
1871 oct = tvb_get_guint8(tvb, curr_offset);
1873 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
1874 proto_tree_add_text(tree,
1875 tvb, curr_offset, 1,
1881 if (disc >= (gint) NUM_CELL_DISC_STR)
1887 str = cell_disc_str[disc];
1890 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
1891 proto_tree_add_text(tree,
1892 tvb, curr_offset, 1,
1893 "%s : Cell Identification Discriminator: (%u) %s",
1900 NO_MORE_DATA_CHECK(len);
1903 be_cell_id_aux(tvb, tree, curr_offset, len - (curr_offset - offset), add_string, disc);
1905 /* no length check possible */
1907 return(curr_offset - offset);
1914 be_prio(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
1917 guint32 curr_offset;
1921 curr_offset = offset;
1923 oct = tvb_get_guint8(tvb, curr_offset);
1925 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
1926 proto_tree_add_text(tree,
1927 tvb, curr_offset, 1,
1931 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
1932 proto_tree_add_text(tree,
1933 tvb, curr_offset, 1,
1934 "%s : Preemption Capability Indicator (PCI): this allocation request %s preempt an existing connection",
1936 (oct & 0x40) ? "may" : "shall not");
1938 switch ((oct & 0x3c) >> 2)
1940 case 0x00: str = "Spare"; break;
1941 case 0x0f: str = "priority not used"; break;
1943 str = "1 is highest";
1947 other_decode_bitfield_value(a_bigbuf, oct, 0x3c, 8);
1948 proto_tree_add_text(tree,
1949 tvb, curr_offset, 1,
1950 "%s : Priority Level: (%u) %s",
1955 sprintf(add_string, " - (%u)", (oct & 0x3c) >> 2);
1957 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
1958 proto_tree_add_text(tree,
1959 tvb, curr_offset, 1,
1960 "%s : Queuing Allowed Indicator (QA): queuing %sallowed",
1962 (oct & 0x02) ? "" : "not ");
1964 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
1965 proto_tree_add_text(tree,
1966 tvb, curr_offset, 1,
1967 "%s : Preemption Vulnerability Indicator (PVI): this connection %s be preempted by another allocation request",
1969 (oct & 0x01) ? "might" : "shall not");
1973 /* no length check possible */
1975 return(curr_offset - offset);
1982 be_l3_info(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
1984 guint32 curr_offset;
1987 add_string = add_string;
1988 curr_offset = offset;
1990 proto_tree_add_text(tree, tvb, curr_offset, len,
1991 "Layer 3 Information value");
1994 * dissect the embedded DTAP message
1996 l3_tvb = tvb_new_subset(tvb, curr_offset, len, len);
1998 call_dissector(dtap_handle, l3_tvb, g_pinfo, g_tree);
2002 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
2004 return(curr_offset - offset);
2011 be_dlci(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
2014 guint32 curr_offset;
2015 proto_item *item = NULL;
2016 proto_tree *subtree = NULL;
2019 add_string = add_string;
2020 curr_offset = offset;
2023 proto_tree_add_text(tree, tvb, curr_offset, 1,
2024 "Data Link Connection Identifier");
2026 subtree = proto_item_add_subtree(item, ett_dlci);
2028 oct = tvb_get_guint8(tvb, curr_offset);
2030 proto_tree_add_uint(subtree, hf_gsm_a_dlci_cc, tvb, curr_offset, 1, oct);
2031 proto_tree_add_uint(subtree, hf_gsm_a_dlci_spare, tvb, curr_offset, 1, oct);
2032 proto_tree_add_uint(subtree, hf_gsm_a_dlci_sapi, tvb, curr_offset, 1, oct);
2036 /* no length check possible */
2038 return(curr_offset - offset);
2045 be_down_dtx_flag(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
2048 guint32 curr_offset;
2051 add_string = add_string;
2052 curr_offset = offset;
2054 oct = tvb_get_guint8(tvb, curr_offset);
2056 other_decode_bitfield_value(a_bigbuf, oct, 0xfe, 8);
2057 proto_tree_add_text(tree,
2058 tvb, curr_offset, 1,
2062 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
2063 proto_tree_add_text(tree,
2064 tvb, curr_offset, 1,
2065 "%s : BSS is %s to activate DTX in the downlink direction",
2067 (oct & 0x01) ? "forbidden" : "allowed");
2071 /* no length check possible */
2073 return(curr_offset - offset);
2080 be_cell_id_list(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
2086 guint32 curr_offset;
2087 proto_item *item = NULL;
2088 proto_tree *subtree = NULL;
2089 const gchar *str = NULL;
2091 curr_offset = offset;
2093 oct = tvb_get_guint8(tvb, curr_offset);
2095 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
2096 proto_tree_add_text(tree,
2097 tvb, curr_offset, 1,
2103 if (disc >= (gint) NUM_CELL_DISC_STR)
2109 str = cell_disc_str[disc];
2112 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
2113 proto_tree_add_text(tree,
2114 tvb, curr_offset, 1,
2115 "%s : Cell Identification Discriminator: (%u) %s",
2122 NO_MORE_DATA_CHECK(len);
2128 proto_tree_add_text(tree,
2129 tvb, curr_offset, -1,
2133 subtree = proto_item_add_subtree(item, ett_cell_list);
2135 add_string[0] = '\0';
2137 be_cell_id_aux(tvb, subtree, curr_offset, len - (curr_offset - offset), add_string, disc);
2139 if (add_string[0] != '\0')
2141 proto_item_append_text(item, add_string);
2144 proto_item_set_len(item, consumed);
2146 curr_offset += consumed;
2150 while ((len - (curr_offset - offset)) > 0);
2152 sprintf(add_string, " - %u cell%s",
2153 num_cells, plurality(num_cells, "", "s"));
2155 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
2157 return(curr_offset - offset);
2164 be_chosen_chan(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
2167 guint32 curr_offset;
2171 add_string = add_string;
2172 curr_offset = offset;
2174 oct = tvb_get_guint8(tvb, curr_offset);
2176 switch ((oct & 0xf0) >> 4)
2178 case 0: str = "No channel mode indication"; break;
2179 case 9: str = "Speech (full rate or half rate)"; break;
2180 case 14: str = "Data, 14.5 kbit/s radio interface rate"; break;
2181 case 11: str = "Data, 12.0 kbit/s radio interface rate"; break;
2182 case 12: str = "Data, 6.0 kbit/s radio interface rate"; break;
2183 case 13: str = "Data, 3.6 kbit/s radio interface rate"; break;
2184 case 8: str = "Signalling only"; break;
2190 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
2191 proto_tree_add_text(tree,
2192 tvb, curr_offset, 1,
2193 "%s : Channel mode: %s",
2199 case 0: str = "None"; break;
2200 case 1: str = "SDCCH"; break;
2201 case 8: str = "1 Full rate TCH"; break;
2202 case 9: str = "1 Half rate TCH"; break;
2203 case 10: str = "2 Full Rate TCHs"; break;
2204 case 11: str = "3 Full Rate TCHs"; break;
2205 case 12: str = "4 Full Rate TCHs"; break;
2206 case 13: str = "5 Full Rate TCHs"; break;
2207 case 14: str = "6 Full Rate TCHs"; break;
2208 case 15: str = "7 Full Rate TCHs"; break;
2209 case 4: str = "8 Full Rate TCHs"; break;
2215 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
2216 proto_tree_add_text(tree,
2217 tvb, curr_offset, 1,
2224 /* no length check possible */
2226 return(curr_offset - offset);
2233 be_ciph_resp_mode(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
2236 guint32 curr_offset;
2239 add_string = add_string;
2240 curr_offset = offset;
2242 oct = tvb_get_guint8(tvb, curr_offset);
2244 other_decode_bitfield_value(a_bigbuf, oct, 0xfe, 8);
2245 proto_tree_add_text(tree,
2246 tvb, curr_offset, 1,
2250 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
2251 proto_tree_add_text(tree,
2252 tvb, curr_offset, 1,
2253 "%s : IMEISV must %sbe included by the mobile station",
2255 (oct & 0x01) ? "" : "not ");
2259 /* no length check possible */
2261 return(curr_offset - offset);
2268 be_l3_msg(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
2270 guint32 curr_offset;
2273 add_string = add_string;
2274 curr_offset = offset;
2276 proto_tree_add_text(tree, tvb, curr_offset, len,
2277 "Layer 3 Message Contents");
2280 * dissect the embedded DTAP message
2282 l3_tvb = tvb_new_subset(tvb, curr_offset, len, len);
2284 call_dissector(dtap_handle, l3_tvb, g_pinfo, g_tree);
2288 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
2290 return(curr_offset - offset);
2297 be_for_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
2300 guint32 curr_offset;
2304 add_string = add_string;
2305 curr_offset = offset;
2307 oct = tvb_get_guint8(tvb, curr_offset);
2309 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
2310 proto_tree_add_text(tree,
2311 tvb, curr_offset, 1,
2317 case 1: str = "forward to subsequent BSS, no trace at MSC"; break;
2318 case 2: str = "forward to subsequent BSS, and trace at MSC"; break;
2324 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
2325 proto_tree_add_text(tree,
2326 tvb, curr_offset, 1,
2333 /* no length check possible */
2335 return(curr_offset - offset);
2342 be_chosen_enc_alg(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
2345 guint32 curr_offset;
2349 curr_offset = offset;
2351 oct = tvb_get_guint8(tvb, curr_offset);
2355 case 0x01: str = "No encryption used"; break;
2356 case 0x02: str = "GSM A5/1"; break;
2357 case 0x03: str = "GSM A5/2"; break;
2358 case 0x04: str = "GSM A5/3"; break;
2359 case 0x05: str = "GSM A5/4"; break;
2360 case 0x06: str = "GSM A5/5"; break;
2361 case 0x07: str = "GSM A5/6"; break;
2362 case 0x08: str = "GSM A5/7"; break;
2368 proto_tree_add_text(tree,
2369 tvb, curr_offset, 1,
2370 "Algorithm Identifier: %s",
2375 sprintf(add_string, " - %s", str);
2377 /* no length check possible */
2379 return(curr_offset - offset);
2386 be_cct_pool(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
2389 guint32 curr_offset;
2393 curr_offset = offset;
2395 oct = tvb_get_guint8(tvb, curr_offset);
2401 else if ((oct >= 0x80) && (oct <= 0x8f))
2403 str = ", for national/local use";
2407 str = ", reserved for future international use";
2410 proto_tree_add_text(tree,
2411 tvb, curr_offset, 1,
2412 "Circuit pool number: %u%s",
2418 sprintf(add_string, " - (%u)", oct);
2420 /* no length check possible */
2422 return(curr_offset - offset);
2429 be_curr_chan_1(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
2432 guint32 curr_offset;
2436 add_string = add_string;
2437 curr_offset = offset;
2439 oct = tvb_get_guint8(tvb, curr_offset);
2441 switch ((oct & 0xf0) >> 4)
2443 case 0x00: str = "Signalling only"; break;
2444 case 0x01: str = "Speech (full rate or half rate)"; break;
2445 case 0x06: str = "Data, 14.5 kbit/s radio interface rate"; break;
2446 case 0x03: str = "Data, 12.0 kbit/s radio interface rate"; break;
2447 case 0x04: str = "Data, 6.0 kbit/s radio interface rate"; break;
2448 case 0x05: str = "Data, 3.6 kbit/s radio interface rate"; break;
2454 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
2455 proto_tree_add_text(tree,
2456 tvb, curr_offset, 1,
2457 "%s : Channel Mode: %s",
2463 case 0x01: str = "SDCCH"; break;
2464 case 0x08: str = "1 Full rate TCH"; break;
2465 case 0x09: str = "1 Half rate TCH"; break;
2466 case 0x0a: str = "2 Full Rate TCHs"; break;
2467 case 0x0b: str = "3 Full Rate TCHs"; break;
2468 case 0x0c: str = "4 Full Rate TCHs"; break;
2469 case 0x0d: str = "5 Full Rate TCHs"; break;
2470 case 0x0e: str = "6 Full Rate TCHs"; break;
2471 case 0x0f: str = "7 Full Rate TCHs"; break;
2472 case 0x04: str = "8 Full Rate TCHs"; break;
2478 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
2479 proto_tree_add_text(tree,
2480 tvb, curr_offset, 1,
2481 "%s : Channel: (%u) %s",
2488 /* no length check possible */
2490 return(curr_offset - offset);
2497 be_que_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
2500 guint32 curr_offset;
2503 add_string = add_string;
2504 curr_offset = offset;
2506 oct = tvb_get_guint8(tvb, curr_offset);
2508 other_decode_bitfield_value(a_bigbuf, oct, 0xfc, 8);
2509 proto_tree_add_text(tree,
2510 tvb, curr_offset, 1,
2514 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
2515 proto_tree_add_text(tree,
2516 tvb, curr_offset, 1,
2517 "%s : qri: it is recommended %sto allow queuing",
2519 (oct & 0x02) ? "" : "not ");
2521 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
2522 proto_tree_add_text(tree,
2523 tvb, curr_offset, 1,
2529 /* no length check possible */
2531 return(curr_offset - offset);
2538 be_speech_ver(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
2541 guint32 curr_offset;
2543 gchar *short_str = NULL;
2546 curr_offset = offset;
2548 oct = tvb_get_guint8(tvb, curr_offset);
2550 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
2551 proto_tree_add_text(tree,
2552 tvb, curr_offset, 1,
2558 case 0x01: str = "GSM speech full rate version 1"; short_str = "FR1"; break;
2559 case 0x11: str = "GSM speech full rate version 2"; short_str = "FR2"; break;
2560 case 0x21: str = "GSM speech full rate version 3 (AMR)"; short_str = "FR3 (AMR)"; break;
2562 case 0x05: str = "GSM speech half rate version 1"; short_str = "HR1"; break;
2563 case 0x15: str = "GSM speech half rate version 2"; short_str = "HR2"; break;
2564 case 0x25: str = "GSM speech half rate version 3 (AMR)"; short_str = "HR3 (AMR)"; break;
2572 other_decode_bitfield_value(a_bigbuf, oct, 0x7f, 8);
2573 proto_tree_add_text(tree,
2574 tvb, curr_offset, 1,
2575 "%s : Speech version identifier: %s",
2581 sprintf(add_string, " - (%s)", short_str);
2583 /* no length check possible */
2585 return(curr_offset - offset);
2592 be_apdu(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
2594 guint32 curr_offset;
2596 add_string = add_string;
2597 curr_offset = offset;
2599 proto_tree_add_text(tree, tvb, curr_offset, len,
2603 * dissect the embedded APDU message
2604 * if someone writes a TS 09.31 dissector
2609 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
2611 return(curr_offset - offset);
2616 /* Common Information Elements 10.5.1 */
2617 DE_CELL_ID, /* Cell Identity */
2618 DE_CIPH_KEY_SEQ_NUM, /* Ciphering Key Sequence Number */
2619 DE_LAI, /* Location Area Identification */
2620 DE_MID, /* Mobile Identity */
2621 DE_MS_CM_1, /* Mobile Station Classmark 1 */
2622 DE_MS_CM_2, /* Mobile Station Classmark 2 */
2623 DE_MS_CM_3, /* Mobile Station Classmark 3 */
2624 DE_D_GB_CALL_REF, /* Descriptive group or broadcast call reference */
2625 DE_G_CIPH_KEY_NUM, /* Group Cipher Key Number */
2626 DE_PD_SAPI, /* PD and SAPI $(CCBS)$ */
2627 DE_PRIO, /* Priority Level */
2628 DE_PLMN_LIST, /* PLMN List */
2629 /* Radio Resource Management Information Elements 10.5.2, most are from 10.5.1 */
2630 DE_RR_CAUSE, /* RR Cause */
2631 /* Mobility Management Information Elements 10.5.3 */
2632 DE_AUTH_PARAM_RAND, /* Authentication Parameter RAND */
2633 DE_AUTH_PARAM_AUTN, /* Authentication Parameter AUTN (UMTS authentication challenge only) */
2634 DE_AUTH_RESP_PARAM, /* Authentication Response Parameter */
2635 DE_AUTH_RESP_PARAM_EXT, /* Authentication Response Parameter (extension) (UMTS authentication challenge only) */
2636 DE_AUTH_FAIL_PARAM, /* Authentication Failure Parameter (UMTS authentication challenge only) */
2637 DE_CM_SRVC_TYPE, /* CM Service Type */
2638 DE_ID_TYPE, /* Identity Type */
2639 DE_LOC_UPD_TYPE, /* Location Updating Type */
2640 DE_NETWORK_NAME, /* Network Name */
2641 DE_REJ_CAUSE, /* Reject Cause */
2642 DE_FOP, /* Follow-on Proceed */
2643 DE_TIME_ZONE, /* Time Zone */
2644 DE_TIME_ZONE_TIME, /* Time Zone and Time */
2645 DE_CTS_PERM, /* CTS Permission */
2646 DE_LSA_ID, /* LSA Identifier */
2647 DE_DAY_SAVING_TIME, /* Daylight Saving Time */
2648 /* Call Control Information Elements 10.5.4 */
2649 DE_AUX_STATES, /* Auxiliary States */
2650 DE_BEARER_CAP, /* Bearer Capability */
2651 DE_CC_CAP, /* Call Control Capabilities */
2652 DE_CALL_STATE, /* Call State */
2653 DE_CLD_PARTY_BCD_NUM, /* Called Party BCD Number */
2654 DE_CLD_PARTY_SUB_ADDR, /* Called Party Subaddress */
2655 DE_CLG_PARTY_BCD_NUM, /* Calling Party BCD Number */
2656 DE_CLG_PARTY_SUB_ADDR, /* Calling Party Subaddress */
2657 DE_CAUSE, /* Cause */
2658 DE_CLIR_SUP, /* CLIR Suppression */
2659 DE_CLIR_INV, /* CLIR Invocation */
2660 DE_CONGESTION, /* Congestion Level */
2661 DE_CONN_NUM, /* Connected Number */
2662 DE_CONN_SUB_ADDR, /* Connected Subaddress */
2663 DE_FACILITY, /* Facility */
2664 DE_HLC, /* High Layer Compatibility */
2665 DE_KEYPAD_FACILITY, /* Keypad Facility */
2666 DE_LLC, /* Low Layer Compatibility */
2667 DE_MORE_DATA, /* More Data */
2668 DE_NOT_IND, /* Notification Indicator */
2669 DE_PROG_IND, /* Progress Indicator */
2670 DE_RECALL_TYPE, /* Recall type $(CCBS)$ */
2671 DE_RED_PARTY_BCD_NUM, /* Redirecting Party BCD Number */
2672 DE_RED_PARTY_SUB_ADDR, /* Redirecting Party Subaddress */
2673 DE_REPEAT_IND, /* Repeat Indicator */
2674 DE_REV_CALL_SETUP_DIR, /* Reverse Call Setup Direction */
2675 DE_SETUP_CONTAINER, /* SETUP Container $(CCBS)$ */
2676 DE_SIGNAL, /* Signal */
2677 DE_SS_VER_IND, /* SS Version Indicator */
2678 DE_USER_USER, /* User-user */
2679 DE_ALERT_PATTERN, /* Alerting Pattern $(NIA)$ */
2680 DE_ALLOWED_ACTIONS, /* Allowed Actions $(CCBS)$ */
2681 DE_SI, /* Stream Identifier */
2682 DE_NET_CC_CAP, /* Network Call Control Capabilities */
2683 DE_CAUSE_NO_CLI, /* Cause of No CLI */
2684 DE_IMM_MOD_IND, /* Immediate Modification Indicator */
2685 DE_SUP_CODEC_LIST, /* Supported Codec List */
2686 DE_SRVC_CAT, /* Service Category */
2687 /* GPRS Mobility Management Information Elements 10.5.5 */
2688 DE_ATTACH_RES, /* Attach Result */
2689 DE_ATTACH_TYPE, /* Attach Type */
2690 DE_TMSI_STAT, /* TMSI Status */
2691 DE_DETACH_TYPE, /* Detach Type */
2692 DE_DRX_PARAM, /* DRX Parameter */
2693 DE_FORCE_TO_STAND, /* Force to Standby */
2694 DE_P_TMSI_SIG, /* P-TMSI Signature */
2695 DE_P_TMSI_SIG_2, /* P-TMSI Signature 2 */
2696 DE_ID_TYPE_2, /* Identity Type 2 */
2697 DE_IMEISV_REQ, /* IMEISV Request */
2698 DE_REC_N_PDU_NUM_LIST, /* Receive N-PDU Numbers List */
2699 DE_MS_NET_CAP, /* MS Network Capability */
2700 DE_MS_RAD_ACC_CAP, /* MS Radio Access Capability */
2701 DE_GMM_CAUSE, /* GMM Cause */
2702 DE_RAI, /* Routing Area Identification */
2703 DE_UPD_RES, /* Update Result */
2704 DE_AC_REF_NUM, /* A&C Reference Number */
2705 DE_SRVC_TYPE, /* Service Type */
2706 DE_CELL_NOT, /* Cell Notification */
2707 DE_NET_FEAT_SUP, /* Network Feature Support */
2708 /* Short Message Service Information Elements [5] 8.1.4 */
2709 DE_CP_USER_DATA, /* CP-User Data */
2710 DE_CP_CAUSE, /* CP-Cause */
2711 /* Short Message Service Information Elements [5] 8.2 */
2712 DE_RP_MESSAGE_REF, /* RP-Message Reference */
2713 DE_RP_ORIG_ADDR, /* RP-Origination Address */
2714 DE_RP_DEST_ADDR, /* RP-Destination Address */
2715 DE_RP_USER_DATA, /* RP-User Data */
2716 DE_RP_CAUSE, /* RP-Cause */
2717 /* Session Management Information Elements 10.5.6 */
2718 DE_ACC_POINT_NAME, /* Access Point Name */
2719 DE_NET_SAPI, /* Network Service Access Point Identifier */
2720 DE_PRO_CONF_OPT, /* Protocol Configuration Options */
2721 DE_PD_PRO_ADDR, /* Packet Data Protocol Address */
2722 DE_QOS, /* Quality Of Service */
2723 DE_SM_CAUSE, /* SM Cause */
2724 DE_LINKED_TI, /* Linked TI */
2725 DE_LLC_SAPI, /* LLC Service Access Point Identifier */
2726 DE_TEAR_DOWN_IND, /* Tear Down Indicator */
2727 DE_PACKET_FLOW_ID, /* Packet Flow Identifier */
2728 DE_TRAFFIC_FLOW_TEMPLATE, /* Traffic Flow Template */
2729 /* GPRS Common Information Elements 10.5.7 */
2730 DE_PDP_CONTEXT_STAT, /* PDP Context Status */
2731 DE_RAD_PRIO, /* Radio Priority */
2732 DE_GPRS_TIMER, /* GPRS Timer */
2733 DE_GPRS_TIMER_2, /* GPRS Timer 2 */
2738 #define NUM_GSM_DTAP_ELEM (sizeof(gsm_dtap_elem_strings)/sizeof(value_string))
2739 static gint ett_gsm_dtap_elem[NUM_GSM_DTAP_ELEM];
2745 de_cell_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
2747 guint32 curr_offset;
2749 curr_offset = offset;
2752 be_cell_id_aux(tvb, tree, offset, len, add_string, 0x02);
2754 /* no length check possible */
2756 return(curr_offset - offset);
2763 de_lai(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
2767 guint32 curr_offset;
2768 proto_tree *subtree;
2774 add_string = add_string;
2775 curr_offset = offset;
2777 octs[0] = tvb_get_guint8(tvb, curr_offset);
2778 octs[1] = tvb_get_guint8(tvb, curr_offset + 1);
2779 octs[2] = tvb_get_guint8(tvb, curr_offset + 2);
2781 mcc_mnc_aux(octs, mcc, mnc);
2784 proto_tree_add_text(tree,
2785 tvb, curr_offset, 5,
2786 gsm_dtap_elem_strings[DE_LAI].strptr);
2788 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_LAI]);
2790 proto_tree_add_text(subtree,
2791 tvb, curr_offset, 3,
2792 "Mobile Country Code (MCC): %s, Mobile Network Code (MNC): %s",
2798 value = tvb_get_ntohs(tvb, curr_offset);
2800 proto_tree_add_text(subtree,
2801 tvb, curr_offset, 2,
2802 "Location Area Code (LAC): 0x%04x (%u)",
2806 proto_item_append_text(item, " - LAC (0x%04x)", value);
2810 /* no length check possible */
2812 return(curr_offset - offset);
2819 de_mid(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
2822 guint32 curr_offset;
2827 curr_offset = offset;
2830 oct = tvb_get_guint8(tvb, curr_offset);
2834 case 0: /* No Identity */
2835 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
2836 proto_tree_add_text(tree,
2837 tvb, curr_offset, 1,
2841 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
2842 proto_tree_add_text(tree,
2843 tvb, curr_offset, 1,
2844 "%s : Odd/Even Indicator: %s",
2846 (oct & 0x08) ? "ODD" : "EVEN");
2848 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
2849 proto_tree_add_text(tree,
2850 tvb, curr_offset, 1,
2851 "%s : Type of Identity: No Identity Code",
2854 strcpy(add_string, " - No Identity Code");
2860 proto_tree_add_text(tree, tvb, curr_offset, len - 1,
2861 "Format not supported");
2864 curr_offset += len - 1;
2867 case 3: /* IMEISV */
2873 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
2874 proto_tree_add_text(tree,
2875 tvb, curr_offset, 1,
2876 "%s : Identity Digit 1: %c",
2878 Dgt_msid.out[(oct & 0xf0) >> 4]);
2882 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
2883 proto_tree_add_text(tree,
2884 tvb, curr_offset, 1,
2885 "%s : Odd/Even Indicator: %s",
2887 odd ? "ODD" : "EVEN");
2889 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
2890 proto_tree_add_text(tree,
2891 tvb, curr_offset, 1,
2892 "%s : Type of Identity: %s",
2894 ((oct & 0x07) == 3) ? "IMEISV" : "IMSI");
2896 a_bigbuf[0] = Dgt_msid.out[(oct & 0xf0) >> 4];
2899 poctets = tvb_get_string(tvb, curr_offset, len - (curr_offset - offset));
2901 my_dgt_tbcd_unpack(&a_bigbuf[1], poctets, len - (curr_offset - offset),
2905 proto_tree_add_string_format(tree,
2906 ((oct & 0x07) == 3) ? hf_gsm_a_imeisv : hf_gsm_a_imsi,
2907 tvb, curr_offset, len - (curr_offset - offset),
2912 sprintf(add_string, " - %s (%s)",
2913 ((oct & 0x07) == 3) ? "IMEISV" : "IMSI",
2916 curr_offset += len - (curr_offset - offset);
2920 oct = tvb_get_guint8(tvb, curr_offset - 1);
2922 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
2923 proto_tree_add_text(tree,
2924 tvb, curr_offset - 1, 1,
2931 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
2932 proto_tree_add_text(tree,
2933 tvb, curr_offset, 1,
2934 "%s : Identity Digit 1: %c",
2936 Dgt_msid.out[(oct & 0xf0) >> 4]);
2938 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
2939 proto_tree_add_text(tree,
2940 tvb, curr_offset, 1,
2941 "%s : Odd/Even Indicator: %s",
2943 (oct & 0x08) ? "ODD" : "EVEN");
2945 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
2946 proto_tree_add_text(tree,
2947 tvb, curr_offset, 1,
2948 "%s : Type of Identity: IMEI",
2951 a_bigbuf[0] = Dgt_msid.out[(oct & 0xf0) >> 4];
2954 poctets = tvb_get_string(tvb, curr_offset, len - (curr_offset - offset));
2956 my_dgt_tbcd_unpack(&a_bigbuf[1], poctets, len - (curr_offset - offset),
2960 proto_tree_add_string_format(tree,
2962 tvb, curr_offset, len - (curr_offset - offset),
2967 sprintf(add_string, " - IMEI (%s)", a_bigbuf);
2969 curr_offset += len - (curr_offset - offset);
2972 case 4: /* TMSI/P-TMSI */
2973 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
2974 proto_tree_add_text(tree,
2975 tvb, curr_offset, 1,
2979 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
2980 proto_tree_add_text(tree,
2981 tvb, curr_offset, 1,
2982 "%s : Odd/Even Indicator: %s",
2984 (oct & 0x08) ? "ODD" : "EVEN");
2986 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
2987 proto_tree_add_text(tree,
2988 tvb, curr_offset, 1,
2989 "%s : Type of Identity: TMSI/P-TMSI",
2994 value = tvb_get_ntohl(tvb, curr_offset);
2996 proto_tree_add_uint(tree, hf_gsm_a_tmsi,
2997 tvb, curr_offset, 4,
3000 sprintf(add_string, " - TMSI/P-TMSI (0x%04x)", value);
3005 default: /* Reserved */
3006 proto_tree_add_text(tree, tvb, curr_offset, len,
3009 strcpy(add_string, " - Format Unknown");
3015 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3017 return(curr_offset - offset);
3024 de_ms_cm_1(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
3027 guint32 curr_offset;
3028 proto_tree *subtree;
3033 add_string = add_string;
3034 curr_offset = offset;
3036 oct = tvb_get_guint8(tvb, curr_offset);
3039 proto_tree_add_text(tree,
3040 tvb, curr_offset, 1,
3041 gsm_dtap_elem_strings[DE_MS_CM_1].strptr);
3043 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_MS_CM_1]);
3045 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
3046 proto_tree_add_text(subtree,
3047 tvb, curr_offset, 1,
3051 switch ((oct & 0x60) >> 5)
3053 case 0: str = "Reserved for GSM phase 1"; break;
3054 case 1: str = "Used by GSM phase 2 mobile stations"; break;
3055 case 2: str = "Used by mobile stations supporting R99 or later versions of the protocol"; break;
3057 str = "Reserved for future use";
3061 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
3062 proto_tree_add_text(subtree,
3063 tvb, curr_offset, 1,
3064 "%s : Revision Level: %s",
3068 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
3069 proto_tree_add_text(subtree,
3070 tvb, curr_offset, 1,
3071 "%s : ES IND: Controlled Early Classmark Sending is %simplemented",
3073 (oct & 0x10) ? "" : "not ");
3075 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
3076 proto_tree_add_text(subtree,
3077 tvb, curr_offset, 1,
3078 "%s : A5/1: encryption algorithm A5/1 %savailable",
3080 (oct & 0x08) ? "not " : "");
3084 case 0: str = "Class 1"; break;
3085 case 1: str = "Class 2"; break;
3086 case 2: str = "Class 3"; break;
3087 case 3: str = "Class 4"; break;
3088 case 4: str = "Class 5"; break;
3094 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
3095 proto_tree_add_text(subtree,
3096 tvb, curr_offset, 1,
3097 "%s : RF power capability: %s",
3103 /* no length check possible */
3105 return(curr_offset - offset);
3112 de_ms_cm_2(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
3115 guint32 curr_offset;
3118 add_string = add_string;
3119 curr_offset = offset;
3121 oct = tvb_get_guint8(tvb, curr_offset);
3123 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
3124 proto_tree_add_text(tree,
3125 tvb, curr_offset, 1,
3129 switch ((oct & 0x60) >> 5)
3131 case 0: str = "Reserved for GSM phase 1"; break;
3132 case 1: str = "Used by GSM phase 2 mobile stations"; break;
3133 case 2: str = "Used by mobile stations supporting R99 or later versions of the protocol"; break;
3135 str = "Reserved for future use";
3139 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
3140 proto_tree_add_text(tree,
3141 tvb, curr_offset, 1,
3142 "%s : Revision Level: %s",
3146 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
3147 proto_tree_add_text(tree,
3148 tvb, curr_offset, 1,
3149 "%s : ES IND: Controlled Early Classmark Sending is %simplemented",
3151 (oct & 0x10) ? "" : "not ");
3153 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
3154 proto_tree_add_text(tree,
3155 tvb, curr_offset, 1,
3156 "%s : A5/1: encryption algorithm A5/1 %savailable",
3158 (oct & 0x08) ? "not " : "");
3162 case 0: str = "Class 1"; break;
3163 case 1: str = "Class 2"; break;
3164 case 2: str = "Class 3"; break;
3165 case 3: str = "Class 4"; break;
3166 case 4: str = "Class 5"; break;
3172 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
3173 proto_tree_add_text(tree,
3174 tvb, curr_offset, 1,
3175 "%s : RF power capability: %s",
3181 NO_MORE_DATA_CHECK(len);
3183 oct = tvb_get_guint8(tvb, curr_offset);
3185 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
3186 proto_tree_add_text(tree,
3187 tvb, curr_offset, 1,
3191 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
3192 proto_tree_add_text(tree,
3193 tvb, curr_offset, 1,
3194 "%s : PS capability (pseudo-synchronization capability): %spresent",
3196 (oct & 0x40) ? "" : "not ");
3198 switch ((oct & 0x30) >> 4)
3200 case 0: str = "Default value for phase 1"; break;
3201 case 1: str = "Capability of handling of ellipsis notation and phase 2 error handling"; break;
3207 other_decode_bitfield_value(a_bigbuf, oct, 0x30, 8);
3208 proto_tree_add_text(tree,
3209 tvb, curr_offset, 1,
3210 "%s : SS Screening Indicator: %s",
3214 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
3215 proto_tree_add_text(tree,
3216 tvb, curr_offset, 1,
3217 "%s : SM capability (MT SMS pt to pt capability): MS %s MT SMS",
3219 (oct & 0x08) ? "supports" : "does not support");
3221 other_decode_bitfield_value(a_bigbuf, oct, 0x04, 8);
3222 proto_tree_add_text(tree,
3223 tvb, curr_offset, 1,
3224 "%s : VBS notification reception: %s",
3226 (oct & 0x04) ? "VBS capability and notifications wanted" :
3227 "no VBS capability or no notifications wanted");
3229 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
3230 proto_tree_add_text(tree,
3231 tvb, curr_offset, 1,
3232 "%s : VGCS notification reception: %s",
3234 (oct & 0x02) ? "VGCS capability and notifications wanted" :
3235 "no VGCS capability or no notifications wanted");
3237 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
3238 proto_tree_add_text(tree,
3239 tvb, curr_offset, 1,
3240 "%s : FC Frequency Capability",
3245 NO_MORE_DATA_CHECK(len);
3247 oct = tvb_get_guint8(tvb, curr_offset);
3249 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
3250 proto_tree_add_text(tree,
3251 tvb, curr_offset, 1,
3255 "The MS supports options that are indicated in classmark 3 IE" :
3256 "The MS does not support any options that are indicated in CM3");
3258 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
3259 proto_tree_add_text(tree,
3260 tvb, curr_offset, 1,
3264 other_decode_bitfield_value(a_bigbuf, oct, 0x20, 8);
3265 proto_tree_add_text(tree,
3266 tvb, curr_offset, 1,
3267 "%s : LCS VA capability: LCS value added location request notification capability %ssupported",
3269 (oct & 0x20) ? "" : "not ");
3271 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
3272 proto_tree_add_text(tree,
3273 tvb, curr_offset, 1,
3274 "%s : UCS2 treatment: %s",
3277 "the ME has no preference between the use of the default alphabet and the use of UCS2" :
3278 "the ME has a preference for the default alphabet (defined in 3GPP TS 03.38) over UCS2");
3280 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
3281 proto_tree_add_text(tree,
3282 tvb, curr_offset, 1,
3283 "%s : SoLSA: the ME %s SoLSA",
3285 (oct & 0x08) ? "supports" : "does not support");
3287 other_decode_bitfield_value(a_bigbuf, oct, 0x04, 8);
3288 proto_tree_add_text(tree,
3289 tvb, curr_offset, 1,
3290 "%s : CMSP (CM Service Prompt): %s",
3293 "'Network initiated MO CM connection request' supported for at least one CM protocol" :
3294 "'Network initiated MO CM connection request' not supported");
3296 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
3297 proto_tree_add_text(tree,
3298 tvb, curr_offset, 1,
3299 "%s : A5/3: encryption algorithm A5/3 %savailable",
3301 (oct & 0x02) ? "" : "not ");
3303 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
3304 proto_tree_add_text(tree,
3305 tvb, curr_offset, 1,
3306 "%s : A5/2: encryption algorithm A5/2 %savailable",
3308 (oct & 0x01) ? "" : "not ");
3312 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3314 return(curr_offset - offset);
3321 de_d_gb_call_ref(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
3325 guint32 curr_offset;
3329 add_string = add_string;
3330 curr_offset = offset;
3332 value = tvb_get_ntohl(tvb, curr_offset);
3334 other_decode_bitfield_value(a_bigbuf, value, 0xffffffe0, 32);
3335 proto_tree_add_text(tree, tvb, curr_offset, 4,
3336 "%s : Group or Broadcast call reference: %u (0x%04x)",
3338 (value & 0xffffffe0) >> 5,
3339 (value & 0xffffffe0) >> 5);
3341 other_decode_bitfield_value(a_bigbuf, value, 0x00000010, 32);
3342 proto_tree_add_text(tree, tvb, curr_offset, 4,
3343 "%s : SF Service Flag: %s",
3345 (value & 0x00000010) ?
3346 "VGCS (Group call reference)" : "VBS (Broadcast call reference)");
3348 other_decode_bitfield_value(a_bigbuf, value, 0x00000008, 32);
3349 proto_tree_add_text(tree, tvb, curr_offset, 4,
3350 "%s : AF Acknowledgement Flag: acknowledgment is %srequired",
3352 (value & 0x00000008) ? "" : "not ");
3354 switch (value & 0x00000007)
3356 case 1: str = "call priority level 4"; break;
3357 case 2: str = "call priority level 3"; break;
3358 case 3: str = "call priority level 2"; break;
3359 case 4: str = "call priority level 1"; break;
3360 case 5: str = "call priority level 0"; break;
3361 case 6: str = "call priority level B"; break;
3362 case 7: str = "call priority level A"; break;
3364 str = "no priority applied";
3368 other_decode_bitfield_value(a_bigbuf, value, 0x00000007, 32);
3369 proto_tree_add_text(tree, tvb, curr_offset, 4,
3370 "%s : Call Priority: %s",
3376 oct = tvb_get_guint8(tvb, curr_offset);
3378 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
3379 proto_tree_add_text(tree, tvb, curr_offset, 1,
3380 "%s : Ciphering Information",
3383 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
3384 proto_tree_add_text(tree, tvb, curr_offset, 1,
3390 /* no length check possible */
3392 return(curr_offset - offset);
3399 de_pd_sapi(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
3402 guint32 curr_offset;
3403 proto_tree *subtree;
3408 add_string = add_string;
3409 curr_offset = offset;
3411 oct = tvb_get_guint8(tvb, curr_offset);
3414 proto_tree_add_text(tree,
3415 tvb, curr_offset, 1,
3416 gsm_dtap_elem_strings[DE_PD_SAPI].strptr);
3418 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_PD_SAPI]);
3420 other_decode_bitfield_value(a_bigbuf, oct, 0xc0, 8);
3421 proto_tree_add_text(subtree, tvb, curr_offset, 1,
3425 switch ((oct & 0x30) >> 4)
3427 case 0: str = "SAPI 0"; break;
3428 case 3: str = "SAPI 3"; break;
3434 other_decode_bitfield_value(a_bigbuf, oct, 0x30, 8);
3435 proto_tree_add_text(subtree, tvb, curr_offset, 1,
3436 "%s : SAPI (Sevice Access Point Identifier): %s",
3440 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
3441 proto_tree_add_text(subtree, tvb, curr_offset, 1,
3442 "%s : PD (Protocol Discriminator): %s",
3444 gsm_a_pd_str[oct & 0x0f]);
3448 /* no length check possible */
3450 return(curr_offset - offset);
3457 de_prio(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
3460 guint32 curr_offset;
3464 add_string = add_string;
3465 curr_offset = offset;
3467 oct = tvb_get_guint8(tvb, curr_offset);
3469 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
3470 proto_tree_add_text(tree,
3471 tvb, curr_offset, 1,
3477 case 1: str = "Call priority level 4"; break;
3478 case 2: str = "Call priority level 3"; break;
3479 case 3: str = "Call priority level 2"; break;
3480 case 4: str = "Call priority level 1"; break;
3481 case 5: str = "Call priority level 0"; break;
3482 case 6: str = "Call priority level B"; break;
3483 case 7: str = "Call priority level A"; break;
3485 str = "No priority applied";
3489 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
3490 proto_tree_add_text(tree,
3491 tvb, curr_offset, 1,
3498 /* no length check possible */
3500 return(curr_offset - offset);
3507 de_plmn_list(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
3510 guint32 curr_offset;
3515 add_string = add_string;
3516 curr_offset = offset;
3519 while ((len - (curr_offset - offset)) >= 3)
3521 octs[0] = tvb_get_guint8(tvb, curr_offset);
3522 octs[1] = tvb_get_guint8(tvb, curr_offset + 1);
3523 octs[2] = tvb_get_guint8(tvb, curr_offset + 2);
3525 mcc_mnc_aux(octs, mcc, mnc);
3527 proto_tree_add_text(tree,
3528 tvb, curr_offset, 3,
3529 "PLMN[%u] Mobile Country Code (MCC): %s, Mobile Network Code (MNC): %s",
3539 sprintf(add_string, " - %u PLMN%s",
3540 num_plmn, plurality(num_plmn, "", "s"));
3542 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3544 return(curr_offset - offset);
3551 de_rr_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
3554 guint32 curr_offset;
3558 add_string = add_string;
3559 curr_offset = offset;
3561 oct = tvb_get_guint8(tvb, curr_offset);
3565 case 0x00: str = "Normal event"; break;
3566 case 0x01: str = "Abnormal release, unspecified"; break;
3567 case 0x02: str = "Abnormal release, channel unacceptable"; break;
3568 case 0x03: str = "Abnormal release, timer expired"; break;
3569 case 0x04: str = "Abnormal release, no activity on the radio path"; break;
3570 case 0x05: str = "Preemptive release"; break;
3571 case 0x08: str = "Handover impossible, timing advance out of range"; break;
3572 case 0x09: str = "Channel mode unacceptable"; break;
3573 case 0x0a: str = "Frequency not implemented"; break;
3574 case 0x41: str = "Call already cleared"; break;
3575 case 0x5f: str = "Semantically incorrect message"; break;
3576 case 0x60: str = "Invalid mandatory information"; break;
3577 case 0x61: str = "Message type non-existent or not implemented"; break;
3578 case 0x62: str = "Message type not compatible with protocol state"; break;
3579 case 0x64: str = "Conditional IE error"; break;
3580 case 0x65: str = "No cell allocation available"; break;
3581 case 0x6f: str = "Protocol error unspecified"; break;
3583 str = "Reserved, treat as Normal event";
3587 proto_tree_add_text(tree,
3588 tvb, curr_offset, 1,
3589 "RR Cause value: 0x%02x (%u) %s",
3596 /* no length check possible */
3598 return(curr_offset - offset);
3605 de_auth_param_rand(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
3607 guint32 curr_offset;
3610 add_string = add_string;
3611 curr_offset = offset;
3614 * 12 octets == 128 bits
3616 #define AUTH_PARAM_RAND_LEN 12
3618 proto_tree_add_text(tree,
3619 tvb, curr_offset, AUTH_PARAM_RAND_LEN,
3622 curr_offset += AUTH_PARAM_RAND_LEN;
3624 /* no length check possible */
3626 return(curr_offset - offset);
3633 de_auth_param_autn(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
3635 guint32 curr_offset;
3637 add_string = add_string;
3638 curr_offset = offset;
3640 proto_tree_add_text(tree,
3641 tvb, curr_offset, len,
3646 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3648 return(curr_offset - offset);
3655 de_auth_resp_param(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
3657 guint32 curr_offset;
3660 add_string = add_string;
3661 curr_offset = offset;
3664 * 4 octets == 32 bits
3666 #define AUTH_PARAM_RESP_LEN 4
3668 proto_tree_add_text(tree,
3669 tvb, curr_offset, AUTH_PARAM_RESP_LEN,
3672 curr_offset += AUTH_PARAM_RESP_LEN;
3674 /* no length check possible */
3676 return(curr_offset - offset);
3683 de_auth_resp_param_ext(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
3685 guint32 curr_offset;
3687 add_string = add_string;
3688 curr_offset = offset;
3690 proto_tree_add_text(tree,
3691 tvb, curr_offset, len,
3692 "RES (extension) value");
3696 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3698 return(curr_offset - offset);
3705 de_auth_fail_param(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
3707 guint32 curr_offset;
3709 add_string = add_string;
3710 curr_offset = offset;
3712 proto_tree_add_text(tree,
3713 tvb, curr_offset, len,
3718 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3720 return(curr_offset - offset);
3727 de_network_name(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
3730 guint32 curr_offset;
3733 add_string = add_string;
3734 curr_offset = offset;
3736 oct = tvb_get_guint8(tvb, curr_offset);
3738 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
3739 proto_tree_add_text(tree,
3740 tvb, curr_offset, 1,
3744 switch ((oct & 0x70) >> 4)
3746 case 0x00: str = "Cell Broadcast data coding scheme, GSM default alphabet, language unspecified, defined in 3GPP TS 03.38"; break;
3747 case 0x01: str = "UCS2 (16 bit)"; break;
3753 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
3754 proto_tree_add_text(tree,
3755 tvb, curr_offset, 1,
3756 "%s : Coding Scheme: %s",
3760 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
3761 proto_tree_add_text(tree,
3762 tvb, curr_offset, 1,
3763 "%s : Add CI: The MS should %s",
3766 "add the letters for the Country's Initials and a separator (e.g. a space) to the text string" :
3767 "The MS should not add the letters for the Country's Initials to the text string");
3771 case 1: str = "bit 8 is spare and set to '0' in octet n"; break;
3772 case 2: str = "bits 7 and 8 are spare and set to '0' in octet n"; break;
3773 case 3: str = "bits 6 to 8(inclusive) are spare and set to '0' in octet n"; break;
3774 case 4: str = "bits 5 to 8(inclusive) are spare and set to '0' in octet n"; break;
3775 case 5: str = "bits 4 to 8(inclusive) are spare and set to '0' in octet n"; break;
3776 case 6: str = "bits 3 to 8(inclusive) are spare and set to '0' in octet n"; break;
3777 case 7: str = "bits 2 to 8(inclusive) are spare and set to '0' in octet n"; break;
3779 str = "this field carries no information about the number of spare bits in octet n";
3783 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
3784 proto_tree_add_text(tree,
3785 tvb, curr_offset, 1,
3786 "%s : Number of spare bits in last octet: %s",
3792 NO_MORE_DATA_CHECK(len);
3794 proto_tree_add_text(tree,
3795 tvb, curr_offset, len - 1,
3796 "Text string encoded according to Coding Scheme");
3798 curr_offset += len - 1;
3800 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3802 return(curr_offset - offset);
3809 de_rej_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
3812 guint32 curr_offset;
3816 add_string = add_string;
3817 curr_offset = offset;
3819 oct = tvb_get_guint8(tvb, curr_offset);
3823 case 0x02: str = "IMSI unknown in HLR"; break;
3824 case 0x03: str = "Illegal MS"; break;
3825 case 0x04: str = "IMSI unknown in VLR"; break;
3826 case 0x05: str = "IMEI not accepted"; break;
3827 case 0x06: str = "Illegal ME"; break;
3828 case 0x0b: str = "PLMN not allowed"; break;
3829 case 0x0c: str = "Location Area not allowed"; break;
3830 case 0x0d: str = "Roaming not allowed in this location area"; break;
3831 case 0x0f: str = "No Suitable Cells In Location Area"; break;
3832 case 0x11: str = "Network failure"; break;
3833 case 0x14: str = "MAC failure"; break;
3834 case 0x15: str = "Synch failure"; break;
3835 case 0x16: str = "Congestion"; break;
3836 case 0x17: str = "GSM authentication unacceptable"; break;
3837 case 0x20: str = "Service option not supported"; break;
3838 case 0x21: str = "Requested service option not subscribed"; break;
3839 case 0x22: str = "Service option temporarily out of order"; break;
3840 case 0x26: str = "Call cannot be identified"; break;
3841 case 0x5f: str = "Semantically incorrect message"; break;
3842 case 0x60: str = "Invalid mandatory information"; break;
3843 case 0x61: str = "Message type non-existent or not implemented"; break;
3844 case 0x62: str = "Message type not compatible with the protocol state"; break;
3845 case 0x63: str = "Information element non-existent or not implemented"; break;
3846 case 0x64: str = "Conditional IE error"; break;
3847 case 0x65: str = "Message not compatible with the protocol state"; break;
3848 case 0x6f: str = "Protocol error, unspecified"; break;
3852 case IS_UPLINK_FALSE:
3853 str = "Service option temporarily out of order";
3856 str = "Protocol error, unspecified";
3862 proto_tree_add_text(tree,
3863 tvb, curr_offset, 1,
3864 "Reject Cause value: 0x%02x (%u) %s",
3871 /* no length check possible */
3873 return(curr_offset - offset);
3880 de_time_zone(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
3883 guint32 curr_offset;
3886 add_string = add_string;
3887 curr_offset = offset;
3889 oct = tvb_get_guint8(tvb, curr_offset);
3891 proto_tree_add_text(tree,
3892 tvb, curr_offset, 1,
3893 "Time Zone: 0x%02x (%u)",
3899 /* no length check possible */
3901 return(curr_offset - offset);
3908 de_time_zone_time(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
3910 guint8 oct, oct2, oct3;
3911 guint32 curr_offset;
3914 add_string = add_string;
3915 curr_offset = offset;
3917 oct = tvb_get_guint8(tvb, curr_offset);
3918 oct2 = tvb_get_guint8(tvb, curr_offset+1);
3919 oct3 = tvb_get_guint8(tvb, curr_offset+2);
3921 proto_tree_add_text(tree,
3922 tvb, curr_offset, 3,
3923 "Year %u%u, Month %u%u, Day %u%u",
3929 (oct3 & 0xf0) >> 4);
3933 oct = tvb_get_guint8(tvb, curr_offset);
3934 oct2 = tvb_get_guint8(tvb, curr_offset+1);
3935 oct3 = tvb_get_guint8(tvb, curr_offset+2);
3937 proto_tree_add_text(tree,
3938 tvb, curr_offset, 3,
3939 "Hour %u%u, Minutes %u%u, Seconds %u%u",
3945 (oct3 & 0xf0) >> 4);
3949 oct = tvb_get_guint8(tvb, curr_offset);
3951 proto_tree_add_text(tree,
3952 tvb, curr_offset, 1,
3953 "Time Zone: 0x%02x (%u)",
3959 /* no length check possible */
3961 return(curr_offset - offset);
3968 de_lsa_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
3970 guint32 curr_offset;
3972 add_string = add_string;
3973 curr_offset = offset;
3975 proto_tree_add_text(tree,
3976 tvb, curr_offset, len,
3981 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3983 return(curr_offset - offset);
3990 de_day_saving_time(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
3993 guint32 curr_offset;
3996 add_string = add_string;
3997 curr_offset = offset;
3999 oct = tvb_get_guint8(tvb, curr_offset);
4001 other_decode_bitfield_value(a_bigbuf, oct, 0xfc, 8);
4002 proto_tree_add_text(tree,
4003 tvb, curr_offset, 1,
4009 case 0: str = "No adjustment for Daylight Saving Time"; break;
4010 case 1: str = "+1 hour adjustment for Daylight Saving Time"; break;
4011 case 2: str = "+2 hours adjustment for Daylight Saving Time"; break;
4017 other_decode_bitfield_value(a_bigbuf, oct, 0x03, 8);
4018 proto_tree_add_text(tree,
4019 tvb, curr_offset, 1,
4026 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
4028 return(curr_offset - offset);
4035 de_aux_states(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
4038 guint32 curr_offset;
4041 add_string = add_string;
4042 curr_offset = offset;
4044 oct = tvb_get_guint8(tvb, curr_offset);
4046 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
4047 proto_tree_add_text(tree,
4048 tvb, curr_offset, 1,
4052 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
4053 proto_tree_add_text(tree,
4054 tvb, curr_offset, 1,
4058 switch ((oct & 0x0c) >> 2)
4060 case 0: str = "Idle"; break;
4061 case 1: str = "Hold request"; break;
4062 case 2: str = "Call held"; break;
4064 str = "Retrieve request";
4068 other_decode_bitfield_value(a_bigbuf, oct, 0x0c, 8);
4069 proto_tree_add_text(tree,
4070 tvb, curr_offset, 1,
4071 "%s : Hold auxiliary state: %s",
4077 case 0: str = "Idle"; break;
4078 case 1: str = "MPTY request"; break;
4079 case 2: str = "Call in MPTY"; break;
4081 str = "Split request";
4085 other_decode_bitfield_value(a_bigbuf, oct, 0x03, 8);
4086 proto_tree_add_text(tree,
4087 tvb, curr_offset, 1,
4088 "%s : Multi party auxiliary state: %s",
4094 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
4096 return(curr_offset - offset);
4103 de_bearer_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
4108 guint32 curr_offset;
4109 guint32 saved_offset;
4110 proto_tree *subtree;
4114 #define DE_BC_ITC_SPEECH 0x00
4115 #define DE_BC_ITC_UDI 0x01
4116 #define DE_BC_ITC_EX_PLMN 0x02
4117 #define DE_BC_ITC_FASC_G3 0x03
4118 #define DE_BC_ITC_OTHER_ITC 0x05
4119 #define DE_BC_ITC_RSVD_NET 0x07
4121 curr_offset = offset;
4123 oct = tvb_get_guint8(tvb, curr_offset);
4128 * warning, bearer cap uses extended values that
4129 * are reversed from other parameters!
4131 extended = (oct & 0x80) ? FALSE : TRUE;
4134 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
4135 proto_tree_add_text(tree,
4136 tvb, curr_offset, 1,
4137 "%s : Extension: %s",
4139 extended ? "extended" : "not extended");
4143 case IS_UPLINK_FALSE:
4147 case IS_UPLINK_TRUE:
4149 * depends on Information transfer capability
4153 case DE_BC_ITC_SPEECH:
4156 switch ((oct & 0x60) >> 5)
4158 case 1: str = "MS supports at least full rate speech version 1 but does not support half rate speech version 1"; break;
4159 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;
4160 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;
4169 switch ((oct & 0x60) >> 5)
4171 case 1: str = "Full rate support only MS/fullrate speech version 1 supported"; break;
4172 case 2: str = "Dual rate support MS/half rate speech version 1 preferred, full rate speech version 1 also supported"; break;
4173 case 3: str = "Dual rate support MS/full rate speech version 1 preferred, half rate speech version 1 also supported"; break;
4183 switch ((oct & 0x60) >> 5)
4185 case 1: str = "Full rate support only MS"; break;
4186 case 2: str = "Dual rate support MS/half rate preferred"; break;
4187 case 3: str = "Dual rate support MS/full rate preferred"; break;
4197 str = "(dissect problem)";
4201 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
4202 proto_tree_add_text(tree,
4203 tvb, curr_offset, 1,
4204 "%s : Radio channel requirement: %s",
4208 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
4209 proto_tree_add_text(tree,
4210 tvb, curr_offset, 1,
4211 "%s : Coding standard: %s",
4213 (oct & 0x10) ? "reserved" : "GSM standardized coding");
4215 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
4216 proto_tree_add_text(tree,
4217 tvb, curr_offset, 1,
4218 "%s : Transfer mode: %s",
4220 (oct & 0x08) ? "packet" : "circuit");
4224 case DE_BC_ITC_SPEECH: str = "Speech"; break;
4225 case DE_BC_ITC_UDI: str = "Unrestricted digital information"; break;
4226 case DE_BC_ITC_EX_PLMN: str = "3.1 kHz audio, ex PLMN"; break;
4227 case DE_BC_ITC_FASC_G3: str = "Facsimile group 3"; break;
4228 case DE_BC_ITC_OTHER_ITC: str = "Other ITC (See Octet 5a)"; break;
4229 case DE_BC_ITC_RSVD_NET: str = "Reserved, to be used in the network"; break;
4235 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
4236 proto_tree_add_text(tree,
4237 tvb, curr_offset, 1,
4238 "%s : Information transfer capability: %s",
4242 sprintf(add_string, " - (%s)", str);
4246 NO_MORE_DATA_CHECK(len);
4250 case DE_BC_ITC_SPEECH:
4254 proto_tree_add_text(tree,
4255 tvb, curr_offset, -1,
4256 "Octets 3a - Speech Versions");
4258 subtree = proto_item_add_subtree(item, ett_bc_oct_3a);
4260 saved_offset = curr_offset;
4264 oct = tvb_get_guint8(tvb, curr_offset);
4266 extended = (oct & 0x80) ? FALSE : TRUE;
4268 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
4269 proto_tree_add_text(subtree,
4270 tvb, curr_offset, 1,
4271 "%s : Extension: %s",
4273 extended ? "extended" : "not extended");
4275 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
4276 proto_tree_add_text(subtree,
4277 tvb, curr_offset, 1,
4278 "%s : Coding: octet used for %s",
4280 (oct & 0x40) ? "other extension of octet 3" :
4281 "extension of information transfer capability");
4283 other_decode_bitfield_value(a_bigbuf, oct, 0x30, 8);
4284 proto_tree_add_text(subtree,
4285 tvb, curr_offset, 1,
4291 case 0: str = "GSM full rate speech version 1"; break;
4292 case 2: str = "GSM full rate speech version 2"; break;
4293 case 4: str = "GSM full rate speech version 3"; break;
4294 case 1: str = "GSM half rate speech version 1"; break;
4295 case 5: str = "GSM half rate speech version 3"; break;
4297 str = "Speech version TBD";
4301 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
4302 proto_tree_add_text(subtree,
4303 tvb, curr_offset, 1,
4304 "%s : Speech version indication: %s",
4311 ((len - (curr_offset - offset)) > 0));
4313 proto_item_set_len(item, curr_offset - saved_offset);
4320 proto_tree_add_text(tree,
4321 tvb, curr_offset, 1,
4324 subtree = proto_item_add_subtree(item, ett_bc_oct_4);
4326 oct = tvb_get_guint8(tvb, curr_offset);
4328 extended = (oct & 0x80) ? FALSE : TRUE;
4330 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
4331 proto_tree_add_text(subtree,
4332 tvb, curr_offset, 1,
4333 "%s : Extension: %s",
4335 extended ? "extended" : "not extended");
4337 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
4338 proto_tree_add_text(subtree,
4339 tvb, curr_offset, 1,
4340 "%s : Compression: data compression %s%s",
4342 (oct & 0x40) ? "" : "not ",
4343 is_uplink ? "allowed" : "possible");
4345 switch ((oct & 0x30) >> 4)
4347 case 0x00: str = "Service data unit integrity"; break;
4348 case 0x03: str = "Unstructured"; break;
4354 other_decode_bitfield_value(a_bigbuf, oct, 0x30, 8);
4355 proto_tree_add_text(subtree,
4356 tvb, curr_offset, 1,
4357 "%s : Structure: %s",
4361 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
4362 proto_tree_add_text(subtree,
4363 tvb, curr_offset, 1,
4364 "%s : Duplex mode: %s",
4366 (oct & 0x08) ? "Full" : "Half");
4368 other_decode_bitfield_value(a_bigbuf, oct, 0x04, 8);
4369 proto_tree_add_text(subtree,
4370 tvb, curr_offset, 1,
4371 "%s : Configuration: %s",
4373 (oct & 0x04) ? "Reserved" : "Point-to-point");
4375 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
4376 proto_tree_add_text(subtree,
4377 tvb, curr_offset, 1,
4381 "Data up to and including 4.8 kb/s, full rate, non-transparent, 6 kb/s radio interface rate is requested" :
4382 "No meaning is associated with this value");
4384 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
4385 proto_tree_add_text(subtree,
4386 tvb, curr_offset, 1,
4387 "%s : Establishment: %s",
4389 (oct & 0x01) ? "Reserved" : "Demand");
4393 NO_MORE_DATA_CHECK(len);
4398 proto_tree_add_text(tree,
4399 tvb, curr_offset, 1,
4402 subtree = proto_item_add_subtree(item, ett_bc_oct_5);
4404 oct = tvb_get_guint8(tvb, curr_offset);
4406 extended = (oct & 0x80) ? FALSE : TRUE;
4408 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
4409 proto_tree_add_text(subtree,
4410 tvb, curr_offset, 1,
4411 "%s : Extension: %s",
4413 extended ? "extended" : "not extended");
4415 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
4416 proto_tree_add_text(subtree,
4417 tvb, curr_offset, 1,
4418 "%s : Access Identity: %s",
4420 (oct & 0x60) ? "Reserved" : "Octet identifier");
4422 switch ((oct & 0x18) >> 3)
4424 case 0x00: str = "No rate adaption"; break;
4425 case 0x01: str = "V.110, I.460/X.30 rate adaptation"; break;
4426 case 0x02: str = "ITU-T X.31 flag stuffing"; break;
4428 str = "Other rate adaption (see octet 5a)"; break;
4432 other_decode_bitfield_value(a_bigbuf, oct, 0x18, 8);
4433 proto_tree_add_text(subtree,
4434 tvb, curr_offset, 1,
4435 "%s : Rate Adaption: %s",
4441 case 0x01: str = "I.440/450"; break;
4442 case 0x02: str = "Reserved: was allocated in earlier phases of the protocol"; break;
4443 case 0x03: str = "Reserved: was allocated in earlier phases of the protocol"; break;
4444 case 0x04: str = "Reserved: was allocated in earlier phases of the protocol"; break;
4445 case 0x05: str = "Reserved: was allocated in earlier phases of the protocol"; break;
4446 case 0x06: str = "Reserved: was allocated in earlier phases of the protocol"; break;
4448 str = "Reserved"; break;
4452 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
4453 proto_tree_add_text(subtree,
4454 tvb, curr_offset, 1,
4455 "%s : Signalling Access Protocol: %s",
4461 NO_MORE_DATA_CHECK(len);
4463 if (!extended) goto bc_octet_6;
4468 proto_tree_add_text(tree,
4469 tvb, curr_offset, 1,
4472 subtree = proto_item_add_subtree(item, ett_bc_oct_5a);
4474 oct = tvb_get_guint8(tvb, curr_offset);
4476 extended = (oct & 0x80) ? FALSE : TRUE;
4478 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
4479 proto_tree_add_text(subtree,
4480 tvb, curr_offset, 1,
4481 "%s : Extension: %s",
4483 extended ? "extended" : "not extended");
4485 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
4486 proto_tree_add_text(subtree,
4487 tvb, curr_offset, 1,
4488 "%s : Other ITC: %s",
4490 (oct & 0x60) ? "Reserved" : "Restricted digital information");
4492 switch ((oct & 0x18) >> 3)
4494 case 0x00: str = "V.120"; break;
4495 case 0x01: str = "H.223 & H.245"; break;
4496 case 0x02: str = "PIAFS"; break;
4502 other_decode_bitfield_value(a_bigbuf, oct, 0x18, 8);
4503 proto_tree_add_text(subtree,
4504 tvb, curr_offset, 1,
4505 "%s : Other Rate Adaption: %s",
4509 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
4510 proto_tree_add_text(subtree,
4511 tvb, curr_offset, 1,
4517 NO_MORE_DATA_CHECK(len);
4519 if (!extended) goto bc_octet_6;
4524 proto_tree_add_text(tree,
4525 tvb, curr_offset, 1,
4528 subtree = proto_item_add_subtree(item, ett_bc_oct_5b);
4530 extended = (oct & 0x80) ? FALSE : TRUE;
4532 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
4533 proto_tree_add_text(subtree,
4534 tvb, curr_offset, 1,
4535 "%s : Extension: %s",
4537 extended ? "extended" : "not extended");
4539 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
4540 proto_tree_add_text(subtree,
4541 tvb, curr_offset, 1,
4542 "%s : Rate Adaption Header: %sincluded",
4544 (oct & 0x40) ? "" : "not ");
4546 other_decode_bitfield_value(a_bigbuf, oct, 0x20, 8);
4547 proto_tree_add_text(subtree,
4548 tvb, curr_offset, 1,
4549 "%s : Multiple frame establishment support in data link: %s",
4551 (oct & 0x20) ? "Supported" : "Not supported, only UI frames allowed");
4553 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
4554 proto_tree_add_text(subtree,
4555 tvb, curr_offset, 1,
4556 "%s : Mode of operation: %s",
4558 (oct & 0x10) ? "Protocol sensitive" : "Bit transparent");
4560 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
4561 proto_tree_add_text(subtree,
4562 tvb, curr_offset, 1,
4563 "%s : Logical link identifier negotiation: %s",
4565 (oct & 0x08) ? "Full protocol negotiation" : "Default, LLI=256 only");
4567 other_decode_bitfield_value(a_bigbuf, oct, 0x04, 8);
4568 proto_tree_add_text(subtree,
4569 tvb, curr_offset, 1,
4570 "%s : Assignor/Assignee: Message originator is '%s'",
4572 (oct & 0x04) ? "assignor only" : "default assignee");
4574 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
4575 proto_tree_add_text(subtree,
4576 tvb, curr_offset, 1,
4577 "%s : In band/Out of band negotiation: Negotiation is done %s",
4580 "with USER INFORMATION messages on a temporary signalling connection" :
4581 "in-band using logical link zero");
4583 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
4584 proto_tree_add_text(subtree,
4585 tvb, curr_offset, 1,
4591 NO_MORE_DATA_CHECK(len);
4598 proto_tree_add_text(tree,
4599 tvb, curr_offset, 1,
4602 subtree = proto_item_add_subtree(item, ett_bc_oct_6);
4604 extended = (oct & 0x80) ? FALSE : TRUE;
4606 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
4607 proto_tree_add_text(subtree,
4608 tvb, curr_offset, 1,
4609 "%s : Extension: %s",
4611 extended ? "extended" : "not extended");
4613 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
4614 proto_tree_add_text(subtree,
4615 tvb, curr_offset, 1,
4616 "%s : Layer 1 Identity: %s",
4618 ((oct & 0x60) == 0x20) ? "Octet identifier" : "Reserved");
4620 other_decode_bitfield_value(a_bigbuf, oct, 0x1e, 8);
4621 proto_tree_add_text(subtree,
4622 tvb, curr_offset, 1,
4623 "%s : User information layer 1 protocol: %s",
4625 (oct & 0x1e) ? "Reserved" : "Default layer 1 protocol");
4627 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
4628 proto_tree_add_text(subtree,
4629 tvb, curr_offset, 1,
4630 "%s : Synchronous/asynchronous: %s",
4632 (oct & 0x01) ? "Asynchronous" : "Synchronous");
4636 NO_MORE_DATA_CHECK(len);
4638 if (!extended) goto bc_octet_7;
4643 proto_tree_add_text(tree,
4644 tvb, curr_offset, 1,
4647 subtree = proto_item_add_subtree(item, ett_bc_oct_6a);
4649 extended = (oct & 0x80) ? FALSE : TRUE;
4651 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
4652 proto_tree_add_text(subtree,
4653 tvb, curr_offset, 1,
4654 "%s : Extension: %s",
4656 extended ? "extended" : "not extended");
4658 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
4659 proto_tree_add_text(subtree,
4660 tvb, curr_offset, 1,
4661 "%s : Number of Stop Bits: %s",
4663 (oct & 0x40) ? "2" : "1");
4665 other_decode_bitfield_value(a_bigbuf, oct, 0x20, 8);
4666 proto_tree_add_text(subtree,
4667 tvb, curr_offset, 1,
4668 "%s : Negotiation: %s",
4670 (oct & 0x20) ? "Reserved" : "In-band negotiation not possible");
4672 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
4673 proto_tree_add_text(subtree,
4674 tvb, curr_offset, 1,
4675 "%s : Number of data bits excluding parity bit if present: %s",
4677 (oct & 0x10) ? "8" : "7");
4681 case 0x01: str = "0.3 kbit/s Recommendation X.1 and V.110"; break;
4682 case 0x02: str = "1.2 kbit/s Recommendation X.1 and V.110"; break;
4683 case 0x03: str = "2.4 kbit/s Recommendation X.1 and V.110"; break;
4684 case 0x04: str = "4.8 kbit/s Recommendation X.1 and V.110"; break;
4685 case 0x05: str = "9.6 kbit/s Recommendation X.1 and V.110"; break;
4686 case 0x06: str = "12.0 kbit/s transparent (non compliance with X.1 and V.110)"; break;
4687 case 0x07: str = "Reserved: was allocated in earlier phases of the protocol"; break;
4693 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
4694 proto_tree_add_text(subtree,
4695 tvb, curr_offset, 1,
4696 "%s : User rate: %s",
4702 NO_MORE_DATA_CHECK(len);
4704 if (!extended) goto bc_octet_7;
4709 proto_tree_add_text(tree,
4710 tvb, curr_offset, 1,
4713 subtree = proto_item_add_subtree(item, ett_bc_oct_6b);
4715 extended = (oct & 0x80) ? FALSE : TRUE;
4717 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
4718 proto_tree_add_text(subtree,
4719 tvb, curr_offset, 1,
4720 "%s : Extension: %s",
4722 extended ? "extended" : "not extended");
4724 switch ((oct & 0x60) >> 5)
4726 case 0x02: str = "8 kbit/s"; break;
4727 case 0x03: str = "16 kbit/s"; break;
4733 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
4734 proto_tree_add_text(subtree,
4735 tvb, curr_offset, 1,
4736 "%s : V.110/X.30 rate adaptation Intermediate rate: %s",
4740 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
4741 proto_tree_add_text(subtree,
4742 tvb, curr_offset, 1,
4743 "%s : Network independent clock (NIC) on transmission (Tx): %s to send data with network independent clock",
4745 (oct & 0x10) ? "requires" : "does not require");
4747 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
4748 proto_tree_add_text(subtree,
4749 tvb, curr_offset, 1,
4750 "%s : Network independent clock (NIC) on reception (Rx): %s accept data with network independent clock",
4752 (oct & 0x08) ? "can" : "cannot");
4756 case 0x00: str = "Odd"; break;
4757 case 0x02: str = "Even"; break;
4758 case 0x03: str = "None"; break;
4759 case 0x04: str = "Forced to 0"; break;
4760 case 0x05: str = "Forced to 1"; break;
4766 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
4767 proto_tree_add_text(subtree,
4768 tvb, curr_offset, 1,
4769 "%s : Parity information: %s",
4775 NO_MORE_DATA_CHECK(len);
4777 if (!extended) goto bc_octet_7;
4782 proto_tree_add_text(tree,
4783 tvb, curr_offset, 1,
4786 subtree = proto_item_add_subtree(item, ett_bc_oct_6c);
4788 extended = (oct & 0x80) ? FALSE : TRUE;
4790 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
4791 proto_tree_add_text(subtree,
4792 tvb, curr_offset, 1,
4793 "%s : Extension: %s",
4795 extended ? "extended" : "not extended");
4797 switch ((oct & 0x60) >> 5)
4799 case 0x01: str = "Non transparent (RLP)"; break;
4800 case 0x02: str = "Both, transparent preferred"; break;
4801 case 0x03: str = "Both, non transparent preferred"; break;
4803 str = "Transparent";
4807 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
4808 proto_tree_add_text(subtree,
4809 tvb, curr_offset, 1,
4810 "%s : Connection element: %s",
4816 case 0x00: str = "None"; break;
4817 case 0x01: str = "V.21"; break;
4818 case 0x02: str = "V.22"; break;
4819 case 0x03: str = "V.22 bis"; break;
4820 case 0x04: str = "Reserved: was allocated in earlier phases of the protocol"; break;
4821 case 0x05: str = "V.26 ter"; break;
4822 case 0x06: str = "V.32"; break;
4823 case 0x07: str = "Modem for undefined interface"; break;
4824 case 0x08: str = "Autobauding type 1"; break;
4830 other_decode_bitfield_value(a_bigbuf, oct, 0x1f, 8);
4831 proto_tree_add_text(subtree,
4832 tvb, curr_offset, 1,
4833 "%s : Modem type: %s",
4839 NO_MORE_DATA_CHECK(len);
4841 if (!extended) goto bc_octet_7;
4846 proto_tree_add_text(tree,
4847 tvb, curr_offset, 1,
4850 subtree = proto_item_add_subtree(item, ett_bc_oct_6d);
4852 extended = (oct & 0x80) ? FALSE : TRUE;
4854 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
4855 proto_tree_add_text(subtree,
4856 tvb, curr_offset, 1,
4857 "%s : Extension: %s",
4859 extended ? "extended" : "not extended");
4861 switch ((oct & 0x60) >> 5)
4863 case 0x00: str = "No other modem type specified in this field"; break;
4864 case 0x02: str = "V.34"; break;
4870 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
4871 proto_tree_add_text(subtree,
4872 tvb, curr_offset, 1,
4873 "%s : Other modem type: %s",
4879 case 0x00: str = "Fixed network user rate not applicable/No meaning is associated with this value"; break;
4880 case 0x01: str = "9.6 kbit/s Recommendation X.1 and V.110"; break;
4881 case 0x02: str = "14.4 kbit/s Recommendation X.1 and V.110"; break;
4882 case 0x03: str = "19.2 kbit/s Recommendation X.1 and V.110"; break;
4883 case 0x04: str = "28.8 kbit/s Recommendation X.1 and V.110"; break;
4884 case 0x05: str = "38.4 kbit/s Recommendation X.1 and V.110"; break;
4885 case 0x06: str = "48.0 kbit/s Recommendation X.1 and V.110(synch)"; break;
4886 case 0x07: str = "56.0 kbit/s Recommendation X.1 and V.110(synch) /bit transparent"; break;
4887 case 0x08: str = "64.0 kbit/s bit transparent"; break;
4888 case 0x09: str = "33.6 kbit/s bit transparent"; break;
4889 case 0x0a: str = "32.0 kbit/s Recommendation I.460"; break;
4890 case 0x0b: str = "31.2 kbit/s Recommendation V.34"; break;
4896 other_decode_bitfield_value(a_bigbuf, oct, 0x1f, 8);
4897 proto_tree_add_text(subtree,
4898 tvb, curr_offset, 1,
4899 "%s : Fixed network user rate: %s",
4905 NO_MORE_DATA_CHECK(len);
4907 if (!extended) goto bc_octet_7;
4912 proto_tree_add_text(tree,
4913 tvb, curr_offset, 1,
4916 subtree = proto_item_add_subtree(item, ett_bc_oct_6e);
4918 extended = (oct & 0x80) ? FALSE : TRUE;
4920 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
4921 proto_tree_add_text(subtree,
4922 tvb, curr_offset, 1,
4923 "%s : Extension: %s",
4925 extended ? "extended" : "not extended");
4927 if (is_uplink == IS_UPLINK_TRUE)
4929 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
4930 proto_tree_add_text(subtree,
4931 tvb, curr_offset, 1,
4932 "%s : Acceptable channel codings: TCH/F14.4 %sacceptable",
4934 (oct & 0x40) ? "" : "not ");
4936 other_decode_bitfield_value(a_bigbuf, oct, 0x20, 8);
4937 proto_tree_add_text(subtree,
4938 tvb, curr_offset, 1,
4939 "%s : Acceptable channel codings: Spare",
4942 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
4943 proto_tree_add_text(subtree,
4944 tvb, curr_offset, 1,
4945 "%s : Acceptable channel codings: TCH/F9.6 %sacceptable",
4947 (oct & 0x10) ? "" : "not ");
4949 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
4950 proto_tree_add_text(subtree,
4951 tvb, curr_offset, 1,
4952 "%s : Acceptable channel codings: TCH/F4.8 %sacceptable",
4954 (oct & 0x08) ? "" : "not ");
4956 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
4957 proto_tree_add_text(subtree,
4958 tvb, curr_offset, 1,
4959 "%s : Maximum number of traffic channels: %u TCH",
4965 other_decode_bitfield_value(a_bigbuf, oct, 0x78, 8);
4966 proto_tree_add_text(subtree,
4967 tvb, curr_offset, 1,
4968 "%s : Acceptable channel codings: Spare",
4971 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
4972 proto_tree_add_text(subtree,
4973 tvb, curr_offset, 1,
4974 "%s : Maximum number of traffic channels: Spare",
4980 NO_MORE_DATA_CHECK(len);
4982 if (!extended) goto bc_octet_7;
4987 proto_tree_add_text(tree,
4988 tvb, curr_offset, 1,
4991 subtree = proto_item_add_subtree(item, ett_bc_oct_6f);
4993 extended = (oct & 0x80) ? FALSE : TRUE;
4995 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
4996 proto_tree_add_text(subtree,
4997 tvb, curr_offset, 1,
4998 "%s : Extension: %s",
5000 extended ? "extended" : "not extended");
5002 switch ((oct & 0x70) >> 4)
5004 case 0x00: str = "not allowed/required/applicable"; break;
5005 case 0x01: str = "up to 1 TCH/F allowed/may be requested"; break;
5006 case 0x02: str = "up to 2 TCH/F allowed/may be requested"; break;
5007 case 0x03: str = "up to 3 TCH/F allowed/may be requested"; break;
5008 case 0x04: str = "up to 4 TCH/F allowed/may be requested"; break;
5010 str = "up to 4 TCH/F may be requested";
5014 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
5015 proto_tree_add_text(subtree,
5016 tvb, curr_offset, 1,
5017 "%s : UIMI, User initiated modification indication: %s",
5021 if (is_uplink == IS_UPLINK_TRUE)
5025 case 0x00: str = "Air interface user rate not applicable/No meaning associated with this value"; break;
5026 case 0x01: str = "9.6 kbit/s"; break;
5027 case 0x02: str = "14.4 kbit/s"; break;
5028 case 0x03: str = "19.2 kbit/s"; break;
5029 case 0x05: str = "28.8 kbit/s"; break;
5030 case 0x06: str = "38.4 kbit/s"; break;
5031 case 0x07: str = "43.2 kbit/s"; break;
5032 case 0x08: str = "57.6 kbit/s"; break;
5033 case 0x09: str = "interpreted by the network as 38.4 kbit/s in this version of the protocol"; break;
5034 case 0x0a: str = "interpreted by the network as 38.4 kbit/s in this version of the protocol"; break;
5035 case 0x0b: str = "interpreted by the network as 38.4 kbit/s in this version of the protocol"; break;
5036 case 0x0c: str = "interpreted by the network as 38.4 kbit/s in this version of the protocol"; break;
5042 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
5043 proto_tree_add_text(subtree,
5044 tvb, curr_offset, 1,
5045 "%s : Wanted air interface user rate: %s",
5051 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
5052 proto_tree_add_text(subtree,
5053 tvb, curr_offset, 1,
5054 "%s : Wanted air interface user rate: Spare",
5060 NO_MORE_DATA_CHECK(len);
5062 if (!extended) goto bc_octet_7;
5067 proto_tree_add_text(tree,
5068 tvb, curr_offset, 1,
5071 subtree = proto_item_add_subtree(item, ett_bc_oct_6g);
5073 extended = (oct & 0x80) ? FALSE : TRUE;
5075 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
5076 proto_tree_add_text(subtree,
5077 tvb, curr_offset, 1,
5078 "%s : Extension: %s",
5080 extended ? "extended" : "not extended");
5082 if (is_uplink == IS_UPLINK_TRUE)
5084 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
5085 proto_tree_add_text(subtree,
5086 tvb, curr_offset, 1,
5087 "%s : Acceptable channel codings extended: TCH/F28.8 %sacceptable",
5089 (oct & 0x40) ? "" : "not ");
5091 other_decode_bitfield_value(a_bigbuf, oct, 0x20, 8);
5092 proto_tree_add_text(subtree,
5093 tvb, curr_offset, 1,
5094 "%s : Acceptable channel codings extended: TCH/F32.0 %sacceptable",
5096 (oct & 0x20) ? "" : "not ");
5098 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
5099 proto_tree_add_text(subtree,
5100 tvb, curr_offset, 1,
5101 "%s : Acceptable channel codings extended: TCH/F43.2 %sacceptable",
5103 (oct & 0x10) ? "" : "not ");
5105 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
5106 proto_tree_add_text(subtree,
5107 tvb, curr_offset, 1,
5108 "%s : Acceptable channel codings extended: TCH/F43.2 %sacceptable",
5110 (oct & 0x10) ? "" : "not ");
5112 switch ((oct & 0x0c) >> 2)
5114 case 0: str = "Channel coding symmetry preferred"; break;
5115 case 2: str = "Downlink biased channel coding asymmetry is preferred"; break;
5116 case 1: str = "Uplink biased channel coding asymmetry is preferred"; break;
5118 str = "Unused, treat as Channel coding symmetry preferred";
5122 other_decode_bitfield_value(a_bigbuf, oct, 0x0c, 8);
5123 proto_tree_add_text(subtree,
5124 tvb, curr_offset, 1,
5125 "%s : Channel Coding Asymmetry Indication: %s",
5131 other_decode_bitfield_value(a_bigbuf, oct, 0x7c, 8);
5132 proto_tree_add_text(subtree,
5133 tvb, curr_offset, 1,
5134 "%s : EDGE Channel Codings: Spare",
5138 other_decode_bitfield_value(a_bigbuf, oct, 0x03, 8);
5139 proto_tree_add_text(subtree,
5140 tvb, curr_offset, 1,
5146 NO_MORE_DATA_CHECK(len);
5153 proto_tree_add_text(tree,
5154 tvb, curr_offset, 1,
5157 subtree = proto_item_add_subtree(item, ett_bc_oct_7);
5159 extended = (oct & 0x80) ? FALSE : TRUE;
5161 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
5162 proto_tree_add_text(subtree,
5163 tvb, curr_offset, 1,
5164 "%s : Extension: %s",
5166 extended ? "extended" : "not extended");
5168 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
5169 proto_tree_add_text(subtree,
5170 tvb, curr_offset, 1,
5171 "%s : Layer 2 Identity: %s",
5173 ((oct & 0x60) == 0x40) ? "Octet identifier" : "Reserved");
5177 case 0x06: str = "Reserved: was allocated in earlier phases of the protocol"; break;
5178 case 0x08: str = "ISO 6429, codeset 0 (DC1/DC3)"; break;
5179 case 0x09: str = "Reserved: was allocated but never used in earlier phases of the protocol"; break;
5180 case 0x0a: str = "Videotex profile 1"; break;
5181 case 0x0c: str = "COPnoFlCt (Character oriented Protocol with no Flow Control mechanism)"; break;
5182 case 0x0d: str = "Reserved: was allocated in earlier phases of the protocol"; break;
5188 other_decode_bitfield_value(a_bigbuf, oct, 0x1f, 8);
5189 proto_tree_add_text(subtree,
5190 tvb, curr_offset, 1,
5191 "%s : User information layer 2 protocol: %s",
5197 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
5199 return(curr_offset - offset);
5206 de_cc_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
5209 guint32 curr_offset;
5211 add_string = add_string;
5212 curr_offset = offset;
5214 oct = tvb_get_guint8(tvb, curr_offset);
5216 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
5218 switch ((oct & 0xf0) >> 4)
5221 proto_tree_add_text(tree,
5222 tvb, curr_offset, 1,
5223 "%s : Maximum number of supported bearers: 1",
5228 proto_tree_add_text(tree,
5229 tvb, curr_offset, 1,
5230 "%s : Maximum number of supported bearers: %u",
5236 other_decode_bitfield_value(a_bigbuf, oct, 0x0c, 8);
5237 proto_tree_add_text(tree,
5238 tvb, curr_offset, 1,
5242 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
5243 proto_tree_add_text(tree,
5244 tvb, curr_offset, 1,
5245 "%s : PCP: the mobile station %s the Prolonged Clearing Procedure",
5247 (oct & 0x02) ? "supports" : "does not support");
5249 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
5250 proto_tree_add_text(tree,
5251 tvb, curr_offset, 1,
5255 "the mobile station supports DTMF as specified in subclause 5.5.7 of TS 24.008" :
5256 "reserved for earlier versions of the protocol");
5260 NO_MORE_DATA_CHECK(len);
5262 oct = tvb_get_guint8(tvb, curr_offset);
5264 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
5265 proto_tree_add_text(tree,
5266 tvb, curr_offset, 1,
5270 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
5271 proto_tree_add_text(tree,
5272 tvb, curr_offset, 1,
5273 "%s : Maximum number of speech bearers: %u",
5279 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
5281 return(curr_offset - offset);
5288 de_call_state(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
5291 guint32 curr_offset;
5292 proto_tree *subtree;
5297 add_string = add_string;
5298 curr_offset = offset;
5300 oct = tvb_get_guint8(tvb, curr_offset);
5303 proto_tree_add_text(tree,
5304 tvb, curr_offset, 1,
5305 gsm_dtap_elem_strings[DE_CALL_STATE].strptr);
5307 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_CALL_STATE]);
5309 switch ((oct & 0xc0) >> 6)
5311 case 0: str = "Coding as specified in ITU-T Rec. Q.931"; break;
5312 case 1: str = "Reserved for other international standards"; break;
5313 case 2: str = "National standard"; break;
5315 str = "Standard defined for the GSM PLMNS";
5319 other_decode_bitfield_value(a_bigbuf, oct, 0xc0, 8);
5320 proto_tree_add_text(subtree,
5321 tvb, curr_offset, 1,
5322 "%s : Coding standard: %s",
5328 case 0x00: str = "UO - null NO - null"; break;
5329 case 0x02: str = "U0.1- MM connection pending N0.1- MM connection pending"; break;
5330 case 0x22: str = "U0.2- CC prompt present N0.2- CC connection pending"; break;
5331 case 0x23: str = "U0.3- Wait for network information N0.3- Network answer pending"; break;
5332 case 0x24: str = "U0.4- CC-Establishment present N0.4- CC-Establishment present"; break;
5333 case 0x25: str = "U0.5- CC-Establishment confirmed N0.5- CC-Establishment confirmed"; break;
5334 case 0x26: str = "U0.6- Recall present N0.6- Recall present"; break;
5335 case 0x01: str = "U1 - call initiated N1 - call initiated"; break;
5336 case 0x03: str = "U3 - mobile originating call proceeding N3 - mobile originating call proceeding"; break;
5337 case 0x04: str = "U4 - call delivered N4 - call delivered"; break;
5338 case 0x06: str = "U6 - call present N6 - call present"; break;
5339 case 0x07: str = "U7 - call received N7 - call received"; break;
5340 case 0x08: str = "U8 - connect request N8 - connect request"; break;
5341 case 0x09: str = "U9 - mobile terminating call confirmed N9 - mobile terminating call confirmed"; break;
5342 case 0x0a: str = "U10- active N10- active"; break;
5343 case 0x0b: str = "U11- disconnect request"; break;
5344 case 0x0c: str = "U12- disconnect indication N12-disconnect indication"; break;
5345 case 0x13: str = "U19- release request N19- release request"; break;
5346 case 0x1a: str = "U26- mobile originating modify N26- mobile originating modify"; break;
5347 case 0x1b: str = "U27- mobile terminating modify N27- mobile terminating modify"; break;
5348 case 0x1c: str = " N28- connect indication"; break;
5354 other_decode_bitfield_value(a_bigbuf, oct, 0x3f, 8);
5355 proto_tree_add_text(subtree,
5356 tvb, curr_offset, 1,
5357 "%s : Call state value: %s",
5363 /* no length check possible */
5365 return(curr_offset - offset);
5372 de_cld_party_bcd_num(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
5377 guint32 curr_offset;
5380 curr_offset = offset;
5382 oct = tvb_get_guint8(tvb, curr_offset);
5384 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
5385 proto_tree_add_text(tree,
5386 tvb, curr_offset, 1,
5390 ton = (oct & 0x70) >> 4;
5393 case 0: str = "Unknown"; break;
5394 case 1: str = "International number"; break;
5395 case 2: str = "National number"; break;
5396 case 3: str = "Network specific number"; break;
5397 case 4: str = "Dedicated access, short code"; break;
5398 case 7: str = "Reserved for extension"; break;
5404 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
5405 proto_tree_add_text(tree,
5406 tvb, curr_offset, 1,
5407 "%s : Type of number: %s",
5418 case 0: str = "Unknown"; break;
5419 case 1: str = "ISDN/telephony numbering plan (Rec. E.164/E.163)"; break;
5420 case 3: str = "Data numbering plan (Recommendation X.121)"; break;
5421 case 4: str = "Telex numbering plan (Recommendation F.69)"; break;
5422 case 8: str = "National numbering plan"; break;
5423 case 9: str = "Private numbering plan"; break;
5424 case 11: str = "Reserved for CTS (see 3GPP TS 44.056)"; break;
5425 case 15: str = "Reserved for extension"; break;
5433 str = "not applicable";
5436 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
5437 proto_tree_add_text(tree,
5438 tvb, curr_offset, 1,
5439 "%s : Numbering plan identification: %s",
5445 NO_MORE_DATA_CHECK(len);
5447 poctets = tvb_get_string(tvb, curr_offset, len - (curr_offset - offset));
5449 my_dgt_tbcd_unpack(a_bigbuf, poctets, len - (curr_offset - offset),
5453 proto_tree_add_string_format(tree, hf_gsm_a_cld_party_bcd_num,
5454 tvb, curr_offset, len - (curr_offset - offset),
5459 curr_offset += len - (curr_offset - offset);
5461 sprintf(add_string, " - (%s)", a_bigbuf);
5463 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
5465 return(curr_offset - offset);
5472 de_cld_party_sub_addr(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
5475 guint32 curr_offset;
5478 add_string = add_string;
5479 curr_offset = offset;
5481 oct = tvb_get_guint8(tvb, curr_offset);
5483 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
5484 proto_tree_add_text(tree,
5485 tvb, curr_offset, 1,
5489 switch ((oct & 0x70) >> 4)
5491 case 0: str = "NSAP (X.213/ISO 8348 AD2)"; break;
5492 case 2: str = "User specified"; break;
5498 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
5499 proto_tree_add_text(tree,
5500 tvb, curr_offset, 1,
5501 "%s : Type of subaddress: %s",
5505 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
5506 proto_tree_add_text(tree,
5507 tvb, curr_offset, 1,
5508 "%s : Odd/Even indicator: %s",
5511 "odd number of address signals" : "even number of address signals");
5513 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
5514 proto_tree_add_text(tree,
5515 tvb, curr_offset, 1,
5521 NO_MORE_DATA_CHECK(len);
5523 proto_tree_add_text(tree,
5524 tvb, curr_offset, len - (curr_offset - offset),
5525 "Subaddress information");
5527 curr_offset += len - (curr_offset - offset);
5529 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
5531 return(curr_offset - offset);
5538 de_clg_party_bcd_num(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
5543 guint32 curr_offset;
5546 curr_offset = offset;
5548 oct = tvb_get_guint8(tvb, curr_offset);
5550 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
5551 proto_tree_add_text(tree,
5552 tvb, curr_offset, 1,
5556 ton = (oct & 0x70) >> 4;
5559 case 0: str = "Unknown"; break;
5560 case 1: str = "International number"; break;
5561 case 2: str = "National number"; break;
5562 case 3: str = "Network specific number"; break;
5563 case 4: str = "Dedicated access, short code"; break;
5564 case 7: str = "Reserved for extension"; break;
5570 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
5571 proto_tree_add_text(tree,
5572 tvb, curr_offset, 1,
5573 "%s : Type of number: %s",
5584 case 0: str = "Unknown"; break;
5585 case 1: str = "ISDN/telephony numbering plan (Rec. E.164/E.163)"; break;
5586 case 3: str = "Data numbering plan (Recommendation X.121)"; break;
5587 case 4: str = "Telex numbering plan (Recommendation F.69)"; break;
5588 case 8: str = "National numbering plan"; break;
5589 case 9: str = "Private numbering plan"; break;
5590 case 11: str = "Reserved for CTS (see 3GPP TS 44.056)"; break;
5591 case 15: str = "Reserved for extension"; break;
5599 str = "not applicable";
5602 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
5603 proto_tree_add_text(tree,
5604 tvb, curr_offset, 1,
5605 "%s : Numbering plan identification: %s",
5611 oct = tvb_get_guint8(tvb, curr_offset);
5613 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
5614 proto_tree_add_text(tree,
5615 tvb, curr_offset, 1,
5619 switch ((oct & 0x60) >> 5)
5621 case 0: str = "Presentation allowed"; break;
5622 case 1: str = "Presentation restricted"; break;
5623 case 2: str = "Number not available due to interworking"; break;
5629 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
5630 proto_tree_add_text(tree,
5631 tvb, curr_offset, 1,
5632 "%s : Presentation indicator: %s",
5636 other_decode_bitfield_value(a_bigbuf, oct, 0x1c, 8);
5637 proto_tree_add_text(tree,
5638 tvb, curr_offset, 1,
5644 case 0: str = "User-provided, not screened"; break;
5645 case 1: str = "User-provided, verified and passed"; break;
5646 case 2: str = "User-provided, verified and failed"; break;
5648 str = "Network provided";
5652 other_decode_bitfield_value(a_bigbuf, oct, 0x03, 8);
5653 proto_tree_add_text(tree,
5654 tvb, curr_offset, 1,
5655 "%s : Screening indicator: %s",
5661 NO_MORE_DATA_CHECK(len);
5663 poctets = tvb_get_string(tvb, curr_offset, len - (curr_offset - offset));
5665 my_dgt_tbcd_unpack(a_bigbuf, poctets, len - (curr_offset - offset),
5669 proto_tree_add_string_format(tree, hf_gsm_a_clg_party_bcd_num,
5670 tvb, curr_offset, len - (curr_offset - offset),
5675 curr_offset += len - (curr_offset - offset);
5677 sprintf(add_string, " - (%s)", a_bigbuf);
5679 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
5681 return(curr_offset - offset);
5688 de_clg_party_sub_addr(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
5691 guint32 curr_offset;
5694 add_string = add_string;
5695 curr_offset = offset;
5697 oct = tvb_get_guint8(tvb, curr_offset);
5699 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
5700 proto_tree_add_text(tree,
5701 tvb, curr_offset, 1,
5705 switch ((oct & 0x70) >> 4)
5707 case 0: str = "NSAP (X.213/ISO 8348 AD2)"; break;
5708 case 2: str = "User specified"; break;
5714 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
5715 proto_tree_add_text(tree,
5716 tvb, curr_offset, 1,
5717 "%s : Type of subaddress: %s",
5721 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
5722 proto_tree_add_text(tree,
5723 tvb, curr_offset, 1,
5724 "%s : Odd/Even indicator: %s",
5727 "odd number of address signals" : "even number of address signals");
5729 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
5730 proto_tree_add_text(tree,
5731 tvb, curr_offset, 1,
5737 NO_MORE_DATA_CHECK(len);
5739 proto_tree_add_text(tree,
5740 tvb, curr_offset, len - (curr_offset - offset),
5741 "Subaddress information");
5743 curr_offset += len - (curr_offset - offset);
5745 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
5747 return(curr_offset - offset);
5754 de_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
5758 guint32 curr_offset;
5761 curr_offset = offset;
5763 oct = tvb_get_guint8(tvb, curr_offset);
5765 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
5766 proto_tree_add_text(tree,
5767 tvb, curr_offset, 1,
5768 "%s : Extension: %s",
5770 (oct & 0x80) ? "not extended" : "extended");
5772 switch ((oct & 0x60) >> 5)
5774 case 0: str = "Coding as specified in ITU-T Rec. Q.931"; break;
5775 case 1: str = "Reserved for other international standards"; break;
5776 case 2: str = "National standard"; break;
5778 str = "Standard defined for the GSM PLMNS";
5782 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
5783 proto_tree_add_text(tree,
5784 tvb, curr_offset, 1,
5785 "%s : Coding standard: %s",
5789 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
5790 proto_tree_add_text(tree,
5791 tvb, curr_offset, 1,
5797 case 0: str = "User"; break;
5798 case 1: str = "Private network serving the local user"; break;
5799 case 2: str = "Public network serving the local user"; break;
5800 case 3: str = "Transit network"; break;
5801 case 4: str = "Public network serving the remote user"; break;
5802 case 5: str = "Private network serving the remote user"; break;
5803 case 7: str = "International network"; break;
5804 case 10: str = "Network beyond interworking point"; break;
5810 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
5811 proto_tree_add_text(tree,
5812 tvb, curr_offset, 1,
5813 "%s : Location: %s",
5819 oct = tvb_get_guint8(tvb, curr_offset);
5823 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
5824 proto_tree_add_text(tree,
5825 tvb, curr_offset, 1,
5829 other_decode_bitfield_value(a_bigbuf, oct, 0x7f, 8);
5830 proto_tree_add_text(tree,
5831 tvb, curr_offset, 1,
5832 "%s : Recommendation",
5837 oct = tvb_get_guint8(tvb, curr_offset);
5840 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
5841 proto_tree_add_text(tree,
5842 tvb, curr_offset, 1,
5849 case 1: str = "Unassigned (unallocated) number"; break;
5850 case 3: str = "No route to destination"; break;
5851 case 6: str = "Channel unacceptable"; break;
5852 case 8: str = "Operator determined barring"; break;
5853 case 16: str = "Normal call clearing"; break;
5854 case 17: str = "User busy"; break;
5855 case 18: str = "No user responding"; break;
5856 case 19: str = "User alerting, no answer"; break;
5857 case 21: str = "Call rejected"; break;
5858 case 22: str = "Number changed"; break;
5859 case 25: str = "Pre-emption"; break;
5860 case 26: str = "Non selected user clearing"; break;
5861 case 27: str = "Destination out of order"; break;
5862 case 28: str = "Invalid number format (incomplete number)"; break;
5863 case 29: str = "Facility rejected"; break;
5864 case 30: str = "Response to STATUS ENQUIRY"; break;
5865 case 31: str = "Normal, unspecified"; break;
5866 case 34: str = "No circuit/channel available"; break;
5867 case 38: str = "Network out of order"; break;
5868 case 41: str = "Temporary failure"; break;
5869 case 42: str = "Switching equipment congestion"; break;
5870 case 43: str = "Access information discarded"; break;
5871 case 44: str = "requested circuit/channel not available"; break;
5872 case 47: str = "Resources unavailable, unspecified"; break;
5873 case 49: str = "Quality of service unavailable"; break;
5874 case 50: str = "Requested facility not subscribed"; break;
5875 case 55: str = "Incoming calls barred within the CUG"; break;
5876 case 57: str = "Bearer capability not authorized"; break;
5877 case 58: str = "Bearer capability not presently available"; break;
5878 case 63: str = "Service or option not available, unspecified"; break;
5879 case 65: str = "Bearer service not implemented"; break;
5880 case 68: str = "ACM equal to or greater than ACMmax"; break;
5881 case 69: str = "Requested facility not implemented"; break;
5882 case 70: str = "Only restricted digital information bearer capability is available"; break;
5883 case 79: str = "Service or option not implemented, unspecified"; break;
5884 case 81: str = "Invalid transaction identifier value"; break;
5885 case 87: str = "User not member of CUG"; break;
5886 case 88: str = "Incompatible destination"; break;
5887 case 91: str = "Invalid transit network selection"; break;
5888 case 95: str = "Semantically incorrect message"; break;
5889 case 96: str = "Invalid mandatory information"; break;
5890 case 97: str = "Message type non-existent or not implemented"; break;
5891 case 98: str = "Message type not compatible with protocol state"; break;
5892 case 99: str = "Information element non-existent or not implemented"; break;
5893 case 100: str = "Conditional IE error"; break;
5894 case 101: str = "Message not compatible with protocol state"; break;
5895 case 102: str = "Recovery on timer expiry"; break;
5896 case 111: str = "Protocol error, unspecified"; break;
5897 case 127: str = "Interworking, unspecified"; break;
5899 if (cause <= 31) { str = "Treat as Normal, unspecified"; }
5900 else if ((cause >= 32) && (cause <= 47)) { str = "Treat as Resources unavailable, unspecified"; }
5901 else if ((cause >= 48) && (cause <= 63)) { str = "Treat as Service or option not available, unspecified"; }
5902 else if ((cause >= 64) && (cause <= 79)) { str = "Treat as Service or option not implemented, unspecified"; }
5903 else if ((cause >= 80) && (cause <= 95)) { str = "Treat as Semantically incorrect message"; }
5904 else if ((cause >= 96) && (cause <= 111)) { str = "Treat as Protocol error, unspecified"; }
5905 else if ((cause >= 112) && (cause <= 127)) { str = "Treat as Interworking, unspecified"; }
5909 other_decode_bitfield_value(a_bigbuf, oct, 0x7f, 8);
5910 proto_tree_add_text(tree,
5911 tvb, curr_offset, 1,
5912 "%s : Cause: (%u) %s",
5919 sprintf(add_string, " - (%u) %s", cause, str);
5921 NO_MORE_DATA_CHECK(len);
5923 proto_tree_add_text(tree,
5924 tvb, curr_offset, len - (curr_offset - offset),
5927 curr_offset += len - (curr_offset - offset);
5929 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
5931 return(curr_offset - offset);
5938 de_keypad_facility(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
5941 guint32 curr_offset;
5945 curr_offset = offset;
5947 oct = tvb_get_guint8(tvb, curr_offset);
5949 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
5950 proto_tree_add_text(tree,
5951 tvb, curr_offset, 1,
5955 switch ((oct & 0x60) >> 5)
5957 case 0: str = "Coding as specified in ITU-T Rec. Q.931"; break;
5958 case 1: str = "Reserved for other international standards"; break;
5959 case 2: str = "National standard"; break;
5961 str = "Standard defined for the GSM PLMNS";
5965 other_decode_bitfield_value(a_bigbuf, oct, 0x7f, 8);
5966 proto_tree_add_text(tree,
5967 tvb, curr_offset, 1,
5968 "%s : Keypad information: %c",
5974 sprintf(add_string, " - %c", oct & 0x7f);
5976 /* no length check possible */
5978 return(curr_offset - offset);
5985 de_repeat_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
5988 guint32 curr_offset;
5992 add_string = add_string;
5993 curr_offset = offset;
5995 oct = tvb_get_guint8(tvb, curr_offset);
5999 case 1: str = "Circular for successive selection 'mode 1 alternate mode 2'"; break;
6000 case 2: str = "Support of fallback mode 1 preferred, mode 2 selected if setup of mode 1 fails"; break;
6001 case 3: str = "Reserved: was allocated in earlier phases of the protocol"; break;
6007 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
6008 proto_tree_add_text(tree,
6009 tvb, curr_offset, 1,
6016 /* no length check possible */
6018 return(curr_offset - offset);
6025 de_ss_ver_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
6028 guint32 curr_offset;
6031 add_string = add_string;
6032 curr_offset = offset;
6034 oct = tvb_get_guint8(tvb, curr_offset);
6038 case 0: str = "Phase 2 service, ellipsis notation, and phase 2 error handling is supported"; break;
6039 case 1: str = "SS-Protocol version 3 is supported, and phase 2 error handling is supported"; break;
6045 proto_tree_add_text(tree,
6046 tvb, curr_offset, 1,
6052 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
6054 return(curr_offset - offset);
6061 de_cp_user_data(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
6063 guint32 curr_offset;
6066 add_string = add_string;
6067 curr_offset = offset;
6069 proto_tree_add_text(tree, tvb, curr_offset, len,
6073 * dissect the embedded RP message
6075 rp_tvb = tvb_new_subset(tvb, curr_offset, len, len);
6077 call_dissector(rp_handle, rp_tvb, g_pinfo, g_tree);
6081 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
6083 return(curr_offset - offset);
6090 de_cp_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
6093 guint32 curr_offset;
6097 curr_offset = offset;
6099 oct = tvb_get_guint8(tvb, curr_offset);
6103 case 17: str = "Network failure"; break;
6104 case 22: str = "Congestion"; break;
6105 case 81: str = "Invalid Transaction Identifier value"; break;
6106 case 95: str = "Semantically incorrect message"; break;
6107 case 96: str = "Invalid mandatory information"; break;
6108 case 97: str = "Message type non-existent or not implemented"; break;
6109 case 98: str = "Message not compatible with the short message protocol state"; break;
6110 case 99: str = "Information element non-existent or not implemented"; break;
6111 case 111: str = "Protocol error, unspecified"; break;
6113 str = "Reserved, treat as Protocol error, unspecified";
6117 proto_tree_add_text(tree,
6118 tvb, curr_offset, 1,
6125 sprintf(add_string, " - (%u) %s", oct, str);
6127 /* no length check possible */
6129 return(curr_offset - offset);
6136 de_rp_message_ref(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
6139 guint32 curr_offset;
6142 add_string = add_string;
6143 curr_offset = offset;
6145 oct = tvb_get_guint8(tvb, curr_offset);
6147 proto_tree_add_text(tree,
6148 tvb, curr_offset, 1,
6149 "RP-Message Reference: 0x%02x (%u)",
6155 /* no length check possible */
6157 return(curr_offset - offset);
6164 de_rp_orig_addr(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
6166 return(de_cld_party_bcd_num(tvb, tree, offset, len, add_string));
6173 de_rp_dest_addr(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
6175 return(de_cld_party_bcd_num(tvb, tree, offset, len, add_string));
6182 de_rp_user_data(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
6184 guint32 curr_offset;
6187 add_string = add_string;
6188 curr_offset = offset;
6190 proto_tree_add_text(tree, tvb, curr_offset, len,
6194 * dissect the embedded TPDU message
6196 tpdu_tvb = tvb_new_subset(tvb, curr_offset, len, len);
6198 dissector_try_port(sms_dissector_table, 0, tpdu_tvb, g_pinfo, g_tree);
6202 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
6204 return(curr_offset - offset);
6211 de_rp_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string)
6214 guint32 curr_offset;
6217 curr_offset = offset;
6219 oct = tvb_get_guint8(tvb, curr_offset);
6221 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
6222 proto_tree_add_text(tree,
6223 tvb, curr_offset, 1,
6224 "%s : Extension: %s",
6226 (oct & 0x80) ? "extended" : "not extended");
6230 case 1: str = "Unassigned (unallocated) number"; break;
6231 case 8: str = "Operator determined barring"; break;
6232 case 10: str = "Call barred"; break;
6233 case 11: str = "Reserved"; break;
6234 case 21: str = "Short message transfer rejected"; break;
6235 case 22: str = "Memory capacity exceeded"; break;
6236 case 27: str = "Destination out of order"; break;
6237 case 28: str = "Unidentified subscriber"; break;
6238 case 29: str = "Facility rejected"; break;
6239 case 30: str = "Unknown subscriber"; break;
6240 case 38: str = "Network out of order"; break;
6241 case 41: str = "Temporary failure"; break;
6242 case 42: str = "Congestion"; break;
6243 case 47: str = "Resources unavailable, unspecified"; break;
6244 case 50: str = "Requested facility not subscribed"; break;
6245 case 69: str = "Requested facility not implemented"; break;
6246 case 81: str = "Invalid short message transfer reference value"; break;
6247 case 95: str = "Semantically incorrect message"; break;
6248 case 96: str = "Invalid mandatory information"; break;
6249 case 97: str = "Message type non-existent or not implemented"; break;
6250 case 98: str = "Message not compatible with short message protocol state"; break;
6251 case 99: str = "Information element non-existent or not implemented"; break;
6252 case 111: str = "Protocol error, unspecified"; break;
6253 case 127: str = "Interworking, unspecified"; break;
6259 other_decode_bitfield_value(a_bigbuf, oct, 0x7f, 8);
6260 proto_tree_add_text(tree,
6261 tvb, curr_offset, 1,
6262 "%s : Cause: (%u) %s",
6269 sprintf(add_string, " - (%u) %s", oct & 0x7f, str);
6271 NO_MORE_DATA_CHECK(len);
6273 proto_tree_add_text(tree,
6274 tvb, curr_offset, len - (curr_offset - offset),
6275 "Diagnostic field");
6277 curr_offset += len - (curr_offset - offset);
6279 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
6281 return(curr_offset - offset);
6284 static guint8 (*bssmap_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string) = {
6285 be_cic, /* Circuit Identity Code */
6286 NULL, /* Reserved */
6287 NULL, /* Resource Available */
6288 be_cause, /* Cause */
6289 be_cell_id, /* Cell Identifier */
6290 be_prio, /* Priority */
6291 be_l3_header_info, /* Layer 3 Header Information */
6294 be_enc_info, /* Encryption Information */
6295 be_chan_type, /* Channel Type */
6296 NULL, /* Periodicity */
6297 NULL, /* Extended Resource Indicator */
6298 NULL, /* Number Of MSs */
6299 NULL, /* Reserved */
6300 NULL, /* Reserved */
6301 NULL, /* Reserved */
6302 de_ms_cm_2, /* Classmark Information Type 2 */
6303 NULL, /* Classmark Information Type 3 */
6304 NULL, /* Interference Band To Be Used */
6305 de_rr_cause, /* RR Cause */
6306 NULL, /* Reserved */
6307 be_l3_info, /* Layer 3 Information */
6309 be_down_dtx_flag, /* Downlink DTX Flag */
6310 be_cell_id_list, /* Cell Identifier List */
6311 NULL /* no associated data */, /* Response Request */
6312 NULL, /* Resource Indication Method */
6313 de_ms_cm_1, /* Classmark Information Type 1 */
6314 NULL, /* Circuit Identity Code List */
6315 NULL, /* Diagnostic */
6316 be_l3_msg, /* Layer 3 Message Contents */
6317 be_chosen_chan, /* Chosen Channel */
6318 NULL, /* Total Resource Accessible */
6319 be_ciph_resp_mode, /* Cipher Response Mode */
6320 NULL, /* Channel Needed */
6321 NULL, /* Trace Type */
6322 NULL, /* TriggerID */
6323 NULL, /* Trace Reference */
6324 NULL, /* TransactionID */
6325 de_mid, /* Mobile Identity */
6327 be_for_ind, /* Forward Indicator */
6328 be_chosen_enc_alg, /* Chosen Encryption Algorithm */
6329 be_cct_pool, /* Circuit Pool */
6330 NULL, /* Circuit Pool List */
6331 NULL, /* Time Indication */
6332 NULL, /* Resource Situation */
6333 be_curr_chan_1, /* Current Channel Type 1 */
6334 be_que_ind, /* Queueing Indicator */
6335 be_speech_ver, /* Speech Version */
6336 NULL, /* Assignment Requirement */
6337 NULL /* no associated data */, /* Talker Flag */
6338 NULL /* no associated data */, /* Connection Release Requested */
6339 NULL, /* Group Call Reference */
6340 NULL, /* eMLPP Priority */
6341 NULL, /* Configuration Evolution Indication */
6342 NULL /* no decode required */, /* Old BSS to New BSS Information */
6343 NULL, /* LSA Identifier */
6344 NULL, /* LSA Identifier List */
6345 NULL, /* LSA Information */
6347 NULL, /* LSA access control suppression */
6348 NULL, /* LCS Priority */
6349 NULL, /* Location Type */
6350 NULL, /* Location Estimate */
6351 NULL, /* Positioning Data */
6352 NULL, /* LCS Cause */
6353 NULL, /* LCS Client Type */
6355 NULL, /* Network Element Identity */
6356 NULL, /* GPS Assistance Data */
6357 NULL, /* Deciphering Keys */
6358 NULL, /* Return Error Request */
6359 NULL, /* Return Error Cause */
6360 NULL, /* Segmentation */
6364 static guint8 (*dtap_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string) = {
6365 /* Common Information Elements 10.5.1 */
6366 de_cell_id, /* Cell Identity */
6367 NULL /* handled inline */, /* Ciphering Key Sequence Number */
6368 de_lai, /* Location Area Identification */
6369 de_mid, /* Mobile Identity */
6370 de_ms_cm_1, /* Mobile Station Classmark 1 */
6371 de_ms_cm_2, /* Mobile Station Classmark 2 */
6372 NULL, /* Mobile Station Classmark 3 */
6373 de_d_gb_call_ref, /* Descriptive group or broadcast call reference */
6374 NULL /* handled inline */, /* Group Cipher Key Number */
6375 de_pd_sapi, /* PD and SAPI $(CCBS)$ */
6376 de_prio /* handled inline */, /* Priority Level */
6377 de_plmn_list, /* PLMN List */
6378 /* Radio Resource Management Information Elements 10.5.2, most are from 10.5.1 */
6379 de_rr_cause, /* RR Cause */
6380 /* Mobility Management Information Elements 10.5.3 */
6381 de_auth_param_rand, /* Authentication Parameter RAND */
6382 de_auth_param_autn, /* Authentication Parameter AUTN (UMTS authentication challenge only) */
6383 de_auth_resp_param, /* Authentication Response Parameter */
6384 de_auth_resp_param_ext, /* Authentication Response Parameter (extension) (UMTS authentication challenge only) */
6385 de_auth_fail_param, /* Authentication Failure Parameter (UMTS authentication challenge only) */
6386 NULL /* handled inline */, /* CM Service Type */
6387 NULL /* handled inline */, /* Identity Type */
6388 NULL /* handled inline */, /* Location Updating Type */
6389 de_network_name, /* Network Name */
6390 de_rej_cause, /* Reject Cause */
6391 NULL /* no associated data */, /* Follow-on Proceed */
6392 de_time_zone, /* Time Zone */
6393 de_time_zone_time, /* Time Zone and Time */
6394 NULL /* no associated data */, /* CTS Permission */
6395 de_lsa_id, /* LSA Identifier */
6396 de_day_saving_time, /* Daylight Saving Time */
6397 /* Call Control Information Elements 10.5.4 */
6398 de_aux_states, /* Auxiliary States */
6399 de_bearer_cap, /* Bearer Capability */
6400 de_cc_cap, /* Call Control Capabilities */
6401 de_call_state, /* Call State */
6402 de_cld_party_bcd_num, /* Called Party BCD Number */
6403 de_cld_party_sub_addr, /* Called Party Subaddress */
6404 de_clg_party_bcd_num, /* Calling Party BCD Number */
6405 de_clg_party_sub_addr, /* Calling Party Subaddress */
6406 de_cause, /* Cause */
6407 NULL /* no associated data */, /* CLIR Suppression */
6408 NULL /* no associated data */, /* CLIR Invocation */
6409 NULL /* handled inline */, /* Congestion Level */
6410 NULL, /* Connected Number */
6411 NULL, /* Connected Subaddress */
6412 NULL, /* Facility */
6413 NULL, /* High Layer Compatibility */
6414 de_keypad_facility, /* Keypad Facility */
6415 NULL, /* Low Layer Compatibility */
6416 NULL, /* More Data */
6417 NULL, /* Notification Indicator */
6418 NULL, /* Progress Indicator */
6419 NULL, /* Recall type $(CCBS)$ */
6420 NULL, /* Redirecting Party BCD Number */
6421 NULL, /* Redirecting Party Subaddress */
6422 de_repeat_ind, /* Repeat Indicator */
6423 NULL /* no associated data */, /* Reverse Call Setup Direction */
6424 NULL, /* SETUP Container $(CCBS)$ */
6426 de_ss_ver_ind, /* SS Version Indicator */
6427 NULL, /* User-user */
6428 NULL, /* Alerting Pattern $(NIA)$ */
6429 NULL, /* Allowed Actions $(CCBS)$ */
6430 NULL, /* Stream Identifier */
6431 NULL, /* Network Call Control Capabilities */
6432 NULL, /* Cause of No CLI */
6433 NULL, /* Immediate Modification Indicator */
6434 NULL, /* Supported Codec List */
6435 NULL, /* Service Category */
6436 /* GPRS Mobility Management Information Elements 10.5.5 */
6437 NULL, /* Attach Result */
6438 NULL, /* Attach Type */
6439 NULL, /* TMSI Status */
6440 NULL, /* Detach Type */
6441 NULL, /* DRX Parameter */
6442 NULL, /* Force to Standby */
6443 NULL, /* P-TMSI Signature */
6444 NULL, /* P-TMSI Signature 2 */
6445 NULL, /* Identity Type 2 */
6446 NULL, /* IMEISV Request */
6447 NULL, /* Receive N-PDU Numbers List */
6448 NULL, /* MS Network Capability */
6449 NULL, /* MS Radio Access Capability */
6450 NULL, /* GMM Cause */
6451 NULL, /* Routing Area Identification */
6452 NULL, /* Update Result */
6453 NULL, /* A&C Reference Number */
6454 NULL, /* Service Type */
6455 NULL, /* Cell Notification */
6456 NULL, /* Network Feature Support */
6457 /* Short Message Service Information Elements [5] 8.1.4 */
6458 de_cp_user_data, /* CP-User Data */
6459 de_cp_cause, /* CP-Cause */
6460 /* Short Message Service Information Elements [5] 8.2 */
6461 de_rp_message_ref, /* RP-Message Reference */
6462 de_rp_orig_addr, /* RP-Origination Address */
6463 de_rp_dest_addr, /* RP-Destination Address */
6464 de_rp_user_data, /* RP-User Data */
6465 de_rp_cause, /* RP-Cause */
6466 /* Session Management Information Elements 10.5.6 */
6467 NULL, /* Access Point Name */
6468 NULL, /* Network Service Access Point Identifier */
6469 NULL, /* Protocol Configuration Options */
6470 NULL, /* Packet Data Protocol Address */
6471 NULL, /* Quality Of Service */
6472 NULL, /* SM Cause */
6473 NULL, /* Linked TI */
6474 NULL, /* LLC Service Access Point Identifier */
6475 NULL, /* Tear Down Indicator */
6476 NULL, /* Packet Flow Identifier */
6477 NULL, /* Traffic Flow Template */
6478 /* GPRS Common Information Elements 10.5.7 */
6479 NULL, /* PDP Context Status */
6480 NULL, /* Radio Priority */
6481 NULL, /* GPRS Timer */
6482 NULL, /* GPRS Timer 2 */
6486 #define SET_ELEM_VARS(SEV_pdu_type, SEV_elem_names, SEV_elem_ett, SEV_elem_funcs) \
6487 switch (SEV_pdu_type) \
6489 case BSSAP_PDU_TYPE_BSSMAP: \
6490 SEV_elem_names = gsm_bssmap_elem_strings; \
6491 SEV_elem_ett = ett_gsm_bssmap_elem; \
6492 SEV_elem_funcs = bssmap_elem_fcn; \
6494 case BSSAP_PDU_TYPE_DTAP: \
6495 SEV_elem_names = gsm_dtap_elem_strings; \
6496 SEV_elem_ett = ett_gsm_dtap_elem; \
6497 SEV_elem_funcs = dtap_elem_fcn; \
6500 proto_tree_add_text(tree, \
6501 tvb, curr_offset, -1, \
6502 "Unknown PDU type (%u)", SEV_pdu_type); \
6507 * Type Length Value (TLV) element dissector
6510 elem_tlv(tvbuff_t *tvb, proto_tree *tree, guint8 iei, gint pdu_type, int idx, guint32 offset, guint len, gchar *name_add)
6512 guint8 oct, parm_len;
6514 guint32 curr_offset;
6515 proto_tree *subtree;
6517 const value_string *elem_names;
6519 guint8 (**elem_funcs)(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string);
6522 curr_offset = offset;
6525 SET_ELEM_VARS(pdu_type, elem_names, elem_ett, elem_funcs);
6527 oct = tvb_get_guint8(tvb, curr_offset);
6531 parm_len = tvb_get_guint8(tvb, curr_offset + 1);
6534 proto_tree_add_text(tree,
6535 tvb, curr_offset, parm_len + 2,
6537 elem_names[idx].strptr,
6538 (name_add == NULL) || (name_add[0] == '\0') ? "" : name_add);
6540 subtree = proto_item_add_subtree(item, elem_ett[idx]);
6542 proto_tree_add_uint(subtree,
6543 (BSSAP_PDU_TYPE_BSSMAP == pdu_type) ? hf_gsm_a_bssmap_elem_id : hf_gsm_a_dtap_elem_id, tvb,
6544 curr_offset, 1, oct);
6546 proto_tree_add_uint(subtree, hf_gsm_a_length, tvb,
6547 curr_offset + 1, 1, parm_len);
6551 if (elem_funcs[idx] == NULL)
6553 proto_tree_add_text(subtree,
6554 tvb, curr_offset + 2, parm_len,
6557 consumed = parm_len;
6561 a_add_string[0] = '\0';
6563 (*elem_funcs[idx])(tvb, subtree, curr_offset + 2,
6564 parm_len, a_add_string);
6566 if (a_add_string[0] != '\0')
6568 proto_item_append_text(item, a_add_string);
6569 a_add_string[0] = '\0';
6581 * Type Value (TV) element dissector
6583 * Length cannot be used in these functions, big problem if a element dissector
6584 * is not defined for these.
6587 elem_tv(tvbuff_t *tvb, proto_tree *tree, guint8 iei, gint pdu_type, int idx, guint32 offset, gchar *name_add)
6591 guint32 curr_offset;
6592 proto_tree *subtree;
6594 const value_string *elem_names;
6596 guint8 (**elem_funcs)(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string);
6598 curr_offset = offset;
6601 SET_ELEM_VARS(pdu_type, elem_names, elem_ett, elem_funcs);
6603 oct = tvb_get_guint8(tvb, curr_offset);
6608 proto_tree_add_text(tree,
6609 tvb, curr_offset, -1,
6611 elem_names[idx].strptr,
6612 (name_add == NULL) || (name_add[0] == '\0') ? "" : name_add);
6614 subtree = proto_item_add_subtree(item, elem_ett[idx]);
6616 proto_tree_add_uint(subtree,
6617 (BSSAP_PDU_TYPE_BSSMAP == pdu_type) ? hf_gsm_a_bssmap_elem_id : hf_gsm_a_dtap_elem_id, tvb,
6618 curr_offset, 1, oct);
6620 if (elem_funcs[idx] == NULL)
6622 /* BAD THING, CANNOT DETERMINE LENGTH */
6624 proto_tree_add_text(subtree,
6625 tvb, curr_offset + 1, 1,
6626 "No element dissector, rest of dissection may be incorrect");
6632 a_add_string[0] = '\0';
6633 consumed = (*elem_funcs[idx])(tvb, subtree, curr_offset + 1, -1, a_add_string);
6635 if (a_add_string[0] != '\0')
6637 proto_item_append_text(item, a_add_string);
6638 a_add_string[0] = '\0';
6644 proto_item_set_len(item, consumed);
6651 * Type Value (TV) element dissector
6652 * Where top half nibble is IEI and bottom half nibble is value.
6654 * Length cannot be used in these functions, big problem if a element dissector
6655 * is not defined for these.
6658 elem_tv_short(tvbuff_t *tvb, proto_tree *tree, guint8 iei, gint pdu_type, int idx, guint32 offset, gchar *name_add)
6662 guint32 curr_offset;
6663 proto_tree *subtree;
6665 const value_string *elem_names;
6667 guint8 (**elem_funcs)(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string);
6669 curr_offset = offset;
6672 SET_ELEM_VARS(pdu_type, elem_names, elem_ett, elem_funcs);
6674 oct = tvb_get_guint8(tvb, curr_offset);
6676 if ((oct & 0xf0) == (iei & 0xf0))
6679 proto_tree_add_text(tree,
6680 tvb, curr_offset, -1,
6682 elem_names[idx].strptr,
6683 (name_add == NULL) || (name_add[0] == '\0') ? "" : name_add);
6685 subtree = proto_item_add_subtree(item, elem_ett[idx]);
6687 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
6688 proto_tree_add_text(subtree,
6689 tvb, curr_offset, 1,
6693 if (elem_funcs[idx] == NULL)
6695 /* BAD THING, CANNOT DETERMINE LENGTH */
6697 proto_tree_add_text(subtree,
6698 tvb, curr_offset, 1,
6699 "No element dissector, rest of dissection may be incorrect");
6705 a_add_string[0] = '\0';
6706 consumed = (*elem_funcs[idx])(tvb, subtree, curr_offset, -1, a_add_string);
6708 if (a_add_string[0] != '\0')
6710 proto_item_append_text(item, a_add_string);
6711 a_add_string[0] = '\0';
6715 proto_item_set_len(item, consumed);
6722 * Type (T) element dissector
6725 elem_t(tvbuff_t *tvb, proto_tree *tree, guint8 iei, gint pdu_type, int idx, guint32 offset, gchar *name_add)
6728 guint32 curr_offset;
6730 const value_string *elem_names;
6732 guint8 (**elem_funcs)(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string);
6734 curr_offset = offset;
6737 SET_ELEM_VARS(pdu_type, elem_names, elem_ett, elem_funcs);
6739 oct = tvb_get_guint8(tvb, curr_offset);
6743 proto_tree_add_uint_format(tree,
6744 (BSSAP_PDU_TYPE_BSSMAP == pdu_type) ? hf_gsm_a_bssmap_elem_id : hf_gsm_a_dtap_elem_id, tvb,
6745 curr_offset, 1, oct,
6747 elem_names[idx].strptr,
6748 (name_add == NULL) || (name_add[0] == '\0') ? "" : name_add);
6757 * Length Value (LV) element dissector
6760 elem_lv(tvbuff_t *tvb, proto_tree *tree, gint pdu_type, int idx, guint32 offset, guint len, gchar *name_add)
6764 guint32 curr_offset;
6765 proto_tree *subtree;
6767 const value_string *elem_names;
6769 guint8 (**elem_funcs)(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string);
6772 curr_offset = offset;
6775 SET_ELEM_VARS(pdu_type, elem_names, elem_ett, elem_funcs);
6777 parm_len = tvb_get_guint8(tvb, curr_offset);
6780 proto_tree_add_text(tree,
6781 tvb, curr_offset, parm_len + 1,
6783 elem_names[idx].strptr,
6784 (name_add == NULL) || (name_add[0] == '\0') ? "" : name_add);
6786 subtree = proto_item_add_subtree(item, elem_ett[idx]);
6788 proto_tree_add_uint(subtree, hf_gsm_a_length, tvb,
6789 curr_offset, 1, parm_len);
6793 if (elem_funcs[idx] == NULL)
6795 proto_tree_add_text(subtree,
6796 tvb, curr_offset + 1, parm_len,
6799 consumed = parm_len;
6803 a_add_string[0] = '\0';
6805 (*elem_funcs[idx])(tvb, subtree, curr_offset + 1,
6806 parm_len, a_add_string);
6808 if (a_add_string[0] != '\0')
6810 proto_item_append_text(item, a_add_string);
6811 a_add_string[0] = '\0';
6816 return(consumed + 1);
6820 * Value (V) element dissector
6822 * Length cannot be used in these functions, big problem if a element dissector
6823 * is not defined for these.
6826 elem_v(tvbuff_t *tvb, proto_tree *tree, gint pdu_type, int idx, guint32 offset)
6829 guint32 curr_offset;
6830 const value_string *elem_names;
6832 guint8 (**elem_funcs)(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string);
6834 curr_offset = offset;
6837 SET_ELEM_VARS(pdu_type, elem_names, elem_ett, elem_funcs);
6839 if (elem_funcs[idx] == NULL)
6841 /* BAD THING, CANNOT DETERMINE LENGTH */
6843 proto_tree_add_text(tree,
6844 tvb, curr_offset, 1,
6845 "No element dissector, rest of dissection may be incorrect");
6851 a_add_string[0] = '\0';
6852 consumed = (*elem_funcs[idx])(tvb, tree, curr_offset, -1, a_add_string);
6853 a_add_string[0] = '\0';
6859 #define ELEM_MAND_TLV(EMT_iei, EMT_pdu_type, EMT_elem_idx, EMT_elem_name_addition) \
6861 if ((consumed = elem_tlv(tvb, tree, (guint8) EMT_iei, EMT_pdu_type, EMT_elem_idx, curr_offset, curr_len, EMT_elem_name_addition)) > 0) \
6863 curr_offset += consumed; \
6864 curr_len -= consumed; \
6868 proto_tree_add_text(tree, \
6869 tvb, curr_offset, 0, \
6870 "Missing Mandatory element (0x%02x) %s%s, rest of dissection is suspect", \
6872 (EMT_pdu_type == BSSAP_PDU_TYPE_BSSMAP) ? \
6873 gsm_bssmap_elem_strings[EMT_elem_idx].strptr : gsm_dtap_elem_strings[EMT_elem_idx].strptr, \
6874 (EMT_elem_name_addition == NULL) || (EMT_elem_name_addition[0] == '\0') ? "" : EMT_elem_name_addition \
6877 if (curr_len <= 0) return; \
6880 #define ELEM_OPT_TLV(EOT_iei, EOT_pdu_type, EOT_elem_idx, EOT_elem_name_addition) \
6882 if ((consumed = elem_tlv(tvb, tree, (guint8) EOT_iei, EOT_pdu_type, EOT_elem_idx, curr_offset, curr_len, EOT_elem_name_addition)) > 0) \
6884 curr_offset += consumed; \
6885 curr_len -= consumed; \
6887 if (curr_len <= 0) return; \
6890 #define ELEM_MAND_TV(EMT_iei, EMT_pdu_type, EMT_elem_idx, EMT_elem_name_addition) \
6892 if ((consumed = elem_tv(tvb, tree, (guint8) EMT_iei, EMT_pdu_type, EMT_elem_idx, curr_offset, EMT_elem_name_addition)) > 0) \
6894 curr_offset += consumed; \
6895 curr_len -= consumed; \
6899 proto_tree_add_text(tree, \
6900 tvb, curr_offset, 0, \
6901 "Missing Mandatory element (0x%02x) %s%s, rest of dissection is suspect", \
6903 (EMT_pdu_type == BSSAP_PDU_TYPE_BSSMAP) ? \
6904 gsm_bssmap_elem_strings[EMT_elem_idx].strptr : gsm_dtap_elem_strings[EMT_elem_idx].strptr, \
6905 (EMT_elem_name_addition == NULL) || (EMT_elem_name_addition[0] == '\0') ? "" : EMT_elem_name_addition \
6908 if (curr_len <= 0) return; \
6911 #define ELEM_OPT_TV(EOT_iei, EOT_pdu_type, EOT_elem_idx, EOT_elem_name_addition) \
6913 if ((consumed = elem_tv(tvb, tree, (guint8) EOT_iei, EOT_pdu_type, EOT_elem_idx, curr_offset, EOT_elem_name_addition)) > 0) \
6915 curr_offset += consumed; \
6916 curr_len -= consumed; \
6918 if (curr_len <= 0) return; \
6921 #define ELEM_OPT_TV_SHORT(EOT_iei, EOT_pdu_type, EOT_elem_idx, EOT_elem_name_addition) \
6923 if ((consumed = elem_tv_short(tvb, tree, EOT_iei, EOT_pdu_type, EOT_elem_idx, curr_offset, EOT_elem_name_addition)) > 0) \
6925 curr_offset += consumed; \
6926 curr_len -= consumed; \
6928 if (curr_len <= 0) return; \
6931 #define ELEM_OPT_T(EOT_iei, EOT_pdu_type, EOT_elem_idx, EOT_elem_name_addition) \
6933 if ((consumed = elem_t(tvb, tree, (guint8) EOT_iei, EOT_pdu_type, EOT_elem_idx, curr_offset, EOT_elem_name_addition)) > 0) \
6935 curr_offset += consumed; \
6936 curr_len -= consumed; \
6938 if (curr_len <= 0) return; \
6941 #define ELEM_MAND_LV(EML_pdu_type, EML_elem_idx, EML_elem_name_addition) \
6943 if ((consumed = elem_lv(tvb, tree, EML_pdu_type, EML_elem_idx, curr_offset, curr_len, EML_elem_name_addition)) > 0) \
6945 curr_offset += consumed; \
6946 curr_len -= consumed; \
6950 /* Mandatory, but nothing we can do */ \
6952 if (curr_len <= 0) return; \
6955 #define ELEM_MAND_V(EMV_pdu_type, EMV_elem_idx) \
6957 if ((consumed = elem_v(tvb, tree, EMV_pdu_type, EMV_elem_idx, curr_offset)) > 0) \
6959 curr_offset += consumed; \
6960 curr_len -= consumed; \
6964 /* Mandatory, but nothing we can do */ \
6966 if (curr_len <= 0) return; \
6970 /* MESSAGE FUNCTIONS */
6976 bssmap_ass_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
6978 guint32 curr_offset;
6982 curr_offset = offset;
6985 is_uplink = IS_UPLINK_FALSE;
6987 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CHAN_TYPE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CHAN_TYPE, "");
6989 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_L3_HEADER_INFO].value, BSSAP_PDU_TYPE_BSSMAP, BE_L3_HEADER_INFO, "");
6991 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_PRIO].value, BSSAP_PDU_TYPE_BSSMAP, BE_PRIO, "");
6993 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
6995 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_DOWN_DTX_FLAG].value, BSSAP_PDU_TYPE_BSSMAP, BE_DOWN_DTX_FLAG, "");
6997 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_INT_BAND].value, BSSAP_PDU_TYPE_BSSMAP, BE_INT_BAND, "");
6999 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_CM_INFO_2].value, BSSAP_PDU_TYPE_BSSMAP, BE_CM_INFO_2, "");
7001 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_GROUP_CALL_REF].value, BSSAP_PDU_TYPE_BSSMAP, BE_GROUP_CALL_REF, "");
7003 ELEM_OPT_T(gsm_bssmap_elem_strings[BE_TALKER_FLAG].value, BSSAP_PDU_TYPE_BSSMAP, BE_TALKER_FLAG, "");
7005 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_LSA_ACC_CTRL].value, BSSAP_PDU_TYPE_BSSMAP, BE_LSA_ACC_CTRL, "");
7007 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7014 bssmap_ass_complete(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7016 guint32 curr_offset;
7020 curr_offset = offset;
7023 is_uplink = IS_UPLINK_TRUE;
7025 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_RR_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_RR_CAUSE, "");
7027 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
7029 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_CELL_ID].value, BSSAP_PDU_TYPE_BSSMAP, BE_CELL_ID, "");
7031 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CHOSEN_CHAN].value, BSSAP_PDU_TYPE_BSSMAP, BE_CHOSEN_CHAN, "");
7033 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CHOSEN_ENC_ALG].value, BSSAP_PDU_TYPE_BSSMAP, BE_CHOSEN_ENC_ALG, "");
7035 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CCT_POOL].value, BSSAP_PDU_TYPE_BSSMAP, BE_CCT_POOL, "");
7037 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_SPEECH_VER].value, BSSAP_PDU_TYPE_BSSMAP, BE_SPEECH_VER, " (Chosen)");
7039 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_LSA_ID].value, BSSAP_PDU_TYPE_BSSMAP, BE_LSA_ID, "");
7041 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7048 bssmap_ass_failure(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7050 guint32 curr_offset;
7054 curr_offset = offset;
7057 is_uplink = IS_UPLINK_TRUE;
7059 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
7061 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_RR_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_RR_CAUSE, "");
7063 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CCT_POOL].value, BSSAP_PDU_TYPE_BSSMAP, BE_CCT_POOL, "");
7065 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_CCT_POOL_LIST].value, BSSAP_PDU_TYPE_BSSMAP, BE_CCT_POOL_LIST, "");
7067 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7074 bssmap_block(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7076 guint32 curr_offset;
7080 curr_offset = offset;
7083 is_uplink = IS_UPLINK_TRUE;
7085 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
7087 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
7089 ELEM_OPT_T(gsm_bssmap_elem_strings[BE_CONN_REL_REQ].value, BSSAP_PDU_TYPE_BSSMAP, BE_CONN_REL_REQ, "");
7091 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7098 bssmap_block_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7100 guint32 curr_offset;
7104 curr_offset = offset;
7107 is_uplink = IS_UPLINK_TRUE;
7109 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
7111 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7118 bssmap_unblock(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7120 guint32 curr_offset;
7124 curr_offset = offset;
7127 is_uplink = IS_UPLINK_TRUE;
7129 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
7131 ELEM_OPT_T(gsm_bssmap_elem_strings[BE_CONN_REL_REQ].value, BSSAP_PDU_TYPE_BSSMAP, BE_CONN_REL_REQ, "");
7133 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7140 bssmap_unblock_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7142 guint32 curr_offset;
7146 curr_offset = offset;
7149 is_uplink = IS_UPLINK_TRUE;
7151 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
7153 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7160 bssmap_ho_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7162 guint32 curr_offset;
7166 curr_offset = offset;
7169 is_uplink = IS_UPLINK_FALSE;
7171 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CHAN_TYPE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CHAN_TYPE, "");
7173 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_ENC_INFO].value, BSSAP_PDU_TYPE_BSSMAP, BE_ENC_INFO, "");
7175 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CM_INFO_1].value, BSSAP_PDU_TYPE_BSSMAP, BE_CM_INFO_1, "");
7177 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_CM_INFO_2].value, BSSAP_PDU_TYPE_BSSMAP, BE_CM_INFO_2, "");
7179 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CELL_ID].value, BSSAP_PDU_TYPE_BSSMAP, BE_CELL_ID, " (Serving)");
7181 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_PRIO].value, BSSAP_PDU_TYPE_BSSMAP, BE_PRIO, "");
7183 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
7185 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_DOWN_DTX_FLAG].value, BSSAP_PDU_TYPE_BSSMAP, BE_DOWN_DTX_FLAG, "");
7187 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CELL_ID].value, BSSAP_PDU_TYPE_BSSMAP, BE_CELL_ID, " (Target)");
7189 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_INT_BAND].value, BSSAP_PDU_TYPE_BSSMAP, BE_INT_BAND, "");
7191 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
7193 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_CM_INFO_3].value, BSSAP_PDU_TYPE_BSSMAP, BE_CM_INFO_3, "");
7195 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CURR_CHAN_1].value, BSSAP_PDU_TYPE_BSSMAP, BE_CURR_CHAN_1, "");
7197 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_SPEECH_VER].value, BSSAP_PDU_TYPE_BSSMAP, BE_SPEECH_VER, " (Used)");
7199 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_GROUP_CALL_REF].value, BSSAP_PDU_TYPE_BSSMAP, BE_GROUP_CALL_REF, "");
7201 ELEM_OPT_T(gsm_bssmap_elem_strings[BE_TALKER_FLAG].value, BSSAP_PDU_TYPE_BSSMAP, BE_TALKER_FLAG, "");
7203 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CONF_EVO_IND].value, BSSAP_PDU_TYPE_BSSMAP, BE_CONF_EVO_IND, "");
7205 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CHOSEN_ENC_ALG].value, BSSAP_PDU_TYPE_BSSMAP, BE_CHOSEN_ENC_ALG, " (Serving)");
7207 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_OLD2NEW_INFO].value, BSSAP_PDU_TYPE_BSSMAP, BE_OLD2NEW_INFO, "");
7209 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_LSA_INFO].value, BSSAP_PDU_TYPE_BSSMAP, BE_LSA_INFO, "");
7211 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_LSA_ACC_CTRL].value, BSSAP_PDU_TYPE_BSSMAP, BE_LSA_ACC_CTRL, "");
7213 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7220 bssmap_ho_reqd(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7222 guint32 curr_offset;
7226 curr_offset = offset;
7229 is_uplink = IS_UPLINK_TRUE;
7231 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
7233 ELEM_OPT_T(gsm_bssmap_elem_strings[BE_RESP_REQ].value, BSSAP_PDU_TYPE_BSSMAP, BE_RESP_REQ, "");
7235 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CELL_ID_LIST].value, BSSAP_PDU_TYPE_BSSMAP, BE_CELL_ID_LIST, " (Preferred)");
7237 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_CCT_POOL_LIST].value, BSSAP_PDU_TYPE_BSSMAP, BE_CCT_POOL_LIST, "");
7239 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CURR_CHAN_1].value, BSSAP_PDU_TYPE_BSSMAP, BE_CURR_CHAN_1, "");
7241 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_SPEECH_VER].value, BSSAP_PDU_TYPE_BSSMAP, BE_SPEECH_VER, " (Used)");
7243 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_QUE_IND].value, BSSAP_PDU_TYPE_BSSMAP, BE_QUE_IND, "");
7245 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_OLD2NEW_INFO].value, BSSAP_PDU_TYPE_BSSMAP, BE_OLD2NEW_INFO, "");
7247 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7254 bssmap_ho_req_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7256 guint32 curr_offset;
7260 curr_offset = offset;
7263 is_uplink = IS_UPLINK_TRUE;
7265 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_L3_INFO].value, BSSAP_PDU_TYPE_BSSMAP, BE_L3_INFO, "");
7267 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CHOSEN_CHAN].value, BSSAP_PDU_TYPE_BSSMAP, BE_CHOSEN_CHAN, "");
7269 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CHOSEN_ENC_ALG].value, BSSAP_PDU_TYPE_BSSMAP, BE_CHOSEN_ENC_ALG, "");
7271 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CCT_POOL].value, BSSAP_PDU_TYPE_BSSMAP, BE_CCT_POOL, "");
7273 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_SPEECH_VER].value, BSSAP_PDU_TYPE_BSSMAP, BE_SPEECH_VER, " (Chosen)");
7275 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
7277 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_LSA_ID].value, BSSAP_PDU_TYPE_BSSMAP, BE_LSA_ID, "");
7279 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7286 bssmap_ho_cmd(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7288 guint32 curr_offset;
7292 curr_offset = offset;
7295 is_uplink = IS_UPLINK_FALSE;
7297 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_L3_INFO].value, BSSAP_PDU_TYPE_BSSMAP, BE_L3_INFO, "");
7299 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_CELL_ID].value, BSSAP_PDU_TYPE_BSSMAP, BE_CELL_ID, "");
7301 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7308 bssmap_ho_complete(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7310 guint32 curr_offset;
7314 curr_offset = offset;
7317 is_uplink = IS_UPLINK_TRUE;
7319 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_RR_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_RR_CAUSE, "");
7321 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7328 bssmap_ho_cand_enq(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7330 guint32 curr_offset;
7334 curr_offset = offset;
7337 is_uplink = IS_UPLINK_FALSE;
7339 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_NUM_MS].value, BSSAP_PDU_TYPE_BSSMAP, BE_NUM_MS, "");
7341 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CELL_ID_LIST].value, BSSAP_PDU_TYPE_BSSMAP, BE_CELL_ID_LIST, "");
7343 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CELL_ID].value, BSSAP_PDU_TYPE_BSSMAP, BE_CELL_ID, "");
7345 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7352 bssmap_ho_cand_resp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7354 guint32 curr_offset;
7358 curr_offset = offset;
7361 is_uplink = IS_UPLINK_TRUE;
7363 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_NUM_MS].value, BSSAP_PDU_TYPE_BSSMAP, BE_NUM_MS, "");
7365 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CELL_ID].value, BSSAP_PDU_TYPE_BSSMAP, BE_CELL_ID, "");
7367 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7374 bssmap_ho_failure(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7376 guint32 curr_offset;
7380 curr_offset = offset;
7383 is_uplink = IS_UPLINK_TRUE;
7385 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
7387 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_RR_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_RR_CAUSE, "");
7389 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CCT_POOL].value, BSSAP_PDU_TYPE_BSSMAP, BE_CCT_POOL, "");
7391 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_CCT_POOL_LIST].value, BSSAP_PDU_TYPE_BSSMAP, BE_CCT_POOL_LIST, "");
7393 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7400 bssmap_paging(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7402 guint32 curr_offset;
7406 curr_offset = offset;
7409 is_uplink = IS_UPLINK_FALSE;
7411 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_IMSI].value, BSSAP_PDU_TYPE_BSSMAP, BE_IMSI, "");
7413 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_TMSI].value, BSSAP_PDU_TYPE_BSSMAP, BE_TMSI, "");
7415 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CELL_ID_LIST].value, BSSAP_PDU_TYPE_BSSMAP, BE_CELL_ID_LIST, "");
7417 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_CHAN_NEEDED].value, BSSAP_PDU_TYPE_BSSMAP, BE_CHAN_NEEDED, "");
7419 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_EMLPP_PRIO].value, BSSAP_PDU_TYPE_BSSMAP, BE_EMLPP_PRIO, "");
7421 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7428 bssmap_clear_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7430 guint32 curr_offset;
7434 curr_offset = offset;
7437 is_uplink = IS_UPLINK_TRUE;
7439 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
7441 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7448 bssmap_clear_cmd(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7450 guint32 curr_offset;
7454 curr_offset = offset;
7457 is_uplink = IS_UPLINK_FALSE;
7459 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_L3_HEADER_INFO].value, BSSAP_PDU_TYPE_BSSMAP, BE_L3_HEADER_INFO, "");
7461 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
7463 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7470 bssmap_reset(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7472 guint32 curr_offset;
7476 curr_offset = offset;
7479 is_uplink = IS_UPLINK_UNKNOWN;
7481 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
7483 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7490 bssmap_ho_performed(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7492 guint32 curr_offset;
7496 curr_offset = offset;
7499 is_uplink = IS_UPLINK_TRUE;
7501 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
7503 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CELL_ID].value, BSSAP_PDU_TYPE_BSSMAP, BE_CELL_ID, "");
7505 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CHOSEN_CHAN].value, BSSAP_PDU_TYPE_BSSMAP, BE_CHOSEN_CHAN, "");
7507 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CHOSEN_ENC_ALG].value, BSSAP_PDU_TYPE_BSSMAP, BE_CHOSEN_ENC_ALG, "");
7509 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_SPEECH_VER].value, BSSAP_PDU_TYPE_BSSMAP, BE_SPEECH_VER, " (Chosen)");
7511 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_LSA_ID].value, BSSAP_PDU_TYPE_BSSMAP, BE_LSA_ID, "");
7513 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7520 bssmap_overload(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7522 guint32 curr_offset;
7526 curr_offset = offset;
7529 is_uplink = IS_UPLINK_TRUE;
7531 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
7533 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_CELL_ID].value, BSSAP_PDU_TYPE_BSSMAP, BE_CELL_ID, "");
7535 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7542 bssmap_cm_upd(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7544 guint32 curr_offset;
7548 curr_offset = offset;
7551 is_uplink = IS_UPLINK_FALSE;
7553 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CM_INFO_2].value, BSSAP_PDU_TYPE_BSSMAP, BE_CM_INFO_2, "");
7555 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_CM_INFO_3].value, BSSAP_PDU_TYPE_BSSMAP, BE_CM_INFO_3, "");
7557 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7564 bssmap_ciph_mode_cmd(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7566 guint32 curr_offset;
7570 curr_offset = offset;
7573 is_uplink = IS_UPLINK_FALSE;
7575 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_L3_HEADER_INFO].value, BSSAP_PDU_TYPE_BSSMAP, BE_L3_HEADER_INFO, "");
7577 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_ENC_INFO].value, BSSAP_PDU_TYPE_BSSMAP, BE_ENC_INFO, "");
7579 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CIPH_RESP_MODE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIPH_RESP_MODE, "");
7581 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7588 bssmap_ciph_mode_complete(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7590 guint32 curr_offset;
7594 curr_offset = offset;
7597 is_uplink = IS_UPLINK_TRUE;
7599 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_L3_MSG].value, BSSAP_PDU_TYPE_BSSMAP, BE_L3_MSG, "");
7601 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CHOSEN_ENC_ALG].value, BSSAP_PDU_TYPE_BSSMAP, BE_CHOSEN_ENC_ALG, "");
7603 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7610 bssmap_cl3_info(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7613 guint32 curr_offset;
7616 curr_offset = offset;
7619 is_uplink = IS_UPLINK_TRUE;
7621 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CELL_ID].value, BSSAP_PDU_TYPE_BSSMAP, BE_CELL_ID, "");
7623 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_L3_INFO].value, BSSAP_PDU_TYPE_BSSMAP, BE_L3_INFO, "");
7625 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CHOSEN_CHAN].value, BSSAP_PDU_TYPE_BSSMAP, BE_CHOSEN_CHAN, "");
7627 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_LSA_ID_LIST].value, BSSAP_PDU_TYPE_BSSMAP, BE_LSA_ID_LIST, "");
7629 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_APDU].value, BSSAP_PDU_TYPE_BSSMAP, BE_APDU, "");
7631 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7638 bssmap_sapi_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7641 guint32 curr_offset;
7644 curr_offset = offset;
7647 is_uplink = IS_UPLINK_TRUE;
7649 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_DLCI].value, BSSAP_PDU_TYPE_BSSMAP, BE_DLCI, "");
7651 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
7653 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7660 bssmap_ho_reqd_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7662 guint32 curr_offset;
7666 curr_offset = offset;
7669 is_uplink = IS_UPLINK_FALSE;
7671 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
7673 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7680 bssmap_reset_cct(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7682 guint32 curr_offset;
7686 curr_offset = offset;
7689 is_uplink = IS_UPLINK_TRUE;
7691 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
7693 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
7695 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7702 bssmap_reset_cct_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7704 guint32 curr_offset;
7708 curr_offset = offset;
7711 is_uplink = IS_UPLINK_TRUE;
7713 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
7715 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7722 bssmap_cct_group_block(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7724 guint32 curr_offset;
7728 curr_offset = offset;
7731 is_uplink = IS_UPLINK_TRUE;
7733 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
7735 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
7737 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC_LIST].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC_LIST, "");
7739 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7746 bssmap_cct_group_block_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7748 guint32 curr_offset;
7752 curr_offset = offset;
7755 is_uplink = IS_UPLINK_TRUE;
7757 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
7759 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC_LIST].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC_LIST, "");
7761 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7768 bssmap_cct_group_unblock(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7770 guint32 curr_offset;
7774 curr_offset = offset;
7777 is_uplink = IS_UPLINK_TRUE;
7779 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
7781 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC_LIST].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC_LIST, "");
7783 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7790 bssmap_cct_group_unblock_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7792 guint32 curr_offset;
7796 curr_offset = offset;
7799 is_uplink = IS_UPLINK_TRUE;
7801 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
7803 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC_LIST].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC_LIST, "");
7805 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7812 bssmap_confusion(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7814 guint32 curr_offset;
7818 curr_offset = offset;
7821 is_uplink = IS_UPLINK_TRUE;
7823 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
7825 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_DIAG].value, BSSAP_PDU_TYPE_BSSMAP, BE_DIAG, "");
7827 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7834 bssmap_unequipped_cct(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7836 guint32 curr_offset;
7840 curr_offset = offset;
7843 is_uplink = IS_UPLINK_TRUE;
7845 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
7847 ELEM_OPT_TV(gsm_bssmap_elem_strings[BE_CIC_LIST].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC_LIST, "");
7849 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7856 bssmap_ciph_mode_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7858 guint32 curr_offset;
7862 curr_offset = offset;
7865 is_uplink = IS_UPLINK_TRUE;
7867 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
7869 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7876 bssmap_load_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7878 guint32 curr_offset;
7882 curr_offset = offset;
7885 is_uplink = IS_UPLINK_TRUE;
7887 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_TIME_IND].value, BSSAP_PDU_TYPE_BSSMAP, BE_TIME_IND, "");
7889 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CELL_ID].value, BSSAP_PDU_TYPE_BSSMAP, BE_CELL_ID, "");
7891 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CELL_ID_LIST].value, BSSAP_PDU_TYPE_BSSMAP, BE_CELL_ID_LIST, " (Target)");
7893 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_RES_SIT].value, BSSAP_PDU_TYPE_BSSMAP, BE_RES_SIT, "");
7895 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
7897 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7904 bssmap_change_cct(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7906 guint32 curr_offset;
7910 curr_offset = offset;
7913 is_uplink = IS_UPLINK_FALSE;
7915 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_CAUSE].value, BSSAP_PDU_TYPE_BSSMAP, BE_CAUSE, "");
7917 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7924 bssmap_change_cct_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7926 guint32 curr_offset;
7930 curr_offset = offset;
7933 is_uplink = IS_UPLINK_TRUE;
7935 ELEM_MAND_TV(gsm_bssmap_elem_strings[BE_CIC].value, BSSAP_PDU_TYPE_BSSMAP, BE_CIC, "");
7937 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7944 bssmap_lsa_info(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7946 guint32 curr_offset;
7950 curr_offset = offset;
7953 is_uplink = IS_UPLINK_FALSE;
7955 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_LSA_INFO].value, BSSAP_PDU_TYPE_BSSMAP, BE_LSA_INFO, "");
7957 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7964 bssmap_conn_oriented(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
7966 guint32 curr_offset;
7970 curr_offset = offset;
7973 is_uplink = IS_UPLINK_FALSE;
7975 ELEM_MAND_TLV(gsm_bssmap_elem_strings[BE_APDU].value, BSSAP_PDU_TYPE_BSSMAP, BE_APDU, "");
7977 ELEM_OPT_TLV(gsm_bssmap_elem_strings[BE_SEG].value, BSSAP_PDU_TYPE_BSSMAP, BE_SEG, "");
7979 EXTRANEOUS_DATA_CHECK(curr_len, 0);
7982 #define NUM_GSM_BSSMAP_MSG (sizeof(gsm_a_bssmap_msg_strings)/sizeof(value_string))
7983 static gint ett_gsm_bssmap_msg[NUM_GSM_BSSMAP_MSG];
7984 static void (*bssmap_msg_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) = {
7985 bssmap_ass_req, /* Assignment Request */
7986 bssmap_ass_complete, /* Assignment Complete */
7987 bssmap_ass_failure, /* Assignment Failure */
7988 bssmap_ho_req, /* Handover Request */
7989 bssmap_ho_reqd, /* Handover Required */
7990 bssmap_ho_req_ack, /* Handover Request Acknowledge */
7991 bssmap_ho_cmd, /* Handover Command */
7992 bssmap_ho_complete, /* Handover Complete */
7993 NULL /* no associated data */, /* Handover Succeeded */
7994 bssmap_ho_failure, /* Handover Failure */
7995 bssmap_ho_performed, /* Handover Performed */
7996 bssmap_ho_cand_enq, /* Handover Candidate Enquire */
7997 bssmap_ho_cand_resp, /* Handover Candidate Response */
7998 bssmap_ho_reqd_rej, /* Handover Required Reject */
7999 NULL /* no associated data */, /* Handover Detect */
8000 bssmap_clear_cmd, /* Clear Command */
8001 NULL /* no associated data */, /* Clear Complete */
8002 bssmap_clear_req, /* Clear Request */
8003 NULL, /* Reserved */
8004 NULL, /* Reserved */
8005 bssmap_sapi_rej, /* SAPI 'n' Reject */
8006 bssmap_confusion, /* Confusion */
8009 bssmap_conn_oriented, /* Connection Oriented Information */
8010 NULL, /* Perform Location Request */
8011 bssmap_lsa_info, /* LSA Information */
8012 NULL, /* Perform Location Response */
8013 NULL, /* Perform Location Abort */
8014 bssmap_reset, /* Reset */
8015 NULL /* no associated data */, /* Reset Acknowledge */
8016 bssmap_overload, /* Overload */
8017 NULL, /* Reserved */
8018 bssmap_reset_cct, /* Reset Circuit */
8019 bssmap_reset_cct_ack, /* Reset Circuit Acknowledge */
8020 NULL, /* MSC Invoke Trace */
8021 NULL, /* BSS Invoke Trace */
8022 NULL, /* Connectionless Information */
8023 bssmap_block, /* Block */
8024 bssmap_block_ack, /* Blocking Acknowledge */
8025 bssmap_unblock, /* Unblock */
8026 bssmap_unblock_ack, /* Unblocking Acknowledge */
8027 bssmap_cct_group_block, /* Circuit Group Block */
8028 bssmap_cct_group_block_ack, /* Circuit Group Blocking Acknowledge */
8029 bssmap_cct_group_unblock, /* Circuit Group Unblock */
8030 bssmap_cct_group_unblock_ack, /* Circuit Group Unblocking Acknowledge */
8031 bssmap_unequipped_cct, /* Unequipped Circuit */
8032 bssmap_change_cct, /* Change Circuit */
8033 bssmap_change_cct_ack, /* Change Circuit Acknowledge */
8034 NULL, /* Resource Request */
8035 NULL, /* Resource Indication */
8036 bssmap_paging, /* Paging */
8037 bssmap_ciph_mode_cmd, /* Cipher Mode Command */
8038 bssmap_cm_upd, /* Classmark Update */
8039 bssmap_ciph_mode_complete, /* Cipher Mode Complete */
8040 NULL /* no associated data */, /* Queuing Indication */
8041 bssmap_cl3_info, /* Complete Layer 3 Information */
8042 NULL /* no associated data */, /* Classmark Request */
8043 bssmap_ciph_mode_rej, /* Cipher Mode Reject */
8044 bssmap_load_ind, /* Load Indication */
8045 NULL, /* VGCS/VBS Setup */
8046 NULL, /* VGCS/VBS Setup Ack */
8047 NULL, /* VGCS/VBS Setup Refuse */
8048 NULL, /* VGCS/VBS Assignment Request */
8049 NULL, /* VGCS/VBS Assignment Result */
8050 NULL, /* VGCS/VBS Assignment Failure */
8051 NULL, /* VGCS/VBS Queuing Indication */
8052 NULL, /* Uplink Request */
8053 NULL, /* Uplink Request Acknowledge */
8054 NULL, /* Uplink Request Confirmation */
8055 NULL, /* Uplink Release Indication */
8056 NULL, /* Uplink Reject Command */
8057 NULL, /* Uplink Release Command */
8058 NULL, /* Uplink Seized Command */
8066 dtap_mm_auth_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
8068 guint32 curr_offset;
8072 proto_tree *subtree;
8075 curr_offset = offset;
8078 is_uplink = IS_UPLINK_FALSE;
8081 * special dissection for Cipher Key Sequence Number
8083 oct = tvb_get_guint8(tvb, curr_offset);
8085 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
8086 proto_tree_add_text(tree,
8087 tvb, curr_offset, 1,
8092 proto_tree_add_text(tree,
8093 tvb, curr_offset, 1,
8094 gsm_dtap_elem_strings[DE_CIPH_KEY_SEQ_NUM].strptr);
8096 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_CIPH_KEY_SEQ_NUM]);
8098 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
8099 proto_tree_add_text(subtree,
8100 tvb, curr_offset, 1,
8104 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
8109 proto_tree_add_text(subtree,
8110 tvb, curr_offset, 1,
8111 "%s : Ciphering Key Sequence Number: No key is available",
8116 proto_tree_add_text(subtree,
8117 tvb, curr_offset, 1,
8118 "%s : Ciphering Key Sequence Number: %u",
8127 if (curr_len <= 0) return;
8129 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_AUTH_PARAM_RAND);
8131 ELEM_OPT_TLV(0x20, BSSAP_PDU_TYPE_DTAP, DE_AUTH_PARAM_AUTN, "");
8133 EXTRANEOUS_DATA_CHECK(curr_len, 0);
8140 dtap_mm_auth_resp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
8142 guint32 curr_offset;
8146 curr_offset = offset;
8149 is_uplink = IS_UPLINK_TRUE;
8151 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_AUTH_RESP_PARAM);
8153 ELEM_OPT_TLV(0x21, BSSAP_PDU_TYPE_DTAP, DE_AUTH_RESP_PARAM_EXT, "");
8155 EXTRANEOUS_DATA_CHECK(curr_len, 0);
8162 dtap_mm_auth_fail(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
8164 guint32 curr_offset;
8168 curr_offset = offset;
8171 is_uplink = IS_UPLINK_TRUE;
8173 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_REJ_CAUSE);
8175 ELEM_OPT_TLV(0x22, BSSAP_PDU_TYPE_DTAP, DE_AUTH_FAIL_PARAM, "");
8177 EXTRANEOUS_DATA_CHECK(curr_len, 0);
8184 dtap_mm_cm_reestab_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
8186 guint32 curr_offset;
8190 proto_tree *subtree;
8193 curr_offset = offset;
8196 is_uplink = IS_UPLINK_TRUE;
8199 * special dissection for Cipher Key Sequence Number
8201 oct = tvb_get_guint8(tvb, curr_offset);
8203 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
8204 proto_tree_add_text(tree,
8205 tvb, curr_offset, 1,
8210 proto_tree_add_text(tree,
8211 tvb, curr_offset, 1,
8212 gsm_dtap_elem_strings[DE_CIPH_KEY_SEQ_NUM].strptr);
8214 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_CIPH_KEY_SEQ_NUM]);
8216 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
8217 proto_tree_add_text(subtree,
8218 tvb, curr_offset, 1,
8222 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
8227 proto_tree_add_text(subtree,
8228 tvb, curr_offset, 1,
8229 "%s : Ciphering Key Sequence Number: No key is available",
8234 proto_tree_add_text(subtree,
8235 tvb, curr_offset, 1,
8236 "%s : Ciphering Key Sequence Number: %u",
8245 if (curr_len <= 0) return;
8247 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_MS_CM_2, "");
8249 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_MID, "");
8251 ELEM_OPT_TV(0x13, BSSAP_PDU_TYPE_DTAP, DE_LAI, "");
8253 EXTRANEOUS_DATA_CHECK(curr_len, 0);
8260 dtap_mm_cm_srvc_prompt(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
8262 guint32 curr_offset;
8266 curr_offset = offset;
8269 is_uplink = IS_UPLINK_FALSE;
8271 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_PD_SAPI);
8273 EXTRANEOUS_DATA_CHECK(curr_len, 0);
8280 dtap_mm_cm_srvc_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
8282 guint32 curr_offset;
8286 curr_offset = offset;
8289 is_uplink = IS_UPLINK_FALSE;
8291 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_REJ_CAUSE);
8293 EXTRANEOUS_DATA_CHECK(curr_len, 0);
8300 dtap_mm_abort(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
8302 guint32 curr_offset;
8306 curr_offset = offset;
8309 is_uplink = IS_UPLINK_FALSE;
8311 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_REJ_CAUSE);
8313 EXTRANEOUS_DATA_CHECK(curr_len, 0);
8320 dtap_mm_cm_srvc_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
8322 guint32 curr_offset;
8326 proto_tree *subtree;
8330 curr_offset = offset;
8333 is_uplink = IS_UPLINK_TRUE;
8336 * special dissection for CM Service Type
8338 oct = tvb_get_guint8(tvb, curr_offset);
8341 proto_tree_add_text(tree,
8342 tvb, curr_offset, 1,
8343 gsm_dtap_elem_strings[DE_CIPH_KEY_SEQ_NUM].strptr);
8345 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_CIPH_KEY_SEQ_NUM]);
8347 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
8348 proto_tree_add_text(subtree,
8349 tvb, curr_offset, 1,
8353 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
8355 switch ((oct & 0x70) >> 4)
8358 proto_tree_add_text(subtree,
8359 tvb, curr_offset, 1,
8360 "%s : Ciphering Key Sequence Number: No key is available",
8365 proto_tree_add_text(subtree,
8366 tvb, curr_offset, 1,
8367 "%s : Ciphering Key Sequence Number: %u",
8374 proto_tree_add_text(tree,
8375 tvb, curr_offset, 1,
8376 gsm_dtap_elem_strings[DE_CM_SRVC_TYPE].strptr);
8378 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_CM_SRVC_TYPE]);
8382 case 0x01: str = "Mobile originating call establishment or packet mode connection establishment"; break;
8383 case 0x02: str = "Emergency call establishment"; break;
8384 case 0x04: str = "Short message service"; break;
8385 case 0x08: str = "Supplementary service activation"; break;
8386 case 0x09: str = "Voice group call establishment"; break;
8387 case 0x0a: str = "Voice broadcast call establishment"; break;
8388 case 0x0b: str = "Location Services"; break;
8394 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
8395 proto_tree_add_text(subtree,
8396 tvb, curr_offset, 1,
8397 "%s : Service Type: (%u) %s",
8405 if (curr_len <= 0) return;
8407 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_MS_CM_2, "");
8409 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_MID, "");
8411 ELEM_OPT_TV_SHORT(0x80, BSSAP_PDU_TYPE_DTAP, DE_PRIO, "");
8413 EXTRANEOUS_DATA_CHECK(curr_len, 0);
8420 dtap_mm_id_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
8423 guint32 curr_offset;
8425 proto_tree *subtree;
8429 curr_offset = offset;
8432 is_uplink = IS_UPLINK_FALSE;
8435 * special dissection for Identity Type
8437 oct = tvb_get_guint8(tvb, curr_offset);
8439 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
8440 proto_tree_add_text(tree,
8441 tvb, curr_offset, 1,
8446 proto_tree_add_text(tree,
8447 tvb, curr_offset, 1,
8448 gsm_dtap_elem_strings[DE_ID_TYPE].strptr);
8450 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_ID_TYPE]);
8452 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
8453 proto_tree_add_text(subtree,
8454 tvb, curr_offset, 1,
8460 case 1: str = "IMSI"; break;
8461 case 2: str = "IMEI"; break;
8462 case 3: str = "IMEISV"; break;
8463 case 4: str = "TMSI"; break;
8469 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
8470 proto_tree_add_text(subtree,
8471 tvb, curr_offset, 1,
8472 "%s : Type of identity: %s",
8479 EXTRANEOUS_DATA_CHECK(curr_len, 0);
8486 dtap_mm_id_resp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
8488 guint32 curr_offset;
8492 curr_offset = offset;
8495 is_uplink = IS_UPLINK_TRUE;
8497 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_MID, "");
8499 EXTRANEOUS_DATA_CHECK(curr_len, 0);
8506 dtap_mm_imsi_det_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
8508 guint32 curr_offset;
8512 curr_offset = offset;
8515 is_uplink = IS_UPLINK_TRUE;
8517 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_MS_CM_1);
8519 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_MID, "");
8521 EXTRANEOUS_DATA_CHECK(curr_len, 0);
8528 dtap_mm_loc_upd_acc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
8530 guint32 curr_offset;
8534 curr_offset = offset;
8537 is_uplink = IS_UPLINK_FALSE;
8539 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_LAI);
8541 ELEM_OPT_TLV(0x17, BSSAP_PDU_TYPE_DTAP, DE_MID, "");
8543 ELEM_OPT_T(0xa1, BSSAP_PDU_TYPE_DTAP, DE_FOP, "");
8545 ELEM_OPT_T(0xa2, BSSAP_PDU_TYPE_DTAP, DE_CTS_PERM, "");
8547 ELEM_OPT_TLV(0x4a, BSSAP_PDU_TYPE_DTAP, DE_PLMN_LIST, " Equivalent");
8549 EXTRANEOUS_DATA_CHECK(curr_len, 0);
8556 dtap_mm_loc_upd_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
8558 guint32 curr_offset;
8562 curr_offset = offset;
8565 is_uplink = IS_UPLINK_FALSE;
8567 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_REJ_CAUSE);
8569 EXTRANEOUS_DATA_CHECK(curr_len, 0);
8576 dtap_mm_loc_upd_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
8578 guint32 curr_offset;
8582 proto_tree *subtree;
8586 curr_offset = offset;
8589 is_uplink = IS_UPLINK_TRUE;
8592 * special dissection for Location Updating Type
8594 oct = tvb_get_guint8(tvb, curr_offset);
8597 proto_tree_add_text(tree,
8598 tvb, curr_offset, 1,
8599 gsm_dtap_elem_strings[DE_CIPH_KEY_SEQ_NUM].strptr);
8601 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_CIPH_KEY_SEQ_NUM]);
8603 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
8604 proto_tree_add_text(subtree,
8605 tvb, curr_offset, 1,
8609 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
8611 switch ((oct & 0x70) >> 4)
8614 proto_tree_add_text(subtree,
8615 tvb, curr_offset, 1,
8616 "%s : Ciphering Key Sequence Number: No key is available",
8621 proto_tree_add_text(subtree,
8622 tvb, curr_offset, 1,
8623 "%s : Ciphering Key Sequence Number: %u",
8630 proto_tree_add_text(tree,
8631 tvb, curr_offset, 1,
8632 gsm_dtap_elem_strings[DE_LOC_UPD_TYPE].strptr);
8634 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_LOC_UPD_TYPE]);
8636 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
8637 proto_tree_add_text(subtree,
8638 tvb, curr_offset, 1,
8639 "%s : Follow-On Request (FOR): %s",
8641 (oct & 0x08) ? "Follow-on request pending" : "No follow-on request pending");
8643 other_decode_bitfield_value(a_bigbuf, oct, 0x04, 8);
8644 proto_tree_add_text(subtree,
8645 tvb, curr_offset, 1,
8651 case 0: str = "Normal"; break;
8652 case 1: str = "Periodic"; break;
8653 case 2: str = "IMSI attach"; break;
8659 other_decode_bitfield_value(a_bigbuf, oct, 0x03, 8);
8660 proto_tree_add_text(subtree,
8661 tvb, curr_offset, 1,
8662 "%s : Updating Type: %s",
8666 proto_item_append_text(item, " - %s", str);
8671 if (curr_len <= 0) return;
8673 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_LAI);
8675 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_MS_CM_1);
8677 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_MID, "");
8679 ELEM_OPT_TLV(0x33, BSSAP_PDU_TYPE_DTAP, DE_MS_CM_2, "");
8681 EXTRANEOUS_DATA_CHECK(curr_len, 0);
8688 dtap_mm_mm_info(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
8690 guint32 curr_offset;
8694 curr_offset = offset;
8697 is_uplink = IS_UPLINK_TRUE;
8699 ELEM_OPT_TLV(0x43, BSSAP_PDU_TYPE_DTAP, DE_NETWORK_NAME, " - Full Name");
8701 ELEM_OPT_TLV(0x45, BSSAP_PDU_TYPE_DTAP, DE_NETWORK_NAME, " - Short Name");
8703 ELEM_OPT_TV(0x46, BSSAP_PDU_TYPE_DTAP, DE_TIME_ZONE, " - Local");
8705 ELEM_OPT_TV(0x47, BSSAP_PDU_TYPE_DTAP, DE_TIME_ZONE_TIME, " - Universal Time and Local Time Zone");
8707 ELEM_OPT_TLV(0x48, BSSAP_PDU_TYPE_DTAP, DE_LSA_ID, "");
8709 ELEM_OPT_TLV(0x49, BSSAP_PDU_TYPE_DTAP, DE_DAY_SAVING_TIME, "");
8711 EXTRANEOUS_DATA_CHECK(curr_len, 0);
8718 dtap_mm_mm_status(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
8720 guint32 curr_offset;
8724 curr_offset = offset;
8727 is_uplink = IS_UPLINK_TRUE;
8729 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_REJ_CAUSE);
8731 EXTRANEOUS_DATA_CHECK(curr_len, 0);
8738 dtap_mm_tmsi_realloc_cmd(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
8740 guint32 curr_offset;
8744 curr_offset = offset;
8747 is_uplink = IS_UPLINK_FALSE;
8749 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_LAI);
8751 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_MID, "");
8753 EXTRANEOUS_DATA_CHECK(curr_len, 0);
8760 dtap_rr_paging_resp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
8762 guint32 curr_offset;
8766 proto_tree *subtree;
8769 curr_offset = offset;
8772 is_uplink = IS_UPLINK_TRUE;
8775 * special dissection for Cipher Key Sequence Number
8777 oct = tvb_get_guint8(tvb, curr_offset);
8779 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
8780 proto_tree_add_text(tree,
8781 tvb, curr_offset, 1,
8786 proto_tree_add_text(tree,
8787 tvb, curr_offset, 1,
8788 gsm_dtap_elem_strings[DE_CIPH_KEY_SEQ_NUM].strptr);
8790 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_CIPH_KEY_SEQ_NUM]);
8792 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
8793 proto_tree_add_text(subtree,
8794 tvb, curr_offset, 1,
8798 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
8803 proto_tree_add_text(subtree,
8804 tvb, curr_offset, 1,
8805 "%s : Ciphering Key Sequence Number: No key is available",
8810 proto_tree_add_text(subtree,
8811 tvb, curr_offset, 1,
8812 "%s : Ciphering Key Sequence Number: %u",
8821 if (curr_len <= 0) return;
8823 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_MS_CM_2, "");
8825 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_MID, "");
8827 EXTRANEOUS_DATA_CHECK(curr_len, 0);
8834 dtap_rr_rr_status(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
8836 guint32 curr_offset;
8840 curr_offset = offset;
8843 is_uplink = IS_UPLINK_TRUE;
8845 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RR_CAUSE);
8847 EXTRANEOUS_DATA_CHECK(curr_len, 0);
8854 dtap_cc_alerting(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
8856 guint32 curr_offset;
8860 curr_offset = offset;
8863 is_uplink = IS_UPLINK_TRUE;
8865 ELEM_OPT_TLV(0x1c, BSSAP_PDU_TYPE_DTAP, DE_FACILITY, "");
8867 ELEM_OPT_TLV(0x1e, BSSAP_PDU_TYPE_DTAP, DE_PROG_IND, "");
8869 ELEM_OPT_TLV(0x7e, BSSAP_PDU_TYPE_DTAP, DE_USER_USER, "");
8873 ELEM_OPT_TLV(0x7f, BSSAP_PDU_TYPE_DTAP, DE_SS_VER_IND, "");
8875 EXTRANEOUS_DATA_CHECK(curr_len, 0);
8882 dtap_cc_call_conf(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
8884 guint32 curr_offset;
8888 curr_offset = offset;
8891 is_uplink = IS_UPLINK_TRUE;
8893 ELEM_OPT_TV_SHORT(0xd0, BSSAP_PDU_TYPE_DTAP, DE_REPEAT_IND, " BC repeat indicator");
8895 ELEM_OPT_TLV(0x04, BSSAP_PDU_TYPE_DTAP, DE_BEARER_CAP, " 1");
8897 ELEM_OPT_TLV(0x04, BSSAP_PDU_TYPE_DTAP, DE_BEARER_CAP, " 2");
8899 ELEM_OPT_TLV(0x08, BSSAP_PDU_TYPE_DTAP, DE_CAUSE, "");
8901 ELEM_OPT_TLV(0x15, BSSAP_PDU_TYPE_DTAP, DE_CC_CAP, "");
8903 ELEM_OPT_TLV(0x2d, BSSAP_PDU_TYPE_DTAP, DE_SI, "");
8905 ELEM_OPT_TLV(0x40, BSSAP_PDU_TYPE_DTAP, DE_SUP_CODEC_LIST, "");
8907 EXTRANEOUS_DATA_CHECK(curr_len, 0);
8914 dtap_cc_call_proceed(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
8916 guint32 curr_offset;
8920 curr_offset = offset;
8923 is_uplink = IS_UPLINK_FALSE;
8925 ELEM_OPT_TV_SHORT(0xd0, BSSAP_PDU_TYPE_DTAP, DE_REPEAT_IND, " BC repeat indicator");
8927 ELEM_OPT_TLV(0x04, BSSAP_PDU_TYPE_DTAP, DE_BEARER_CAP, " 1");
8929 ELEM_OPT_TLV(0x04, BSSAP_PDU_TYPE_DTAP, DE_BEARER_CAP, " 2");
8931 ELEM_OPT_TLV(0x1c, BSSAP_PDU_TYPE_DTAP, DE_FACILITY, "");
8933 ELEM_OPT_TLV(0x1e, BSSAP_PDU_TYPE_DTAP, DE_PROG_IND, "");
8935 ELEM_OPT_TV_SHORT(0x80, BSSAP_PDU_TYPE_DTAP, DE_PRIO, "");
8937 ELEM_OPT_TLV(0x2f, BSSAP_PDU_TYPE_DTAP, DE_NET_CC_CAP, "");
8939 EXTRANEOUS_DATA_CHECK(curr_len, 0);
8946 dtap_cc_congestion_control(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
8948 guint32 curr_offset;
8952 proto_tree *subtree;
8956 curr_offset = offset;
8959 is_uplink = IS_UPLINK_FALSE;
8962 * special dissection for Congestion Level
8964 oct = tvb_get_guint8(tvb, curr_offset);
8966 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
8967 proto_tree_add_text(tree,
8968 tvb, curr_offset, 1,
8973 proto_tree_add_text(tree,
8974 tvb, curr_offset, 1,
8975 gsm_dtap_elem_strings[DE_CONGESTION].strptr);
8977 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_CONGESTION]);
8981 case 0: str = "Receiver ready"; break;
8982 case 15: str = "Receiver not ready"; break;
8988 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
8989 proto_tree_add_text(subtree,
8990 tvb, curr_offset, 1,
8991 "%s : Congestion level: %s",
8998 if (curr_len <= 0) return;
9000 ELEM_OPT_TLV(0x08, BSSAP_PDU_TYPE_DTAP, DE_CAUSE, "");
9002 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9009 dtap_cc_connect(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9011 guint32 curr_offset;
9015 curr_offset = offset;
9018 is_uplink = IS_UPLINK_TRUE;
9020 ELEM_OPT_TLV(0x1c, BSSAP_PDU_TYPE_DTAP, DE_FACILITY, "");
9022 ELEM_OPT_TLV(0x1e, BSSAP_PDU_TYPE_DTAP, DE_PROG_IND, "");
9024 ELEM_OPT_TLV(0x4c, BSSAP_PDU_TYPE_DTAP, DE_CONN_NUM, "");
9026 ELEM_OPT_TLV(0x4d, BSSAP_PDU_TYPE_DTAP, DE_CONN_SUB_ADDR, "");
9028 ELEM_OPT_TLV(0x7e, BSSAP_PDU_TYPE_DTAP, DE_USER_USER, "");
9032 ELEM_OPT_TLV(0x7f, BSSAP_PDU_TYPE_DTAP, DE_SS_VER_IND, "");
9034 ELEM_OPT_TLV(0x2d, BSSAP_PDU_TYPE_DTAP, DE_SI, "");
9036 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9043 dtap_cc_disconnect(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9045 guint32 curr_offset;
9049 curr_offset = offset;
9052 is_uplink = IS_UPLINK_TRUE;
9054 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_CAUSE, "");
9056 ELEM_OPT_TLV(0x1c, BSSAP_PDU_TYPE_DTAP, DE_FACILITY, "");
9058 ELEM_OPT_TLV(0x1e, BSSAP_PDU_TYPE_DTAP, DE_PROG_IND, "");
9060 ELEM_OPT_TLV(0x7e, BSSAP_PDU_TYPE_DTAP, DE_USER_USER, "");
9062 ELEM_OPT_TLV(0x7b, BSSAP_PDU_TYPE_DTAP, DE_ALLOWED_ACTIONS, "");
9066 ELEM_OPT_TLV(0x7f, BSSAP_PDU_TYPE_DTAP, DE_SS_VER_IND, "");
9068 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9075 dtap_cc_emerg_setup(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9077 guint32 curr_offset;
9081 curr_offset = offset;
9084 is_uplink = IS_UPLINK_TRUE;
9086 ELEM_OPT_TLV(0x04, BSSAP_PDU_TYPE_DTAP, DE_BEARER_CAP, "");
9088 ELEM_OPT_TLV(0x2d, BSSAP_PDU_TYPE_DTAP, DE_SI, "");
9090 ELEM_OPT_TLV(0x40, BSSAP_PDU_TYPE_DTAP, DE_SUP_CODEC_LIST, "");
9092 ELEM_OPT_TLV(0x2e, BSSAP_PDU_TYPE_DTAP, DE_SRVC_CAT, " Emergency");
9094 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9101 dtap_cc_facility(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9103 guint32 curr_offset;
9107 curr_offset = offset;
9110 is_uplink = IS_UPLINK_TRUE;
9112 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_FACILITY, "");
9116 ELEM_OPT_TLV(0x7f, BSSAP_PDU_TYPE_DTAP, DE_SS_VER_IND, "");
9118 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9125 dtap_cc_hold_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9127 guint32 curr_offset;
9131 curr_offset = offset;
9134 is_uplink = IS_UPLINK_FALSE;
9136 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_CAUSE, "");
9138 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9145 dtap_cc_modify(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9147 guint32 curr_offset;
9151 curr_offset = offset;
9154 is_uplink = IS_UPLINK_TRUE;
9156 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_BEARER_CAP, "");
9158 ELEM_OPT_TLV(0x7c, BSSAP_PDU_TYPE_DTAP, DE_LLC, "");
9160 ELEM_OPT_TLV(0x7d, BSSAP_PDU_TYPE_DTAP, DE_HLC, "");
9162 ELEM_OPT_T(0xa3, BSSAP_PDU_TYPE_DTAP, DE_REV_CALL_SETUP_DIR, "");
9164 ELEM_OPT_T(0xa4, BSSAP_PDU_TYPE_DTAP, DE_IMM_MOD_IND, "");
9166 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9173 dtap_cc_modify_complete(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9175 guint32 curr_offset;
9179 curr_offset = offset;
9182 is_uplink = IS_UPLINK_TRUE;
9184 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_BEARER_CAP, "");
9186 ELEM_OPT_TLV(0x7c, BSSAP_PDU_TYPE_DTAP, DE_LLC, "");
9188 ELEM_OPT_TLV(0x7d, BSSAP_PDU_TYPE_DTAP, DE_HLC, "");
9190 ELEM_OPT_T(0xa3, BSSAP_PDU_TYPE_DTAP, DE_REV_CALL_SETUP_DIR, "");
9192 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9199 dtap_cc_modify_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9201 guint32 curr_offset;
9205 curr_offset = offset;
9208 is_uplink = IS_UPLINK_FALSE;
9210 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_BEARER_CAP, "");
9212 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_CAUSE, "");
9214 ELEM_OPT_TLV(0x7c, BSSAP_PDU_TYPE_DTAP, DE_LLC, "");
9216 ELEM_OPT_TLV(0x7d, BSSAP_PDU_TYPE_DTAP, DE_HLC, "");
9218 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9225 dtap_cc_notify(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9227 guint32 curr_offset;
9231 curr_offset = offset;
9234 is_uplink = IS_UPLINK_FALSE;
9236 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_NOT_IND);
9238 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9245 dtap_cc_progress(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9247 guint32 curr_offset;
9251 curr_offset = offset;
9254 is_uplink = IS_UPLINK_FALSE;
9256 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_PROG_IND, "");
9258 ELEM_OPT_TLV(0x7e, BSSAP_PDU_TYPE_DTAP, DE_USER_USER, "");
9260 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9267 dtap_cc_cc_est(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9269 guint32 curr_offset;
9273 curr_offset = offset;
9276 is_uplink = IS_UPLINK_FALSE;
9278 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_SETUP_CONTAINER, "");
9280 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9287 dtap_cc_cc_est_conf(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9289 guint32 curr_offset;
9293 curr_offset = offset;
9296 is_uplink = IS_UPLINK_TRUE;
9298 ELEM_OPT_TV_SHORT(0xd0, BSSAP_PDU_TYPE_DTAP, DE_REPEAT_IND, " Repeat indicator");
9300 ELEM_MAND_TLV(0x04, BSSAP_PDU_TYPE_DTAP, DE_BEARER_CAP, " 1");
9302 ELEM_OPT_TLV(0x04, BSSAP_PDU_TYPE_DTAP, DE_BEARER_CAP, " 2");
9304 ELEM_OPT_TLV(0x08, BSSAP_PDU_TYPE_DTAP, DE_CAUSE, "");
9306 ELEM_OPT_TLV(0x40, BSSAP_PDU_TYPE_DTAP, DE_SUP_CODEC_LIST, "");
9308 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9315 dtap_cc_release(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9317 guint32 curr_offset;
9321 curr_offset = offset;
9324 is_uplink = IS_UPLINK_TRUE;
9326 ELEM_OPT_TLV(0x08, BSSAP_PDU_TYPE_DTAP, DE_CAUSE, "");
9328 ELEM_OPT_TLV(0x08, BSSAP_PDU_TYPE_DTAP, DE_CAUSE, " 2");
9330 ELEM_OPT_TLV(0x1c, BSSAP_PDU_TYPE_DTAP, DE_FACILITY, "");
9332 ELEM_OPT_TLV(0x7e, BSSAP_PDU_TYPE_DTAP, DE_USER_USER, "");
9336 ELEM_OPT_TLV(0x7f, BSSAP_PDU_TYPE_DTAP, DE_SS_VER_IND, "");
9338 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9345 dtap_cc_recall(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9347 guint32 curr_offset;
9351 curr_offset = offset;
9354 is_uplink = IS_UPLINK_FALSE;
9356 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RECALL_TYPE);
9358 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_FACILITY, "");
9360 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9367 dtap_cc_release_complete(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9369 guint32 curr_offset;
9373 curr_offset = offset;
9376 is_uplink = IS_UPLINK_FALSE;
9378 ELEM_OPT_TLV(0x08, BSSAP_PDU_TYPE_DTAP, DE_CAUSE, "");
9380 ELEM_OPT_TLV(0x1c, BSSAP_PDU_TYPE_DTAP, DE_FACILITY, "");
9382 ELEM_OPT_TLV(0x7e, BSSAP_PDU_TYPE_DTAP, DE_USER_USER, "");
9386 ELEM_OPT_TLV(0x7f, BSSAP_PDU_TYPE_DTAP, DE_SS_VER_IND, "");
9388 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9395 dtap_cc_retrieve_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9397 guint32 curr_offset;
9401 curr_offset = offset;
9404 is_uplink = IS_UPLINK_FALSE;
9406 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_CAUSE, "");
9408 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9415 dtap_cc_setup(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9417 guint32 curr_offset;
9421 curr_offset = offset;
9424 is_uplink = IS_UPLINK_TRUE;
9426 ELEM_OPT_TV_SHORT(0xd0, BSSAP_PDU_TYPE_DTAP, DE_REPEAT_IND, " BC repeat indicator");
9428 ELEM_OPT_TLV(0x04, BSSAP_PDU_TYPE_DTAP, DE_BEARER_CAP, " 1");
9430 ELEM_OPT_TLV(0x04, BSSAP_PDU_TYPE_DTAP, DE_BEARER_CAP, " 2");
9432 ELEM_OPT_TLV(0x1c, BSSAP_PDU_TYPE_DTAP, DE_FACILITY, "");
9434 ELEM_OPT_TLV(0x1e, BSSAP_PDU_TYPE_DTAP, DE_PROG_IND, "");
9436 ELEM_OPT_TV(0x34, BSSAP_PDU_TYPE_DTAP, DE_SIGNAL, "");
9438 ELEM_OPT_TLV(0x5c, BSSAP_PDU_TYPE_DTAP, DE_CLG_PARTY_BCD_NUM, "");
9440 ELEM_OPT_TLV(0x5d, BSSAP_PDU_TYPE_DTAP, DE_CLG_PARTY_SUB_ADDR, "");
9442 ELEM_OPT_TLV(0x5e, BSSAP_PDU_TYPE_DTAP, DE_CLD_PARTY_BCD_NUM, "");
9444 ELEM_OPT_TLV(0x6d, BSSAP_PDU_TYPE_DTAP, DE_CLD_PARTY_SUB_ADDR, "");
9446 ELEM_OPT_TLV(0x74, BSSAP_PDU_TYPE_DTAP, DE_RED_PARTY_BCD_NUM, "");
9448 ELEM_OPT_TLV(0x75, BSSAP_PDU_TYPE_DTAP, DE_RED_PARTY_SUB_ADDR, "");
9450 ELEM_OPT_TV_SHORT(0xd0, BSSAP_PDU_TYPE_DTAP, DE_REPEAT_IND, " LLC repeat indicator");
9452 ELEM_OPT_TLV(0x7c, BSSAP_PDU_TYPE_DTAP, DE_LLC, " 1");
9454 ELEM_OPT_TLV(0x7c, BSSAP_PDU_TYPE_DTAP, DE_LLC, " 2");
9456 ELEM_OPT_TV_SHORT(0xd0, BSSAP_PDU_TYPE_DTAP, DE_REPEAT_IND, " HLC repeat indicator");
9458 ELEM_OPT_TLV(0x7d, BSSAP_PDU_TYPE_DTAP, DE_HLC, " 1");
9460 ELEM_OPT_TLV(0x7d, BSSAP_PDU_TYPE_DTAP, DE_HLC, " 2");
9462 ELEM_OPT_TLV(0x7e, BSSAP_PDU_TYPE_DTAP, DE_USER_USER, "");
9466 ELEM_OPT_TV_SHORT(0x80, BSSAP_PDU_TYPE_DTAP, DE_PRIO, "");
9468 ELEM_OPT_TLV(0x19, BSSAP_PDU_TYPE_DTAP, DE_ALERT_PATTERN, "");
9470 ELEM_OPT_TLV(0x2f, BSSAP_PDU_TYPE_DTAP, DE_NET_CC_CAP, "");
9472 ELEM_OPT_TLV(0x3a, BSSAP_PDU_TYPE_DTAP, DE_CAUSE_NO_CLI, "");
9476 ELEM_OPT_TLV(0x7f, BSSAP_PDU_TYPE_DTAP, DE_SS_VER_IND, "");
9478 ELEM_OPT_T(0xa1, BSSAP_PDU_TYPE_DTAP, DE_FOP, "");
9480 ELEM_OPT_T(0xa2, BSSAP_PDU_TYPE_DTAP, DE_CTS_PERM, "");
9482 ELEM_OPT_TLV(0x15, BSSAP_PDU_TYPE_DTAP, DE_CC_CAP, "");
9484 ELEM_OPT_TLV(0x1d, BSSAP_PDU_TYPE_DTAP, DE_FACILITY, " $(CCBS)$ (advanced recall alignment)");
9486 ELEM_OPT_TLV(0x1b, BSSAP_PDU_TYPE_DTAP, DE_FACILITY, " (recall alignment Not essential) $(CCBS)$");
9488 ELEM_OPT_TLV(0x2d, BSSAP_PDU_TYPE_DTAP, DE_SI, "");
9490 ELEM_OPT_TLV(0x40, BSSAP_PDU_TYPE_DTAP, DE_SUP_CODEC_LIST, "");
9492 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9499 dtap_cc_start_cc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9501 guint32 curr_offset;
9505 curr_offset = offset;
9508 is_uplink = IS_UPLINK_FALSE;
9510 ELEM_OPT_TLV(0x15, BSSAP_PDU_TYPE_DTAP, DE_CC_CAP, "");
9512 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9519 dtap_cc_start_dtmf(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9521 guint32 curr_offset;
9525 curr_offset = offset;
9528 is_uplink = IS_UPLINK_TRUE;
9530 ELEM_MAND_TV(0x2c, BSSAP_PDU_TYPE_DTAP, DE_KEYPAD_FACILITY, "");
9532 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9539 dtap_cc_start_dtmf_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9541 guint32 curr_offset;
9545 curr_offset = offset;
9548 is_uplink = IS_UPLINK_FALSE;
9550 ELEM_MAND_TV(0x2c, BSSAP_PDU_TYPE_DTAP, DE_KEYPAD_FACILITY, "");
9552 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9559 dtap_cc_start_dtmf_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9561 guint32 curr_offset;
9565 curr_offset = offset;
9568 is_uplink = IS_UPLINK_FALSE;
9570 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_CAUSE, "");
9572 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9579 dtap_cc_status(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9581 guint32 curr_offset;
9585 curr_offset = offset;
9588 is_uplink = IS_UPLINK_FALSE;
9590 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_CAUSE, "");
9592 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_CALL_STATE);
9594 ELEM_OPT_TLV(0x24, BSSAP_PDU_TYPE_DTAP, DE_AUX_STATES, "");
9596 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9603 dtap_cc_user_info(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9605 guint32 curr_offset;
9609 curr_offset = offset;
9612 is_uplink = IS_UPLINK_TRUE;
9614 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_USER_USER, "");
9616 ELEM_OPT_T(0xa0, BSSAP_PDU_TYPE_DTAP, DE_MORE_DATA, "");
9618 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9625 dtap_ss_register(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9627 guint32 curr_offset;
9631 curr_offset = offset;
9634 is_uplink = IS_UPLINK_TRUE;
9636 ELEM_MAND_TLV(0x1c, BSSAP_PDU_TYPE_DTAP, DE_FACILITY, "");
9638 ELEM_OPT_TLV(0x7f, BSSAP_PDU_TYPE_DTAP, DE_SS_VER_IND, "");
9640 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9647 dtap_sms_cp_data(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9649 guint32 curr_offset;
9653 curr_offset = offset;
9656 is_uplink = IS_UPLINK_TRUE;
9658 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_CP_USER_DATA, "");
9660 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9667 dtap_sms_cp_error(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9669 guint32 curr_offset;
9673 curr_offset = offset;
9676 is_uplink = IS_UPLINK_TRUE;
9678 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_CP_CAUSE);
9680 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9687 rp_data_n_ms(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9689 guint32 curr_offset;
9693 curr_offset = offset;
9696 is_uplink = IS_UPLINK_FALSE;
9697 g_pinfo->p2p_dir = P2P_DIR_SENT;
9699 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RP_MESSAGE_REF);
9701 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_RP_ORIG_ADDR, "");
9703 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_RP_DEST_ADDR, "");
9705 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_RP_USER_DATA, "");
9707 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9714 rp_data_ms_n(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9716 guint32 curr_offset;
9720 curr_offset = offset;
9723 is_uplink = IS_UPLINK_TRUE;
9724 g_pinfo->p2p_dir = P2P_DIR_RECV;
9726 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RP_MESSAGE_REF);
9728 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_RP_ORIG_ADDR, "");
9730 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_RP_DEST_ADDR, "");
9732 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_RP_USER_DATA, "");
9734 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9741 rp_smma(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9743 guint32 curr_offset;
9747 curr_offset = offset;
9750 is_uplink = IS_UPLINK_TRUE;
9752 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RP_MESSAGE_REF);
9754 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9761 rp_ack_n_ms(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9763 guint32 curr_offset;
9767 curr_offset = offset;
9770 is_uplink = IS_UPLINK_FALSE;
9771 g_pinfo->p2p_dir = P2P_DIR_SENT;
9773 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RP_MESSAGE_REF);
9775 ELEM_OPT_TLV(0x41, BSSAP_PDU_TYPE_DTAP, DE_RP_USER_DATA, "");
9777 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9784 rp_ack_ms_n(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9786 guint32 curr_offset;
9790 curr_offset = offset;
9793 is_uplink = IS_UPLINK_TRUE;
9794 g_pinfo->p2p_dir = P2P_DIR_RECV;
9796 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RP_MESSAGE_REF);
9798 ELEM_OPT_TLV(0x41, BSSAP_PDU_TYPE_DTAP, DE_RP_USER_DATA, "");
9800 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9807 rp_error_n_ms(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9809 guint32 curr_offset;
9813 curr_offset = offset;
9816 is_uplink = IS_UPLINK_FALSE;
9817 g_pinfo->p2p_dir = P2P_DIR_SENT;
9819 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RP_MESSAGE_REF);
9821 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_RP_CAUSE, "");
9823 ELEM_OPT_TLV(0x41, BSSAP_PDU_TYPE_DTAP, DE_RP_USER_DATA, "");
9825 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9832 rp_error_ms_n(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9834 guint32 curr_offset;
9838 curr_offset = offset;
9841 is_uplink = IS_UPLINK_TRUE;
9842 g_pinfo->p2p_dir = P2P_DIR_RECV;
9844 ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RP_MESSAGE_REF);
9846 ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_RP_CAUSE, "");
9848 ELEM_OPT_TLV(0x41, BSSAP_PDU_TYPE_DTAP, DE_RP_USER_DATA, "");
9850 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9853 #define NUM_GSM_DTAP_MSG_MM (sizeof(gsm_a_dtap_msg_mm_strings)/sizeof(value_string))
9854 static gint ett_gsm_dtap_msg_mm[NUM_GSM_DTAP_MSG_MM];
9855 static void (*dtap_msg_mm_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) = {
9856 dtap_mm_imsi_det_ind, /* IMSI Detach Indication */
9857 dtap_mm_loc_upd_acc, /* Location Updating Accept */
9858 dtap_mm_loc_upd_rej, /* Location Updating Reject */
9859 dtap_mm_loc_upd_req, /* Location Updating Request */
9860 NULL /* no associated data */, /* Authentication Reject */
9861 dtap_mm_auth_req, /* Authentication Request */
9862 dtap_mm_auth_resp, /* Authentication Response */
9863 dtap_mm_auth_fail, /* Authentication Failure */
9864 dtap_mm_id_req, /* Identity Request */
9865 dtap_mm_id_resp, /* Identity Response */
9866 dtap_mm_tmsi_realloc_cmd, /* TMSI Reallocation Command */
9867 NULL /* no associated data */, /* TMSI Reallocation Complete */
9868 NULL /* no associated data */, /* CM Service Accept */
9869 dtap_mm_cm_srvc_rej, /* CM Service Reject */
9870 NULL /* no associated data */, /* CM Service Abort */
9871 dtap_mm_cm_srvc_req, /* CM Service Request */
9872 dtap_mm_cm_srvc_prompt, /* CM Service Prompt */
9873 NULL, /* Reserved: was allocated in earlier phases of the protocol */
9874 dtap_mm_cm_reestab_req, /* CM Re-establishment Request */
9875 dtap_mm_abort, /* Abort */
9876 NULL /* no associated data */, /* MM Null */
9877 dtap_mm_mm_status, /* MM Status */
9878 dtap_mm_mm_info, /* MM Information */
9882 #define NUM_GSM_DTAP_MSG_RR (sizeof(gsm_a_dtap_msg_rr_strings)/sizeof(value_string))
9883 static gint ett_gsm_dtap_msg_rr[NUM_GSM_DTAP_MSG_RR];
9884 static void (*dtap_msg_rr_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) = {
9885 NULL, /* RR Initialisation Request */
9886 NULL, /* Additional Assignment */
9887 NULL, /* Immediate Assignment */
9888 NULL, /* Immediate Assignment Extended */
9889 NULL, /* Immediate Assignment Reject */
9891 NULL, /* DTM Assignment Failure */
9892 NULL, /* DTM Reject */
9893 NULL, /* DTM Request */
9894 NULL, /* Main DCCH Assignment Command */
9895 NULL, /* Packet Assignment Command */
9897 NULL, /* Ciphering Mode Command */
9898 NULL, /* Ciphering Mode Complete */
9900 NULL, /* Configuration Change Command */
9901 NULL, /* Configuration Change Ack. */
9902 NULL, /* Configuration Change Reject */
9904 NULL, /* Assignment Command */
9905 NULL, /* Assignment Complete */
9906 NULL, /* Assignment Failure */
9907 NULL, /* Handover Command */
9908 NULL, /* Handover Complete */
9909 NULL, /* Handover Failure */
9910 NULL, /* Physical Information */
9911 NULL, /* DTM Assignment Command */
9913 NULL, /* RR-cell Change Order */
9914 NULL, /* PDCH Assignment Command */
9916 NULL, /* Channel Release */
9917 NULL, /* Partial Release */
9918 NULL, /* Partial Release Complete */
9920 NULL, /* Paging Request Type 1 */
9921 NULL, /* Paging Request Type 2 */
9922 NULL, /* Paging Request Type 3 */
9923 dtap_rr_paging_resp, /* Paging Response */
9924 NULL, /* Notification/NCH */
9925 NULL, /* Reserved */
9926 NULL, /* Notification/Response */
9928 NULL, /* Reserved */
9930 /* NULL, * Utran Classmark Change * CONFLICTS WITH Handover To UTRAN Command */
9931 NULL, /* UE RAB Preconfiguration */
9932 NULL, /* cdma2000 Classmark Change */
9934 NULL, /* System Information Type 8 */
9935 NULL, /* System Information Type 1 */
9936 NULL, /* System Information Type 2 */
9937 NULL, /* System Information Type 3 */
9938 NULL, /* System Information Type 4 */
9939 NULL, /* System Information Type 5 */
9940 NULL, /* System Information Type 6 */
9941 NULL, /* System Information Type 7 */
9943 NULL, /* System Information Type 2bis */
9944 NULL, /* System Information Type 2ter */
9945 NULL, /* System Information Type 2quater */
9946 NULL, /* System Information Type 5bis */
9947 NULL, /* System Information Type 5ter */
9948 NULL, /* System Information Type 9 */
9949 NULL, /* System Information Type 13 */
9951 NULL, /* System Information Type 16 */
9952 NULL, /* System Information Type 17 */
9954 NULL, /* System Information Type 18 */
9955 NULL, /* System Information Type 19 */
9956 NULL, /* System Information Type 20 */
9958 NULL, /* Channel Mode Modify */
9959 dtap_rr_rr_status, /* RR Status */
9960 NULL, /* Channel Mode Modify Acknowledge */
9961 NULL, /* Frequency Redefinition */
9962 NULL, /* Measurement Report */
9963 NULL, /* Classmark Change */
9964 NULL, /* Classmark Enquiry */
9965 NULL, /* Extended Measurement Report */
9966 NULL, /* Extended Measurement Order */
9967 NULL, /* GPRS Suspension Request */
9969 NULL, /* VGCS Uplink Grant */
9970 NULL, /* Uplink Release */
9971 NULL, /* Reserved */
9972 NULL, /* Uplink Busy */
9973 NULL, /* Talker Indication */
9975 NULL, /* UTRAN Classmark Change/Handover To UTRAN Command */ /* spec conflict */
9977 NULL, /* Application Information */
9982 #define NUM_GSM_DTAP_MSG_CC (sizeof(gsm_a_dtap_msg_cc_strings)/sizeof(value_string))
9983 static gint ett_gsm_dtap_msg_cc[NUM_GSM_DTAP_MSG_CC];
9984 static void (*dtap_msg_cc_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) = {
9985 dtap_cc_alerting, /* Alerting */
9986 dtap_cc_call_conf, /* Call Confirmed */
9987 dtap_cc_call_proceed, /* Call Proceeding */
9988 dtap_cc_connect, /* Connect */
9989 NULL /* no associated data */, /* Connect Acknowledge */
9990 dtap_cc_emerg_setup, /* Emergency Setup */
9991 dtap_cc_progress, /* Progress */
9992 dtap_cc_cc_est, /* CC-Establishment */
9993 dtap_cc_cc_est_conf, /* CC-Establishment Confirmed */
9994 dtap_cc_recall, /* Recall */
9995 dtap_cc_start_cc, /* Start CC */
9996 dtap_cc_setup, /* Setup */
9997 dtap_cc_modify, /* Modify */
9998 dtap_cc_modify_complete, /* Modify Complete */
9999 dtap_cc_modify_rej, /* Modify Reject */
10000 dtap_cc_user_info, /* User Information */
10001 NULL /* no associated data */, /* Hold */
10002 NULL /* no associated data */, /* Hold Acknowledge */
10003 dtap_cc_hold_rej, /* Hold Reject */
10004 NULL /* no associated data */, /* Retrieve */
10005 NULL /* no associated data */, /* Retrieve Acknowledge */
10006 dtap_cc_retrieve_rej, /* Retrieve Reject */
10007 dtap_cc_disconnect, /* Disconnect */
10008 dtap_cc_release, /* Release */
10009 dtap_cc_release_complete, /* Release Complete */
10010 dtap_cc_congestion_control, /* Congestion Control */
10011 dtap_cc_notify, /* Notify */
10012 dtap_cc_status, /* Status */
10013 NULL /* no associated data */, /* Status Enquiry */
10014 dtap_cc_start_dtmf, /* Start DTMF */
10015 NULL /* no associated data */, /* Stop DTMF */
10016 NULL /* no associated data */, /* Stop DTMF Acknowledge */
10017 dtap_cc_start_dtmf_ack, /* Start DTMF Acknowledge */
10018 dtap_cc_start_dtmf_rej, /* Start DTMF Reject */
10019 dtap_cc_facility, /* Facility */
10023 #define NUM_GSM_DTAP_MSG_GMM (sizeof(gsm_a_dtap_msg_gmm_strings)/sizeof(value_string))
10024 static gint ett_gsm_dtap_msg_gmm[NUM_GSM_DTAP_MSG_GMM];
10025 static void (*dtap_msg_gmm_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) = {
10026 NULL, /* Attach Request */
10027 NULL, /* Attach Accept */
10028 NULL, /* Attach Complete */
10029 NULL, /* Attach Reject */
10030 NULL, /* Detach Request */
10031 NULL, /* Detach Accept */
10032 NULL, /* Routing Area Update Request */
10033 NULL, /* Routing Area Update Accept */
10034 NULL, /* Routing Area Update Complete */
10035 NULL, /* Routing Area Update Reject */
10036 NULL, /* Service Request */
10037 NULL, /* Service Accept */
10038 NULL, /* Service Reject */
10039 NULL, /* P-TMSI Reallocation Command */
10040 NULL, /* P-TMSI Reallocation Complete */
10041 NULL, /* Authentication and Ciphering Req */
10042 NULL, /* Authentication and Ciphering Resp */
10043 NULL, /* Authentication and Ciphering Rej */
10044 NULL, /* Authentication and Ciphering Failure */
10045 NULL, /* Identity Request */
10046 NULL, /* Identity Response */
10047 NULL, /* GMM Status */
10048 NULL, /* GMM Information */
10052 #define NUM_GSM_DTAP_MSG_SMS (sizeof(gsm_a_dtap_msg_sms_strings)/sizeof(value_string))
10053 static gint ett_gsm_dtap_msg_sms[NUM_GSM_DTAP_MSG_SMS];
10054 static void (*dtap_msg_sms_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) = {
10055 dtap_sms_cp_data, /* CP-DATA */
10056 NULL /* no associated data */, /* CP-ACK */
10057 dtap_sms_cp_error, /* CP-ERROR */
10061 #define NUM_GSM_DTAP_MSG_SM (sizeof(gsm_a_dtap_msg_sm_strings)/sizeof(value_string))
10062 static gint ett_gsm_dtap_msg_sm[NUM_GSM_DTAP_MSG_SM];
10063 static void (*dtap_msg_sm_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) = {
10064 NULL, /* Activate PDP Context Request */
10065 NULL, /* Activate PDP Context Accept */
10066 NULL, /* Activate PDP Context Reject */
10067 NULL, /* Request PDP Context Activation */
10068 NULL, /* Request PDP Context Activation rej. */
10069 NULL, /* Deactivate PDP Context Request */
10070 NULL, /* Deactivate PDP Context Accept */
10071 NULL, /* Modify PDP Context Request(Network to MS direction) */
10072 NULL, /* Modify PDP Context Accept (MS to network direction) */
10073 NULL, /* Modify PDP Context Request(MS to network direction) */
10074 NULL, /* Modify PDP Context Accept (Network to MS direction) */
10075 NULL, /* Modify PDP Context Reject */
10076 NULL, /* Activate Secondary PDP Context Request */
10077 NULL, /* Activate Secondary PDP Context Accept */
10078 NULL, /* Activate Secondary PDP Context Reject */
10079 NULL, /* Reserved: was allocated in earlier phases of the protocol */
10080 NULL, /* Reserved: was allocated in earlier phases of the protocol */
10081 NULL, /* Reserved: was allocated in earlier phases of the protocol */
10082 NULL, /* Reserved: was allocated in earlier phases of the protocol */
10083 NULL, /* Reserved: was allocated in earlier phases of the protocol */
10084 NULL, /* SM Status */
10088 #define NUM_GSM_DTAP_MSG_SS (sizeof(gsm_a_dtap_msg_ss_strings)/sizeof(value_string))
10089 static gint ett_gsm_dtap_msg_ss[NUM_GSM_DTAP_MSG_SS];
10090 static void (*dtap_msg_ss_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) = {
10091 dtap_cc_release_complete, /* Release Complete */
10092 dtap_cc_facility, /* Facility */
10093 dtap_ss_register, /* Register */
10097 #define NUM_GSM_RP_MSG (sizeof(gsm_rp_msg_strings)/sizeof(value_string))
10098 static gint ett_gsm_rp_msg[NUM_GSM_RP_MSG];
10099 static void (*rp_msg_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) = {
10100 rp_data_ms_n, /* RP-DATA (MS to Network) */
10101 rp_data_n_ms, /* RP-DATA (Network to MS */
10102 rp_ack_ms_n, /* RP-ACK (MS to Network) */
10103 rp_ack_n_ms, /* RP-ACK (Network to MS) */
10104 rp_error_ms_n, /* RP-ERROR (MS to Network) */
10105 rp_error_n_ms, /* RP-ERROR (Network to MS) */
10106 rp_smma, /* RP-SMMA (MS to Network) */
10110 /* GENERIC DISSECTOR FUNCTIONS */
10113 dissect_rp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
10116 guint32 offset, saved_offset;
10119 proto_item *rp_item = NULL;
10120 proto_tree *rp_tree = NULL;
10124 if (check_col(pinfo->cinfo, COL_INFO))
10126 col_append_str(pinfo->cinfo, COL_INFO, "(RP) ");
10130 * In the interest of speed, if "tree" is NULL, don't do any work
10131 * not necessary to generate protocol tree items.
10139 saved_offset = offset;
10144 len = tvb_length(tvb);
10147 * add RP message name
10149 oct = tvb_get_guint8(tvb, offset++);
10151 str = my_match_strval((guint32) oct, gsm_rp_msg_strings, &idx);
10154 * create the protocol tree
10159 proto_tree_add_protocol_format(tree, proto_a_rp, tvb, 0, len,
10160 "GSM A-I/F RP - Unknown RP Message Type (0x%02x)",
10163 rp_tree = proto_item_add_subtree(rp_item, ett_rp_msg);
10168 proto_tree_add_protocol_format(tree, proto_a_rp, tvb, 0, -1,
10169 "GSM A-I/F RP - %s",
10172 rp_tree = proto_item_add_subtree(rp_item, ett_gsm_rp_msg[idx]);
10174 if (check_col(pinfo->cinfo, COL_INFO))
10176 col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", str);
10181 * add RP message name
10183 proto_tree_add_uint_format(rp_tree, hf_gsm_a_rp_msg_type,
10184 tvb, saved_offset, 1, oct, "Message Type");
10186 if (str == NULL) return;
10188 if ((len - offset) <= 0) return;
10193 if (rp_msg_fcn[idx] == NULL)
10195 proto_tree_add_text(rp_tree,
10196 tvb, offset, len - offset,
10197 "Message Elements");
10201 (*rp_msg_fcn[idx])(tvb, rp_tree, offset, len - offset);
10207 dissect_bssmap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
10209 static gsm_a_tap_rec_t tap_rec[4];
10210 static gsm_a_tap_rec_t *tap_p;
10211 static int tap_current=0;
10213 guint32 offset, saved_offset;
10216 proto_item *bssmap_item = NULL;
10217 proto_tree *bssmap_tree = NULL;
10221 if (check_col(pinfo->cinfo, COL_INFO))
10223 col_append_str(pinfo->cinfo, COL_INFO, "(BSSMAP) ");
10227 * set tap record pointer
10230 if (tap_current == 4)
10234 tap_p = &tap_rec[tap_current];
10238 saved_offset = offset;
10243 len = tvb_length(tvb);
10246 * add BSSMAP message name
10248 oct = tvb_get_guint8(tvb, offset++);
10250 str = my_match_strval((guint32) oct, gsm_a_bssmap_msg_strings, &idx);
10253 * create the protocol tree
10258 proto_tree_add_protocol_format(tree, proto_a_bssmap, tvb, 0, len,
10259 "GSM A-I/F BSSMAP - Unknown BSSMAP Message Type (0x%02x)",
10262 bssmap_tree = proto_item_add_subtree(bssmap_item, ett_bssmap_msg);
10267 proto_tree_add_protocol_format(tree, proto_a_bssmap, tvb, 0, -1,
10268 "GSM A-I/F BSSMAP - %s",
10271 bssmap_tree = proto_item_add_subtree(bssmap_item, ett_gsm_bssmap_msg[idx]);
10273 if (check_col(pinfo->cinfo, COL_INFO))
10275 col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", str);
10280 * add BSSMAP message name
10282 proto_tree_add_uint_format(bssmap_tree, hf_gsm_a_bssmap_msg_type,
10283 tvb, saved_offset, 1, oct, "Message Type");
10285 tap_p->pdu_type = BSSAP_PDU_TYPE_BSSMAP;
10286 tap_p->message_type = oct;
10288 tap_queue_packet(gsm_a_tap, pinfo, tap_p);
10290 if (str == NULL) return;
10292 if ((len - offset) <= 0) return;
10297 if (bssmap_msg_fcn[idx] == NULL)
10299 proto_tree_add_text(bssmap_tree,
10300 tvb, offset, len - offset,
10301 "Message Elements");
10305 (*bssmap_msg_fcn[idx])(tvb, bssmap_tree, offset, len - offset);
10311 dissect_dtap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
10313 static gsm_a_tap_rec_t tap_rec[4];
10314 static gsm_a_tap_rec_t *tap_p;
10315 static int tap_current=0;
10316 void (*msg_fcn)(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len);
10321 guint32 oct_1, oct_2;
10323 proto_item *dtap_item = NULL;
10324 proto_tree *dtap_tree = NULL;
10325 proto_item *oct_1_item = NULL;
10326 proto_tree *pd_tree = NULL;
10335 len = tvb_length(tvb);
10340 * too short to be DTAP
10342 call_dissector(data_handle, tvb, pinfo, tree);
10346 if (check_col(pinfo->cinfo, COL_INFO))
10348 col_append_str(pinfo->cinfo, COL_INFO, "(DTAP) ");
10352 * set tap record pointer
10355 if (tap_current == 4)
10359 tap_p = &tap_rec[tap_current];
10369 * get protocol discriminator
10371 oct_1 = tvb_get_guint8(tvb, offset++);
10373 if ((((oct_1 & DTAP_TI_MASK) >> 4) & DTAP_TIE_PRES_MASK) == DTAP_TIE_PRES_MASK)
10376 * eventhough we don't know if a TI should be in the message yet
10377 * we rely on the TI/SKIP indicator to be 0 to avoid taking this
10380 oct_2 = tvb_get_guint8(tvb, offset++);
10383 oct = tvb_get_guint8(tvb, offset);
10385 pd = oct_1 & DTAP_PD_MASK;
10399 str = gsm_a_pd_str[pd];
10400 msg_str = my_match_strval((guint32) (oct & DTAP_CC_IEI_MASK), gsm_a_dtap_msg_cc_strings, &idx);
10401 ett_tree = ett_gsm_dtap_msg_cc[idx];
10402 hf_idx = hf_gsm_a_dtap_msg_cc_type;
10403 msg_fcn = dtap_msg_cc_fcn[idx];
10404 ti = (oct_1 & DTAP_TI_MASK) >> 4;
10409 str = gsm_a_pd_str[pd];
10410 msg_str = my_match_strval((guint32) (oct & DTAP_MM_IEI_MASK), gsm_a_dtap_msg_mm_strings, &idx);
10411 ett_tree = ett_gsm_dtap_msg_mm[idx];
10412 hf_idx = hf_gsm_a_dtap_msg_mm_type;
10413 msg_fcn = dtap_msg_mm_fcn[idx];
10418 str = gsm_a_pd_str[pd];
10419 msg_str = my_match_strval((guint32) (oct & DTAP_RR_IEI_MASK), gsm_a_dtap_msg_rr_strings, &idx);
10420 ett_tree = ett_gsm_dtap_msg_rr[idx];
10421 hf_idx = hf_gsm_a_dtap_msg_rr_type;
10422 msg_fcn = dtap_msg_rr_fcn[idx];
10426 str = gsm_a_pd_str[pd];
10427 msg_str = my_match_strval((guint32) (oct & DTAP_GMM_IEI_MASK), gsm_a_dtap_msg_gmm_strings, &idx);
10428 ett_tree = ett_gsm_dtap_msg_gmm[idx];
10429 hf_idx = hf_gsm_a_dtap_msg_gmm_type;
10430 msg_fcn = dtap_msg_gmm_fcn[idx];
10434 str = gsm_a_pd_str[pd];
10435 msg_str = my_match_strval((guint32) (oct & DTAP_SMS_IEI_MASK), gsm_a_dtap_msg_sms_strings, &idx);
10436 ett_tree = ett_gsm_dtap_msg_sms[idx];
10437 hf_idx = hf_gsm_a_dtap_msg_sms_type;
10438 msg_fcn = dtap_msg_sms_fcn[idx];
10439 ti = (oct_1 & DTAP_TI_MASK) >> 4;
10443 str = gsm_a_pd_str[pd];
10444 msg_str = my_match_strval((guint32) (oct & DTAP_SM_IEI_MASK), gsm_a_dtap_msg_sm_strings, &idx);
10445 ett_tree = ett_gsm_dtap_msg_sm[idx];
10446 hf_idx = hf_gsm_a_dtap_msg_sm_type;
10447 msg_fcn = dtap_msg_sm_fcn[idx];
10448 ti = (oct_1 & DTAP_TI_MASK) >> 4;
10452 str = gsm_a_pd_str[pd];
10453 msg_str = my_match_strval((guint32) (oct & DTAP_SS_IEI_MASK), gsm_a_dtap_msg_ss_strings, &idx);
10454 ett_tree = ett_gsm_dtap_msg_ss[idx];
10455 hf_idx = hf_gsm_a_dtap_msg_ss_type;
10456 msg_fcn = dtap_msg_ss_fcn[idx];
10457 ti = (oct_1 & DTAP_TI_MASK) >> 4;
10462 str = gsm_a_pd_str[pd];
10467 * create the protocol tree
10469 if (msg_str == NULL)
10472 proto_tree_add_protocol_format(tree, proto_a_dtap, tvb, 0, len,
10473 "GSM A-I/F DTAP - Unknown DTAP Message Type (0x%02x)",
10476 dtap_tree = proto_item_add_subtree(dtap_item, ett_dtap_msg);
10481 proto_tree_add_protocol_format(tree, proto_a_dtap, tvb, 0, -1,
10482 "GSM A-I/F DTAP - %s",
10485 dtap_tree = proto_item_add_subtree(dtap_item, ett_tree);
10487 if (check_col(pinfo->cinfo, COL_INFO))
10489 col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", msg_str);
10494 proto_tree_add_text(dtap_tree,
10496 "Protocol Discriminator: %s",
10499 pd_tree = proto_item_add_subtree(oct_1_item, ett_dtap_oct_1);
10503 other_decode_bitfield_value(a_bigbuf, oct_1, 0xf0, 8);
10504 proto_tree_add_text(pd_tree,
10506 "%s : Skip Indicator",
10511 other_decode_bitfield_value(a_bigbuf, oct_1, 0x80, 8);
10512 proto_tree_add_text(pd_tree,
10514 "%s : TI flag: %s",
10516 ((oct_1 & 0x80) ? "allocated by receiver" : "allocated by sender"));
10518 if ((ti & DTAP_TIE_PRES_MASK) == DTAP_TIE_PRES_MASK)
10520 /* ti is extended to next octet */
10522 other_decode_bitfield_value(a_bigbuf, oct_1, 0x70, 8);
10523 proto_tree_add_text(pd_tree,
10525 "%s : TIO: The TI value is given by the TIE in octet 2",
10530 other_decode_bitfield_value(a_bigbuf, oct_1, 0x70, 8);
10531 proto_tree_add_text(pd_tree,
10535 ti & DTAP_TIE_PRES_MASK);
10539 other_decode_bitfield_value(a_bigbuf, oct_1, DTAP_PD_MASK, 8);
10540 proto_tree_add_text(pd_tree,
10542 "%s : Protocol Discriminator: %u",
10547 (ti & DTAP_TIE_PRES_MASK) == DTAP_TIE_PRES_MASK)
10549 other_decode_bitfield_value(a_bigbuf, oct_2, 0x80, 8);
10550 proto_tree_add_text(pd_tree,
10555 other_decode_bitfield_value(a_bigbuf, oct_2, DTAP_TIE_MASK, 8);
10556 proto_tree_add_text(pd_tree,
10560 oct_2 & DTAP_TIE_MASK);
10566 if ((pinfo->p2p_dir == P2P_DIR_RECV) &&
10573 * add DTAP message name
10575 proto_tree_add_uint_format(dtap_tree, hf_idx,
10576 tvb, offset, 1, oct,
10581 tap_p->pdu_type = BSSAP_PDU_TYPE_DTAP;
10582 tap_p->message_type = (nsd ? (oct & 0x3f) : oct);
10583 tap_p->protocol_disc = pd;
10585 tap_queue_packet(gsm_a_tap, pinfo, tap_p);
10587 if (msg_str == NULL) return;
10589 if ((len - offset) <= 0) return;
10594 if (msg_fcn == NULL)
10596 proto_tree_add_text(dtap_tree,
10597 tvb, offset, len - offset,
10598 "Message Elements");
10602 (*msg_fcn)(tvb, dtap_tree, offset, len - offset);
10607 /* Register the protocol with Ethereal */
10609 proto_register_gsm_a(void)
10614 /* Setup list of header fields */
10616 static hf_register_info hf[] =
10618 { &hf_gsm_a_bssmap_msg_type,
10619 { "BSSMAP Message Type", "gsm_a.bssmap_msgtype",
10620 FT_UINT8, BASE_HEX, VALS(gsm_a_bssmap_msg_strings), 0x0,
10623 { &hf_gsm_a_dtap_msg_mm_type,
10624 { "DTAP Mobility Management Message Type", "gsm_a.dtap_msg_mm_type",
10625 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_msg_mm_strings), 0x0,
10628 { &hf_gsm_a_dtap_msg_rr_type,
10629 { "DTAP Radio Resources Management Message Type", "gsm_a.dtap_msg_rr_type",
10630 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_msg_rr_strings), 0x0,
10633 { &hf_gsm_a_dtap_msg_cc_type,
10634 { "DTAP Call Control Message Type", "gsm_a.dtap_msg_cc_type",
10635 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_msg_cc_strings), 0x0,
10638 { &hf_gsm_a_dtap_msg_gmm_type,
10639 { "DTAP GPRS Mobility Management Message Type", "gsm_a.dtap_msg_gmm_type",
10640 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_msg_gmm_strings), 0x0,
10643 { &hf_gsm_a_dtap_msg_sms_type,
10644 { "DTAP Short Message Service Message Type", "gsm_a.dtap_msg_sms_type",
10645 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_msg_sms_strings), 0x0,
10648 { &hf_gsm_a_dtap_msg_sm_type,
10649 { "DTAP GPRS Session Management Message Type", "gsm_a.dtap_msg_sm_type",
10650 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_msg_sm_strings), 0x0,
10653 { &hf_gsm_a_dtap_msg_ss_type,
10654 { "DTAP Non call Supplementary Service Message Type", "gsm_a.dtap_msg_ss_type",
10655 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_msg_ss_strings), 0x0,
10658 { &hf_gsm_a_rp_msg_type,
10659 { "RP Message Type", "gsm_a.rp_msg_type",
10660 FT_UINT8, BASE_HEX, VALS(gsm_rp_msg_strings), 0x0,
10663 { &hf_gsm_a_bssmap_elem_id,
10664 { "Element ID", "gsm_a_bssmap.elem_id",
10665 FT_UINT8, BASE_DEC, NULL, 0,
10668 { &hf_gsm_a_dtap_elem_id,
10669 { "Element ID", "gsm_a_dtap.elem_id",
10670 FT_UINT8, BASE_DEC, NULL, 0,
10673 { &hf_gsm_a_length,
10674 { "Length", "gsm_a.len",
10675 FT_UINT8, BASE_DEC, NULL, 0,
10679 { "Sub tree", "gsm_a.none",
10684 { "IMSI", "gsm_a.imsi",
10685 FT_STRING, BASE_DEC, 0, 0,
10689 { "TMSI/P-TMSI", "gsm_a.tmsi",
10690 FT_UINT32, BASE_HEX, 0, 0x0,
10694 { "IMEI", "gsm_a.imei",
10695 FT_STRING, BASE_DEC, 0, 0,
10698 { &hf_gsm_a_imeisv,
10699 { "IMEISV", "gsm_a.imeisv",
10700 FT_STRING, BASE_DEC, 0, 0,
10703 { &hf_gsm_a_cld_party_bcd_num,
10704 { "Called Party BCD Number", "gsm_a.cld_party_bcd_num",
10705 FT_STRING, BASE_DEC, 0, 0,
10708 { &hf_gsm_a_clg_party_bcd_num,
10709 { "Calling Party BCD Number", "gsm_a.clg_party_bcd_num",
10710 FT_STRING, BASE_DEC, 0, 0,
10713 { &hf_gsm_a_cell_ci,
10714 { "Cell CI", "gsm_a.cell_ci",
10715 FT_UINT16, BASE_HEX, 0, 0x0,
10718 { &hf_gsm_a_cell_lac,
10719 { "Cell LAC", "gsm_a.cell_lac",
10720 FT_UINT16, BASE_HEX, 0, 0x0,
10723 { &hf_gsm_a_dlci_cc,
10724 { "Control Channel", "bssap.dlci.cc",
10725 FT_UINT8, BASE_HEX, VALS(bssap_cc_values), 0xc0,
10727 { &hf_gsm_a_dlci_spare,
10728 { "Spare", "bssap.dlci.spare",
10729 FT_UINT8, BASE_HEX, NULL, 0x38,
10731 { &hf_gsm_a_dlci_sapi,
10732 { "SAPI", "bssap.dlci.sapi",
10733 FT_UINT8, BASE_HEX, VALS(bssap_sapi_values), 0x07,
10737 /* Setup protocol subtree array */
10738 #define NUM_INDIVIDUAL_ELEMS 24
10739 static gint *ett[NUM_INDIVIDUAL_ELEMS + NUM_GSM_BSSMAP_MSG +
10740 NUM_GSM_DTAP_MSG_MM + NUM_GSM_DTAP_MSG_RR + NUM_GSM_DTAP_MSG_CC +
10741 NUM_GSM_DTAP_MSG_GMM + NUM_GSM_DTAP_MSG_SMS +
10742 NUM_GSM_DTAP_MSG_SM + NUM_GSM_DTAP_MSG_SS + NUM_GSM_RP_MSG +
10743 NUM_GSM_BSSMAP_ELEM + NUM_GSM_DTAP_ELEM];
10745 memset((void *) ett, -1, sizeof(ett));
10747 ett[0] = &ett_bssmap_msg;
10748 ett[1] = &ett_dtap_msg;
10749 ett[2] = &ett_rp_msg;
10750 ett[3] = &ett_elems;
10751 ett[4] = &ett_elem;
10752 ett[5] = &ett_dtap_oct_1;
10753 ett[6] = &ett_cm_srvc_type;
10754 ett[7] = &ett_gsm_enc_info;
10755 ett[8] = &ett_cell_list;
10756 ett[9] = &ett_dlci;
10757 ett[10] = &ett_bc_oct_3a;
10758 ett[11] = &ett_bc_oct_4;
10759 ett[12] = &ett_bc_oct_5;
10760 ett[13] = &ett_bc_oct_5a;
10761 ett[14] = &ett_bc_oct_5b;
10762 ett[15] = &ett_bc_oct_6;
10763 ett[16] = &ett_bc_oct_6a;
10764 ett[17] = &ett_bc_oct_6b;
10765 ett[18] = &ett_bc_oct_6c;
10766 ett[19] = &ett_bc_oct_6d;
10767 ett[20] = &ett_bc_oct_6e;
10768 ett[21] = &ett_bc_oct_6f;
10769 ett[22] = &ett_bc_oct_6g;
10770 ett[23] = &ett_bc_oct_7;
10772 last_offset = NUM_INDIVIDUAL_ELEMS;
10774 for (i=0; i < NUM_GSM_BSSMAP_MSG; i++, last_offset++)
10776 ett[last_offset] = &ett_gsm_bssmap_msg[i];
10779 for (i=0; i < NUM_GSM_DTAP_MSG_MM; i++, last_offset++)
10781 ett[last_offset] = &ett_gsm_dtap_msg_mm[i];
10784 for (i=0; i < NUM_GSM_DTAP_MSG_RR; i++, last_offset++)
10786 ett[last_offset] = &ett_gsm_dtap_msg_rr[i];
10789 for (i=0; i < NUM_GSM_DTAP_MSG_CC; i++, last_offset++)
10791 ett[last_offset] = &ett_gsm_dtap_msg_cc[i];
10794 for (i=0; i < NUM_GSM_DTAP_MSG_GMM; i++, last_offset++)
10796 ett[last_offset] = &ett_gsm_dtap_msg_gmm[i];
10799 for (i=0; i < NUM_GSM_DTAP_MSG_SMS; i++, last_offset++)
10801 ett[last_offset] = &ett_gsm_dtap_msg_sms[i];
10804 for (i=0; i < NUM_GSM_DTAP_MSG_SM; i++, last_offset++)
10806 ett[last_offset] = &ett_gsm_dtap_msg_sm[i];
10809 for (i=0; i < NUM_GSM_DTAP_MSG_SS; i++, last_offset++)
10811 ett[last_offset] = &ett_gsm_dtap_msg_ss[i];
10814 for (i=0; i < NUM_GSM_RP_MSG; i++, last_offset++)
10816 ett[last_offset] = &ett_gsm_rp_msg[i];
10819 for (i=0; i < NUM_GSM_BSSMAP_ELEM; i++, last_offset++)
10821 ett[last_offset] = &ett_gsm_bssmap_elem[i];
10824 for (i=0; i < NUM_GSM_DTAP_ELEM; i++, last_offset++)
10826 ett[last_offset] = &ett_gsm_dtap_elem[i];
10829 /* Register the protocol name and description */
10832 proto_register_protocol("GSM A-I/F BSSMAP", "GSM BSSMAP", "gsm_a_bssmap");
10834 proto_register_field_array(proto_a_bssmap, hf, array_length(hf));
10837 proto_register_protocol("GSM A-I/F DTAP", "GSM DTAP", "gsm_a_dtap");
10840 proto_register_protocol("GSM A-I/F RP", "GSM RP", "gsm_a_rp");
10842 sms_dissector_table =
10843 register_dissector_table("gsm_a.sms_tpdu", "GSM SMS TPDU",
10844 FT_UINT8, BASE_DEC);
10846 proto_register_subtree_array(ett, array_length(ett));
10848 gsm_a_tap = register_tap("gsm_a");
10853 proto_reg_handoff_gsm_a(void)
10856 bssmap_handle = create_dissector_handle(dissect_bssmap, proto_a_bssmap);
10857 dtap_handle = create_dissector_handle(dissect_dtap, proto_a_dtap);
10858 rp_handle = create_dissector_handle(dissect_rp, proto_a_rp);
10860 dissector_add("bssap.pdu_type", BSSAP_PDU_TYPE_BSSMAP, bssmap_handle);
10861 dissector_add("bssap.pdu_type", BSSAP_PDU_TYPE_DTAP, dtap_handle);
10862 dissector_add("ranap.nas_pdu", BSSAP_PDU_TYPE_DTAP, dtap_handle);
10864 data_handle = find_dissector("data");