1 /* packet-gsm_a_common.h
2  *
3  *   Reference [3]
4  *   Mobile radio interface Layer 3 specification;
5  *   Core network protocols;
6  *   Stage 3
7  *   (3GPP TS 24.008 version 4.7.0 Release 4)
8  *   (ETSI TS 124 008 V6.8.0 (2005-03))
9  *
10  *   Reference [5]
11  *   Point-to-Point (PP) Short Message Service (SMS)
12  *   support on mobile radio interface
13  *   (3GPP TS 24.011 version 4.1.1 Release 4)
14  *
15  *   Reference [7]
16  *   Mobile radio interface Layer 3 specification;
17  *   Core network protocols;
18  *   Stage 3
19  *   (3GPP TS 24.008 version 5.9.0 Release 5)
20  *
21  *   Reference [8]
22  *   Mobile radio interface Layer 3 specification;
23  *   Core network protocols;
24  *   Stage 3
25  *   (3GPP TS 24.008 version 6.7.0 Release 6)
26  *   (3GPP TS 24.008 version 6.8.0 Release 6)
27  *
28  *   Reference [9]
29  *   Digital cellular telecommunications system (Phase 2+);
30  *   Group Call Control (GCC) protocol
31  *   (GSM 04.68 version 8.1.0 Release 1999)
32  *
33  *   Reference [10]
34  *   Digital cellular telecommunications system (Phase 2+);
35  *   Broadcast Call Control (BCC) protocol
36  *   (3GPP TS 44.069 version 11.0.0 Release 11)
37  *
38  *   Reference [11]
39  *   Mobile radio interface Layer 3 specification;
40  *   Core network protocols;
41  *   Stage 3
42  *   (3GPP TS 24.008 version 13.7.0 Release 13)
43  *
44  *   Reference [12]
45  *   Mobile radio interface Layer 3 specification;
46  *   Core network protocols;
47  *   Stage 3
48  *   (3GPP TS 24.008 version 14.4.0 Release 14)
49  *
50  *   Reference [13]
51  *   Mobile radio interface Layer 3 specification;
52  *   Core network protocols;
53  *   Stage 3
54  *   (3GPP TS 24.008 version 15.1.0 Release 15)
55  *
56  * Copyright 2003, Michael Lum <mlum [AT] telostech.com>,
57  * In association with Telos Technology Inc.
58  *
59  * Added Dissection of Group Call Control (GCC) protocol.
60  * Added Dissection of Broadcast Call Control (BCC) protocol.
61  * Copyright 2015, Michail Koreshkov <michail.koreshkov [at] zte.com.cn
62  *
63  * Wireshark - Network traffic analyzer
64  * By Gerald Combs <gerald@wireshark.org>
65  * Copyright 1998 Gerald Combs
66  *
67  * SPDX-License-Identifier: GPL-2.0-or-later
68  */
69 #ifndef __PACKET_GSM_A_COMMON_H__
70 #define __PACKET_GSM_A_COMMON_H__
71 
72 #include <epan/proto.h>
73 
74 #include "packet-sccp.h"
75 #include "packet-e212.h"
76 #include "ws_symbol_export.h"
77 
78 /* PROTOTYPES/FORWARDS */
79 typedef guint16 (*elem_fcn)(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
80 typedef void (*msg_fcn)(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len);
81 
82 /* globals needed as a result of spltting the packet-gsm_a.c into several files
83  * until further restructuring can take place to make them more modular
84  */
85 
86 /* common PD values */
87 extern const value_string protocol_discriminator_vals[];
88 extern const value_string gsm_a_pd_short_str_vals[];
89 
90 extern guint16 de_cld_party_bcd_num(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
91 
92 /* Needed to share the packet-gsm_a_common.c functions */
93 extern value_string_ext gsm_bssmap_elem_strings_ext;
94 extern gint ett_gsm_bssmap_elem[];
95 extern elem_fcn bssmap_elem_fcn[];
96 extern int hf_gsm_a_bssmap_elem_id;
97 
98 extern value_string_ext gsm_dtap_elem_strings_ext;
99 extern gint ett_gsm_dtap_elem[];
100 extern elem_fcn dtap_elem_fcn[];
101 extern int hf_gsm_a_dtap_elem_id;
102 
103 extern value_string_ext gsm_rp_elem_strings_ext;
104 extern gint ett_gsm_rp_elem[];
105 extern elem_fcn rp_elem_fcn[];
106 extern int hf_gsm_a_rp_elem_id;
107 
108 extern value_string_ext gsm_rr_elem_strings_ext;
109 extern gint ett_gsm_rr_elem[];
110 extern elem_fcn rr_elem_fcn[];
111 extern int hf_gsm_a_rr_elem_id;
112 extern void get_rr_msg_params(guint8 oct, const gchar **msg_str, int *ett_tree, int *hf_idx, msg_fcn *msg_fcn);
113 
114 extern value_string_ext gsm_common_elem_strings_ext;
115 extern gint ett_gsm_common_elem[];
116 extern elem_fcn common_elem_fcn[];
117 extern int hf_gsm_a_common_elem_id;
118 
119 extern value_string_ext gsm_gm_elem_strings_ext;
120 extern gint ett_gsm_gm_elem[];
121 extern elem_fcn gm_elem_fcn[];
122 extern int hf_gsm_a_gm_elem_id;
123 extern void get_gmm_msg_params(guint8 oct, const gchar **msg_str, int *ett_tree, int *hf_idx, msg_fcn *msg_fcn);
124 extern void get_sm_msg_params(guint8 oct, const gchar **msg_str, int *ett_tree, int *hf_idx, msg_fcn *msg_fcn);
125 
126 extern value_string_ext gsm_bsslap_elem_strings_ext;
127 extern gint ett_gsm_bsslap_elem[];
128 extern elem_fcn bsslap_elem_fcn[];
129 extern int hf_gsm_a_bsslap_elem_id;
130 
131 extern value_string_ext gsm_bssmap_le_elem_strings_ext;
132 extern gint ett_gsm_bssmap_le_elem[];
133 extern elem_fcn bssmap_le_elem_fcn[];
134 extern int hf_gsm_bssmap_le_elem_id;
135 
136 extern value_string_ext nas_eps_common_elem_strings_ext;
137 extern gint ett_nas_eps_common_elem[];
138 extern elem_fcn nas_eps_common_elem_fcn[];
139 extern int hf_nas_eps_common_elem_id;
140 
141 extern value_string_ext nas_emm_elem_strings_ext;
142 extern gint ett_nas_eps_emm_elem[];
143 extern elem_fcn emm_elem_fcn[];
144 extern int hf_nas_eps_emm_elem_id;
145 
146 extern value_string_ext nas_esm_elem_strings_ext;
147 extern gint ett_nas_eps_esm_elem[];
148 extern elem_fcn esm_elem_fcn[];
149 extern int hf_nas_eps_esm_elem_id;
150 
151 extern value_string_ext sgsap_elem_strings_ext;
152 extern gint ett_sgsap_elem[];
153 extern elem_fcn sgsap_elem_fcn[];
154 extern int hf_sgsap_elem_id;
155 
156 extern value_string_ext bssgp_elem_strings_ext;
157 extern gint ett_bssgp_elem[];
158 extern elem_fcn bssgp_elem_fcn[];
159 extern int hf_bssgp_elem_id;
160 
161 extern value_string_ext gmr1_ie_common_strings_ext;
162 extern elem_fcn gmr1_ie_common_func[];
163 extern gint ett_gmr1_ie_common[];
164 
165 extern value_string_ext gmr1_ie_rr_strings_ext;
166 extern elem_fcn gmr1_ie_rr_func[];
167 extern gint ett_gmr1_ie_rr[];
168 
169 extern value_string_ext nas_5gs_common_elem_strings_ext;
170 extern gint ett_nas_5gs_common_elem[];
171 extern elem_fcn nas_5gs_common_elem_fcn[];
172 extern int hf_nas_5gs_common_elem_id;
173 
174 extern value_string_ext nas_5gs_mm_elem_strings_ext;
175 extern gint ett_nas_5gs_mm_elem[];
176 extern elem_fcn nas_5gs_mm_elem_fcn[];
177 extern int hf_nas_5gs_mm_elem_id;
178 
179 extern value_string_ext nas_5gs_sm_elem_strings_ext;
180 extern gint ett_nas_5gs_sm_elem[];
181 extern elem_fcn nas_5gs_sm_elem_fcn[];
182 extern int hf_nas_5gs_sm_elem_id;
183 
184 extern value_string_ext nas_5gs_updp_elem_strings_ext;
185 extern gint ett_nas_5gs_updp_elem[];
186 extern elem_fcn nas_5gs_updp_elem_fcn[];
187 extern int hf_nas_5gs_updp_elem_id;
188 
189 extern sccp_assoc_info_t* sccp_assoc;
190 
191 extern int gsm_a_tap;
192 extern packet_info *gsm_a_dtap_pinfo;
193 
194 /* TS 23 032 */
195 int dissect_geographical_description(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
196 guint16 dissect_description_of_velocity(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
197 
198 
199 /* common field values */
200 extern int hf_gsm_a_extension;
201 extern int hf_gsm_a_tmsi;
202 extern int hf_gsm_a_L3_protocol_discriminator;
203 extern int hf_gsm_a_call_prio;
204 extern int hf_gsm_a_b8spare;
205 extern int hf_gsm_a_skip_ind;
206 extern int hf_gsm_a_rr_chnl_needed_ch1;
207 extern int hf_gsm_a_rr_t3212;
208 extern int hf_gsm_a_gm_rac;
209 extern int hf_gsm_a_spare_bits;
210 extern int hf_gsm_a_lac;
211 
212 /* Inter protocol filters*/
213 extern int hf_3gpp_tmsi;
214 
215 /* flags for the packet-gsm_a_common routines */
216 #define GSM_A_PDU_TYPE_BSSMAP       0  /* BSSAP_PDU_TYPE_BSSMAP i.e. 0 - until split complete at least! */
217 #define GSM_A_PDU_TYPE_DTAP         1  /* BSSAP_PDU_TYPE_DTAP i.e. 1   - until split complete at least! */
218 #define GSM_A_PDU_TYPE_RP           2
219 #define GSM_A_PDU_TYPE_RR           3
220 #define GSM_A_PDU_TYPE_COMMON       4
221 #define GSM_A_PDU_TYPE_GM           5
222 #define GSM_A_PDU_TYPE_BSSLAP       6
223 #define GSM_A_PDU_TYPE_SACCH        7
224 #define GSM_PDU_TYPE_BSSMAP_LE      8
225 #define NAS_PDU_TYPE_COMMON         9
226 #define NAS_PDU_TYPE_EMM            10
227 #define NAS_PDU_TYPE_ESM            11
228 #define SGSAP_PDU_TYPE              12
229 #define BSSGP_PDU_TYPE              13
230 #define GMR1_IE_COMMON              14
231 #define GMR1_IE_RR                  15
232 #define NAS_5GS_PDU_TYPE_COMMON     16
233 #define NAS_5GS_PDU_TYPE_MM         17
234 #define NAS_5GS_PDU_TYPE_SM         18
235 #define NAS_5GS_PDU_TYPE_UPDP       19
236 
237 extern const char* get_gsm_a_msg_string(int pdu_type, int idx);
238 
239 /*
240  * this should be set on a per message basis, if possible
241  */
242 #define IS_UPLINK_FALSE     0
243 #define IS_UPLINK_TRUE      1
244 #define IS_UPLINK_UNKNOWN   2
245 
246 /* Defines for handling half octet mandatory V IEs
247  * Named LEFT and RIGHT (as displayed) because the GSM definitions and our internal representation
248  * have the bits numbered in opposite senses
249  */
250 #define LEFT_NIBBLE     (2)
251 #define RIGHT_NIBBLE    (1)
252 
253 /* FUNCTIONS */
254 
255 /* ELEMENT FUNCTIONS */
256 #define EXTRANEOUS_DATA_CHECK(edc_len, edc_max_len, pinfo, ei) \
257     if ((edc_len) > (edc_max_len)) \
258     { \
259         proto_tree_add_expert(tree, pinfo, ei, tvb, curr_offset, (edc_len) - (edc_max_len)); \
260         curr_offset += ((edc_len) - (edc_max_len)); \
261     }
262 
263 #define NO_MORE_DATA_CHECK(nmdc_len) \
264     if ((nmdc_len) <= (curr_offset - offset)) return(nmdc_len);
265 
266 #define SET_ELEM_VARS(SEV_pdu_type, SEV_elem_names_ext, SEV_elem_ett, SEV_elem_funcs, ei_unknown) \
267     switch (SEV_pdu_type) \
268     { \
269     case GSM_A_PDU_TYPE_BSSMAP: \
270         SEV_elem_names_ext = gsm_bssmap_elem_strings_ext; \
271         SEV_elem_ett = ett_gsm_bssmap_elem; \
272         SEV_elem_funcs = bssmap_elem_fcn; \
273         break; \
274     case GSM_A_PDU_TYPE_DTAP: \
275         SEV_elem_names_ext = gsm_dtap_elem_strings_ext; \
276         SEV_elem_ett = ett_gsm_dtap_elem; \
277         SEV_elem_funcs = dtap_elem_fcn; \
278         break; \
279     case GSM_A_PDU_TYPE_RP: \
280         SEV_elem_names_ext = gsm_rp_elem_strings_ext; \
281         SEV_elem_ett = ett_gsm_rp_elem; \
282         SEV_elem_funcs = rp_elem_fcn; \
283         break; \
284     case GSM_A_PDU_TYPE_RR: \
285         SEV_elem_names_ext = gsm_rr_elem_strings_ext; \
286         SEV_elem_ett = ett_gsm_rr_elem; \
287         SEV_elem_funcs = rr_elem_fcn; \
288         break; \
289     case GSM_A_PDU_TYPE_COMMON: \
290         SEV_elem_names_ext = gsm_common_elem_strings_ext; \
291         SEV_elem_ett = ett_gsm_common_elem; \
292         SEV_elem_funcs = common_elem_fcn; \
293         break; \
294     case GSM_A_PDU_TYPE_GM: \
295         SEV_elem_names_ext = gsm_gm_elem_strings_ext; \
296         SEV_elem_ett = ett_gsm_gm_elem; \
297         SEV_elem_funcs = gm_elem_fcn; \
298         break; \
299     case GSM_A_PDU_TYPE_BSSLAP: \
300         SEV_elem_names_ext = gsm_bsslap_elem_strings_ext; \
301         SEV_elem_ett = ett_gsm_bsslap_elem; \
302         SEV_elem_funcs = bsslap_elem_fcn; \
303         break; \
304     case GSM_PDU_TYPE_BSSMAP_LE: \
305         SEV_elem_names_ext = gsm_bssmap_le_elem_strings_ext; \
306         SEV_elem_ett = ett_gsm_bssmap_le_elem; \
307         SEV_elem_funcs = bssmap_le_elem_fcn; \
308         break; \
309     case NAS_PDU_TYPE_COMMON: \
310         SEV_elem_names_ext = nas_eps_common_elem_strings_ext; \
311         SEV_elem_ett = ett_nas_eps_common_elem; \
312         SEV_elem_funcs = nas_eps_common_elem_fcn; \
313         break; \
314     case NAS_PDU_TYPE_EMM: \
315         SEV_elem_names_ext = nas_emm_elem_strings_ext; \
316         SEV_elem_ett = ett_nas_eps_emm_elem; \
317         SEV_elem_funcs = emm_elem_fcn; \
318         break; \
319     case NAS_PDU_TYPE_ESM: \
320         SEV_elem_names_ext = nas_esm_elem_strings_ext; \
321         SEV_elem_ett = ett_nas_eps_esm_elem; \
322         SEV_elem_funcs = esm_elem_fcn; \
323         break; \
324     case SGSAP_PDU_TYPE: \
325         SEV_elem_names_ext = sgsap_elem_strings_ext; \
326         SEV_elem_ett = ett_sgsap_elem; \
327         SEV_elem_funcs = sgsap_elem_fcn; \
328         break; \
329     case BSSGP_PDU_TYPE: \
330         SEV_elem_names_ext = bssgp_elem_strings_ext; \
331         SEV_elem_ett = ett_bssgp_elem; \
332         SEV_elem_funcs = bssgp_elem_fcn; \
333         break; \
334     case GMR1_IE_COMMON: \
335         SEV_elem_names_ext = gmr1_ie_common_strings_ext; \
336         SEV_elem_ett = ett_gmr1_ie_common; \
337         SEV_elem_funcs = gmr1_ie_common_func; \
338         break; \
339     case GMR1_IE_RR: \
340         SEV_elem_names_ext = gmr1_ie_rr_strings_ext; \
341         SEV_elem_ett = ett_gmr1_ie_rr; \
342         SEV_elem_funcs = gmr1_ie_rr_func; \
343         break; \
344     case NAS_5GS_PDU_TYPE_COMMON: \
345         SEV_elem_names_ext = nas_5gs_common_elem_strings_ext; \
346         SEV_elem_ett = ett_nas_5gs_common_elem; \
347         SEV_elem_funcs = nas_5gs_common_elem_fcn; \
348         break; \
349     case NAS_5GS_PDU_TYPE_MM: \
350         SEV_elem_names_ext = nas_5gs_mm_elem_strings_ext; \
351         SEV_elem_ett = ett_nas_5gs_mm_elem; \
352         SEV_elem_funcs = nas_5gs_mm_elem_fcn; \
353         break; \
354     case NAS_5GS_PDU_TYPE_SM: \
355         SEV_elem_names_ext = nas_5gs_sm_elem_strings_ext; \
356         SEV_elem_ett = ett_nas_5gs_sm_elem; \
357         SEV_elem_funcs = nas_5gs_sm_elem_fcn; \
358         break; \
359     case NAS_5GS_PDU_TYPE_UPDP: \
360         SEV_elem_names_ext = nas_5gs_updp_elem_strings_ext; \
361         SEV_elem_ett = ett_nas_5gs_updp_elem; \
362         SEV_elem_funcs = nas_5gs_updp_elem_fcn; \
363         break; \
364     default: \
365         proto_tree_add_expert_format(tree, pinfo, ei_unknown, \
366             tvb, curr_offset, -1, \
367             "Unknown PDU type (%u) gsm_a_common", SEV_pdu_type); \
368         return(consumed); \
369     }
370 
371 /*
372  * Type Length Value (TLV) element dissector
373  */
374 WS_DLL_PUBLIC guint16 elem_tlv(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint8 iei, gint pdu_type, int idx, guint32 offset, guint len, const gchar *name_add);
375 
376 /*
377  * Type Extendable Length Value (TLVE) element dissector
378  */
379 guint16 elem_telv(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint8 iei, gint pdu_type, int idx, guint32 offset, guint len, const gchar *name_add);
380 
381 /*
382  * Type Length Value (TLV-E) element dissector
383  */
384 guint16 elem_tlv_e(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint8 iei, gint pdu_type, int idx, guint32 offset, guint len, const gchar *name_add);
385 
386 /*
387  * Type Value (TV) element dissector
388  *
389  * Length cannot be used in these functions, big problem if a element dissector
390  * is not defined for these.
391  */
392 WS_DLL_PUBLIC guint16 elem_tv(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint8 iei, gint pdu_type, int idx, guint32 offset, const gchar *name_add);
393 
394 /*
395  * Type Value (TV) element dissector
396  * Where top half nibble is IEI and bottom half nibble is value.
397  *
398  * Length cannot be used in these functions, big problem if a element dissector
399  * is not defined for these.
400  */
401 WS_DLL_PUBLIC guint16 elem_tv_short(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint8 iei, gint pdu_type, int idx, guint32 offset, const gchar *name_add);
402 
403 /*
404  * Type (T) element dissector
405  */
406 WS_DLL_PUBLIC guint16 elem_t(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint8 iei, gint pdu_type, int idx, guint32 offset, const gchar *name_add);
407 
408 /*
409  * Length Value (LV) element dissector
410  */
411 WS_DLL_PUBLIC guint16 elem_lv(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gint pdu_type, int idx, guint32 offset, guint len, const gchar *name_add);
412 
413 /*
414  * Length Value (LV-E) element dissector
415  */
416 guint16 elem_lv_e(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gint pdu_type, int idx, guint32 offset, guint len, const gchar *name_add);
417 
418 /*
419  * Value (V) element dissector
420  *
421  * Length cannot be used in these functions, big problem if a element dissector
422  * is not defined for these.
423  */
424 WS_DLL_PUBLIC guint16 elem_v(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gint pdu_type, int idx, guint32 offset, const gchar *name_add);
425 
426 /*
427  * Short Value (V_SHORT) element dissector
428  *
429  * nibble used in this functions to indicate left or right nibble of the octet
430  * This is expected to be used right nibble first, as the tables of 24.008.
431  */
432 WS_DLL_PUBLIC guint16 elem_v_short(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gint pdu_type, int idx, guint32 offset, guint32 nibble);
433 
434 
435 /* XXX: Most (if not all) the functions which make use of the following macros have the variables 'consumed',
436  *      'curr_offset', and 'cur_len' declared as *unsigned*.  This means that the 'if (curr_len <= 0)' statement
437  *      originally at the end of each of the macros would always be FALSE since an unsigned cannot be less than 0.
438  *      I've chosen to change the statement to 'if ((signed)curr_len <= 0)'. (Although this may be a bit of a
439  *      hack, it seems simpler than changing declarations to signed in all the places these macros are used).
440  *      Is there a better approach ?
441  */
442 
443 #define ELEM_MAND_TLV(EMT_iei, EMT_pdu_type, EMT_elem_idx, EMT_elem_name_addition, ei_mandatory) \
444 {\
445     if (((signed)curr_len > 0) && \
446         ((consumed = elem_tlv(tvb, tree, pinfo, (guint8) EMT_iei, EMT_pdu_type, EMT_elem_idx, curr_offset, curr_len, EMT_elem_name_addition)) > 0)) \
447     { \
448         curr_offset += consumed; \
449         curr_len -= consumed; \
450     } \
451     else \
452     { \
453         proto_tree_add_expert_format(tree, pinfo, &ei_mandatory, \
454             tvb, curr_offset, 0, \
455             "Missing Mandatory element (0x%02x) %s%s, rest of dissection is suspect", \
456             EMT_iei, \
457             get_gsm_a_msg_string(EMT_pdu_type, EMT_elem_idx), \
458             /* coverity[array_null] */ \
459             (EMT_elem_name_addition == NULL) ? "" : EMT_elem_name_addition \
460             ); \
461     } \
462 }
463 /* This is a version where the length field can be one or two octets depending
464  * if the extension bit is set or not (TS 48.016 p 10.1.2).
465  *         8        7 6 5 4 3 2 1
466  * octet 2 0/1 ext  length
467  * octet 2a length
468  */
469 #define ELEM_MAND_TELV(EMT_iei, EMT_pdu_type, EMT_elem_idx, EMT_elem_name_addition, ei_mandatory) \
470 {\
471     if (((signed)curr_len > 0) && \
472         ((consumed = elem_telv(tvb, tree, pinfo, (guint8) EMT_iei, EMT_pdu_type, EMT_elem_idx, curr_offset, curr_len, EMT_elem_name_addition)) > 0)) \
473     { \
474         curr_offset += consumed; \
475         curr_len -= consumed; \
476     } \
477     else \
478     { \
479         proto_tree_add_expert_format(tree, pinfo, &ei_mandatory, \
480             tvb, curr_offset, 0, \
481             "Missing Mandatory element (0x%02x) %s%s, rest of dissection is suspect", \
482             EMT_iei, \
483             get_gsm_a_msg_string(EMT_pdu_type, EMT_elem_idx), \
484             /* coverity[array_null] */ \
485             (EMT_elem_name_addition == NULL) ? "" : EMT_elem_name_addition \
486             ); \
487     } \
488 }
489 
490 #define ELEM_MAND_TLV_E(EMT_iei, EMT_pdu_type, EMT_elem_idx, EMT_elem_name_addition, ei_mandatory) \
491 {\
492     if (((signed)curr_len > 0) && \
493         ((consumed = elem_tlv_e(tvb, tree, pinfo, (guint8) EMT_iei, EMT_pdu_type, EMT_elem_idx, curr_offset, curr_len, EMT_elem_name_addition)) > 0)) \
494     { \
495         curr_offset += consumed; \
496         curr_len -= consumed; \
497     } \
498     else \
499     { \
500         proto_tree_add_expert_format(tree, pinfo, &ei_mandatory, \
501             tvb, curr_offset, 0, \
502             "Missing Mandatory element (0x%02x) %s%s, rest of dissection is suspect", \
503             EMT_iei, \
504             get_gsm_a_msg_string(EMT_pdu_type, EMT_elem_idx), \
505             /* coverity[array_null] */ \
506             (EMT_elem_name_addition == NULL) ? "" : EMT_elem_name_addition \
507             ); \
508     } \
509 }
510 #define ELEM_OPT_TLV(EOT_iei, EOT_pdu_type, EOT_elem_idx, EOT_elem_name_addition) \
511 {\
512     if ((signed)curr_len <= 0) return; \
513     if ((consumed = elem_tlv(tvb, tree, pinfo, (guint8) EOT_iei, EOT_pdu_type, EOT_elem_idx, curr_offset, curr_len, EOT_elem_name_addition)) > 0) \
514     { \
515         curr_offset += consumed; \
516         curr_len -= consumed; \
517     } \
518 }
519 
520 #define ELEM_OPT_TELV(EOT_iei, EOT_pdu_type, EOT_elem_idx, EOT_elem_name_addition) \
521 {\
522     if ((signed)curr_len <= 0) return; \
523     if ((consumed = elem_telv(tvb, tree, pinfo, (guint8) EOT_iei, EOT_pdu_type, EOT_elem_idx, curr_offset, curr_len, EOT_elem_name_addition)) > 0) \
524     { \
525         curr_offset += consumed; \
526         curr_len -= consumed; \
527     } \
528 }
529 
530 #define ELEM_OPT_TLV_E(EOT_iei, EOT_pdu_type, EOT_elem_idx, EOT_elem_name_addition) \
531 {\
532     if ((signed)curr_len <= 0) return; \
533     if ((consumed = elem_tlv_e(tvb, tree, pinfo, (guint8) EOT_iei, EOT_pdu_type, EOT_elem_idx, curr_offset, curr_len, EOT_elem_name_addition)) > 0) \
534     { \
535         curr_offset += consumed; \
536         curr_len -= consumed; \
537     } \
538 }
539 
540 #define ELEM_MAND_TV(EMT_iei, EMT_pdu_type, EMT_elem_idx, EMT_elem_name_addition, ei_mandatory) \
541 {\
542     if (((signed)curr_len > 0) && \
543         ((consumed = elem_tv(tvb, tree, pinfo, (guint8) EMT_iei, EMT_pdu_type, EMT_elem_idx, curr_offset, EMT_elem_name_addition)) > 0)) \
544     { \
545         curr_offset += consumed; \
546         curr_len -= consumed; \
547     } \
548     else \
549     { \
550         proto_tree_add_expert_format(tree, pinfo, &ei_mandatory,\
551             tvb, curr_offset, 0, \
552             "Missing Mandatory element (0x%02x) %s%s, rest of dissection is suspect", \
553             EMT_iei, \
554             get_gsm_a_msg_string(EMT_pdu_type, EMT_elem_idx), \
555             /* coverity[array_null] */ \
556             (EMT_elem_name_addition == NULL) ? "" : EMT_elem_name_addition \
557         ); \
558     } \
559 }
560 
561 #define ELEM_OPT_TV(EOT_iei, EOT_pdu_type, EOT_elem_idx, EOT_elem_name_addition) \
562 {\
563     if ((signed)curr_len <= 0) return; \
564     if ((consumed = elem_tv(tvb, tree, pinfo, (guint8) EOT_iei, EOT_pdu_type, EOT_elem_idx, curr_offset, EOT_elem_name_addition)) > 0) \
565     { \
566         curr_offset += consumed; \
567         curr_len -= consumed; \
568     } \
569 }
570 
571 #define ELEM_OPT_TV_SHORT(EOT_iei, EOT_pdu_type, EOT_elem_idx, EOT_elem_name_addition) \
572 {\
573     if ((signed)curr_len <= 0) return; \
574     if ((consumed = elem_tv_short(tvb, tree, pinfo, EOT_iei, EOT_pdu_type, EOT_elem_idx, curr_offset, EOT_elem_name_addition)) > 0) \
575     { \
576         curr_offset += consumed; \
577         curr_len -= consumed; \
578     } \
579 }
580 
581 #define ELEM_OPT_T(EOT_iei, EOT_pdu_type, EOT_elem_idx, EOT_elem_name_addition) \
582 {\
583     if ((signed)curr_len <= 0) return; \
584     if ((consumed = elem_t(tvb, tree, pinfo, (guint8) EOT_iei, EOT_pdu_type, EOT_elem_idx, curr_offset, EOT_elem_name_addition)) > 0) \
585     { \
586         curr_offset += consumed; \
587         curr_len -= consumed; \
588     } \
589 }
590 
591 #define ELEM_MAND_LV(EML_pdu_type, EML_elem_idx, EML_elem_name_addition, ei_mandatory) \
592 {\
593     if (((signed)curr_len > 0) && \
594         ((consumed = elem_lv(tvb, tree, pinfo, EML_pdu_type, EML_elem_idx, curr_offset, curr_len, EML_elem_name_addition)) > 0)) \
595     { \
596         curr_offset += consumed; \
597         curr_len -= consumed; \
598     } \
599     else \
600     { \
601         proto_tree_add_expert_format(tree, pinfo, &ei_mandatory,\
602             tvb, curr_offset, 0, \
603             "Missing Mandatory element %s%s, rest of dissection is suspect", \
604             get_gsm_a_msg_string(EML_pdu_type, EML_elem_idx), \
605             /* coverity[array_null] */ \
606             (EML_elem_name_addition == NULL) ? "" : EML_elem_name_addition \
607         ); \
608     } \
609 }
610 
611 #define ELEM_MAND_LV_E(EML_pdu_type, EML_elem_idx, EML_elem_name_addition, ei_mandatory) \
612 {\
613     if (((signed)curr_len > 0) && \
614         ((consumed = elem_lv_e(tvb, tree, pinfo, EML_pdu_type, EML_elem_idx, curr_offset, curr_len, EML_elem_name_addition)) > 0)) \
615     { \
616         curr_offset += consumed; \
617         curr_len -= consumed; \
618     } \
619     else \
620     { \
621         proto_tree_add_expert_format(tree, pinfo, &ei_mandatory,\
622             tvb, curr_offset, 0, \
623             "Missing Mandatory element %s%s, rest of dissection is suspect", \
624             get_gsm_a_msg_string(EML_pdu_type, EML_elem_idx), \
625             /* coverity[array_null] */ \
626             (EML_elem_name_addition == NULL) ? "" : EML_elem_name_addition \
627         ); \
628     } \
629 }
630 
631 #define ELEM_MAND_V(EMV_pdu_type, EMV_elem_idx, EMV_elem_name_addition, ei_mandatory) \
632 {\
633     if (((signed)curr_len > 0) && \
634         ((consumed = elem_v(tvb, tree, pinfo, EMV_pdu_type, EMV_elem_idx, curr_offset, EMV_elem_name_addition)) > 0)) \
635     { \
636         curr_offset += consumed; \
637         curr_len -= consumed; \
638     } \
639     else \
640     { \
641         proto_tree_add_expert_format(tree, pinfo, &ei_mandatory,\
642             tvb, curr_offset, 0, \
643             "Missing Mandatory element %s%s, rest of dissection is suspect", \
644             get_gsm_a_msg_string(EMV_pdu_type, EMV_elem_idx), \
645             /* coverity[array_null] */ \
646             (EMV_elem_name_addition == NULL) ? "" : EMV_elem_name_addition \
647         ); \
648     } \
649 }
650 
651 #define ELEM_MAND_VV_SHORT(EMV_pdu_type1, EMV_elem_idx1, EMV_pdu_type2, EMV_elem_idx2, ei_mandatory) \
652 {\
653     if ((signed)curr_len > 0) \
654     { \
655         elem_v_short(tvb, tree, pinfo, EMV_pdu_type1, EMV_elem_idx1, curr_offset, RIGHT_NIBBLE); \
656         elem_v_short(tvb, tree, pinfo, EMV_pdu_type2, EMV_elem_idx2, curr_offset, LEFT_NIBBLE); \
657         curr_offset ++ ; /* consumed length is 1, regardless of contents */ \
658         curr_len -- ; \
659     } \
660     else \
661     { \
662         proto_tree_add_expert_format(tree, pinfo, &ei_mandatory,\
663             tvb, curr_offset, 0, \
664             "Missing Mandatory elements %s %s, rest of dissection is suspect", \
665             get_gsm_a_msg_string(EMV_pdu_type1, EMV_elem_idx1), \
666             get_gsm_a_msg_string(EMV_pdu_type2, EMV_elem_idx2) \
667             /* coverity[array_null] */ \
668         ); \
669     } \
670 }
671 
672 /*
673  * this enum must be kept in-sync with 'gsm_a_pd_str'
674  * it is used as an index into the array
675  */
676 typedef enum
677 {
678     PD_GCC = 0,
679     PD_BCC,
680     PD_RSVD_1,
681     PD_CC,
682     PD_GTTP,
683     PD_MM,
684     PD_RR,
685     PD_UNK_1,
686     PD_GMM,
687     PD_SMS,
688     PD_SM,
689     PD_SS,
690     PD_LCS,
691     PD_UNK_2,
692     PD_RSVD_EXT,
693     PD_TP
694 }
695 gsm_a_pd_str_e;
696 
697 typedef struct _gsm_a_tap_rec_t {
698     /*
699      * value from packet-bssap.h
700      */
701     guint8      pdu_type;
702     guint8      message_type;
703     gsm_a_pd_str_e  protocol_disc;
704 } gsm_a_tap_rec_t;
705 
706 void bssmap_old_bss_to_new_bss_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo);
707 void bssmap_new_bss_to_old_bss_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo);
708 
709 void dtap_mm_mm_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len);
710 
711 guint16 be_cell_id_aux(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len, guint8 disc);
712 guint16 be_cell_id_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len, guint8 disc, e212_number_type_t number_type);
713 guint16 be_cell_id_list(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
714 guint16 be_chan_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
715 guint16 be_prio(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
716 
717 WS_DLL_PUBLIC
718 guint16 de_lai(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
719 WS_DLL_PUBLIC
720 guint16 de_mid(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
721 WS_DLL_PUBLIC
722 guint16 de_cell_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
723 guint16 de_bearer_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
724 guint16 de_bearer_cap_uplink(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
725 guint16 be_emlpp_prio(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
726 guint16 be_ganss_loc_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
727 guint16 be_ganss_pos_dta(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
728 guint16 be_ganss_ass_dta(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
729 guint16 de_cn_common_gsm_map_nas_sys_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
730 guint16 de_cs_domain_spec_sys_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
731 guint16 de_ps_domain_spec_sys_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
732 guint16 de_plmn_list(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
733 WS_DLL_PUBLIC
734 guint16 de_ms_cm_1(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
735 WS_DLL_PUBLIC
736 guint16 de_ms_cm_2(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
737 WS_DLL_PUBLIC
738 guint16 de_ms_cm_3(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
739 guint16 de_serv_cat(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
740 WS_DLL_PUBLIC
741 guint16 de_sm_apn(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
742 guint16 de_sm_cause(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
743 guint16 de_sm_pco(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
744 guint16 de_sm_pdp_addr(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_);
745 WS_DLL_PUBLIC
746 guint16 de_sm_qos(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
747 WS_DLL_PUBLIC
748 guint16 de_sm_pflow_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
749 guint16 de_sm_tflow_temp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
750 guint16 de_sm_tmgi(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo, guint32 offset, guint len, gchar* add_string _U_, int string_len _U_);
751 guint16 de_time_zone(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
752 WS_DLL_PUBLIC
753 guint16 de_gmm_drx_param(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
754 WS_DLL_PUBLIC
755 guint16 de_gmm_ms_net_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
756 WS_DLL_PUBLIC
757 guint16 de_gmm_rai(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
758 WS_DLL_PUBLIC
759 guint16 de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
760 guint16 de_gmm_voice_domain_pref(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
761 
762 guint16 de_sup_codec_list(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
763 
764 guint16 de_gc_timer3(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
765 
766 WS_DLL_PUBLIC
767 guint16 de_rr_cause(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
768 WS_DLL_PUBLIC
769 guint16 de_rr_cell_dsc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
770 WS_DLL_PUBLIC
771 guint16 de_rr_ch_dsc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
772 WS_DLL_PUBLIC
773 guint16 de_rr_ch_mode(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
774 WS_DLL_PUBLIC
775 guint16 de_rr_chnl_needed(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
776 WS_DLL_PUBLIC
777 guint16 de_rr_cip_mode_set(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
778 WS_DLL_PUBLIC
779 guint16 de_rr_cm_enq_mask(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
780 guint16 de_rr_meas_res(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
781 guint16 de_rr_mob_all(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
782 WS_DLL_PUBLIC
783 guint16 de_rr_multirate_conf(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
784 WS_DLL_PUBLIC
785 guint16 de_rr_sus_cau(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
786 WS_DLL_PUBLIC
787 guint16 de_rr_tlli(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
788 
789 WS_DLL_PUBLIC
790 guint16 de_rej_cause(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
791 WS_DLL_PUBLIC
792 guint16 de_d_gb_call_ref(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
793 guint16 de_spare_nibble(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_);
794 
795 guint16 de_emm_ue_net_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
796 guint16 de_emm_trac_area_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
797 guint16 de_emm_sec_par_from_eutra(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_);
798 guint16 de_emm_sec_par_to_eutra(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_);
799 guint16 de_emm_ue_add_sec_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_);
800 guint16 de_esm_qos(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_);
801 guint16 de_esm_apn_aggr_max_br(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_);
802 guint16 de_esm_ext_apn_agr_max_br(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_);
803 guint16 de_esm_ext_eps_qos(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_);
804 guint16 de_esm_rel_assist_ind(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_);
805 
806 void nas_esm_pdn_con_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len);
807 
808 guint16 de_nas_5gs_mm_ue_radio_cap_id(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo, guint32 offset, guint len, gchar* add_string _U_, int string_len _U_);
809 guint16 de_nas_5gs_cmn_s_nssai(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_);
810 guint16 de_nas_5gs_sm_qos_rules(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_);
811 guint16 de_nas_5gs_sm_qos_flow_des(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_);
812 guint16 de_nas_5gs_sm_session_ambr(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_);
813 void de_nas_5gs_intra_n1_mode_nas_transparent_cont(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_);
814 void de_nas_5gs_n1_mode_to_s1_mode_nas_transparent_cont(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_);
815 void de_nas_5gs_s1_mode_to_n1_mode_nas_transparent_cont(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_);
816 
817 void dtap_rr_ho_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len);
818 void dtap_rr_cip_mode_cpte(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len);
819 
820 void bssmap_perf_loc_abort(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len);
821 void bssmap_reset(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len);
822 void bssmap_conn_oriented(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len);
823 guint16 bssmap_dissect_cause(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
824 
825 
826 void rp_data_n_ms(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len);
827 
828 guint16 de_sgsap_ecgi(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_);
829 
830 /*
831  * the following allows TAP code access to the messages
832  * without having to duplicate it. With MSVC and a
833  * libwireshark.dll, we need a special declaration.
834  */
835 WS_DLL_PUBLIC const value_string gsm_a_bssmap_msg_strings[];
836 WS_DLL_PUBLIC const value_string gsm_a_dtap_msg_mm_strings[];
837 WS_DLL_PUBLIC const value_string gsm_a_dtap_msg_rr_strings[];
838 WS_DLL_PUBLIC const value_string gsm_a_dtap_msg_cc_strings[];
839 WS_DLL_PUBLIC const value_string gsm_a_dtap_msg_gmm_strings[];
840 WS_DLL_PUBLIC const value_string gsm_a_dtap_msg_sms_strings[];
841 WS_DLL_PUBLIC const value_string gsm_a_dtap_msg_sm_strings[];
842 WS_DLL_PUBLIC const value_string gsm_a_dtap_msg_ss_strings[];
843 WS_DLL_PUBLIC const value_string gsm_a_dtap_msg_tp_strings[];
844 WS_DLL_PUBLIC const value_string gsm_a_rr_short_pd_msg_strings[];
845 WS_DLL_PUBLIC const gchar *gsm_a_pd_str[];
846 
847 extern const value_string gsm_a_sm_qos_del_of_err_sdu_vals[];
848 extern const value_string gsm_a_sm_qos_traffic_cls_vals[];
849 extern const value_string gsm_a_sm_qos_ber_vals[];
850 extern const value_string gsm_a_sm_qos_sdu_err_rat_vals[];
851 extern const value_string gsm_a_sm_qos_traff_hdl_pri_vals[];
852 
853 extern const value_string gsm_a_dtap_type_of_number_values[];
854 extern const value_string gsm_a_dtap_numbering_plan_id_values[];
855 extern const value_string gsm_a_sms_vals[];
856 extern const value_string tighter_cap_level_vals[];
857 extern value_string_ext gsm_a_rr_rxlev_vals_ext;
858 extern const value_string gsm_a_rr_rxqual_vals[];
859 extern const value_string gsm_a_gm_type_of_ciph_alg_vals[];
860 
861 extern value_string_ext nas_eps_emm_cause_values_ext;
862 extern const value_string nas_eps_emm_cause_values[];
863 extern const value_string nas_eps_esm_cause_vals[];
864 
865 extern const value_string nas_5gs_pdu_session_id_vals[];
866 extern const value_string nas_5gs_sm_cause_vals[];
867 
868 typedef enum
869 {
870     /* Common Information Elements [3] 10.5.1 */
871     DE_CELL_ID,                        /* Cell Identity */
872     DE_CIPH_KEY_SEQ_NUM,               /* Ciphering Key Sequence Number */
873     DE_LAI,                            /* Location Area Identification */
874     DE_MID,                            /* Mobile Identity */
875     DE_MS_CM_1,                        /* Mobile Station Classmark 1 */
876     DE_MS_CM_2,                        /* Mobile Station Classmark 2 */
877     DE_MS_CM_3,                        /* Mobile Station Classmark 3 */
878     DE_SPARE_NIBBLE,                   /* Spare Half Octet */
879     DE_D_GB_CALL_REF,                  /* Descriptive group or broadcast call reference */
880     DE_G_CIPH_KEY_NUM,                 /* Group Cipher Key Number */
881     DE_PD_SAPI,                        /* PD and SAPI $(CCBS)$ */
882     DE_PRIO,                           /* Priority Level */
883     DE_CN_COMMON_GSM_MAP_NAS_SYS_INFO, /* CN Common GSM-MAP NAS system information */
884     DE_CS_DOMAIN_SPEC_SYS_INFO,        /* CS domain specific system information */
885     DE_PS_DOMAIN_SPEC_SYS_INFO,        /* PS domain specific system information */
886     DE_PLMN_LIST,                      /* PLMN List */
887     DE_NAS_CONT_FOR_PS_HO,             /* 10.5.1.14 NAS container for PS HO */
888     DE_MS_NET_FEAT_SUP,                /* 10.5.1.15 MS network feature support */
889 
890     DE_COMMON_NONE          /* NONE */
891 }
892 common_elem_idx_t;
893 
894 typedef enum
895 {
896     BE_UDEF_0,                          /* Undefined */
897     BE_CIC,                             /* Circuit Identity Code */
898     BE_RSVD_1,                          /* Reserved */
899     BE_RES_AVAIL,                       /* Resource Available */
900     BE_CAUSE,                           /* Cause */
901     BE_CELL_ID,                         /* Cell Identifier */
902     BE_PRIO,                            /* Priority */
903     BE_L3_HEADER_INFO,                  /* Layer 3 Header Information */
904     BE_IMSI,                            /* IMSI */
905     BE_TMSI,                            /* TMSI */
906     BE_ENC_INFO,                        /* Encryption Information */
907     BE_CHAN_TYPE,                       /* Channel Type */
908     BE_PERIODICITY,                     /* Periodicity */
909     BE_EXT_RES_IND,                     /* Extended Resource Indicator */
910     BE_NUM_MS,                          /* Number Of MSs */
911     BE_RSVD_2,                          /* Reserved */
912     BE_RSVD_3,                          /* Reserved */
913     BE_RSVD_4,                          /* Reserved */
914     BE_CM_INFO_2,                       /* Classmark Information Type 2 */
915     BE_CM_INFO_3,                       /* Classmark Information Type 3 */
916     BE_INT_BAND,                        /* Interference Band To Be Used */
917     BE_RR_CAUSE,                        /* RR Cause */
918     BE_RSVD_5,                          /* Reserved */
919     BE_L3_INFO,                         /* Layer 3 Information */
920     BE_DLCI,                            /* DLCI */
921     BE_DOWN_DTX_FLAG,                   /* Downlink DTX Flag */
922     BE_CELL_ID_LIST,                    /* Cell Identifier List */
923     BE_RESP_REQ,                        /* Response Request */
924     BE_RES_IND_METHOD,                  /* Resource Indication Method */
925     BE_CM_INFO_1,                       /* Classmark Information Type 1 */
926     BE_CIC_LIST,                        /* Circuit Identity Code List */
927     BE_DIAG,                            /* Diagnostic */
928     BE_L3_MSG,                          /* Layer 3 Message Contents */
929     BE_CHOSEN_CHAN,                     /* Chosen Channel */
930     BE_TOT_RES_ACC,                     /* Total Resource Accessible */
931     BE_CIPH_RESP_MODE,                  /* Cipher Response Mode */
932     BE_CHAN_NEEDED,                     /* Channel Needed */
933     BE_TRACE_TYPE,                      /* Trace Type */
934     BE_TRIGGERID,                       /* TriggerID */
935     BE_TRACE_REF,                       /* Trace Reference */
936     BE_TRANSID,                         /* TransactionID */
937     BE_MID,                             /* Mobile Identity */
938     BE_OMCID,                           /* OMCID */
939     BE_FOR_IND,                         /* Forward Indicator */
940     BE_CHOSEN_ENC_ALG,                  /* Chosen Encryption Algorithm */
941     BE_CCT_POOL,                        /* Circuit Pool */
942     BE_CCT_POOL_LIST,                   /* Circuit Pool List */
943     BE_TIME_IND,                        /* Time Indication */
944     BE_RES_SIT,                         /* Resource Situation */
945     BE_CURR_CHAN_1,                     /* Current Channel Type 1 */
946     BE_QUE_IND,                         /* Queueing Indicator */
947     BE_ASS_REQ,                         /* Assignment Requirement */
948     BE_UDEF_52,                         /* Undefined */
949     BE_TALKER_FLAG,                     /* Talker Flag */
950     BE_CONN_REL_REQ,                    /* Connection Release Requested */
951     BE_GROUP_CALL_REF,                  /* Group Call Reference */
952     BE_EMLPP_PRIO,                      /* eMLPP Priority */
953     BE_CONF_EVO_IND,                    /* Configuration Evolution Indication */
954     BE_OLD2NEW_INFO,                    /* Old BSS to New BSS Information */
955     BE_LSA_ID,                          /* LSA Identifier */
956     BE_LSA_ID_LIST,                     /* LSA Identifier List */
957     BE_LSA_INFO,                        /* LSA Information */
958     BE_LCS_QOS,                         /* LCS QoS */
959     BE_LSA_ACC_CTRL,                    /* LSA access control suppression */
960     BE_SPEECH_VER,                      /* Speech Version */
961     BE_UDEF_65,                         /* Undefined */
962     BE_UDEF_66,                         /* Undefined */
963     BE_LCS_PRIO,                        /* LCS Priority */
964     BE_LOC_TYPE,                        /* Location Type */
965     BE_LOC_EST,                         /* Location Estimate */
966     BE_POS_DATA,                        /* Positioning Data */
967     BE_LCS_CAUSE,                       /* 3.2.2.66 LCS Cause */
968     BE_LCS_CLIENT,                      /* 10.14 LCS Client Type */
969     BE_APDU,                            /* APDU */
970     BE_NE_ID,                           /* Network Element Identity */
971     BE_GPS_ASSIST_DATA,                 /* GPS Assistance Data */
972     BE_DECIPH_KEYS,                     /* Deciphering Keys */
973     BE_RET_ERR_REQ,                     /* Return Error Request */
974     BE_RET_ERR_CAUSE,                   /* Return Error Cause */
975     BE_SEG,                             /* Segmentation */
976     BE_SERV_HO,                         /* Service Handover */
977     BE_SRC_RNC_TO_TAR_RNC_UMTS,         /* Source RNC to target RNC transparent information (UMTS) */
978     BE_SRC_RNC_TO_TAR_RNC_CDMA,         /* Source RNC to target RNC transparent information (cdma2000) */
979     BE_GERAN_CLS_M,                     /* GERAN Classmark */
980     BE_GERAN_BSC_CONT,                  /* GERAN BSC Container */
981     BE_VEL_EST,                         /* Velocity Estimate */
982     BE_UDEF_86,                         /* Undefined */
983     BE_UDEF_87,                         /* Undefined */
984     BE_UDEF_88,                         /* Undefined */
985     BE_UDEF_89,                         /* Undefined */
986     BE_UDEF_90,                         /* Undefined */
987     BE_UDEF_91,                         /* Undefined */
988     BE_UDEF_92,                         /* Undefined */
989     BE_UDEF_93,                         /* Undefined */
990     BE_UDEF_94,                         /* Undefined */
991     BE_UDEF_95,                         /* Undefined */
992     BE_UDEF_96,                         /* Undefined */
993     BE_NEW_BSS_TO_OLD_BSS_INF,          /* New BSS to Old BSS Information */
994     BE_UDEF_98,                         /* Undefined */
995     BE_INTER_SYS_INF,                   /* Inter-System Information */
996     BE_SNA_ACC_INF,                     /* SNA Access Information */
997     BE_VSTK_RAND_INF,                   /* VSTK_RAND Information */
998     BE_VSTK_INF,                        /* VSTK Information */
999     BE_PAGING_INF,                      /* Paging Information */
1000     BE_IMEI,                            /* IMEI */
1001     BE_VGCS_FEAT_FLG,                   /* VGCS Feature Flags */
1002     BE_TALKER_PRI,                      /* Talker Priority */
1003     BE_EMRG_SET_IND,                    /* Emergency Set Indication */
1004     BE_TALKER_ID,                       /* Talker Identity */
1005     BE_CELL_ID_LIST_SEG,                /* Cell Identifier List Segment */
1006     BE_SMS_TO_VGCS,                     /* SMS to VGCS */
1007     BE_VGCS_TALKER_MOD,                 /* VGCS Talker Mode */
1008     BE_VGS_VBS_CELL_STAT,               /* VGCS/VBS Cell Status */
1009     BE_CELL_ID_LST_SEG_F_EST_CELLS,     /* Cell Identifier List Segment for established cells */
1010     BE_CELL_ID_LST_SEG_F_CELL_TB_EST,   /* Cell Identifier List Segment for cells to be established */
1011     BE_CELL_ID_LST_SEG_F_REL_CELL,      /* Cell Identifier List Segment for released cells - no user present */
1012     BE_CELL_ID_LST_SEG_F_NOT_EST_CELL,  /* Cell Identifier List Segment for not established cells - no establishment possible */
1013     BE_GANSS_ASS_DTA,                   /* GANSS Assistance Data */
1014     BE_GANSS_POS_DTA,                   /* GANSS Positioning Data */
1015     BE_GANSS_LOC_TYP,                   /* GANSS Location Type */
1016     BE_APP_DATA,                        /* Application Data */
1017     BE_DATA_ID,                         /* Data Identity */
1018     BE_APP_DATA_INF,                    /* Application Data Information */
1019     BE_MSISDN,                          /* MSISDN */
1020     BE_AOIP_TRANS_LAY_ADD,              /* AoIP Transport Layer Address */
1021     BE_SPEECH_CODEC_LST,                /* Speech Codec List */
1022     BE_SPEECH_CODEC,                    /* Speech Codec */
1023     BE_CALL_ID,                         /* Call Identifier */
1024     BE_CALL_ID_LST,                     /* Call Identifier List */
1025     BE_A_ITF_SEL_FOR_RESET,             /* A-Interface Selector for RESET */
1026     BE_UDEF_130,                        /* Undefined */
1027     BE_KC128,                           /* Kc128 */
1028     BE_CSG_ID,                          /* CSG Identifier */
1029     BE_REDIR_ATT_FLG,                   /* Redirect Attempt Flag               3.2.2.111    */
1030     BE_REROUTE_REJ_CAUSE,               /* Reroute Reject Cause                3.2.2.112    */
1031     BE_SEND_SEQN,                       /* Send Sequence Number                3.2.2.113    */
1032     BE_REROUTE_OUTCOME,                 /* Reroute complete outcome            3.2.2.114    */
1033     BE_GLOBAL_CALL_REF,                 /* Global Call Reference               3.2.2.115    */
1034     BE_LCLS_CONF,                       /* LCLS-Configuration                  3.2.2.116    */
1035     BE_LCLS_CON_STATUS_CONTROL,         /* LCLS-Connection-Status-Control      3.2.2.117    */
1036     BE_LCLS_CORR_NOT_NEEDED,            /* LCLS-Correlation-Not-Needed         3.2.2.118    */
1037     BE_LCLS_BSS_STATUS,                 /* LCLS-BSS-Status                     3.2.2.119    */
1038     BE_LCLS_BREAK_REQ,                  /* LCLS-Break-Request                  3.2.2.120    */
1039     BE_CSFB_IND,                        /* CSFB Indication                     3.2.2.121    */
1040     BE_CS_TO_PS_SRVCC,                  /* CS to PS SRVCC                      3.2.2.122    */
1041     BE_SRC_ENB_2_TGT_ENB_TRANSP_INF,    /* Source eNB to target eNB transparent information (E-UTRAN)" 3.2.2.123    */
1042     BE_CS_TO_PS_SRVCC_IND,              /* CS to PS SRVCC Indication           3.2.2.124    */
1043     BE_CN_TO_MS_TRANSP,                 /* CN to MS transparent information    3.2.2.125    */
1044     BE_SELECTED_PLMN_ID,                /* Selected PLMN ID                    3.2.2.126    */
1045     BE_LAST_USED_E_UTRAN_PLMN_ID,       /* Last used E-UTRAN PLMN ID           3.2.2.127    */
1046     BE_UDEF_150,                         /* Undefined Old Location Area Identification    3.2.2.128 */
1047     BE_UDEF_151,                         /* Undefined Attach Indicator    3.2.2.129 */
1048     BE_UDEF_152,                         /* Undefined Selected Operator    3.2.2.130 */
1049     BE_UDEF_153,                         /* Undefined PS Registered Operator    3.2.2.131 */
1050     BE_UDEF_154,                         /* Undefined CS Registered Operator    3.2.2.132*/
1051     BE_UDEF_155,                         /* Undefined */
1052     BE_UDEF_156,                         /* Undefined */
1053     BE_UDEF_157,                         /* Undefined */
1054     BE_UDEF_158,                         /* Undefined */
1055     BE_UDEF_159,                         /* Undefined */
1056     BE_UDEF_160,                         /* Undefined */
1057     BE_UDEF_161,                         /* Undefined */
1058     BE_UDEF_162,                         /* Undefined */
1059     BE_UDEF_163,                         /* Undefined */
1060     BE_UDEF_164,                         /* Undefined */
1061     BE_UDEF_165,                         /* Undefined */
1062     BE_UDEF_166,                         /* Undefined */
1063     BE_UDEF_167,                         /* Undefined */
1064     BE_UDEF_168,                         /* Undefined */
1065     BE_UDEF_169,                         /* Undefined */
1066     BE_UDEF_170,                         /* Undefined */
1067     BE_UDEF_171,                         /* Undefined */
1068     BE_UDEF_172,                         /* Undefined */
1069     BE_UDEF_173,                         /* Undefined */
1070     BE_UDEF_174,                         /* Undefined */
1071     BE_UDEF_175,                         /* Undefined */
1072     BE_UDEF_176,                         /* Undefined */
1073     BE_UDEF_177,                         /* Undefined */
1074     BE_UDEF_178,                         /* Undefined */
1075     BE_UDEF_179,                         /* Undefined */
1076     BE_UDEF_180,                         /* Undefined */
1077     BE_UDEF_181,                         /* Undefined */
1078     BE_UDEF_182,                         /* Undefined */
1079     BE_UDEF_183,                         /* Undefined */
1080     BE_UDEF_184,                         /* Undefined */
1081     BE_UDEF_185,                         /* Undefined */
1082     BE_UDEF_186,                         /* Undefined */
1083     BE_UDEF_187,                         /* Undefined */
1084     BE_UDEF_188,                         /* Undefined */
1085     BE_UDEF_189,                         /* Undefined */
1086     BE_UDEF_190,                         /* Undefined */
1087     BE_UDEF_191,                         /* Undefined */
1088     BE_UDEF_192,                         /* Undefined */
1089     BE_UDEF_193,                         /* Undefined */
1090     BE_UDEF_194,                         /* Undefined */
1091     BE_UDEF_195,                         /* Undefined */
1092     BE_UDEF_196,                         /* Undefined */
1093     BE_UDEF_197,                         /* Undefined */
1094     BE_UDEF_198,                         /* Undefined */
1095     BE_UDEF_199,                         /* Undefined */
1096     BE_UDEF_200,                         /* Undefined */
1097     BE_UDEF_201,                         /* Undefined */
1098     BE_UDEF_202,                         /* Undefined */
1099     BE_UDEF_203,                         /* Undefined */
1100     BE_UDEF_204,                         /* Undefined */
1101     BE_UDEF_205,                         /* Undefined */
1102     BE_UDEF_206,                         /* Undefined */
1103     BE_UDEF_207,                         /* Undefined */
1104     BE_UDEF_208,                         /* Undefined */
1105     BE_UDEF_209,                         /* Undefined */
1106     BE_UDEF_210,                         /* Undefined */
1107     BE_UDEF_211,                         /* Undefined */
1108     BE_UDEF_212,                         /* Undefined */
1109     BE_UDEF_213,                         /* Undefined */
1110     BE_UDEF_214,                         /* Undefined */
1111     BE_UDEF_215,                         /* Undefined */
1112     BE_UDEF_216,                         /* Undefined */
1113     BE_UDEF_217,                         /* Undefined */
1114     BE_UDEF_218,                         /* Undefined */
1115     BE_UDEF_219,                         /* Undefined */
1116     BE_UDEF_220,                         /* Undefined */
1117     BE_UDEF_221,                         /* Undefined */
1118     BE_UDEF_222,                         /* Undefined */
1119     BE_UDEF_223,                         /* Undefined */
1120     BE_UDEF_224,                         /* Undefined */
1121     BE_UDEF_225,                         /* Undefined */
1122     BE_UDEF_226,                         /* Undefined */
1123     BE_UDEF_227,                         /* Undefined */
1124     BE_UDEF_228,                         /* Undefined */
1125     BE_UDEF_229,                         /* Undefined */
1126     BE_UDEF_230,                         /* Undefined */
1127     BE_UDEF_231,                         /* Undefined */
1128     BE_UDEF_232,                         /* Undefined */
1129     BE_UDEF_233,                         /* Undefined */
1130     BE_UDEF_234,                         /* Undefined */
1131     BE_UDEF_235,                         /* Undefined */
1132     BE_UDEF_236,                         /* Undefined */
1133     BE_UDEF_237,                         /* Undefined */
1134     BE_UDEF_238,                         /* Undefined */
1135     BE_UDEF_239,                         /* Undefined */
1136     BE_OSMOCOM_OSMUX_SUPPORT = 0xf0,    /* Osmocom extension: Osmux Support */
1137     BE_OSMOCOM_OSMUX_CID = 0xf1,        /* Osmocom extension: Osmux CID */
1138     BE_NONE                             /* NONE */
1139 }
1140 bssmap_elem_idx_t;
1141 
1142 typedef enum
1143 {
1144     /* BSSMAP LE Elements */
1145     DE_BMAPLE_LCSQOS,           /* LCS QOS */
1146     DE_BMAPLE_LCS_PRIO,         /* LCS Priority */
1147     DE_BMAPLE_LOC_TYPE,         /* Location Type */
1148     DE_BMAPLE_GANSS_LOC_TYPE,   /* GANSS Location Type */
1149     DE_BMAPLE_GEO_LOC,          /* 10.9 Geographic Location */
1150     DE_BMAPLE_POS_DATA,         /* Positioning Data */
1151     DE_BMAPLE_GANSS_POS_DATA,   /* GANSS Positioning Data */
1152     DE_BMAPLE_VELOC_DATA,       /* Velocity Data */
1153     DE_BMAPLE_LCS_CAUSE,        /* LCS Cause */
1154     DE_BMAPLE_LCS_CLIENT_TYPE,  /* LCS Client Type */
1155     DE_BMAPLE_APDU,             /* 10.3 APDU */
1156     DE_BMAPLE_NETWORK_ELEM_ID,  /* Network Element Identity */
1157     DE_BMAPLE_REQ_GPS_ASSIST_D, /* 10.10 Requested GPS Assistance Data */
1158     DE_BMAPLE_REQ_GNSS_ASSIST_D,/* Requested GANSS Assistance Data */
1159     DE_BMAPLE_DECIPH_KEYS,      /* 10.8 Deciphering Keys */
1160     DE_BMAPLE_RETURN_ERROR_REQ, /* Return Error Request */
1161     DE_BMAPLE_RETURN_ERROR_CAUSE,   /* Return Error Cause */
1162     DE_BMAPLE_SEGMENTATION,     /* Segmentation */
1163     DE_BMAPLE_CLASSMARK_TYPE_3, /* Classmark Information Type 3 */
1164     DE_BMAPLE_CAUSE,            /* 10.4 Cause */
1165     DE_BMAPLE_CELL_IDENTIFIER,  /* 10.5 Cell Identifier */
1166     DE_BMAPLE_CHOSEN_CHANNEL,   /* 10.6 Chosen Channel */
1167     DE_BMAPLE_IMSI,             /* 10.11 IMSI */
1168     DE_BMAPLE_RES1,             /* Reserved */
1169     DE_BMAPLE_RES2,             /* Reserved */
1170     DE_BMAPLE_RES3,             /* Reserved */
1171     DE_BMAPLE_LCS_CAPABILITY,   /* LCS Capability */
1172     DE_BMAPLE_PACKET_MEAS_REP,  /* Packet Measurement Report */
1173     DE_BMAPLE_MEAS_CELL_ID,     /* Measured Cell Identity */
1174     DE_BMAPLE_IMEI,             /* IMEI */
1175     BMAPLE_NONE                 /* NONE */
1176 }
1177 bssmap_le_elem_idx_t;
1178 
1179 typedef enum
1180 {
1181     /* BSS LAP Elements 5 */
1182     DE_BLAP_RES1,           /* Reserved */
1183     DE_BLAP_TA,             /* Timing Advance */
1184     DE_BLAP_RES3,           /* Reserved */          /* (note) */
1185     DE_BLAP_RES4,           /* Cell Identity */
1186     DE_BLAP_RES5,           /* Reserved */          /* (note) */
1187     DE_BLAP_RES6,           /* Reserved */          /* (note) */
1188     DE_BLAP_RES7,           /* Reserved */          /* (note) */
1189     DE_BLAP_CH_DESC,        /* Channel Description */
1190     DE_BLAP_RES9,           /* Reserved */          /* (note) */
1191     DE_BLAP_RES10,          /* Reserved */          /* (note) */
1192     DE_BLAP_RES11,          /* Reserved */          /* (note) */
1193     DE_BLAP_MEAS_REP,       /* Measurement Report */
1194     DE_BLAP_RES13,          /* Reserved */          /* (note) */
1195     DE_BLAP_CAUSE,          /* Cause */
1196     DE_BLAP_RRLP_FLG,       /* RRLP Flag */
1197     DE_BLAP_RRLP_IE,        /* RRLP IE */
1198     DE_BLAP_CELL_ID_LIST,   /* Cell Identity List */
1199     DE_BLAP_ENH_MEAS_REP,   /* Enhanced Measurement Report */
1200     DE_BLAP_LAC,            /* Location Area Code */
1201     DE_BLAP_FREQ_LIST,      /* Frequency List */
1202     DE_BLAP_MS_POW,         /* MS Power */
1203     DE_BLAP_DELTA_TIME,     /* Delta Timer */
1204     DE_BLAP_SERV_CELL_ID,   /* Serving Cell Identifier */
1205     DE_BLAP_ENC_KEY,        /* Encryption Key (Kc) */
1206     DE_BLAP_CIP_M_SET,      /* Cipher Mode Setting */
1207     DE_BLAP_CH_MODE,        /* Channel Mode */
1208     DE_BLAP_POLL_REP,       /* Polling Repetition */
1209     DE_BLAP_PKT_CH_DESC,    /* Packet Channel Description */
1210     DE_BLAP_TLLI,           /* TLLI */
1211     DE_BLAP_TFI,            /* TFI */
1212     DE_BLAP_START_TIME,     /* Starting Time */
1213     BSSLAP_NONE             /* NONE */
1214 }
1215 bsslap_elem_idx_t;
1216 
1217 typedef enum
1218 {
1219     /* Mobility Management Information Elements [3] 10.5.3 */
1220     DE_AUTH_PARAM_RAND,             /* Authentication Parameter RAND */
1221     DE_AUTH_PARAM_AUTN,             /* Authentication Parameter AUTN (UMTS and EPS authentication challenge) */
1222     DE_AUTH_RESP_PARAM,             /* Authentication Response Parameter */
1223     DE_AUTH_RESP_PARAM_EXT,         /* Authentication Response Parameter (extension) (UMTS authentication challenge only) */
1224     DE_AUTH_FAIL_PARAM,             /* Authentication Failure Parameter (UMTS and EPS authentication challenge) */
1225     DE_CM_SRVC_TYPE,                /* CM Service Type */
1226     DE_ID_TYPE,                     /* Identity Type */
1227     DE_LOC_UPD_TYPE,                /* Location Updating Type */
1228     DE_NETWORK_NAME,                /* Network Name */
1229     DE_REJ_CAUSE,                   /* Reject Cause */
1230     DE_FOP,                         /* Follow-on Proceed */
1231     DE_TIME_ZONE,                   /* Time Zone */
1232     DE_TIME_ZONE_TIME,              /* Time Zone and Time */
1233     DE_CTS_PERM,                    /* CTS Permission */
1234     DE_LSA_ID,                      /* LSA Identifier */
1235     DE_DAY_SAVING_TIME,             /* Daylight Saving Time */
1236     DE_EMERGENCY_NUM_LIST,          /* Emergency Number List */
1237     DE_ADD_UPD_PARAMS,              /* Additional update parameters */
1238     DE_MM_TIMER,                    /* MM Timer */
1239     /* Call Control Information Elements 10.5.4 */
1240     DE_AUX_STATES,                  /* Auxiliary States */
1241     DE_BEARER_CAP,                  /* Bearer Capability */
1242     DE_CC_CAP,                      /* Call Control Capabilities */
1243     DE_CALL_STATE,                  /* Call State */
1244     DE_CLD_PARTY_BCD_NUM,           /* Called Party BCD Number */
1245     DE_CLD_PARTY_SUB_ADDR,          /* Called Party Subaddress */
1246     DE_CLG_PARTY_BCD_NUM,           /* Calling Party BCD Number */
1247     DE_CLG_PARTY_SUB_ADDR,          /* Calling Party Subaddress */
1248     DE_CAUSE,                       /* Cause */
1249     DE_CLIR_SUP,                    /* CLIR Suppression */
1250     DE_CLIR_INV,                    /* CLIR Invocation */
1251     DE_CONGESTION,                  /* Congestion Level */
1252     DE_CONN_NUM,                    /* Connected Number */
1253     DE_CONN_SUB_ADDR,               /* Connected Subaddress */
1254     DE_FACILITY,                    /* Facility */
1255     DE_HLC,                         /* High Layer Compatibility */
1256     DE_KEYPAD_FACILITY,             /* Keypad Facility */
1257     DE_LLC,                         /* Low Layer Compatibility */
1258     DE_MORE_DATA,                   /* More Data */
1259     DE_NOT_IND,                     /* Notification Indicator */
1260     DE_PROG_IND,                    /* Progress Indicator */
1261     DE_RECALL_TYPE,                 /* Recall type $(CCBS)$ */
1262     DE_RED_PARTY_BCD_NUM,           /* Redirecting Party BCD Number */
1263     DE_RED_PARTY_SUB_ADDR,          /* Redirecting Party Subaddress */
1264     DE_REPEAT_IND,                  /* Repeat Indicator */
1265     DE_REV_CALL_SETUP_DIR,          /* Reverse Call Setup Direction */
1266     DE_SETUP_CONTAINER,             /* SETUP Container $(CCBS)$ */
1267     DE_SIGNAL,                      /* Signal */
1268     DE_SS_VER_IND,                  /* SS Version Indicator */
1269     DE_USER_USER,                   /* User-user */
1270     DE_ALERT_PATTERN,               /* Alerting Pattern $(NIA)$ */
1271     DE_ALLOWED_ACTIONS,             /* Allowed Actions $(CCBS)$ */
1272     DE_SI,                          /* Stream Identifier */
1273     DE_NET_CC_CAP,                  /* Network Call Control Capabilities */
1274     DE_CAUSE_NO_CLI,                /* Cause of No CLI */
1275     DE_SUP_CODEC_LIST,              /* Supported Codec List */
1276     DE_SERV_CAT,                    /* Service Category */
1277     DE_REDIAL,                      /* 10.5.4.34 Redial */
1278     DE_NET_INIT_SERV_UPG,           /* 10.5.4.35 Network-initiated Service Upgrade ind */
1279     /* Short Message Service Information Elements [5] 8.1.4 */
1280     DE_CP_USER_DATA,                /* CP-User Data */
1281     DE_CP_CAUSE,                    /* CP-Cause */
1282     /* Tests procedures information elements 3GPP TS 44.014 6.4.0 and 3GPP TS 34.109 6.4.0 */
1283     DE_TP_SUB_CHANNEL,                  /* Close TCH Loop Cmd Sub-channel */
1284     DE_TP_ACK,                          /* Open Loop Cmd Ack */
1285     DE_TP_LOOP_TYPE,                    /* Close Multi-slot Loop Cmd Loop type*/
1286     DE_TP_LOOP_ACK,                     /* Close Multi-slot Loop Ack Result */
1287     DE_TP_TESTED_DEVICE,                /* Test Interface Tested device */
1288     DE_TP_PDU_DESCRIPTION,              /* GPRS Test Mode Cmd PDU description */
1289     DE_TP_MODE_FLAG,                    /* GPRS Test Mode Cmd Mode flag */
1290     DE_TP_EGPRS_MODE_FLAG,              /* EGPRS Start Radio Block Loopback Cmd Mode flag */
1291     DE_TP_MS_POSITIONING_TECHNOLOGY,    /* MS Positioning Technology */
1292     DE_TP_UE_TEST_LOOP_MODE,            /* Close UE Test Loop Mode */
1293     DE_TP_UE_POSITIONING_TECHNOLOGY,    /* UE Positioning Technology */
1294     DE_TP_RLC_SDU_COUNTER_VALUE,        /* RLC SDU Counter Value */
1295     DE_TP_EPC_UE_TEST_LOOP_MODE,        /* UE Test Loop Mode */
1296     DE_TP_EPC_UE_TL_A_LB_SETUP,         /* UE Test Loop Mode A LB Setup */
1297     DE_TP_EPC_UE_TL_B_LB_SETUP,         /* UE Test Loop Mode B LB Setup */
1298     DE_TP_EPC_UE_TL_C_SETUP,            /* UE Test Loop Mode C Setup */
1299     DE_TP_EPC_UE_TL_D_SETUP,            /* UE Test Loop Mode D Setup */
1300     DE_TP_EPC_UE_TL_E_SETUP,            /* UE Test Loop Mode E Setup */
1301     DE_TP_EPC_UE_TL_F_SETUP,            /* UE Test Loop Mode F Setup */
1302     DE_TP_EPC_UE_TL_GH_SETUP,           /* UE Test Loop Mode GH Setup */
1303     DE_TP_EPC_UE_POSITIONING_TECHNOLOGY,/* UE Positioning Technology */
1304     DE_TP_EPC_MBMS_PACKET_COUNTER_VALUE,/* MBMS Packet Counter Value */
1305     DE_TP_EPC_ELLIPSOID_POINT_WITH_ALT, /* ellipsoidPointWithAltitude */
1306     DE_TP_EPC_HORIZONTAL_VELOCITY,      /* horizontalVelocity */
1307     DE_TP_EPC_GNSS_TOD_MSEC,            /* gnss-TOD-msec */
1308     /* Group Call Control Service Information Elements ETSI TS 100 948 V8.1.0 (GSM 04.68 version 8.1.0 Release 1999) */
1309     DE_GCC_CALL_REF,                    /* Call Reference */
1310     DE_GCC_CALL_STATE,                  /* Call state */
1311     DE_GCC_CAUSE,                       /* Cause */
1312     DE_GCC_ORIG_IND,                    /* Originator indication */
1313     DE_GCC_STATE_ATTR,                  /* State attributes */
1314     /* Broadcast Call Control Information Elements ETSI TS 144 069 V10.0.0 (3GPP TS 44.069 version 10.0.0 Release 10) */
1315     DE_BCC_CALL_REF,                    /* Call Reference */
1316     DE_BCC_CALL_STATE,                  /* Call state */
1317     DE_BCC_CAUSE,                       /* Cause */
1318     DE_BCC_ORIG_IND,                    /* Originator indication */
1319     DE_BCC_STATE_ATTR,                  /* State attributes */
1320     DE_BCC_COMPR_OTDI,                  /* Compressed otdi */
1321     DE_NONE                             /* NONE */
1322 }
1323 dtap_elem_idx_t;
1324 
1325 typedef enum
1326 {
1327     /* GPRS Mobility Management Information Elements [3] 10.5.5 */
1328     DE_ADD_UPD_TYPE,                /* [11] 10.5.5.0 Additional Update Type */
1329     DE_ATTACH_RES,                  /* [7] 10.5.5.1 Attach Result*/
1330     DE_ATTACH_TYPE,                 /* [7] 10.5.5.2 Attach Type */
1331     DE_CIPH_ALG,                    /* [7] 10.5.5.3 Ciphering Algorithm */
1332     DE_INTEG_ALG,                   /* [11] 10.5.5.3a Integrity Algorithm */
1333     DE_TMSI_STAT,                   /* [7] 10.5.5.4 TMSI Status */
1334     DE_DETACH_TYPE,                 /* [7] 10.5.5.5 Detach Type */
1335     DE_DRX_PARAM,                   /* [7] 10.5.5.6 DRX Parameter */
1336     DE_FORCE_TO_STAND,              /* [7] 10.5.5.7 Force to Standby */
1337     DE_FORCE_TO_STAND_H,            /* [7] 10.5.5.7 Force to Standby - Info is in the high nibble */
1338     DE_P_TMSI_SIG,                  /* [7] 10.5.5.8 P-TMSI Signature */
1339     DE_P_TMSI_SIG_2,                /* [7] 10.5.5.8a P-TMSI Signature 2 */
1340     DE_ID_TYPE_2,                   /* [7] 10.5.5.9 Identity Type 2 */
1341     DE_IMEISV_REQ,                  /* [7] 10.5.5.10 IMEISV Request */
1342     DE_REC_N_PDU_NUM_LIST,          /* [7] 10.5.5.11 Receive N-PDU Numbers List */
1343     DE_MS_NET_CAP,                  /* [7] 10.5.5.12 MS Network Capability */
1344     DE_MS_RAD_ACC_CAP,              /* [7] 10.5.5.12a MS Radio Access Capability */
1345     DE_GMM_CAUSE,                   /* [7] 10.5.5.14 GMM Cause */
1346     DE_RAI,                         /* [7] 10.5.5.15 Routing Area Identification */
1347     DE_RAI_2,                       /* [7] 10.5.5.15a Routing Area Identification 2 */
1348     DE_UPD_RES,                     /* [7] 10.5.5.17 Update Result */
1349     DE_UPD_TYPE,                    /* [7] 10.5.5.18 Update Type */
1350     DE_AC_REF_NUM,                  /* [7] 10.5.5.19 A&C Reference Number */
1351     DE_AC_REF_NUM_H,                /* A&C Reference Number - Info is in the high nibble */
1352     DE_SRVC_TYPE,                   /* [7] 10.5.5.20 Service Type */
1353     DE_CELL_NOT,                    /* [7] 10.5.5.21 Cell Notification */
1354     DE_PS_LCS_CAP,                  /* [7] 10.5.5.22 PS LCS Capability */
1355     DE_NET_FEAT_SUP,                /* [7] 10.5.5.23 Network Feature Support */
1356     DE_ADD_NET_FEAT_SUP,            /* [11] 10.5.5.23a Additional network feature support */
1357     DE_RAT_INFO_CONTAINER,          /* [7] 10.5.5.24 Inter RAT information container */
1358     DE_REQ_MS_INFO,                 /* [7] 10.5.5.25 Requested MS information */
1359     DE_UE_NETWORK_CAP,              /* [7] 10.5.5.26 UE network capability */
1360     DE_EUTRAN_IRAT_INFO_CONTAINER,  /* [7] 10.5.5.27 E-UTRAN inter RAT information container */
1361     DE_VOICE_DOMAIN_PREF,           /* [7] 10.5.5.28 Voice domain preference and UE's usage setting */
1362     DE_PTMSI_TYPE,                  /* [10] 10.5.5.29 P-TMSI type */
1363     DE_LAI_2,                       /* [10] 10.5.5.30 Location Area Identification 2 */
1364     DE_NET_RES_ID_CONT,             /* [11] 10.5.5.31 Network resource identifier container */
1365     DE_EXT_DRX_PARAMS,              /* [11] 10.5.5.32 Extended DRX parameters */
1366     DE_MAC,                         /* [11] 10.5.5.33 Message Authentication Code */
1367     DE_UP_INTEG_IND,                /* [11] 10.5.5.34 User Plane integrity indicator */
1368     DE_DCN_ID,                      /* [12] 10.5.5.35 DCN-ID */
1369     DE_PLMN_ID_CN_OPERATOR,         /* [12] 10.5.5.36 PLMN identity of the CN operator */
1370     DE_NON_3GPP_NW_PROV_POL,        /* [12] 10.5.5.37 Non-3GPP NW provided policies */
1371     /* Session Management Information Elements [3] 10.5.6 */
1372     DE_ACC_POINT_NAME,              /* Access Point Name */
1373     DE_NET_SAPI,                    /* Network Service Access Point Identifier */
1374     DE_PRO_CONF_OPT,                /* Protocol Configuration Options */
1375     DE_EXT_PRO_CONF_OPT,            /* Extended Protocol Configuration Options */
1376     DE_PD_PRO_ADDR,                 /* Packet Data Protocol Address */
1377     DE_QOS,                         /* Quality Of Service */
1378     DE_RE_ATTEMPT_IND,              /* Re-attempt indicator */
1379     DE_EXT_QOS,                     /* [13] Extended quality of service */
1380     DE_SM_CAUSE,                    /* SM Cause */
1381     DE_SM_CAUSE_2,                  /* SM Cause 2 */
1382     DE_LINKED_TI,                   /* Linked TI */
1383     DE_LLC_SAPI,                    /* LLC Service Access Point Identifier */
1384     DE_TEAR_DOWN_IND,               /* Tear Down Indicator */
1385     DE_PACKET_FLOW_ID,              /* Packet Flow Identifier */
1386     DE_TRAFFIC_FLOW_TEMPLATE,       /* Traffic Flow Template */
1387     DE_TMGI,                        /* Temporary Mobile Group Identity (TMGI) */
1388     DE_MBMS_BEARER_CAP,             /* MBMS bearer capabilities */
1389     DE_MBMS_PROT_CONF_OPT,          /* MBMS protocol configuration options */
1390     DE_ENH_NSAPI,                   /* Enhanced network service access point identifier */
1391     DE_REQ_TYPE,                    /* Request type */
1392     DE_SM_NOTIF_IND,                /* Notification indicator */
1393     DE_SM_CONNECTIVITY_TYPE,        /* Connectivity type */
1394     DE_SM_WLAN_OFFLOAD_ACCEPT,      /* WLAN offload acceptability */
1395     DE_NBIFOM_CONT,                 /* NBIFOM container */
1396     /* GPRS Common Information Elements [8] 10.5.7 */
1397     DE_PDP_CONTEXT_STAT,            /* [8] 10.5.7.1     PDP Context Status */
1398     DE_RAD_PRIO,                    /* [8] 10.5.7.2     Radio Priority */
1399     DE_GPRS_TIMER,                  /* [8] 10.5.7.3     GPRS Timer */
1400     DE_GPRS_TIMER_2,                /* [8] 10.5.7.4     GPRS Timer 2 */
1401     DE_GPRS_TIMER_3,                /* [10] 10.5.7.4a   GPRS Timer 3 */
1402     DE_RAD_PRIO_2,                  /* [8] 10.5.7.5     Radio Priority 2 */
1403     DE_MBMS_CTX_STATUS,             /* [8] 10.5.7.6     MBMS context status */
1404     DE_UPLINK_DATA_STATUS,          /* [8] 10.5.7.7     Uplink data status */
1405     DE_DEVICE_PROPERTIES,           /* [10] 10.5.7.8    Device properties */
1406     DE_GM_NONE                          /* NONE */
1407 }
1408 gm_elem_idx_t;
1409 
1410 typedef enum
1411 {
1412     /* Radio Resource Management Information Elements 10.5.2, most are from 10.5.1  */
1413     DE_RR_BA_RANGE,                 /* [3]  10.5.2.1a    BA Range */
1414     DE_RR_CELL_CH_DSC,              /* [3]  10.5.2.1b    Cell Channel Description    */
1415     DE_RR_BA_LIST_PREF,             /* [3]  10.5.2.1c    BA List Pref */
1416     DE_RR_UTRAN_FREQ_LIST,          /* [3]  10.5.2.1d    UTRAN Frequency List */
1417     DE_RR_CELL_SELECT_INDIC,        /* [3]  10.5.2.1e    Cell selection indicator after release of all TCH and SDCCH IE */
1418     DE_RR_CELL_DSC,                 /* 10.5.2.2   RR Cell Description              */
1419     DE_RR_CELL_OPT_BCCH,            /* [3]  10.5.2.3    Cell Options (BCCH)        */
1420     DE_RR_CELL_OPT_SACCH,           /* [3]  10.5.2.3a   Cell Options (SACCH)       */
1421     DE_RR_CELL_SEL_PARAM,           /* [3]  10.5.2.4    Cell Selection Parameters  */
1422 /*
1423  * [3]  10.5.2.4a   (void)
1424  */
1425     DE_RR_CH_DSC,                   /* [3]  10.5.2.5    Channel Description         */
1426     DE_RR_CH_DSC2,                  /* [3]  10.5.2.5a   Channel Description 2       */
1427     DE_RR_CH_DSC3,                  /* [3]  10.5.2.5c   Channel Description 3       */
1428     DE_RR_CH_MODE,                  /* [3]  10.5.2.6    Channel Mode                */
1429     DE_RR_CH_MODE2,                 /* [3]  10.5.2.7    Channel Mode 2              */
1430     DE_RR_UTRAN_CM,                 /* [3]  10.5.2.7a   UTRAN Classmark */
1431 /* [3]  10.5.2.7b   (void) */
1432     DE_RR_CM_ENQ_MASK,              /* [3]  10.5.2.7c   Classmark Enquiry Mask      */
1433 /* [3]  10.5.2.7d   GERAN Iu Mode Classmark information element                     */
1434     DE_RR_CHNL_NEEDED,              /* [3]  10.5.2.8    Channel Needed
1435  * [3]  10.5.2.8a   (void) */
1436     DE_RR_CHNL_REQ_DESC2,           /* [3]  10.5.2.8b   Channel Request Description 2 */
1437     DE_RR_CIP_MODE_SET,             /* [3]  10.5.2.9    Cipher Mode Setting         */
1438     DE_RR_CIP_MODE_RESP,            /* [3]  10.5.2.10   Cipher Response             */
1439     DE_RR_CTRL_CH_DESC,             /* [3]  10.5.2.11   Control Channel Description */
1440     DE_RR_DTM_INFO_DETAILS,         /* [3]  10.5.2.11a  DTM Information Details */
1441     DE_RR_DYN_ARFCN_MAP,            /* [3]  10.5.2.11b  Dynamic ARFCN Mapping       */
1442     DE_RR_FREQ_CH_SEQ,              /* [3]  10.5.2.12   Frequency Channel Sequence  */
1443     DE_RR_FREQ_LIST,                /* [3]  10.5.2.13   Frequency List              */
1444     DE_RR_FREQ_SHORT_LIST,          /* [3]  10.5.2.14   Frequency Short List        */
1445     DE_RR_FREQ_SHORT_LIST2,         /* [3]  10.5.2.14a  Frequency Short List 2      */
1446 /* [3]  10.5.2.14b  Group Channel Description */
1447     DE_RR_GPRS_RESUMPTION,          /* [3]  10.5.2.14c  GPRS Resumption */
1448     DE_RR_GPRS_BROADCAST_INFORMATION, /* [3]  10.5.2.14d  GPRS broadcast information */
1449 /* [3]  10.5.2.14e  Enhanced DTM CS Release Indication*/
1450 
1451     DE_RR_HO_REF,                   /* 10.5.2.15  Handover Reference                */
1452 
1453     DE_RR_IA_REST_OCT,              /* [3] 10.5.2.16 IA Rest Octets             */
1454     DE_RR_IAR_REST_OCT,             /* [3] 10.5.2.17 IAR Rest Octets                */
1455     DE_RR_IAX_REST_OCT,             /* [3] 10.5.2.18 IAX Rest Octets                */
1456     DE_RR_L2_PSEUDO_LEN,            /* [3] 10.5.2.19 L2 Pseudo Length               */
1457     DE_RR_MEAS_RES,                 /* [3] 10.5.2.20 Measurement Results        */
1458  /* [3] 10.5.2.20a GPRS Measurement Results */
1459     DE_RR_MOB_ALL,                  /* [3] 10.5.2.21 Mobile Allocation              */
1460     DE_RR_MOB_TIME_DIFF,            /* [3] 10.5.2.21a Mobile Time Difference        */
1461     DE_RR_MULTIRATE_CONF,           /* [3] 10.5.2.21aa MultiRate configuration      */
1462     DE_RR_MULT_ALL,                 /* [3] 10.5.2.21b Multislot Allocation          */
1463 /*
1464  * [3] 10.5.2.21c NC mode
1465  */
1466     DE_RR_NEIGH_CELL_DESC,          /* [3] 10.5.2.22 Neighbour Cell Description */
1467     DE_RR_NEIGH_CELL_DESC2,         /* [3] 10.5.2.22a Neighbour Cell Description 2  */
1468 /*
1469  * [3] 10.5.2.22b (void)
1470  * [3] 10.5.2.22c NT/N Rest Octets */
1471     DE_RR_P1_REST_OCT,              /* [3] 10.5.2.23 P1 Rest Octets */
1472     DE_RR_P2_REST_OCT,              /* [3] 10.5.2.24 P2 Rest Octets */
1473     DE_RR_P3_REST_OCT,              /* [3] 10.5.2.25 P3 Rest Octets */
1474     DE_RR_PACKET_CH_DESC,           /* [3] 10.5.2.25a Packet Channel Description    */
1475     DE_RR_DED_MOD_OR_TBF,           /* [3] 10.5.2.25b Dedicated mode or TBF         */
1476     DE_RR_PKT_UL_ASS,               /* [3] 10.5.2.25c RR Packet Uplink Assignment */
1477     DE_RR_PKT_DL_ASS,               /* [3] 10.5.2.25d RR Packet Downlink Assignment */
1478     DE_RR_PKT_DL_ASS_TYPE2,         /* [3] 10.5.2.25d RR Packet Downlink Assignment Type 2 */
1479     DE_RR_PAGE_MODE,                /* [3] 10.5.2.26 Page Mode                      */
1480     DE_RR_NCC_PERM,                 /* [3] 10.5.2.27 NCC Permitted */
1481     DE_RR_POW_CMD,                  /* 10.5.2.28  Power Command                     */
1482     DE_RR_POW_CMD_AND_ACC_TYPE,     /* 10.5.2.28a Power Command and access type     */
1483     DE_RR_RACH_CTRL_PARAM,          /* [3] 10.5.2.29 RACH Control Parameters */
1484     DE_RR_REQ_REF,                  /* [3] 10.5.2.30 Request Reference              */
1485     DE_RR_CAUSE,                    /* 10.5.2.31  RR Cause                          */
1486     DE_RR_SYNC_IND,                 /* 10.5.2.39  Synchronization Indication        */
1487     DE_RR_SI1_REST_OCT,             /* [3] 10.5.2.32 SI1 Rest Octets */
1488 /* [3] 10.5.2.33 SI 2bis Rest Octets */
1489     DE_RR_SI2TER_REST_OCT,          /* [3] 10.5.2.33a SI 2ter Rest Octets */
1490     DE_RR_SI2QUATER_REST_OCT,       /* [3] 10.5.2.33b SI 2quater Rest Octets */
1491     DE_RR_SI3_REST_OCT,             /* [3] 10.5.2.34 SI3 Rest Octets */
1492     DE_RR_SI4_REST_OCT,             /* [3] 10.5.2.35 SI4 Rest Octets */
1493     DE_RR_SI6_REST_OCT,             /* [3] 10.5.2.35a SI6 Rest Octets */
1494 /* [3] 10.5.2.36 SI 7 Rest Octets
1495  * [3] 10.5.2.37 SI 8 Rest Octets
1496  * [3] 10.5.2.37a SI 9 Rest Octets
1497  */
1498     DE_RR_SI13_REST_OCT,                /* [3] 10.5.2.37b SI13 Rest Octets */
1499 /* [3] 10.5.2.37c (void)
1500  * [3] 10.5.2.37d (void)
1501  * [3] 10.5.2.37e SI 16 Rest Octets
1502  * [3] 10.5.2.37f SI 17 Rest Octets
1503  * [3] 10.5.2.37g SI 19 Rest Octets
1504  * [3] 10.5.2.37h SI 18 Rest Octets
1505  * [3] 10.5.2.37i SI 20 Rest Octets */
1506     DE_RR_SI21_REST_OCT,            /* [3] 10.5.2.37m SI21 Rest Octets */
1507     DE_RR_STARTING_TIME,            /* [3] 10.5.2.38 Starting Time                  */
1508     DE_RR_TIMING_ADV,               /* [3] 10.5.2.40 Timing Advance                 */
1509     DE_RR_TIME_DIFF,                /* [3] 10.5.2.41 Time Difference                */
1510     DE_RR_TLLI,                     /* [3] 10.5.2.41a TLLI                          */
1511     DE_RR_TMSI_PTMSI,               /* [3] 10.5.2.42 TMSI/P-TMSI */
1512     DE_RR_VGCS_TAR_MODE_IND,        /* [3] 10.5.2.42a VGCS target mode Indication   */
1513     DE_RR_VGCS_CIP_PAR,             /* [3] 10.5.2.42b   VGCS Ciphering Parameters   */
1514 
1515     DE_RR_WAIT_IND,                 /* [3] 10.5.2.43 Wait Indication */
1516 /* [3] 10.5.2.44 SI10 rest octets $(ASCI)$ */
1517     DE_RR_EXT_MEAS_RESULT,      /* [3] 10.5.2.45 Extended Measurement Results */
1518     DE_RR_EXT_MEAS_FREQ_LIST,       /* [3] 10.5.2.46 Extended Measurement Frequency List */
1519     DE_RR_SUS_CAU,                  /* [3] 10.5.2.47 Suspension Cause               */
1520     DE_RR_APDU_ID,                  /* [3] 10.5.2.48 APDU ID */
1521     DE_RR_APDU_FLAGS,               /* [3] 10.5.2.49 APDU Flags */
1522     DE_RR_APDU_DATA,                /* [3] 10.5.2.50 APDU Data */
1523     DE_RR_HO_TO_UTRAN_CMD,          /* [3] 10.5.2.51 Handover To UTRAN Command */
1524 /* [3] 10.5.2.52 Handover To cdma2000 Command
1525  * [3] 10.5.2.53 (void)
1526  * [3] 10.5.2.54 (void)
1527  * [3] 10.5.2.55 (void)
1528  * [3] 10.5.2.56 3G Target Cell */
1529     DE_RR_SERV_SUP,                 /* 10.5.2.57 Service Support                        */
1530 /* 10.5.2.58 MBMS p-t-m Channel Description
1531  */
1532 
1533     DE_RR_DED_SERV_INF,             /* [3] 10.5.2.59    Dedicated Service Information */
1534 
1535 /*
1536  * 10.5.2.60 MPRACH Description
1537  * 10.5.2.61 Restriction Timer
1538  * 10.5.2.62 MBMS Session Identity
1539  * 10.5.2.63 Reduced group or broadcast call reference
1540  * 10.5.2.64 Talker Priority status
1541  * 10.5.2.65 Talker Identity
1542  * 10.5.2.66 Token
1543  * 10.5.2.67 PS Cause
1544  * 10.5.2.68 VGCS AMR Configuration
1545  */
1546     DE_RR_CARRIER_IND,              /* 10.5.2.69 Carrier Indication */
1547     DE_RR_FEATURE_INDICATOR,        /* 10.5.2.76 feature Inticator */
1548     DE_RR_EXTENDED_TSC_SET,         /* 10.5.2.82 Extended TSC Set */
1549     DE_RR_EC_REQUEST_REFERENCE,     /* 10.5.2.83 EC Request reference */
1550     DE_RR_EC_PKT_CH_DSC1,           /* 10.5.2.84 EC Packet Channel Description Type 1 */
1551     DE_RR_EC_PKT_CH_DSC2,           /* 10.5.2.85 EC Packet Channel Description Type 2 */
1552     DE_RR_EC_FUA,                   /* 10.5.2.86 EC Fixed Uplink Allocation */
1553 
1554     DE_RR_NONE                          /* NONE */
1555 }
1556 rr_elem_idx_t;
1557 
1558 typedef enum
1559 {
1560     DE_EPS_CMN_ADD_INFO,                        /* 9.9.2.0  Additional information */
1561     DE_EPS_CMN_DEVICE_PROPERTIES,               /* 9.9.2.0A Device properties */
1562     DE_EPS_CMN_EPS_BE_CTX_STATUS,               /* 9.9.2.1  EPS bearer context status */
1563     DE_EPS_CMN_LOC_AREA_ID,                     /* 9.9.2.2  Location area identification */
1564     DE_EPS_CMN_MOB_ID,                          /* 9.9.2.3  Mobile identity */
1565     DE_EPS_MS_CM_2,                             /* 9.9.2.4  Mobile station classmark 2 */
1566     DE_EPS_MS_CM_3,                             /* 9.9.2.5  Mobile station classmark 3 */
1567     DE_EPS_NAS_SEC_PAR_FROM_EUTRA,              /* 9.9.2.6  NAS security parameters from E-UTRA */
1568     DE_EPS_NAS_SEC_PAR_TO_EUTRA,                /* 9.9.2.7  NAS security parameters to E-UTRA */
1569 
1570     DE_EPS_CMN_PLM_LST,                         /* 9.9.2.8  PLMN list */
1571     DE_EPS_CMN_SUP_CODEC_LST,                   /* 9.9.2.6  9.9.2.10    Supported codec list */
1572     DE_EPS_COMMON_NONE                          /* NONE */
1573 }
1574 nas_eps_common_elem_idx_t;
1575 
1576 typedef enum
1577 {
1578     /* 9.9.3    EPS Mobility Management (EMM) information elements */
1579     DE_EMM_ADD_UPD_RES,         /* 9.9.3.0A Additional update result */
1580     DE_EMM_ADD_UPD_TYPE,        /* 9.9.3.0B Additional update type */
1581     DE_EMM_AUTH_FAIL_PAR,       /* 9.9.3.1  Authentication failure parameter (dissected in packet-gsm_a_dtap.c)*/
1582     DE_EMM_AUTN,                /* 9.9.3.2  Authentication parameter AUTN */
1583     DE_EMM_AUTH_PAR_RAND,       /* 9.9.3.3  Authentication parameter RAND */
1584     DE_EMM_AUTH_RESP_PAR,       /* 9.9.3.4  Authentication response parameter */
1585     DE_EMM_SMS_SERVICES_STATUS, /* 9.9.3.4B SMS services status */
1586     DE_EMM_CSFB_RESP,           /* 9.9.3.5  CSFB response */
1587     DE_EMM_DAYL_SAV_T,          /* 9.9.3.6  Daylight saving time */
1588     DE_EMM_DET_TYPE,            /* 9.9.3.7  Detach type */
1589     DE_EMM_DRX_PAR,             /* 9.9.3.8  DRX parameter (dissected in packet-gsm_a_gm.c)*/
1590     DE_EMM_CAUSE,               /* 9.9.3.9  EMM cause */
1591     DE_EMM_ATT_RES,             /* 9.9.3.10 EPS attach result (Coded inline */
1592     DE_EMM_ATT_TYPE,            /* 9.9.3.11 EPS attach type (Coded Inline)*/
1593     DE_EMM_EPS_MID,             /* 9.9.3.12 EPS mobile identity */
1594     DE_EMM_EPS_NET_FEATURE_SUP, /* 9.9.3.12A EPS network feature support */
1595     DE_EMM_EPS_UPD_RES,         /* 9.9.3.13 EPS update result ( Coded inline)*/
1596     DE_EMM_EPS_UPD_TYPE,        /* 9.9.3.14 EPS update type */
1597     DE_EMM_ESM_MSG_CONT,        /* 9.9.3.15 ESM message conta */
1598     DE_EMM_GPRS_TIMER,          /* 9.9.3.16 GPRS timer ,See subclause 10.5.7.3 in 3GPP TS 24.008 [6]. */
1599     DE_EMM_GPRS_TIMER_2,        /* 9.9.3.16A GPRS timer 2, See subclause 10.5.7.4 in 3GPP TS 24.008. */
1600     DE_EMM_GPRS_TIMER_3,        /* 9.9.3.16B GPRS timer 3, See subclause 10.5.7.4a in 3GPP TS 24.008. */
1601     DE_EMM_ID_TYPE_2,           /* 9.9.3.17 Identity type 2 ,See subclause 10.5.5.9 in 3GPP TS 24.008 [6]. */
1602     DE_EMM_IMEISV_REQ,          /* 9.9.3.18 IMEISV request ,See subclause 10.5.5.10 in 3GPP TS 24.008 [6]. */
1603     DE_EMM_KSI_AND_SEQ_NO,      /* 9.9.3.19 KSI and sequence number */
1604     DE_EMM_MS_NET_CAP,          /* 9.9.3.20 MS network capability ,See subclause 10.5.5.12 in 3GPP TS 24.008 [6]. */
1605     DE_EMM_MS_NET_FEAT_SUP,     /* 9.9.3.20A MS network feature support, See subclause 10.5.1.15 in 3GPP TS 24.008. */
1606     DE_EMM_NAS_KEY_SET_ID,      /* 9.9.3.21 NAS key set identifier (coded inline)*/
1607     DE_EMM_NAS_MSG_CONT,        /* 9.9.3.22 NAS message container */
1608     DE_EMM_NAS_SEC_ALGS,        /* 9.9.3.23 NAS security algorithms */
1609     DE_EMM_NET_NAME,            /* 9.9.3.24 Network name, See subclause 10.5.3.5a in 3GPP TS 24.008 [6]. */
1610     DE_EMM_NONCE,               /* 9.9.3.25 Nonce */
1611     DE_EMM_PAGING_ID,           /* 9.9.3.25A Paging identity */
1612     DE_EMM_P_TMSI_SIGN,         /* 9.9.3.26 P-TMSI signature, See subclause 10.5.5.8 in 3GPP TS 24.008 [6]. */
1613     DE_EMM_EXT_CAUSE,           /* 9.9.3.26A Extended EMM cause */
1614     DE_EMM_SERV_TYPE,           /* 9.9.3.27 Service type */
1615     DE_EMM_SHORT_MAC,           /* 9.9.3.28 Short MAC */
1616     DE_EMM_TZ,                  /* 9.9.3.29 Time zone, See subclause 10.5.3.8 in 3GPP TS 24.008 [6]. */
1617     DE_EMM_TZ_AND_T,            /* 9.9.3.30 Time zone and time, See subclause 10.5.3.9 in 3GPP TS 24.008 [6]. */
1618     DE_EMM_TMSI_STAT,           /* 9.9.3.31 TMSI status, See subclause 10.5.5.4 in 3GPP TS 24.008 [6]. */
1619     DE_EMM_TRAC_AREA_ID,        /* 9.9.3.32 Tracking area identity */
1620     DE_EMM_TRAC_AREA_ID_LST,    /* 9.9.3.33 Tracking area identity list */
1621     DE_EMM_UE_NET_CAP,          /* 9.9.3.34 UE network capability */
1622     DE_EMM_UE_RA_CAP_INF_UPD_NEED, /* 9.9.3.35 UE radio capability information update needed */
1623     DE_EMM_UE_SEC_CAP,          /* 9.9.3.36 UE security capability */
1624     DE_EMM_EMERG_NUM_LIST,      /* 9.9.3.37 Emergency Number List */
1625     DE_EMM_EXT_EMERG_NUM_LIST,  /* 9.9.3.37a Extended Emergency Number List */
1626     DE_EMM_CLI,                 /* 9.9.3.38 CLI */
1627     DE_EMM_SS_CODE,             /* 9.9.3.39 SS Code */
1628     DE_EMM_LCS_IND,             /* 9.9.3.40 LCS indicator */
1629     DE_EMM_LCS_CLIENT_ID,       /* 9.9.3.41 LCS client identity */
1630     DE_EMM_GEN_MSG_CONT_TYPE,   /* 9.9.3.42 Generic message container type */
1631     DE_EMM_GEN_MSG_CONT,        /* 9.9.3.43 Generic message container */
1632     DE_EMM_VOICE_DMN_PREF,      /* 9.9.3.44 Voice domain preference and UE's usage setting */
1633     DE_EMM_GUTI_TYPE,           /* 9.9.3.45 GUTI type */
1634     DE_EMM_EXT_DRX_PARAMS,      /* 9.9.3.46 Extended DRX parameters */
1635     DE_EMM_DATA_SERV_TYPE,      /* 9.9.3.47 Data service type */
1636     DE_EMM_DCN_ID,              /* 9.9.3.48 DCN-ID, See subclause 10.5.5.35 in 3GPP TS 24.008 */
1637     DE_EMM_NON_3GPP_NW_PROV_POL, /* 9.9.3.49 Non-3GPP NW provided policies, See subclause 10.5.5.37 in 3GPP TS 24.008 */
1638     DE_EMM_HASH_MME,            /* 9.9.3.50 HashMME */
1639     DE_EMM_REPLAYED_NAS_MSG_CONT, /* 9.9.3.51 Replayed NAS message container */
1640     DE_EMM_NETWORK_POLICY,      /* 9.9.3.52 Network policy */
1641     DE_EMM_UE_ADD_SEC_CAP,      /* 9.9.3.53 UE additional security capability */
1642     DE_EMM_UE_STATUS,           /* 9.9.3.54 UE status */
1643     DE_EMM_ADD_INFO_REQ,        /* 9.9.3.55 Additional information requested */
1644     DE_EMM_CIPH_KEY_DATA,       /* 9.9.3.56 Ciphering key data */
1645     DE_EMM_N1_UE_NETWORK_CAP,   /* 9.9.3.57 N1 UE network capability */
1646     DE_EMM_UE_RADIO_CAP_ID_AVAIL, /* 9.9.3.58 UE radio capability ID availability */
1647     DE_EMM_UE_RADIO_CAP_ID_REQ, /* 9.9.3.59 UE radio capability ID request */
1648     DE_EMM_UE_RADIO_CAP_ID,     /* 9.9.3.60 UE radio capability ID */
1649     DE_EMM_UE_RADIO_CAP_ID_DEL_IND, /* 9.9.3.61 UE radio capability ID deletion indication */
1650     DE_EMM_WUS_ASSIST_INFO,     /* 9.9.3.62 WUS assistance information */
1651     DE_EMM_NB_S1_DRX_PARAM,     /* 9.9.3.63 NB-S1 DRX parameter */
1652     DE_EMM_NONE                 /* NONE */
1653 }
1654 nas_emm_elem_idx_t;
1655 
1656 /* 9.9.4 EPS Session Management (ESM) information elements */
1657 typedef enum
1658 {
1659     DE_ESM_APN,                     /* 9.9.4.1 Access point name */
1660     DE_ESM_APN_AGR_MAX_BR,          /* 9.9.4.2 APN aggregate maximum bit rate */
1661     DE_ESM_CONNECTIVITY_TYPE,       /* 9.9.4.2A Connectivity type */
1662     DE_ESM_EPS_QOS,                 /* 9.9.4.3 EPS quality of service */
1663     DE_ESM_CAUSE,                   /* 9.9.4.4 ESM cause */
1664     DE_ESM_INF_TRF_FLG,             /* 9.9.4.5 ESM information transfer flag */
1665     DE_ESM_LNKED_EPS_B_ID,          /* 9.9.4.6 Linked EPS bearer identity  */
1666     DE_ESM_LLC_SAPI,                /* 9.9.4.7 LLC service access point identifier */
1667     DE_ESM_NOTIF_IND,               /* 9.9.4.7a Notification indicator */
1668     DE_ESM_P_FLW_ID,                /* 9.9.4.8 Packet flow identifier  */
1669     DE_ESM_PDN_ADDR,                /* 9.9.4.9 PDN address */
1670     DE_ESM_PDN_TYPE,                /* 9.9.4.10 PDN type */
1671     DE_ESM_PROT_CONF_OPT,           /* 9.9.4.11 Protocol configuration options */
1672     DE_ESM_QOS,                     /* 9.9.4.12 Quality of service */
1673     DE_ESM_RA_PRI,                  /* 9.9.4.13 Radio priority  */
1674     DE_ESM_RE_ATTEMPT_IND,          /* 9.9.4.13a Re-attempt indicator */
1675     DE_ESM_REQ_TYPE,                /* 9.9.4.14 Request type */
1676     DE_ESM_TRAF_FLOW_AGR_DESC,      /* 9.9.4.15 Traffic flow aggregate description */
1677     DE_ESM_TRAF_FLOW_TEMPL,         /* 9.9.4.16 Traffic flow template */
1678     DE_ESM_TID,                     /* 9.9.4.17 Transaction identifier */
1679     DE_ESM_WLAN_OFFLOAD_ACCEPT,     /* 9.9.4.18 WLAN offload acceptability */
1680     DE_ESM_NBIFOM_CONT,             /* 9.9.4.19 NBIFOM container */
1681     DE_ESM_REMOTE_UE_CONTEXT_LIST,  /* 9.9.4.20 Remote UE context list */
1682     DE_ESM_PKMF_ADDRESS,            /* 9.9.4.21 PKMF address */
1683     DE_ESM_HDR_COMPR_CONFIG,        /* 9.9.4.22 Header compression configuration */
1684     DE_ESM_CTRL_PLANE_ONLY_IND,     /* 9.9.4.23 Control plane only indication */
1685     DE_ESM_USER_DATA_CONT,          /* 9.9.4.24 User data container */
1686     DE_ESM_REL_ASSIST_IND,          /* 9.9.4.25 Release assistance indication */
1687     DE_ESM_EXT_PCO,                 /* 9.9.4.26 Extended protocol configuration options */
1688     DE_ESM_HDR_COMPR_CONFIG_STATUS, /* 9.9.4.27 Header compression configuration status */
1689     DE_ESM_SERV_PLMN_RATE_CTRL,     /* 9.9.4.28 Serving PLMN rate control */
1690     DE_ESM_EXT_APN_AGR_MAX_BR,      /* 9.9.4.29 Extended APN aggregate maximum bit rate */
1691     DE_ESM_EXT_EPS_QOS,             /* 9.9.4.30 Extended EPS quality of service */
1692     DE_ESM_NONE                     /* NONE */
1693 }
1694 nas_esm_elem_idx_t;
1695 
1696 typedef enum
1697 {
1698 
1699     DE_SGSAP_IMSI,                                  /* 9.4.6 IMSI*/
1700     DE_SGSAP_VLR_NAME,                              /* 9.4.22 VLR name*/
1701     DE_SGSAP_TMSI,                                  /* 9.4.20 TMSI */
1702     DE_SGSAP_LOC_AREA_ID,                           /* 9.4.11 Location area identifier */
1703     DE_SGSAP_CH_NEEDED,                             /* 9.4.23 Channel Needed */
1704     DE_SGSAP_EMLPP_PRIO,                            /* 9.4.24 eMLPP Priority*/
1705     DE_SGSAP_TMSI_STATUS,                           /* 9.4.21 TMSI status */
1706     DE_SGSAP_SGS_CAUSE,                             /* 9.4.18 SGs cause*/
1707     DE_SGSAP_MME_NAME,                              /* 9.4.13 MME name*/
1708     DE_SGSAP_EPS_LOC_UPD_TYPE,                      /* 9.4.2 EPS location update type*/
1709     DE_SGSAP_GLOBAL_CN_ID,                          /* 9.4.4 Global CN-Id*/
1710 
1711     DE_SGSAP_UDEF_11,                               /* Undefined */
1712     DE_SGSAP_UDEF_12,                               /* Undefined */
1713 
1714     DE_SGSAP_MID,                                   /* 9.4.14 Mobile identity*/
1715     DE_SGSAP_REJ_CAUSE,                             /* 9.4.16 Reject cause */
1716     DE_SGSAP_IMSI_DET_EPS,                          /* 9.4.7 IMSI detach from EPS service type */
1717     DE_SGSAP_IMSI_DET_NON_EPS,                      /* 9.4.8 IMSI detach from non-EPS service type */
1718 
1719     DE_SGSAP_IMEISV,                                /* 9.4.5 IMEISV */
1720     DE_SGSAP_NAS_MSG_CONTAINER,                     /* 9.4.15 NAS message container*/
1721     DE_SGSAP_MM_INFO,                               /* 9.4.12 MM information*/
1722 
1723     DE_SGSAP_UDEF_20,                               /* Undefined */
1724     DE_SGSAP_UDEF_21,                               /* Undefined */
1725     DE_SGSAP_UDEF_22,                               /* Undefined */
1726 
1727     DE_SGSAP_ERR_MSG,                               /* 9.4.3 Erroneous message*/
1728     DE_SGSAP_CLI,                                   /* 9.4.1 CLI */
1729     DE_SGSAP_LCS_CLIENT_ID,                         /* 9.4.9 LCS client identity */
1730     DE_SGSAP_LCS_INDIC,                             /* 9.4.10 LCS indicator */
1731     DE_SGSAP_SS_CODE,                               /* 9.4.19 SS code */
1732     DE_SGSAP_SERV_INDIC,                            /* 9.4.17 Service indicator */
1733     DE_SGSAP_UE_TZ,                                 /* 9.4.21b UE Time Zone */
1734     DE_SGSAP_MSC_2,                                 /* 9.4.14a Mobile Station Classmark 2 */
1735     DE_SGSAP_TAID,                                  /* 9.4.21a Tracking Area Identity */
1736     DE_SGSAP_ECGI,                                  /* 9.4.3a E-UTRAN Cell Global Identity */
1737     DE_SGSAP_UE_EMM_MODE,                           /* 9.4.21c UE EMM mode*/
1738     DE_SGSAP_ADD_PAGING_IND,                        /* 9.4.25 Additional paging indicators */
1739     DE_SGSAP_TMSI_BASED_NRI_CONT,                   /* 9.4.26 TMSI based NRI container */
1740     DE_SGSAP_SELECTED_CS_DMN_OP,                    /* 9.4.27 Selected CS domain operator */
1741 
1742     DE_SGAP_NONE                            /* NONE */
1743 }
1744 sgsap_elem_idx_t;
1745 
1746 typedef enum
1747 {
1748     DE_NAS_5GS_MM_5GMM_CAP,                  /* 9.11.3.1     5GMM capability*/
1749     DE_NAS_5GS_MM_5GMM_CAUSE,                /* 9.11.3.2     5GMM cause*/
1750     DE_NAS_5GS_MM_5GS_DRX_PARAM,             /* 9.11.3.2A    5GS DRX parameters*/
1751     DE_NAS_5GS_MM_5GS_IDENTITY_TYPE,         /* 9.11.3.3     5GS identity type*/
1752     DE_NAS_5GS_MM_5GS_MOBILE_ID,             /* 9.11.3.4     5GS mobile identity*/
1753     DE_NAS_5GS_MM_5GS_NW_FEAT_SUP,           /* 9.11.3.5     5GS network feature support*/
1754     DE_NAS_5GS_MM_5GS_REG_RES,               /* 9.11.3.6     5GS registration result*/
1755     DE_NAS_5GS_MM_5GS_REG_TYPE,              /* 9.11.3.7     5GS registration type*/
1756     DE_NAS_5GS_MM_5GS_TA_ID,                 /* 9.11.3.8     5GS tracking area identity */
1757     DE_NAS_5GS_MM_5GS_TA_ID_LIST,            /* 9.11.3.9     5GS tracking area identity list */
1758     DE_NAS_5GS_MM_UPDATE_TYPE,               /* 9.11.3.9A    5GS update type */
1759     DE_NAS_5GS_MM_ABBA,                      /* 9.11.3.10    ABBA */
1760                                              /* 9.11.3.11    void */
1761     DE_NAS_5GS_MM_ADD_5G_SEC_INF,            /* 9.11.3.12    Additional 5G security information */
1762     DE_NAS_5GS_MM_ADD_INF_REQ,               /* 9.11.3.12A   Additional information requested */
1763     DE_NAS_5GS_MM_ALLOW_PDU_SES_STS,         /* 9.11.3.13    Allowed PDU session status*/
1764     DE_NAS_5GS_MM_AUT_FAIL_PAR,              /* 9.11.3.14    Authentication failure parameter */
1765     DE_NAS_5GS_MM_AUT_PAR_AUTN,              /* 9.11.3.15    Authentication parameter AUTN*/
1766     DE_NAS_5GS_MM_AUT_PAR_RAND,              /* 9.11.3.16    Authentication parameter RAND*/
1767     DE_NAS_5GS_MM_AUT_RESP_PAR,              /* 9.11.3.17    Authentication response parameter */
1768     DE_NAS_5GS_MM_CONF_UPD_IND,              /* 9.11.3.18    Configuration update indication*/
1769     DE_NAS_5GS_MM_CAG_INFORMATION_LIST,      /* 9.11.3.18A   CAG information list*/
1770     DE_NAS_5GS_MM_CIOT_SMALL_DATA_CONT,      /* 9.11.3.18B   CIoT small data container */
1771     DE_NAS_5GS_MM_CIPHERING_KEY_DATA,        /* 9.11.3.18C   Ciphering key data*/
1772     DE_NAS_5GS_MM_CTRL_PLANE_SERVICE_TYPE,   /* 9.11.3.18D   Control plane service type*/
1773     DE_NAS_5GS_MM_DLGT_SAVING_TIME,          /* 9.11.3.19    Daylight saving time*/
1774     DE_NAS_5GS_MM_DE_REG_TYPE,               /* 9.11.3.20    De-registration type*/
1775                                              /* 9.11.3.21    Void */
1776                                              /* 9.11.3.22    Void*/
1777     DE_NAS_5GS_MM_EMRG_NR_LIST,              /* 9.11.3.23    Emergency number list */
1778     DE_NAS_5GS_MM_EPS_BEARER_CTX_STATUS,     /* 9.11.3.23A   EPS bearer context status */
1779     DE_NAS_5GS_MM_EPS_NAS_MSG_CONT,          /* 9.11.3.24    EPS NAS message container */
1780     DE_NAS_5GS_MM_EPS_NAS_SEC_ALGO,          /* 9.11.3.25    EPS NAS security algorithms */
1781     DE_NAS_5GS_MM_EXT_EMERG_NUM_LIST,        /* 9.11.3.26    Extended emergency number list */
1782     DE_NAS_5GS_MM_EXTENDED_DRX_PARAMETERS,   /* 9.11.3.26A   Extended DRX parameters */
1783                                              /* 9.11.3.27    Void*/
1784     DE_NAS_5GS_MM_IMEISV_REQ,                /* 9.11.3.28    IMEISV request*/
1785     DE_NAS_5GS_MM_LADN_INDIC,                /* 9.11.3.29    LADN indication*/
1786     DE_NAS_5GS_MM_LADN_INF,                  /* 9.11.3.30    LADN information */
1787     DE_NAS_5GS_MM_MICO_IND,                  /* 9.11.3.31    MICO indication*/
1788     DE_NAS_5GS_MM_MA_PDU_SES_INF,            /* 9.11.3.31A   MA PDU session information */
1789     DE_NAS_5GS_MM_MAPPED_NSSAI,              /* 9.11.3.31B   Mapped NSSAI */
1790     DE_NAS_5GS_MM_MOBILE_STATION_CLSMK_2,    /* 9.11.3.31C   Mobile station classmark 2 */
1791     DE_NAS_5GS_MM_NAS_KEY_SET_ID,            /* 9.11.3.32    NAS key set identifier*/
1792     DE_NAS_5GS_MM_NAS_KEY_SET_ID_H1,         /* 9.11.3.32    NAS key set identifier*/
1793     DE_NAS_5GS_MM_NAS_MSG_CONT,              /* 9.11.3.33    NAS message container*/
1794     DE_NAS_5GS_MM_NAS_SEC_ALGO,              /* 9.11.3.34    NAS security algorithms*/
1795     DE_NAS_5GS_MM_NW_NAME,                   /* 9.11.3.35    Network name*/
1796     DE_NAS_5GS_MM_NW_SLICING_IND,            /* 9.11.3.36    Network slicing indication */
1797     DE_NAS_5GS_MM_NW_NON_3GPP_NW_PROV_POL,   /* 9.11.3.36A   Non-3GPP NW provided policies */
1798     DE_NAS_5GS_MM_NSSAI,                     /* 9.11.3.37    NSSAI*/
1799     DE_NAS_5GS_MM_NSSAI_INC_MODE,            /* 9.11.3.37A   NSSAI inclusion mode */
1800     DE_NAS_5GS_MM_OP_DEF_ACC_CAT_DEF,        /* 9.11.3.38    Operator-defined access category definitions */
1801     DE_NAS_5GS_MM_PLD_CONT,                  /* 9.11.3.39    Payload container*/
1802     DE_NAS_5GS_MM_PLD_CONT_TYPE,             /* 9.11.3.40    Payload container type*/
1803     DE_NAS_5GS_MM_PDU_SES_ID_2,              /* 9.11.3.41    PDU session identity 2 */
1804     DE_NAS_5GS_MM_PDU_SES_REACT_RES,         /* 9.11.3.42    PDU session reactivation result*/
1805     DE_NAS_5GS_MM_PDU_SES_REACT_RES_ERR_C,   /* 9.11.3.43    PDU session reactivation result error cause */
1806     DE_NAS_5GS_MM_PDU_SES_STATUS,            /* 9.11.3.44    PDU session status */
1807     DE_NAS_5GS_MM_PLMN_LIST,                 /* 9.11.3.45    PLMN list*/
1808     DE_NAS_5GS_MM_REJ_NSSAI,                 /* 9.11.3.46    Rejected NSSAI*/
1809     DE_NAS_5GS_MM_REL_ASS_IND,               /* 9.11.3.46A   Release assistance indication*/
1810     DE_NAS_5GS_MM_REQ_TYPE,                  /* 9.11.3.47    Request type */
1811     DE_NAS_5GS_MM_S1_UE_NW_CAP,              /* 9.11.3.48    S1 UE network capability*/
1812     DE_NAS_5GS_MM_S1_UE_SEC_CAP,             /* 9.11.3.48A   S1 UE security capability*/
1813     DE_NAS_5GS_MM_SAL,                       /* 9.11.3.49    Service area list*/
1814     DE_NAS_5GS_MM_SERV_TYPE,                 /* 9.11.3.50    Service type,*/
1815     DE_NAS_5GS_MM_SMS_IND,                   /* 9.11.3.50A   SMS indication */
1816     DE_NAS_5GS_MM_SOR_TRANSP_CONT,           /* 9.11.3.51    SOR transparent container */
1817     DE_NAS_5GS_MM_SUPPORTED_CODEC_LIST,      /* 9.11.3.51A   Supported codec list */
1818     DE_NAS_5GS_MM_TZ,                        /* 9.11.3.52    Time zone*/
1819     DE_NAS_5GS_MM_TZ_AND_T,                  /* 9.11.3.53    Time zone and time*/
1820     DE_NAS_5GS_MM_UE_PAR_UPD_TRASNSP_CONT,   /* 9.11.3.53A   UE parameters update transparent container */
1821     DE_NAS_5GS_MM_UE_SEC_CAP,                /* 9.11.3.54    UE security capability*/
1822     DE_NAS_5GS_MM_UE_USAGE_SET,              /* 9.11.3.55    UE's usage setting */
1823     DE_NAS_5GS_MM_UE_STATUS,                 /* 9.11.3.56    UE status */
1824     DE_NAS_5GS_MM_UL_DATA_STATUS,            /* 9.11.3.57    Uplink data status */
1825     DE_NAS_5GS_MM_UE_RADIO_CAP_ID,           /* 9.11.3.68    UE radio capability ID*/
1826     DE_NAS_5GS_MM_UE_RADIO_CAP_ID_DEL_IND,   /* 9.11.3.69    UE radio capability ID deletion indication*/
1827     DE_NAS_5GS_MM_TRUNCATED_5G_S_TMSI_CONF,  /* 9.11.3.70    Truncated 5G-S-TMSI configuration*/
1828     DE_NAS_5GS_MM_WUS_ASSISTANCE_INF,        /* 9.11.3.71    WUS assistance information*/
1829     DE_NAS_5GS_MM_N5GC_INDICATION,           /* 9.11.3.72    N5GC indication*/
1830     DE_NAS_5GS_MM_NB_N1_MODE_DRX_PARS,       /* 9.11.3.73    NB-N1 mode DRX parameters*/
1831     DE_NAS_5GS_MM_ADDITIONAL_CONF_IND,       /* 9.11.3.74    Additional configuration indication*/
1832     DE_NAS_5GS_MM_EXTENDED_REJECTED_NSSAI,   /* 9.11.3.75    Extended rejected NSSAI*/
1833     DE_NAS_5GS_MM_NONE        /* NONE */
1834 }
1835 nas_5gs_mm_elem_idx_t;
1836 
1837 
1838 #endif /* __PACKET_GSM_A_COMMON_H__ */
1839 
1840 /*
1841  * Editor modelines  -  https://www.wireshark.org/tools/modelines.html
1842  *
1843  * Local variables:
1844  * c-basic-offset: 4
1845  * tab-width: 8
1846  * indent-tabs-mode: nil
1847  * End:
1848  *
1849  * vi: set shiftwidth=4 tabstop=8 expandtab:
1850  * :indentSize=4:tabSize=8:noTabs=true:
1851  */
1852