MSWSP: fix dissect_mswsp_smb()
[wireshark-wip.git] / epan / dissectors / packet-gsm_a_common.h
blob137105c72a44851a99eb1aa30c4f9d78cb30d436
1 /* packet-gsm_a_common.h
3 * $Id$
5 * Reference [3]
6 * Mobile radio interface Layer 3 specification;
7 * Core network protocols;
8 * Stage 3
9 * (3GPP TS 24.008 version 4.7.0 Release 4)
10 * (ETSI TS 124 008 V6.8.0 (2005-03))
12 * Reference [5]
13 * Point-to-Point (PP) Short Message Service (SMS)
14 * support on mobile radio interface
15 * (3GPP TS 24.011 version 4.1.1 Release 4)
17 * Reference [7]
18 * Mobile radio interface Layer 3 specification;
19 * Core network protocols;
20 * Stage 3
21 * (3GPP TS 24.008 version 5.9.0 Release 5)
23 * Reference [8]
24 * Mobile radio interface Layer 3 specification;
25 * Core network protocols;
26 * Stage 3
27 * (3GPP TS 24.008 version 6.7.0 Release 6)
28 * (3GPP TS 24.008 version 6.8.0 Release 6)
30 * Copyright 2003, Michael Lum <mlum [AT] telostech.com>,
31 * In association with Telos Technology Inc.
33 * Wireshark - Network traffic analyzer
34 * By Gerald Combs <gerald@wireshark.org>
35 * Copyright 1998 Gerald Combs
37 * This program is free software; you can redistribute it and/or
38 * modify it under the terms of the GNU General Public License
39 * as published by the Free Software Foundation; either version 2
40 * of the License, or (at your option) any later version.
42 * This program is distributed in the hope that it will be useful,
43 * but WITHOUT ANY WARRANTY; without even the implied warranty of
44 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
45 * GNU General Public License for more details.
47 * You should have received a copy of the GNU General Public License
48 * along with this program; if not, write to the Free Software
49 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
51 #ifndef __PACKET_GSM_A_COMMON_H__
52 #define __PACKET_GSM_A_COMMON_H__
54 #include "packet-sccp.h"
55 #include "ws_symbol_export.h"
57 /* PROTOTYPES/FORWARDS */
58 typedef guint16 (*elem_fcn)(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
59 typedef void (*msg_fcn)(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len);
60 #if 0
61 /* XXX moved to tvbuff.h, clean up later */
62 typedef struct dgt_set_t
64 unsigned char out[15];
66 dgt_set_t;
67 #endif
68 int my_dgt_tbcd_unpack(
69 char *out, /* ASCII pattern out */
70 guchar *in, /* packed pattern in */
71 int num_octs, /* Number of octets to unpack */
72 dgt_set_t *dgt /* Digit definitions */
75 /* globals needed as a result of spltting the packet-gsm_a.c into several files
76 * until further restructuring can take place to make them more modular
79 /* common PD values */
80 extern const value_string protocol_discriminator_vals[];
81 extern const value_string gsm_a_pd_short_str_vals[];
83 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);
85 /* Needed to share the packet-gsm_a_common.c functions */
86 extern value_string_ext gsm_bssmap_elem_strings_ext;
87 extern gint ett_gsm_bssmap_elem[];
88 extern elem_fcn bssmap_elem_fcn[];
89 extern int hf_gsm_a_bssmap_elem_id;
91 extern value_string_ext gsm_dtap_elem_strings_ext;
92 extern gint ett_gsm_dtap_elem[];
93 extern elem_fcn dtap_elem_fcn[];
94 extern int hf_gsm_a_dtap_elem_id;
96 extern value_string_ext gsm_rp_elem_strings_ext;
97 extern gint ett_gsm_rp_elem[];
98 extern elem_fcn rp_elem_fcn[];
99 extern int hf_gsm_a_rp_elem_id;
101 extern value_string_ext gsm_rr_elem_strings_ext;
102 extern gint ett_gsm_rr_elem[];
103 extern elem_fcn rr_elem_fcn[];
104 extern int hf_gsm_a_rr_elem_id;
105 extern void get_rr_msg_params(guint8 oct, const gchar **msg_str, int *ett_tree, int *hf_idx, msg_fcn *msg_fcn);
107 extern value_string_ext gsm_common_elem_strings_ext;
108 extern gint ett_gsm_common_elem[];
109 extern elem_fcn common_elem_fcn[];
110 extern int hf_gsm_a_common_elem_id;
112 extern value_string_ext gsm_gm_elem_strings_ext;
113 extern gint ett_gsm_gm_elem[];
114 extern elem_fcn gm_elem_fcn[];
115 extern int hf_gsm_a_gm_elem_id;
116 extern void get_gmm_msg_params(guint8 oct, const gchar **msg_str, int *ett_tree, int *hf_idx, msg_fcn *msg_fcn);
117 extern void get_sm_msg_params(guint8 oct, const gchar **msg_str, int *ett_tree, int *hf_idx, msg_fcn *msg_fcn);
119 extern value_string_ext gsm_bsslap_elem_strings_ext;
120 extern gint ett_gsm_bsslap_elem[];
121 extern elem_fcn bsslap_elem_fcn[];
122 extern int hf_gsm_a_bsslap_elem_id;
124 extern value_string_ext gsm_bssmap_le_elem_strings_ext;
125 extern gint ett_gsm_bssmap_le_elem[];
126 extern elem_fcn bssmap_le_elem_fcn[];
127 extern int hf_gsm_bssmap_le_elem_id;
129 extern value_string_ext nas_eps_common_elem_strings_ext;
130 extern gint ett_nas_eps_common_elem[];
131 extern elem_fcn nas_eps_common_elem_fcn[];
132 extern int hf_nas_eps_common_elem_id;
134 extern value_string_ext nas_emm_elem_strings_ext;
135 extern gint ett_nas_eps_emm_elem[];
136 extern elem_fcn emm_elem_fcn[];
137 extern int hf_nas_eps_emm_elem_id;
139 extern value_string_ext nas_esm_elem_strings_ext;
140 extern gint ett_nas_eps_esm_elem[];
141 extern elem_fcn esm_elem_fcn[];
142 extern int hf_nas_eps_esm_elem_id;
144 extern value_string_ext sgsap_elem_strings_ext;
145 extern gint ett_sgsap_elem[];
146 extern elem_fcn sgsap_elem_fcn[];
147 extern int hf_sgsap_elem_id;
149 extern value_string_ext bssgp_elem_strings_ext;
150 extern gint ett_bssgp_elem[];
151 extern elem_fcn bssgp_elem_fcn[];
152 extern int hf_bssgp_elem_id;
154 extern value_string_ext gmr1_ie_common_strings_ext;
155 extern elem_fcn gmr1_ie_common_func[];
156 extern gint ett_gmr1_ie_common[];
158 extern value_string_ext gmr1_ie_rr_strings_ext;
159 extern elem_fcn gmr1_ie_rr_func[];
160 extern gint ett_gmr1_ie_rr[];
162 extern sccp_msg_info_t* sccp_msg;
163 extern sccp_assoc_info_t* sccp_assoc;
165 extern int gsm_a_tap;
166 extern packet_info *gsm_a_dtap_pinfo;
168 /* TS 23 032 */
169 void dissect_geographical_description(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
170 guint16 dissect_description_of_velocity(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
173 /* common field values */
174 extern int hf_gsm_a_extension;
175 extern int hf_gsm_a_tmsi;
176 extern int hf_gsm_a_L3_protocol_discriminator;
177 extern int hf_gsm_a_call_prio;
178 extern int hf_gsm_a_b8spare;
179 extern int hf_gsm_a_skip_ind;
180 extern int hf_gsm_a_rr_chnl_needed_ch1;
181 extern int hf_gsm_a_rr_t3212;
182 extern int hf_gsm_a_gm_rac;
183 extern int hf_gsm_a_spare_bits;
184 extern int hf_gsm_a_lac;
186 /* flags for the packet-gsm_a_common routines */
187 #define GSM_A_PDU_TYPE_BSSMAP 0 /* BSSAP_PDU_TYPE_BSSMAP i.e. 0 - until split complete at least! */
188 #define GSM_A_PDU_TYPE_DTAP 1 /* BSSAP_PDU_TYPE_DTAP i.e. 1 - until split complete at least! */
189 #define GSM_A_PDU_TYPE_RP 2
190 #define GSM_A_PDU_TYPE_RR 3
191 #define GSM_A_PDU_TYPE_COMMON 4
192 #define GSM_A_PDU_TYPE_GM 5
193 #define GSM_A_PDU_TYPE_BSSLAP 6
194 #define GSM_A_PDU_TYPE_SACCH 7
195 #define GSM_PDU_TYPE_BSSMAP_LE 8
196 #define NAS_PDU_TYPE_COMMON 9
197 #define NAS_PDU_TYPE_EMM 10
198 #define NAS_PDU_TYPE_ESM 11
199 #define SGSAP_PDU_TYPE 12
200 #define BSSGP_PDU_TYPE 13
201 #define GMR1_IE_COMMON 14
202 #define GMR1_IE_RR 15
204 extern const char* get_gsm_a_msg_string(int pdu_type, int idx);
207 * this should be set on a per message basis, if possible
209 #define IS_UPLINK_FALSE 0
210 #define IS_UPLINK_TRUE 1
211 #define IS_UPLINK_UNKNOWN 2
213 /* Defines for handling half octet mandatory V IEs
214 * Named LEFT and RIGHT (as displayed) because the GSM definitions and our internal representation
215 * have the bits numbered in opposite senses
217 #define LEFT_NIBBLE (2)
218 #define RIGHT_NIBBLE (1)
220 /* FUNCTIONS */
222 /* ELEMENT FUNCTIONS */
224 #define EXTRANEOUS_DATA_CHECK(edc_len, edc_max_len) \
225 if ((edc_len) > (edc_max_len)) \
227 proto_tree_add_text(tree, tvb, \
228 curr_offset, (edc_len) - (edc_max_len), "Extraneous Data"); \
229 curr_offset += ((edc_len) - (edc_max_len)); \
232 #define EXTRANEOUS_DATA_CHECK_EXPERT(edc_len, edc_max_len, pinfo, ei) \
233 if ((edc_len) > (edc_max_len)) \
235 proto_tree_add_expert(tree, pinfo, ei, tvb, curr_offset, (edc_len) - (edc_max_len)); \
236 curr_offset += ((edc_len) - (edc_max_len)); \
239 #define SHORT_DATA_CHECK(sdc_len, sdc_min_len) \
240 if ((sdc_len) < (sdc_min_len)) \
242 proto_tree_add_text(tree, tvb, \
243 curr_offset, (sdc_len), "Short Data (?)"); \
244 curr_offset += (sdc_len); \
245 return(curr_offset - offset); \
248 #define EXACT_DATA_CHECK(edc_len, edc_eq_len) \
249 if ((edc_len) != (edc_eq_len)) \
251 proto_tree_add_text(tree, tvb, \
252 curr_offset, (edc_len), "Unexpected Data Length"); \
253 curr_offset += (edc_len); \
254 return(curr_offset - offset); \
257 #define NO_MORE_DATA_CHECK(nmdc_len) \
258 if ((nmdc_len) == (curr_offset - offset)) return(nmdc_len);
260 #define SET_ELEM_VARS(SEV_pdu_type, SEV_elem_names_ext, SEV_elem_ett, SEV_elem_funcs) \
261 switch (SEV_pdu_type) \
263 case GSM_A_PDU_TYPE_BSSMAP: \
264 SEV_elem_names_ext = gsm_bssmap_elem_strings_ext; \
265 SEV_elem_ett = ett_gsm_bssmap_elem; \
266 SEV_elem_funcs = bssmap_elem_fcn; \
267 break; \
268 case GSM_A_PDU_TYPE_DTAP: \
269 SEV_elem_names_ext = gsm_dtap_elem_strings_ext; \
270 SEV_elem_ett = ett_gsm_dtap_elem; \
271 SEV_elem_funcs = dtap_elem_fcn; \
272 break; \
273 case GSM_A_PDU_TYPE_RP: \
274 SEV_elem_names_ext = gsm_rp_elem_strings_ext; \
275 SEV_elem_ett = ett_gsm_rp_elem; \
276 SEV_elem_funcs = rp_elem_fcn; \
277 break; \
278 case GSM_A_PDU_TYPE_RR: \
279 SEV_elem_names_ext = gsm_rr_elem_strings_ext; \
280 SEV_elem_ett = ett_gsm_rr_elem; \
281 SEV_elem_funcs = rr_elem_fcn; \
282 break; \
283 case GSM_A_PDU_TYPE_COMMON: \
284 SEV_elem_names_ext = gsm_common_elem_strings_ext; \
285 SEV_elem_ett = ett_gsm_common_elem; \
286 SEV_elem_funcs = common_elem_fcn; \
287 break; \
288 case GSM_A_PDU_TYPE_GM: \
289 SEV_elem_names_ext = gsm_gm_elem_strings_ext; \
290 SEV_elem_ett = ett_gsm_gm_elem; \
291 SEV_elem_funcs = gm_elem_fcn; \
292 break; \
293 case GSM_A_PDU_TYPE_BSSLAP: \
294 SEV_elem_names_ext = gsm_bsslap_elem_strings_ext; \
295 SEV_elem_ett = ett_gsm_bsslap_elem; \
296 SEV_elem_funcs = bsslap_elem_fcn; \
297 break; \
298 case GSM_PDU_TYPE_BSSMAP_LE: \
299 SEV_elem_names_ext = gsm_bssmap_le_elem_strings_ext; \
300 SEV_elem_ett = ett_gsm_bssmap_le_elem; \
301 SEV_elem_funcs = bssmap_le_elem_fcn; \
302 break; \
303 case NAS_PDU_TYPE_COMMON: \
304 SEV_elem_names_ext = nas_eps_common_elem_strings_ext; \
305 SEV_elem_ett = ett_nas_eps_common_elem; \
306 SEV_elem_funcs = nas_eps_common_elem_fcn; \
307 break; \
308 case NAS_PDU_TYPE_EMM: \
309 SEV_elem_names_ext = nas_emm_elem_strings_ext; \
310 SEV_elem_ett = ett_nas_eps_emm_elem; \
311 SEV_elem_funcs = emm_elem_fcn; \
312 break; \
313 case NAS_PDU_TYPE_ESM: \
314 SEV_elem_names_ext = nas_esm_elem_strings_ext; \
315 SEV_elem_ett = ett_nas_eps_esm_elem; \
316 SEV_elem_funcs = esm_elem_fcn; \
317 break; \
318 case SGSAP_PDU_TYPE: \
319 SEV_elem_names_ext = sgsap_elem_strings_ext; \
320 SEV_elem_ett = ett_sgsap_elem; \
321 SEV_elem_funcs = sgsap_elem_fcn; \
322 break; \
323 case BSSGP_PDU_TYPE: \
324 SEV_elem_names_ext = bssgp_elem_strings_ext; \
325 SEV_elem_ett = ett_bssgp_elem; \
326 SEV_elem_funcs = bssgp_elem_fcn; \
327 break; \
328 case GMR1_IE_COMMON: \
329 SEV_elem_names_ext = gmr1_ie_common_strings_ext; \
330 SEV_elem_ett = ett_gmr1_ie_common; \
331 SEV_elem_funcs = gmr1_ie_common_func; \
332 break; \
333 case GMR1_IE_RR: \
334 SEV_elem_names_ext = gmr1_ie_rr_strings_ext; \
335 SEV_elem_ett = ett_gmr1_ie_rr; \
336 SEV_elem_funcs = gmr1_ie_rr_func; \
337 break; \
338 default: \
339 proto_tree_add_text(tree, \
340 tvb, curr_offset, -1, \
341 "Unknown PDU type (%u) gsm_a_common", SEV_pdu_type); \
342 return(consumed); \
346 * Type Length Value (TLV) element dissector
348 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);
351 * Type Extendable Length Value (TLVE) element dissector
353 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);
356 * Type Length Value (TLV-E) element dissector
358 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);
361 * Type Value (TV) element dissector
363 * Length cannot be used in these functions, big problem if a element dissector
364 * is not defined for these.
366 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);
369 * Type Value (TV) element dissector
370 * Where top half nibble is IEI and bottom half nibble is value.
372 * Length cannot be used in these functions, big problem if a element dissector
373 * is not defined for these.
375 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);
378 * Type (T) element dissector
380 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);
383 * Length Value (LV) element dissector
385 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);
388 * Length Value (LV-E) element dissector
390 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);
393 * Value (V) element dissector
395 * Length cannot be used in these functions, big problem if a element dissector
396 * is not defined for these.
398 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);
401 * Short Value (V_SHORT) element dissector
403 * nibble used in this functions to indicate left or right nibble of the octet
404 * This is expected to be used right nibble first, as the tables of 24.008.
406 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);
409 /* XXX: Most (if not all) the functions which make use of the following macros have the variables 'consumed',
410 * 'curr_offset', and 'cur_len' declared as *unsigned*. This means that the 'if (curr_len <= 0)' statement
411 * originally at the end of each of the macros would always be FALSE since an unsigned cannot be less than 0.
412 * I've chosen to change the statement to 'if ((signed)curr_len <= 0)'. (Although this may be a bit of a
413 * hack, it seems simpler than changing declarations to signed in all the places these macros are used).
414 * Is there a better approach ?
417 #define ELEM_MAND_TLV(EMT_iei, EMT_pdu_type, EMT_elem_idx, EMT_elem_name_addition) \
419 if ((consumed = elem_tlv(tvb, tree, pinfo, (guint8) EMT_iei, EMT_pdu_type, EMT_elem_idx, curr_offset, curr_len, EMT_elem_name_addition)) > 0) \
421 curr_offset += consumed; \
422 curr_len -= consumed; \
424 else \
426 proto_tree_add_text(tree, \
427 tvb, curr_offset, 0, \
428 "Missing Mandatory element (0x%02x) %s%s, rest of dissection is suspect", \
429 EMT_iei, \
430 get_gsm_a_msg_string(EMT_pdu_type, EMT_elem_idx), \
431 (EMT_elem_name_addition == NULL) ? "" : EMT_elem_name_addition \
432 ); \
434 if ((signed)curr_len <= 0) return; \
436 /* This is a version where the length field can be one or two octets depending
437 * if the extension bit is set or not (TS 48.016 p 10.1.2).
438 * 8 7 6 5 4 3 2 1
439 * octet 2 0/1 ext length
440 * octet 2a length
442 #define ELEM_MAND_TELV(EMT_iei, EMT_pdu_type, EMT_elem_idx, EMT_elem_name_addition) \
444 if ((consumed = elem_telv(tvb, tree, pinfo, (guint8) EMT_iei, EMT_pdu_type, EMT_elem_idx, curr_offset, curr_len, EMT_elem_name_addition)) > 0) \
446 curr_offset += consumed; \
447 curr_len -= consumed; \
449 else \
451 proto_tree_add_text(tree, \
452 tvb, curr_offset, 0, \
453 "Missing Mandatory element (0x%02x) %s%s, rest of dissection is suspect", \
454 EMT_iei, \
455 get_gsm_a_msg_string(EMT_pdu_type, EMT_elem_idx), \
456 (EMT_elem_name_addition == NULL) ? "" : EMT_elem_name_addition \
457 ); \
459 if ((signed)curr_len <= 0) return; \
462 #define ELEM_MAND_TLV_E(EMT_iei, EMT_pdu_type, EMT_elem_idx, EMT_elem_name_addition) \
464 if ((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) \
466 curr_offset += consumed; \
467 curr_len -= consumed; \
469 else \
471 proto_tree_add_text(tree, \
472 tvb, curr_offset, 0, \
473 "Missing Mandatory element (0x%02x) %s%s, rest of dissection is suspect", \
474 EMT_iei, \
475 get_gsm_a_msg_string(EMT_pdu_type, EMT_elem_idx), \
476 (EMT_elem_name_addition == NULL) ? "" : EMT_elem_name_addition \
477 ); \
479 if ((signed)curr_len <= 0) return; \
481 #define ELEM_OPT_TLV(EOT_iei, EOT_pdu_type, EOT_elem_idx, EOT_elem_name_addition) \
483 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) \
485 curr_offset += consumed; \
486 curr_len -= consumed; \
488 if ((signed)curr_len <= 0) return; \
491 #define ELEM_OPT_TELV(EOT_iei, EOT_pdu_type, EOT_elem_idx, EOT_elem_name_addition) \
493 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) \
495 curr_offset += consumed; \
496 curr_len -= consumed; \
498 if ((signed)curr_len <= 0) return; \
501 #define ELEM_OPT_TLV_E(EOT_iei, EOT_pdu_type, EOT_elem_idx, EOT_elem_name_addition) \
503 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) \
505 curr_offset += consumed; \
506 curr_len -= consumed; \
508 if ((signed)curr_len <= 0) return; \
511 #define ELEM_MAND_TV(EMT_iei, EMT_pdu_type, EMT_elem_idx, EMT_elem_name_addition) \
513 if ((consumed = elem_tv(tvb, tree, pinfo, (guint8) EMT_iei, EMT_pdu_type, EMT_elem_idx, curr_offset, EMT_elem_name_addition)) > 0) \
515 curr_offset += consumed; \
516 curr_len -= consumed; \
518 else \
520 proto_tree_add_text(tree, \
521 tvb, curr_offset, 0, \
522 "Missing Mandatory element (0x%02x) %s%s, rest of dissection is suspect", \
523 EMT_iei, \
524 get_gsm_a_msg_string(EMT_pdu_type, EMT_elem_idx), \
525 (EMT_elem_name_addition == NULL) ? "" : EMT_elem_name_addition \
526 ); \
528 if ((signed)curr_len <= 0) return; \
531 #define ELEM_OPT_TV(EOT_iei, EOT_pdu_type, EOT_elem_idx, EOT_elem_name_addition) \
533 if ((consumed = elem_tv(tvb, tree, pinfo, (guint8) EOT_iei, EOT_pdu_type, EOT_elem_idx, curr_offset, EOT_elem_name_addition)) > 0) \
535 curr_offset += consumed; \
536 curr_len -= consumed; \
538 if ((signed)curr_len <= 0) return; \
541 #define ELEM_OPT_TV_SHORT(EOT_iei, EOT_pdu_type, EOT_elem_idx, EOT_elem_name_addition) \
543 if ((consumed = elem_tv_short(tvb, tree, pinfo, EOT_iei, EOT_pdu_type, EOT_elem_idx, curr_offset, EOT_elem_name_addition)) > 0) \
545 curr_offset += consumed; \
546 curr_len -= consumed; \
548 if ((signed)curr_len <= 0) return; \
551 #define ELEM_OPT_T(EOT_iei, EOT_pdu_type, EOT_elem_idx, EOT_elem_name_addition) \
553 if ((consumed = elem_t(tvb, tree, pinfo, (guint8) EOT_iei, EOT_pdu_type, EOT_elem_idx, curr_offset, EOT_elem_name_addition)) > 0) \
555 curr_offset += consumed; \
556 curr_len -= consumed; \
558 if ((signed)curr_len <= 0) return; \
561 #define ELEM_MAND_LV(EML_pdu_type, EML_elem_idx, EML_elem_name_addition) \
563 if ((consumed = elem_lv(tvb, tree, pinfo, EML_pdu_type, EML_elem_idx, curr_offset, curr_len, EML_elem_name_addition)) > 0) \
565 curr_offset += consumed; \
566 curr_len -= consumed; \
568 else \
570 /* Mandatory, but nothing we can do */ \
572 if ((signed)curr_len <= 0) return; \
575 #define ELEM_MAND_LV_E(EML_pdu_type, EML_elem_idx, EML_elem_name_addition) \
577 if ((consumed = elem_lv_e(tvb, tree, pinfo, EML_pdu_type, EML_elem_idx, curr_offset, curr_len, EML_elem_name_addition)) > 0) \
579 curr_offset += consumed; \
580 curr_len -= consumed; \
582 else \
584 /* Mandatory, but nothing we can do */ \
586 if ((signed)curr_len <= 0) return; \
589 #define ELEM_MAND_V(EMV_pdu_type, EMV_elem_idx, EMV_elem_name_addition) \
591 if ((consumed = elem_v(tvb, tree, pinfo, EMV_pdu_type, EMV_elem_idx, curr_offset, EMV_elem_name_addition)) > 0) \
593 curr_offset += consumed; \
594 curr_len -= consumed; \
596 else \
598 /* Mandatory, but nothing we can do */ \
600 if ((signed)curr_len <= 0) return; \
603 #define ELEM_MAND_VV_SHORT(EMV_pdu_type1, EMV_elem_idx1, EMV_pdu_type2, EMV_elem_idx2) \
605 elem_v_short(tvb, tree, pinfo, EMV_pdu_type1, EMV_elem_idx1, curr_offset, RIGHT_NIBBLE); \
606 elem_v_short(tvb, tree, pinfo, EMV_pdu_type2, EMV_elem_idx2, curr_offset, LEFT_NIBBLE); \
607 curr_offset ++ ; /* consumed length is 1, regardless of contents */ \
608 curr_len -- ; \
609 if ((signed)curr_len <= 0) return; \
613 * this enum must be kept in-sync with 'gsm_a_pd_str'
614 * it is used as an index into the array
616 typedef enum
618 PD_GCC = 0,
619 PD_BCC,
620 PD_RSVD_1,
621 PD_CC,
622 PD_GTTP,
623 PD_MM,
624 PD_RR,
625 PD_UNK_1,
626 PD_GMM,
627 PD_SMS,
628 PD_SM,
629 PD_SS,
630 PD_LCS,
631 PD_UNK_2,
632 PD_RSVD_EXT,
633 PD_TP
635 gsm_a_pd_str_e;
637 typedef struct _gsm_a_tap_rec_t {
639 * value from packet-bssap.h
641 guint8 pdu_type;
642 guint8 message_type;
643 gsm_a_pd_str_e protocol_disc;
644 } gsm_a_tap_rec_t;
646 void dissect_bssmap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
648 void dissect_bssmap_le(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
650 void bssmap_old_bss_to_new_bss_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo);
651 void bssmap_new_bss_to_old_bss_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo);
653 void dtap_mm_mm_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len);
655 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);
656 guint16 be_cell_id_list(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
657 guint16 be_chan_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
658 guint16 be_prio(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
660 WS_DLL_PUBLIC
661 guint16 de_lai(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
662 WS_DLL_PUBLIC
663 guint16 de_mid(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
664 WS_DLL_PUBLIC
665 guint16 de_cell_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
666 guint16 de_bearer_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
667 guint16 de_bearer_cap_uplink(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
668 guint16 be_emlpp_prio(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
669 guint16 be_ganss_loc_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
670 guint16 be_ganss_pos_dta(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
671 guint16 be_ganss_ass_dta(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
672 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);
673 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);
674 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);
675 guint16 de_plmn_list(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
676 WS_DLL_PUBLIC
677 guint16 de_ms_cm_1(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
678 WS_DLL_PUBLIC
679 guint16 de_ms_cm_2(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
680 WS_DLL_PUBLIC
681 guint16 de_ms_cm_3(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
682 guint16 de_serv_cat(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
683 WS_DLL_PUBLIC
684 guint16 de_sm_apn(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
685 guint16 de_sm_pco(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
686 WS_DLL_PUBLIC
687 guint16 de_sm_qos(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
688 WS_DLL_PUBLIC
689 guint16 de_sm_pflow_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
690 guint16 de_sm_tflow_temp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
691 guint16 de_time_zone(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
692 WS_DLL_PUBLIC
693 guint16 de_gmm_drx_param(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
694 WS_DLL_PUBLIC
695 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);
696 WS_DLL_PUBLIC
697 guint16 de_gmm_rai(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
698 WS_DLL_PUBLIC
699 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);
700 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);
702 guint16 de_sup_codec_list(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
705 WS_DLL_PUBLIC
706 guint16 de_rr_cause(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
707 WS_DLL_PUBLIC
708 guint16 de_rr_cell_dsc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
709 WS_DLL_PUBLIC
710 guint16 de_rr_ch_dsc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
711 WS_DLL_PUBLIC
712 guint16 de_rr_ch_mode(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
713 WS_DLL_PUBLIC
714 guint16 de_rr_chnl_needed(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
715 WS_DLL_PUBLIC
716 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);
717 WS_DLL_PUBLIC
718 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);
719 guint16 de_rr_meas_res(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
720 WS_DLL_PUBLIC
721 guint16 de_rr_multirate_conf(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
722 WS_DLL_PUBLIC
723 guint16 de_rr_sus_cau(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
724 WS_DLL_PUBLIC
725 guint16 de_rr_tlli(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
727 WS_DLL_PUBLIC
728 guint16 de_rej_cause(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
729 WS_DLL_PUBLIC
730 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);
731 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_);
733 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);
734 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);
735 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_);
736 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_);
737 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_);
738 void nas_esm_pdn_con_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len);
740 void dtap_rr_ho_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len);
741 void dtap_rr_cip_mode_cpte(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len);
743 void bssmap_perf_loc_abort(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len);
744 void bssmap_reset(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len);
745 void bssmap_conn_oriented(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len);
747 void rp_data_n_ms(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len);
750 * the following allows TAP code access to the messages
751 * without having to duplicate it. With MSVC and a
752 * libwireshark.dll, we need a special declaration.
754 WS_DLL_PUBLIC const value_string gsm_a_bssmap_msg_strings[];
755 WS_DLL_PUBLIC const value_string gsm_a_dtap_msg_mm_strings[];
756 WS_DLL_PUBLIC const value_string gsm_a_dtap_msg_rr_strings[];
757 WS_DLL_PUBLIC const value_string gsm_a_dtap_msg_cc_strings[];
758 WS_DLL_PUBLIC const value_string gsm_a_dtap_msg_gmm_strings[];
759 WS_DLL_PUBLIC const value_string gsm_a_dtap_msg_sms_strings[];
760 WS_DLL_PUBLIC const value_string gsm_a_dtap_msg_sm_strings[];
761 WS_DLL_PUBLIC const value_string gsm_a_dtap_msg_ss_strings[];
762 WS_DLL_PUBLIC const value_string gsm_a_dtap_msg_tp_strings[];
763 WS_DLL_PUBLIC const value_string gsm_a_rr_short_pd_msg_strings[];
764 WS_DLL_PUBLIC const gchar *gsm_a_pd_str[];
766 extern const value_string gsm_a_sm_qos_del_of_err_sdu_vals[];
767 extern const value_string gsm_a_sm_qos_traffic_cls_vals[];
768 extern const value_string gsm_a_sm_qos_ber_vals[];
769 extern const value_string gsm_a_sm_qos_sdu_err_rat_vals[];
770 extern const value_string gsm_a_sm_qos_traff_hdl_pri_vals[];
772 extern const value_string gsm_a_dtap_type_of_number_values[];
773 extern const value_string gsm_a_dtap_numbering_plan_id_values[];
774 extern const value_string gsm_a_sms_vals[];
775 extern const value_string tighter_cap_level_vals[];
776 extern value_string_ext gsm_a_rr_rxlev_vals_ext;
777 extern const value_string gsm_a_gm_type_of_ciph_alg_vals[];
779 extern value_string_ext nas_eps_emm_cause_values_ext;
781 typedef enum
783 /* Common Information Elements [3] 10.5.1 */
784 DE_CELL_ID, /* Cell Identity */
785 DE_CIPH_KEY_SEQ_NUM, /* Ciphering Key Sequence Number */
786 DE_LAI, /* Location Area Identification */
787 DE_MID, /* Mobile Identity */
788 DE_MS_CM_1, /* Mobile Station Classmark 1 */
789 DE_MS_CM_2, /* Mobile Station Classmark 2 */
790 DE_MS_CM_3, /* Mobile Station Classmark 3 */
791 DE_SPARE_NIBBLE, /* Spare Half Octet */
792 DE_D_GB_CALL_REF, /* Descriptive group or broadcast call reference */
793 DE_G_CIPH_KEY_NUM, /* Group Cipher Key Number */
794 DE_PD_SAPI, /* PD and SAPI $(CCBS)$ */
795 DE_PRIO, /* Priority Level */
796 DE_CN_COMMON_GSM_MAP_NAS_SYS_INFO, /* CN Common GSM-MAP NAS system information */
797 DE_CS_DOMAIN_SPEC_SYS_INFO, /* CS domain specific system information */
798 DE_PS_DOMAIN_SPEC_SYS_INFO, /* PS domain specific system information */
799 DE_PLMN_LIST, /* PLMN List */
800 DE_NAS_CONT_FOR_PS_HO, /* 10.5.1.14 NAS container for PS HO */
801 DE_MS_NET_FEAT_SUP, /* 10.5.1.15 MS network feature support */
803 DE_COMMON_NONE /* NONE */
805 common_elem_idx_t;
807 typedef enum
809 BE_UDEF_0, /* Undefined */
810 BE_CIC, /* Circuit Identity Code */
811 BE_RSVD_1, /* Reserved */
812 BE_RES_AVAIL, /* Resource Available */
813 BE_CAUSE, /* Cause */
814 BE_CELL_ID, /* Cell Identifier */
815 BE_PRIO, /* Priority */
816 BE_L3_HEADER_INFO, /* Layer 3 Header Information */
817 BE_IMSI, /* IMSI */
818 BE_TMSI, /* TMSI */
819 BE_ENC_INFO, /* Encryption Information */
820 BE_CHAN_TYPE, /* Channel Type */
821 BE_PERIODICITY, /* Periodicity */
822 BE_EXT_RES_IND, /* Extended Resource Indicator */
823 BE_NUM_MS, /* Number Of MSs */
824 BE_RSVD_2, /* Reserved */
825 BE_RSVD_3, /* Reserved */
826 BE_RSVD_4, /* Reserved */
827 BE_CM_INFO_2, /* Classmark Information Type 2 */
828 BE_CM_INFO_3, /* Classmark Information Type 3 */
829 BE_INT_BAND, /* Interference Band To Be Used */
830 BE_RR_CAUSE, /* RR Cause */
831 BE_RSVD_5, /* Reserved */
832 BE_L3_INFO, /* Layer 3 Information */
833 BE_DLCI, /* DLCI */
834 BE_DOWN_DTX_FLAG, /* Downlink DTX Flag */
835 BE_CELL_ID_LIST, /* Cell Identifier List */
836 BE_RESP_REQ, /* Response Request */
837 BE_RES_IND_METHOD, /* Resource Indication Method */
838 BE_CM_INFO_1, /* Classmark Information Type 1 */
839 BE_CIC_LIST, /* Circuit Identity Code List */
840 BE_DIAG, /* Diagnostic */
841 BE_L3_MSG, /* Layer 3 Message Contents */
842 BE_CHOSEN_CHAN, /* Chosen Channel */
843 BE_TOT_RES_ACC, /* Total Resource Accessible */
844 BE_CIPH_RESP_MODE, /* Cipher Response Mode */
845 BE_CHAN_NEEDED, /* Channel Needed */
846 BE_TRACE_TYPE, /* Trace Type */
847 BE_TRIGGERID, /* TriggerID */
848 BE_TRACE_REF, /* Trace Reference */
849 BE_TRANSID, /* TransactionID */
850 BE_MID, /* Mobile Identity */
851 BE_OMCID, /* OMCID */
852 BE_FOR_IND, /* Forward Indicator */
853 BE_CHOSEN_ENC_ALG, /* Chosen Encryption Algorithm */
854 BE_CCT_POOL, /* Circuit Pool */
855 BE_CCT_POOL_LIST, /* Circuit Pool List */
856 BE_TIME_IND, /* Time Indication */
857 BE_RES_SIT, /* Resource Situation */
858 BE_CURR_CHAN_1, /* Current Channel Type 1 */
859 BE_QUE_IND, /* Queueing Indicator */
860 BE_ASS_REQ, /* Assignment Requirement */
861 BE_UDEF_52, /* Undefined */
862 BE_TALKER_FLAG, /* Talker Flag */
863 BE_CONN_REL_REQ, /* Connection Release Requested */
864 BE_GROUP_CALL_REF, /* Group Call Reference */
865 BE_EMLPP_PRIO, /* eMLPP Priority */
866 BE_CONF_EVO_IND, /* Configuration Evolution Indication */
867 BE_OLD2NEW_INFO, /* Old BSS to New BSS Information */
868 BE_LSA_ID, /* LSA Identifier */
869 BE_LSA_ID_LIST, /* LSA Identifier List */
870 BE_LSA_INFO, /* LSA Information */
871 BE_LCS_QOS, /* LCS QoS */
872 BE_LSA_ACC_CTRL, /* LSA access control suppression */
873 BE_SPEECH_VER, /* Speech Version */
874 BE_UDEF_65, /* Undefined */
875 BE_UDEF_66, /* Undefined */
876 BE_LCS_PRIO, /* LCS Priority */
877 BE_LOC_TYPE, /* Location Type */
878 BE_LOC_EST, /* Location Estimate */
879 BE_POS_DATA, /* Positioning Data */
880 BE_LCS_CAUSE, /* 3.2.2.66 LCS Cause */
881 BE_LCS_CLIENT, /* 10.14 LCS Client Type */
882 BE_APDU, /* APDU */
883 BE_NE_ID, /* Network Element Identity */
884 BE_GPS_ASSIST_DATA, /* GPS Assistance Data */
885 BE_DECIPH_KEYS, /* Deciphering Keys */
886 BE_RET_ERR_REQ, /* Return Error Request */
887 BE_RET_ERR_CAUSE, /* Return Error Cause */
888 BE_SEG, /* Segmentation */
889 BE_SERV_HO, /* Service Handover */
890 BE_SRC_RNC_TO_TAR_RNC_UMTS, /* Source RNC to target RNC transparent information (UMTS) */
891 BE_SRC_RNC_TO_TAR_RNC_CDMA, /* Source RNC to target RNC transparent information (cdma2000) */
892 BE_GERAN_CLS_M, /* GERAN Classmark */
893 BE_GERAN_BSC_CONT, /* GERAN BSC Container */
894 BE_VEL_EST, /* Velocity Estimate */
895 BE_UDEF_86, /* Undefined */
896 BE_UDEF_87, /* Undefined */
897 BE_UDEF_88, /* Undefined */
898 BE_UDEF_89, /* Undefined */
899 BE_UDEF_90, /* Undefined */
900 BE_UDEF_91, /* Undefined */
901 BE_UDEF_92, /* Undefined */
902 BE_UDEF_93, /* Undefined */
903 BE_UDEF_94, /* Undefined */
904 BE_UDEF_95, /* Undefined */
905 BE_UDEF_96, /* Undefined */
906 BE_NEW_BSS_TO_OLD_BSS_INF, /* New BSS to Old BSS Information */
907 BE_UDEF_98, /* Undefined */
908 BE_INTER_SYS_INF, /* Inter-System Information */
909 BE_SNA_ACC_INF, /* SNA Access Information */
910 BE_VSTK_RAND_INF, /* VSTK_RAND Information */
911 BE_VSTK_INF, /* VSTK Information */
912 BE_PAGING_INF, /* Paging Information */
913 BE_IMEI, /* IMEI */
914 BE_VGCS_FEAT_FLG, /* VGCS Feature Flags */
915 BE_TALKER_PRI, /* Talker Priority */
916 BE_EMRG_SET_IND, /* Emergency Set Indication */
917 BE_TALKER_ID, /* Talker Identity */
918 BE_CELL_ID_LIST_SEG, /* Cell Identifier List Segment */
919 BE_SMS_TO_VGCS, /* SMS to VGCS */
920 BE_VGCS_TALKER_MOD, /* VGCS Talker Mode */
921 BE_VGS_VBS_CELL_STAT, /* VGCS/VBS Cell Status */
922 BE_CELL_ID_LST_SEG_F_EST_CELLS, /* Cell Identifier List Segment for established cells */
923 BE_CELL_ID_LST_SEG_F_CELL_TB_EST, /* Cell Identifier List Segment for cells to be established */
924 BE_CELL_ID_LST_SEG_F_REL_CELL, /* Cell Identifier List Segment for released cells - no user present */
925 BE_CELL_ID_LST_SEG_F_NOT_EST_CELL, /* Cell Identifier List Segment for not established cells - no establishment possible */
926 BE_GANSS_ASS_DTA, /* GANSS Assistance Data */
927 BE_GANSS_POS_DTA, /* GANSS Positioning Data */
928 BE_GANSS_LOC_TYP, /* GANSS Location Type */
929 BE_APP_DATA, /* Application Data */
930 BE_DATA_ID, /* Data Identity */
931 BE_APP_DATA_INF, /* Application Data Information */
932 BE_MSISDN, /* MSISDN */
933 BE_AOIP_TRANS_LAY_ADD, /* AoIP Transport Layer Address */
934 BE_SPEECH_CODEC_LST, /* Speech Codec List */
935 BE_SPEECH_CODEC, /* Speech Codec */
936 BE_CALL_ID, /* Call Identifier */
937 BE_CALL_ID_LST, /* Call Identifier List */
938 BE_A_ITF_SEL_FOR_RESET, /* A-Interface Selector for RESET */
939 BE_UDEF_130, /* Undefined */
940 BE_KC128, /* Kc128 */
941 BE_CSG_ID, /* CSG Identifier */
942 BE_REDIR_ATT_FLG, /* Redirect Attempt Flag 3.2.2.111 */
943 BE_REROUTE_REJ_CAUSE, /* Reroute Reject Cause 3.2.2.112 */
944 BE_SEND_SEQN, /* Send Sequence Number 3.2.2.113 */
945 BE_REROUTE_OUTCOME, /* Reroute complete outcome 3.2.2.114 */
946 BE_GLOBAL_CALL_REF, /* Global Call Reference 3.2.2.115 */
947 BE_LCLS_CONF, /* LCLS-Configuration 3.2.2.116 */
948 BE_LCLS_CON_STATUS_CONTROL, /* LCLS-Connection-Status-Control 3.2.2.117 */
949 BE_LCLS_CORR_NOT_NEEDED, /* LCLS-Correlation-Not-Needed 3.2.2.118 */
950 BE_LCLS_BSS_STATUS, /* LCLS-BSS-Status 3.2.2.119 */
951 BE_LCLS_BREAK_REQ, /* LCLS-Break-Request 3.2.2.120 */
952 BE_CSFB_IND, /* CSFB Indication 3.2.2.121 */
953 #if 0
954 BE_CS_TO_PS_SRVCC, /* CS to PS SRVCC 3.2.2.122 */
955 BE_SRC_ENB_2_TGT_ENB_TRANSP_INF, /* Source eNB to target eNB transparent information (E-UTRAN)" 3.2.2.123 */
956 BE_CS_TO_PS_SRVCC_IND, /* CS to PS SRVCC Indication 3.2.2.124 */
957 BE_CN_TO_MS_TRANSP, /* CN to MS transparent information 3.2.2.125 */
958 #endif
959 BE_SELECTED_PLMN_ID, /* Selected PLMN ID 3.2.2.126 */
960 BE_NONE /* NONE */
962 bssmap_elem_idx_t;
964 typedef enum
966 /* BSSMAP LE Elements */
967 DE_BMAPLE_LCSQOS, /* LCS QOS */
968 DE_BMAPLE_LCS_PRIO, /* LCS Priority */
969 DE_BMAPLE_LOC_TYPE, /* Location Type */
970 DE_BMAPLE_GANSS_LOC_TYPE, /* GANSS Location Type */
971 DE_BMAPLE_GEO_LOC, /* 10.9 Geographic Location */
972 DE_BMAPLE_POS_DATA, /* Positioning Data */
973 DE_BMAPLE_GANSS_POS_DATA, /* GANSS Positioning Data */
974 DE_BMAPLE_VELOC_DATA, /* Velocity Data */
975 DE_BMAPLE_LCS_CAUSE, /* LCS Cause */
976 DE_BMAPLE_LCS_CLIENT_TYPE, /* LCS Client Type */
977 DE_BMAPLE_APDU, /* 10.3 APDU */
978 DE_BMAPLE_NETWORK_ELEM_ID, /* Network Element Identity */
979 DE_BMAPLE_REQ_GPS_ASSIST_D, /* 10.10 Requested GPS Assistance Data */
980 DE_BMAPLE_REQ_GNSS_ASSIST_D,/* Requested GANSS Assistance Data */
981 DE_BMAPLE_DECIPH_KEYS, /* 10.8 Deciphering Keys */
982 DE_BMAPLE_RETURN_ERROR_REQ, /* Return Error Request */
983 DE_BMAPLE_RETURN_ERROR_CAUSE, /* Return Error Cause */
984 DE_BMAPLE_SEGMENTATION, /* Segmentation */
985 DE_BMAPLE_CLASSMARK_TYPE_3, /* Classmark Information Type 3 */
986 DE_BMAPLE_CAUSE, /* 10.4 Cause */
987 DE_BMAPLE_CELL_IDENTIFIER, /* 10.5 Cell Identifier */
988 DE_BMAPLE_CHOSEN_CHANNEL, /* 10.6 Chosen Channel */
989 DE_BMAPLE_IMSI, /* 10.11 IMSI */
990 DE_BMAPLE_RES1, /* Reserved */
991 DE_BMAPLE_RES2, /* Reserved */
992 DE_BMAPLE_RES3, /* Reserved */
993 DE_BMAPLE_LCS_CAPABILITY, /* LCS Capability */
994 DE_BMAPLE_PACKET_MEAS_REP, /* Packet Measurement Report */
995 DE_BMAPLE_MEAS_CELL_ID, /* Measured Cell Identity */
996 DE_BMAPLE_IMEI, /* IMEI */
997 BMAPLE_NONE /* NONE */
999 bssmap_le_elem_idx_t;
1001 typedef enum
1003 /* BSS LAP Elements 5 */
1004 DE_BLAP_RES1, /* Reserved */
1005 DE_BLAP_TA, /* Timing Advance */
1006 DE_BLAP_RES3, /* Reserved */ /* (note) */
1007 DE_BLAP_RES4, /* Cell Identity */
1008 DE_BLAP_RES5, /* Reserved */ /* (note) */
1009 DE_BLAP_RES6, /* Reserved */ /* (note) */
1010 DE_BLAP_RES7, /* Reserved */ /* (note) */
1011 DE_BLAP_CH_DESC, /* Channel Description */
1012 DE_BLAP_RES9, /* Reserved */ /* (note) */
1013 DE_BLAP_RES10, /* Reserved */ /* (note) */
1014 DE_BLAP_RES11, /* Reserved */ /* (note) */
1015 DE_BLAP_MEAS_REP, /* Measurement Report */
1016 DE_BLAP_RES13, /* Reserved */ /* (note) */
1017 DE_BLAP_CAUSE, /* Cause */
1018 DE_BLAP_RRLP_FLG, /* RRLP Flag */
1019 DE_BLAP_RRLP_IE, /* RRLP IE */
1020 DE_BLAP_CELL_ID_LIST, /* Cell Identity List */
1021 DE_BLAP_ENH_MEAS_REP, /* Enhanced Measurement Report */
1022 DE_BLAP_LAC, /* Location Area Code */
1023 DE_BLAP_FREQ_LIST, /* Frequency List */
1024 DE_BLAP_MS_POW, /* MS Power */
1025 DE_BLAP_DELTA_TIME, /* Delta Timer */
1026 DE_BLAP_SERV_CELL_ID, /* Serving Cell Identifier */
1027 DE_BLAP_ENC_KEY, /* Encryption Key (Kc) */
1028 DE_BLAP_CIP_M_SET, /* Cipher Mode Setting */
1029 DE_BLAP_CH_MODE, /* Channel Mode */
1030 DE_BLAP_POLL_REP, /* Polling Repetition */
1031 DE_BLAP_PKT_CH_DESC, /* Packet Channel Description */
1032 DE_BLAP_TLLI, /* TLLI */
1033 DE_BLAP_TFI, /* TFI */
1034 DE_BLAP_START_TIME, /* Starting Time */
1035 BSSLAP_NONE /* NONE */
1037 bsslap_elem_idx_t;
1039 typedef enum
1041 /* Mobility Management Information Elements [3] 10.5.3 */
1042 DE_AUTH_PARAM_RAND, /* Authentication Parameter RAND */
1043 DE_AUTH_PARAM_AUTN, /* Authentication Parameter AUTN (UMTS and EPS authentication challenge) */
1044 DE_AUTH_RESP_PARAM, /* Authentication Response Parameter */
1045 DE_AUTH_RESP_PARAM_EXT, /* Authentication Response Parameter (extension) (UMTS authentication challenge only) */
1046 DE_AUTH_FAIL_PARAM, /* Authentication Failure Parameter (UMTS and EPS authentication challenge) */
1047 DE_CM_SRVC_TYPE, /* CM Service Type */
1048 DE_ID_TYPE, /* Identity Type */
1049 DE_LOC_UPD_TYPE, /* Location Updating Type */
1050 DE_NETWORK_NAME, /* Network Name */
1051 DE_REJ_CAUSE, /* Reject Cause */
1052 DE_FOP, /* Follow-on Proceed */
1053 DE_TIME_ZONE, /* Time Zone */
1054 DE_TIME_ZONE_TIME, /* Time Zone and Time */
1055 DE_CTS_PERM, /* CTS Permission */
1056 DE_LSA_ID, /* LSA Identifier */
1057 DE_DAY_SAVING_TIME, /* Daylight Saving Time */
1058 DE_EMERGENCY_NUM_LIST, /* Emergency Number List */
1059 DE_ADD_UPD_PARAMS, /* Additional update parameters */
1060 DE_MM_TIMER, /* MM Timer */
1061 /* Call Control Information Elements 10.5.4 */
1062 DE_AUX_STATES, /* Auxiliary States */
1063 DE_BEARER_CAP, /* Bearer Capability */
1064 DE_CC_CAP, /* Call Control Capabilities */
1065 DE_CALL_STATE, /* Call State */
1066 DE_CLD_PARTY_BCD_NUM, /* Called Party BCD Number */
1067 DE_CLD_PARTY_SUB_ADDR, /* Called Party Subaddress */
1068 DE_CLG_PARTY_BCD_NUM, /* Calling Party BCD Number */
1069 DE_CLG_PARTY_SUB_ADDR, /* Calling Party Subaddress */
1070 DE_CAUSE, /* Cause */
1071 DE_CLIR_SUP, /* CLIR Suppression */
1072 DE_CLIR_INV, /* CLIR Invocation */
1073 DE_CONGESTION, /* Congestion Level */
1074 DE_CONN_NUM, /* Connected Number */
1075 DE_CONN_SUB_ADDR, /* Connected Subaddress */
1076 DE_FACILITY, /* Facility */
1077 DE_HLC, /* High Layer Compatibility */
1078 DE_KEYPAD_FACILITY, /* Keypad Facility */
1079 DE_LLC, /* Low Layer Compatibility */
1080 DE_MORE_DATA, /* More Data */
1081 DE_NOT_IND, /* Notification Indicator */
1082 DE_PROG_IND, /* Progress Indicator */
1083 DE_RECALL_TYPE, /* Recall type $(CCBS)$ */
1084 DE_RED_PARTY_BCD_NUM, /* Redirecting Party BCD Number */
1085 DE_RED_PARTY_SUB_ADDR, /* Redirecting Party Subaddress */
1086 DE_REPEAT_IND, /* Repeat Indicator */
1087 DE_REV_CALL_SETUP_DIR, /* Reverse Call Setup Direction */
1088 DE_SETUP_CONTAINER, /* SETUP Container $(CCBS)$ */
1089 DE_SIGNAL, /* Signal */
1090 DE_SS_VER_IND, /* SS Version Indicator */
1091 DE_USER_USER, /* User-user */
1092 DE_ALERT_PATTERN, /* Alerting Pattern $(NIA)$ */
1093 DE_ALLOWED_ACTIONS, /* Allowed Actions $(CCBS)$ */
1094 DE_SI, /* Stream Identifier */
1095 DE_NET_CC_CAP, /* Network Call Control Capabilities */
1096 DE_CAUSE_NO_CLI, /* Cause of No CLI */
1097 DE_SUP_CODEC_LIST, /* Supported Codec List */
1098 DE_SERV_CAT, /* Service Category */
1099 DE_REDIAL, /* 10.5.4.34 Redial */
1100 DE_NET_INIT_SERV_UPG, /* 10.5.4.35 Network-initiated Service Upgrade ind */
1101 /* Short Message Service Information Elements [5] 8.1.4 */
1102 DE_CP_USER_DATA, /* CP-User Data */
1103 DE_CP_CAUSE, /* CP-Cause */
1104 /* Tests procedures information elements 3GPP TS 44.014 6.4.0 and 3GPP TS 34.109 6.4.0 */
1105 DE_TP_SUB_CHANNEL, /* Close TCH Loop Cmd Sub-channel */
1106 DE_TP_ACK, /* Open Loop Cmd Ack */
1107 DE_TP_LOOP_TYPE, /* Close Multi-slot Loop Cmd Loop type*/
1108 DE_TP_LOOP_ACK, /* Close Multi-slot Loop Ack Result */
1109 DE_TP_TESTED_DEVICE, /* Test Interface Tested device */
1110 DE_TP_PDU_DESCRIPTION, /* GPRS Test Mode Cmd PDU description */
1111 DE_TP_MODE_FLAG, /* GPRS Test Mode Cmd Mode flag */
1112 DE_TP_EGPRS_MODE_FLAG, /* EGPRS Start Radio Block Loopback Cmd Mode flag */
1113 DE_TP_MS_POSITIONING_TECHNOLOGY, /* MS Positioning Technology */
1114 DE_TP_UE_TEST_LOOP_MODE, /* Close UE Test Loop Mode */
1115 DE_TP_UE_POSITIONING_TECHNOLOGY, /* UE Positioning Technology */
1116 DE_TP_RLC_SDU_COUNTER_VALUE, /* RLC SDU Counter Value */
1117 DE_TP_EPC_UE_TEST_LOOP_MODE, /* UE Test Loop Mode */
1118 DE_TP_EPC_UE_TL_A_LB_SETUP, /* UE Test Loop Mode A LB Setup */
1119 DE_TP_EPC_UE_TL_B_LB_SETUP, /* UE Test Loop Mode B LB Setup */
1120 DE_TP_EPC_UE_TL_C_SETUP, /* UE Test Loop Mode C Setup */
1121 DE_TP_EPC_UE_POSITIONING_TECHNOLOGY,/* UE Positioning Technology */
1122 DE_TP_EPC_MBMS_PACKET_COUNTER_VALUE,/* MBMS Packet Counter Value */
1123 DE_TP_EPC_ELLIPSOID_POINT_WITH_ALT, /* ellipsoidPointWithAltitude */
1124 DE_TP_EPC_HORIZONTAL_VELOCITY, /* horizontalVelocity */
1125 DE_TP_EPC_GNSS_TOD_MSEC, /* gnss-TOD-msec */
1126 DE_NONE /* NONE */
1128 dtap_elem_idx_t;
1130 typedef enum
1132 /* GPRS Mobility Management Information Elements [3] 10.5.5 */
1133 DE_ADD_UPD_TYPE, /* [11] 10.5.5.0 Additional Update Type */
1134 DE_ATTACH_RES, /* [7] 10.5.5.1 Attach Result*/
1135 DE_ATTACH_TYPE, /* [7] 10.5.5.2 Attach Type */
1136 DE_CIPH_ALG, /* [7] 10.5.5.3 Cipher Algorithm */
1137 DE_TMSI_STAT, /* [7] 10.5.5.4 TMSI Status */
1138 DE_DETACH_TYPE, /* [7] 10.5.5.5 Detach Type */
1139 DE_DRX_PARAM, /* [7] 10.5.5.6 DRX Parameter */
1140 DE_FORCE_TO_STAND, /* [7] 10.5.5.7 Force to Standby */
1141 DE_FORCE_TO_STAND_H, /* [7] 10.5.5.7 Force to Standby - Info is in the high nibble */
1142 DE_P_TMSI_SIG, /* [7] 10.5.5.8 P-TMSI Signature */
1143 DE_P_TMSI_SIG_2, /* [7] 10.5.5.8a P-TMSI Signature 2 */
1144 DE_ID_TYPE_2, /* [7] 10.5.5.9 Identity Type 2 */
1145 DE_IMEISV_REQ, /* [7] 10.5.5.10 IMEISV Request */
1146 DE_REC_N_PDU_NUM_LIST, /* [7] 10.5.5.11 Receive N-PDU Numbers List */
1147 DE_MS_NET_CAP, /* [7] 10.5.5.12 MS Network Capability */
1148 DE_MS_RAD_ACC_CAP, /* [7] 10.5.5.12a MS Radio Access Capability */
1149 DE_GMM_CAUSE, /* [7] 10.5.5.14 GMM Cause */
1150 DE_RAI, /* [7] 10.5.5.15 Routing Area Identification */
1151 DE_RAI_2, /* [7] 10.5.5.15a Routing Area Identification 2 */
1152 DE_UPD_RES, /* [7] 10.5.5.17 Update Result */
1153 DE_UPD_TYPE, /* [7] 10.5.5.18 Update Type */
1154 DE_AC_REF_NUM, /* [7] 10.5.5.19 A&C Reference Number */
1155 DE_AC_REF_NUM_H, /* A&C Reference Number - Info is in the high nibble */
1156 DE_SRVC_TYPE, /* [7] 10.5.5.20 Service Type */
1157 DE_CELL_NOT, /* [7] 10.5.5.21 Cell Notification */
1158 DE_PS_LCS_CAP, /* [7] 10.5.5.22 PS LCS Capability */
1159 DE_NET_FEAT_SUP, /* [7] 10.5.5.23 Network Feature Support */
1160 DE_ADD_NET_FEAT_SUP, /* [11] 10.5.5.23a Additional network feature support */
1161 DE_RAT_INFO_CONTAINER, /* [7] 10.5.5.24 Inter RAT information container */
1162 DE_REQ_MS_INFO, /* [7] 10.5.5.25 Requested MS information */
1163 DE_UE_NETWORK_CAP, /* [7] 10.5.5.26 UE network capability */
1164 DE_EUTRAN_IRAT_INFO_CONTAINER, /* [7] 10.5.5.27 E-UTRAN inter RAT information container */
1165 DE_VOICE_DOMAIN_PREF, /* [7] 10.5.5.28 Voice domain preference and UE's usage setting */
1166 DE_PTMSI_TYPE, /* [10] 10.5.5.29 P-TMSI type */
1167 DE_LAI_2, /* [10] 10.5.5.30 Location Area Identification 2 */
1168 DE_NET_RES_ID_CONT, /* [11] 10.5.5.31 Network resource identifier container */
1169 /* Session Management Information Elements [3] 10.5.6 */
1170 DE_ACC_POINT_NAME, /* Access Point Name */
1171 DE_NET_SAPI, /* Network Service Access Point Identifier */
1172 DE_PRO_CONF_OPT, /* Protocol Configuration Options */
1173 DE_PD_PRO_ADDR, /* Packet Data Protocol Address */
1174 DE_QOS, /* Quality Of Service */
1175 DE_SM_CAUSE, /* SM Cause */
1176 DE_SM_CAUSE_2, /* SM Cause 2 */
1177 DE_LINKED_TI, /* Linked TI */
1178 DE_LLC_SAPI, /* LLC Service Access Point Identifier */
1179 DE_TEAR_DOWN_IND, /* Tear Down Indicator */
1180 DE_PACKET_FLOW_ID, /* Packet Flow Identifier */
1181 DE_TRAFFIC_FLOW_TEMPLATE, /* Traffic Flow Template */
1182 DE_TMGI, /* Temporary Mobile Group Identity (TMGI) */
1183 DE_MBMS_BEARER_CAP, /* MBMS bearer capabilities */
1184 DE_MBMS_PROT_CONF_OPT, /* MBMS protocol configuration options */
1185 DE_ENH_NSAPI, /* Enhanced network service access point identifier */
1186 DE_REQ_TYPE, /* Request type */
1187 DE_SM_NOTIF_IND, /* Notification indicator */
1188 DE_SM_CONNECTIVITY_TYPE, /* Connectivity type */
1189 /* GPRS Common Information Elements [8] 10.5.7 */
1190 DE_PDP_CONTEXT_STAT, /* [8] 10.5.7.1 PDP Context Status */
1191 DE_RAD_PRIO, /* [8] 10.5.7.2 Radio Priority */
1192 DE_GPRS_TIMER, /* [8] 10.5.7.3 GPRS Timer */
1193 DE_GPRS_TIMER_2, /* [8] 10.5.7.4 GPRS Timer 2 */
1194 DE_GPRS_TIMER_3, /* [10] 10.5.7.4a GPRS Timer 3 */
1195 DE_RAD_PRIO_2, /* [8] 10.5.7.5 Radio Priority 2 */
1196 DE_MBMS_CTX_STATUS, /* [8] 10.5.7.6 MBMS context status */
1197 DE_UPLINK_DATA_STATUS, /* [8] 10.5.7.7 Uplink data status */
1198 DE_DEVICE_PROPERTIES, /* [10] 10.5.7.8 Device properties */
1199 DE_GM_NONE /* NONE */
1201 gm_elem_idx_t;
1203 typedef enum
1205 /* Radio Resource Management Information Elements 10.5.2, most are from 10.5.1 */
1206 DE_RR_BA_RANGE, /* [3] 10.5.2.1a BA Range */
1207 DE_RR_CELL_CH_DSC, /* [3] 10.5.2.1b Cell Channel Description */
1208 DE_RR_BA_LIST_PREF, /* [3] 10.5.2.1c BA List Pref */
1209 DE_RR_UTRAN_FREQ_LIST, /* [3] 10.5.2.1d UTRAN Frequency List */
1210 DE_RR_CELL_SELECT_INDIC, /* [3] 10.5.2.1e Cell selection indicator after release of all TCH and SDCCH IE */
1211 DE_RR_CELL_DSC, /* 10.5.2.2 RR Cell Description */
1212 DE_RR_CELL_OPT_BCCH, /* [3] 10.5.2.3 Cell Options (BCCH) */
1213 DE_RR_CELL_OPT_SACCH, /* [3] 10.5.2.3a Cell Options (SACCH) */
1214 DE_RR_CELL_SEL_PARAM, /* [3] 10.5.2.4 Cell Selection Parameters */
1216 * [3] 10.5.2.4a (void)
1218 DE_RR_CH_DSC, /* [3] 10.5.2.5 Channel Description */
1219 DE_RR_CH_DSC2, /* [3] 10.5.2.5a Channel Description 2 */
1220 DE_RR_CH_DSC3, /* [3] 10.5.2.5c Channel Description 3 */
1221 DE_RR_CH_MODE, /* [3] 10.5.2.6 Channel Mode */
1222 DE_RR_CH_MODE2, /* [3] 10.5.2.7 Channel Mode 2 */
1223 DE_RR_UTRAN_CM, /* [3] 10.5.2.7a UTRAN Classmark */
1224 /* [3] 10.5.2.7b (void) */
1225 DE_RR_CM_ENQ_MASK, /* [3] 10.5.2.7c Classmark Enquiry Mask */
1226 /* [3] 10.5.2.7d GERAN Iu Mode Classmark information element */
1227 DE_RR_CHNL_NEEDED, /* [3] 10.5.2.8 Channel Needed
1228 * [3] 10.5.2.8a (void) */
1229 DE_RR_CHNL_REQ_DESC2, /* [3] 10.5.2.8b Channel Request Description 2 */
1230 DE_RR_CIP_MODE_SET, /* [3] 10.5.2.9 Cipher Mode Setting */
1231 DE_RR_CIP_MODE_RESP, /* [3] 10.5.2.10 Cipher Response */
1232 DE_RR_CTRL_CH_DESC, /* [3] 10.5.2.11 Control Channel Description */
1233 DE_RR_DTM_INFO_DETAILS, /* [3] 10.5.2.11a DTM Information Details */
1234 DE_RR_DYN_ARFCN_MAP, /* [3] 10.5.2.11b Dynamic ARFCN Mapping */
1235 DE_RR_FREQ_CH_SEQ, /* [3] 10.5.2.12 Frequency Channel Sequence */
1236 DE_RR_FREQ_LIST, /* [3] 10.5.2.13 Frequency List */
1237 DE_RR_FREQ_SHORT_LIST, /* [3] 10.5.2.14 Frequency Short List */
1238 DE_RR_FREQ_SHORT_LIST2, /* [3] 10.5.2.14a Frequency Short List 2 */
1239 /* [3] 10.5.2.14b Group Channel Description */
1240 DE_RR_GPRS_RESUMPTION, /* [3] 10.5.2.14c GPRS Resumption */
1241 DE_RR_GPRS_BROADCAST_INFORMATION, /* [3] 10.5.2.14d GPRS broadcast information */
1242 /* [3] 10.5.2.14e Enhanced DTM CS Release Indication*/
1244 DE_RR_HO_REF, /* 10.5.2.15 Handover Reference */
1246 DE_RR_IA_REST_OCT, /* [3] 10.5.2.16 IA Rest Octets */
1247 DE_RR_IAR_REST_OCT, /* [3] 10.5.2.17 IAR Rest Octets */
1248 DE_RR_IAX_REST_OCT, /* [3] 10.5.2.18 IAX Rest Octets */
1249 DE_RR_L2_PSEUDO_LEN, /* [3] 10.5.2.19 L2 Pseudo Length */
1250 DE_RR_MEAS_RES, /* [3] 10.5.2.20 Measurement Results */
1251 /* [3] 10.5.2.20a GPRS Measurement Results */
1252 DE_RR_MOB_ALL, /* [3] 10.5.2.21 Mobile Allocation */
1253 DE_RR_MOB_TIME_DIFF, /* [3] 10.5.2.21a Mobile Time Difference */
1254 DE_RR_MULTIRATE_CONF, /* [3] 10.5.2.21aa MultiRate configuration */
1255 DE_RR_MULT_ALL, /* [3] 10.5.2.21b Multislot Allocation */
1257 * [3] 10.5.2.21c NC mode
1259 DE_RR_NEIGH_CELL_DESC, /* [3] 10.5.2.22 Neighbour Cell Description */
1260 DE_RR_NEIGH_CELL_DESC2, /* [3] 10.5.2.22a Neighbour Cell Description 2 */
1262 * [3] 10.5.2.22b (void)
1263 * [3] 10.5.2.22c NT/N Rest Octets */
1264 DE_RR_P1_REST_OCT, /* [3] 10.5.2.23 P1 Rest Octets */
1265 DE_RR_P2_REST_OCT, /* [3] 10.5.2.24 P2 Rest Octets */
1266 DE_RR_P3_REST_OCT, /* [3] 10.5.2.25 P3 Rest Octets */
1267 DE_RR_PACKET_CH_DESC, /* [3] 10.5.2.25a Packet Channel Description */
1268 DE_RR_DED_MOD_OR_TBF, /* [3] 10.5.2.25b Dedicated mode or TBF */
1269 DE_RR_PKT_UL_ASS, /* [3] 10.5.2.25c RR Packet Uplink Assignment */
1270 DE_RR_PKT_DL_ASS, /* [3] 10.5.2.25d RR Packet Downlink Assignment */
1271 DE_RR_PKT_DL_ASS_TYPE2, /* [3] 10.5.2.25d RR Packet Downlink Assignment Type 2 */
1272 DE_RR_PAGE_MODE, /* [3] 10.5.2.26 Page Mode */
1273 DE_RR_NCC_PERM, /* [3] 10.5.2.27 NCC Permitted */
1274 DE_RR_POW_CMD, /* 10.5.2.28 Power Command */
1275 DE_RR_POW_CMD_AND_ACC_TYPE, /* 10.5.2.28a Power Command and access type */
1276 DE_RR_RACH_CTRL_PARAM, /* [3] 10.5.2.29 RACH Control Parameters */
1277 DE_RR_REQ_REF, /* [3] 10.5.2.30 Request Reference */
1278 DE_RR_CAUSE, /* 10.5.2.31 RR Cause */
1279 DE_RR_SYNC_IND, /* 10.5.2.39 Synchronization Indication */
1280 DE_RR_SI1_REST_OCT, /* [3] 10.5.2.32 SI1 Rest Octets */
1281 /* [3] 10.5.2.33 SI 2bis Rest Octets */
1282 DE_RR_SI2TER_REST_OCT, /* [3] 10.5.2.33a SI 2ter Rest Octets */
1283 DE_RR_SI2QUATER_REST_OCT, /* [3] 10.5.2.33b SI 2quater Rest Octets */
1284 DE_RR_SI3_REST_OCT, /* [3] 10.5.2.34 SI3 Rest Octets */
1285 DE_RR_SI4_REST_OCT, /* [3] 10.5.2.35 SI4 Rest Octets */
1286 DE_RR_SI6_REST_OCT, /* [3] 10.5.2.35a SI6 Rest Octets */
1287 /* [3] 10.5.2.36 SI 7 Rest Octets
1288 * [3] 10.5.2.37 SI 8 Rest Octets
1289 * [3] 10.5.2.37a SI 9 Rest Octets
1291 DE_RR_SI13_REST_OCT, /* [3] 10.5.2.37b SI13 Rest Octets */
1292 /* [3] 10.5.2.37c (void)
1293 * [3] 10.5.2.37d (void)
1294 * [3] 10.5.2.37e SI 16 Rest Octets
1295 * [3] 10.5.2.37f SI 17 Rest Octets
1296 * [3] 10.5.2.37g SI 19 Rest Octets
1297 * [3] 10.5.2.37h SI 18 Rest Octets
1298 * [3] 10.5.2.37i SI 20 Rest Octets */
1299 DE_RR_STARTING_TIME, /* [3] 10.5.2.38 Starting Time */
1300 DE_RR_TIMING_ADV, /* [3] 10.5.2.40 Timing Advance */
1301 DE_RR_TIME_DIFF, /* [3] 10.5.2.41 Time Difference */
1302 DE_RR_TLLI, /* [3] 10.5.2.41a TLLI */
1303 DE_RR_TMSI_PTMSI, /* [3] 10.5.2.42 TMSI/P-TMSI */
1304 DE_RR_VGCS_TAR_MODE_IND, /* [3] 10.5.2.42a VGCS target mode Indication */
1305 DE_RR_VGCS_CIP_PAR, /* [3] 10.5.2.42b VGCS Ciphering Parameters */
1307 DE_RR_WAIT_IND, /* [3] 10.5.2.43 Wait Indication */
1308 /* [3] 10.5.2.44 SI10 rest octets $(ASCI)$ */
1309 DE_RR_EXT_MEAS_RESULT, /* [3] 10.5.2.45 Extended Measurement Results */
1310 DE_RR_EXT_MEAS_FREQ_LIST, /* [3] 10.5.2.46 Extended Measurement Frequency List */
1311 DE_RR_SUS_CAU, /* [3] 10.5.2.47 Suspension Cause */
1312 DE_RR_APDU_ID, /* [3] 10.5.2.48 APDU ID */
1313 DE_RR_APDU_FLAGS, /* [3] 10.5.2.49 APDU Flags */
1314 DE_RR_APDU_DATA, /* [3] 10.5.2.50 APDU Data */
1315 DE_RR_HO_TO_UTRAN_CMD, /* [3] 10.5.2.51 Handover To UTRAN Command */
1316 /* [3] 10.5.2.52 Handover To cdma2000 Command
1317 * [3] 10.5.2.53 (void)
1318 * [3] 10.5.2.54 (void)
1319 * [3] 10.5.2.55 (void)
1320 * [3] 10.5.2.56 3G Target Cell */
1321 DE_RR_SERV_SUP, /* 10.5.2.57 Service Support */
1322 /* 10.5.2.58 MBMS p-t-m Channel Description
1325 DE_RR_DED_SERV_INF, /* [3] 10.5.2.59 Dedicated Service Information */
1328 * 10.5.2.60 MPRACH Description
1329 * 10.5.2.61 Restriction Timer
1330 * 10.5.2.62 MBMS Session Identity
1331 * 10.5.2.63 Reduced group or broadcast call reference
1332 * 10.5.2.64 Talker Priority status
1333 * 10.5.2.65 Talker Identity
1334 * 10.5.2.66 Token
1335 * 10.5.2.67 PS Cause
1336 * 10.5.2.68 VGCS AMR Configuration
1338 DE_RR_CARRIER_IND, /* 10.5.2.69 Carrier Indication */
1339 DE_RR_NONE /* NONE */
1341 rr_elem_idx_t;
1343 typedef enum
1345 /* 9.9.3 EPS Mobility Management (EMM) information elements */
1346 DE_EMM_ADD_UPD_RES, /* 9.9.3.0A Additional update result */
1347 DE_EMM_ADD_UPD_TYPE, /* 9.9.3.0B Additional update type */
1348 DE_EMM_AUTH_FAIL_PAR, /* 9.9.3.1 Authentication failure parameter (dissected in packet-gsm_a_dtap.c)*/
1349 DE_EMM_AUTN, /* 9.9.3.2 Authentication parameter AUTN */
1350 DE_EMM_AUTH_PAR_RAND, /* 9.9.3.3 Authentication parameter RAND */
1351 DE_EMM_AUTH_RESP_PAR, /* 9.9.3.4 Authentication response parameter */
1352 DE_EMM_CSFB_RESP, /* 9.9.3.5 CSFB response */
1353 DE_EMM_DAYL_SAV_T, /* 9.9.3.6 Daylight saving time */
1354 DE_EMM_DET_TYPE, /* 9.9.3.7 Detach type */
1355 DE_EMM_DRX_PAR, /* 9.9.3.8 DRX parameter (dissected in packet-gsm_a_gm.c)*/
1356 DE_EMM_CAUSE, /* 9.9.3.9 EMM cause */
1357 DE_EMM_ATT_RES, /* 9.9.3.10 EPS attach result (Coded inline */
1358 DE_EMM_ATT_TYPE, /* 9.9.3.11 EPS attach type (Coded Inline)*/
1359 DE_EMM_EPS_MID, /* 9.9.3.12 EPS mobile identity */
1360 DE_EMM_EPS_NET_FEATURE_SUP, /* 9.9.3.12A EPS network feature support */
1361 DE_EMM_EPS_UPD_RES, /* 9.9.3.13 EPS update result ( Coded inline)*/
1362 DE_EMM_EPS_UPD_TYPE, /* 9.9.3.14 EPS update type */
1363 DE_EMM_ESM_MSG_CONT, /* 9.9.3.15 ESM message conta */
1364 DE_EMM_GPRS_TIMER, /* 9.9.3.16 GPRS timer ,See subclause 10.5.7.3 in 3GPP TS 24.008 [6]. */
1365 DE_EMM_GPRS_TIMER_2, /* 9.9.3.16A GPRS timer 2, See subclause 10.5.7.4 in 3GPP TS 24.008. */
1366 DE_EMM_GPRS_TIMER_3, /* 9.9.3.16B GPRS timer 3, See subclause 10.5.7.4a in 3GPP TS 24.008. */
1367 DE_EMM_ID_TYPE_2, /* 9.9.3.17 Identity type 2 ,See subclause 10.5.5.9 in 3GPP TS 24.008 [6]. */
1368 DE_EMM_IMEISV_REQ, /* 9.9.3.18 IMEISV request ,See subclause 10.5.5.10 in 3GPP TS 24.008 [6]. */
1369 DE_EMM_KSI_AND_SEQ_NO, /* 9.9.3.19 KSI and sequence number */
1370 DE_EMM_MS_NET_CAP, /* 9.9.3.20 MS network capability ,See subclause 10.5.5.12 in 3GPP TS 24.008 [6]. */
1371 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. */
1372 DE_EMM_NAS_KEY_SET_ID, /* 9.9.3.21 NAS key set identifier (coded inline)*/
1373 DE_EMM_NAS_MSG_CONT, /* 9.9.3.22 NAS message container */
1374 DE_EMM_NAS_SEC_ALGS, /* 9.9.3.23 NAS security algorithms */
1375 DE_EMM_NET_NAME, /* 9.9.3.24 Network name, See subclause 10.5.3.5a in 3GPP TS 24.008 [6]. */
1376 DE_EMM_NONCE, /* 9.9.3.25 Nonce */
1377 DE_EMM_PAGING_ID, /* 9.9.3.25A Paging identity */
1378 DE_EMM_P_TMSI_SIGN, /* 9.9.3.26 P-TMSI signature, See subclause 10.5.5.8 in 3GPP TS 24.008 [6]. */
1379 DE_EMM_SERV_TYPE, /* 9.9.3.27 Service type */
1380 DE_EMM_SHORT_MAC, /* 9.9.3.28 Short MAC */
1381 DE_EMM_TZ, /* 9.9.3.29 Time zone, See subclause 10.5.3.8 in 3GPP TS 24.008 [6]. */
1382 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]. */
1383 DE_EMM_TMSI_STAT, /* 9.9.3.31 TMSI status, See subclause 10.5.5.4 in 3GPP TS 24.008 [6]. */
1384 DE_EMM_TRAC_AREA_ID, /* 9.9.3.32 Tracking area identity */
1385 DE_EMM_TRAC_AREA_ID_LST, /* 9.9.3.33 Tracking area identity list */
1386 DE_EMM_UE_NET_CAP, /* 9.9.3.34 UE network capability */
1387 DE_EMM_UE_RA_CAP_INF_UPD_NEED, /* 9.9.3.35 UE radio capability information update needed */
1388 DE_EMM_UE_SEC_CAP, /* 9.9.3.36 UE security capability */
1389 DE_EMM_EMERG_NUM_LST, /* 9.9.3.37 Emergency Number List */
1390 DE_EMM_CLI, /* 9.9.3.38 CLI */
1391 DE_EMM_SS_CODE, /* 9.9.3.39 SS Code */
1392 DE_EMM_LCS_IND, /* 9.9.3.40 LCS indicator */
1393 DE_EMM_LCS_CLIENT_ID, /* 9.9.3.41 LCS client identity */
1394 DE_EMM_GEN_MSG_CONT_TYPE, /* 9.9.3.42 Generic message container type */
1395 DE_EMM_GEN_MSG_CONT, /* 9.9.3.43 Generic message container */
1396 DE_EMM_VOICE_DMN_PREF, /* 9.9.3.44 Voice domain preference and UE's usage setting */
1397 DE_EMM_GUTI_TYPE, /* 9.9.3.45 GUTI type */
1398 DE_EMM_NONE /* NONE */
1401 nas_emm_elem_idx_t;
1403 typedef enum
1406 DE_SGSAP_IMSI, /* 9.4.6 IMSI*/
1407 DE_SGSAP_VLR_NAME, /* 9.4.22 VLR name*/
1408 DE_SGSAP_TMSI, /* 9.4.20 TMSI */
1409 DE_SGSAP_LOC_AREA_ID, /* 9.4.11 Location area identifier */
1410 DE_SGSAP_CH_NEEDED, /* 9.4.23 Channel Needed */
1411 DE_SGSAP_EMLPP_PRIO, /* 9.4.24 eMLPP Priority*/
1412 DE_SGSAP_TMSI_STATUS, /* 9.4.21 TMSI status */
1413 DE_SGSAP_SGS_CAUSE, /* 9.4.18 SGs cause*/
1414 DE_SGSAP_MME_NAME, /* 9.4.13 MME name*/
1415 DE_SGSAP_EPS_LOC_UPD_TYPE, /* 9.4.2 EPS location update type*/
1416 DE_SGSAP_GLOBAL_CN_ID, /* 9.4.4 Global CN-Id*/
1418 DE_SGSAP_UDEF_11, /* Undefined */
1419 DE_SGSAP_UDEF_12, /* Undefined */
1421 DE_SGSAP_MID, /* 9.4.14 Mobile identity*/
1422 DE_SGSAP_REJ_CAUSE, /* 9.4.16 Reject cause */
1423 DE_SGSAP_IMSI_DET_EPS, /* 9.4.7 IMSI detach from EPS service type */
1424 DE_SGSAP_IMSI_DET_NON_EPS, /* 9.4.8 IMSI detach from non-EPS service type */
1426 DE_SGSAP_IMEISV, /* 9.4.5 IMEISV */
1427 DE_SGSAP_NAS_MSG_CONTAINER, /* 9.4.15 NAS message container*/
1428 DE_SGSAP_MM_INFO, /* 9.4.12 MM information*/
1430 DE_SGSAP_UDEF_20, /* Undefined */
1431 DE_SGSAP_UDEF_21, /* Undefined */
1432 DE_SGSAP_UDEF_22, /* Undefined */
1434 DE_SGSAP_ERR_MSG, /* 9.4.3 Erroneous message*/
1435 DE_SGSAP_CLI, /* 9.4.1 CLI */
1436 DE_SGSAP_LCS_CLIENT_ID, /* 9.4.9 LCS client identity */
1437 DE_SGSAP_LCS_INDIC, /* 9.4.10 LCS indicator */
1438 DE_SGSAP_SS_CODE, /* 9.4.19 SS code */
1439 DE_SGSAP_SERV_INDIC, /* 9.4.17 Service indicator */
1440 DE_SGSAP_UE_TZ, /* 9.4.21b UE Time Zone */
1441 DE_SGSAP_MSC_2, /* 9.4.14a Mobile Station Classmark 2 */
1442 DE_SGSAP_TAID, /* 9.4.21a Tracking Area Identity */
1443 DE_SGSAP_ECGI, /* 9.4.3a E-UTRAN Cell Global Identity */
1444 DE_SGSAP_UE_EMM_MODE, /* 9.4.21c UE EMM mode*/
1446 DE_SGAP_NONE /* NONE */
1448 sgsap_elem_idx_t;
1450 #endif /* __PACKET_GSM_A_COMMON_H__ */