2 * Routines for GSM A Interface DTAP dissection - A.K.A. GSM layer 3
3 * NOTE: it actually includes RR messages, which are (generally) not carried
4 * over the A interface on DTAP, but are part of the same Layer 3 protocol set
6 * Copyright 2003, Michael Lum <mlum [AT] telostech.com>
7 * In association with Telos Technology Inc.
10 * Added the GPRS Mobility Managment Protocol and
11 * the GPRS Session Managment Protocol
12 * Copyright 2004, Rene Pilz <rene.pilz [AT] ftw.com>
13 * In association with Telecommunications Research Center
14 * Vienna (ftw.)Betriebs-GmbH within the Project Metawin.
16 * Added Dissection of Radio Resource Management Information Elements
17 * and othere enhancements and fixes.
18 * Copyright 2005 - 2006, Anders Broman [AT] ericsson.com
19 * Small bugfixes, mainly in Qos and TFT by Nils Ljungberg and Stefan Boman [AT] ericsson.com
24 * Mobile radio interface Layer 3 specification;
25 * Core network protocols;
27 * (3GPP TS 24.008 version 4.7.0 Release 4)
28 * (ETSI TS 124 008 V6.8.0 (2005-03))
31 * Mobile radio interface layer 3 specification;
32 * Radio Resource Control Protocol
33 * (GSM 04.18 version 8.4.1 Release 1999)
34 * (3GPP TS 04.18 version 8.26.0 Release 1999)
37 * Point-to-Point (PP) Short Message Service (SMS)
38 * support on mobile radio interface
39 * (3GPP TS 24.011 version 4.1.1 Release 4)
42 * Mobile radio Layer 3 supplementary service specification;
44 * (3GPP TS 24.080 version 4.3.0 Release 4)
47 * Mobile radio interface Layer 3 specification;
48 * Core network protocols;
50 * (3GPP TS 24.008 version 5.9.0 Release 5)
53 * Mobile radio interface Layer 3 specification;
54 * Core network protocols;
56 * (3GPP TS 24.008 version 6.7.0 Release 6)
57 * (3GPP TS 24.008 version 6.8.0 Release 6)
61 * Wireshark - Network traffic analyzer
62 * By Gerald Combs <gerald@wireshark.org>
63 * Copyright 1998 Gerald Combs
65 * This program is free software; you can redistribute it and/or
66 * modify it under the terms of the GNU General Public License
67 * as published by the Free Software Foundation; either version 2
68 * of the License, or (at your option) any later version.
70 * This program is distributed in the hope that it will be useful,
71 * but WITHOUT ANY WARRANTY; without even the implied warranty of
72 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
73 * GNU General Public License for more details.
75 * You should have received a copy of the GNU General Public License
76 * along with this program; if not, write to the Free Software
77 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
89 #include <epan/packet.h>
90 #include <epan/prefs.h>
92 #include <epan/emem.h>
93 #include <epan/asn1.h>
95 #include "packet-bssap.h"
96 #include "packet-sccp.h"
97 #include "packet-ber.h"
98 #include "packet-q931.h"
99 #include "packet-gsm_a_common.h"
100 #include "packet-ipv6.h"
101 #include "packet-e212.h"
102 #include "packet-ppp.h"
104 /* PROTOTYPES/FORWARDS */
106 const value_string gsm_a_dtap_msg_mm_strings[] = {
107 { 0x01, "IMSI Detach Indication" },
108 { 0x02, "Location Updating Accept" },
109 { 0x04, "Location Updating Reject" },
110 { 0x08, "Location Updating Request" },
111 { 0x11, "Authentication Reject" },
112 { 0x12, "Authentication Request" },
113 { 0x14, "Authentication Response" },
114 { 0x1c, "Authentication Failure" },
115 { 0x18, "Identity Request" },
116 { 0x19, "Identity Response" },
117 { 0x1a, "TMSI Reallocation Command" },
118 { 0x1b, "TMSI Reallocation Complete" },
119 { 0x21, "CM Service Accept" },
120 { 0x22, "CM Service Reject" },
121 { 0x23, "CM Service Abort" },
122 { 0x24, "CM Service Request" },
123 { 0x25, "CM Service Prompt" },
124 { 0x26, "Reserved: was allocated in earlier phases of the protocol" },
125 { 0x28, "CM Re-establishment Request" },
128 { 0x31, "MM Status" },
129 { 0x32, "MM Information" },
133 const value_string gsm_a_dtap_msg_cc_strings[] = {
134 { 0x01, "Alerting" },
135 { 0x08, "Call Confirmed" },
136 { 0x02, "Call Proceeding" },
138 { 0x0f, "Connect Acknowledge" },
139 { 0x0e, "Emergency Setup" },
140 { 0x03, "Progress" },
141 { 0x04, "CC-Establishment" },
142 { 0x06, "CC-Establishment Confirmed" },
144 { 0x09, "Start CC" },
147 { 0x1f, "Modify Complete" },
148 { 0x13, "Modify Reject" },
149 { 0x10, "User Information" },
151 { 0x19, "Hold Acknowledge" },
152 { 0x1a, "Hold Reject" },
153 { 0x1c, "Retrieve" },
154 { 0x1d, "Retrieve Acknowledge" },
155 { 0x1e, "Retrieve Reject" },
156 { 0x25, "Disconnect" },
158 { 0x2a, "Release Complete" },
159 { 0x39, "Congestion Control" },
162 { 0x34, "Status Enquiry" },
163 { 0x35, "Start DTMF" },
164 { 0x31, "Stop DTMF" },
165 { 0x32, "Stop DTMF Acknowledge" },
166 { 0x36, "Start DTMF Acknowledge" },
167 { 0x37, "Start DTMF Reject" },
168 { 0x3a, "Facility" },
172 const value_string gsm_a_dtap_msg_sms_strings[] = {
175 { 0x10, "CP-ERROR" },
179 const value_string gsm_a_dtap_msg_ss_strings[] = {
180 { 0x2a, "Release Complete" },
181 { 0x3a, "Facility" },
182 { 0x3b, "Register" },
186 const value_string gsm_a_dtap_msg_tp_strings[] = {
187 { 0x00, "Close TCH Loop Cmd" },
188 { 0x01, "Close TCH Loop Ack" },
189 { 0x06, "Open Loop Cmd" },
190 { 0x0c, "Act EMMI Cmd" },
191 { 0x0d, "Act EMMI Ack" },
192 { 0x10, "Deact EMMI" },
193 { 0x14, "Test Interface" },
194 { 0x20, "Close Multi-slot Loop Cmd" },
195 { 0x21, "Close Multi-slot Loop Ack" },
196 { 0x22, "Open Multi-slot Loop Cmd" },
197 { 0x23, "Open Multi-slot Loop Ack" },
198 { 0x24, "GPRS Test Mode Cmd" },
199 { 0x25, "EGPRS Start Radio Block Loopback Cmd" },
200 { 0x40, "Close UE Test Loop" },
201 { 0x41, "Close UE Test Loop Complete" },
202 { 0x42, "Open UE Test Loop" },
203 { 0x43, "Open UE Test Loop Complete" },
204 { 0x44, "Activate RB Test Mode" },
205 { 0x45, "Activate RB Test Mode Complete" },
206 { 0x46, "Deactivate RB Test Mode" },
207 { 0x47, "Deactivate RB Test Mode Complete" },
208 { 0x48, "Reset UE Positioning Stored Information" },
209 { 0x49, "UE Test Loop Mode 3 RLC SDU Counter Request" },
210 { 0x4A, "UE Test Loop Mode 3 RLC SDU Counter Response" },
214 const value_string gsm_dtap_elem_strings[] = {
215 /* Mobility Management Information Elements 10.5.3 */
216 { 0x00, "Authentication Parameter RAND" },
217 { 0x00, "Authentication Parameter AUTN (UMTS authentication challenge only)" },
218 { 0x00, "Authentication Response Parameter" },
219 { 0x00, "Authentication Response Parameter (extension) (UMTS authentication challenge only)" },
220 { 0x00, "Authentication Failure Parameter (UMTS authentication challenge only)" },
221 { 0x00, "CM Service Type" },
222 { 0x00, "Identity Type" },
223 { 0x00, "Location Updating Type" },
224 { 0x00, "Network Name" },
225 { 0x00, "Reject Cause" },
226 { 0x00, "Follow-on Proceed" },
227 { 0x00, "Time Zone" },
228 { 0x00, "Time Zone and Time" },
229 { 0x00, "CTS Permission" },
230 { 0x00, "LSA Identifier" },
231 { 0x00, "Daylight Saving Time" },
232 { 0x00, "Emergency Number List" },
233 /* Call Control Information Elements 10.5.4 */
234 { 0x00, "Auxiliary States" }, /* 10.5.4.4 Auxiliary states */
235 { 0x00, "Bearer Capability" }, /* 10.5.4.4a Backup bearer capability */
236 { 0x00, "Call Control Capabilities" },
237 { 0x00, "Call State" },
238 { 0x00, "Called Party BCD Number" },
239 { 0x00, "Called Party Subaddress" },
240 { 0x00, "Calling Party BCD Number" },
241 { 0x00, "Calling Party Subaddress" },
243 { 0x00, "CLIR Suppression" },
244 { 0x00, "CLIR Invocation" },
245 { 0x00, "Congestion Level" },
246 { 0x00, "Connected Number" },
247 { 0x00, "Connected Subaddress" },
248 { 0x00, "Facility" },
249 { 0x00, "High Layer Compatibility" },
250 { 0x00, "Keypad Facility" },
251 { 0x00, "Low Layer Compatibility" },
252 { 0x00, "More Data" },
253 { 0x00, "Notification Indicator" },
254 { 0x00, "Progress Indicator" },
255 { 0x00, "Recall type $(CCBS)$" },
256 { 0x00, "Redirecting Party BCD Number" },
257 { 0x00, "Redirecting Party Subaddress" },
258 { 0x00, "Repeat Indicator" },
259 { 0x00, "Reverse Call Setup Direction" },
260 { 0x00, "SETUP Container $(CCBS)$" },
262 { 0x00, "SS Version Indicator" },
263 { 0x00, "User-user" },
264 { 0x00, "Alerting Pattern $(NIA)$" }, /* 10.5.4.26 Alerting Pattern $(NIA)$ */
265 { 0x00, "Allowed Actions $(CCBS)$" },
266 { 0x00, "Stream Identifier" },
267 { 0x00, "Network Call Control Capabilities" },
268 { 0x00, "Cause of No CLI" },
269 { 0x00, "Immediate Modification Indicator" }, /* 10.5.4.30 Cause of No CLI */
271 { 0x00, "Supported Codec List" }, /* 10.5.4.32 Supported codec list */
272 { 0x00, "Service Category" }, /* 10.5.4.33 Service category */
273 /* 10.5.4.34 Redial */
274 /* 10.5.4.35 Network-initiated Service Upgrade indicator */
275 /* Short Message Service Information Elements [5] 8.1.4 */
276 { 0x00, "CP-User Data" },
277 { 0x00, "CP-Cause" },
278 /* Short Message Service Information Elements [5] 8.2 */
279 { 0x00, "RP-Message Reference" },
280 { 0x00, "RP-Origination Address" },
281 { 0x00, "RP-Destination Address" },
282 { 0x00, "RP-User Data" },
283 { 0x00, "RP-Cause" },
284 /* Tests procedures information elements 3GPP TS 44.014 6.4.0 and 3GPP TS 34.109 6.4.0 */
285 { 0x00, "Close TCH Loop Cmd Sub-channel"},
286 { 0x00, "Open Loop Cmd Ack"},
287 { 0x00, "Close Multi-slot Loop Cmd Loop type"},
288 { 0x00, "Close Multi-slot Loop Ack Result"},
289 { 0x00, "Test Interface Tested device"},
290 { 0x00, "GPRS Test Mode Cmd PDU description"},
291 { 0x00, "GPRS Test Mode Cmd Mode flag"},
292 { 0x00, "EGPRS Start Radio Block Loopback Cmd Mode flag"},
293 { 0x00, "Close UE Test Loop Mode"},
294 { 0x00, "UE Positioning Technology"},
295 { 0x00, "RLC SDU Counter Value"},
299 const gchar *gsm_a_pd_str[] = {
300 "Group Call Control",
301 "Broadcast Call Control",
302 "Reserved: was allocated in earlier phases of the protocol",
303 "Call Control; call related SS messages",
304 "GPRS Transparent Transport Protocol (GTTP)",
305 "Mobility Management messages",
306 "Radio Resources Management messages",
308 "GPRS Mobility Management messages",
310 "GPRS Session Management messages",
311 "Non call related SS messages",
314 "Reserved for extension of the PD to one octet length",
315 "Special conformance testing functions"
317 /* L3 Protocol discriminator values according to TS 24 007 (6.4.0) */
318 const value_string protocol_discriminator_vals[] = {
319 {0x0, "Group call control"},
320 {0x1, "Broadcast call control"},
321 {0x2, "Reserved: was allocated in earlier phases of the protocol"},
322 {0x3, "Call Control; call related SS messages"},
323 {0x4, "GPRS Transparent Transport Protocol (GTTP)"},
324 {0x5, "Mobility Management messages"},
325 {0x6, "Radio Resources Management messages"},
327 {0x8, "GPRS mobility management messages"},
328 {0x9, "SMS messages"},
329 {0xa, "GPRS session management messages"},
330 {0xb, "Non call related SS messages"},
331 {0xc, "Location services specified in 3GPP TS 44.071 [8a]"},
333 {0xe, "Reserved for extension of the PD to one octet length "},
334 {0xf, "Special conformance testing functions"},
338 const value_string gsm_a_pd_short_str_vals[] = {
339 {0x0, "GCC"}, /* Group Call Control */
340 {0x1, "BCC"}, /* Broadcast Call Control */
341 {0x2, "Reserved"}, /* : was allocated in earlier phases of the protocol */
342 {0x3, "CC"}, /* Call Control; call related SS messages */
343 {0x4, "GTTP"}, /* GPRS Transparent Transport Protocol (GTTP) */
344 {0x5, "MM"}, /* Mobility Management messages */
345 {0x6, "RR"}, /* Radio Resources Management messages */
347 {0x8, "GMM"}, /* GPRS Mobility Management messages */
349 {0xa, "SM"}, /* GPRS Session Management messages */
351 {0xc, "LS"}, /* Location Services */
353 {0xe, "Reserved"}, /* for extension of the PD to one octet length */
354 {0xf, "TP"}, /* for tests procedures described in 3GPP TS 44.014 6.4.0 and 3GPP TS 34.109 6.4.0.*/
359 #define DTAP_PD_MASK 0x0f
360 #define DTAP_SKIP_MASK 0xf0
361 #define DTAP_TI_MASK DTAP_SKIP_MASK
362 #define DTAP_TIE_PRES_MASK 0x07 /* after TI shifted to right */
363 #define DTAP_TIE_MASK 0x7f
365 #define DTAP_MM_IEI_MASK 0x3f
366 #define DTAP_CC_IEI_MASK 0x3f
367 #define DTAP_SMS_IEI_MASK 0xff
368 #define DTAP_SS_IEI_MASK 0x3f
369 #define DTAP_TP_IEI_MASK 0xff
371 /* Initialize the protocol and registered fields */
372 static int proto_a_dtap = -1;
374 static int hf_gsm_a_dtap_msg_mm_type = -1;
375 static int hf_gsm_a_dtap_msg_cc_type = -1;
376 static int hf_gsm_a_seq_no = -1;
377 static int hf_gsm_a_dtap_msg_sms_type = -1;
378 static int hf_gsm_a_dtap_msg_ss_type = -1;
379 static int hf_gsm_a_dtap_msg_tp_type = -1;
380 int hf_gsm_a_dtap_elem_id = -1;
381 static int hf_gsm_a_cld_party_bcd_num = -1;
382 static int hf_gsm_a_clg_party_bcd_num = -1;
383 static int hf_gsm_a_dtap_cause = -1;
385 int hf_gsm_a_extension = -1;
386 static int hf_gsm_a_type_of_number = -1;
387 static int hf_gsm_a_numbering_plan_id = -1;
389 static int hf_gsm_a_lsa_id = -1;
391 /* Initialize the subtree pointers */
392 static gint ett_dtap_msg = -1;
393 static gint ett_dtap_oct_1 = -1;
394 static gint ett_cm_srvc_type = -1;
395 static gint ett_gsm_enc_info = -1;
396 static gint ett_bc_oct_3a = -1;
397 static gint ett_bc_oct_4 = -1;
398 static gint ett_bc_oct_5 = -1;
399 static gint ett_bc_oct_5a = -1;
400 static gint ett_bc_oct_5b = -1;
401 static gint ett_bc_oct_6 = -1;
402 static gint ett_bc_oct_6a = -1;
403 static gint ett_bc_oct_6b = -1;
404 static gint ett_bc_oct_6c = -1;
405 static gint ett_bc_oct_6d = -1;
406 static gint ett_bc_oct_6e = -1;
407 static gint ett_bc_oct_6f = -1;
408 static gint ett_bc_oct_6g = -1;
409 static gint ett_bc_oct_7 = -1;
411 static char a_bigbuf[1024];
413 static dissector_handle_t data_handle;
414 static dissector_handle_t gsm_map_handle;
415 static dissector_handle_t rp_handle;
417 packet_info *gsm_a_dtap_pinfo;
418 static proto_tree *g_tree;
421 * this should be set on a per message basis, if possible
423 static gint is_uplink;
425 #define NUM_GSM_DTAP_ELEM (sizeof(gsm_dtap_elem_strings)/sizeof(value_string))
426 gint ett_gsm_dtap_elem[NUM_GSM_DTAP_ELEM];
428 static dgt_set_t Dgt_mbcd = {
430 /* 0 1 2 3 4 5 6 7 8 9 a b c d e */
431 '0','1','2','3','4','5','6','7','8','9','*','#','a','b','c'
439 de_auth_param_rand(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
444 curr_offset = offset;
447 * 16 octets == 128 bits
449 #define AUTH_PARAM_RAND_LEN 16
451 proto_tree_add_text(tree,
452 tvb, curr_offset, AUTH_PARAM_RAND_LEN,
454 tvb_bytes_to_str(tvb, curr_offset, AUTH_PARAM_RAND_LEN));
456 curr_offset += AUTH_PARAM_RAND_LEN;
458 /* no length check possible */
460 return(curr_offset - offset);
467 de_auth_param_autn(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
471 curr_offset = offset;
473 proto_tree_add_text(tree,
474 tvb, curr_offset, len,
476 tvb_bytes_to_str(tvb, curr_offset, len));
480 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
482 return(curr_offset - offset);
489 de_auth_resp_param(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
494 curr_offset = offset;
497 * 4 octets == 32 bits
499 #define AUTH_PARAM_SRES_LEN 4
501 proto_tree_add_text(tree,
502 tvb, curr_offset, AUTH_PARAM_SRES_LEN,
504 tvb_bytes_to_str(tvb, curr_offset, AUTH_PARAM_SRES_LEN));
506 curr_offset += AUTH_PARAM_SRES_LEN;
508 /* no length check possible */
510 return(curr_offset - offset);
517 de_auth_resp_param_ext(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
521 curr_offset = offset;
523 proto_tree_add_text(tree,
524 tvb, curr_offset, len,
526 tvb_bytes_to_str(tvb, curr_offset, len));
530 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
532 return(curr_offset - offset);
539 de_auth_fail_param(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
543 curr_offset = offset;
545 proto_tree_add_text(tree,
546 tvb, curr_offset, len,
548 tvb_bytes_to_str(tvb, curr_offset, len));
552 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
554 return(curr_offset - offset);
561 de_network_name(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
567 curr_offset = offset;
569 oct = tvb_get_guint8(tvb, curr_offset);
571 proto_tree_add_item(tree, hf_gsm_a_extension, tvb, curr_offset, 1, FALSE);
573 switch ((oct & 0x70) >> 4)
575 case 0x00: str = "Cell Broadcast data coding scheme, GSM default alphabet, language unspecified, defined in 3GPP TS 03.38"; break;
576 case 0x01: str = "UCS2 (16 bit)"; break;
582 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
583 proto_tree_add_text(tree,
585 "%s : Coding Scheme: %s",
589 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
590 proto_tree_add_text(tree,
592 "%s : Add CI: The MS should %s",
595 "add the letters for the Country's Initials and a separator (e.g. a space) to the text string" :
596 "The MS should not add the letters for the Country's Initials to the text string");
600 case 1: str = "bit 8 is spare and set to '0' in octet n"; break;
601 case 2: str = "bits 7 and 8 are spare and set to '0' in octet n"; break;
602 case 3: str = "bits 6 to 8(inclusive) are spare and set to '0' in octet n"; break;
603 case 4: str = "bits 5 to 8(inclusive) are spare and set to '0' in octet n"; break;
604 case 5: str = "bits 4 to 8(inclusive) are spare and set to '0' in octet n"; break;
605 case 6: str = "bits 3 to 8(inclusive) are spare and set to '0' in octet n"; break;
606 case 7: str = "bits 2 to 8(inclusive) are spare and set to '0' in octet n"; break;
608 str = "this field carries no information about the number of spare bits in octet n";
612 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
613 proto_tree_add_text(tree,
615 "%s : Number of spare bits in last octet: %s",
621 NO_MORE_DATA_CHECK(len);
623 proto_tree_add_text(tree,
624 tvb, curr_offset, len - 1,
625 "Text string encoded according to Coding Scheme");
627 curr_offset += len - 1;
629 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
631 return(curr_offset - offset);
635 * [3] 10.5.3.6 Reject cause
638 de_rej_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
644 curr_offset = offset;
646 oct = tvb_get_guint8(tvb, curr_offset);
650 case 0x02: str = "IMSI unknown in HLR"; break;
651 case 0x03: str = "Illegal MS"; break;
652 case 0x04: str = "IMSI unknown in VLR"; break;
653 case 0x05: str = "IMEI not accepted"; break;
654 case 0x06: str = "Illegal ME"; break;
655 case 0x0b: str = "PLMN not allowed"; break;
656 case 0x0c: str = "Location Area not allowed"; break;
657 case 0x0d: str = "Roaming not allowed in this location area"; break;
658 case 0x0f: str = "No Suitable Cells In Location Area"; break;
659 case 0x11: str = "Network failure"; break;
660 case 0x14: str = "MAC failure"; break;
661 case 0x15: str = "Synch failure"; break;
662 case 0x16: str = "Congestion"; break;
663 case 0x17: str = "GSM authentication unacceptable"; break;
664 case 0x20: str = "Service option not supported"; break;
665 case 0x21: str = "Requested service option not subscribed"; break;
666 case 0x22: str = "Service option temporarily out of order"; break;
667 case 0x26: str = "Call cannot be identified"; break;
668 case 0x5f: str = "Semantically incorrect message"; break;
669 case 0x60: str = "Invalid mandatory information"; break;
670 case 0x61: str = "Message type non-existent or not implemented"; break;
671 case 0x62: str = "Message type not compatible with the protocol state"; break;
672 case 0x63: str = "Information element non-existent or not implemented"; break;
673 case 0x64: str = "Conditional IE error"; break;
674 case 0x65: str = "Message not compatible with the protocol state"; break;
675 case 0x6f: str = "Protocol error, unspecified"; break;
679 case IS_UPLINK_FALSE:
680 str = "Service option temporarily out of order";
683 str = "Protocol error, unspecified";
689 proto_tree_add_text(tree,
691 "Reject Cause value: 0x%02x (%u) %s",
698 /* no length check possible */
700 return(curr_offset - offset);
707 de_time_zone(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
713 curr_offset = offset;
715 /* 3GPP TS 23.040 version 6.6.0 Release 6
716 * 9.2.3.11 TP-Service-Centre-Time-Stamp (TP-SCTS)
718 * The Time Zone indicates the difference, expressed in quarters of an hour,
719 * between the local time and GMT. In the first of the two semi-octets,
720 * the first bit (bit 3 of the seventh octet of the TP-Service-Centre-Time-Stamp field)
721 * represents the algebraic sign of this difference (0: positive, 1: negative).
724 oct = tvb_get_guint8(tvb, curr_offset);
725 sign = (oct & 0x08)?'-':'+';
726 oct = (oct >> 4) + (oct & 0x07) * 10;
728 proto_tree_add_text(tree,
730 "Timezone: GMT %c %d hours %d minutes",
731 sign, oct / 4, oct % 4 * 15);
734 /* no length check possible */
736 return(curr_offset - offset);
743 de_time_zone_time(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
745 guint8 oct, oct2, oct3;
749 curr_offset = offset;
751 oct = tvb_get_guint8(tvb, curr_offset);
752 oct2 = tvb_get_guint8(tvb, curr_offset+1);
753 oct3 = tvb_get_guint8(tvb, curr_offset+2);
755 proto_tree_add_text(tree,
757 "Year %u%u, Month %u%u, Day %u%u",
767 oct = tvb_get_guint8(tvb, curr_offset);
768 oct2 = tvb_get_guint8(tvb, curr_offset+1);
769 oct3 = tvb_get_guint8(tvb, curr_offset+2);
771 proto_tree_add_text(tree,
773 "Hour %u%u, Minutes %u%u, Seconds %u%u",
783 /* 3GPP TS 23.040 version 6.6.0 Release 6
784 * 9.2.3.11 TP-Service-Centre-Time-Stamp (TP-SCTS)
786 * The Time Zone indicates the difference, expressed in quarters of an hour,
787 * between the local time and GMT. In the first of the two semi-octets,
788 * the first bit (bit 3 of the seventh octet of the TP-Service-Centre-Time-Stamp field)
789 * represents the algebraic sign of this difference (0: positive, 1: negative).
792 oct = tvb_get_guint8(tvb, curr_offset);
793 sign = (oct & 0x08)?'-':'+';
794 oct = (oct >> 4) + (oct & 0x07) * 10;
796 proto_tree_add_text(tree,
798 "Timezone: GMT %c %d hours %d minutes",
799 sign, oct / 4, oct % 4 * 15);
803 /* no length check possible */
805 return(curr_offset - offset);
809 * [3] 10.5.3.11 3GPP TS 24.008 version 6.8.0 Release 6
812 de_lsa_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
816 curr_offset = offset;
819 proto_tree_add_text(tree,tvb, curr_offset, len,"LSA ID not included");
821 proto_tree_add_item(tree, hf_gsm_a_lsa_id, tvb, curr_offset, 3, FALSE);
826 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
828 return(curr_offset - offset);
835 de_day_saving_time(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
841 curr_offset = offset;
843 oct = tvb_get_guint8(tvb, curr_offset);
845 other_decode_bitfield_value(a_bigbuf, oct, 0xfc, 8);
846 proto_tree_add_text(tree,
853 case 0: str = "No adjustment for Daylight Saving Time"; break;
854 case 1: str = "+1 hour adjustment for Daylight Saving Time"; break;
855 case 2: str = "+2 hours adjustment for Daylight Saving Time"; break;
861 other_decode_bitfield_value(a_bigbuf, oct, 0x03, 8);
862 proto_tree_add_text(tree,
870 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
872 return(curr_offset - offset);
879 de_aux_states(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
885 curr_offset = offset;
887 oct = tvb_get_guint8(tvb, curr_offset);
889 proto_tree_add_item(tree, hf_gsm_a_extension, tvb, curr_offset, 1, FALSE);
891 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
892 proto_tree_add_text(tree,
897 switch ((oct & 0x0c) >> 2)
899 case 0: str = "Idle"; break;
900 case 1: str = "Hold request"; break;
901 case 2: str = "Call held"; break;
903 str = "Retrieve request";
907 other_decode_bitfield_value(a_bigbuf, oct, 0x0c, 8);
908 proto_tree_add_text(tree,
910 "%s : Hold auxiliary state: %s",
916 case 0: str = "Idle"; break;
917 case 1: str = "MPTY request"; break;
918 case 2: str = "Call in MPTY"; break;
920 str = "Split request";
924 other_decode_bitfield_value(a_bigbuf, oct, 0x03, 8);
925 proto_tree_add_text(tree,
927 "%s : Multi party auxiliary state: %s",
933 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
935 return(curr_offset - offset);
942 de_bearer_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
948 guint32 saved_offset;
953 #define DE_BC_ITC_SPEECH 0x00
954 #define DE_BC_ITC_UDI 0x01
955 #define DE_BC_ITC_EX_PLMN 0x02
956 #define DE_BC_ITC_FASC_G3 0x03
957 #define DE_BC_ITC_OTHER_ITC 0x05
958 #define DE_BC_ITC_RSVD_NET 0x07
960 curr_offset = offset;
962 oct = tvb_get_guint8(tvb, curr_offset);
967 * warning, bearer cap uses extended values that
968 * are reversed from other parameters!
970 extended = (oct & 0x80) ? FALSE : TRUE;
973 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
974 proto_tree_add_text(tree,
976 "%s : Extension: %s",
978 extended ? "extended" : "not extended");
982 case IS_UPLINK_FALSE:
988 * depends on Information transfer capability
992 case DE_BC_ITC_SPEECH:
995 switch ((oct & 0x60) >> 5)
997 case 1: str = "MS supports at least full rate speech version 1 but does not support half rate speech version 1"; break;
998 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;
999 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;
1007 switch ((oct & 0x60) >> 5)
1009 case 1: str = "Full rate support only MS/fullrate speech version 1 supported"; break;
1010 case 2: str = "Dual rate support MS/half rate speech version 1 preferred, full rate speech version 1 also supported"; break;
1011 case 3: str = "Dual rate support MS/full rate speech version 1 preferred, half rate speech version 1 also supported"; break;
1020 switch ((oct & 0x60) >> 5)
1022 case 1: str = "Full rate support only MS"; break;
1023 case 2: str = "Dual rate support MS/half rate preferred"; break;
1024 case 3: str = "Dual rate support MS/full rate preferred"; break;
1034 str = "(dissect problem)";
1038 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
1039 proto_tree_add_text(tree,
1040 tvb, curr_offset, 1,
1041 "%s : Radio channel requirement: %s",
1045 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
1046 proto_tree_add_text(tree,
1047 tvb, curr_offset, 1,
1048 "%s : Coding standard: %s",
1050 (oct & 0x10) ? "reserved" : "GSM standardized coding");
1052 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
1053 proto_tree_add_text(tree,
1054 tvb, curr_offset, 1,
1055 "%s : Transfer mode: %s",
1057 (oct & 0x08) ? "packet" : "circuit");
1061 case DE_BC_ITC_SPEECH: str = "Speech"; break;
1062 case DE_BC_ITC_UDI: str = "Unrestricted digital information"; break;
1063 case DE_BC_ITC_EX_PLMN: str = "3.1 kHz audio, ex PLMN"; break;
1064 case DE_BC_ITC_FASC_G3: str = "Facsimile group 3"; break;
1065 case DE_BC_ITC_OTHER_ITC: str = "Other ITC (See Octet 5a)"; break;
1066 case DE_BC_ITC_RSVD_NET: str = "Reserved, to be used in the network"; break;
1072 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
1073 proto_tree_add_text(tree,
1074 tvb, curr_offset, 1,
1075 "%s : Information transfer capability: %s",
1080 g_snprintf(add_string, string_len, " - (%s)", str);
1084 NO_MORE_DATA_CHECK(len);
1088 case DE_BC_ITC_SPEECH:
1092 proto_tree_add_text(tree,
1093 tvb, curr_offset, -1,
1094 "Octets 3a - Speech Versions");
1096 subtree = proto_item_add_subtree(item, ett_bc_oct_3a);
1098 saved_offset = curr_offset;
1102 oct = tvb_get_guint8(tvb, curr_offset);
1104 extended = (oct & 0x80) ? FALSE : TRUE;
1106 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
1107 proto_tree_add_text(subtree,
1108 tvb, curr_offset, 1,
1109 "%s : Extension: %s",
1111 extended ? "extended" : "not extended");
1113 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
1114 proto_tree_add_text(subtree,
1115 tvb, curr_offset, 1,
1116 "%s : Coding: octet used for %s",
1118 (oct & 0x40) ? "other extension of octet 3" :
1119 "extension of information transfer capability");
1121 other_decode_bitfield_value(a_bigbuf, oct, 0x30, 8);
1122 proto_tree_add_text(subtree,
1123 tvb, curr_offset, 1,
1129 case 0: str = "GSM full rate speech version 1"; break;
1130 case 2: str = "GSM full rate speech version 2"; break;
1131 case 4: str = "GSM full rate speech version 3"; break;
1132 case 1: str = "GSM half rate speech version 1"; break;
1133 case 5: str = "GSM half rate speech version 3"; break;
1135 str = "Speech version TBD";
1139 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
1140 proto_tree_add_text(subtree,
1141 tvb, curr_offset, 1,
1142 "%s : Speech version indication: %s",
1149 ((len - (curr_offset - offset)) > 0));
1151 proto_item_set_len(item, curr_offset - saved_offset);
1158 proto_tree_add_text(tree,
1159 tvb, curr_offset, 1,
1162 subtree = proto_item_add_subtree(item, ett_bc_oct_4);
1164 oct = tvb_get_guint8(tvb, curr_offset);
1166 extended = (oct & 0x80) ? FALSE : TRUE;
1168 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
1169 proto_tree_add_text(subtree,
1170 tvb, curr_offset, 1,
1171 "%s : Extension: %s",
1173 extended ? "extended" : "not extended");
1175 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
1176 proto_tree_add_text(subtree,
1177 tvb, curr_offset, 1,
1178 "%s : Compression: data compression %s%s",
1180 (oct & 0x40) ? "" : "not ",
1181 is_uplink ? "allowed" : "possible");
1183 switch ((oct & 0x30) >> 4)
1185 case 0x00: str = "Service data unit integrity"; break;
1186 case 0x03: str = "Unstructured"; break;
1192 other_decode_bitfield_value(a_bigbuf, oct, 0x30, 8);
1193 proto_tree_add_text(subtree,
1194 tvb, curr_offset, 1,
1195 "%s : Structure: %s",
1199 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
1200 proto_tree_add_text(subtree,
1201 tvb, curr_offset, 1,
1202 "%s : Duplex mode: %s",
1204 (oct & 0x08) ? "Full" : "Half");
1206 other_decode_bitfield_value(a_bigbuf, oct, 0x04, 8);
1207 proto_tree_add_text(subtree,
1208 tvb, curr_offset, 1,
1209 "%s : Configuration: %s",
1211 (oct & 0x04) ? "Reserved" : "Point-to-point");
1213 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
1214 proto_tree_add_text(subtree,
1215 tvb, curr_offset, 1,
1219 "Data up to and including 4.8 kb/s, full rate, non-transparent, 6 kb/s radio interface rate is requested" :
1220 "No meaning is associated with this value");
1222 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
1223 proto_tree_add_text(subtree,
1224 tvb, curr_offset, 1,
1225 "%s : Establishment: %s",
1227 (oct & 0x01) ? "Reserved" : "Demand");
1231 NO_MORE_DATA_CHECK(len);
1236 proto_tree_add_text(tree,
1237 tvb, curr_offset, 1,
1240 subtree = proto_item_add_subtree(item, ett_bc_oct_5);
1242 oct = tvb_get_guint8(tvb, curr_offset);
1244 extended = (oct & 0x80) ? FALSE : TRUE;
1246 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
1247 proto_tree_add_text(subtree,
1248 tvb, curr_offset, 1,
1249 "%s : Extension: %s",
1251 extended ? "extended" : "not extended");
1253 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
1254 proto_tree_add_text(subtree,
1255 tvb, curr_offset, 1,
1256 "%s : Access Identity: %s",
1258 (oct & 0x60) ? "Reserved" : "Octet identifier");
1260 switch ((oct & 0x18) >> 3)
1262 case 0x00: str = "No rate adaption"; break;
1263 case 0x01: str = "V.110, I.460/X.30 rate adaptation"; break;
1264 case 0x02: str = "ITU-T X.31 flag stuffing"; break;
1266 str = "Other rate adaption (see octet 5a)";
1270 other_decode_bitfield_value(a_bigbuf, oct, 0x18, 8);
1271 proto_tree_add_text(subtree,
1272 tvb, curr_offset, 1,
1273 "%s : Rate Adaption: %s",
1279 case 0x01: str = "I.440/450"; break;
1280 case 0x02: str = "Reserved: was allocated in earlier phases of the protocol"; break;
1281 case 0x03: str = "Reserved: was allocated in earlier phases of the protocol"; break;
1282 case 0x04: str = "Reserved: was allocated in earlier phases of the protocol"; break;
1283 case 0x05: str = "Reserved: was allocated in earlier phases of the protocol"; break;
1284 case 0x06: str = "Reserved: was allocated in earlier phases of the protocol"; break;
1290 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
1291 proto_tree_add_text(subtree,
1292 tvb, curr_offset, 1,
1293 "%s : Signalling Access Protocol: %s",
1299 NO_MORE_DATA_CHECK(len);
1301 if (!extended) goto bc_octet_6;
1306 proto_tree_add_text(tree,
1307 tvb, curr_offset, 1,
1310 subtree = proto_item_add_subtree(item, ett_bc_oct_5a);
1312 oct = tvb_get_guint8(tvb, curr_offset);
1314 extended = (oct & 0x80) ? FALSE : TRUE;
1316 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
1317 proto_tree_add_text(subtree,
1318 tvb, curr_offset, 1,
1319 "%s : Extension: %s",
1321 extended ? "extended" : "not extended");
1323 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
1324 proto_tree_add_text(subtree,
1325 tvb, curr_offset, 1,
1326 "%s : Other ITC: %s",
1328 (oct & 0x60) ? "Reserved" : "Restricted digital information");
1330 switch ((oct & 0x18) >> 3)
1332 case 0x00: str = "V.120"; break;
1333 case 0x01: str = "H.223 & H.245"; break;
1334 case 0x02: str = "PIAFS"; break;
1340 other_decode_bitfield_value(a_bigbuf, oct, 0x18, 8);
1341 proto_tree_add_text(subtree,
1342 tvb, curr_offset, 1,
1343 "%s : Other Rate Adaption: %s",
1347 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
1348 proto_tree_add_text(subtree,
1349 tvb, curr_offset, 1,
1355 NO_MORE_DATA_CHECK(len);
1357 if (!extended) goto bc_octet_6;
1362 proto_tree_add_text(tree,
1363 tvb, curr_offset, 1,
1366 subtree = proto_item_add_subtree(item, ett_bc_oct_5b);
1368 oct = tvb_get_guint8(tvb, curr_offset);
1370 extended = (oct & 0x80) ? FALSE : TRUE;
1372 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
1373 proto_tree_add_text(subtree,
1374 tvb, curr_offset, 1,
1375 "%s : Extension: %s",
1377 extended ? "extended" : "not extended");
1379 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
1380 proto_tree_add_text(subtree,
1381 tvb, curr_offset, 1,
1382 "%s : Rate Adaption Header: %sincluded",
1384 (oct & 0x40) ? "" : "not ");
1386 other_decode_bitfield_value(a_bigbuf, oct, 0x20, 8);
1387 proto_tree_add_text(subtree,
1388 tvb, curr_offset, 1,
1389 "%s : Multiple frame establishment support in data link: %s",
1391 (oct & 0x20) ? "Supported" : "Not supported, only UI frames allowed");
1393 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
1394 proto_tree_add_text(subtree,
1395 tvb, curr_offset, 1,
1396 "%s : Mode of operation: %s",
1398 (oct & 0x10) ? "Protocol sensitive" : "Bit transparent");
1400 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
1401 proto_tree_add_text(subtree,
1402 tvb, curr_offset, 1,
1403 "%s : Logical link identifier negotiation: %s",
1405 (oct & 0x08) ? "Full protocol negotiation" : "Default, LLI=256 only");
1407 other_decode_bitfield_value(a_bigbuf, oct, 0x04, 8);
1408 proto_tree_add_text(subtree,
1409 tvb, curr_offset, 1,
1410 "%s : Assignor/Assignee: Message originator is '%s'",
1412 (oct & 0x04) ? "assignor only" : "default assignee");
1414 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
1415 proto_tree_add_text(subtree,
1416 tvb, curr_offset, 1,
1417 "%s : In band/Out of band negotiation: Negotiation is done %s",
1420 "with USER INFORMATION messages on a temporary signalling connection" :
1421 "in-band using logical link zero");
1423 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
1424 proto_tree_add_text(subtree,
1425 tvb, curr_offset, 1,
1431 NO_MORE_DATA_CHECK(len);
1438 proto_tree_add_text(tree,
1439 tvb, curr_offset, 1,
1442 subtree = proto_item_add_subtree(item, ett_bc_oct_6);
1444 oct = tvb_get_guint8(tvb, curr_offset);
1446 extended = (oct & 0x80) ? FALSE : TRUE;
1448 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
1449 proto_tree_add_text(subtree,
1450 tvb, curr_offset, 1,
1451 "%s : Extension: %s",
1453 extended ? "extended" : "not extended");
1455 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
1456 proto_tree_add_text(subtree,
1457 tvb, curr_offset, 1,
1458 "%s : Layer 1 Identity: %s",
1460 ((oct & 0x60) == 0x20) ? "Octet identifier" : "Reserved");
1462 other_decode_bitfield_value(a_bigbuf, oct, 0x1e, 8);
1463 proto_tree_add_text(subtree,
1464 tvb, curr_offset, 1,
1465 "%s : User information layer 1 protocol: %s",
1467 (oct & 0x1e) ? "Reserved" : "Default layer 1 protocol");
1469 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
1470 proto_tree_add_text(subtree,
1471 tvb, curr_offset, 1,
1472 "%s : Synchronous/asynchronous: %s",
1474 (oct & 0x01) ? "Asynchronous" : "Synchronous");
1478 NO_MORE_DATA_CHECK(len);
1480 if (!extended) goto bc_octet_7;
1485 proto_tree_add_text(tree,
1486 tvb, curr_offset, 1,
1489 subtree = proto_item_add_subtree(item, ett_bc_oct_6a);
1491 oct = tvb_get_guint8(tvb, curr_offset);
1493 extended = (oct & 0x80) ? FALSE : TRUE;
1495 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
1496 proto_tree_add_text(subtree,
1497 tvb, curr_offset, 1,
1498 "%s : Extension: %s",
1500 extended ? "extended" : "not extended");
1502 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
1503 proto_tree_add_text(subtree,
1504 tvb, curr_offset, 1,
1505 "%s : Number of Stop Bits: %s",
1507 (oct & 0x40) ? "2" : "1");
1509 other_decode_bitfield_value(a_bigbuf, oct, 0x20, 8);
1510 proto_tree_add_text(subtree,
1511 tvb, curr_offset, 1,
1512 "%s : Negotiation: %s",
1514 (oct & 0x20) ? "Reserved" : "In-band negotiation not possible");
1516 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
1517 proto_tree_add_text(subtree,
1518 tvb, curr_offset, 1,
1519 "%s : Number of data bits excluding parity bit if present: %s",
1521 (oct & 0x10) ? "8" : "7");
1525 case 0x01: str = "0.3 kbit/s Recommendation X.1 and V.110"; break;
1526 case 0x02: str = "1.2 kbit/s Recommendation X.1 and V.110"; break;
1527 case 0x03: str = "2.4 kbit/s Recommendation X.1 and V.110"; break;
1528 case 0x04: str = "4.8 kbit/s Recommendation X.1 and V.110"; break;
1529 case 0x05: str = "9.6 kbit/s Recommendation X.1 and V.110"; break;
1530 case 0x06: str = "12.0 kbit/s transparent (non compliance with X.1 and V.110)"; break;
1531 case 0x07: str = "Reserved: was allocated in earlier phases of the protocol"; break;
1537 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
1538 proto_tree_add_text(subtree,
1539 tvb, curr_offset, 1,
1540 "%s : User rate: %s",
1546 NO_MORE_DATA_CHECK(len);
1548 if (!extended) goto bc_octet_7;
1553 proto_tree_add_text(tree,
1554 tvb, curr_offset, 1,
1557 subtree = proto_item_add_subtree(item, ett_bc_oct_6b);
1559 oct = tvb_get_guint8(tvb, curr_offset);
1561 extended = (oct & 0x80) ? FALSE : TRUE;
1563 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
1564 proto_tree_add_text(subtree,
1565 tvb, curr_offset, 1,
1566 "%s : Extension: %s",
1568 extended ? "extended" : "not extended");
1570 switch ((oct & 0x60) >> 5)
1572 case 0x02: str = "8 kbit/s"; break;
1573 case 0x03: str = "16 kbit/s"; break;
1579 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
1580 proto_tree_add_text(subtree,
1581 tvb, curr_offset, 1,
1582 "%s : V.110/X.30 rate adaptation Intermediate rate: %s",
1586 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
1587 proto_tree_add_text(subtree,
1588 tvb, curr_offset, 1,
1589 "%s : Network independent clock (NIC) on transmission (Tx): %s to send data with network independent clock",
1591 (oct & 0x10) ? "requires" : "does not require");
1593 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
1594 proto_tree_add_text(subtree,
1595 tvb, curr_offset, 1,
1596 "%s : Network independent clock (NIC) on reception (Rx): %s accept data with network independent clock",
1598 (oct & 0x08) ? "can" : "cannot");
1602 case 0x00: str = "Odd"; break;
1603 case 0x02: str = "Even"; break;
1604 case 0x03: str = "None"; break;
1605 case 0x04: str = "Forced to 0"; break;
1606 case 0x05: str = "Forced to 1"; break;
1612 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
1613 proto_tree_add_text(subtree,
1614 tvb, curr_offset, 1,
1615 "%s : Parity information: %s",
1621 NO_MORE_DATA_CHECK(len);
1623 if (!extended) goto bc_octet_7;
1628 proto_tree_add_text(tree,
1629 tvb, curr_offset, 1,
1632 subtree = proto_item_add_subtree(item, ett_bc_oct_6c);
1634 oct = tvb_get_guint8(tvb, curr_offset);
1636 extended = (oct & 0x80) ? FALSE : TRUE;
1638 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
1639 proto_tree_add_text(subtree,
1640 tvb, curr_offset, 1,
1641 "%s : Extension: %s",
1643 extended ? "extended" : "not extended");
1645 switch ((oct & 0x60) >> 5)
1647 case 0x01: str = "Non transparent (RLP)"; break;
1648 case 0x02: str = "Both, transparent preferred"; break;
1649 case 0x03: str = "Both, non transparent preferred"; break;
1651 str = "Transparent";
1655 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
1656 proto_tree_add_text(subtree,
1657 tvb, curr_offset, 1,
1658 "%s : Connection element: %s",
1664 case 0x00: str = "None"; break;
1665 case 0x01: str = "V.21"; break;
1666 case 0x02: str = "V.22"; break;
1667 case 0x03: str = "V.22 bis"; break;
1668 case 0x04: str = "Reserved: was allocated in earlier phases of the protocol"; break;
1669 case 0x05: str = "V.26 ter"; break;
1670 case 0x06: str = "V.32"; break;
1671 case 0x07: str = "Modem for undefined interface"; break;
1672 case 0x08: str = "Autobauding type 1"; break;
1678 other_decode_bitfield_value(a_bigbuf, oct, 0x1f, 8);
1679 proto_tree_add_text(subtree,
1680 tvb, curr_offset, 1,
1681 "%s : Modem type: %s",
1687 NO_MORE_DATA_CHECK(len);
1689 if (!extended) goto bc_octet_7;
1694 proto_tree_add_text(tree,
1695 tvb, curr_offset, 1,
1698 subtree = proto_item_add_subtree(item, ett_bc_oct_6d);
1700 oct = tvb_get_guint8(tvb, curr_offset);
1702 extended = (oct & 0x80) ? FALSE : TRUE;
1704 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
1705 proto_tree_add_text(subtree,
1706 tvb, curr_offset, 1,
1707 "%s : Extension: %s",
1709 extended ? "extended" : "not extended");
1711 switch ((oct & 0x60) >> 5)
1713 case 0x00: str = "No other modem type specified in this field"; break;
1714 case 0x02: str = "V.34"; break;
1720 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
1721 proto_tree_add_text(subtree,
1722 tvb, curr_offset, 1,
1723 "%s : Other modem type: %s",
1729 case 0x00: str = "Fixed network user rate not applicable/No meaning is associated with this value"; break;
1730 case 0x01: str = "9.6 kbit/s Recommendation X.1 and V.110"; break;
1731 case 0x02: str = "14.4 kbit/s Recommendation X.1 and V.110"; break;
1732 case 0x03: str = "19.2 kbit/s Recommendation X.1 and V.110"; break;
1733 case 0x04: str = "28.8 kbit/s Recommendation X.1 and V.110"; break;
1734 case 0x05: str = "38.4 kbit/s Recommendation X.1 and V.110"; break;
1735 case 0x06: str = "48.0 kbit/s Recommendation X.1 and V.110(synch)"; break;
1736 case 0x07: str = "56.0 kbit/s Recommendation X.1 and V.110(synch) /bit transparent"; break;
1737 case 0x08: str = "64.0 kbit/s bit transparent"; break;
1738 case 0x09: str = "33.6 kbit/s bit transparent"; break;
1739 case 0x0a: str = "32.0 kbit/s Recommendation I.460"; break;
1740 case 0x0b: str = "31.2 kbit/s Recommendation V.34"; break;
1746 other_decode_bitfield_value(a_bigbuf, oct, 0x1f, 8);
1747 proto_tree_add_text(subtree,
1748 tvb, curr_offset, 1,
1749 "%s : Fixed network user rate: %s",
1755 NO_MORE_DATA_CHECK(len);
1757 if (!extended) goto bc_octet_7;
1762 proto_tree_add_text(tree,
1763 tvb, curr_offset, 1,
1766 subtree = proto_item_add_subtree(item, ett_bc_oct_6e);
1768 oct = tvb_get_guint8(tvb, curr_offset);
1770 extended = (oct & 0x80) ? FALSE : TRUE;
1772 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
1773 proto_tree_add_text(subtree,
1774 tvb, curr_offset, 1,
1775 "%s : Extension: %s",
1777 extended ? "extended" : "not extended");
1779 if (is_uplink == IS_UPLINK_TRUE)
1781 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
1782 proto_tree_add_text(subtree,
1783 tvb, curr_offset, 1,
1784 "%s : Acceptable channel codings: TCH/F14.4 %sacceptable",
1786 (oct & 0x40) ? "" : "not ");
1788 other_decode_bitfield_value(a_bigbuf, oct, 0x20, 8);
1789 proto_tree_add_text(subtree,
1790 tvb, curr_offset, 1,
1791 "%s : Acceptable channel codings: Spare",
1794 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
1795 proto_tree_add_text(subtree,
1796 tvb, curr_offset, 1,
1797 "%s : Acceptable channel codings: TCH/F9.6 %sacceptable",
1799 (oct & 0x10) ? "" : "not ");
1801 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
1802 proto_tree_add_text(subtree,
1803 tvb, curr_offset, 1,
1804 "%s : Acceptable channel codings: TCH/F4.8 %sacceptable",
1806 (oct & 0x08) ? "" : "not ");
1808 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
1809 proto_tree_add_text(subtree,
1810 tvb, curr_offset, 1,
1811 "%s : Maximum number of traffic channels: %u TCH",
1817 other_decode_bitfield_value(a_bigbuf, oct, 0x78, 8);
1818 proto_tree_add_text(subtree,
1819 tvb, curr_offset, 1,
1820 "%s : Acceptable channel codings: Spare",
1823 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
1824 proto_tree_add_text(subtree,
1825 tvb, curr_offset, 1,
1826 "%s : Maximum number of traffic channels: Spare",
1832 NO_MORE_DATA_CHECK(len);
1834 if (!extended) goto bc_octet_7;
1839 proto_tree_add_text(tree,
1840 tvb, curr_offset, 1,
1843 subtree = proto_item_add_subtree(item, ett_bc_oct_6f);
1845 oct = tvb_get_guint8(tvb, curr_offset);
1847 extended = (oct & 0x80) ? FALSE : TRUE;
1849 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
1850 proto_tree_add_text(subtree,
1851 tvb, curr_offset, 1,
1852 "%s : Extension: %s",
1854 extended ? "extended" : "not extended");
1856 switch ((oct & 0x70) >> 4)
1858 case 0x00: str = "not allowed/required/applicable"; break;
1859 case 0x01: str = "up to 1 TCH/F allowed/may be requested"; break;
1860 case 0x02: str = "up to 2 TCH/F allowed/may be requested"; break;
1861 case 0x03: str = "up to 3 TCH/F allowed/may be requested"; break;
1862 case 0x04: str = "up to 4 TCH/F allowed/may be requested"; break;
1864 str = "up to 4 TCH/F may be requested";
1868 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
1869 proto_tree_add_text(subtree,
1870 tvb, curr_offset, 1,
1871 "%s : UIMI, User initiated modification indication: %s",
1875 if (is_uplink == IS_UPLINK_TRUE)
1879 case 0x00: str = "Air interface user rate not applicable/No meaning associated with this value"; break;
1880 case 0x01: str = "9.6 kbit/s"; break;
1881 case 0x02: str = "14.4 kbit/s"; break;
1882 case 0x03: str = "19.2 kbit/s"; break;
1883 case 0x05: str = "28.8 kbit/s"; break;
1884 case 0x06: str = "38.4 kbit/s"; break;
1885 case 0x07: str = "43.2 kbit/s"; break;
1886 case 0x08: str = "57.6 kbit/s"; break;
1887 case 0x09: str = "interpreted by the network as 38.4 kbit/s in this version of the protocol"; break;
1888 case 0x0a: str = "interpreted by the network as 38.4 kbit/s in this version of the protocol"; break;
1889 case 0x0b: str = "interpreted by the network as 38.4 kbit/s in this version of the protocol"; break;
1890 case 0x0c: str = "interpreted by the network as 38.4 kbit/s in this version of the protocol"; break;
1896 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
1897 proto_tree_add_text(subtree,
1898 tvb, curr_offset, 1,
1899 "%s : Wanted air interface user rate: %s",
1905 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
1906 proto_tree_add_text(subtree,
1907 tvb, curr_offset, 1,
1908 "%s : Wanted air interface user rate: Spare",
1914 NO_MORE_DATA_CHECK(len);
1916 if (!extended) goto bc_octet_7;
1921 proto_tree_add_text(tree,
1922 tvb, curr_offset, 1,
1925 subtree = proto_item_add_subtree(item, ett_bc_oct_6g);
1927 oct = tvb_get_guint8(tvb, curr_offset);
1929 extended = (oct & 0x80) ? FALSE : TRUE;
1931 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
1932 proto_tree_add_text(subtree,
1933 tvb, curr_offset, 1,
1934 "%s : Extension: %s",
1936 extended ? "extended" : "not extended");
1938 if (is_uplink == IS_UPLINK_TRUE)
1940 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
1941 proto_tree_add_text(subtree,
1942 tvb, curr_offset, 1,
1943 "%s : Acceptable channel codings extended: TCH/F28.8 %sacceptable",
1945 (oct & 0x40) ? "" : "not ");
1947 other_decode_bitfield_value(a_bigbuf, oct, 0x20, 8);
1948 proto_tree_add_text(subtree,
1949 tvb, curr_offset, 1,
1950 "%s : Acceptable channel codings extended: TCH/F32.0 %sacceptable",
1952 (oct & 0x20) ? "" : "not ");
1954 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
1955 proto_tree_add_text(subtree,
1956 tvb, curr_offset, 1,
1957 "%s : Acceptable channel codings extended: TCH/F43.2 %sacceptable",
1959 (oct & 0x10) ? "" : "not ");
1961 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
1962 proto_tree_add_text(subtree,
1963 tvb, curr_offset, 1,
1964 "%s : Acceptable channel codings extended: TCH/F43.2 %sacceptable",
1966 (oct & 0x10) ? "" : "not ");
1968 switch ((oct & 0x0c) >> 2)
1970 case 0: str = "Channel coding symmetry preferred"; break;
1971 case 2: str = "Downlink biased channel coding asymmetry is preferred"; break;
1972 case 1: str = "Uplink biased channel coding asymmetry is preferred"; break;
1974 str = "Unused, treat as Channel coding symmetry preferred";
1978 other_decode_bitfield_value(a_bigbuf, oct, 0x0c, 8);
1979 proto_tree_add_text(subtree,
1980 tvb, curr_offset, 1,
1981 "%s : Channel Coding Asymmetry Indication: %s",
1987 other_decode_bitfield_value(a_bigbuf, oct, 0x7c, 8);
1988 proto_tree_add_text(subtree,
1989 tvb, curr_offset, 1,
1990 "%s : EDGE Channel Codings: Spare",
1994 other_decode_bitfield_value(a_bigbuf, oct, 0x03, 8);
1995 proto_tree_add_text(subtree,
1996 tvb, curr_offset, 1,
2002 NO_MORE_DATA_CHECK(len);
2008 proto_tree_add_text(tree,
2009 tvb, curr_offset, 1,
2012 subtree = proto_item_add_subtree(item, ett_bc_oct_7);
2013 extended = (oct & 0x80) ? FALSE : TRUE;
2014 oct = tvb_get_guint8(tvb, curr_offset);
2015 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
2016 proto_tree_add_text(subtree,
2017 tvb, curr_offset, 1,
2018 "%s : Extension: %s",
2020 extended ? "extended" : "not extended");
2022 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
2023 proto_tree_add_text(subtree,
2024 tvb, curr_offset, 1,
2025 "%s : Layer 2 Identity: %s",
2027 ((oct & 0x60) == 0x40) ? "Octet identifier" : "Reserved");
2031 case 0x06: str = "Reserved: was allocated in earlier phases of the protocol"; break;
2032 case 0x08: str = "ISO 6429, codeset 0 (DC1/DC3)"; break;
2033 case 0x09: str = "Reserved: was allocated but never used in earlier phases of the protocol"; break;
2034 case 0x0a: str = "Videotex profile 1"; break;
2035 case 0x0c: str = "COPnoFlCt (Character oriented Protocol with no Flow Control mechanism)"; break;
2036 case 0x0d: str = "Reserved: was allocated in earlier phases of the protocol"; break;
2042 other_decode_bitfield_value(a_bigbuf, oct, 0x1f, 8);
2043 proto_tree_add_text(subtree,
2044 tvb, curr_offset, 1,
2045 "%s : User information layer 2 protocol: %s",
2051 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
2053 return(curr_offset - offset);
2060 de_bearer_cap_uplink(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
2062 is_uplink = IS_UPLINK_TRUE;
2063 return de_bearer_cap(tvb, tree, offset, len, add_string, string_len);
2069 de_cc_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
2072 guint32 curr_offset;
2074 curr_offset = offset;
2076 oct = tvb_get_guint8(tvb, curr_offset);
2078 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
2080 switch ((oct & 0xf0) >> 4)
2083 proto_tree_add_text(tree,
2084 tvb, curr_offset, 1,
2085 "%s : Maximum number of supported bearers: 1",
2090 proto_tree_add_text(tree,
2091 tvb, curr_offset, 1,
2092 "%s : Maximum number of supported bearers: %u",
2098 other_decode_bitfield_value(a_bigbuf, oct, 0x0c, 8);
2099 proto_tree_add_text(tree,
2100 tvb, curr_offset, 1,
2104 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
2105 proto_tree_add_text(tree,
2106 tvb, curr_offset, 1,
2107 "%s : PCP: the mobile station %s the Prolonged Clearing Procedure",
2109 (oct & 0x02) ? "supports" : "does not support");
2111 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
2112 proto_tree_add_text(tree,
2113 tvb, curr_offset, 1,
2117 "the mobile station supports DTMF as specified in subclause 5.5.7 of TS 24.008" :
2118 "reserved for earlier versions of the protocol");
2122 NO_MORE_DATA_CHECK(len);
2124 oct = tvb_get_guint8(tvb, curr_offset);
2126 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
2127 proto_tree_add_text(tree,
2128 tvb, curr_offset, 1,
2132 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
2133 proto_tree_add_text(tree,
2134 tvb, curr_offset, 1,
2135 "%s : Maximum number of speech bearers: %u",
2141 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
2143 return(curr_offset - offset);
2150 de_call_state(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
2153 guint32 curr_offset;
2154 proto_tree *subtree;
2158 curr_offset = offset;
2160 oct = tvb_get_guint8(tvb, curr_offset);
2163 proto_tree_add_text(tree,
2164 tvb, curr_offset, 1,
2165 gsm_dtap_elem_strings[DE_CALL_STATE].strptr);
2167 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_CALL_STATE]);
2169 switch ((oct & 0xc0) >> 6)
2171 case 0: str = "Coding as specified in ITU-T Rec. Q.931"; break;
2172 case 1: str = "Reserved for other international standards"; break;
2173 case 2: str = "National standard"; break;
2175 str = "Standard defined for the GSM PLMNS";
2179 other_decode_bitfield_value(a_bigbuf, oct, 0xc0, 8);
2180 proto_tree_add_text(subtree,
2181 tvb, curr_offset, 1,
2182 "%s : Coding standard: %s",
2188 case 0x00: str = "UO - null NO - null"; break;
2189 case 0x02: str = "U0.1- MM connection pending N0.1- MM connection pending"; break;
2190 case 0x22: str = "U0.2- CC prompt present N0.2- CC connection pending"; break;
2191 case 0x23: str = "U0.3- Wait for network information N0.3- Network answer pending"; break;
2192 case 0x24: str = "U0.4- CC-Establishment present N0.4- CC-Establishment present"; break;
2193 case 0x25: str = "U0.5- CC-Establishment confirmed N0.5- CC-Establishment confirmed"; break;
2194 case 0x26: str = "U0.6- Recall present N0.6- Recall present"; break;
2195 case 0x01: str = "U1 - call initiated N1 - call initiated"; break;
2196 case 0x03: str = "U3 - mobile originating call proceeding N3 - mobile originating call proceeding"; break;
2197 case 0x04: str = "U4 - call delivered N4 - call delivered"; break;
2198 case 0x06: str = "U6 - call present N6 - call present"; break;
2199 case 0x07: str = "U7 - call received N7 - call received"; break;
2200 case 0x08: str = "U8 - connect request N8 - connect request"; break;
2201 case 0x09: str = "U9 - mobile terminating call confirmed N9 - mobile terminating call confirmed"; break;
2202 case 0x0a: str = "U10- active N10- active"; break;
2203 case 0x0b: str = "U11- disconnect request"; break;
2204 case 0x0c: str = "U12- disconnect indication N12-disconnect indication"; break;
2205 case 0x13: str = "U19- release request N19- release request"; break;
2206 case 0x1a: str = "U26- mobile originating modify N26- mobile originating modify"; break;
2207 case 0x1b: str = "U27- mobile terminating modify N27- mobile terminating modify"; break;
2208 case 0x1c: str = " N28- connect indication"; break;
2214 other_decode_bitfield_value(a_bigbuf, oct, 0x3f, 8);
2215 proto_tree_add_text(subtree,
2216 tvb, curr_offset, 1,
2217 "%s : Call state value: %s",
2223 /* no length check possible */
2225 return(curr_offset - offset);
2228 static const true_false_string gsm_a_extension_value = {
2233 const value_string gsm_a_type_of_number_values[] = {
2234 { 0x00, "unknown" },
2235 { 0x01, "International Number" },
2236 { 0x02, "National number" },
2237 { 0x03, "Network Specific Number" },
2238 { 0x04, "Dedicated access, short code" },
2239 { 0x05, "Reserved" },
2240 { 0x06, "Reserved" },
2241 { 0x07, "Reserved for extension" },
2245 const value_string gsm_a_numbering_plan_id_values[] = {
2246 { 0x00, "unknown" },
2247 { 0x01, "ISDN/Telephony Numbering (Rec ITU-T E.164)" },
2249 { 0x03, "Data Numbering (ITU-T Rec. X.121)" },
2250 { 0x04, "Telex Numbering (ITU-T Rec. F.69)" },
2251 { 0x08, "National Numbering" },
2252 { 0x09, "Private Numbering" },
2253 { 0x0d, "reserved for CTS (see 3GPP TS 44.056 [91])" },
2254 { 0x0f, "Reserved for extension" },
2262 de_cld_party_bcd_num(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
2265 guint32 curr_offset;
2267 curr_offset = offset;
2269 proto_tree_add_item(tree, hf_gsm_a_extension, tvb, curr_offset, 1, FALSE);
2270 proto_tree_add_item(tree, hf_gsm_a_type_of_number , tvb, curr_offset, 1, FALSE);
2271 proto_tree_add_item(tree, hf_gsm_a_numbering_plan_id , tvb, curr_offset, 1, FALSE);
2275 NO_MORE_DATA_CHECK(len);
2277 poctets = tvb_get_ephemeral_string(tvb, curr_offset, len - (curr_offset - offset));
2279 my_dgt_tbcd_unpack(a_bigbuf, poctets, len - (curr_offset - offset),
2282 proto_tree_add_string_format(tree, hf_gsm_a_cld_party_bcd_num,
2283 tvb, curr_offset, len - (curr_offset - offset),
2288 if (sccp_assoc && ! sccp_assoc->called_party) {
2289 sccp_assoc->called_party = se_strdup(a_bigbuf);
2292 curr_offset += len - (curr_offset - offset);
2295 g_snprintf(add_string, string_len, " - (%s)", a_bigbuf);
2297 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
2299 return(curr_offset - offset);
2306 de_cld_party_sub_addr(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
2309 guint32 curr_offset;
2312 curr_offset = offset;
2314 oct = tvb_get_guint8(tvb, curr_offset);
2316 proto_tree_add_item(tree, hf_gsm_a_extension, tvb, curr_offset, 1, FALSE);
2318 switch ((oct & 0x70) >> 4)
2320 case 0: str = "NSAP (X.213/ISO 8348 AD2)"; break;
2321 case 2: str = "User specified"; break;
2327 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
2328 proto_tree_add_text(tree,
2329 tvb, curr_offset, 1,
2330 "%s : Type of subaddress: %s",
2334 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
2335 proto_tree_add_text(tree,
2336 tvb, curr_offset, 1,
2337 "%s : Odd/Even indicator: %s",
2340 "odd number of address signals" : "even number of address signals");
2342 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
2343 proto_tree_add_text(tree,
2344 tvb, curr_offset, 1,
2350 NO_MORE_DATA_CHECK(len);
2352 proto_tree_add_text(tree,
2353 tvb, curr_offset, len - (curr_offset - offset),
2354 "Subaddress information");
2356 curr_offset += len - (curr_offset - offset);
2358 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
2360 return(curr_offset - offset);
2367 de_clg_party_bcd_num(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
2371 guint32 curr_offset;
2374 curr_offset = offset;
2376 proto_tree_add_item(tree, hf_gsm_a_extension, tvb, curr_offset, 1, FALSE);
2377 proto_tree_add_item(tree, hf_gsm_a_type_of_number , tvb, curr_offset, 1, FALSE);
2378 proto_tree_add_item(tree, hf_gsm_a_numbering_plan_id , tvb, curr_offset, 1, FALSE);
2382 oct = tvb_get_guint8(tvb, curr_offset);
2384 proto_tree_add_item(tree, hf_gsm_a_extension, tvb, curr_offset, 1, FALSE);
2386 switch ((oct & 0x60) >> 5)
2388 case 0: str = "Presentation allowed"; break;
2389 case 1: str = "Presentation restricted"; break;
2390 case 2: str = "Number not available due to interworking"; break;
2396 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
2397 proto_tree_add_text(tree,
2398 tvb, curr_offset, 1,
2399 "%s : Presentation indicator: %s",
2403 other_decode_bitfield_value(a_bigbuf, oct, 0x1c, 8);
2404 proto_tree_add_text(tree,
2405 tvb, curr_offset, 1,
2411 case 0: str = "User-provided, not screened"; break;
2412 case 1: str = "User-provided, verified and passed"; break;
2413 case 2: str = "User-provided, verified and failed"; break;
2415 str = "Network provided";
2419 other_decode_bitfield_value(a_bigbuf, oct, 0x03, 8);
2420 proto_tree_add_text(tree,
2421 tvb, curr_offset, 1,
2422 "%s : Screening indicator: %s",
2428 NO_MORE_DATA_CHECK(len);
2430 poctets = tvb_get_ephemeral_string(tvb, curr_offset, len - (curr_offset - offset));
2432 my_dgt_tbcd_unpack(a_bigbuf, poctets, len - (curr_offset - offset),
2435 proto_tree_add_string_format(tree, hf_gsm_a_clg_party_bcd_num,
2436 tvb, curr_offset, len - (curr_offset - offset),
2441 curr_offset += len - (curr_offset - offset);
2444 g_snprintf(add_string, string_len, " - (%s)", a_bigbuf);
2446 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
2448 return(curr_offset - offset);
2455 de_clg_party_sub_addr(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
2458 guint32 curr_offset;
2461 curr_offset = offset;
2463 oct = tvb_get_guint8(tvb, curr_offset);
2465 proto_tree_add_item(tree, hf_gsm_a_extension, tvb, curr_offset, 1, FALSE);
2467 switch ((oct & 0x70) >> 4)
2469 case 0: str = "NSAP (X.213/ISO 8348 AD2)"; break;
2470 case 2: str = "User specified"; break;
2476 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
2477 proto_tree_add_text(tree,
2478 tvb, curr_offset, 1,
2479 "%s : Type of subaddress: %s",
2483 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
2484 proto_tree_add_text(tree,
2485 tvb, curr_offset, 1,
2486 "%s : Odd/Even indicator: %s",
2489 "odd number of address signals" : "even number of address signals");
2491 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
2492 proto_tree_add_text(tree,
2493 tvb, curr_offset, 1,
2499 NO_MORE_DATA_CHECK(len);
2501 proto_tree_add_text(tree,
2502 tvb, curr_offset, len - (curr_offset - offset),
2503 "Subaddress information");
2505 curr_offset += len - (curr_offset - offset);
2507 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
2509 return(curr_offset - offset);
2516 de_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
2520 guint32 curr_offset;
2523 curr_offset = offset;
2525 oct = tvb_get_guint8(tvb, curr_offset);
2527 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
2528 proto_tree_add_text(tree,
2529 tvb, curr_offset, 1,
2530 "%s : Extension: %s",
2532 (oct & 0x80) ? "not extended" : "extended");
2534 switch ((oct & 0x60) >> 5)
2536 case 0: str = "Coding as specified in ITU-T Rec. Q.931"; break;
2537 case 1: str = "Reserved for other international standards"; break;
2538 case 2: str = "National standard"; break;
2540 str = "Standard defined for the GSM PLMNS";
2544 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
2545 proto_tree_add_text(tree,
2546 tvb, curr_offset, 1,
2547 "%s : Coding standard: %s",
2551 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
2552 proto_tree_add_text(tree,
2553 tvb, curr_offset, 1,
2559 case 0: str = "User"; break;
2560 case 1: str = "Private network serving the local user"; break;
2561 case 2: str = "Public network serving the local user"; break;
2562 case 3: str = "Transit network"; break;
2563 case 4: str = "Public network serving the remote user"; break;
2564 case 5: str = "Private network serving the remote user"; break;
2565 case 7: str = "International network"; break;
2566 case 10: str = "Network beyond interworking point"; break;
2572 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
2573 proto_tree_add_text(tree,
2574 tvb, curr_offset, 1,
2575 "%s : Location: %s",
2581 oct = tvb_get_guint8(tvb, curr_offset);
2585 proto_tree_add_item(tree, hf_gsm_a_extension, tvb, curr_offset, 1, FALSE);
2587 other_decode_bitfield_value(a_bigbuf, oct, 0x7f, 8);
2588 proto_tree_add_text(tree,
2589 tvb, curr_offset, 1,
2590 "%s : Recommendation",
2595 oct = tvb_get_guint8(tvb, curr_offset);
2598 proto_tree_add_item(tree, hf_gsm_a_extension, tvb, curr_offset, 1, FALSE);
2603 case 1: str = "Unassigned (unallocated) number"; break;
2604 case 3: str = "No route to destination"; break;
2605 case 6: str = "Channel unacceptable"; break;
2606 case 8: str = "Operator determined barring"; break;
2607 case 16: str = "Normal call clearing"; break;
2608 case 17: str = "User busy"; break;
2609 case 18: str = "No user responding"; break;
2610 case 19: str = "User alerting, no answer"; break;
2611 case 21: str = "Call rejected"; break;
2612 case 22: str = "Number changed"; break;
2613 case 25: str = "Pre-emption"; break;
2614 case 26: str = "Non selected user clearing"; break;
2615 case 27: str = "Destination out of order"; break;
2616 case 28: str = "Invalid number format (incomplete number)"; break;
2617 case 29: str = "Facility rejected"; break;
2618 case 30: str = "Response to STATUS ENQUIRY"; break;
2619 case 31: str = "Normal, unspecified"; break;
2620 case 34: str = "No circuit/channel available"; break;
2621 case 38: str = "Network out of order"; break;
2622 case 41: str = "Temporary failure"; break;
2623 case 42: str = "Switching equipment congestion"; break;
2624 case 43: str = "Access information discarded"; break;
2625 case 44: str = "requested circuit/channel not available"; break;
2626 case 47: str = "Resources unavailable, unspecified"; break;
2627 case 49: str = "Quality of service unavailable"; break;
2628 case 50: str = "Requested facility not subscribed"; break;
2629 case 55: str = "Incoming calls barred within the CUG"; break;
2630 case 57: str = "Bearer capability not authorized"; break;
2631 case 58: str = "Bearer capability not presently available"; break;
2632 case 63: str = "Service or option not available, unspecified"; break;
2633 case 65: str = "Bearer service not implemented"; break;
2634 case 68: str = "ACM equal to or greater than ACMmax"; break;
2635 case 69: str = "Requested facility not implemented"; break;
2636 case 70: str = "Only restricted digital information bearer capability is available"; break;
2637 case 79: str = "Service or option not implemented, unspecified"; break;
2638 case 81: str = "Invalid transaction identifier value"; break;
2639 case 87: str = "User not member of CUG"; break;
2640 case 88: str = "Incompatible destination"; break;
2641 case 91: str = "Invalid transit network selection"; break;
2642 case 95: str = "Semantically incorrect message"; break;
2643 case 96: str = "Invalid mandatory information"; break;
2644 case 97: str = "Message type non-existent or not implemented"; break;
2645 case 98: str = "Message type not compatible with protocol state"; break;
2646 case 99: str = "Information element non-existent or not implemented"; break;
2647 case 100: str = "Conditional IE error"; break;
2648 case 101: str = "Message not compatible with protocol state"; break;
2649 case 102: str = "Recovery on timer expiry"; break;
2650 case 111: str = "Protocol error, unspecified"; break;
2651 case 127: str = "Interworking, unspecified"; break;
2653 if (cause <= 31) { str = "Treat as Normal, unspecified"; }
2654 else if ((cause >= 32) && (cause <= 47)) { str = "Treat as Resources unavailable, unspecified"; }
2655 else if ((cause >= 48) && (cause <= 63)) { str = "Treat as Service or option not available, unspecified"; }
2656 else if ((cause >= 64) && (cause <= 79)) { str = "Treat as Service or option not implemented, unspecified"; }
2657 else if ((cause >= 80) && (cause <= 95)) { str = "Treat as Semantically incorrect message"; }
2658 else if ((cause >= 96) && (cause <= 111)) { str = "Treat as Protocol error, unspecified"; }
2659 else if ((cause >= 112) && (cause <= 127)) { str = "Treat as Interworking, unspecified"; }
2663 other_decode_bitfield_value(a_bigbuf, oct, 0x7f, 8);
2664 proto_tree_add_uint_format(tree, hf_gsm_a_dtap_cause,
2665 tvb, curr_offset, 1, cause,
2666 "%s : Cause: (%u) %s",
2674 g_snprintf(add_string, string_len, " - (%u) %s", cause, str);
2676 NO_MORE_DATA_CHECK(len);
2678 proto_tree_add_text(tree,
2679 tvb, curr_offset, len - (curr_offset - offset),
2682 curr_offset += len - (curr_offset - offset);
2684 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
2686 return(curr_offset - offset);
2690 * 10.5.4.18 Low layer compatibility
2693 de_llc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
2695 guint32 curr_offset;
2697 curr_offset = offset;
2699 dissect_q931_bearer_capability_ie(tvb, offset, len, tree);
2701 curr_offset = curr_offset + len;
2702 return(curr_offset - offset);
2711 de_facility(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint fac_len, gchar *add_string _U_, int string_len _U_)
2716 gboolean ind = FALSE;
2717 guint32 component_len = 0;
2718 guint32 header_end_offset;
2720 asn1_ctx_t asn1_ctx;
2721 tvbuff_t *SS_tvb = NULL;
2722 void *save_private_data;
2723 static gint comp_type_tag;
2725 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, gsm_a_dtap_pinfo);
2727 save_private_data= gsm_a_dtap_pinfo->private_data;
2728 saved_offset = offset;
2729 gsm_a_dtap_pinfo->private_data = NULL;
2730 while ( fac_len > (offset - saved_offset)){
2732 /* Get the length of the component there can be more than one component in a facility message */
2734 header_end_offset = get_ber_identifier(tvb, offset, &class, &pc, &comp_type_tag);
2735 header_end_offset = get_ber_length(tvb, header_end_offset, &component_len, &ind);
2737 proto_tree_add_text(tree, tvb, offset+1, 1,
2738 "Indefinte length, ignoring component");
2741 header_len = header_end_offset - offset;
2742 component_len = header_len + component_len;
2744 dissect_ROS_Component(FALSE, tvb, offset, &asn1_ctx, tree, hf_ROS_component);
2745 TODO Call gsm map here
2747 SS_tvb = tvb_new_subset(tvb, offset, component_len, component_len);
2748 call_dissector(gsm_map_handle, SS_tvb, gsm_a_dtap_pinfo, tree);
2749 offset = offset + component_len;
2751 gsm_a_dtap_pinfo->private_data = save_private_data;
2759 de_keypad_facility(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string, int string_len)
2762 guint32 curr_offset;
2764 curr_offset = offset;
2766 oct = tvb_get_guint8(tvb, curr_offset);
2768 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
2769 proto_tree_add_text(tree,
2770 tvb, curr_offset, 1,
2774 other_decode_bitfield_value(a_bigbuf, oct, 0x7f, 8);
2775 proto_tree_add_text(tree,
2776 tvb, curr_offset, 1,
2777 "%s : Keypad information: %c",
2784 g_snprintf(add_string, string_len, " - %c", oct & 0x7f);
2786 /* no length check possible */
2788 return(curr_offset - offset);
2795 de_prog_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string, int string_len)
2798 guint32 curr_offset;
2801 curr_offset = offset;
2803 oct = tvb_get_guint8(tvb, curr_offset);
2805 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
2806 proto_tree_add_text(tree,
2807 tvb, curr_offset, 1,
2808 "%s : Extension: %s",
2810 (oct & 0x80) ? "extended" : "not extended");
2812 switch ((oct & 0x60) >> 5)
2814 case 0: str = "Coding as specified in ITU-T Rec. Q.931"; break;
2815 case 1: str = "Reserved for other international standards"; break;
2816 case 2: str = "National standard"; break;
2818 str = "Standard defined for the GSM PLMNS";
2822 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
2823 proto_tree_add_text(tree,
2824 tvb, curr_offset, 1,
2825 "%s : Coding standard: %s",
2829 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
2830 proto_tree_add_text(tree,
2831 tvb, curr_offset, 1,
2837 case 0: str = "User"; break;
2838 case 1: str = "Private network serving the local user"; break;
2839 case 2: str = "Public network serving the local user"; break;
2840 case 4: str = "Public network serving the remote user"; break;
2841 case 5: str = "Private network serving the remote user"; break;
2842 case 10: str = "Network beyond interworking point"; break;
2848 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
2849 proto_tree_add_text(tree,
2850 tvb, curr_offset, 1,
2851 "%s : Location: %s",
2857 oct = tvb_get_guint8(tvb, curr_offset);
2859 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
2860 proto_tree_add_text(tree,
2861 tvb, curr_offset, 1,
2862 "%s : Extension: %s",
2864 (oct & 0x80) ? "extended" : "not extended");
2868 case 1: str = "Call is not end-to-end PLMN/ISDN, further call progress information may be available in-band"; break;
2869 case 2: str = "Destination address in non-PLMN/ISDN"; break;
2870 case 3: str = "Origination address in non-PLMN/ISDN"; break;
2871 case 4: str = "Call has returned to the PLMN/ISDN"; break;
2872 case 8: str = "In-band information or appropriate pattern now available"; break;
2873 case 32: str = "Call is end-to-end PLMN/ISDN"; break;
2874 case 64: str = "Queueing"; break;
2880 other_decode_bitfield_value(a_bigbuf, oct, 0x7f, 8);
2881 proto_tree_add_text(tree,
2882 tvb, curr_offset, 1,
2883 "%s : Progress Description: %s (%d)",
2889 g_snprintf(add_string, string_len, " - %d", oct & 0x7f);
2893 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
2895 return(curr_offset - offset);
2902 de_repeat_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
2905 guint32 curr_offset;
2908 curr_offset = offset;
2910 oct = tvb_get_guint8(tvb, curr_offset);
2914 case 1: str = "Circular for successive selection 'mode 1 alternate mode 2'"; break;
2915 case 2: str = "Support of fallback mode 1 preferred, mode 2 selected if setup of mode 1 fails"; break;
2916 case 3: str = "Reserved: was allocated in earlier phases of the protocol"; break;
2922 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
2923 proto_tree_add_text(tree,
2924 tvb, curr_offset, 1,
2931 /* no length check possible */
2933 return(curr_offset - offset);
2940 de_ss_ver_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
2943 guint32 curr_offset;
2946 curr_offset = offset;
2948 oct = tvb_get_guint8(tvb, curr_offset);
2952 case 0: str = "Phase 2 service, ellipsis notation, and phase 2 error handling is supported"; break;
2953 case 1: str = "SS-Protocol version 3 is supported, and phase 2 error handling is supported"; break;
2959 proto_tree_add_text(tree,
2960 tvb, curr_offset, 1,
2966 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
2968 return(curr_offset - offset);
2972 * [5] 8.1.4.1 3GPP TS 24.011 version 6.1.0 Release 6
2975 de_cp_user_data(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
2977 guint32 curr_offset;
2980 curr_offset = offset;
2982 proto_tree_add_text(tree, tvb, curr_offset, len,
2983 "RPDU (not displayed)");
2986 * dissect the embedded RP message
2988 rp_tvb = tvb_new_subset(tvb, curr_offset, len, len);
2990 call_dissector(rp_handle, rp_tvb, gsm_a_dtap_pinfo, g_tree);
2994 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
2996 return(curr_offset - offset);
3003 de_cp_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string, int string_len)
3006 guint32 curr_offset;
3009 curr_offset = offset;
3011 oct = tvb_get_guint8(tvb, curr_offset);
3015 case 17: str = "Network failure"; break;
3016 case 22: str = "Congestion"; break;
3017 case 81: str = "Invalid Transaction Identifier value"; break;
3018 case 95: str = "Semantically incorrect message"; break;
3019 case 96: str = "Invalid mandatory information"; break;
3020 case 97: str = "Message type non-existent or not implemented"; break;
3021 case 98: str = "Message not compatible with the short message protocol state"; break;
3022 case 99: str = "Information element non-existent or not implemented"; break;
3023 case 111: str = "Protocol error, unspecified"; break;
3025 str = "Reserved, treat as Protocol error, unspecified";
3029 proto_tree_add_text(tree,
3030 tvb, curr_offset, 1,
3038 g_snprintf(add_string, string_len, " - (%u) %s", oct, str);
3040 /* no length check possible */
3042 return(curr_offset - offset);
3046 de_tp_sub_channel(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
3048 guint32 curr_offset;
3052 curr_offset = offset;
3054 oct = tvb_get_guint8(tvb, curr_offset) & 0x3f;
3055 if ((oct & 0x38) == 0x38)
3057 else if ((oct & 0x38) == 0x18)
3059 else if ((oct & 0x38) == 0x10)
3061 else if ((oct & 0x38) == 0x08)
3063 else if ((oct & 0x3c) == 0x04)
3065 else if ((oct & 0x3e) == 0x02)
3067 else if ((oct & 0x3e) == 0x00)
3072 proto_tree_add_text(tree,
3073 tvb, curr_offset, 1,
3074 "Test Loop %s",str);
3077 proto_tree_add_text(tree,
3078 tvb, curr_offset, 1,
3079 "Only one TCH active or sub-channel 0 of two half rate channels is to be looped");
3081 proto_tree_add_text(tree,
3082 tvb, curr_offset, 1,
3083 "Sub-channel 1 of two half rate channels is to be looped");
3087 return(curr_offset - offset);
3091 de_tp_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
3093 guint32 curr_offset;
3096 curr_offset = offset;
3098 oct = tvb_get_guint8(tvb, curr_offset);
3100 if ((oct & 0xF0) == 0x80)
3101 proto_tree_add_text(tree,tvb, curr_offset, 1, "Acknowledgment element: %d",oct&0x01);
3103 proto_tree_add_text(tree,tvb, curr_offset, 1, "No acknowledgment element present");
3107 return(curr_offset - offset);
3111 de_tp_loop_type(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
3113 guint32 curr_offset;
3116 curr_offset = offset;
3118 oct = tvb_get_guint8(tvb, curr_offset);
3123 proto_tree_add_text(tree, tvb, curr_offset, 1, "Channel coding not needed. The Burst-by-Burst loop is activated, type G");
3126 proto_tree_add_text(tree, tvb, curr_offset, 1, "Channel coding needed. Frame erasure is to be signalled, type H");
3129 proto_tree_add_text(tree, tvb, curr_offset, 1, "Channel coding reserved (%d)",oct & 0x03);
3136 proto_tree_add_text(tree, tvb, curr_offset, 1, "Multi-slot mechanism 1");
3137 proto_tree_add_text(tree, tvb, curr_offset, 1, "Timeslot number %d",(oct & 0xe0)>>5);
3140 proto_tree_add_text(tree, tvb, curr_offset, 1, "Multi-slot mechanism 2");
3143 proto_tree_add_text(tree, tvb, curr_offset, 1, "Loop mechanism reserved (%d)",(oct & 0x1c)>>2);
3149 return(curr_offset - offset);
3153 de_tp_loop_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
3155 guint32 curr_offset;
3158 curr_offset = offset;
3160 oct = tvb_get_guint8(tvb, curr_offset);
3165 proto_tree_add_text(tree, tvb, curr_offset, 1, "Channel coding not needed. The Burst-by-Burst loop is activated, type G");
3168 proto_tree_add_text(tree, tvb, curr_offset, 1, "Channel coding needed. Frame erasure is to be signalled, type H");
3171 proto_tree_add_text(tree, tvb, curr_offset, 1, "Channel coding reserved (%d)",(oct & 0x30)>>4);
3178 proto_tree_add_text(tree, tvb, curr_offset, 1, "Multi-slot mechanism 1");
3181 proto_tree_add_text(tree, tvb, curr_offset, 1, "Multi-slot mechanism 2");
3184 proto_tree_add_text(tree, tvb, curr_offset, 1, "Loop mechanism reserved (%d)",(oct & 0x0e)>>1);
3189 proto_tree_add_text(tree, tvb, curr_offset, 1, "Multi-slot TCH loop was not closed due to error");
3191 proto_tree_add_text(tree, tvb, curr_offset, 1, "Multi-slot TCH loop was closed successfully");
3195 return(curr_offset - offset);
3199 de_tp_tested_device(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
3201 guint32 curr_offset;
3204 curr_offset = offset;
3206 oct = tvb_get_guint8(tvb, curr_offset);
3211 proto_tree_add_text(tree, tvb, curr_offset, 1, "Normal operation (no tested device via DAI)");
3214 proto_tree_add_text(tree, tvb, curr_offset, 1, "Test of speech decoder / DTX functions (downlink)");
3217 proto_tree_add_text(tree, tvb, curr_offset, 1, "Test of speech encoder / DTX functions (uplink)");
3220 proto_tree_add_text(tree, tvb, curr_offset, 1, "Test of acoustic devices and A/D & D/A");
3223 proto_tree_add_text(tree, tvb, curr_offset, 1, "Tested device reserved (%d)",oct);
3229 return(curr_offset - offset);
3233 de_tp_pdu_description(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
3235 guint32 curr_offset;
3238 curr_offset = offset;
3240 value = tvb_get_ntohs(tvb, curr_offset);
3245 if ((value & 0xfff) == 0)
3246 proto_tree_add_text(tree, tvb, curr_offset, 1, "Infinite number of PDUs to be transmitted in the TBF");
3248 proto_tree_add_text(tree, tvb, curr_offset, 1, "%d PDUs to be transmitted in the TBF",value & 0xfff);
3251 proto_tree_add_text(tree, tvb, curr_offset, 1, "PDU description reserved");
3253 return(curr_offset - offset);
3257 de_tp_mode_flag(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
3259 guint32 curr_offset;
3262 curr_offset = offset;
3264 oct = tvb_get_guint8(tvb, curr_offset);
3267 proto_tree_add_text(tree, tvb, curr_offset, 1, "MS shall select the loop back option");
3269 proto_tree_add_text(tree, tvb, curr_offset, 1, "MS shall itself generate the pseudorandom data");
3271 proto_tree_add_text(tree, tvb, curr_offset, 1, "Downlink Timeslot Offset: timeslot number %d",(oct & 0x0e)>>1);
3275 return(curr_offset - offset);
3279 de_tp_egprs_mode_flag(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
3281 guint32 curr_offset;
3284 curr_offset = offset;
3286 oct = tvb_get_guint8(tvb, curr_offset);
3289 proto_tree_add_text(tree, tvb, curr_offset, 1, "MS loops back blocks on the uplink using GMSK modulation only");
3291 proto_tree_add_text(tree, tvb, curr_offset, 1, "MS loops back blocks on the uplink using either GMSK or 8-PSK modulation following the detected received modulation");
3293 proto_tree_add_text(tree, tvb, curr_offset, 1, "Downlink Timeslot Offset: timeslot number %d",(oct & 0x0e)>>1);
3297 return(curr_offset - offset);
3301 de_tp_ue_test_loop_mode(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
3303 guint32 curr_offset;
3305 guint8 lb_setup_length,i,j;
3308 curr_offset = offset;
3310 oct = tvb_get_guint8(tvb, curr_offset);
3317 proto_tree_add_text(tree, tvb, curr_offset, 1, "UE test loop mode 1 loop back (loopback of RLC SDUs or PDCP SDUs)");
3318 lb_setup_length = tvb_get_guint8(tvb, curr_offset);
3320 for (i=0,j=0; (i<lb_setup_length) && (j<4); i+=3,j++)
3322 proto_tree_add_text(tree, tvb, curr_offset, 1, "LB setup RB IE %d",j+1);
3323 value = tvb_get_ntohs(tvb, curr_offset);
3325 proto_tree_add_text(tree, tvb, curr_offset, 1, "Uplink RLC SDU size is %d bits",value);
3326 oct = tvb_get_guint8(tvb, curr_offset);
3328 proto_tree_add_text(tree, tvb, curr_offset, 1, "Radio Bearer %d",oct & 0x1f);
3333 proto_tree_add_text(tree, tvb, curr_offset, 1, "UE test loop mode 2 loop back (loopback of transport block data and CRC bits)");
3336 proto_tree_add_text(tree, tvb, curr_offset, 1, "UE test loop mode 3 RLC SDU counting (counting of received RLC SDUs)");
3337 oct = tvb_get_guint8(tvb, curr_offset);
3339 proto_tree_add_text(tree, tvb, curr_offset, 1, "MBMS short transmission identity %d",(oct & 0x1f)+1);
3342 proto_tree_add_text(tree, tvb, curr_offset, 1, "UE test loop mode reserved (%d)",oct & 0x03);
3346 return(curr_offset - offset);
3350 de_tp_ue_positioning_technology(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
3352 guint32 curr_offset;
3355 curr_offset = offset;
3357 oct = tvb_get_guint8(tvb, curr_offset);
3362 proto_tree_add_text(tree, tvb, curr_offset, 1, "AGPS");
3365 proto_tree_add_text(tree, tvb, curr_offset, 1, "UE positioning technology reserved (%d)",oct);
3371 return(curr_offset - offset);
3375 de_tp_rlc_sdu_counter_value(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
3377 guint32 curr_offset;
3380 curr_offset = offset;
3382 value = tvb_get_ntohl(tvb, curr_offset);
3385 proto_tree_add_text(tree, tvb, curr_offset, 1, "UE received RLC SDU counter value %d",value);
3387 return(curr_offset - offset);
3390 guint8 (*dtap_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len) = {
3391 /* Mobility Management Information Elements 10.5.3 */
3392 de_auth_param_rand, /* Authentication Parameter RAND */
3393 de_auth_param_autn, /* Authentication Parameter AUTN (UMTS authentication challenge only) */
3394 de_auth_resp_param, /* Authentication Response Parameter */
3395 de_auth_resp_param_ext, /* Authentication Response Parameter (extension) (UMTS authentication challenge only) */
3396 de_auth_fail_param, /* Authentication Failure Parameter (UMTS authentication challenge only) */
3397 NULL /* handled inline */, /* CM Service Type */
3398 NULL /* handled inline */, /* Identity Type */
3399 NULL /* handled inline */, /* Location Updating Type */
3400 de_network_name, /* Network Name */
3401 de_rej_cause, /* Reject Cause */
3402 NULL /* no associated data */, /* Follow-on Proceed */
3403 de_time_zone, /* Time Zone */
3404 de_time_zone_time, /* Time Zone and Time */
3405 NULL /* no associated data */, /* CTS Permission */
3406 de_lsa_id, /* LSA Identifier */
3407 de_day_saving_time, /* Daylight Saving Time */
3408 NULL, /* Emergency Number List */
3409 /* Call Control Information Elements 10.5.4 */
3410 de_aux_states, /* Auxiliary States */
3411 de_bearer_cap, /* Bearer Capability */
3412 de_cc_cap, /* Call Control Capabilities */
3413 de_call_state, /* Call State */
3414 de_cld_party_bcd_num, /* Called Party BCD Number */
3415 de_cld_party_sub_addr, /* Called Party Subaddress */
3416 de_clg_party_bcd_num, /* Calling Party BCD Number */
3417 de_clg_party_sub_addr, /* Calling Party Subaddress */
3418 de_cause, /* Cause */
3419 NULL /* no associated data */, /* CLIR Suppression */
3420 NULL /* no associated data */, /* CLIR Invocation */
3421 NULL /* handled inline */, /* Congestion Level */
3422 NULL, /* Connected Number */
3423 NULL, /* Connected Subaddress */
3424 de_facility, /* Facility */
3425 NULL, /* High Layer Compatibility */
3426 de_keypad_facility, /* Keypad Facility */
3427 de_llc, /* 10.5.4.18 Low layer compatibility */
3428 NULL, /* More Data */
3429 NULL, /* Notification Indicator */
3430 de_prog_ind, /* Progress Indicator */
3431 NULL, /* Recall type $(CCBS)$ */
3432 NULL, /* Redirecting Party BCD Number */
3433 NULL, /* Redirecting Party Subaddress */
3434 de_repeat_ind, /* Repeat Indicator */
3435 NULL /* no associated data */, /* Reverse Call Setup Direction */
3436 NULL, /* SETUP Container $(CCBS)$ */
3438 de_ss_ver_ind, /* SS Version Indicator */
3439 NULL, /* User-user */
3440 NULL, /* Alerting Pattern $(NIA)$ */
3441 NULL, /* Allowed Actions $(CCBS)$ */
3442 NULL, /* Stream Identifier */
3443 NULL, /* Network Call Control Capabilities */
3444 NULL, /* Cause of No CLI */
3445 NULL, /* Immediate Modification Indicator */
3446 NULL, /* Supported Codec List */
3447 NULL, /* Service Category */
3448 /* Short Message Service Information Elements [5] 8.1.4 */
3449 de_cp_user_data, /* CP-User Data */
3450 de_cp_cause, /* CP-Cause */
3451 /* Tests procedures information elements 3GPP TS 44.014 6.4.0 and 3GPP TS 34.109 6.4.0 */
3452 de_tp_sub_channel, /* Close TCH Loop Cmd Sub-channel */
3453 de_tp_ack, /* Open Loop Cmd Ack */
3454 de_tp_loop_type, /* Close Multi-slot Loop Cmd Loop type */
3455 de_tp_loop_ack, /* Close Multi-slot Loop Ack Result */
3456 de_tp_tested_device, /* Test Interface Tested device */
3457 de_tp_pdu_description, /* GPRS Test Mode Cmd PDU description */
3458 de_tp_mode_flag, /* GPRS Test Mode Cmd Mode flag */
3459 de_tp_egprs_mode_flag, /* EGPRS Start Radio Block Loopback Cmd Mode flag */
3460 de_tp_ue_test_loop_mode, /* Close UE Test Loop Mode */
3461 de_tp_ue_positioning_technology, /* UE Positioning Technology */
3462 de_tp_rlc_sdu_counter_value, /* RLC SDU Counter Value */
3466 /* MESSAGE FUNCTIONS */
3472 dtap_mm_auth_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
3474 guint32 curr_offset;
3478 proto_tree *subtree;
3481 curr_offset = offset;
3484 is_uplink = IS_UPLINK_FALSE;
3487 * special dissection for Cipher Key Sequence Number
3489 oct = tvb_get_guint8(tvb, curr_offset);
3491 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
3492 proto_tree_add_text(tree,
3493 tvb, curr_offset, 1,
3498 proto_tree_add_text(tree,
3499 tvb, curr_offset, 1,
3500 gsm_common_elem_strings[DE_CIPH_KEY_SEQ_NUM].strptr);
3502 subtree = proto_item_add_subtree(item, ett_gsm_common_elem[DE_CIPH_KEY_SEQ_NUM]);
3504 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
3505 proto_tree_add_text(subtree,
3506 tvb, curr_offset, 1,
3510 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
3515 proto_tree_add_text(subtree,
3516 tvb, curr_offset, 1,
3517 "%s : Ciphering Key Sequence Number: No key is available",
3522 proto_tree_add_text(subtree,
3523 tvb, curr_offset, 1,
3524 "%s : Ciphering Key Sequence Number: %u",
3533 if (curr_len <= 0) return;
3535 ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_AUTH_PARAM_RAND);
3537 ELEM_OPT_TLV(0x20, GSM_A_PDU_TYPE_DTAP, DE_AUTH_PARAM_AUTN, "");
3539 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3546 dtap_mm_auth_resp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
3548 guint32 curr_offset;
3552 curr_offset = offset;
3555 is_uplink = IS_UPLINK_TRUE;
3557 ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_AUTH_RESP_PARAM);
3559 ELEM_OPT_TLV(0x21, GSM_A_PDU_TYPE_DTAP, DE_AUTH_RESP_PARAM_EXT, "");
3561 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3568 dtap_mm_auth_fail(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
3570 guint32 curr_offset;
3574 curr_offset = offset;
3577 is_uplink = IS_UPLINK_TRUE;
3579 ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_REJ_CAUSE);
3581 ELEM_OPT_TLV(0x22, GSM_A_PDU_TYPE_DTAP, DE_AUTH_FAIL_PARAM, "");
3583 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3590 dtap_mm_cm_reestab_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
3592 guint32 curr_offset;
3596 proto_tree *subtree;
3599 curr_offset = offset;
3602 is_uplink = IS_UPLINK_TRUE;
3605 * special dissection for Cipher Key Sequence Number
3607 oct = tvb_get_guint8(tvb, curr_offset);
3609 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
3610 proto_tree_add_text(tree,
3611 tvb, curr_offset, 1,
3616 proto_tree_add_text(tree,
3617 tvb, curr_offset, 1,
3618 gsm_common_elem_strings[DE_CIPH_KEY_SEQ_NUM].strptr);
3620 subtree = proto_item_add_subtree(item, ett_gsm_common_elem[DE_CIPH_KEY_SEQ_NUM]);
3622 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
3623 proto_tree_add_text(subtree,
3624 tvb, curr_offset, 1,
3628 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
3633 proto_tree_add_text(subtree,
3634 tvb, curr_offset, 1,
3635 "%s : Ciphering Key Sequence Number: No key is available",
3640 proto_tree_add_text(subtree,
3641 tvb, curr_offset, 1,
3642 "%s : Ciphering Key Sequence Number: %u",
3651 if (curr_len <= 0) return;
3653 ELEM_MAND_LV(GSM_A_PDU_TYPE_COMMON, DE_MS_CM_2, "");
3655 ELEM_MAND_LV(GSM_A_PDU_TYPE_COMMON, DE_MID, "");
3657 ELEM_OPT_TV(0x13, GSM_A_PDU_TYPE_COMMON, DE_LAI, "");
3659 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3666 dtap_mm_cm_srvc_prompt(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
3668 guint32 curr_offset;
3672 curr_offset = offset;
3675 is_uplink = IS_UPLINK_FALSE;
3677 ELEM_MAND_V(GSM_A_PDU_TYPE_COMMON, DE_PD_SAPI);
3679 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3686 dtap_mm_cm_srvc_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
3688 guint32 curr_offset;
3692 curr_offset = offset;
3695 is_uplink = IS_UPLINK_FALSE;
3697 ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_REJ_CAUSE);
3699 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3706 dtap_mm_abort(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
3708 guint32 curr_offset;
3712 curr_offset = offset;
3715 is_uplink = IS_UPLINK_FALSE;
3717 ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_REJ_CAUSE);
3719 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3726 dtap_mm_cm_srvc_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
3728 guint32 curr_offset;
3732 proto_tree *subtree;
3736 curr_offset = offset;
3739 is_uplink = IS_UPLINK_TRUE;
3742 * special dissection for CM Service Type
3744 oct = tvb_get_guint8(tvb, curr_offset);
3747 proto_tree_add_text(tree,
3748 tvb, curr_offset, 1,
3749 gsm_common_elem_strings[DE_CIPH_KEY_SEQ_NUM].strptr);
3751 subtree = proto_item_add_subtree(item, ett_gsm_common_elem[DE_CIPH_KEY_SEQ_NUM]);
3753 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
3754 proto_tree_add_text(subtree,
3755 tvb, curr_offset, 1,
3759 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
3761 switch ((oct & 0x70) >> 4)
3764 proto_tree_add_text(subtree,
3765 tvb, curr_offset, 1,
3766 "%s : Ciphering Key Sequence Number: No key is available",
3771 proto_tree_add_text(subtree,
3772 tvb, curr_offset, 1,
3773 "%s : Ciphering Key Sequence Number: %u",
3780 proto_tree_add_text(tree,
3781 tvb, curr_offset, 1,
3782 gsm_dtap_elem_strings[DE_CM_SRVC_TYPE].strptr);
3784 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_CM_SRVC_TYPE]);
3788 case 0x01: str = "Mobile originating call establishment or packet mode connection establishment"; break;
3789 case 0x02: str = "Emergency call establishment"; break;
3790 case 0x04: str = "Short message service"; break;
3791 case 0x08: str = "Supplementary service activation"; break;
3792 case 0x09: str = "Voice group call establishment"; break;
3793 case 0x0a: str = "Voice broadcast call establishment"; break;
3794 case 0x0b: str = "Location Services"; break;
3800 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
3801 proto_tree_add_text(subtree,
3802 tvb, curr_offset, 1,
3803 "%s : Service Type: (%u) %s",
3811 if (curr_len <= 0) return;
3813 ELEM_MAND_LV(GSM_A_PDU_TYPE_COMMON, DE_MS_CM_2, "");
3815 ELEM_MAND_LV(GSM_A_PDU_TYPE_COMMON, DE_MID, "");
3817 ELEM_OPT_TV_SHORT(0x80, GSM_A_PDU_TYPE_COMMON, DE_PRIO, "");
3819 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3826 dtap_mm_id_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
3829 guint32 curr_offset;
3831 proto_tree *subtree;
3835 curr_offset = offset;
3838 is_uplink = IS_UPLINK_FALSE;
3841 * special dissection for Identity Type
3843 oct = tvb_get_guint8(tvb, curr_offset);
3845 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
3846 proto_tree_add_text(tree,
3847 tvb, curr_offset, 1,
3852 proto_tree_add_text(tree,
3853 tvb, curr_offset, 1,
3854 gsm_dtap_elem_strings[DE_ID_TYPE].strptr);
3856 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_ID_TYPE]);
3858 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
3859 proto_tree_add_text(subtree,
3860 tvb, curr_offset, 1,
3866 case 1: str = "IMSI"; break;
3867 case 2: str = "IMEI"; break;
3868 case 3: str = "IMEISV"; break;
3869 case 4: str = "TMSI"; break;
3875 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
3876 proto_tree_add_text(subtree,
3877 tvb, curr_offset, 1,
3878 "%s : Type of identity: %s",
3885 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3892 dtap_mm_id_resp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
3894 guint32 curr_offset;
3898 curr_offset = offset;
3901 is_uplink = IS_UPLINK_TRUE;
3903 ELEM_MAND_LV(GSM_A_PDU_TYPE_COMMON, DE_MID, "");
3905 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3912 dtap_mm_imsi_det_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
3914 guint32 curr_offset;
3918 curr_offset = offset;
3921 is_uplink = IS_UPLINK_TRUE;
3923 ELEM_MAND_V(GSM_A_PDU_TYPE_COMMON, DE_MS_CM_1);
3925 ELEM_MAND_LV(GSM_A_PDU_TYPE_COMMON, DE_MID, "");
3927 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3934 dtap_mm_loc_upd_acc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
3936 guint32 curr_offset;
3940 curr_offset = offset;
3943 is_uplink = IS_UPLINK_FALSE;
3945 ELEM_MAND_V(GSM_A_PDU_TYPE_COMMON, DE_LAI);
3947 ELEM_OPT_TLV(0x17, GSM_A_PDU_TYPE_COMMON, DE_MID, "");
3949 ELEM_OPT_T(0xa1, GSM_A_PDU_TYPE_DTAP, DE_FOP, "");
3951 ELEM_OPT_T(0xa2, GSM_A_PDU_TYPE_DTAP, DE_CTS_PERM, "");
3953 ELEM_OPT_TLV(0x4a, GSM_A_PDU_TYPE_COMMON, DE_PLMN_LIST, " Equivalent");
3955 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3962 dtap_mm_loc_upd_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
3964 guint32 curr_offset;
3968 curr_offset = offset;
3971 is_uplink = IS_UPLINK_FALSE;
3973 ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_REJ_CAUSE);
3975 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3982 dtap_mm_loc_upd_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
3984 guint32 curr_offset;
3988 proto_tree *subtree;
3992 curr_offset = offset;
3995 is_uplink = IS_UPLINK_TRUE;
3998 * special dissection for Location Updating Type
4000 oct = tvb_get_guint8(tvb, curr_offset);
4003 proto_tree_add_text(tree,
4004 tvb, curr_offset, 1,
4005 gsm_common_elem_strings[DE_CIPH_KEY_SEQ_NUM].strptr);
4007 subtree = proto_item_add_subtree(item, ett_gsm_common_elem[DE_CIPH_KEY_SEQ_NUM]);
4009 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
4010 proto_tree_add_text(subtree,
4011 tvb, curr_offset, 1,
4015 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
4017 switch ((oct & 0x70) >> 4)
4020 proto_tree_add_text(subtree,
4021 tvb, curr_offset, 1,
4022 "%s : Ciphering Key Sequence Number: No key is available",
4027 proto_tree_add_text(subtree,
4028 tvb, curr_offset, 1,
4029 "%s : Ciphering Key Sequence Number: %u",
4036 proto_tree_add_text(tree,
4037 tvb, curr_offset, 1,
4038 gsm_dtap_elem_strings[DE_LOC_UPD_TYPE].strptr);
4040 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_LOC_UPD_TYPE]);
4042 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
4043 proto_tree_add_text(subtree,
4044 tvb, curr_offset, 1,
4045 "%s : Follow-On Request (FOR): %s",
4047 (oct & 0x08) ? "Follow-on request pending" : "No follow-on request pending");
4049 other_decode_bitfield_value(a_bigbuf, oct, 0x04, 8);
4050 proto_tree_add_text(subtree,
4051 tvb, curr_offset, 1,
4057 case 0: str = "Normal"; break;
4058 case 1: str = "Periodic"; break;
4059 case 2: str = "IMSI attach"; break;
4065 other_decode_bitfield_value(a_bigbuf, oct, 0x03, 8);
4066 proto_tree_add_text(subtree,
4067 tvb, curr_offset, 1,
4068 "%s : Updating Type: %s",
4072 proto_item_append_text(item, " - %s", str);
4077 if (curr_len <= 0) return;
4079 ELEM_MAND_V(GSM_A_PDU_TYPE_COMMON, DE_LAI);
4081 ELEM_MAND_V(GSM_A_PDU_TYPE_COMMON, DE_MS_CM_1);
4083 ELEM_MAND_LV(GSM_A_PDU_TYPE_COMMON, DE_MID, "");
4085 ELEM_OPT_TLV(0x33, GSM_A_PDU_TYPE_COMMON, DE_MS_CM_2, "");
4087 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4095 dtap_mm_mm_info(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
4097 guint32 curr_offset;
4101 curr_offset = offset;
4104 is_uplink = IS_UPLINK_TRUE;
4106 ELEM_OPT_TLV(0x43, GSM_A_PDU_TYPE_DTAP, DE_NETWORK_NAME, " - Full Name");
4108 ELEM_OPT_TLV(0x45, GSM_A_PDU_TYPE_DTAP, DE_NETWORK_NAME, " - Short Name");
4110 ELEM_OPT_TV(0x46, GSM_A_PDU_TYPE_DTAP, DE_TIME_ZONE, " - Local");
4112 ELEM_OPT_TV(0x47, GSM_A_PDU_TYPE_DTAP, DE_TIME_ZONE_TIME, " - Universal Time and Local Time Zone");
4114 ELEM_OPT_TLV(0x48, GSM_A_PDU_TYPE_DTAP, DE_LSA_ID, "");
4116 ELEM_OPT_TLV(0x49, GSM_A_PDU_TYPE_DTAP, DE_DAY_SAVING_TIME, "");
4118 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4125 dtap_mm_mm_status(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
4127 guint32 curr_offset;
4131 curr_offset = offset;
4134 is_uplink = IS_UPLINK_TRUE;
4136 ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_REJ_CAUSE);
4138 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4145 dtap_mm_tmsi_realloc_cmd(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
4147 guint32 curr_offset;
4151 curr_offset = offset;
4154 is_uplink = IS_UPLINK_FALSE;
4156 ELEM_MAND_V(GSM_A_PDU_TYPE_COMMON, DE_LAI);
4158 ELEM_MAND_LV(GSM_A_PDU_TYPE_COMMON, DE_MID, "");
4160 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4167 dtap_cc_alerting(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
4169 guint32 curr_offset;
4173 curr_offset = offset;
4176 is_uplink = IS_UPLINK_TRUE;
4178 ELEM_OPT_TLV(0x1c, GSM_A_PDU_TYPE_DTAP, DE_FACILITY, "");
4180 ELEM_OPT_TLV(0x1e, GSM_A_PDU_TYPE_DTAP, DE_PROG_IND, "");
4182 ELEM_OPT_TLV(0x7e, GSM_A_PDU_TYPE_DTAP, DE_USER_USER, "");
4186 ELEM_OPT_TLV(0x7f, GSM_A_PDU_TYPE_DTAP, DE_SS_VER_IND, "");
4188 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4195 dtap_cc_call_conf(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
4197 guint32 curr_offset;
4201 curr_offset = offset;
4204 is_uplink = IS_UPLINK_TRUE;
4206 ELEM_OPT_TV_SHORT(0xd0, GSM_A_PDU_TYPE_DTAP, DE_REPEAT_IND, " BC repeat indicator");
4208 ELEM_OPT_TLV(0x04, GSM_A_PDU_TYPE_DTAP, DE_BEARER_CAP, " 1");
4210 ELEM_OPT_TLV(0x04, GSM_A_PDU_TYPE_DTAP, DE_BEARER_CAP, " 2");
4212 ELEM_OPT_TLV(0x08, GSM_A_PDU_TYPE_DTAP, DE_CAUSE, "");
4214 ELEM_OPT_TLV(0x15, GSM_A_PDU_TYPE_DTAP, DE_CC_CAP, "");
4216 ELEM_OPT_TLV(0x2d, GSM_A_PDU_TYPE_DTAP, DE_SI, "");
4218 ELEM_OPT_TLV(0x40, GSM_A_PDU_TYPE_DTAP, DE_SUP_CODEC_LIST, "");
4220 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4227 dtap_cc_call_proceed(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
4229 guint32 curr_offset;
4233 curr_offset = offset;
4236 is_uplink = IS_UPLINK_FALSE;
4238 ELEM_OPT_TV_SHORT(0xd0, GSM_A_PDU_TYPE_DTAP, DE_REPEAT_IND, " BC repeat indicator");
4240 ELEM_OPT_TLV(0x04, GSM_A_PDU_TYPE_DTAP, DE_BEARER_CAP, " 1");
4242 ELEM_OPT_TLV(0x04, GSM_A_PDU_TYPE_DTAP, DE_BEARER_CAP, " 2");
4244 ELEM_OPT_TLV(0x1c, GSM_A_PDU_TYPE_DTAP, DE_FACILITY, "");
4246 ELEM_OPT_TLV(0x1e, GSM_A_PDU_TYPE_DTAP, DE_PROG_IND, "");
4248 ELEM_OPT_TV_SHORT(0x80, GSM_A_PDU_TYPE_COMMON, DE_PRIO, "");
4250 ELEM_OPT_TLV(0x2f, GSM_A_PDU_TYPE_DTAP, DE_NET_CC_CAP, "");
4252 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4259 dtap_cc_congestion_control(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
4261 guint32 curr_offset;
4265 proto_tree *subtree;
4269 curr_offset = offset;
4272 is_uplink = IS_UPLINK_FALSE;
4275 * special dissection for Congestion Level
4277 oct = tvb_get_guint8(tvb, curr_offset);
4279 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
4280 proto_tree_add_text(tree,
4281 tvb, curr_offset, 1,
4286 proto_tree_add_text(tree,
4287 tvb, curr_offset, 1,
4288 gsm_dtap_elem_strings[DE_CONGESTION].strptr);
4290 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_CONGESTION]);
4294 case 0: str = "Receiver ready"; break;
4295 case 15: str = "Receiver not ready"; break;
4301 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
4302 proto_tree_add_text(subtree,
4303 tvb, curr_offset, 1,
4304 "%s : Congestion level: %s",
4311 if (curr_len <= 0) return;
4313 ELEM_OPT_TLV(0x08, GSM_A_PDU_TYPE_DTAP, DE_CAUSE, "");
4315 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4322 dtap_cc_connect(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
4324 guint32 curr_offset;
4328 curr_offset = offset;
4331 is_uplink = IS_UPLINK_TRUE;
4333 ELEM_OPT_TLV(0x1c, GSM_A_PDU_TYPE_DTAP, DE_FACILITY, "");
4335 ELEM_OPT_TLV(0x1e, GSM_A_PDU_TYPE_DTAP, DE_PROG_IND, "");
4337 ELEM_OPT_TLV(0x4c, GSM_A_PDU_TYPE_DTAP, DE_CONN_NUM, "");
4339 ELEM_OPT_TLV(0x4d, GSM_A_PDU_TYPE_DTAP, DE_CONN_SUB_ADDR, "");
4341 ELEM_OPT_TLV(0x7e, GSM_A_PDU_TYPE_DTAP, DE_USER_USER, "");
4345 ELEM_OPT_TLV(0x7f, GSM_A_PDU_TYPE_DTAP, DE_SS_VER_IND, "");
4347 ELEM_OPT_TLV(0x2d, GSM_A_PDU_TYPE_DTAP, DE_SI, "");
4349 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4356 dtap_cc_disconnect(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
4358 guint32 curr_offset;
4362 curr_offset = offset;
4365 is_uplink = IS_UPLINK_TRUE;
4367 ELEM_MAND_LV(GSM_A_PDU_TYPE_DTAP, DE_CAUSE, "");
4369 ELEM_OPT_TLV(0x1c, GSM_A_PDU_TYPE_DTAP, DE_FACILITY, "");
4371 ELEM_OPT_TLV(0x1e, GSM_A_PDU_TYPE_DTAP, DE_PROG_IND, "");
4373 ELEM_OPT_TLV(0x7e, GSM_A_PDU_TYPE_DTAP, DE_USER_USER, "");
4375 ELEM_OPT_TLV(0x7b, GSM_A_PDU_TYPE_DTAP, DE_ALLOWED_ACTIONS, "");
4379 ELEM_OPT_TLV(0x7f, GSM_A_PDU_TYPE_DTAP, DE_SS_VER_IND, "");
4381 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4388 dtap_cc_emerg_setup(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
4390 guint32 curr_offset;
4394 curr_offset = offset;
4397 is_uplink = IS_UPLINK_TRUE;
4399 ELEM_OPT_TLV(0x04, GSM_A_PDU_TYPE_DTAP, DE_BEARER_CAP, "");
4401 ELEM_OPT_TLV(0x2d, GSM_A_PDU_TYPE_DTAP, DE_SI, "");
4403 ELEM_OPT_TLV(0x40, GSM_A_PDU_TYPE_DTAP, DE_SUP_CODEC_LIST, "");
4405 ELEM_OPT_TLV(0x2e, GSM_A_PDU_TYPE_DTAP, DE_SRVC_CAT, " Emergency");
4407 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4414 dtap_cc_facility(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
4416 guint32 curr_offset;
4420 curr_offset = offset;
4423 is_uplink = IS_UPLINK_TRUE;
4425 ELEM_MAND_LV(GSM_A_PDU_TYPE_DTAP, DE_FACILITY, "");
4429 ELEM_OPT_TLV(0x7f, GSM_A_PDU_TYPE_DTAP, DE_SS_VER_IND, "");
4431 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4438 dtap_cc_hold_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
4440 guint32 curr_offset;
4444 curr_offset = offset;
4447 is_uplink = IS_UPLINK_FALSE;
4449 ELEM_MAND_LV(GSM_A_PDU_TYPE_DTAP, DE_CAUSE, "");
4451 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4458 dtap_cc_modify(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
4460 guint32 curr_offset;
4464 curr_offset = offset;
4467 is_uplink = IS_UPLINK_TRUE;
4469 ELEM_MAND_LV(GSM_A_PDU_TYPE_DTAP, DE_BEARER_CAP, "");
4471 ELEM_OPT_TLV(0x7c, GSM_A_PDU_TYPE_DTAP, DE_LLC, "");
4473 ELEM_OPT_TLV(0x7d, GSM_A_PDU_TYPE_DTAP, DE_HLC, "");
4475 ELEM_OPT_T(0xa3, GSM_A_PDU_TYPE_DTAP, DE_REV_CALL_SETUP_DIR, "");
4477 ELEM_OPT_T(0xa4, GSM_A_PDU_TYPE_DTAP, DE_IMM_MOD_IND, "");
4479 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4486 dtap_cc_modify_complete(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
4488 guint32 curr_offset;
4492 curr_offset = offset;
4495 is_uplink = IS_UPLINK_TRUE;
4497 ELEM_MAND_LV(GSM_A_PDU_TYPE_DTAP, DE_BEARER_CAP, "");
4499 ELEM_OPT_TLV(0x7c, GSM_A_PDU_TYPE_DTAP, DE_LLC, "");
4501 ELEM_OPT_TLV(0x7d, GSM_A_PDU_TYPE_DTAP, DE_HLC, "");
4503 ELEM_OPT_T(0xa3, GSM_A_PDU_TYPE_DTAP, DE_REV_CALL_SETUP_DIR, "");
4505 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4512 dtap_cc_modify_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
4514 guint32 curr_offset;
4518 curr_offset = offset;
4521 is_uplink = IS_UPLINK_FALSE;
4523 ELEM_MAND_LV(GSM_A_PDU_TYPE_DTAP, DE_BEARER_CAP, "");
4525 ELEM_MAND_LV(GSM_A_PDU_TYPE_DTAP, DE_CAUSE, "");
4527 ELEM_OPT_TLV(0x7c, GSM_A_PDU_TYPE_DTAP, DE_LLC, "");
4529 ELEM_OPT_TLV(0x7d, GSM_A_PDU_TYPE_DTAP, DE_HLC, "");
4531 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4538 dtap_cc_notify(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
4540 guint32 curr_offset;
4544 curr_offset = offset;
4547 is_uplink = IS_UPLINK_FALSE;
4549 ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_NOT_IND);
4551 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4558 dtap_cc_progress(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
4560 guint32 curr_offset;
4564 curr_offset = offset;
4567 is_uplink = IS_UPLINK_FALSE;
4569 ELEM_MAND_LV(GSM_A_PDU_TYPE_DTAP, DE_PROG_IND, "");
4571 ELEM_OPT_TLV(0x7e, GSM_A_PDU_TYPE_DTAP, DE_USER_USER, "");
4573 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4580 dtap_cc_cc_est(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
4582 guint32 curr_offset;
4586 curr_offset = offset;
4589 is_uplink = IS_UPLINK_FALSE;
4591 ELEM_MAND_LV(GSM_A_PDU_TYPE_DTAP, DE_SETUP_CONTAINER, "");
4593 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4600 dtap_cc_cc_est_conf(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
4602 guint32 curr_offset;
4606 curr_offset = offset;
4609 is_uplink = IS_UPLINK_TRUE;
4611 ELEM_OPT_TV_SHORT(0xd0, GSM_A_PDU_TYPE_DTAP, DE_REPEAT_IND, " Repeat indicator");
4613 ELEM_MAND_TLV(0x04, GSM_A_PDU_TYPE_DTAP, DE_BEARER_CAP, " 1");
4615 ELEM_OPT_TLV(0x04, GSM_A_PDU_TYPE_DTAP, DE_BEARER_CAP, " 2");
4617 ELEM_OPT_TLV(0x08, GSM_A_PDU_TYPE_DTAP, DE_CAUSE, "");
4619 ELEM_OPT_TLV(0x40, GSM_A_PDU_TYPE_DTAP, DE_SUP_CODEC_LIST, "");
4621 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4628 dtap_cc_release(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
4630 guint32 curr_offset;
4634 curr_offset = offset;
4637 is_uplink = IS_UPLINK_TRUE;
4639 ELEM_OPT_TLV(0x08, GSM_A_PDU_TYPE_DTAP, DE_CAUSE, "");
4641 ELEM_OPT_TLV(0x08, GSM_A_PDU_TYPE_DTAP, DE_CAUSE, " 2");
4643 ELEM_OPT_TLV(0x1c, GSM_A_PDU_TYPE_DTAP, DE_FACILITY, "");
4645 ELEM_OPT_TLV(0x7e, GSM_A_PDU_TYPE_DTAP, DE_USER_USER, "");
4649 ELEM_OPT_TLV(0x7f, GSM_A_PDU_TYPE_DTAP, DE_SS_VER_IND, "");
4651 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4658 dtap_cc_recall(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
4660 guint32 curr_offset;
4664 curr_offset = offset;
4667 is_uplink = IS_UPLINK_FALSE;
4669 ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_RECALL_TYPE);
4671 ELEM_MAND_LV(GSM_A_PDU_TYPE_DTAP, DE_FACILITY, "");
4673 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4680 dtap_cc_release_complete(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
4682 guint32 curr_offset;
4686 curr_offset = offset;
4689 is_uplink = IS_UPLINK_FALSE;
4691 ELEM_OPT_TLV(0x08, GSM_A_PDU_TYPE_DTAP, DE_CAUSE, "");
4693 ELEM_OPT_TLV(0x1c, GSM_A_PDU_TYPE_DTAP, DE_FACILITY, "");
4695 ELEM_OPT_TLV(0x7e, GSM_A_PDU_TYPE_DTAP, DE_USER_USER, "");
4699 ELEM_OPT_TLV(0x7f, GSM_A_PDU_TYPE_DTAP, DE_SS_VER_IND, "");
4701 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4708 dtap_cc_retrieve_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
4710 guint32 curr_offset;
4714 curr_offset = offset;
4717 is_uplink = IS_UPLINK_FALSE;
4719 ELEM_MAND_LV(GSM_A_PDU_TYPE_DTAP, DE_CAUSE, "");
4721 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4726 * 3GPP TS 24.008 version 7.5.0 Release 7
4729 dtap_cc_setup(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
4731 guint32 curr_offset;
4735 curr_offset = offset;
4738 is_uplink = IS_UPLINK_TRUE;
4740 ELEM_OPT_TV_SHORT(0xd0, GSM_A_PDU_TYPE_DTAP, DE_REPEAT_IND, " BC repeat indicator");
4742 ELEM_OPT_TLV(0x04, GSM_A_PDU_TYPE_DTAP, DE_BEARER_CAP, " 1");
4744 ELEM_OPT_TLV(0x04, GSM_A_PDU_TYPE_DTAP, DE_BEARER_CAP, " 2");
4746 ELEM_OPT_TLV(0x1c, GSM_A_PDU_TYPE_DTAP, DE_FACILITY, "");
4748 ELEM_OPT_TLV(0x1e, GSM_A_PDU_TYPE_DTAP, DE_PROG_IND, "");
4750 ELEM_OPT_TV(0x34, GSM_A_PDU_TYPE_DTAP, DE_SIGNAL, "");
4752 ELEM_OPT_TLV(0x5c, GSM_A_PDU_TYPE_DTAP, DE_CLG_PARTY_BCD_NUM, "");
4754 ELEM_OPT_TLV(0x5d, GSM_A_PDU_TYPE_DTAP, DE_CLG_PARTY_SUB_ADDR, "");
4756 ELEM_OPT_TLV(0x5e, GSM_A_PDU_TYPE_DTAP, DE_CLD_PARTY_BCD_NUM, "");
4758 ELEM_OPT_TLV(0x6d, GSM_A_PDU_TYPE_DTAP, DE_CLD_PARTY_SUB_ADDR, "");
4760 ELEM_OPT_TLV(0x74, GSM_A_PDU_TYPE_DTAP, DE_RED_PARTY_BCD_NUM, "");
4762 ELEM_OPT_TLV(0x75, GSM_A_PDU_TYPE_DTAP, DE_RED_PARTY_SUB_ADDR, "");
4764 ELEM_OPT_TV_SHORT(0xd0, GSM_A_PDU_TYPE_DTAP, DE_REPEAT_IND, " LLC repeat indicator");
4766 ELEM_OPT_TLV(0x7c, GSM_A_PDU_TYPE_DTAP, DE_LLC, " 1");
4768 ELEM_OPT_TLV(0x7c, GSM_A_PDU_TYPE_DTAP, DE_LLC, " 2");
4770 ELEM_OPT_TV_SHORT(0xd0, GSM_A_PDU_TYPE_DTAP, DE_REPEAT_IND, " HLC repeat indicator");
4772 ELEM_OPT_TLV(0x7d, GSM_A_PDU_TYPE_DTAP, DE_HLC, " 1");
4774 ELEM_OPT_TLV(0x7d, GSM_A_PDU_TYPE_DTAP, DE_HLC, " 2");
4776 ELEM_OPT_TLV(0x7e, GSM_A_PDU_TYPE_DTAP, DE_USER_USER, "");
4780 ELEM_OPT_TV_SHORT(0x80, GSM_A_PDU_TYPE_COMMON, DE_PRIO, "");
4782 ELEM_OPT_TLV(0x19, GSM_A_PDU_TYPE_DTAP, DE_ALERT_PATTERN, "");
4784 ELEM_OPT_TLV(0x2f, GSM_A_PDU_TYPE_DTAP, DE_NET_CC_CAP, "");
4786 ELEM_OPT_TLV(0x3a, GSM_A_PDU_TYPE_DTAP, DE_CAUSE_NO_CLI, "");
4788 /* Backup bearer capability O TLV 3-15 10.5.4.4a */
4789 ELEM_OPT_TLV(0x41, GSM_A_PDU_TYPE_DTAP, DE_BEARER_CAP, "");
4793 ELEM_OPT_TLV(0x7f, GSM_A_PDU_TYPE_DTAP, DE_SS_VER_IND, "");
4795 ELEM_OPT_T(0xa1, GSM_A_PDU_TYPE_DTAP, DE_CLIR_SUP, "");
4797 ELEM_OPT_T(0xa2, GSM_A_PDU_TYPE_DTAP, DE_CLIR_INV, "");
4799 ELEM_OPT_TLV(0x15, GSM_A_PDU_TYPE_DTAP, DE_CC_CAP, "");
4801 ELEM_OPT_TLV(0x1d, GSM_A_PDU_TYPE_DTAP, DE_FACILITY, " $(CCBS)$ (advanced recall alignment)");
4803 ELEM_OPT_TLV(0x1b, GSM_A_PDU_TYPE_DTAP, DE_FACILITY, " (recall alignment Not essential) $(CCBS)$");
4805 ELEM_OPT_TLV(0x2d, GSM_A_PDU_TYPE_DTAP, DE_SI, "");
4807 ELEM_OPT_TLV(0x40, GSM_A_PDU_TYPE_DTAP, DE_SUP_CODEC_LIST, "");
4809 /*A3 Redial Redial O T 1 10.5.4.34
4810 * TODO add this element
4811 * ELEM_OPT_T(0xA3, GSM_A_PDU_TYPE_DTAP, DE_REDIAL, "");
4814 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4821 dtap_cc_start_cc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
4823 guint32 curr_offset;
4827 curr_offset = offset;
4830 is_uplink = IS_UPLINK_FALSE;
4832 ELEM_OPT_TLV(0x15, GSM_A_PDU_TYPE_DTAP, DE_CC_CAP, "");
4834 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4841 dtap_cc_start_dtmf(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
4843 guint32 curr_offset;
4847 curr_offset = offset;
4850 is_uplink = IS_UPLINK_TRUE;
4852 ELEM_MAND_TV(0x2c, GSM_A_PDU_TYPE_DTAP, DE_KEYPAD_FACILITY, "");
4854 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4861 dtap_cc_start_dtmf_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
4863 guint32 curr_offset;
4867 curr_offset = offset;
4870 is_uplink = IS_UPLINK_FALSE;
4872 ELEM_MAND_TV(0x2c, GSM_A_PDU_TYPE_DTAP, DE_KEYPAD_FACILITY, "");
4874 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4881 dtap_cc_start_dtmf_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
4883 guint32 curr_offset;
4887 curr_offset = offset;
4890 is_uplink = IS_UPLINK_FALSE;
4892 ELEM_MAND_LV(GSM_A_PDU_TYPE_DTAP, DE_CAUSE, "");
4894 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4901 dtap_cc_status(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
4903 guint32 curr_offset;
4907 curr_offset = offset;
4910 is_uplink = IS_UPLINK_FALSE;
4912 ELEM_MAND_LV(GSM_A_PDU_TYPE_DTAP, DE_CAUSE, "");
4914 ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_CALL_STATE);
4916 ELEM_OPT_TLV(0x24, GSM_A_PDU_TYPE_DTAP, DE_AUX_STATES, "");
4918 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4925 dtap_cc_user_info(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
4927 guint32 curr_offset;
4931 curr_offset = offset;
4934 is_uplink = IS_UPLINK_TRUE;
4936 ELEM_MAND_LV(GSM_A_PDU_TYPE_DTAP, DE_USER_USER, "");
4938 ELEM_OPT_T(0xa0, GSM_A_PDU_TYPE_DTAP, DE_MORE_DATA, "");
4940 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4947 dtap_ss_register(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
4949 guint32 curr_offset;
4953 curr_offset = offset;
4956 is_uplink = IS_UPLINK_TRUE;
4958 ELEM_MAND_TLV(0x1c, GSM_A_PDU_TYPE_DTAP, DE_FACILITY, "");
4960 ELEM_OPT_TLV(0x7f, GSM_A_PDU_TYPE_DTAP, DE_SS_VER_IND, "");
4962 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4969 dtap_sms_cp_data(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
4971 guint32 curr_offset;
4975 curr_offset = offset;
4978 is_uplink = IS_UPLINK_TRUE;
4980 ELEM_MAND_LV(GSM_A_PDU_TYPE_DTAP, DE_CP_USER_DATA, "");
4982 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4989 dtap_sms_cp_error(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
4991 guint32 curr_offset;
4995 curr_offset = offset;
4998 is_uplink = IS_UPLINK_TRUE;
5000 ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_CP_CAUSE);
5002 EXTRANEOUS_DATA_CHECK(curr_len, 0);
5006 dtap_tp_close_tch_loop_cmd(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
5008 guint32 curr_offset;
5013 curr_offset = offset;
5015 ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_TP_SUB_CHANNEL );
5017 EXTRANEOUS_DATA_CHECK(curr_len, 0);
5021 dtap_tp_open_loop_cmd(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
5023 guint32 curr_offset;
5028 curr_offset = offset;
5031 ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_TP_ACK );
5033 EXTRANEOUS_DATA_CHECK(curr_len, 0);
5037 dtap_tp_multi_slot_loop_cmd(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
5039 guint32 curr_offset;
5044 curr_offset = offset;
5046 ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_TP_LOOP_TYPE );
5048 EXTRANEOUS_DATA_CHECK(curr_len, 0);
5052 dtap_tp_multi_slot_loop_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
5054 guint32 curr_offset;
5059 curr_offset = offset;
5061 ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_TP_LOOP_ACK );
5063 EXTRANEOUS_DATA_CHECK(curr_len, 0);
5067 dtap_tp_test_interface(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
5069 guint32 curr_offset;
5074 curr_offset = offset;
5076 ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_TP_TESTED_DEVICE );
5078 EXTRANEOUS_DATA_CHECK(curr_len, 0);
5082 dtap_tp_gprs_test_mode_cmd(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
5084 guint32 curr_offset;
5089 curr_offset = offset;
5091 ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_TP_PDU_DESCRIPTION );
5093 ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_TP_MODE_FLAG );
5095 EXTRANEOUS_DATA_CHECK(curr_len, 0);
5099 dtap_tp_egprs_start_radio_block_loopback_cmd(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
5101 guint32 curr_offset;
5106 curr_offset = offset;
5108 ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_TP_EGPRS_MODE_FLAG );
5110 EXTRANEOUS_DATA_CHECK(curr_len, 0);
5114 dtap_tp_close_ue_test_loop(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
5116 guint32 curr_offset;
5121 curr_offset = offset;
5123 ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_TP_UE_TEST_LOOP_MODE );
5125 EXTRANEOUS_DATA_CHECK(curr_len, 0);
5129 dtap_tp_reset_ue_positioning_ue_stored_information(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
5131 guint32 curr_offset;
5136 curr_offset = offset;
5138 ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_TP_UE_POSITIONING_TECHNOLOGY );
5140 EXTRANEOUS_DATA_CHECK(curr_len, 0);
5144 dtap_tp_ue_test_loop_mode_3_rlc_sdu_counter_response(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
5146 guint32 curr_offset;
5151 curr_offset = offset;
5153 ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_TP_RLC_SDU_COUNTER_VALUE );
5155 EXTRANEOUS_DATA_CHECK(curr_len, 0);
5158 #define NUM_GSM_DTAP_MSG_MM (sizeof(gsm_a_dtap_msg_mm_strings)/sizeof(value_string))
5159 static gint ett_gsm_dtap_msg_mm[NUM_GSM_DTAP_MSG_MM];
5160 static void (*dtap_msg_mm_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) = {
5161 dtap_mm_imsi_det_ind, /* IMSI Detach Indication */
5162 dtap_mm_loc_upd_acc, /* Location Updating Accept */
5163 dtap_mm_loc_upd_rej, /* Location Updating Reject */
5164 dtap_mm_loc_upd_req, /* Location Updating Request */
5165 NULL /* no associated data */, /* Authentication Reject */
5166 dtap_mm_auth_req, /* Authentication Request */
5167 dtap_mm_auth_resp, /* Authentication Response */
5168 dtap_mm_auth_fail, /* Authentication Failure */
5169 dtap_mm_id_req, /* Identity Request */
5170 dtap_mm_id_resp, /* Identity Response */
5171 dtap_mm_tmsi_realloc_cmd, /* TMSI Reallocation Command */
5172 NULL /* no associated data */, /* TMSI Reallocation Complete */
5173 NULL /* no associated data */, /* CM Service Accept */
5174 dtap_mm_cm_srvc_rej, /* CM Service Reject */
5175 NULL /* no associated data */, /* CM Service Abort */
5176 dtap_mm_cm_srvc_req, /* CM Service Request */
5177 dtap_mm_cm_srvc_prompt, /* CM Service Prompt */
5178 NULL, /* Reserved: was allocated in earlier phases of the protocol */
5179 dtap_mm_cm_reestab_req, /* CM Re-establishment Request */
5180 dtap_mm_abort, /* Abort */
5181 NULL /* no associated data */, /* MM Null */
5182 dtap_mm_mm_status, /* MM Status */
5183 dtap_mm_mm_info, /* MM Information */
5187 #define NUM_GSM_DTAP_MSG_CC (sizeof(gsm_a_dtap_msg_cc_strings)/sizeof(value_string))
5188 static gint ett_gsm_dtap_msg_cc[NUM_GSM_DTAP_MSG_CC];
5189 static void (*dtap_msg_cc_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) = {
5190 dtap_cc_alerting, /* Alerting */
5191 dtap_cc_call_conf, /* Call Confirmed */
5192 dtap_cc_call_proceed, /* Call Proceeding */
5193 dtap_cc_connect, /* Connect */
5194 NULL /* no associated data */, /* Connect Acknowledge */
5195 dtap_cc_emerg_setup, /* Emergency Setup */
5196 dtap_cc_progress, /* Progress */
5197 dtap_cc_cc_est, /* CC-Establishment */
5198 dtap_cc_cc_est_conf, /* CC-Establishment Confirmed */
5199 dtap_cc_recall, /* Recall */
5200 dtap_cc_start_cc, /* Start CC */
5201 dtap_cc_setup, /* Setup */
5202 dtap_cc_modify, /* Modify */
5203 dtap_cc_modify_complete, /* Modify Complete */
5204 dtap_cc_modify_rej, /* Modify Reject */
5205 dtap_cc_user_info, /* User Information */
5206 NULL /* no associated data */, /* Hold */
5207 NULL /* no associated data */, /* Hold Acknowledge */
5208 dtap_cc_hold_rej, /* Hold Reject */
5209 NULL /* no associated data */, /* Retrieve */
5210 NULL /* no associated data */, /* Retrieve Acknowledge */
5211 dtap_cc_retrieve_rej, /* Retrieve Reject */
5212 dtap_cc_disconnect, /* Disconnect */
5213 dtap_cc_release, /* Release */
5214 dtap_cc_release_complete, /* Release Complete */
5215 dtap_cc_congestion_control, /* Congestion Control */
5216 dtap_cc_notify, /* Notify */
5217 dtap_cc_status, /* Status */
5218 NULL /* no associated data */, /* Status Enquiry */
5219 dtap_cc_start_dtmf, /* Start DTMF */
5220 NULL /* no associated data */, /* Stop DTMF */
5221 NULL /* no associated data */, /* Stop DTMF Acknowledge */
5222 dtap_cc_start_dtmf_ack, /* Start DTMF Acknowledge */
5223 dtap_cc_start_dtmf_rej, /* Start DTMF Reject */
5224 dtap_cc_facility, /* Facility */
5228 #define NUM_GSM_DTAP_MSG_SMS (sizeof(gsm_a_dtap_msg_sms_strings)/sizeof(value_string))
5229 static gint ett_gsm_dtap_msg_sms[NUM_GSM_DTAP_MSG_SMS];
5230 static void (*dtap_msg_sms_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) = {
5231 dtap_sms_cp_data, /* CP-DATA */
5232 NULL /* no associated data */, /* CP-ACK */
5233 dtap_sms_cp_error, /* CP-ERROR */
5237 #define NUM_GSM_DTAP_MSG_SS (sizeof(gsm_a_dtap_msg_ss_strings)/sizeof(value_string))
5238 static gint ett_gsm_dtap_msg_ss[NUM_GSM_DTAP_MSG_SS];
5239 static void (*dtap_msg_ss_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) = {
5240 dtap_cc_release_complete, /* Release Complete */
5241 dtap_cc_facility, /* Facility */
5242 dtap_ss_register, /* Register */
5246 #define NUM_GSM_DTAP_MSG_TP (sizeof(gsm_a_dtap_msg_tp_strings)/sizeof(value_string))
5247 static gint ett_gsm_dtap_msg_tp[NUM_GSM_DTAP_MSG_TP];
5248 static void (*dtap_msg_tp_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) = {
5249 dtap_tp_close_tch_loop_cmd, /* CLOSE TCH LOOP CMD */
5250 NULL, /* CLOSE TCH LOOP ACK */
5251 dtap_tp_open_loop_cmd, /* OPEN LOOP CMD */
5252 NULL, /* ACT EMMI CMD */
5253 NULL, /* ACT EMMI ACK */
5254 NULL, /* DEACT EMMI */
5255 dtap_tp_test_interface, /* Test Interface */
5256 dtap_tp_multi_slot_loop_cmd, /* CLOSE Multi-slot LOOP CMD */
5257 dtap_tp_multi_slot_loop_ack, /* CLOSE Multi-slot LOOP ACK */
5258 NULL, /* OPEN Multi-slot LOOP CMD */
5259 NULL, /* OPEN Multi-slot LOOP ACK */
5260 dtap_tp_gprs_test_mode_cmd, /* GPRS TEST MODE CMD */
5261 dtap_tp_egprs_start_radio_block_loopback_cmd, /* EGPRS START RADIO BLOCK LOOPBACK CMD */
5262 dtap_tp_close_ue_test_loop, /* CLOSE UE TEST LOOP */
5263 NULL, /* CLOSE UE TEST LOOP COMPLETE */
5264 NULL, /* OPEN UE TEST LOOP */
5265 NULL, /* OPEN UE TEST LOOP COMPLETE */
5266 NULL, /* ACTIVATE RB TEST MODE */
5267 NULL, /* ACTIVATE RB TEST MODE COMPLETE */
5268 NULL, /* DEACTIVATE RB TEST MODE */
5269 NULL, /* DEACTIVATE RB TEST MODE COMPLETE */
5270 dtap_tp_reset_ue_positioning_ue_stored_information, /* RESET UE POSITIONING STORED INFORMATION */
5271 NULL, /* UE Test Loop Mode 3 RLC SDU Counter Request */
5272 dtap_tp_ue_test_loop_mode_3_rlc_sdu_counter_response, /* UE Test Loop Mode 3 RLC SDU Counter Response */
5276 /* GENERIC DISSECTOR FUNCTIONS */
5279 dissect_dtap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
5281 static gsm_a_tap_rec_t tap_rec[4];
5282 static gsm_a_tap_rec_t *tap_p;
5283 static guint tap_current=0;
5284 void (*msg_fcn)(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len);
5289 guint32 oct_1, oct_2;
5291 proto_item *dtap_item = NULL;
5292 proto_tree *dtap_tree = NULL;
5293 proto_item *oct_1_item = NULL;
5294 proto_tree *pd_tree = NULL;
5295 const gchar *msg_str;
5302 len = tvb_length(tvb);
5307 * too short to be DTAP
5309 call_dissector(data_handle, tvb, pinfo, tree);
5313 if (check_col(pinfo->cinfo, COL_INFO))
5315 col_append_str(pinfo->cinfo, COL_INFO, "(DTAP) ");
5319 * set tap record pointer
5322 if (tap_current >= 4)
5326 tap_p = &tap_rec[tap_current];
5332 gsm_a_dtap_pinfo = pinfo;
5336 * get protocol discriminator
5338 oct_1 = tvb_get_guint8(tvb, offset++);
5340 if ((((oct_1 & DTAP_TI_MASK) >> 4) & DTAP_TIE_PRES_MASK) == DTAP_TIE_PRES_MASK)
5343 * eventhough we don't know if a TI should be in the message yet
5344 * we rely on the TI/SKIP indicator to be 0 to avoid taking this
5347 oct_2 = tvb_get_guint8(tvb, offset++);
5350 oct = tvb_get_guint8(tvb, offset);
5352 pd = oct_1 & DTAP_PD_MASK;
5359 if (check_col(pinfo->cinfo, COL_INFO))
5361 col_append_fstr(pinfo->cinfo, COL_INFO, "(%s) ",val_to_str(pd,gsm_a_pd_short_str_vals,"unknown"));
5370 msg_str = match_strval_idx((guint32) (oct & DTAP_CC_IEI_MASK), gsm_a_dtap_msg_cc_strings, &idx);
5371 ett_tree = ett_gsm_dtap_msg_cc[idx];
5372 hf_idx = hf_gsm_a_dtap_msg_cc_type;
5373 msg_fcn = dtap_msg_cc_fcn[idx];
5374 ti = (oct_1 & DTAP_TI_MASK) >> 4;
5379 msg_str = match_strval_idx((guint32) (oct & DTAP_MM_IEI_MASK), gsm_a_dtap_msg_mm_strings, &idx);
5380 ett_tree = ett_gsm_dtap_msg_mm[idx];
5381 hf_idx = hf_gsm_a_dtap_msg_mm_type;
5382 msg_fcn = dtap_msg_mm_fcn[idx];
5387 get_rr_msg_params(oct, &msg_str, &ett_tree, &hf_idx, &msg_fcn);
5391 get_gmm_msg_params(oct, &msg_str, &ett_tree, &hf_idx, &msg_fcn);
5395 msg_str = match_strval_idx((guint32) (oct & DTAP_SMS_IEI_MASK), gsm_a_dtap_msg_sms_strings, &idx);
5396 ett_tree = ett_gsm_dtap_msg_sms[idx];
5397 hf_idx = hf_gsm_a_dtap_msg_sms_type;
5398 msg_fcn = dtap_msg_sms_fcn[idx];
5399 ti = (oct_1 & DTAP_TI_MASK) >> 4;
5403 get_sm_msg_params(oct, &msg_str, &ett_tree, &hf_idx, &msg_fcn);
5404 ti = (oct_1 & DTAP_TI_MASK) >> 4;
5408 msg_str = match_strval_idx((guint32) (oct & DTAP_SS_IEI_MASK), gsm_a_dtap_msg_ss_strings, &idx);
5409 ett_tree = ett_gsm_dtap_msg_ss[idx];
5410 hf_idx = hf_gsm_a_dtap_msg_ss_type;
5411 msg_fcn = dtap_msg_ss_fcn[idx];
5412 ti = (oct_1 & DTAP_TI_MASK) >> 4;
5417 msg_str = match_strval_idx((guint32) (oct & DTAP_TP_IEI_MASK), gsm_a_dtap_msg_tp_strings, &idx);
5418 ett_tree = ett_gsm_dtap_msg_tp[idx];
5419 hf_idx = hf_gsm_a_dtap_msg_tp_type;
5420 msg_fcn = dtap_msg_tp_fcn[idx];
5421 ti = (oct_1 & DTAP_TI_MASK) >> 4;
5426 /* XXX - hf_idx is still -1! this is a bug in the implementation, and I don't know how to fix it so simple return here */
5430 sccp_msg = pinfo->sccp_info;
5432 if (sccp_msg && sccp_msg->data.co.assoc) {
5433 sccp_assoc = sccp_msg->data.co.assoc;
5440 * create the protocol tree
5442 if (msg_str == NULL)
5445 proto_tree_add_protocol_format(tree, proto_a_dtap, tvb, 0, len,
5446 "GSM A-I/F DTAP - Unknown DTAP Message Type (0x%02x)",
5449 dtap_tree = proto_item_add_subtree(dtap_item, ett_dtap_msg);
5451 if (sccp_msg && !sccp_msg->data.co.label) {
5452 sccp_msg->data.co.label = se_strdup_printf("DTAP (0x%02x)",oct);
5460 proto_tree_add_protocol_format(tree, proto_a_dtap, tvb, 0, -1,
5461 "GSM A-I/F DTAP - %s",
5464 dtap_tree = proto_item_add_subtree(dtap_item, ett_tree);
5466 if (sccp_msg && !sccp_msg->data.co.label) {
5467 sccp_msg->data.co.label = se_strdup(msg_str);
5470 if (check_col(pinfo->cinfo, COL_INFO))
5472 col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", msg_str);
5477 proto_tree_add_text(dtap_tree,
5479 "Protocol Discriminator: %s",
5480 val_to_str(pd, protocol_discriminator_vals, "Unknown (%u)"));
5482 pd_tree = proto_item_add_subtree(oct_1_item, ett_dtap_oct_1);
5486 proto_tree_add_item(pd_tree, hf_gsm_a_skip_ind, tvb, 0, 1, FALSE);
5490 other_decode_bitfield_value(a_bigbuf, oct_1, 0x80, 8);
5491 proto_tree_add_text(pd_tree,
5495 ((oct_1 & 0x80) ? "allocated by receiver" : "allocated by sender"));
5497 if ((ti & DTAP_TIE_PRES_MASK) == DTAP_TIE_PRES_MASK)
5499 /* ti is extended to next octet */
5501 other_decode_bitfield_value(a_bigbuf, oct_1, 0x70, 8);
5502 proto_tree_add_text(pd_tree,
5504 "%s : TIO: The TI value is given by the TIE in octet 2",
5509 other_decode_bitfield_value(a_bigbuf, oct_1, 0x70, 8);
5510 proto_tree_add_text(pd_tree,
5514 ti & DTAP_TIE_PRES_MASK);
5518 proto_tree_add_item(pd_tree, hf_gsm_a_L3_protocol_discriminator, tvb, 0, 1, FALSE);
5521 (ti & DTAP_TIE_PRES_MASK) == DTAP_TIE_PRES_MASK)
5523 proto_tree_add_item(tree, hf_gsm_a_extension, tvb, 1, 1, FALSE);
5525 other_decode_bitfield_value(a_bigbuf, oct_2, DTAP_TIE_MASK, 8);
5526 proto_tree_add_text(pd_tree,
5530 oct_2 & DTAP_TIE_MASK);
5536 if ((pinfo->p2p_dir == P2P_DIR_RECV) &&
5541 /* In case of Mobility Management and Call Control and Call related SS messages
5542 * bit 7 and 8 is sequence number
5544 if((pd==5)||(pd==3)){
5545 proto_tree_add_item(dtap_tree, hf_gsm_a_seq_no, tvb, offset, 1, FALSE);
5548 * add DTAP message name
5550 proto_tree_add_item(dtap_tree, hf_idx, tvb, offset, 1, FALSE);
5553 tap_p->pdu_type = GSM_A_PDU_TYPE_DTAP;
5554 tap_p->message_type = (nsd ? (oct & 0x3f) : oct);
5555 tap_p->protocol_disc = pd;
5557 tap_queue_packet(gsm_a_tap, pinfo, tap_p);
5559 if (msg_str == NULL) return;
5561 if ((len - offset) <= 0) return;
5566 if (msg_fcn == NULL)
5568 proto_tree_add_text(dtap_tree,
5569 tvb, offset, len - offset,
5570 "Message Elements");
5574 (*msg_fcn)(tvb, dtap_tree, offset, len - offset);
5579 /* Register the protocol with Wireshark */
5581 proto_register_gsm_a_dtap(void)
5586 /* Setup list of header fields */
5588 static hf_register_info hf[] =
5591 { "Sequence number", "gsm_a.dtap_seq_no",
5592 FT_UINT8, BASE_DEC, NULL, 0xc0,
5595 { &hf_gsm_a_dtap_msg_mm_type,
5596 { "DTAP Mobility Management Message Type", "gsm_a.dtap_msg_mm_type",
5597 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_msg_mm_strings), 0x3f,
5600 { &hf_gsm_a_dtap_msg_cc_type,
5601 { "DTAP Call Control Message Type", "gsm_a.dtap_msg_cc_type",
5602 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_msg_cc_strings), 0x3f,
5605 { &hf_gsm_a_dtap_msg_sms_type,
5606 { "DTAP Short Message Service Message Type", "gsm_a.dtap_msg_sms_type",
5607 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_msg_sms_strings), 0x0,
5610 { &hf_gsm_a_dtap_msg_ss_type,
5611 { "DTAP Non call Supplementary Service Message Type", "gsm_a.dtap_msg_ss_type",
5612 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_msg_ss_strings), 0x0,
5615 { &hf_gsm_a_dtap_msg_tp_type,
5616 { "DTAP Tests Procedures Message Type", "gsm_a.dtap_msg_tp_type",
5617 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_msg_tp_strings), 0x0,
5620 { &hf_gsm_a_dtap_elem_id,
5621 { "Element ID", "gsm_a_dtap.elem_id",
5622 FT_UINT8, BASE_DEC, NULL, 0,
5625 { &hf_gsm_a_cld_party_bcd_num,
5626 { "Called Party BCD Number", "gsm_a.cld_party_bcd_num",
5627 FT_STRING, BASE_DEC, 0, 0,
5630 { &hf_gsm_a_clg_party_bcd_num,
5631 { "Calling Party BCD Number", "gsm_a.clg_party_bcd_num",
5632 FT_STRING, BASE_DEC, 0, 0,
5635 { &hf_gsm_a_dtap_cause,
5636 { "DTAP Cause", "gsm_a_dtap.cause",
5637 FT_UINT8, BASE_HEX, 0, 0x0,
5640 { &hf_gsm_a_extension,
5641 { "Extension", "gsm_a.extension",
5642 FT_BOOLEAN, 8, TFS(&gsm_a_extension_value), 0x80,
5643 "Extension", HFILL }
5645 { &hf_gsm_a_type_of_number,
5646 { "Type of number", "gsm_a.type_of_number",
5647 FT_UINT8, BASE_HEX, VALS(gsm_a_type_of_number_values), 0x70,
5648 "Type of number", HFILL }
5650 { &hf_gsm_a_numbering_plan_id,
5651 { "Numbering plan identification", "gsm_a.numbering_plan_id",
5652 FT_UINT8, BASE_HEX, VALS(gsm_a_numbering_plan_id_values), 0x0f,
5653 "Numbering plan identification", HFILL }
5656 { "LSA Identifier", "gsm_a.lsa_id",
5657 FT_UINT24, BASE_HEX, NULL, 0x0,
5658 "LSA Identifier", HFILL }
5662 /* Setup protocol subtree array */
5663 #define NUM_INDIVIDUAL_ELEMS 18
5664 static gint *ett[NUM_INDIVIDUAL_ELEMS +
5665 NUM_GSM_DTAP_MSG_MM + NUM_GSM_DTAP_MSG_CC +
5666 NUM_GSM_DTAP_MSG_SMS + NUM_GSM_DTAP_MSG_SS + NUM_GSM_DTAP_MSG_TP +
5669 ett[0] = &ett_dtap_msg;
5670 ett[1] = &ett_dtap_oct_1;
5671 ett[2] = &ett_cm_srvc_type;
5672 ett[3] = &ett_gsm_enc_info;
5673 ett[4] = &ett_bc_oct_3a;
5674 ett[5] = &ett_bc_oct_4;
5675 ett[6] = &ett_bc_oct_5;
5676 ett[7] = &ett_bc_oct_5a;
5677 ett[8] = &ett_bc_oct_5b;
5678 ett[9] = &ett_bc_oct_6;
5679 ett[10] = &ett_bc_oct_6a;
5680 ett[11] = &ett_bc_oct_6b;
5681 ett[12] = &ett_bc_oct_6c;
5682 ett[13] = &ett_bc_oct_6d;
5683 ett[14] = &ett_bc_oct_6e;
5684 ett[15] = &ett_bc_oct_6f;
5685 ett[16] = &ett_bc_oct_6g;
5686 ett[17] = &ett_bc_oct_7;
5688 last_offset = NUM_INDIVIDUAL_ELEMS;
5690 for (i=0; i < NUM_GSM_DTAP_MSG_MM; i++, last_offset++)
5692 ett_gsm_dtap_msg_mm[i] = -1;
5693 ett[last_offset] = &ett_gsm_dtap_msg_mm[i];
5696 for (i=0; i < NUM_GSM_DTAP_MSG_CC; i++, last_offset++)
5698 ett_gsm_dtap_msg_cc[i] = -1;
5699 ett[last_offset] = &ett_gsm_dtap_msg_cc[i];
5702 for (i=0; i < NUM_GSM_DTAP_MSG_SMS; i++, last_offset++)
5704 ett_gsm_dtap_msg_sms[i] = -1;
5705 ett[last_offset] = &ett_gsm_dtap_msg_sms[i];
5708 for (i=0; i < NUM_GSM_DTAP_MSG_SS; i++, last_offset++)
5710 ett_gsm_dtap_msg_ss[i] = -1;
5711 ett[last_offset] = &ett_gsm_dtap_msg_ss[i];
5714 for (i=0; i < NUM_GSM_DTAP_MSG_TP; i++, last_offset++)
5716 ett_gsm_dtap_msg_tp[i] = -1;
5717 ett[last_offset] = &ett_gsm_dtap_msg_tp[i];
5720 for (i=0; i < NUM_GSM_DTAP_ELEM; i++, last_offset++)
5722 ett_gsm_dtap_elem[i] = -1;
5723 ett[last_offset] = &ett_gsm_dtap_elem[i];
5726 /* Register the protocol name and description */
5729 proto_register_protocol("GSM A-I/F DTAP", "GSM DTAP", "gsm_a_dtap");
5731 proto_register_field_array(proto_a_dtap, hf, array_length(hf));
5733 proto_register_subtree_array(ett, array_length(ett));
5735 /* subdissector code */
5736 register_dissector("gsm_a_dtap", dissect_dtap, proto_a_dtap);
5740 proto_reg_handoff_gsm_a_dtap(void)
5742 dissector_handle_t dtap_handle;
5744 dtap_handle = find_dissector("gsm_a_dtap");
5745 dissector_add("bssap.pdu_type", BSSAP_PDU_TYPE_DTAP, dtap_handle);
5746 dissector_add("ranap.nas_pdu", BSSAP_PDU_TYPE_DTAP, dtap_handle);
5747 dissector_add("llcgprs.sapi", 1 , dtap_handle); /* GPRS Mobility Management */
5748 dissector_add("llcgprs.sapi", 7 , dtap_handle); /* SMS */
5750 data_handle = find_dissector("data");
5751 gsm_map_handle = find_dissector("gsm_map");
5752 rp_handle = find_dissector("gsm_a_rp");