2 * Routines for Non-Access-Stratum (NAS) protocol for Evolved Packet System (EPS) dissection
4 * Copyright 2008 - 2010, Anders Broman <anders.broman@ericsson.com>
8 * Wireshark - Network traffic analyzer
9 * By Gerald Combs <gerald@wireshark.org>
10 * Copyright 1998 Gerald Combs
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26 * References: 3GPP TS 24.301 V9.6.0 (2011-03)
34 #include <epan/packet.h>
35 #include <epan/asn1.h>
37 #include "packet-gsm_map.h"
38 #include "packet-gsm_a_common.h"
39 #include "packet-e212.h"
40 #include "packet-lcsap.h"
42 #define PNAME "Non-Access-Stratum (NAS)PDU"
43 #define PSNAME "NAS-EPS"
44 #define PFNAME "nas-eps"
46 /* Initialize the protocol and registered fields */
47 static int proto_nas_eps = -1;
49 /* Dissector handles */
50 static dissector_handle_t gsm_a_dtap_handle;
51 static dissector_handle_t lpp_handle;
53 /* Forward declaration */
54 static void disect_nas_eps_esm_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset);
56 static int hf_nas_eps_msg_emm_type = -1;
57 int hf_nas_eps_common_elem_id = -1;
58 int hf_nas_eps_emm_elem_id = -1;
59 static int hf_nas_eps_bearer_id = -1;
60 static int hf_nas_eps_spare_bits = -1;
61 static int hf_nas_eps_security_header_type = -1;
62 static int hf_nas_eps_msg_auth_code = -1;
63 static int hf_nas_eps_seq_no = -1;
64 static int hf_nas_eps_seq_no_short = -1;
65 static int hf_nas_eps_emm_ebi0 = -1;
66 static int hf_nas_eps_emm_ebi1 = -1;
67 static int hf_nas_eps_emm_ebi2 = -1;
68 static int hf_nas_eps_emm_ebi3 = -1;
69 static int hf_nas_eps_emm_ebi4 = -1;
70 static int hf_nas_eps_emm_ebi5 = -1;
71 static int hf_nas_eps_emm_ebi6 = -1;
72 static int hf_nas_eps_emm_ebi7 = -1;
73 static int hf_nas_eps_emm_ebi8 = -1;
74 static int hf_nas_eps_emm_ebi9 = -1;
75 static int hf_nas_eps_emm_ebi10 = -1;
76 static int hf_nas_eps_emm_ebi11 = -1;
77 static int hf_nas_eps_emm_ebi12 = -1;
78 static int hf_nas_eps_emm_ebi13 = -1;
79 static int hf_nas_eps_emm_ebi14 = -1;
80 static int hf_nas_eps_emm_ebi15 = -1;
81 static int hf_nas_eps_emm_dl_nas_cnt = -1;
82 static int hf_nas_eps_emm_nonce_mme = -1;
83 static int hf_nas_eps_emm_nonce = -1;
84 static int hf_nas_eps_emm_paging_id = -1;
85 static int hf_nas_eps_emm_eps_att_type = -1;
86 static int hf_nas_eps_emm_cs_lcs_type = -1;
87 static int hf_nas_eps_emm_epc_lcs_type = -1;
88 static int hf_nas_eps_emm_emc_bs_type = -1;
89 static int hf_nas_eps_emm_ims_vops_type = -1;
90 static int hf_nas_eps_emm_nas_key_set_id = -1;
91 static int hf_nas_eps_tsc = -1;
92 static int hf_nas_eps_emm_odd_even = -1;
93 static int hf_nas_eps_emm_type_of_id = -1;
94 static int hf_nas_eps_emm_mme_grp_id = -1;
95 static int hf_nas_eps_emm_imsi = -1;
96 static int hf_nas_eps_emm_imei = -1;
97 static int hf_nas_eps_emm_mme_code = -1;
98 static int hf_nas_eps_emm_m_tmsi = -1;
99 static int hf_nas_eps_esm_msg_cont = -1;
100 static int hf_nas_eps_esm_imeisv_req = -1;
101 static int hf_nas_eps_emm_toi = -1;
102 static int hf_nas_eps_emm_toc = -1;
103 static int hf_nas_eps_emm_EPS_attach_result = -1;
104 static int hf_nas_eps_emm_spare_half_octet = -1;
105 static int hf_nas_eps_emm_add_upd_res = -1;
106 static int hf_nas_eps_emm_add_upd_type = -1;
107 static int hf_nas_eps_emm_res = -1;
108 static int hf_nas_eps_emm_csfb_resp = -1;
109 static int hf_nas_eps_emm_cause = -1;
110 static int hf_nas_eps_emm_id_type2 = -1;
111 static int hf_nas_eps_emm_short_mac = -1;
112 static int hf_nas_eps_emm_tai_tol = -1;
113 static int hf_nas_eps_emm_tai_n_elem = -1;
114 static int hf_nas_eps_emm_tai_tac = -1;
115 static int hf_nas_eps_emm_eea0 = -1;
116 static int hf_nas_eps_emm_128eea1 = -1;
117 static int hf_nas_eps_emm_128eea2 = -1;
118 static int hf_nas_eps_emm_eea3 = -1;
119 static int hf_nas_eps_emm_eea4 = -1;
120 static int hf_nas_eps_emm_eea5 = -1;
121 static int hf_nas_eps_emm_eea6 = -1;
122 static int hf_nas_eps_emm_eea7 = -1;
123 static int hf_nas_eps_emm_eia0 = -1;
124 static int hf_nas_eps_emm_128eia1 = -1;
125 static int hf_nas_eps_emm_128eia2 = -1;
126 static int hf_nas_eps_emm_eia3 = -1;
127 static int hf_nas_eps_emm_eia4 = -1;
128 static int hf_nas_eps_emm_eia5 = -1;
129 static int hf_nas_eps_emm_eia6 = -1;
130 static int hf_nas_eps_emm_eia7 = -1;
131 static int hf_nas_eps_emm_uea0 = -1;
132 static int hf_nas_eps_emm_uea1 = -1;
133 static int hf_nas_eps_emm_uea2 = -1;
134 static int hf_nas_eps_emm_uea3 = -1;
135 static int hf_nas_eps_emm_uea4 = -1;
136 static int hf_nas_eps_emm_uea5 = -1;
137 static int hf_nas_eps_emm_uea6 = -1;
138 static int hf_nas_eps_emm_uea7 = -1;
139 static int hf_nas_eps_emm_ucs2_supp = -1;
140 static int hf_nas_eps_emm_uia1 = -1;
141 static int hf_nas_eps_emm_uia2 = -1;
142 static int hf_nas_eps_emm_uia3 = -1;
143 static int hf_nas_eps_emm_uia4 = -1;
144 static int hf_nas_eps_emm_uia5 = -1;
145 static int hf_nas_eps_emm_uia6 = -1;
146 static int hf_nas_eps_emm_uia7 = -1;
147 static int hf_nas_eps_emm_gea1 = -1;
148 static int hf_nas_eps_emm_gea2 = -1;
149 static int hf_nas_eps_emm_gea3 = -1;
150 static int hf_nas_eps_emm_gea4 = -1;
151 static int hf_nas_eps_emm_gea5 = -1;
152 static int hf_nas_eps_emm_gea6 = -1;
153 static int hf_nas_eps_emm_gea7 = -1;
154 static int hf_nas_eps_emm_lpp_cap = -1;
155 static int hf_nas_eps_emm_lcs_cap = -1;
156 static int hf_nas_eps_emm_1xsrvcc_cap = -1;
157 static int hf_nas_eps_emm_nf_cap = -1;
158 static int hf_nas_eps_emm_ue_ra_cap_inf_upd_need_flg;
159 static int hf_nas_eps_emm_ss_code = -1;
160 static int hf_nas_eps_emm_lcs_ind = -1;
161 static int hf_nas_eps_emm_gen_msg_cont_type = -1;
162 static int hf_nas_eps_emm_apn_ambr_ul = -1;
163 static int hf_nas_eps_emm_apn_ambr_dl = -1;
164 static int hf_nas_eps_emm_apn_ambr_ul_ext = -1;
165 static int hf_nas_eps_emm_apn_ambr_dl_ext = -1;
166 static int hf_nas_eps_emm_apn_ambr_ul_ext2 = -1;
167 static int hf_nas_eps_emm_apn_ambr_dl_ext2 = -1;
169 static int hf_nas_eps_emm_switch_off = -1;
170 static int hf_nas_eps_emm_detach_type_UL = -1;
171 static int hf_nas_eps_emm_detach_type_DL = -1;
173 static int hf_nas_eps_qci = -1;
174 static int hf_nas_eps_mbr_ul = -1;
175 static int hf_nas_eps_mbr_dl = -1;
176 static int hf_nas_eps_gbr_ul = -1;
177 static int hf_nas_eps_gbr_dl = -1;
178 static int hf_nas_eps_embr_ul = -1;
179 static int hf_nas_eps_embr_dl = -1;
180 static int hf_nas_eps_egbr_ul = -1;
181 static int hf_nas_eps_egbr_dl = -1;
183 static int hf_nas_eps_esm_cause = -1;
184 static int hf_nas_eps_esm_eit = -1;
185 static int hf_nas_eps_esm_lnkd_eps_bearer_id = -1;
186 static int hf_nas_eps_esm_notif_ind = -1;
187 static int hf_nas_eps_esm_pdn_type = -1;
188 static int hf_nas_eps_esm_pdn_ipv4 = -1;
189 static int hf_nas_eps_esm_pdn_ipv6_if_id = -1;
191 static int hf_nas_eps_esm_linked_bearer_id = -1;
193 static int hf_nas_eps_active_flg = -1;
194 static int hf_nas_eps_eps_update_result_value = -1;
195 static int hf_nas_eps_eps_update_type_value = -1;
196 static int hf_nas_eps_service_type = -1;
198 static int hf_nas_eps_nas_msg_cont = -1;
199 static int hf_nas_eps_gen_msg_cont = -1;
201 static int hf_nas_eps_cmn_add_info = -1;
204 static int hf_nas_eps_msg_esm_type = -1;
205 int hf_nas_eps_esm_elem_id = -1;
206 static int hf_nas_eps_esm_proc_trans_id = -1;
208 /* Initialize the subtree pointers */
209 static int ett_nas_eps = -1;
210 static int ett_nas_eps_esm_msg_cont = -1;
211 static int ett_nas_eps_nas_msg_cont = -1;
212 static int ett_nas_eps_gen_msg_cont = -1;
213 static int ett_nas_eps_cmn_add_info = -1;
215 /* Global variables */
216 static packet_info *gpinfo;
218 guint8 eps_nas_gen_msg_cont_type = 0;
220 /* Table 9.8.1: Message types for EPS mobility management
221 * 0 1 - - - - - - EPS mobility management messages
223 static const value_string nas_msg_emm_strings[] = {
224 { 0x41, "Attach request"},
225 { 0x42, "Attach accept"},
226 { 0x43, "Attach complete"},
227 { 0x44, "Attach reject"},
228 { 0x45, "Detach request"},
229 { 0x46, "Detach accept"},
231 { 0x48, "Tracking area update request"},
232 { 0x49, "Tracking area update accept"},
233 { 0x4a, "Tracking area update complete"},
234 { 0x4b, "Tracking area update reject"},
236 { 0x4c, "Extended service request"},
237 { 0x4e, "Service reject"},
239 { 0x50, "GUTI reallocation command"},
240 { 0x51, "GUTI reallocation complete"},
241 { 0x52, "Authentication request"},
242 { 0x53, "Authentication response"},
243 { 0x54, "Authentication reject"},
244 { 0x5c, "Authentication failure"},
245 { 0x55, "Identity request"},
246 { 0x56, "Identity response"},
247 { 0x5d, "Security mode command"},
248 { 0x5e, "Security mode complete"},
249 { 0x5f, "Security mode reject"},
251 { 0x60, "EMM status"},
252 { 0x61, "EMM information"},
253 { 0x62, "Downlink NAS transport"},
254 { 0x63, "Uplink NAS transport"},
255 { 0x64, "CS Service notification"},
256 { 0x68, "Downlink generic NAS transport"},
257 { 0x69, "Uplink generic NAS transport"},
261 /* Table 9.8.2: Message types for EPS session management */
263 static const value_string nas_msg_esm_strings[] = {
264 { 0xc1, "Activate default EPS bearer context request"},
265 { 0xc2, "Activate default EPS bearer context accept"},
266 { 0xc3, "Activate default EPS bearer context reject"},
267 { 0xc5, "Activate dedicated EPS bearer context request"},
268 { 0xc6, "Activate dedicated EPS bearer context accept"},
269 { 0xc7, "Activate dedicated EPS bearer context reject"},
270 { 0xc9, "Modify EPS bearer context request"},
271 { 0xca, "Modify EPS bearer context accept"},
272 { 0xcb, "Modify EPS bearer context reject"},
273 { 0xcd, "Deactivate EPS bearer context request"},
274 { 0xce, "Deactivate EPS bearer context accept"},
275 { 0xd0, "PDN connectivity request"},
276 { 0xd1, "PDN connectivity reject"},
277 { 0xd2, "PDN disconnect request"},
278 { 0xd3, "PDN disconnect reject"},
279 { 0xd4, "Bearer resource allocation request"},
280 { 0xd5, "Bearer resource allocation reject"},
281 { 0xd6, "Bearer resource modification request"},
282 { 0xd7, "Bearer resource modification reject"},
283 { 0xd9, "ESM information request"},
284 { 0xda, "ESM information response"},
285 { 0xdb, "Notification"},
286 { 0xe8, "ESM status"},
290 static const value_string security_header_type_vals[] = {
291 { 0, "Plain NAS message, not security protected"},
292 { 1, "Integrity protected"},
293 { 2, "Integrity protected and ciphered"},
294 { 3, "Integrity protected with new EPS security context"},
295 { 4, "Integrity protected and ciphered with new EPS security context"},
303 { 12, "Security header for the SERVICE REQUEST message "},
304 { 13, "These values are not used in this version of the protocol. If received they shall be interpreted as \"1100\""},
305 { 14, "These values are not used in this version of the protocol. If received they shall be interpreted as \"1100\""},
306 { 15, "These values are not used in this version of the protocol. If received they shall be interpreted as \"1100\""},
309 static value_string_ext security_header_type_vals_ext = VALUE_STRING_EXT_INIT(security_header_type_vals);
311 const value_string nas_eps_common_elem_strings[] = {
312 { 0x00, "Additional information" }, /* 9.9.2.0 Additional information */
313 { 0x00, "EPS bearer context status" }, /* 9.9.2.1 EPS bearer context status */
314 { 0x00, "Location area identification" }, /* 9.9.2.2 Location area identification */
315 { 0x00, "Mobile identity" }, /* 9.9.2.3 Mobile identity */
316 { 0x00, "Mobile station classmark 2" }, /* 9.9.2.4 Mobile station classmark 2 */
317 { 0x00, "Mobile station classmark 3" }, /* 9.9.2.5 Mobile station classmark 3 */
318 { 0x00, "NAS security parameters from E-UTRA" }, /* 9.9.2.6 NAS security parameters from E-UTRA */
319 { 0x00, "NAS security parameters to E-UTRA" }, /* 9.9.2.7 NAS security parameters to E-UTRA */
320 { 0x00, "PLMN list" }, /* 9.9.2.8 PLMN list */
321 /* 9.9.2.9 Spare half octet */
322 { 0x00, "Supported codec list" }, /* 9.9.2.10 Supported codec list */
325 /* Utility functions */
327 calc_bitrate(guint8 value){
328 guint16 return_value = value;
330 if (value > 63 && value <= 127) {
331 return_value = 64 + (value - 64) * 8;
333 else if (value > 127 && value <= 254) {
334 return_value = 576 + (value - 128) * 64;
336 else if (value==0xff) {
342 calc_bitrate_ext(guint8 value){
343 guint32 return_value = 0;
345 if (value > 0 && value <= 0x4a) {
346 return_value = 8600 + value * 100;
348 else if (value > 0x4a && value <= 0xba) {
349 return_value = 16 + (value-0x4a);
351 else if (value > 0xba && value <= 0xfa) {
352 return_value = 128 + (value-0xba)*2;
361 #define NUM_NAS_EPS_COMMON_ELEM (sizeof(nas_eps_common_elem_strings)/sizeof(value_string))
362 gint ett_nas_eps_common_elem[NUM_NAS_EPS_COMMON_ELEM];
366 DE_EPS_CMN_ADD_INFO, /* 9.9.2.0 Additional information */
367 DE_EPS_CMN_EPS_BE_CTX_STATUS, /* 9.9.2.1 EPS bearer context status */
368 DE_EPS_CMN_LOC_AREA_ID, /* 9.9.2.2 Location area identification */
369 DE_EPS_CMN_MOB_ID, /* 9.9.2.3 Mobile identity */
370 DE_EPS_MS_CM_2, /* 9.9.2.4 Mobile station classmark 2 */
371 DE_EPS_MS_CM_3, /* 9.9.2.5 Mobile station classmark 3 */
372 DE_EPS_NAS_SEC_PAR_FROM_EUTRA, /* 9.9.2.6 NAS security parameters from E-UTRA */
373 DE_EPS_NAS_SEC_PAR_TO_EUTRA, /* 9.9.2.7 NAS security parameters to E-UTRA */
375 DE_EPS_CMN_PLM_LST, /* 9.9.2.8 PLMN list */
376 DE_EPS_CMN_SUP_CODEC_LST, /* 9.9.2.6 9.9.2.10 Supported codec list */
377 DE_EPS_COMMON_NONE /* NONE */
379 nas_eps_common_elem_idx_t;
381 * 9.9.2 Common information elements
384 /* 9.9.2.0 Additional information */
386 de_eps_cmn_add_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
389 proto_tree *sub_tree;
392 item = proto_tree_add_item(tree, hf_nas_eps_cmn_add_info, tvb, offset, len, ENC_NA);
393 sub_tree = proto_item_add_subtree(item, ett_nas_eps_cmn_add_info);
395 new_tvb = tvb_new_subset(tvb, offset, len, len);
397 switch (eps_nas_gen_msg_cont_type) {
400 dissect_lcsap_Correlation_ID_PDU(new_tvb, pinfo, sub_tree);
410 * 9.9.2.1 EPS bearer context status
412 static const true_false_string nas_eps_emm_ebi_vals = {
413 "BEARER CONTEXT-ACTIVE",
414 "BEARER CONTEXT-INACTIVE"
418 de_eps_cmn_eps_be_ctx_status(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
422 curr_offset = offset;
424 /* EBI(7) EBI(6) EBI(5) EBI(4) EBI(3) EBI(2) EBI(1) EBI(0) octet 3 */
425 proto_tree_add_item(tree, hf_nas_eps_emm_ebi7, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
426 proto_tree_add_item(tree, hf_nas_eps_emm_ebi6, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
427 proto_tree_add_item(tree, hf_nas_eps_emm_ebi5, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
428 /* EBI(0) - EBI(4): Bits 0 to 4 of octet 3 are spare and shall be coded as zero. */
429 proto_tree_add_item(tree, hf_nas_eps_emm_ebi4, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
430 proto_tree_add_item(tree, hf_nas_eps_emm_ebi3, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
431 proto_tree_add_item(tree, hf_nas_eps_emm_ebi2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
432 proto_tree_add_item(tree, hf_nas_eps_emm_ebi1, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
433 proto_tree_add_item(tree, hf_nas_eps_emm_ebi0, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
435 /* EBI(15) EBI(14) EBI(13) EBI(12) EBI(11) EBI(10) EBI(9) EBI(8) octet 4 */
436 proto_tree_add_item(tree, hf_nas_eps_emm_ebi15, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
437 proto_tree_add_item(tree, hf_nas_eps_emm_ebi14, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
438 proto_tree_add_item(tree, hf_nas_eps_emm_ebi13, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
439 proto_tree_add_item(tree, hf_nas_eps_emm_ebi12, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
440 proto_tree_add_item(tree, hf_nas_eps_emm_ebi11, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
441 proto_tree_add_item(tree, hf_nas_eps_emm_ebi10, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
442 proto_tree_add_item(tree, hf_nas_eps_emm_ebi9, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
443 proto_tree_add_item(tree, hf_nas_eps_emm_ebi8, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
448 * 9.9.2.2 Location area identification
449 * See subclause 10.5.1.3 in 3GPP TS 24.008 [6].
452 * 9.9.2.3 Mobile identity
453 * See subclause 10.5.1.4 in 3GPP TS 24.008 [6].
454 * exported from gsm_a_common
458 * 9.9.2.4 Mobile station classmark 2
459 * See subclause 10.5.1.6 in 3GPP TS 24.008 [13].
462 * 9.9.2.5 Mobile station classmark 3
463 * See subclause 10.5.1.7 in 3GPP TS 24.008 [13].
467 * 9.9.2.6 NAS security parameters from E-UTRA
470 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_)
474 curr_offset = offset;
476 /* DL NAS COUNT value (short) (octet 2, bit 1 to 4)
477 * This field contains the 4 least significant bits of the binary representation of the downlink
478 * NAS COUNT value applicable when this information element is sent.
480 proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, curr_offset<<3, 4, ENC_BIG_ENDIAN);
481 proto_tree_add_item(tree, hf_nas_eps_emm_dl_nas_cnt, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
487 * 9.9.2.7 NAS security parameters to E-UTRA
490 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_)
494 curr_offset = offset;
495 /* NonceMME value (octet 1 to 5)
496 * This field is coded as the nonce value in the Nonce information element (see subclause 9.9.3.25).
498 proto_tree_add_item(tree, hf_nas_eps_emm_nonce_mme, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
500 /* type of ciphering algorithm (octet 6, bit 5 to 7)
501 * These fields are coded as the type of integrity protection algorithm and type of ciphering algorithm
502 * in the NAS security algorithms information element (see subclause 9.9.3.23).
503 * Bit 4 and 8 of octet 6 are spare and shall be coded as zero.
505 proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, curr_offset<<3, 1, ENC_BIG_ENDIAN);
506 proto_tree_add_item(tree, hf_nas_eps_emm_toc, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
507 /* Type of integrity protection algorithm (octet 6, bit 1 to 3)*/
508 proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, (curr_offset<<3)+4, 1, ENC_BIG_ENDIAN);
509 proto_tree_add_item(tree, hf_nas_eps_emm_toi, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
512 * NAS key set identifier (octet 7, bit 1 to 3) and
513 * type of security context flag (TSC) (octet 7, bit 4)
514 * These fields are coded as the NAS key set identifier and type of security context flag in the
515 * NAS key set identifier information element (see subclause 9.9.3.21).
516 * Bit 5 to 8 of octet 7 are spare and shall be coded as zero.
518 proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, curr_offset<<3, 4, ENC_BIG_ENDIAN);
519 /* Type of security context flag (TSC) V 1/2 */
520 proto_tree_add_bits_item(tree, hf_nas_eps_tsc, tvb, (curr_offset<<3)+4, 1, ENC_BIG_ENDIAN);
521 /* NAS key set identifier */
522 proto_tree_add_bits_item(tree, hf_nas_eps_emm_nas_key_set_id, tvb, (curr_offset<<3)+5, 3, ENC_BIG_ENDIAN);
529 * See subclause 10.5.1.13 in 3GPP TS 24.008 [6].
532 * 9.9.2.9 Spare half octet
533 * This element is used in the description of EMM and ESM messages when an odd number of
534 * half octet type 1 information elements are used. This element is filled with spare bits
535 * set to zero and is placed in bits 5 to 8 of the octet unless otherwise specified.
540 * 9.9.2.10 Supported codec list
541 * See subclause 10.5.4.32 in 3GPP TS 24.008 [13].
542 * Dissected in packet-gsm_a_dtap.c
545 guint16 (*nas_eps_common_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string, int string_len) = {
546 /* 9.9.2 Common information elements */
547 de_eps_cmn_add_info, /* 9.9.2.0 Additional information */
548 de_eps_cmn_eps_be_ctx_status, /* 9.9.2.1 EPS bearer context status */
549 de_lai, /* 9.9.2.2 Location area identification */
550 de_mid, /* 9.9.2.3 Mobile identity See subclause 10.5.1.4 in 3GPP TS 24.008*/
551 de_ms_cm_2, /* 9.9.2.4 Mobile station classmark 2 */
552 de_ms_cm_3, /* 9.9.2.5 Mobile station classmark 3 */
553 de_emm_sec_par_from_eutra, /* 9.9.2.6 NAS security parameters from E-UTRA */
554 de_emm_sec_par_to_eutra, /* 9.9.2.7 NAS security parameters to E-UTRA */
556 de_plmn_list, /* 9.9.2.8 PLMN list */
557 NULL, /* 9.9.2.10 Supported codec list (packet-gsm_a_dtap.c) */
561 const value_string nas_emm_elem_strings[] = {
562 /* 9.9.3 EPS Mobility Management (EMM) information elements */
563 { 0x00, "Additional update result" }, /* 9.9.3.0A Additional update result */
564 { 0x00, "Additional update type" }, /* 9.9.3.0B Additional update type */
565 { 0x00, "Authentication failure parameter" }, /* 9.9.3.1 Authentication failure parameter */
566 { 0x00, "Authentication parameter AUTN" }, /* 9.9.3.2 Authentication parameter AUTN */
567 { 0x00, "Authentication parameter RAND" }, /* 9.9.3.3 Authentication parameter RAND */
568 { 0x00, "Authentication response parameter" }, /* 9.9.3.4 Authentication response parameter */
569 { 0x00, "CSFB response" }, /* 9.9.3.5 CSFB response */
570 { 0x00, "Daylight saving time" }, /* 9.9.3.6 Daylight saving time */
571 { 0x00, "Detach type" }, /* 9.9.3.7 Detach type */
572 { 0x00, "DRX parameter" }, /* 9.9.3.8 DRX parameter */
573 { 0x00, "EMM cause" }, /* 9.9.3.9 EMM cause */
574 { 0x00, "EPS attach result" }, /* 9.9.3.10 EPS attach result */
575 { 0x00, "EPS attach type" }, /* 9.9.3.11 EPS attach type */
576 { 0x00, "EPS mobile identity" }, /* 9.9.3.12 EPS mobile identity */
577 { 0x00, "EPS network feature support" }, /* 9.9.3.12 EPS mobile identity */
578 { 0x00, "EPS update result" }, /* 9.9.3.13 EPS update result */
579 { 0x00, "EPS update type" }, /* 9.9.3.14 EPS update type */
580 { 0x00, "ESM message container" }, /* 9.9.3.15 ESM message conta */
581 { 0x00, "GPRS timer" }, /* 9.9.3.16 GPRS timer ,See subclause 10.5.7.3 in 3GPP TS 24.008 [6]. */
582 { 0x00, "Identity type 2" }, /* 9.9.3.17 Identity type 2 ,See subclause 10.5.5.9 in 3GPP TS 24.008 [6]. */
583 { 0x00, "IMEISV request" }, /* 9.9.3.18 IMEISV request ,See subclause 10.5.5.10 in 3GPP TS 24.008 [6]. */
584 { 0x00, "KSI and sequence number" }, /* 9.9.3.19 KSI and sequence number */
585 { 0x00, "MS network capability" }, /* 9.9.3.20 MS network capability ,See subclause 10.5.5.12 in 3GPP TS 24.008 [6]. */
586 { 0x00, "NAS key set identifier" }, /* 9.9.3.21 NAS key set identifier */
587 { 0x00, "NAS message container" }, /* 9.9.3.22 NAS message container */
588 { 0x00, "NAS security algorithms" }, /* 9.9.3.23 NAS security algorithms */
589 { 0x00, "Network name" }, /* 9.9.3.24 Network name, See subclause 10.5.3.5a in 3GPP TS 24.008 [6]. */
590 { 0x00, "Nonce" }, /* 9.9.3.25 Nonce */
591 { 0x00, "Paging identity" }, /* 9.9.3.25A Paging identity */
592 { 0x00, "P-TMSI signature" }, /* 9.9.3.26 P-TMSI signature, See subclause 10.5.5.8 in 3GPP TS 24.008 [6]. */
593 { 0x00, "Service type" }, /* 9.9.3.27 Service type ,See subclause 10.5.5.15 in 3GPP TS 24.008 [6]. */
594 { 0x00, "Short MAC" }, /* 9.9.3.28 Short MAC */
595 { 0x00, "Time zone" }, /* 9.9.3.29 Time zone, See subclause 10.5.3.8 in 3GPP TS 24.008 [6]. */
596 { 0x00, "Time zone and time" }, /* 9.9.3.30 Time zone and time, See subclause 10.5.3.9 in 3GPP TS 24.008 [6]. */
597 { 0x00, "TMSI status" }, /* 9.9.3.31 TMSI status, See subclause 10.5.5.4 in 3GPP TS 24.008 [6]. */
598 { 0x00, "Tracking area identity" }, /* 9.9.3.32 Tracking area identity */
599 { 0x00, "Tracking area identity list" }, /* 9.9.3.33 Tracking area identity list */
600 { 0x00, "UE network capability" }, /* 9.9.3.34 UE network capability */
601 { 0x00, "UE radio capability information update needed" }, /* 9.9.3.35 UE radio capability information update needed */
602 { 0x00, "UE security capability" }, /* 9.9.3.36 UE security capability */
603 { 0x00, "Emergency Number List" }, /* 9.9.3.37 Emergency Number List */
604 { 0x00, "CLI" }, /* 9.9.3.38 CLI */
605 { 0x00, "SS Code" }, /* 9.9.3.39 SS Code */
606 { 0x00, "LCS indicator" }, /* 9.9.3.40 LCS indicator */
607 { 0x00, "LCS client identity" }, /* 9.9.3.41 LCS client identity */
608 { 0x00, "Generic message container type" }, /* 9.9.3.42 Generic message container type */
609 { 0x00, "Generic message container" }, /* 9.9.3.43 Generic message container */
610 { 0x00, "Voice domain preference and UEs usage setting" }, /* 9.9.3.44 Voice domain preference and UEs usage setting */
613 #define NUM_NAS_EMM_ELEM (sizeof(nas_emm_elem_strings)/sizeof(value_string))
614 gint ett_nas_eps_emm_elem[NUM_NAS_EMM_ELEM];
617 This enum has been moved to packet-gsm_a_common to
618 make it possible to use element dissection from this dissector
620 It is left here as a comment for easier reference.
622 Note this enum must be of the same size as the element decoding list
626 /. 9.9.3 EPS Mobility Management (EMM) information elements ./
627 DE_EMM_ADD_UPD_RES, /. 9.9.3.0A Additional update result ./
628 DE_EMM_ADD_UPD_TYPE, /. 9.9.3.0B Additional update type ./
629 DE_EMM_AUTH_FAIL_PAR, /. 9.9.3.1 Authentication failure parameter (dissected in packet-gsm_a_dtap.c)./
630 DE_EMM_AUTN, /. 9.9.3.2 Authentication parameter AUTN ./
631 DE_EMM_AUTH_PAR_RAND, /. 9.9.3.3 Authentication parameter RAND ./
632 DE_EMM_AUTH_RESP_PAR, /. 9.9.3.4 Authentication response parameter ./
633 DE_EMM_CSFB_RESP, /. 9.9.3.5 CSFB response ./
634 DE_EMM_DAYL_SAV_T, /. 9.9.3.6 Daylight saving time ./
635 DE_EMM_DET_TYPE, /. 9.9.3.7 Detach type ./
636 DE_EMM_DRX_PAR, /. 9.9.3.8 DRX parameter (dissected in packet-gsm_a_gm.c)./
637 DE_EMM_CAUSE, /. 9.9.3.9 EMM cause ./
638 DE_EMM_ATT_RES, /. 9.9.3.10 EPS attach result (Coded inline ./
639 DE_EMM_ATT_TYPE, /. 9.9.3.11 EPS attach type (Coded Inline)./
640 DE_EMM_EPS_MID, /. 9.9.3.12 EPS mobile identity ./
641 DE_EMM_EPS_NET_FEATURE_SUP, /. 9.9.3.12A EPS network feature support ./
642 DE_EMM_EPS_UPD_RES, /. 9.9.3.13 EPS update result ( Coded inline)./
643 DE_EMM_EPS_UPD_TYPE, /. 9.9.3.14 EPS update type ./
644 DE_EMM_ESM_MSG_CONT, /. 9.9.3.15 ESM message conta ./
645 DE_EMM_GPRS_TIMER, /. 9.9.3.16 GPRS timer ,See subclause 10.5.7.3 in 3GPP TS 24.008 [6]. ./
646 DE_EMM_ID_TYPE_2, /. 9.9.3.17 Identity type 2 ,See subclause 10.5.5.9 in 3GPP TS 24.008 [6]. ./
647 DE_EMM_IMEISV_REQ, /. 9.9.3.18 IMEISV request ,See subclause 10.5.5.10 in 3GPP TS 24.008 [6]. ./
648 DE_EMM_KSI_AND_SEQ_NO, /. 9.9.3.19 KSI and sequence number ./
649 DE_EMM_MS_NET_CAP, /. 9.9.3.20 MS network capability ,See subclause 10.5.5.12 in 3GPP TS 24.008 [6]. ./
650 DE_EMM_NAS_KEY_SET_ID, /. 9.9.3.21 NAS key set identifier (coded inline)./
651 DE_EMM_NAS_MSG_CONT, /. 9.9.3.22 NAS message container ./
652 DE_EMM_NAS_SEC_ALGS, /. 9.9.3.23 NAS security algorithms ./
653 DE_EMM_NET_NAME, /. 9.9.3.24 Network name, See subclause 10.5.3.5a in 3GPP TS 24.008 [6]. ./
654 DE_EMM_NONCE, /. 9.9.3.25 Nonce ./
655 DE_EMM_PAGING_ID, /. 9.9.3.25A Paging identity ./
656 DE_EMM_P_TMSI_SIGN, /. 9.9.3.26 P-TMSI signature, See subclause 10.5.5.8 in 3GPP TS 24.008 [6]. ./
657 DE_EMM_SERV_TYPE, /. 9.9.3.27 Service type ./
658 DE_EMM_SHORT_MAC, /. 9.9.3.28 Short MAC ./
659 DE_EMM_TZ, /. 9.9.3.29 Time zone, See subclause 10.5.3.8 in 3GPP TS 24.008 [6]. ./
660 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]. ./
661 DE_EMM_TMSI_STAT, /. 9.9.3.31 TMSI status, See subclause 10.5.5.4 in 3GPP TS 24.008 [6]. ./
662 DE_EMM_TRAC_AREA_ID, /. 9.9.3.32 Tracking area identity ./
663 DE_EMM_TRAC_AREA_ID_LST, /. 9.9.3.33 Tracking area identity list ./
664 DE_EMM_UE_NET_CAP, /. 9.9.3.34 UE network capability ./
665 DE_EMM_UE_RA_CAP_INF_UPD_NEED, /. 9.9.3.35 UE radio capability information update needed ./
666 DE_EMM_UE_SEC_CAP, /. 9.9.3.36 UE security capability ./
667 DE_EMM_EMERG_NUM_LST, /. 9.9.3.37 Emergency Number List ./
668 DE_EMM_CLI, /. 9.9.3.38 CLI ./
669 DE_EMM_SS_CODE, /. 9.9.3.39 SS Code ./
670 DE_EMM_LCS_IND, /. 9.9.3.40 LCS indicator ./
671 DE_EMM_LCS_CLIENT_ID, /. 9.9.3.41 LCS client identity ./
672 DE_EMM_GEN_MSG_CONT_TYPE, /. 9.9.3.42 Generic message container type ./
673 DE_EMM_GEN_MSG_CONT, /. 9.9.3.43 Generic message container ./
674 DE_EMM_VOICE_DMN_PREF, /. 9.9.3.44 Voice domain preference and UEs usage setting ./
675 DE_EMM_NONE /. NONE ./
681 /* TODO: Update to latest spec */
682 /* 9.9.3 EPS Mobility Management (EMM) information elements
685 * 9.9.3.0A Additional update result
687 static const value_string nas_eps_emm_add_upd_res_vals[] = {
688 { 0x0, "no additional information"},
689 { 0x1, "CS Fallback not preferred"},
695 de_emm_add_upd_res(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
697 guint32 curr_offset, bit_offset;
699 curr_offset = offset;
700 bit_offset = (curr_offset<<3)+4;
702 proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
704 proto_tree_add_bits_item(tree, hf_nas_eps_emm_add_upd_res, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
707 return (curr_offset - offset);
710 * 9.9.3.0B Additional update type
712 static const value_string nas_eps_emm_add_upd_type_vals[] = {
713 { 0x0, "no additional information (shall be interpreted as request for combined attach or combined tracking area updating)"},
718 de_emm_add_upd_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
720 guint32 curr_offset, bit_offset;
722 curr_offset = offset;
723 bit_offset = (curr_offset<<3)+4;
725 proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
727 proto_tree_add_bits_item(tree, hf_nas_eps_emm_add_upd_type, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
730 return (curr_offset - offset);
733 * 9.9.3.1 Authentication failure parameter
734 * See subclause 10.5.3.2.2 in 3GPP TS 24.008 [6].
735 * (dissected in packet-gsm_a_dtap.c)
738 * 9.9.3.2 Authentication parameter AUTN
739 * See subclause 10.5.3.1.1 in 3GPP TS 24.008 [6].
742 * 9.9.3.3 Authentication parameter RAND
743 * See subclause 10.5.3.1 in 3GPP TS 24.008 [6].
746 * 9.9.3.4 Authentication response parameter
749 de_emm_auth_resp_par(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
753 curr_offset = offset;
755 proto_tree_add_item(tree, hf_nas_eps_emm_res, tvb, curr_offset, len, ENC_NA);
760 * 9.9.3.4A Ciphering key sequence number
761 * See subclause 9.9.3.19 in 3GPP TS 24.008 [13].
765 * 9.9.3.5 CSFB response
769 * CSFB response value (octet 1)
772 static const value_string nas_eps_emm_csfb_resp_vals[] = {
773 { 0x0, "CS fallback rejected by the UE"},
774 { 0x1, "CS fallback accepted by the UE"},
779 de_emm_csfb_resp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
781 guint32 curr_offset, bit_offset;
783 curr_offset = offset;
786 bit_offset = curr_offset<<3;
787 proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, bit_offset+4, 1, ENC_BIG_ENDIAN);
789 proto_tree_add_item(tree, hf_nas_eps_emm_csfb_resp, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
792 return(curr_offset-offset);
795 * 9.9.3.6 Daylight saving time
796 * See subclause 10.5.3.12 in 3GPP TS 24.008 [6].
799 * 9.9.3.7 Detach type
802 static const value_string nas_eps_emm_switch_off_vals[] = {
803 { 0x0, "Normal detach"},
804 { 0x1, "Switch off"},
813 /* Type of detach (octet 1)
814 * In the UE to network direction:
816 static const value_string nas_eps_emm_type_of_dtatch_UL_vals[] = {
817 { 0x1, "EPS detach"},
818 { 0x2, "IMSI detach"},
819 { 0x3, "Combined EPS/IMSI detach"},
820 { 0x4, "Combined EPS/IMSI detach"}, /* All other values are interpreted as "combined EPS/IMSI detach" in this version of the protocol.*/
821 { 0x5, "Combined EPS/IMSI detach"}, /* -"- */
828 * In the network to UE direction:
831 static const value_string nas_eps_emm_type_of_dtatch_DL_vals[] = {
832 { 0x1, "Re-attach required"},
833 { 0x2, "Re-attach not required"},
834 { 0x3, "IMSI detach"},
835 { 0x4, "Re-attach not required"}, /* All other values are interpreted as "re-attach not required" in this version of the protocol.*/
836 { 0x5, "Re-attach not required"}, /* -"- */
843 * 9.9.3.8 DRX parameter
844 * See subclause 10.5.5.6 in 3GPP TS 24.008 [13].
849 static const value_string nas_eps_emm_cause_values[] = {
850 { 0x2, "IMSI unknown in HSS"},
851 { 0x3, "Illegal UE"},
852 { 0x5, "IMEI not accepted"},
853 { 0x6, "Illegal ME"},
854 { 0x7, "EPS services not allowed"},
855 { 0x8, "EPS services and non-EPS services not allowed"},
856 { 0x9, "UE identity cannot be derived by the network"},
857 { 0xa, "Implicitly detached"},
858 { 0xb, "PLMN not allowed"},
859 { 0xc, "Tracking Area not allowed"},
860 { 0xd, "Roaming not allowed in this tracking area"},
861 { 0xe, "EPS services not allowed in this PLMN"},
862 { 0xf, "No Suitable Cells In tracking area"},
863 { 0x10, "MSC temporarily not reachable"},
864 { 0x11, "Network failure"},
865 { 0x12, "CS domain not available"},
866 { 0x13, "ESM failure"},
867 { 0x14, "MAC failure"},
868 { 0x15, "Synch failure"},
869 { 0x16, "Congestion"},
870 { 0x17, "UE security capabilities mismatch"},
871 { 0x18, "Security mode rejected, unspecified"},
872 { 0x19, "Not authorized for this CSG"},
873 { 0x1a, "Non-EPS authentication unacceptable"},
874 { 0x27, "CS domain temporarily not available"},
875 { 0x28, "No EPS bearer context activated"},
876 { 0x5f, "Semantically incorrect message"},
877 { 0x60, "Invalid mandatory information"},
878 { 0x61, "Message type non-existent or not implemented"},
879 { 0x62, "Message type not compatible with the protocol state"},
880 { 0x63, "Information element non-existent or not implemented"},
881 { 0x64, "Conditional IE error"},
882 { 0x65, "Message not compatible with the protocol state"},
883 { 0x6f, "Protocol error, unspecified"},
888 de_emm_cause(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
892 curr_offset = offset;
894 proto_tree_add_item(tree, hf_nas_eps_emm_cause, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
897 return curr_offset-offset;}
899 * 9.9.3.10 EPS attach result
902 static const value_string nas_eps_emm_EPS_attach_result_values[] = {
905 { 2, "Combined EPS/IMSI attach"},
916 * 9.9.3.11 EPS attach type
919 static const value_string nas_eps_emm_eps_att_type_vals[] = {
920 { 0, "EPS attach(unused)"},
922 { 2, "Combined handover EPS/IMSI attach"},
923 { 3, "EPS attach(unused)"},
924 { 4, "EPS attach(unused)"},
925 { 5, "EPS attach(unused)"},
926 { 6, "EPS emergency attach"},
933 * 9.9.3.12 EPS mobile identity
936 unpack_eps_mid_digits(tvbuff_t *tvb) {
944 length = tvb_length(tvb);
946 digit_str = ep_alloc(length*2);
948 /* Get identity digit 1 */
949 octet = tvb_get_guint8(tvb,offset);
950 digit_str[i++] = (((octet>>4) & 0x0f) + '0');
953 /* Loop on following octets to retrieve other identity digits */
954 while ( offset < length ){
956 octet = tvb_get_guint8(tvb,offset);
957 digit_str[i] = ((octet & 0x0f) + '0');
961 * unpack second value in byte
965 if (octet == 0x0f) /* odd number bytes - hit filler */
968 digit_str[i] = ((octet & 0x0f) + '0');
977 static const value_string nas_eps_emm_type_of_id_vals[] = {
989 de_emm_eps_mid(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
996 curr_offset = offset;
998 octet = tvb_get_guint8(tvb,offset);
999 /* Type of identity (octet 3) */
1000 proto_tree_add_item(tree, hf_nas_eps_emm_odd_even, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1001 proto_tree_add_item(tree, hf_nas_eps_emm_type_of_id, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1005 new_tvb = tvb_new_subset(tvb, curr_offset, len, len );
1006 digit_str = unpack_eps_mid_digits(new_tvb);
1007 proto_tree_add_string(tree, hf_nas_eps_emm_imsi, new_tvb, 0, -1, digit_str);
1011 new_tvb = tvb_new_subset(tvb, curr_offset, len, len );
1012 digit_str = unpack_eps_mid_digits(new_tvb);
1013 proto_tree_add_string(tree, hf_nas_eps_emm_imei, new_tvb, 0, -1, digit_str);
1018 curr_offset = dissect_e212_mcc_mnc(tvb, gpinfo, tree, curr_offset, TRUE);
1019 /* MME Group ID octet 7 - 8 */
1020 proto_tree_add_item(tree, hf_nas_eps_emm_mme_grp_id, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
1022 /* MME Code Octet 9 */
1023 proto_tree_add_item(tree, hf_nas_eps_emm_mme_code, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1025 /* M-TMSI Octet 10 - 13 */
1026 proto_tree_add_item(tree, hf_nas_eps_emm_m_tmsi, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
1030 proto_tree_add_text(tree, tvb, curr_offset, len - 1, "Type of identity not known");
1038 * 9.9.3.12A EPS network feature support
1040 static const value_string nas_eps_emm_cs_lcs_vals[] = {
1041 { 0, "no information about support of location services via CS domain is available"},
1042 { 1, "location services via CS domain not supported"},
1043 { 2, "location services via CS domain supported"},
1047 static const true_false_string nas_eps_emm_epc_lcs_value = {
1048 "location services via EPC supported",
1049 "location services via EPC not supported"
1051 static const true_false_string nas_eps_emm_emc_bs_value = {
1052 "emergency bearer services in S1 mode supported",
1053 "emergency bearer services in S1 mode not supported"
1055 static const true_false_string nas_eps_emm_ims_vops_value = {
1056 "IMS voice over PS session in S1 mode supported",
1057 "IMS voice over PS session in S1 mode not supported"
1061 de_emm_eps_net_feature_sup(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
1063 guint32 curr_offset, bit_offset;
1065 curr_offset = offset;
1066 bit_offset = curr_offset << 3;
1067 proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
1069 proto_tree_add_bits_item(tree, hf_nas_eps_emm_cs_lcs_type, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
1071 proto_tree_add_bits_item(tree, hf_nas_eps_emm_epc_lcs_type, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
1073 proto_tree_add_bits_item(tree, hf_nas_eps_emm_emc_bs_type, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
1075 proto_tree_add_bits_item(tree, hf_nas_eps_emm_ims_vops_type, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
1081 * 9.9.3.13 EPS update result
1083 static const value_string nas_eps_emm_eps_update_result_vals[] = {
1085 { 1, "Combined TA/LA updated"},
1088 { 4, "TA updated and ISR activated"},
1089 { 5, "Combined TA/LA updated and ISR activated"},
1096 * 9.9.3.14 EPS update type
1098 static const true_false_string nas_eps_emm_active_flg_value = {
1099 "Bearer establishment requested",
1100 "No bearer establishment requested"
1103 static const value_string nas_eps_emm_eps_update_type_vals[] = {
1104 { 0, "TA updating"},
1105 { 1, "Combined TA/LA updating"},
1106 { 2, "Combined TA/LA updating with IMSI attach"},
1107 { 3, "Periodic updating"},
1108 { 4, "Unused; shall be interpreted as 'TA updating', if received by the network"},
1109 { 5, "Unused; shall be interpreted as 'TA updating', if received by the network"},
1116 * 9.9.3.15 ESM message container
1119 de_emm_esm_msg_cont(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
1122 proto_tree *sub_tree;
1124 guint32 curr_offset;
1126 curr_offset = offset;
1129 item = proto_tree_add_item(tree, hf_nas_eps_esm_msg_cont, tvb, curr_offset, len, ENC_NA);
1130 sub_tree = proto_item_add_subtree(item, ett_nas_eps_esm_msg_cont);
1132 /* This IE can contain any ESM PDU as defined in subclause 8.3. */
1133 new_tvb = tvb_new_subset(tvb, curr_offset, len, len );
1134 /* Plain NAS message */
1135 disect_nas_eps_esm_msg(new_tvb, gpinfo, sub_tree, 0/* offset */);
1140 * 9.9.3.16 GPRS timer
1141 * See subclause 10.5.7.3 in 3GPP TS 24.008 [6].
1145 * 9.9.3.17 Identity type 2
1146 * See subclause 10.5.5.9 in 3GPP TS 24.008 [6].
1148 static const value_string nas_eps_emm_id_type2_vals[] = {
1157 * 9.9.3.18 IMEISV request
1158 * See subclause 10.5.5.10 in 3GPP TS 24.008 [6].
1160 /* IMEISV request value (octet 1) */
1161 static const value_string nas_eps_emm_imeisv_req_vals[] = {
1162 { 0, "IMEISV not requested"},
1163 { 1, "IMEISV requested"},
1164 { 2, "IMEISV not requested"},
1165 { 3, "IMEISV not requested"},
1166 { 4, "IMEISV not requested"},
1167 { 5, "IMEISV not requested"},
1168 { 6, "IMEISV not requested"},
1169 { 7, "IMEISV not requested"},
1173 de_emm_nas_imeisv_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
1175 guint32 curr_offset;
1178 curr_offset = offset;
1180 bit_offset = curr_offset<<3;
1182 proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
1183 proto_tree_add_item(tree, hf_nas_eps_esm_imeisv_req, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1186 return(curr_offset - offset);
1189 * 9.9.3.19 KSI and sequence number
1192 de_emm_nas_ksi_and_seq_no(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
1194 guint32 curr_offset;
1197 curr_offset = offset;
1198 bit_offset = curr_offset<<3;
1200 proto_tree_add_bits_item(tree, hf_nas_eps_emm_nas_key_set_id, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
1202 proto_tree_add_bits_item(tree, hf_nas_eps_seq_no_short, tvb, bit_offset, 5, ENC_BIG_ENDIAN);
1205 return(curr_offset - offset);
1209 * 9.9.3.20 MS network capability
1210 * See subclause 10.5.5.12 in 3GPP TS 24.008 [6].
1213 * 9.9.3.21 NAS key set identifier
1216 * Type of security context flag (TSC) (octet 1)
1218 static const value_string nas_eps_tsc_vals[] = {
1219 { 0, "Native security context (for KSIasme)"},
1220 { 1, "Mapped security context (for KSIsgsn)"},
1224 /* NAS key set identifier (octet 1) Bits 3 2 1 */
1226 static const value_string nas_eps_emm_NAS_key_set_identifier_vals[] = {
1234 { 7, "No key is available"},
1238 /* Takes bit offset as input and consumes 4 bits */
1240 de_emm_nas_key_set_id_bits(tvbuff_t *tvb, proto_tree *tree, guint32 bit_offset, const gchar *add_string)
1244 /* Type of security context flag (TSC) (octet 1) V 1/2 */
1245 proto_tree_add_bits_item(tree, hf_nas_eps_tsc, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
1247 /* NAS key set identifier (octet 1) */
1248 item = proto_tree_add_bits_item(tree, hf_nas_eps_emm_nas_key_set_id, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
1250 proto_item_append_text(item, "%s", add_string);
1255 * Note used for TV Short
1258 de_emm_nas_key_set_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
1260 guint32 curr_offset, bit_offset;
1262 curr_offset = offset;
1264 /* Get the bit offset of the lover half of the octet bits 4 - 1 */
1265 bit_offset = curr_offset<<3;
1268 /* Type of security context flag (TSC) (octet 1) V 1/2 */
1269 proto_tree_add_bits_item(tree, hf_nas_eps_tsc, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
1271 /* NAS key set identifier (octet 1) */
1272 proto_tree_add_bits_item(tree, hf_nas_eps_emm_nas_key_set_id, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
1276 return(curr_offset - offset);
1280 * 9.9.3.22 NAS message container
1283 de_emm_nas_msg_cont(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
1286 proto_tree *sub_tree;
1288 guint32 curr_offset;
1290 curr_offset = offset;
1292 /* NAS message container contents (octet 3 to octet n)
1293 * This IE can contain an SMS message (i.e. CP-DATA, CP-ACK or CP-ERROR)
1294 * as defined in subclause 7.2 in 3GPP TS 24.011 [13A].
1297 item = proto_tree_add_item(tree, hf_nas_eps_nas_msg_cont, tvb, curr_offset, len, ENC_NA);
1298 sub_tree = proto_item_add_subtree(item, ett_nas_eps_nas_msg_cont);
1300 new_tvb = tvb_new_subset(tvb, curr_offset, len, len );
1301 if(gsm_a_dtap_handle)
1302 call_dissector(gsm_a_dtap_handle, new_tvb, gpinfo, sub_tree);
1307 * 9.9.3.23 NAS security algorithms
1309 /* Type of integrity protection algorithm (octet 2, bit 1 to 3) */
1310 static const value_string nas_eps_emm_toi_vals[] = {
1311 { 0, "EPS integrity algorithm EIA0 (null integrity protection algorithm)"},
1312 { 1, "EPS integrity algorithm 128-EIA1"},
1313 { 2, "EPS integrity algorithm 128-EIA2"},
1314 { 3, "EPS integrity algorithm EIA3"},
1315 { 4, "EPS integrity algorithm EIA4"},
1316 { 5, "EPS integrity algorithm EIA5"},
1317 { 6, "EPS integrity algorithm EIA6"},
1318 { 7, "EPS integrity algorithm EIA7"},
1322 /* Type of ciphering algorithm (octet 2, bit 5 to 7) */
1324 static const value_string nas_eps_emm_toc_vals[] = {
1325 { 0, "EPS encryption algorithm EEA0 (null ciphering algorithm)"},
1326 { 1, "EPS encryption algorithm 128-EEA1"},
1327 { 2, "EPS encryption algorithm 128-EEA2"},
1328 { 3, "EPS encryption algorithm EEA3"},
1329 { 4, "EPS encryption algorithm EEA4"},
1330 { 5, "EPS encryption algorithm EEA5"},
1331 { 6, "EPS encryption algorithm EEA6"},
1332 { 7, "EPS encryption algorithm EEA7"},
1336 de_emm_nas_sec_alsgs(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
1339 guint32 curr_offset;
1341 curr_offset = offset;
1343 bit_offset = offset<<3;
1344 /* Bit 4 and 8 of octet 2 are spare and shall be coded as zero. */
1345 proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
1346 /* Type of ciphering algorithm (octet 2, bit 5 to 7) */
1347 proto_tree_add_item(tree, hf_nas_eps_emm_toc, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1349 /* Bit 4 and 8 of octet 2 are spare and shall be coded as zero. */
1350 proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
1351 /* Type of integrity protection algorithm (octet 2, bit 1 to 3) */
1352 proto_tree_add_item(tree, hf_nas_eps_emm_toi, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1356 return(curr_offset-offset);
1359 * 9.9.3.24 Network name
1360 * See subclause 10.5.3.5a in 3GPP TS 24.008 [6].
1366 de_emm_nonce(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
1368 guint32 curr_offset;
1370 curr_offset = offset;
1372 proto_tree_add_item(tree, hf_nas_eps_emm_nonce, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
1378 * 9.9.3.25A Paging identity
1380 static const true_false_string nas_eps_emm_paging_id_vals = {
1386 de_emm_paging_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
1388 guint32 curr_offset;
1390 curr_offset = offset;
1392 proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, curr_offset<<3, 7, ENC_BIG_ENDIAN);
1393 proto_tree_add_bits_item(tree, hf_nas_eps_emm_paging_id, tvb, (curr_offset<<3)+7, 1, ENC_BIG_ENDIAN);
1399 * 9.9.3.26 P-TMSI signature
1400 * See subclause 10.5.5.8 in 3GPP TS 24.008 [6].
1403 * 9.9.3.27 Service type
1405 static const value_string nas_eps_service_type_vals[] = {
1406 { 0, "Mobile originating CS fallback or 1xCS fallback"},
1407 { 1, "Mobile terminating CS fallback or 1xCS fallback"},
1408 { 2, "Mobile originating CS fallback emergency call or 1xCS fallback emergency call"},
1413 * 9.9.3.28 Short MAC
1416 de_emm_nas_short_mac(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
1418 guint32 curr_offset;
1420 curr_offset = offset;
1423 proto_tree_add_item(tree, hf_nas_eps_emm_short_mac, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
1426 return(curr_offset-offset);
1429 * 9.9.3.29 Time zone
1430 * See subclause 10.5.3.8 in 3GPP TS 24.008 [6].
1433 * 9.9.3.30 Time zone and time
1434 * See subclause 10.5.3.9 in 3GPP TS 24.008 [6].
1437 * 9.9.3.31 TMSI status
1438 * See subclause 10.5.5.4 in 3GPP TS 24.008 [6].
1441 * 9.9.3.32 Tracking area identity
1445 de_emm_trac_area_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
1447 guint32 curr_offset;
1449 curr_offset = offset;
1451 curr_offset = dissect_e212_mcc_mnc(tvb, gpinfo, tree, curr_offset, TRUE);
1452 proto_tree_add_item(tree, hf_nas_eps_emm_tai_tac, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
1455 return(curr_offset-offset);
1458 * 9.9.3.33 Tracking area identity list
1460 /* Type of list (octet 1)
1463 static const value_string nas_eps_emm_tai_tol_vals[] = {
1464 { 0, "list of TACs belonging to one PLMN, with non-consecutive TAC values"},
1465 { 1, "list of TACs belonging to one PLMN, with consecutive TAC values"},
1466 { 2, "list of TAIs belonging to different PLMNs"},
1471 de_emm_trac_area_id_lst(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
1474 guint32 curr_offset;
1475 guint8 octet, tol, n_elem;
1478 curr_offset = offset;
1480 proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, curr_offset<<3, 1, ENC_BIG_ENDIAN);
1481 /* Type of list (octet 1) Bits 7 6 */
1482 proto_tree_add_item(tree, hf_nas_eps_emm_tai_tol, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1483 /* Number of elements (octet 1) Bits 5 4 3 2 1 */
1484 octet = tvb_get_guint8(tvb,curr_offset)& 0x7f;
1486 n_elem = (octet & 0x1f)+1;
1487 item = proto_tree_add_item(tree, hf_nas_eps_emm_tai_n_elem, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1489 proto_item_append_text(item, " [+1 = %u element(s)]", n_elem);
1493 proto_tree_add_text(tree, tvb, curr_offset, len-(curr_offset-offset) , "Unknown type of list ( Not in 3GPP TS 24.301 version 8.1.0 Release 8 )");
1499 /* MCC digit 2 MCC digit 1 octet 2
1500 * MNC digit 3 MCC digit 3 octet 3
1501 * MNC digit 2 MNC digit 1 octet 4
1503 curr_offset = dissect_e212_mcc_mnc(tvb, gpinfo, tree, curr_offset, TRUE);
1504 /* type of list = "000" */
1506 * TAC 1 (continued) octet 6
1510 * TAC k (continued) octet 2k+4*
1512 if (len < (guint)(4+(n_elem*2))){
1513 proto_tree_add_text(tree, tvb, curr_offset, len-1 , "[Wrong number of elements?]");
1516 for (i=0; i < n_elem; i++, curr_offset+=2)
1517 proto_tree_add_item(tree, hf_nas_eps_emm_tai_tac, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
1521 /* type of list = "010" */
1522 /* MCC digit 2 MCC digit 1 octet 2
1523 * MNC digit 3 MCC digit 3 octet 3
1524 * MNC digit 2 MNC digit 1 octet 4
1526 curr_offset = dissect_e212_mcc_mnc(tvb, gpinfo, tree, curr_offset, TRUE);
1527 proto_tree_add_item(tree, hf_nas_eps_emm_tai_tac, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
1531 if (len< (guint)(1+(n_elem*5))){
1532 proto_tree_add_text(tree, tvb, curr_offset, len-1 , "[Wrong number of elements?]");
1536 for (i=0; i < n_elem; i++){
1537 /* type of list = "001" */
1538 /* MCC digit 2 MCC digit 1 octet 2
1539 * MNC digit 3 MCC digit 3 octet 3
1540 * MNC digit 2 MNC digit 1 octet 4
1542 curr_offset = dissect_e212_mcc_mnc(tvb, gpinfo, tree, curr_offset, TRUE);
1543 proto_tree_add_item(tree, hf_nas_eps_emm_tai_tac, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
1548 /* Unknown ( Not in 3GPP TS 24.301 version 8.1.0 Release 8 ) */
1551 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
1553 return(curr_offset-offset);
1556 * 9.9.3.34 UE network capability
1559 static const true_false_string nas_eps_emm_supported_flg_value = {
1563 static const true_false_string nas_eps_emm_ucs2_supp_flg_value = {
1564 "The UE has no preference between the use of the default alphabet and the use of UCS2",
1565 "The UE has a preference for the default alphabet"
1567 /* LPP capability (octet 7, bit 4) */
1568 static const true_false_string nas_eps_emm_lpp_cap_flg = {
1569 "LTE Positioning Protocol supported",
1570 "LTE Positioning Protocol not supported"
1572 /* LCS capability (octet 7, bit 3) */
1573 static const true_false_string nas_eps_emm_lcs_cap_flg = {
1574 "Location services notification mechanisms supported",
1575 "Location services notification mechanisms not supported"
1577 /* 1xSRVCC capability (octet 7, bit 2) */
1578 static const true_false_string nas_eps_emm_1xsrvcc_cap_flg = {
1579 "SRVCC from E-UTRAN to cdma2000 1xCS supported",
1580 "SRVCC from E-UTRAN to cdma2000 1x CS not supported"
1582 /* NF capability (octet 7, bit 1) */
1583 static const true_false_string nas_eps_emm_nf_cap_flg = {
1584 "Notification procedure supported",
1585 "Notification procedure not supported"
1589 de_emm_ue_net_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
1591 guint32 curr_offset;
1593 curr_offset = offset;
1596 /* EPS encryption algorithms supported (octet 3) */
1597 /* EPS encryption algorithm EEA0 supported (octet 3, bit 8) */
1598 proto_tree_add_item(tree, hf_nas_eps_emm_eea0, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1599 /* EPS encryption algorithm 128-EEA1 supported (octet 3, bit 7) */
1600 proto_tree_add_item(tree, hf_nas_eps_emm_128eea1, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1601 /* EPS encryption algorithm 128-EEA2 supported (octet 3, bit 6) */
1602 proto_tree_add_item(tree, hf_nas_eps_emm_128eea2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1603 /* EPS encryption algorithm 128-EEA3 supported (octet 3, bit 5) */
1604 proto_tree_add_item(tree, hf_nas_eps_emm_eea3, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1605 /* EPS encryption algorithm 128-EEA4 supported (octet 3, bit 4) */
1606 proto_tree_add_item(tree, hf_nas_eps_emm_eea4, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1607 /* EPS encryption algorithm 128-EEA5 supported (octet 3, bit 5) */
1608 proto_tree_add_item(tree, hf_nas_eps_emm_eea5, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1609 /* EPS encryption algorithm 128-EEA6 supported (octet 3, bit 6) */
1610 proto_tree_add_item(tree, hf_nas_eps_emm_eea6, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1611 /* EPS encryption algorithm 128-EEA7 supported (octet 3, bit 7) */
1612 proto_tree_add_item(tree, hf_nas_eps_emm_eea7, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1616 /* EPS integrity algorithms supported (octet 4) */
1617 /* EPS integrity algorithm EIA0 supported (octet 4, bit 8) */
1618 proto_tree_add_item(tree, hf_nas_eps_emm_eia0, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1619 /* EPS integrity algorithm 128-EIA1 supported (octet 4, bit 7) */
1620 proto_tree_add_item(tree, hf_nas_eps_emm_128eia1, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1621 /* EPS integrity algorithm 128-EIA2 supported (octet 4, bit 6) */
1622 proto_tree_add_item(tree, hf_nas_eps_emm_128eia2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1623 /* EPS integrity algorithm EIA3 supported (octet 4, bit 5) */
1624 proto_tree_add_item(tree, hf_nas_eps_emm_eia3, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1625 /* EPS integrity algorithm EIA4 supported (octet 4, bit 4) */
1626 proto_tree_add_item(tree, hf_nas_eps_emm_eia4, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1627 /* EPS integrity algorithm EIA5 supported (octet 4, bit 3) */
1628 proto_tree_add_item(tree, hf_nas_eps_emm_eia5, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1629 /* EPS integrity algorithm EIA6 supported (octet 4, bit 2) */
1630 proto_tree_add_item(tree, hf_nas_eps_emm_eia6, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1631 /* EPS integrity algorithm EIA7 supported (octet 4, bit 1) */
1632 proto_tree_add_item(tree, hf_nas_eps_emm_eia7, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1636 /* Following octets are optional */
1637 if ((curr_offset - offset) >= len)
1640 /* UMTS encryption algorithms supported (octet 5)
1641 * UMTS encryption algorithm UEA0 supported (octet 5, bit 8)
1643 /* UMTS encryption algorithm 128-UEA0 supported (octet 5, bit 8) */
1644 proto_tree_add_item(tree, hf_nas_eps_emm_uea0, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1645 /* UMTS encryption algorithm 128-UEA0 supported (octet 5, bit 7) */
1646 proto_tree_add_item(tree, hf_nas_eps_emm_uea1, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1647 /* UMTS encryption algorithm 128-UEA0 supported (octet 5, bit 6) */
1648 proto_tree_add_item(tree, hf_nas_eps_emm_uea2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1649 /* UMTS encryption algorithm 128-UEA0 supported (octet 5, bit 5) */
1650 proto_tree_add_item(tree, hf_nas_eps_emm_uea3, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1651 /* EPS encryption algorithm 128-UEA0 supported (octet 5, bit 4) */
1652 proto_tree_add_item(tree, hf_nas_eps_emm_uea4, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1653 /* UMTS encryption algorithm 128-UEA0 supported (octet 5, bit 5) */
1654 proto_tree_add_item(tree, hf_nas_eps_emm_uea5, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1655 /* UMTS encryption algorithm 128-UEA0 supported (octet 5, bit 6) */
1656 proto_tree_add_item(tree, hf_nas_eps_emm_uea6, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1657 /* UMTS encryption algorithm 128-UEA0 supported (octet 5, bit 7) */
1658 proto_tree_add_item(tree, hf_nas_eps_emm_uea7, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1661 if ((curr_offset - offset) >= len)
1664 /* UCS2 support (UCS2) (octet 6, bit 8)
1665 * This information field indicates the likely treatment of UCS2 encoded character strings
1668 proto_tree_add_item(tree, hf_nas_eps_emm_ucs2_supp, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1669 /* UMTS integrity algorithms supported (octet 6) */
1670 /* UMTS integrity algorithm UIA1 supported (octet 6, bit 7) */
1671 proto_tree_add_item(tree, hf_nas_eps_emm_uia1, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1672 /* UMTS integrity algorithm UIA1 supported (octet 6, bit 6) */
1673 proto_tree_add_item(tree, hf_nas_eps_emm_uia2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1674 /* UMTS integrity algorithm UIA1 supported (octet 6, bit 5) */
1675 proto_tree_add_item(tree, hf_nas_eps_emm_uia3, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1676 /* UMTS integrity algorithm UIA1 supported (octet 6, bit 4) */
1677 proto_tree_add_item(tree, hf_nas_eps_emm_uia4, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1678 /* UMTS integrity algorithm UIA1 supported (octet 6, bit 3) */
1679 proto_tree_add_item(tree, hf_nas_eps_emm_uia5, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1680 /* UMTS integrity algorithm UIA1 supported (octet 6, bit 2) */
1681 proto_tree_add_item(tree, hf_nas_eps_emm_uia6, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1682 /* UMTS integrity algorithm UIA1 supported (octet 6, bit 1) */
1683 proto_tree_add_item(tree, hf_nas_eps_emm_uia7, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1686 if ((curr_offset - offset) >= len)
1689 /* Bits 8 to 5 of octet 7 are spare and shall be coded as zero. */
1690 proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, (curr_offset<<3), 4, ENC_BIG_ENDIAN);
1691 /* LPP capability (octet 7, bit 4) */
1692 proto_tree_add_item(tree, hf_nas_eps_emm_lpp_cap, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1693 /* LCS capability (octet 7, bit 3) */
1694 proto_tree_add_item(tree, hf_nas_eps_emm_lcs_cap, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1695 /* 1xSRVCC capability (octet 7, bit 2) */
1696 proto_tree_add_item(tree, hf_nas_eps_emm_1xsrvcc_cap, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1697 /* NF capability (octet 7, bit 1) */
1698 proto_tree_add_item(tree, hf_nas_eps_emm_nf_cap, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1703 /* UE radio capability information update needed flag (URC upd) (octet 1) */
1704 static const true_false_string nas_eps_emm_ue_ra_cap_inf_upd_need_flg = {
1705 "UE radio capability information update needed",
1706 "UE radio capability information update not needed"
1710 * 9.9.3.35 UE radio capability information update needed
1714 de_emm_ue_ra_cap_inf_upd_need(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
1716 guint32 curr_offset;
1718 curr_offset = offset;
1720 proto_tree_add_item(tree, hf_nas_eps_emm_ue_ra_cap_inf_upd_need_flg, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1725 * 9.9.3.36 UE security capability
1729 de_emm_ue_sec_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
1731 guint32 curr_offset;
1733 curr_offset = offset;
1735 /* EPS encryption algorithms supported (octet 3) */
1736 /* EPS encryption algorithm EEA0 supported (octet 3, bit 8) */
1737 proto_tree_add_item(tree, hf_nas_eps_emm_eea0, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1738 /* EPS encryption algorithm 128-EEA1 supported (octet 3, bit 7) */
1739 proto_tree_add_item(tree, hf_nas_eps_emm_128eea1, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1740 /* EPS encryption algorithm 128-EEA2 supported (octet 3, bit 6) */
1741 proto_tree_add_item(tree, hf_nas_eps_emm_128eea2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1742 /* EPS encryption algorithm 128-EEA3 supported (octet 3, bit 5) */
1743 proto_tree_add_item(tree, hf_nas_eps_emm_eea3, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1744 /* EPS encryption algorithm 128-EEA4 supported (octet 3, bit 4) */
1745 proto_tree_add_item(tree, hf_nas_eps_emm_eea4, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1746 /* EPS encryption algorithm 128-EEA5 supported (octet 3, bit 5) */
1747 proto_tree_add_item(tree, hf_nas_eps_emm_eea5, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1748 /* EPS encryption algorithm 128-EEA6 supported (octet 3, bit 6) */
1749 proto_tree_add_item(tree, hf_nas_eps_emm_eea6, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1750 /* EPS encryption algorithm 128-EEA7 supported (octet 3, bit 7) */
1751 proto_tree_add_item(tree, hf_nas_eps_emm_eea7, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1755 /* EPS integrity algorithms supported (octet 4) */
1756 /* EPS integrity algorithm EIA0 supported (octet 4, bit 8) */
1757 proto_tree_add_item(tree, hf_nas_eps_emm_eia0, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1758 /* EPS integrity algorithm 128-EIA1 supported (octet 4, bit 7) */
1759 proto_tree_add_item(tree, hf_nas_eps_emm_128eia1, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1760 /* EPS integrity algorithm 128-EIA2 supported (octet 4, bit 6) */
1761 proto_tree_add_item(tree, hf_nas_eps_emm_128eia2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1762 /* EPS integrity algorithm EIA3 supported (octet 4, bit 5) */
1763 proto_tree_add_item(tree, hf_nas_eps_emm_eia3, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1764 /* EPS integrity algorithm EIA4 supported (octet 4, bit 4) */
1765 proto_tree_add_item(tree, hf_nas_eps_emm_eia4, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1766 /* EPS integrity algorithm EIA5 supported (octet 4, bit 3) */
1767 proto_tree_add_item(tree, hf_nas_eps_emm_eia5, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1768 /* EPS integrity algorithm EIA6 supported (octet 4, bit 2) */
1769 proto_tree_add_item(tree, hf_nas_eps_emm_eia6, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1770 /* EPS integrity algorithm EIA7 supported (octet 4, bit 1) */
1771 proto_tree_add_item(tree, hf_nas_eps_emm_eia7, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1775 /* Octets 5, 6, and 7 are optional. If octet 5 is included,
1776 * then also octet 6 shall be included and octet 7 may be included.
1781 /* UMTS encryption algorithms supported (octet 5) */
1782 /* UMTS encryption algorithm UEA0 supported (octet 5, bit 8) */
1783 proto_tree_add_item(tree, hf_nas_eps_emm_uea0, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1784 /* UMTS encryption algorithm UEA1 supported (octet 5, bit 7) */
1785 proto_tree_add_item(tree, hf_nas_eps_emm_uea1, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1786 /* UMTS encryption algorithm UEA2 supported (octet 5, bit 6) */
1787 proto_tree_add_item(tree, hf_nas_eps_emm_uea2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1788 /* UMTS encryption algorithm UEA3 supported (octet 5, bit 5) */
1789 proto_tree_add_item(tree, hf_nas_eps_emm_uea3, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1790 /* EPS encryption algorithm UEA4 supported (octet 5, bit 4) */
1791 proto_tree_add_item(tree, hf_nas_eps_emm_uea4, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1792 /* UMTS encryption algorithm UEA5 supported (octet 5, bit 5) */
1793 proto_tree_add_item(tree, hf_nas_eps_emm_uea5, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1794 /* UMTS encryption algorithm UEA6 supported (octet 5, bit 6) */
1795 proto_tree_add_item(tree, hf_nas_eps_emm_uea6, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1796 /* UMTS encryption algorithm UEA7 supported (octet 5, bit 7) */
1797 proto_tree_add_item(tree, hf_nas_eps_emm_uea7, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1800 /* UMTS integrity algorithms supported (octet 6) */
1801 /* Bit 8 of octet 6 is spare and shall be coded as zero. */
1802 proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, (curr_offset<<3), 1, ENC_BIG_ENDIAN);
1803 /* UMTS integrity algorithm UIA1 supported (octet 6, bit 7) */
1804 proto_tree_add_item(tree, hf_nas_eps_emm_uia1, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1805 /* UMTS integrity algorithm UIA2 supported (octet 6, bit 6) */
1806 proto_tree_add_item(tree, hf_nas_eps_emm_uia2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1807 /* UMTS integrity algorithm UIA3 supported (octet 6, bit 5) */
1808 proto_tree_add_item(tree, hf_nas_eps_emm_uia3, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1809 /* UMTS integrity algorithm UIA4 supported (octet 6, bit 4) */
1810 proto_tree_add_item(tree, hf_nas_eps_emm_uia4, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1811 /* UMTS integrity algorithm UIA5 supported (octet 6, bit 3) */
1812 proto_tree_add_item(tree, hf_nas_eps_emm_uia5, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1813 /* UMTS integrity algorithm UIA6 supported (octet 6, bit 2) */
1814 proto_tree_add_item(tree, hf_nas_eps_emm_uia6, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1815 /* UMTS integrity algorithm UIA7 supported (octet 6, bit 1) */
1816 proto_tree_add_item(tree, hf_nas_eps_emm_uia7, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1822 /* Bit 8 of octet 7 is spare and shall be coded as zero. */
1823 proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, (curr_offset<<3), 1, ENC_BIG_ENDIAN);
1824 /* GPRS encryption algorithm GEA1 supported (octet 7, bit 7) */
1825 proto_tree_add_item(tree, hf_nas_eps_emm_gea1, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1826 /* GPRS encryption algorithm GEA2 supported (octet 7, bit 6) */
1827 proto_tree_add_item(tree, hf_nas_eps_emm_gea2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1828 /* GPRS encryption algorithm GEA3 supported (octet 7, bit 5) */
1829 proto_tree_add_item(tree, hf_nas_eps_emm_gea3, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1830 /* GPRS encryption algorithm GEA4 supported (octet 7, bit 4) */
1831 proto_tree_add_item(tree, hf_nas_eps_emm_gea4, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1832 /* GPRS encryption algorithm GEA5 supported (octet 7, bit 3) */
1833 proto_tree_add_item(tree, hf_nas_eps_emm_gea5, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1834 /* GPRS encryption algorithm GEA6 supported (octet 7, bit 2) */
1835 proto_tree_add_item(tree, hf_nas_eps_emm_gea6, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1836 /* GPRS encryption algorithm GEA7 supported (octet 7, bit 1) */
1837 proto_tree_add_item(tree, hf_nas_eps_emm_gea7, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1843 * 9.9.3.37 Emergency Number List
1844 * See subclause 10.5.3.13 in 3GPP TS 24.008 [13].
1845 * packet-gsm_a_dtap.c
1853 * The coding of the CLI value part is the same as for octets 3 to 14
1854 * of the Calling party BCD number information element defined in
1855 * subclause 10.5.4.9 of 3GPP TS 24.008
1862 de_emm_ss_code(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
1864 guint32 curr_offset;
1866 curr_offset = offset;
1870 * The coding of the SS Code value is given in subclause 17.7.5 of 3GPP TS 29.002 [15B].
1871 * value string imported from gsm map
1873 proto_tree_add_item(tree, hf_nas_eps_emm_ss_code, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1879 * 9.9.3.40 LCS indicator
1881 /* LCS indicator value */
1882 static const value_string nas_eps_emm_lcs_ind_vals[] = {
1883 { 0, "Normal, unspecified"},
1890 de_emm_lcs_ind(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
1892 guint32 curr_offset;
1894 curr_offset = offset;
1897 proto_tree_add_item(tree, hf_nas_eps_emm_lcs_ind, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1902 * 9.9.3.41 LCS client identity
1905 de_emm_lcs_client_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
1907 guint32 curr_offset;
1910 curr_offset = offset;
1912 /* LCS client identity (value part)
1913 * The coding of the value part of the LCS client identity is given
1914 * in subclause 17.7.13 of 3GPP TS 29.002 [15B](GSM MAP).
1916 new_tvb = tvb_new_subset(tvb, curr_offset, len, len );
1917 dissect_gsm_map_lcs_LCS_ClientID_PDU( new_tvb, gpinfo, tree );
1923 * 9.9.3.42 Generic message container type
1925 static const value_string nas_eps_emm_gen_msg_cont_type_vals[] = {
1927 { 1, "LTE Positioning Protocol (LPP) message container"},
1928 { 2, "Location services message container "},
1933 de_emm_gen_msg_cont_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
1935 guint32 curr_offset;
1937 curr_offset = offset;
1939 eps_nas_gen_msg_cont_type = tvb_get_guint8(tvb, curr_offset);
1940 proto_tree_add_item(tree, hf_nas_eps_emm_gen_msg_cont_type, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1943 return(curr_offset - offset);
1946 * 9.9.3.43 Generic message container
1949 de_emm_gen_msg_cont(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
1952 proto_tree *sub_tree;
1955 item = proto_tree_add_item(tree, hf_nas_eps_gen_msg_cont, tvb, offset, len, ENC_NA);
1956 sub_tree = proto_item_add_subtree(item, ett_nas_eps_gen_msg_cont);
1958 new_tvb = tvb_new_subset(tvb, offset, len, len);
1960 switch (eps_nas_gen_msg_cont_type) {
1964 call_dissector(lpp_handle, new_tvb, pinfo, sub_tree);
1968 /* Location services */
1969 if (gsm_a_dtap_handle) {
1970 call_dissector(gsm_a_dtap_handle, new_tvb, pinfo, sub_tree);
1980 * 9.9.3.44 Voice domain preference and UE's usage setting
1981 * See subclause 10.5.5.28 in 3GPP TS 24.008 [13].
1982 * packet-gsm_a_dtap.c
1986 * 9.9.4 EPS Session Management (ESM) information elements
1990 * 9.9.4.1 Access point name
1991 * See subclause 10.5.6.1 in 3GPP TS 24.008 [6].
1994 * 9.9.4.2 APN aggregate maximum bit rate
1998 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_)
2000 guint32 curr_offset;
2002 guint32 dl_total = 0;
2003 guint32 ul_total = 0;
2004 guint32 bitrate = 0;
2006 curr_offset = offset;
2007 /* APN-AMBR for downlink octet 3 */
2008 octet = tvb_get_guint8(tvb,curr_offset);
2010 proto_tree_add_uint_format(tree, hf_nas_eps_emm_apn_ambr_dl, tvb, curr_offset, 1, octet,
2013 bitrate = calc_bitrate(octet);
2014 dl_total += bitrate;
2015 proto_tree_add_uint_format(tree, hf_nas_eps_emm_apn_ambr_dl, tvb, curr_offset, 1, octet,
2016 "APN-AMBR for downlink : %u kbps", bitrate);
2020 /* APN-AMBR for uplink octet 4 */
2021 octet = tvb_get_guint8(tvb,curr_offset);
2023 proto_tree_add_uint_format(tree, hf_nas_eps_emm_apn_ambr_ul, tvb, curr_offset, 1, octet,
2026 bitrate = calc_bitrate(octet);
2027 ul_total += bitrate;
2028 proto_tree_add_uint_format(tree, hf_nas_eps_emm_apn_ambr_ul, tvb, curr_offset, 1, octet,
2029 "APN-AMBR for uplink : %u kbps", bitrate);
2032 if ((curr_offset - offset) >= len)
2034 /* APN-AMBR for downlink (extended) octet 5 */
2035 octet = tvb_get_guint8(tvb,curr_offset);
2037 proto_tree_add_uint_format(tree, hf_nas_eps_emm_apn_ambr_dl_ext, tvb, curr_offset, 1, octet,
2038 "Use the value indicated by the APN-AMBR for downlink");
2040 bitrate = calc_bitrate_ext(octet);
2041 dl_total += (octet > 0x4a) ? bitrate*1000 : bitrate;
2042 proto_tree_add_uint_format(tree, hf_nas_eps_emm_apn_ambr_dl_ext, tvb, curr_offset, 1, octet,
2043 "APN-AMBR for downlink (extended) : %u %s",
2045 (octet > 0x4a) ? "Mbps" : "kbps");
2048 /* APN-AMBR for downlink (extended-2) is not present; display total now */
2050 /* Ignore value indicated by the APN-AMBR for downlink */
2051 dl_total = (octet > 0x4a) ? bitrate*1000 : bitrate;
2053 if (dl_total >= 1000) {
2054 proto_tree_add_text(tree, tvb, curr_offset, 1,"Total APN-AMBR for downlink : %.3f Mbps", (gfloat)dl_total / 1000);
2056 proto_tree_add_text(tree, tvb, curr_offset, 1,"Total APN-AMBR for downlink : %u kbps", dl_total);
2060 if ((curr_offset - offset) >= len)
2062 /* APN-AMBR for uplink (extended) octet 6 */
2063 octet = tvb_get_guint8(tvb,curr_offset);
2065 proto_tree_add_uint_format(tree, hf_nas_eps_emm_apn_ambr_ul_ext, tvb, curr_offset, 1, octet,
2066 "Use the value indicated by the APN-AMBR for uplink");
2068 bitrate = calc_bitrate_ext(octet);
2069 ul_total += (octet > 0x4a) ? bitrate*1000 : bitrate;
2070 proto_tree_add_uint_format(tree, hf_nas_eps_emm_apn_ambr_ul_ext, tvb, curr_offset, 1, octet,
2071 "APN-AMBR for uplink (extended) : %u %s",
2073 (octet > 0x4a) ? "Mbps" : "kbps");
2076 /* APN-AMBR for uplink (extended-2) is not present; display total now */
2078 /* Ignore value indicated by the APN-AMBR for uplink */
2079 ul_total = (octet > 0x4a) ? bitrate*1000 : bitrate;
2081 if (ul_total >= 1000) {
2082 proto_tree_add_text(tree, tvb, curr_offset, 1,"Total APN-AMBR for uplink : %.3f Mbps", (gfloat)ul_total / 1000);
2084 proto_tree_add_text(tree, tvb, curr_offset, 1,"Total APN-AMBR for uplink : %u kbps", ul_total);
2088 if ((curr_offset - offset) >= len)
2090 /* APN-AMBR for downlink (extended-2) octet 7 */
2091 octet = tvb_get_guint8(tvb,curr_offset);
2092 if((octet==0)||(octet==0xff)){
2093 proto_tree_add_uint_format(tree, hf_nas_eps_emm_apn_ambr_dl_ext2, tvb, curr_offset, 1, octet,
2094 "Use the value indicated by the APN-AMBR for downlink and APN-AMBR for downlink (extended)");
2096 dl_total += octet*256*1000;
2097 proto_tree_add_uint_format(tree, hf_nas_eps_emm_apn_ambr_dl_ext2, tvb, curr_offset, 1, octet,
2098 "APN-AMBR for downlink (extended-2) : %u Mbps",
2101 proto_tree_add_text(tree, tvb, curr_offset, 1,"Total APN-AMBR for downlink : %.3f Mbps", (gfloat)dl_total / 1000);
2103 if ((curr_offset - offset) >= len)
2105 /* APN-AMBR for uplink (extended-2) octet 8 */
2106 octet = tvb_get_guint8(tvb,curr_offset);
2107 if((octet==0)||(octet==0xff)){
2108 proto_tree_add_uint_format(tree, hf_nas_eps_emm_apn_ambr_ul_ext2, tvb, curr_offset, 1, octet,
2109 "Use the value indicated by the APN-AMBR for uplink and APN-AMBR for downlink (extended)");
2111 ul_total += octet*256*1000;
2112 proto_tree_add_uint_format(tree, hf_nas_eps_emm_apn_ambr_ul_ext2, tvb, curr_offset, 1, octet,
2113 "APN-AMBR for uplink (extended-2) : %u Mbps",
2116 proto_tree_add_text(tree, tvb, curr_offset, 1,"Total APN-AMBR for uplink : %.3f Mbps", (gfloat)ul_total / 1000);
2122 * 9.9.4.3 EPS quality of service
2125 /* Quality of Service Class Identifier (QCI), octet 3 (see 3GPP TS 23.203 [7]) */
2126 static const value_string nas_eps_qci_vals[] = {
2127 { 0, "UE -> NW Network selects the QCI / NW -> UE Reserved"},
2143 de_esm_qos(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
2145 guint32 curr_offset;
2148 curr_offset = offset;
2151 proto_tree_add_item(tree, hf_nas_eps_qci, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2153 if ((curr_offset - offset) >= len)
2155 /* Maximum bit rate for uplink octet 4 */
2156 octet = tvb_get_guint8(tvb,curr_offset);
2158 proto_tree_add_uint_format(tree, hf_nas_eps_mbr_ul, tvb, curr_offset, 1, octet,
2159 "UE->NW Subscribed maximum bit rate for uplink/ NW->UE Reserved");
2161 proto_tree_add_uint_format(tree, hf_nas_eps_mbr_ul, tvb, curr_offset, 1, octet,
2162 "Maximum bit rate for uplink : %u kbps", calc_bitrate(octet));
2165 if ((curr_offset - offset) >= len)
2167 /* Maximum bit rate for downlink octet 5 */
2168 octet = tvb_get_guint8(tvb,curr_offset);
2170 proto_tree_add_uint_format(tree, hf_nas_eps_mbr_dl, tvb, curr_offset, 1, octet,
2171 "UE->NW Subscribed maximum bit rate for downlink/ NW->UE Reserved");
2173 proto_tree_add_uint_format(tree, hf_nas_eps_mbr_dl, tvb, curr_offset, 1, octet,
2174 "Maximum bit rate for downlink : %u kbps", calc_bitrate(octet));
2177 if ((curr_offset - offset) >= len)
2179 /* Guaranteed bit rate for uplink octet 6 */
2180 octet = tvb_get_guint8(tvb,curr_offset);
2181 proto_tree_add_uint_format(tree, hf_nas_eps_gbr_ul, tvb, curr_offset, 1, octet,
2182 "Guaranteed bit rate for uplink : %u kbps", calc_bitrate(octet));
2185 if ((curr_offset - offset) >= len)
2187 /* Guaranteed bit rate for downlink octet 7 */
2188 octet = tvb_get_guint8(tvb,curr_offset);
2189 proto_tree_add_uint_format(tree, hf_nas_eps_gbr_ul, tvb, curr_offset, 1, octet,
2190 "Guaranteed bit rate for downlink : %u kbps", calc_bitrate(octet));
2193 if ((curr_offset - offset) >= len)
2195 /* Maximum bit rate for uplink (extended) octet 8 */
2196 octet = tvb_get_guint8(tvb,curr_offset);
2198 proto_tree_add_uint_format(tree, hf_nas_eps_embr_ul, tvb, curr_offset, 1, octet,
2199 "Use the value indicated by the maximum bit rate for uplink in octet 4.");
2201 proto_tree_add_uint_format(tree, hf_nas_eps_embr_ul, tvb, curr_offset, 1, octet,
2202 "Maximum bit rate for uplink(extended) : %u %s",
2203 calc_bitrate_ext(octet),
2204 (octet > 0x4a) ? "Mbps" : "kbps");
2207 if ((curr_offset - offset) >= len)
2209 /* Maximum bit rate for downlink (extended) octet 9 */
2210 octet = tvb_get_guint8(tvb,curr_offset);
2212 proto_tree_add_uint_format(tree, hf_nas_eps_embr_ul, tvb, curr_offset, 1, octet,
2213 "Use the value indicated by the maximum bit rate for downlink in octet 5.");
2215 proto_tree_add_uint_format(tree, hf_nas_eps_embr_ul, tvb, curr_offset, 1, octet,
2216 "Maximum bit rate for downlink(extended) : %u %s",
2217 calc_bitrate_ext(octet),
2218 (octet > 0x4a) ? "Mbps" : "kbps");
2221 if ((curr_offset - offset) >= len)
2223 /* Guaranteed bit rate for uplink (extended) octet 10 */
2224 octet = tvb_get_guint8(tvb,curr_offset);
2226 proto_tree_add_uint_format(tree, hf_nas_eps_embr_ul, tvb, curr_offset, 1, octet,
2227 "Use the value indicated by the Guaranteed bit rate for uplink in octet 6.");
2229 proto_tree_add_uint_format(tree, hf_nas_eps_embr_ul, tvb, curr_offset, 1, octet,
2230 "Guaranteed bit rate for uplink(extended) : %u %s",
2231 calc_bitrate_ext(octet),
2232 (octet > 0x4a) ? "Mbps" : "kbps");
2235 if ((curr_offset - offset) >= len)
2237 /* Guaranteed bit rate for downlink (extended) octet 11 */
2238 octet = tvb_get_guint8(tvb,curr_offset);
2240 proto_tree_add_uint_format(tree, hf_nas_eps_embr_ul, tvb, curr_offset, 1, octet,
2241 "Use the value indicated by the Guaranteed bit rate for downlink in octet 7.");
2243 proto_tree_add_uint_format(tree, hf_nas_eps_embr_ul, tvb, curr_offset, 1, octet,
2244 "Guaranteed bit rate for downlink(extended) : %u %s",
2245 calc_bitrate_ext(octet),
2246 (octet > 0x4a) ? "Mbps" : "kbps");
2256 static const value_string nas_eps_esm_cause_vals[] = {
2257 { 0x08, "Operator Determined Barring"},
2258 { 0x1a, "Insufficient resources"},
2259 { 0x1b, "Unknown or missing APN"},
2260 { 0x1c, "Unknown PDN type"},
2261 { 0x1d, "User authentication failed"},
2262 { 0x1e, "Request rejected by Serving GW or PDN GW"},
2263 { 0x1f, "Request rejected, unspecified"},
2264 { 0x20, "Service option not supported"},
2265 { 0x21, "Requested service option not subscribed"},
2266 { 0x22, "Service option temporarily out of order"},
2267 { 0x23, "PTI already in use"},
2268 { 0x24, "Regular deactivation"},
2269 { 0x25, "EPS QoS not accepted"},
2270 { 0x26, "Network failure"},
2271 { 0x27, "Reactivation requested"},
2272 { 0x29, "Semantic error in the TFT operation"},
2273 { 0x2a, "Syntactical error in the TFT operation"},
2274 { 0x2b, "Invalid EPS bearer identity"},
2275 { 0x2c, "Semantic errors in packet filter(s)"},
2276 { 0x2d, "Syntactical errors in packet filter(s)"},
2277 { 0x2e, "EPS bearer context without TFT already activated"},
2278 { 0x2f, "PTI mismatch"},
2279 { 0x31, "Last PDN disconnection not allowed"},
2280 { 0x32, "PDN type IPv4 only allowed"},
2281 { 0x33, "PDN type IPv6 only allowed"},
2282 { 0x34, "Single address bearers only allowed"},
2283 { 0x35, "ESM information not received"},
2284 { 0x36, "PDN connection does not exist"},
2285 { 0x37, "Multiple PDN connections for a given APN not allowed"},
2286 { 0x38, "Collision with network initiated request"},
2287 { 0x3b, "Unsupported QCI value"},
2288 { 0x51, "Invalid PTI value"},
2289 { 0x5f, "Semantically incorrect message"},
2290 { 0x60, "Invalid mandatory information"},
2291 { 0x61, "Message type non-existent or not implemented"},
2292 { 0x62, "Message type not compatible with the protocol state"},
2293 { 0x63, "Information element non-existent or not implemented"},
2294 { 0x64, "Conditional IE error"},
2295 { 0x65, "Message not compatible with the protocol state"},
2296 { 0x6f, "Protocol error, unspecified"},
2297 { 0x70, "APN restriction value incompatible with active EPS bearer context"},
2302 de_esm_cause(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
2304 guint32 curr_offset;
2306 curr_offset = offset;
2308 proto_tree_add_item(tree, hf_nas_eps_esm_cause, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2311 return(curr_offset - offset);
2314 * 9.9.4.5 ESM information transfer flag
2316 /* EIT (ESM information transfer) */
2317 static const true_false_string nas_eps_emm_eit_vals = {
2318 "Security protected ESM information transfer required",
2319 "Security protected ESM information transfer not required"
2322 de_esm_inf_trf_flg(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
2324 guint32 curr_offset;
2326 curr_offset = offset;
2329 proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, (curr_offset<<3)+4, 3, ENC_BIG_ENDIAN);
2330 proto_tree_add_item(tree, hf_nas_eps_esm_eit, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2332 return(curr_offset-offset);
2335 * 9.9.4.6 Linked EPS bearer identity
2338 * Linked EPS bearer identity (bits 1-4)
2341 static const value_string nas_eps_esm_linked_bearer_id_vals[] = {
2347 { 0x5, "EPS bearer identity value 5"},
2348 { 0x6, "EPS bearer identity value 6"},
2349 { 0x7, "EPS bearer identity value 7"},
2350 { 0x8, "EPS bearer identity value 8"},
2351 { 0x9, "EPS bearer identity value 9"},
2352 { 0xa, "EPS bearer identity value 10"},
2353 { 0xb, "EPS bearer identity value 11"},
2354 { 0xc, "EPS bearer identity value 12"},
2355 { 0xd, "EPS bearer identity value 13"},
2356 { 0xe, "EPS bearer identity value 14"},
2357 { 0xf, "EPS bearer identity value 15"},
2364 de_esm_lnkd_eps_bearer_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
2366 guint32 curr_offset;
2368 curr_offset = offset;
2370 proto_tree_add_item(tree, hf_nas_eps_esm_lnkd_eps_bearer_id, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2376 * 9.9.4.7 LLC service access point identifier
2377 * See subclause 10.5.6.9 in 3GPP TS 24.008
2381 * 9.9.4.7a Notification indicator
2383 static const value_string nas_eps_esm_notif_ind_vals[] = {
2385 { 0x1, "SRVCC handover cancelled, IMS session re-establishment required"},
2390 de_esm_notif_ind(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
2392 guint32 curr_offset;
2394 curr_offset = offset;
2396 proto_tree_add_item(tree, hf_nas_eps_esm_notif_ind, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2402 * 9.9.4.8 Packet flow identifier
2403 * See subclause 10.5.6.11 in 3GPP TS 24.008
2406 * 9.9.4.9 PDN address
2409 de_esm_pdn_addr(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
2411 guint32 curr_offset;
2414 curr_offset = offset;
2417 pdn_type = tvb_get_guint8(tvb, offset) & 0x7;
2418 proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, curr_offset<<3, 5, ENC_BIG_ENDIAN);
2419 proto_tree_add_item(tree, hf_nas_eps_esm_pdn_type, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2425 proto_tree_add_item(tree, hf_nas_eps_esm_pdn_ipv4, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
2429 /* IPv6 3GPP TS 24.301 version 9.4.0 Release 9
2430 * If PDN type value indicates IPv6, the PDN address information in octet 4 to octet 11
2431 * contains an IPv6 interface identifier. Bit 8 of octet 4 represents the most significant bit
2432 * of the IPv6 interface identifier and bit 1 of octet 11 the least significant bit.
2434 proto_tree_add_item(tree, hf_nas_eps_esm_pdn_ipv6_if_id, tvb, curr_offset, 8, ENC_NA);
2438 /* IPv4/IPv6 3GPP TS 24.301 version 9.4.0 Release 9
2439 * If PDN type value indicates IPv4v6, the PDN address information in octet 4 to octet 15
2440 * contains an IPv6 interface identifier and an IPv4 address. Bit 8 of octet 4 represents
2441 * the most significant bit of the IPv6 interface identifier and bit 1 of octet 11 the least
2442 * significant bit. Bit 8 of octet 12 represents the most significant bit of the IPv4 address
2443 * and bit 1 of octet 15 the least significant bit.
2445 proto_tree_add_item(tree, hf_nas_eps_esm_pdn_ipv6_if_id, tvb, curr_offset, 8, ENC_NA);
2447 proto_tree_add_item(tree, hf_nas_eps_esm_pdn_ipv4, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
2454 return(curr_offset-offset);
2459 * Coded inline 1/2 octet
2461 static const value_string nas_eps_esm_pdn_type_values[] = {
2465 { 0x4, "Unused; shall be interpreted as IPv6 if received by the network" },
2470 * 9.9.4.11 Protocol configuration options
2471 * See subclause 10.5.6.3 in 3GPP TS 24.008
2474 * 9.9.4.12 Quality of service
2475 * See subclause 10.5.6.5 in 3GPP TS 24.008
2478 * 9.9.4.13 Radio priority
2479 * See subclause 10.5.7.2 in 3GPP TS 24.008
2482 * 9.9.4.14 Request type
2483 * See subclause 10.5.6.17 in 3GPP TS 24.008
2486 * 9.9.4.15 Traffic flow aggregate description
2487 * The Traffic flow aggregate description information element is encoded using the same format as the Traffic flow
2488 * template information element (see subclause 10.5.6.12 in 3GPP TS 24.008 [13]). When sending this IE, the UE shall
2489 * assign the packet filter identifier values so that they are unique across all packet filters for the PDN connection.
2492 * 9.9.4.16 Traffic flow template
2493 * See subclause 10.5.6.12 in 3GPP TS 24.008
2497 * 9.9.4.17 Transaction identifier
2498 * The Transaction identifier information element is coded as the Linked TI information element in 3GPP TS 24.008 [13],
2499 * subclause 10.5.6.7.
2500 * The coding of the TI flag, the TI value and the EXT bit is defined in 3GPP TS 24.007[20].
2503 guint16 (*emm_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string, int string_len) = {
2504 /* 9.9.3 EPS Mobility Management (EMM) information elements */
2505 de_emm_add_upd_res, /* 9.9.3.0A Additional update result */
2506 de_emm_add_upd_type, /* 9.9.3.0B Additional update type */
2507 NULL, /* 9.9.3.1 Authentication failure parameter(dissected in packet-gsm_a_dtap.c) */
2508 NULL, /* 9.9.3.2 Authentication parameter AUTN(packet-gsm_a_dtap.c) */
2509 NULL, /* 9.9.3.3 Authentication parameter RAND */
2510 de_emm_auth_resp_par, /* 9.9.3.4 Authentication response parameter */
2511 de_emm_csfb_resp, /* 9.9.3.5 CSFB response */
2512 NULL, /* 9.9.3.6 Daylight saving time (packet-gsm_a_dtap.c)*/
2513 NULL, /* 9.9.3.7 Detach type */
2514 NULL, /* 9.9.3.8 DRX parameter */
2515 de_emm_cause, /* 9.9.3.9 EMM cause */
2516 NULL, /* 9.9.3.10 EPS attach result (coded inline) */
2517 NULL, /* 9.9.3.11 EPS attach type(Coded Inline) */
2518 de_emm_eps_mid, /* 9.9.3.12 EPS mobile identity */
2519 de_emm_eps_net_feature_sup, /* 9.9.3.12A EPS network feature support */
2520 NULL, /* 9.9.3.13 EPS update result (Coded Inline)*/
2521 NULL, /* 9.9.3.14 EPS update type (Inline)*/
2522 de_emm_esm_msg_cont, /* 9.9.3.15 ESM message conta */
2523 NULL, /* 9.9.3.16 GPRS timer ,See subclause 10.5.7.3 in 3GPP TS 24.008 [6]. (packet-gsm_a_gm.c)*/
2524 NULL, /* 9.9.3.17 Identity type 2 ,See subclause 10.5.5.9 in 3GPP TS 24.008 [6]. */
2525 de_emm_nas_imeisv_req, /* 9.9.3.18 IMEISV request ,See subclause 10.5.5.10 in 3GPP TS 24.008 [6]. */
2526 de_emm_nas_ksi_and_seq_no, /* 9.9.3.19 KSI and sequence number */
2527 NULL, /* 9.9.3.20 MS network capability ,See subclause 10.5.5.12 in 3GPP TS 24.008 [6].(packet-gsm_a_gm.c) */
2528 de_emm_nas_key_set_id, /* 9.9.3.21 NAS key set identifier (Coded Inline) */
2529 de_emm_nas_msg_cont, /* 9.9.3.22 NAS message container */
2530 de_emm_nas_sec_alsgs, /* 9.9.3.23 NAS security algorithms */
2531 NULL, /* 9.9.3.24 Network name, See subclause 10.5.3.5a in 3GPP TS 24.008 [6]. (packet-gsm_a_dtap.c)*/
2532 de_emm_nonce, /* 9.9.3.25 Nonce */
2533 de_emm_paging_id, /* 9.9.3.25A Paging identity */
2534 NULL, /* 9.9.3.26 P-TMSI signature, See subclause 10.5.5.8 in 3GPP TS 24.008 [6]. (packet-gsm_a_gm.c)*/
2535 NULL, /* 9.9.3.27 Service type */
2536 de_emm_nas_short_mac, /* 9.9.3.28 Short MAC */
2537 NULL, /* 9.9.3.29 Time zone, See subclause 10.5.3.8 in 3GPP TS 24.008 [6]. (packet-gsm_a_dtap.c)*/
2538 NULL, /* 9.9.3.30 Time zone and time, See subclause 10.5.3.9 in 3GPP TS 24.008 [6]. (packet-gsm_a_dtap.c)*/
2539 NULL, /* 9.9.3.31 TMSI status, See subclause 10.5.5.4 in 3GPP TS 24.008 [6]. (packet-gsm_a_gm.c)*/
2540 de_emm_trac_area_id, /* 9.9.3.32 Tracking area identity */
2541 de_emm_trac_area_id_lst, /* 9.9.3.33 Tracking area identity list */
2542 de_emm_ue_net_cap, /* 9.9.3.34 UE network capability */
2543 de_emm_ue_ra_cap_inf_upd_need, /* 9.9.3.35 UE radio capability information update needed */
2544 de_emm_ue_sec_cap, /* 9.9.3.36 UE security capability */
2545 NULL, /* 9.9.3.37 Emergency Number List (packet-gsm_A_dtap.c) */
2546 NULL, /* 9.9.3.38 CLI */
2547 de_emm_ss_code, /* 9.9.3.39 SS Code */
2548 de_emm_lcs_ind, /* 9.9.3.40 LCS indicator */
2549 de_emm_lcs_client_id, /* 9.9.3.41 LCS client identity */
2550 de_emm_gen_msg_cont_type, /* 9.9.3.42 Generic message container type */
2551 de_emm_gen_msg_cont, /* 9.9.3.43 Generic message container */
2552 NULL, /* 9.9.3.44 Voice domain preference and UE's usage setting */
2556 /* 9.9.4 EPS Session Management (ESM) information elements */
2557 const value_string nas_esm_elem_strings[] = {
2558 { 0x00, "Access point name" }, /* 9.9.4.1 Access point name */
2559 { 0x00, "APN aggregate maximum bit rate" }, /* 9.9.4.2 APN aggregate maximum bit rate */
2560 { 0x00, "EPS quality of service" }, /* 9.9.4.3 EPS quality of service */
2561 { 0x00, "ESM cause" }, /* 9.9.4.4 ESM cause */
2562 { 0x00, "ESM information transfer flag" }, /* 9.9.4.5 ESM information transfer flag */
2563 { 0x00, "Linked EPS bearer identity" }, /* 9.9.4.6 Linked EPS bearer identity */
2564 { 0x00, "LLC service access point identifier" }, /* 9.9.4.7 LLC service access point identifier */
2565 { 0x00, "Notification indicator" }, /* 9.9.4.7a Notification indicator */
2566 { 0x00, "Packet flow identifier" }, /* 9.9.4.8 Packet flow identifier */
2567 { 0x00, "PDN address" }, /* 9.9.4.9 PDN address */
2568 { 0x00, "PDN type" }, /* 9.9.4.10 PDN type */
2569 { 0x00, "Protocol configuration options" }, /* 9.9.4.11 Protocol configuration options */
2570 { 0x00, "Quality of service" }, /* 9.9.4.12 Quality of service */
2571 { 0x00, "Radio priority" }, /* 9.9.4.13 Radio priority */
2572 { 0x00, "Request type" }, /* 9.9.4.14 Request type */
2573 { 0x00, "Traffic flow aggregate description" }, /* 9.9.4.15 Traffic flow aggregate description */
2574 { 0x00, "Traffic flow templat" }, /* 9.9.4.16 Traffic flow template */
2575 { 0x00, "Transaction identifier" }, /* 9.9.4.17 Transaction identifier */
2580 #define NUM_NAS_ESM_ELEM (sizeof(nas_esm_elem_strings)/sizeof(value_string))
2581 gint ett_nas_eps_esm_elem[NUM_NAS_ESM_ELEM];
2585 DE_ESM_APN, /* 9.9.4.1 Access point name */
2586 DE_ESM_APN_AGR_MAX_BR, /* 9.9.4.2 APN aggregate maximum bit rate */
2587 DE_ESM_EPS_QOS, /* 9.9.4.3 EPS quality of service */
2588 DE_ESM_CAUSE, /* 9.9.4.4 ESM cause */
2589 DE_ESM_INF_TRF_FLG, /* 9.9.4.5 ESM information transfer flag */
2590 DE_ESM_LNKED_EPS_B_ID, /* 9.9.4.6 Linked EPS bearer identity */
2591 DE_ESM_LLC_SAPI, /* 9.9.4.7 LLC service access point identifier */
2592 DE_ESM_NOTIF_IND, /* 9.9.4.7a Notification indicator */
2593 DE_ESM_P_FLW_ID, /* 9.9.4.8 Packet flow identifier */
2594 DE_ESM_PDN_ADDR, /* 9.9.4.9 PDN address */
2595 DE_ESM_PDN_TYPE, /* 9.9.4.10 PDN type */
2596 DE_ESM_PROT_CONF_OPT, /* 9.9.4.11 Protocol configuration options */
2597 DE_ESM_QOS, /* 9.9.4.12 Quality of service */
2598 DE_ESM_RA_PRI, /* 9.9.4.13 Radio priority */
2599 DE_ESM_REQ_TYPE, /* 9.9.4.14 Request type */
2600 DE_ESM_TRAF_FLOW_AGR_DESC, /* 9.9.4.15 Traffic flow aggregate description */
2601 DE_ESM_TRAF_FLOW_TEMPL, /* 9.9.4.16 Traffic flow template */
2602 DE_ESM_TID, /* 9.9.4.17 Transaction identifier */
2603 DE_ESM_NONE /* NONE */
2608 guint16 (*esm_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string, int string_len) = {
2609 NULL, /* 9.9.4.1 Access point name */
2610 de_esm_apn_aggr_max_br, /* 9.9.4.2 APN aggregate maximum bit rate */
2611 de_esm_qos, /* 9.9.4.3 EPS quality of service */
2612 de_esm_cause, /* 9.9.4.4 ESM cause */
2613 de_esm_inf_trf_flg, /* 9.9.4.5 ESM information transfer flag */
2614 de_esm_lnkd_eps_bearer_id, /* 9.9.4.6 Linked EPS bearer identity */
2615 NULL, /* 9.9.4.7 LLC service access point identifier */
2616 de_esm_notif_ind, /* 9.9.4.7a Notification indicator */
2617 NULL, /* 9.9.4.8 Packet flow identifier */
2618 de_esm_pdn_addr, /* 9.9.4.9 PDN address */
2619 NULL, /* 9.9.4.10 PDN type */
2620 NULL, /* 9.9.4.11 Protocol configuration options */
2621 NULL, /* 9.9.4.12 Quality of service */
2622 NULL, /* 9.9.4.13 Radio priority */
2623 NULL, /* 9.9.4.14 Request type */
2624 NULL, /* 9.9.4.15 Traffic flow aggregate description */
2625 NULL, /* 9.9.4.16 Traffic flow template */
2626 NULL, /* 9.9.4.17 Transaction identifier */
2630 /* MESSAGE FUNCTIONS */
2633 * 8.2.1 Attach accept
2637 nas_emm_attach_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
2639 guint32 curr_offset, bit_offset;
2643 curr_offset = offset;
2646 /* Spare half octet Spare half octet 9.9.2.7 M V 1/2 */
2647 bit_offset = curr_offset<<3;
2648 proto_tree_add_bits_item(tree, hf_nas_eps_emm_spare_half_octet, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
2650 /* EPS attach result EPS attach result 9.9.3.10 M V 1/2 */
2651 proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2653 proto_tree_add_bits_item(tree, hf_nas_eps_emm_EPS_attach_result, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
2655 /* Fix up the lengths */
2658 /* T3412 value GPRS timer 9.9.3.16 M V 1 */
2659 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER, " - T3412 value");
2660 /* Tracking area identity list 9.9.3.33 M LV 7-97 */
2661 ELEM_MAND_LV(NAS_PDU_TYPE_EMM, DE_EMM_TRAC_AREA_ID_LST, " - TAI list");
2662 /* ESM message container 9.9.3.15 M LV-E 2-n */
2663 ELEM_MAND_LV_E(NAS_PDU_TYPE_EMM, DE_EMM_ESM_MSG_CONT, NULL);
2664 /* 50 GUTI EPS mobile identity 9.9.3.12 O TLV 13 */
2665 ELEM_OPT_TLV(0x50, NAS_PDU_TYPE_EMM, DE_EMM_EPS_MID, " - GUTI");
2666 /* 13 Location area identification Location area identification 9.9.2.2 O TV 6 */
2667 ELEM_OPT_TV(0x13, NAS_PDU_TYPE_COMMON, DE_EPS_CMN_LOC_AREA_ID, NULL);
2668 /* 23 MS identity Mobile identity 9.9.2.3 O TLV 7-10 */
2669 ELEM_OPT_TLV(0x23, NAS_PDU_TYPE_COMMON, DE_EPS_CMN_MOB_ID, " - MS identity");
2670 /* 53 EMM cause EMM cause 9.9.3.9 O TV 2 */
2671 ELEM_OPT_TV(0x53, NAS_PDU_TYPE_EMM, DE_EMM_CAUSE, NULL);
2672 /* 17 T3402 value GPRS timer 9.9.3.16 O TV 2 */
2673 ELEM_OPT_TV(0x17, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER, " - T3402 value");
2674 /* 59 T3423 value GPRS timer 9.9.3.16 O TV 2 */
2675 ELEM_OPT_TV(0x59, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER, " - T3423 value");
2676 /* 4A Equivalent PLMNs PLMN list 9.9.2.8 O TLV 5-47 */
2677 ELEM_OPT_TLV(0x4a, NAS_PDU_TYPE_COMMON, DE_PLMN_LIST, " - Equivalent PLMNs");
2678 /* 34 Emergency Number List 9.9.3.37 O TLV 5-50 */
2679 ELEM_OPT_TLV(0x34, GSM_A_PDU_TYPE_DTAP, DE_EMERGENCY_NUM_LIST, NULL);
2680 /* 64 EPS network feature support EPS network feature support 9.9.3.12A O TLV 3 */
2681 ELEM_OPT_TLV(0x64, NAS_PDU_TYPE_EMM, DE_EMM_EPS_NET_FEATURE_SUP, NULL);
2682 /* F- Additional update result Additional update result 9.9.3.0A O TV 1 */
2683 ELEM_OPT_TV_SHORT( 0xF0 , NAS_PDU_TYPE_EMM, DE_EMM_ADD_UPD_RES, NULL );
2685 EXTRANEOUS_DATA_CHECK(curr_len, 0);
2688 * 8.2.2 Attach complete
2691 nas_emm_attach_comp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
2693 guint32 curr_offset;
2697 curr_offset = offset;
2700 /* ESM message container ESM message container 9.9.3.15 M LV-E 2-n */
2701 ELEM_MAND_LV_E(NAS_PDU_TYPE_EMM, DE_EMM_ESM_MSG_CONT, NULL);
2703 EXTRANEOUS_DATA_CHECK(curr_len, 0);
2708 * 8.2.3 Attach reject
2711 nas_emm_attach_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
2713 guint32 curr_offset;
2717 curr_offset = offset;
2720 /* * EMM cause EMM cause 9.9.3.9 M V 1 */
2721 ELEM_MAND_V(NAS_PDU_TYPE_EMM, DE_EMM_CAUSE, NULL);
2722 /* 78 ESM message container ESM message container 9.9.3.15 O TLV-E 4-n */
2723 ELEM_OPT_TLV_E(0x78, NAS_PDU_TYPE_EMM, DE_EMM_ESM_MSG_CONT, NULL);
2725 EXTRANEOUS_DATA_CHECK(curr_len, 0);
2729 * 8.2.4 Attach request
2732 nas_emm_attach_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
2734 guint32 curr_offset, bit_offset;
2738 curr_offset = offset;
2741 bit_offset = curr_offset<<3;
2743 /* NAS key set identifier NAS key set identifier 9.9.3.21 M V 1/2 */
2744 de_emm_nas_key_set_id_bits(tvb, tree, bit_offset, NULL);
2747 /* EPS attach type EPS attach type 9.9.3.11 M V 1/2
2750 proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2752 proto_tree_add_bits_item(tree, hf_nas_eps_emm_eps_att_type, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
2755 /* Fix the lengths */
2758 /* Old GUTI or IMSI EPS mobile identity 9.9.3.12 M LV 5-12 */
2759 ELEM_MAND_LV(NAS_PDU_TYPE_EMM, DE_EMM_EPS_MID, " - Old GUTI or IMSI");
2760 /* UE network capability UE network capability 9.9.3.34 M LV 3-14 */
2761 ELEM_MAND_LV(NAS_PDU_TYPE_EMM, DE_EMM_UE_NET_CAP, NULL);
2762 /* ESM message container ESM message container 9.9.3.15 M LV-E 2-n */
2763 ELEM_MAND_LV_E(NAS_PDU_TYPE_EMM, DE_EMM_ESM_MSG_CONT, NULL);
2764 /* 19 Old P-TMSI signature P-TMSI signature 10.5.5.8 O TV 4 */
2765 ELEM_OPT_TV( 0x19 , GSM_A_PDU_TYPE_GM, DE_P_TMSI_SIG, " - Old P-TMSI Signature");
2766 /* 50 Additional GUTI EPS mobile identity 9.9.3.12 O TLV 13 */
2767 ELEM_OPT_TLV( 0x50 , NAS_PDU_TYPE_EMM, DE_EMM_EPS_MID, " - Additional GUTI");
2768 /* 52 Last visited registered TAI Tracking area identity 9.9.3.32 O TV 6 */
2769 ELEM_OPT_TV(0x52, NAS_PDU_TYPE_EMM, DE_EMM_TRAC_AREA_ID, " - Last visited registered TAI");
2770 /* 5c DRX parameter DRX parameter 9.9.3.8 O TV 3 */
2771 ELEM_OPT_TV(0x5c, GSM_A_PDU_TYPE_GM, DE_DRX_PARAM, NULL );
2772 /* 31 MS network capability MS network capability 9.9.3.20 M LV 3-9 */
2773 ELEM_OPT_TLV( 0x31, GSM_A_PDU_TYPE_GM, DE_MS_NET_CAP , NULL );
2774 /* 13 Old location area identification Location area identification 9.9.2.2 O TV 6 */
2775 ELEM_OPT_TV(0x13, NAS_PDU_TYPE_COMMON, DE_EPS_CMN_LOC_AREA_ID, " - Old location area identification");
2776 /* 9- TMSI status TMSI status 9.9.3.31 O TV 1 */
2777 ELEM_OPT_TV_SHORT( 0x90 , GSM_A_PDU_TYPE_GM, DE_TMSI_STAT , NULL );
2778 /* 11 Mobile station classmark 2 Mobile station classmark 2 9.9.2.5 O TLV 5 */
2779 ELEM_OPT_TLV( 0x11, NAS_PDU_TYPE_COMMON, DE_EPS_MS_CM_2 , NULL );
2780 /* 20 Mobile station classmark 3 Mobile station classmark 3 9.9.2.5 O TLV 2-34 */
2781 ELEM_OPT_TLV( 0x20, NAS_PDU_TYPE_COMMON, DE_EPS_MS_CM_3 , NULL );
2782 /* 40 Supported Codecs Supported Codec List 9.9.2.10 O TLV 5-n */
2783 ELEM_OPT_TLV(0x40, GSM_A_PDU_TYPE_DTAP, DE_SUP_CODEC_LIST, " - Supported Codecs");
2784 /* F- Additional update type Additional update type 9.9.3.0B O TV 1 */
2785 ELEM_OPT_TV_SHORT( 0xF0 , NAS_PDU_TYPE_EMM, DE_EMM_ADD_UPD_TYPE, NULL );
2786 /* 5D Voice domain preference and UE's usage setting Voice domain preference and UE's usage setting 9.9.3.44 O TLV 3 */
2787 ELEM_OPT_TLV(0x5D, GSM_A_PDU_TYPE_GM, DE_VOICE_DOMAIN_PREF, NULL);
2789 EXTRANEOUS_DATA_CHECK(curr_len, 0);
2792 * 8.2.5 Authentication failure
2795 nas_emm_attach_fail(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
2797 guint32 curr_offset;
2801 curr_offset = offset;
2804 /* EMM cause EMM cause 9.9.3.9 M V 1 */
2805 ELEM_MAND_V(NAS_PDU_TYPE_EMM, DE_EMM_CAUSE, NULL);
2806 /* 30 Authentication failure parameter Authentication failure parameter 9.9.3.1 O TLV 1 */
2807 ELEM_OPT_TLV(0x30, GSM_A_PDU_TYPE_DTAP, DE_AUTH_FAIL_PARAM, NULL);
2809 EXTRANEOUS_DATA_CHECK(curr_len, 0);
2812 * 8.2.6 Authentication reject
2816 * 8.2.7 Authentication request
2820 nas_emm_auth_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
2822 guint32 curr_offset, bit_offset;
2826 curr_offset = offset;
2829 bit_offset = curr_offset<<3;
2831 /* Spare half octet Spare half octet 9.9.2.7 M V 1/2 */
2832 proto_tree_add_bits_item(tree, hf_nas_eps_emm_spare_half_octet, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
2836 * NAS key set identifierASME NAS key set identifier 9.9.3.21 M V 1/2
2838 de_emm_nas_key_set_id_bits(tvb, tree, bit_offset, " ASME");
2841 /* Fix the lengths */
2846 * Authentication parameter RAND (EPS challenge) 9.9.3.3 M V 16
2848 ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_AUTH_PARAM_RAND, " - EPS challenge");
2850 * Authentication parameter AUTN (EPS challenge) 9.9.3.2 M LV 17
2852 ELEM_MAND_LV(GSM_A_PDU_TYPE_DTAP, DE_AUTH_PARAM_AUTN, " - EPS challenge");
2854 EXTRANEOUS_DATA_CHECK(curr_len, 0);
2858 * 8.2.8 Authentication response
2861 nas_emm_auth_resp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
2863 guint32 curr_offset;
2867 curr_offset = offset;
2871 * Authentication response parameter 9.9.3.4 M LV 5-17
2873 ELEM_MAND_LV(NAS_PDU_TYPE_EMM, DE_EMM_AUTH_RESP_PAR, NULL);
2875 EXTRANEOUS_DATA_CHECK(curr_len, 0);
2879 * 8.2.9 CS service notification
2883 nas_emm_cs_serv_not(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
2885 guint32 curr_offset;
2889 curr_offset = offset;
2894 /* Paging identity Paging identity 9.9.3.25A M V 1 */
2895 ELEM_MAND_V(NAS_PDU_TYPE_EMM, DE_EMM_PAGING_ID, NULL);
2896 /* 60 CLI CLI 9.9.3.38 O TLV 3-12 */
2897 ELEM_OPT_TLV(0x60, GSM_A_PDU_TYPE_DTAP, DE_CLD_PARTY_BCD_NUM, " - CLI");
2898 /* 61 SS Code SS Code 9.9.3.39 O TV 2 */
2899 ELEM_OPT_TV(0x61, NAS_PDU_TYPE_EMM, DE_EMM_SS_CODE, NULL);
2900 /* 62 LCS indicator LCS indicator 9.9.3.40 O TV 2 */
2901 ELEM_OPT_TV(0x62, NAS_PDU_TYPE_EMM, DE_EMM_LCS_IND, NULL);
2902 /* 63 LCS client identity LCS client identity 9.9.3.41 O TLV 3-257 */
2903 ELEM_OPT_TLV(0x63, NAS_PDU_TYPE_EMM, DE_EMM_LCS_CLIENT_ID, NULL);
2905 EXTRANEOUS_DATA_CHECK(curr_len, 0);
2908 * 8.2.10 Detach accept
2909 * 8.2.10.1 Detach accept (UE originating detach)
2911 * 8.2.10.2 Detach accept (UE terminated detach)
2915 * 8.2.11 Detach request
2916 * 8.2.11.1 Detach request (UE originating detach)
2920 nas_emm_detach_req_UL(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
2922 guint32 curr_offset,bit_offset;
2926 curr_offset = offset;
2929 proto_tree_add_text(tree, tvb, curr_offset, len,"Up link");
2930 /* NAS key set identifier NAS key set identifier 9.9.3.21 M V 1/2 */
2931 bit_offset = curr_offset<<3;
2932 de_emm_nas_key_set_id_bits(tvb, tree, bit_offset, NULL);
2934 /* Detach type Detach type 9.9.3.6 M V 1/2 */
2935 proto_tree_add_bits_item(tree, hf_nas_eps_emm_switch_off, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2937 proto_tree_add_bits_item(tree, hf_nas_eps_emm_detach_type_UL, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
2940 /* Fix the lengths */
2944 /* GUTI or IMSI EPS mobile identity 9.9.3.12 M LV 5-12 */
2945 ELEM_MAND_LV(NAS_PDU_TYPE_EMM, DE_EMM_EPS_MID, " - GUTI or IMSI");
2950 * 8.2.11.2 Detach request (UE terminated detach)
2953 nas_emm_detach_req_DL(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
2955 guint32 curr_offset, bit_offset;
2959 curr_offset = offset;
2962 proto_tree_add_text(tree, tvb, curr_offset, len,"Down link");
2963 /* Spare half octet Spare half octet 9.9.2.7 M V 1/2 */
2964 bit_offset = curr_offset<<3;
2965 proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
2967 /* Detach type Detach type 9.9.3.6 M V 1/2 */
2968 /* In the network to UE direction bit 4 is spare. The network shall set this bit to zero. */
2969 proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2971 proto_tree_add_bits_item(tree, hf_nas_eps_emm_detach_type_DL, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
2974 /* Fix the lengths */
2978 /* No more mandatory elements */
2982 /* EMM cause EMM cause 9.9.3.9 O TV 2 */
2983 ELEM_OPT_TV(0x53, NAS_PDU_TYPE_EMM, DE_EMM_CAUSE, NULL);
2985 EXTRANEOUS_DATA_CHECK(curr_len, 0);
2990 nas_emm_detach_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
2992 guint32 curr_offset;
2995 curr_offset = offset;
2999 if(pinfo->link_dir==P2P_DIR_UL){
3000 nas_emm_detach_req_UL(tvb, tree, pinfo, offset, len);
3002 }else if(pinfo->link_dir==P2P_DIR_DL){
3003 nas_emm_detach_req_DL(tvb, tree, pinfo, offset, len);
3007 proto_tree_add_text(tree, tvb, curr_offset, len,"UL/DL not known, can't properly dissect");
3008 proto_tree_add_text(tree, tvb, curr_offset, len,"Trying to dissect as UE terminated detach");
3009 nas_emm_detach_req_DL(tvb, tree, pinfo, offset, len);
3010 proto_tree_add_text(tree, tvb, curr_offset, len,"Trying to dissect as UE originating detach");
3011 nas_emm_detach_req_UL(tvb, tree, pinfo, offset, len);
3018 * 8.2.12 Downlink NAS Transport
3021 nas_emm_dl_nas_trans(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
3023 guint32 curr_offset;
3027 curr_offset = offset;
3030 pinfo->link_dir = P2P_DIR_DL;
3032 /* NAS message container NAS message container 9.9.3.22 M LV 3-252 */
3033 ELEM_MAND_LV(NAS_PDU_TYPE_EMM, DE_EMM_NAS_MSG_CONT, NULL);
3035 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3038 * 8.2.13 EMM information
3041 nas_emm_emm_inf(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
3043 guint32 curr_offset;
3047 curr_offset = offset;
3050 /* 43 Full name for network Network name 9.9.3.24 O TLV 3-? */
3051 ELEM_OPT_TLV(0x43, GSM_A_PDU_TYPE_DTAP, DE_NETWORK_NAME, " - Full name for network");
3052 /* 45 Short name for network Network name 9.9.3.24 O TLV 3-? */
3053 ELEM_OPT_TLV(0x45, GSM_A_PDU_TYPE_DTAP, DE_NETWORK_NAME, " - Short Name");
3054 /* 46 Local time zone Time zone 9.9.3.29 O TV 2 */
3055 ELEM_OPT_TV(0x46, GSM_A_PDU_TYPE_DTAP, DE_TIME_ZONE, " - Local");
3056 /* 47 Universal time and local time zone Time zone and time 9.9.3.30 O TV 8 */
3057 ELEM_OPT_TV(0x47, GSM_A_PDU_TYPE_DTAP, DE_TIME_ZONE_TIME, " - Universal Time and Local Time Zone");
3058 /* 49 Network daylight saving time Daylight saving time 9.9.3.6 O TLV 3 */
3059 ELEM_OPT_TLV(0x49, GSM_A_PDU_TYPE_DTAP, DE_DAY_SAVING_TIME, NULL);
3061 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3069 nas_emm_emm_status(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
3071 guint32 curr_offset;
3075 curr_offset = offset;
3078 /* EMM cause EMM cause 9.9.3.9 M V 1 */
3079 ELEM_MAND_V(NAS_PDU_TYPE_EMM, DE_EMM_CAUSE, NULL);
3081 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3085 * 8.2.15 Extended service request
3088 nas_emm_ext_serv_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
3090 guint32 curr_offset,bit_offset;
3094 curr_offset = offset;
3097 bit_offset = curr_offset<<3;
3099 /* NAS key set identifier NAS key set identifier 9.9.3.21 M V 1/2 */
3100 de_emm_nas_key_set_id_bits(tvb, tree, bit_offset, NULL);
3102 /* Service type Service type 9.9.3.27 M V 1/2 Service type*/
3103 proto_tree_add_bits_item(tree, hf_nas_eps_service_type, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
3105 /* Fix up the lengths */
3109 /* M-TMSI Mobile identity 9.9.2.3 M LV 6 */
3110 ELEM_MAND_LV(NAS_PDU_TYPE_COMMON, DE_EPS_CMN_MOB_ID, " - M-TMSI");
3111 /* B- CSFB response CSFB response 9.9.3.5 C TV 1 */
3112 ELEM_OPT_TV_SHORT(0xb0, NAS_PDU_TYPE_EMM, DE_EMM_CSFB_RESP, NULL);
3113 /* 57 EPS bearer context status EPS bearer context status 9.9.2.1 O TLV 4 */
3114 ELEM_OPT_TLV(0x57, NAS_PDU_TYPE_COMMON, DE_EPS_CMN_EPS_BE_CTX_STATUS, NULL);
3116 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3119 * 8.2.16 GUTI reallocation command
3122 nas_emm_guti_realloc_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
3124 guint32 curr_offset;
3128 curr_offset = offset;
3131 /* GUTI EPS mobile identity 9.9.3.12 M LV 12 */
3132 ELEM_MAND_LV(NAS_PDU_TYPE_EMM, DE_EMM_EPS_MID, " - GUTI");
3134 /* 54 TAI list Tracking area identity list 9.9.3.33 O TLV 8-98 */
3135 ELEM_OPT_TLV(0x54, NAS_PDU_TYPE_EMM, DE_EMM_TRAC_AREA_ID_LST, NULL);
3137 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3141 * 8.2.17 GUTI reallocation complete
3145 * 8.2.18 Identity request
3149 nas_emm_id_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
3151 guint32 curr_offset, bit_offset;
3152 /*guint32 consumed;*/
3155 curr_offset = offset;
3159 bit_offset=curr_offset<<3;
3161 /* Spare half octet Spare half octet 9.9.2.7 M V 1/2 */
3162 proto_tree_add_bits_item(tree, hf_nas_eps_emm_spare_half_octet, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
3165 /* Identity type Identity type 2 9.9.3.17 M V 1/2 */
3166 proto_tree_add_bits_item(tree, hf_nas_eps_emm_id_type2, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
3171 /* Fix up the lengths */
3175 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3178 * 8.2.19 Identity response
3181 nas_emm_id_res(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
3183 guint32 curr_offset;
3187 curr_offset = offset;
3190 /* Mobile identity Mobile identity 9.9.2.3 M LV 4-10 */
3191 ELEM_MAND_LV(NAS_PDU_TYPE_COMMON, DE_EPS_CMN_MOB_ID, NULL);
3193 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3199 * 8.2.20 Security mode command
3202 nas_emm_sec_mode_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
3204 guint32 curr_offset, bit_offset;
3208 curr_offset = offset;
3211 /* Selected NAS security algorithms NAS security algorithms 9.9.3.23 M V 1 */
3212 ELEM_MAND_V(NAS_PDU_TYPE_EMM, DE_EMM_NAS_SEC_ALGS, " - Selected NAS security algorithms");
3214 bit_offset = curr_offset<<3;
3215 /* Spare half octet Spare half octet 9.9.2.7 M V 1/2 */
3216 proto_tree_add_bits_item(tree, hf_nas_eps_emm_spare_half_octet, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
3218 /* NAS key set identifierASME NAS key set identifier 9.9.3.21 M V 1/2 */
3219 de_emm_nas_key_set_id_bits(tvb, tree, bit_offset, " ASME");
3222 /* Fix up the lengths */
3226 /* Replayed UE security capabilities UE security capability 9.9.3.36 M LV 3-6 */
3227 ELEM_MAND_LV(NAS_PDU_TYPE_EMM, DE_EMM_UE_SEC_CAP, " - Replayed UE security capabilities");
3228 /* C- IMEISV request IMEISV request 9.9.3.18 O TV 1 */
3229 ELEM_OPT_TV_SHORT( 0xC0 , NAS_PDU_TYPE_EMM, DE_EMM_IMEISV_REQ , NULL );
3230 /* 55 Replayed NonceUE Nonce 9.9.3.25 O TV 5 */
3231 ELEM_OPT_TV(0x55, GSM_A_PDU_TYPE_GM, DE_EMM_NONCE, " - Replayed NonceUE");
3232 /* 56 NonceMME Nonce 9.9.3.25 O TV 5 */
3233 ELEM_OPT_TV(0x56, GSM_A_PDU_TYPE_GM, DE_EMM_NONCE, " - NonceMME");
3235 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3238 * 8.2.21 Security mode complete
3241 nas_emm_sec_mode_comp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
3243 guint32 curr_offset;
3247 curr_offset = offset;
3253 /* 23 IMEISV Mobile identity 9.9.2.3 O TLV 11 */
3254 ELEM_OPT_TLV(0x23, NAS_PDU_TYPE_COMMON, DE_EPS_CMN_MOB_ID, " - IMEISV");
3256 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3259 * 8.2.22 Security mode reject
3262 nas_emm_sec_mode_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
3264 guint32 curr_offset;
3268 curr_offset = offset;
3271 /* EMM cause EMM cause 9.9.3.9 M V 1 */
3272 ELEM_MAND_V(NAS_PDU_TYPE_EMM, DE_EMM_CAUSE, NULL);
3274 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3277 * 8.2.23 Security protected NAS message
3281 nas_emm_sec_prot_msg(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
3283 guint32 curr_offset;
3285 guint8 security_header_type;
3287 curr_offset = offset;
3290 /* Security header type Security header type 9.3.1 M V 1/2 */
3291 security_header_type = tvb_get_guint8(tvb,offset)>>4;
3292 proto_tree_add_item(tree, hf_nas_eps_security_header_type, tvb, 0, 1, ENC_BIG_ENDIAN);
3293 /* Protocol discriminator Protocol discriminator 9.2 M V 1/2 */
3294 proto_tree_add_item(tree, hf_gsm_a_L3_protocol_discriminator, tvb, 0, 1, ENC_BIG_ENDIAN);
3296 /* Message authentication code Message authentication code 9.5 M V 4 */
3297 if (security_header_type !=0){
3298 /* Message authentication code */
3299 proto_tree_add_item(tree, hf_nas_eps_msg_auth_code, tvb, offset, 4, ENC_BIG_ENDIAN);
3301 if ((security_header_type==2)||(security_header_type==4)){
3302 /* Integrity protected and ciphered = 2, Integrity protected and ciphered with new EPS security context = 4 */
3303 proto_tree_add_text(tree, tvb, offset, len-5,"Ciphered message");
3307 proto_tree_add_text(tree, tvb, offset, len,"Not a security protected message");
3310 /* Sequence number Sequence number 9.6 M V 1 */
3311 proto_tree_add_item(tree, hf_nas_eps_seq_no, tvb, offset, 1, ENC_BIG_ENDIAN);
3313 /* NAS message NAS message 9.7 M V 1-n */
3318 * 8.2.24 Service reject
3321 nas_emm_serv_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
3323 guint32 curr_offset;
3327 curr_offset = offset;
3330 /* EMM cause EMM cause 9.9.3.9 M V 1 */
3331 ELEM_MAND_V(NAS_PDU_TYPE_EMM, DE_EMM_CAUSE, NULL);
3333 /* 5B T3442 value GPRS timer 9.9.3.16 C TV 2 */
3334 ELEM_OPT_TV(0x5b, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER, " - T3442 value");
3336 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3339 * 8.2.25 Service request
3340 * This message is sent by the UE to the network to request the establishment
3341 * of a NAS signalling connection and of the radio and S1 bearers.
3342 * Its structure does not follow the structure of a standard layer 3 message. See table 8.2.25.1.
3345 * Protocol discriminator Protocol discriminator 9.2 M V 1/2
3346 * Security header type Security header type 9.3.1 M V 1/2
3347 * KSI and sequence number KSI and sequence number 9.9.3.19 M V 1
3348 * Message authentication code (short) Short MAC 9.9.3.28 M V 2
3351 nas_emm_service_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
3353 guint32 curr_offset;
3357 curr_offset = offset;
3360 /* KSI and sequence number 9.9.3.19 M V 1 */
3361 ELEM_MAND_V(NAS_PDU_TYPE_EMM, DE_EMM_KSI_AND_SEQ_NO, NULL);
3363 /* Short MAC 9.9.3.28 M V 2 */
3364 ELEM_MAND_V(NAS_PDU_TYPE_EMM, DE_EMM_SHORT_MAC, " - Message authentication code (short)");
3366 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3370 * 8.2.26 Tracking area update accept
3373 nas_emm_trac_area_upd_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
3375 guint32 curr_offset, bit_offset;
3379 curr_offset = offset;
3382 /* Spare half octet Spare half octet 9.9.2.7 M V 1/2 */
3383 bit_offset = curr_offset<<3;
3384 proto_tree_add_bits_item(tree, hf_nas_eps_emm_spare_half_octet, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
3386 /* EPS update result EPS update result 9.9.3.13 M V 1/2 */
3387 proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3389 proto_tree_add_bits_item(tree, hf_nas_eps_eps_update_result_value, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
3391 /* Fix up the lengths */
3394 /* No more mandatory elements */
3397 /* 5A T3412 value GPRS timer 9.9.3.16 O TV 2 */
3398 ELEM_OPT_TV(0x5a, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER, " - T3412 value");
3399 /* 50 GUTI EPS mobile identity 9.9.3.12 O TLV 13 */
3400 ELEM_OPT_TLV(0x50, NAS_PDU_TYPE_EMM, DE_EMM_EPS_MID, " - GUTI");
3401 /* 54 TAI list Tracking area identity list 9.9.3.33 O TLV 8-98 */
3402 ELEM_OPT_TLV(0x54, NAS_PDU_TYPE_EMM, DE_EMM_TRAC_AREA_ID_LST, NULL);
3403 /* 57 EPS bearer context status EPS bearer context status 9.9.2.1 O TLV 4 */
3404 ELEM_OPT_TLV(0x57, NAS_PDU_TYPE_COMMON, DE_EPS_CMN_EPS_BE_CTX_STATUS, NULL);
3405 /* 13 Location area identification Location area identification 9.9.2.2 O TV 6 */
3406 ELEM_OPT_TV(0x13, NAS_PDU_TYPE_COMMON, DE_EPS_CMN_LOC_AREA_ID, NULL);
3407 /* 23 MS identity Mobile identity 9.9.2.3 O TLV 7-10 */
3408 ELEM_OPT_TLV(0x23, NAS_PDU_TYPE_COMMON, DE_EPS_CMN_MOB_ID, " - MS identity");
3409 /* 53 EMM cause EMM cause 9.9.3.9 O TV 2 */
3410 ELEM_OPT_TV(0x53, NAS_PDU_TYPE_EMM, DE_EMM_CAUSE, NULL);
3411 /* 17 T3402 value GPRS timer 9.9.3.16 O TV 2 */
3412 ELEM_OPT_TV(0x17, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER, " - T3402 value");
3413 /* 59 T3423 value GPRS timer 9.9.3.16 O TV 2 */
3414 ELEM_OPT_TV(0x59, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER, " - T3423 value");
3415 /* 4A Equivalent PLMNs PLMN list 9.9.2.8 O TLV 5-47 */
3416 ELEM_OPT_TLV(0x4a, NAS_PDU_TYPE_COMMON, DE_PLMN_LIST, " - PLMN list");
3417 /* 34 Emergency Number List Emergency Number List 9.9.3.37 O TLV 5-50 */
3418 ELEM_OPT_TLV(0x34, GSM_A_PDU_TYPE_DTAP, DE_EMERGENCY_NUM_LIST, NULL);
3419 /* 64 EPS network feature support EPS network feature support 9.9.3.12A O TLV 3 */
3420 ELEM_OPT_TLV(0x64, NAS_PDU_TYPE_EMM, DE_EMM_EPS_NET_FEATURE_SUP, NULL);
3421 /* F- Additional update result Additional update result 9.9.3.0A O TV 1 */
3422 ELEM_OPT_TV_SHORT( 0xF0 , NAS_PDU_TYPE_EMM, DE_EMM_ADD_UPD_RES, NULL );
3424 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3427 * 8.2.27 Tracking area update complete
3431 * 8.2.28 Tracking area update reject
3434 nas_emm_trac_area_upd_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
3436 guint32 curr_offset;
3440 curr_offset = offset;
3443 /* EMM cause EMM cause 9.9.3.9 M V 1 */
3444 ELEM_MAND_V(NAS_PDU_TYPE_EMM, DE_EMM_CAUSE, NULL);
3446 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3449 * 8.2.29 Tracking area update request
3452 nas_emm_trac_area_upd_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
3455 guint32 curr_offset, bit_offset;
3459 curr_offset = offset;
3462 bit_offset = curr_offset<<3;
3464 /* NAS key set identifierASME NAS key set identifier 9.9.3.21 M V 1/2 */
3465 de_emm_nas_key_set_id_bits(tvb, tree, bit_offset, " ASME");
3468 /* EPS update type EPS update type 9.9.3.14 M V 1/2 */
3469 proto_tree_add_bits_item(tree, hf_nas_eps_active_flg, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3471 proto_tree_add_bits_item(tree, hf_nas_eps_eps_update_type_value, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
3474 /* Fix the lengths */
3477 /* Old GUTI EPS mobile identity 9.9.3.12 M LV 12 */
3478 ELEM_MAND_LV(NAS_PDU_TYPE_EMM, DE_EMM_EPS_MID, " - Old GUTI");
3479 /* No more Mandatory elements */
3481 /* B- NAS key set identifier Non-current native NAS key set identifier 9.9.3.21 O TV 1 */
3482 ELEM_OPT_TV_SHORT( 0xb0 , NAS_PDU_TYPE_EMM, DE_EMM_NAS_KEY_SET_ID , " - Non-current native NAS key set identifier" );
3483 /* 8- GPRS ciphering key sequence number Ciphering key sequence number 9.9.3.4a O TV 1 */
3484 ELEM_OPT_TV_SHORT(0x80, GSM_A_PDU_TYPE_COMMON, DE_CIPH_KEY_SEQ_NUM, " - GPRS ciphering key sequence number");
3485 /* 19 Old P-TMSI signature P-TMSI signature 9.9.3.26 O TV 4 */
3486 ELEM_OPT_TV( 0x19 , GSM_A_PDU_TYPE_GM, DE_P_TMSI_SIG, " - Old P-TMSI Signature");
3487 /* 50 Additional GUTI EPS mobile identity 9.9.3.12 O TLV 13 */
3488 ELEM_OPT_TLV(0x50, NAS_PDU_TYPE_EMM, DE_EMM_EPS_MID, " - Additional GUTI");
3489 /* 55 NonceUE Nonce 9.9.3.25 O TV 5 */
3490 ELEM_OPT_TV(0x55, GSM_A_PDU_TYPE_GM, DE_EMM_NONCE, " - NonceUE");
3491 /* 58 UE network capability UE network capability 9.9.3.34 O TLV 4-15 */
3492 ELEM_OPT_TLV(0x58, NAS_PDU_TYPE_EMM, DE_EMM_UE_NET_CAP, NULL);
3493 /* 52 Last visited registered TAI Tracking area identity 9.9.3.32 O TV 6 */
3494 ELEM_OPT_TV(0x52, NAS_PDU_TYPE_EMM, DE_EMM_TRAC_AREA_ID, " - Last visited registered TAI");
3495 /* 5C DRX parameter DRX parameter 9.9.3.8 O TV 3 */
3496 ELEM_OPT_TV(0x5c, GSM_A_PDU_TYPE_GM, DE_DRX_PARAM, NULL );
3497 /* A- UE radio capability information update needed UE radio capability information update needed 9.9.3.35 O TV 1 */
3498 ELEM_OPT_TV_SHORT( 0xA0 , NAS_PDU_TYPE_EMM, DE_EMM_UE_RA_CAP_INF_UPD_NEED , NULL );
3499 /* 57 EPS bearer context status EPS bearer context status 9.9.2.1 O TLV 4 */
3500 ELEM_OPT_TLV(0x57, NAS_PDU_TYPE_COMMON, DE_EPS_CMN_EPS_BE_CTX_STATUS, NULL);
3501 /* 31 MS network capability MS network capability 9.9.3.20 O TLV 4-10 */
3502 ELEM_OPT_TLV( 0x31 , GSM_A_PDU_TYPE_GM, DE_MS_NET_CAP , NULL );
3503 /* 13 Old location area identification Location area identification 9.9.2.2 O TV 6 */
3504 ELEM_OPT_TV(0x13, NAS_PDU_TYPE_COMMON, DE_EPS_CMN_LOC_AREA_ID, " - Old location area identification");
3505 /* 9- TMSI status TMSI status 9.9.3.31 O TV 1 */
3506 ELEM_OPT_TV_SHORT( 0x90 , GSM_A_PDU_TYPE_GM, DE_TMSI_STAT , NULL );
3507 /* 11 Mobile station classmark 2 Mobile station classmark 2 9.9.2.5 O TLV 5 */
3508 ELEM_OPT_TLV( 0x11, NAS_PDU_TYPE_COMMON, DE_EPS_MS_CM_2 , NULL );
3509 /* 20 Mobile station classmark 3 Mobile station classmark 3 9.9.2.5 O TLV 2-34 */
3510 ELEM_OPT_TLV( 0x20, NAS_PDU_TYPE_COMMON, DE_EPS_MS_CM_3 , NULL );
3511 /* 40 Supported Codecs Supported Codec List 9.9.2.10 O TLV 5-n */
3512 ELEM_OPT_TLV(0x40, GSM_A_PDU_TYPE_DTAP, DE_SUP_CODEC_LIST, " - Supported Codecs");
3513 /* F- Additional update type Additional update type 9.9.3.0B O TV 1 */
3514 ELEM_OPT_TV_SHORT( 0xF0 , NAS_PDU_TYPE_EMM, DE_EMM_ADD_UPD_TYPE, NULL );
3515 /* 5D Voice domain preference and UE's usage setting Voice domain preference and UE's usage setting 9.9.3.44 O TLV 3 */
3516 ELEM_OPT_TLV(0x5D, GSM_A_PDU_TYPE_GM, DE_VOICE_DOMAIN_PREF, NULL);
3518 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3522 * 8.2.30 Uplink NAS Transport
3525 nas_emm_ul_nas_trans(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
3527 guint32 curr_offset;
3531 curr_offset = offset;
3534 pinfo->link_dir = P2P_DIR_UL;
3536 /* NAS message container NAS message container 9.9.3.22 M LV 3-252*/
3537 ELEM_MAND_LV(NAS_PDU_TYPE_EMM, DE_EMM_NAS_MSG_CONT, NULL);
3539 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3543 * 8.2.31 Downlink generic NAS transport
3546 nas_emm_dl_gen_nas_trans(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
3548 guint32 curr_offset;
3552 curr_offset = offset;
3555 pinfo->link_dir = P2P_DIR_DL;
3557 /* Generic message container type Generic message container type 9.9.3.42 M V 1 */
3558 ELEM_MAND_V(NAS_PDU_TYPE_EMM, DE_EMM_GEN_MSG_CONT_TYPE, NULL);
3559 /* Generic message container Generic message container 9.9.3.43 M LV-E 3-n */
3560 ELEM_MAND_LV_E(NAS_PDU_TYPE_EMM, DE_EMM_GEN_MSG_CONT, NULL)
3561 /* 65 Additional information Additional information 9.9.2.0 O TLV 3-n */
3562 ELEM_OPT_TLV(0x65, NAS_PDU_TYPE_COMMON, DE_EPS_CMN_ADD_INFO, NULL);
3564 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3566 eps_nas_gen_msg_cont_type = 0;
3570 * 8.2.32 Uplink generic NAS transport
3573 nas_emm_ul_gen_nas_trans(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
3575 guint32 curr_offset;
3579 curr_offset = offset;
3582 pinfo->link_dir = P2P_DIR_UL;
3584 /* Generic message container type Generic message container type 9.9.3.42 M V 1 */
3585 ELEM_MAND_V(NAS_PDU_TYPE_EMM, DE_EMM_GEN_MSG_CONT_TYPE, NULL);
3586 /* Generic message container Generic message container 9.9.3.43 M LV-E 3-n */
3587 ELEM_MAND_LV_E(NAS_PDU_TYPE_EMM, DE_EMM_GEN_MSG_CONT, NULL)
3588 /* 65 Additional information Additional information 9.9.2.0 O TLV 3-n */
3589 ELEM_OPT_TLV(0x65, NAS_PDU_TYPE_COMMON, DE_EPS_CMN_ADD_INFO, NULL);
3591 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3593 eps_nas_gen_msg_cont_type = 0;
3597 * 8.3 EPS session management messages
3601 * 8.3.1 Activate dedicated EPS bearer context accept
3604 nas_esm_act_ded_eps_bearer_ctx_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
3606 guint32 curr_offset;
3613 curr_offset = offset;
3616 /* This message is sent by the UE to the network */
3617 pinfo->link_dir = P2P_DIR_UL;
3619 /* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */
3620 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
3622 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3626 * 8.3.2 Activate dedicated EPS bearer context reject
3629 nas_esm_act_ded_eps_bearer_ctx_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
3631 guint32 curr_offset;
3635 curr_offset = offset;
3638 /* This message is sent by UE to the network to reject activation of a dedicated EPS bearer context */
3639 pinfo->link_dir = P2P_DIR_UL;
3641 /* ESM cause ESM cause 9.9.4.2 M V 1 */
3642 ELEM_MAND_V(NAS_PDU_TYPE_ESM, DE_ESM_CAUSE, NULL);
3643 /* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */
3644 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
3646 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3649 * 8.3.3 Activate dedicated EPS bearer context request
3652 nas_esm_act_ded_eps_bearer_ctx_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
3654 guint32 curr_offset, bit_offset;
3658 curr_offset = offset;
3661 /* This message is sent by the network to the UE to request activation of a dedicated EPS bearer context... */
3662 pinfo->link_dir = P2P_DIR_DL;
3665 /* Spare half octet Spare half octet 9.9.2.9 M V 1/2 */
3666 bit_offset = curr_offset<<3;
3667 proto_tree_add_bits_item(tree, hf_nas_eps_emm_spare_half_octet, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
3669 /* Linked EPS bearer identity Linked EPS bearer identity 9.9.4.6 M V 1/2 */
3670 proto_tree_add_bits_item(tree, hf_nas_eps_esm_linked_bearer_id, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
3672 /* Fix the lengths */
3676 /* EPS QoS EPS quality of service 9.9.4.3 M LV 2-10 */
3677 ELEM_MAND_LV(NAS_PDU_TYPE_ESM, DE_ESM_EPS_QOS, NULL);
3678 /* TFT Traffic flow template 9.9.4.16 M LV 2-256 */
3679 ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_TRAFFIC_FLOW_TEMPLATE , NULL );
3680 /* 5D Transaction identifier Transaction identifier 9.9.4.17 O TLV 3-4 */
3681 ELEM_OPT_TLV( 0x5d , GSM_A_PDU_TYPE_GM, DE_LINKED_TI , " - Transaction identifier" );
3682 /* 30 Negotiated QoS Quality of service 9.9.4.12 O TLV 14-18 */
3683 ELEM_OPT_TLV( 0x30 , GSM_A_PDU_TYPE_GM, DE_QOS , " - Negotiated QoS" );
3684 /* 32 Negotiated LLC SAPI LLC service access point identifier 9.9.4.7 O TV 2 */
3685 ELEM_OPT_TV( 0x32 , GSM_A_PDU_TYPE_GM, DE_LLC_SAPI , " - Negotiated LLC SAPI" );
3686 /* 8- Radio priority Radio priority 9.9.4.13 O TV 1 */
3687 ELEM_OPT_TV_SHORT ( 0x80 , GSM_A_PDU_TYPE_GM , DE_RAD_PRIO , NULL );
3688 /* 34 Packet flow Identifier Packet flow Identifier 9.9.4.8 O TLV 3 */
3689 ELEM_OPT_TLV( 0x34 , GSM_A_PDU_TYPE_GM, DE_PACKET_FLOW_ID , NULL );
3690 /* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */
3691 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
3693 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3697 * 8.3.4 Activate default EPS bearer context accept
3700 nas_esm_act_def_eps_bearer_ctx_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
3702 guint32 curr_offset;
3706 curr_offset = offset;
3712 /* This message is sent by the UE to the network to acknowledge activation of a default EPS bearer context */
3713 pinfo->link_dir = P2P_DIR_UL;
3715 /* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */
3716 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
3718 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3722 * 8.3.5 Activate default EPS bearer context reject
3725 nas_esm_act_def_eps_bearer_ctx_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
3727 guint32 curr_offset;
3731 curr_offset = offset;
3734 /* This message is sent by UE to the network to reject activation of a default EPS bearer context. */
3735 pinfo->link_dir = P2P_DIR_UL;
3737 /* ESM cause ESM cause 9.9.4.4 M V 1 */
3738 ELEM_MAND_V(NAS_PDU_TYPE_ESM, DE_ESM_CAUSE, NULL);
3739 /* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */
3740 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
3742 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3746 * 8.3.6 Activate default EPS bearer context request
3749 nas_esm_act_def_eps_bearer_ctx_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
3751 guint32 curr_offset;
3755 curr_offset = offset;
3758 /* This message is sent by the network to the UE to request activation of a default EPS bearer context. */
3759 pinfo->link_dir = P2P_DIR_DL;
3761 /* EPS QoS EPS quality of service 9.9.4.3 M LV 2-10 */
3762 ELEM_MAND_LV(NAS_PDU_TYPE_ESM, DE_ESM_EPS_QOS, NULL);
3763 /* Access point name Access point name 9.9.4.1 M LV 2-101 */
3764 ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_ACC_POINT_NAME , NULL );
3765 /* PDN address PDN address 9.9.4.9 M LV 6-14 DE_ESM_PDN_ADDR*/
3766 ELEM_MAND_LV( NAS_PDU_TYPE_ESM, DE_ESM_PDN_ADDR , NULL );
3767 /* 5D Transaction identifier Transaction identifier 9.9.4.17 O TLV 3-4 */
3768 ELEM_OPT_TLV( 0x5d , GSM_A_PDU_TYPE_GM, DE_LINKED_TI , " - Transaction identifier" );
3769 /* 30 Negotiated QoS Quality of service 9.9.4.12 O TLV 14-18 */
3770 ELEM_OPT_TLV( 0x30 , GSM_A_PDU_TYPE_GM, DE_QOS , " - Negotiated QoS" );
3771 /* 32 Negotiated LLC SAPI LLC service access point identifier 9.9.4.7 O TV 2 */
3772 ELEM_OPT_TV( 0x32 , GSM_A_PDU_TYPE_GM, DE_LLC_SAPI , " - Negotiated LLC SAPI" );
3773 /* 8- Radio priority Radio priority 9.9.4.13 O TV 1 */
3774 ELEM_OPT_TV_SHORT ( 0x80 , GSM_A_PDU_TYPE_GM , DE_RAD_PRIO , NULL );
3775 /* 34 Packet flow Identifier Packet flow Identifier 9.9.4.8 O TLV 3 */
3776 ELEM_OPT_TLV( 0x34 , GSM_A_PDU_TYPE_GM, DE_PACKET_FLOW_ID , NULL );
3777 /* 5E APN-AMBR APN aggregate maximum bit rate 9.9.4.2 O TLV 4-8 DE_ESM_APN_AGR_MAX_BR*/
3778 ELEM_OPT_TLV( 0x5e , NAS_PDU_TYPE_ESM, DE_ESM_APN_AGR_MAX_BR , NULL );
3779 /* 58 ESM cause ESM cause 9.9.4.4 O TV 2 */
3780 ELEM_OPT_TV( 0x58 , NAS_PDU_TYPE_ESM, DE_ESM_CAUSE , NULL );
3781 /* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */
3782 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
3784 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3788 * 8.3.7 Bearer resource allocation reject
3791 nas_esm_bearer_res_all_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
3793 guint32 curr_offset;
3797 curr_offset = offset;
3800 /* This message is sent by the network to the UE to reject the allocation of a dedicated bearer resource. */
3801 pinfo->link_dir = P2P_DIR_DL;
3803 /* ESM cause ESM cause 9.9.4.4 M V 1 */
3804 ELEM_MAND_V(NAS_PDU_TYPE_ESM, DE_ESM_CAUSE, NULL);
3805 /* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */
3806 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
3808 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3812 * 8.3.8 Bearer resource allocation request
3815 nas_esm_bearer_res_all_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
3817 guint32 curr_offset, bit_offset;
3821 curr_offset = offset;
3824 /* This message is sent by the UE to the network to request the allocation of a dedicated bearer resource. */
3825 pinfo->link_dir = P2P_DIR_UL;
3827 /* Spare half octet Spare half octet 9.9.2.9 M V 1/2 */
3828 bit_offset = curr_offset<<3;
3829 proto_tree_add_bits_item(tree, hf_nas_eps_emm_spare_half_octet, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
3831 /* Linked EPS bearer identity Linked EPS bearer identity 9.9.4.6 M V 1/2 */
3832 proto_tree_add_bits_item(tree, hf_nas_eps_esm_linked_bearer_id, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
3834 /* Fix the lengths */
3838 /* Traffic flow aggregate Traffic flow aggregate description 9.9.4.15 M LV 2-256 */
3839 ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_TRAFFIC_FLOW_TEMPLATE , " - Traffic flow aggregate" );
3840 /* Required traffic flow QoS EPS quality of service 9.9.4.3 M LV 2-10 */
3841 ELEM_MAND_LV(NAS_PDU_TYPE_ESM, DE_ESM_EPS_QOS, " - Required traffic flow QoS");
3842 /* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */
3843 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
3845 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3848 * 8.3.9 Bearer resource modification reject
3851 nas_esm_bearer_res_mod_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
3853 guint32 curr_offset;
3857 curr_offset = offset;
3860 /* This message is sent by the network to the UE to reject the modification of a dedicated bearer resource. */
3861 pinfo->link_dir = P2P_DIR_DL;
3863 /* ESM cause ESM cause 9.9.4.4 M V 1 */
3864 ELEM_MAND_V(NAS_PDU_TYPE_ESM, DE_ESM_CAUSE, NULL);
3865 /* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */
3866 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
3868 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3871 * 8.3.10 Bearer resource modification request
3874 nas_esm_bearer_res_mod_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
3876 guint32 curr_offset, bit_offset;
3880 curr_offset = offset;
3883 /* This message is sent by the UE to the network to request the modification of a dedicated bearer resource. */
3884 pinfo->link_dir = P2P_DIR_UL;
3886 /* Spare half octet Spare half octet 9.9.2.9 M V 1/2 */
3887 bit_offset = curr_offset<<3;
3888 proto_tree_add_bits_item(tree, hf_nas_eps_emm_spare_half_octet, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
3890 /* EPS bearer identity for packet filter Linked EPS bearer identity 9.9.4.6 M V 1/2 */
3891 proto_tree_add_bits_item(tree, hf_nas_eps_esm_linked_bearer_id, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
3893 /* Fix the lengths */
3896 /* Traffic flow aggregate Traffic flow aggregate description 9.9.4.15 M LV 2-256 */
3897 ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_TRAFFIC_FLOW_TEMPLATE , " - Traffic flow aggregate" );
3898 /* 5B Required traffic flow QoS EPS quality of service 9.9.4.3 O TLV 3-11 */
3899 ELEM_OPT_TLV( 0x5B , NAS_PDU_TYPE_ESM, DE_ESM_EPS_QOS , " - Required traffic flow QoS" );
3900 /* 58 ESM cause ESM cause 9.9.4.4 O TV 2 */
3901 ELEM_OPT_TV( 0x58 , NAS_PDU_TYPE_ESM, DE_ESM_CAUSE , NULL );
3902 /* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */
3903 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
3905 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3908 * 8.3.11 Deactivate EPS bearer context accept
3911 nas_esm_deact_eps_bearer_ctx_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
3913 guint32 curr_offset;
3917 curr_offset = offset;
3923 /* This message is sent by the UE to acknowledge deactivation of the EPS bearer context... */
3924 pinfo->link_dir = P2P_DIR_UL;
3926 /* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV */
3927 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
3929 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3932 * 8.3.12 Deactivate EPS bearer context request
3935 nas_esm_deact_eps_bearer_ctx_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
3937 guint32 curr_offset;
3941 curr_offset = offset;
3944 /* This message is sent by the network to request deactivation of an active EPS bearer context. */
3945 pinfo->link_dir = P2P_DIR_DL;
3947 /* ESM cause ESM cause 9.9.4.4 M V 1 */
3948 ELEM_MAND_V(NAS_PDU_TYPE_ESM, DE_ESM_CAUSE, NULL);
3949 /* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV */
3950 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
3952 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3956 * 8.3.13 ESM information request
3960 nas_esm_inf_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
3962 guint32 curr_offset;
3965 curr_offset = offset;
3968 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3971 * 8.3.14 ESM information response
3974 nas_esm_inf_resp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
3976 guint32 curr_offset;
3980 curr_offset = offset;
3986 /* This message is sent by the UE to the network in response to an ESM INFORMATION REQUEST... */
3987 pinfo->link_dir = P2P_DIR_UL;
3989 /* 28 Access point name Access point name 9.9.4.1 O TLV 3-102 */
3990 ELEM_OPT_TLV( 0x28 , GSM_A_PDU_TYPE_GM, DE_ACC_POINT_NAME , NULL );
3991 /* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */
3992 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
3994 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4000 nas_esm_status(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
4002 guint32 curr_offset;
4006 curr_offset = offset;
4009 /* ESM cause ESM cause 9.9.4.4 M V 1 */
4010 ELEM_MAND_V(NAS_PDU_TYPE_ESM, DE_ESM_CAUSE, NULL);
4012 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4015 * 8.3.16 Modify EPS bearer context accept
4018 nas_esm_mod_eps_bearer_ctx_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
4020 guint32 curr_offset;
4024 curr_offset = offset;
4030 /* This message is sent by the UE to the network to acknowledge the modification of an active EPS bearer context. */
4031 pinfo->link_dir = P2P_DIR_UL;
4033 /* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */
4034 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
4036 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4039 * 8.3.17 Modify EPS bearer context reject
4042 nas_esm_mod_eps_bearer_ctx_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
4044 guint32 curr_offset;
4048 curr_offset = offset;
4051 /* This message is sent by the UE or the network to reject a modification of an active EPS bearer context. */
4052 pinfo->link_dir = P2P_DIR_UL;
4054 /* ESM cause ESM cause 9.9.4.4 M V 1 */
4055 ELEM_MAND_V(NAS_PDU_TYPE_ESM, DE_ESM_CAUSE, NULL);
4056 /* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */
4057 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
4059 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4062 * 8.3.18 Modify EPS bearer context request
4065 nas_esm_mod_eps_bearer_ctx_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
4067 guint32 curr_offset;
4071 curr_offset = offset;
4077 /*This message is sent by the network to inform the UE about events which are relevant for the upper layer... */
4078 pinfo->link_dir = P2P_DIR_DL;
4080 /* 5B New EPS QoS EPS quality of service 9.9.4.3 O TLV 3-11 */
4081 ELEM_OPT_TLV( 0x5B , NAS_PDU_TYPE_ESM, DE_ESM_EPS_QOS , " - New EPS QoS" );
4082 /* 36 TFT Traffic flow template 9.9.4.16 O TLV 3-257 */
4083 ELEM_OPT_TLV( 0x36 , GSM_A_PDU_TYPE_GM, DE_TRAFFIC_FLOW_TEMPLATE , NULL );
4084 /* 30 New QoS Quality of service 9.9.4.12 O TLV 14-18 */
4085 ELEM_OPT_TLV( 0x30 , GSM_A_PDU_TYPE_GM, DE_QOS , " - New QoS" );
4086 /* 32 Negotiated LLC SAPI LLC service access point identifier 9.9.4.7 O TV 2 */
4087 ELEM_OPT_TV( 0x32 , GSM_A_PDU_TYPE_GM, DE_LLC_SAPI , " - Negotiated LLC SAPI" );
4088 /* 8- Radio priority Radio priority 9.9.4.13 O TV 1 */
4089 ELEM_OPT_TV_SHORT ( 0x80 , GSM_A_PDU_TYPE_GM , DE_RAD_PRIO , NULL );
4090 /* 34 Packet flow Identifier Packet flow Identifier 9.9.4.8 O TLV 3 */
4091 ELEM_OPT_TLV( 0x34 , GSM_A_PDU_TYPE_GM, DE_PACKET_FLOW_ID , NULL );
4092 /* 5E APN-AMBR APN aggregate maximum bit rate 9.9.4.2 O TLV 4-8 */
4093 ELEM_OPT_TLV( 0x5E , NAS_PDU_TYPE_ESM, DE_ESM_APN_AGR_MAX_BR , NULL );
4094 /* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */
4095 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
4097 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4100 * 8.3.18A Notification
4103 nas_esm_notification(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
4105 guint32 curr_offset;
4109 curr_offset = offset;
4112 /* Notification indicator Notification indicator 9.9.4.7A M LV 2 */
4113 ELEM_MAND_LV(NAS_PDU_TYPE_ESM, DE_ESM_NOTIF_IND, NULL);
4115 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4119 * 8.3.19 PDN connectivity reject
4122 nas_esm_pdn_con_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
4124 guint32 curr_offset;
4128 curr_offset = offset;
4131 /*This message is sent by the network to the UE to reject establishment of a PDN connection. */
4132 pinfo->link_dir = P2P_DIR_DL;
4134 /* ESM cause ESM cause 9.9.4.4 M V 1 */
4135 ELEM_MAND_V(NAS_PDU_TYPE_ESM, DE_ESM_CAUSE, NULL);
4136 /* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */
4137 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
4139 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4143 * 8.3.20 PDN connectivity request
4146 nas_esm_pdn_con_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
4148 guint32 curr_offset;
4152 curr_offset = offset;
4155 /*This message is sent by the UE to the network to initiate establishment of a PDN connection. */
4156 pinfo->link_dir = P2P_DIR_UL;
4158 /* PDN type PDN type 9.9.4.10 M V 1/2 */
4159 proto_tree_add_bits_item(tree, hf_nas_eps_esm_pdn_type, tvb, (curr_offset<<3), 4, ENC_BIG_ENDIAN);
4161 /* Request type 9.9.4.14 M V 1/2 */
4162 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_REQ_TYPE, NULL);
4164 /* D- ESM information transfer flag 9.9.4.5 O TV 1 */
4165 ELEM_OPT_TV_SHORT( 0xd0 , NAS_PDU_TYPE_ESM, DE_ESM_INF_TRF_FLG , NULL );
4166 /* 28 Access point name 9.9.4.1 O TLV 3-102 */
4167 ELEM_OPT_TLV( 0x28 , GSM_A_PDU_TYPE_GM, DE_ACC_POINT_NAME , NULL );
4168 /* 27 Protocol configuration options 9.9.4.11 O TLV 3-253 */
4169 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
4171 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4174 * 8.3.20 PDN disconnect reject
4177 nas_esm_pdn_disc_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
4179 guint32 curr_offset;
4183 curr_offset = offset;
4186 /*This message is sent by the UE to the network to initiate establishment of a PDN connection. */
4187 pinfo->link_dir = P2P_DIR_UL;
4189 /* ESM cause ESM cause 9.9.4.4 M V 1 */
4190 ELEM_MAND_V(NAS_PDU_TYPE_ESM, DE_ESM_CAUSE, NULL);
4191 /* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */
4192 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
4194 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4197 * 8.3.21 PDN disconnect request
4200 nas_esm_pdn_disc_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
4202 guint32 curr_offset, bit_offset;
4206 curr_offset = offset;
4209 /* This message is sent by the network to the UE to reject release of a PDN connection. */
4210 pinfo->link_dir = P2P_DIR_DL;
4212 /* Spare half octet Spare half octet 9.9.2.9 M V 1/2 */
4213 bit_offset = curr_offset<<3;
4214 proto_tree_add_bits_item(tree, hf_nas_eps_emm_spare_half_octet, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
4216 /* Linked EPS bearer identity Linked EPS bearer identity 9.9.4.6 M V 1/2 */
4217 proto_tree_add_bits_item(tree, hf_nas_eps_esm_linked_bearer_id, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
4219 /* Fix the lengths */
4224 /* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */
4225 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
4227 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4231 #define NUM_NAS_MSG_ESM (sizeof(nas_msg_esm_strings)/sizeof(value_string))
4232 static gint ett_nas_msg_esm[NUM_NAS_MSG_ESM];
4233 static void (*nas_msg_esm_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len) = {
4234 nas_esm_act_def_eps_bearer_ctx_req, /* Activate default EPS bearer context request*/
4235 nas_esm_act_def_eps_bearer_ctx_acc, /* Activate default EPS bearer context accept*/
4236 nas_esm_act_def_eps_bearer_ctx_rej, /* Activate default EPS bearer context reject*/
4237 nas_esm_act_ded_eps_bearer_ctx_req, /* Activate dedicated EPS bearer context request*/
4238 nas_esm_act_ded_eps_bearer_ctx_acc, /* Activate dedicated EPS bearer context accept*/
4239 nas_esm_act_ded_eps_bearer_ctx_rej, /* Activate dedicated EPS bearer context reject*/
4240 nas_esm_mod_eps_bearer_ctx_req, /* Modify EPS bearer context request*/
4241 nas_esm_mod_eps_bearer_ctx_acc, /* Modify EPS bearer context accept*/
4242 nas_esm_mod_eps_bearer_ctx_rej, /* Modify EPS bearer context reject*/
4243 nas_esm_deact_eps_bearer_ctx_req, /* Deactivate EPS bearer context request*/
4244 nas_esm_deact_eps_bearer_ctx_acc, /* Deactivate EPS bearer context accept*/
4245 nas_esm_pdn_con_req, /* 8.3.18 PDN connectivity request */
4246 nas_esm_pdn_con_rej, /* PDN connectivity reject*/
4247 nas_esm_pdn_disc_req, /* PDN disconnect request*/
4248 nas_esm_pdn_disc_rej, /* PDN disconnect reject*/
4249 nas_esm_bearer_res_all_req, /* Bearer resource allocation request*/
4250 nas_esm_bearer_res_all_rej, /* Bearer resource allocation reject*/
4251 nas_esm_bearer_res_mod_req, /* Bearer resource modification request*/
4252 nas_esm_bearer_res_mod_rej, /* Bearer resource modification reject*/
4253 nas_esm_inf_req, /* ESM information request, No IE:s*/
4254 nas_esm_inf_resp, /* ESM information response*/
4255 nas_esm_notification, /* Notification */
4256 nas_esm_status, /* ESM status */
4262 get_nas_esm_msg_params(guint8 oct, const gchar **msg_str, int *ett_tree, int *hf_idx, msg_fcn *msg_fcn_p)
4266 *msg_str = match_strval_idx((guint32) (oct & 0xff), nas_msg_esm_strings, &idx);
4267 *ett_tree = ett_nas_msg_esm[idx];
4268 *hf_idx = hf_nas_eps_msg_esm_type;
4269 *msg_fcn_p = nas_msg_esm_fcn[idx];
4276 #define NUM_NAS_MSG_EMM (sizeof(nas_msg_emm_strings)/sizeof(value_string))
4277 static gint ett_nas_msg_emm[NUM_NAS_MSG_EMM];
4278 static void (*nas_msg_emm_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len) = {
4279 nas_emm_attach_req, /* Attach request */
4280 nas_emm_attach_acc, /* Attach accept */
4281 nas_emm_attach_comp, /* Attach complete */
4282 nas_emm_attach_rej, /* Attach reject */
4283 nas_emm_detach_req, /* Detach request */
4284 NULL, /* 8.2.10 Detach accept */
4286 nas_emm_trac_area_upd_req, /* Tracking area update request */
4287 nas_emm_trac_area_upd_acc, /* Tracking area update accept */
4288 NULL, /* Tracking area update complete (No IE's)*/
4289 nas_emm_trac_area_upd_rej, /* Tracking area update reject */
4291 nas_emm_ext_serv_req, /* Extended service request */
4292 nas_emm_serv_rej, /* Service reject */
4294 nas_emm_guti_realloc_cmd, /* GUTI reallocation command */
4295 NULL, /* GUTI reallocation complete (No IE's) */
4296 nas_emm_auth_req, /* Authentication request */
4297 nas_emm_auth_resp, /* Authentication response */
4298 NULL, /* Authentication reject (No IE:s)*/
4299 nas_emm_attach_fail, /* Authentication failure */
4300 nas_emm_id_req, /* Identity request */
4301 nas_emm_id_res, /* Identity response */
4302 nas_emm_sec_mode_cmd, /* Security mode command */
4303 nas_emm_sec_mode_comp, /* Security mode complete */
4304 nas_emm_sec_mode_rej, /* Security mode reject */
4306 nas_emm_emm_status, /* EMM status */
4307 nas_emm_emm_inf, /* EMM information */
4308 nas_emm_dl_nas_trans, /* Downlink NAS transport */
4309 nas_emm_ul_nas_trans, /* Uplink NAS transport */
4310 nas_emm_cs_serv_not, /* 8.2.9 CS service notification */
4311 nas_emm_dl_gen_nas_trans, /* Downlink generic NAS transport */
4312 nas_emm_ul_gen_nas_trans, /* Uplink generic NAS transport */
4318 get_nas_emm_msg_params(guint8 oct, const gchar **msg_str, int *ett_tree, int *hf_idx, msg_fcn *msg_fcn_p)
4322 *msg_str = match_strval_idx((guint32) (oct & 0xff), nas_msg_emm_strings, &idx);
4323 *ett_tree = ett_nas_msg_emm[idx];
4324 *hf_idx = hf_nas_eps_msg_emm_type;
4325 *msg_fcn_p = nas_msg_emm_fcn[idx];
4331 * EPS session management messages.
4332 * A plain NAS message is pased to this function
4335 disect_nas_eps_esm_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
4337 const gchar *msg_str;
4341 void (*msg_fcn_p)(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len);
4344 len = tvb_length(tvb);
4346 * EPS bearer identity 9.3.2
4348 proto_tree_add_item(tree, hf_nas_eps_bearer_id, tvb, offset, 1, ENC_BIG_ENDIAN);
4349 /* Protocol discriminator 9.2 */
4350 proto_tree_add_item(tree, hf_gsm_a_L3_protocol_discriminator, tvb, offset, 1, ENC_BIG_ENDIAN);
4353 /* Procedure transaction identity 9.4
4354 * The procedure transaction identity and its use are defined in 3GPP TS 24.007
4356 proto_tree_add_item(tree, hf_nas_eps_esm_proc_trans_id, tvb, offset, 1, ENC_BIG_ENDIAN);
4360 oct = tvb_get_guint8(tvb,offset);
4366 get_nas_esm_msg_params(oct, &msg_str, &ett_tree, &hf_idx, &msg_fcn_p);
4369 col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, msg_str);
4371 proto_tree_add_text(tree, tvb, offset, 1,"Unknown message 0x%x",oct);
4376 * Add NAS message name
4378 proto_tree_add_item(tree, hf_idx, tvb, offset, 1, ENC_BIG_ENDIAN);
4385 if (msg_fcn_p == NULL)
4387 proto_tree_add_text(tree, tvb, offset, len - offset,
4388 "Message Elements");
4392 (*msg_fcn_p)(tvb, tree, pinfo, offset, len - offset);
4397 * The "real" security header has been dissected or if dissect_header = TRUE
4400 dissect_nas_eps_emm_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, gboolean second_header)
4402 const gchar *msg_str;
4406 void (*msg_fcn_p)(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len);
4407 guint8 security_header_type, oct;
4409 len = tvb_length(tvb);
4411 /* 9.3.1 Security header type */
4413 security_header_type = tvb_get_guint8(tvb,offset)>>4;
4414 proto_tree_add_item(tree, hf_nas_eps_security_header_type, tvb, offset, 1, ENC_BIG_ENDIAN);
4415 proto_tree_add_item(tree, hf_gsm_a_L3_protocol_discriminator, tvb, offset, 1, ENC_BIG_ENDIAN);
4417 if (security_header_type !=0){
4418 /* Message authentication code */
4419 proto_tree_add_item(tree, hf_nas_eps_msg_auth_code, tvb, offset, 4, ENC_BIG_ENDIAN);
4421 /* Sequence number */
4422 proto_tree_add_item(tree, hf_nas_eps_seq_no, tvb, offset, 1, ENC_BIG_ENDIAN);
4424 if ((security_header_type==2)||(security_header_type==4))
4425 /* Integrity protected and ciphered = 2, Integrity protected and ciphered with new EPS security context = 4 */
4427 proto_tree_add_item(tree, hf_nas_eps_security_header_type, tvb, offset, 1, ENC_BIG_ENDIAN);
4428 proto_tree_add_item(tree, hf_gsm_a_L3_protocol_discriminator, tvb, offset, 1, ENC_BIG_ENDIAN);
4433 oct = tvb_get_guint8(tvb,offset);
4439 get_nas_emm_msg_params(oct, &msg_str, &ett_tree, &hf_idx, &msg_fcn_p);
4442 col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, msg_str);
4444 proto_tree_add_text(tree, tvb, offset, 1,"Unknown message 0x%x",oct);
4449 * Add NAS message name
4451 proto_tree_add_item(tree, hf_idx, tvb, offset, 1, ENC_BIG_ENDIAN);
4458 if (msg_fcn_p == NULL)
4460 proto_tree_add_text(tree, tvb, offset, len - offset,
4461 "Message Elements");
4465 (*msg_fcn_p)(tvb, tree, pinfo, offset, len - offset);
4470 * 9 General message format and information elements coding
4472 * Within the protocols defined in the present document, every message, except the SERVICE REQUEST message,
4473 * is a standard L3 message as defined in 3GPP TS 24.007 [12]. This means that the message consists of the following parts:
4474 * 1) if the message is a plain NAS message:
4475 * a) protocol discriminator;
4476 * b) EPS bearer identity or security header type;
4477 * c) procedure transaction identity;
4479 * e) other information elements, as required.
4480 * 2) if the message is a security protected NAS message:
4481 * a) protocol discriminator;
4482 * b) security header type;
4483 * c) message authentication code;
4484 * d) sequence number;
4485 * e) plain NAS message, as defined in item 1.
4487 * The EPS bearer identity and the procedure transaction identity are only used in messages
4488 * with protocol discriminator EPS session management. Octet 1a with the procedure transaction
4489 * identity shall only be included in these messages.
4493 * All messages recived here will have the security header:
4494 * Figure 9.1.2: General message organization example for a security protected NAS message
4495 * 9.3.1 Bits 5 to 8 of the first octet of every EPS Mobility Management (EMM)
4496 * message contain the Security header type IE.
4497 * 4.4.4.2 All ESM messages are integrity protected.
4501 dissect_nas_eps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
4504 proto_tree *nas_eps_tree;
4505 guint8 pd, security_header_type;
4508 guint32 msg_auth_code;
4512 len = tvb_length(tvb);
4514 /* make entry in the Protocol column on summary display */
4515 col_append_str(pinfo->cinfo, COL_PROTOCOL, "/NAS-EPS");
4517 item = proto_tree_add_item(tree, proto_nas_eps, tvb, 0, -1, ENC_BIG_ENDIAN);
4518 nas_eps_tree = proto_item_add_subtree(item, ett_nas_eps);
4520 /* Security header type Security header type 9.3.1 M V 1/2 */
4521 security_header_type = tvb_get_guint8(tvb,offset)>>4;
4522 proto_tree_add_item(nas_eps_tree, hf_nas_eps_security_header_type, tvb, 0, 1, ENC_BIG_ENDIAN);
4523 /* Protocol discriminator Protocol discriminator 9.2 M V 1/2 */
4524 proto_tree_add_item(nas_eps_tree, hf_gsm_a_L3_protocol_discriminator, tvb, 0, 1, ENC_BIG_ENDIAN);
4525 pd = tvb_get_guint8(tvb,offset)&0x0f;
4527 /* Message authentication code Message authentication code 9.5 M V 4 */
4528 if (security_header_type == 0){
4530 /* Plain EPS mobility management messages. */
4531 dissect_nas_eps_emm_msg(tvb, pinfo, nas_eps_tree, offset, ENC_BIG_ENDIAN);
4534 proto_tree_add_text(tree, tvb, offset, len, "All ESM messages should be integrity protected");
4538 /* SERVICE REQUEST (12) is not a plain NAS message treat separately */
4539 if (security_header_type == 12){
4540 col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "SERVICE REQUEST");
4541 nas_emm_service_req(tvb, nas_eps_tree, pinfo, offset, len-offset);
4544 /* Message authentication code */
4545 proto_tree_add_item(nas_eps_tree, hf_nas_eps_msg_auth_code, tvb, offset, 4, ENC_BIG_ENDIAN);
4546 msg_auth_code = tvb_get_ntohl(tvb, offset);
4548 if ((security_header_type==2)||(security_header_type==4)){
4549 /* Possible ciphered message */
4550 if(msg_auth_code!=0){
4551 /* Sequence number Sequence number 9.6 M V 1 */
4552 proto_tree_add_item(nas_eps_tree, hf_nas_eps_seq_no, tvb, offset, 1, ENC_BIG_ENDIAN);
4554 /* Integrity protected and ciphered = 2, Integrity protected and ciphered with new EPS security context = 4 */
4555 pd = tvb_get_guint8(tvb,offset)&0x0f;
4557 /* Does not work see Bug https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6348
4558 * 9.2 Protocol discriminator
4560 * The protocol discriminator in the header (see 3GPP TS 24.007 [12]) of a
4561 * security protected NAS message is encoded as "EPS mobility management messages".
4562 * XXX Should we check for PD == 7?
4564 /* If pd is in plaintext this message probably isn't ciphered */
4565 if((pd!=7)&&(pd!=2)&&(pd!=15)){
4566 proto_tree_add_text(nas_eps_tree, tvb, offset, len-6,"Ciphered message");
4570 proto_tree_add_text(nas_eps_tree, tvb, offset, len-6,"Ciphered message");
4574 /* msg_auth_code == 0, probably not ciphered */
4575 /* Sequence number Sequence number 9.6 M V 1 */
4576 proto_tree_add_item(nas_eps_tree, hf_nas_eps_seq_no, tvb, offset, 1, ENC_BIG_ENDIAN);
4580 /* Sequence number Sequence number 9.6 M V 1 */
4581 proto_tree_add_item(nas_eps_tree, hf_nas_eps_seq_no, tvb, offset, 1, ENC_BIG_ENDIAN);
4585 /* NAS message NAS message 9.7 M V 1-n */
4587 pd = tvb_get_guint8(tvb,offset)&0x0f;
4590 /* EPS session management messages.
4591 * Ref 3GPP TS 24.007 version 8.0.0 Release 8, Table 11.2: Protocol discriminator values
4593 disect_nas_eps_esm_msg(tvb, pinfo, nas_eps_tree, offset);
4596 /* EPS mobility management messages.
4597 * Ref 3GPP TS 24.007 version 8.0.0 Release 8, Table 11.2: Protocol discriminator values
4599 dissect_nas_eps_emm_msg(tvb, pinfo, nas_eps_tree, offset, TRUE);
4602 /* Special conformance testing functions for User Equipment messages.
4603 * Ref 3GPP TS 24.007 version 8.0.0 Release 8, Table 11.2: Protocol discriminator values
4605 if (gsm_a_dtap_handle){
4606 tvbuff_t *new_tvb = tvb_new_subset(tvb, offset, -1, -1);
4607 call_dissector(gsm_a_dtap_handle, new_tvb, pinfo, nas_eps_tree);
4609 } /* else fall through default */
4611 proto_tree_add_text(nas_eps_tree, tvb, offset, -1, "Not a NAS EPS PD %u(%s)",pd,val_to_str(pd, protocol_discriminator_vals,"unknown"));
4618 dissect_nas_eps_plain(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
4621 proto_tree *nas_eps_tree;
4628 /* make entry in the Protocol column on summary display */
4629 col_append_str(pinfo->cinfo, COL_PROTOCOL, "/NAS-EPS");
4631 item = proto_tree_add_item(tree, proto_nas_eps, tvb, 0, -1, ENC_BIG_ENDIAN);
4632 nas_eps_tree = proto_item_add_subtree(item, ett_nas_eps);
4634 pd = tvb_get_guint8(tvb,offset)&0x0f;
4637 /* EPS session management messages.
4638 * Ref 3GPP TS 24.007 version 8.0.0 Release 8, Table 11.2: Protocol discriminator values
4640 disect_nas_eps_esm_msg(tvb, pinfo, nas_eps_tree, offset);
4643 /* EPS mobility management messages.
4644 * Ref 3GPP TS 24.007 version 8.0.0 Release 8, Table 11.2: Protocol discriminator values
4646 dissect_nas_eps_emm_msg(tvb, pinfo, nas_eps_tree, offset, TRUE);
4649 /* Special conformance testing functions for User Equipment messages.
4650 * Ref 3GPP TS 24.007 version 8.0.0 Release 8, Table 11.2: Protocol discriminator values
4652 if (gsm_a_dtap_handle){
4653 tvbuff_t *new_tvb = tvb_new_subset(tvb, offset, -1, -1);
4654 call_dissector(gsm_a_dtap_handle, new_tvb,pinfo, nas_eps_tree);
4656 } /* else fall through default */
4658 proto_tree_add_text(nas_eps_tree, tvb, offset, -1, "Not a NAS EPS PD %u(%s)",pd,val_to_str(pd, protocol_discriminator_vals,"unknown"));
4664 void proto_register_nas_eps(void) {
4668 /* List of fields */
4670 static hf_register_info hf[] = {
4671 { &hf_nas_eps_msg_emm_type,
4672 { "NAS EPS Mobility Management Message Type", "nas_eps.nas_msg_emm_type",
4673 FT_UINT8, BASE_HEX, VALS(nas_msg_emm_strings), 0x0,
4676 { &hf_nas_eps_common_elem_id,
4677 { "Element ID", "nas_eps.common.elem_id",
4678 FT_UINT8, BASE_DEC, NULL, 0,
4681 { &hf_nas_eps_emm_elem_id,
4682 { "Element ID", "nas_eps.emm.elem_id",
4683 FT_UINT8, BASE_DEC, NULL, 0,
4686 { &hf_nas_eps_bearer_id,
4687 { "EPS bearer identity", "nas_eps.bearer_id",
4688 FT_UINT8, BASE_HEX, NULL, 0xf0,
4691 { &hf_nas_eps_spare_bits,
4692 { "Spare bit(s)", "nas_eps.spare_bits",
4693 FT_UINT8, BASE_HEX, NULL, 0x0,
4696 { &hf_nas_eps_security_header_type,
4697 { "Security header type","nas_eps.security_header_type",
4698 FT_UINT8,BASE_DEC|BASE_EXT_STRING, &security_header_type_vals_ext, 0xf0,
4701 { &hf_nas_eps_msg_auth_code,
4702 { "Message authentication code","nas_eps.msg_auth_code",
4703 FT_UINT32,BASE_HEX, NULL, 0x0,
4706 { &hf_nas_eps_seq_no,
4707 { "Sequence number","nas_eps.seq_no",
4708 FT_UINT8,BASE_DEC, NULL, 0x0,
4711 { &hf_nas_eps_seq_no_short,
4712 { "Sequence number (short)","nas_eps.seq_no_short",
4713 FT_UINT8,BASE_DEC, NULL, 0x0,
4716 { &hf_nas_eps_emm_ebi0,
4717 { "EBI(0) spare","nas_eps.emm.ebi0",
4718 FT_BOOLEAN, 8, NULL, 0x01,
4721 { &hf_nas_eps_emm_ebi1,
4722 { "EBI(1) spare","nas_eps.emm.ebi1",
4723 FT_BOOLEAN, 8, NULL, 0x02,
4726 { &hf_nas_eps_emm_ebi2,
4727 { "EBI(2) spare","nas_eps.emm.ebi2",
4728 FT_BOOLEAN, 8, NULL, 0x04,
4731 { &hf_nas_eps_emm_ebi3,
4732 { "EBI(3) spare","nas_eps.emm.ebi3",
4733 FT_BOOLEAN, 8, NULL, 0x08,
4736 { &hf_nas_eps_emm_ebi4,
4737 { "EBI(4) spare","nas_eps.emm.ebi4",
4738 FT_BOOLEAN, 8, NULL, 0x10,
4741 { &hf_nas_eps_emm_ebi5,
4742 { "EBI(5)","nas_eps.emm.ebi5",
4743 FT_BOOLEAN, 8, TFS(&nas_eps_emm_ebi_vals), 0x20,
4746 { &hf_nas_eps_emm_ebi6,
4747 { "EBI(6)","nas_eps.emm.ebi6",
4748 FT_BOOLEAN, 8, TFS(&nas_eps_emm_ebi_vals), 0x40,
4751 { &hf_nas_eps_emm_ebi7,
4752 { "EBI(7)","nas_eps.emm.ebi7",
4753 FT_BOOLEAN, 8, TFS(&nas_eps_emm_ebi_vals), 0x80,
4756 { &hf_nas_eps_emm_ebi8,
4757 { "EBI(8)","nas_eps.emm.ebi8",
4758 FT_BOOLEAN, 8, TFS(&nas_eps_emm_ebi_vals), 0x01,
4761 { &hf_nas_eps_emm_ebi9,
4762 { "EBI(9)","nas_eps.emm.ebi9",
4763 FT_BOOLEAN, 8, TFS(&nas_eps_emm_ebi_vals), 0x02,
4766 { &hf_nas_eps_emm_ebi10,
4767 { "EBI(10)","nas_eps.emm.ebi10",
4768 FT_BOOLEAN, 8, TFS(&nas_eps_emm_ebi_vals), 0x04,
4771 { &hf_nas_eps_emm_ebi11,
4772 { "EBI(11)","nas_eps.emm.ebi11",
4773 FT_BOOLEAN, 8, TFS(&nas_eps_emm_ebi_vals), 0x08,
4776 { &hf_nas_eps_emm_ebi12,
4777 { "EBI(12)","nas_eps.emm.ebi12",
4778 FT_BOOLEAN, 8, TFS(&nas_eps_emm_ebi_vals), 0x10,
4781 { &hf_nas_eps_emm_ebi13,
4782 { "EBI(13)","nas_eps.emm.ebi13",
4783 FT_BOOLEAN, 8, TFS(&nas_eps_emm_ebi_vals), 0x20,
4786 { &hf_nas_eps_emm_ebi14,
4787 { "EBI(14)","nas_eps.emm.ebi14",
4788 FT_BOOLEAN, 8, TFS(&nas_eps_emm_ebi_vals), 0x40,
4791 { &hf_nas_eps_emm_ebi15,
4792 { "EBI(15)","nas_eps.emm.ebi15",
4793 FT_BOOLEAN, 8, TFS(&nas_eps_emm_ebi_vals), 0x80,
4796 { &hf_nas_eps_emm_dl_nas_cnt,
4797 { "DL NAS COUNT value","nas_eps.emm.dl_nas_cnt",
4798 FT_UINT8,BASE_DEC, NULL, 0x0f,
4801 {&hf_nas_eps_emm_nonce_mme,
4802 { "NonceMME","nas_eps.emm.nonce_mme",
4803 FT_UINT32,BASE_HEX, NULL, 0x0,
4806 {&hf_nas_eps_emm_nonce,
4807 { "Nonce","nas_eps.emm.nonce",
4808 FT_UINT32,BASE_HEX, NULL, 0x0,
4811 { &hf_nas_eps_emm_paging_id,
4812 { "Paging identity value","nas_eps.emm.paging_id",
4813 FT_BOOLEAN, 8, TFS(&nas_eps_emm_paging_id_vals), 0x0,
4816 { &hf_nas_eps_emm_eps_att_type,
4817 { "EPS attach type","nas_eps.emm.eps_att_type",
4818 FT_UINT8,BASE_DEC, VALS(nas_eps_emm_eps_att_type_vals), 0x0,
4821 { &hf_nas_eps_emm_cs_lcs_type,
4822 { "CS-LCS","nas_eps.emm.cs_lcs",
4823 FT_UINT8, BASE_DEC, VALS(nas_eps_emm_cs_lcs_vals), 0x0,
4824 "Location services indicator in CS", HFILL }
4826 { &hf_nas_eps_emm_epc_lcs_type,
4827 { "EPC-LCS","nas_eps.emm.epc_lcs",
4828 FT_BOOLEAN ,BASE_NONE, TFS(&nas_eps_emm_epc_lcs_value), 0x0,
4829 "Location services indicator in EPC", HFILL }
4831 { &hf_nas_eps_emm_emc_bs_type,
4832 { "EMC BS","nas_eps.emm.emc_bs",
4833 FT_BOOLEAN, BASE_NONE, TFS(&nas_eps_emm_emc_bs_value), 0x0,
4834 "Emergency bearer services indicator", HFILL }
4836 { &hf_nas_eps_emm_ims_vops_type,
4837 { "IMS VoPS","nas_eps.emm.ims_vops",
4838 FT_BOOLEAN, BASE_NONE, TFS(&nas_eps_emm_ims_vops_value), 0x0,
4839 "IMS voice over PS session indicator", HFILL }
4842 { "Type of security context flag (TSC)","nas_eps.emm.tsc",
4843 FT_UINT8,BASE_DEC, VALS(nas_eps_tsc_vals), 0x0,
4846 { &hf_nas_eps_emm_nas_key_set_id,
4847 { "NAS key set identifier","nas_eps.emm.nas_key_set_id",
4848 FT_UINT8,BASE_DEC, VALS(nas_eps_emm_NAS_key_set_identifier_vals), 0x0,
4851 { &hf_nas_eps_emm_odd_even,
4852 { "odd/even indic","nas_eps.emm.odd_even",
4853 FT_UINT8,BASE_DEC, NULL, 0x8,
4856 { &hf_nas_eps_emm_type_of_id,
4857 { "Type of identity","nas_eps.emm.type_of_id",
4858 FT_UINT8,BASE_DEC, VALS(nas_eps_emm_type_of_id_vals), 0x07,
4861 { &hf_nas_eps_emm_mme_grp_id,
4862 { "MME Group ID","nas_eps.emm.mme_grp_id",
4863 FT_UINT16, BASE_DEC, NULL, 0x0,
4866 { &hf_nas_eps_emm_imsi,
4867 { "IMSI", "nas_eps.emm.imsi",
4868 FT_STRING, BASE_NONE, NULL, 0,
4871 { &hf_nas_eps_emm_imei,
4872 { "IMEI", "nas_eps.emm.imei",
4873 FT_STRING, BASE_NONE, NULL, 0,
4876 { &hf_nas_eps_emm_mme_code,
4877 { "MME Code","nas_eps.emm.mme_code",
4878 FT_UINT8, BASE_DEC, NULL, 0x0,
4881 { &hf_nas_eps_emm_m_tmsi,
4882 { "M-TMSI","nas_eps.emm.m_tmsi",
4883 FT_UINT32, BASE_HEX, NULL, 0x0,
4886 { &hf_nas_eps_esm_msg_cont,
4887 { "ESM message container contents","nas_eps.emm.esm_msg_cont",
4888 FT_BYTES, BASE_NONE, NULL, 0x0,
4891 { &hf_nas_eps_esm_imeisv_req,
4892 { "IMEISV request","nas_eps.emm.imeisv_req",
4893 FT_UINT8, BASE_DEC, VALS(nas_eps_emm_imeisv_req_vals), 0x07,
4896 { &hf_nas_eps_emm_toi,
4897 { "Type of integrity protection algorithm","nas_eps.emm.toi",
4898 FT_UINT8, BASE_DEC, VALS(nas_eps_emm_toi_vals), 0x07,
4901 { &hf_nas_eps_emm_toc,
4902 { "Type of ciphering algorithm","nas_eps.emm.toc",
4903 FT_UINT8, BASE_DEC, VALS(nas_eps_emm_toc_vals), 0x70,
4906 { &hf_nas_eps_emm_EPS_attach_result,
4907 { "Attach result","nas_eps.emm.EPS_attach_result",
4908 FT_UINT8,BASE_DEC, VALS(nas_eps_emm_EPS_attach_result_values), 0x0,
4911 { &hf_nas_eps_emm_spare_half_octet,
4912 { "Spare half octet","nas_eps.emm.EPS_attach_result",
4913 FT_UINT8,BASE_DEC, NULL, 0x0,
4916 { &hf_nas_eps_emm_add_upd_res,
4917 { "AURV","nas_eps.emm.add_upd_res",
4918 FT_UINT8, BASE_DEC, VALS(nas_eps_emm_add_upd_res_vals), 0x0,
4919 "Additional update result value", HFILL }
4921 { &hf_nas_eps_emm_add_upd_type,
4922 { "AUTV","nas_eps.emm.add_upd_type",
4923 FT_UINT8, BASE_DEC, VALS(nas_eps_emm_add_upd_type_vals), 0x0,
4924 "Additional update type value", HFILL }
4926 { &hf_nas_eps_emm_res,
4927 { "RES","nas_eps.emm.res",
4928 FT_BYTES, BASE_NONE, NULL, 0x0,
4931 { &hf_nas_eps_emm_csfb_resp,
4932 { "CSFB response","nas_eps.emm.csfb_resp",
4933 FT_UINT8, BASE_DEC, VALS(nas_eps_emm_csfb_resp_vals), 0x03,
4936 { &hf_nas_eps_emm_cause,
4937 { "Cause","nas_eps.emm.cause",
4938 FT_UINT8, BASE_DEC, VALS(nas_eps_emm_cause_values), 0x0,
4941 { &hf_nas_eps_emm_id_type2,
4942 { "Identity type 2","nas_eps.emm.id_type2",
4943 FT_UINT8, BASE_DEC, VALS(nas_eps_emm_id_type2_vals), 0x0,
4946 { &hf_nas_eps_emm_short_mac,
4947 { "Message authentication code (short)","nas_eps.emm.short_mac",
4948 FT_UINT16, BASE_HEX, NULL, 0x0,
4951 { &hf_nas_eps_emm_tai_tol,
4952 { "Type of list","nas_eps.emm.tai_tol",
4953 FT_UINT8, BASE_DEC, VALS(nas_eps_emm_tai_tol_vals), 0x60,
4956 { &hf_nas_eps_emm_tai_n_elem,
4957 { "Number of elements","nas_eps.emm.tai_n_elem",
4958 FT_UINT8, BASE_DEC, NULL, 0x1f,
4961 { &hf_nas_eps_emm_tai_tac,
4962 { "Tracking area code(TAC)","nas_eps.emm.tai_tac",
4963 FT_UINT16, BASE_HEX, NULL, 0x0,
4966 { &hf_nas_eps_emm_eea0,
4967 { "EEA0","nas_eps.emm.eea0",
4968 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x80,
4971 { &hf_nas_eps_emm_128eea1,
4972 { "128-EEA1","nas_eps.emm.128eea1",
4973 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x40,
4976 { &hf_nas_eps_emm_128eea2,
4977 { "128-EEA2","nas_eps.emm.128eea2",
4978 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x20,
4981 { &hf_nas_eps_emm_eea3,
4982 { "EEA3","nas_eps.emm.eea3",
4983 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x10,
4986 { &hf_nas_eps_emm_eea4,
4987 { "EEA4","nas_eps.emm.eea4",
4988 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x08,
4991 { &hf_nas_eps_emm_eea5,
4992 { "EEA5","nas_eps.emm.eea5",
4993 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x04,
4996 { &hf_nas_eps_emm_eea6,
4997 { "EEA6","nas_eps.emm.eea6",
4998 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x02,
5001 { &hf_nas_eps_emm_eea7,
5002 { "EEA7","nas_eps.emm.eea7",
5003 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x01,
5006 { &hf_nas_eps_emm_eia0,
5007 { "EIA0","nas_eps.emm.eia0",
5008 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x80,
5011 { &hf_nas_eps_emm_128eia1,
5012 { "128-EIA1","nas_eps.emm.128eia1",
5013 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x40,
5016 { &hf_nas_eps_emm_128eia2,
5017 { "128-EIA2","nas_eps.emm.128eia2",
5018 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x20,
5021 { &hf_nas_eps_emm_eia3,
5022 { "EIA3","nas_eps.emm.eia3",
5023 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x10,
5026 { &hf_nas_eps_emm_eia4,
5027 { "EIA4","nas_eps.emm.eia4",
5028 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x08,
5031 { &hf_nas_eps_emm_eia5,
5032 { "EIA5","nas_eps.emm.eia5",
5033 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x04,
5036 { &hf_nas_eps_emm_eia6,
5037 { "EIA6","nas_eps.emm.eia6",
5038 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x02,
5041 { &hf_nas_eps_emm_eia7,
5042 { "EIA7","nas_eps.emm.eia7",
5043 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x01,
5048 { &hf_nas_eps_emm_uea0,
5049 { "UEA0","nas_eps.emm.uea0",
5050 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x80,
5053 { &hf_nas_eps_emm_uea1,
5054 { "UEA1","nas_eps.emm.uea1",
5055 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x40,
5058 { &hf_nas_eps_emm_uea2,
5059 { "UEA2","nas_eps.emm.uea2",
5060 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x20,
5063 { &hf_nas_eps_emm_uea3,
5064 { "UEA3","nas_eps.emm.uea3",
5065 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x10,
5068 { &hf_nas_eps_emm_uea4,
5069 { "UEA4","nas_eps.emm.uea4",
5070 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x08,
5073 { &hf_nas_eps_emm_uea5,
5074 { "UEA5","nas_eps.emm.uea5",
5075 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x04,
5078 { &hf_nas_eps_emm_uea6,
5079 { "UEA6","nas_eps.emm.uea6",
5080 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x02,
5083 { &hf_nas_eps_emm_uea7,
5084 { "UEA7","nas_eps.emm.uea7",
5085 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x01,
5088 { &hf_nas_eps_emm_ucs2_supp,
5089 { "UCS2 support (UCS2)","nas_eps.emm.emm_ucs2_supp",
5090 FT_BOOLEAN, 8, TFS(&nas_eps_emm_ucs2_supp_flg_value), 0x80,
5093 { &hf_nas_eps_emm_uia1,
5094 { "UMTS integrity algorithm UIA1","nas_eps.emm.uia1",
5095 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x40,
5098 { &hf_nas_eps_emm_uia2,
5099 { "UMTS integrity algorithm UIA2","nas_eps.emm.uia2",
5100 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x20,
5103 { &hf_nas_eps_emm_uia3,
5104 { "UMTS integrity algorithm UIA3","nas_eps.emm.uia3",
5105 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x10,
5108 { &hf_nas_eps_emm_uia4,
5109 { "UMTS integrity algorithm UIA4","nas_eps.emm.uia4",
5110 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x08,
5113 { &hf_nas_eps_emm_uia5,
5114 { "UMTS integrity algorithm UIA5","nas_eps.emm.uia5",
5115 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x04,
5118 { &hf_nas_eps_emm_uia6,
5119 { "UMTS integrity algorithm UIA6","nas_eps.emm.uia6",
5120 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x02,
5123 { &hf_nas_eps_emm_uia7,
5124 { "UMTS integrity algorithm UIA7","nas_eps.emm.uia7",
5125 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x01,
5128 { &hf_nas_eps_emm_gea1,
5129 { "GPRS encryption algorithm GEA1","nas_eps.emm.gea1",
5130 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x40,
5133 { &hf_nas_eps_emm_gea2,
5134 { "GPRS encryption algorithm GEA2","nas_eps.emm.gea2",
5135 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x20,
5138 { &hf_nas_eps_emm_gea3,
5139 { "GPRS encryption algorithm GEA3","nas_eps.emm.gea3",
5140 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x10,
5143 { &hf_nas_eps_emm_gea4,
5144 { "GPRS encryption algorithm GEA4","nas_eps.emm.gea4",
5145 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x08,
5148 { &hf_nas_eps_emm_gea5,
5149 { "GPRS encryption algorithm GEA5","nas_eps.emm.gea5",
5150 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x04,
5153 { &hf_nas_eps_emm_gea6,
5154 { "GPRS encryption algorithm GEA6","nas_eps.emm.gea6",
5155 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x02,
5158 { &hf_nas_eps_emm_gea7,
5159 { "GPRS encryption algorithm GEA7","nas_eps.emm.gea7",
5160 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x01,
5163 { &hf_nas_eps_emm_lpp_cap,
5164 { "LPP capability","nas_eps.emm.lpp_cap",
5165 FT_BOOLEAN, 8, TFS(&nas_eps_emm_lpp_cap_flg), 0x08,
5168 { &hf_nas_eps_emm_lcs_cap,
5169 { "LCS capability","nas_eps.emm.lcs_cap",
5170 FT_BOOLEAN, 8, TFS(&nas_eps_emm_lcs_cap_flg), 0x04,
5173 { &hf_nas_eps_emm_1xsrvcc_cap,
5174 { "1xSRVCC capability","nas_eps.emm.1xsrvcc_cap",
5175 FT_BOOLEAN, 8, TFS(&nas_eps_emm_1xsrvcc_cap_flg), 0x02,
5178 { &hf_nas_eps_emm_nf_cap,
5179 { "NF capability","nas_eps.emm.nf_cap",
5180 FT_BOOLEAN, 8, TFS(&nas_eps_emm_nf_cap_flg), 0x01,
5183 { &hf_nas_eps_emm_ue_ra_cap_inf_upd_need_flg,
5184 { "1xSRVCC capability","nas_eps.emm.ue_ra_cap_inf_upd_need_flg",
5185 FT_BOOLEAN, 8, TFS(&nas_eps_emm_ue_ra_cap_inf_upd_need_flg), 0x01,
5188 { &hf_nas_eps_emm_ss_code,
5189 { "SS Code","nas_eps.emm.eps_update_result_value",
5190 FT_UINT8,BASE_DEC, VALS(ssCode_vals), 0x0,
5193 { &hf_nas_eps_emm_lcs_ind,
5194 { "LCS indicator","nas_eps.emm.emm_lcs_ind",
5195 FT_UINT8,BASE_DEC, VALS(nas_eps_emm_lcs_ind_vals), 0x0,
5198 { &hf_nas_eps_emm_gen_msg_cont_type,
5199 { "Container type","nas_eps.emm.gen_msg_cont_type",
5200 FT_UINT8,BASE_DEC, VALS(nas_eps_emm_gen_msg_cont_type_vals), 0x0,
5203 { &hf_nas_eps_emm_apn_ambr_ul,
5204 { "APN-AMBR for uplink","nas_eps.emm.apn_ambr_ul",
5205 FT_UINT8,BASE_DEC, NULL, 0x0,
5208 { &hf_nas_eps_emm_apn_ambr_dl,
5209 { "APN-AMBR for downlink","nas_eps.emm.apn_ambr_dl",
5210 FT_UINT8,BASE_DEC, NULL, 0x0,
5213 { &hf_nas_eps_emm_apn_ambr_ul_ext,
5214 { "APN-AMBR for uplink(Extended)","nas_eps.emm.apn_ambr_ul_ext",
5215 FT_UINT8,BASE_DEC, NULL, 0x0,
5218 { &hf_nas_eps_emm_apn_ambr_dl_ext,
5219 { "APN-AMBR for downlink(Extended)","nas_eps.emm.apn_ambr_dl_ext",
5220 FT_UINT8,BASE_DEC, NULL, 0x0,
5223 { &hf_nas_eps_emm_apn_ambr_ul_ext2,
5224 { "APN-AMBR for uplink(Extended-2)","nas_eps.emm.apn_ambr_ul_ext2",
5225 FT_UINT8,BASE_DEC, NULL, 0x0,
5228 { &hf_nas_eps_emm_apn_ambr_dl_ext2,
5229 { "APN-AMBR for downlink(Extended-2)","nas_eps.emm.apn_ambr_dl_ext2",
5230 FT_UINT8,BASE_DEC, NULL, 0x0,
5233 { &hf_nas_eps_emm_switch_off,
5234 { "Switch off","nas_eps.emm.switch_off",
5235 FT_UINT8,BASE_DEC, VALS(nas_eps_emm_switch_off_vals), 0x0,
5238 { &hf_nas_eps_emm_detach_type_UL,
5239 { "Detach Type","nas_eps.emm.detach_type_ul",
5240 FT_UINT8,BASE_DEC, VALS(nas_eps_emm_type_of_dtatch_UL_vals), 0x0,
5243 { &hf_nas_eps_emm_detach_type_DL,
5244 { "Detach Type","nas_eps.emm.detach_type_dl",
5245 FT_UINT8,BASE_DEC, VALS(nas_eps_emm_type_of_dtatch_DL_vals), 0x0,
5249 { "Quality of Service Class Identifier (QCI)","nas_eps.emm.qci",
5250 FT_UINT8,BASE_DEC, VALS(nas_eps_qci_vals), 0x0,
5253 { &hf_nas_eps_mbr_ul,
5254 { "Maximum bit rate for uplink","nas_eps.emm.mbr_ul",
5255 FT_UINT8,BASE_DEC, NULL, 0x0,
5258 { &hf_nas_eps_mbr_dl,
5259 { "Maximum bit rate for downlink","nas_eps.emm.mbr_dl",
5260 FT_UINT8,BASE_DEC, NULL, 0x0,
5263 { &hf_nas_eps_gbr_ul,
5264 { "Guaranteed bit rate for uplink","nas_eps.emm.gbr_ul",
5265 FT_UINT8,BASE_DEC, NULL, 0x0,
5268 { &hf_nas_eps_gbr_dl,
5269 { "Guaranteed bit rate for downlink","nas_eps.emm.gbr_dl",
5270 FT_UINT8,BASE_DEC, NULL, 0x0,
5273 { &hf_nas_eps_embr_ul,
5274 { "Maximum bit rate for uplink(ext)","nas_eps.emm.embr_ul",
5275 FT_UINT8,BASE_DEC, NULL, 0x0,
5278 { &hf_nas_eps_embr_dl,
5279 { "Maximum bit rate for downlink(ext)","nas_eps.emm.embr_dl",
5280 FT_UINT8,BASE_DEC, NULL, 0x0,
5283 { &hf_nas_eps_egbr_ul,
5284 { "Guaranteed bit rate for uplink(ext)","nas_eps.emm.egbr_ul",
5285 FT_UINT8,BASE_DEC, NULL, 0x0,
5288 { &hf_nas_eps_egbr_dl,
5289 { "Guaranteed bit rate for downlink(ext)","nas_eps.emm.egbr_dl",
5290 FT_UINT8,BASE_DEC, NULL, 0x0,
5293 { &hf_nas_eps_esm_cause,
5294 { "Cause","nas_eps.esm.cause",
5295 FT_UINT8,BASE_DEC, VALS(nas_eps_esm_cause_vals), 0x0,
5298 { &hf_nas_eps_esm_eit,
5299 { "EIT (ESM information transfer)", "nas_eps.emm.eit",
5300 FT_BOOLEAN, 8, TFS(&nas_eps_emm_active_flg_value), 0x01,
5303 { &hf_nas_eps_esm_lnkd_eps_bearer_id,
5304 { "Linked EPS bearer identity","nas_eps.esm.lnkd_eps_bearer_id",
5305 FT_UINT8,BASE_DEC, VALS(nas_eps_esm_linked_bearer_id_vals), 0x0f,
5308 { &hf_nas_eps_esm_notif_ind,
5309 { "Notification indicator value","nas_eps.esm.notif_ind",
5310 FT_UINT8,BASE_DEC, VALS(nas_eps_esm_notif_ind_vals), 0x0,
5313 { &hf_nas_eps_esm_pdn_ipv4,
5314 {"PDN IPv4", "nas_eps.esm.pdn_ipv4",
5315 FT_IPv4, BASE_NONE, NULL, 0x0,
5318 { &hf_nas_eps_esm_pdn_ipv6_if_id,
5319 {"PDN IPv6 if id", "nas_eps.esm.pdn_ipv6_if_id",
5320 FT_BYTES, BASE_NONE, NULL, 0x0,
5323 { &hf_nas_eps_esm_linked_bearer_id,
5324 { "Linked EPS bearer identity","nas_eps.esm.linked_bearer_id",
5325 FT_UINT8,BASE_DEC, VALS(nas_eps_esm_linked_bearer_id_vals), 0x0,
5328 { &hf_nas_eps_active_flg,
5329 { "Active flag", "nas_eps.emm.active_flg",
5330 FT_BOOLEAN, BASE_NONE, TFS(&nas_eps_emm_active_flg_value), 0x0,
5333 { &hf_nas_eps_eps_update_result_value,
5334 { "EPS update result value","nas_eps.emm.eps_update_result_value",
5335 FT_UINT8,BASE_DEC, VALS(nas_eps_emm_eps_update_result_vals), 0x0,
5338 { &hf_nas_eps_eps_update_type_value,
5339 { "EPS update type value", "nas_eps.emm.update_type_value",
5340 FT_UINT8,BASE_DEC, VALS(nas_eps_emm_eps_update_type_vals), 0x0,
5343 { &hf_nas_eps_service_type,
5344 { "Service type", "nas_eps.emm.service_type",
5345 FT_UINT8,BASE_DEC, VALS(nas_eps_service_type_vals), 0x0,
5348 { &hf_nas_eps_nas_msg_cont,
5349 { "NAS message container content", "nas_eps.emm.nas_msg_cont",
5350 FT_BYTES, BASE_NONE, NULL, 0x0,
5353 { &hf_nas_eps_gen_msg_cont,
5354 { "Generic message container content", "nas_eps.emm.gen_msg_cont",
5355 FT_BYTES, BASE_NONE, NULL, 0x0,
5358 { &hf_nas_eps_cmn_add_info,
5359 { "Additional information content", "nas_eps.cmn.add_info",
5360 FT_BYTES, BASE_NONE, NULL, 0x0,
5363 /* ESM hf cvariables */
5364 { &hf_nas_eps_msg_esm_type,
5365 { "NAS EPS session management messages", "nas_eps.nas_msg_esm_type",
5366 FT_UINT8, BASE_HEX, VALS(nas_msg_esm_strings), 0x0,
5369 { &hf_nas_eps_esm_elem_id,
5370 { "Element ID", "nas_eps.esm.elem_id",
5371 FT_UINT8, BASE_DEC, NULL, 0,
5374 { &hf_nas_eps_esm_proc_trans_id,
5375 { "Procedure transaction identity", "nas_eps.esm.proc_trans_id",
5376 FT_UINT8, BASE_DEC, NULL, 0,
5379 { &hf_nas_eps_esm_pdn_type,
5380 { "PDN type", "nas_eps.nas_eps_esm_pdn_type",
5381 FT_UINT8, BASE_DEC, VALS(nas_eps_esm_pdn_type_values), 0x0,
5386 /* Setup protocol subtree array */
5387 #define NUM_INDIVIDUAL_ELEMS 5
5388 gint *ett[NUM_INDIVIDUAL_ELEMS +
5389 NUM_NAS_EPS_COMMON_ELEM +
5390 NUM_NAS_MSG_EMM + NUM_NAS_EMM_ELEM+
5391 NUM_NAS_MSG_ESM + NUM_NAS_ESM_ELEM];
5393 ett[0] = &ett_nas_eps;
5394 ett[1] = &ett_nas_eps_esm_msg_cont;
5395 ett[2] = &ett_nas_eps_nas_msg_cont;
5396 ett[3] = &ett_nas_eps_gen_msg_cont;
5397 ett[4] = &ett_nas_eps_cmn_add_info;
5399 last_offset = NUM_INDIVIDUAL_ELEMS;
5401 for (i=0; i < NUM_NAS_EPS_COMMON_ELEM; i++, last_offset++)
5403 ett_nas_eps_common_elem[i] = -1;
5404 ett[last_offset] = &ett_nas_eps_common_elem[i];
5408 for (i=0; i < NUM_NAS_MSG_EMM; i++, last_offset++)
5410 ett_nas_msg_emm[i] = -1;
5411 ett[last_offset] = &ett_nas_msg_emm[i];
5414 for (i=0; i < NUM_NAS_EMM_ELEM; i++, last_offset++)
5416 ett_nas_eps_emm_elem[i] = -1;
5417 ett[last_offset] = &ett_nas_eps_emm_elem[i];
5420 for (i=0; i < NUM_NAS_MSG_ESM; i++, last_offset++)
5422 ett_nas_msg_esm[i] = -1;
5423 ett[last_offset] = &ett_nas_msg_esm[i];
5426 for (i=0; i < NUM_NAS_ESM_ELEM; i++, last_offset++)
5428 ett_nas_eps_esm_elem[i] = -1;
5429 ett[last_offset] = &ett_nas_eps_esm_elem[i];
5432 /* Register protocol */
5433 proto_nas_eps = proto_register_protocol(PNAME, PSNAME, PFNAME);
5434 /* Register fields and subtrees */
5435 proto_register_field_array(proto_nas_eps, hf, array_length(hf));
5436 proto_register_subtree_array(ett, array_length(ett));
5438 /* Register dissector */
5439 register_dissector(PFNAME, dissect_nas_eps, proto_nas_eps);
5441 /* Register dissector */
5442 register_dissector("nas-eps_plain", dissect_nas_eps_plain, proto_nas_eps);
5446 proto_reg_handoff_nas_eps(void)
5448 gsm_a_dtap_handle = find_dissector("gsm_a_dtap");
5449 lpp_handle = find_dissector("lpp");