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 other enhancements and fixes.
18 * Copyright 2005 - 2009, Anders Broman [AT] ericsson.com
19 * Small bugfixes, mainly in Qos and TFT by Nils Ljungberg and Stefan Boman [AT] ericsson.com
21 * Various updates, enhancements and fixes
22 * Copyright 2009, Gerasimos Dimitriadis <dimeg [AT] intracom.gr>
23 * In association with Intracom Telecom SA
28 * Mobile radio interface Layer 3 specification;
29 * Core network protocols;
31 * (3GPP TS 24.008 version 4.7.0 Release 4)
32 * (ETSI TS 124 008 V6.8.0 (2005-03))
35 * Mobile radio interface layer 3 specification;
36 * Radio Resource Control Protocol
37 * (GSM 04.18 version 8.4.1 Release 1999)
38 * (3GPP TS 04.18 version 8.26.0 Release 1999)
41 * Point-to-Point (PP) Short Message Service (SMS)
42 * support on mobile radio interface
43 * (3GPP TS 24.011 version 4.1.1 Release 4)
46 * Mobile radio Layer 3 supplementary service specification;
48 * (3GPP TS 24.080 version 4.3.0 Release 4)
51 * Mobile radio interface Layer 3 specification;
52 * Core network protocols;
54 * (3GPP TS 24.008 version 5.9.0 Release 5)
57 * Mobile radio interface Layer 3 specification;
58 * Core network protocols;
60 * (3GPP TS 24.008 version 6.7.0 Release 6)
61 * (3GPP TS 24.008 version 6.8.0 Release 6)
64 * Mobile radio interface Layer 3 specification;
65 * Core network protocols;
67 * (3GPP TS 24.008 version 9.6.0 Release 9)
70 * Mobile radio interface Layer 3 specification;
71 * Core network protocols;
73 * (3GPP TS 24.008 version 10.6.1 Release 10)
76 * Mobile radio interface Layer 3 specification;
77 * Core network protocols;
79 * (3GPP TS 24.008 version 11.6.0 Release 11)
81 * Wireshark - Network traffic analyzer
82 * By Gerald Combs <gerald@wireshark.org>
83 * Copyright 1998 Gerald Combs
85 * This program is free software; you can redistribute it and/or
86 * modify it under the terms of the GNU General Public License
87 * as published by the Free Software Foundation; either version 2
88 * of the License, or (at your option) any later version.
90 * This program is distributed in the hope that it will be useful,
91 * but WITHOUT ANY WARRANTY; without even the implied warranty of
92 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
93 * GNU General Public License for more details.
95 * You should have received a copy of the GNU General Public License
96 * along with this program; if not, write to the Free Software
97 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
102 #include <epan/packet.h>
103 #include <epan/expert.h>
104 #include <epan/tap.h>
105 #include <epan/strutil.h>
107 #include "packet-bssap.h"
108 #include "packet-ber.h"
109 #include "packet-q931.h"
110 #include "packet-gsm_a_common.h"
111 #include "packet-ppp.h"
112 #include "packet-isup.h"
114 void proto_register_gsm_a_dtap(void);
115 void proto_reg_handoff_gsm_a_dtap(void);
117 /* PROTOTYPES/FORWARDS */
119 const value_string gsm_a_dtap_msg_mm_strings[] = {
120 { 0x01, "IMSI Detach Indication" },
121 { 0x02, "Location Updating Accept" },
122 { 0x04, "Location Updating Reject" },
123 { 0x08, "Location Updating Request" },
124 { 0x11, "Authentication Reject" },
125 { 0x12, "Authentication Request" },
126 { 0x14, "Authentication Response" },
127 { 0x1c, "Authentication Failure" },
128 { 0x18, "Identity Request" },
129 { 0x19, "Identity Response" },
130 { 0x1a, "TMSI Reallocation Command" },
131 { 0x1b, "TMSI Reallocation Complete" },
132 { 0x21, "CM Service Accept" },
133 { 0x22, "CM Service Reject" },
134 { 0x23, "CM Service Abort" },
135 { 0x24, "CM Service Request" },
136 { 0x25, "CM Service Prompt" },
137 { 0x26, "Reserved: was allocated in earlier phases of the protocol" },
138 { 0x28, "CM Re-establishment Request" },
141 { 0x31, "MM Status" },
142 { 0x32, "MM Information" },
146 const value_string gsm_a_dtap_msg_cc_strings[] = {
147 { 0x01, "Alerting" },
148 { 0x08, "Call Confirmed" },
149 { 0x02, "Call Proceeding" },
151 { 0x0f, "Connect Acknowledge" },
152 { 0x0e, "Emergency Setup" },
153 { 0x03, "Progress" },
154 { 0x04, "CC-Establishment" },
155 { 0x06, "CC-Establishment Confirmed" },
157 { 0x09, "Start CC" },
160 { 0x1f, "Modify Complete" },
161 { 0x13, "Modify Reject" },
162 { 0x10, "User Information" },
164 { 0x19, "Hold Acknowledge" },
165 { 0x1a, "Hold Reject" },
166 { 0x1c, "Retrieve" },
167 { 0x1d, "Retrieve Acknowledge" },
168 { 0x1e, "Retrieve Reject" },
169 { 0x25, "Disconnect" },
171 { 0x2a, "Release Complete" },
172 { 0x39, "Congestion Control" },
175 { 0x34, "Status Enquiry" },
176 { 0x35, "Start DTMF" },
177 { 0x31, "Stop DTMF" },
178 { 0x32, "Stop DTMF Acknowledge" },
179 { 0x36, "Start DTMF Acknowledge" },
180 { 0x37, "Start DTMF Reject" },
181 { 0x3a, "Facility" },
185 const value_string gsm_a_dtap_msg_sms_strings[] = {
188 { 0x10, "CP-ERROR" },
192 const value_string gsm_a_dtap_msg_ss_strings[] = {
193 { 0x2a, "Release Complete" },
194 { 0x3a, "Facility" },
195 { 0x3b, "Register" },
199 const value_string gsm_a_dtap_msg_tp_strings[] = {
200 { 0x00, "Close TCH Loop Cmd" },
201 { 0x01, "Close TCH Loop Ack" },
202 { 0x06, "Open Loop Cmd" },
203 { 0x0c, "Act EMMI Cmd" },
204 { 0x0d, "Act EMMI Ack" },
205 { 0x10, "Deact EMMI" },
206 { 0x14, "Test Interface" },
207 { 0x20, "Close Multi-slot Loop Cmd" },
208 { 0x21, "Close Multi-slot Loop Ack" },
209 { 0x22, "Open Multi-slot Loop Cmd" },
210 { 0x23, "Open Multi-slot Loop Ack" },
211 { 0x24, "GPRS Test Mode Cmd" },
212 { 0x25, "EGPRS Start Radio Block Loopback Cmd" },
213 { 0x26, "Reset MS Positioning Stored Information" },
214 { 0x40, "Close UE Test Loop" },
215 { 0x41, "Close UE Test Loop Complete" },
216 { 0x42, "Open UE Test Loop" },
217 { 0x43, "Open UE Test Loop Complete" },
218 { 0x44, "Activate RB Test Mode" },
219 { 0x45, "Activate RB Test Mode Complete" },
220 { 0x46, "Deactivate RB Test Mode" },
221 { 0x47, "Deactivate RB Test Mode Complete" },
222 { 0x48, "Reset UE Positioning Stored Information" },
223 { 0x49, "UE Test Loop Mode 3 RLC SDU Counter Request" },
224 { 0x4A, "UE Test Loop Mode 3 RLC SDU Counter Response" },
225 { 0x80, "Close UE Test Loop" },
226 { 0x81, "Close UE Test Loop Complete" },
227 { 0x82, "Open UE Test Loop" },
228 { 0x83, "Open UE Test Loop Complete" },
229 { 0x84, "Activate Test Mode" },
230 { 0x85, "Activate Test Mode Complete" },
231 { 0x86, "Deactivate Test Mode" },
232 { 0x87, "Deactivate Test Mode Complete" },
233 { 0x88, "Reset UE Positioning Stored Information" },
234 { 0x89, "UE Test Loop Mode C MBMS Packet Counter Request" },
235 { 0x8a, "UE Test Loop Mode C MBMS Packet Counter Response" },
236 { 0x8b, "Update UE Location Information" },
240 static const value_string gsm_dtap_elem_strings[] = {
241 /* Mobility Management Information Elements 10.5.3 */
242 { DE_AUTH_PARAM_RAND, "Authentication Parameter RAND" },
243 { DE_AUTH_PARAM_AUTN, "Authentication Parameter AUTN (UMTS and EPS authentication challenge)" },
244 { DE_AUTH_RESP_PARAM, "Authentication Response Parameter" },
245 { DE_AUTH_RESP_PARAM_EXT, "Authentication Response Parameter (extension) (UMTS authentication challenge only)" },
246 { DE_AUTH_FAIL_PARAM, "Authentication Failure Parameter (UMTS and EPS authentication challenge)" },
247 { DE_CM_SRVC_TYPE, "CM Service Type" },
248 { DE_ID_TYPE, "Identity Type" },
249 { DE_LOC_UPD_TYPE, "Location Updating Type" },
250 { DE_NETWORK_NAME, "Network Name" },
251 { DE_REJ_CAUSE, "Reject Cause" },
252 { DE_FOP, "Follow-on Proceed" },
253 { DE_TIME_ZONE, "Time Zone" },
254 { DE_TIME_ZONE_TIME, "Time Zone and Time" },
255 { DE_CTS_PERM, "CTS Permission" },
256 { DE_LSA_ID, "LSA Identifier" },
257 { DE_DAY_SAVING_TIME, "Daylight Saving Time" },
258 { DE_EMERGENCY_NUM_LIST, "Emergency Number List" },
259 { DE_ADD_UPD_PARAMS, "Additional update parameters" },
260 { DE_MM_TIMER, "MM Timer" },
261 /* Call Control Information Elements 10.5.4 */
262 { DE_AUX_STATES, "Auxiliary States" }, /* 10.5.4.4 Auxiliary states */
263 { DE_BEARER_CAP, "Bearer Capability" }, /* 10.5.4.4a Backup bearer capability */
264 { DE_CC_CAP, "Call Control Capabilities" },
265 { DE_CALL_STATE, "Call State" },
266 { DE_CLD_PARTY_BCD_NUM, "Called Party BCD Number" },
267 { DE_CLD_PARTY_SUB_ADDR, "Called Party Subaddress" },
268 { DE_CLG_PARTY_BCD_NUM, "Calling Party BCD Number" },
269 { DE_CLG_PARTY_SUB_ADDR, "Calling Party Subaddress" },
270 { DE_CAUSE, "Cause" },
271 { DE_CLIR_SUP, "CLIR Suppression" },
272 { DE_CLIR_INV, "CLIR Invocation" },
273 { DE_CONGESTION, "Congestion Level" },
274 { DE_CONN_NUM, "Connected Number" },
275 { DE_CONN_SUB_ADDR, "Connected Subaddress" },
276 { DE_FACILITY, "Facility" },
277 { DE_HLC, "High Layer Compatibility" },
278 { DE_KEYPAD_FACILITY, "Keypad Facility" },
279 { DE_LLC, "Low Layer Compatibility" },
280 { DE_MORE_DATA, "More Data" },
281 { DE_NOT_IND, "Notification Indicator" },
282 { DE_PROG_IND, "Progress Indicator" },
283 { DE_RECALL_TYPE, "Recall type $(CCBS)$" },
284 { DE_RED_PARTY_BCD_NUM, "Redirecting Party BCD Number" },
285 { DE_RED_PARTY_SUB_ADDR, "Redirecting Party Subaddress" },
286 { DE_REPEAT_IND, "Repeat Indicator" },
287 { DE_REV_CALL_SETUP_DIR, "Reverse Call Setup Direction" },
288 { DE_SETUP_CONTAINER, "SETUP Container $(CCBS)$" },
289 { DE_SIGNAL, "Signal" },
290 { DE_SS_VER_IND, "SS Version Indicator" },
291 { DE_USER_USER, "User-user" },
292 { DE_ALERT_PATTERN, "Alerting Pattern $(NIA)$" }, /* 10.5.4.26 Alerting Pattern $(NIA)$ */
293 { DE_ALLOWED_ACTIONS, "Allowed Actions $(CCBS)$" },
294 { DE_SI, "Stream Identifier" },
295 { DE_NET_CC_CAP, "Network Call Control Capabilities" },
296 { DE_CAUSE_NO_CLI, "Cause of No CLI" }, /* 10.5.4.30 Cause of No CLI */
298 { DE_SUP_CODEC_LIST, "Supported Codec List" }, /* 10.5.4.32 Supported codec list */
299 { DE_SERV_CAT, "Service Category" }, /* 10.5.4.33 Service category */
300 { DE_REDIAL, "Redial" }, /* 10.5.4.34 Redial */
301 { DE_NET_INIT_SERV_UPG, "Network-initiated Service Upgrade indicator" },
302 /* 10.5.4.35 Network-initiated Service Upgrade indicator */
303 /* Short Message Service Information Elements [5] 8.1.4 */
304 { DE_CP_USER_DATA, "CP-User Data" },
305 { DE_CP_CAUSE, "CP-Cause" },
306 /* Tests procedures information elements 3GPP TS 44.014 6.4.0, 3GPP TS 34.109 6.4.0 and 3GPP TS 36.509 9.1.0*/
307 { DE_TP_SUB_CHANNEL, "Close TCH Loop Cmd Sub-channel"},
308 { DE_TP_ACK, "Open Loop Cmd Ack"},
309 { DE_TP_LOOP_TYPE, "Close Multi-slot Loop Cmd Loop type"},
310 { DE_TP_LOOP_ACK, "Close Multi-slot Loop Ack Result"},
311 { DE_TP_TESTED_DEVICE, "Test Interface Tested device"},
312 { DE_TP_PDU_DESCRIPTION, "GPRS Test Mode Cmd PDU description"},
313 { DE_TP_MODE_FLAG, "GPRS Test Mode Cmd Mode flag"},
314 { DE_TP_EGPRS_MODE_FLAG, "EGPRS Start Radio Block Loopback Cmd Mode flag"},
315 { DE_TP_MS_POSITIONING_TECHNOLOGY, "MS Positioning Technology"},
316 { DE_TP_UE_TEST_LOOP_MODE, "Close UE Test Loop Mode"},
317 { DE_TP_UE_POSITIONING_TECHNOLOGY, "UE Positioning Technology"},
318 { DE_TP_RLC_SDU_COUNTER_VALUE, "RLC SDU Counter Value"},
319 { DE_TP_EPC_UE_TEST_LOOP_MODE, "UE Test Loop Mode"},
320 { DE_TP_EPC_UE_TL_A_LB_SETUP, "UE Test Loop Mode A LB Setup"},
321 { DE_TP_EPC_UE_TL_B_LB_SETUP, "UE Test Loop Mode B LB Setup"},
322 { DE_TP_EPC_UE_TL_C_SETUP, "UE Test Loop Mode C Setup"},
323 { DE_TP_EPC_UE_POSITIONING_TECHNOLOGY, "UE Positioning Technology"},
324 { DE_TP_EPC_MBMS_PACKET_COUNTER_VALUE, "MBMS Packet Counter Value"},
325 { DE_TP_EPC_ELLIPSOID_POINT_WITH_ALT, "Ellipsoid Point With Altitude"},
326 { DE_TP_EPC_HORIZONTAL_VELOCITY, "Horizontal Velocity"},
327 { DE_TP_EPC_GNSS_TOD_MSEC, "GNSS-TOD-msec"},
330 value_string_ext gsm_dtap_elem_strings_ext = VALUE_STRING_EXT_INIT(gsm_dtap_elem_strings);
332 const gchar *gsm_a_pd_str[] = {
333 "Group Call Control",
334 "Broadcast Call Control",
335 "EPS session management messages",
336 "Call Control; call related SS messages",
337 "GPRS Transparent Transport Protocol (GTTP)",
338 "Mobility Management messages",
339 "Radio Resources Management messages",
340 "EPS mobility management messages",
341 "GPRS Mobility Management messages",
343 "GPRS Session Management messages",
344 "Non call related SS messages",
345 "Location services specified in 3GPP TS 44.071",
347 "Reserved for extension of the PD to one octet length",
348 "Special conformance testing functions"
350 /* L3 Protocol discriminator values according to TS 24 007 (6.4.0) */
351 const value_string protocol_discriminator_vals[] = {
352 {0x0, "Group call control"},
353 {0x1, "Broadcast call control"},
354 {0x2, "EPS session management messages"},
355 {0x3, "Call Control; call related SS messages"},
356 {0x4, "GPRS Transparent Transport Protocol (GTTP)"},
357 {0x5, "Mobility Management messages"},
358 {0x6, "Radio Resources Management messages"},
359 {0x7, "EPS mobility management messages"},
360 {0x8, "GPRS mobility management messages"},
361 {0x9, "SMS messages"},
362 {0xa, "GPRS session management messages"},
363 {0xb, "Non call related SS messages"},
364 {0xc, "Location services specified in 3GPP TS 44.071"},
366 {0xe, "Reserved for extension of the PD to one octet length "},
367 {0xf, "Tests procedures described in 3GPP TS 44.014, 3GPP TS 34.109 and 3GPP TS 36.509"},
371 const value_string gsm_a_pd_short_str_vals[] = {
372 {0x0, "GCC"}, /* Group Call Control */
373 {0x1, "BCC"}, /* Broadcast Call Control */
374 {0x2, "Reserved"}, /* : was allocated in earlier phases of the protocol */
375 {0x3, "CC"}, /* Call Control; call related SS messages */
376 {0x4, "GTTP"}, /* GPRS Transparent Transport Protocol (GTTP) */
377 {0x5, "MM"}, /* Mobility Management messages */
378 {0x6, "RR"}, /* Radio Resources Management messages */
380 {0x8, "GMM"}, /* GPRS Mobility Management messages */
382 {0xa, "SM"}, /* GPRS Session Management messages */
384 {0xc, "LS"}, /* Location Services */
386 {0xe, "Reserved"}, /* for extension of the PD to one octet length */
387 {0xf, "TP"}, /* for tests procedures described in 3GPP TS 44.014 6.4.0 and 3GPP TS 34.109 6.4.0.*/
391 static const true_false_string tfs_acceptable_not_acceptable = { "Acceptable", "Not Acceptable" };
394 #define DTAP_PD_MASK 0x0f
395 #define DTAP_SKIP_MASK 0xf0
396 #define DTAP_TI_MASK DTAP_SKIP_MASK
397 #define DTAP_TIE_PRES_MASK 0x07 /* after TI shifted to right */
398 #define DTAP_TIE_MASK 0x7f
400 #define DTAP_MM_IEI_MASK 0x3f
401 #define DTAP_CC_IEI_MASK 0x3f
402 #define DTAP_SMS_IEI_MASK 0xff
403 #define DTAP_SS_IEI_MASK 0x3f
404 #define DTAP_TP_IEI_MASK 0xff
406 /* Initialize the protocol and registered fields */
407 static int proto_a_dtap = -1;
409 static int hf_gsm_a_dtap_msg_mm_type = -1;
410 static int hf_gsm_a_dtap_msg_cc_type = -1;
411 static int hf_gsm_a_seq_no = -1;
412 static int hf_gsm_a_dtap_msg_sms_type = -1;
413 static int hf_gsm_a_dtap_msg_ss_type = -1;
414 static int hf_gsm_a_dtap_msg_tp_type = -1;
415 int hf_gsm_a_dtap_elem_id = -1;
416 static int hf_gsm_a_dtap_cld_party_bcd_num = -1;
417 static int hf_gsm_a_dtap_clg_party_bcd_num = -1;
418 static int hf_gsm_a_dtap_conn_num = -1;
419 static int hf_gsm_a_dtap_red_party_bcd_num = -1;
420 static int hf_gsm_a_dtap_present_ind = -1;
421 static int hf_gsm_a_dtap_screening_ind = -1;
422 static int hf_gsm_a_dtap_type_of_sub_addr = -1;
423 static int hf_gsm_a_dtap_odd_even_ind = -1;
425 static int hf_gsm_a_dtap_cause = -1;
426 static int hf_gsm_a_dtap_cause_ss_diagnostics = -1;
427 static int hf_gsm_a_dtap_emergency_bcd_num = -1;
428 static int hf_gsm_a_dtap_emerg_num_info_length = -1;
430 static int hf_gsm_a_dtap_type_of_number = -1;
431 static int hf_gsm_a_dtap_numbering_plan_id = -1;
433 static int hf_gsm_a_dtap_lsa_id = -1;
434 static int hf_gsm_a_dtap_speech_vers_ind = -1;
435 static int hf_gsm_a_dtap_itc = -1;
436 static int hf_gsm_a_dtap_sysid = -1;
437 static int hf_gsm_a_dtap_bitmap_length = -1;
438 static int hf_gsm_a_dtap_serv_cat_b7 = -1;
439 static int hf_gsm_a_dtap_serv_cat_b6 = -1;
440 static int hf_gsm_a_dtap_serv_cat_b5 = -1;
441 static int hf_gsm_a_dtap_serv_cat_b4 = -1;
442 static int hf_gsm_a_dtap_serv_cat_b3 = -1;
443 static int hf_gsm_a_dtap_serv_cat_b2 = -1;
444 static int hf_gsm_a_dtap_serv_cat_b1 = -1;
445 static int hf_gsm_a_dtap_csmo = -1;
446 static int hf_gsm_a_dtap_csmt = -1;
447 static int hf_gsm_a_dtap_mm_timer_unit = -1;
448 static int hf_gsm_a_dtap_mm_timer_value = -1;
449 static int hf_gsm_a_dtap_alerting_pattern = -1;
450 static int hf_gsm_a_dtap_ccbs_activation = -1;
451 static int hf_gsm_a_dtap_stream_identifier = -1;
452 static int hf_gsm_a_dtap_mcs = -1;
453 static int hf_gsm_a_dtap_cause_of_no_cli = -1;
454 static int hf_gsm_a_dtap_signal_value = -1;
456 static int hf_gsm_a_dtap_codec_tdma_efr = -1;
457 static int hf_gsm_a_dtap_codec_umts_amr_2 = -1;
458 static int hf_gsm_a_dtap_codec_umts_amr = -1;
459 static int hf_gsm_a_dtap_codec_hr_amr = -1;
460 static int hf_gsm_a_dtap_codec_fr_amr = -1;
461 static int hf_gsm_a_dtap_codec_gsm_efr = -1;
462 static int hf_gsm_a_dtap_codec_gsm_hr = -1;
463 static int hf_gsm_a_dtap_codec_gsm_fr = -1;
464 static int hf_gsm_a_dtap_codec_ohr_amr_wb = -1;
465 static int hf_gsm_a_dtap_codec_ofr_amr_wb = -1;
466 static int hf_gsm_a_dtap_codec_ohr_amr = -1;
467 static int hf_gsm_a_dtap_codec_umts_amr_wb = -1;
468 static int hf_gsm_a_dtap_codec_fr_amr_wb = -1;
469 static int hf_gsm_a_dtap_codec_pdc_efr = -1;
471 static int hf_gsm_a_dtap_notification_description = -1;
472 static int hf_gsm_a_dtap_recall_type = -1;
473 static int hf_gsm_a_dtap_coding_standard = -1;
474 static int hf_gsm_a_dtap_call_state = -1;
475 static int hf_gsm_a_dtap_prog_coding_standard = -1;
476 static int hf_gsm_a_dtap_location = -1;
477 static int hf_gsm_a_dtap_progress_description = -1;
478 static int hf_gsm_a_dtap_afi = -1;
479 static int hf_gsm_a_dtap_rej_cause = -1;
480 static int hf_gsm_a_dtap_u2u_prot_discr = -1;
481 static int hf_gsm_a_dtap_mcat = -1;
482 static int hf_gsm_a_dtap_enicm = -1;
483 static int hf_gsm_a_dtap_rand = -1;
484 static int hf_gsm_a_dtap_autn = -1;
485 static int hf_gsm_a_dtap_xres = -1;
486 static int hf_gsm_a_dtap_sres = -1;
487 static int hf_gsm_a_dtap_auts = -1;
488 static int hf_gsm_a_dtap_autn_sqn_xor_ak = -1;
489 static int hf_gsm_a_dtap_autn_amf = -1;
490 static int hf_gsm_a_dtap_autn_mac = -1;
491 static int hf_gsm_a_dtap_auts_sqn_ms_xor_ak = -1;
492 static int hf_gsm_a_dtap_auts_mac_s = -1;
494 static int hf_gsm_a_dtap_epc_ue_tl_mode = -1;
495 static int hf_gsm_a_dtap_epc_ue_tl_a_ul_sdu_size = -1;
496 static int hf_gsm_a_dtap_epc_ue_tl_a_drb = -1;
497 static int hf_gsm_a_dtap_epc_ue_tl_b_ip_pdu_delay = -1;
498 static int hf_gsm_a_dtap_epc_ue_tl_c_mbsfn_area_id = -1;
499 static int hf_gsm_a_dtap_epc_ue_tl_c_mch_id = -1;
500 static int hf_gsm_a_dtap_epc_ue_tl_c_lcid = -1;
501 static int hf_gsm_a_dtap_epc_ue_positioning_technology = -1;
502 static int hf_gsm_a_dtap_epc_mbms_packet_counter_value = -1;
503 static int hf_gsm_a_dtap_epc_latitude_sign = -1;
504 static int hf_gsm_a_dtap_epc_degrees_latitude = -1;
505 static int hf_gsm_a_dtap_epc_degrees_longitude = -1;
506 static int hf_gsm_a_dtap_epc_altitude_dir = -1;
507 static int hf_gsm_a_dtap_epc_altitude = -1;
508 static int hf_gsm_a_dtap_epc_bearing = -1;
509 static int hf_gsm_a_dtap_epc_horizontal_speed = -1;
510 static int hf_gsm_a_dtap_epc_gnss_tod_msec = -1;
512 /* Generated from convert_proto_tree_add_text.pl */
513 static int hf_gsm_a_dtap_maximum_number_of_supported_bearers = -1;
514 static int hf_gsm_a_dtap_edge_channel_codings = -1;
515 static int hf_gsm_a_dtap_acceptable_channel_codings_TCH_F9_6 = -1;
516 static int hf_gsm_a_dtap_assignor_assignee = -1;
517 static int hf_gsm_a_dtap_configuration = -1;
518 static int hf_gsm_a_dtap_de_cause_coding_standard = -1;
519 static int hf_gsm_a_dtap_ss_version_indicator = -1;
520 static int hf_gsm_a_dtap_mode_of_operation = -1;
521 static int hf_gsm_a_dtap_bearer_cap_coding_standard = -1;
522 static int hf_gsm_a_dtap_nirr = -1;
523 static int hf_gsm_a_dtap_other_rate_adaption = -1;
524 static int hf_gsm_a_dtap_connection_element = -1;
525 static int hf_gsm_a_dtap_nic_on_tx = -1;
526 static int hf_gsm_a_dtap_user_rate = -1;
527 static int hf_gsm_a_dtap_protocol_discriminator = -1;
528 static int hf_gsm_a_dtap_cp_cause = -1;
529 static int hf_gsm_a_dtap_rate_adaption_header = -1;
530 static int hf_gsm_a_dtap_synchronous = -1;
531 static int hf_gsm_a_dtap_logical_link_identifier_negotiation = -1;
532 static int hf_gsm_a_dtap_multi_party_auxiliary_state = -1;
533 static int hf_gsm_a_dtap_parity_information = -1;
534 static int hf_gsm_a_dtap_channel_coding03 = -1;
535 static int hf_gsm_a_dtap_channel_coding30 = -1;
536 static int hf_gsm_a_dtap_acceptable_channel_codings_ext_TCH_F43_2 = -1;
537 static int hf_gsm_a_dtap_ue_positioning_technology = -1;
538 static int hf_gsm_a_dtap_acceptable_channel_codings_TCH_F4_8 = -1;
539 static int hf_gsm_a_dtap_number_of_spare_bits = -1;
540 static int hf_gsm_a_dtap_tie = -1;
541 static int hf_gsm_a_dtap_updating_type = -1;
542 static int hf_gsm_a_dtap_multiple_frame_establishment_support = -1;
543 static int hf_gsm_a_dtap_maximum_number_of_traffic_channels = -1;
544 static int hf_gsm_a_dtap_compression = -1;
545 static int hf_gsm_a_dtap_compression_up = -1;
546 static int hf_gsm_a_dtap_downlink_timeslot_offset = -1;
547 static int hf_gsm_a_dtap_acceptable_channel_codings_ext_TCH_F32_0 = -1;
548 static int hf_gsm_a_dtap_tio = -1;
549 static int hf_gsm_a_dtap_other_modem_type = -1;
550 static int hf_gsm_a_dtap_other_itc = -1;
551 static int hf_gsm_a_dtap_negotiation = -1;
552 static int hf_gsm_a_dtap_rate_adaption = -1;
553 static int hf_gsm_a_dtap_ms_positioning_technology = -1;
554 static int hf_gsm_a_dtap_number_of_data_bits = -1;
555 static int hf_gsm_a_dtap_follow_on_request = -1;
556 static int hf_gsm_a_dtap_repeat_indicator = -1;
557 static int hf_gsm_a_dtap_dst_adjustment = -1;
558 static int hf_gsm_a_dtap_pcp = -1;
559 static int hf_gsm_a_dtap_user_information_layer_2_protocol = -1;
560 static int hf_gsm_a_dtap_structure = -1;
561 static int hf_gsm_a_dtap_congestion_level = -1;
562 static int hf_gsm_a_dtap_access_identity = -1;
563 static int hf_gsm_a_dtap_modem_type = -1;
564 static int hf_gsm_a_dtap_test_loop = -1;
565 static int hf_gsm_a_dtap_layer_1_identity = -1;
566 static int hf_gsm_a_dtap_ciphering_key_sequence_number70 = -1;
567 static int hf_gsm_a_dtap_tp_pdu_description = -1;
568 static int hf_gsm_a_dtap_dtmf = -1;
569 static int hf_gsm_a_dtap_coding = -1;
570 static int hf_gsm_a_dtap_nic_on_rx = -1;
571 static int hf_gsm_a_dtap_emergency_number_information = -1;
572 static int hf_gsm_a_dtap_uimi = -1;
573 static int hf_gsm_a_dtap_number_of_stop_bits = -1;
574 static int hf_gsm_a_dtap_acceptable_channel_codings_spare78 = -1;
575 static int hf_gsm_a_dtap_type_of_identity = -1;
576 static int hf_gsm_a_dtap_ciphering_key_sequence_number = -1;
577 static int hf_gsm_a_dtap_recommendation = -1;
578 static int hf_gsm_a_dtap_max_num_of_speech_bearers = -1;
579 static int hf_gsm_a_dtap_keypad_information = -1;
580 static int hf_gsm_a_dtap_signalling_access_protocol = -1;
581 static int hf_gsm_a_dtap_user_information_layer_1_protocol = -1;
582 static int hf_gsm_a_dtap_wanted_air_interface_user_rate = -1;
583 static int hf_gsm_a_dtap_hold_auxiliary_state = -1;
584 static int hf_gsm_a_dtap_radio_channel_requirement = -1;
585 static int hf_gsm_a_dtap_channel_coding_asymmetry_indication = -1;
586 static int hf_gsm_a_dtap_service_type = -1;
587 static int hf_gsm_a_dtap_text_string = -1;
588 static int hf_gsm_a_dtap_tp_tested_device = -1;
589 static int hf_gsm_a_dtap_fixed_network_user_rate = -1;
590 static int hf_gsm_a_dtap_coding_scheme = -1;
591 static int hf_gsm_a_dtap_acceptable_channel_codings_ext_TCH_F28_8 = -1;
592 static int hf_gsm_a_dtap_v110_x30_rate_adaptation = -1;
593 static int hf_gsm_a_dtap_transfer_mode = -1;
594 static int hf_gsm_a_dtap_layer_2_identity = -1;
595 static int hf_gsm_a_dtap_add_ci = -1;
596 static int hf_gsm_a_dtap_mm_timer = -1;
597 static int hf_gsm_a_dtap_in_out_band = -1;
598 static int hf_gsm_a_dtap_data = -1;
599 static int hf_gsm_a_dtap_acceptable_channel_codings_TCH_F14_4 = -1;
600 static int hf_gsm_a_dtap_ti_flag = -1;
601 static int hf_gsm_a_dtap_time_zone_time = -1;
602 static int hf_gsm_a_dtap_acceptable_channel_codings_spare20 = -1;
603 static int hf_gsm_a_dtap_establishment = -1;
604 static int hf_gsm_a_dtap_duplex_mode = -1;
606 /* Initialize the subtree pointers */
607 static gint ett_dtap_msg = -1;
608 static gint ett_dtap_oct_1 = -1;
609 static gint ett_cm_srvc_type = -1;
610 static gint ett_gsm_enc_info = -1;
611 static gint ett_bc_oct_3 = -1;
612 static gint ett_bc_oct_3a = -1;
613 static gint ett_bc_oct_4 = -1;
614 static gint ett_bc_oct_5 = -1;
615 static gint ett_bc_oct_5a = -1;
616 static gint ett_bc_oct_5b = -1;
617 static gint ett_bc_oct_6 = -1;
618 static gint ett_bc_oct_6a = -1;
619 static gint ett_bc_oct_6b = -1;
620 static gint ett_bc_oct_6c = -1;
621 static gint ett_bc_oct_6d = -1;
622 static gint ett_bc_oct_6e = -1;
623 static gint ett_bc_oct_6f = -1;
624 static gint ett_bc_oct_6g = -1;
625 static gint ett_bc_oct_7 = -1;
626 static gint ett_epc_ue_tl_a_lb_setup = -1;
627 static gint ett_mm_timer = -1;
629 static expert_field ei_gsm_a_dtap_keypad_info_not_dtmf_digit = EI_INIT;
630 static expert_field ei_gsm_a_dtap_text_string_not_multiple_of_7 = EI_INIT;
631 static expert_field ei_gsm_a_dtap_autn = EI_INIT;
632 static expert_field ei_gsm_a_dtap_invalid_ia5_character = EI_INIT;
633 static expert_field ei_gsm_a_dtap_auts = EI_INIT;
634 static expert_field ei_gsm_a_dtap_end_mark_unexpected = EI_INIT;
635 static expert_field ei_gsm_a_dtap_extraneous_data = EI_INIT;
636 static expert_field ei_gsm_a_dtap_missing_mandatory_element = EI_INIT;
638 static char a_bigbuf[1024];
640 static dissector_handle_t data_handle;
641 static dissector_handle_t gsm_map_handle;
642 static dissector_handle_t rp_handle;
644 static proto_tree *g_tree;
647 * this should be set on a per message basis, if possible
649 static gint is_uplink;
650 static guint8 epc_test_loop_mode;
652 #define NUM_GSM_DTAP_ELEM (sizeof(gsm_dtap_elem_strings)/sizeof(value_string))
653 gint ett_gsm_dtap_elem[NUM_GSM_DTAP_ELEM];
655 static dgt_set_t Dgt_mbcd = {
657 /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
658 '0','1','2','3','4','5','6','7','8','9','*','#','a','b','c','?'
663 * [9] 10.5.3.1 Authentication parameter RAND
666 de_auth_param_rand(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
668 /* The RAND value is 16 octets long */
669 proto_tree_add_item(tree, hf_gsm_a_dtap_rand, tvb, offset, 16, ENC_NA);
671 /* no length check possible */
676 * [9] 10.5.3.1.1 Authentication Parameter AUTN (UMTS and EPS authentication challenge)
679 de_auth_param_autn(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
684 item = proto_tree_add_item(tree, hf_gsm_a_dtap_autn, tvb, offset, len, ENC_NA);
685 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_AUTH_PARAM_AUTN]);
689 proto_tree_add_item(subtree, hf_gsm_a_dtap_autn_sqn_xor_ak, tvb, offset, 6, ENC_NA);
690 proto_tree_add_item(subtree, hf_gsm_a_dtap_autn_amf, tvb, offset + 6, 2, ENC_NA);
691 proto_tree_add_item(subtree, hf_gsm_a_dtap_autn_mac, tvb, offset + 8, 8, ENC_NA);
694 expert_add_info(pinfo, item, &ei_gsm_a_dtap_autn);
700 * [9] 10.5.3.2 Authentication Response parameter
703 de_auth_resp_param(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
705 /* This IE contains either the SRES or the 4 most significant octets of the RES */
706 proto_tree_add_item(tree, hf_gsm_a_dtap_sres, tvb, offset, 4, ENC_NA);
708 /* no length check possible */
713 * [9] 10.5.3.2.1 Authentication Response Parameter (extension) (UMTS authentication challenge only)
716 de_auth_resp_param_ext(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
718 /* This IE contains all but 4 most significant octets of RES */
719 proto_tree_add_item(tree, hf_gsm_a_dtap_xres, tvb, offset, len, ENC_NA);
725 * [9] 10.5.3.2.2 Authentication Failure parameter (UMTS and EPS authentication challenge)
728 de_auth_fail_param(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
733 item = proto_tree_add_item(tree, hf_gsm_a_dtap_auts, tvb, offset, len, ENC_NA);
734 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_AUTH_FAIL_PARAM]);
738 proto_tree_add_item(subtree, hf_gsm_a_dtap_auts_sqn_ms_xor_ak, tvb, offset, 6, ENC_NA);
739 proto_tree_add_item(subtree, hf_gsm_a_dtap_auts_mac_s, tvb, offset + 6, 8, ENC_NA);
742 expert_add_info(pinfo, item, &ei_gsm_a_dtap_auts);
748 * 10.5.3.3 CM service type
752 * 10.5.3.4 Identity type
756 * 10.5.3.5 Location updating type
760 * [3] 10.5.3.5a Network Name
762 static const value_string gsm_a_dtap_number_of_spare_bits_vals[] = {
763 { 0, "this field carries no information about the number of spare bits in octet n"},
764 { 1, "bit 8 is spare and set to '0' in octet n"},
765 { 2, "bits 7 and 8 are spare and set to '0' in octet n"},
766 { 3, "bits 6 to 8(inclusive) are spare and set to '0' in octet n"},
767 { 4, "bits 5 to 8(inclusive) are spare and set to '0' in octet n"},
768 { 5, "bits 4 to 8(inclusive) are spare and set to '0' in octet n"},
769 { 6, "bits 3 to 8(inclusive) are spare and set to '0' in octet n"},
770 { 7, "bits 2 to 8(inclusive) are spare and set to '0' in octet n"},
774 const true_false_string tfs_add_ci = { "The MS should add the letters for the Country's Initials and a separator (e.g. a space) to the text string",
775 "The MS should not add the letters for the Country's Initials to the text string" };
778 de_network_name(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
783 guint8 coding_scheme, num_spare_bits;
784 guint32 num_text_bits;
785 gchar *net_name = NULL;
788 curr_offset = offset;
790 oct = tvb_get_guint8(tvb, curr_offset);
792 proto_tree_add_item(tree, hf_gsm_a_extension, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
794 coding_scheme = (oct & 0x70) >> 4;
795 switch (coding_scheme)
797 case 0x00: str = "Cell Broadcast data coding scheme, GSM default alphabet, language unspecified, defined in 3GPP TS 23.038"; break;
798 case 0x01: str = "UCS2 (16 bit)"; break;
804 proto_tree_add_uint_format_value(tree, hf_gsm_a_dtap_coding_scheme, tvb, curr_offset, 1, oct, "%s", str);
805 proto_tree_add_item(tree, hf_gsm_a_dtap_add_ci, tvb, curr_offset, 1, ENC_NA);
807 num_spare_bits = oct & 0x07;
808 item = proto_tree_add_item(tree, hf_gsm_a_dtap_number_of_spare_bits, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
811 NO_MORE_DATA_CHECK(len);
812 switch (coding_scheme)
815 /* Check if there was a reasonable value for number of spare bits in last octet */
816 num_text_bits = ((len - 1) << 3) - num_spare_bits;
817 if (num_spare_bits && (num_text_bits % 7))
819 expert_add_info(pinfo, item, &ei_gsm_a_dtap_text_string_not_multiple_of_7);
821 proto_tree_add_ts_23_038_7bits_item(tree, hf_gsm_a_dtap_text_string, tvb, curr_offset<<3, num_text_bits/7);
824 net_name = tvb_get_string_enc(wmem_packet_scope(), tvb, curr_offset, (len - 1), ENC_UCS_2|ENC_BIG_ENDIAN);
825 proto_tree_add_string(tree, hf_gsm_a_dtap_text_string, tvb, curr_offset, len - 1, net_name);
828 proto_tree_add_text(tree,
829 tvb, curr_offset, len - 1,
830 "Text string encoded according to an unknown Coding Scheme");
837 * [9] 10.5.3.6 Reject cause
839 static const range_string gsm_a_dtap_rej_cause_vals[] = {
840 { 0x02, 0x02, "IMSI unknown in HLR"},
841 { 0x03, 0x03, "Illegal MS"},
842 { 0x04, 0x04, "IMSI unknown in VLR"},
843 { 0x05, 0x05, "IMEI not accepted"},
844 { 0x06, 0x06, "Illegal ME"},
845 { 0x0b, 0x0b, "PLMN not allowed"},
846 { 0x0c, 0x0c, "Location Area not allowed"},
847 { 0x0d, 0x0d, "Roaming not allowed in this location area"},
848 { 0x0f, 0x0f, "No Suitable Cells In Location Area"},
849 { 0x11, 0x11, "Network failure"},
850 { 0x14, 0x14, "MAC failure"},
851 { 0x15, 0x15, "Synch failure"},
852 { 0x16, 0x16, "Congestion"},
853 { 0x17, 0x17, "GSM authentication unacceptable"},
854 { 0x19, 0x19, "Not authorized for this CSG"},
855 { 0x20, 0x20, "Service option not supported"},
856 { 0x21, 0x21, "Requested service option not subscribed"},
857 { 0x22, 0x22, "Service option temporarily out of order"},
858 { 0x26, 0x26, "Call cannot be identified"},
859 { 0x30, 0x3f, "Retry upon entry into a new cell"},
860 { 0x5f, 0x5f, "Semantically incorrect message"},
861 { 0x60, 0x60, "Invalid mandatory information"},
862 { 0x61, 0x61, "Message type non-existent or not implemented"},
863 { 0x62, 0x62, "Message type not compatible with the protocol state"},
864 { 0x63, 0x63, "Information element non-existent or not implemented"},
865 { 0x64, 0x64, "Conditional IE error"},
866 { 0x65, 0x65, "Message not compatible with the protocol state"},
867 { 0x6f, 0x6f, "Protocol error, unspecified"},
872 de_rej_cause(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
877 oct = tvb_get_guint8(tvb, offset);
879 str = try_rval_to_str(oct, gsm_a_dtap_rej_cause_vals);
882 if (is_uplink == IS_UPLINK_TRUE)
883 str = "Protocol error, unspecified";
885 str = "Service option temporarily out of order";
888 proto_tree_add_uint_format_value(tree, hf_gsm_a_dtap_rej_cause, tvb,
889 offset, 1, oct, "%s (%u)", str, oct);
891 /* no length check possible */
897 * 10.5.3.7 Follow-on Proceed
901 * [3] 10.5.3.8 Time Zone
904 de_time_zone(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
910 curr_offset = offset;
912 /* 3GPP TS 23.040 version 6.6.0 Release 6
913 * 9.2.3.11 TP-Service-Centre-Time-Stamp (TP-SCTS)
915 * The Time Zone indicates the difference, expressed in quarters of an hour,
916 * between the local time and GMT. In the first of the two semi-octets,
917 * the first bit (bit 3 of the seventh octet of the TP-Service-Centre-Time-Stamp field)
918 * represents the algebraic sign of this difference (0: positive, 1: negative).
921 oct = tvb_get_guint8(tvb, curr_offset);
922 sign = (oct & 0x08)?'-':'+';
923 oct = (oct >> 4) + (oct & 0x07) * 10;
925 proto_tree_add_text(tree,
927 "Timezone: GMT %c %d hours %d minutes",
928 sign, oct / 4, oct % 4 * 15);
931 /* no length check possible */
933 return (curr_offset - offset);
937 * [3] 10.5.3.9 Time Zone and Time
940 de_time_zone_time(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
948 curr_offset = offset;
950 /* "unused" part of structure */
955 oct = tvb_get_guint8(tvb, curr_offset);
956 tm.tm_year = (oct & 0x0f)*10 + ((oct & 0xf0) >> 4) + 100;
957 oct = tvb_get_guint8(tvb, curr_offset+1);
958 tm.tm_mon = (oct & 0x0f)*10 + ((oct & 0xf0) >> 4) - 1;
959 oct = tvb_get_guint8(tvb, curr_offset+2);
960 tm.tm_mday = (oct & 0x0f)*10 + ((oct & 0xf0) >> 4);
961 oct = tvb_get_guint8(tvb, curr_offset+3);
962 tm.tm_hour = (oct & 0x0f)*10 + ((oct & 0xf0) >> 4);
963 oct = tvb_get_guint8(tvb, curr_offset+4);
964 tm.tm_min = (oct & 0x0f)*10 + ((oct & 0xf0) >> 4);
965 oct = tvb_get_guint8(tvb, curr_offset+5);
966 tm.tm_sec = (oct & 0x0f)*10 + ((oct & 0xf0) >> 4);
968 tv.secs = mktime(&tm);
971 proto_tree_add_time_format_value(tree, hf_gsm_a_dtap_time_zone_time, tvb, curr_offset, 6,
972 &tv, "%s", abs_time_to_str(wmem_packet_scope(), &tv, ABSOLUTE_TIME_LOCAL, FALSE));
975 /* 3GPP TS 23.040 version 6.6.0 Release 6
976 * 9.2.3.11 TP-Service-Centre-Time-Stamp (TP-SCTS)
978 * The Time Zone indicates the difference, expressed in quarters of an hour,
979 * between the local time and GMT. In the first of the two semi-octets,
980 * the first bit (bit 3 of the seventh octet of the TP-Service-Centre-Time-Stamp field)
981 * represents the algebraic sign of this difference (0: positive, 1: negative).
984 oct = tvb_get_guint8(tvb, curr_offset);
985 sign = (oct & 0x08)?'-':'+';
986 oct = (oct >> 4) + (oct & 0x07) * 10;
988 proto_tree_add_text(tree,
990 "Timezone: GMT %c %d hours %d minutes",
991 sign, oct / 4, oct % 4 * 15);
995 /* no length check possible */
997 return (curr_offset - offset);
1000 * 10.5.3.10 CTS permission
1004 * [3] 10.5.3.11 LSA Identifier
1005 * 3GPP TS 24.008 version 6.8.0 Release 6
1008 de_lsa_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
1010 guint32 curr_offset;
1012 curr_offset = offset;
1015 proto_tree_add_text(tree,tvb, curr_offset, len,"LSA ID not included");
1019 proto_tree_add_item(tree, hf_gsm_a_dtap_lsa_id, tvb, curr_offset, 3, ENC_BIG_ENDIAN);
1024 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_dtap_extraneous_data);
1026 return (curr_offset - offset);
1030 * [3] 10.5.3.12 Daylight Saving Time
1032 static const value_string gsm_a_dtap_dst_adjustment_vals[] = {
1033 { 0, "No adjustment for Daylight Saving Time"},
1034 { 1, "+1 hour adjustment for Daylight Saving Time"},
1035 { 2, "+2 hours adjustment for Daylight Saving Time"},
1041 de_day_saving_time(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
1043 guint32 curr_offset;
1045 curr_offset = offset;
1047 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, curr_offset<<3, 6, ENC_BIG_ENDIAN);
1049 proto_tree_add_item(tree, hf_gsm_a_dtap_dst_adjustment, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1052 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_dtap_extraneous_data);
1054 return (curr_offset - offset);
1058 * 10.5.3.13 Emergency Number List
1061 de_emerg_num_list(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
1063 guint32 curr_offset;
1066 proto_tree *subtree;
1068 const char *digit_str;
1070 curr_offset = offset;
1073 while ((curr_offset - offset) < len) {
1074 /* Length of 1st Emergency Number information note 1) octet 3
1075 * NOTE 1: The length contains the number of octets used to encode the
1076 * Emergency Service Category Value and the Number digits.
1078 en_len = tvb_get_guint8(tvb, curr_offset);
1080 item = proto_tree_add_uint(tree, hf_gsm_a_dtap_emergency_number_information,
1081 tvb, curr_offset, en_len + 1, count);
1082 subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_EMERGENCY_NUM_LIST]);
1083 proto_tree_add_item(subtree, hf_gsm_a_dtap_emerg_num_info_length, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1086 /* 0 0 0 Emergency Service Category Value (see
1087 * Table 10.5.135d/3GPP TS 24.008
1088 * Table 10.5.135d/3GPP TS 24.008: Service Category information element
1090 proto_tree_add_bits_item(subtree, hf_gsm_a_spare_bits, tvb, curr_offset<<3, 3, ENC_BIG_ENDIAN);
1091 proto_tree_add_item(subtree, hf_gsm_a_dtap_serv_cat_b5, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1092 proto_tree_add_item(subtree, hf_gsm_a_dtap_serv_cat_b4, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1093 proto_tree_add_item(subtree, hf_gsm_a_dtap_serv_cat_b3, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1094 proto_tree_add_item(subtree, hf_gsm_a_dtap_serv_cat_b2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1095 proto_tree_add_item(subtree, hf_gsm_a_dtap_serv_cat_b1, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1099 digit_str = tvb_bcd_dig_to_wmem_packet_str(tvb, curr_offset, en_len, NULL, FALSE);
1100 item = proto_tree_add_string(subtree, hf_gsm_a_dtap_emergency_bcd_num, tvb, curr_offset, en_len, digit_str);
1102 /* Check for overdicadic digits, we used the standard digit map from tvbuff.c
1103 * 0 1 2 3 4 5 6 7 8 9 a b c d e f
1104 * '0','1','2','3','4','5','6','7','8','9','?','?','?','?','?','?'
1107 if(strchr(digit_str,'?')){
1108 expert_add_info(pinfo, item, &ei_gsm_a_dtap_end_mark_unexpected);
1111 curr_offset = curr_offset + en_len;
1119 * 10.5.3.14 Additional update parameters
1121 static const true_false_string gsm_a_dtap_csmo_value = {
1122 "CS fallback mobile originating call",
1123 "No additional information"
1126 static const true_false_string gsm_a_dtap_csmt_value = {
1127 "CS fallback mobile terminating call",
1128 "No additional information"
1132 de_add_upd_params(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
1134 guint32 curr_offset;
1136 curr_offset = offset;
1138 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset<<3)+4, 2, ENC_BIG_ENDIAN);
1139 proto_tree_add_bits_item(tree, hf_gsm_a_dtap_csmo, tvb, (curr_offset<<3)+6, 1, ENC_BIG_ENDIAN);
1140 proto_tree_add_bits_item(tree, hf_gsm_a_dtap_csmt, tvb, (curr_offset<<3)+7, 1, ENC_BIG_ENDIAN);
1146 * 10.5.3.15 MM Timer
1148 static const value_string gsm_a_dtap_mm_timer_unit_vals[] = {
1149 { 0x00, "value is incremented in multiples of 2 seconds" },
1150 { 0x01, "value is incremented in multiples of 1 minute" },
1151 { 0x02, "value is incremented in multiples of decihours" },
1152 { 0x07, "value indicates that the timer is deactivated" },
1157 de_mm_timer(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
1162 proto_tree *subtree;
1163 proto_item *item = NULL;
1165 oct = tvb_get_guint8(tvb, offset);
1171 str = "sec"; val*=2;
1177 str = "min"; val*=6;
1181 item = proto_tree_add_uint_format_value(tree, hf_gsm_a_dtap_mm_timer, tvb, offset, 1,
1182 oct, "timer is deactivated");
1190 item = proto_tree_add_uint_format_value(tree, hf_gsm_a_dtap_mm_timer, tvb, offset, 1, val,
1194 subtree = proto_item_add_subtree(item, ett_mm_timer);
1195 proto_tree_add_item(subtree, hf_gsm_a_dtap_mm_timer_unit, tvb, offset, 1, ENC_BIG_ENDIAN);
1196 proto_tree_add_item(subtree, hf_gsm_a_dtap_mm_timer_value, tvb, offset, 1, ENC_BIG_ENDIAN);
1202 * [3] 10.5.4.4 Auxiliary states
1205 static const value_string gsm_a_dtap_hold_auxilary_state_vals[] = {
1207 { 0x01, "Hold request" },
1208 { 0x02, "Call held" },
1209 { 0x03, "Retrieve request" },
1213 static const value_string gsm_a_dtap_multi_party_auxilary_state_vals[] = {
1215 { 0x01, "MPTY request" },
1216 { 0x02, "Call in MPTY" },
1217 { 0x03, "Split request" },
1222 de_aux_states(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
1224 guint32 curr_offset;
1226 curr_offset = offset;
1228 proto_tree_add_item(tree, hf_gsm_a_extension, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1230 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset<<3)+1, 3, ENC_BIG_ENDIAN);
1231 proto_tree_add_item(tree, hf_gsm_a_dtap_hold_auxiliary_state, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1232 proto_tree_add_item(tree, hf_gsm_a_dtap_multi_party_auxiliary_state, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1235 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_dtap_extraneous_data);
1237 return (curr_offset - offset);
1240 * 10.5.4.4a Backup bearer capability
1243 * [3] 10.5.4.5 Bearer capability (3GPP TS 24.008 version 8.4.0 Release 8)
1245 /* Speech version indication (octet(s) 3a etc.) Bits 4 3 2 1 */
1247 static const value_string gsm_a_dtap_speech_vers_ind_values[] = {
1248 { 0x0, "GSM full rate speech version 1(GSM FR)" },
1249 { 0x1, "GSM half rate speech version 1(GSM HR)" },
1250 { 0x2, "GSM full rate speech version 2(GSM EFR)" },
1251 { 0x3, "Speech version tbd" },
1252 { 0x4, "GSM full rate speech version 3(FR AMR)" },
1253 { 0x5, "GSM half rate speech version 3(HR AMR)" },
1254 { 0x6, "GSM full rate speech version 4(OFR AMR-WB)" },
1255 { 0x7, "GSM half rate speech version 4(OHR AMR-WB)" },
1256 { 0x8, "GSM full rate speech version 5(FR AMR-WB)" },
1257 { 0x9, "Speech version tbd" },
1258 { 0xa, "Speech version tbd" },
1259 { 0xb, "GSM half rate speech version 6(OHR AMR)" },
1260 { 0xc, "Speech version tbd" },
1261 { 0xd, "Speech version tbd" },
1262 { 0xe, "Speech version tbd" },
1263 { 0xf, "No speech version supported for GERAN" },
1266 /* All other values have the meaning "speech version tbd" and shall be ignored
1270 * Information transfer capability (octet 3) Bits 3 2 1
1272 static const value_string gsm_a_dtap_itc_values[] = {
1274 { 0x1, "Unrestricted digital information" },
1275 { 0x2, "3.1 kHz audio, ex PLMN" },
1276 { 0x3, "Facsimile group 3" },
1277 { 0x5, "Other ITC (See Octet 5a)" },
1278 { 0x7, "Reserved,(In Network alternate speech/facsimile group 3)" },
1282 static const value_string gsm_a_dtap_structure_vals[] = {
1283 { 0x0, "Service data unit integrity" },
1284 { 0x1, "Reserved" },
1285 { 0x2, "Reserved" },
1286 { 0x3, "Unstructured" },
1290 static const value_string gsm_a_dtap_access_identity_vals[] = {
1291 { 0x0, "Octet identifier" },
1292 { 0x1, "Octet identifier" },
1293 { 0x2, "Octet identifier" },
1294 { 0x3, "Reserved" },
1298 static const value_string gsm_a_dtap_rate_adaption_vals[] = {
1299 { 0x0, "No rate adaption" },
1300 { 0x1, "Rate adaptation according to ITU-T Rec. V.110 and ITU-T Rec. X.30" },
1301 { 0x2, "Flag stuffing according to ITU-T Rec. X.31" },
1302 { 0x3, "Other rate adaption (see octet 5a)" },
1306 static const value_string gsm_a_dtap_signal_access_protocol_vals[] = {
1307 { 0x0, "Reserved" },
1308 { 0x1, "Rate adaptation according to ITU-T Rec. V.110 and ITU-T Rec. X.30" },
1309 { 0x2, "Flag stuffing according to ITU-T Rec. X.31" },
1310 { 0x3, "Other rate adaption (see octet 5a)" },
1311 { 0x4, "No rate adaption" },
1312 { 0x5, "Rate adaptation according to ITU-T Rec. V.110 and ITU-T Rec. X.30" },
1313 { 0x6, "Flag stuffing according to ITU-T Rec. X.31" },
1314 { 0x7, "Reserved" },
1318 static const value_string gsm_a_dtap_other_itc_vals[] = {
1319 { 0x0, "Restricted digital information" },
1320 { 0x1, "Restricted digital information" },
1321 { 0x2, "Restricted digital information" },
1322 { 0x3, "Reserved" },
1326 static const value_string gsm_a_dtap_other_rate_adaption_vals[] = {
1327 { 0x0, "According to ITU-T Rec. V.120" },
1328 { 0x1, "According to ITU-T Rec. H.223 and ITU-T Rec. H.245" },
1330 { 0x3, "Reserved" },
1334 static const value_string gsm_a_dtap_user_rate_vals[] = {
1335 { 0x1, "0.3 kbit/s (according to ITU-T Rec. X.1 and ITU-T Rec. V.110)" },
1336 { 0x2, "1.2 kbit/s (according to ITU-T Rec. X.1 and ITU-T Rec. V.110)" },
1337 { 0x3, "2.4 kbit/s (according to ITU-T Rec. X.1 and ITU-T Rec. V.110)" },
1338 { 0x4, "4.8 kbit/s (according to ITU-T Rec. X.1 and ITU-T Rec. V.110)" },
1339 { 0x5, "9.6 kbit/s (according to ITU-T Rec. X.1 and ITU-T Rec. V.110)" },
1340 { 0x6, "12.0 kbit/s transparent (non compliance with ITU-T Rec. X.1 and ITU-T Rec. V.110)" },
1341 { 0x7, "Reserved: was allocated in earlier phases of the protocol" },
1345 static const value_string gsm_a_dtap_v110_x30_rate_adaptation_vals[] = {
1346 { 0x0, "Reserved" },
1347 { 0x1, "Reserved" },
1348 { 0x2, "8 kbit/s" },
1349 { 0x3, "16 kbit/s" },
1353 static const value_string gsm_a_dtap_parity_info_vals[] = {
1355 { 0x1, "Reserved" },
1358 { 0x4, "Forced to 0" },
1359 { 0x5, "Forced to 1" },
1360 { 0x6, "Reserved" },
1361 { 0x7, "Reserved" },
1365 static const value_string gsm_a_dtap_connection_element_vals[] = {
1366 { 0x0, "Transparent" },
1367 { 0x1, "Non transparent (RLP)" },
1368 { 0x2, "Both, transparent preferred" },
1369 { 0x3, "Both, non transparent preferred" },
1373 static const value_string gsm_a_dtap_modem_type_vals[] = {
1375 { 0x1, "According to ITU-T Rec. V.21" },
1376 { 0x2, "According to ITU-T Rec. V.22" },
1377 { 0x3, "According to ITU-T Rec. V.22 bis" },
1378 { 0x4, "Reserved: was allocated in earlier phases of the protocol" },
1379 { 0x5, "According to ITU-T Rec. V.26 ter" },
1380 { 0x6, "According to ITU-T Rec. V.32" },
1381 { 0x7, "Modem for undefined interface" },
1382 { 0x8, "Autobauding type 1" },
1386 static const value_string gsm_a_dtap_other_modem_type_vals[] = {
1387 { 0x0, "No other modem type specified in this field" },
1388 { 0x1, "Reserved" },
1389 { 0x2, "According to ITU-T Rec. V.34" },
1390 { 0x3, "Reserved" },
1394 static const value_string gsm_a_dtap_fixed_network_user_rate_vals[] = {
1395 { 0x00, "Fixed network user rate not applicable/No meaning is associated with this value"},
1396 { 0x01, "9.6 kbit/s (according to ITU-T Rec. X.1 and ITU-T Rec. V.110)"},
1397 { 0x02, "14.4 kbit/s (according to ITU-T Rec. X.1 and ITU-T Rec. V.110)"},
1398 { 0x03, "19.2 kbit/s (according to ITU-T Rec. X.1 and ITU-T Rec. V.110)"},
1399 { 0x04, "28.8 kbit/s (according to ITU-T Rec. X.1 and ITU-T Rec. V.110)"},
1400 { 0x05, "38.4 kbit/s (according to ITU-T Rec. X.1 and ITU-T Rec. V.110)"},
1401 { 0x06, "48.0 kbit/s (according to ITU-T Rec. X.1 and ITU-T Rec. V.110 (synch))"},
1402 { 0x07, "56.0 kbit/s (according to ITU-T Rec. X.1 and ITU-T Rec. V.110 (synch) /bit transparent)"},
1403 { 0x08, "64.0 kbit/s bit transparent"},
1404 { 0x09, "33.6 kbit/s bit transparent"},
1405 { 0x0a, "32.0 kbit/s (according to ITU-T Rec. I.460)"},
1406 { 0x0b, "31.2 kbit/s (according to ITU-T Rec. V.34)"},
1410 static const value_string gsm_a_dtap_uimi_vals[] = {
1411 { 0x0, "not allowed/required/applicable" },
1412 { 0x1, "up to 1 TCH/F allowed/may be requested" },
1413 { 0x2, "up to 2 TCH/F allowed/may be requested" },
1414 { 0x3, "up to 3 TCH/F allowed/may be requested" },
1415 { 0x4, "up to 4 TCH/F allowed/may be requested" },
1416 { 0x5, "up to 4 TCH/F may be requested" },
1417 { 0x6, "up to 4 TCH/F may be requested" },
1418 { 0x7, "up to 4 TCH/F may be requested" },
1422 static const value_string gsm_a_dtap_wanted_air_rate_vals[] = {
1423 { 0x0, "Air interface user rate not applicable/No meaning associated with this value" },
1424 { 0x1, "9.6 kbit/s" },
1425 { 0x2, "14.4 kbit/s" },
1426 { 0x3, "19.2 kbit/s" },
1427 { 0x4, "Reserved" },
1428 { 0x5, "28.8 kbit/s" },
1429 { 0x6, "38.4 kbit/s" },
1430 { 0x7, "43.2 kbit/s" },
1431 { 0x8, "57.6 kbit/s" },
1432 { 0x9, "interpreted by the network as 38.4 kbit/s in this version of the protocol" },
1433 { 0xa, "interpreted by the network as 38.4 kbit/s in this version of the protocol" },
1434 { 0xb, "interpreted by the network as 38.4 kbit/s in this version of the protocol" },
1435 { 0xc, "interpreted by the network as 38.4 kbit/s in this version of the protocol" },
1436 { 0xd, "Reserved" },
1437 { 0xe, "Reserved" },
1438 { 0xf, "Reserved" },
1442 static const value_string gsm_a_dtap_channel_coding_asymmetry_ind_vals[] = {
1443 { 0x0, "Channel coding symmetry preferred" },
1444 { 0x1, "Uplink biased channel coding asymmetry is preferred" },
1445 { 0x2, "Downlink biased channel coding asymmetry is preferred" },
1446 { 0x3, "Unused, treat as Channel coding symmetry preferred" },
1450 static const value_string gsm_a_dtap_user_info_layer2_vals[] = {
1451 { 0x06, "Reserved: was allocated in earlier phases of the protocol" },
1452 { 0x08, "According to ISO/IEC 6429, codeset 0 (DC1/DC3)" },
1453 { 0x09, "Reserved: was allocated but never used in earlier phases of the protocol" },
1454 { 0x0a, "Videotex profile 1" },
1455 { 0x0c, "COPnoFlCt (Character oriented Protocol with no Flow Control mechanism)" },
1456 { 0x0d, "Reserved: was allocated in earlier phases of the protocol" },
1460 static const true_false_string tfs_bearer_cap_coding_standard = { "reserved", "GSM standardized coding" };
1461 static const true_false_string tfs_bearer_cap_transfer_mode = { "packet", "circuit" };
1462 static const true_false_string tfs_bearer_cap_coding = { "octet used for other extension of octet 3", "octet used for extension of information transfer capability" };
1463 static const true_false_string tfs_bearer_cap_configuration = { "Reserved", "Point-to-point" };
1464 static const true_false_string tfs_nirr = { "Data up to and including 4.8 kb/s, full rate, non-transparent, 6 kb/s radio interface rate is requested",
1465 "No meaning is associated with this value" };
1466 static const true_false_string tfs_bearer_cap_establishment = { "Reserved", "Demand" };
1467 static const true_false_string tfs_frame_est_supported_not_supported = { "Supported", "Not supported, only UI frames allowed" };
1468 static const true_false_string tfs_log_link_neg = { "Full protocol negotiation", "Default, LLI=256 only" };
1469 static const true_false_string tfs_assignor_assignee = { "Message originator is assignor only", "Message originator is default assignee" };
1470 static const true_false_string tfs_in_out_band = { "Negotiation is done with USER INFORMATION messages on a temporary signalling connection",
1471 "Negotiation is done in-band using logical link zero" };
1472 static const true_false_string tfs_stop_bits = { "2", "1" };
1473 static const true_false_string tfs_negotiation = { "Reserved", "In-band negotiation not possible" };
1474 static const true_false_string tfs_parity_bits = { "8", "7" };
1475 static const true_false_string tfs_nic_on_tx = { "requires to send data with network independent clock",
1476 "does not require to send data with network independent clock" };
1477 static const true_false_string tfs_nic_on_rx = { "can accept data with network independent clock",
1478 "cannot accept data with network independent clock" };
1481 de_bearer_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string, int string_len)
1486 guint32 curr_offset;
1487 guint32 saved_offset;
1488 proto_tree *subtree;
1492 #define DE_BC_ITC_SPEECH 0x00
1493 #define DE_BC_ITC_UDI 0x01
1494 #define DE_BC_ITC_EX_PLMN 0x02
1495 #define DE_BC_ITC_FASC_G3 0x03
1496 #define DE_BC_ITC_OTHER_ITC 0x05
1497 #define DE_BC_ITC_RSVD_NET 0x07
1499 curr_offset = offset;
1501 oct = tvb_get_guint8(tvb, curr_offset);
1506 * warning, bearer cap uses extended values that
1507 * are reversed from other parameters!
1510 proto_tree_add_subtree(tree,
1511 tvb, curr_offset, 1,
1512 ett_bc_oct_3, NULL, "Octet 3");
1514 extended = (oct & 0x80) ? FALSE : TRUE;
1517 proto_tree_add_item(subtree, hf_gsm_a_extension, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1521 case IS_UPLINK_FALSE:
1525 case IS_UPLINK_TRUE:
1527 * depends on Information transfer capability
1531 case DE_BC_ITC_SPEECH:
1534 switch ((oct & 0x60) >> 5)
1536 case 1: str = "MS supports at least full rate speech version 1 but does not support half rate speech version 1"; break;
1537 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;
1538 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;
1546 switch ((oct & 0x60) >> 5)
1548 case 1: str = "Full rate support only MS/fullrate speech version 1 supported"; break;
1549 case 2: str = "Dual rate support MS/half rate speech version 1 preferred, full rate speech version 1 also supported"; break;
1550 case 3: str = "Dual rate support MS/full rate speech version 1 preferred, half rate speech version 1 also supported"; break;
1559 switch ((oct & 0x60) >> 5)
1561 case 1: str = "Full rate support only MS"; break;
1562 case 2: str = "Dual rate support MS/half rate preferred"; break;
1563 case 3: str = "Dual rate support MS/full rate preferred"; break;
1573 str = "(dissect problem)";
1577 proto_tree_add_uint_format_value(subtree, hf_gsm_a_dtap_radio_channel_requirement, tvb, curr_offset, 1,
1580 proto_tree_add_item(subtree, hf_gsm_a_dtap_bearer_cap_coding_standard, tvb, curr_offset, 1, ENC_NA);
1581 proto_tree_add_item(subtree, hf_gsm_a_dtap_transfer_mode, tvb, curr_offset, 1, ENC_NA);
1583 proto_tree_add_item(subtree, hf_gsm_a_dtap_itc, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1586 g_snprintf(add_string, string_len, " - (%s)", str);
1590 NO_MORE_DATA_CHECK(len);
1594 case DE_BC_ITC_SPEECH:
1598 proto_tree_add_subtree(tree,
1599 tvb, curr_offset, -1, ett_bc_oct_3a, &item,
1600 "Octets 3a - Speech Versions");
1602 saved_offset = curr_offset;
1606 oct = tvb_get_guint8(tvb, curr_offset);
1608 extended = (oct & 0x80) ? FALSE : TRUE;
1610 proto_tree_add_item(subtree, hf_gsm_a_extension, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1611 proto_tree_add_item(subtree, hf_gsm_a_dtap_coding, tvb, curr_offset, 1, ENC_NA);
1612 proto_tree_add_bits_item(subtree, hf_gsm_a_spare_bits, tvb, (curr_offset<<3)+2, 2, ENC_BIG_ENDIAN);
1613 proto_tree_add_item(subtree, hf_gsm_a_dtap_speech_vers_ind, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1617 ((len - (curr_offset - offset)) > 0));
1619 proto_item_set_len(item, curr_offset - saved_offset);
1626 proto_tree_add_subtree(tree,
1627 tvb, curr_offset, 1,
1628 ett_bc_oct_4, NULL, "Octet 4");
1630 proto_tree_add_item(subtree, hf_gsm_a_extension, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1631 proto_tree_add_item(subtree, is_uplink ? hf_gsm_a_dtap_compression_up : hf_gsm_a_dtap_compression,
1632 tvb, curr_offset, 1, ENC_NA);
1634 proto_tree_add_item(subtree, hf_gsm_a_dtap_structure, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1635 proto_tree_add_item(subtree, hf_gsm_a_dtap_duplex_mode, tvb, curr_offset, 1, ENC_NA);
1636 proto_tree_add_item(subtree, hf_gsm_a_dtap_configuration, tvb, curr_offset, 1, ENC_NA);
1637 proto_tree_add_item(subtree, hf_gsm_a_dtap_nirr, tvb, curr_offset, 1, ENC_NA);
1638 proto_tree_add_item(subtree, hf_gsm_a_dtap_establishment, tvb, curr_offset, 1, ENC_NA);
1641 NO_MORE_DATA_CHECK(len);
1646 proto_tree_add_subtree(tree,
1647 tvb, curr_offset, 1,
1648 ett_bc_oct_5, NULL, "Octet 5");
1650 oct = tvb_get_guint8(tvb, curr_offset);
1652 extended = (oct & 0x80) ? FALSE : TRUE;
1654 proto_tree_add_item(subtree, hf_gsm_a_extension, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1655 proto_tree_add_item(subtree, hf_gsm_a_dtap_access_identity, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1656 proto_tree_add_item(subtree, hf_gsm_a_dtap_rate_adaption, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1657 proto_tree_add_item(subtree, hf_gsm_a_dtap_signalling_access_protocol, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1660 NO_MORE_DATA_CHECK(len);
1662 if (!extended) goto bc_octet_6;
1667 proto_tree_add_subtree(tree,
1668 tvb, curr_offset, 1,
1669 ett_bc_oct_5a, NULL, "Octet 5a");
1671 oct = tvb_get_guint8(tvb, curr_offset);
1673 extended = (oct & 0x80) ? FALSE : TRUE;
1675 proto_tree_add_item(subtree, hf_gsm_a_extension, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1676 proto_tree_add_item(subtree, hf_gsm_a_dtap_other_itc, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1677 proto_tree_add_item(subtree, hf_gsm_a_dtap_other_rate_adaption, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1678 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset<<3)+5, 3, ENC_BIG_ENDIAN);
1681 NO_MORE_DATA_CHECK(len);
1683 if (!extended) goto bc_octet_6;
1688 proto_tree_add_subtree(tree,
1689 tvb, curr_offset, 1,
1690 ett_bc_oct_5b, NULL, "Octet 5b");
1692 proto_tree_add_item(subtree, hf_gsm_a_extension, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1693 proto_tree_add_item(subtree, hf_gsm_a_dtap_rate_adaption_header, tvb, curr_offset, 1, ENC_NA);
1694 proto_tree_add_item(subtree, hf_gsm_a_dtap_multiple_frame_establishment_support, tvb, curr_offset, 1, ENC_NA);
1695 proto_tree_add_item(subtree, hf_gsm_a_dtap_mode_of_operation, tvb, curr_offset, 1, ENC_NA);
1696 proto_tree_add_item(subtree, hf_gsm_a_dtap_logical_link_identifier_negotiation, tvb, curr_offset, 1, ENC_NA);
1697 proto_tree_add_item(subtree, hf_gsm_a_dtap_assignor_assignee, tvb, curr_offset, 1, ENC_NA);
1698 proto_tree_add_item(subtree, hf_gsm_a_dtap_in_out_band, tvb, curr_offset, 1, ENC_NA);
1699 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset<<3)+7, 1, ENC_BIG_ENDIAN);
1703 NO_MORE_DATA_CHECK(len);
1710 proto_tree_add_subtree(tree,
1711 tvb, curr_offset, 1,
1712 ett_bc_oct_6, NULL, "Octet 6");
1714 oct = tvb_get_guint8(tvb, curr_offset);
1716 extended = (oct & 0x80) ? FALSE : TRUE;
1718 proto_tree_add_item(subtree, hf_gsm_a_extension, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1720 proto_tree_add_uint_format_value(subtree, hf_gsm_a_dtap_layer_1_identity, tvb, curr_offset, 1, oct,
1721 "%s", ((oct & 0x60) == 0x20) ? "Octet identifier" : "Reserved");
1723 proto_tree_add_uint_format_value(subtree, hf_gsm_a_dtap_user_information_layer_1_protocol,
1724 tvb, curr_offset, 1, oct, "%s",
1725 (oct & 0x1e) ? "Reserved" : "Default layer 1 protocol");
1727 proto_tree_add_item(subtree, hf_gsm_a_dtap_synchronous, tvb, curr_offset, 1, ENC_NA);
1730 NO_MORE_DATA_CHECK(len);
1732 if (!extended) goto bc_octet_7;
1737 proto_tree_add_subtree(tree,
1738 tvb, curr_offset, 1,
1739 ett_bc_oct_6a, NULL, "Octet 6a");
1741 oct = tvb_get_guint8(tvb, curr_offset);
1743 extended = (oct & 0x80) ? FALSE : TRUE;
1745 proto_tree_add_item(subtree, hf_gsm_a_extension, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1746 proto_tree_add_item(subtree, hf_gsm_a_dtap_number_of_stop_bits, tvb, curr_offset, 1, ENC_NA);
1747 proto_tree_add_item(subtree, hf_gsm_a_dtap_negotiation, tvb, curr_offset, 1, ENC_NA);
1748 proto_tree_add_item(subtree, hf_gsm_a_dtap_number_of_data_bits, tvb, curr_offset, 1, ENC_NA);
1750 proto_tree_add_uint_format_value(subtree, hf_gsm_a_dtap_user_rate,
1751 tvb, curr_offset, 1, oct, "%s", val_to_str_const(oct & 0xF, gsm_a_dtap_user_rate_vals, "Reserved"));
1755 NO_MORE_DATA_CHECK(len);
1757 if (!extended) goto bc_octet_7;
1762 proto_tree_add_subtree(tree,
1763 tvb, curr_offset, 1,
1764 ett_bc_oct_6b, NULL, "Octet 6b");
1766 oct = tvb_get_guint8(tvb, curr_offset);
1768 extended = (oct & 0x80) ? FALSE : TRUE;
1770 proto_tree_add_item(subtree, hf_gsm_a_extension, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1771 proto_tree_add_item(subtree, hf_gsm_a_dtap_v110_x30_rate_adaptation, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1772 proto_tree_add_item(subtree, hf_gsm_a_dtap_nic_on_tx, tvb, curr_offset, 1, ENC_NA);
1773 proto_tree_add_item(subtree, hf_gsm_a_dtap_nic_on_rx, tvb, curr_offset, 1, ENC_NA);
1774 proto_tree_add_item(subtree, hf_gsm_a_dtap_parity_information, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1777 NO_MORE_DATA_CHECK(len);
1779 if (!extended) goto bc_octet_7;
1784 proto_tree_add_subtree(tree,
1785 tvb, curr_offset, 1,
1786 ett_bc_oct_6c, NULL, "Octet 6c");
1788 oct = tvb_get_guint8(tvb, curr_offset);
1790 extended = (oct & 0x80) ? FALSE : TRUE;
1792 proto_tree_add_item(subtree, hf_gsm_a_extension, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1793 proto_tree_add_item(subtree, hf_gsm_a_dtap_connection_element, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1794 proto_tree_add_uint_format_value(subtree, hf_gsm_a_dtap_modem_type, tvb, curr_offset, 1,
1795 oct, "%s", val_to_str_const(oct & 0x1f, gsm_a_dtap_modem_type_vals, "Reserved"));
1799 NO_MORE_DATA_CHECK(len);
1801 if (!extended) goto bc_octet_7;
1806 proto_tree_add_subtree(tree,
1807 tvb, curr_offset, 1,
1808 ett_bc_oct_6d, NULL, "Octet 6d");
1810 oct = tvb_get_guint8(tvb, curr_offset);
1812 extended = (oct & 0x80) ? FALSE : TRUE;
1814 proto_tree_add_item(subtree, hf_gsm_a_extension, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1815 proto_tree_add_item(subtree, hf_gsm_a_dtap_other_modem_type, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1816 proto_tree_add_uint_format_value(subtree, hf_gsm_a_dtap_fixed_network_user_rate, tvb, curr_offset, 1,
1817 oct, "%s", val_to_str_const(oct & 0x1f, gsm_a_dtap_fixed_network_user_rate_vals, "Reserved"));
1820 NO_MORE_DATA_CHECK(len);
1822 if (!extended) goto bc_octet_7;
1827 proto_tree_add_subtree(tree,
1828 tvb, curr_offset, 1,
1829 ett_bc_oct_6e, NULL, "Octet 6e");
1831 oct = tvb_get_guint8(tvb, curr_offset);
1833 extended = (oct & 0x80) ? FALSE : TRUE;
1835 proto_tree_add_item(subtree, hf_gsm_a_extension, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1837 if (is_uplink == IS_UPLINK_TRUE)
1839 proto_tree_add_item(subtree, hf_gsm_a_dtap_acceptable_channel_codings_TCH_F14_4, tvb, curr_offset, 1, ENC_NA);
1840 proto_tree_add_item(subtree, hf_gsm_a_dtap_acceptable_channel_codings_spare20, tvb, curr_offset, 1, ENC_NA);
1841 proto_tree_add_item(subtree, hf_gsm_a_dtap_acceptable_channel_codings_TCH_F9_6, tvb, curr_offset, 1, ENC_NA);
1842 proto_tree_add_item(subtree, hf_gsm_a_dtap_acceptable_channel_codings_TCH_F4_8, tvb, curr_offset, 1, ENC_NA);
1844 proto_tree_add_uint_format_value(subtree, hf_gsm_a_dtap_maximum_number_of_traffic_channels, tvb, curr_offset, 1,
1845 (oct & 0x07) + 1, "%u TCH", (oct & 0x07) + 1);
1849 proto_tree_add_uint_format_value(subtree, hf_gsm_a_dtap_acceptable_channel_codings_spare78, tvb, curr_offset, 1,
1851 proto_tree_add_uint_format_value(subtree, hf_gsm_a_dtap_maximum_number_of_traffic_channels, tvb, curr_offset, 1,
1857 NO_MORE_DATA_CHECK(len);
1859 if (!extended) goto bc_octet_7;
1864 proto_tree_add_subtree(tree,
1865 tvb, curr_offset, 1,
1866 ett_bc_oct_6f, NULL, "Octet 6f");
1868 oct = tvb_get_guint8(tvb, curr_offset);
1870 extended = (oct & 0x80) ? FALSE : TRUE;
1872 proto_tree_add_item(subtree, hf_gsm_a_extension, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1873 proto_tree_add_item(subtree, hf_gsm_a_dtap_uimi, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1875 if (is_uplink == IS_UPLINK_TRUE)
1877 proto_tree_add_item(subtree, hf_gsm_a_dtap_wanted_air_interface_user_rate, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1881 proto_tree_add_uint_format_value(subtree, hf_gsm_a_dtap_wanted_air_interface_user_rate, tvb, curr_offset, 1,
1887 NO_MORE_DATA_CHECK(len);
1889 if (!extended) goto bc_octet_7;
1894 proto_tree_add_subtree(tree,
1895 tvb, curr_offset, 1,
1896 ett_bc_oct_6g, NULL, "Octet 6g");
1898 oct = tvb_get_guint8(tvb, curr_offset);
1900 proto_tree_add_item(subtree, hf_gsm_a_extension, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1902 if (is_uplink == IS_UPLINK_TRUE)
1904 proto_tree_add_item(subtree, hf_gsm_a_dtap_acceptable_channel_codings_ext_TCH_F28_8, tvb, curr_offset, 1, ENC_NA);
1905 proto_tree_add_item(subtree, hf_gsm_a_dtap_acceptable_channel_codings_ext_TCH_F32_0, tvb, curr_offset, 1, ENC_NA);
1906 proto_tree_add_item(subtree, hf_gsm_a_dtap_acceptable_channel_codings_ext_TCH_F43_2, tvb, curr_offset, 1, ENC_NA);
1907 proto_tree_add_item(subtree, hf_gsm_a_dtap_channel_coding_asymmetry_indication, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1911 proto_tree_add_uint_format_value(subtree, hf_gsm_a_dtap_edge_channel_codings, tvb, curr_offset, 1, oct, "Spare");
1914 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset<<3)+6, 2, ENC_BIG_ENDIAN);
1918 NO_MORE_DATA_CHECK(len);
1924 proto_tree_add_subtree(tree,
1925 tvb, curr_offset, 1,
1926 ett_bc_oct_7, NULL, "Octet 7");
1928 proto_tree_add_item(subtree, hf_gsm_a_extension, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1930 proto_tree_add_uint_format_value(subtree, hf_gsm_a_dtap_layer_2_identity, tvb, curr_offset, 1, oct,
1931 "%s", ((oct & 0x60) == 0x40) ? "Octet identifier" : "Reserved");
1933 proto_tree_add_uint_format_value(subtree, hf_gsm_a_dtap_user_information_layer_2_protocol, tvb, curr_offset, 1,
1934 oct, "%s", val_to_str_const(oct & 0x1F, gsm_a_dtap_user_info_layer2_vals, "Reserved"));
1938 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_dtap_extraneous_data);
1940 return (curr_offset - offset);
1945 de_bearer_cap_uplink(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len)
1947 is_uplink = IS_UPLINK_TRUE;
1948 return de_bearer_cap(tvb, tree, pinfo, offset, len, add_string, string_len);
1953 * [9] 10.5.4.5a Call Control Capabilities
1955 const true_false_string gsm_a_dtap_mcat_value = {
1956 "The mobile station supports Multimedia CAT during the alerting phase of a mobile originated multimedia call establishment",
1957 "The mobile station does not support Multimedia CAT"
1960 const true_false_string gsm_a_dtap_enicm_value = {
1961 "The mobile station supports the Enhanced Network-initiated In-Call Modification procedure",
1962 "The mobile station does not support the Enhanced Network-initiated In-Call Modification procedure"
1965 const true_false_string gsm_a_dtap_dtmf_value = {
1966 "the mobile station supports DTMF as specified in subclause 5.5.7 of TS 24.008",
1967 "reserved for earlier versions of the protocol"
1971 de_cc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_) {
1973 guint32 curr_offset;
1975 curr_offset = offset;
1977 oct = tvb_get_guint8(tvb, curr_offset);
1979 if (((oct & 0xf0) >> 4) == 0)
1981 proto_tree_add_uint_format_value(tree, hf_gsm_a_dtap_maximum_number_of_supported_bearers, tvb, curr_offset, 1, 0, "1");
1985 proto_tree_add_item(tree, hf_gsm_a_dtap_maximum_number_of_supported_bearers, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1988 proto_tree_add_item(tree, hf_gsm_a_dtap_mcat, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1989 proto_tree_add_item(tree, hf_gsm_a_dtap_enicm, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1990 proto_tree_add_item(tree, hf_gsm_a_dtap_pcp, tvb, curr_offset, 1, ENC_NA);
1991 proto_tree_add_item(tree, hf_gsm_a_dtap_dtmf, tvb, curr_offset, 1, ENC_NA);
1995 NO_MORE_DATA_CHECK(len);
1997 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, curr_offset<<3, 4, ENC_BIG_ENDIAN);
1998 proto_tree_add_item(tree, hf_gsm_a_dtap_max_num_of_speech_bearers, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2002 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_dtap_extraneous_data);
2004 return (curr_offset - offset);
2008 * [3] 10.5.4.6 Call state
2010 static const value_string gsm_a_dtap_coding_standard_vals[] = {
2011 { 0x00, "standardized coding as described in ITU-T Rec. Q.931" },
2012 { 0x01, "reserved for other international standards" },
2013 { 0x02, "national standard" },
2014 { 0x03, "standard defined for the GSM PLMNS as described below" },
2018 static const value_string gsm_a_dtap_call_state_vals[] = {
2019 { 0x00, "U0/N0 - null" },
2020 { 0x02, "U0.1/N0.1 - MM connection pending" },
2021 { 0x22, "U0.2 - CC prompt present / N0.2 - CC connection pending" },
2022 { 0x23, "U0.3 - Wait for network information / N0.3 - Network answer pending" },
2023 { 0x24, "U0.4/N0.4 - CC-Establishment present" },
2024 { 0x25, "U0.5/N0.5 - CC-Establishment confirmed" },
2025 { 0x26, "U0.6/N0.6 - Recall present" },
2026 { 0x01, "U1/N1 - call initiated" },
2027 { 0x03, "U3/N3 - mobile originating call proceeding" },
2028 { 0x04, "U4/N4 - call delivered" },
2029 { 0x06, "U6/N6 - call present" },
2030 { 0x07, "U7/N7 - call received" },
2031 { 0x08, "U8/N8 - connect request" },
2032 { 0x09, "U9/N9 - mobile terminating call confirmed" },
2033 { 0x0a, "U10/N10 - active" },
2034 { 0x0b, "U11 - disconnect request" },
2035 { 0x0c, "U12/N12 - disconnect indication" },
2036 { 0x13, "U19/N19 - release request" },
2037 { 0x1a, "U26/N26 - mobile originating modify" },
2038 { 0x1b, "U27/N27 - mobile terminating modify" },
2039 { 0x1c, "N28 - connect indication" },
2044 de_call_state(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
2046 guint8 oct, coding_standard, call_state;
2047 proto_tree *subtree;
2050 proto_tree_add_subtree(tree,
2051 tvb, offset, 1, ett_gsm_dtap_elem[DE_CALL_STATE], NULL,
2052 val_to_str_ext_const(DE_CALL_STATE, &gsm_dtap_elem_strings_ext, ""));
2054 proto_tree_add_item(subtree, hf_gsm_a_dtap_coding_standard, tvb, offset, 1, ENC_BIG_ENDIAN);
2056 oct = tvb_get_guint8(tvb, offset);
2057 coding_standard = (oct & 0xc0) >> 6;
2058 call_state = oct & 0x3f;
2060 switch (coding_standard)
2063 proto_tree_add_uint_format_value(subtree, hf_gsm_a_dtap_call_state, tvb,
2064 offset, 1, call_state, "%s (%u)",
2065 val_to_str_ext_const(call_state, &q931_call_state_vals_ext, "Reserved"),
2070 proto_tree_add_item(subtree, hf_gsm_a_dtap_call_state, tvb, offset, 1, ENC_BIG_ENDIAN);
2073 proto_tree_add_uint_format_value(subtree, hf_gsm_a_dtap_call_state, tvb,
2074 offset, 1, call_state, "%s (%u)",
2075 val_to_str_const(call_state, gsm_a_dtap_call_state_vals, "Reserved"),
2080 /* no length check possible */
2086 * Helper function for BCD address decoding
2088 const value_string gsm_a_dtap_type_of_number_values[] = {
2089 { 0x00, "unknown" },
2090 { 0x01, "International Number" },
2091 { 0x02, "National number" },
2092 { 0x03, "Network Specific Number" },
2093 { 0x04, "Dedicated access, short code" },
2094 { 0x05, "Reserved" },
2095 { 0x06, "Reserved" },
2096 { 0x07, "Reserved for extension" },
2100 const value_string gsm_a_dtap_numbering_plan_id_values[] = {
2101 { 0x00, "unknown" },
2102 { 0x01, "ISDN/Telephony Numbering (ITU-T Rec. E.164 / ITU-T Rec. E.163)" },
2104 { 0x03, "Data Numbering (ITU-T Rec. X.121)" },
2105 { 0x04, "Telex Numbering (ITU-T Rec. F.69)" },
2106 { 0x08, "National Numbering" },
2107 { 0x09, "Private Numbering" },
2108 { 0x0d, "Reserved for CTS (see 3GPP TS 44.056)" },
2109 { 0x0f, "Reserved for extension" },
2113 const value_string gsm_a_dtap_present_ind_values[] = {
2114 { 0x00, "Presentation allowed" },
2115 { 0x01, "Presentation restricted" },
2116 { 0x02, "Number not available due to interworking" },
2117 { 0x03, "Reserved" },
2121 const value_string gsm_a_dtap_screening_ind_values[] = {
2122 { 0x00, "User-provided, not screened" },
2123 { 0x01, "User-provided, verified and passed" },
2124 { 0x02, "User-provided, verified and failed" },
2125 { 0x03, "Network provided" },
2130 de_bcd_num(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, int header_field, gboolean *address_extracted)
2134 guint32 curr_offset, num_string_len;
2136 const char *digit_str;
2138 *address_extracted = FALSE;
2139 curr_offset = offset;
2141 extension = tvb_get_guint8(tvb, curr_offset) & 0x80;
2142 proto_tree_add_item(tree, hf_gsm_a_extension, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2143 proto_tree_add_item(tree, hf_gsm_a_dtap_type_of_number, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2144 proto_tree_add_item(tree, hf_gsm_a_dtap_numbering_plan_id, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2149 proto_tree_add_item(tree, hf_gsm_a_extension, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2150 proto_tree_add_item(tree, hf_gsm_a_dtap_present_ind, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2151 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset<<3)+3, 3, ENC_BIG_ENDIAN);
2152 proto_tree_add_item(tree, hf_gsm_a_dtap_screening_ind, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2156 NO_MORE_DATA_CHECK(len);
2158 num_string_len = len - (curr_offset - offset);
2159 poctets = (guint8 *)tvb_memdup(wmem_packet_scope(), tvb, curr_offset, num_string_len);
2161 *address_extracted = TRUE;
2162 my_dgt_tbcd_unpack(a_bigbuf, poctets, num_string_len,
2165 digit_str = tvb_bcd_dig_to_wmem_packet_str(tvb, curr_offset, num_string_len, NULL, FALSE);
2166 proto_tree_add_string(tree, header_field, tvb, curr_offset, num_string_len, digit_str);
2167 item = proto_tree_add_string_format(tree, header_field,
2168 tvb, curr_offset, num_string_len,
2173 /* Check for overdicadic digits, we used the standard digit map from tvbuff.c
2174 * 0 1 2 3 4 5 6 7 8 9 a b c d e f
2175 * '0','1','2','3','4','5','6','7','8','9','?','?','?','?','?','?'
2178 if(strchr(digit_str,'?')){
2179 expert_add_info(pinfo, item, &ei_gsm_a_dtap_end_mark_unexpected);
2186 * Helper function for sub address decoding
2188 const value_string gsm_a_dtap_type_of_sub_addr_values[] = {
2189 { 0x00, "NSAP (ITU-T Rec. X.213/ISO 8348 AD2)" },
2190 { 0x02, "User specified" },
2194 const value_string gsm_a_dtap_odd_even_ind_values[] = {
2195 { 0x00, "even number of address signals" },
2196 { 0x01, "odd number of address signals" },
2202 de_sub_addr(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gboolean *address_extracted)
2204 guint32 curr_offset, ia5_string_len, i;
2205 guint8 type_of_sub_addr, afi, dig1, dig2, oct;
2207 gboolean invalid_ia5_char;
2210 curr_offset = offset;
2212 *address_extracted = FALSE;
2213 proto_tree_add_item(tree, hf_gsm_a_extension, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2214 proto_tree_add_item(tree, hf_gsm_a_dtap_type_of_sub_addr, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2215 proto_tree_add_item(tree, hf_gsm_a_dtap_odd_even_ind, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2216 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset<<3)+5, 3, ENC_BIG_ENDIAN);
2217 type_of_sub_addr = (tvb_get_guint8(tvb, curr_offset) & 0x70) >> 4;
2220 NO_MORE_DATA_CHECK(len);
2222 if (!type_of_sub_addr)
2224 afi = tvb_get_guint8(tvb, curr_offset);
2225 proto_tree_add_item(tree, hf_gsm_a_dtap_afi, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2228 NO_MORE_DATA_CHECK(len);
2232 ia5_string_len = len - (curr_offset - offset);
2233 ia5_string = (guint8 *)tvb_memdup(wmem_packet_scope(), tvb, curr_offset, ia5_string_len);
2235 invalid_ia5_char = FALSE;
2236 for(i = 0; i < ia5_string_len; i++)
2238 dig1 = (ia5_string[i] & 0xf0) >> 4;
2239 dig2 = ia5_string[i] & 0x0f;
2240 oct = (dig1 * 10) + dig2 + 32;
2242 invalid_ia5_char = TRUE;
2243 ia5_string[i] = oct;
2247 IA5_7BIT_decode(a_bigbuf, ia5_string, ia5_string_len);
2248 *address_extracted = TRUE;
2250 item = proto_tree_add_text(tree,
2251 tvb, curr_offset, len - (curr_offset - offset),
2252 "Subaddress: %s", a_bigbuf);
2254 if (invalid_ia5_char)
2255 expert_add_info(pinfo, item, &ei_gsm_a_dtap_invalid_ia5_character);
2261 proto_tree_add_text(tree,
2262 tvb, curr_offset, len - (curr_offset - offset),
2263 "Subaddress information");
2269 * [3] 10.5.4.7 Called party BCD number
2272 de_cld_party_bcd_num(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string, int string_len)
2276 de_bcd_num(tvb, tree, pinfo, offset, len, hf_gsm_a_dtap_cld_party_bcd_num, &addr_extr);
2279 if (sccp_assoc && ! sccp_assoc->called_party) {
2280 sccp_assoc->called_party = wmem_strdup(wmem_file_scope(), a_bigbuf);
2284 g_snprintf(add_string, string_len, " - (%s)", a_bigbuf);
2291 * [3] 10.5.4.8 Called party subaddress
2294 de_cld_party_sub_addr(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
2298 de_sub_addr(tvb, tree, pinfo, offset, len, &addr_extr);
2300 if (addr_extr && add_string)
2301 g_snprintf(add_string, string_len, " - (%s)", a_bigbuf);
2307 * [3] 10.5.4.9 Calling party BCD number
2310 de_clg_party_bcd_num(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len)
2314 de_bcd_num(tvb, tree, pinfo, offset, len, hf_gsm_a_dtap_clg_party_bcd_num, &addr_extr);
2316 if (addr_extr && add_string)
2317 g_snprintf(add_string, string_len, " - (%s)", a_bigbuf);
2323 * [3] 10.5.4.10 Calling party subaddress
2326 de_clg_party_sub_addr(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
2330 de_sub_addr(tvb, tree, pinfo, offset, len, &addr_extr);
2332 if (addr_extr && add_string)
2333 g_snprintf(add_string, string_len, " - (%s)", a_bigbuf);
2339 * [3] 10.5.4.11 Cause
2341 static const value_string gsm_a_dtap_cause_ss_diagnostics_vals[] = {
2342 { 0x01, "Outgoing calls barred within CUG" },
2343 { 0x02, "No CUG selected" },
2344 { 0x03, "Unknown CUG index" },
2345 { 0x04, "CUG index incompatible with requested basic service" },
2346 { 0x05, "CUG call failure, unspecified" },
2347 { 0x06, "CLIR not subscribed" },
2348 { 0x07, "CCBS possible" },
2349 { 0x08, "CCBS not possible" },
2353 static const value_string gsm_a_dtap_de_cause_coding_standard_vals[] = {
2354 { 0x00, "Coding as specified in ITU-T Rec. Q.931" },
2355 { 0x01, "Reserved for other international standards" },
2356 { 0x02, "National standard" },
2357 { 0x03, "Standard defined for the GSM PLMNS" },
2362 de_cause(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string, int string_len)
2366 guint32 curr_offset;
2367 guint32 diag_length;
2368 proto_tree *subtree;
2371 curr_offset = offset;
2373 proto_tree_add_item(tree, hf_gsm_a_extension, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2374 proto_tree_add_item(tree, hf_gsm_a_dtap_de_cause_coding_standard, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2376 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset<<3)+3, 1, ENC_BIG_ENDIAN);
2378 proto_tree_add_item(tree, hf_gsm_a_dtap_location, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2381 oct = tvb_get_guint8(tvb, curr_offset);
2385 proto_tree_add_item(tree, hf_gsm_a_extension, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2386 proto_tree_add_item(tree, hf_gsm_a_dtap_recommendation, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2390 oct = tvb_get_guint8(tvb, curr_offset);
2393 proto_tree_add_item(tree, hf_gsm_a_extension, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2398 case 1: str = "Unassigned (unallocated) number"; break;
2399 case 3: str = "No route to destination"; break;
2400 case 6: str = "Channel unacceptable"; break;
2401 case 8: str = "Operator determined barring"; break;
2402 case 16: str = "Normal call clearing"; break;
2403 case 17: str = "User busy"; break;
2404 case 18: str = "No user responding"; break;
2405 case 19: str = "User alerting, no answer"; break;
2406 case 21: str = "Call rejected"; break;
2407 case 22: str = "Call rejected due to feature at the destination"; break;
2408 case 24: str = "Number changed"; break;
2409 case 25: str = "Pre-emption"; break;
2410 case 26: str = "Non selected user clearing"; break;
2411 case 27: str = "Destination out of order"; break;
2412 case 28: str = "Invalid number format (incomplete number)"; break;
2413 case 29: str = "Facility rejected"; break;
2414 case 30: str = "Response to STATUS ENQUIRY"; break;
2415 case 31: str = "Normal, unspecified"; break;
2416 case 34: str = "No circuit/channel available"; break;
2417 case 38: str = "Network out of order"; break;
2418 case 41: str = "Temporary failure"; break;
2419 case 42: str = "Switching equipment congestion"; break;
2420 case 43: str = "Access information discarded"; break;
2421 case 44: str = "requested circuit/channel not available"; break;
2422 case 47: str = "Resources unavailable, unspecified"; break;
2423 case 49: str = "Quality of service unavailable"; break;
2424 case 50: str = "Requested facility not subscribed"; break;
2425 case 55: str = "Incoming calls barred within the CUG"; break;
2426 case 57: str = "Bearer capability not authorized"; break;
2427 case 58: str = "Bearer capability not presently available"; break;
2428 case 63: str = "Service or option not available, unspecified"; break;
2429 case 65: str = "Bearer service not implemented"; break;
2430 case 68: str = "ACM equal to or greater than ACMmax"; break;
2431 case 69: str = "Requested facility not implemented"; break;
2432 case 70: str = "Only restricted digital information bearer capability is available"; break;
2433 case 79: str = "Service or option not implemented, unspecified"; break;
2434 case 81: str = "Invalid transaction identifier value"; break;
2435 case 87: str = "User not member of CUG"; break;
2436 case 88: str = "Incompatible destination"; break;
2437 case 91: str = "Invalid transit network selection"; break;
2438 case 95: str = "Semantically incorrect message"; break;
2439 case 96: str = "Invalid mandatory information"; break;
2440 case 97: str = "Message type non-existent or not implemented"; break;
2441 case 98: str = "Message type not compatible with protocol state"; break;
2442 case 99: str = "Information element non-existent or not implemented"; break;
2443 case 100: str = "Conditional IE error"; break;
2444 case 101: str = "Message not compatible with protocol state"; break;
2445 case 102: str = "Recovery on timer expiry"; break;
2446 case 111: str = "Protocol error, unspecified"; break;
2447 case 127: str = "Interworking, unspecified"; break;
2449 if (cause <= 31) { str = "Treat as Normal, unspecified"; }
2450 else if ((cause >= 32) && (cause <= 47)) { str = "Treat as Resources unavailable, unspecified"; }
2451 else if ((cause >= 48) && (cause <= 63)) { str = "Treat as Service or option not available, unspecified"; }
2452 else if ((cause >= 64) && (cause <= 79)) { str = "Treat as Service or option not implemented, unspecified"; }
2453 else if ((cause >= 80) && (cause <= 95)) { str = "Treat as Semantically incorrect message"; }
2454 else if ((cause >= 96) && (cause <= 111)) { str = "Treat as Protocol error, unspecified"; }
2455 else { str = "Treat as Interworking, unspecified"; }
2459 proto_tree_add_uint_format_value(tree, hf_gsm_a_dtap_cause,
2460 tvb, curr_offset, 1, cause,
2468 g_snprintf(add_string, string_len, " - (%u) %s", cause, str);
2470 NO_MORE_DATA_CHECK(len);
2472 subtree = proto_tree_add_subtree(tree, tvb, curr_offset, len - (curr_offset - offset),
2473 ett_gsm_dtap_elem[DE_CAUSE], NULL, "Diagnostics");
2476 * Diagnostics for supplementary services may be included in the case of
2477 * the following cause codes:
2479 * 29 - Facility rejected
2480 * 34 - No circuit/channel available
2481 * 50 - Requested facility not subscribed
2482 * 55 - Incoming calls barred within the CUG
2483 * 69 - Requested facility not implemented
2484 * 87 - User not member of CUG
2486 if ((cause == 17) || (cause == 29) || (cause == 34) || (cause == 50) ||
2487 (cause == 55) || (cause == 69) || (cause == 87))
2489 proto_tree_add_item(subtree, hf_gsm_a_extension, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2490 proto_tree_add_item(subtree, hf_gsm_a_dtap_cause_ss_diagnostics, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2495 diag_length = len - (curr_offset - offset);
2496 proto_tree_add_item(subtree, hf_gsm_a_dtap_data, tvb, curr_offset, diag_length, ENC_NA);
2497 curr_offset += diag_length;
2500 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_dtap_extraneous_data);
2502 return (curr_offset - offset);
2505 * 10.5.4.11a CLIR suppression
2509 * 10.5.4.11b CLIR invocation
2513 * 10.5.4.12 Congestion level
2517 * 10.5.4.13 Connected number
2520 de_conn_num(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len)
2524 de_bcd_num(tvb, tree, pinfo, offset, len, hf_gsm_a_dtap_conn_num, &addr_extr);
2526 if (addr_extr && add_string)
2527 g_snprintf(add_string, string_len, " - (%s)", a_bigbuf);
2533 * 10.5.4.14 Connected subaddress
2536 de_conn_sub_addr(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
2540 de_sub_addr(tvb, tree, pinfo, offset, len, &addr_extr);
2542 if (addr_extr && add_string)
2543 g_snprintf(add_string, string_len, " - (%s)", a_bigbuf);
2549 * 10.5.4.15 Facility
2553 de_facility(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint fac_len, gchar *add_string _U_, int string_len _U_)
2558 gboolean ind = FALSE;
2559 guint32 component_len = 0;
2560 guint32 header_end_offset;
2562 asn1_ctx_t asn1_ctx;
2563 tvbuff_t *SS_tvb = NULL;
2564 static gint comp_type_tag;
2566 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
2568 saved_offset = offset;
2569 col_append_str(pinfo->cinfo, COL_PROTOCOL,"/");
2570 col_set_fence(pinfo->cinfo, COL_PROTOCOL);
2571 while (fac_len > (offset - saved_offset)) {
2573 /* Get the length of the component there can be more than one component in a facility message */
2575 header_end_offset = get_ber_identifier(tvb, offset, &appclass, &pc, &comp_type_tag);
2576 header_end_offset = get_ber_length(tvb, header_end_offset, &component_len, &ind);
2577 header_len = header_end_offset - offset;
2578 component_len = header_len + component_len;
2580 dissect_ROS_Component(FALSE, tvb, offset, &asn1_ctx, tree, hf_ROS_component);
2581 TODO Call gsm map here
2583 SS_tvb = tvb_new_subset_length(tvb, offset, component_len);
2584 col_append_str(pinfo->cinfo, COL_INFO,"(GSM MAP) ");
2585 col_set_fence(pinfo->cinfo, COL_INFO);
2586 call_dissector(gsm_map_handle, SS_tvb, pinfo, tree);
2587 offset = offset + component_len;
2592 * 10.5.4.16 High layer compatibility
2595 de_hlc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
2597 guint32 curr_offset;
2599 curr_offset = offset;
2601 dissect_q931_high_layer_compat_ie(tvb, offset, len, tree);
2603 curr_offset = curr_offset + len;
2604 return (curr_offset - offset);
2608 * [3] 10.5.4.17 Keypad facility
2611 de_keypad_facility(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len _U_, gchar *add_string, int string_len)
2614 guint32 curr_offset;
2617 curr_offset = offset;
2619 keypad_char = tvb_get_guint8(tvb, curr_offset) & 0x7f;
2621 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, curr_offset<<3, 1, ENC_BIG_ENDIAN);
2623 item = proto_tree_add_uint_format_value(tree, hf_gsm_a_dtap_keypad_information, tvb, curr_offset, 1,
2624 keypad_char, "%c", keypad_char);
2626 if (((keypad_char < '0') || (keypad_char > '9')) &&
2627 ((keypad_char < 'A') || (keypad_char > 'D')) &&
2628 (keypad_char != '*') && (keypad_char != '#'))
2629 expert_add_info(pinfo, item, &ei_gsm_a_dtap_keypad_info_not_dtmf_digit);
2633 g_snprintf(add_string, string_len, " - %c", keypad_char);
2635 /* no length check possible */
2637 return (curr_offset - offset);
2641 * 10.5.4.18 Low layer compatibility
2644 de_llc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
2646 guint32 curr_offset;
2648 curr_offset = offset;
2650 dissect_q931_bearer_capability_ie(tvb, offset, len, tree);
2652 curr_offset = curr_offset + len;
2653 return (curr_offset - offset);
2657 * 10.5.4.19 More data
2661 * 10.5.4.20 Notification indicator
2663 static const value_string gsm_a_dtap_notification_description_vals[] = {
2664 { 0x00, "User suspended" },
2665 { 0x01, "User resumed" },
2666 { 0x02, "Bearer change" },
2671 de_notif_ind(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
2673 proto_tree_add_item(tree, hf_gsm_a_extension, tvb, offset, 1, ENC_BIG_ENDIAN);
2674 proto_tree_add_item(tree, hf_gsm_a_dtap_notification_description, tvb, offset, 1, ENC_BIG_ENDIAN);
2679 * [3] 10.5.4.21 Progress indicator
2681 static const value_string gsm_a_dtap_location_vals[] = {
2683 { 0x01, "Private network serving the local user" },
2684 { 0x02, "Public network serving the local user" },
2685 { 0x03, "Transit network" },
2686 { 0x04, "Public network serving the remote user" },
2687 { 0x05, "Private network serving the remote user" },
2688 { 0x07, "International network" },
2689 { 0x0a, "Network beyond interworking point" },
2693 static const value_string gsm_a_dtap_progress_description_vals[] = {
2694 { 0x01, "Call is not end-to-end PLMN/ISDN, further call progress information may be available in-band" },
2695 { 0x02, "Destination address in non-PLMN/ISDN" },
2696 { 0x03, "Origination address in non-PLMN/ISDN" },
2697 { 0x04, "Call has returned to the PLMN/ISDN" },
2698 { 0x08, "In-band information or appropriate pattern now available" },
2699 { 0x09, "In-band multimedia CAT available" },
2700 { 0x20, "Call is end-to-end PLMN/ISDN" },
2701 { 0x40, "Queueing" },
2706 de_prog_ind(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
2708 guint8 oct, coding_standard, progress_description;
2709 guint32 curr_offset;
2711 curr_offset = offset;
2713 oct = tvb_get_guint8(tvb, curr_offset);
2714 coding_standard = (oct & 0x60) >> 5;
2715 proto_tree_add_item(tree, hf_gsm_a_extension, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2716 proto_tree_add_item(tree, hf_gsm_a_dtap_prog_coding_standard, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2717 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset << 3) + 3, 1, ENC_BIG_ENDIAN);
2718 proto_tree_add_item(tree, hf_gsm_a_dtap_location, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2721 oct = tvb_get_guint8(tvb, curr_offset);
2722 progress_description = oct & 0x7f;
2723 proto_tree_add_item(tree, hf_gsm_a_extension, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2725 switch (coding_standard)
2728 proto_tree_add_uint_format_value(tree, hf_gsm_a_dtap_progress_description, tvb,
2729 curr_offset, 1, progress_description, "%s (%u)",
2730 val_to_str_ext_const(progress_description, &q931_progress_description_vals_ext, "Reserved"),
2731 progress_description);
2735 proto_tree_add_item(tree, hf_gsm_a_dtap_progress_description, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2738 proto_tree_add_uint_format_value(tree, hf_gsm_a_dtap_progress_description, tvb,
2739 curr_offset, 1, progress_description, "%s (%u)",
2740 val_to_str_const(progress_description, gsm_a_dtap_progress_description_vals, "Unspecific"),
2741 progress_description);
2746 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_dtap_extraneous_data);
2748 return (curr_offset - offset);
2752 * 10.5.4.21a Recall type $(CCBS)$
2754 static const range_string gsm_a_dtap_recall_type_vals[] = {
2755 { 0x00, 0x00, "CCBS" },
2756 { 0x01, 0x06, "shall be treated as CCBS (intended for other similar type of Recall)" },
2761 de_recall_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
2763 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (offset<<3), 5, ENC_BIG_ENDIAN);
2764 proto_tree_add_item(tree, hf_gsm_a_dtap_recall_type, tvb, offset, 1, ENC_BIG_ENDIAN);
2770 * 10.5.4.21b Redirecting party BCD number
2773 de_red_party_bcd_num(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len)
2777 de_bcd_num(tvb, tree, pinfo, offset, len, hf_gsm_a_dtap_red_party_bcd_num, &addr_extr);
2779 if (addr_extr && add_string)
2780 g_snprintf(add_string, string_len, " - (%s)", a_bigbuf);
2786 * 10.5.4.21c Redirecting party subaddress
2789 de_red_party_sub_addr(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
2793 de_sub_addr(tvb, tree, pinfo, offset, len, &addr_extr);
2795 if (addr_extr && add_string)
2796 g_snprintf(add_string, string_len, " - (%s)", a_bigbuf);
2802 * [3] 10.5.4.22 Repeat indicator
2804 static const value_string gsm_a_dtap_repeat_indicator_vals[] = {
2805 { 0x01, "Circular for successive selection 'mode 1 alternate mode 2'" },
2806 { 0x02, "Support of fallback mode 1 preferred, mode 2 selected if setup of mode 1 fails" },
2807 { 0x03, "Reserved: was allocated in earlier phases of the protocol" },
2812 de_repeat_ind(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
2815 guint32 curr_offset;
2817 curr_offset = offset;
2819 oct = tvb_get_guint8(tvb, curr_offset);
2821 proto_tree_add_uint_format_value(tree, hf_gsm_a_dtap_repeat_indicator, tvb, curr_offset, 1, oct,
2822 "%s", val_to_str_const(oct & 0xF, gsm_a_dtap_repeat_indicator_vals, "Reserved"));
2825 /* no length check possible */
2827 return (curr_offset - offset);
2830 * 10.5.4.22a Reverse call setup direction
2834 * 10.5.4.22b SETUP Container $(CCBS)$
2837 dtap_cc_setup(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len);
2840 de_setup_cont(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
2842 dtap_cc_setup(tvb, tree, pinfo, offset, len);
2850 static const value_string gsm_a_dtap_signal_value_vals[] = {
2851 { 0x00, "dial tone on" },
2852 { 0x01, "ring back tone on" },
2853 { 0x02, "intercept tone on" },
2854 { 0x03, "network congestion tone on" },
2855 { 0x04, "busy tone on" },
2856 { 0x05, "confirm tone on" },
2857 { 0x06, "answer tone on" },
2858 { 0x07, "call waiting tone on" },
2859 { 0x08, "off-hook warning tone on" },
2860 { 0x3f, "tones off" },
2861 { 0x4f, "alerting off" },
2866 de_signal(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
2868 proto_tree_add_item(tree, hf_gsm_a_dtap_signal_value, tvb, offset, 1, ENC_BIG_ENDIAN);
2874 * 10.5.4.24 SS Version Indicator
2876 static const value_string gsm_a_dtap_ss_ver_ind_vals[] = {
2877 { 0x00, "Phase 2 service, ellipsis notation, and phase 2 error handling is supported" },
2878 { 0x01, "SS-Protocol version 3 is supported, and phase 2 error handling is supported" },
2883 de_ss_ver_ind(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
2886 guint32 curr_offset;
2888 curr_offset = offset;
2890 oct = tvb_get_guint8(tvb, curr_offset);
2892 proto_tree_add_uint_format_value(tree, hf_gsm_a_dtap_ss_version_indicator, tvb, curr_offset, 1,
2893 oct, "%s", val_to_str_const(oct, gsm_a_dtap_ss_ver_ind_vals, "Reserved"));
2896 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_dtap_extraneous_data);
2898 return (curr_offset - offset);
2901 * 10.5.4.25 User-user
2904 User-user protocol discriminator (octet 3)
2907 0 0 0 0 0 0 0 0 User specific protocol (Note 1)
2908 0 0 0 0 0 0 0 1 OSI high layer protocols
2909 0 0 0 0 0 0 1 0 X.244 (Note 2)
2910 0 0 0 0 0 0 1 1 Reserved for system management convergence function
2911 0 0 0 0 0 1 0 0 IA5 characters (Note 3)
2912 0 0 0 0 0 1 1 1 Rec.V.120 rate adaption
2913 0 0 0 0 1 0 0 0 Q.931 (I.451) user-network call control messages
2915 0 0 0 1 0 0 0 0 Reserved for other network layer or
2916 through layer 3 protocols
2920 through National use
2922 0 1 0 0 1 1 1 1 3GPP capability exchange protocol (NOTE 4)
2924 0 1 0 1 0 0 0 0 Reserved for other network
2925 through layer or layer 3 protocols
2928 All other values are reserved.
2930 static const range_string gsm_a_dtap_u2u_prot_discr_vals[] = {
2931 { 0x00, 0x00, "User specific protocol" },
2932 { 0x01, 0x01, "OSI high layer protocols" },
2933 { 0x02, 0x02, "X.244" },
2934 { 0x03, 0x03, "Reserved for system management convergence function" },
2935 { 0x04, 0x04, "IA5 characters" },
2936 { 0x07, 0x07, "Rate adaption according to ITU-T Rec. V.120" },
2937 { 0x08, 0x08, "User-network call control messages according to ITU-T Rec. Q.931" },
2938 { 0x10, 0x3F, "Reserved for other network layer or layer 3 protocols" },
2939 { 0x40, 0x4E, "National use" },
2940 { 0x4F, 0x4F, "3GPP capability exchange protocol" },
2941 { 0x50, 0xFE, "Reserved for other network layer or layer 3 protocols" },
2946 de_u2u(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
2948 guint32 curr_offset;
2949 proto_tree *subtree;
2951 curr_offset = offset;
2952 proto_tree_add_item(tree, hf_gsm_a_dtap_u2u_prot_discr, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2955 subtree = proto_tree_add_subtree(tree, tvb, curr_offset, len - 1, ett_gsm_dtap_elem[DE_USER_USER], NULL, "User-user information");
2956 proto_tree_add_item(subtree, hf_gsm_a_dtap_data, tvb, curr_offset, len - 1, ENC_NA);
2961 * 10.5.4.26 Alerting Pattern $(NIA)$
2963 static const value_string gsm_a_alerting_pattern_vals[] = {
2964 { 0x00, "Alerting Pattern 1" },
2965 { 0x01, "Alerting Pattern 2" },
2966 { 0x02, "Alerting Pattern 3" },
2967 { 0x04, "Alerting Pattern 5" },
2968 { 0x05, "Alerting Pattern 6" },
2969 { 0x06, "Alerting Pattern 7" },
2970 { 0x07, "Alerting Pattern 8" },
2971 { 0x08, "Alerting Pattern 9" },
2976 de_alert_pat(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
2978 guint32 curr_offset;
2980 curr_offset = offset;
2982 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset << 3), 4, ENC_BIG_ENDIAN);
2983 proto_tree_add_item(tree, hf_gsm_a_dtap_alerting_pattern, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2986 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_dtap_extraneous_data);
2991 * 10.5.4.27 Allowed actions $(CCBS)$
2993 const true_false_string gsm_a_ccbs_activation_value = {
2994 "Activation of CCBS possible",
2995 "Activation of CCBS not possible"
2998 de_allowed_act(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
3000 guint32 curr_offset;
3002 curr_offset = offset;
3004 proto_tree_add_item(tree, hf_gsm_a_dtap_ccbs_activation, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3005 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset << 3) + 1, 7, ENC_BIG_ENDIAN);
3009 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_dtap_extraneous_data);
3014 * 10.5.4.28 Stream Identifier
3017 de_stream_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string, int string_len)
3019 guint32 curr_offset;
3022 curr_offset = offset;
3024 oct = tvb_get_guint8(tvb, curr_offset);
3027 proto_tree_add_uint_format_value(tree, hf_gsm_a_dtap_stream_identifier, tvb, curr_offset, 1, oct,
3028 "No Bearer (%u)", oct);
3031 g_snprintf(add_string, string_len, " - (No Bearer)");
3035 proto_tree_add_item(tree, hf_gsm_a_dtap_stream_identifier, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3038 g_snprintf(add_string, string_len, " - (%u)", oct);
3043 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_dtap_extraneous_data);
3048 * 10.5.4.29 Network Call Control Capabilities
3051 static const true_false_string gsm_a_mcs_value = {
3052 "This value indicates that the network supports the multicall",
3053 "This value indicates that the network does not support the multicall"
3056 de_nw_call_ctrl_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
3058 guint32 curr_offset;
3060 curr_offset = offset;
3062 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset << 3), 7, ENC_BIG_ENDIAN);
3063 proto_tree_add_item(tree, hf_gsm_a_dtap_mcs, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3067 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_dtap_extraneous_data);
3072 * 10.5.4.30 Cause of No CLI
3074 static const value_string gsm_a_cause_of_no_cli_values[] = {
3075 { 0x00, "Unavailable" },
3076 { 0x01, "Reject by user" },
3077 { 0x02, "Interaction with other service" },
3078 { 0x03, "Coin line/payphone" },
3083 de_ca_of_no_cli(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string, int string_len)
3085 guint32 curr_offset;
3088 curr_offset = offset;
3090 oct = tvb_get_guint8(tvb, curr_offset);
3091 proto_tree_add_uint_format_value(tree, hf_gsm_a_dtap_cause_of_no_cli, tvb, curr_offset, 1, oct,
3093 val_to_str_const(oct, gsm_a_cause_of_no_cli_values, "Unavailable"),
3099 g_snprintf(add_string, string_len, " - (%s)", val_to_str_const(oct, gsm_a_cause_of_no_cli_values, "Unavailable"));
3101 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_dtap_extraneous_data);
3109 * 10.5.4.32 Supported codec list
3111 /* 6.1 System Identifiers for GSM and UMTS
3112 * The system identifiers for the radio access technologies
3113 * supported by this specification are:
3114 * SysID for GSM: 0x0000.0000 (bit 8 .. bit 1)
3115 * SysID for UMTS: 0x0000.0100 (bit 8 .. bit 1)
3116 * These values are selected in accordance with [7] (3GPP TS 28.062).
3118 static const value_string gsm_a_dtap_sysid_values[] = {
3124 de_sup_codec_list(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
3126 guint32 curr_offset;
3128 proto_tree *subtree;
3129 guint8 sysid_counter;
3131 curr_offset = offset;
3133 /* System Identification 1 (SysID 1) octet 3
3134 * SysID indicates the radio access technology for which the subsequent Codec
3135 * Bitmap indicates the supported codec types.
3136 * Coding of this Octet is defined in 3GPP TS 26.103
3139 while (len>(curr_offset-offset)) {
3141 proto_tree_add_item(tree, hf_gsm_a_dtap_sysid, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3143 /* Length Of Bitmap for SysID */
3144 proto_tree_add_item(tree, hf_gsm_a_dtap_bitmap_length, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3145 length = tvb_get_guint8(tvb,curr_offset);
3149 subtree = proto_tree_add_subtree_format(tree, tvb, curr_offset, length, ett_gsm_dtap_elem[DE_SUP_CODEC_LIST], NULL,
3150 "Codec Bitmap for SysID %u", sysid_counter);
3152 * The Codec Types are coded in the first and second octet of the Codec List
3153 * Bitmap as follows:
3154 * 8 7 6 5 4 3 2 bit 1
3155 * TDMA UMTS UMTS HR AMR FR AMR GSM EFR GSM HR GSM FR Octet 1
3157 * bit 16 15 14 13 12 11 10 bit 9
3158 *(reserved) (reserved)OHR OFR OHR UMTS FR PDC EFR Octet 2
3159 * AMR-WB AMR-WB AMR AMR-WB AMR-WB
3160 * A Codec Type is supported, if the corresponding bit is set to "1".
3161 * All reserved bits shall be set to "0".
3163 * NOTE: If the Codec Bitmap for a SysID is 1 octet, it is an indication that
3164 * all codecs of the 2nd octet are not supported.
3165 * If the Codec Bitmap for a SysID is more than 2 octets, the network shall
3166 * ignore the additional octet(s) of the bitmap and process the rest of the
3167 * information element.
3169 * Right now we are sure that at least the first octet of the bitmap is present
3171 proto_tree_add_item(subtree, hf_gsm_a_dtap_codec_tdma_efr, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3172 proto_tree_add_item(subtree, hf_gsm_a_dtap_codec_umts_amr_2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3173 proto_tree_add_item(subtree, hf_gsm_a_dtap_codec_umts_amr, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3174 proto_tree_add_item(subtree, hf_gsm_a_dtap_codec_hr_amr, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3175 proto_tree_add_item(subtree, hf_gsm_a_dtap_codec_fr_amr, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3176 proto_tree_add_item(subtree, hf_gsm_a_dtap_codec_gsm_efr, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3177 proto_tree_add_item(subtree, hf_gsm_a_dtap_codec_gsm_hr, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3178 proto_tree_add_item(subtree, hf_gsm_a_dtap_codec_gsm_fr, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3185 * We can proceed with the second octet of the bitmap
3187 proto_tree_add_bits_item(subtree, hf_gsm_a_spare_bits, tvb, curr_offset << 3, 2, ENC_BIG_ENDIAN);
3188 proto_tree_add_item(subtree, hf_gsm_a_dtap_codec_ohr_amr_wb, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3189 proto_tree_add_item(subtree, hf_gsm_a_dtap_codec_ofr_amr_wb, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3190 proto_tree_add_item(subtree, hf_gsm_a_dtap_codec_ohr_amr, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3191 proto_tree_add_item(subtree, hf_gsm_a_dtap_codec_umts_amr_wb, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3192 proto_tree_add_item(subtree, hf_gsm_a_dtap_codec_fr_amr_wb, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3193 proto_tree_add_item(subtree, hf_gsm_a_dtap_codec_pdc_efr, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3199 curr_offset = curr_offset + length;
3203 return (curr_offset-offset);
3206 * 10.5.4.33 Service category
3209 Emergency Service Category Value (octet 3)
3210 The meaning of the Emergency Category Value is derived from the following settings (see 3GPP TS 22.101 [8] clause
3216 Bit 5 Mountain Rescue
3217 Bit 6 manually initiated eCall
3218 Bit 7 automatically initiated eCall
3219 Bit 8 is spare and set to "0"
3222 de_serv_cat(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
3224 guint32 curr_offset;
3226 curr_offset = offset;
3228 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, curr_offset<<3, 1, ENC_BIG_ENDIAN);
3229 proto_tree_add_item(tree, hf_gsm_a_dtap_serv_cat_b7, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3230 proto_tree_add_item(tree, hf_gsm_a_dtap_serv_cat_b6, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3231 proto_tree_add_item(tree, hf_gsm_a_dtap_serv_cat_b5, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3232 proto_tree_add_item(tree, hf_gsm_a_dtap_serv_cat_b4, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3233 proto_tree_add_item(tree, hf_gsm_a_dtap_serv_cat_b3, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3234 proto_tree_add_item(tree, hf_gsm_a_dtap_serv_cat_b2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3235 proto_tree_add_item(tree, hf_gsm_a_dtap_serv_cat_b1, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3245 * 10.5.4.35 Network-initiated Service Upgrade indicator
3249 * [5] 8.1.4.1 3GPP TS 24.011 version 6.1.0 Release 6
3252 de_cp_user_data(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
3254 guint32 curr_offset;
3257 curr_offset = offset;
3259 proto_tree_add_text(tree, tvb, curr_offset, len,
3260 "RPDU (not displayed)");
3263 * dissect the embedded RP message
3265 rp_tvb = tvb_new_subset_length(tvb, curr_offset, len);
3267 call_dissector(rp_handle, rp_tvb, pinfo, g_tree);
3271 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_dtap_extraneous_data);
3273 return (curr_offset - offset);
3279 static const value_string gsm_a_dtap_cp_cause_values[] = {
3280 { 17, "Network failure"},
3281 { 22, "Congestion"},
3282 { 81, "Invalid Transaction Identifier value"},
3283 { 95, "Semantically incorrect message"},
3284 { 96, "Invalid mandatory information"},
3285 { 97, "Message type non-existent or not implemented"},
3286 { 98, "Message not compatible with the short message protocol state"},
3287 { 99, "Information element non-existent or not implemented"},
3288 { 111, "Protocol error, unspecified"},
3293 de_cp_cause(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string, int string_len)
3296 guint32 curr_offset;
3299 curr_offset = offset;
3301 oct = tvb_get_guint8(tvb, curr_offset);
3302 str = val_to_str_const(oct, gsm_a_dtap_cp_cause_values, "Reserved, treat as Protocol error, unspecified");
3303 proto_tree_add_uint_format_value(tree, hf_gsm_a_dtap_cp_cause, tvb, curr_offset, 1,
3304 oct, "(%u) %s", oct, str);
3308 g_snprintf(add_string, string_len, " - (%u) %s", oct, str);
3310 /* no length check possible */
3312 return (curr_offset - offset);
3316 de_tp_sub_channel(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
3318 guint32 curr_offset;
3322 curr_offset = offset;
3324 oct = tvb_get_guint8(tvb, curr_offset) & 0x3f;
3325 if ((oct & 0x38) == 0x38)
3327 else if ((oct & 0x38) == 0x18)
3329 else if ((oct & 0x38) == 0x10)
3331 else if ((oct & 0x38) == 0x08)
3333 else if ((oct & 0x3c) == 0x04)
3335 else if ((oct & 0x3e) == 0x02)
3337 else if ((oct & 0x3e) == 0x00)
3342 proto_tree_add_uint_format_value(tree, hf_gsm_a_dtap_test_loop, tvb, curr_offset, 1,
3346 proto_tree_add_text(tree,
3347 tvb, curr_offset, 1,
3348 "Only one TCH active or sub-channel 0 of two half rate channels is to be looped");
3350 proto_tree_add_text(tree,
3351 tvb, curr_offset, 1,
3352 "Sub-channel 1 of two half rate channels is to be looped");
3356 return (curr_offset - offset);
3360 de_tp_ack(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
3362 guint32 curr_offset;
3365 curr_offset = offset;
3367 oct = tvb_get_guint8(tvb, curr_offset);
3369 if ((oct & 0xF0) == 0x80)
3370 proto_tree_add_text(tree,tvb, curr_offset, 1, "Acknowledgment element: %d",oct&0x01);
3372 proto_tree_add_text(tree,tvb, curr_offset, 1, "No acknowledgment element present");
3376 return (curr_offset - offset);
3379 static const value_string gsm_channel_coding_vals[] = {
3380 { 0x00, "not needed. The Burst-by-Burst loop is activated, type G" },
3381 { 0x01, "Channel coding needed. Frame erasure is to be signalled, type H" },
3382 { 0x02, "reserved" },
3383 { 0x03, "reserved" },
3388 de_tp_loop_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
3390 guint32 curr_offset;
3393 curr_offset = offset;
3395 oct = tvb_get_guint8(tvb, curr_offset);
3397 proto_tree_add_item(tree, hf_gsm_a_dtap_channel_coding03, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3402 proto_tree_add_text(tree, tvb, curr_offset, 1, "Multi-slot mechanism 1");
3403 proto_tree_add_text(tree, tvb, curr_offset, 1, "Timeslot number %d",(oct & 0xe0)>>5);
3406 proto_tree_add_text(tree, tvb, curr_offset, 1, "Multi-slot mechanism 2");
3409 proto_tree_add_text(tree, tvb, curr_offset, 1, "Loop mechanism reserved (%d)",(oct & 0x1c)>>2);
3415 return (curr_offset - offset);
3419 de_tp_loop_ack(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
3421 guint32 curr_offset;
3424 curr_offset = offset;
3426 oct = tvb_get_guint8(tvb, curr_offset);
3428 proto_tree_add_item(tree, hf_gsm_a_dtap_channel_coding30, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3433 proto_tree_add_text(tree, tvb, curr_offset, 1, "Multi-slot mechanism 1");
3436 proto_tree_add_text(tree, tvb, curr_offset, 1, "Multi-slot mechanism 2");
3439 proto_tree_add_text(tree, tvb, curr_offset, 1, "Loop mechanism reserved (%d)",(oct & 0x0e)>>1);
3444 proto_tree_add_text(tree, tvb, curr_offset, 1, "Multi-slot TCH loop was not closed due to error");
3446 proto_tree_add_text(tree, tvb, curr_offset, 1, "Multi-slot TCH loop was closed successfully");
3450 return (curr_offset - offset);
3453 static const value_string gsm_tp_tested_device_vals[] = {
3454 { 0x00, "Normal operation (no tested device via DAI)" },
3455 { 0x01, "Test of speech decoder / DTX functions (downlink)" },
3456 { 0x02, "Test of speech encoder / DTX functions (uplink)" },
3457 { 0x03, "Test of acoustic devices and A/D & D/A" },
3462 de_tp_tested_device(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
3464 guint32 curr_offset;
3467 curr_offset = offset;
3469 oct = tvb_get_guint8(tvb, curr_offset);
3470 proto_tree_add_uint_format_value(tree, hf_gsm_a_dtap_tp_tested_device, tvb, curr_offset, 1,
3471 oct, "%s", val_to_str(oct, gsm_tp_tested_device_vals, "Reserved (%d)"));
3474 return (curr_offset - offset);
3478 de_tp_pdu_description(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
3480 guint32 curr_offset;
3483 curr_offset = offset;
3485 value = tvb_get_ntohs(tvb, curr_offset);
3490 if ((value & 0xfff) == 0)
3491 proto_tree_add_uint_format_value(tree, hf_gsm_a_dtap_tp_pdu_description,
3492 tvb, curr_offset, 2, value, "Infinite number of PDUs to be transmitted in the TBF");
3494 proto_tree_add_uint_format_value(tree, hf_gsm_a_dtap_tp_pdu_description,
3495 tvb, curr_offset, 2, value & 0xfff, "%d PDUs to be transmitted in the TBF", value & 0xfff);
3498 proto_tree_add_uint_format_value(tree, hf_gsm_a_dtap_tp_pdu_description,
3499 tvb, curr_offset, 2, value, "reserved");
3501 return (curr_offset - offset);
3505 de_tp_mode_flag(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
3507 guint32 curr_offset;
3510 curr_offset = offset;
3512 oct = tvb_get_guint8(tvb, curr_offset);
3515 proto_tree_add_text(tree, tvb, curr_offset, 1, "MS shall select the loop back option");
3517 proto_tree_add_text(tree, tvb, curr_offset, 1, "MS shall itself generate the pseudorandom data");
3519 proto_tree_add_item(tree, hf_gsm_a_dtap_downlink_timeslot_offset, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3523 return (curr_offset - offset);
3527 de_tp_egprs_mode_flag(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
3529 guint32 curr_offset;
3532 curr_offset = offset;
3534 oct = tvb_get_guint8(tvb, curr_offset);
3537 proto_tree_add_text(tree, tvb, curr_offset, 1, "MS loops back blocks on the uplink using GMSK modulation only");
3539 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");
3541 proto_tree_add_item(tree, hf_gsm_a_dtap_downlink_timeslot_offset, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3545 return (curr_offset - offset);
3548 static const value_string gsm_positioning_technology_vals[] = {
3555 de_tp_ms_positioning_technology(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
3557 guint32 curr_offset;
3560 curr_offset = offset;
3562 oct = tvb_get_guint8(tvb, curr_offset);
3563 proto_tree_add_uint_format_value(tree, hf_gsm_a_dtap_ms_positioning_technology, tvb, curr_offset, 1,
3564 oct, "%s", val_to_str(oct, gsm_positioning_technology_vals, "Reserved (%d)"));
3567 return (curr_offset - offset);
3571 de_tp_ue_test_loop_mode(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
3573 guint32 curr_offset;
3575 guint8 lb_setup_length,i,j;
3578 curr_offset = offset;
3580 oct = tvb_get_guint8(tvb, curr_offset);
3587 proto_tree_add_text(tree, tvb, curr_offset, 1, "UE test loop mode 1 loop back (loopback of RLC SDUs or PDCP SDUs)");
3588 lb_setup_length = tvb_get_guint8(tvb, curr_offset);
3590 for (i=0,j=0; (i<lb_setup_length) && (j<4); i+=3,j++)
3592 proto_tree_add_text(tree, tvb, curr_offset, 1, "LB setup RB IE %d",j+1);
3593 value = tvb_get_ntohs(tvb, curr_offset);
3595 proto_tree_add_text(tree, tvb, curr_offset, 1, "Uplink RLC SDU size is %d bits",value);
3596 oct = tvb_get_guint8(tvb, curr_offset);
3598 proto_tree_add_text(tree, tvb, curr_offset, 1, "Radio Bearer %d",oct & 0x1f);
3603 proto_tree_add_text(tree, tvb, curr_offset, 1, "UE test loop mode 2 loop back (loopback of transport block data and CRC bits)");
3606 proto_tree_add_text(tree, tvb, curr_offset, 1, "UE test loop mode 3 RLC SDU counting (counting of received RLC SDUs)");
3607 oct = tvb_get_guint8(tvb, curr_offset);
3609 proto_tree_add_text(tree, tvb, curr_offset, 1, "MBMS short transmission identity %d",(oct & 0x1f)+1);
3612 proto_tree_add_text(tree, tvb, curr_offset, 1, "UE test loop mode reserved (%d)",oct & 0x03);
3616 return (curr_offset - offset);
3620 de_tp_ue_positioning_technology(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
3622 guint32 curr_offset;
3625 curr_offset = offset;
3627 oct = tvb_get_guint8(tvb, curr_offset);
3629 proto_tree_add_uint_format_value(tree, hf_gsm_a_dtap_ue_positioning_technology, tvb, curr_offset, 1,
3630 oct, "%s", val_to_str(oct, gsm_positioning_technology_vals, "Reserved (%d)"));
3633 return (curr_offset - offset);
3637 de_tp_rlc_sdu_counter_value(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
3639 guint32 curr_offset;
3642 curr_offset = offset;
3644 value = tvb_get_ntohl(tvb, curr_offset);
3647 proto_tree_add_text(tree, tvb, curr_offset, 1, "UE received RLC SDU counter value: %d",value);
3649 return (curr_offset - offset);
3652 static const value_string epc_ue_test_loop_mode_vals[] = {
3660 de_tp_epc_ue_test_loop_mode(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
3662 guint32 curr_offset;
3665 curr_offset = offset;
3666 bit_offset = curr_offset<<3;
3668 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, 6, ENC_BIG_ENDIAN);
3670 proto_tree_add_bits_item(tree, hf_gsm_a_dtap_epc_ue_tl_mode, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
3671 /*bit_offset += 2;*/
3672 /* Store test loop mode to know how to dissect Close UE Test Loop message */
3673 epc_test_loop_mode = tvb_get_guint8(tvb, curr_offset) & 0x03;
3676 return (curr_offset - offset);
3680 de_tp_epc_ue_tl_a_lb_setup(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
3682 guint32 curr_offset;
3683 guint32 count, nb_lb;
3685 proto_tree *lb_setup_tree = NULL;
3687 curr_offset = offset;
3692 proto_tree_add_text(tree, tvb, curr_offset, len, "Number of LB entities: %d", nb_lb);
3693 while ((count < nb_lb) && (count < 8)) {
3694 lb_setup_tree = proto_tree_add_subtree_format(tree, tvb, curr_offset, 3,
3695 ett_epc_ue_tl_a_lb_setup, NULL, "LB entity %d", count);
3697 proto_tree_add_bits_item(lb_setup_tree, hf_gsm_a_dtap_epc_ue_tl_a_ul_sdu_size, tvb, curr_offset<<3, 16, ENC_BIG_ENDIAN);
3699 drb = tvb_get_guint8(tvb, curr_offset) & 0x1f;
3700 proto_tree_add_uint_format_value(lb_setup_tree, hf_gsm_a_dtap_epc_ue_tl_a_drb, tvb, curr_offset, 1,
3701 drb, "%d (%d)", drb+1, drb);
3706 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_dtap_extraneous_data);
3712 de_tp_epc_ue_tl_b_lb_setup(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
3714 guint32 curr_offset;
3716 curr_offset = offset;
3718 proto_tree_add_bits_item(tree, hf_gsm_a_dtap_epc_ue_tl_b_ip_pdu_delay, tvb, curr_offset<<3, 8, ENC_BIG_ENDIAN);
3721 return (curr_offset - offset);
3725 de_tp_epc_ue_tl_c_setup(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
3727 guint32 curr_offset;
3729 curr_offset = offset;
3731 proto_tree_add_bits_item(tree, hf_gsm_a_dtap_epc_ue_tl_c_mbsfn_area_id, tvb, curr_offset<<3, 8, ENC_BIG_ENDIAN);
3733 proto_tree_add_bits_item(tree, hf_gsm_a_dtap_epc_ue_tl_c_mch_id, tvb, (curr_offset<<3)+4, 4, ENC_BIG_ENDIAN);
3735 proto_tree_add_bits_item(tree, hf_gsm_a_dtap_epc_ue_tl_c_lcid, tvb, (curr_offset<<3)+3, 5, ENC_BIG_ENDIAN);
3738 return (curr_offset - offset);
3741 static const value_string epc_ue_positioning_technology_vals[] = {
3748 de_tp_epc_ue_positioning_technology(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
3750 guint32 curr_offset;
3752 curr_offset = offset;
3754 proto_tree_add_bits_item(tree, hf_gsm_a_dtap_epc_ue_positioning_technology, tvb, curr_offset<<3, 8, ENC_BIG_ENDIAN);
3757 return (curr_offset - offset);
3761 de_tp_epc_mbms_packet_counter_value(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
3763 guint32 curr_offset;
3765 curr_offset = offset;
3767 proto_tree_add_bits_item(tree, hf_gsm_a_dtap_epc_mbms_packet_counter_value, tvb, curr_offset<<3, 32, ENC_BIG_ENDIAN);
3770 return (curr_offset - offset);
3773 static const true_false_string epc_latitude_sign_value = {
3778 static const true_false_string epc_altitude_dir_value = {
3784 de_tp_epc_ellipsoid_point_with_alt(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
3786 guint32 curr_offset;
3789 curr_offset = offset;
3791 proto_tree_add_bits_item(tree, hf_gsm_a_dtap_epc_latitude_sign, tvb, curr_offset<<3, 1, ENC_BIG_ENDIAN);
3792 proto_tree_add_bits_item(tree, hf_gsm_a_dtap_epc_degrees_latitude, tvb, (curr_offset<<3)+1, 23, ENC_BIG_ENDIAN);
3794 longitude = tvb_get_ntoh24(tvb, curr_offset);
3795 proto_tree_add_int_format(tree, hf_gsm_a_dtap_epc_degrees_longitude, tvb, curr_offset, 3, longitude,
3796 "%s = %s: %d", decode_bits_in_field(curr_offset<<3, 24, longitude),
3797 proto_registrar_get_name(hf_gsm_a_dtap_epc_degrees_longitude), longitude-8388608);
3799 proto_tree_add_bits_item(tree, hf_gsm_a_dtap_epc_altitude_dir, tvb, curr_offset<<3, 1, ENC_BIG_ENDIAN);
3800 proto_tree_add_bits_item(tree, hf_gsm_a_dtap_epc_altitude, tvb, (curr_offset<<3)+1, 15, ENC_BIG_ENDIAN);
3803 return (curr_offset - offset);
3807 de_tp_epc_horizontal_velocity(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
3809 guint32 curr_offset;
3811 curr_offset = offset;
3813 proto_tree_add_bits_item(tree, hf_gsm_a_dtap_epc_bearing, tvb, curr_offset<<3, 9, ENC_BIG_ENDIAN);
3814 proto_tree_add_bits_item(tree, hf_gsm_a_dtap_epc_horizontal_speed, tvb, (curr_offset<<3)+9, 11, ENC_BIG_ENDIAN);
3817 return (curr_offset - offset);
3821 de_tp_epc_gnss_tod_msec(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
3823 guint32 curr_offset;
3825 curr_offset = offset;
3827 proto_tree_add_bits_item(tree, hf_gsm_a_dtap_epc_gnss_tod_msec, tvb, (curr_offset<<3)+2, 22, ENC_BIG_ENDIAN);
3830 return (curr_offset - offset);
3833 guint16 (*dtap_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string, int string_len) = {
3834 /* Mobility Management Information Elements 10.5.3 */
3835 de_auth_param_rand, /* Authentication Parameter RAND */
3836 de_auth_param_autn, /* Authentication Parameter AUTN (UMTS and EPS authentication challenge) */
3837 de_auth_resp_param, /* Authentication Response Parameter */
3838 de_auth_resp_param_ext, /* Authentication Response Parameter (extension) (UMTS authentication challenge only) */
3839 de_auth_fail_param, /* Authentication Failure Parameter (UMTS and EPS authentication challenge) */
3840 NULL /* handled inline */, /* CM Service Type */
3841 NULL /* handled inline */, /* Identity Type */
3842 NULL /* handled inline */, /* Location Updating Type */
3843 de_network_name, /* Network Name */
3844 de_rej_cause, /* Reject Cause */
3845 NULL /* no associated data */, /* Follow-on Proceed */
3846 de_time_zone, /* Time Zone */
3847 de_time_zone_time, /* Time Zone and Time */
3848 NULL /* no associated data */, /* CTS Permission */
3849 de_lsa_id, /* LSA Identifier */
3850 de_day_saving_time, /* Daylight Saving Time */
3851 de_emerg_num_list, /* Emergency Number List */
3852 de_add_upd_params, /* Additional update parameters */
3853 de_mm_timer, /* MM Timer */
3854 /* Call Control Information Elements 10.5.4 */
3855 de_aux_states, /* Auxiliary States */
3856 de_bearer_cap, /* Bearer Capability */
3857 de_cc_cap, /* Call Control Capabilities */
3858 de_call_state, /* Call State */
3859 de_cld_party_bcd_num, /* Called Party BCD Number */
3860 de_cld_party_sub_addr, /* Called Party Subaddress */
3861 de_clg_party_bcd_num, /* Calling Party BCD Number */
3862 de_clg_party_sub_addr, /* Calling Party Subaddress */
3863 de_cause, /* Cause */
3864 NULL /* no associated data */, /* CLIR Suppression */
3865 NULL /* no associated data */, /* CLIR Invocation */
3866 NULL /* handled inline */, /* Congestion Level */
3867 de_conn_num, /* Connected Number */
3868 de_conn_sub_addr, /* Connected Subaddress */
3869 de_facility, /* Facility */
3870 de_hlc, /* High Layer Compatibility */
3871 de_keypad_facility, /* Keypad Facility */
3872 de_llc, /* 10.5.4.18 Low layer compatibility */
3873 NULL, /* More Data */
3874 de_notif_ind, /* Notification Indicator */
3875 de_prog_ind, /* Progress Indicator */
3876 de_recall_type, /* 10.5.4.21a Recall type $(CCBS)$ */
3877 de_red_party_bcd_num, /* Redirecting Party BCD Number */
3878 de_red_party_sub_addr, /* Redirecting Party Subaddress */
3879 de_repeat_ind, /* Repeat Indicator */
3880 NULL /* no associated data */, /* Reverse Call Setup Direction */
3881 de_setup_cont, /* SETUP Container $(CCBS)$ */
3882 de_signal, /* Signal */
3883 de_ss_ver_ind, /* SS Version Indicator */
3884 de_u2u, /* User-user */
3885 de_alert_pat, /* Alerting Pattern $(NIA)$ */
3886 de_allowed_act, /* Allowed Actions $(CCBS)$ */
3887 de_stream_id, /* Stream Identifier */
3888 de_nw_call_ctrl_cap, /* Network Call Control Capabilities */
3889 de_ca_of_no_cli, /* Cause of No CLI */
3890 de_sup_codec_list, /* Supported Codec List */
3891 de_serv_cat, /* Service Category */
3892 NULL, /* 10.5.4.34 Redial */
3893 NULL, /* 10.5.4.35 Network-initiated Service Upgrade ind */
3894 /* Short Message Service Information Elements [5] 8.1.4 */
3895 de_cp_user_data, /* CP-User Data */
3896 de_cp_cause, /* CP-Cause */
3897 /* Tests procedures information elements 3GPP TS 44.014 6.4.0 and 3GPP TS 34.109 6.4.0 */
3898 de_tp_sub_channel, /* Close TCH Loop Cmd Sub-channel */
3899 de_tp_ack, /* Open Loop Cmd Ack */
3900 de_tp_loop_type, /* Close Multi-slot Loop Cmd Loop type */
3901 de_tp_loop_ack, /* Close Multi-slot Loop Ack Result */
3902 de_tp_tested_device, /* Test Interface Tested device */
3903 de_tp_pdu_description, /* GPRS Test Mode Cmd PDU description */
3904 de_tp_mode_flag, /* GPRS Test Mode Cmd Mode flag */
3905 de_tp_egprs_mode_flag, /* EGPRS Start Radio Block Loopback Cmd Mode flag */
3906 de_tp_ms_positioning_technology, /* MS Positioning Technology */
3907 de_tp_ue_test_loop_mode, /* Close UE Test Loop Mode */
3908 de_tp_ue_positioning_technology, /* UE Positioning Technology */
3909 de_tp_rlc_sdu_counter_value, /* RLC SDU Counter Value */
3910 de_tp_epc_ue_test_loop_mode, /* UE Test Loop Mode */
3911 de_tp_epc_ue_tl_a_lb_setup, /* UE Test Loop Mode A LB Setup */
3912 de_tp_epc_ue_tl_b_lb_setup, /* UE Test Loop Mode B LB Setup */
3913 de_tp_epc_ue_tl_c_setup, /* UE Test Loop Mode C Setup */
3914 de_tp_epc_ue_positioning_technology, /* UE Positioning Technology */
3915 de_tp_epc_mbms_packet_counter_value, /* MBMS Packet Counter Value */
3916 de_tp_epc_ellipsoid_point_with_alt, /* ellipsoidPointWithAltitude */
3917 de_tp_epc_horizontal_velocity, /* horizontalVelocity */
3918 de_tp_epc_gnss_tod_msec, /* gnss-TOD-msec */
3922 /* MESSAGE FUNCTIONS */
3925 * [4] 9.2.2 Authentication request
3928 dtap_mm_auth_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
3930 guint32 curr_offset;
3934 proto_tree *subtree;
3936 curr_offset = offset;
3939 is_uplink = IS_UPLINK_FALSE;
3942 * special dissection for Cipher Key Sequence Number
3944 oct = tvb_get_guint8(tvb, curr_offset);
3946 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, curr_offset<<3, 4, ENC_BIG_ENDIAN);
3949 proto_tree_add_subtree(tree,
3950 tvb, curr_offset, 1, ett_gsm_common_elem[DE_CIPH_KEY_SEQ_NUM], NULL,
3951 val_to_str_ext_const(DE_CIPH_KEY_SEQ_NUM, &gsm_common_elem_strings_ext, ""));
3953 proto_tree_add_bits_item(subtree, hf_gsm_a_spare_bits, tvb, (curr_offset<<3)+4, 1, ENC_BIG_ENDIAN);
3958 proto_tree_add_uint_format_value(subtree, hf_gsm_a_dtap_ciphering_key_sequence_number, tvb, curr_offset, 1,
3959 oct, "No key is available");
3963 proto_tree_add_item(subtree, hf_gsm_a_dtap_ciphering_key_sequence_number, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3970 if ((signed)curr_len <= 0) return;
3972 ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_AUTH_PARAM_RAND, " - UMTS challenge or GSM challenge");
3974 ELEM_OPT_TLV(0x20, GSM_A_PDU_TYPE_DTAP, DE_AUTH_PARAM_AUTN, NULL);
3976 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
3980 * [4] 9.2.3 Authentication response
3983 dtap_mm_auth_resp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
3985 guint32 curr_offset;
3989 curr_offset = offset;
3992 is_uplink = IS_UPLINK_TRUE;
3994 ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_AUTH_RESP_PARAM, NULL);
3996 ELEM_OPT_TLV(0x21, GSM_A_PDU_TYPE_DTAP, DE_AUTH_RESP_PARAM_EXT, NULL);
3998 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
4002 * [4] 9.2.3a Authentication Failure
4005 dtap_mm_auth_fail(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
4007 guint32 curr_offset;
4011 curr_offset = offset;
4014 is_uplink = IS_UPLINK_TRUE;
4016 ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_REJ_CAUSE, NULL);
4018 ELEM_OPT_TLV(0x22, GSM_A_PDU_TYPE_DTAP, DE_AUTH_FAIL_PARAM, NULL);
4020 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
4024 * [3] 9.2.4 CM Re-establishment request
4027 dtap_mm_cm_reestab_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
4029 guint32 curr_offset;
4033 proto_tree *subtree;
4035 curr_offset = offset;
4038 is_uplink = IS_UPLINK_TRUE;
4041 * special dissection for Cipher Key Sequence Number
4043 oct = tvb_get_guint8(tvb, curr_offset);
4045 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, curr_offset<<3, 4, ENC_BIG_ENDIAN);
4048 proto_tree_add_subtree(tree,
4049 tvb, curr_offset, 1, ett_gsm_common_elem[DE_CIPH_KEY_SEQ_NUM], NULL,
4050 val_to_str_ext_const(DE_CIPH_KEY_SEQ_NUM, &gsm_common_elem_strings_ext, ""));
4052 proto_tree_add_bits_item(subtree, hf_gsm_a_spare_bits, tvb, (curr_offset<<3)+4, 1, ENC_BIG_ENDIAN);
4057 proto_tree_add_uint_format_value(subtree, hf_gsm_a_dtap_ciphering_key_sequence_number, tvb, curr_offset, 1,
4058 oct, "No key is available");
4062 proto_tree_add_item(subtree, hf_gsm_a_dtap_ciphering_key_sequence_number, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4069 if ((signed)curr_len <= 0) return;
4071 ELEM_MAND_LV(GSM_A_PDU_TYPE_COMMON, DE_MS_CM_2, NULL);
4073 ELEM_MAND_LV(GSM_A_PDU_TYPE_COMMON, DE_MID, NULL);
4075 ELEM_OPT_TV(0x13, GSM_A_PDU_TYPE_COMMON, DE_LAI, NULL);
4077 ELEM_OPT_TV_SHORT(0xD0, GSM_A_PDU_TYPE_GM, DE_DEVICE_PROPERTIES, NULL);
4080 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
4084 * [3] 9.2.5a CM service prompt $(CCBS)
4087 dtap_mm_cm_srvc_prompt(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
4089 guint32 curr_offset;
4093 curr_offset = offset;
4096 is_uplink = IS_UPLINK_FALSE;
4098 ELEM_MAND_V(GSM_A_PDU_TYPE_COMMON, DE_PD_SAPI, NULL);
4100 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
4104 * [4] 9.2.6 CM service reject
4107 dtap_mm_cm_srvc_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
4109 guint32 curr_offset;
4113 curr_offset = offset;
4116 is_uplink = IS_UPLINK_FALSE;
4118 ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_REJ_CAUSE, NULL);
4120 ELEM_OPT_TLV(0x36, GSM_A_PDU_TYPE_DTAP, DE_MM_TIMER, " - T3246 value");
4122 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
4129 dtap_mm_abort(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
4131 guint32 curr_offset;
4135 curr_offset = offset;
4138 is_uplink = IS_UPLINK_FALSE;
4140 ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_REJ_CAUSE, NULL);
4142 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
4146 * [3] 9.2.9 CM service request
4148 static const value_string gsm_a_dtap_service_type_vals[] = {
4149 { 0x00, "Reserved"},
4150 { 0x01, "Mobile originating call establishment or packet mode connection establishment"},
4151 { 0x02, "Emergency call establishment"},
4152 { 0x03, "Reserved"},
4153 { 0x04, "Short message service"},
4154 { 0x05, "Reserved"},
4155 { 0x06, "Reserved"},
4156 { 0x07, "Reserved"},
4157 { 0x08, "Supplementary service activation"},
4158 { 0x09, "Voice group call establishment"},
4159 { 0x0a, "Voice broadcast call establishment"},
4160 { 0x0b, "Location Services"},
4161 { 0x0c, "Reserved"},
4162 { 0x0d, "Reserved"},
4163 { 0x0e, "Reserved"},
4164 { 0x0f, "Reserved"},
4169 dtap_mm_cm_srvc_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
4171 guint32 curr_offset;
4175 proto_tree *subtree;
4177 curr_offset = offset;
4180 is_uplink = IS_UPLINK_TRUE;
4183 * special dissection for CM Service Type
4185 oct = tvb_get_guint8(tvb, curr_offset);
4188 proto_tree_add_subtree(tree,
4189 tvb, curr_offset, 1, ett_gsm_common_elem[DE_CIPH_KEY_SEQ_NUM], NULL,
4190 val_to_str_ext_const(DE_CIPH_KEY_SEQ_NUM, &gsm_common_elem_strings_ext, ""));
4192 proto_tree_add_bits_item(subtree, hf_gsm_a_spare_bits, tvb, curr_offset<<3, 1, ENC_BIG_ENDIAN);
4194 switch ((oct & 0x70) >> 4)
4197 proto_tree_add_uint_format_value(subtree, hf_gsm_a_dtap_ciphering_key_sequence_number70, tvb, curr_offset, 1,
4198 oct, "No key is available");
4202 proto_tree_add_item(subtree, hf_gsm_a_dtap_ciphering_key_sequence_number70, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4207 proto_tree_add_subtree(tree,
4208 tvb, curr_offset, 1, ett_gsm_dtap_elem[DE_CM_SRVC_TYPE], NULL,
4209 val_to_str_ext_const(DE_CM_SRVC_TYPE, &gsm_dtap_elem_strings_ext, ""));
4211 proto_tree_add_item(subtree, hf_gsm_a_dtap_service_type, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4216 if ((signed)curr_len <= 0) return;
4218 ELEM_MAND_LV(GSM_A_PDU_TYPE_COMMON, DE_MS_CM_2, NULL);
4220 ELEM_MAND_LV(GSM_A_PDU_TYPE_COMMON, DE_MID, NULL);
4222 ELEM_OPT_TV_SHORT(0x80, GSM_A_PDU_TYPE_COMMON, DE_PRIO, NULL);
4224 ELEM_OPT_TV_SHORT(0xC0, GSM_A_PDU_TYPE_DTAP, DE_ADD_UPD_PARAMS, NULL);
4226 ELEM_OPT_TV_SHORT(0xD0, GSM_A_PDU_TYPE_GM, DE_DEVICE_PROPERTIES, NULL);
4228 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
4232 * [3] 9.2.10 Identity request
4234 static const value_string gsm_a_dtap_type_of_identity_vals[] = {
4235 { 0x00, "Reserved"},
4240 { 0x05, "P-TMSI, RAI, P-TMSI signature"},
4241 { 0x06, "Reserved"},
4242 { 0x07, "Reserved"},
4247 dtap_mm_id_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
4249 guint32 curr_offset;
4251 proto_tree *subtree;
4253 curr_offset = offset;
4256 is_uplink = IS_UPLINK_FALSE;
4259 * special dissection for Identity Type
4261 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, curr_offset<<3, 4, ENC_BIG_ENDIAN);
4264 proto_tree_add_subtree(tree,
4265 tvb, curr_offset, 1, ett_gsm_dtap_elem[DE_ID_TYPE], NULL,
4266 val_to_str_ext_const(DE_ID_TYPE, &gsm_dtap_elem_strings_ext, ""));
4268 proto_tree_add_bits_item(subtree, hf_gsm_a_spare_bits, tvb, (curr_offset<<3)+4, 1, ENC_BIG_ENDIAN);
4269 proto_tree_add_item(subtree, hf_gsm_a_dtap_type_of_identity, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4274 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
4278 * [3] 9.2.11 Identity response
4281 dtap_mm_id_resp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
4283 guint32 curr_offset;
4287 curr_offset = offset;
4290 is_uplink = IS_UPLINK_TRUE;
4292 ELEM_MAND_LV(GSM_A_PDU_TYPE_COMMON, DE_MID, NULL);
4294 ELEM_OPT_TV_SHORT(0xE0, GSM_A_PDU_TYPE_GM, DE_PTMSI_TYPE, NULL);
4296 ELEM_OPT_TLV( 0x1B, GSM_A_PDU_TYPE_GM, DE_RAI_2, " - Routing area identification");
4298 ELEM_OPT_TLV( 0x19, GSM_A_PDU_TYPE_GM, DE_P_TMSI_SIG_2, " - P-TMSI signature");
4300 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
4304 * [3] 9.2.12 IMSI detach indication
4307 dtap_mm_imsi_det_ind(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
4309 guint32 curr_offset;
4313 curr_offset = offset;
4316 is_uplink = IS_UPLINK_TRUE;
4318 ELEM_MAND_V(GSM_A_PDU_TYPE_COMMON, DE_MS_CM_1, NULL);
4320 ELEM_MAND_LV(GSM_A_PDU_TYPE_COMMON, DE_MID, NULL);
4322 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
4326 * [3] 9.2.13 Location updating accept
4329 dtap_mm_loc_upd_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
4331 guint32 curr_offset;
4335 curr_offset = offset;
4338 is_uplink = IS_UPLINK_FALSE;
4340 ELEM_MAND_V(GSM_A_PDU_TYPE_COMMON, DE_LAI, NULL);
4342 ELEM_OPT_TLV(0x17, GSM_A_PDU_TYPE_COMMON, DE_MID, NULL);
4344 ELEM_OPT_T(0xa1, GSM_A_PDU_TYPE_DTAP, DE_FOP, NULL);
4346 /* CTS permission O T 1 10.5.3.10 */
4347 ELEM_OPT_T(0xa2, GSM_A_PDU_TYPE_DTAP, DE_CTS_PERM, NULL);
4349 /* PLMN list O TLV 5-47 10.5.1.13 */
4350 ELEM_OPT_TLV(0x4a, GSM_A_PDU_TYPE_COMMON, DE_PLMN_LIST, " Equivalent");
4352 /* 34 Emergency Number List O TLV 5-50 10.5.3.13 */
4353 ELEM_OPT_TLV(0x34, GSM_A_PDU_TYPE_DTAP, DE_EMERGENCY_NUM_LIST, NULL);
4355 ELEM_OPT_TLV(0x35, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - Per MS T3212");
4357 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
4361 * [3] 9.2.14 Location updating reject
4364 dtap_mm_loc_upd_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
4366 guint32 curr_offset;
4370 curr_offset = offset;
4373 is_uplink = IS_UPLINK_FALSE;
4375 ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_REJ_CAUSE, NULL);
4377 ELEM_OPT_TLV(0x36, GSM_A_PDU_TYPE_DTAP, DE_MM_TIMER, " - T3246 value");
4379 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
4383 * [3] 9.2.15 Location updating request
4385 static const value_string gsm_a_dtap_updating_type_vals[] = {
4387 { 0x01, "Periodic"},
4388 { 0x02, "IMSI attach"},
4389 { 0x03, "Reserved"},
4393 static const true_false_string tfs_follow_on_request_value = {
4394 "Follow-on request pending",
4395 "No follow-on request pending"
4399 dtap_mm_loc_upd_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
4401 guint32 curr_offset;
4405 proto_tree *subtree;
4408 curr_offset = offset;
4411 is_uplink = IS_UPLINK_TRUE;
4414 * special dissection for Location Updating Type
4416 oct = tvb_get_guint8(tvb, curr_offset);
4419 proto_tree_add_subtree(tree,
4420 tvb, curr_offset, 1, ett_gsm_common_elem[DE_CIPH_KEY_SEQ_NUM], NULL,
4421 val_to_str_ext_const(DE_CIPH_KEY_SEQ_NUM, &gsm_common_elem_strings_ext, ""));
4423 proto_tree_add_bits_item(subtree, hf_gsm_a_spare_bits, tvb, curr_offset<<3, 1, ENC_BIG_ENDIAN);
4425 switch ((oct & 0x70) >> 4)
4428 proto_tree_add_uint_format_value(subtree, hf_gsm_a_dtap_ciphering_key_sequence_number70, tvb, curr_offset, 1,
4429 oct, "No key is available");
4433 proto_tree_add_item(subtree, hf_gsm_a_dtap_ciphering_key_sequence_number70, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4438 proto_tree_add_subtree(tree,
4439 tvb, curr_offset, 1, ett_gsm_dtap_elem[DE_LOC_UPD_TYPE], &item,
4440 val_to_str_ext_const(DE_LOC_UPD_TYPE, &gsm_dtap_elem_strings_ext, ""));
4442 proto_tree_add_item(subtree, hf_gsm_a_dtap_follow_on_request, tvb, curr_offset, 1, ENC_NA);
4444 proto_tree_add_bits_item(subtree, hf_gsm_a_spare_bits, tvb, (curr_offset<<3)+5, 1, ENC_BIG_ENDIAN);
4446 proto_tree_add_item(subtree, hf_gsm_a_dtap_updating_type, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4448 proto_item_append_text(item, " - %s", val_to_str_const(oct & 0x03, gsm_a_dtap_updating_type_vals, "Reserved"));
4453 if ((signed)curr_len <= 0) return;
4455 ELEM_MAND_V(GSM_A_PDU_TYPE_COMMON, DE_LAI, NULL);
4457 ELEM_MAND_V(GSM_A_PDU_TYPE_COMMON, DE_MS_CM_1, NULL);
4459 ELEM_MAND_LV(GSM_A_PDU_TYPE_COMMON, DE_MID, NULL);
4461 ELEM_OPT_TLV(0x33, GSM_A_PDU_TYPE_COMMON, DE_MS_CM_2, " - Mobile station classmark for UMTS");
4463 ELEM_OPT_TV_SHORT(0xc0, GSM_A_PDU_TYPE_DTAP, DE_ADD_UPD_PARAMS, NULL);
4465 ELEM_OPT_TV_SHORT(0xD0, GSM_A_PDU_TYPE_GM, DE_DEVICE_PROPERTIES, NULL);
4467 ELEM_OPT_TV_SHORT(0xC0, GSM_A_PDU_TYPE_COMMON, DE_MS_NET_FEAT_SUP, NULL);
4469 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
4474 * [4] 9.2.15a MM information
4477 dtap_mm_mm_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
4479 guint32 curr_offset;
4483 curr_offset = offset;
4486 is_uplink = IS_UPLINK_TRUE;
4488 ELEM_OPT_TLV(0x43, GSM_A_PDU_TYPE_DTAP, DE_NETWORK_NAME, " - Full Name");
4490 ELEM_OPT_TLV(0x45, GSM_A_PDU_TYPE_DTAP, DE_NETWORK_NAME, " - Short Name");
4492 ELEM_OPT_TV(0x46, GSM_A_PDU_TYPE_DTAP, DE_TIME_ZONE, " - Local");
4494 ELEM_OPT_TV(0x47, GSM_A_PDU_TYPE_DTAP, DE_TIME_ZONE_TIME, " - Universal Time and Local Time Zone");
4496 ELEM_OPT_TLV(0x48, GSM_A_PDU_TYPE_DTAP, DE_LSA_ID, NULL);
4498 ELEM_OPT_TLV(0x49, GSM_A_PDU_TYPE_DTAP, DE_DAY_SAVING_TIME, NULL);
4500 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
4504 * [4] 9.2.16 MM Status
4507 dtap_mm_mm_status(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
4509 guint32 curr_offset;
4513 curr_offset = offset;
4516 is_uplink = IS_UPLINK_TRUE;
4518 ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_REJ_CAUSE, NULL);
4520 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
4524 * [3] 9.2.17 TMSI reallocation command
4527 dtap_mm_tmsi_realloc_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
4529 guint32 curr_offset;
4533 curr_offset = offset;
4536 is_uplink = IS_UPLINK_FALSE;
4538 ELEM_MAND_V(GSM_A_PDU_TYPE_COMMON, DE_LAI, NULL);
4540 ELEM_MAND_LV(GSM_A_PDU_TYPE_COMMON, DE_MID, NULL);
4542 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
4545 * 9.2.18 TMSI reallocation complete
4555 * [4] 9.3.1 Alerting
4558 dtap_cc_alerting(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
4560 guint32 curr_offset;
4564 curr_offset = offset;
4567 is_uplink = IS_UPLINK_TRUE;
4569 ELEM_OPT_TLV(0x1c, GSM_A_PDU_TYPE_DTAP, DE_FACILITY, NULL);
4571 ELEM_OPT_TLV(0x1e, GSM_A_PDU_TYPE_DTAP, DE_PROG_IND, NULL);
4573 ELEM_OPT_TLV(0x7e, GSM_A_PDU_TYPE_DTAP, DE_USER_USER, NULL);
4577 ELEM_OPT_TLV(0x7f, GSM_A_PDU_TYPE_DTAP, DE_SS_VER_IND, NULL);
4579 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
4583 * [4] 9.3.2 Call confirmed
4586 dtap_cc_call_conf(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
4588 guint32 curr_offset;
4592 curr_offset = offset;
4595 is_uplink = IS_UPLINK_TRUE;
4597 ELEM_OPT_TV_SHORT(0xd0, GSM_A_PDU_TYPE_DTAP, DE_REPEAT_IND, " BC repeat indicator");
4599 ELEM_OPT_TLV(0x04, GSM_A_PDU_TYPE_DTAP, DE_BEARER_CAP, " 1");
4601 ELEM_OPT_TLV(0x04, GSM_A_PDU_TYPE_DTAP, DE_BEARER_CAP, " 2");
4603 ELEM_OPT_TLV(0x08, GSM_A_PDU_TYPE_DTAP, DE_CAUSE, NULL);
4605 ELEM_OPT_TLV(0x15, GSM_A_PDU_TYPE_DTAP, DE_CC_CAP, NULL);
4607 ELEM_OPT_TLV(0x2d, GSM_A_PDU_TYPE_DTAP, DE_SI, NULL);
4609 ELEM_OPT_TLV(0x40, GSM_A_PDU_TYPE_DTAP, DE_SUP_CODEC_LIST, NULL);
4611 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
4615 * [4] 9.3.3 Call proceeding
4618 dtap_cc_call_proceed(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
4620 guint32 curr_offset;
4624 curr_offset = offset;
4627 is_uplink = IS_UPLINK_FALSE;
4629 ELEM_OPT_TV_SHORT(0xd0, GSM_A_PDU_TYPE_DTAP, DE_REPEAT_IND, " BC repeat indicator");
4631 ELEM_OPT_TLV(0x04, GSM_A_PDU_TYPE_DTAP, DE_BEARER_CAP, " 1");
4633 ELEM_OPT_TLV(0x04, GSM_A_PDU_TYPE_DTAP, DE_BEARER_CAP, " 2");
4635 ELEM_OPT_TLV(0x1c, GSM_A_PDU_TYPE_DTAP, DE_FACILITY, NULL);
4637 ELEM_OPT_TLV(0x1e, GSM_A_PDU_TYPE_DTAP, DE_PROG_IND, NULL);
4639 ELEM_OPT_TV_SHORT(0x80, GSM_A_PDU_TYPE_COMMON, DE_PRIO, NULL);
4641 ELEM_OPT_TLV(0x2f, GSM_A_PDU_TYPE_DTAP, DE_NET_CC_CAP, NULL);
4643 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
4647 * [4] 9.3.4 Congestion control
4649 static const value_string gsm_a_dtap_congestion_level_vals[] = {
4650 { 0, "Receiver ready"},
4651 { 15, "Receiver not ready"},
4656 dtap_cc_congestion_control(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
4658 guint32 curr_offset;
4662 proto_tree *subtree;
4664 curr_offset = offset;
4667 is_uplink = IS_UPLINK_FALSE;
4670 * special dissection for Congestion Level
4672 oct = tvb_get_guint8(tvb, curr_offset);
4674 proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, curr_offset<<3, 4, ENC_BIG_ENDIAN);
4677 proto_tree_add_subtree(tree,
4678 tvb, curr_offset, 1, ett_gsm_dtap_elem[DE_CONGESTION], NULL,
4679 val_to_str_ext_const(DE_CONGESTION, &gsm_dtap_elem_strings_ext, ""));
4681 proto_tree_add_uint_format_value(subtree, hf_gsm_a_dtap_congestion_level, tvb, curr_offset, 1,
4682 oct, "%s", val_to_str_const(oct & 0xF, gsm_a_dtap_congestion_level_vals, "Reserved"));
4687 if ((signed)curr_len <= 0) return;
4689 ELEM_OPT_TLV(0x08, GSM_A_PDU_TYPE_DTAP, DE_CAUSE, NULL);
4691 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
4698 dtap_cc_connect(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
4700 guint32 curr_offset;
4704 curr_offset = offset;
4707 is_uplink = IS_UPLINK_TRUE;
4709 ELEM_OPT_TLV(0x1c, GSM_A_PDU_TYPE_DTAP, DE_FACILITY, NULL);
4711 ELEM_OPT_TLV(0x1e, GSM_A_PDU_TYPE_DTAP, DE_PROG_IND, NULL);
4713 ELEM_OPT_TLV(0x4c, GSM_A_PDU_TYPE_DTAP, DE_CONN_NUM, NULL);
4715 ELEM_OPT_TLV(0x4d, GSM_A_PDU_TYPE_DTAP, DE_CONN_SUB_ADDR, NULL);
4717 ELEM_OPT_TLV(0x7e, GSM_A_PDU_TYPE_DTAP, DE_USER_USER, NULL);
4721 ELEM_OPT_TLV(0x7f, GSM_A_PDU_TYPE_DTAP, DE_SS_VER_IND, NULL);
4723 ELEM_OPT_TLV(0x2d, GSM_A_PDU_TYPE_DTAP, DE_SI, NULL);
4725 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
4729 * [4] 9.3.7 Disconnect
4732 dtap_cc_disconnect(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
4734 guint32 curr_offset;
4738 curr_offset = offset;
4741 is_uplink = IS_UPLINK_TRUE;
4743 ELEM_MAND_LV(GSM_A_PDU_TYPE_DTAP, DE_CAUSE, NULL);
4745 ELEM_OPT_TLV(0x1c, GSM_A_PDU_TYPE_DTAP, DE_FACILITY, NULL);
4747 ELEM_OPT_TLV(0x1e, GSM_A_PDU_TYPE_DTAP, DE_PROG_IND, NULL);
4749 ELEM_OPT_TLV(0x7e, GSM_A_PDU_TYPE_DTAP, DE_USER_USER, NULL);
4751 ELEM_OPT_TLV(0x7b, GSM_A_PDU_TYPE_DTAP, DE_ALLOWED_ACTIONS, NULL);
4755 ELEM_OPT_TLV(0x7f, GSM_A_PDU_TYPE_DTAP, DE_SS_VER_IND, NULL);
4757 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
4761 * [4] 9.3.8 Emergency setup
4764 dtap_cc_emerg_setup(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
4766 guint32 curr_offset;
4770 curr_offset = offset;
4773 is_uplink = IS_UPLINK_TRUE;
4775 ELEM_OPT_TLV(0x04, GSM_A_PDU_TYPE_DTAP, DE_BEARER_CAP, NULL);
4777 ELEM_OPT_TLV(0x2d, GSM_A_PDU_TYPE_DTAP, DE_SI, NULL);
4779 ELEM_OPT_TLV(0x40, GSM_A_PDU_TYPE_DTAP, DE_SUP_CODEC_LIST, NULL);
4781 ELEM_OPT_TLV(0x2e, GSM_A_PDU_TYPE_DTAP, DE_SERV_CAT, " - Emergency category");
4783 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
4787 * [4] 9.3.9 Facility
4790 dtap_cc_facility(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
4792 guint32 curr_offset;
4796 curr_offset = offset;
4799 is_uplink = IS_UPLINK_TRUE;
4801 ELEM_MAND_LV(GSM_A_PDU_TYPE_DTAP, DE_FACILITY, NULL);
4805 ELEM_OPT_TLV(0x7f, GSM_A_PDU_TYPE_DTAP, DE_SS_VER_IND, NULL);
4807 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
4814 * 9.3.11 Hold Acknowledge
4817 * [4] 9.3.12 Hold Reject
4820 dtap_cc_hold_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
4822 guint32 curr_offset;
4826 curr_offset = offset;
4829 is_uplink = IS_UPLINK_FALSE;
4831 ELEM_MAND_LV(GSM_A_PDU_TYPE_DTAP, DE_CAUSE, NULL);
4833 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
4840 dtap_cc_modify(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
4842 guint32 curr_offset;
4846 curr_offset = offset;
4849 is_uplink = IS_UPLINK_TRUE;
4851 ELEM_MAND_LV(GSM_A_PDU_TYPE_DTAP, DE_BEARER_CAP, NULL);
4853 ELEM_OPT_TLV(0x7c, GSM_A_PDU_TYPE_DTAP, DE_LLC, NULL);
4855 ELEM_OPT_TLV(0x7d, GSM_A_PDU_TYPE_DTAP, DE_HLC, NULL);
4857 ELEM_OPT_T(0xa3, GSM_A_PDU_TYPE_DTAP, DE_REV_CALL_SETUP_DIR, NULL);
4859 ELEM_OPT_T(0xa4, GSM_A_PDU_TYPE_DTAP, DE_NET_INIT_SERV_UPG, NULL);
4861 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
4865 * [4] 9.3.14 Modify complete
4868 dtap_cc_modify_complete(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
4870 guint32 curr_offset;
4874 curr_offset = offset;
4877 is_uplink = IS_UPLINK_TRUE;
4879 ELEM_MAND_LV(GSM_A_PDU_TYPE_DTAP, DE_BEARER_CAP, NULL);
4881 ELEM_OPT_TLV(0x7c, GSM_A_PDU_TYPE_DTAP, DE_LLC, NULL);
4883 ELEM_OPT_TLV(0x7d, GSM_A_PDU_TYPE_DTAP, DE_HLC, NULL);
4885 ELEM_OPT_T(0xa3, GSM_A_PDU_TYPE_DTAP, DE_REV_CALL_SETUP_DIR, NULL);
4887 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
4891 * [4] 9.3.15 Modify reject
4894 dtap_cc_modify_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
4896 guint32 curr_offset;
4900 curr_offset = offset;
4903 is_uplink = IS_UPLINK_FALSE;
4905 ELEM_MAND_LV(GSM_A_PDU_TYPE_DTAP, DE_BEARER_CAP, NULL);
4907 ELEM_MAND_LV(GSM_A_PDU_TYPE_DTAP, DE_CAUSE, NULL);
4909 ELEM_OPT_TLV(0x7c, GSM_A_PDU_TYPE_DTAP, DE_LLC, NULL);
4911 ELEM_OPT_TLV(0x7d, GSM_A_PDU_TYPE_DTAP, DE_HLC, NULL);
4913 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
4920 dtap_cc_notify(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
4922 guint32 curr_offset;
4926 curr_offset = offset;
4929 is_uplink = IS_UPLINK_FALSE;
4931 ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_NOT_IND, NULL);
4933 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
4937 * [4] 9.3.17 Progress
4940 dtap_cc_progress(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
4942 guint32 curr_offset;
4946 curr_offset = offset;
4949 is_uplink = IS_UPLINK_FALSE;
4951 ELEM_MAND_LV(GSM_A_PDU_TYPE_DTAP, DE_PROG_IND, NULL);
4953 ELEM_OPT_TLV(0x7e, GSM_A_PDU_TYPE_DTAP, DE_USER_USER, NULL);
4955 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
4959 * [4] 9.3.17a CC-Establishment $(CCBS)$
4962 dtap_cc_cc_est(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
4964 guint32 curr_offset;
4968 curr_offset = offset;
4971 is_uplink = IS_UPLINK_FALSE;
4973 ELEM_MAND_LV(GSM_A_PDU_TYPE_DTAP, DE_SETUP_CONTAINER, NULL);
4975 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
4979 * [4] 9.3.17b CC-Establishment confirmed $(CCBS)$
4982 dtap_cc_cc_est_conf(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
4984 guint32 curr_offset;
4988 curr_offset = offset;
4991 is_uplink = IS_UPLINK_TRUE;
4993 ELEM_OPT_TV_SHORT(0xd0, GSM_A_PDU_TYPE_DTAP, DE_REPEAT_IND, " Repeat indicator");
4995 ELEM_MAND_TLV(0x04, GSM_A_PDU_TYPE_DTAP, DE_BEARER_CAP, " 1", ei_gsm_a_dtap_missing_mandatory_element);
4997 ELEM_OPT_TLV(0x04, GSM_A_PDU_TYPE_DTAP, DE_BEARER_CAP, " 2");
4999 ELEM_OPT_TLV(0x08, GSM_A_PDU_TYPE_DTAP, DE_CAUSE, NULL);
5001 ELEM_OPT_TLV(0x40, GSM_A_PDU_TYPE_DTAP, DE_SUP_CODEC_LIST, NULL);
5003 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
5007 * [4] 9.3.18 Release
5010 dtap_cc_release(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
5012 guint32 curr_offset;
5016 curr_offset = offset;
5019 is_uplink = IS_UPLINK_TRUE;
5021 ELEM_OPT_TLV(0x08, GSM_A_PDU_TYPE_DTAP, DE_CAUSE, NULL);
5023 ELEM_OPT_TLV(0x08, GSM_A_PDU_TYPE_DTAP, DE_CAUSE, " 2");
5025 ELEM_OPT_TLV(0x1c, GSM_A_PDU_TYPE_DTAP, DE_FACILITY, NULL);
5027 ELEM_OPT_TLV(0x7e, GSM_A_PDU_TYPE_DTAP, DE_USER_USER, NULL);
5031 ELEM_OPT_TLV(0x7f, GSM_A_PDU_TYPE_DTAP, DE_SS_VER_IND, NULL);
5033 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
5037 * [4] 9.3.18a Recall $(CCBS)$
5040 dtap_cc_recall(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
5042 guint32 curr_offset;
5046 curr_offset = offset;
5049 is_uplink = IS_UPLINK_FALSE;
5051 ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_RECALL_TYPE, NULL);
5053 ELEM_MAND_LV(GSM_A_PDU_TYPE_DTAP, DE_FACILITY, NULL);
5055 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
5059 * [4] 9.3.19 Release complete
5062 dtap_cc_release_complete(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
5064 guint32 curr_offset;
5068 curr_offset = offset;
5071 is_uplink = IS_UPLINK_FALSE;
5073 ELEM_OPT_TLV(0x08, GSM_A_PDU_TYPE_DTAP, DE_CAUSE, NULL);
5075 ELEM_OPT_TLV(0x1c, GSM_A_PDU_TYPE_DTAP, DE_FACILITY, NULL);
5077 ELEM_OPT_TLV(0x7e, GSM_A_PDU_TYPE_DTAP, DE_USER_USER, NULL);
5081 ELEM_OPT_TLV(0x7f, GSM_A_PDU_TYPE_DTAP, DE_SS_VER_IND, NULL);
5083 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
5087 * [4] 9.3.22 Retrieve
5090 dtap_cc_retrieve_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
5092 guint32 curr_offset;
5096 curr_offset = offset;
5099 is_uplink = IS_UPLINK_FALSE;
5101 ELEM_MAND_LV(GSM_A_PDU_TYPE_DTAP, DE_CAUSE, NULL);
5103 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
5107 * 9.3.21 Retrieve Acknowledge
5111 * 9.3.22 Retrieve Reject
5116 * 3GPP TS 24.008 version 7.5.0 Release 7
5119 dtap_cc_setup(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
5121 guint32 curr_offset;
5125 curr_offset = offset;
5128 is_uplink = IS_UPLINK_TRUE;
5130 ELEM_OPT_TV_SHORT(0xd0, GSM_A_PDU_TYPE_DTAP, DE_REPEAT_IND, " BC repeat indicator");
5132 ELEM_OPT_TLV(0x04, GSM_A_PDU_TYPE_DTAP, DE_BEARER_CAP, " 1");
5134 ELEM_OPT_TLV(0x04, GSM_A_PDU_TYPE_DTAP, DE_BEARER_CAP, " 2");
5136 ELEM_OPT_TLV(0x1c, GSM_A_PDU_TYPE_DTAP, DE_FACILITY, NULL);
5138 ELEM_OPT_TLV(0x1e, GSM_A_PDU_TYPE_DTAP, DE_PROG_IND, NULL);
5140 ELEM_OPT_TV(0x34, GSM_A_PDU_TYPE_DTAP, DE_SIGNAL, NULL);
5142 ELEM_OPT_TLV(0x5c, GSM_A_PDU_TYPE_DTAP, DE_CLG_PARTY_BCD_NUM, NULL);
5144 ELEM_OPT_TLV(0x5d, GSM_A_PDU_TYPE_DTAP, DE_CLG_PARTY_SUB_ADDR, NULL);
5146 ELEM_OPT_TLV(0x5e, GSM_A_PDU_TYPE_DTAP, DE_CLD_PARTY_BCD_NUM, NULL);
5148 ELEM_OPT_TLV(0x6d, GSM_A_PDU_TYPE_DTAP, DE_CLD_PARTY_SUB_ADDR, NULL);
5150 ELEM_OPT_TLV(0x74, GSM_A_PDU_TYPE_DTAP, DE_RED_PARTY_BCD_NUM, NULL);
5152 ELEM_OPT_TLV(0x75, GSM_A_PDU_TYPE_DTAP, DE_RED_PARTY_SUB_ADDR, NULL);
5154 ELEM_OPT_TV_SHORT(0xd0, GSM_A_PDU_TYPE_DTAP, DE_REPEAT_IND, " LLC repeat indicator");
5156 ELEM_OPT_TLV(0x7c, GSM_A_PDU_TYPE_DTAP, DE_LLC, " 1");
5158 ELEM_OPT_TLV(0x7c, GSM_A_PDU_TYPE_DTAP, DE_LLC, " 2");
5160 ELEM_OPT_TV_SHORT(0xd0, GSM_A_PDU_TYPE_DTAP, DE_REPEAT_IND, " HLC repeat indicator");
5162 ELEM_OPT_TLV(0x7d, GSM_A_PDU_TYPE_DTAP, DE_HLC, " 1");
5164 ELEM_OPT_TLV(0x7d, GSM_A_PDU_TYPE_DTAP, DE_HLC, " 2");
5166 ELEM_OPT_TLV(0x7e, GSM_A_PDU_TYPE_DTAP, DE_USER_USER, NULL);
5170 ELEM_OPT_TV_SHORT(0x80, GSM_A_PDU_TYPE_COMMON, DE_PRIO, NULL);
5172 ELEM_OPT_TLV(0x19, GSM_A_PDU_TYPE_DTAP, DE_ALERT_PATTERN, NULL);
5174 ELEM_OPT_TLV(0x2f, GSM_A_PDU_TYPE_DTAP, DE_NET_CC_CAP, NULL);
5176 ELEM_OPT_TLV(0x3a, GSM_A_PDU_TYPE_DTAP, DE_CAUSE_NO_CLI, NULL);
5178 /* Backup bearer capability O TLV 3-15 10.5.4.4a */
5179 ELEM_OPT_TLV(0x41, GSM_A_PDU_TYPE_DTAP, DE_BEARER_CAP, NULL);
5183 ELEM_OPT_TLV(0x7f, GSM_A_PDU_TYPE_DTAP, DE_SS_VER_IND, NULL);
5185 ELEM_OPT_T(0xa1, GSM_A_PDU_TYPE_DTAP, DE_CLIR_SUP, NULL);
5187 ELEM_OPT_T(0xa2, GSM_A_PDU_TYPE_DTAP, DE_CLIR_INV, NULL);
5189 ELEM_OPT_TLV(0x15, GSM_A_PDU_TYPE_DTAP, DE_CC_CAP, NULL);
5191 ELEM_OPT_TLV(0x1d, GSM_A_PDU_TYPE_DTAP, DE_FACILITY, " $(CCBS)$ (advanced recall alignment)");
5193 ELEM_OPT_TLV(0x1b, GSM_A_PDU_TYPE_DTAP, DE_FACILITY, " (recall alignment Not essential) $(CCBS)$");
5195 ELEM_OPT_TLV(0x2d, GSM_A_PDU_TYPE_DTAP, DE_SI, NULL);
5197 ELEM_OPT_TLV(0x40, GSM_A_PDU_TYPE_DTAP, DE_SUP_CODEC_LIST, NULL);
5199 /*A3 Redial O T 1 10.5.4.34 */
5200 ELEM_OPT_T(0xA3, GSM_A_PDU_TYPE_DTAP, DE_REDIAL, NULL);
5202 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
5206 * [4] 9.3.23a Start CC $(CCBS)$
5209 dtap_cc_start_cc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
5211 guint32 curr_offset;
5215 curr_offset = offset;
5218 is_uplink = IS_UPLINK_FALSE;
5220 ELEM_OPT_TLV(0x15, GSM_A_PDU_TYPE_DTAP, DE_CC_CAP, NULL);
5222 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
5226 * [4] 9.3.24 Start DTMF
5229 dtap_cc_start_dtmf(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
5231 guint32 curr_offset;
5235 curr_offset = offset;
5238 is_uplink = IS_UPLINK_TRUE;
5240 ELEM_MAND_TV(0x2c, GSM_A_PDU_TYPE_DTAP, DE_KEYPAD_FACILITY, NULL, ei_gsm_a_dtap_missing_mandatory_element);
5242 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
5246 * [4] 9.3.25 Start DTMF Acknowledge
5249 dtap_cc_start_dtmf_ack(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
5251 guint32 curr_offset;
5255 curr_offset = offset;
5258 is_uplink = IS_UPLINK_FALSE;
5260 ELEM_MAND_TV(0x2c, GSM_A_PDU_TYPE_DTAP, DE_KEYPAD_FACILITY, NULL, ei_gsm_a_dtap_missing_mandatory_element);
5262 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
5266 * [4] 9.3.26 Start DTMF reject
5269 dtap_cc_start_dtmf_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
5271 guint32 curr_offset;
5275 curr_offset = offset;
5278 is_uplink = IS_UPLINK_FALSE;
5280 ELEM_MAND_LV(GSM_A_PDU_TYPE_DTAP, DE_CAUSE, NULL);
5282 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
5289 dtap_cc_status(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
5291 guint32 curr_offset;
5295 curr_offset = offset;
5298 is_uplink = IS_UPLINK_FALSE;
5300 ELEM_MAND_LV(GSM_A_PDU_TYPE_DTAP, DE_CAUSE, NULL);
5302 ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_CALL_STATE, NULL);
5304 ELEM_OPT_TLV(0x24, GSM_A_PDU_TYPE_DTAP, DE_AUX_STATES, NULL);
5306 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
5309 * 9.3.28 Status enquiry
5317 * Stop DTMF acknowledge
5321 * [4] 9.3.31 User information
5324 dtap_cc_user_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
5326 guint32 curr_offset;
5330 curr_offset = offset;
5333 is_uplink = IS_UPLINK_TRUE;
5335 ELEM_MAND_LV(GSM_A_PDU_TYPE_DTAP, DE_USER_USER, NULL);
5337 ELEM_OPT_T(0xa0, GSM_A_PDU_TYPE_DTAP, DE_MORE_DATA, NULL);
5339 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
5347 dtap_ss_register(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
5349 guint32 curr_offset;
5353 curr_offset = offset;
5356 is_uplink = IS_UPLINK_TRUE;
5358 ELEM_MAND_TLV(0x1c, GSM_A_PDU_TYPE_DTAP, DE_FACILITY, NULL, ei_gsm_a_dtap_missing_mandatory_element);
5360 ELEM_OPT_TLV(0x7f, GSM_A_PDU_TYPE_DTAP, DE_SS_VER_IND, NULL);
5362 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
5370 dtap_sms_cp_data(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
5372 guint32 curr_offset;
5376 curr_offset = offset;
5379 is_uplink = IS_UPLINK_TRUE;
5381 ELEM_MAND_LV(GSM_A_PDU_TYPE_DTAP, DE_CP_USER_DATA, NULL);
5383 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
5390 dtap_sms_cp_error(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
5392 guint32 curr_offset;
5396 curr_offset = offset;
5399 is_uplink = IS_UPLINK_TRUE;
5401 ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_CP_CAUSE, NULL);
5403 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
5407 dtap_tp_close_tch_loop_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
5409 guint32 curr_offset;
5414 curr_offset = offset;
5416 ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_TP_SUB_CHANNEL, NULL);
5418 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
5422 dtap_tp_open_loop_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
5424 guint32 curr_offset;
5429 curr_offset = offset;
5432 ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_TP_ACK, NULL);
5434 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
5438 dtap_tp_multi_slot_loop_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
5440 guint32 curr_offset;
5445 curr_offset = offset;
5447 ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_TP_LOOP_TYPE, NULL);
5449 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
5453 dtap_tp_multi_slot_loop_ack(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
5455 guint32 curr_offset;
5460 curr_offset = offset;
5462 ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_TP_LOOP_ACK, NULL);
5464 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
5468 dtap_tp_test_interface(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
5470 guint32 curr_offset;
5475 curr_offset = offset;
5477 ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_TP_TESTED_DEVICE, NULL);
5479 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
5483 dtap_tp_gprs_test_mode_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
5485 guint32 curr_offset;
5490 curr_offset = offset;
5492 ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_TP_PDU_DESCRIPTION, NULL);
5494 ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_TP_MODE_FLAG, NULL);
5496 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
5500 dtap_tp_egprs_start_radio_block_loopback_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
5502 guint32 curr_offset;
5507 curr_offset = offset;
5509 ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_TP_EGPRS_MODE_FLAG, NULL);
5511 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
5515 dtap_tp_reset_ms_positioning_stored_information(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
5517 guint32 curr_offset;
5522 curr_offset = offset;
5524 ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_TP_MS_POSITIONING_TECHNOLOGY, NULL);
5526 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
5530 dtap_tp_close_ue_test_loop(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
5532 guint32 curr_offset;
5537 curr_offset = offset;
5539 ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_TP_UE_TEST_LOOP_MODE, NULL);
5541 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
5545 dtap_tp_reset_ue_positioning_stored_information(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
5547 guint32 curr_offset;
5552 curr_offset = offset;
5554 ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_TP_UE_POSITIONING_TECHNOLOGY, NULL);
5556 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
5560 dtap_tp_ue_test_loop_mode_3_rlc_sdu_counter_response(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
5562 guint32 curr_offset;
5567 curr_offset = offset;
5569 ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_TP_RLC_SDU_COUNTER_VALUE, NULL);
5571 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
5575 dtap_tp_epc_close_ue_test_loop(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
5577 guint32 curr_offset;
5582 curr_offset = offset;
5584 ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_TP_EPC_UE_TEST_LOOP_MODE, NULL);
5586 switch (epc_test_loop_mode)
5589 ELEM_MAND_LV(GSM_A_PDU_TYPE_DTAP, DE_TP_EPC_UE_TL_A_LB_SETUP, NULL);
5592 ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_TP_EPC_UE_TL_B_LB_SETUP, NULL);
5595 ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_TP_EPC_UE_TL_C_SETUP, NULL);
5601 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
5605 dtap_tp_epc_activate_test_mode(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
5607 guint32 curr_offset;
5612 curr_offset = offset;
5614 ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_TP_EPC_UE_TEST_LOOP_MODE, NULL);
5616 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
5620 dtap_tp_epc_reset_ue_positioning_stored_information(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
5622 guint32 curr_offset;
5627 curr_offset = offset;
5629 ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_TP_EPC_UE_POSITIONING_TECHNOLOGY, NULL);
5631 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
5635 dtap_tp_epc_test_loop_mode_c_mbms_packet_counter_response(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
5637 guint32 curr_offset;
5642 curr_offset = offset;
5644 ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_TP_EPC_MBMS_PACKET_COUNTER_VALUE, NULL);
5646 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
5649 dtap_tp_epc_update_ue_location_information(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
5651 guint32 curr_offset;
5656 curr_offset = offset;
5658 ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_TP_EPC_ELLIPSOID_POINT_WITH_ALT, NULL);
5660 ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_TP_EPC_HORIZONTAL_VELOCITY, NULL);
5662 ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_TP_EPC_GNSS_TOD_MSEC, NULL);
5664 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_dtap_extraneous_data);
5667 #define NUM_GSM_DTAP_MSG_MM (sizeof(gsm_a_dtap_msg_mm_strings)/sizeof(value_string))
5668 static gint ett_gsm_dtap_msg_mm[NUM_GSM_DTAP_MSG_MM];
5669 static void (*dtap_msg_mm_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len) = {
5670 dtap_mm_imsi_det_ind, /* IMSI Detach Indication */
5671 dtap_mm_loc_upd_acc, /* Location Updating Accept */
5672 dtap_mm_loc_upd_rej, /* Location Updating Reject */
5673 dtap_mm_loc_upd_req, /* Location Updating Request */
5674 NULL /* no associated data */, /* Authentication Reject */
5675 dtap_mm_auth_req, /* Authentication Request */
5676 dtap_mm_auth_resp, /* Authentication Response */
5677 dtap_mm_auth_fail, /* Authentication Failure */
5678 dtap_mm_id_req, /* Identity Request */
5679 dtap_mm_id_resp, /* Identity Response */
5680 dtap_mm_tmsi_realloc_cmd, /* TMSI Reallocation Command */
5681 NULL /* no associated data */, /* TMSI Reallocation Complete */
5682 NULL /* no associated data */, /* CM Service Accept */
5683 dtap_mm_cm_srvc_rej, /* CM Service Reject */
5684 NULL /* no associated data */, /* CM Service Abort */
5685 dtap_mm_cm_srvc_req, /* CM Service Request */
5686 dtap_mm_cm_srvc_prompt, /* CM Service Prompt */
5687 NULL, /* Reserved: was allocated in earlier phases of the protocol */
5688 dtap_mm_cm_reestab_req, /* CM Re-establishment Request */
5689 dtap_mm_abort, /* Abort */
5690 NULL /* no associated data */, /* MM Null */
5691 dtap_mm_mm_status, /* MM Status */
5692 dtap_mm_mm_info, /* MM Information */
5696 #define NUM_GSM_DTAP_MSG_CC (sizeof(gsm_a_dtap_msg_cc_strings)/sizeof(value_string))
5697 static gint ett_gsm_dtap_msg_cc[NUM_GSM_DTAP_MSG_CC];
5698 static void (*dtap_msg_cc_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len) = {
5699 dtap_cc_alerting, /* Alerting */
5700 dtap_cc_call_conf, /* Call Confirmed */
5701 dtap_cc_call_proceed, /* Call Proceeding */
5702 dtap_cc_connect, /* Connect */
5703 NULL /* no associated data */, /* Connect Acknowledge */
5704 dtap_cc_emerg_setup, /* Emergency Setup */
5705 dtap_cc_progress, /* Progress */
5706 dtap_cc_cc_est, /* CC-Establishment */
5707 dtap_cc_cc_est_conf, /* CC-Establishment Confirmed */
5708 dtap_cc_recall, /* Recall */
5709 dtap_cc_start_cc, /* Start CC */
5710 dtap_cc_setup, /* Setup */
5711 dtap_cc_modify, /* Modify */
5712 dtap_cc_modify_complete, /* Modify Complete */
5713 dtap_cc_modify_rej, /* Modify Reject */
5714 dtap_cc_user_info, /* User Information */
5715 NULL /* no associated data */, /* Hold */
5716 NULL /* no associated data */, /* Hold Acknowledge */
5717 dtap_cc_hold_rej, /* Hold Reject */
5718 NULL /* no associated data */, /* Retrieve */
5719 NULL /* no associated data */, /* Retrieve Acknowledge */
5720 dtap_cc_retrieve_rej, /* Retrieve Reject */
5721 dtap_cc_disconnect, /* Disconnect */
5722 dtap_cc_release, /* Release */
5723 dtap_cc_release_complete, /* Release Complete */
5724 dtap_cc_congestion_control, /* Congestion Control */
5725 dtap_cc_notify, /* Notify */
5726 dtap_cc_status, /* Status */
5727 NULL /* no associated data */, /* Status Enquiry */
5728 dtap_cc_start_dtmf, /* Start DTMF */
5729 NULL /* no associated data */, /* Stop DTMF */
5730 NULL /* no associated data */, /* Stop DTMF Acknowledge */
5731 dtap_cc_start_dtmf_ack, /* Start DTMF Acknowledge */
5732 dtap_cc_start_dtmf_rej, /* Start DTMF Reject */
5733 dtap_cc_facility, /* Facility */
5737 #define NUM_GSM_DTAP_MSG_SMS (sizeof(gsm_a_dtap_msg_sms_strings)/sizeof(value_string))
5738 static gint ett_gsm_dtap_msg_sms[NUM_GSM_DTAP_MSG_SMS];
5739 static void (*dtap_msg_sms_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len) = {
5740 dtap_sms_cp_data, /* CP-DATA */
5741 NULL /* no associated data */, /* CP-ACK */
5742 dtap_sms_cp_error, /* CP-ERROR */
5746 #define NUM_GSM_DTAP_MSG_SS (sizeof(gsm_a_dtap_msg_ss_strings)/sizeof(value_string))
5747 static gint ett_gsm_dtap_msg_ss[NUM_GSM_DTAP_MSG_SS];
5748 static void (*dtap_msg_ss_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len) = {
5749 dtap_cc_release_complete, /* Release Complete */
5750 dtap_cc_facility, /* Facility */
5751 dtap_ss_register, /* Register */
5755 #define NUM_GSM_DTAP_MSG_TP (sizeof(gsm_a_dtap_msg_tp_strings)/sizeof(value_string))
5756 static gint ett_gsm_dtap_msg_tp[NUM_GSM_DTAP_MSG_TP];
5757 static void (*dtap_msg_tp_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len) = {
5758 dtap_tp_close_tch_loop_cmd, /* CLOSE TCH LOOP CMD */
5759 NULL, /* CLOSE TCH LOOP ACK */
5760 dtap_tp_open_loop_cmd, /* OPEN LOOP CMD */
5761 NULL, /* ACT EMMI CMD */
5762 NULL, /* ACT EMMI ACK */
5763 NULL, /* DEACT EMMI */
5764 dtap_tp_test_interface, /* Test Interface */
5765 dtap_tp_multi_slot_loop_cmd, /* CLOSE Multi-slot LOOP CMD */
5766 dtap_tp_multi_slot_loop_ack, /* CLOSE Multi-slot LOOP ACK */
5767 NULL, /* OPEN Multi-slot LOOP CMD */
5768 NULL, /* OPEN Multi-slot LOOP ACK */
5769 dtap_tp_gprs_test_mode_cmd, /* GPRS TEST MODE CMD */
5770 dtap_tp_egprs_start_radio_block_loopback_cmd, /* EGPRS START RADIO BLOCK LOOPBACK CMD */
5771 dtap_tp_reset_ms_positioning_stored_information, /* RESET MS POSITIONING STORED INFORMATION */
5772 dtap_tp_close_ue_test_loop, /* CLOSE UE TEST LOOP */
5773 NULL, /* CLOSE UE TEST LOOP COMPLETE */
5774 NULL, /* OPEN UE TEST LOOP */
5775 NULL, /* OPEN UE TEST LOOP COMPLETE */
5776 NULL, /* ACTIVATE RB TEST MODE */
5777 NULL, /* ACTIVATE RB TEST MODE COMPLETE */
5778 NULL, /* DEACTIVATE RB TEST MODE */
5779 NULL, /* DEACTIVATE RB TEST MODE COMPLETE */
5780 dtap_tp_reset_ue_positioning_stored_information, /* RESET UE POSITIONING STORED INFORMATION */
5781 NULL, /* UE TEST LOOP MODE 3 RLC SDU COUNTER REQUEST */
5782 dtap_tp_ue_test_loop_mode_3_rlc_sdu_counter_response, /* UE TEST LOOP MODE 3 RLC SDU COUNTER RESPONSE */
5783 dtap_tp_epc_close_ue_test_loop, /* CLOSE UE TEST LOOP */
5784 NULL, /* CLOSE UE TEST LOOP COMPLETE */
5785 NULL, /* OPEN UE TEST LOOP */
5786 NULL, /* OPEN UE TEST LOOP COMPLETE */
5787 dtap_tp_epc_activate_test_mode, /* ACTIVATE TEST MODE */
5788 NULL, /* ACTIVATE TEST MODE COMPLETE */
5789 NULL, /* DEACTIVATE TEST MODE */
5790 NULL, /* DEACTIVATE TEST MODE COMPLETE */
5791 dtap_tp_epc_reset_ue_positioning_stored_information, /* RESET UE POSITIONING STORED INFORMATION */
5792 NULL, /* UE TEST LOOP MODE C MBMS PACKET COUNTER REQUEST */
5793 dtap_tp_epc_test_loop_mode_c_mbms_packet_counter_response, /* UE TEST LOOP MODE C MBMS PACKET COUNTER RESPONSE */
5794 dtap_tp_epc_update_ue_location_information, /* UPDATE UE LOCATION INFORMATION */
5798 /* GENERIC DISSECTOR FUNCTIONS */
5801 dissect_dtap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
5803 static gsm_a_tap_rec_t tap_rec[4];
5804 static gsm_a_tap_rec_t *tap_p;
5805 static guint tap_current = 0;
5807 void (*dtap_msg_fcn)(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len);
5815 proto_item *dtap_item = NULL;
5816 proto_tree *dtap_tree = NULL;
5817 proto_item *oct_1_item = NULL;
5818 proto_tree *pd_tree = NULL;
5819 const gchar *msg_str;
5824 sccp_msg_info_t* sccp_msg = (sccp_msg_info_t*)data;
5827 len = tvb_reported_length(tvb);
5832 * too short to be DTAP
5834 call_dissector(data_handle, tvb, pinfo, tree);
5838 col_append_str(pinfo->cinfo, COL_INFO, "(DTAP) ");
5841 * set tap record pointer
5844 if (tap_current >= 4)
5848 tap_p = &tap_rec[tap_current];
5856 * get protocol discriminator
5858 oct_1 = tvb_get_guint8(tvb, offset++);
5860 if ((((oct_1 & DTAP_TI_MASK) >> 4) & DTAP_TIE_PRES_MASK) == DTAP_TIE_PRES_MASK)
5863 * eventhough we don't know if a TI should be in the message yet
5864 * we rely on the TI/SKIP indicator to be 0 to avoid taking this
5870 oct = tvb_get_guint8(tvb, offset);
5872 pd = oct_1 & DTAP_PD_MASK;
5877 dtap_msg_fcn = NULL;
5879 col_append_fstr(pinfo->cinfo, COL_INFO, "(%s) ",val_to_str_const(pd,gsm_a_pd_short_str_vals,"unknown"));
5884 /* Initialize hf_idx, ett_tree and dtap_msg_fcn.
5885 ett_tree and dtap_msg_fcn will not be used if msg_str == NULL. */
5889 msg_str = try_val_to_str_idx((guint32) (oct & DTAP_CC_IEI_MASK), gsm_a_dtap_msg_cc_strings, &idx);
5890 if (msg_str != NULL)
5892 ett_tree = ett_gsm_dtap_msg_cc[idx];
5893 dtap_msg_fcn = dtap_msg_cc_fcn[idx];
5895 hf_idx = hf_gsm_a_dtap_msg_cc_type;
5896 ti = (oct_1 & DTAP_TI_MASK) >> 4;
5901 msg_str = try_val_to_str_idx((guint32) (oct & DTAP_MM_IEI_MASK), gsm_a_dtap_msg_mm_strings, &idx);
5902 if (msg_str != NULL)
5904 ett_tree = ett_gsm_dtap_msg_mm[idx];
5905 dtap_msg_fcn = dtap_msg_mm_fcn[idx];
5907 hf_idx = hf_gsm_a_dtap_msg_mm_type;
5912 get_rr_msg_params(oct, &msg_str, &ett_tree, &hf_idx, &dtap_msg_fcn);
5916 get_gmm_msg_params(oct, &msg_str, &ett_tree, &hf_idx, &dtap_msg_fcn);
5920 msg_str = try_val_to_str_idx((guint32) (oct & DTAP_SMS_IEI_MASK), gsm_a_dtap_msg_sms_strings, &idx);
5921 hf_idx = hf_gsm_a_dtap_msg_sms_type;
5922 if (msg_str != NULL)
5924 ett_tree = ett_gsm_dtap_msg_sms[idx];
5925 dtap_msg_fcn = dtap_msg_sms_fcn[idx];
5927 ti = (oct_1 & DTAP_TI_MASK) >> 4;
5931 get_sm_msg_params(oct, &msg_str, &ett_tree, &hf_idx, &dtap_msg_fcn);
5932 ti = (oct_1 & DTAP_TI_MASK) >> 4;
5936 msg_str = try_val_to_str_idx((guint32) (oct & DTAP_SS_IEI_MASK), gsm_a_dtap_msg_ss_strings, &idx);
5937 hf_idx = hf_gsm_a_dtap_msg_ss_type;
5938 if (msg_str != NULL)
5940 ett_tree = ett_gsm_dtap_msg_ss[idx];
5941 dtap_msg_fcn = dtap_msg_ss_fcn[idx];
5943 ti = (oct_1 & DTAP_TI_MASK) >> 4;
5948 msg_str = try_val_to_str_idx((guint32) (oct & DTAP_TP_IEI_MASK), gsm_a_dtap_msg_tp_strings, &idx);
5949 hf_idx = hf_gsm_a_dtap_msg_tp_type;
5950 if (msg_str != NULL)
5952 ett_tree = ett_gsm_dtap_msg_tp[idx];
5953 dtap_msg_fcn = dtap_msg_tp_fcn[idx];
5959 /* 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 */
5963 if (sccp_msg && sccp_msg->data.co.assoc) {
5964 sccp_assoc = sccp_msg->data.co.assoc;
5973 * create the protocol tree
5975 if (msg_str == NULL)
5978 proto_tree_add_protocol_format(tree, proto_a_dtap, tvb, 0, len,
5979 "GSM A-I/F DTAP - Unknown DTAP Message Type (0x%02x)",
5982 dtap_tree = proto_item_add_subtree(dtap_item, ett_dtap_msg);
5984 if (sccp_msg && !sccp_msg->data.co.label) {
5985 sccp_msg->data.co.label = wmem_strdup_printf(wmem_file_scope(), "DTAP (0x%02x)",oct);
5993 proto_tree_add_protocol_format(tree, proto_a_dtap, tvb, 0, -1,
5994 "GSM A-I/F DTAP - %s",
5997 dtap_tree = proto_item_add_subtree(dtap_item, ett_tree);
5999 if (sccp_msg && !sccp_msg->data.co.label) {
6000 sccp_msg->data.co.label = wmem_strdup(wmem_file_scope(), msg_str);
6003 col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", msg_str);
6004 col_set_fence(pinfo->cinfo, COL_INFO);
6007 oct_1_item = proto_tree_add_uint(dtap_tree, hf_gsm_a_dtap_protocol_discriminator, tvb, 0, 1, pd);
6008 pd_tree = proto_item_add_subtree(oct_1_item, ett_dtap_oct_1);
6010 proto_tree_add_item(pd_tree, hf_gsm_a_L3_protocol_discriminator, tvb, 0, 1, ENC_BIG_ENDIAN);
6014 proto_tree_add_item(pd_tree, hf_gsm_a_skip_ind, tvb, 0, 1, ENC_BIG_ENDIAN);
6019 proto_tree_add_item(pd_tree, hf_gsm_a_dtap_ti_flag, tvb, 0, 1, ENC_NA);
6021 if ((ti & DTAP_TIE_PRES_MASK) == DTAP_TIE_PRES_MASK)
6023 /* ti is extended to next octet */
6024 proto_tree_add_uint_format_value(pd_tree, hf_gsm_a_dtap_tio, tvb, 0, 1,
6025 oct_1, "The TI value is given by the TIE in octet 2");
6029 proto_tree_add_item(pd_tree, hf_gsm_a_dtap_tio, tvb, 0, 1, ENC_BIG_ENDIAN);
6034 (ti & DTAP_TIE_PRES_MASK) == DTAP_TIE_PRES_MASK)
6036 proto_tree_add_item(tree, hf_gsm_a_extension, tvb, 1, 1, ENC_BIG_ENDIAN);
6037 proto_tree_add_item(pd_tree, hf_gsm_a_dtap_tie, tvb, 1, 1, ENC_BIG_ENDIAN);
6043 if ((pinfo->p2p_dir == P2P_DIR_RECV) &&
6048 /* 3GPP TS 24.008 version 8.5.0 Release 8
6049 * Bits 5 to 8 of the first octet of every message belonging to the protocols "Call Control;
6050 * call related SS messages" and "Session Management"contain the transaction identifier (TI).
6051 * The transaction identifier and its use are defined in 3GPP TS 24.007 [20].
6052 * 5 = Mobility Management messages
6053 * 3 = Call Control; call related SS messages
6054 * 10 = GPRS session management messages
6056 if ((pd == 5) || (pd == 3) || (pd == 10)) {
6057 proto_tree_add_item(dtap_tree, hf_gsm_a_seq_no, tvb, offset, 1, ENC_BIG_ENDIAN);
6060 * add DTAP message name
6062 proto_tree_add_item(dtap_tree, hf_idx, tvb, offset, 1, ENC_BIG_ENDIAN);
6065 tap_p->pdu_type = GSM_A_PDU_TYPE_DTAP;
6066 tap_p->message_type = (nsd ? (oct & 0x3f) : oct);
6067 tap_p->protocol_disc = (gsm_a_pd_str_e)pd;
6069 tap_queue_packet(gsm_a_tap, pinfo, tap_p);
6071 if (msg_str == NULL) return len;
6073 if (offset >= len) return len;
6078 if (dtap_msg_fcn == NULL)
6080 proto_tree_add_text(dtap_tree,
6081 tvb, offset, len - offset,
6082 "Message Elements");
6086 (*dtap_msg_fcn)(tvb, dtap_tree, pinfo, offset, len - offset);
6093 /* Register the protocol with Wireshark */
6095 proto_register_gsm_a_dtap(void)
6100 /* Setup list of header fields */
6102 static hf_register_info hf[] = {
6104 { "Sequence number", "gsm_a.dtap.seq_no",
6105 FT_UINT8, BASE_DEC, NULL, 0xc0,
6108 { &hf_gsm_a_dtap_msg_mm_type,
6109 { "DTAP Mobility Management Message Type", "gsm_a.dtap.msg_mm_type",
6110 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_msg_mm_strings), 0x3f,
6113 { &hf_gsm_a_dtap_msg_cc_type,
6114 { "DTAP Call Control Message Type", "gsm_a.dtap.msg_cc_type",
6115 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_msg_cc_strings), 0x3f,
6118 { &hf_gsm_a_dtap_msg_sms_type,
6119 { "DTAP Short Message Service Message Type", "gsm_a.dtap.msg_sms_type",
6120 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_msg_sms_strings), 0x0,
6123 { &hf_gsm_a_dtap_msg_ss_type,
6124 { "DTAP Non call Supplementary Service Message Type", "gsm_a.dtap.msg_ss_type",
6125 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_msg_ss_strings), 0x3f,
6128 { &hf_gsm_a_dtap_msg_tp_type,
6129 { "DTAP Tests Procedures Message Type", "gsm_a.dtap.msg_tp_type",
6130 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_msg_tp_strings), 0x0,
6133 { &hf_gsm_a_dtap_elem_id,
6134 { "Element ID", "gsm_a.dtap.elem_id",
6135 FT_UINT8, BASE_HEX, NULL, 0,
6138 { &hf_gsm_a_dtap_cld_party_bcd_num,
6139 { "Called Party BCD Number", "gsm_a.dtap.cld_party_bcd_num",
6140 FT_STRING, BASE_NONE, 0, 0,
6143 { &hf_gsm_a_dtap_clg_party_bcd_num,
6144 { "Calling Party BCD Number", "gsm_a.dtap.clg_party_bcd_num",
6145 FT_STRING, BASE_NONE, 0, 0,
6148 { &hf_gsm_a_dtap_conn_num,
6149 { "Connected Number", "gsm_a.dtap.conn_num",
6150 FT_STRING, BASE_NONE, 0, 0,
6153 { &hf_gsm_a_dtap_red_party_bcd_num,
6154 { "Redirecting Party BCD Number", "gsm_a.dtap.red_party_bcd_num",
6155 FT_STRING, BASE_NONE, 0, 0,
6158 { &hf_gsm_a_dtap_cause,
6159 { "DTAP Cause", "gsm_a.dtap.cause",
6160 FT_UINT8, BASE_HEX, 0, 0x7f,
6163 { &hf_gsm_a_dtap_type_of_number,
6164 { "Type of number", "gsm_a.dtap.type_of_number",
6165 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_type_of_number_values), 0x70,
6168 { &hf_gsm_a_dtap_numbering_plan_id,
6169 { "Numbering plan identification", "gsm_a.dtap.numbering_plan_id",
6170 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_numbering_plan_id_values), 0x0f,
6173 { &hf_gsm_a_dtap_present_ind,
6174 { "Presentation indicator", "gsm_a.dtap.present_ind",
6175 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_present_ind_values), 0x60,
6178 { &hf_gsm_a_dtap_screening_ind,
6179 { "Screening indicator", "gsm_a.dtap.screening_ind",
6180 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_screening_ind_values), 0x03,
6183 { &hf_gsm_a_dtap_type_of_sub_addr,
6184 { "Type of subaddress", "gsm_a.dtap.type_of_sub_addr",
6185 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_type_of_sub_addr_values), 0x70,
6188 { &hf_gsm_a_dtap_odd_even_ind,
6189 { "Odd/even indicator", "gsm_a.dtap.odd_even_ind",
6190 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_odd_even_ind_values), 0x08,
6193 { &hf_gsm_a_dtap_lsa_id,
6194 { "LSA Identifier", "gsm_a.dtap.lsa_id",
6195 FT_UINT24, BASE_HEX, NULL, 0x0,
6198 { &hf_gsm_a_dtap_speech_vers_ind,
6199 { "Speech version indication", "gsm_a.dtap.speech_vers_ind",
6200 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_speech_vers_ind_values), 0x0f,
6203 { &hf_gsm_a_dtap_itc,
6204 { "Information transfer capability", "gsm_a.dtap.itc",
6205 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_itc_values), 0x07,
6208 { &hf_gsm_a_dtap_sysid,
6209 { "System Identification (SysID)", "gsm_a.dtap.sysid",
6210 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_sysid_values), 0x0,
6213 { &hf_gsm_a_dtap_bitmap_length,
6214 { "Bitmap Length", "gsm_a.dtap.bitmap_length",
6215 FT_UINT8, BASE_DEC, NULL, 0x0,
6218 { &hf_gsm_a_dtap_serv_cat_b7,
6219 { "Automatically initiated eCall", "gsm_a.dtap.serv_cat_b7",
6220 FT_BOOLEAN, 8, NULL, 0x40,
6223 { &hf_gsm_a_dtap_serv_cat_b6,
6224 { "Manually initiated eCall", "gsm_a.dtap.serv_cat_b6",
6225 FT_BOOLEAN, 8, NULL, 0x20,
6228 { &hf_gsm_a_dtap_serv_cat_b5,
6229 { "Mountain Rescue", "gsm_a.dtap.serv_cat_b5",
6230 FT_BOOLEAN, 8, NULL, 0x10,
6233 { &hf_gsm_a_dtap_serv_cat_b4,
6234 { "Marine Guard", "gsm_a.dtap.serv_cat_b4",
6235 FT_BOOLEAN, 8, NULL, 0x08,
6238 { &hf_gsm_a_dtap_serv_cat_b3,
6239 { "Fire Brigade", "gsm_a.dtap.serv_cat_b3",
6240 FT_BOOLEAN, 8, NULL, 0x04,
6243 { &hf_gsm_a_dtap_serv_cat_b2,
6244 { "Ambulance", "gsm_a.dtap.serv_cat_b2",
6245 FT_BOOLEAN, 8, NULL, 0x02,
6248 { &hf_gsm_a_dtap_serv_cat_b1,
6249 { "Police", "gsm_a.dtap.serv_cat_b1",
6250 FT_BOOLEAN, 8, NULL, 0x01,
6253 { &hf_gsm_a_dtap_csmo,
6254 { "CSMO", "gsm_a.dtap.csmo",
6255 FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_dtap_csmo_value), 0x0,
6258 { &hf_gsm_a_dtap_csmt,
6259 { "CSMT", "gsm_a.dtap.csmt",
6260 FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_dtap_csmt_value), 0x0,
6263 { &hf_gsm_a_dtap_mm_timer_unit,
6264 { "Unit", "gsm_a.dtap.mm_timer_unit",
6265 FT_UINT8, BASE_DEC, VALS(gsm_a_dtap_mm_timer_unit_vals), 0xe0,
6268 { &hf_gsm_a_dtap_mm_timer_value,
6269 { "Timer value", "gsm_a.dtap.mm_timer_value",
6270 FT_UINT8, BASE_DEC, NULL, 0x1f,
6273 { &hf_gsm_a_dtap_alerting_pattern,
6274 { "Alerting Pattern", "gsm_a.dtap.alerting_pattern",
6275 FT_UINT8, BASE_DEC, VALS(gsm_a_alerting_pattern_vals), 0x0f,
6278 { &hf_gsm_a_dtap_ccbs_activation,
6279 { "CCBS Activation", "gsm_a.dtap.ccbs_activation",
6280 FT_BOOLEAN, 8, TFS(&gsm_a_ccbs_activation_value), 0x80,
6283 { &hf_gsm_a_dtap_stream_identifier,
6284 { "Stream Identifier", "gsm_a.dtap.stream_identifier",
6285 FT_UINT8, BASE_HEX, 0, 0x0,
6288 { &hf_gsm_a_dtap_mcs,
6289 { "MCS", "gsm_a.dtap.mcs",
6290 FT_BOOLEAN, 8, TFS(&gsm_a_mcs_value), 0x01,
6293 { &hf_gsm_a_dtap_cause_of_no_cli,
6294 { "Cause of no CLI", "gsm_a.dtap.cause_of_no_cli",
6295 FT_UINT8, BASE_HEX, 0, 0x0,
6298 { &hf_gsm_a_dtap_cause_ss_diagnostics,
6299 { "Supplementary Services Diagnostics", "gsm_a.dtap.cause_ss_diagnostics",
6300 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_cause_ss_diagnostics_vals), 0x7f,
6303 { &hf_gsm_a_dtap_codec_tdma_efr,
6304 { "TDMA EFR", "gsm_a.dtap.codec.tdma_efr",
6305 FT_BOOLEAN, 8, NULL, 0x80,
6308 { &hf_gsm_a_dtap_codec_umts_amr_2,
6309 { "UMTS AMR 2", "gsm_a.dtap.codec.umts_amr_2",
6310 FT_BOOLEAN, 8, NULL, 0x40,
6313 { &hf_gsm_a_dtap_codec_umts_amr,
6314 { "UMTS AMR", "gsm_a.dtap.codec.umts_amr",
6315 FT_BOOLEAN, 8, NULL, 0x20,
6318 { &hf_gsm_a_dtap_codec_hr_amr,
6319 { "HR AMR", "gsm_a.dtap.codec.hr_amr",
6320 FT_BOOLEAN, 8, NULL, 0x10,
6323 { &hf_gsm_a_dtap_codec_fr_amr,
6324 { "FR AMR", "gsm_a.dtap.codec.fr_amr",
6325 FT_BOOLEAN, 8, NULL, 0x08,
6328 { &hf_gsm_a_dtap_codec_gsm_efr,
6329 { "GSM EFR", "gsm_a.dtap.codec.gsm_efr",
6330 FT_BOOLEAN, 8, NULL, 0x04,
6333 { &hf_gsm_a_dtap_codec_gsm_hr,
6334 { "GSM HR", "gsm_a.dtap.codec.gsm_hr",
6335 FT_BOOLEAN, 8, NULL, 0x02,
6338 { &hf_gsm_a_dtap_codec_gsm_fr,
6339 { "GSM FR", "gsm_a.dtap.codec.gsm_fr",
6340 FT_BOOLEAN, 8, NULL, 0x01,
6343 { &hf_gsm_a_dtap_codec_ohr_amr_wb,
6344 { "OHR AMR-WB", "gsm_a.dtap.codec.ohr_amr_wb",
6345 FT_BOOLEAN, 8, NULL, 0x20,
6348 { &hf_gsm_a_dtap_codec_ofr_amr_wb,
6349 { "OFR AMR-WB", "gsm_a.dtap.codec.ofr_amr_wb",
6350 FT_BOOLEAN, 8, NULL, 0x10,
6353 { &hf_gsm_a_dtap_codec_ohr_amr,
6354 { "OHR AMR", "gsm_a.dtap.codec.ohr_amr",
6355 FT_BOOLEAN, 8, NULL, 0x08,
6358 { &hf_gsm_a_dtap_codec_umts_amr_wb,
6359 { "UMTS AMR-WB", "gsm_a.dtap.codec.umts_amr_wb",
6360 FT_BOOLEAN, 8, NULL, 0x04,
6363 { &hf_gsm_a_dtap_codec_fr_amr_wb,
6364 { "FR AMR-WB", "gsm_a.dtap.codec.fr_amr_wb",
6365 FT_BOOLEAN, 8, NULL, 0x02,
6368 { &hf_gsm_a_dtap_codec_pdc_efr,
6369 { "PDC EFR", "gsm_a.dtap.codec.pdc_efr",
6370 FT_BOOLEAN, 8, NULL, 0x01,
6373 { &hf_gsm_a_dtap_notification_description,
6374 { "Notification description", "gsm_a.dtap.notif_descr",
6375 FT_UINT8, BASE_DEC, VALS(gsm_a_dtap_notification_description_vals), 0x7f,
6378 { &hf_gsm_a_dtap_emerg_num_info_length,
6379 { "Emergency Number Info length", "gsm_a.dtap.emerg_num_info_length",
6380 FT_UINT8, BASE_DEC, 0, 0x0,
6383 { &hf_gsm_a_dtap_emergency_bcd_num,
6384 { "Emergency BCD Number", "gsm_a.dtap.emergency_bcd_num",
6385 FT_STRING, BASE_NONE, 0, 0,
6388 { &hf_gsm_a_dtap_signal_value,
6389 { "Signal value", "gsm_a.dtap.signal_value",
6390 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_signal_value_vals), 0x0,
6393 { &hf_gsm_a_dtap_recall_type,
6394 { "Recall type", "gsm_a.dtap.recall_type",
6395 FT_UINT8, BASE_HEX|BASE_RANGE_STRING, RVALS(gsm_a_dtap_recall_type_vals), 0x07,
6398 { &hf_gsm_a_dtap_coding_standard,
6399 { "Coding standard", "gsm_a.dtap.coding_standard",
6400 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_coding_standard_vals), 0xc0,
6403 { &hf_gsm_a_dtap_call_state,
6404 { "Call state", "gsm_a.dtap.call_state",
6405 FT_UINT8, BASE_DEC, NULL, 0x3f,
6408 { &hf_gsm_a_dtap_prog_coding_standard,
6409 { "Coding standard", "gsm_a.dtap.coding_standard",
6410 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_coding_standard_vals), 0x60,
6413 { &hf_gsm_a_dtap_location,
6414 { "Location", "gsm_a.dtap.location",
6415 FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_location_vals), 0x0f,
6418 { &hf_gsm_a_dtap_progress_description,
6419 { "Progress description", "gsm_a.dtap.progress_description",
6420 FT_UINT8, BASE_DEC, NULL, 0x7f,
6423 { &hf_gsm_a_dtap_afi,
6424 { "Authority and Format Identifier", "gsm_a.dtap.afi",
6425 FT_UINT8, BASE_HEX|BASE_EXT_STRING, &x213_afi_value_ext, 0x0,
6428 { &hf_gsm_a_dtap_rej_cause,
6429 { "Reject cause", "gsm_a.dtap.rej_cause",
6430 FT_UINT8, BASE_DEC, NULL, 0x0,
6433 { &hf_gsm_a_dtap_u2u_prot_discr,
6434 { "User-user protocol discriminator", "gsm_a.dtap.u2u_prot_discr",
6435 FT_UINT8, BASE_HEX|BASE_RANGE_STRING, RVALS(gsm_a_dtap_u2u_prot_discr_vals), 0x00,
6438 { &hf_gsm_a_dtap_mcat,
6439 { "MCAT", "gsm_a.dtap.mcat",
6440 FT_BOOLEAN, 8, TFS(&gsm_a_dtap_mcat_value), 0x08,
6443 { &hf_gsm_a_dtap_enicm,
6444 { "ENICM", "gsm_a.dtap.mcat",
6445 FT_BOOLEAN, 8, TFS(&gsm_a_dtap_enicm_value), 0x04,
6448 { &hf_gsm_a_dtap_rand,
6449 { "RAND value", "gsm_a.dtap.rand",
6450 FT_BYTES, FT_NONE, NULL, 0x00,
6453 { &hf_gsm_a_dtap_autn,
6454 { "AUTN value", "gsm_a.dtap.autn",
6455 FT_BYTES, FT_NONE, NULL, 0x00,
6458 { &hf_gsm_a_dtap_sres,
6459 { "SRES value", "gsm_a.dtap.sres",
6460 FT_BYTES, FT_NONE, NULL, 0x00,
6463 { &hf_gsm_a_dtap_xres,
6464 { "XRES value", "gsm_a.dtap.xres",
6465 FT_BYTES, FT_NONE, NULL, 0x00,
6468 { &hf_gsm_a_dtap_auts,
6469 { "AUTS value", "gsm_a.dtap.auts",
6470 FT_BYTES, FT_NONE, NULL, 0x00,
6473 { &hf_gsm_a_dtap_autn_sqn_xor_ak,
6474 { "SQN xor AK", "gsm_a.dtap.autn.sqn_xor_ak",
6475 FT_BYTES, FT_NONE, NULL, 0x00,
6478 { &hf_gsm_a_dtap_autn_amf,
6479 { "AMF", "gsm_a.dtap.autn.amf",
6480 FT_BYTES, FT_NONE, NULL, 0x00,
6483 { &hf_gsm_a_dtap_autn_mac,
6484 { "MAC", "gsm_a.dtap.autn.mac",
6485 FT_BYTES, FT_NONE, NULL, 0x00,
6488 { &hf_gsm_a_dtap_auts_sqn_ms_xor_ak,
6489 { "SQN_MS xor AK", "gsm_a.dtap.auts.sqn_ms_xor_ak",
6490 FT_BYTES, FT_NONE, NULL, 0x00,
6493 { &hf_gsm_a_dtap_auts_mac_s,
6494 { "MAC-S", "gsm_a.dtap.auts.mac_s",
6495 FT_BYTES, FT_NONE, NULL, 0x00,
6498 { &hf_gsm_a_dtap_epc_ue_tl_mode,
6499 { "UE test loop mode","gsm_a.dtap.epc.ue_tl_mode",
6500 FT_UINT8,BASE_DEC, VALS(epc_ue_test_loop_mode_vals), 0x0,
6503 { &hf_gsm_a_dtap_epc_ue_tl_a_ul_sdu_size,
6504 { "Uplink PDCP SDU size in bits","gsm_a.dtap.epc.ue_tl_a_ul_sdu_size",
6505 FT_UINT16,BASE_DEC, NULL, 0x0,
6508 { &hf_gsm_a_dtap_epc_ue_tl_a_drb,
6509 { "Data Radio Bearer identity number","gsm_a.dtap.epc.ue_tl_a_drb",
6510 FT_UINT8,BASE_DEC, NULL, 0x1f,
6513 { &hf_gsm_a_dtap_epc_ue_tl_b_ip_pdu_delay,
6514 { "IP PDU delay in seconds","gsm_a.dtap.epc.ue_tl_b_ip_pdu_delay",
6515 FT_UINT8,BASE_DEC, NULL, 0x0,
6518 { &hf_gsm_a_dtap_epc_ue_tl_c_mbsfn_area_id,
6519 { "MBSFN area identity","gsm_a.dtap.epc.ue_tl_c_mbsfn_area_id",
6520 FT_UINT8, BASE_DEC, NULL, 0x0,
6523 { &hf_gsm_a_dtap_epc_ue_tl_c_mch_id,
6524 { "MCH identity","gsm_a.dtap.epc.ue_tl_c_mch_id",
6525 FT_UINT8, BASE_DEC, NULL, 0x0,
6528 { &hf_gsm_a_dtap_epc_ue_tl_c_lcid,
6529 { "Logical channel identity","gsm_a.dtap.epc.ue_tl_c_lcid",
6530 FT_UINT8, BASE_DEC, NULL, 0x0,
6533 { &hf_gsm_a_dtap_epc_ue_positioning_technology,
6534 { "UE positioning technology","gsm_a.dtap.epc.ue_positioning_technology",
6535 FT_UINT8, BASE_DEC, VALS(epc_ue_positioning_technology_vals), 0x0,
6538 { &hf_gsm_a_dtap_epc_mbms_packet_counter_value,
6539 { "MBMS packet counter value","gsm_a.dtap.epc.mbms_packet_counter_value",
6540 FT_UINT32, BASE_DEC, NULL, 0x0,
6543 { &hf_gsm_a_dtap_epc_latitude_sign,
6544 { "Latitude Sign","gsm_a.dtap.epc.latitude_sign",
6545 FT_BOOLEAN, BASE_NONE, TFS(&epc_latitude_sign_value), 0x0,
6548 { &hf_gsm_a_dtap_epc_degrees_latitude,
6549 { "Degrees Latitude","gsm_a.dtap.epc.degrees_latitude",
6550 FT_UINT24, BASE_DEC, NULL, 0x0,
6553 { &hf_gsm_a_dtap_epc_degrees_longitude,
6554 { "Degrees Longitude","gsm_a.dtap.epc.degrees_longitude",
6555 FT_INT24, BASE_DEC, NULL, 0x0,
6558 { &hf_gsm_a_dtap_epc_altitude_dir,
6559 { "Altitude Direction","gsm_a.dtap.epc.altitude_direction",
6560 FT_BOOLEAN, BASE_NONE, TFS(&epc_altitude_dir_value), 0x0,
6563 { &hf_gsm_a_dtap_epc_altitude,
6564 { "Altitude","gsm_a.dtap.epc.altitude",
6565 FT_UINT16, BASE_DEC, NULL, 0x0,
6568 { &hf_gsm_a_dtap_epc_bearing,
6569 { "Bearing","gsm_a.dtap.epc.bearing",
6570 FT_UINT16, BASE_DEC, NULL, 0x0,
6573 { &hf_gsm_a_dtap_epc_horizontal_speed,
6574 { "Horizontal Speed","gsm_a.dtap.epc.horizontal_speed",
6575 FT_UINT16, BASE_DEC, NULL, 0x0,
6578 { &hf_gsm_a_dtap_epc_gnss_tod_msec,
6579 { "GNSS-TOD-msec","gsm_a.dtap.epc.gnss_tod_msec",
6580 FT_UINT24, BASE_DEC, NULL, 0x0,
6583 /* Generated from convert_proto_tree_add_text.pl */
6584 { &hf_gsm_a_dtap_coding_scheme,
6585 { "Coding Scheme", "gsm_a.dtap.coding_scheme",
6586 FT_UINT8, BASE_DEC, NULL, 0x70,
6589 { &hf_gsm_a_dtap_add_ci,
6590 { "Add CI", "gsm_a.dtap.add_ci",
6591 FT_BOOLEAN, 8, TFS(&tfs_add_ci), 0x08,
6594 { &hf_gsm_a_dtap_number_of_spare_bits,
6595 { "Number of spare bits in last octet", "gsm_a.dtap.number_of_spare_bits",
6596 FT_UINT8, BASE_DEC, VALS(gsm_a_dtap_number_of_spare_bits_vals), 0x07,
6599 { &hf_gsm_a_dtap_text_string,
6600 { "Text String", "gsm_a.dtap.text_string",
6601 FT_STRING, BASE_NONE, NULL, 0x0,
6604 { &hf_gsm_a_dtap_time_zone_time,
6605 { "Time", "gsm_a.dtap.time_zone_time",
6606 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL, 0x0,
6609 { &hf_gsm_a_dtap_dst_adjustment,
6610 { "DST Adjustment", "gsm_a.dtap.dst_adjustment",
6611 FT_UINT8, BASE_DEC, VALS(gsm_a_dtap_dst_adjustment_vals), 0x03,
6614 { &hf_gsm_a_dtap_emergency_number_information,
6615 { "Emergency Number Information", "gsm_a.dtap.emergency_number_information",
6616 FT_UINT32, BASE_DEC, NULL, 0x0,
6619 { &hf_gsm_a_dtap_mm_timer,
6620 { "MM Timer", "gsm_a.dtap.mm_timer",
6621 FT_UINT8, BASE_DEC, NULL, 0,
6624 { &hf_gsm_a_dtap_hold_auxiliary_state,
6625 { "Hold auxiliary state", "gsm_a.dtap.hold_auxiliary_state",
6626 FT_UINT8, BASE_DEC, VALS(gsm_a_dtap_hold_auxilary_state_vals), 0x0C,
6629 { &hf_gsm_a_dtap_multi_party_auxiliary_state,
6630 { "Multi party auxiliary state", "gsm_a.dtap.multi_party_auxiliary_state",
6631 FT_UINT8, BASE_DEC, VALS(gsm_a_dtap_multi_party_auxilary_state_vals), 0x03,
6634 { &hf_gsm_a_dtap_radio_channel_requirement,
6635 { "Radio channel requirement", "gsm_a.dtap.radio_channel_requirement",
6636 FT_UINT8, BASE_DEC, NULL, 0x60,
6639 { &hf_gsm_a_dtap_bearer_cap_coding_standard,
6640 { "Coding standard", "gsm_a.dtap.coding_standard",
6641 FT_BOOLEAN, 8, TFS(&tfs_bearer_cap_coding_standard), 0x10,
6644 { &hf_gsm_a_dtap_transfer_mode,
6645 { "Transfer mode", "gsm_a.dtap.transfer_mode",
6646 FT_BOOLEAN, 8, TFS(&tfs_bearer_cap_transfer_mode), 0x08,
6649 { &hf_gsm_a_dtap_coding,
6650 { "Coding", "gsm_a.dtap.coding",
6651 FT_BOOLEAN, 8, TFS(&tfs_bearer_cap_coding), 0x40,
6654 { &hf_gsm_a_dtap_compression,
6655 { "Compression", "gsm_a.dtap.compression",
6656 FT_BOOLEAN, 8, TFS(&tfs_possible_not_possible), 0x40,
6659 { &hf_gsm_a_dtap_compression_up,
6660 { "Compression", "gsm_a.dtap.compression",
6661 FT_BOOLEAN, 8, TFS(&tfs_allowed_not_allowed), 0x40,
6664 { &hf_gsm_a_dtap_structure,
6665 { "Structure", "gsm_a.dtap.structure",
6666 FT_UINT8, BASE_DEC, VALS(gsm_a_dtap_structure_vals), 0x30,
6669 { &hf_gsm_a_dtap_duplex_mode,
6670 { "Duplex mode", "gsm_a.dtap.duplex_mode",
6671 FT_BOOLEAN, 8, TFS(&tfs_full_half), 0x08,
6674 { &hf_gsm_a_dtap_configuration,
6675 { "Configuration", "gsm_a.dtap.configuration",
6676 FT_BOOLEAN, 8, TFS(&tfs_bearer_cap_configuration), 0x04,
6679 { &hf_gsm_a_dtap_nirr,
6680 { "NIRR", "gsm_a.dtap.nirr",
6681 FT_BOOLEAN, 8, TFS(&tfs_nirr), 0x02,
6684 { &hf_gsm_a_dtap_establishment,
6685 { "Establishment", "gsm_a.dtap.establishment",
6686 FT_BOOLEAN, 8, TFS(&tfs_bearer_cap_establishment), 0x01,
6689 { &hf_gsm_a_dtap_access_identity,
6690 { "Access Identity", "gsm_a.dtap.access_identity",
6691 FT_UINT8, BASE_DEC, VALS(gsm_a_dtap_access_identity_vals), 0x60,
6694 { &hf_gsm_a_dtap_rate_adaption,
6695 { "Rate Adaption", "gsm_a.dtap.rate_adaption",
6696 FT_UINT8, BASE_DEC, VALS(gsm_a_dtap_rate_adaption_vals), 0x18,
6699 { &hf_gsm_a_dtap_signalling_access_protocol,
6700 { "Signalling Access Protocol", "gsm_a.dtap.signalling_access_protocol",
6701 FT_UINT8, BASE_DEC, VALS(gsm_a_dtap_signal_access_protocol_vals), 0x07,
6704 { &hf_gsm_a_dtap_other_itc,
6705 { "Other ITC", "gsm_a.dtap.other_itc",
6706 FT_UINT8, BASE_DEC, VALS(gsm_a_dtap_other_itc_vals), 0x60,
6709 { &hf_gsm_a_dtap_other_rate_adaption,
6710 { "Other Rate Adaption", "gsm_a.dtap.other_rate_adaption",
6711 FT_UINT8, BASE_DEC, VALS(gsm_a_dtap_other_rate_adaption_vals), 0x18,
6714 { &hf_gsm_a_dtap_rate_adaption_header,
6715 { "Rate Adaption Header", "gsm_a.dtap.rate_adaption_header",
6716 FT_BOOLEAN, 8, TFS(&tfs_included_not_included), 0x40,
6719 { &hf_gsm_a_dtap_multiple_frame_establishment_support,
6720 { "Multiple frame establishment support in data link", "gsm_a.dtap.multiple_frame_establishment_support",
6721 FT_BOOLEAN, 8, TFS(&tfs_frame_est_supported_not_supported), 0x20,
6724 { &hf_gsm_a_dtap_mode_of_operation,
6725 { "Mode of operation", "gsm_a.dtap.mode_of_operation",
6726 FT_BOOLEAN, 8, TFS(&tfs_protocol_sensative_bit_transparent), 0x10,
6729 { &hf_gsm_a_dtap_logical_link_identifier_negotiation,
6730 { "Logical link identifier negotiation", "gsm_a.dtap.logical_link_identifier_negotiation",
6731 FT_BOOLEAN, 8, TFS(&tfs_log_link_neg), 0x08,
6734 { &hf_gsm_a_dtap_assignor_assignee,
6735 { "Assignor/Assignee", "gsm_a.dtap.assignor_assignee",
6736 FT_BOOLEAN, 8, TFS(&tfs_assignor_assignee), 0x04,
6739 { &hf_gsm_a_dtap_in_out_band,
6740 { "In band/Out of band negotiation", "gsm_a.dtap.in_out_band",
6741 FT_BOOLEAN, 8, TFS(&tfs_in_out_band), 0x02,
6744 { &hf_gsm_a_dtap_layer_1_identity,
6745 { "Layer 1 Identity", "gsm_a.dtap.layer_1_identity",
6746 FT_UINT8, BASE_DEC, NULL, 0x60,
6749 { &hf_gsm_a_dtap_user_information_layer_1_protocol,
6750 { "User information layer 1 protocol", "gsm_a.dtap.user_information_layer_1_protocol",
6751 FT_UINT8, BASE_DEC, NULL, 0x1e,
6754 { &hf_gsm_a_dtap_synchronous,
6755 { "Synchronous/asynchronous", "gsm_a.dtap.synchronous",
6756 FT_BOOLEAN, 8, TFS(&tfs_asynchronous_synchronous), 0x01,
6759 { &hf_gsm_a_dtap_number_of_stop_bits,
6760 { "Number of Stop Bits", "gsm_a.dtap.number_of_stop_bits",
6761 FT_BOOLEAN, 8, TFS(&tfs_stop_bits), 0x40,
6764 { &hf_gsm_a_dtap_negotiation,
6765 { "Negotiation", "gsm_a.dtap.negotiation",
6766 FT_BOOLEAN, 8, TFS(&tfs_negotiation), 0x20,
6769 { &hf_gsm_a_dtap_number_of_data_bits,
6770 { "Number of data bits excluding parity bit if present", "gsm_a.dtap.number_of_data_bits",
6771 FT_BOOLEAN, 8, TFS(&tfs_parity_bits), 0x10,
6774 { &hf_gsm_a_dtap_user_rate,
6775 { "User rate", "gsm_a.dtap.user_rate",
6776 FT_UINT8, BASE_DEC, VALS(gsm_a_dtap_user_rate_vals), 0x0F,
6779 { &hf_gsm_a_dtap_v110_x30_rate_adaptation,
6780 { "V.110/X.30 rate adaptation Intermediate rate", "gsm_a.dtap.v110_x30_rate_adaptation",
6781 FT_UINT8, BASE_DEC, VALS(gsm_a_dtap_v110_x30_rate_adaptation_vals), 0x60,
6784 { &hf_gsm_a_dtap_nic_on_tx,
6785 { "Network independent clock (NIC) on transmission (Tx)", "gsm_a.dtap.nic_on_tx",
6786 FT_BOOLEAN, 8, TFS(&tfs_nic_on_tx), 0x10,
6789 { &hf_gsm_a_dtap_nic_on_rx,
6790 { "Network independent clock (NIC) on reception (Rx)", "gsm_a.dtap.nic_on_rx",
6791 FT_BOOLEAN, 8, TFS(&tfs_nic_on_rx), 0x08,
6794 { &hf_gsm_a_dtap_parity_information,
6795 { "Parity information", "gsm_a.dtap.parity_information",
6796 FT_UINT8, BASE_DEC, VALS(gsm_a_dtap_parity_info_vals), 0x07,
6799 { &hf_gsm_a_dtap_connection_element,
6800 { "Connection element", "gsm_a.dtap.connection_element",
6801 FT_UINT8, BASE_DEC, VALS(gsm_a_dtap_connection_element_vals), 0x60,
6804 { &hf_gsm_a_dtap_modem_type,
6805 { "Modem type", "gsm_a.dtap.modem_type",
6806 FT_UINT8, BASE_DEC, NULL, 0x1f,
6809 { &hf_gsm_a_dtap_other_modem_type,
6810 { "Other modem type", "gsm_a.dtap.other_modem_type",
6811 FT_UINT8, BASE_DEC, VALS(gsm_a_dtap_other_modem_type_vals), 0x60,
6814 { &hf_gsm_a_dtap_fixed_network_user_rate,
6815 { "Fixed network user rate", "gsm_a.dtap.fixed_network_user_rate",
6816 FT_UINT8, BASE_DEC, NULL, 0x1f,
6819 { &hf_gsm_a_dtap_acceptable_channel_codings_TCH_F14_4,
6820 { "Acceptable channel codings (TCH/F14.4)", "gsm_a.dtap.acceptable_channel_codings.TCH_F14_4",
6821 FT_BOOLEAN, 8, TFS(&tfs_acceptable_not_acceptable), 0x40,
6824 { &hf_gsm_a_dtap_acceptable_channel_codings_spare20,
6825 { "Acceptable channel codings (Spare)", "gsm_a.dtap.acceptable_channel_codings.spare",
6826 FT_BOOLEAN, 8, NULL, 0x20,
6829 { &hf_gsm_a_dtap_acceptable_channel_codings_TCH_F9_6,
6830 { "Acceptable channel codings (TCH/F9.6)", "gsm_a.dtap.acceptable_channel_codings.TCH_F9_6",
6831 FT_BOOLEAN, 8, TFS(&tfs_acceptable_not_acceptable), 0x10,
6834 { &hf_gsm_a_dtap_acceptable_channel_codings_TCH_F4_8,
6835 { "Acceptable channel codings (TCH/F4.8)", "gsm_a.dtap.acceptable_channel_codings.TCH_F4_8",
6836 FT_BOOLEAN, 8, TFS(&tfs_acceptable_not_acceptable), 0x08,
6839 { &hf_gsm_a_dtap_maximum_number_of_traffic_channels,
6840 { "Maximum number of traffic channels", "gsm_a.dtap.maximum_number_of_traffic_channels",
6841 FT_UINT8, BASE_DEC, NULL, 0x07,
6844 { &hf_gsm_a_dtap_acceptable_channel_codings_spare78,
6845 { "Acceptable channel codings", "gsm_a.dtap.acceptable_channel_codings",
6846 FT_UINT8, BASE_DEC, NULL, 0x78,
6849 { &hf_gsm_a_dtap_uimi,
6850 { "UIMI, User initiated modification indication",
6851 "gsm_a.dtap.uimi", FT_UINT8, BASE_DEC, VALS(gsm_a_dtap_uimi_vals),
6854 { &hf_gsm_a_dtap_wanted_air_interface_user_rate,
6855 { "Wanted air interface user rate", "gsm_a.dtap.wanted_air_interface_user_rate",
6856 FT_UINT8, BASE_DEC, VALS(gsm_a_dtap_wanted_air_rate_vals), 0x0F,
6859 { &hf_gsm_a_dtap_acceptable_channel_codings_ext_TCH_F28_8,
6860 { "Acceptable channel codings extended (TCH/F28.8)", "gsm_a.dtap.acceptable_channel_codings_ext.TCH_F28_8",
6861 FT_BOOLEAN, 8, TFS(&tfs_acceptable_not_acceptable), 0x40,
6864 { &hf_gsm_a_dtap_acceptable_channel_codings_ext_TCH_F32_0,
6865 { "Acceptable channel codings extended (TCH/F32.0)", "gsm_a.dtap.acceptable_channel_codings_ext.TCH_F32_0",
6866 FT_BOOLEAN, 8, TFS(&tfs_acceptable_not_acceptable), 0x20,
6869 { &hf_gsm_a_dtap_acceptable_channel_codings_ext_TCH_F43_2,
6870 { "Acceptable channel codings extended (TCH/F43.2)", "gsm_a.dtap.acceptable_channel_codings_ext.TCH_F43_2",
6871 FT_BOOLEAN, 8, TFS(&tfs_acceptable_not_acceptable), 0x10,
6874 { &hf_gsm_a_dtap_channel_coding_asymmetry_indication,
6875 { "Channel Coding Asymmetry Indication", "gsm_a.dtap.channel_coding_asymmetry_indication",
6876 FT_UINT8, BASE_DEC, VALS(gsm_a_dtap_channel_coding_asymmetry_ind_vals), 0x0c,
6879 { &hf_gsm_a_dtap_edge_channel_codings,
6880 { "EDGE Channel Codings", "gsm_a.dtap.edge_channel_codings",
6881 FT_UINT8, BASE_DEC, NULL, 0x7c,
6884 { &hf_gsm_a_dtap_layer_2_identity,
6885 { "Layer 2 Identity", "gsm_a.dtap.layer_2_identity",
6886 FT_UINT8, BASE_DEC, NULL, 0x60,
6889 { &hf_gsm_a_dtap_user_information_layer_2_protocol,
6890 { "User information layer 2 protocol", "gsm_a.dtap.user_information_layer_2_protocol",
6891 FT_UINT8, BASE_DEC, NULL, 0x1f,
6894 { &hf_gsm_a_dtap_maximum_number_of_supported_bearers,
6895 { "Maximum number of supported bearers", "gsm_a.dtap.maximum_number_of_supported_bearers",
6896 FT_UINT8, BASE_DEC, NULL, 0xf0,
6899 { &hf_gsm_a_dtap_pcp,
6900 { "Prolonged Clearing Procedure", "gsm_a.dtap.pcp",
6901 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02,
6904 { &hf_gsm_a_dtap_dtmf,
6905 { "DTMF", "gsm_a.dtap.dtmf",
6906 FT_BOOLEAN, 8, TFS(&gsm_a_dtap_dtmf_value), 0x01,
6909 { &hf_gsm_a_dtap_max_num_of_speech_bearers,
6910 { "Maximum number of speech bearers", "gsm_a.dtap.max_num_of_speech_bearers",
6911 FT_UINT8, BASE_DEC, NULL, 0x0f,
6914 { &hf_gsm_a_dtap_de_cause_coding_standard,
6915 { "Coding standard", "gsm_a.dtap.coding_standard",
6916 FT_UINT8, BASE_DEC, VALS(gsm_a_dtap_de_cause_coding_standard_vals), 0x60,
6919 { &hf_gsm_a_dtap_recommendation,
6920 { "Recommendation", "gsm_a.dtap.recommendation",
6921 FT_UINT8, BASE_DEC, NULL, 0x7f,
6924 { &hf_gsm_a_dtap_data,
6925 { "Data", "gsm_a.dtap.data",
6926 FT_BYTES, BASE_NONE, NULL, 0x0,
6929 { &hf_gsm_a_dtap_keypad_information,
6930 { "Keypad information", "gsm_a.dtap.keypad_information",
6931 FT_UINT8, BASE_DEC, NULL, 0x7f,
6934 { &hf_gsm_a_dtap_repeat_indicator,
6935 { "Repeat Indicator", "gsm_a.dtap.repeat_indicator",
6936 FT_UINT8, BASE_DEC, NULL, 0x0f,
6939 { &hf_gsm_a_dtap_ss_version_indicator,
6940 { "SS Version Indicator", "gsm_a.dtap.ss_version_indicator",
6941 FT_UINT8, BASE_DEC, NULL, 0x0,
6944 { &hf_gsm_a_dtap_cp_cause,
6945 { "Cause", "gsm_a.dtap.cp_cause",
6946 FT_UINT8, BASE_DEC, NULL, 0x0,
6949 { &hf_gsm_a_dtap_test_loop,
6950 { "Test Loop", "gsm_a.dtap.test_loop",
6951 FT_UINT8, BASE_DEC, NULL, 0x3f,
6954 { &hf_gsm_a_dtap_channel_coding03,
6955 { "Channel coding", "gsm_a.dtap.channel_coding",
6956 FT_UINT8, BASE_DEC, VALS(gsm_channel_coding_vals), 0x03,
6959 { &hf_gsm_a_dtap_channel_coding30,
6960 { "Channel coding", "gsm_a.dtap.channel_coding",
6961 FT_UINT8, BASE_DEC, VALS(gsm_channel_coding_vals), 0x30,
6964 { &hf_gsm_a_dtap_tp_tested_device,
6965 { "Tested device", "gsm_a.dtap.tp_tested_device",
6966 FT_UINT8, BASE_DEC, NULL, 0x0,
6969 { &hf_gsm_a_dtap_tp_pdu_description,
6970 { "PDUs transmitted", "gsm_a.dtap.tp_pdu_description",
6971 FT_UINT16, BASE_DEC, NULL, 0x0,
6974 { &hf_gsm_a_dtap_downlink_timeslot_offset,
6975 { "Downlink Timeslot Offset", "gsm_a.dtap.downlink_timeslot_offset",
6976 FT_UINT8, BASE_DEC, NULL, 0x0E,
6979 { &hf_gsm_a_dtap_ms_positioning_technology,
6980 { "MS positioning technology", "gsm_a.dtap.ms_positioning_technology",
6981 FT_UINT8, BASE_DEC, VALS(gsm_positioning_technology_vals), 0x0,
6984 { &hf_gsm_a_dtap_ue_positioning_technology,
6985 { "UE positioning technology", "gsm_a.dtap.ue_positioning_technology",
6986 FT_UINT8, BASE_DEC, VALS(gsm_positioning_technology_vals), 0x0,
6989 { &hf_gsm_a_dtap_ciphering_key_sequence_number,
6990 { "Ciphering Key Sequence Number", "gsm_a.dtap.ciphering_key_sequence_number",
6991 FT_UINT8, BASE_DEC, NULL, 0x07,
6994 { &hf_gsm_a_dtap_ciphering_key_sequence_number70,
6995 { "Ciphering Key Sequence Number", "gsm_a.dtap.ciphering_key_sequence_number",
6996 FT_UINT8, BASE_DEC, NULL, 0x70,
6999 { &hf_gsm_a_dtap_service_type,
7000 { "Service Type", "gsm_a.dtap.service_type",
7001 FT_UINT8, BASE_DEC, VALS(gsm_a_dtap_service_type_vals), 0x0F,
7004 { &hf_gsm_a_dtap_type_of_identity,
7005 { "Type of identity", "gsm_a.dtap.type_of_identity",
7006 FT_UINT8, BASE_DEC, VALS(gsm_a_dtap_type_of_identity_vals), 0x07,
7009 { &hf_gsm_a_dtap_follow_on_request,
7010 { "Follow-On Request (FOR)", "gsm_a.dtap.follow_on_request",
7011 FT_BOOLEAN, 8, TFS(&tfs_follow_on_request_value ), 0x08,
7014 { &hf_gsm_a_dtap_updating_type,
7015 { "Updating Type", "gsm_a.dtap.updating_type",
7016 FT_UINT8, BASE_DEC, VALS(gsm_a_dtap_updating_type_vals), 0x03,
7019 { &hf_gsm_a_dtap_congestion_level,
7020 { "Congestion level", "gsm_a.dtap.congestion_level",
7021 FT_UINT8, BASE_DEC, NULL, 0x0F,
7024 { &hf_gsm_a_dtap_protocol_discriminator,
7025 { "Protocol Discriminator", "gsm_a.dtap.protocol_discriminator",
7026 FT_UINT8, BASE_DEC, VALS(protocol_discriminator_vals), 0x0,
7029 { &hf_gsm_a_dtap_ti_flag,
7030 { "TI flag", "gsm_a.dtap.ti_flag",
7031 FT_BOOLEAN, 8, TFS(&tfs_allocated_by_receiver_sender), 0x80,
7034 { &hf_gsm_a_dtap_tio,
7035 { "TIO", "gsm_a.dtap.tio",
7036 FT_UINT8, BASE_DEC, NULL, 0x70,
7039 { &hf_gsm_a_dtap_tie,
7040 { "TIE", "gsm_a.dtap.tie",
7041 FT_UINT8, BASE_DEC, NULL, DTAP_TIE_MASK,
7046 /* Setup protocol subtree array */
7047 #define NUM_INDIVIDUAL_ELEMS 21
7048 gint *ett[NUM_INDIVIDUAL_ELEMS +
7049 NUM_GSM_DTAP_MSG_MM + NUM_GSM_DTAP_MSG_CC +
7050 NUM_GSM_DTAP_MSG_SMS + NUM_GSM_DTAP_MSG_SS + NUM_GSM_DTAP_MSG_TP +
7053 static ei_register_info ei[] = {
7054 { &ei_gsm_a_dtap_autn, { "gsm_a.dtap.autn.invalid", PI_MALFORMED, PI_WARN, "AUTN length not equal to 16", EXPFILL }},
7055 { &ei_gsm_a_dtap_auts, { "gsm_a.dtap.auts.invalid", PI_MALFORMED, PI_WARN, "AUTS length not equal to 14", EXPFILL }},
7056 { &ei_gsm_a_dtap_text_string_not_multiple_of_7, { "gsm_a.dtap.text_string_not_multiple_of_7", PI_MALFORMED, PI_WARN, "Value leads to a Text String whose length is not a multiple of 7 bits", EXPFILL }},
7057 { &ei_gsm_a_dtap_end_mark_unexpected, { "gsm_a.dtap.end_mark_unexpected", PI_MALFORMED, PI_WARN, "\'f\' end mark present in unexpected position", EXPFILL }},
7058 { &ei_gsm_a_dtap_invalid_ia5_character, { "gsm_a.dtap.invalid_ia5_character", PI_MALFORMED, PI_WARN, "Invalid IA5 character(s) in string (value > 127)", EXPFILL }},
7059 { &ei_gsm_a_dtap_keypad_info_not_dtmf_digit, { "gsm_a.dtap.keypad_info_not_dtmf_digit", PI_MALFORMED, PI_WARN, "Keypad information contains character that is not a DTMF digit", EXPFILL }},
7060 { &ei_gsm_a_dtap_extraneous_data, { "gsm_a.dtap.extraneous_data", PI_PROTOCOL, PI_NOTE, "Extraneous Data, dissector bug or later version spec(report to wireshark.org)", EXPFILL }},
7061 { &ei_gsm_a_dtap_missing_mandatory_element, { "gsm_a.dtap.missing_mandatory_element", PI_PROTOCOL, PI_WARN, "Missing Mandatory element, rest of dissection is suspect", EXPFILL }},
7064 expert_module_t* expert_a_dtap;
7066 ett[0] = &ett_dtap_msg;
7067 ett[1] = &ett_dtap_oct_1;
7068 ett[2] = &ett_cm_srvc_type;
7069 ett[3] = &ett_gsm_enc_info;
7070 ett[4] = &ett_bc_oct_3;
7071 ett[5] = &ett_bc_oct_3a;
7072 ett[6] = &ett_bc_oct_4;
7073 ett[7] = &ett_bc_oct_5;
7074 ett[8] = &ett_bc_oct_5a;
7075 ett[9] = &ett_bc_oct_5b;
7076 ett[10] = &ett_bc_oct_6;
7077 ett[11] = &ett_bc_oct_6a;
7078 ett[12] = &ett_bc_oct_6b;
7079 ett[13] = &ett_bc_oct_6c;
7080 ett[14] = &ett_bc_oct_6d;
7081 ett[15] = &ett_bc_oct_6e;
7082 ett[16] = &ett_bc_oct_6f;
7083 ett[17] = &ett_bc_oct_6g;
7084 ett[18] = &ett_bc_oct_7;
7085 ett[19] = &ett_epc_ue_tl_a_lb_setup;
7086 ett[20] = &ett_mm_timer;
7088 last_offset = NUM_INDIVIDUAL_ELEMS;
7090 for (i=0; i < NUM_GSM_DTAP_MSG_MM; i++, last_offset++)
7092 ett_gsm_dtap_msg_mm[i] = -1;
7093 ett[last_offset] = &ett_gsm_dtap_msg_mm[i];
7096 for (i=0; i < NUM_GSM_DTAP_MSG_CC; i++, last_offset++)
7098 ett_gsm_dtap_msg_cc[i] = -1;
7099 ett[last_offset] = &ett_gsm_dtap_msg_cc[i];
7102 for (i=0; i < NUM_GSM_DTAP_MSG_SMS; i++, last_offset++)
7104 ett_gsm_dtap_msg_sms[i] = -1;
7105 ett[last_offset] = &ett_gsm_dtap_msg_sms[i];
7108 for (i=0; i < NUM_GSM_DTAP_MSG_SS; i++, last_offset++)
7110 ett_gsm_dtap_msg_ss[i] = -1;
7111 ett[last_offset] = &ett_gsm_dtap_msg_ss[i];
7114 for (i=0; i < NUM_GSM_DTAP_MSG_TP; i++, last_offset++)
7116 ett_gsm_dtap_msg_tp[i] = -1;
7117 ett[last_offset] = &ett_gsm_dtap_msg_tp[i];
7120 for (i=0; i < NUM_GSM_DTAP_ELEM; i++, last_offset++)
7122 ett_gsm_dtap_elem[i] = -1;
7123 ett[last_offset] = &ett_gsm_dtap_elem[i];
7126 /* Register the protocol name and description */
7129 proto_register_protocol("GSM A-I/F DTAP", "GSM DTAP", "gsm_a.dtap");
7131 proto_register_field_array(proto_a_dtap, hf, array_length(hf));
7133 proto_register_subtree_array(ett, array_length(ett));
7134 expert_a_dtap = expert_register_protocol(proto_a_dtap);
7135 expert_register_field_array(expert_a_dtap, ei, array_length(ei));
7138 /* subdissector code */
7139 new_register_dissector("gsm_a_dtap", dissect_dtap, proto_a_dtap);
7143 proto_reg_handoff_gsm_a_dtap(void)
7145 dissector_handle_t dtap_handle;
7147 dtap_handle = find_dissector("gsm_a_dtap");
7148 dissector_add_uint("bssap.pdu_type", BSSAP_PDU_TYPE_DTAP, dtap_handle);
7149 dissector_add_uint("ranap.nas_pdu", BSSAP_PDU_TYPE_DTAP, dtap_handle);
7150 dissector_add_uint("llcgprs.sapi", 1 , dtap_handle); /* GPRS Mobility Management */
7151 dissector_add_uint("llcgprs.sapi", 7 , dtap_handle); /* SMS */
7152 dissector_add_uint("lapdm.sapi", 0 , dtap_handle); /* LAPDm: CC/RR/MM */
7153 dissector_add_uint("lapdm.sapi", 3 , dtap_handle); /* LAPDm: SMS/SS */
7155 data_handle = find_dissector("data");
7156 gsm_map_handle = find_dissector("gsm_map");
7157 rp_handle = find_dissector("gsm_a_rp");
7162 * Editor modelines - http://www.wireshark.org/tools/modelines.html
7167 * indent-tabs-mode: nil
7170 * vi: set shiftwidth=4 tabstop=8 expandtab:
7171 * :indentSize=4:tabSize=8:noTabs=true: