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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 * References: 3GPP TS 24.301 V11.5.0 (2012-12)
32 #include <epan/packet.h>
33 #include <epan/asn1.h>
34 #include <epan/prefs.h>
36 #include "packet-gsm_map.h"
37 #include "packet-gsm_a_common.h"
38 #include "packet-e212.h"
39 #include "packet-lcsap.h"
41 #define PNAME "Non-Access-Stratum (NAS)PDU"
42 #define PSNAME "NAS-EPS"
43 #define PFNAME "nas-eps"
45 /* Initialize the protocol and registered fields */
46 static int proto_nas_eps = -1;
48 /* Dissector handles */
49 static dissector_handle_t gsm_a_dtap_handle;
50 static dissector_handle_t lpp_handle;
52 /* Forward declaration */
53 static void disect_nas_eps_esm_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset);
55 static int hf_nas_eps_msg_emm_type = -1;
56 int hf_nas_eps_common_elem_id = -1;
57 int hf_nas_eps_emm_elem_id = -1;
58 static int hf_nas_eps_bearer_id = -1;
59 static int hf_nas_eps_spare_bits = -1;
60 static int hf_nas_eps_security_header_type = -1;
61 static int hf_nas_eps_msg_auth_code = -1;
62 static int hf_nas_eps_seq_no = -1;
63 static int hf_nas_eps_seq_no_short = -1;
64 static int hf_nas_eps_emm_ebi0 = -1;
65 static int hf_nas_eps_emm_ebi1 = -1;
66 static int hf_nas_eps_emm_ebi2 = -1;
67 static int hf_nas_eps_emm_ebi3 = -1;
68 static int hf_nas_eps_emm_ebi4 = -1;
69 static int hf_nas_eps_emm_ebi5 = -1;
70 static int hf_nas_eps_emm_ebi6 = -1;
71 static int hf_nas_eps_emm_ebi7 = -1;
72 static int hf_nas_eps_emm_ebi8 = -1;
73 static int hf_nas_eps_emm_ebi9 = -1;
74 static int hf_nas_eps_emm_ebi10 = -1;
75 static int hf_nas_eps_emm_ebi11 = -1;
76 static int hf_nas_eps_emm_ebi12 = -1;
77 static int hf_nas_eps_emm_ebi13 = -1;
78 static int hf_nas_eps_emm_ebi14 = -1;
79 static int hf_nas_eps_emm_ebi15 = -1;
80 static int hf_nas_eps_emm_dl_nas_cnt = -1;
81 static int hf_nas_eps_emm_nonce_mme = -1;
82 static int hf_nas_eps_emm_nonce = -1;
83 static int hf_nas_eps_emm_paging_id = -1;
84 static int hf_nas_eps_emm_eps_att_type = -1;
85 static int hf_nas_eps_emm_esr_ps = -1;
86 static int hf_nas_eps_emm_cs_lcs = -1;
87 static int hf_nas_eps_emm_epc_lcs = -1;
88 static int hf_nas_eps_emm_emc_bs = -1;
89 static int hf_nas_eps_emm_ims_vops = -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_h245_ash_cap = -1;
155 static int hf_nas_eps_emm_acc_csfb_cap = -1;
156 static int hf_nas_eps_emm_lpp_cap = -1;
157 static int hf_nas_eps_emm_lcs_cap = -1;
158 static int hf_nas_eps_emm_1xsrvcc_cap = -1;
159 static int hf_nas_eps_emm_nf_cap = -1;
160 static int hf_nas_eps_emm_ue_ra_cap_inf_upd_need_flg = -1;
161 static int hf_nas_eps_emm_ss_code = -1;
162 static int hf_nas_eps_emm_lcs_ind = -1;
163 static int hf_nas_eps_emm_gen_msg_cont_type = -1;
164 static int hf_nas_eps_emm_apn_ambr_ul = -1;
165 static int hf_nas_eps_emm_apn_ambr_dl = -1;
166 static int hf_nas_eps_emm_apn_ambr_ul_ext = -1;
167 static int hf_nas_eps_emm_apn_ambr_dl_ext = -1;
168 static int hf_nas_eps_emm_apn_ambr_ul_ext2 = -1;
169 static int hf_nas_eps_emm_apn_ambr_dl_ext2 = -1;
170 static int hf_nas_eps_emm_guti_type = -1;
171 static int hf_nas_eps_emm_switch_off = -1;
172 static int hf_nas_eps_emm_detach_type_UL = -1;
173 static int hf_nas_eps_emm_detach_type_DL = -1;
175 static int hf_nas_eps_qci = -1;
176 static int hf_nas_eps_mbr_ul = -1;
177 static int hf_nas_eps_mbr_dl = -1;
178 static int hf_nas_eps_gbr_ul = -1;
179 static int hf_nas_eps_gbr_dl = -1;
180 static int hf_nas_eps_embr_ul = -1;
181 static int hf_nas_eps_embr_dl = -1;
182 static int hf_nas_eps_egbr_ul = -1;
183 static int hf_nas_eps_egbr_dl = -1;
185 static int hf_nas_eps_esm_cause = -1;
186 static int hf_nas_eps_esm_eit = -1;
187 static int hf_nas_eps_esm_notif_ind = -1;
188 static int hf_nas_eps_esm_pdn_type = -1;
189 static int hf_nas_eps_esm_pdn_ipv4 = -1;
190 static int hf_nas_eps_esm_pdn_ipv6_if_id = -1;
192 static int hf_nas_eps_esm_linked_bearer_id = -1;
194 static int hf_nas_eps_active_flg = -1;
195 static int hf_nas_eps_eps_update_result_value = -1;
196 static int hf_nas_eps_eps_update_type_value = -1;
197 static int hf_nas_eps_service_type = -1;
199 static int hf_nas_eps_nas_msg_cont = -1;
200 static int hf_nas_eps_gen_msg_cont = -1;
202 static int hf_nas_eps_cmn_add_info = -1;
203 static int hf_nas_eps_esm_request_type = -1;
206 static int hf_nas_eps_msg_esm_type = -1;
207 int hf_nas_eps_esm_elem_id = -1;
208 static int hf_nas_eps_esm_proc_trans_id = -1;
210 /* Initialize the subtree pointers */
211 static int ett_nas_eps = -1;
212 static int ett_nas_eps_esm_msg_cont = -1;
213 static int ett_nas_eps_nas_msg_cont = -1;
214 static int ett_nas_eps_gen_msg_cont = -1;
215 static int ett_nas_eps_cmn_add_info = -1;
217 /* Global variables */
218 static packet_info *gpinfo;
219 static gboolean g_nas_eps_dissect_plain = FALSE;
221 guint8 eps_nas_gen_msg_cont_type = 0;
223 /* Table 9.8.1: Message types for EPS mobility management
224 * 0 1 - - - - - - EPS mobility management messages
226 static const value_string nas_msg_emm_strings[] = {
227 { 0x41, "Attach request"},
228 { 0x42, "Attach accept"},
229 { 0x43, "Attach complete"},
230 { 0x44, "Attach reject"},
231 { 0x45, "Detach request"},
232 { 0x46, "Detach accept"},
234 { 0x48, "Tracking area update request"},
235 { 0x49, "Tracking area update accept"},
236 { 0x4a, "Tracking area update complete"},
237 { 0x4b, "Tracking area update reject"},
239 { 0x4c, "Extended service request"},
240 { 0x4e, "Service reject"},
242 { 0x50, "GUTI reallocation command"},
243 { 0x51, "GUTI reallocation complete"},
244 { 0x52, "Authentication request"},
245 { 0x53, "Authentication response"},
246 { 0x54, "Authentication reject"},
247 { 0x55, "Identity request"},
248 { 0x56, "Identity response"},
249 { 0x5c, "Authentication failure"},
250 { 0x5d, "Security mode command"},
251 { 0x5e, "Security mode complete"},
252 { 0x5f, "Security mode reject"},
254 { 0x60, "EMM status"},
255 { 0x61, "EMM information"},
256 { 0x62, "Downlink NAS transport"},
257 { 0x63, "Uplink NAS transport"},
258 { 0x64, "CS Service notification"},
259 { 0x68, "Downlink generic NAS transport"},
260 { 0x69, "Uplink generic NAS transport"},
263 static value_string_ext nas_msg_emm_strings_ext = VALUE_STRING_EXT_INIT(nas_msg_emm_strings);
265 /* Table 9.8.2: Message types for EPS session management */
267 static const value_string nas_msg_esm_strings[] = {
268 { 0xc1, "Activate default EPS bearer context request"},
269 { 0xc2, "Activate default EPS bearer context accept"},
270 { 0xc3, "Activate default EPS bearer context reject"},
271 { 0xc5, "Activate dedicated EPS bearer context request"},
272 { 0xc6, "Activate dedicated EPS bearer context accept"},
273 { 0xc7, "Activate dedicated EPS bearer context reject"},
274 { 0xc9, "Modify EPS bearer context request"},
275 { 0xca, "Modify EPS bearer context accept"},
276 { 0xcb, "Modify EPS bearer context reject"},
277 { 0xcd, "Deactivate EPS bearer context request"},
278 { 0xce, "Deactivate EPS bearer context accept"},
279 { 0xd0, "PDN connectivity request"},
280 { 0xd1, "PDN connectivity reject"},
281 { 0xd2, "PDN disconnect request"},
282 { 0xd3, "PDN disconnect reject"},
283 { 0xd4, "Bearer resource allocation request"},
284 { 0xd5, "Bearer resource allocation reject"},
285 { 0xd6, "Bearer resource modification request"},
286 { 0xd7, "Bearer resource modification reject"},
287 { 0xd9, "ESM information request"},
288 { 0xda, "ESM information response"},
289 { 0xdb, "Notification"},
290 { 0xe8, "ESM status"},
293 static value_string_ext nas_msg_esm_strings_ext = VALUE_STRING_EXT_INIT(nas_msg_esm_strings);
295 static const value_string security_header_type_vals[] = {
296 { 0, "Plain NAS message, not security protected"},
297 { 1, "Integrity protected"},
298 { 2, "Integrity protected and ciphered"},
299 { 3, "Integrity protected with new EPS security context"},
300 { 4, "Integrity protected and ciphered with new EPS security context"},
308 { 12, "Security header for the SERVICE REQUEST message"},
309 { 13, "These values are not used in this version of the protocol."
310 " If received they shall be interpreted as security header for the SERVICE REQUEST message"},
311 { 14, "These values are not used in this version of the protocol."
312 " If received they shall be interpreted as Security header for the SERVICE REQUEST message"},
313 { 15, "These values are not used in this version of the protocol."
314 " If received they shall be interpreted as Security header for the SERVICE REQUEST message"},
317 static value_string_ext security_header_type_vals_ext = VALUE_STRING_EXT_INIT(security_header_type_vals);
321 DE_EPS_CMN_ADD_INFO, /* 9.9.2.0 Additional information */
322 DE_EPS_CMN_DEVICE_PROPERTIES, /* 9.9.2.0A Device properties */
323 DE_EPS_CMN_EPS_BE_CTX_STATUS, /* 9.9.2.1 EPS bearer context status */
324 DE_EPS_CMN_LOC_AREA_ID, /* 9.9.2.2 Location area identification */
325 DE_EPS_CMN_MOB_ID, /* 9.9.2.3 Mobile identity */
326 DE_EPS_MS_CM_2, /* 9.9.2.4 Mobile station classmark 2 */
327 DE_EPS_MS_CM_3, /* 9.9.2.5 Mobile station classmark 3 */
328 DE_EPS_NAS_SEC_PAR_FROM_EUTRA, /* 9.9.2.6 NAS security parameters from E-UTRA */
329 DE_EPS_NAS_SEC_PAR_TO_EUTRA, /* 9.9.2.7 NAS security parameters to E-UTRA */
331 DE_EPS_CMN_PLM_LST, /* 9.9.2.8 PLMN list */
332 DE_EPS_CMN_SUP_CODEC_LST, /* 9.9.2.6 9.9.2.10 Supported codec list */
333 DE_EPS_COMMON_NONE /* NONE */
335 nas_eps_common_elem_idx_t;
337 static const value_string nas_eps_common_elem_strings[] = {
338 { DE_EPS_CMN_ADD_INFO, "Additional information" }, /* 9.9.2.0 Additional information */
339 { DE_EPS_CMN_DEVICE_PROPERTIES, "Device properties" }, /* 9.9.2.0A Device properties */
340 { DE_EPS_CMN_EPS_BE_CTX_STATUS, "EPS bearer context status" }, /* 9.9.2.1 EPS bearer context status */
341 { DE_EPS_CMN_LOC_AREA_ID, "Location area identification" }, /* 9.9.2.2 Location area identification */
342 { DE_EPS_CMN_MOB_ID, "Mobile identity" }, /* 9.9.2.3 Mobile identity */
343 { DE_EPS_MS_CM_2, "Mobile station classmark 2" }, /* 9.9.2.4 Mobile station classmark 2 */
344 { DE_EPS_MS_CM_3, "Mobile station classmark 3" }, /* 9.9.2.5 Mobile station classmark 3 */
345 { DE_EPS_NAS_SEC_PAR_FROM_EUTRA, "NAS security parameters from E-UTRA" },/* 9.9.2.6 NAS security parameters from E-UTRA */
346 { DE_EPS_NAS_SEC_PAR_TO_EUTRA, "NAS security parameters to E-UTRA" }, /* 9.9.2.7 NAS security parameters to E-UTRA */
347 { DE_EPS_CMN_PLM_LST, "PLMN list" }, /* 9.9.2.8 PLMN list */
348 /* 9.9.2.9 Spare half octet */
349 { DE_EPS_CMN_SUP_CODEC_LST, "Supported codec list" }, /* 9.9.2.10 Supported codec list */
352 value_string_ext nas_eps_common_elem_strings_ext = VALUE_STRING_EXT_INIT(nas_eps_common_elem_strings);
354 /* Utility functions */
356 calc_bitrate(guint8 value) {
357 guint16 return_value = value;
359 if ((value > 63) && (value <= 127)) {
360 return_value = 64 + (value - 64) * 8;
362 else if ((value > 127) && (value <= 254)) {
363 return_value = 576 + (value - 128) * 64;
365 else if (value == 0xff) {
371 calc_bitrate_ext(guint8 value) {
372 guint32 return_value = 0;
374 if ((value > 0) && (value <= 0x4a)) {
375 return_value = 8600 + value * 100;
377 else if ((value > 0x4a) && (value <= 0xba)) {
378 return_value = 16 + (value-0x4a);
380 else if ((value > 0xba) && (value <= 0xfa)) {
381 return_value = 128 + (value-0xba)*2;
390 calc_bitrate_ext2(guint8 value) {
391 guint32 return_value = 0;
393 if ((value > 0) && (value <= 0x3d)) {
394 return_value = 256 + value * 4;
396 else if ((value > 0x3d) && (value <= 0xa1)) {
397 return_value = 500 + (value-0x3d) * 10;
399 else if ((value > 0xa1) && (value <= 0xf6)) {
400 return_value = 1500 + (value-0xa1) * 100;
403 return_value = 10000;
409 #define NUM_NAS_EPS_COMMON_ELEM (sizeof(nas_eps_common_elem_strings)/sizeof(value_string))
410 gint ett_nas_eps_common_elem[NUM_NAS_EPS_COMMON_ELEM];
413 * 9.9.2 Common information elements
416 /* 9.9.2.0 Additional information */
418 de_eps_cmn_add_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
419 guint32 offset, guint len,
420 gchar *add_string _U_, int string_len _U_)
423 proto_tree *sub_tree;
426 item = proto_tree_add_item(tree, hf_nas_eps_cmn_add_info, tvb, offset, len, ENC_NA);
427 sub_tree = proto_item_add_subtree(item, ett_nas_eps_cmn_add_info);
429 new_tvb = tvb_new_subset(tvb, offset, len, len);
431 switch (eps_nas_gen_msg_cont_type) {
434 dissect_lcsap_Correlation_ID_PDU(new_tvb, pinfo, sub_tree, NULL);
444 * 9.9.2.1 EPS bearer context status
446 static const true_false_string nas_eps_emm_ebi_vals = {
447 "BEARER CONTEXT-ACTIVE",
448 "BEARER CONTEXT-INACTIVE"
452 de_eps_cmn_eps_be_ctx_status(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
453 guint32 offset, guint len _U_,
454 gchar *add_string _U_, int string_len _U_)
458 curr_offset = offset;
460 /* EBI(7) EBI(6) EBI(5) EBI(4) EBI(3) EBI(2) EBI(1) EBI(0) octet 3 */
461 proto_tree_add_item(tree, hf_nas_eps_emm_ebi7, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
462 proto_tree_add_item(tree, hf_nas_eps_emm_ebi6, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
463 proto_tree_add_item(tree, hf_nas_eps_emm_ebi5, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
464 /* EBI(0) - EBI(4): Bits 0 to 4 of octet 3 are spare and shall be coded as zero. */
465 proto_tree_add_item(tree, hf_nas_eps_emm_ebi4, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
466 proto_tree_add_item(tree, hf_nas_eps_emm_ebi3, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
467 proto_tree_add_item(tree, hf_nas_eps_emm_ebi2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
468 proto_tree_add_item(tree, hf_nas_eps_emm_ebi1, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
469 proto_tree_add_item(tree, hf_nas_eps_emm_ebi0, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
471 /* EBI(15) EBI(14) EBI(13) EBI(12) EBI(11) EBI(10) EBI(9) EBI(8) octet 4 */
472 proto_tree_add_item(tree, hf_nas_eps_emm_ebi15, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
473 proto_tree_add_item(tree, hf_nas_eps_emm_ebi14, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
474 proto_tree_add_item(tree, hf_nas_eps_emm_ebi13, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
475 proto_tree_add_item(tree, hf_nas_eps_emm_ebi12, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
476 proto_tree_add_item(tree, hf_nas_eps_emm_ebi11, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
477 proto_tree_add_item(tree, hf_nas_eps_emm_ebi10, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
478 proto_tree_add_item(tree, hf_nas_eps_emm_ebi9, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
479 proto_tree_add_item(tree, hf_nas_eps_emm_ebi8, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
484 * 9.9.2.2 Location area identification
485 * See subclause 10.5.1.3 in 3GPP TS 24.008 [6].
488 * 9.9.2.3 Mobile identity
489 * See subclause 10.5.1.4 in 3GPP TS 24.008 [6].
490 * exported from gsm_a_common
494 * 9.9.2.4 Mobile station classmark 2
495 * See subclause 10.5.1.6 in 3GPP TS 24.008 [13].
498 * 9.9.2.5 Mobile station classmark 3
499 * See subclause 10.5.1.7 in 3GPP TS 24.008 [13].
503 * 9.9.2.6 NAS security parameters from E-UTRA
506 de_emm_sec_par_from_eutra(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
507 guint32 offset, guint len _U_,
508 gchar *add_string _U_, int string_len _U_)
512 curr_offset = offset;
514 /* DL NAS COUNT value (short) (octet 2, bit 1 to 4)
515 * This field contains the 4 least significant bits of the binary representation of the downlink
516 * NAS COUNT value applicable when this information element is sent.
518 proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, curr_offset<<3, 4, ENC_BIG_ENDIAN);
519 proto_tree_add_item(tree, hf_nas_eps_emm_dl_nas_cnt, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
525 * 9.9.2.7 NAS security parameters to E-UTRA
528 de_emm_sec_par_to_eutra(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
529 guint32 offset, guint len _U_,
530 gchar *add_string _U_, int string_len _U_)
534 curr_offset = offset;
535 /* NonceMME value (octet 1 to 5)
536 * This field is coded as the nonce value in the Nonce information element (see subclause 9.9.3.25).
538 proto_tree_add_item(tree, hf_nas_eps_emm_nonce_mme, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
540 /* type of ciphering algorithm (octet 6, bit 5 to 7)
541 * These fields are coded as the type of integrity protection algorithm and type of ciphering algorithm
542 * in the NAS security algorithms information element (see subclause 9.9.3.23).
543 * Bit 4 and 8 of octet 6 are spare and shall be coded as zero.
545 proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, curr_offset<<3, 1, ENC_BIG_ENDIAN);
546 proto_tree_add_item(tree, hf_nas_eps_emm_toc, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
547 /* Type of integrity protection algorithm (octet 6, bit 1 to 3)*/
548 proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, (curr_offset<<3)+4, 1, ENC_BIG_ENDIAN);
549 proto_tree_add_item(tree, hf_nas_eps_emm_toi, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
552 * NAS key set identifier (octet 7, bit 1 to 3) and
553 * type of security context flag (TSC) (octet 7, bit 4)
554 * These fields are coded as the NAS key set identifier and type of security context flag in the
555 * NAS key set identifier information element (see subclause 9.9.3.21).
556 * Bit 5 to 8 of octet 7 are spare and shall be coded as zero.
558 proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, curr_offset<<3, 4, ENC_BIG_ENDIAN);
559 /* Type of security context flag (TSC) V 1/2 */
560 proto_tree_add_bits_item(tree, hf_nas_eps_tsc, tvb, (curr_offset<<3)+4, 1, ENC_BIG_ENDIAN);
561 /* NAS key set identifier */
562 proto_tree_add_bits_item(tree, hf_nas_eps_emm_nas_key_set_id, tvb, (curr_offset<<3)+5, 3, ENC_BIG_ENDIAN);
569 * See subclause 10.5.1.13 in 3GPP TS 24.008 [6].
572 * 9.9.2.9 Spare half octet
573 * This element is used in the description of EMM and ESM messages when an odd number of
574 * half octet type 1 information elements are used. This element is filled with spare bits
575 * set to zero and is placed in bits 5 to 8 of the octet unless otherwise specified.
580 * 9.9.2.10 Supported codec list
581 * See subclause 10.5.4.32 in 3GPP TS 24.008 [13].
582 * Dissected in packet-gsm_a_dtap.c
585 guint16 (*nas_eps_common_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
586 guint32 offset, guint len,
587 gchar *add_string, int string_len) = {
588 /* 9.9.2 Common information elements */
589 de_eps_cmn_add_info, /* 9.9.2.0 Additional information */
590 NULL, /* 9.9.2.0A Device properties */
591 de_eps_cmn_eps_be_ctx_status, /* 9.9.2.1 EPS bearer context status */
592 de_lai, /* 9.9.2.2 Location area identification */
593 de_mid, /* 9.9.2.3 Mobile identity See subclause 10.5.1.4 in 3GPP TS 24.008*/
594 de_ms_cm_2, /* 9.9.2.4 Mobile station classmark 2 */
595 de_ms_cm_3, /* 9.9.2.5 Mobile station classmark 3 */
596 de_emm_sec_par_from_eutra, /* 9.9.2.6 NAS security parameters from E-UTRA */
597 de_emm_sec_par_to_eutra, /* 9.9.2.7 NAS security parameters to E-UTRA */
599 de_plmn_list, /* 9.9.2.8 PLMN list */
600 NULL, /* 9.9.2.10 Supported codec list (packet-gsm_a_dtap.c) */
604 static const value_string nas_emm_elem_strings[] = {
605 /* 9.9.3 EPS Mobility Management (EMM) information elements */
606 { DE_EMM_ADD_UPD_RES, "Additional update result" }, /* 9.9.3.0A Additional update result */
607 { DE_EMM_ADD_UPD_TYPE, "Additional update type" }, /* 9.9.3.0B Additional update type */
608 { DE_EMM_AUTH_FAIL_PAR, "Authentication failure parameter" }, /* 9.9.3.1 Authentication failure parameter */
609 { DE_EMM_AUTN, "Authentication parameter AUTN" }, /* 9.9.3.2 Authentication parameter AUTN */
610 { DE_EMM_AUTH_PAR_RAND, "Authentication parameter RAND" }, /* 9.9.3.3 Authentication parameter RAND */
611 { DE_EMM_AUTH_RESP_PAR, "Authentication response parameter" }, /* 9.9.3.4 Authentication response parameter */
612 { DE_EMM_CSFB_RESP, "CSFB response" }, /* 9.9.3.5 CSFB response */
613 { DE_EMM_DAYL_SAV_T, "Daylight saving time" }, /* 9.9.3.6 Daylight saving time */
614 { DE_EMM_DET_TYPE, "Detach type" }, /* 9.9.3.7 Detach type */
615 { DE_EMM_DRX_PAR, "DRX parameter" }, /* 9.9.3.8 DRX parameter */
616 { DE_EMM_CAUSE, "EMM cause" }, /* 9.9.3.9 EMM cause */
617 { DE_EMM_ATT_RES, "EPS attach result" }, /* 9.9.3.10 EPS attach result */
618 { DE_EMM_ATT_TYPE, "EPS attach type" }, /* 9.9.3.11 EPS attach type */
619 { DE_EMM_EPS_MID, "EPS mobile identity" }, /* 9.9.3.12 EPS mobile identity */
620 { DE_EMM_EPS_NET_FEATURE_SUP, "EPS network feature support" }, /* 9.9.3.12A EPS network feature support */
621 { DE_EMM_EPS_UPD_RES, "EPS update result" }, /* 9.9.3.13 EPS update result */
622 { DE_EMM_EPS_UPD_TYPE, "EPS update type" }, /* 9.9.3.14 EPS update type */
623 { DE_EMM_ESM_MSG_CONT, "ESM message container" }, /* 9.9.3.15 ESM message conta */
624 { DE_EMM_GPRS_TIMER, "GPRS timer" }, /* 9.9.3.16 GPRS timer ,See subclause 10.5.7.3 in 3GPP TS 24.008 [6]. */
625 { DE_EMM_GPRS_TIMER_2, "GPRS timer 2" }, /* 9.9.3.16A GPRS timer 2, See subclause 10.5.7.4 in 3GPP TS 24.008. */
626 { DE_EMM_GPRS_TIMER_3, "GPRS timer 3" }, /* 9.9.3.16B GPRS timer 3, See subclause 10.5.7.4a in 3GPP TS 24.008. */
627 { DE_EMM_ID_TYPE_2, "Identity type 2" }, /* 9.9.3.17 Identity type 2 ,See subclause 10.5.5.9 in 3GPP TS 24.008 [6]. */
628 { DE_EMM_IMEISV_REQ, "IMEISV request" }, /* 9.9.3.18 IMEISV request ,See subclause 10.5.5.10 in 3GPP TS 24.008 [6]. */
629 { DE_EMM_KSI_AND_SEQ_NO, "KSI and sequence number" }, /* 9.9.3.19 KSI and sequence number */
630 { DE_EMM_MS_NET_CAP, "MS network capability" }, /* 9.9.3.20 MS network capability ,See subclause 10.5.5.12 in 3GPP TS 24.008 [6]. */
631 { DE_EMM_MS_NET_FEAT_SUP, "MS network feature support" }, /* 9.9.3.20A MS network feature support, See subclause 10.5.1.15 in 3GPP TS 24.008. */
632 { DE_EMM_NAS_KEY_SET_ID, "NAS key set identifier" }, /* 9.9.3.21 NAS key set identifier */
633 { DE_EMM_NAS_MSG_CONT, "NAS message container" }, /* 9.9.3.22 NAS message container */
634 { DE_EMM_NAS_SEC_ALGS, "NAS security algorithms" }, /* 9.9.3.23 NAS security algorithms */
635 { DE_EMM_NET_NAME, "Network name" }, /* 9.9.3.24 Network name, See subclause 10.5.3.5a in 3GPP TS 24.008 [6]. */
636 { DE_EMM_NONCE, "Nonce" }, /* 9.9.3.25 Nonce */
637 { DE_EMM_PAGING_ID, "Paging identity" }, /* 9.9.3.25A Paging identity */
638 { DE_EMM_P_TMSI_SIGN, "P-TMSI signature" }, /* 9.9.3.26 P-TMSI signature, See subclause 10.5.5.8 in 3GPP TS 24.008 [6]. */
639 { DE_EMM_SERV_TYPE, "Service type" }, /* 9.9.3.27 Service type ,See subclause 10.5.5.15 in 3GPP TS 24.008 [6]. */
640 { DE_EMM_SHORT_MAC, "Short MAC" }, /* 9.9.3.28 Short MAC */
641 { DE_EMM_TZ, "Time zone" }, /* 9.9.3.29 Time zone, See subclause 10.5.3.8 in 3GPP TS 24.008 [6]. */
642 { DE_EMM_TZ_AND_T, "Time zone and time" }, /* 9.9.3.30 Time zone and time, See subclause 10.5.3.9 in 3GPP TS 24.008 [6]. */
643 { DE_EMM_TMSI_STAT, "TMSI status" }, /* 9.9.3.31 TMSI status, See subclause 10.5.5.4 in 3GPP TS 24.008 [6]. */
644 { DE_EMM_TRAC_AREA_ID, "Tracking area identity" }, /* 9.9.3.32 Tracking area identity */
645 { DE_EMM_TRAC_AREA_ID_LST, "Tracking area identity list" }, /* 9.9.3.33 Tracking area identity list */
646 { DE_EMM_UE_NET_CAP, "UE network capability" }, /* 9.9.3.34 UE network capability */
647 { DE_EMM_UE_RA_CAP_INF_UPD_NEED, "UE radio capability information update needed" },/* 9.9.3.35 UE radio capability information update needed */
648 { DE_EMM_UE_SEC_CAP, "UE security capability" }, /* 9.9.3.36 UE security capability */
649 { DE_EMM_EMERG_NUM_LST, "Emergency Number List" }, /* 9.9.3.37 Emergency Number List */
650 { DE_EMM_CLI, "CLI" }, /* 9.9.3.38 CLI */
651 { DE_EMM_SS_CODE, "SS Code" }, /* 9.9.3.39 SS Code */
652 { DE_EMM_LCS_IND, "LCS indicator" }, /* 9.9.3.40 LCS indicator */
653 { DE_EMM_LCS_CLIENT_ID, "LCS client identity" }, /* 9.9.3.41 LCS client identity */
654 { DE_EMM_GEN_MSG_CONT_TYPE, "Generic message container type" }, /* 9.9.3.42 Generic message container type */
655 { DE_EMM_GEN_MSG_CONT, "Generic message container" }, /* 9.9.3.43 Generic message container */
656 { DE_EMM_VOICE_DMN_PREF, "Voice domain preference and UEs usage setting" },/* 9.9.3.44 Voice domain preference and UEs usage setting */
657 { DE_EMM_GUTI_TYPE, "GUTI type" }, /* 9.9.3.45 GUTI type */
660 value_string_ext nas_emm_elem_strings_ext = VALUE_STRING_EXT_INIT(nas_emm_elem_strings);
662 #define NUM_NAS_EMM_ELEM (sizeof(nas_emm_elem_strings)/sizeof(value_string))
663 gint ett_nas_eps_emm_elem[NUM_NAS_EMM_ELEM];
666 /* This enum has been moved to packet-gsm_a_common to
667 make it possible to use element dissection from this dissector
669 It is left here as a comment for easier reference.
672 Note this enum must be of the same size as the element decoding list
676 /* 9.9.3 EPS Mobility Management (EMM) information elements */
677 DE_EMM_ADD_UPD_RES, /* 9.9.3.0A Additional update result */
678 DE_EMM_ADD_UPD_TYPE, /* 9.9.3.0B Additional update type */
679 DE_EMM_AUTH_FAIL_PAR, /* 9.9.3.1 Authentication failure parameter (dissected in packet-gsm_a_dtap.c)*/
680 DE_EMM_AUTN, /* 9.9.3.2 Authentication parameter AUTN */
681 DE_EMM_AUTH_PAR_RAND, /* 9.9.3.3 Authentication parameter RAND */
682 DE_EMM_AUTH_RESP_PAR, /* 9.9.3.4 Authentication response parameter */
683 DE_EMM_CSFB_RESP, /* 9.9.3.5 CSFB response */
684 DE_EMM_DAYL_SAV_T, /* 9.9.3.6 Daylight saving time */
685 DE_EMM_DET_TYPE, /* 9.9.3.7 Detach type */
686 DE_EMM_DRX_PAR, /* 9.9.3.8 DRX parameter (dissected in packet-gsm_a_gm.c)*/
687 DE_EMM_CAUSE, /* 9.9.3.9 EMM cause */
688 DE_EMM_ATT_RES, /* 9.9.3.10 EPS attach result (Coded inline */
689 DE_EMM_ATT_TYPE, /* 9.9.3.11 EPS attach type (Coded Inline)*/
690 DE_EMM_EPS_MID, /* 9.9.3.12 EPS mobile identity */
691 DE_EMM_EPS_NET_FEATURE_SUP, /* 9.9.3.12A EPS network feature support */
692 DE_EMM_EPS_UPD_RES, /* 9.9.3.13 EPS update result ( Coded inline)*/
693 DE_EMM_EPS_UPD_TYPE, /* 9.9.3.14 EPS update type */
694 DE_EMM_ESM_MSG_CONT, /* 9.9.3.15 ESM message conta */
695 DE_EMM_GPRS_TIMER, /* 9.9.3.16 GPRS timer ,See subclause 10.5.7.3 in 3GPP TS 24.008 [6]. */
696 DE_EMM_GPRS_TIMER_2, /* 9.9.3.16A GPRS timer 2, See subclause 10.5.7.4 in 3GPP TS 24.008. */
697 DE_EMM_GPRS_TIMER_3, /* 9.9.3.16B GPRS timer 3, See subclause 10.5.7.4a in 3GPP TS 24.008. */
698 DE_EMM_ID_TYPE_2, /* 9.9.3.17 Identity type 2 ,See subclause 10.5.5.9 in 3GPP TS 24.008 [6]. */
699 DE_EMM_IMEISV_REQ, /* 9.9.3.18 IMEISV request ,See subclause 10.5.5.10 in 3GPP TS 24.008 [6]. */
700 DE_EMM_KSI_AND_SEQ_NO, /* 9.9.3.19 KSI and sequence number */
701 DE_EMM_MS_NET_CAP, /* 9.9.3.20 MS network capability ,See subclause 10.5.5.12 in 3GPP TS 24.008 [6]. */
702 DE_EMM_MS_NET_FEAT_SUP, /* 9.9.3.20A MS network feature support, See subclause 10.5.1.15 in 3GPP TS 24.008. */
703 DE_EMM_NAS_KEY_SET_ID, /* 9.9.3.21 NAS key set identifier (coded inline)*/
704 DE_EMM_NAS_MSG_CONT, /* 9.9.3.22 NAS message container */
705 DE_EMM_NAS_SEC_ALGS, /* 9.9.3.23 NAS security algorithms */
706 DE_EMM_NET_NAME, /* 9.9.3.24 Network name, See subclause 10.5.3.5a in 3GPP TS 24.008 [6]. */
707 DE_EMM_NONCE, /* 9.9.3.25 Nonce */
708 DE_EMM_PAGING_ID, /* 9.9.3.25A Paging identity */
709 DE_EMM_P_TMSI_SIGN, /* 9.9.3.26 P-TMSI signature, See subclause 10.5.5.8 in 3GPP TS 24.008 [6]. */
710 DE_EMM_SERV_TYPE, /* 9.9.3.27 Service type */
711 DE_EMM_SHORT_MAC, /* 9.9.3.28 Short MAC */
712 DE_EMM_TZ, /* 9.9.3.29 Time zone, See subclause 10.5.3.8 in 3GPP TS 24.008 [6]. */
713 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]. */
714 DE_EMM_TMSI_STAT, /* 9.9.3.31 TMSI status, See subclause 10.5.5.4 in 3GPP TS 24.008 [6]. */
715 DE_EMM_TRAC_AREA_ID, /* 9.9.3.32 Tracking area identity */
716 DE_EMM_TRAC_AREA_ID_LST, /* 9.9.3.33 Tracking area identity list */
717 DE_EMM_UE_NET_CAP, /* 9.9.3.34 UE network capability */
718 DE_EMM_UE_RA_CAP_INF_UPD_NEED, /* 9.9.3.35 UE radio capability information update needed */
719 DE_EMM_UE_SEC_CAP, /* 9.9.3.36 UE security capability */
720 DE_EMM_EMERG_NUM_LST, /* 9.9.3.37 Emergency Number List */
721 DE_EMM_CLI, /* 9.9.3.38 CLI */
722 DE_EMM_SS_CODE, /* 9.9.3.39 SS Code */
723 DE_EMM_LCS_IND, /* 9.9.3.40 LCS indicator */
724 DE_EMM_LCS_CLIENT_ID, /* 9.9.3.41 LCS client identity */
725 DE_EMM_GEN_MSG_CONT_TYPE, /* 9.9.3.42 Generic message container type */
726 DE_EMM_GEN_MSG_CONT, /* 9.9.3.43 Generic message container */
727 DE_EMM_VOICE_DMN_PREF, /* 9.9.3.44 Voice domain preference and UEs usage setting */
728 DE_EMM_GUTI_TYPE, /* 9.9.3.45 GUTI type */
729 DE_EMM_NONE /* NONE */
734 /* TODO: Update to latest spec */
735 /* 9.9.3 EPS Mobility Management (EMM) information elements
738 * 9.9.3.0A Additional update result
740 static const value_string nas_eps_emm_add_upd_res_vals[] = {
741 { 0x0, "no additional information"},
742 { 0x1, "CS Fallback not preferred"},
748 de_emm_add_upd_res(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
749 guint32 offset, guint len _U_,
750 gchar *add_string _U_, int string_len _U_)
752 guint32 curr_offset, bit_offset;
754 curr_offset = offset;
755 bit_offset = (curr_offset<<3)+4;
757 proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
759 proto_tree_add_bits_item(tree, hf_nas_eps_emm_add_upd_res, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
762 return (curr_offset - offset);
765 * 9.9.3.0B Additional update type
767 static const value_string nas_eps_emm_add_upd_type_vals[] = {
768 { 0x0, "no additional information (shall be interpreted as request for"
769 " combined attach or combined tracking area updating)"},
774 de_emm_add_upd_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
775 guint32 offset, guint len _U_,
776 gchar *add_string _U_, int string_len _U_)
778 guint32 curr_offset, bit_offset;
780 curr_offset = offset;
781 bit_offset = (curr_offset<<3)+4;
783 proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
785 proto_tree_add_bits_item(tree, hf_nas_eps_emm_add_upd_type, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
788 return (curr_offset - offset);
791 * 9.9.3.1 Authentication failure parameter
792 * See subclause 10.5.3.2.2 in 3GPP TS 24.008 [6].
793 * (dissected in packet-gsm_a_dtap.c)
796 * 9.9.3.2 Authentication parameter AUTN
797 * See subclause 10.5.3.1.1 in 3GPP TS 24.008 [6].
800 * 9.9.3.3 Authentication parameter RAND
801 * See subclause 10.5.3.1 in 3GPP TS 24.008 [6].
804 * 9.9.3.4 Authentication response parameter
807 de_emm_auth_resp_par(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
808 guint32 offset, guint len _U_,
809 gchar *add_string _U_, int string_len _U_)
813 curr_offset = offset;
815 proto_tree_add_item(tree, hf_nas_eps_emm_res, tvb, curr_offset, len, ENC_NA);
820 * 9.9.3.4A Ciphering key sequence number
821 * See subclause 9.9.3.19 in 3GPP TS 24.008 [13].
825 * 9.9.3.5 CSFB response
829 * CSFB response value (octet 1)
832 static const value_string nas_eps_emm_csfb_resp_vals[] = {
833 { 0x0, "CS fallback rejected by the UE"},
834 { 0x1, "CS fallback accepted by the UE"},
839 de_emm_csfb_resp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
840 guint32 offset, guint len _U_,
841 gchar *add_string _U_, int string_len _U_)
843 guint32 curr_offset, bit_offset;
845 curr_offset = offset;
848 bit_offset = curr_offset<<3;
849 proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, bit_offset+4, 1, ENC_BIG_ENDIAN);
851 proto_tree_add_item(tree, hf_nas_eps_emm_csfb_resp, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
854 return(curr_offset-offset);
857 * 9.9.3.6 Daylight saving time
858 * See subclause 10.5.3.12 in 3GPP TS 24.008 [6].
861 * 9.9.3.7 Detach type
864 static const value_string nas_eps_emm_switch_off_vals[] = {
865 { 0x0, "Normal detach"},
866 { 0x1, "Switch off"},
875 /* Type of detach (octet 1)
876 * In the UE to network direction:
878 static const value_string nas_eps_emm_type_of_dtatch_UL_vals[] = {
879 { 0x1, "EPS detach"},
880 { 0x2, "IMSI detach"},
881 { 0x3, "Combined EPS/IMSI detach"},
882 { 0x4, "Combined EPS/IMSI detach"}, /* All other values are interpreted as
883 "combined EPS/IMSI detach" in this version of the protocol.*/
884 { 0x5, "Combined EPS/IMSI detach"}, /* -"- */
891 * In the network to UE direction:
894 static const value_string nas_eps_emm_type_of_dtatch_DL_vals[] = {
895 { 0x1, "Re-attach required"},
896 { 0x2, "Re-attach not required"},
897 { 0x3, "IMSI detach"},
898 { 0x4, "Re-attach not required"}, /* All other values are interpreted as
899 "re-attach not required" in this version of the protocol.*/
900 { 0x5, "Re-attach not required"}, /* -"- */
907 * 9.9.3.8 DRX parameter
908 * See subclause 10.5.5.6 in 3GPP TS 24.008 [13].
913 static const value_string nas_eps_emm_cause_values[] = {
914 { 0x2, "IMSI unknown in HSS"},
915 { 0x3, "Illegal UE"},
916 { 0x5, "IMEI not accepted"},
917 { 0x6, "Illegal ME"},
918 { 0x7, "EPS services not allowed"},
919 { 0x8, "EPS services and non-EPS services not allowed"},
920 { 0x9, "UE identity cannot be derived by the network"},
921 { 0xa, "Implicitly detached"},
922 { 0xb, "PLMN not allowed"},
923 { 0xc, "Tracking Area not allowed"},
924 { 0xd, "Roaming not allowed in this tracking area"},
925 { 0xe, "EPS services not allowed in this PLMN"},
926 { 0xf, "No Suitable Cells In tracking area"},
927 { 0x10, "MSC temporarily not reachable"},
928 { 0x11, "Network failure"},
929 { 0x12, "CS domain not available"},
930 { 0x13, "ESM failure"},
931 { 0x14, "MAC failure"},
932 { 0x15, "Synch failure"},
933 { 0x16, "Congestion"},
934 { 0x17, "UE security capabilities mismatch"},
935 { 0x18, "Security mode rejected, unspecified"},
936 { 0x19, "Not authorized for this CSG"},
937 { 0x1a, "Non-EPS authentication unacceptable"},
938 { 0x23, "Requested service option not authorized in this PLMN"},
939 { 0x27, "CS service temporarily not available"},
940 { 0x28, "No EPS bearer context activated"},
941 { 0x2a, "Severe network failure"},
942 { 0x5f, "Semantically incorrect message"},
943 { 0x60, "Invalid mandatory information"},
944 { 0x61, "Message type non-existent or not implemented"},
945 { 0x62, "Message type not compatible with the protocol state"},
946 { 0x63, "Information element non-existent or not implemented"},
947 { 0x64, "Conditional IE error"},
948 { 0x65, "Message not compatible with the protocol state"},
949 { 0x6f, "Protocol error, unspecified"},
952 static value_string_ext nas_eps_emm_cause_values_ext = VALUE_STRING_EXT_INIT(nas_eps_emm_cause_values);
955 de_emm_cause(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
956 guint32 offset, guint len _U_,
957 gchar *add_string _U_, int string_len _U_)
961 curr_offset = offset;
963 proto_tree_add_item(tree, hf_nas_eps_emm_cause, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
966 return curr_offset-offset;}
968 * 9.9.3.10 EPS attach result
971 static const value_string nas_eps_emm_EPS_attach_result_values[] = {
974 { 2, "Combined EPS/IMSI attach"},
985 * 9.9.3.11 EPS attach type
988 static const value_string nas_eps_emm_eps_att_type_vals[] = {
989 { 0, "EPS attach(unused)"},
991 { 2, "Combined EPS/IMSI attach"},
992 { 3, "EPS attach(unused)"},
993 { 4, "EPS attach(unused)"},
994 { 5, "EPS attach(unused)"},
995 { 6, "EPS emergency attach"},
1002 * 9.9.3.12 EPS mobile identity
1005 unpack_eps_mid_digits(tvbuff_t *tvb) {
1013 length = tvb_length(tvb);
1015 digit_str = ep_alloc(length*2);
1017 /* Get identity digit 1 */
1018 octet = tvb_get_guint8(tvb,offset);
1019 digit_str[i++] = (((octet>>4) & 0x0f) + '0');
1022 /* Loop on following octets to retrieve other identity digits */
1023 while ( offset < length ) {
1025 octet = tvb_get_guint8(tvb,offset);
1026 digit_str[i] = ((octet & 0x0f) + '0');
1030 * unpack second value in byte
1034 if (octet == 0x0f) /* odd number bytes - hit filler */
1037 digit_str[i] = ((octet & 0x0f) + '0');
1046 static const value_string nas_eps_emm_type_of_id_vals[] = {
1058 de_emm_eps_mid(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
1059 guint32 offset, guint len _U_,
1060 gchar *add_string _U_, int string_len _U_)
1062 guint32 curr_offset;
1067 curr_offset = offset;
1069 octet = tvb_get_guint8(tvb,offset);
1070 /* Type of identity (octet 3) */
1071 proto_tree_add_item(tree, hf_nas_eps_emm_odd_even, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1072 proto_tree_add_item(tree, hf_nas_eps_emm_type_of_id, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1073 switch (octet&0x7) {
1076 new_tvb = tvb_new_subset(tvb, curr_offset, len, len );
1077 digit_str = unpack_eps_mid_digits(new_tvb);
1078 proto_tree_add_string(tree, hf_nas_eps_emm_imsi, new_tvb, 0, -1, digit_str);
1082 new_tvb = tvb_new_subset(tvb, curr_offset, len, len );
1083 digit_str = unpack_eps_mid_digits(new_tvb);
1084 proto_tree_add_string(tree, hf_nas_eps_emm_imei, new_tvb, 0, -1, digit_str);
1089 curr_offset = dissect_e212_mcc_mnc(tvb, gpinfo, tree, curr_offset, TRUE);
1090 /* MME Group ID octet 7 - 8 */
1091 proto_tree_add_item(tree, hf_nas_eps_emm_mme_grp_id, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
1093 /* MME Code Octet 9 */
1094 proto_tree_add_item(tree, hf_nas_eps_emm_mme_code, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1096 /* M-TMSI Octet 10 - 13 */
1097 proto_tree_add_item(tree, hf_nas_eps_emm_m_tmsi, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
1101 proto_tree_add_text(tree, tvb, curr_offset, len - 1, "Type of identity not known");
1109 * 9.9.3.12A EPS network feature support
1111 static const true_false_string nas_eps_emm_esr_ps_value = {
1112 "network supports use of EXTENDED SERVICE REQUEST to request for packet services",
1113 "network does not support use of EXTENDED SERVICE REQUEST to request for packet services"
1115 static const value_string nas_eps_emm_cs_lcs_vals[] = {
1116 { 0, "no information about support of location services via CS domain is available"},
1117 { 1, "location services via CS domain not supported"},
1118 { 2, "location services via CS domain supported"},
1122 static const true_false_string nas_eps_emm_epc_lcs_value = {
1123 "location services via EPC supported",
1124 "location services via EPC not supported"
1126 static const true_false_string nas_eps_emm_emc_bs_value = {
1127 "emergency bearer services in S1 mode supported",
1128 "emergency bearer services in S1 mode not supported"
1130 static const true_false_string nas_eps_emm_ims_vops_value = {
1131 "IMS voice over PS session in S1 mode supported",
1132 "IMS voice over PS session in S1 mode not supported"
1136 de_emm_eps_net_feature_sup(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
1137 guint32 offset, guint len _U_,
1138 gchar *add_string _U_, int string_len _U_)
1140 guint32 curr_offset, bit_offset;
1142 curr_offset = offset;
1143 bit_offset = curr_offset << 3;
1144 proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
1146 proto_tree_add_bits_item(tree, hf_nas_eps_emm_esr_ps, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
1148 proto_tree_add_bits_item(tree, hf_nas_eps_emm_cs_lcs, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
1150 proto_tree_add_bits_item(tree, hf_nas_eps_emm_epc_lcs, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
1152 proto_tree_add_bits_item(tree, hf_nas_eps_emm_emc_bs, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
1154 proto_tree_add_bits_item(tree, hf_nas_eps_emm_ims_vops, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
1155 /*bit_offset += 1;*/
1160 * 9.9.3.13 EPS update result
1162 static const value_string nas_eps_emm_eps_update_result_vals[] = {
1164 { 1, "Combined TA/LA updated"},
1167 { 4, "TA updated and ISR activated"},
1168 { 5, "Combined TA/LA updated and ISR activated"},
1175 * 9.9.3.14 EPS update type
1177 static const true_false_string nas_eps_emm_active_flg_value = {
1178 "Bearer establishment requested",
1179 "No bearer establishment requested"
1182 static const value_string nas_eps_emm_eps_update_type_vals[] = {
1183 { 0, "TA updating"},
1184 { 1, "Combined TA/LA updating"},
1185 { 2, "Combined TA/LA updating with IMSI attach"},
1186 { 3, "Periodic updating"},
1187 { 4, "Unused; shall be interpreted as 'TA updating', if received by the network"},
1188 { 5, "Unused; shall be interpreted as 'TA updating', if received by the network"},
1195 * 9.9.3.15 ESM message container
1198 de_emm_esm_msg_cont(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
1199 guint32 offset, guint len,
1200 gchar *add_string _U_, int string_len _U_)
1203 proto_tree *sub_tree;
1205 guint32 curr_offset;
1207 curr_offset = offset;
1210 item = proto_tree_add_item(tree, hf_nas_eps_esm_msg_cont, tvb, curr_offset, len, ENC_NA);
1211 sub_tree = proto_item_add_subtree(item, ett_nas_eps_esm_msg_cont);
1213 /* This IE can contain any ESM PDU as defined in subclause 8.3. */
1214 new_tvb = tvb_new_subset(tvb, curr_offset, len, len );
1215 /* Plain NAS message */
1216 disect_nas_eps_esm_msg(new_tvb, gpinfo, sub_tree, 0/* offset */);
1221 * 9.9.3.16 GPRS timer
1222 * See subclause 10.5.7.3 in 3GPP TS 24.008 [6].
1226 * 9.9.3.16A GPRS timer 2
1227 * See subclause 10.5.7.4 in 3GPP TS 24.008.
1231 * 9.9.3.16B GPRS timer 3
1232 * See subclause 10.5.7.4a in 3GPP TS 24.008.
1236 * 9.9.3.17 Identity type 2
1237 * See subclause 10.5.5.9 in 3GPP TS 24.008 [6].
1239 static const value_string nas_eps_emm_id_type2_vals[] = {
1248 * 9.9.3.18 IMEISV request
1249 * See subclause 10.5.5.10 in 3GPP TS 24.008 [6].
1251 /* IMEISV request value (octet 1) */
1252 static const value_string nas_eps_emm_imeisv_req_vals[] = {
1253 { 0, "IMEISV not requested"},
1254 { 1, "IMEISV requested"},
1255 { 2, "IMEISV not requested"},
1256 { 3, "IMEISV not requested"},
1257 { 4, "IMEISV not requested"},
1258 { 5, "IMEISV not requested"},
1259 { 6, "IMEISV not requested"},
1260 { 7, "IMEISV not requested"},
1264 de_emm_nas_imeisv_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
1265 guint32 offset, guint len _U_,
1266 gchar *add_string _U_, int string_len _U_)
1268 guint32 curr_offset;
1271 curr_offset = offset;
1273 bit_offset = curr_offset<<3;
1275 proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
1276 proto_tree_add_item(tree, hf_nas_eps_esm_imeisv_req, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1279 return(curr_offset - offset);
1282 * 9.9.3.19 KSI and sequence number
1285 de_emm_nas_ksi_and_seq_no(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
1286 guint32 offset, guint len _U_,
1287 gchar *add_string _U_, int string_len _U_)
1289 guint32 curr_offset;
1292 curr_offset = offset;
1293 bit_offset = curr_offset<<3;
1295 proto_tree_add_bits_item(tree, hf_nas_eps_emm_nas_key_set_id, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
1297 proto_tree_add_bits_item(tree, hf_nas_eps_seq_no_short, tvb, bit_offset, 5, ENC_BIG_ENDIAN);
1300 return(curr_offset - offset);
1304 * 9.9.3.20 MS network capability
1305 * See subclause 10.5.5.12 in 3GPP TS 24.008 [6].
1309 * 9.9.3.20A MS network feature support
1310 * See subclause 10.5.1.15 in 3GPP TS 24.008.
1314 * 9.9.3.21 NAS key set identifier
1317 * Type of security context flag (TSC) (octet 1)
1319 static const true_false_string nas_eps_tsc_value = {
1320 "Mapped security context (for KSIsgsn)",
1321 "Native security context (for KSIasme)"
1324 /* NAS key set identifier (octet 1) Bits 3 2 1 */
1326 static const value_string nas_eps_emm_NAS_key_set_identifier_vals[] = {
1334 { 7, "No key is available"},
1338 /* Takes bit offset as input and consumes 4 bits */
1340 de_emm_nas_key_set_id_bits(tvbuff_t *tvb, proto_tree *tree, guint32 bit_offset, const gchar *add_string)
1344 /* Type of security context flag (TSC) (octet 1) V 1/2 */
1345 proto_tree_add_bits_item(tree, hf_nas_eps_tsc, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
1347 /* NAS key set identifier (octet 1) */
1348 item = proto_tree_add_bits_item(tree, hf_nas_eps_emm_nas_key_set_id, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
1350 proto_item_append_text(item, "%s", add_string);
1355 * Note used for TV Short
1358 de_emm_nas_key_set_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
1359 guint32 offset, guint len _U_,
1360 gchar *add_string _U_, int string_len _U_)
1362 guint32 curr_offset, bit_offset;
1364 curr_offset = offset;
1366 /* Get the bit offset of the lover half of the octet bits 4 - 1 */
1367 bit_offset = curr_offset<<3;
1370 /* Type of security context flag (TSC) (octet 1) V 1/2 */
1371 proto_tree_add_bits_item(tree, hf_nas_eps_tsc, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
1373 /* NAS key set identifier (octet 1) */
1374 proto_tree_add_bits_item(tree, hf_nas_eps_emm_nas_key_set_id, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
1378 return(curr_offset - offset);
1382 * 9.9.3.22 NAS message container
1385 de_emm_nas_msg_cont(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
1386 guint32 offset, guint len _U_,
1387 gchar *add_string _U_, int string_len _U_)
1390 proto_tree *sub_tree;
1392 guint32 curr_offset;
1394 curr_offset = offset;
1396 /* NAS message container contents (octet 3 to octet n)
1397 * This IE can contain an SMS message (i.e. CP-DATA, CP-ACK or CP-ERROR)
1398 * as defined in subclause 7.2 in 3GPP TS 24.011 [13A].
1401 item = proto_tree_add_item(tree, hf_nas_eps_nas_msg_cont, tvb, curr_offset, len, ENC_NA);
1402 sub_tree = proto_item_add_subtree(item, ett_nas_eps_nas_msg_cont);
1404 new_tvb = tvb_new_subset(tvb, curr_offset, len, len );
1405 if (gsm_a_dtap_handle)
1406 call_dissector(gsm_a_dtap_handle, new_tvb, gpinfo, sub_tree);
1411 * 9.9.3.23 NAS security algorithms
1413 /* Type of integrity protection algorithm (octet 2, bit 1 to 3) */
1414 static const value_string nas_eps_emm_toi_vals[] = {
1415 { 0, "EPS integrity algorithm EIA0 (null integrity protection algorithm)"},
1416 { 1, "EPS integrity algorithm 128-EIA1"},
1417 { 2, "EPS integrity algorithm 128-EIA2"},
1418 { 3, "EPS integrity algorithm 128-EIA3"},
1419 { 4, "EPS integrity algorithm EIA4"},
1420 { 5, "EPS integrity algorithm EIA5"},
1421 { 6, "EPS integrity algorithm EIA6"},
1422 { 7, "EPS integrity algorithm EIA7"},
1426 /* Type of ciphering algorithm (octet 2, bit 5 to 7) */
1428 static const value_string nas_eps_emm_toc_vals[] = {
1429 { 0, "EPS encryption algorithm EEA0 (null ciphering algorithm)"},
1430 { 1, "EPS encryption algorithm 128-EEA1"},
1431 { 2, "EPS encryption algorithm 128-EEA2"},
1432 { 3, "EPS encryption algorithm 128-EEA3"},
1433 { 4, "EPS encryption algorithm EEA4"},
1434 { 5, "EPS encryption algorithm EEA5"},
1435 { 6, "EPS encryption algorithm EEA6"},
1436 { 7, "EPS encryption algorithm EEA7"},
1440 de_emm_nas_sec_alsgs(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
1441 guint32 offset, guint len _U_,
1442 gchar *add_string _U_, int string_len _U_)
1445 guint32 curr_offset;
1447 curr_offset = offset;
1449 bit_offset = offset<<3;
1450 /* Bit 4 and 8 of octet 2 are spare and shall be coded as zero. */
1451 proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
1452 /* Type of ciphering algorithm (octet 2, bit 5 to 7) */
1453 proto_tree_add_item(tree, hf_nas_eps_emm_toc, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1455 /* Bit 4 and 8 of octet 2 are spare and shall be coded as zero. */
1456 proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
1457 /* Type of integrity protection algorithm (octet 2, bit 1 to 3) */
1458 proto_tree_add_item(tree, hf_nas_eps_emm_toi, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1462 return(curr_offset-offset);
1465 * 9.9.3.24 Network name
1466 * See subclause 10.5.3.5a in 3GPP TS 24.008 [6].
1472 de_emm_nonce(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
1473 guint32 offset, guint len _U_,
1474 gchar *add_string _U_, int string_len _U_)
1476 guint32 curr_offset;
1478 curr_offset = offset;
1480 proto_tree_add_item(tree, hf_nas_eps_emm_nonce, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
1483 return(curr_offset-offset);
1486 * 9.9.3.25A Paging identity
1488 static const true_false_string nas_eps_emm_paging_id_vals = {
1494 de_emm_paging_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
1495 guint32 offset, guint len _U_,
1496 gchar *add_string _U_, int string_len _U_)
1498 guint32 curr_offset;
1500 curr_offset = offset;
1502 proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, curr_offset<<3, 7, ENC_BIG_ENDIAN);
1503 proto_tree_add_bits_item(tree, hf_nas_eps_emm_paging_id, tvb, (curr_offset<<3)+7, 1, ENC_BIG_ENDIAN);
1504 /*curr_offset+=len;*/
1509 * 9.9.3.26 P-TMSI signature
1510 * See subclause 10.5.5.8 in 3GPP TS 24.008 [6].
1513 * 9.9.3.27 Service type
1515 static const range_string nas_eps_service_type_vals[] = {
1516 { 0, 0, "Mobile originating CS fallback or 1xCS fallback"},
1517 { 1, 1, "Mobile terminating CS fallback or 1xCS fallback"},
1518 { 2, 2, "Mobile originating CS fallback emergency call or 1xCS fallback emergency call"},
1519 { 3, 4, "Mobile originating CS fallback or 1xCS fallback"},
1520 { 8, 11, "packet services via S1"},
1525 * 9.9.3.28 Short MAC
1528 de_emm_nas_short_mac(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
1529 guint32 offset, guint len _U_,
1530 gchar *add_string _U_, int string_len _U_)
1532 guint32 curr_offset;
1534 curr_offset = offset;
1537 proto_tree_add_item(tree, hf_nas_eps_emm_short_mac, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
1540 return(curr_offset-offset);
1543 * 9.9.3.29 Time zone
1544 * See subclause 10.5.3.8 in 3GPP TS 24.008 [6].
1547 * 9.9.3.30 Time zone and time
1548 * See subclause 10.5.3.9 in 3GPP TS 24.008 [6].
1551 * 9.9.3.31 TMSI status
1552 * See subclause 10.5.5.4 in 3GPP TS 24.008 [6].
1555 * 9.9.3.32 Tracking area identity
1559 de_emm_trac_area_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
1560 guint32 offset, guint len _U_,
1561 gchar *add_string _U_, int string_len _U_)
1563 guint32 curr_offset;
1565 curr_offset = offset;
1567 curr_offset = dissect_e212_mcc_mnc(tvb, gpinfo, tree, curr_offset, TRUE);
1568 proto_tree_add_item(tree, hf_nas_eps_emm_tai_tac, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
1571 return(curr_offset-offset);
1574 * 9.9.3.33 Tracking area identity list
1576 /* Type of list (octet 1)
1579 static const value_string nas_eps_emm_tai_tol_vals[] = {
1580 { 0, "list of TACs belonging to one PLMN, with non-consecutive TAC values"},
1581 { 1, "list of TACs belonging to one PLMN, with consecutive TAC values"},
1582 { 2, "list of TAIs belonging to different PLMNs"},
1587 de_emm_trac_area_id_lst(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
1588 guint32 offset, guint len _U_,
1589 gchar *add_string _U_, int string_len _U_)
1592 guint32 curr_offset;
1593 guint8 octet, tol, n_elem;
1596 curr_offset = offset;
1598 proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, curr_offset<<3, 1, ENC_BIG_ENDIAN);
1599 /* Type of list (octet 1) Bits 7 6 */
1600 proto_tree_add_item(tree, hf_nas_eps_emm_tai_tol, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1601 /* Number of elements (octet 1) Bits 5 4 3 2 1 */
1602 octet = tvb_get_guint8(tvb,curr_offset)& 0x7f;
1604 n_elem = (octet & 0x1f)+1;
1605 item = proto_tree_add_item(tree, hf_nas_eps_emm_tai_n_elem, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1607 proto_item_append_text(item, " [+1 = %u element(s)]", n_elem);
1611 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 )");
1617 /* MCC digit 2 MCC digit 1 octet 2
1618 * MNC digit 3 MCC digit 3 octet 3
1619 * MNC digit 2 MNC digit 1 octet 4
1621 curr_offset = dissect_e212_mcc_mnc(tvb, gpinfo, tree, curr_offset, TRUE);
1622 /* type of list = "000" */
1624 * TAC 1 (continued) octet 6
1628 * TAC k (continued) octet 2k+4*
1630 if (len < (guint)(4+(n_elem*2))) {
1631 proto_tree_add_text(tree, tvb, curr_offset, len-1 , "[Wrong number of elements?]");
1634 for (i=0; i < n_elem; i++, curr_offset+=2)
1635 proto_tree_add_item(tree, hf_nas_eps_emm_tai_tac, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
1639 /* type of list = "010" */
1640 /* MCC digit 2 MCC digit 1 octet 2
1641 * MNC digit 3 MCC digit 3 octet 3
1642 * MNC digit 2 MNC digit 1 octet 4
1644 curr_offset = dissect_e212_mcc_mnc(tvb, gpinfo, tree, curr_offset, TRUE);
1645 proto_tree_add_item(tree, hf_nas_eps_emm_tai_tac, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
1649 if (len< (guint)(1+(n_elem*5))) {
1650 proto_tree_add_text(tree, tvb, curr_offset, len-1 , "[Wrong number of elements?]");
1654 for (i=0; i < n_elem; i++) {
1655 /* type of list = "001" */
1656 /* MCC digit 2 MCC digit 1 octet 2
1657 * MNC digit 3 MCC digit 3 octet 3
1658 * MNC digit 2 MNC digit 1 octet 4
1660 curr_offset = dissect_e212_mcc_mnc(tvb, gpinfo, tree, curr_offset, TRUE);
1661 proto_tree_add_item(tree, hf_nas_eps_emm_tai_tac, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
1666 /* Unknown ( Not in 3GPP TS 24.301 version 8.1.0 Release 8 ) */
1669 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
1671 return(curr_offset-offset);
1674 * 9.9.3.34 UE network capability
1677 static const true_false_string nas_eps_emm_supported_flg_value = {
1681 static const true_false_string nas_eps_emm_ucs2_supp_flg_value = {
1682 "The UE has no preference between the use of the default alphabet and the use of UCS2",
1683 "The UE has a preference for the default alphabet"
1685 /* H.245-ASH capability (octet 7, bit 6) */
1686 static const true_false_string nas_eps_emm_h245_ash_cap_flg = {
1687 "H.245 after SRVCC handover capability supported",
1688 "H.245 after SRVCC handover capability not supported"
1690 /* ACC-CSFB capability (octet 7, bit 5) */
1691 static const true_false_string nas_eps_emm_acc_csfb_cap_flg = {
1692 "eNodeB-based access class control for CSFB supported",
1693 "eNodeB-based access class control for CSFB not supported"
1695 /* LPP capability (octet 7, bit 4) */
1696 static const true_false_string nas_eps_emm_lpp_cap_flg = {
1697 "LTE Positioning Protocol supported",
1698 "LTE Positioning Protocol not supported"
1700 /* LCS capability (octet 7, bit 3) */
1701 static const true_false_string nas_eps_emm_lcs_cap_flg = {
1702 "Location services notification mechanisms supported",
1703 "Location services notification mechanisms not supported"
1705 /* 1xSRVCC capability (octet 7, bit 2) */
1706 static const true_false_string nas_eps_emm_1xsrvcc_cap_flg = {
1707 "SRVCC from E-UTRAN to cdma2000 1xCS supported",
1708 "SRVCC from E-UTRAN to cdma2000 1x CS not supported"
1710 /* NF capability (octet 7, bit 1) */
1711 static const true_false_string nas_eps_emm_nf_cap_flg = {
1712 "Notification procedure supported",
1713 "Notification procedure not supported"
1717 de_emm_ue_net_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
1718 guint32 offset, guint len,
1719 gchar *add_string _U_, int string_len _U_)
1721 guint32 curr_offset;
1723 curr_offset = offset;
1726 /* EPS encryption algorithms supported (octet 3) */
1727 /* EPS encryption algorithm EEA0 supported (octet 3, bit 8) */
1728 proto_tree_add_item(tree, hf_nas_eps_emm_eea0, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1729 /* EPS encryption algorithm 128-EEA1 supported (octet 3, bit 7) */
1730 proto_tree_add_item(tree, hf_nas_eps_emm_128eea1, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1731 /* EPS encryption algorithm 128-EEA2 supported (octet 3, bit 6) */
1732 proto_tree_add_item(tree, hf_nas_eps_emm_128eea2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1733 /* EPS encryption algorithm 128-EEA3 supported (octet 3, bit 5) */
1734 proto_tree_add_item(tree, hf_nas_eps_emm_eea3, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1735 /* EPS encryption algorithm EEA4 supported (octet 3, bit 4) */
1736 proto_tree_add_item(tree, hf_nas_eps_emm_eea4, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1737 /* EPS encryption algorithm EEA5 supported (octet 3, bit 3) */
1738 proto_tree_add_item(tree, hf_nas_eps_emm_eea5, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1739 /* EPS encryption algorithm EEA6 supported (octet 3, bit 2) */
1740 proto_tree_add_item(tree, hf_nas_eps_emm_eea6, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1741 /* EPS encryption algorithm EEA7 supported (octet 3, bit 1) */
1742 proto_tree_add_item(tree, hf_nas_eps_emm_eea7, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1746 /* EPS integrity algorithms supported (octet 4) */
1747 /* EPS integrity algorithm EIA0 supported (octet 4, bit 8) */
1748 proto_tree_add_item(tree, hf_nas_eps_emm_eia0, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1749 /* EPS integrity algorithm 128-EIA1 supported (octet 4, bit 7) */
1750 proto_tree_add_item(tree, hf_nas_eps_emm_128eia1, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1751 /* EPS integrity algorithm 128-EIA2 supported (octet 4, bit 6) */
1752 proto_tree_add_item(tree, hf_nas_eps_emm_128eia2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1753 /* EPS integrity algorithm 128-EIA3 supported (octet 4, bit 5) */
1754 proto_tree_add_item(tree, hf_nas_eps_emm_eia3, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1755 /* EPS integrity algorithm EIA4 supported (octet 4, bit 4) */
1756 proto_tree_add_item(tree, hf_nas_eps_emm_eia4, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1757 /* EPS integrity algorithm EIA5 supported (octet 4, bit 3) */
1758 proto_tree_add_item(tree, hf_nas_eps_emm_eia5, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1759 /* EPS integrity algorithm EIA6 supported (octet 4, bit 2) */
1760 proto_tree_add_item(tree, hf_nas_eps_emm_eia6, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1761 /* EPS integrity algorithm EIA7 supported (octet 4, bit 1) */
1762 proto_tree_add_item(tree, hf_nas_eps_emm_eia7, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1766 /* Following octets are optional */
1767 if ((curr_offset - offset) >= len)
1770 /* UMTS encryption algorithms supported (octet 5)
1771 * UMTS encryption algorithm UEA0 supported (octet 5, bit 8)
1773 /* UMTS encryption algorithm 128-UEA0 supported (octet 5, bit 8) */
1774 proto_tree_add_item(tree, hf_nas_eps_emm_uea0, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1775 /* UMTS encryption algorithm 128-UEA1 supported (octet 5, bit 7) */
1776 proto_tree_add_item(tree, hf_nas_eps_emm_uea1, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1777 /* UMTS encryption algorithm 128-UEA2 supported (octet 5, bit 6) */
1778 proto_tree_add_item(tree, hf_nas_eps_emm_uea2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1779 /* UMTS encryption algorithm 128-UEA3 supported (octet 5, bit 5) */
1780 proto_tree_add_item(tree, hf_nas_eps_emm_uea3, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1781 /* UMTS encryption algorithm 128-UEA4 supported (octet 5, bit 4) */
1782 proto_tree_add_item(tree, hf_nas_eps_emm_uea4, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1783 /* UMTS encryption algorithm 128-UEA5 supported (octet 5, bit 3) */
1784 proto_tree_add_item(tree, hf_nas_eps_emm_uea5, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1785 /* UMTS encryption algorithm 128-UEA6 supported (octet 5, bit 2) */
1786 proto_tree_add_item(tree, hf_nas_eps_emm_uea6, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1787 /* UMTS encryption algorithm 128-UEA7 supported (octet 5, bit 1) */
1788 proto_tree_add_item(tree, hf_nas_eps_emm_uea7, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1791 if ((curr_offset - offset) >= len)
1794 /* UCS2 support (UCS2) (octet 6, bit 8)
1795 * This information field indicates the likely treatment of UCS2 encoded character strings
1798 proto_tree_add_item(tree, hf_nas_eps_emm_ucs2_supp, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1799 /* UMTS integrity algorithms supported (octet 6) */
1800 /* UMTS integrity algorithm UIA1 supported (octet 6, bit 7) */
1801 proto_tree_add_item(tree, hf_nas_eps_emm_uia1, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1802 /* UMTS integrity algorithm UIA2 supported (octet 6, bit 6) */
1803 proto_tree_add_item(tree, hf_nas_eps_emm_uia2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1804 /* UMTS integrity algorithm UIA3 supported (octet 6, bit 5) */
1805 proto_tree_add_item(tree, hf_nas_eps_emm_uia3, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1806 /* UMTS integrity algorithm UIA4 supported (octet 6, bit 4) */
1807 proto_tree_add_item(tree, hf_nas_eps_emm_uia4, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1808 /* UMTS integrity algorithm UIA5 supported (octet 6, bit 3) */
1809 proto_tree_add_item(tree, hf_nas_eps_emm_uia5, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1810 /* UMTS integrity algorithm UIA6 supported (octet 6, bit 2) */
1811 proto_tree_add_item(tree, hf_nas_eps_emm_uia6, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1812 /* UMTS integrity algorithm UIA7 supported (octet 6, bit 1) */
1813 proto_tree_add_item(tree, hf_nas_eps_emm_uia7, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1816 if ((curr_offset - offset) >= len)
1819 /* Bits 8 to 7 of octet 7 are spare and shall be coded as zero. */
1820 proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, (curr_offset<<3), 2, ENC_BIG_ENDIAN);
1821 /* H.245-ASH capability (octet 7, bit 6) */
1822 proto_tree_add_item(tree, hf_nas_eps_emm_h245_ash_cap, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1823 /* ACC-CSFB capability (octet 7, bit 5) */
1824 proto_tree_add_item(tree, hf_nas_eps_emm_acc_csfb_cap, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1825 /* LPP capability (octet 7, bit 4) */
1826 proto_tree_add_item(tree, hf_nas_eps_emm_lpp_cap, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1827 /* LCS capability (octet 7, bit 3) */
1828 proto_tree_add_item(tree, hf_nas_eps_emm_lcs_cap, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1829 /* 1xSRVCC capability (octet 7, bit 2) */
1830 proto_tree_add_item(tree, hf_nas_eps_emm_1xsrvcc_cap, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1831 /* NF capability (octet 7, bit 1) */
1832 proto_tree_add_item(tree, hf_nas_eps_emm_nf_cap, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1835 while ((curr_offset - offset) < len) {
1836 proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, (curr_offset<<3), 8, ENC_BIG_ENDIAN);
1842 /* UE radio capability information update needed flag (URC upd) (octet 1) */
1843 static const true_false_string nas_eps_emm_ue_ra_cap_inf_upd_need_flg = {
1844 "UE radio capability information update needed",
1845 "UE radio capability information update not needed"
1849 * 9.9.3.35 UE radio capability information update needed
1853 de_emm_ue_ra_cap_inf_upd_need(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
1854 guint32 offset, guint len _U_,
1855 gchar *add_string _U_, int string_len _U_)
1857 guint32 curr_offset;
1859 curr_offset = offset;
1861 proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, (curr_offset<<3)+4, 3, ENC_BIG_ENDIAN);
1862 proto_tree_add_item(tree, hf_nas_eps_emm_ue_ra_cap_inf_upd_need_flg, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1867 * 9.9.3.36 UE security capability
1871 de_emm_ue_sec_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
1872 guint32 offset, guint len _U_,
1873 gchar *add_string _U_, int string_len _U_)
1875 guint32 curr_offset;
1877 curr_offset = offset;
1879 /* EPS encryption algorithms supported (octet 3) */
1880 /* EPS encryption algorithm EEA0 supported (octet 3, bit 8) */
1881 proto_tree_add_item(tree, hf_nas_eps_emm_eea0, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1882 /* EPS encryption algorithm 128-EEA1 supported (octet 3, bit 7) */
1883 proto_tree_add_item(tree, hf_nas_eps_emm_128eea1, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1884 /* EPS encryption algorithm 128-EEA2 supported (octet 3, bit 6) */
1885 proto_tree_add_item(tree, hf_nas_eps_emm_128eea2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1886 /* EPS encryption algorithm 128-EEA3 supported (octet 3, bit 5) */
1887 proto_tree_add_item(tree, hf_nas_eps_emm_eea3, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1888 /* EPS encryption algorithm EEA4 supported (octet 3, bit 4) */
1889 proto_tree_add_item(tree, hf_nas_eps_emm_eea4, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1890 /* EPS encryption algorithm EEA5 supported (octet 3, bit 3) */
1891 proto_tree_add_item(tree, hf_nas_eps_emm_eea5, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1892 /* EPS encryption algorithm EEA6 supported (octet 3, bit 2) */
1893 proto_tree_add_item(tree, hf_nas_eps_emm_eea6, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1894 /* EPS encryption algorithm EEA7 supported (octet 3, bit 1) */
1895 proto_tree_add_item(tree, hf_nas_eps_emm_eea7, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1899 /* EPS integrity algorithms supported (octet 4) */
1900 /* EPS integrity algorithm EIA0 supported (octet 4, bit 8) */
1901 proto_tree_add_item(tree, hf_nas_eps_emm_eia0, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1902 /* EPS integrity algorithm 128-EIA1 supported (octet 4, bit 7) */
1903 proto_tree_add_item(tree, hf_nas_eps_emm_128eia1, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1904 /* EPS integrity algorithm 128-EIA2 supported (octet 4, bit 6) */
1905 proto_tree_add_item(tree, hf_nas_eps_emm_128eia2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1906 /* EPS integrity algorithm 128-EIA3 supported (octet 4, bit 5) */
1907 proto_tree_add_item(tree, hf_nas_eps_emm_eia3, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1908 /* EPS integrity algorithm EIA4 supported (octet 4, bit 4) */
1909 proto_tree_add_item(tree, hf_nas_eps_emm_eia4, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1910 /* EPS integrity algorithm EIA5 supported (octet 4, bit 3) */
1911 proto_tree_add_item(tree, hf_nas_eps_emm_eia5, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1912 /* EPS integrity algorithm EIA6 supported (octet 4, bit 2) */
1913 proto_tree_add_item(tree, hf_nas_eps_emm_eia6, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1914 /* EPS integrity algorithm EIA7 supported (octet 4, bit 1) */
1915 proto_tree_add_item(tree, hf_nas_eps_emm_eia7, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1919 /* Octets 5, 6, and 7 are optional. If octet 5 is included,
1920 * then also octet 6 shall be included and octet 7 may be included.
1925 /* UMTS encryption algorithms supported (octet 5) */
1926 /* UMTS encryption algorithm UEA0 supported (octet 5, bit 8) */
1927 proto_tree_add_item(tree, hf_nas_eps_emm_uea0, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1928 /* UMTS encryption algorithm UEA1 supported (octet 5, bit 7) */
1929 proto_tree_add_item(tree, hf_nas_eps_emm_uea1, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1930 /* UMTS encryption algorithm UEA2 supported (octet 5, bit 6) */
1931 proto_tree_add_item(tree, hf_nas_eps_emm_uea2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1932 /* UMTS encryption algorithm UEA3 supported (octet 5, bit 5) */
1933 proto_tree_add_item(tree, hf_nas_eps_emm_uea3, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1934 /* UMTS encryption algorithm UEA4 supported (octet 5, bit 4) */
1935 proto_tree_add_item(tree, hf_nas_eps_emm_uea4, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1936 /* UMTS encryption algorithm UEA5 supported (octet 5, bit 3) */
1937 proto_tree_add_item(tree, hf_nas_eps_emm_uea5, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1938 /* UMTS encryption algorithm UEA6 supported (octet 5, bit 2) */
1939 proto_tree_add_item(tree, hf_nas_eps_emm_uea6, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1940 /* UMTS encryption algorithm UEA7 supported (octet 5, bit 1) */
1941 proto_tree_add_item(tree, hf_nas_eps_emm_uea7, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1944 /* UMTS integrity algorithms supported (octet 6) */
1945 /* Bit 8 of octet 6 is spare and shall be coded as zero. */
1946 proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, (curr_offset<<3), 1, ENC_BIG_ENDIAN);
1947 /* UMTS integrity algorithm UIA1 supported (octet 6, bit 7) */
1948 proto_tree_add_item(tree, hf_nas_eps_emm_uia1, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1949 /* UMTS integrity algorithm UIA2 supported (octet 6, bit 6) */
1950 proto_tree_add_item(tree, hf_nas_eps_emm_uia2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1951 /* UMTS integrity algorithm UIA3 supported (octet 6, bit 5) */
1952 proto_tree_add_item(tree, hf_nas_eps_emm_uia3, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1953 /* UMTS integrity algorithm UIA4 supported (octet 6, bit 4) */
1954 proto_tree_add_item(tree, hf_nas_eps_emm_uia4, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1955 /* UMTS integrity algorithm UIA5 supported (octet 6, bit 3) */
1956 proto_tree_add_item(tree, hf_nas_eps_emm_uia5, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1957 /* UMTS integrity algorithm UIA6 supported (octet 6, bit 2) */
1958 proto_tree_add_item(tree, hf_nas_eps_emm_uia6, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1959 /* UMTS integrity algorithm UIA7 supported (octet 6, bit 1) */
1960 proto_tree_add_item(tree, hf_nas_eps_emm_uia7, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1966 /* Bit 8 of octet 7 is spare and shall be coded as zero. */
1967 proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, (curr_offset<<3), 1, ENC_BIG_ENDIAN);
1968 /* GPRS encryption algorithm GEA1 supported (octet 7, bit 7) */
1969 proto_tree_add_item(tree, hf_nas_eps_emm_gea1, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1970 /* GPRS encryption algorithm GEA2 supported (octet 7, bit 6) */
1971 proto_tree_add_item(tree, hf_nas_eps_emm_gea2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1972 /* GPRS encryption algorithm GEA3 supported (octet 7, bit 5) */
1973 proto_tree_add_item(tree, hf_nas_eps_emm_gea3, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1974 /* GPRS encryption algorithm GEA4 supported (octet 7, bit 4) */
1975 proto_tree_add_item(tree, hf_nas_eps_emm_gea4, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1976 /* GPRS encryption algorithm GEA5 supported (octet 7, bit 3) */
1977 proto_tree_add_item(tree, hf_nas_eps_emm_gea5, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1978 /* GPRS encryption algorithm GEA6 supported (octet 7, bit 2) */
1979 proto_tree_add_item(tree, hf_nas_eps_emm_gea6, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1980 /* GPRS encryption algorithm GEA7 supported (octet 7, bit 1) */
1981 proto_tree_add_item(tree, hf_nas_eps_emm_gea7, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1987 * 9.9.3.37 Emergency Number List
1988 * See subclause 10.5.3.13 in 3GPP TS 24.008 [13].
1989 * packet-gsm_a_dtap.c
1997 * The coding of the CLI value part is the same as for octets 3 to 14
1998 * of the Calling party BCD number information element defined in
1999 * subclause 10.5.4.9 of 3GPP TS 24.008
2006 de_emm_ss_code(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
2007 guint32 offset, guint len _U_,
2008 gchar *add_string _U_, int string_len _U_)
2010 guint32 curr_offset;
2012 curr_offset = offset;
2016 * The coding of the SS Code value is given in subclause 17.7.5 of 3GPP TS 29.002 [15B].
2017 * value string imported from gsm map
2019 proto_tree_add_item(tree, hf_nas_eps_emm_ss_code, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2025 * 9.9.3.40 LCS indicator
2027 /* LCS indicator value */
2028 static const value_string nas_eps_emm_lcs_ind_vals[] = {
2029 { 0, "Normal, unspecified"},
2036 de_emm_lcs_ind(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
2037 guint32 offset, guint len _U_,
2038 gchar *add_string _U_, int string_len _U_)
2040 guint32 curr_offset;
2042 curr_offset = offset;
2045 proto_tree_add_item(tree, hf_nas_eps_emm_lcs_ind, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2050 * 9.9.3.41 LCS client identity
2053 de_emm_lcs_client_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
2054 guint32 offset, guint len _U_,
2055 gchar *add_string _U_, int string_len _U_)
2057 guint32 curr_offset;
2060 curr_offset = offset;
2062 /* LCS client identity (value part)
2063 * The coding of the value part of the LCS client identity is given
2064 * in subclause 17.7.13 of 3GPP TS 29.002 [15B](GSM MAP).
2066 new_tvb = tvb_new_subset(tvb, curr_offset, len, len );
2067 dissect_gsm_map_lcs_LCS_ClientID_PDU( new_tvb, gpinfo, tree, NULL );
2073 * 9.9.3.42 Generic message container type
2075 static const range_string nas_eps_emm_gen_msg_cont_type_vals[] = {
2076 { 0, 0, "Reserved"},
2077 { 1, 1, "LTE Positioning Protocol (LPP) message container"},
2078 { 2, 2, "Location services message container"},
2079 { 3, 127, "Unused"},
2080 { 128, 255, "Reserved"},
2085 de_emm_gen_msg_cont_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
2086 guint32 offset, guint len _U_,
2087 gchar *add_string _U_, int string_len _U_)
2089 guint32 curr_offset;
2091 curr_offset = offset;
2093 eps_nas_gen_msg_cont_type = tvb_get_guint8(tvb, curr_offset);
2094 proto_tree_add_item(tree, hf_nas_eps_emm_gen_msg_cont_type, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2097 return(curr_offset - offset);
2100 * 9.9.3.43 Generic message container
2103 de_emm_gen_msg_cont(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
2104 guint32 offset, guint len,
2105 gchar *add_string _U_, int string_len _U_)
2108 proto_tree *sub_tree;
2111 item = proto_tree_add_item(tree, hf_nas_eps_gen_msg_cont, tvb, offset, len, ENC_NA);
2112 sub_tree = proto_item_add_subtree(item, ett_nas_eps_gen_msg_cont);
2114 new_tvb = tvb_new_subset(tvb, offset, len, len);
2116 switch (eps_nas_gen_msg_cont_type) {
2120 call_dissector(lpp_handle, new_tvb, pinfo, sub_tree);
2124 /* Location services */
2125 if (gsm_a_dtap_handle) {
2126 call_dissector(gsm_a_dtap_handle, new_tvb, pinfo, sub_tree);
2136 * 9.9.3.44 Voice domain preference and UE's usage setting
2137 * See subclause 10.5.5.28 in 3GPP TS 24.008 [13].
2138 * packet-gsm_a_dtap.c
2141 * 9.9.3.45 GUTI type
2143 static const true_false_string nas_eps_emm_guti_type_value = {
2149 de_emm_guti_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
2150 guint32 offset, guint len _U_,
2151 gchar *add_string _U_, int string_len _U_)
2153 guint32 curr_offset, bit_offset;
2155 curr_offset = offset;
2156 bit_offset = (curr_offset<<3)+4;
2158 proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
2160 proto_tree_add_bits_item(tree, hf_nas_eps_emm_guti_type, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2163 return (curr_offset - offset);
2167 * 9.9.4 EPS Session Management (ESM) information elements
2171 * 9.9.4.1 Access point name
2172 * See subclause 10.5.6.1 in 3GPP TS 24.008 [6].
2175 * 9.9.4.2 APN aggregate maximum bit rate
2179 de_esm_apn_aggr_max_br(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
2180 guint32 offset, guint len _U_,
2181 gchar *add_string _U_, int string_len _U_)
2183 guint32 curr_offset;
2185 guint32 dl_total = 0;
2186 guint32 ul_total = 0;
2187 guint32 bitrate = 0;
2189 curr_offset = offset;
2190 /* APN-AMBR for downlink octet 3 */
2191 octet = tvb_get_guint8(tvb,curr_offset);
2193 proto_tree_add_uint_format(tree, hf_nas_eps_emm_apn_ambr_dl, tvb, curr_offset, 1, octet,
2196 bitrate = calc_bitrate(octet);
2197 dl_total += bitrate;
2198 proto_tree_add_uint_format(tree, hf_nas_eps_emm_apn_ambr_dl, tvb, curr_offset, 1, octet,
2199 "APN-AMBR for downlink : %u kbps", bitrate);
2203 /* APN-AMBR for uplink octet 4 */
2204 octet = tvb_get_guint8(tvb,curr_offset);
2206 proto_tree_add_uint_format(tree, hf_nas_eps_emm_apn_ambr_ul, tvb, curr_offset, 1, octet,
2209 bitrate = calc_bitrate(octet);
2210 ul_total += bitrate;
2211 proto_tree_add_uint_format(tree, hf_nas_eps_emm_apn_ambr_ul, tvb, curr_offset, 1, octet,
2212 "APN-AMBR for uplink : %u kbps", bitrate);
2215 if ((curr_offset - offset) >= len)
2217 /* APN-AMBR for downlink (extended) octet 5 */
2218 octet = tvb_get_guint8(tvb,curr_offset);
2220 proto_tree_add_uint_format(tree, hf_nas_eps_emm_apn_ambr_dl_ext, tvb, curr_offset, 1, octet,
2221 "Use the value indicated by the APN-AMBR for downlink");
2223 bitrate = calc_bitrate_ext(octet);
2224 dl_total += (octet > 0x4a) ? bitrate*1000 : bitrate;
2225 proto_tree_add_uint_format(tree, hf_nas_eps_emm_apn_ambr_dl_ext, tvb, curr_offset, 1, octet,
2226 "APN-AMBR for downlink (extended) : %u %s",
2228 (octet > 0x4a) ? "Mbps" : "kbps");
2231 /* APN-AMBR for downlink (extended-2) is not present; display total now */
2233 /* Ignore value indicated by the APN-AMBR for downlink */
2234 dl_total = (octet > 0x4a) ? bitrate*1000 : bitrate;
2236 if (dl_total >= 1000) {
2237 proto_tree_add_text(tree, tvb, curr_offset, 1,"Total APN-AMBR for downlink : %.3f Mbps", (gfloat)dl_total / 1000);
2239 proto_tree_add_text(tree, tvb, curr_offset, 1,"Total APN-AMBR for downlink : %u kbps", dl_total);
2243 if ((curr_offset - offset) >= len)
2245 /* APN-AMBR for uplink (extended) octet 6 */
2246 octet = tvb_get_guint8(tvb,curr_offset);
2248 proto_tree_add_uint_format(tree, hf_nas_eps_emm_apn_ambr_ul_ext, tvb, curr_offset, 1, octet,
2249 "Use the value indicated by the APN-AMBR for uplink");
2251 bitrate = calc_bitrate_ext(octet);
2252 ul_total += (octet > 0x4a) ? bitrate*1000 : bitrate;
2253 proto_tree_add_uint_format(tree, hf_nas_eps_emm_apn_ambr_ul_ext, tvb, curr_offset, 1, octet,
2254 "APN-AMBR for uplink (extended) : %u %s",
2256 (octet > 0x4a) ? "Mbps" : "kbps");
2259 /* APN-AMBR for uplink (extended-2) is not present; display total now */
2261 /* Ignore value indicated by the APN-AMBR for uplink */
2262 ul_total = (octet > 0x4a) ? bitrate*1000 : bitrate;
2264 if (ul_total >= 1000) {
2265 proto_tree_add_text(tree, tvb, curr_offset, 1,"Total APN-AMBR for uplink : %.3f Mbps", (gfloat)ul_total / 1000);
2267 proto_tree_add_text(tree, tvb, curr_offset, 1,"Total APN-AMBR for uplink : %u kbps", ul_total);
2271 if ((curr_offset - offset) >= len)
2273 /* APN-AMBR for downlink (extended-2) octet 7 */
2274 octet = tvb_get_guint8(tvb,curr_offset);
2275 if ((octet == 0)||(octet == 0xff)) {
2276 proto_tree_add_uint_format(tree, hf_nas_eps_emm_apn_ambr_dl_ext2, tvb, curr_offset, 1, octet,
2277 "Use the value indicated by the APN-AMBR for downlink and APN-AMBR for downlink (extended)");
2279 dl_total += octet*256*1000;
2280 proto_tree_add_uint_format(tree, hf_nas_eps_emm_apn_ambr_dl_ext2, tvb, curr_offset, 1, octet,
2281 "APN-AMBR for downlink (extended-2) : %u Mbps",
2284 proto_tree_add_text(tree, tvb, curr_offset, 1,"Total APN-AMBR for downlink : %.3f Mbps", (gfloat)dl_total / 1000);
2286 if ((curr_offset - offset) >= len)
2288 /* APN-AMBR for uplink (extended-2) octet 8 */
2289 octet = tvb_get_guint8(tvb,curr_offset);
2290 if ((octet == 0)||(octet == 0xff)) {
2291 proto_tree_add_uint_format(tree, hf_nas_eps_emm_apn_ambr_ul_ext2, tvb, curr_offset, 1, octet,
2292 "Use the value indicated by the APN-AMBR for uplink and APN-AMBR for uplink (extended)");
2294 ul_total += octet*256*1000;
2295 proto_tree_add_uint_format(tree, hf_nas_eps_emm_apn_ambr_ul_ext2, tvb, curr_offset, 1, octet,
2296 "APN-AMBR for uplink (extended-2) : %u Mbps",
2299 proto_tree_add_text(tree, tvb, curr_offset, 1,"Total APN-AMBR for uplink : %.3f Mbps", (gfloat)ul_total / 1000);
2305 * 9.9.4.2A Connectivity type
2306 * See subclause 10.5.6.19 in 3GPP TS 24.008.
2310 * 9.9.4.3 EPS quality of service
2313 /* Quality of Service Class Identifier (QCI), octet 3 (see 3GPP TS 23.203 [7]) */
2314 static const range_string nas_eps_qci_vals[] = {
2315 { 0x00, 0x00, "UE -> NW Network selects the QCI / NW -> UE Reserved"},
2316 { 0x01, 0x01, "QCI 1"},
2317 { 0x02, 0x02, "QCI 2"},
2318 { 0x03, 0x03, "QCI 3"},
2319 { 0x04, 0x04, "QCI 4"},
2320 { 0x05, 0x05, "QCI 5"},
2321 { 0x06, 0x06, "QCI 6"},
2322 { 0x07, 0x07, "QCI 7"},
2323 { 0x08, 0x08, "QCI 8"},
2324 { 0x09, 0x09, "QCI 9"},
2325 { 0x0A, 0x7F, "Reserved"},
2326 { 0x80, 0xFE, "Operator-specific QCI"},
2327 { 0xFF, 0xFF, "Reserved"},
2334 de_esm_qos(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
2335 guint32 offset, guint len,
2336 gchar *add_string _U_, int string_len _U_)
2338 guint32 curr_offset;
2341 curr_offset = offset;
2344 proto_tree_add_item(tree, hf_nas_eps_qci, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2346 if ((curr_offset - offset) >= len)
2348 /* Maximum bit rate for uplink octet 4 */
2349 octet = tvb_get_guint8(tvb,curr_offset);
2351 proto_tree_add_uint_format(tree, hf_nas_eps_mbr_ul, tvb, curr_offset, 1, octet,
2352 "UE->NW Subscribed maximum bit rate for uplink/ NW->UE Reserved");
2354 proto_tree_add_uint_format(tree, hf_nas_eps_mbr_ul, tvb, curr_offset, 1, octet,
2355 "Maximum bit rate for uplink : %u kbps", calc_bitrate(octet));
2358 if ((curr_offset - offset) >= len)
2360 /* Maximum bit rate for downlink octet 5 */
2361 octet = tvb_get_guint8(tvb,curr_offset);
2363 proto_tree_add_uint_format(tree, hf_nas_eps_mbr_dl, tvb, curr_offset, 1, octet,
2364 "UE->NW Subscribed maximum bit rate for downlink/ NW->UE Reserved");
2366 proto_tree_add_uint_format(tree, hf_nas_eps_mbr_dl, tvb, curr_offset, 1, octet,
2367 "Maximum bit rate for downlink : %u kbps", calc_bitrate(octet));
2370 if ((curr_offset - offset) >= len)
2372 /* Guaranteed bit rate for uplink octet 6 */
2373 octet = tvb_get_guint8(tvb,curr_offset);
2374 proto_tree_add_uint_format(tree, hf_nas_eps_gbr_ul, tvb, curr_offset, 1, octet,
2375 "Guaranteed bit rate for uplink : %u kbps", calc_bitrate(octet));
2378 if ((curr_offset - offset) >= len)
2380 /* Guaranteed bit rate for downlink octet 7 */
2381 octet = tvb_get_guint8(tvb,curr_offset);
2382 proto_tree_add_uint_format(tree, hf_nas_eps_gbr_dl, tvb, curr_offset, 1, octet,
2383 "Guaranteed bit rate for downlink : %u kbps", calc_bitrate(octet));
2386 if ((curr_offset - offset) >= len)
2388 /* Maximum bit rate for uplink (extended) octet 8 */
2389 octet = tvb_get_guint8(tvb,curr_offset);
2391 proto_tree_add_uint_format(tree, hf_nas_eps_embr_ul, tvb, curr_offset, 1, octet,
2392 "Use the value indicated by the maximum bit rate for uplink in octet 4");
2394 proto_tree_add_uint_format(tree, hf_nas_eps_embr_ul, tvb, curr_offset, 1, octet,
2395 "Maximum bit rate for uplink (extended) : %u %s",
2396 calc_bitrate_ext(octet),
2397 (octet > 0x4a) ? "Mbps" : "kbps");
2400 if ((curr_offset - offset) >= len)
2402 /* Maximum bit rate for downlink (extended) octet 9 */
2403 octet = tvb_get_guint8(tvb,curr_offset);
2405 proto_tree_add_uint_format(tree, hf_nas_eps_embr_dl, tvb, curr_offset, 1, octet,
2406 "Use the value indicated by the maximum bit rate for downlink in octet 5");
2408 proto_tree_add_uint_format(tree, hf_nas_eps_embr_dl, tvb, curr_offset, 1, octet,
2409 "Maximum bit rate for downlink (extended) : %u %s",
2410 calc_bitrate_ext(octet),
2411 (octet > 0x4a) ? "Mbps" : "kbps");
2414 if ((curr_offset - offset) >= len)
2416 /* Guaranteed bit rate for uplink (extended) octet 10 */
2417 octet = tvb_get_guint8(tvb,curr_offset);
2419 proto_tree_add_uint_format(tree, hf_nas_eps_egbr_ul, tvb, curr_offset, 1, octet,
2420 "Use the value indicated by the guaranteed bit rate for uplink in octet 6");
2422 proto_tree_add_uint_format(tree, hf_nas_eps_egbr_ul, tvb, curr_offset, 1, octet,
2423 "Guaranteed bit rate for uplink (extended) : %u %s",
2424 calc_bitrate_ext(octet),
2425 (octet > 0x4a) ? "Mbps" : "kbps");
2428 if ((curr_offset - offset) >= len)
2430 /* Guaranteed bit rate for downlink (extended) octet 11 */
2431 octet = tvb_get_guint8(tvb,curr_offset);
2433 proto_tree_add_uint_format(tree, hf_nas_eps_egbr_dl, tvb, curr_offset, 1, octet,
2434 "Use the value indicated by the guaranteed bit rate for downlink in octet 7");
2436 proto_tree_add_uint_format(tree, hf_nas_eps_egbr_dl, tvb, curr_offset, 1, octet,
2437 "Guaranteed bit rate for downlink (extended) : %u %s",
2438 calc_bitrate_ext(octet),
2439 (octet > 0x4a) ? "Mbps" : "kbps");
2442 if ((curr_offset - offset) >= len)
2444 /* Maximum bit rate for uplink (extended-2) octet 12 */
2445 octet = tvb_get_guint8(tvb,curr_offset);
2447 proto_tree_add_uint_format(tree, hf_nas_eps_embr_ul, tvb, curr_offset, 1, octet,
2448 "Use the value indicated by the maximum bit rate for uplink in octet 4 and octet 8");
2450 proto_tree_add_uint_format(tree, hf_nas_eps_embr_ul, tvb, curr_offset, 1, octet,
2451 "Maximum bit rate for uplink (extended-2) : %u Mbps",
2452 calc_bitrate_ext2(octet));
2455 /* Maximum bit rate for downlink (extended-2) octet 13 */
2456 octet = tvb_get_guint8(tvb,curr_offset);
2458 proto_tree_add_uint_format(tree, hf_nas_eps_embr_dl, tvb, curr_offset, 1, octet,
2459 "Use the value indicated by the maximum bit rate for downlink in octet 5 and octet 9");
2461 proto_tree_add_uint_format(tree, hf_nas_eps_embr_dl, tvb, curr_offset, 1, octet,
2462 "Maximum bit rate for downlink (extended-2) : %u Mbps",
2463 calc_bitrate_ext2(octet));
2466 /* Guaranteed bit rate for uplink (extended-2) octet 14 */
2467 octet = tvb_get_guint8(tvb,curr_offset);
2469 proto_tree_add_uint_format(tree, hf_nas_eps_egbr_ul, tvb, curr_offset, 1, octet,
2470 "Use the value indicated by the guaranted bit rate for uplink in octet 6 and octet 10");
2472 proto_tree_add_uint_format(tree, hf_nas_eps_egbr_ul, tvb, curr_offset, 1, octet,
2473 "Guaranteed bit rate for uplink (extended-2) : %u Mbps",
2474 calc_bitrate_ext2(octet));
2477 /* Guaranted bit rate for downlink (extended-2) octet 15 */
2478 octet = tvb_get_guint8(tvb,curr_offset);
2480 proto_tree_add_uint_format(tree, hf_nas_eps_egbr_dl, tvb, curr_offset, 1, octet,
2481 "Use the value indicated by the guaranteed bit rate for downlink in octet 7 and octet 11");
2483 proto_tree_add_uint_format(tree, hf_nas_eps_egbr_dl, tvb, curr_offset, 1, octet,
2484 "Guaranteed bit rate for downlink (extended-2) : %u Mbps",
2485 calc_bitrate_ext2(octet));
2494 static const value_string nas_eps_esm_cause_vals[] = {
2495 { 0x08, "Operator Determined Barring"},
2496 { 0x1a, "Insufficient resources"},
2497 { 0x1b, "Missing or unknown APN"},
2498 { 0x1c, "Unknown PDN type"},
2499 { 0x1d, "User authentication failed"},
2500 { 0x1e, "Request rejected by Serving GW or PDN GW"},
2501 { 0x1f, "Request rejected, unspecified"},
2502 { 0x20, "Service option not supported"},
2503 { 0x21, "Requested service option not subscribed"},
2504 { 0x22, "Service option temporarily out of order"},
2505 { 0x23, "PTI already in use"},
2506 { 0x24, "Regular deactivation"},
2507 { 0x25, "EPS QoS not accepted"},
2508 { 0x26, "Network failure"},
2509 { 0x27, "Reactivation requested"},
2510 { 0x29, "Semantic error in the TFT operation"},
2511 { 0x2a, "Syntactical error in the TFT operation"},
2512 { 0x2b, "Invalid EPS bearer identity"},
2513 { 0x2c, "Semantic errors in packet filter(s)"},
2514 { 0x2d, "Syntactical errors in packet filter(s)"},
2516 { 0x2f, "PTI mismatch"},
2517 { 0x31, "Last PDN disconnection not allowed"},
2518 { 0x32, "PDN type IPv4 only allowed"},
2519 { 0x33, "PDN type IPv6 only allowed"},
2520 { 0x34, "Single address bearers only allowed"},
2521 { 0x35, "ESM information not received"},
2522 { 0x36, "PDN connection does not exist"},
2523 { 0x37, "Multiple PDN connections for a given APN not allowed"},
2524 { 0x38, "Collision with network initiated request"},
2525 { 0x3b, "Unsupported QCI value"},
2526 { 0x3c, "Bearer handling not supported"},
2527 { 0x41, "Maximum number of EPS bearers reached"},
2528 { 0x42, "Requested APN not supported in current RAT and PLMN combination"},
2529 { 0x51, "Invalid PTI value"},
2530 { 0x5f, "Semantically incorrect message"},
2531 { 0x60, "Invalid mandatory information"},
2532 { 0x61, "Message type non-existent or not implemented"},
2533 { 0x62, "Message type not compatible with the protocol state"},
2534 { 0x63, "Information element non-existent or not implemented"},
2535 { 0x64, "Conditional IE error"},
2536 { 0x65, "Message not compatible with the protocol state"},
2537 { 0x6f, "Protocol error, unspecified"},
2538 { 0x70, "APN restriction value incompatible with active EPS bearer context"},
2541 static value_string_ext nas_eps_esm_cause_vals_ext = VALUE_STRING_EXT_INIT(nas_eps_esm_cause_vals);
2544 de_esm_cause(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
2545 guint32 offset, guint len _U_,
2546 gchar *add_string _U_, int string_len _U_)
2548 guint32 curr_offset;
2550 curr_offset = offset;
2552 proto_tree_add_item(tree, hf_nas_eps_esm_cause, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2555 return(curr_offset - offset);
2558 * 9.9.4.5 ESM information transfer flag
2560 /* EIT (ESM information transfer) */
2561 static const true_false_string nas_eps_emm_eit_vals = {
2562 "Security protected ESM information transfer required",
2563 "Security protected ESM information transfer not required"
2566 de_esm_inf_trf_flg(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
2567 guint32 offset, guint len _U_,
2568 gchar *add_string _U_, int string_len _U_)
2570 guint32 curr_offset;
2572 curr_offset = offset;
2575 proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, (curr_offset<<3)+4, 3, ENC_BIG_ENDIAN);
2576 proto_tree_add_item(tree, hf_nas_eps_esm_eit, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2578 return(curr_offset-offset);
2581 * 9.9.4.6 Linked EPS bearer identity
2584 * Linked EPS bearer identity (bits 1-4)
2587 static const value_string nas_eps_esm_linked_bearer_id_vals[] = {
2593 { 0x5, "EPS bearer identity value 5"},
2594 { 0x6, "EPS bearer identity value 6"},
2595 { 0x7, "EPS bearer identity value 7"},
2596 { 0x8, "EPS bearer identity value 8"},
2597 { 0x9, "EPS bearer identity value 9"},
2598 { 0xa, "EPS bearer identity value 10"},
2599 { 0xb, "EPS bearer identity value 11"},
2600 { 0xc, "EPS bearer identity value 12"},
2601 { 0xd, "EPS bearer identity value 13"},
2602 { 0xe, "EPS bearer identity value 14"},
2603 { 0xf, "EPS bearer identity value 15"},
2608 * 9.9.4.7 LLC service access point identifier
2609 * See subclause 10.5.6.9 in 3GPP TS 24.008
2613 * 9.9.4.7a Notification indicator
2615 static const value_string nas_eps_esm_notif_ind_vals[] = {
2617 { 0x1, "SRVCC handover cancelled, IMS session re-establishment required"},
2622 de_esm_notif_ind(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
2623 guint32 offset, guint len _U_,
2624 gchar *add_string _U_, int string_len _U_)
2626 guint32 curr_offset;
2628 curr_offset = offset;
2630 proto_tree_add_item(tree, hf_nas_eps_esm_notif_ind, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2636 * 9.9.4.8 Packet flow identifier
2637 * See subclause 10.5.6.11 in 3GPP TS 24.008
2640 * 9.9.4.9 PDN address
2643 de_esm_pdn_addr(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
2644 guint32 offset, guint len _U_,
2645 gchar *add_string _U_, int string_len _U_)
2647 guint32 curr_offset;
2650 curr_offset = offset;
2653 pdn_type = tvb_get_guint8(tvb, offset) & 0x7;
2654 proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, curr_offset<<3, 5, ENC_BIG_ENDIAN);
2655 proto_tree_add_item(tree, hf_nas_eps_esm_pdn_type, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2661 proto_tree_add_item(tree, hf_nas_eps_esm_pdn_ipv4, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
2665 /* IPv6 3GPP TS 24.301 version 9.4.0 Release 9
2666 * If PDN type value indicates IPv6, the PDN address information in octet 4 to octet 11
2667 * contains an IPv6 interface identifier. Bit 8 of octet 4 represents the most significant bit
2668 * of the IPv6 interface identifier and bit 1 of octet 11 the least significant bit.
2670 proto_tree_add_item(tree, hf_nas_eps_esm_pdn_ipv6_if_id, tvb, curr_offset, 8, ENC_NA);
2674 /* IPv4/IPv6 3GPP TS 24.301 version 9.4.0 Release 9
2675 * If PDN type value indicates IPv4v6, the PDN address information in octet 4 to octet 15
2676 * contains an IPv6 interface identifier and an IPv4 address. Bit 8 of octet 4 represents
2677 * the most significant bit of the IPv6 interface identifier and bit 1 of octet 11 the least
2678 * significant bit. Bit 8 of octet 12 represents the most significant bit of the IPv4 address
2679 * and bit 1 of octet 15 the least significant bit.
2681 proto_tree_add_item(tree, hf_nas_eps_esm_pdn_ipv6_if_id, tvb, curr_offset, 8, ENC_NA);
2683 proto_tree_add_item(tree, hf_nas_eps_esm_pdn_ipv4, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
2690 return(curr_offset-offset);
2695 * Coded inline 1/2 octet
2697 static const value_string nas_eps_esm_pdn_type_values[] = {
2701 { 0x4, "Unused; shall be interpreted as IPv6 if received by the network" },
2706 * 9.9.4.11 Protocol configuration options
2707 * See subclause 10.5.6.3 in 3GPP TS 24.008
2710 * 9.9.4.12 Quality of service
2711 * See subclause 10.5.6.5 in 3GPP TS 24.008
2712 * Coded inline 1/2 octet
2715 * 9.9.4.13 Radio priority
2716 * See subclause 10.5.7.2 in 3GPP TS 24.008
2719 * 9.9.4.14 Request type
2720 * See subclause 10.5.6.17 in 3GPP TS 24.008
2722 static const value_string nas_eps_esm_request_type_values[] = {
2723 { 0x1, "initial request" },
2724 { 0x2, "Handover" },
2725 { 0x3, "Unused; shall be interpreted as initial request if received by the network" },
2726 { 0x4, "emergency" },
2731 * 9.9.4.15 Traffic flow aggregate description
2732 * The Traffic flow aggregate description information element is encoded using the same format as the Traffic flow
2733 * template information element (see subclause 10.5.6.12 in 3GPP TS 24.008 [13]). When sending this IE, the UE shall
2734 * assign the packet filter identifier values so that they are unique across all packet filters for the PDN connection.
2737 * 9.9.4.16 Traffic flow template
2738 * See subclause 10.5.6.12 in 3GPP TS 24.008
2742 * 9.9.4.17 Transaction identifier
2743 * The Transaction identifier information element is coded as the Linked TI information element in 3GPP TS 24.008 [13],
2744 * subclause 10.5.6.7.
2745 * The coding of the TI flag, the TI value and the EXT bit is defined in 3GPP TS 24.007[20].
2748 guint16 (*emm_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string, int string_len) = {
2749 /* 9.9.3 EPS Mobility Management (EMM) information elements */
2750 de_emm_add_upd_res, /* 9.9.3.0A Additional update result */
2751 de_emm_add_upd_type, /* 9.9.3.0B Additional update type */
2752 NULL, /* 9.9.3.1 Authentication failure parameter(dissected in packet-gsm_a_dtap.c) */
2753 NULL, /* 9.9.3.2 Authentication parameter AUTN(packet-gsm_a_dtap.c) */
2754 NULL, /* 9.9.3.3 Authentication parameter RAND */
2755 de_emm_auth_resp_par, /* 9.9.3.4 Authentication response parameter */
2756 de_emm_csfb_resp, /* 9.9.3.5 CSFB response */
2757 NULL, /* 9.9.3.6 Daylight saving time (packet-gsm_a_dtap.c)*/
2758 NULL, /* 9.9.3.7 Detach type */
2759 NULL, /* 9.9.3.8 DRX parameter */
2760 de_emm_cause, /* 9.9.3.9 EMM cause */
2761 NULL, /* 9.9.3.10 EPS attach result (coded inline) */
2762 NULL, /* 9.9.3.11 EPS attach type(Coded Inline) */
2763 de_emm_eps_mid, /* 9.9.3.12 EPS mobile identity */
2764 de_emm_eps_net_feature_sup, /* 9.9.3.12A EPS network feature support */
2765 NULL, /* 9.9.3.13 EPS update result (Coded Inline)*/
2766 NULL, /* 9.9.3.14 EPS update type (Inline)*/
2767 de_emm_esm_msg_cont, /* 9.9.3.15 ESM message conta */
2768 NULL, /* 9.9.3.16 GPRS timer ,See subclause 10.5.7.3 in 3GPP TS 24.008 [6]. (packet-gsm_a_gm.c)*/
2769 NULL, /* 9.9.3.16A GPRS timer 2, See subclause 10.5.7.4 in 3GPP TS 24.008. (packet-gsm_a_gm.c)*/
2770 NULL, /* 9.9.3.16B GPRS timer 3, See subclause 10.5.7.4a in 3GPP TS 24.008. (packet-gsm_a_gm.c)*/
2771 NULL, /* 9.9.3.17 Identity type 2 ,See subclause 10.5.5.9 in 3GPP TS 24.008 [6]. */
2772 de_emm_nas_imeisv_req, /* 9.9.3.18 IMEISV request ,See subclause 10.5.5.10 in 3GPP TS 24.008 [6]. */
2773 de_emm_nas_ksi_and_seq_no, /* 9.9.3.19 KSI and sequence number */
2774 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) */
2775 NULL, /* 9.9.3.20A MS network feature support, See subclause 10.5.1.15 in 3GPP TS 24.008.(packet-gsm_a_gm.c) */
2776 de_emm_nas_key_set_id, /* 9.9.3.21 NAS key set identifier (Coded Inline) */
2777 de_emm_nas_msg_cont, /* 9.9.3.22 NAS message container */
2778 de_emm_nas_sec_alsgs, /* 9.9.3.23 NAS security algorithms */
2779 NULL, /* 9.9.3.24 Network name, See subclause 10.5.3.5a in 3GPP TS 24.008 [6]. (packet-gsm_a_dtap.c)*/
2780 de_emm_nonce, /* 9.9.3.25 Nonce */
2781 de_emm_paging_id, /* 9.9.3.25A Paging identity */
2782 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)*/
2783 NULL, /* 9.9.3.27 Service type */
2784 de_emm_nas_short_mac, /* 9.9.3.28 Short MAC */
2785 NULL, /* 9.9.3.29 Time zone, See subclause 10.5.3.8 in 3GPP TS 24.008 [6]. (packet-gsm_a_dtap.c)*/
2786 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)*/
2787 NULL, /* 9.9.3.31 TMSI status, See subclause 10.5.5.4 in 3GPP TS 24.008 [6]. (packet-gsm_a_gm.c)*/
2788 de_emm_trac_area_id, /* 9.9.3.32 Tracking area identity */
2789 de_emm_trac_area_id_lst, /* 9.9.3.33 Tracking area identity list */
2790 de_emm_ue_net_cap, /* 9.9.3.34 UE network capability */
2791 de_emm_ue_ra_cap_inf_upd_need, /* 9.9.3.35 UE radio capability information update needed */
2792 de_emm_ue_sec_cap, /* 9.9.3.36 UE security capability */
2793 NULL, /* 9.9.3.37 Emergency Number List (packet-gsm_A_dtap.c) */
2794 NULL, /* 9.9.3.38 CLI */
2795 de_emm_ss_code, /* 9.9.3.39 SS Code */
2796 de_emm_lcs_ind, /* 9.9.3.40 LCS indicator */
2797 de_emm_lcs_client_id, /* 9.9.3.41 LCS client identity */
2798 de_emm_gen_msg_cont_type, /* 9.9.3.42 Generic message container type */
2799 de_emm_gen_msg_cont, /* 9.9.3.43 Generic message container */
2800 NULL, /* 9.9.3.44 Voice domain preference and UE's usage setting */
2801 de_emm_guti_type, /* 9.9.3.45 GUTI type */
2805 /* 9.9.4 EPS Session Management (ESM) information elements */
2808 DE_ESM_APN, /* 9.9.4.1 Access point name */
2809 DE_ESM_APN_AGR_MAX_BR, /* 9.9.4.2 APN aggregate maximum bit rate */
2810 DE_ESM_CONNECTIVITY_TYPE, /* 9.9.4.2A Connectivity type */
2811 DE_ESM_EPS_QOS, /* 9.9.4.3 EPS quality of service */
2812 DE_ESM_CAUSE, /* 9.9.4.4 ESM cause */
2813 DE_ESM_INF_TRF_FLG, /* 9.9.4.5 ESM information transfer flag */
2814 DE_ESM_LNKED_EPS_B_ID, /* 9.9.4.6 Linked EPS bearer identity */
2815 DE_ESM_LLC_SAPI, /* 9.9.4.7 LLC service access point identifier */
2816 DE_ESM_NOTIF_IND, /* 9.9.4.7a Notification indicator */
2817 DE_ESM_P_FLW_ID, /* 9.9.4.8 Packet flow identifier */
2818 DE_ESM_PDN_ADDR, /* 9.9.4.9 PDN address */
2819 DE_ESM_PDN_TYPE, /* 9.9.4.10 PDN type */
2820 DE_ESM_PROT_CONF_OPT, /* 9.9.4.11 Protocol configuration options */
2821 DE_ESM_QOS, /* 9.9.4.12 Quality of service */
2822 DE_ESM_RA_PRI, /* 9.9.4.13 Radio priority */
2823 DE_ESM_REQ_TYPE, /* 9.9.4.14 Request type */
2824 DE_ESM_TRAF_FLOW_AGR_DESC, /* 9.9.4.15 Traffic flow aggregate description */
2825 DE_ESM_TRAF_FLOW_TEMPL, /* 9.9.4.16 Traffic flow template */
2826 DE_ESM_TID, /* 9.9.4.17 Transaction identifier */
2827 DE_ESM_NONE /* NONE */
2831 static const value_string nas_esm_elem_strings[] = {
2832 { DE_ESM_APN, "Access point name" }, /* 9.9.4.1 Access point name */
2833 { DE_ESM_APN_AGR_MAX_BR, "APN aggregate maximum bit rate" }, /* 9.9.4.2 APN aggregate maximum bit rate */
2834 { DE_ESM_CONNECTIVITY_TYPE, "Connectivity type" }, /* 9.9.4.2A Connectivity type */
2835 { DE_ESM_EPS_QOS, "EPS quality of service" }, /* 9.9.4.3 EPS quality of service */
2836 { DE_ESM_CAUSE, "ESM cause" }, /* 9.9.4.4 ESM cause */
2837 { DE_ESM_INF_TRF_FLG, "ESM information transfer flag" }, /* 9.9.4.5 ESM information transfer flag */
2838 { DE_ESM_LNKED_EPS_B_ID, "Linked EPS bearer identity" }, /* 9.9.4.6 Linked EPS bearer identity */
2839 { DE_ESM_LLC_SAPI, "LLC service access point identifier" }, /* 9.9.4.7 LLC service access point identifier */
2840 { DE_ESM_NOTIF_IND, "Notification indicator" }, /* 9.9.4.7a Notification indicator */
2841 { DE_ESM_P_FLW_ID, "Packet flow identifier" }, /* 9.9.4.8 Packet flow identifier */
2842 { DE_ESM_PDN_ADDR, "PDN address" }, /* 9.9.4.9 PDN address */
2843 { DE_ESM_PDN_TYPE, "PDN type" }, /* 9.9.4.10 PDN type */
2844 { DE_ESM_PROT_CONF_OPT, "Protocol configuration options" }, /* 9.9.4.11 Protocol configuration options */
2845 { DE_ESM_QOS, "Quality of service" }, /* 9.9.4.12 Quality of service */
2846 { DE_ESM_RA_PRI, "Radio priority" }, /* 9.9.4.13 Radio priority */
2847 { DE_ESM_REQ_TYPE, "Request type" }, /* 9.9.4.14 Request type */
2848 { DE_ESM_TRAF_FLOW_AGR_DESC, "Traffic flow aggregate description" },/* 9.9.4.15 Traffic flow aggregate description */
2849 { DE_ESM_TRAF_FLOW_TEMPL, "Traffic flow template" }, /* 9.9.4.16 Traffic flow template */
2850 { DE_ESM_TID, "Transaction identifier" }, /* 9.9.4.17 Transaction identifier */
2853 value_string_ext nas_esm_elem_strings_ext = VALUE_STRING_EXT_INIT(nas_esm_elem_strings);
2855 #define NUM_NAS_ESM_ELEM (sizeof(nas_esm_elem_strings)/sizeof(value_string))
2856 gint ett_nas_eps_esm_elem[NUM_NAS_ESM_ELEM];
2858 guint16 (*esm_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string, int string_len) = {
2859 NULL, /* 9.9.4.1 Access point name */
2860 de_esm_apn_aggr_max_br, /* 9.9.4.2 APN aggregate maximum bit rate */
2861 NULL, /* 9.9.4.2A Connectivity type */
2862 de_esm_qos, /* 9.9.4.3 EPS quality of service */
2863 de_esm_cause, /* 9.9.4.4 ESM cause */
2864 de_esm_inf_trf_flg, /* 9.9.4.5 ESM information transfer flag */
2865 NULL, /* 9.9.4.6 Linked EPS bearer identity */
2866 NULL, /* 9.9.4.7 LLC service access point identifier */
2867 de_esm_notif_ind, /* 9.9.4.7a Notification indicator */
2868 NULL, /* 9.9.4.8 Packet flow identifier */
2869 de_esm_pdn_addr, /* 9.9.4.9 PDN address */
2870 NULL, /* 9.9.4.10 PDN type */
2871 NULL, /* 9.9.4.11 Protocol configuration options */
2872 NULL, /* 9.9.4.12 Quality of service */
2873 NULL, /* 9.9.4.13 Radio priority */
2874 NULL, /* 9.9.4.14 Request type */
2875 NULL, /* 9.9.4.15 Traffic flow aggregate description */
2876 NULL, /* 9.9.4.16 Traffic flow template */
2877 NULL, /* 9.9.4.17 Transaction identifier */
2881 /* MESSAGE FUNCTIONS */
2884 * 8.2.1 Attach accept
2888 nas_emm_attach_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
2890 guint32 curr_offset, bit_offset;
2894 curr_offset = offset;
2897 /* Spare half octet Spare half octet 9.9.2.7 M V 1/2 */
2898 bit_offset = curr_offset<<3;
2899 proto_tree_add_bits_item(tree, hf_nas_eps_emm_spare_half_octet, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
2901 /* EPS attach result EPS attach result 9.9.3.10 M V 1/2 */
2902 proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2904 proto_tree_add_bits_item(tree, hf_nas_eps_emm_EPS_attach_result, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
2906 /* Fix up the lengths */
2909 /* T3412 value GPRS timer 9.9.3.16 M V 1 */
2910 ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER, " - T3412 value");
2911 /* Tracking area identity list 9.9.3.33 M LV 7-97 */
2912 ELEM_MAND_LV(NAS_PDU_TYPE_EMM, DE_EMM_TRAC_AREA_ID_LST, " - TAI list");
2913 /* ESM message container 9.9.3.15 M LV-E 2-n */
2914 ELEM_MAND_LV_E(NAS_PDU_TYPE_EMM, DE_EMM_ESM_MSG_CONT, NULL);
2915 /* 50 GUTI EPS mobile identity 9.9.3.12 O TLV 13 */
2916 ELEM_OPT_TLV(0x50, NAS_PDU_TYPE_EMM, DE_EMM_EPS_MID, " - GUTI");
2917 /* 13 Location area identification Location area identification 9.9.2.2 O TV 6 */
2918 ELEM_OPT_TV(0x13, NAS_PDU_TYPE_COMMON, DE_EPS_CMN_LOC_AREA_ID, NULL);
2919 /* 23 MS identity Mobile identity 9.9.2.3 O TLV 7-10 */
2920 ELEM_OPT_TLV(0x23, NAS_PDU_TYPE_COMMON, DE_EPS_CMN_MOB_ID, " - MS identity");
2921 /* 53 EMM cause EMM cause 9.9.3.9 O TV 2 */
2922 ELEM_OPT_TV(0x53, NAS_PDU_TYPE_EMM, DE_EMM_CAUSE, NULL);
2923 /* 17 T3402 value GPRS timer 9.9.3.16 O TV 2 */
2924 ELEM_OPT_TV(0x17, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER, " - T3402 value");
2925 /* 59 T3423 value GPRS timer 9.9.3.16 O TV 2 */
2926 ELEM_OPT_TV(0x59, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER, " - T3423 value");
2927 /* 4A Equivalent PLMNs PLMN list 9.9.2.8 O TLV 5-47 */
2928 ELEM_OPT_TLV(0x4a, GSM_A_PDU_TYPE_COMMON, DE_PLMN_LIST, " - Equivalent PLMNs");
2929 /* 34 Emergency Number List 9.9.3.37 O TLV 5-50 */
2930 ELEM_OPT_TLV(0x34, GSM_A_PDU_TYPE_DTAP, DE_EMERGENCY_NUM_LIST, NULL);
2931 /* 64 EPS network feature support EPS network feature support 9.9.3.12A O TLV 3 */
2932 ELEM_OPT_TLV(0x64, NAS_PDU_TYPE_EMM, DE_EMM_EPS_NET_FEATURE_SUP, NULL);
2933 /* F- Additional update result Additional update result 9.9.3.0A O TV 1 */
2934 ELEM_OPT_TV_SHORT( 0xF0 , NAS_PDU_TYPE_EMM, DE_EMM_ADD_UPD_RES, NULL );
2935 /* 5E T3412 extended value GPRS timer 3 9.9.3.16B O TLV 3 */
2936 ELEM_OPT_TLV(0x5E, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - T3412 extended value");
2938 EXTRANEOUS_DATA_CHECK(curr_len, 0);
2941 * 8.2.2 Attach complete
2944 nas_emm_attach_comp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
2946 guint32 curr_offset;
2950 curr_offset = offset;
2953 /* ESM message container ESM message container 9.9.3.15 M LV-E 2-n */
2954 ELEM_MAND_LV_E(NAS_PDU_TYPE_EMM, DE_EMM_ESM_MSG_CONT, NULL);
2956 EXTRANEOUS_DATA_CHECK(curr_len, 0);
2961 * 8.2.3 Attach reject
2964 nas_emm_attach_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
2966 guint32 curr_offset;
2970 curr_offset = offset;
2973 /* * EMM cause EMM cause 9.9.3.9 M V 1 */
2974 ELEM_MAND_V(NAS_PDU_TYPE_EMM, DE_EMM_CAUSE, NULL);
2975 /* 78 ESM message container ESM message container 9.9.3.15 O TLV-E 4-n */
2976 ELEM_OPT_TLV_E(0x78, NAS_PDU_TYPE_EMM, DE_EMM_ESM_MSG_CONT, NULL);
2977 /* 5F T3346 value GPRS timer 2 9.9.3.16A O TLV 3 */
2978 ELEM_OPT_TLV(0x5F, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3346 value");
2979 /* 16 T3402 value GPRS timer 2 9.9.3.16A O TLV 3 */
2980 ELEM_OPT_TLV(0x16, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3402 value");
2982 EXTRANEOUS_DATA_CHECK(curr_len, 0);
2986 * 8.2.4 Attach request
2989 nas_emm_attach_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
2991 guint32 curr_offset, bit_offset;
2995 curr_offset = offset;
2998 bit_offset = curr_offset<<3;
3000 /* NAS key set identifier NAS key set identifier 9.9.3.21 M V 1/2 */
3001 de_emm_nas_key_set_id_bits(tvb, tree, bit_offset, NULL);
3004 /* EPS attach type EPS attach type 9.9.3.11 M V 1/2
3007 proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3009 proto_tree_add_bits_item(tree, hf_nas_eps_emm_eps_att_type, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
3012 /* Fix the lengths */
3015 /* Old GUTI or IMSI EPS mobile identity 9.9.3.12 M LV 5-12 */
3016 ELEM_MAND_LV(NAS_PDU_TYPE_EMM, DE_EMM_EPS_MID, NULL);
3017 /* UE network capability UE network capability 9.9.3.34 M LV 3-14 */
3018 ELEM_MAND_LV(NAS_PDU_TYPE_EMM, DE_EMM_UE_NET_CAP, NULL);
3019 /* ESM message container ESM message container 9.9.3.15 M LV-E 2-n */
3020 ELEM_MAND_LV_E(NAS_PDU_TYPE_EMM, DE_EMM_ESM_MSG_CONT, NULL);
3021 /* 19 Old P-TMSI signature P-TMSI signature 10.5.5.8 O TV 4 */
3022 ELEM_OPT_TV( 0x19 , GSM_A_PDU_TYPE_GM, DE_P_TMSI_SIG, " - Old P-TMSI Signature");
3023 /* 50 Additional GUTI EPS mobile identity 9.9.3.12 O TLV 13 */
3024 ELEM_OPT_TLV( 0x50 , NAS_PDU_TYPE_EMM, DE_EMM_EPS_MID, " - Additional GUTI");
3025 /* 52 Last visited registered TAI Tracking area identity 9.9.3.32 O TV 6 */
3026 ELEM_OPT_TV(0x52, NAS_PDU_TYPE_EMM, DE_EMM_TRAC_AREA_ID, " - Last visited registered TAI");
3027 /* 5c DRX parameter DRX parameter 9.9.3.8 O TV 3 */
3028 ELEM_OPT_TV(0x5c, GSM_A_PDU_TYPE_GM, DE_DRX_PARAM, NULL );
3029 /* 31 MS network capability MS network capability 9.9.3.20 M LV 3-9 */
3030 ELEM_OPT_TLV( 0x31, GSM_A_PDU_TYPE_GM, DE_MS_NET_CAP , NULL );
3031 /* 13 Old location area identification Location area identification 9.9.2.2 O TV 6 */
3032 ELEM_OPT_TV(0x13, NAS_PDU_TYPE_COMMON, DE_EPS_CMN_LOC_AREA_ID, " - Old location area identification");
3033 /* 9- TMSI status TMSI status 9.9.3.31 O TV 1 */
3034 ELEM_OPT_TV_SHORT( 0x90 , GSM_A_PDU_TYPE_GM, DE_TMSI_STAT , NULL );
3035 /* 11 Mobile station classmark 2 Mobile station classmark 2 9.9.2.5 O TLV 5 */
3036 ELEM_OPT_TLV( 0x11, NAS_PDU_TYPE_COMMON, DE_EPS_MS_CM_2 , NULL );
3037 /* 20 Mobile station classmark 3 Mobile station classmark 3 9.9.2.5 O TLV 2-34 */
3038 ELEM_OPT_TLV( 0x20, NAS_PDU_TYPE_COMMON, DE_EPS_MS_CM_3 , NULL );
3039 /* 40 Supported Codecs Supported Codec List 9.9.2.10 O TLV 5-n */
3040 ELEM_OPT_TLV(0x40, GSM_A_PDU_TYPE_DTAP, DE_SUP_CODEC_LIST, " - Supported Codecs");
3041 /* F- Additional update type Additional update type 9.9.3.0B O TV 1 */
3042 ELEM_OPT_TV_SHORT( 0xF0 , NAS_PDU_TYPE_EMM, DE_EMM_ADD_UPD_TYPE, NULL );
3043 /* 5D Voice domain preference and UE's usage setting Voice domain preference and UE's usage setting 9.9.3.44 O TLV 3 */
3044 ELEM_OPT_TLV(0x5D, GSM_A_PDU_TYPE_GM, DE_VOICE_DOMAIN_PREF, NULL);
3045 /* D- Device properties Device properties 9.9.2.0A O TV 1 */
3046 ELEM_OPT_TV_SHORT(0xD0 , GSM_A_PDU_TYPE_GM, DE_DEVICE_PROPERTIES, NULL);
3047 /* E- Old GUTI type GUTI type 9.9.3.45 O TV 1 */
3048 ELEM_OPT_TV_SHORT(0xE0 , NAS_PDU_TYPE_EMM, DE_EMM_GUTI_TYPE, " - Old GUTI type");
3049 /* C- MS network feature support MS network feature support 9.9.3.20A 0 TV 1 */
3050 ELEM_OPT_TV_SHORT(0xC0 , GSM_A_PDU_TYPE_COMMON, DE_MS_NET_FEAT_SUP, NULL);
3051 /* 10 TMSI based NRI container Network resource identifier container 9.9.3.24A 0 TLV 4 */
3052 ELEM_OPT_TLV(0x10, GSM_A_PDU_TYPE_GM, DE_NET_RES_ID_CONT, " - TMSI based NRI container");
3054 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3057 * 8.2.5 Authentication failure
3060 nas_emm_auth_fail(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
3062 guint32 curr_offset;
3066 curr_offset = offset;
3069 /* EMM cause EMM cause 9.9.3.9 M V 1 */
3070 ELEM_MAND_V(NAS_PDU_TYPE_EMM, DE_EMM_CAUSE, NULL);
3071 /* 30 Authentication failure parameter Authentication failure parameter 9.9.3.1 O TLV 1 */
3072 ELEM_OPT_TLV(0x30, GSM_A_PDU_TYPE_DTAP, DE_AUTH_FAIL_PARAM, NULL);
3074 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3077 * 8.2.6 Authentication reject
3081 * 8.2.7 Authentication request
3085 nas_emm_auth_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
3087 guint32 curr_offset, bit_offset;
3091 curr_offset = offset;
3094 bit_offset = curr_offset<<3;
3096 /* Spare half octet Spare half octet 9.9.2.7 M V 1/2 */
3097 proto_tree_add_bits_item(tree, hf_nas_eps_emm_spare_half_octet, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
3101 * NAS key set identifierASME NAS key set identifier 9.9.3.21 M V 1/2
3103 de_emm_nas_key_set_id_bits(tvb, tree, bit_offset, " ASME");
3106 /* Fix the lengths */
3111 * Authentication parameter RAND (EPS challenge) 9.9.3.3 M V 16
3113 ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_AUTH_PARAM_RAND, " - EPS challenge");
3115 * Authentication parameter AUTN (EPS challenge) 9.9.3.2 M LV 17
3117 ELEM_MAND_LV(GSM_A_PDU_TYPE_DTAP, DE_AUTH_PARAM_AUTN, " - EPS challenge");
3119 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3123 * 8.2.8 Authentication response
3126 nas_emm_auth_resp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
3128 guint32 curr_offset;
3132 curr_offset = offset;
3136 * Authentication response parameter 9.9.3.4 M LV 5-17
3138 ELEM_MAND_LV(NAS_PDU_TYPE_EMM, DE_EMM_AUTH_RESP_PAR, NULL);
3140 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3144 * 8.2.9 CS service notification
3148 nas_emm_cs_serv_not(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
3150 guint32 curr_offset;
3154 curr_offset = offset;
3157 /* Paging identity Paging identity 9.9.3.25A M V 1 */
3158 ELEM_MAND_V(NAS_PDU_TYPE_EMM, DE_EMM_PAGING_ID, NULL);
3159 /* 60 CLI CLI 9.9.3.38 O TLV 3-12 */
3160 ELEM_OPT_TLV(0x60, GSM_A_PDU_TYPE_DTAP, DE_CLD_PARTY_BCD_NUM, " - CLI");
3161 /* 61 SS Code SS Code 9.9.3.39 O TV 2 */
3162 ELEM_OPT_TV(0x61, NAS_PDU_TYPE_EMM, DE_EMM_SS_CODE, NULL);
3163 /* 62 LCS indicator LCS indicator 9.9.3.40 O TV 2 */
3164 ELEM_OPT_TV(0x62, NAS_PDU_TYPE_EMM, DE_EMM_LCS_IND, NULL);
3165 /* 63 LCS client identity LCS client identity 9.9.3.41 O TLV 3-257 */
3166 ELEM_OPT_TLV(0x63, NAS_PDU_TYPE_EMM, DE_EMM_LCS_CLIENT_ID, NULL);
3168 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3171 * 8.2.10 Detach accept
3172 * 8.2.10.1 Detach accept (UE originating detach)
3174 * 8.2.10.2 Detach accept (UE terminated detach)
3178 * 8.2.11 Detach request
3179 * 8.2.11.1 Detach request (UE originating detach)
3183 nas_emm_detach_req_UL(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
3185 guint32 curr_offset,bit_offset;
3189 curr_offset = offset;
3192 proto_tree_add_text(tree, tvb, curr_offset, len, "Uplink");
3193 /* NAS key set identifier NAS key set identifier 9.9.3.21 M V 1/2 */
3194 bit_offset = curr_offset<<3;
3195 de_emm_nas_key_set_id_bits(tvb, tree, bit_offset, NULL);
3197 /* Detach type Detach type 9.9.3.6 M V 1/2 */
3198 proto_tree_add_bits_item(tree, hf_nas_eps_emm_switch_off, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3200 proto_tree_add_bits_item(tree, hf_nas_eps_emm_detach_type_UL, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
3203 /* Fix the lengths */
3207 /* GUTI or IMSI EPS mobile identity 9.9.3.12 M LV 5-12 */
3208 ELEM_MAND_LV(NAS_PDU_TYPE_EMM, DE_EMM_EPS_MID, NULL);
3213 * 8.2.11.2 Detach request (UE terminated detach)
3216 nas_emm_detach_req_DL(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
3218 guint32 curr_offset, bit_offset;
3222 curr_offset = offset;
3225 proto_tree_add_text(tree, tvb, curr_offset, len, "Downlink");
3226 /* Spare half octet Spare half octet 9.9.2.7 M V 1/2 */
3227 bit_offset = curr_offset<<3;
3228 proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
3230 /* Detach type Detach type 9.9.3.6 M V 1/2 */
3231 /* In the network to UE direction bit 4 is spare. The network shall set this bit to zero. */
3232 proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3234 proto_tree_add_bits_item(tree, hf_nas_eps_emm_detach_type_DL, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
3237 /* Fix the lengths */
3241 /* No more mandatory elements */
3245 /* EMM cause EMM cause 9.9.3.9 O TV 2 */
3246 ELEM_OPT_TV(0x53, NAS_PDU_TYPE_EMM, DE_EMM_CAUSE, NULL);
3248 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3253 nas_emm_detach_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
3256 guint32 curr_offset;
3261 curr_offset = offset;
3266 if (pinfo->link_dir == P2P_DIR_UL) {
3267 nas_emm_detach_req_UL(tvb, tree, pinfo, offset, len);
3269 }else if (pinfo->link_dir == P2P_DIR_DL) {
3270 nas_emm_detach_req_DL(tvb, tree, pinfo, offset, len);
3275 proto_tree_add_text(tree, tvb, curr_offset, len,"UL/DL not known, can't properly dissect");
3276 proto_tree_add_text(tree, tvb, curr_offset, len,"Trying to dissect as UE terminated detach");
3277 nas_emm_detach_req_DL(tvb, tree, pinfo, offset, len);
3278 proto_tree_add_text(tree, tvb, curr_offset, len,"Trying to dissect as UE originating detach");
3279 nas_emm_detach_req_UL(tvb, tree, pinfo, offset, len);
3282 nas_emm_detach_req_UL(tvb, tree, pinfo, offset, len);
3284 nas_emm_detach_req_DL(tvb, tree, pinfo, offset, len);
3292 * 8.2.12 Downlink NAS Transport
3295 nas_emm_dl_nas_trans(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
3297 guint32 curr_offset;
3301 curr_offset = offset;
3304 pinfo->link_dir = P2P_DIR_DL;
3306 /* NAS message container NAS message container 9.9.3.22 M LV 3-252 */
3307 ELEM_MAND_LV(NAS_PDU_TYPE_EMM, DE_EMM_NAS_MSG_CONT, NULL);
3309 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3312 * 8.2.13 EMM information
3315 nas_emm_emm_inf(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
3317 guint32 curr_offset;
3321 curr_offset = offset;
3324 /* 43 Full name for network Network name 9.9.3.24 O TLV 3-? */
3325 ELEM_OPT_TLV(0x43, GSM_A_PDU_TYPE_DTAP, DE_NETWORK_NAME, " - Full name for network");
3326 /* 45 Short name for network Network name 9.9.3.24 O TLV 3-? */
3327 ELEM_OPT_TLV(0x45, GSM_A_PDU_TYPE_DTAP, DE_NETWORK_NAME, " - Short Name");
3328 /* 46 Local time zone Time zone 9.9.3.29 O TV 2 */
3329 ELEM_OPT_TV(0x46, GSM_A_PDU_TYPE_DTAP, DE_TIME_ZONE, " - Local");
3330 /* 47 Universal time and local time zone Time zone and time 9.9.3.30 O TV 8 */
3331 ELEM_OPT_TV(0x47, GSM_A_PDU_TYPE_DTAP, DE_TIME_ZONE_TIME, " - Universal Time and Local Time Zone");
3332 /* 49 Network daylight saving time Daylight saving time 9.9.3.6 O TLV 3 */
3333 ELEM_OPT_TLV(0x49, GSM_A_PDU_TYPE_DTAP, DE_DAY_SAVING_TIME, NULL);
3335 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3343 nas_emm_emm_status(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
3345 guint32 curr_offset;
3349 curr_offset = offset;
3352 /* EMM cause EMM cause 9.9.3.9 M V 1 */
3353 ELEM_MAND_V(NAS_PDU_TYPE_EMM, DE_EMM_CAUSE, NULL);
3355 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3359 * 8.2.15 Extended service request
3362 nas_emm_ext_serv_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
3364 guint32 curr_offset,bit_offset;
3368 curr_offset = offset;
3371 bit_offset = curr_offset<<3;
3373 /* NAS key set identifier NAS key set identifier 9.9.3.21 M V 1/2 */
3374 de_emm_nas_key_set_id_bits(tvb, tree, bit_offset, NULL);
3376 /* Service type Service type 9.9.3.27 M V 1/2 Service type*/
3377 proto_tree_add_bits_item(tree, hf_nas_eps_service_type, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
3379 /* Fix up the lengths */
3383 /* M-TMSI Mobile identity 9.9.2.3 M LV 6 */
3384 ELEM_MAND_LV(NAS_PDU_TYPE_COMMON, DE_EPS_CMN_MOB_ID, " - M-TMSI");
3385 /* B- CSFB response CSFB response 9.9.3.5 C TV 1 */
3386 ELEM_OPT_TV_SHORT(0xb0, NAS_PDU_TYPE_EMM, DE_EMM_CSFB_RESP, NULL);
3387 /* 57 EPS bearer context status EPS bearer context status 9.9.2.1 O TLV 4 */
3388 ELEM_OPT_TLV(0x57, NAS_PDU_TYPE_COMMON, DE_EPS_CMN_EPS_BE_CTX_STATUS, NULL);
3389 /* D- Device properties Device properties 9.9.2.0A O TV 1 */
3390 ELEM_OPT_TV_SHORT(0xD0 , GSM_A_PDU_TYPE_GM, DE_DEVICE_PROPERTIES, NULL);
3392 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3395 * 8.2.16 GUTI reallocation command
3398 nas_emm_guti_realloc_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
3400 guint32 curr_offset;
3404 curr_offset = offset;
3407 /* GUTI EPS mobile identity 9.9.3.12 M LV 12 */
3408 ELEM_MAND_LV(NAS_PDU_TYPE_EMM, DE_EMM_EPS_MID, " - GUTI");
3410 /* 54 TAI list Tracking area identity list 9.9.3.33 O TLV 8-98 */
3411 ELEM_OPT_TLV(0x54, NAS_PDU_TYPE_EMM, DE_EMM_TRAC_AREA_ID_LST, NULL);
3413 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3417 * 8.2.17 GUTI reallocation complete
3421 * 8.2.18 Identity request
3425 nas_emm_id_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
3427 guint32 curr_offset, bit_offset;
3428 /*guint32 consumed;*/
3431 curr_offset = offset;
3435 bit_offset=curr_offset<<3;
3437 /* Spare half octet Spare half octet 9.9.2.7 M V 1/2 */
3438 proto_tree_add_bits_item(tree, hf_nas_eps_emm_spare_half_octet, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
3441 /* Identity type Identity type 2 9.9.3.17 M V 1/2 */
3442 proto_tree_add_bits_item(tree, hf_nas_eps_emm_id_type2, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
3447 /* Fix up the lengths */
3451 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3454 * 8.2.19 Identity response
3457 nas_emm_id_res(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
3459 guint32 curr_offset;
3463 curr_offset = offset;
3466 /* Mobile identity Mobile identity 9.9.2.3 M LV 4-10 */
3467 ELEM_MAND_LV(NAS_PDU_TYPE_COMMON, DE_EPS_CMN_MOB_ID, NULL);
3469 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3475 * 8.2.20 Security mode command
3478 nas_emm_sec_mode_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
3480 guint32 curr_offset, bit_offset;
3484 curr_offset = offset;
3487 /* Selected NAS security algorithms NAS security algorithms 9.9.3.23 M V 1 */
3488 ELEM_MAND_V(NAS_PDU_TYPE_EMM, DE_EMM_NAS_SEC_ALGS, " - Selected NAS security algorithms");
3490 bit_offset = curr_offset<<3;
3491 /* Spare half octet Spare half octet 9.9.2.7 M V 1/2 */
3492 proto_tree_add_bits_item(tree, hf_nas_eps_emm_spare_half_octet, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
3494 /* NAS key set identifierASME NAS key set identifier 9.9.3.21 M V 1/2 */
3495 de_emm_nas_key_set_id_bits(tvb, tree, bit_offset, " ASME");
3498 /* Fix up the lengths */
3502 /* Replayed UE security capabilities UE security capability 9.9.3.36 M LV 3-6 */
3503 ELEM_MAND_LV(NAS_PDU_TYPE_EMM, DE_EMM_UE_SEC_CAP, " - Replayed UE security capabilities");
3504 /* C- IMEISV request IMEISV request 9.9.3.18 O TV 1 */
3505 ELEM_OPT_TV_SHORT( 0xC0 , NAS_PDU_TYPE_EMM, DE_EMM_IMEISV_REQ , NULL );
3506 /* 55 Replayed NonceUE Nonce 9.9.3.25 O TV 5 */
3507 ELEM_OPT_TV(0x55, NAS_PDU_TYPE_EMM, DE_EMM_NONCE, " - Replayed NonceUE");
3508 /* 56 NonceMME Nonce 9.9.3.25 O TV 5 */
3509 ELEM_OPT_TV(0x56, NAS_PDU_TYPE_EMM, DE_EMM_NONCE, " - NonceMME");
3511 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3514 * 8.2.21 Security mode complete
3517 nas_emm_sec_mode_comp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
3519 guint32 curr_offset;
3523 curr_offset = offset;
3529 /* 23 IMEISV Mobile identity 9.9.2.3 O TLV 11 */
3530 ELEM_OPT_TLV(0x23, NAS_PDU_TYPE_COMMON, DE_EPS_CMN_MOB_ID, " - IMEISV");
3532 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3535 * 8.2.22 Security mode reject
3538 nas_emm_sec_mode_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
3540 guint32 curr_offset;
3544 curr_offset = offset;
3547 /* EMM cause EMM cause 9.9.3.9 M V 1 */
3548 ELEM_MAND_V(NAS_PDU_TYPE_EMM, DE_EMM_CAUSE, NULL);
3550 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3553 * 8.2.23 Security protected NAS message
3557 nas_emm_sec_prot_msg(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
3559 guint32 curr_offset;
3561 guint8 security_header_type;
3563 curr_offset = offset;
3566 /* Security header type Security header type 9.3.1 M V 1/2 */
3567 security_header_type = tvb_get_guint8(tvb,offset)>>4;
3568 proto_tree_add_item(tree, hf_nas_eps_security_header_type, tvb, 0, 1, ENC_BIG_ENDIAN);
3569 /* Protocol discriminator Protocol discriminator 9.2 M V 1/2 */
3570 proto_tree_add_item(tree, hf_gsm_a_L3_protocol_discriminator, tvb, 0, 1, ENC_BIG_ENDIAN);
3572 /* Message authentication code Message authentication code 9.5 M V 4 */
3573 if (security_header_type != 0) {
3574 /* Message authentication code */
3575 proto_tree_add_item(tree, hf_nas_eps_msg_auth_code, tvb, offset, 4, ENC_BIG_ENDIAN);
3577 if ((security_header_type == 2)||(security_header_type == 4)) {
3578 /* Integrity protected and ciphered = 2, Integrity protected and ciphered with new EPS security context = 4 */
3579 proto_tree_add_text(tree, tvb, offset, len-5,"Ciphered message");
3583 proto_tree_add_text(tree, tvb, offset, len,"Not a security protected message");
3586 /* Sequence number Sequence number 9.6 M V 1 */
3587 proto_tree_add_item(tree, hf_nas_eps_seq_no, tvb, offset, 1, ENC_BIG_ENDIAN);
3589 /* NAS message NAS message 9.7 M V 1-n */
3594 * 8.2.24 Service reject
3597 nas_emm_serv_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
3599 guint32 curr_offset;
3603 curr_offset = offset;
3606 /* EMM cause EMM cause 9.9.3.9 M V 1 */
3607 ELEM_MAND_V(NAS_PDU_TYPE_EMM, DE_EMM_CAUSE, NULL);
3608 /* 5B T3442 value GPRS timer 9.9.3.16 C TV 2 */
3609 ELEM_OPT_TV(0x5b, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER, " - T3442 value");
3610 /* 5F T3346 value GPRS timer 2 9.9.3.16A O TLV 3 */
3611 ELEM_OPT_TLV(0x5F, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3346 value");
3613 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3616 * 8.2.25 Service request
3617 * This message is sent by the UE to the network to request the establishment
3618 * of a NAS signalling connection and of the radio and S1 bearers.
3619 * Its structure does not follow the structure of a standard layer 3 message. See table 8.2.25.1.
3622 * Protocol discriminator Protocol discriminator 9.2 M V 1/2
3623 * Security header type Security header type 9.3.1 M V 1/2
3624 * KSI and sequence number KSI and sequence number 9.9.3.19 M V 1
3625 * Message authentication code (short) Short MAC 9.9.3.28 M V 2
3628 nas_emm_service_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
3630 guint32 curr_offset;
3634 curr_offset = offset;
3637 /* KSI and sequence number 9.9.3.19 M V 1 */
3638 ELEM_MAND_V(NAS_PDU_TYPE_EMM, DE_EMM_KSI_AND_SEQ_NO, NULL);
3640 /* Short MAC 9.9.3.28 M V 2 */
3641 ELEM_MAND_V(NAS_PDU_TYPE_EMM, DE_EMM_SHORT_MAC, " - Message authentication code (short)");
3643 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3647 * 8.2.26 Tracking area update accept
3650 nas_emm_trac_area_upd_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
3652 guint32 curr_offset, bit_offset;
3656 curr_offset = offset;
3659 /* Spare half octet Spare half octet 9.9.2.7 M V 1/2 */
3660 bit_offset = curr_offset<<3;
3661 proto_tree_add_bits_item(tree, hf_nas_eps_emm_spare_half_octet, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
3663 /* EPS update result EPS update result 9.9.3.13 M V 1/2 */
3664 proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3666 proto_tree_add_bits_item(tree, hf_nas_eps_eps_update_result_value, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
3668 /* Fix up the lengths */
3671 /* No more mandatory elements */
3674 /* 5A T3412 value GPRS timer 9.9.3.16 O TV 2 */
3675 ELEM_OPT_TV(0x5a, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER, " - T3412 value");
3676 /* 50 GUTI EPS mobile identity 9.9.3.12 O TLV 13 */
3677 ELEM_OPT_TLV(0x50, NAS_PDU_TYPE_EMM, DE_EMM_EPS_MID, " - GUTI");
3678 /* 54 TAI list Tracking area identity list 9.9.3.33 O TLV 8-98 */
3679 ELEM_OPT_TLV(0x54, NAS_PDU_TYPE_EMM, DE_EMM_TRAC_AREA_ID_LST, NULL);
3680 /* 57 EPS bearer context status EPS bearer context status 9.9.2.1 O TLV 4 */
3681 ELEM_OPT_TLV(0x57, NAS_PDU_TYPE_COMMON, DE_EPS_CMN_EPS_BE_CTX_STATUS, NULL);
3682 /* 13 Location area identification Location area identification 9.9.2.2 O TV 6 */
3683 ELEM_OPT_TV(0x13, NAS_PDU_TYPE_COMMON, DE_EPS_CMN_LOC_AREA_ID, NULL);
3684 /* 23 MS identity Mobile identity 9.9.2.3 O TLV 7-10 */
3685 ELEM_OPT_TLV(0x23, NAS_PDU_TYPE_COMMON, DE_EPS_CMN_MOB_ID, " - MS identity");
3686 /* 53 EMM cause EMM cause 9.9.3.9 O TV 2 */
3687 ELEM_OPT_TV(0x53, NAS_PDU_TYPE_EMM, DE_EMM_CAUSE, NULL);
3688 /* 17 T3402 value GPRS timer 9.9.3.16 O TV 2 */
3689 ELEM_OPT_TV(0x17, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER, " - T3402 value");
3690 /* 59 T3423 value GPRS timer 9.9.3.16 O TV 2 */
3691 ELEM_OPT_TV(0x59, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER, " - T3423 value");
3692 /* 4A Equivalent PLMNs PLMN list 9.9.2.8 O TLV 5-47 */
3693 ELEM_OPT_TLV(0x4a, GSM_A_PDU_TYPE_COMMON, DE_PLMN_LIST, " - PLMN list");
3694 /* 34 Emergency Number List Emergency Number List 9.9.3.37 O TLV 5-50 */
3695 ELEM_OPT_TLV(0x34, GSM_A_PDU_TYPE_DTAP, DE_EMERGENCY_NUM_LIST, NULL);
3696 /* 64 EPS network feature support EPS network feature support 9.9.3.12A O TLV 3 */
3697 ELEM_OPT_TLV(0x64, NAS_PDU_TYPE_EMM, DE_EMM_EPS_NET_FEATURE_SUP, NULL);
3698 /* F- Additional update result Additional update result 9.9.3.0A O TV 1 */
3699 ELEM_OPT_TV_SHORT( 0xF0 , NAS_PDU_TYPE_EMM, DE_EMM_ADD_UPD_RES, NULL );
3700 /* 5E T3412 extended value GPRS timer 3 9.9.3.16B O TLV 3 */
3701 ELEM_OPT_TLV(0x5E, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - T3412 extended value");
3703 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3706 * 8.2.27 Tracking area update complete
3710 * 8.2.28 Tracking area update reject
3713 nas_emm_trac_area_upd_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
3715 guint32 curr_offset;
3719 curr_offset = offset;
3722 /* EMM cause EMM cause 9.9.3.9 M V 1 */
3723 ELEM_MAND_V(NAS_PDU_TYPE_EMM, DE_EMM_CAUSE, NULL);
3724 /* 5F T3346 value GPRS timer 2 9.9.3.16A O TLV 3 */
3725 ELEM_OPT_TLV(0x5F, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3346 value");
3727 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3730 * 8.2.29 Tracking area update request
3733 nas_emm_trac_area_upd_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
3736 guint32 curr_offset, bit_offset;
3740 curr_offset = offset;
3743 bit_offset = curr_offset<<3;
3745 /* NAS key set identifierASME NAS key set identifier 9.9.3.21 M V 1/2 */
3746 de_emm_nas_key_set_id_bits(tvb, tree, bit_offset, " ASME");
3749 /* EPS update type EPS update type 9.9.3.14 M V 1/2 */
3750 proto_tree_add_bits_item(tree, hf_nas_eps_active_flg, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3752 proto_tree_add_bits_item(tree, hf_nas_eps_eps_update_type_value, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
3755 /* Fix the lengths */
3758 /* Old GUTI EPS mobile identity 9.9.3.12 M LV 12 */
3759 ELEM_MAND_LV(NAS_PDU_TYPE_EMM, DE_EMM_EPS_MID, " - Old GUTI");
3760 /* No more Mandatory elements */
3762 /* B- NAS key set identifier Non-current native NAS key set identifier 9.9.3.21 O TV 1 */
3763 ELEM_OPT_TV_SHORT( 0xb0 , NAS_PDU_TYPE_EMM, DE_EMM_NAS_KEY_SET_ID , " - Non-current native NAS key set identifier" );
3764 /* 8- GPRS ciphering key sequence number Ciphering key sequence number 9.9.3.4a O TV 1 */
3765 ELEM_OPT_TV_SHORT(0x80, GSM_A_PDU_TYPE_COMMON, DE_CIPH_KEY_SEQ_NUM, " - GPRS ciphering key sequence number");
3766 /* 19 Old P-TMSI signature P-TMSI signature 9.9.3.26 O TV 4 */
3767 ELEM_OPT_TV( 0x19 , GSM_A_PDU_TYPE_GM, DE_P_TMSI_SIG, " - Old P-TMSI Signature");
3768 /* 50 Additional GUTI EPS mobile identity 9.9.3.12 O TLV 13 */
3769 ELEM_OPT_TLV(0x50, NAS_PDU_TYPE_EMM, DE_EMM_EPS_MID, " - Additional GUTI");
3770 /* 55 NonceUE Nonce 9.9.3.25 O TV 5 */
3771 ELEM_OPT_TV(0x55, NAS_PDU_TYPE_EMM, DE_EMM_NONCE, " - NonceUE");
3772 /* 58 UE network capability UE network capability 9.9.3.34 O TLV 4-15 */
3773 ELEM_OPT_TLV(0x58, NAS_PDU_TYPE_EMM, DE_EMM_UE_NET_CAP, NULL);
3774 /* 52 Last visited registered TAI Tracking area identity 9.9.3.32 O TV 6 */
3775 ELEM_OPT_TV(0x52, NAS_PDU_TYPE_EMM, DE_EMM_TRAC_AREA_ID, " - Last visited registered TAI");
3776 /* 5C DRX parameter DRX parameter 9.9.3.8 O TV 3 */
3777 ELEM_OPT_TV(0x5c, GSM_A_PDU_TYPE_GM, DE_DRX_PARAM, NULL );
3778 /* A- UE radio capability information update needed UE radio capability information update needed 9.9.3.35 O TV 1 */
3779 ELEM_OPT_TV_SHORT( 0xA0 , NAS_PDU_TYPE_EMM, DE_EMM_UE_RA_CAP_INF_UPD_NEED , NULL );
3780 /* 57 EPS bearer context status EPS bearer context status 9.9.2.1 O TLV 4 */
3781 ELEM_OPT_TLV(0x57, NAS_PDU_TYPE_COMMON, DE_EPS_CMN_EPS_BE_CTX_STATUS, NULL);
3782 /* 31 MS network capability MS network capability 9.9.3.20 O TLV 4-10 */
3783 ELEM_OPT_TLV( 0x31 , GSM_A_PDU_TYPE_GM, DE_MS_NET_CAP , NULL );
3784 /* 13 Old location area identification Location area identification 9.9.2.2 O TV 6 */
3785 ELEM_OPT_TV(0x13, NAS_PDU_TYPE_COMMON, DE_EPS_CMN_LOC_AREA_ID, " - Old location area identification");
3786 /* 9- TMSI status TMSI status 9.9.3.31 O TV 1 */
3787 ELEM_OPT_TV_SHORT( 0x90 , GSM_A_PDU_TYPE_GM, DE_TMSI_STAT , NULL );
3788 /* 11 Mobile station classmark 2 Mobile station classmark 2 9.9.2.5 O TLV 5 */
3789 ELEM_OPT_TLV( 0x11, NAS_PDU_TYPE_COMMON, DE_EPS_MS_CM_2 , NULL );
3790 /* 20 Mobile station classmark 3 Mobile station classmark 3 9.9.2.5 O TLV 2-34 */
3791 ELEM_OPT_TLV( 0x20, NAS_PDU_TYPE_COMMON, DE_EPS_MS_CM_3 , NULL );
3792 /* 40 Supported Codecs Supported Codec List 9.9.2.10 O TLV 5-n */
3793 ELEM_OPT_TLV(0x40, GSM_A_PDU_TYPE_DTAP, DE_SUP_CODEC_LIST, " - Supported Codecs");
3794 /* F- Additional update type Additional update type 9.9.3.0B O TV 1 */
3795 ELEM_OPT_TV_SHORT( 0xF0 , NAS_PDU_TYPE_EMM, DE_EMM_ADD_UPD_TYPE, NULL );
3796 /* 5D Voice domain preference and UE's usage setting Voice domain preference and UE's usage setting 9.9.3.44 O TLV 3 */
3797 ELEM_OPT_TLV(0x5D, GSM_A_PDU_TYPE_GM, DE_VOICE_DOMAIN_PREF, NULL);
3798 /* E- Old GUTI type GUTI type 9.9.3.45 O TV 1 */
3799 ELEM_OPT_TV_SHORT(0xE0 , NAS_PDU_TYPE_EMM, DE_EMM_GUTI_TYPE, " - Old GUTI type");
3800 /* D- Device properties Device properties 9.9.2.0A O TV 1 */
3801 ELEM_OPT_TV_SHORT(0xD0 , GSM_A_PDU_TYPE_GM, DE_DEVICE_PROPERTIES, NULL);
3802 /* C- MS network feature support MS network feature support 9.9.3.20A 0 TV 1 */
3803 ELEM_OPT_TV_SHORT(0xC0 , GSM_A_PDU_TYPE_COMMON, DE_MS_NET_FEAT_SUP, NULL);
3804 /* 10 TMSI based NRI container Network resource identifier container 9.9.3.24A 0 TLV 4 */
3805 ELEM_OPT_TLV(0x10, GSM_A_PDU_TYPE_GM, DE_NET_RES_ID_CONT, " - TMSI based NRI container");
3807 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3811 * 8.2.30 Uplink NAS Transport
3814 nas_emm_ul_nas_trans(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
3816 guint32 curr_offset;
3820 curr_offset = offset;
3823 pinfo->link_dir = P2P_DIR_UL;
3825 /* NAS message container NAS message container 9.9.3.22 M LV 3-252*/
3826 ELEM_MAND_LV(NAS_PDU_TYPE_EMM, DE_EMM_NAS_MSG_CONT, NULL);
3828 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3832 * 8.2.31 Downlink generic NAS transport
3835 nas_emm_dl_gen_nas_trans(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
3837 guint32 curr_offset;
3841 curr_offset = offset;
3844 pinfo->link_dir = P2P_DIR_DL;
3846 /* Generic message container type Generic message container type 9.9.3.42 M V 1 */
3847 ELEM_MAND_V(NAS_PDU_TYPE_EMM, DE_EMM_GEN_MSG_CONT_TYPE, NULL);
3848 /* Generic message container Generic message container 9.9.3.43 M LV-E 3-n */
3849 ELEM_MAND_LV_E(NAS_PDU_TYPE_EMM, DE_EMM_GEN_MSG_CONT, NULL)
3850 /* 65 Additional information Additional information 9.9.2.0 O TLV 3-n */
3851 ELEM_OPT_TLV(0x65, NAS_PDU_TYPE_COMMON, DE_EPS_CMN_ADD_INFO, NULL);
3853 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3855 eps_nas_gen_msg_cont_type = 0;
3859 * 8.2.32 Uplink generic NAS transport
3862 nas_emm_ul_gen_nas_trans(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
3864 guint32 curr_offset;
3868 curr_offset = offset;
3871 pinfo->link_dir = P2P_DIR_UL;
3873 /* Generic message container type Generic message container type 9.9.3.42 M V 1 */
3874 ELEM_MAND_V(NAS_PDU_TYPE_EMM, DE_EMM_GEN_MSG_CONT_TYPE, NULL);
3875 /* Generic message container Generic message container 9.9.3.43 M LV-E 3-n */
3876 ELEM_MAND_LV_E(NAS_PDU_TYPE_EMM, DE_EMM_GEN_MSG_CONT, NULL)
3877 /* 65 Additional information Additional information 9.9.2.0 O TLV 3-n */
3878 ELEM_OPT_TLV(0x65, NAS_PDU_TYPE_COMMON, DE_EPS_CMN_ADD_INFO, NULL);
3880 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3882 eps_nas_gen_msg_cont_type = 0;
3886 * 8.3 EPS session management messages
3890 * 8.3.1 Activate dedicated EPS bearer context accept
3893 nas_esm_act_ded_eps_bearer_ctx_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
3895 guint32 curr_offset;
3902 curr_offset = offset;
3905 /* This message is sent by the UE to the network */
3906 pinfo->link_dir = P2P_DIR_UL;
3908 /* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */
3909 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
3911 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3915 * 8.3.2 Activate dedicated EPS bearer context reject
3918 nas_esm_act_ded_eps_bearer_ctx_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
3920 guint32 curr_offset;
3924 curr_offset = offset;
3927 /* This message is sent by UE to the network to reject activation of a dedicated EPS bearer context */
3928 pinfo->link_dir = P2P_DIR_UL;
3930 /* ESM cause ESM cause 9.9.4.2 M V 1 */
3931 ELEM_MAND_V(NAS_PDU_TYPE_ESM, DE_ESM_CAUSE, NULL);
3932 /* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */
3933 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
3935 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3938 * 8.3.3 Activate dedicated EPS bearer context request
3941 nas_esm_act_ded_eps_bearer_ctx_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
3943 guint32 curr_offset, bit_offset;
3947 curr_offset = offset;
3950 /* This message is sent by the network to the UE to request activation of a dedicated EPS bearer context... */
3951 pinfo->link_dir = P2P_DIR_DL;
3954 /* Spare half octet Spare half octet 9.9.2.9 M V 1/2 */
3955 bit_offset = curr_offset<<3;
3956 proto_tree_add_bits_item(tree, hf_nas_eps_emm_spare_half_octet, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
3958 /* Linked EPS bearer identity Linked EPS bearer identity 9.9.4.6 M V 1/2 */
3959 proto_tree_add_bits_item(tree, hf_nas_eps_esm_linked_bearer_id, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
3961 /* Fix the lengths */
3965 /* EPS QoS EPS quality of service 9.9.4.3 M LV 2-10 */
3966 ELEM_MAND_LV(NAS_PDU_TYPE_ESM, DE_ESM_EPS_QOS, NULL);
3967 /* TFT Traffic flow template 9.9.4.16 M LV 2-256 */
3968 ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_TRAFFIC_FLOW_TEMPLATE , NULL );
3969 /* 5D Transaction identifier Transaction identifier 9.9.4.17 O TLV 3-4 */
3970 ELEM_OPT_TLV( 0x5d , GSM_A_PDU_TYPE_GM, DE_LINKED_TI , " - Transaction identifier" );
3971 /* 30 Negotiated QoS Quality of service 9.9.4.12 O TLV 14-18 */
3972 ELEM_OPT_TLV( 0x30 , GSM_A_PDU_TYPE_GM, DE_QOS , " - Negotiated QoS" );
3973 /* 32 Negotiated LLC SAPI LLC service access point identifier 9.9.4.7 O TV 2 */
3974 ELEM_OPT_TV( 0x32 , GSM_A_PDU_TYPE_GM, DE_LLC_SAPI , " - Negotiated LLC SAPI" );
3975 /* 8- Radio priority Radio priority 9.9.4.13 O TV 1 */
3976 ELEM_OPT_TV_SHORT ( 0x80 , GSM_A_PDU_TYPE_GM , DE_RAD_PRIO , NULL );
3977 /* 34 Packet flow Identifier Packet flow Identifier 9.9.4.8 O TLV 3 */
3978 ELEM_OPT_TLV( 0x34 , GSM_A_PDU_TYPE_GM, DE_PACKET_FLOW_ID , NULL );
3979 /* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */
3980 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
3982 EXTRANEOUS_DATA_CHECK(curr_len, 0);
3986 * 8.3.4 Activate default EPS bearer context accept
3989 nas_esm_act_def_eps_bearer_ctx_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
3991 guint32 curr_offset;
3995 curr_offset = offset;
4001 /* This message is sent by the UE to the network to acknowledge activation of a default EPS bearer context */
4002 pinfo->link_dir = P2P_DIR_UL;
4004 /* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */
4005 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
4007 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4011 * 8.3.5 Activate default EPS bearer context reject
4014 nas_esm_act_def_eps_bearer_ctx_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
4016 guint32 curr_offset;
4020 curr_offset = offset;
4023 /* This message is sent by UE to the network to reject activation of a default EPS bearer context. */
4024 pinfo->link_dir = P2P_DIR_UL;
4026 /* ESM cause ESM cause 9.9.4.4 M V 1 */
4027 ELEM_MAND_V(NAS_PDU_TYPE_ESM, DE_ESM_CAUSE, NULL);
4028 /* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */
4029 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
4031 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4035 * 8.3.6 Activate default EPS bearer context request
4038 nas_esm_act_def_eps_bearer_ctx_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
4040 guint32 curr_offset;
4044 curr_offset = offset;
4047 /* This message is sent by the network to the UE to request activation of a default EPS bearer context. */
4048 pinfo->link_dir = P2P_DIR_DL;
4050 /* EPS QoS EPS quality of service 9.9.4.3 M LV 2-10 */
4051 ELEM_MAND_LV(NAS_PDU_TYPE_ESM, DE_ESM_EPS_QOS, NULL);
4052 /* Access point name Access point name 9.9.4.1 M LV 2-101 */
4053 ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_ACC_POINT_NAME , NULL );
4054 /* PDN address PDN address 9.9.4.9 M LV 6-14 DE_ESM_PDN_ADDR*/
4055 ELEM_MAND_LV( NAS_PDU_TYPE_ESM, DE_ESM_PDN_ADDR , NULL );
4056 /* 5D Transaction identifier Transaction identifier 9.9.4.17 O TLV 3-4 */
4057 ELEM_OPT_TLV( 0x5d , GSM_A_PDU_TYPE_GM, DE_LINKED_TI , " - Transaction identifier" );
4058 /* 30 Negotiated QoS Quality of service 9.9.4.12 O TLV 14-18 */
4059 ELEM_OPT_TLV( 0x30 , GSM_A_PDU_TYPE_GM, DE_QOS , " - Negotiated QoS" );
4060 /* 32 Negotiated LLC SAPI LLC service access point identifier 9.9.4.7 O TV 2 */
4061 ELEM_OPT_TV( 0x32 , GSM_A_PDU_TYPE_GM, DE_LLC_SAPI , " - Negotiated LLC SAPI" );
4062 /* 8- Radio priority Radio priority 9.9.4.13 O TV 1 */
4063 ELEM_OPT_TV_SHORT ( 0x80 , GSM_A_PDU_TYPE_GM , DE_RAD_PRIO , NULL );
4064 /* 34 Packet flow Identifier Packet flow Identifier 9.9.4.8 O TLV 3 */
4065 ELEM_OPT_TLV( 0x34 , GSM_A_PDU_TYPE_GM, DE_PACKET_FLOW_ID , NULL );
4066 /* 5E APN-AMBR APN aggregate maximum bit rate 9.9.4.2 O TLV 4-8 DE_ESM_APN_AGR_MAX_BR*/
4067 ELEM_OPT_TLV( 0x5e , NAS_PDU_TYPE_ESM, DE_ESM_APN_AGR_MAX_BR , NULL );
4068 /* 58 ESM cause ESM cause 9.9.4.4 O TV 2 */
4069 ELEM_OPT_TV( 0x58 , NAS_PDU_TYPE_ESM, DE_ESM_CAUSE , NULL );
4070 /* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */
4071 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
4072 /* B- Connectivity type Connectivity type 9.9.4.2A 0 TV 1 */
4073 ELEM_OPT_TV_SHORT(0xB0 , GSM_A_PDU_TYPE_GM, DE_SM_CONNECTIVITY_TYPE, NULL);
4075 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4079 * 8.3.7 Bearer resource allocation reject
4082 nas_esm_bearer_res_all_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
4084 guint32 curr_offset;
4088 curr_offset = offset;
4091 /* This message is sent by the network to the UE to reject the allocation of a dedicated bearer resource. */
4092 pinfo->link_dir = P2P_DIR_DL;
4094 /* ESM cause ESM cause 9.9.4.4 M V 1 */
4095 ELEM_MAND_V(NAS_PDU_TYPE_ESM, DE_ESM_CAUSE, NULL);
4096 /* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */
4097 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
4098 /* 37 T3396 value GPRS timer 3 9.9.3.16B O TLV 3 */
4099 ELEM_OPT_TLV(0x37, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - T3396 value");
4101 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4105 * 8.3.8 Bearer resource allocation request
4108 nas_esm_bearer_res_all_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
4110 guint32 curr_offset, bit_offset;
4114 curr_offset = offset;
4117 /* This message is sent by the UE to the network to request the allocation of a dedicated bearer resource. */
4118 pinfo->link_dir = P2P_DIR_UL;
4120 /* Spare half octet Spare half octet 9.9.2.9 M V 1/2 */
4121 bit_offset = curr_offset<<3;
4122 proto_tree_add_bits_item(tree, hf_nas_eps_emm_spare_half_octet, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
4124 /* Linked EPS bearer identity Linked EPS bearer identity 9.9.4.6 M V 1/2 */
4125 proto_tree_add_bits_item(tree, hf_nas_eps_esm_linked_bearer_id, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
4127 /* Fix the lengths */
4131 /* Traffic flow aggregate Traffic flow aggregate description 9.9.4.15 M LV 2-256 */
4132 ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_TRAFFIC_FLOW_TEMPLATE , " - Traffic flow aggregate" );
4133 /* Required traffic flow QoS EPS quality of service 9.9.4.3 M LV 2-10 */
4134 ELEM_MAND_LV(NAS_PDU_TYPE_ESM, DE_ESM_EPS_QOS, " - Required traffic flow QoS");
4135 /* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */
4136 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
4137 /* C- Device properties Device properties 9.9.2.0A O TV 1 */
4138 ELEM_OPT_TV_SHORT(0xC0 , GSM_A_PDU_TYPE_GM, DE_DEVICE_PROPERTIES, NULL);
4140 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4143 * 8.3.9 Bearer resource modification reject
4146 nas_esm_bearer_res_mod_rej(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 network to the UE to reject the modification of a dedicated bearer resource. */
4156 pinfo->link_dir = P2P_DIR_DL;
4158 /* ESM cause ESM cause 9.9.4.4 M V 1 */
4159 ELEM_MAND_V(NAS_PDU_TYPE_ESM, DE_ESM_CAUSE, NULL);
4160 /* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */
4161 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
4162 /* 37 T3396 value GPRS timer 3 9.9.3.16B O TLV 3 */
4163 ELEM_OPT_TLV(0x37, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - T3396 value");
4165 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4168 * 8.3.10 Bearer resource modification request
4171 nas_esm_bearer_res_mod_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
4173 guint32 curr_offset, bit_offset;
4177 curr_offset = offset;
4180 /* This message is sent by the UE to the network to request the modification of a dedicated bearer resource. */
4181 pinfo->link_dir = P2P_DIR_UL;
4183 /* Spare half octet Spare half octet 9.9.2.9 M V 1/2 */
4184 bit_offset = curr_offset<<3;
4185 proto_tree_add_bits_item(tree, hf_nas_eps_emm_spare_half_octet, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
4187 /* EPS bearer identity for packet filter Linked EPS bearer identity 9.9.4.6 M V 1/2 */
4188 proto_tree_add_bits_item(tree, hf_nas_eps_esm_linked_bearer_id, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
4190 /* Fix the lengths */
4193 /* Traffic flow aggregate Traffic flow aggregate description 9.9.4.15 M LV 2-256 */
4194 ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_TRAFFIC_FLOW_TEMPLATE , " - Traffic flow aggregate" );
4195 /* 5B Required traffic flow QoS EPS quality of service 9.9.4.3 O TLV 3-11 */
4196 ELEM_OPT_TLV( 0x5B , NAS_PDU_TYPE_ESM, DE_ESM_EPS_QOS , " - Required traffic flow QoS" );
4197 /* 58 ESM cause ESM cause 9.9.4.4 O TV 2 */
4198 ELEM_OPT_TV( 0x58 , NAS_PDU_TYPE_ESM, DE_ESM_CAUSE , NULL );
4199 /* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */
4200 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
4201 /* C- Device properties Device properties 9.9.2.0A O TV 1 */
4202 ELEM_OPT_TV_SHORT(0xC0 , GSM_A_PDU_TYPE_GM, DE_DEVICE_PROPERTIES, NULL);
4204 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4207 * 8.3.11 Deactivate EPS bearer context accept
4210 nas_esm_deact_eps_bearer_ctx_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
4212 guint32 curr_offset;
4216 curr_offset = offset;
4222 /* This message is sent by the UE to acknowledge deactivation of the EPS bearer context... */
4223 pinfo->link_dir = P2P_DIR_UL;
4225 /* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV */
4226 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
4228 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4231 * 8.3.12 Deactivate EPS bearer context request
4234 nas_esm_deact_eps_bearer_ctx_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
4236 guint32 curr_offset;
4240 curr_offset = offset;
4243 /* This message is sent by the network to request deactivation of an active EPS bearer context. */
4244 pinfo->link_dir = P2P_DIR_DL;
4246 /* ESM cause ESM cause 9.9.4.4 M V 1 */
4247 ELEM_MAND_V(NAS_PDU_TYPE_ESM, DE_ESM_CAUSE, NULL);
4248 /* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV */
4249 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
4250 /* 37 T3396 value GPRS timer 3 9.9.3.16B O TLV 3 */
4251 ELEM_OPT_TLV(0x37, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - T3396 value");
4253 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4257 * 8.3.13 ESM information request
4261 nas_esm_inf_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
4263 guint32 curr_offset;
4266 curr_offset = offset;
4269 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4272 * 8.3.14 ESM information response
4275 nas_esm_inf_resp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
4277 guint32 curr_offset;
4281 curr_offset = offset;
4287 /* This message is sent by the UE to the network in response to an ESM INFORMATION REQUEST... */
4288 pinfo->link_dir = P2P_DIR_UL;
4290 /* 28 Access point name Access point name 9.9.4.1 O TLV 3-102 */
4291 ELEM_OPT_TLV( 0x28 , GSM_A_PDU_TYPE_GM, DE_ACC_POINT_NAME , NULL );
4292 /* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */
4293 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
4295 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4301 nas_esm_status(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
4303 guint32 curr_offset;
4307 curr_offset = offset;
4310 /* ESM cause ESM cause 9.9.4.4 M V 1 */
4311 ELEM_MAND_V(NAS_PDU_TYPE_ESM, DE_ESM_CAUSE, NULL);
4313 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4316 * 8.3.16 Modify EPS bearer context accept
4319 nas_esm_mod_eps_bearer_ctx_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
4321 guint32 curr_offset;
4325 curr_offset = offset;
4331 /* This message is sent by the UE to the network to acknowledge the modification of an active EPS bearer context. */
4332 pinfo->link_dir = P2P_DIR_UL;
4334 /* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */
4335 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
4337 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4340 * 8.3.17 Modify EPS bearer context reject
4343 nas_esm_mod_eps_bearer_ctx_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
4345 guint32 curr_offset;
4349 curr_offset = offset;
4352 /* This message is sent by the UE or the network to reject a modification of an active EPS bearer context. */
4353 pinfo->link_dir = P2P_DIR_UL;
4355 /* ESM cause ESM cause 9.9.4.4 M V 1 */
4356 ELEM_MAND_V(NAS_PDU_TYPE_ESM, DE_ESM_CAUSE, NULL);
4357 /* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */
4358 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
4360 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4363 * 8.3.18 Modify EPS bearer context request
4366 nas_esm_mod_eps_bearer_ctx_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
4368 guint32 curr_offset;
4372 curr_offset = offset;
4378 /*This message is sent by the network to inform the UE about events which are relevant for the upper layer... */
4379 pinfo->link_dir = P2P_DIR_DL;
4381 /* 5B New EPS QoS EPS quality of service 9.9.4.3 O TLV 3-11 */
4382 ELEM_OPT_TLV( 0x5B , NAS_PDU_TYPE_ESM, DE_ESM_EPS_QOS , " - New EPS QoS" );
4383 /* 36 TFT Traffic flow template 9.9.4.16 O TLV 3-257 */
4384 ELEM_OPT_TLV( 0x36 , GSM_A_PDU_TYPE_GM, DE_TRAFFIC_FLOW_TEMPLATE , NULL );
4385 /* 30 New QoS Quality of service 9.9.4.12 O TLV 14-18 */
4386 ELEM_OPT_TLV( 0x30 , GSM_A_PDU_TYPE_GM, DE_QOS , " - New QoS" );
4387 /* 32 Negotiated LLC SAPI LLC service access point identifier 9.9.4.7 O TV 2 */
4388 ELEM_OPT_TV( 0x32 , GSM_A_PDU_TYPE_GM, DE_LLC_SAPI , " - Negotiated LLC SAPI" );
4389 /* 8- Radio priority Radio priority 9.9.4.13 O TV 1 */
4390 ELEM_OPT_TV_SHORT ( 0x80 , GSM_A_PDU_TYPE_GM , DE_RAD_PRIO , NULL );
4391 /* 34 Packet flow Identifier Packet flow Identifier 9.9.4.8 O TLV 3 */
4392 ELEM_OPT_TLV( 0x34 , GSM_A_PDU_TYPE_GM, DE_PACKET_FLOW_ID , NULL );
4393 /* 5E APN-AMBR APN aggregate maximum bit rate 9.9.4.2 O TLV 4-8 */
4394 ELEM_OPT_TLV( 0x5E , NAS_PDU_TYPE_ESM, DE_ESM_APN_AGR_MAX_BR , NULL );
4395 /* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */
4396 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
4398 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4401 * 8.3.18A Notification
4404 nas_esm_notification(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
4406 guint32 curr_offset;
4410 curr_offset = offset;
4413 /* Notification indicator Notification indicator 9.9.4.7A M LV 2 */
4414 ELEM_MAND_LV(NAS_PDU_TYPE_ESM, DE_ESM_NOTIF_IND, NULL);
4416 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4420 * 8.3.19 PDN connectivity reject
4423 nas_esm_pdn_con_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
4425 guint32 curr_offset;
4429 curr_offset = offset;
4432 /*This message is sent by the network to the UE to reject establishment of a PDN connection. */
4433 pinfo->link_dir = P2P_DIR_DL;
4435 /* ESM cause ESM cause 9.9.4.4 M V 1 */
4436 ELEM_MAND_V(NAS_PDU_TYPE_ESM, DE_ESM_CAUSE, NULL);
4437 /* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */
4438 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
4439 /* 37 T3396 value GPRS timer 3 9.9.3.16B O TLV 3 */
4440 ELEM_OPT_TLV(0x37, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - T3396 value");
4442 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4446 * 8.3.20 PDN connectivity request
4449 nas_esm_pdn_con_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
4451 guint32 curr_offset;
4456 curr_offset = offset;
4459 /*This message is sent by the UE to the network to initiate establishment of a PDN connection. */
4460 pinfo->link_dir = P2P_DIR_UL;
4462 /* PDN type PDN type 9.9.4.10 M V 1/2 */
4463 bit_offset = curr_offset<<3;
4464 proto_tree_add_bits_item(tree, hf_nas_eps_esm_pdn_type, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
4467 /* Request type 9.9.4.14 M V 1/2 */
4468 proto_tree_add_bits_item(tree, hf_nas_eps_esm_request_type, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
4470 /* Fix the lengths */
4476 /* D- ESM information transfer flag 9.9.4.5 O TV 1 */
4477 ELEM_OPT_TV_SHORT( 0xd0 , NAS_PDU_TYPE_ESM, DE_ESM_INF_TRF_FLG , NULL );
4478 /* 28 Access point name 9.9.4.1 O TLV 3-102 */
4479 ELEM_OPT_TLV( 0x28 , GSM_A_PDU_TYPE_GM, DE_ACC_POINT_NAME , NULL );
4480 /* 27 Protocol configuration options 9.9.4.11 O TLV 3-253 */
4481 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
4482 /* C- Device properties Device properties 9.9.2.0A O TV 1 */
4483 ELEM_OPT_TV_SHORT(0xC0 , GSM_A_PDU_TYPE_GM, DE_DEVICE_PROPERTIES, NULL);
4485 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4488 * 8.3.20 PDN disconnect reject
4491 nas_esm_pdn_disc_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
4493 guint32 curr_offset;
4497 curr_offset = offset;
4500 /*This message is sent by the UE to the network to initiate establishment of a PDN connection. */
4501 pinfo->link_dir = P2P_DIR_UL;
4503 /* ESM cause ESM cause 9.9.4.4 M V 1 */
4504 ELEM_MAND_V(NAS_PDU_TYPE_ESM, DE_ESM_CAUSE, NULL);
4505 /* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */
4506 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
4508 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4511 * 8.3.21 PDN disconnect request
4514 nas_esm_pdn_disc_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
4516 guint32 curr_offset, bit_offset;
4520 curr_offset = offset;
4523 /* This message is sent by the network to the UE to reject release of a PDN connection. */
4524 pinfo->link_dir = P2P_DIR_DL;
4526 /* Spare half octet Spare half octet 9.9.2.9 M V 1/2 */
4527 bit_offset = curr_offset<<3;
4528 proto_tree_add_bits_item(tree, hf_nas_eps_emm_spare_half_octet, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
4530 /* Linked EPS bearer identity Linked EPS bearer identity 9.9.4.6 M V 1/2 */
4531 proto_tree_add_bits_item(tree, hf_nas_eps_esm_linked_bearer_id, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
4533 /* Fix the lengths */
4538 /* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */
4539 ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
4541 EXTRANEOUS_DATA_CHECK(curr_len, 0);
4545 #define NUM_NAS_MSG_ESM (sizeof(nas_msg_esm_strings)/sizeof(value_string))
4546 static gint ett_nas_msg_esm[NUM_NAS_MSG_ESM];
4547 static void (*nas_msg_esm_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len) = {
4548 nas_esm_act_def_eps_bearer_ctx_req, /* Activate default EPS bearer context request*/
4549 nas_esm_act_def_eps_bearer_ctx_acc, /* Activate default EPS bearer context accept*/
4550 nas_esm_act_def_eps_bearer_ctx_rej, /* Activate default EPS bearer context reject*/
4551 nas_esm_act_ded_eps_bearer_ctx_req, /* Activate dedicated EPS bearer context request*/
4552 nas_esm_act_ded_eps_bearer_ctx_acc, /* Activate dedicated EPS bearer context accept*/
4553 nas_esm_act_ded_eps_bearer_ctx_rej, /* Activate dedicated EPS bearer context reject*/
4554 nas_esm_mod_eps_bearer_ctx_req, /* Modify EPS bearer context request*/
4555 nas_esm_mod_eps_bearer_ctx_acc, /* Modify EPS bearer context accept*/
4556 nas_esm_mod_eps_bearer_ctx_rej, /* Modify EPS bearer context reject*/
4557 nas_esm_deact_eps_bearer_ctx_req, /* Deactivate EPS bearer context request*/
4558 nas_esm_deact_eps_bearer_ctx_acc, /* Deactivate EPS bearer context accept*/
4559 nas_esm_pdn_con_req, /* 8.3.18 PDN connectivity request */
4560 nas_esm_pdn_con_rej, /* PDN connectivity reject*/
4561 nas_esm_pdn_disc_req, /* PDN disconnect request*/
4562 nas_esm_pdn_disc_rej, /* PDN disconnect reject*/
4563 nas_esm_bearer_res_all_req, /* Bearer resource allocation request*/
4564 nas_esm_bearer_res_all_rej, /* Bearer resource allocation reject*/
4565 nas_esm_bearer_res_mod_req, /* Bearer resource modification request*/
4566 nas_esm_bearer_res_mod_rej, /* Bearer resource modification reject*/
4567 nas_esm_inf_req, /* ESM information request, No IE:s*/
4568 nas_esm_inf_resp, /* ESM information response*/
4569 nas_esm_notification, /* Notification */
4570 nas_esm_status, /* ESM status */
4576 get_nas_esm_msg_params(guint8 oct, const gchar **msg_str, int *ett_tree, int *hf_idx, msg_fcn *msg_fcn_p)
4580 *msg_str = match_strval_idx_ext((guint32) (oct & 0xff), &nas_msg_esm_strings_ext, &idx);
4581 *ett_tree = ett_nas_msg_esm[idx];
4582 *hf_idx = hf_nas_eps_msg_esm_type;
4583 *msg_fcn_p = nas_msg_esm_fcn[idx];
4590 #define NUM_NAS_MSG_EMM (sizeof(nas_msg_emm_strings)/sizeof(value_string))
4591 static gint ett_nas_msg_emm[NUM_NAS_MSG_EMM];
4592 static void (*nas_msg_emm_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len) = {
4593 nas_emm_attach_req, /* Attach request */
4594 nas_emm_attach_acc, /* Attach accept */
4595 nas_emm_attach_comp, /* Attach complete */
4596 nas_emm_attach_rej, /* Attach reject */
4597 nas_emm_detach_req, /* Detach request */
4598 NULL, /* 8.2.10 Detach accept */
4600 nas_emm_trac_area_upd_req, /* Tracking area update request */
4601 nas_emm_trac_area_upd_acc, /* Tracking area update accept */
4602 NULL, /* Tracking area update complete (No IE's)*/
4603 nas_emm_trac_area_upd_rej, /* Tracking area update reject */
4605 nas_emm_ext_serv_req, /* Extended service request */
4606 nas_emm_serv_rej, /* Service reject */
4608 nas_emm_guti_realloc_cmd, /* GUTI reallocation command */
4609 NULL, /* GUTI reallocation complete (No IE's) */
4610 nas_emm_auth_req, /* Authentication request */
4611 nas_emm_auth_resp, /* Authentication response */
4612 NULL, /* Authentication reject (No IE:s)*/
4613 nas_emm_id_req, /* Identity request */
4614 nas_emm_id_res, /* Identity response */
4615 nas_emm_auth_fail, /* Authentication failure */
4616 nas_emm_sec_mode_cmd, /* Security mode command */
4617 nas_emm_sec_mode_comp, /* Security mode complete */
4618 nas_emm_sec_mode_rej, /* Security mode reject */
4620 nas_emm_emm_status, /* EMM status */
4621 nas_emm_emm_inf, /* EMM information */
4622 nas_emm_dl_nas_trans, /* Downlink NAS transport */
4623 nas_emm_ul_nas_trans, /* Uplink NAS transport */
4624 nas_emm_cs_serv_not, /* 8.2.9 CS service notification */
4625 nas_emm_dl_gen_nas_trans, /* Downlink generic NAS transport */
4626 nas_emm_ul_gen_nas_trans, /* Uplink generic NAS transport */
4632 get_nas_emm_msg_params(guint8 oct, const gchar **msg_str, int *ett_tree, int *hf_idx, msg_fcn *msg_fcn_p)
4636 *msg_str = match_strval_idx_ext((guint32) (oct & 0xff), &nas_msg_emm_strings_ext, &idx);
4637 *ett_tree = ett_nas_msg_emm[idx];
4638 *hf_idx = hf_nas_eps_msg_emm_type;
4639 *msg_fcn_p = nas_msg_emm_fcn[idx];
4644 static const value_string nas_eps_esm_bearer_id_vals[] = {
4645 { 0x0, "No EPS bearer identity assigned"},
4650 { 0x5, "EPS bearer identity value 5"},
4651 { 0x6, "EPS bearer identity value 6"},
4652 { 0x7, "EPS bearer identity value 7"},
4653 { 0x8, "EPS bearer identity value 8"},
4654 { 0x9, "EPS bearer identity value 9"},
4655 { 0xa, "EPS bearer identity value 10"},
4656 { 0xb, "EPS bearer identity value 11"},
4657 { 0xc, "EPS bearer identity value 12"},
4658 { 0xd, "EPS bearer identity value 13"},
4659 { 0xe, "EPS bearer identity value 14"},
4660 { 0xf, "EPS bearer identity value 15"},
4665 * EPS session management messages.
4666 * A plain NAS message is pased to this function
4669 disect_nas_eps_esm_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
4671 const gchar *msg_str;
4675 void (*msg_fcn_p)(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len);
4678 len = tvb_length(tvb);
4680 * EPS bearer identity 9.3.2
4682 proto_tree_add_item(tree, hf_nas_eps_bearer_id, tvb, offset, 1, ENC_BIG_ENDIAN);
4683 /* Protocol discriminator 9.2 */
4684 proto_tree_add_item(tree, hf_gsm_a_L3_protocol_discriminator, tvb, offset, 1, ENC_BIG_ENDIAN);
4687 /* Procedure transaction identity 9.4
4688 * The procedure transaction identity and its use are defined in 3GPP TS 24.007
4690 proto_tree_add_item(tree, hf_nas_eps_esm_proc_trans_id, tvb, offset, 1, ENC_BIG_ENDIAN);
4694 oct = tvb_get_guint8(tvb,offset);
4700 get_nas_esm_msg_params(oct, &msg_str, &ett_tree, &hf_idx, &msg_fcn_p);
4703 col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, msg_str);
4705 proto_tree_add_text(tree, tvb, offset, 1,"Unknown message 0x%x",oct);
4710 * Add NAS message name
4712 proto_tree_add_item(tree, hf_idx, tvb, offset, 1, ENC_BIG_ENDIAN);
4719 if (msg_fcn_p == NULL)
4721 proto_tree_add_text(tree, tvb, offset, len - offset,
4722 "Message Elements");
4726 (*msg_fcn_p)(tvb, tree, pinfo, offset, len - offset);
4731 * The "real" security header has been dissected or if dissect_header = TRUE
4734 dissect_nas_eps_emm_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, gboolean second_header)
4736 const gchar *msg_str;
4740 void (*msg_fcn_p)(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len);
4741 guint8 security_header_type, oct;
4743 len = tvb_length(tvb);
4745 /* 9.3.1 Security header type */
4746 if (second_header) {
4747 security_header_type = tvb_get_guint8(tvb,offset)>>4;
4748 proto_tree_add_item(tree, hf_nas_eps_security_header_type, tvb, offset, 1, ENC_BIG_ENDIAN);
4749 proto_tree_add_item(tree, hf_gsm_a_L3_protocol_discriminator, tvb, offset, 1, ENC_BIG_ENDIAN);
4751 if (security_header_type != 0) {
4752 /* Message authentication code */
4753 proto_tree_add_item(tree, hf_nas_eps_msg_auth_code, tvb, offset, 4, ENC_BIG_ENDIAN);
4755 /* Sequence number */
4756 proto_tree_add_item(tree, hf_nas_eps_seq_no, tvb, offset, 1, ENC_BIG_ENDIAN);
4758 if ((security_header_type == 2)||(security_header_type == 4))
4759 /* Integrity protected and ciphered = 2, Integrity protected and ciphered with new EPS security context = 4 */
4761 proto_tree_add_item(tree, hf_nas_eps_security_header_type, tvb, offset, 1, ENC_BIG_ENDIAN);
4762 proto_tree_add_item(tree, hf_gsm_a_L3_protocol_discriminator, tvb, offset, 1, ENC_BIG_ENDIAN);
4767 oct = tvb_get_guint8(tvb,offset);
4773 get_nas_emm_msg_params(oct, &msg_str, &ett_tree, &hf_idx, &msg_fcn_p);
4776 col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, msg_str);
4778 proto_tree_add_text(tree, tvb, offset, 1,"Unknown message 0x%x",oct);
4783 * Add NAS message name
4785 proto_tree_add_item(tree, hf_idx, tvb, offset, 1, ENC_BIG_ENDIAN);
4792 if (msg_fcn_p == NULL)
4794 proto_tree_add_text(tree, tvb, offset, len - offset,
4795 "Message Elements");
4799 (*msg_fcn_p)(tvb, tree, pinfo, offset, len - offset);
4805 dissect_nas_eps_plain(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
4808 proto_tree *nas_eps_tree;
4815 /* make entry in the Protocol column on summary display */
4816 col_append_sep_str(pinfo->cinfo, COL_PROTOCOL, "/", "NAS-EPS");
4818 item = proto_tree_add_item(tree, proto_nas_eps, tvb, 0, -1, ENC_NA);
4819 nas_eps_tree = proto_item_add_subtree(item, ett_nas_eps);
4821 /* SERVICE REQUEST (security header type equal to 12 or greater) is not a plain NAS message */
4822 pd = tvb_get_guint8(tvb,offset);
4823 if (((pd&0x0f) == 0x07) && ((pd&0xf0) >= 0xc0)) {
4824 col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Service request");
4825 /* Security header type Security header type 9.3.1 M V 1/2 */
4826 proto_tree_add_item(nas_eps_tree, hf_nas_eps_security_header_type, tvb, 0, 1, ENC_BIG_ENDIAN);
4827 /* Protocol discriminator Protocol discriminator 9.2 M V 1/2 */
4828 proto_tree_add_item(nas_eps_tree, hf_gsm_a_L3_protocol_discriminator, tvb, 0, 1, ENC_BIG_ENDIAN);
4830 nas_emm_service_req(tvb, nas_eps_tree, pinfo, offset, tvb_length(tvb)-offset);
4837 /* EPS session management messages.
4838 * Ref 3GPP TS 24.007 version 8.0.0 Release 8, Table 11.2: Protocol discriminator values
4840 disect_nas_eps_esm_msg(tvb, pinfo, nas_eps_tree, offset);
4843 /* EPS mobility management messages.
4844 * Ref 3GPP TS 24.007 version 8.0.0 Release 8, Table 11.2: Protocol discriminator values
4846 dissect_nas_eps_emm_msg(tvb, pinfo, nas_eps_tree, offset, TRUE);
4849 /* Special conformance testing functions for User Equipment messages.
4850 * Ref 3GPP TS 24.007 version 8.0.0 Release 8, Table 11.2: Protocol discriminator values
4852 if (gsm_a_dtap_handle) {
4853 tvbuff_t *new_tvb = tvb_new_subset_remaining(tvb, offset);
4854 call_dissector(gsm_a_dtap_handle, new_tvb,pinfo, nas_eps_tree);
4856 } /* else fall through default */
4858 proto_tree_add_text(nas_eps_tree, tvb, offset, -1, "Not a NAS EPS PD %u(%s)",
4860 val_to_str_const(pd, protocol_discriminator_vals, "unknown"));
4867 * 9 General message format and information elements coding
4869 * Within the protocols defined in the present document, every message, except the SERVICE REQUEST message,
4870 * is a standard L3 message as defined in 3GPP TS 24.007 [12]. This means that the message consists of the following parts:
4871 * 1) if the message is a plain NAS message:
4872 * a) protocol discriminator;
4873 * b) EPS bearer identity or security header type;
4874 * c) procedure transaction identity;
4876 * e) other information elements, as required.
4877 * 2) if the message is a security protected NAS message:
4878 * a) protocol discriminator;
4879 * b) security header type;
4880 * c) message authentication code;
4881 * d) sequence number;
4882 * e) plain NAS message, as defined in item 1.
4884 * The EPS bearer identity and the procedure transaction identity are only used in messages
4885 * with protocol discriminator EPS session management. Octet 1a with the procedure transaction
4886 * identity shall only be included in these messages.
4890 * All messages recived here will have the security header:
4891 * Figure 9.1.2: General message organization example for a security protected NAS message
4892 * 9.3.1 Bits 5 to 8 of the first octet of every EPS Mobility Management (EMM)
4893 * message contain the Security header type IE.
4894 * 4.4.4.2 All ESM messages are integrity protected.
4898 dissect_nas_eps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
4901 proto_tree *nas_eps_tree;
4902 guint8 pd, security_header_type;
4905 guint32 msg_auth_code;
4907 len = tvb_length(tvb);
4908 /* The protected NAS message header is 6 octets long, and the NAS message header is at least 2 octets long. */
4909 /* If the length of the tvbuffer is less than 8 octets, we can safely conclude the message is not protected. */
4911 dissect_nas_eps_plain(tvb, pinfo, tree);
4915 if (g_nas_eps_dissect_plain) {
4916 dissect_nas_eps_plain(tvb, pinfo, tree);
4923 /* make entry in the Protocol column on summary display */
4924 col_append_sep_str(pinfo->cinfo, COL_PROTOCOL, "/", "NAS-EPS");
4926 item = proto_tree_add_item(tree, proto_nas_eps, tvb, 0, -1, ENC_NA);
4927 nas_eps_tree = proto_item_add_subtree(item, ett_nas_eps);
4929 /* Security header type Security header type 9.3.1 M V 1/2 */
4930 security_header_type = tvb_get_guint8(tvb,offset)>>4;
4931 proto_tree_add_item(nas_eps_tree, hf_nas_eps_security_header_type, tvb, 0, 1, ENC_BIG_ENDIAN);
4932 /* Protocol discriminator Protocol discriminator 9.2 M V 1/2 */
4933 proto_tree_add_item(nas_eps_tree, hf_gsm_a_L3_protocol_discriminator, tvb, 0, 1, ENC_BIG_ENDIAN);
4934 pd = tvb_get_guint8(tvb,offset)&0x0f;
4936 /* Message authentication code Message authentication code 9.5 M V 4 */
4937 if (security_header_type == 0) {
4939 /* Plain EPS mobility management messages. */
4940 dissect_nas_eps_emm_msg(tvb, pinfo, nas_eps_tree, offset, FALSE);
4943 proto_tree_add_text(nas_eps_tree, tvb, offset, len, "All ESM / Test Procedures messages should be integrity protected");
4947 /* SERVICE REQUEST (12 or greater) is not a plain NAS message treat separately */
4948 if (security_header_type >= 12) {
4949 col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Service request");
4950 nas_emm_service_req(tvb, nas_eps_tree, pinfo, offset, len-offset);
4953 /* Message authentication code */
4954 proto_tree_add_item(nas_eps_tree, hf_nas_eps_msg_auth_code, tvb, offset, 4, ENC_BIG_ENDIAN);
4955 msg_auth_code = tvb_get_ntohl(tvb, offset);
4957 if ((security_header_type == 2)||(security_header_type == 4)) {
4958 /* Possible ciphered message */
4959 if (msg_auth_code != 0) {
4960 /* Sequence number Sequence number 9.6 M V 1 */
4961 proto_tree_add_item(nas_eps_tree, hf_nas_eps_seq_no, tvb, offset, 1, ENC_BIG_ENDIAN);
4963 /* Integrity protected and ciphered = 2, Integrity protected and ciphered with new EPS security context = 4 */
4964 /* Read security_header_type / EPS bearer id AND pd */
4965 pd = tvb_get_guint8(tvb,offset);
4966 /* If pd is in plaintext this message probably isn't ciphered */
4967 if ((pd != 7) && (pd != 15) &&
4968 (((pd&0x0f) != 2) || (((pd&0x0f) == 2) && ((pd&0xf0) > 0) && ((pd&0xf0) < 0x50)))) {
4969 proto_tree_add_text(nas_eps_tree, tvb, offset, len-6,"Ciphered message");
4973 /* msg_auth_code == 0, probably not ciphered */
4974 /* Sequence number Sequence number 9.6 M V 1 */
4975 proto_tree_add_item(nas_eps_tree, hf_nas_eps_seq_no, tvb, offset, 1, ENC_BIG_ENDIAN);
4979 /* Sequence number Sequence number 9.6 M V 1 */
4980 proto_tree_add_item(nas_eps_tree, hf_nas_eps_seq_no, tvb, offset, 1, ENC_BIG_ENDIAN);
4984 /* NAS message NAS message 9.7 M V 1-n */
4986 pd = tvb_get_guint8(tvb,offset)&0x0f;
4989 /* EPS session management messages.
4990 * Ref 3GPP TS 24.007 version 8.0.0 Release 8, Table 11.2: Protocol discriminator values
4992 disect_nas_eps_esm_msg(tvb, pinfo, nas_eps_tree, offset);
4995 /* EPS mobility management messages.
4996 * Ref 3GPP TS 24.007 version 8.0.0 Release 8, Table 11.2: Protocol discriminator values
4998 dissect_nas_eps_emm_msg(tvb, pinfo, nas_eps_tree, offset, TRUE);
5001 /* Special conformance testing functions for User Equipment messages.
5002 * Ref 3GPP TS 24.007 version 8.0.0 Release 8, Table 11.2: Protocol discriminator values
5004 if (gsm_a_dtap_handle) {
5005 tvbuff_t *new_tvb = tvb_new_subset_remaining(tvb, offset);
5006 call_dissector(gsm_a_dtap_handle, new_tvb, pinfo, nas_eps_tree);
5008 } /* else fall through default */
5010 proto_tree_add_text(nas_eps_tree, tvb, offset, -1, "Not a NAS EPS PD %u(%s)",
5012 val_to_str_const(pd, protocol_discriminator_vals, "unknown"));
5019 proto_register_nas_eps(void) {
5022 module_t *nas_eps_module;
5024 /* List of fields */
5026 static hf_register_info hf[] = {
5027 { &hf_nas_eps_msg_emm_type,
5028 { "NAS EPS Mobility Management Message Type", "nas_eps.nas_msg_emm_type",
5029 FT_UINT8, BASE_HEX|BASE_EXT_STRING, &nas_msg_emm_strings_ext, 0x0,
5032 { &hf_nas_eps_common_elem_id,
5033 { "Element ID", "nas_eps.common.elem_id",
5034 FT_UINT8, BASE_HEX, NULL, 0,
5037 { &hf_nas_eps_emm_elem_id,
5038 { "Element ID", "nas_eps.emm.elem_id",
5039 FT_UINT8, BASE_HEX, NULL, 0,
5042 { &hf_nas_eps_bearer_id,
5043 { "EPS bearer identity", "nas_eps.bearer_id",
5044 FT_UINT8, BASE_DEC, VALS(nas_eps_esm_bearer_id_vals), 0xf0,
5047 { &hf_nas_eps_spare_bits,
5048 { "Spare bit(s)", "nas_eps.spare_bits",
5049 FT_UINT8, BASE_HEX, NULL, 0x0,
5052 { &hf_nas_eps_security_header_type,
5053 { "Security header type","nas_eps.security_header_type",
5054 FT_UINT8,BASE_DEC|BASE_EXT_STRING, &security_header_type_vals_ext, 0xf0,
5057 { &hf_nas_eps_msg_auth_code,
5058 { "Message authentication code","nas_eps.msg_auth_code",
5059 FT_UINT32,BASE_HEX, NULL, 0x0,
5062 { &hf_nas_eps_seq_no,
5063 { "Sequence number","nas_eps.seq_no",
5064 FT_UINT8,BASE_DEC, NULL, 0x0,
5067 { &hf_nas_eps_seq_no_short,
5068 { "Sequence number (short)","nas_eps.seq_no_short",
5069 FT_UINT8,BASE_DEC, NULL, 0x0,
5072 { &hf_nas_eps_emm_ebi0,
5073 { "EBI(0) spare","nas_eps.emm.ebi0",
5074 FT_BOOLEAN, 8, NULL, 0x01,
5077 { &hf_nas_eps_emm_ebi1,
5078 { "EBI(1) spare","nas_eps.emm.ebi1",
5079 FT_BOOLEAN, 8, NULL, 0x02,
5082 { &hf_nas_eps_emm_ebi2,
5083 { "EBI(2) spare","nas_eps.emm.ebi2",
5084 FT_BOOLEAN, 8, NULL, 0x04,
5087 { &hf_nas_eps_emm_ebi3,
5088 { "EBI(3) spare","nas_eps.emm.ebi3",
5089 FT_BOOLEAN, 8, NULL, 0x08,
5092 { &hf_nas_eps_emm_ebi4,
5093 { "EBI(4) spare","nas_eps.emm.ebi4",
5094 FT_BOOLEAN, 8, NULL, 0x10,
5097 { &hf_nas_eps_emm_ebi5,
5098 { "EBI(5)","nas_eps.emm.ebi5",
5099 FT_BOOLEAN, 8, TFS(&nas_eps_emm_ebi_vals), 0x20,
5102 { &hf_nas_eps_emm_ebi6,
5103 { "EBI(6)","nas_eps.emm.ebi6",
5104 FT_BOOLEAN, 8, TFS(&nas_eps_emm_ebi_vals), 0x40,
5107 { &hf_nas_eps_emm_ebi7,
5108 { "EBI(7)","nas_eps.emm.ebi7",
5109 FT_BOOLEAN, 8, TFS(&nas_eps_emm_ebi_vals), 0x80,
5112 { &hf_nas_eps_emm_ebi8,
5113 { "EBI(8)","nas_eps.emm.ebi8",
5114 FT_BOOLEAN, 8, TFS(&nas_eps_emm_ebi_vals), 0x01,
5117 { &hf_nas_eps_emm_ebi9,
5118 { "EBI(9)","nas_eps.emm.ebi9",
5119 FT_BOOLEAN, 8, TFS(&nas_eps_emm_ebi_vals), 0x02,
5122 { &hf_nas_eps_emm_ebi10,
5123 { "EBI(10)","nas_eps.emm.ebi10",
5124 FT_BOOLEAN, 8, TFS(&nas_eps_emm_ebi_vals), 0x04,
5127 { &hf_nas_eps_emm_ebi11,
5128 { "EBI(11)","nas_eps.emm.ebi11",
5129 FT_BOOLEAN, 8, TFS(&nas_eps_emm_ebi_vals), 0x08,
5132 { &hf_nas_eps_emm_ebi12,
5133 { "EBI(12)","nas_eps.emm.ebi12",
5134 FT_BOOLEAN, 8, TFS(&nas_eps_emm_ebi_vals), 0x10,
5137 { &hf_nas_eps_emm_ebi13,
5138 { "EBI(13)","nas_eps.emm.ebi13",
5139 FT_BOOLEAN, 8, TFS(&nas_eps_emm_ebi_vals), 0x20,
5142 { &hf_nas_eps_emm_ebi14,
5143 { "EBI(14)","nas_eps.emm.ebi14",
5144 FT_BOOLEAN, 8, TFS(&nas_eps_emm_ebi_vals), 0x40,
5147 { &hf_nas_eps_emm_ebi15,
5148 { "EBI(15)","nas_eps.emm.ebi15",
5149 FT_BOOLEAN, 8, TFS(&nas_eps_emm_ebi_vals), 0x80,
5152 { &hf_nas_eps_emm_dl_nas_cnt,
5153 { "DL NAS COUNT value","nas_eps.emm.dl_nas_cnt",
5154 FT_UINT8,BASE_DEC, NULL, 0x0f,
5157 {&hf_nas_eps_emm_nonce_mme,
5158 { "NonceMME","nas_eps.emm.nonce_mme",
5159 FT_UINT32,BASE_HEX, NULL, 0x0,
5162 {&hf_nas_eps_emm_nonce,
5163 { "Nonce","nas_eps.emm.nonce",
5164 FT_UINT32,BASE_HEX, NULL, 0x0,
5167 { &hf_nas_eps_emm_paging_id,
5168 { "Paging identity value","nas_eps.emm.paging_id",
5169 FT_BOOLEAN, BASE_NONE, TFS(&nas_eps_emm_paging_id_vals), 0x0,
5172 { &hf_nas_eps_emm_eps_att_type,
5173 { "EPS attach type","nas_eps.emm.eps_att_type",
5174 FT_UINT8,BASE_DEC, VALS(nas_eps_emm_eps_att_type_vals), 0x0,
5177 { &hf_nas_eps_emm_esr_ps,
5178 { "ESRPS","nas_eps.emm.esr_ps",
5179 FT_BOOLEAN ,BASE_NONE, TFS(&nas_eps_emm_esr_ps_value), 0x0,
5180 "Support of EXTENDED SERVICE REQUEST for packet services", HFILL }
5182 { &hf_nas_eps_emm_cs_lcs,
5183 { "CS-LCS","nas_eps.emm.cs_lcs",
5184 FT_UINT8, BASE_DEC, VALS(nas_eps_emm_cs_lcs_vals), 0x0,
5185 "Location services indicator in CS", HFILL }
5187 { &hf_nas_eps_emm_epc_lcs,
5188 { "EPC-LCS","nas_eps.emm.epc_lcs",
5189 FT_BOOLEAN ,BASE_NONE, TFS(&nas_eps_emm_epc_lcs_value), 0x0,
5190 "Location services indicator in EPC", HFILL }
5192 { &hf_nas_eps_emm_emc_bs,
5193 { "EMC BS","nas_eps.emm.emc_bs",
5194 FT_BOOLEAN, BASE_NONE, TFS(&nas_eps_emm_emc_bs_value), 0x0,
5195 "Emergency bearer services indicator", HFILL }
5197 { &hf_nas_eps_emm_ims_vops,
5198 { "IMS VoPS","nas_eps.emm.ims_vops",
5199 FT_BOOLEAN, BASE_NONE, TFS(&nas_eps_emm_ims_vops_value), 0x0,
5200 "IMS voice over PS session indicator", HFILL }
5203 { "Type of security context flag (TSC)","nas_eps.emm.tsc",
5204 FT_BOOLEAN,BASE_DEC, TFS(&nas_eps_tsc_value), 0x0,
5207 { &hf_nas_eps_emm_nas_key_set_id,
5208 { "NAS key set identifier","nas_eps.emm.nas_key_set_id",
5209 FT_UINT8,BASE_DEC, VALS(nas_eps_emm_NAS_key_set_identifier_vals), 0x0,
5212 { &hf_nas_eps_emm_odd_even,
5213 { "odd/even indic","nas_eps.emm.odd_even",
5214 FT_UINT8,BASE_DEC, NULL, 0x8,
5217 { &hf_nas_eps_emm_type_of_id,
5218 { "Type of identity","nas_eps.emm.type_of_id",
5219 FT_UINT8,BASE_DEC, VALS(nas_eps_emm_type_of_id_vals), 0x07,
5222 { &hf_nas_eps_emm_mme_grp_id,
5223 { "MME Group ID","nas_eps.emm.mme_grp_id",
5224 FT_UINT16, BASE_DEC, NULL, 0x0,
5227 { &hf_nas_eps_emm_imsi,
5228 { "IMSI", "nas_eps.emm.imsi",
5229 FT_STRING, BASE_NONE, NULL, 0,
5232 { &hf_nas_eps_emm_imei,
5233 { "IMEI", "nas_eps.emm.imei",
5234 FT_STRING, BASE_NONE, NULL, 0,
5237 { &hf_nas_eps_emm_mme_code,
5238 { "MME Code","nas_eps.emm.mme_code",
5239 FT_UINT8, BASE_DEC, NULL, 0x0,
5242 { &hf_nas_eps_emm_m_tmsi,
5243 { "M-TMSI","nas_eps.emm.m_tmsi",
5244 FT_UINT32, BASE_HEX, NULL, 0x0,
5247 { &hf_nas_eps_esm_msg_cont,
5248 { "ESM message container contents","nas_eps.emm.esm_msg_cont",
5249 FT_BYTES, BASE_NONE, NULL, 0x0,
5252 { &hf_nas_eps_esm_imeisv_req,
5253 { "IMEISV request","nas_eps.emm.imeisv_req",
5254 FT_UINT8, BASE_DEC, VALS(nas_eps_emm_imeisv_req_vals), 0x07,
5257 { &hf_nas_eps_emm_toi,
5258 { "Type of integrity protection algorithm","nas_eps.emm.toi",
5259 FT_UINT8, BASE_DEC, VALS(nas_eps_emm_toi_vals), 0x07,
5262 { &hf_nas_eps_emm_toc,
5263 { "Type of ciphering algorithm","nas_eps.emm.toc",
5264 FT_UINT8, BASE_DEC, VALS(nas_eps_emm_toc_vals), 0x70,
5267 { &hf_nas_eps_emm_EPS_attach_result,
5268 { "Attach result","nas_eps.emm.EPS_attach_result",
5269 FT_UINT8,BASE_DEC, VALS(nas_eps_emm_EPS_attach_result_values), 0x0,
5272 { &hf_nas_eps_emm_spare_half_octet,
5273 { "Spare half octet","nas_eps.emm.spare_half_octet",
5274 FT_UINT8,BASE_DEC, NULL, 0x0,
5277 { &hf_nas_eps_emm_add_upd_res,
5278 { "AURV","nas_eps.emm.add_upd_res",
5279 FT_UINT8, BASE_DEC, VALS(nas_eps_emm_add_upd_res_vals), 0x0,
5280 "Additional update result value", HFILL }
5282 { &hf_nas_eps_emm_add_upd_type,
5283 { "AUTV","nas_eps.emm.add_upd_type",
5284 FT_UINT8, BASE_DEC, VALS(nas_eps_emm_add_upd_type_vals), 0x0,
5285 "Additional update type value", HFILL }
5287 { &hf_nas_eps_emm_res,
5288 { "RES","nas_eps.emm.res",
5289 FT_BYTES, BASE_NONE, NULL, 0x0,
5292 { &hf_nas_eps_emm_csfb_resp,
5293 { "CSFB response","nas_eps.emm.csfb_resp",
5294 FT_UINT8, BASE_DEC, VALS(nas_eps_emm_csfb_resp_vals), 0x03,
5297 { &hf_nas_eps_emm_cause,
5298 { "Cause","nas_eps.emm.cause",
5299 FT_UINT8, BASE_DEC|BASE_EXT_STRING, &nas_eps_emm_cause_values_ext, 0x0,
5302 { &hf_nas_eps_emm_id_type2,
5303 { "Identity type 2","nas_eps.emm.id_type2",
5304 FT_UINT8, BASE_DEC, VALS(nas_eps_emm_id_type2_vals), 0x0,
5307 { &hf_nas_eps_emm_short_mac,
5308 { "Message authentication code (short)","nas_eps.emm.short_mac",
5309 FT_UINT16, BASE_HEX, NULL, 0x0,
5312 { &hf_nas_eps_emm_tai_tol,
5313 { "Type of list","nas_eps.emm.tai_tol",
5314 FT_UINT8, BASE_DEC, VALS(nas_eps_emm_tai_tol_vals), 0x60,
5317 { &hf_nas_eps_emm_tai_n_elem,
5318 { "Number of elements","nas_eps.emm.tai_n_elem",
5319 FT_UINT8, BASE_DEC, NULL, 0x1f,
5322 { &hf_nas_eps_emm_tai_tac,
5323 { "Tracking area code(TAC)","nas_eps.emm.tai_tac",
5324 FT_UINT16, BASE_HEX, NULL, 0x0,
5327 { &hf_nas_eps_emm_eea0,
5328 { "EEA0","nas_eps.emm.eea0",
5329 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x80,
5332 { &hf_nas_eps_emm_128eea1,
5333 { "128-EEA1","nas_eps.emm.128eea1",
5334 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x40,
5337 { &hf_nas_eps_emm_128eea2,
5338 { "128-EEA2","nas_eps.emm.128eea2",
5339 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x20,
5342 { &hf_nas_eps_emm_eea3,
5343 { "128-EEA3","nas_eps.emm.eea3",
5344 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x10,
5347 { &hf_nas_eps_emm_eea4,
5348 { "EEA4","nas_eps.emm.eea4",
5349 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x08,
5352 { &hf_nas_eps_emm_eea5,
5353 { "EEA5","nas_eps.emm.eea5",
5354 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x04,
5357 { &hf_nas_eps_emm_eea6,
5358 { "EEA6","nas_eps.emm.eea6",
5359 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x02,
5362 { &hf_nas_eps_emm_eea7,
5363 { "EEA7","nas_eps.emm.eea7",
5364 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x01,
5367 { &hf_nas_eps_emm_eia0,
5368 { "EIA0","nas_eps.emm.eia0",
5369 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x80,
5372 { &hf_nas_eps_emm_128eia1,
5373 { "128-EIA1","nas_eps.emm.128eia1",
5374 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x40,
5377 { &hf_nas_eps_emm_128eia2,
5378 { "128-EIA2","nas_eps.emm.128eia2",
5379 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x20,
5382 { &hf_nas_eps_emm_eia3,
5383 { "128-EIA3","nas_eps.emm.eia3",
5384 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x10,
5387 { &hf_nas_eps_emm_eia4,
5388 { "EIA4","nas_eps.emm.eia4",
5389 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x08,
5392 { &hf_nas_eps_emm_eia5,
5393 { "EIA5","nas_eps.emm.eia5",
5394 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x04,
5397 { &hf_nas_eps_emm_eia6,
5398 { "EIA6","nas_eps.emm.eia6",
5399 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x02,
5402 { &hf_nas_eps_emm_eia7,
5403 { "EIA7","nas_eps.emm.eia7",
5404 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x01,
5409 { &hf_nas_eps_emm_uea0,
5410 { "UEA0","nas_eps.emm.uea0",
5411 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x80,
5414 { &hf_nas_eps_emm_uea1,
5415 { "UEA1","nas_eps.emm.uea1",
5416 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x40,
5419 { &hf_nas_eps_emm_uea2,
5420 { "UEA2","nas_eps.emm.uea2",
5421 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x20,
5424 { &hf_nas_eps_emm_uea3,
5425 { "UEA3","nas_eps.emm.uea3",
5426 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x10,
5429 { &hf_nas_eps_emm_uea4,
5430 { "UEA4","nas_eps.emm.uea4",
5431 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x08,
5434 { &hf_nas_eps_emm_uea5,
5435 { "UEA5","nas_eps.emm.uea5",
5436 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x04,
5439 { &hf_nas_eps_emm_uea6,
5440 { "UEA6","nas_eps.emm.uea6",
5441 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x02,
5444 { &hf_nas_eps_emm_uea7,
5445 { "UEA7","nas_eps.emm.uea7",
5446 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x01,
5449 { &hf_nas_eps_emm_ucs2_supp,
5450 { "UCS2 support (UCS2)","nas_eps.emm.emm_ucs2_supp",
5451 FT_BOOLEAN, 8, TFS(&nas_eps_emm_ucs2_supp_flg_value), 0x80,
5454 { &hf_nas_eps_emm_uia1,
5455 { "UMTS integrity algorithm UIA1","nas_eps.emm.uia1",
5456 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x40,
5459 { &hf_nas_eps_emm_uia2,
5460 { "UMTS integrity algorithm UIA2","nas_eps.emm.uia2",
5461 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x20,
5464 { &hf_nas_eps_emm_uia3,
5465 { "UMTS integrity algorithm UIA3","nas_eps.emm.uia3",
5466 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x10,
5469 { &hf_nas_eps_emm_uia4,
5470 { "UMTS integrity algorithm UIA4","nas_eps.emm.uia4",
5471 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x08,
5474 { &hf_nas_eps_emm_uia5,
5475 { "UMTS integrity algorithm UIA5","nas_eps.emm.uia5",
5476 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x04,
5479 { &hf_nas_eps_emm_uia6,
5480 { "UMTS integrity algorithm UIA6","nas_eps.emm.uia6",
5481 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x02,
5484 { &hf_nas_eps_emm_uia7,
5485 { "UMTS integrity algorithm UIA7","nas_eps.emm.uia7",
5486 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x01,
5489 { &hf_nas_eps_emm_gea1,
5490 { "GPRS encryption algorithm GEA1","nas_eps.emm.gea1",
5491 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x40,
5494 { &hf_nas_eps_emm_gea2,
5495 { "GPRS encryption algorithm GEA2","nas_eps.emm.gea2",
5496 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x20,
5499 { &hf_nas_eps_emm_gea3,
5500 { "GPRS encryption algorithm GEA3","nas_eps.emm.gea3",
5501 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x10,
5504 { &hf_nas_eps_emm_gea4,
5505 { "GPRS encryption algorithm GEA4","nas_eps.emm.gea4",
5506 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x08,
5509 { &hf_nas_eps_emm_gea5,
5510 { "GPRS encryption algorithm GEA5","nas_eps.emm.gea5",
5511 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x04,
5514 { &hf_nas_eps_emm_gea6,
5515 { "GPRS encryption algorithm GEA6","nas_eps.emm.gea6",
5516 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x02,
5519 { &hf_nas_eps_emm_gea7,
5520 { "GPRS encryption algorithm GEA7","nas_eps.emm.gea7",
5521 FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x01,
5524 { &hf_nas_eps_emm_h245_ash_cap,
5525 { "H.245-ASH capability","nas_eps.emm.h245_ash_cap",
5526 FT_BOOLEAN, 8, TFS(&nas_eps_emm_h245_ash_cap_flg), 0x20,
5527 "H.245 after SRVCC handover capability", HFILL }
5529 { &hf_nas_eps_emm_acc_csfb_cap,
5530 { "ACC-CSFB capability","nas_eps.emm.acc_csfb_cap",
5531 FT_BOOLEAN, 8, TFS(&nas_eps_emm_acc_csfb_cap_flg), 0x10,
5532 "Access class control for CSFB capability", HFILL }
5534 { &hf_nas_eps_emm_lpp_cap,
5535 { "LPP capability","nas_eps.emm.lpp_cap",
5536 FT_BOOLEAN, 8, TFS(&nas_eps_emm_lpp_cap_flg), 0x08,
5537 "LTE Positioning Protocol capability", HFILL }
5539 { &hf_nas_eps_emm_lcs_cap,
5540 { "LCS capability","nas_eps.emm.lcs_cap",
5541 FT_BOOLEAN, 8, TFS(&nas_eps_emm_lcs_cap_flg), 0x04,
5542 "Location services notification mechanisms capability", HFILL }
5544 { &hf_nas_eps_emm_1xsrvcc_cap,
5545 { "1xSRVCC capability","nas_eps.emm.1xsrvcc_cap",
5546 FT_BOOLEAN, 8, TFS(&nas_eps_emm_1xsrvcc_cap_flg), 0x02,
5549 { &hf_nas_eps_emm_nf_cap,
5550 { "NF capability","nas_eps.emm.nf_cap",
5551 FT_BOOLEAN, 8, TFS(&nas_eps_emm_nf_cap_flg), 0x01,
5554 { &hf_nas_eps_emm_ue_ra_cap_inf_upd_need_flg,
5555 { "URC upd","nas_eps.emm.ue_ra_cap_inf_upd_need_flg",
5556 FT_BOOLEAN, 8, TFS(&nas_eps_emm_ue_ra_cap_inf_upd_need_flg), 0x01,
5557 "UE radio capability information update needed flag", HFILL }
5559 { &hf_nas_eps_emm_ss_code,
5560 { "SS Code","nas_eps.emm.ss_code",
5561 FT_UINT8,BASE_DEC, VALS(ssCode_vals), 0x0,
5564 { &hf_nas_eps_emm_lcs_ind,
5565 { "LCS indicator","nas_eps.emm.emm_lcs_ind",
5566 FT_UINT8,BASE_DEC, VALS(nas_eps_emm_lcs_ind_vals), 0x0,
5569 { &hf_nas_eps_emm_gen_msg_cont_type,
5570 { "Container type","nas_eps.emm.gen_msg_cont_type",
5571 FT_UINT8,BASE_DEC|BASE_RANGE_STRING, RVALS(nas_eps_emm_gen_msg_cont_type_vals), 0x0,
5574 { &hf_nas_eps_emm_apn_ambr_ul,
5575 { "APN-AMBR for uplink","nas_eps.emm.apn_ambr_ul",
5576 FT_UINT8,BASE_DEC, NULL, 0x0,
5579 { &hf_nas_eps_emm_apn_ambr_dl,
5580 { "APN-AMBR for downlink","nas_eps.emm.apn_ambr_dl",
5581 FT_UINT8,BASE_DEC, NULL, 0x0,
5584 { &hf_nas_eps_emm_apn_ambr_ul_ext,
5585 { "APN-AMBR for uplink(Extended)","nas_eps.emm.apn_ambr_ul_ext",
5586 FT_UINT8,BASE_DEC, NULL, 0x0,
5589 { &hf_nas_eps_emm_apn_ambr_dl_ext,
5590 { "APN-AMBR for downlink(Extended)","nas_eps.emm.apn_ambr_dl_ext",
5591 FT_UINT8,BASE_DEC, NULL, 0x0,
5594 { &hf_nas_eps_emm_apn_ambr_ul_ext2,
5595 { "APN-AMBR for uplink(Extended-2)","nas_eps.emm.apn_ambr_ul_ext2",
5596 FT_UINT8,BASE_DEC, NULL, 0x0,
5599 { &hf_nas_eps_emm_apn_ambr_dl_ext2,
5600 { "APN-AMBR for downlink(Extended-2)","nas_eps.emm.apn_ambr_dl_ext2",
5601 FT_UINT8,BASE_DEC, NULL, 0x0,
5604 { &hf_nas_eps_emm_guti_type,
5605 { "GUTI type", "nas_eps.emm.guti_type",
5606 FT_BOOLEAN, BASE_NONE, TFS(&nas_eps_emm_guti_type_value), 0x0,
5609 { &hf_nas_eps_emm_switch_off,
5610 { "Switch off","nas_eps.emm.switch_off",
5611 FT_UINT8,BASE_DEC, VALS(nas_eps_emm_switch_off_vals), 0x0,
5614 { &hf_nas_eps_emm_detach_type_UL,
5615 { "Detach Type","nas_eps.emm.detach_type_ul",
5616 FT_UINT8,BASE_DEC, VALS(nas_eps_emm_type_of_dtatch_UL_vals), 0x0,
5619 { &hf_nas_eps_emm_detach_type_DL,
5620 { "Detach Type","nas_eps.emm.detach_type_dl",
5621 FT_UINT8,BASE_DEC, VALS(nas_eps_emm_type_of_dtatch_DL_vals), 0x0,
5625 { "Quality of Service Class Identifier (QCI)","nas_eps.emm.qci",
5626 FT_UINT8,(BASE_DEC|BASE_RANGE_STRING), RVALS(nas_eps_qci_vals), 0x0,
5629 { &hf_nas_eps_mbr_ul,
5630 { "Maximum bit rate for uplink","nas_eps.emm.mbr_ul",
5631 FT_UINT8,BASE_DEC, NULL, 0x0,
5634 { &hf_nas_eps_mbr_dl,
5635 { "Maximum bit rate for downlink","nas_eps.emm.mbr_dl",
5636 FT_UINT8,BASE_DEC, NULL, 0x0,
5639 { &hf_nas_eps_gbr_ul,
5640 { "Guaranteed bit rate for uplink","nas_eps.emm.gbr_ul",
5641 FT_UINT8,BASE_DEC, NULL, 0x0,
5644 { &hf_nas_eps_gbr_dl,
5645 { "Guaranteed bit rate for downlink","nas_eps.emm.gbr_dl",
5646 FT_UINT8,BASE_DEC, NULL, 0x0,
5649 { &hf_nas_eps_embr_ul,
5650 { "Maximum bit rate for uplink(ext)","nas_eps.emm.embr_ul",
5651 FT_UINT8,BASE_DEC, NULL, 0x0,
5654 { &hf_nas_eps_embr_dl,
5655 { "Maximum bit rate for downlink(ext)","nas_eps.emm.embr_dl",
5656 FT_UINT8,BASE_DEC, NULL, 0x0,
5659 { &hf_nas_eps_egbr_ul,
5660 { "Guaranteed bit rate for uplink(ext)","nas_eps.emm.egbr_ul",
5661 FT_UINT8,BASE_DEC, NULL, 0x0,
5664 { &hf_nas_eps_egbr_dl,
5665 { "Guaranteed bit rate for downlink(ext)","nas_eps.emm.egbr_dl",
5666 FT_UINT8,BASE_DEC, NULL, 0x0,
5669 { &hf_nas_eps_esm_cause,
5670 { "Cause","nas_eps.esm.cause",
5671 FT_UINT8,BASE_DEC|BASE_EXT_STRING, &nas_eps_esm_cause_vals_ext, 0x0,
5674 { &hf_nas_eps_esm_eit,
5675 { "EIT (ESM information transfer)", "nas_eps.emm.eit",
5676 FT_BOOLEAN, 8, TFS(&nas_eps_emm_eit_vals), 0x01,
5679 { &hf_nas_eps_esm_notif_ind,
5680 { "Notification indicator value","nas_eps.esm.notif_ind",
5681 FT_UINT8,BASE_DEC, VALS(nas_eps_esm_notif_ind_vals), 0x0,
5684 { &hf_nas_eps_esm_pdn_ipv4,
5685 {"PDN IPv4", "nas_eps.esm.pdn_ipv4",
5686 FT_IPv4, BASE_NONE, NULL, 0x0,
5689 { &hf_nas_eps_esm_pdn_ipv6_if_id,
5690 {"PDN IPv6 if id", "nas_eps.esm.pdn_ipv6_if_id",
5691 FT_BYTES, BASE_NONE, NULL, 0x0,
5694 { &hf_nas_eps_esm_linked_bearer_id,
5695 { "Linked EPS bearer identity","nas_eps.esm.linked_bearer_id",
5696 FT_UINT8,BASE_DEC, VALS(nas_eps_esm_linked_bearer_id_vals), 0x0,
5699 { &hf_nas_eps_active_flg,
5700 { "Active flag", "nas_eps.emm.active_flg",
5701 FT_BOOLEAN, BASE_NONE, TFS(&nas_eps_emm_active_flg_value), 0x0,
5704 { &hf_nas_eps_eps_update_result_value,
5705 { "EPS update result value","nas_eps.emm.eps_update_result_value",
5706 FT_UINT8,BASE_DEC, VALS(nas_eps_emm_eps_update_result_vals), 0x0,
5709 { &hf_nas_eps_eps_update_type_value,
5710 { "EPS update type value", "nas_eps.emm.update_type_value",
5711 FT_UINT8,BASE_DEC, VALS(nas_eps_emm_eps_update_type_vals), 0x0,
5714 { &hf_nas_eps_service_type,
5715 { "Service type", "nas_eps.emm.service_type",
5716 FT_UINT8,BASE_DEC|BASE_RANGE_STRING, RVALS(nas_eps_service_type_vals), 0x0,
5719 { &hf_nas_eps_nas_msg_cont,
5720 { "NAS message container content", "nas_eps.emm.nas_msg_cont",
5721 FT_BYTES, BASE_NONE, NULL, 0x0,
5724 { &hf_nas_eps_gen_msg_cont,
5725 { "Generic message container content", "nas_eps.emm.gen_msg_cont",
5726 FT_BYTES, BASE_NONE, NULL, 0x0,
5729 { &hf_nas_eps_cmn_add_info,
5730 { "Additional information content", "nas_eps.cmn.add_info",
5731 FT_BYTES, BASE_NONE, NULL, 0x0,
5734 /* ESM hf cvariables */
5735 { &hf_nas_eps_msg_esm_type,
5736 { "NAS EPS session management messages", "nas_eps.nas_msg_esm_type",
5737 FT_UINT8, BASE_HEX|BASE_EXT_STRING, &nas_msg_esm_strings_ext, 0x0,
5740 { &hf_nas_eps_esm_elem_id,
5741 { "Element ID", "nas_eps.esm.elem_id",
5742 FT_UINT8, BASE_HEX, NULL, 0,
5745 { &hf_nas_eps_esm_proc_trans_id,
5746 { "Procedure transaction identity", "nas_eps.esm.proc_trans_id",
5747 FT_UINT8, BASE_DEC, NULL, 0,
5750 { &hf_nas_eps_esm_pdn_type,
5751 { "PDN type", "nas_eps.esm_pdn_type",
5752 FT_UINT8, BASE_DEC, VALS(nas_eps_esm_pdn_type_values), 0x0,
5755 { &hf_nas_eps_esm_request_type,
5756 { "Request type", "nas_eps.esm_request_type",
5757 FT_UINT8, BASE_DEC, VALS(nas_eps_esm_request_type_values), 0x0,
5762 /* Setup protocol subtree array */
5763 #define NUM_INDIVIDUAL_ELEMS 5
5764 gint *ett[NUM_INDIVIDUAL_ELEMS +
5765 NUM_NAS_EPS_COMMON_ELEM +
5766 NUM_NAS_MSG_EMM + NUM_NAS_EMM_ELEM+
5767 NUM_NAS_MSG_ESM + NUM_NAS_ESM_ELEM];
5769 ett[0] = &ett_nas_eps;
5770 ett[1] = &ett_nas_eps_esm_msg_cont;
5771 ett[2] = &ett_nas_eps_nas_msg_cont;
5772 ett[3] = &ett_nas_eps_gen_msg_cont;
5773 ett[4] = &ett_nas_eps_cmn_add_info;
5775 last_offset = NUM_INDIVIDUAL_ELEMS;
5777 for (i=0; i < NUM_NAS_EPS_COMMON_ELEM; i++, last_offset++)
5779 ett_nas_eps_common_elem[i] = -1;
5780 ett[last_offset] = &ett_nas_eps_common_elem[i];
5784 for (i=0; i < NUM_NAS_MSG_EMM; i++, last_offset++)
5786 ett_nas_msg_emm[i] = -1;
5787 ett[last_offset] = &ett_nas_msg_emm[i];
5790 for (i=0; i < NUM_NAS_EMM_ELEM; i++, last_offset++)
5792 ett_nas_eps_emm_elem[i] = -1;
5793 ett[last_offset] = &ett_nas_eps_emm_elem[i];
5796 for (i=0; i < NUM_NAS_MSG_ESM; i++, last_offset++)
5798 ett_nas_msg_esm[i] = -1;
5799 ett[last_offset] = &ett_nas_msg_esm[i];
5802 for (i=0; i < NUM_NAS_ESM_ELEM; i++, last_offset++)
5804 ett_nas_eps_esm_elem[i] = -1;
5805 ett[last_offset] = &ett_nas_eps_esm_elem[i];
5808 /* Register protocol */
5809 proto_nas_eps = proto_register_protocol(PNAME, PSNAME, PFNAME);
5810 /* Register fields and subtrees */
5811 proto_register_field_array(proto_nas_eps, hf, array_length(hf));
5812 proto_register_subtree_array(ett, array_length(ett));
5814 /* Register dissector */
5815 register_dissector(PFNAME, dissect_nas_eps, proto_nas_eps);
5817 /* Register dissector */
5818 register_dissector("nas-eps_plain", dissect_nas_eps_plain, proto_nas_eps);
5820 /* Register configuration options to always dissect as plain messages */
5821 nas_eps_module = prefs_register_protocol(proto_nas_eps, NULL);
5823 prefs_register_bool_preference(nas_eps_module,
5825 "Force dissect as plain NAS EPS",
5826 "Always dissect NAS EPS messages as plain",
5827 &g_nas_eps_dissect_plain);
5831 proto_reg_handoff_nas_eps(void)
5833 gsm_a_dtap_handle = find_dissector("gsm_a_dtap");
5834 lpp_handle = find_dissector("lpp");