epan/dissectors/pidl/samr/samr.cnf cnf_dissect_lsa_BinaryString => lsarpc_dissect_str...
[wireshark-sm.git] / epan / dissectors / packet-nas_5gs.c
blob6a0b283900dbf822839da719a86ece7213d987ee
1 /* packet-nas_5gs.c
2 * Routines for Non-Access-Stratum (NAS) protocol for 5G System (5GS) dissection
4 * Copyright 2018-2022, Anders Broman <anders.broman@ericsson.com>
6 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <gerald@wireshark.org>
8 * Copyright 1998 Gerald Combs
10 * SPDX-License-Identifier: GPL-2.0-or-later
12 * References: 3GPP TS 24.501 18.8.0
15 #include "config.h"
17 #include <epan/packet.h>
18 #include <epan/expert.h>
19 #include <epan/proto_data.h>
20 #include <epan/ipproto.h>
21 #include <epan/etypes.h>
22 #include <epan/exceptions.h>
23 #include <epan/show_exception.h>
24 #include <epan/to_str.h>
25 #include <epan/tfs.h>
26 #include <epan/unit_strings.h>
28 #include <wsutil/array.h>
29 #include <wsutil/pow2.h>
30 #include <wsutil/pint.h>
31 #include <wsutil/wsjson.h>
33 #include "packet-gsm_a_common.h"
34 #include "packet-media-type.h"
35 #include "packet-tcp.h"
37 void proto_register_nas_5gs(void);
38 void proto_reg_handoff_nas_5gs(void);
40 static bool g_nas_5gs_null_decipher;
41 enum {
42 DECODE_USER_DATA_AS_NONE,
43 DECODE_USER_DATA_AS_IP,
44 DECODE_USER_DATA_AS_NON_IP,
45 DECODE_USER_DATA_AS_ETHERNET
47 static const enum_val_t nas_5gs_user_data_container_as_vals[] = {
48 {"none", "None", DECODE_USER_DATA_AS_NONE},
49 {"ip", "IP", DECODE_USER_DATA_AS_IP},
50 {"non_ip","Non IP", DECODE_USER_DATA_AS_NON_IP},
51 {"ethernet","Ethernet", DECODE_USER_DATA_AS_ETHERNET},
52 {NULL, NULL, -1}
54 static int g_nas_5gs_decode_user_data_container_as = DECODE_USER_DATA_AS_NONE;
55 static const char *g_nas_5gs_non_ip_data_dissector = "";
58 static int dissect_nas_5gs_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, void* data);
59 static int dissect_nas_5gs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data);
60 static uint16_t de_nas_5gs_mm_pdu_ses_id_2(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_);
61 static uint16_t de_nas_5gs_cmn_add_inf(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_);
62 static void nas_5gs_mm_5gmm_status(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len);
63 static uint16_t de_nas_5gs_mm_req_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_);
65 static dissector_handle_t nas_5gs_handle;
66 static dissector_handle_t eap_handle;
67 static dissector_handle_t nas_eps_handle;
68 static dissector_handle_t lpp_handle;
69 static dissector_handle_t gsm_a_dtap_handle;
70 static dissector_handle_t ipv4_handle;
71 static dissector_handle_t ipv6_handle;
72 static dissector_handle_t non_ip_data_handle;
73 static dissector_handle_t ethernet_handle;
75 #define PNAME "Non-Access-Stratum 5GS (NAS)PDU"
76 #define PSNAME "NAS-5GS"
77 #define PFNAME "nas-5gs"
79 static int proto_json;
81 static int proto_nas_5gs;
83 int hf_nas_5gs_common_elem_id;
84 int hf_nas_5gs_mm_elem_id;
85 int hf_nas_5gs_sm_elem_id;
86 int hf_nas_5gs_updp_elem_id;
88 static int hf_nas_5gs_epd;
89 static int hf_nas_5gs_spare_bits;
90 static int hf_nas_5gs_spare_b7;
91 static int hf_nas_5gs_spare_b6;
92 static int hf_nas_5gs_spare_b5;
93 static int hf_nas_5gs_spare_b4;
94 static int hf_nas_5gs_spare_b3;
95 static int hf_nas_5gs_spare_b2;
96 static int hf_nas_5gs_spare_b1;
97 static int hf_nas_5gs_spare_b0;
98 static int hf_nas_5gs_rfu_b2;
99 static int hf_nas_5gs_rfu_b1;
100 static int hf_nas_5gs_rfu_b0;
101 static int hf_nas_5gs_security_header_type;
102 static int hf_nas_5gs_msg_auth_code;
103 static int hf_nas_5gs_seq_no;
104 static int hf_nas_5gs_mm_msg_type;
105 static int hf_nas_5gs_sm_msg_type;
106 static int hf_nas_5gs_updp_msg_type;
107 static int hf_nas_5gs_proc_trans_id;
108 static int hf_nas_5gs_spare_half_octet;
109 static int hf_nas_5gs_spare_octet;
110 static int hf_nas_5gs_pdu_session_id;
111 static int hf_nas_5gs_msg_elems;
112 static int hf_nas_5gs_mm_for;
113 static int hf_nas_5gs_cmn_add_info;
114 static int hf_nas_5gs_cmn_acc_type;
115 static int hf_nas_5gs_cmn_dnn;
116 static int hf_nas_5gs_cmn_service_level_aa_param_type;
117 static int hf_nas_5gs_cmn_service_level_aa_param_len;
118 static int hf_nas_5gs_cmn_service_level_aa_param_device_id;
119 static int hf_nas_5gs_cmn_service_level_aa_param_addr_type;
120 static int hf_nas_5gs_cmn_service_level_aa_param_addr_ipv4;
121 static int hf_nas_5gs_cmn_service_level_aa_param_addr_ipv6;
122 static int hf_nas_5gs_cmn_service_level_aa_param_addr_fqdn;
123 static int hf_nas_5gs_cmn_service_level_aa_param_resp_c2ar;
124 static int hf_nas_5gs_cmn_service_level_aa_param_resp_slar;
125 static int hf_nas_5gs_cmn_service_level_aa_param_payload_type;
126 static int hf_nas_5gs_cmn_service_level_aa_param_payload;
127 static int hf_nas_5gs_cmn_service_level_aa_param_pending_ind_slapi;
128 static int hf_nas_5gs_cmn_service_level_aa_param_service_status_ind_uas;
129 static int hf_nas_5gs_cmn_service_level_aa_param_unknown;
130 static int hf_nas_5gs_mm_sms_requested;
131 static int hf_nas_5gs_mm_ng_ran_rcu;
132 static int hf_nas_5gs_mm_5gs_pnb_ciot;
133 static int hf_nas_5gs_mm_eps_pnb_ciot;
134 static int hf_nas_5gs_mm_5gs_reg_type;
135 static int hf_nas_5gs_mm_tsc;
136 static int hf_nas_5gs_mm_nas_key_set_id;
137 static int hf_nas_5gs_mm_tsc_h1;
138 static int hf_nas_5gs_mm_nas_key_set_id_h1;
139 static int hf_nas_5gs_mm_5gmm_cause;
140 static int hf_nas_5gs_mm_pld_cont_type;
141 static int hf_nas_5gs_mm_sst;
142 static int hf_nas_5gs_mm_sd;
143 static int hf_nas_5gs_mm_mapped_hplmn_sst;
144 static int hf_nas_5gs_mm_mapped_hplmn_ssd;
145 static int hf_nas_5gs_mm_switch_off;
146 static int hf_nas_5gs_mm_re_reg_req;
147 static int hf_nas_5gs_mm_acc_type;
148 static int hf_nas_5gs_mm_raai_b0;
149 static int hf_nas_5gs_mm_sprti_b1;
150 static int hf_nas_5gs_mm_ma_pdu_session_info_value;
151 static int hf_nas_5gs_mm_len_of_mapped_s_nssai;
152 static int hf_nas_5gs_mm_conf_upd_ind_ack_b0;
153 static int hf_nas_5gs_mm_conf_upd_ind_red_b1;
154 static int hf_nas_5gs_mm_cag_info_entry_len;
155 static int hf_nas_5gs_mm_cag_info_entry_cag_only;
156 static int hf_nas_5gs_mm_cag_info_entry_lci;
157 static int hf_nas_5gs_mm_cag_info_entry_caili;
158 static int hf_nas_5gs_mm_cag_info_entry_cag_without_add_info_list_len;
159 static int hf_nas_5gs_mm_cag_info_entry_cag_with_add_info_list_len;
160 static int hf_nas_5gs_mm_cag_info_entry_cag_with_add_info_len;
161 static int hf_nas_5gs_mm_cag_info_entry_cag_id;
162 static int hf_nas_5gs_mm_cag_info_entry_svii;
163 static int hf_nas_5gs_mm_cag_info_entry_tvii;
164 static int hf_nas_5gs_mm_cag_info_entry_nb_time_periods;
165 static int hf_nas_5gs_mm_cag_info_entry_time_period;
166 static int hf_nas_5gs_mm_ciot_small_data_cont_data_type;
167 static int hf_nas_5gs_mm_ciot_small_data_cont_ddx;
168 static int hf_nas_5gs_mm_ciot_small_data_cont_pdu_session_id;
169 static int hf_nas_5gs_mm_ciot_small_data_cont_add_info_len;
170 static int hf_nas_5gs_mm_ciot_small_data_cont_add_info;
171 static int hf_nas_5gs_mm_ciot_small_data_cont_data_contents;
172 static int hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_1_1;
173 static int hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_1_2;
174 static int hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_1_3;
175 static int hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_1_4;
176 static int hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_1_5;
177 static int hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_1_6;
178 static int hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_1_7;
179 static int hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_1_8;
180 static int hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_1;
181 static int hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_2;
182 static int hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_3;
183 static int hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_4;
184 static int hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_5;
185 static int hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_6;
186 static int hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_7;
187 static int hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_8;
188 static int hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_9;
189 static int hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_10;
190 static int hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_11;
191 static int hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_12;
192 static int hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_13;
193 static int hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_14;
194 static int hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_15;
195 static int hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_16;
196 static int hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_17;
197 static int hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_18;
198 static int hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_19;
199 static int hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_20;
200 static int hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_21;
201 static int hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_22;
202 static int hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_23;
203 static int hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_24;
204 static int hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_25;
205 static int hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_3_1;
206 static int hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_4_1;
207 static int hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_5_1;
208 static int hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_1_9;
209 static int hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_1_10;
210 static int hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_1_1;
211 static int hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_1_2;
212 static int hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_1_3;
213 static int hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_1_4;
214 static int hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_1_5;
215 static int hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_1_6;
216 static int hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_1_7;
217 static int hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_1_8;
218 static int hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_1;
219 static int hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_2;
220 static int hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_3;
221 static int hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_4;
222 static int hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_5;
223 static int hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_6;
224 static int hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_7;
225 static int hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_8;
226 static int hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_9;
227 static int hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_10;
228 static int hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_11;
229 static int hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_12;
230 static int hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_13;
231 static int hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_14;
232 static int hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_15;
233 static int hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_16;
234 static int hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_17;
235 static int hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_18;
236 static int hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_19;
237 static int hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_20;
238 static int hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_21;
239 static int hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_22;
240 static int hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_23;
241 static int hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_3_1;
242 static int hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_4_1;
243 static int hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_5_1;
244 static int hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_6_1;
245 static int hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_6_2;
246 static int hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_6_3;
247 static int hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_6_4;
248 static int hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_6_5;
249 static int hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_6_6;
250 static int hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_1_9;
251 static int hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_1_10;
252 static int hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_24;
253 static int hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_25;
254 static int hf_nas_5gs_mm_ciph_key_data_ciphering_set_id;
255 static int hf_nas_5gs_mm_ciph_key_data_ciphering_key;
256 static int hf_nas_5gs_mm_ciph_key_data_c0_len;
257 static int hf_nas_5gs_mm_ciph_key_data_c0;
258 static int hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_len;
259 static int hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_len;
260 static int hf_nas_5gs_mm_ciph_key_data_validity_start_time;
261 static int hf_nas_5gs_mm_ciph_key_data_validity_duration;
262 static int hf_nas_5gs_mm_ciph_key_data_tais_list_len;
263 static int hf_nas_5gs_mm_ctrl_plane_serv_type;
264 static int hf_nas_5gs_mm_nas_sec_algo_enc;
265 static int hf_nas_5gs_mm_nas_sec_algo_ip;
266 static int hf_nas_5gs_mm_s1_mode_b0;
267 static int hf_nas_5gs_mm_ho_attach_b1;
268 static int hf_nas_5gs_mm_lpp_cap_b2;
269 static int hf_nas_5gs_mm_restrict_ec_b3;
270 static int hf_nas_5gs_mm_5g_cp_ciot_b4;
271 static int hf_nas_5gs_mm_n3_data_b5;
272 static int hf_nas_5gs_mm_5g_iphc_cp_ciot_b6;
273 static int hf_nas_5gs_mm_sgc_b7;
274 static int hf_nas_5gs_mm_5g_srvcc_b0;
275 static int hf_nas_5gs_mm_5g_up_ciot_b1;
276 static int hf_nas_5gs_mm_v2x_b2;
277 static int hf_nas_5gs_mm_v2xcepc5_b3;
278 static int hf_nas_5gs_mm_v2xcnpc5_b4;
279 static int hf_nas_5gs_mm_5g_lcs_b5;
280 static int hf_nas_5gs_mm_nssaa_b6;
281 static int hf_nas_5gs_mm_racs_b7;
282 static int hf_nas_5gs_mm_cag_b0;
283 static int hf_nas_5gs_mm_wsusa_b1;
284 static int hf_nas_5gs_mm_multiple_up_b2;
285 static int hf_nas_5gs_mm_5g_ehc_cp_ciot_b3;
286 static int hf_nas_5gs_mm_er_nssai_b4;
287 static int hf_nas_5gs_mm_5g_prose_dd_b5;
288 static int hf_nas_5gs_mm_5g_prose_dc_b6;
289 static int hf_nas_5gs_mm_5g_prose_l2relay_b7;
290 static int hf_nas_5gs_mm_5g_prose_l3relay_b0;
291 static int hf_nas_5gs_mm_5g_prose_l2rmt_b1;
292 static int hf_nas_5gs_mm_5g_prose_l3rmt_b2;
293 static int hf_nas_5gs_mm_nr_pssi_b3;
294 static int hf_nas_5gs_mm_ncr_b4;
295 static int hf_nas_5gs_mm_piv_b5;
296 static int hf_nas_5gs_mm_rpr_b6;
297 static int hf_nas_5gs_mm_pr_b7;
298 static int hf_nas_5gs_mm_nssrg_b0;
299 static int hf_nas_5gs_mm_mint_b1;
300 static int hf_nas_5gs_mm_event_notif_b2;
301 static int hf_nas_5gs_mm_ssnpnsi_b3;
302 static int hf_nas_5gs_mm_ex_cag_b4;
303 static int hf_nas_5gs_mm_nsag_b5;
304 static int hf_nas_5gs_mm_uas_b6;
305 static int hf_nas_5gs_mm_mpsiu_b7;
306 static int hf_nas_5gs_mm_rcmap_b0;
307 static int hf_nas_5gs_mm_rcman_b1;
308 static int hf_nas_5gs_mm_esi_b2;
309 static int hf_nas_5gs_mm_eci_b3;
310 static int hf_nas_5gs_mm_rantiming_b4;
311 static int hf_nas_5gs_mm_ladn_ds_b5;
312 static int hf_nas_5gs_mm_nsr_b6;
313 static int hf_nas_5gs_mm_sbts_b7;
314 static int hf_nas_5gs_mm_a2xepc5_b0;
315 static int hf_nas_5gs_mm_a2xnpc5_b1;
316 static int hf_nas_5gs_mm_un_per_b2;
317 static int hf_nas_5gs_mm_sbns_b3;
318 static int hf_nas_5gs_mm_rslps_b4;
319 static int hf_nas_5gs_mm_5g_prose_l2u2u_relay_b5;
320 static int hf_nas_5gs_mm_5g_prose_l3u2u_relay_b6;
321 static int hf_nas_5gs_mm_5g_prose_l2end_b7;
322 static int hf_nas_5gs_mm_5g_prose_l3end_b0;
323 static int hf_nas_5gs_mm_rslp_b1;
324 static int hf_nas_5gs_mm_pns_b2;
325 static int hf_nas_5gs_mm_lcs_upp_b3;
326 static int hf_nas_5gs_mm_supl_b4;
327 static int hf_nas_5gs_mm_tempns_b5;
328 static int hf_nas_5gs_mm_slvi_b6;
329 static int hf_nas_5gs_mm_a2x_uu_b7;
330 static int hf_nas_5gs_mm_mcsiu_b0;
331 static int hf_nas_5gs_mm_nvl_satnr_b1;
332 static int hf_nas_5gs_rslpl_b2;
333 static int hf_nas_5gs_nsuc_b3;
334 static int hf_nas_5gs_mm_type_id;
335 static int hf_nas_5gs_mm_odd_even;
336 static int hf_nas_5gs_mm_length;
337 static int hf_nas_5gs_mm_pld_cont;
338 static int hf_nas_5gs_mm_pld_cont_event_notif_ind_nb;
339 static int hf_nas_5gs_mm_pld_cont_event_notif_ind_type;
340 static int hf_nas_5gs_mm_pld_cont_event_notif_ind_len;
341 static int hf_nas_5gs_mm_pld_cont_event_notif_ind_val;
342 static int hf_nas_5gs_mm_pld_cont_nb_entries;
343 static int hf_nas_5gs_mm_pld_cont_pld_cont_len;
344 static int hf_nas_5gs_mm_pld_cont_nb_opt_ies;
345 static int hf_nas_5gs_mm_pld_cont_pld_cont_type;
346 static int hf_nas_5gs_mm_pld_cont_opt_ie_type;
347 static int hf_nas_5gs_mm_pld_cont_opt_ie_len;
348 static int hf_nas_5gs_mm_pld_cont_opt_ie_val;
349 static int hf_nas_5gs_mm_req_type;
350 static int hf_nas_5gs_mm_serv_type;
351 static int hf_nas_5gs_mm_5g_ea0;
352 static int hf_nas_5gs_mm_128_5g_ea1;
353 static int hf_nas_5gs_mm_128_5g_ea2;
354 static int hf_nas_5gs_mm_128_5g_ea3;
355 static int hf_nas_5gs_mm_5g_ea4;
356 static int hf_nas_5gs_mm_5g_ea5;
357 static int hf_nas_5gs_mm_5g_ea6;
358 static int hf_nas_5gs_mm_5g_ea7;
359 static int hf_nas_5gs_mm_5g_ia0;
360 static int hf_nas_5gs_mm_5g_128_ia1;
361 static int hf_nas_5gs_mm_5g_128_ia2;
362 static int hf_nas_5gs_mm_5g_128_ia3;
363 static int hf_nas_5gs_mm_5g_ia4;
364 static int hf_nas_5gs_mm_5g_ia5;
365 static int hf_nas_5gs_mm_5g_ia6;
366 static int hf_nas_5gs_mm_5g_ia7;
367 static int hf_nas_5gs_mm_eea0;
368 static int hf_nas_5gs_mm_128eea1;
369 static int hf_nas_5gs_mm_128eea2;
370 static int hf_nas_5gs_mm_eea3;
371 static int hf_nas_5gs_mm_eea4;
372 static int hf_nas_5gs_mm_eea5;
373 static int hf_nas_5gs_mm_eea6;
374 static int hf_nas_5gs_mm_eea7;
375 static int hf_nas_5gs_mm_eia0;
376 static int hf_nas_5gs_mm_128eia1;
377 static int hf_nas_5gs_mm_128eia2;
378 static int hf_nas_5gs_mm_eia3;
379 static int hf_nas_5gs_mm_eia4;
380 static int hf_nas_5gs_mm_eia5;
381 static int hf_nas_5gs_mm_eia6;
382 static int hf_nas_5gs_mm_eia7;
383 static int hf_nas_5gs_mm_n1_mode_reg_b1;
384 static int hf_nas_5gs_mm_s1_mode_reg_b0;
386 static int hf_nas_5gs_mm_sal_al_t;
387 static int hf_nas_5gs_mm_sal_t_li;
388 static int hf_nas_5gs_mm_sal_num_e;
390 static int hf_nas_5gs_pdu_ses_sts_psi_7_b7;
391 static int hf_nas_5gs_pdu_ses_sts_psi_6_b6;
392 static int hf_nas_5gs_pdu_ses_sts_psi_5_b5;
393 static int hf_nas_5gs_pdu_ses_sts_psi_4_b4;
394 static int hf_nas_5gs_pdu_ses_sts_psi_3_b3;
395 static int hf_nas_5gs_pdu_ses_sts_psi_2_b2;
396 static int hf_nas_5gs_pdu_ses_sts_psi_1_b1;
397 static int hf_nas_5gs_pdu_ses_sts_psi_0_b0;
399 static int hf_nas_5gs_pdu_ses_sts_psi_15_b7;
400 static int hf_nas_5gs_pdu_ses_sts_psi_14_b6;
401 static int hf_nas_5gs_pdu_ses_sts_psi_13_b5;
402 static int hf_nas_5gs_pdu_ses_sts_psi_12_b4;
403 static int hf_nas_5gs_pdu_ses_sts_psi_11_b3;
404 static int hf_nas_5gs_pdu_ses_sts_psi_10_b2;
405 static int hf_nas_5gs_pdu_ses_sts_psi_9_b1;
406 static int hf_nas_5gs_pdu_ses_sts_psi_8_b0;
408 static int hf_nas_5gs_pdu_ses_rect_res_psi_7_b7;
409 static int hf_nas_5gs_pdu_ses_rect_res_psi_6_b6;
410 static int hf_nas_5gs_pdu_ses_rect_res_psi_5_b5;
411 static int hf_nas_5gs_pdu_ses_rect_res_psi_4_b4;
412 static int hf_nas_5gs_pdu_ses_rect_res_psi_3_b3;
413 static int hf_nas_5gs_pdu_ses_rect_res_psi_2_b2;
414 static int hf_nas_5gs_pdu_ses_rect_res_psi_1_b1;
415 static int hf_nas_5gs_pdu_ses_rect_res_psi_0_b0;
417 static int hf_nas_5gs_pdu_ses_rect_res_psi_15_b7;
418 static int hf_nas_5gs_pdu_ses_rect_res_psi_14_b6;
419 static int hf_nas_5gs_pdu_ses_rect_res_psi_13_b5;
420 static int hf_nas_5gs_pdu_ses_rect_res_psi_12_b4;
421 static int hf_nas_5gs_pdu_ses_rect_res_psi_11_b3;
422 static int hf_nas_5gs_pdu_ses_rect_res_psi_10_b2;
423 static int hf_nas_5gs_pdu_ses_rect_res_psi_9_b1;
424 static int hf_nas_5gs_pdu_ses_rect_res_psi_8_b0;
426 static int hf_nas_5gs_ul_data_sts_psi_7_b7;
427 static int hf_nas_5gs_ul_data_sts_psi_6_b6;
428 static int hf_nas_5gs_ul_data_sts_psi_5_b5;
429 static int hf_nas_5gs_ul_data_sts_psi_4_b4;
430 static int hf_nas_5gs_ul_data_sts_psi_3_b3;
431 static int hf_nas_5gs_ul_data_sts_psi_2_b2;
432 static int hf_nas_5gs_ul_data_sts_psi_1_b1;
433 static int hf_nas_5gs_ul_data_sts_psi_0_b0;
435 static int hf_nas_5gs_ul_data_sts_psi_15_b7;
436 static int hf_nas_5gs_ul_data_sts_psi_14_b6;
437 static int hf_nas_5gs_ul_data_sts_psi_13_b5;
438 static int hf_nas_5gs_ul_data_sts_psi_12_b4;
439 static int hf_nas_5gs_ul_data_sts_psi_11_b3;
440 static int hf_nas_5gs_ul_data_sts_psi_10_b2;
441 static int hf_nas_5gs_ul_data_sts_psi_9_b1;
442 static int hf_nas_5gs_ul_data_sts_psi_8_b0;
444 static int hf_nas_5gs_allow_pdu_ses_sts_psi_7_b7;
445 static int hf_nas_5gs_allow_pdu_ses_sts_psi_6_b6;
446 static int hf_nas_5gs_allow_pdu_ses_sts_psi_5_b5;
447 static int hf_nas_5gs_allow_pdu_ses_sts_psi_4_b4;
448 static int hf_nas_5gs_allow_pdu_ses_sts_psi_3_b3;
449 static int hf_nas_5gs_allow_pdu_ses_sts_psi_2_b2;
450 static int hf_nas_5gs_allow_pdu_ses_sts_psi_1_b1;
451 static int hf_nas_5gs_allow_pdu_ses_sts_psi_0_b0;
453 static int hf_nas_5gs_allow_pdu_ses_sts_psi_15_b7;
454 static int hf_nas_5gs_allow_pdu_ses_sts_psi_14_b6;
455 static int hf_nas_5gs_allow_pdu_ses_sts_psi_13_b5;
456 static int hf_nas_5gs_allow_pdu_ses_sts_psi_12_b4;
457 static int hf_nas_5gs_allow_pdu_ses_sts_psi_11_b3;
458 static int hf_nas_5gs_allow_pdu_ses_sts_psi_10_b2;
459 static int hf_nas_5gs_allow_pdu_ses_sts_psi_9_b1;
460 static int hf_nas_5gs_allow_pdu_ses_sts_psi_8_b0;
462 static int hf_nas_5gs_sm_pdu_session_type;
463 static int hf_nas_5gs_sm_sc_mode;
464 static int hf_nas_5gs_sm_eplmnc;
465 static int hf_nas_5gs_sm_ratc;
466 static int hf_nas_5gs_sm_naps;
467 static int hf_nas_5gs_sm_ept_s1;
468 static int hf_nas_5gs_sm_catbo;
469 static int hf_nas_5gs_sm_abo;
470 static int hf_nas_5gs_sm_atsss_cont;
471 static int hf_nas_5gs_sm_cpoi;
472 static int hf_nas_5gs_sm_ip_hdr_comp_config_p0104;
473 static int hf_nas_5gs_sm_ip_hdr_comp_config_p0103;
474 static int hf_nas_5gs_sm_ip_hdr_comp_config_p0102;
475 static int hf_nas_5gs_sm_ip_hdr_comp_config_p0006;
476 static int hf_nas_5gs_sm_ip_hdr_comp_config_p0004;
477 static int hf_nas_5gs_sm_ip_hdr_comp_config_p0003;
478 static int hf_nas_5gs_sm_ip_hdr_comp_config_p0002;
479 static int hf_nas_5gs_sm_ip_hdr_comp_config_max_cid;
480 static int hf_nas_5gs_sm_ip_hdr_comp_config_add_ip_hdr_compr_cxt_setup_params_type;
481 static int hf_nas_5gs_sm_ip_hdr_comp_config_add_ip_hdr_compr_cxt_setup_params_cont;
482 static int hf_nas_5gs_sm_ds_tt_eth_port_mac_addr;
483 static int hf_nas_5gs_sm_ue_ds_tt_residence_time;
484 static int hf_nas_5gs_sm_port_mgmt_info_cont;
485 static int hf_nas_5gs_sm_eth_hdr_comp_config_cid_len;
486 static int hf_nas_5gs_sm_pdu_session_pair_id;
487 static int hf_nas_5gs_sm_pdu_session_rsn;
488 static int hf_nas_5gs_sm_sel_sc_mode;
489 static int hf_nas_5gs_sm_tpmic_b7;
490 static int hf_nas_5gs_sm_atsss_st_b3_b6;
491 static int hf_nas_5gs_sm_ept_s1_b2;
492 static int hf_nas_5gs_sm_mh6_pdu_b1;
493 static int hf_nas_5gs_sm_rqos_b0;
494 static int hf_nas_5gs_sm_sdnaepc_b1;
495 static int hf_nas_5gs_sm_apmqf_b0;
496 static int hf_nas_5gs_sm_5gsm_cause;
497 static int hf_nas_5gs_sm_apsi;
498 static int hf_nas_5gs_sm_apsr;
499 static int hf_nas_5gs_sm_int_prot_max_data_rate_ul;
500 static int hf_nas_5gs_sm_int_prot_max_data_rate_dl;
501 static int hf_nas_5gs_sm_si6lla;
502 static int hf_nas_5gs_sm_pdu_ses_type;
503 static int hf_nas_5gs_sm_pdu_addr_inf_ipv4;
504 static int hf_nas_5gs_sm_pdu_addr_inf_ipv6;
505 static int hf_nas_5gs_sm_smf_ipv6_lla;
506 static int hf_nas_5gs_sm_qos_rule_id;
507 static int hf_nas_5gs_sm_length;
508 static int hf_nas_5gs_sm_rop;
509 static int hf_nas_5gs_sm_dqr;
510 static int hf_nas_5gs_sm_nof_pkt_filters;
511 static int hf_nas_5gs_sm_pkt_flt_id;
512 static int hf_nas_5gs_sm_pkt_flt_dir;
513 static int hf_nas_5gs_sm_pf_len;
514 static int hf_nas_5gs_sm_pf_type;
515 static int hf_nas_5gs_sm_e;
516 static int hf_nas_5gs_sm_nof_params;
517 static int hf_nas_5gs_sm_param_id;
518 static int hf_nas_5gs_sm_param_len;
519 static int hf_nas_5gs_sm_qos_rule_precedence;
520 static int hf_nas_5gs_sm_segregation;
521 static int hf_nas_5gs_sm_param_cont;
522 static int hf_nas_5gs_sm_5qi;
523 static int hf_nas_5gs_sm_unit_for_gfbr_ul;
524 static int hf_nas_5gs_sm_gfbr_ul;
525 static int hf_nas_5gs_sm_unit_for_gfbr_dl;
526 static int hf_nas_5gs_sm_gfbr_dl;
527 static int hf_nas_5gs_sm_unit_for_mfbr_ul;
528 static int hf_nas_5gs_sm_mfbr_ul;
529 static int hf_nas_5gs_sm_unit_for_mfbr_dl;
530 static int hf_nas_5gs_sm_mfbr_dl;
531 static int hf_nas_5gs_sm_averaging_window;
532 static int hf_nas_5gs_sm_eps_bearer_id;
533 static int hf_nas_5gs_sm_qfi;
534 static int hf_nas_5gs_sm_mapd_eps_b_cont_id;
535 static int hf_nas_5gs_sm_mapd_eps_b_cont_opt_code;
536 static int hf_nas_5gs_sm_qos_des_flow_opt_code;
537 static int hf_nas_5gs_sm_mapd_eps_b_cont_E;
538 static int hf_nas_5gs_sm_mapd_eps_b_cont_num_eps_parms;
539 static int hf_nas_5gs_sm_mapd_eps_b_cont_E_mod;
540 static int hf_nas_5gs_sm_mapd_eps_b_cont_param_id;
542 static int hf_nas_5gs_sm_unit_for_session_ambr_dl;
543 static int hf_nas_5gs_sm_session_ambr_dl;
544 static int hf_nas_5gs_sm_unit_for_session_ambr_ul;
545 static int hf_nas_5gs_sm_session_ambr_ul;
546 static int hf_nas_5gs_sm_dm_spec_id;
547 static int hf_nas_5gs_sm_all_ssc_mode_b0;
548 static int hf_nas_5gs_sm_all_ssc_mode_b1;
549 static int hf_nas_5gs_sm_all_ssc_mode_b2;
550 static int hf_nas_5gs_addr_mask_ipv4;
551 static int hf_nas_5gs_ipv6;
552 static int hf_nas_5gs_ipv6_prefix_len;
553 static int hf_nas_5gs_protocol_identifier_or_next_hd;
554 static int hf_nas_5gs_mm_rinmr;
555 static int hf_nas_5gs_mm_hdp;
556 static int hf_nas_5gs_mm_cipher_key;
557 static int hf_nas_5gs_mm_dcni;
558 static int hf_nas_5gs_mm_nssci;
559 static int hf_nas_5gs_mm_nssai_inc_mode;
560 static int hf_nas_5gs_mm_ue_usage_setting;
561 static int hf_nas_5gs_mm_5gs_drx_param;
562 static int hf_nas_5gs_sup_andsp;
563 static int hf_nas_5gs_nssui;
565 static int ett_nas_5gs;
566 static int ett_nas_5gs_mm_nssai;
567 static int ett_nas_5gs_mm_pdu_ses_id;
568 static int ett_nas_5gs_sm_qos_rules;
569 static int ett_nas_5gs_sm_qos_params;
570 static int ett_nas_5gs_plain;
571 static int ett_nas_5gs_sec;
572 static int ett_nas_5gs_mm_part_sal;
573 static int ett_nas_5gs_mm_part_tal;
574 static int ett_nas_5gs_sm_mapd_eps_b_cont;
575 static int ett_nas_5gs_sm_mapd_eps_b_cont_params_list;
576 static int ett_nas_5gs_enc;
577 static int ett_nas_5gs_mm_ladn_indic;
578 static int ett_nas_5gs_mm_sor;
579 static int ett_nas_5gs_sm_pkt_filter_components;
580 static int ett_nas_5gs_updp_ue_policy_section_mgm_lst;
581 static int ett_nas_5gs_updp_ue_policy_section_mgm_sublst;
582 static int ett_nas_5gs_ue_policies_ursp;
583 static int ett_nas_5gs_ursp_traff_desc;
584 static int ett_nas_5gs_usrp_r_sel_list;
585 static int ett_nas_5gs_usrp_r_sel;
586 static int ett_nas_5gs_ursp_r_sel_desc_cont;
587 static int ett_nas_5gs_updp_upsi_list;
588 static int ett_nas_5gs_mm_rej_nssai;
589 static int ett_nas_5gs_mm_scheme_output;
590 static int ett_nas_5gs_mm_pld_cont_pld_entry;
591 static int ett_nas_5gs_mm_pld_cont_opt_ie;
592 static int ett_nas_5gs_mm_cag_info_entry;
593 static int ett_nas_5gs_ciot_small_data_cont_data_contents;
594 static int ett_nas_5gs_user_data_cont;
595 static int ett_nas_5gs_ciph_data_set;
596 static int ett_nas_5gs_mm_mapped_nssai;
597 static int ett_nas_5gs_mm_partial_extended_rejected_nssai_list;
598 static int ett_nas_5gs_mm_ext_rej_nssai_back_off_timer;
599 static int ett_nas_5gs_mm_ext_rej_nssai;
600 static int ett_nas_5gs_mm_op_def_acc_cat_def;
601 static int ett_nas_5gs_mm_op_def_acc_cat_criteria_component;
602 static int ett_nas_5gs_mm_op_def_acc_cat_criteria;
603 static int ett_nas_5gs_cmn_service_level_aa_cont_param;
604 static int ett_nas_5gs_mm_pld_cont_event_notif_ind;
605 static int ett_nas_5gs_mm_peips_assist_info;
606 static int ett_nas_5gs_mm_nssrg_info;
607 static int ett_nas_5gs_mm_plmns_list_disaster_cond;
608 static int ett_nas_5gs_mm_reg_wait_range;
609 static int ett_nas_5gs_mm_nsag_info;
610 static int ett_nas_5gs_mm_snpn_list;
611 static int ett_nas_5gs_mm_ext_ladn_info;
612 static int ett_nas_5gs_mm_alt_nssai;
613 static int ett_nas_5gs_mm_alt_nssai_replaced;
614 static int ett_nas_5gs_mm_alt_nssai_alternative;
615 static int ett_nas_5gs_mm_s_nssai_loc_valid_info;
616 static int ett_nas_5gs_mm_s_nssai_time_valid_info;
617 static int ett_nas_5gs_mm_on_demand_nssai;
619 static int hf_nas_5gs_mm_abba;
620 static int hf_nas_5gs_mm_supi_fmt;
621 static int hf_nas_5gs_mm_routing_indicator;
622 static int hf_nas_5gs_mm_prot_scheme_id;
623 static int hf_nas_5gs_mm_pki;
624 static int hf_nas_5gs_mm_suci_msin;
625 static int hf_nas_5gs_mm_scheme_output;
626 static int hf_nas_5gs_mm_scheme_output_ecc_public_key;
627 static int hf_nas_5gs_mm_scheme_output_ciphertext;
628 static int hf_nas_5gs_mm_scheme_output_mac_tag;
629 static int hf_nas_5gs_mm_suci_nai;
630 static int hf_nas_5gs_mm_imei;
631 static int hf_nas_5gs_mm_imeisv;
632 static int hf_nas_5gs_mm_mauri;
633 static int hf_nas_5gs_mm_mac_addr;
634 static int hf_nas_5gs_mm_eui_64;
635 static int hf_nas_5gs_mm_reg_res_res;
636 static int hf_nas_5gs_mm_reg_res_sms_allowed;
637 static int hf_nas_5gs_mm_reg_res_nssaa_perf;
638 static int hf_nas_5gs_mm_reg_res_emergency_reg;
639 static int hf_nas_5gs_mm_reg_res_disaster_roaming_reg_res;
640 static int hf_nas_5gs_amf_region_id;
641 static int hf_nas_5gs_amf_set_id;
642 static int hf_nas_5gs_amf_pointer;
643 static int hf_nas_5gs_5g_tmsi;
644 static int hf_nas_5gs_mm_op_def_access_cat_len;
645 static int hf_nas_5gs_mm_op_def_access_cat_precedence;
646 static int hf_nas_5gs_mm_op_def_access_cat_psac;
647 static int hf_nas_5gs_mm_op_def_access_cat_number;
648 static int hf_nas_5gs_mm_op_def_access_cat_criteria_length;
649 static int hf_nas_5gs_mm_op_def_access_cat_criteria_type;
650 static int hf_nas_5gs_mm_op_def_access_cat_criteria_dnn_count;
651 static int hf_nas_5gs_mm_op_def_access_cat_criteria_dnn_len;
652 static int hf_nas_5gs_mm_op_def_access_cat_criteria_os_id_os_app_id_count;
653 static int hf_nas_5gs_mm_op_def_access_cat_criteria_os_id;
654 static int hf_nas_5gs_mm_op_def_access_cat_criteria_os_app_id_len;
655 static int hf_nas_5gs_mm_op_def_access_cat_criteria_os_app_id;
656 static int hf_nas_5gs_mm_op_def_access_cat_criteria_s_nssai_count;
657 static int hf_nas_5gs_mm_op_def_access_cat_criteria_s_nssai_len;
658 static int hf_nas_5gs_mm_op_def_access_cat_standardized_number;
659 static int hf_nas_5gs_mm_sms_indic_sai;
661 static int hf_nas_5gs_nw_feat_sup_mpsi_b7;
662 static int hf_nas_5gs_nw_feat_sup_ims_iwk_n26_b6;
663 static int hf_nas_5gs_nw_feat_sup_ims_emf_b5b4;
664 static int hf_nas_5gs_nw_feat_sup_ims_emc_b3b2;
665 static int hf_nas_5gs_nw_feat_sup_ims_vops_3gpp;
666 static int hf_nas_5gs_nw_feat_sup_ims_vops_n3gpp;
667 static int hf_nas_5gs_nw_feat_sup_emcn3;
668 static int hf_nas_5gs_nw_feat_sup_mcsi;
669 static int hf_nas_5gs_nw_feat_sup_restrict_ec;
670 static int hf_nas_5gs_nw_feat_sup_5g_cp_ciot;
671 static int hf_nas_5gs_nw_feat_sup_n3_data;
672 static int hf_nas_5gs_nw_feat_sup_5g_iphc_cp_ciot;
673 static int hf_nas_5gs_nw_feat_sup_5g_ciot_up;
674 static int hf_nas_5gs_nw_feat_sup_5g_lcs;
675 static int hf_nas_5gs_nw_feat_sup_ats_ind;
676 static int hf_nas_5gs_nw_feat_sup_5g_ehc_cp_ciot;
677 static int hf_nas_5gs_nw_feat_sup_ncr;
678 static int hf_nas_5gs_nw_feat_sup_piv;
679 static int hf_nas_5gs_nw_feat_sup_rpr;
680 static int hf_nas_5gs_nw_feat_sup_pr;
681 static int hf_nas_5gs_nw_feat_sup_un_per;
682 static int hf_nas_5gs_nw_feat_sup_naps;
683 static int hf_nas_5gs_nw_feat_sup_lcs_upp;
684 static int hf_nas_5gs_nw_feat_sup_supl;
685 static int hf_nas_5gs_nw_feat_sup_rslp;
687 static int hf_nas_5gs_tac;
689 static int hf_nas_5gs_mm_tal_t_li;
690 static int hf_nas_5gs_mm_tal_num_e;
691 static int hf_nas_5gs_sm_mapd_eps_b_cont_eps_param_cont;
693 static int hf_nas_5gs_sm_max_nb_sup_pkt_flt_nb;
694 static int hf_nas_5gs_sm_max_nb_sup_pkt_flt_spare;
696 static int hf_nas_5gs_kacf;
697 static int hf_nas_5gs_ncc;
699 static int hf_nas_5gs_sor_hdr0_ap;
700 static int hf_nas_5gs_sor_hdr0_ack;
701 static int hf_nas_5gs_sor_hdr0_list_type;
702 static int hf_nas_5gs_sor_hdr0_list_ind;
703 static int hf_nas_5gs_sor_hdr0_sor_data_type;
704 static int hf_nas_5gs_sor_mssi;
705 static int hf_nas_5gs_sor_mssnpnsi;
706 static int hf_nas_5gs_sor_msssnpnsils;
707 static int hf_nas_5gs_sor_mac_iue;
708 static int hf_nas_5gs_sor_mac_iausf;
709 static int hf_nas_5gs_counter_sor;
710 static int hf_nas_5gs_sor_sec_pkt;
711 static int hf_nas_5gs_sor_sssli;
712 static int hf_nas_5gs_sor_sssi;
713 static int hf_nas_5gs_sor_sscmi;
714 static int hf_nas_5gs_sor_si;
715 static int hf_nas_5gs_sor_plmn_id_act_len;
716 static int hf_nas_5gs_sor_cmci_len;
717 static int hf_nas_5gs_sor_cmci_payload;
718 static int hf_nas_5gs_sor_snpn_si_len;
719 static int hf_nas_5gs_sor_snpn_si_payload;
720 static int hf_nas_5gs_sor_snpn_si_ls_len;
721 static int hf_nas_5gs_sor_snpn_si_ls_payload;
723 static int hf_nas_5gs_access_tech_o1_b7;
724 static int hf_nas_5gs_access_tech_o1_b6;
725 static int hf_nas_5gs_access_tech_o1_b5;
726 static int hf_nas_5gs_access_tech_o1_b4;
727 static int hf_nas_5gs_access_tech_o1_b3;
728 static int hf_nas_5gs_access_tech_o2_b7;
729 static int hf_nas_5gs_access_tech_o2_b6;
730 static int hf_nas_5gs_access_tech_o2_b5;
731 static int hf_nas_5gs_access_tech_o2_b4;
732 static int hf_nas_5gs_access_tech_o2_b3;
733 static int hf_nas_5gs_access_tech_o2_b2;
734 static int hf_nas_5gs_single_port_type;
735 static int hf_nas_5gs_port_range_type_low;
736 static int hf_nas_5gs_port_range_type_high;
737 static int hf_nas_5gs_sec_param_idx;
738 static int hf_nas_5gs_tos_tc_val;
739 static int hf_nas_5gs_tos_tc_mask;
740 static int hf_nas_5gs_flow_label;
741 static int hf_nas_5gs_mac_addr;
742 static int hf_nas_5gs_vlan_tag_vid;
743 static int hf_nas_5gs_vlan_tag_pcp;
744 static int hf_nas_5gs_vlan_tag_dei;
745 static int hf_nas_5gs_ethertype;
746 static int hf_nas_5gs_mac_addr_low;
747 static int hf_nas_5gs_mac_addr_high;
748 static int hf_nas_5gs_updp_ue_pol_sect_sublst_len;
749 static int hf_nas_5gs_updp_ue_pol_sect_subresult_len;
750 static int hf_nas_5gs_updp_instr_len;
751 static int hf_nas_5gs_updp_upsc;
752 static int hf_nas_5gs_updp_failed_instruction_order;
753 static int hf_nas_5gs_updp_policy_len;
754 static int hf_nas_5gs_updp_ue_policy_part_type;
755 static int hf_nas_5gs_updp_ue_policy_part_cont;
756 static int hf_nas_5gs_ursp_rule_len;
757 static int hf_nas_5gs_ursp_rule_prec;
758 static int hf_nas_5gs_ursp_traff_desc_lst_len;
759 static int hf_nas_5gs_ursp_traff_desc;
760 static int hf_nas_5gs_ursp_r_sel_desc_lst_len;
761 static int hf_nas_5gs_ursp_r_sel_desc_lst;
762 static int hf_nas_5gs_ursp_traff_desc_ipv4;
763 static int hf_nas_5gs_ursp_traff_desc_ipv4_mask;
764 static int hf_nas_5gs_ursp_traff_desc_ipv6;
765 static int hf_nas_5gs_ursp_traff_desc_ipv6_prefix_len;
766 static int hf_nas_5gs_ursp_traff_desc_next_hdr;
767 static int hf_nas_5gs_ursp_traff_desc_single_remote_port;
768 static int hf_nas_5gs_ursp_traff_desc_remote_port_range_low;
769 static int hf_nas_5gs_ursp_traff_desc_remote_port_range_high;
770 static int hf_nas_5gs_ursp_traff_desc_sec_param_index;
771 static int hf_nas_5gs_ursp_traff_desc_tos_tc;
772 static int hf_nas_5gs_ursp_traff_desc_tos_tc_mask;
773 static int hf_nas_5gs_ursp_traff_desc_flow_label;
774 static int hf_nas_5gs_ursp_traff_desc_dest_mac_addr;
775 static int hf_nas_5gs_ursp_traff_desc_ctag_vid;
776 static int hf_nas_5gs_ursp_traff_desc_stag_vid;
777 static int hf_nas_5gs_ursp_traff_desc_ctag_pcp;
778 static int hf_nas_5gs_ursp_traff_desc_ctag_dei;
779 static int hf_nas_5gs_ursp_traff_desc_stag_pcp;
780 static int hf_nas_5gs_ursp_traff_desc_stag_dei;
781 static int hf_nas_5gs_ursp_traff_desc_ethertype;
782 static int hf_nas_5gs_ursp_traff_desc_conn_cap_len;
783 static int hf_nas_5gs_ursp_traff_desc_conn_cap;
784 static int hf_nas_5gs_ursp_traff_desc_dest_fqdn_len;
785 static int hf_nas_5gs_ursp_traff_desc_dest_fqdn;
786 static int hf_nas_5gs_ursp_traff_desc_dest_mac_addr_range_low;
787 static int hf_nas_5gs_ursp_traff_desc_dest_mac_addr_range_high;
788 static int hf_nas_5gs_ursp_traff_desc_len;
789 static int hf_nas_5gs_ursp_r_sel_des_prec;
790 static int hf_nas_5gs_ursp_r_sel_des_cont_len;
791 static int hf_nas_5gs_ursp_ursp_r_sel_desc_comp_type;
792 static int hf_nas_5gs_dnn_len;
793 static int hf_nas_5gs_upsi_sublist_len;
794 static int hf_nas_5gs_upsc;
795 static int hf_nas_5gs_os_id;
796 static int hf_nas_5gs_upds_cause;
797 static int hf_nas_5gs_v2xuui;
798 static int hf_nas_5gs_v2xpc5i;
799 static int hf_nas_5gs_os_app_id_len;
800 static int hf_nas_5gs_os_app_id;
801 static int hf_nas_5gs_mm_len_of_rej_s_nssai;
802 static int hf_nas_5gs_mm_rej_s_nssai_cause;
803 static int hf_nas_5gs_mm_ue_radio_cap_id;
804 static int hf_nas_5gs_mm_ue_radio_cap_id_del_req;
805 static int hf_nas_5gs_mm_trunc_amf_set_id;
806 static int hf_nas_5gs_mm_trunc_amf_pointer;
807 static int hf_nas_5gs_mm_n5gcreg_b0;
808 static int hf_nas_5gs_mm_nb_n1_drx_value;
809 static int hf_nas_5gs_mm_scmr;
810 static int hf_nas_5gs_mm_extended_rejected_nssai_number_of_element;
811 static int hf_nas_5gs_mm_extended_rejected_nssai_type_of_list;
812 static int hf_nas_5gs_mm_extended_rejected_nssai_spare;
813 static int hf_nas_5gs_mm_extended_rejected_nssai_back_off_timer;
814 static int hf_nas_5gs_mm_len_of_rejected_s_nssai;
815 static int hf_nas_5gs_mm_rejected_s_nssai_cause_value;
816 static int hf_nas_5gs_mm_paging_restriction_type;
817 static int hf_nas_5gs_mm_paging_restriction_psi_7;
818 static int hf_nas_5gs_mm_paging_restriction_psi_6;
819 static int hf_nas_5gs_mm_paging_restriction_psi_5;
820 static int hf_nas_5gs_mm_paging_restriction_psi_4;
821 static int hf_nas_5gs_mm_paging_restriction_psi_3;
822 static int hf_nas_5gs_mm_paging_restriction_psi_2;
823 static int hf_nas_5gs_mm_paging_restriction_psi_1;
824 static int hf_nas_5gs_mm_paging_restriction_psi_0;
825 static int hf_nas_5gs_mm_paging_restriction_psi_15;
826 static int hf_nas_5gs_mm_paging_restriction_psi_14;
827 static int hf_nas_5gs_mm_paging_restriction_psi_13;
828 static int hf_nas_5gs_mm_paging_restriction_psi_12;
829 static int hf_nas_5gs_mm_paging_restriction_psi_11;
830 static int hf_nas_5gs_mm_paging_restriction_psi_10;
831 static int hf_nas_5gs_mm_paging_restriction_psi_9;
832 static int hf_nas_5gs_mm_paging_restriction_psi_8;
833 static int hf_nas_5gs_mm_nid_assign_mode;
834 static int hf_nas_5gs_mm_nid_value;
835 static int hf_nas_5gs_mm_peips_assist_info_type;
836 static int hf_nas_5gs_mm_peips_assist_info_paging_subgroup_id;
837 static int hf_nas_5gs_mm_peips_assist_info_ue_paging_probability_info;
838 static int hf_nas_5gs_mm_add_req_res_prd;
839 static int hf_nas_5gs_mm_nssrg_info_len;
840 static int hf_nas_5gs_mm_nssrg_info_s_nssai_len;
841 static int hf_nas_5gs_mm_nssrg_info_nssrg;
842 static int hf_nas_5gs_mm_nsag_info_len;
843 static int hf_nas_5gs_mm_nsag_id;
844 static int hf_nas_5gs_mm_nsag_info_s_nssai_len;
845 static int hf_nas_5gs_mm_nsag_prio;
846 static int hf_nas_5gs_mm_nsag_tais_list_len;
847 static int hf_nas_5gs_mm_prose_relay_trans_id;
848 static int hf_nas_5gs_mm_relay_key_req_params_relay_service_code;
849 static int hf_nas_5gs_mm_relay_key_req_params_nonce_1;
850 static int hf_nas_5gs_mm_relay_key_req_params_uit;
851 static int hf_nas_5gs_mm_relay_key_req_params_ue_id;
852 static int hf_nas_5gs_mm_relay_key_resp_params_key_knr_prose;
853 static int hf_nas_5gs_mm_relay_key_resp_params_nonce_2;
854 static int hf_nas_5gs_mm_relay_key_resp_params_cp_pruk_id;
855 static int hf_nas_5gs_mm_prio_ind_mcsi;
856 static int hf_nas_5gs_mm_prio_ind_mpsi;
857 static int hf_nas_5gs_mm_n3iwf_id_type;
858 static int hf_nas_5gs_mm_n3iwf_id_ipv4;
859 static int hf_nas_5gs_mm_n3iwf_id_ipv6;
860 static int hf_nas_5gs_mm_n3iwf_id_fqdn;
861 static int hf_nas_5gs_mm_tnan_info_ssid_ind;
862 static int hf_nas_5gs_mm_tnan_info_tngf_id_ind;
863 static int hf_nas_5gs_mm_tnan_info_tngf_id_len;
864 static int hf_nas_5gs_mm_tnan_info_tngf_id;
865 static int hf_nas_5gs_mm_tnan_info_ssid_len;
866 static int hf_nas_5gs_mm_tnan_info_ssid;
867 static int hf_nas_5gs_mm_ran_timing_sync_recreq;
868 static int hf_nas_5gs_mm_n3gpp_acc_path_switch_ind_naps;
869 static int hf_nas_5gs_mm_s_nssai_loc_valid_info_per_s_nssai_len;
870 static int hf_nas_5gs_mm_s_nssai_loc_valid_info_per_s_nssai_nb_nr_cgi;
871 static int hf_nas_5gs_mm_s_nssai_loc_valid_info_per_s_nssai_nr_cell_id;
872 static int hf_nas_5gs_mm_s_nssai_time_valid_info_per_s_nssai_len;
873 static int hf_nas_5gs_mm_s_nssai_time_valid_info_time_window_len;
874 static int hf_nas_5gs_mm_s_nssai_time_valid_info_time_window_start_time;
875 static int hf_nas_5gs_mm_s_nssai_time_valid_info_time_window_stop_time;
876 static int hf_nas_5gs_mm_s_nssai_time_valid_info_time_window_recurrence_pattern;
877 static int hf_nas_5gs_mm_s_nssai_time_valid_info_time_window_recurrence_end_time;
878 static int hf_nas_5gs_mm_n3gpp_path_switch_info_nsonr;
879 static int hf_nas_5gs_mm_au3n_ind_aun3reg;
880 static int hf_nas_5gs_mm_feat_auth_ind_mbsrai;
881 static int hf_nas_5gs_mm_payload_cont_info_pru;
882 static int hf_nas_5gs_mm_aun3_device_sec_key_askt;
883 static int hf_nas_5gs_mm_aun3_device_sec_key_key_len;
884 static int hf_nas_5gs_mm_aun3_device_sec_key_key;
885 static int hf_nas_5gs_mm_on_demand_nssai_len;
886 static int hf_nas_5gs_mm_on_demand_nssai_slice_dereg_inactiv_timer;
887 static int hf_nas_5gs_mm_ext_5gmm_cause_sat_nr;
888 static int hf_nas_5gs_ue_os_id;
890 static expert_field ei_nas_5gs_extraneous_data;
891 static expert_field ei_nas_5gs_unknown_pd;
892 static expert_field ei_nas_5gs_mm_unknown_msg_type;
893 static expert_field ei_nas_5gs_sm_unknown_msg_type;
894 static expert_field ei_nas_5gs_updp_unknown_msg_type;
895 static expert_field ei_nas_5gs_msg_not_dis;
896 static expert_field ei_nas_5gs_ie_not_dis;
897 static expert_field ei_nas_5gs_missing_mandatory_element;
898 static expert_field ei_nas_5gs_dnn_too_long;
899 static expert_field ei_nas_5gs_unknown_value;
900 static expert_field ei_nas_5gs_num_pkt_flt;
901 static expert_field ei_nas_5gs_not_diss;
903 #define NAS_5GS_PLAIN_NAS_MSG 0
904 #define NAS_5GS_INTEG_NAS_MSG 1
905 #define NAS_5GS_INTEG_CIPH_NAS_MSG 2
906 #define NAS_5GS_INTEG_NEW_NAS_MSG 3
907 #define NAS_5GS_INTEG_CIPH_NEW_NAS_MSG 4
909 static const value_string nas_5gs_security_header_type_vals[] = {
910 { NAS_5GS_PLAIN_NAS_MSG, "Plain NAS message, not security protected"},
911 { NAS_5GS_INTEG_NAS_MSG, "Integrity protected"},
912 { NAS_5GS_INTEG_CIPH_NAS_MSG, "Integrity protected and ciphered"},
913 { NAS_5GS_INTEG_NEW_NAS_MSG, "Integrity protected with new 5GS security context"},
914 { NAS_5GS_INTEG_CIPH_NEW_NAS_MSG, "Integrity protected and ciphered with new 5GS security context"},
915 { 0, NULL }
918 #define N1_SMINFO_FROM_UE "n1SmInfoFromUe"
919 #define N1_SMINFO_TO_UE "n1SmInfoToUe"
920 #define UNKNOWN_N1_SMINFO "unknownN1SmInfo"
922 #define TGPP_PD_5GMM 0x7e
923 #define TGPP_PD_5GSM 0x2e
925 static const value_string nas_5gs_epd_vals[] = {
926 { 0x00, "Group call control" },
927 { 0x01, "Broadcast call control" },
928 { 0x02, "EPS session management messages" },
929 { 0x03, "Call Control; call related SS messages" },
930 { 0x04, "GPRS Transparent Transport Protocol (GTTP)" },
931 { 0x05, "Mobility Management messages" },
932 { 0x06, "Radio Resources Management messages" },
933 { 0x07, "EPS mobility management messages" },
934 { 0x08, "GPRS mobility management messages" },
935 { 0x09, "SMS messages" },
936 { 0x0a, "GPRS session management messages" },
937 { 0x0b, "Non call related SS messages" },
938 { 0x0c, "Location services specified in 3GPP TS 44.071" },
939 { 0x0d, "Unknown" },
940 /*{0x0e, "Reserved for extension of the PD to one octet length "},*/
941 { 0x0f, "Tests procedures described in 3GPP TS 44.014, 3GPP TS 34.109 and 3GPP TS 36.509" },
942 { TGPP_PD_5GSM, "5G session management messages" },
943 { TGPP_PD_5GMM, "5G mobility management messages" },
944 { 0, NULL }
947 struct nas5gs_private_data {
948 uint8_t sec_hdr_type;
949 uint32_t payload_container_type;
952 static struct nas5gs_private_data*
953 nas5gs_get_private_data(packet_info *pinfo)
955 struct nas5gs_private_data *nas5gs_data = (struct nas5gs_private_data*)p_get_proto_data(pinfo->pool, pinfo, proto_nas_5gs, pinfo->curr_layer_num);
956 if (!nas5gs_data) {
957 nas5gs_data = wmem_new0(pinfo->pool, struct nas5gs_private_data);
958 p_add_proto_data(pinfo->pool, pinfo, proto_nas_5gs, pinfo->curr_layer_num, nas5gs_data);
960 return nas5gs_data;
963 static uint32_t
964 get_ext_ambr_unit(uint32_t unit, const char **unit_str)
966 uint32_t mult;
968 if (unit == 0) {
969 mult = 1;
970 *unit_str = "Unit value 0, Illegal";
971 return mult;
974 if (unit <= 0x05) {
975 mult = pow4(uint32_t, unit - 0x01);
976 *unit_str = "Kbps";
977 } else if (unit <= 0x0a) {
978 mult = pow4(uint32_t, unit - 0x06);
979 *unit_str = "Mbps";
980 } else if (unit <= 0x0f) {
981 mult = pow4(uint32_t, unit - 0x0b);
982 *unit_str = "Gbps";
983 } else if (unit <= 0x14) {
984 mult = pow4(uint32_t, unit - 0x10);
985 *unit_str = "Tbps";
986 } else if (unit <= 0x19) {
987 mult = pow4(uint32_t, unit - 0x15);
988 *unit_str = "Pbps";
989 } else {
990 mult = 256;
991 *unit_str = "Pbps";
993 return mult;
997 * 9.11.3 5GS mobility management (5GMM) information elements
1001 * 9.11.3.1 5GMM capability
1003 static uint16_t
1004 de_nas_5gs_mm_5gmm_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
1005 uint32_t offset, unsigned len,
1006 char *add_string _U_, int string_len _U_)
1008 uint32_t curr_offset;
1010 static int * const flags1[] = {
1011 &hf_nas_5gs_mm_sgc_b7,
1012 &hf_nas_5gs_mm_5g_iphc_cp_ciot_b6,
1013 &hf_nas_5gs_mm_n3_data_b5,
1014 &hf_nas_5gs_mm_5g_cp_ciot_b4,
1015 &hf_nas_5gs_mm_restrict_ec_b3,
1016 &hf_nas_5gs_mm_lpp_cap_b2,
1017 &hf_nas_5gs_mm_ho_attach_b1,
1018 &hf_nas_5gs_mm_s1_mode_b0,
1019 NULL
1022 static int * const flags2[] = {
1023 &hf_nas_5gs_mm_racs_b7,
1024 &hf_nas_5gs_mm_nssaa_b6,
1025 &hf_nas_5gs_mm_5g_lcs_b5,
1026 &hf_nas_5gs_mm_v2xcnpc5_b4,
1027 &hf_nas_5gs_mm_v2xcepc5_b3,
1028 &hf_nas_5gs_mm_v2x_b2,
1029 &hf_nas_5gs_mm_5g_up_ciot_b1,
1030 &hf_nas_5gs_mm_5g_srvcc_b0,
1031 NULL
1034 static int * const flags3[] = {
1035 &hf_nas_5gs_mm_5g_prose_l2relay_b7,
1036 &hf_nas_5gs_mm_5g_prose_dc_b6,
1037 &hf_nas_5gs_mm_5g_prose_dd_b5,
1038 &hf_nas_5gs_mm_er_nssai_b4,
1039 &hf_nas_5gs_mm_5g_ehc_cp_ciot_b3,
1040 &hf_nas_5gs_mm_multiple_up_b2,
1041 &hf_nas_5gs_mm_wsusa_b1,
1042 &hf_nas_5gs_mm_cag_b0,
1043 NULL
1046 static int * const flags4[] = {
1047 &hf_nas_5gs_mm_pr_b7,
1048 &hf_nas_5gs_mm_rpr_b6,
1049 &hf_nas_5gs_mm_piv_b5,
1050 &hf_nas_5gs_mm_ncr_b4,
1051 &hf_nas_5gs_mm_nr_pssi_b3,
1052 &hf_nas_5gs_mm_5g_prose_l3rmt_b2,
1053 &hf_nas_5gs_mm_5g_prose_l2rmt_b1,
1054 &hf_nas_5gs_mm_5g_prose_l3relay_b0,
1055 NULL
1058 static int * const flags5[] = {
1059 &hf_nas_5gs_mm_mpsiu_b7,
1060 &hf_nas_5gs_mm_uas_b6,
1061 &hf_nas_5gs_mm_nsag_b5,
1062 &hf_nas_5gs_mm_ex_cag_b4,
1063 &hf_nas_5gs_mm_ssnpnsi_b3,
1064 &hf_nas_5gs_mm_event_notif_b2,
1065 &hf_nas_5gs_mm_mint_b1,
1066 &hf_nas_5gs_mm_nssrg_b0,
1067 NULL
1070 static int * const flags6[] = {
1071 &hf_nas_5gs_mm_sbts_b7,
1072 &hf_nas_5gs_mm_nsr_b6,
1073 &hf_nas_5gs_mm_ladn_ds_b5,
1074 &hf_nas_5gs_mm_rantiming_b4,
1075 &hf_nas_5gs_mm_eci_b3,
1076 &hf_nas_5gs_mm_esi_b2,
1077 &hf_nas_5gs_mm_rcman_b1,
1078 &hf_nas_5gs_mm_rcmap_b0,
1079 NULL
1082 static int * const flags7[] = {
1083 &hf_nas_5gs_mm_5g_prose_l2end_b7,
1084 &hf_nas_5gs_mm_5g_prose_l3u2u_relay_b6,
1085 &hf_nas_5gs_mm_5g_prose_l2u2u_relay_b5,
1086 &hf_nas_5gs_mm_rslps_b4,
1087 &hf_nas_5gs_mm_sbns_b3,
1088 &hf_nas_5gs_mm_un_per_b2,
1089 &hf_nas_5gs_mm_a2xnpc5_b1,
1090 &hf_nas_5gs_mm_a2xepc5_b0,
1091 NULL
1094 static int * const flags8[] = {
1095 &hf_nas_5gs_mm_a2x_uu_b7,
1096 &hf_nas_5gs_mm_slvi_b6,
1097 &hf_nas_5gs_mm_tempns_b5,
1098 &hf_nas_5gs_mm_supl_b4,
1099 &hf_nas_5gs_mm_lcs_upp_b3,
1100 &hf_nas_5gs_mm_pns_b2,
1101 &hf_nas_5gs_mm_rslp_b1,
1102 &hf_nas_5gs_mm_5g_prose_l3end_b0,
1103 NULL
1106 static int * const flags9[] = {
1107 &hf_nas_5gs_spare_b7,
1108 &hf_nas_5gs_spare_b6,
1109 &hf_nas_5gs_spare_b5,
1110 &hf_nas_5gs_spare_b4,
1111 &hf_nas_5gs_nsuc_b3,
1112 &hf_nas_5gs_rslpl_b2,
1113 &hf_nas_5gs_mm_nvl_satnr_b1,
1114 &hf_nas_5gs_mm_mcsiu_b0,
1115 NULL
1118 curr_offset = offset;
1120 proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, flags1, ENC_BIG_ENDIAN);
1121 curr_offset++;
1123 if ((curr_offset - offset) >= len)
1124 return (len);
1126 proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, flags2, ENC_BIG_ENDIAN);
1127 curr_offset++;
1129 if ((curr_offset - offset) >= len)
1130 return (len);
1132 proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, flags3, ENC_BIG_ENDIAN);
1133 curr_offset++;
1135 if ((curr_offset - offset) >= len)
1136 return (len);
1138 proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, flags4, ENC_BIG_ENDIAN);
1139 curr_offset++;
1141 if ((curr_offset - offset) >= len)
1142 return (len);
1144 proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, flags5, ENC_BIG_ENDIAN);
1145 curr_offset++;
1147 if ((curr_offset - offset) >= len)
1148 return (len);
1150 proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, flags6, ENC_BIG_ENDIAN);
1151 curr_offset++;
1153 if ((curr_offset - offset) >= len)
1154 return (len);
1156 proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, flags7, ENC_BIG_ENDIAN);
1157 curr_offset++;
1159 if ((curr_offset - offset) >= len)
1160 return (len);
1162 proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, flags8, ENC_BIG_ENDIAN);
1163 curr_offset++;
1165 if ((curr_offset - offset) >= len)
1166 return (len);
1168 proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, flags9, ENC_BIG_ENDIAN);
1169 curr_offset++;
1171 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_nas_5gs_extraneous_data);
1173 return (curr_offset - offset);
1177 * 9.11.3.2 5GMM cause
1180 static const value_string nas_5gs_mm_cause_vals[] = {
1181 { 0x03, "Illegal UE" },
1182 { 0x05, "PEI not accepted" },
1183 { 0x06, "Illegal ME" },
1184 { 0x07, "5GS services not allowed" },
1185 { 0x09, "UE identity cannot be derived by the network" },
1186 { 0x0a, "Implicitly deregistered" },
1187 { 0x0b, "PLMN not allowed" },
1188 { 0x0c, "Tracking area not allowed" },
1189 { 0x0d, "Roaming not allowed in this tracking area" },
1190 { 0x0f, "No suitable cells in tracking area" },
1191 { 0x14, "MAC failure" },
1192 { 0x15, "Synch failure" },
1193 { 0x16, "Congestion" },
1194 { 0x17, "UE security capabilities mismatch" },
1195 { 0x18, "Security mode rejected, unspecified" },
1196 { 0x1a, "Non-5G authentication unacceptable" },
1197 { 0x1b, "N1 mode not allowed" },
1198 { 0x1c, "Restricted service area" },
1199 { 0x1f, "Redirection to EPC required" },
1200 { 0x24, "IAB-node operation not authorized" },
1201 { 0x2b, "LADN not available" },
1202 { 0x3e, "No network slices available" },
1203 { 0x41, "Maximum number of PDU sessions reached" },
1204 { 0x43, "Insufficient resources for specific slice and DNN" },
1205 { 0x45, "Insufficient resources for specific slice" },
1206 { 0x47, "ngKSI already in use" },
1207 { 0x48, "Non-3GPP access to 5GCN not allowed" },
1208 { 0x49, "Serving network not authorized" },
1209 { 0x4a, "Temporarily not authorized for this SNPN" },
1210 { 0x4b, "Permanently not authorized for this SNPN" },
1211 { 0x4c, "Not authorized for this CAG or authorized for CAG cells only" },
1212 { 0x4d, "Wireline access area not allowed" },
1213 { 0x4e, "PLMN not allowed to operate at the present UE location" },
1214 { 0x4f, "UAS services not allowed" },
1215 { 0x50, "Disaster roaming for the determined PLMN with disaster condition not allowed" },
1216 { 0x51, "Selected N3IWF is not compatible with the allowed NSSAI" },
1217 { 0x52, "Selected TNGF is not compatible with the allowed NSSAI" },
1218 { 0x5a, "Payload was not forwarded" },
1219 { 0x5b, "DNN not supported or not subscribed in the slice" },
1220 { 0x5c, "Insufficient user-plane resources for the PDU session" },
1221 { 0x5d, "Onboarding services terminated" },
1222 { 0x5e, "User plane positioning not authorized" },
1223 { 0x5f, "Semantically incorrect message" },
1224 { 0x60, "Invalid mandatory information" },
1225 { 0x61, "Message type non-existent or not implemented" },
1226 { 0x62, "Message type not compatible with the protocol state" },
1227 { 0x63, "Information element non-existent or not implemented" },
1228 { 0x64, "Conditional IE error" },
1229 { 0x65, "Message not compatible with the protocol state" },
1230 { 0x6f, "Protocol error, unspecified" },
1231 { 0, NULL }
1234 static uint16_t
1235 de_nas_5gs_mm_5gmm_cause(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
1236 uint32_t offset, unsigned len _U_,
1237 char *add_string _U_, int string_len _U_)
1239 uint32_t cause;
1241 proto_tree_add_item_ret_uint(tree, hf_nas_5gs_mm_5gmm_cause, tvb, offset, 1, ENC_BIG_ENDIAN, &cause);
1243 col_append_fstr(pinfo->cinfo, COL_INFO, " (%s)",
1244 val_to_str_const(cause, nas_5gs_mm_cause_vals, "Unknown"));
1247 return 1;
1251 static const value_string nas_5gs_mm_drx_vals[] = {
1252 { 0x0, "DRX value not specified" },
1253 { 0x1, "DRX cycle parameter T = 32" },
1254 { 0x2, "DRX cycle parameter T = 64" },
1255 { 0x3, "DRX cycle parameter T = 128" },
1256 { 0x4, "DRX cycle parameter T = 256" },
1257 { 0, NULL }
1261 /* 9.11.3.2A 5GS DRX parameters*/
1262 static uint16_t
1263 de_nas_5gs_mm_5gs_drx_param(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
1264 uint32_t offset, unsigned len _U_,
1265 char *add_string _U_, int string_len _U_)
1268 proto_tree_add_item(tree, hf_nas_5gs_mm_5gs_drx_param, tvb, offset, 1, ENC_BIG_ENDIAN);
1270 return 1;
1274 * 9.11.3.3 5GS identity type
1276 static uint16_t
1277 de_nas_5gs_mm_5gs_identity_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
1278 uint32_t offset, unsigned len _U_,
1279 char *add_string _U_, int string_len _U_)
1282 proto_tree_add_item(tree, hf_nas_5gs_mm_type_id, tvb, offset, 1, ENC_BIG_ENDIAN);
1284 return 1;
1288 * 9.11.3.4 5GS mobile identity
1290 static const value_string nas_5gs_mm_type_id_vals[] = {
1291 { 0x0, "No identity" },
1292 { 0x1, "SUCI" },
1293 { 0x2, "5G-GUTI" },
1294 { 0x3, "IMEI" },
1295 { 0x4, "5G-S-TMSI" },
1296 { 0x5, "IMEISV" },
1297 { 0x6, "MAC address" },
1298 { 0x7, "EUI-64" },
1299 { 0, NULL }
1302 static true_false_string nas_5gs_odd_even_tfs = {
1303 "Odd number of identity digits",
1304 "Even number of identity digits"
1307 static const value_string nas_5gs_mm_supi_fmt_vals[] = {
1308 { 0x0, "IMSI" },
1309 { 0x1, "Network Specific Identifier" },
1310 { 0x2, "GCI" },
1311 { 0x3, "GLI" },
1312 { 0, NULL }
1315 static const value_string nas_5gs_mm_prot_scheme_id_vals[] = {
1316 { 0x0, "NULL scheme" },
1317 { 0x1, "ECIES scheme profile A" },
1318 { 0x2, "ECIES scheme profile B" },
1319 { 0, NULL }
1322 static true_false_string nas_5gs_mauri_tfs = {
1323 "MAC address is not usable as an equipment identifier",
1324 "No restrictions"
1327 static uint16_t
1328 de_nas_5gs_mm_5gs_mobile_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
1329 uint32_t offset, unsigned len,
1330 char *add_string _U_, int string_len _U_)
1332 uint8_t oct, type_id, supi_fmt;
1333 uint32_t scheme_id, fiveg_tmsi;
1334 tvbuff_t * new_tvb;
1335 const char *route_id_str;
1336 proto_item* ti;
1338 static int * const flags_spare_tid[] = {
1339 &hf_nas_5gs_spare_b7,
1340 &hf_nas_5gs_spare_b6,
1341 &hf_nas_5gs_spare_b5,
1342 &hf_nas_5gs_spare_b4,
1343 &hf_nas_5gs_spare_b3,
1344 &hf_nas_5gs_mm_type_id,
1345 NULL
1348 static int * const flags_supi_fmt_tid[] = {
1349 &hf_nas_5gs_spare_b7,
1350 &hf_nas_5gs_mm_supi_fmt,
1351 &hf_nas_5gs_spare_b3,
1352 &hf_nas_5gs_mm_type_id,
1353 NULL
1356 static int * const flags_odd_even_tid[] = {
1357 &hf_nas_5gs_mm_odd_even,
1358 &hf_nas_5gs_mm_type_id,
1359 NULL
1362 static int * const flags_mauri_tid[] = {
1363 &hf_nas_5gs_spare_b7,
1364 &hf_nas_5gs_spare_b6,
1365 &hf_nas_5gs_spare_b5,
1366 &hf_nas_5gs_spare_b4,
1367 &hf_nas_5gs_mm_mauri,
1368 &hf_nas_5gs_mm_type_id,
1369 NULL
1372 oct = tvb_get_uint8(tvb, offset);
1373 type_id = oct & 0x07;
1375 switch (type_id) {
1376 case 0:
1377 proto_tree_add_bitmask_list(tree, tvb, offset, 1, flags_spare_tid, ENC_BIG_ENDIAN);
1378 break;
1379 case 1:
1380 /* SUCI */
1381 proto_tree_add_bitmask_list(tree, tvb, offset, 1, flags_supi_fmt_tid, ENC_BIG_ENDIAN);
1382 offset++;
1384 supi_fmt = (oct & 0x70) >> 4;
1385 if (supi_fmt == 0) {
1386 /* IMSI */
1388 /* MCC digit 2 MCC digit 1
1389 * MNC digit 3 MCC digit 3
1390 * MNC digit 2 MNC digit 1
1392 offset = dissect_e212_mcc_mnc(tvb, pinfo, tree, offset, E212_NONE, true);
1393 /* Routing indicator octet 8-9 */
1394 new_tvb = tvb_new_subset_length(tvb, offset, 2);
1395 route_id_str = tvb_bcd_dig_to_str(pinfo->pool, new_tvb, 0, (tvb_get_uint8(new_tvb, 1) == 0xff) ? 1 : 2, NULL, false);
1396 proto_tree_add_string(tree, hf_nas_5gs_mm_routing_indicator, new_tvb, 0, -1, route_id_str);
1397 offset += 2;
1398 /* Protection scheme id octet 10 */
1399 proto_tree_add_item_ret_uint(tree, hf_nas_5gs_mm_prot_scheme_id, tvb, offset, 1, ENC_BIG_ENDIAN, &scheme_id);
1400 offset += 1;
1401 /* Home network public key identifier octet 11 */
1402 proto_tree_add_item(tree, hf_nas_5gs_mm_pki, tvb, offset, 1, ENC_BIG_ENDIAN);
1403 offset += 1;
1404 /* Scheme output octet 12-x */
1405 if (scheme_id == 0) {
1406 new_tvb = tvb_new_subset_length(tvb, offset, len - 8);
1407 proto_tree_add_item(tree, hf_nas_5gs_mm_suci_msin, new_tvb, 0, -1, ENC_BCD_DIGITS_0_9|ENC_LITTLE_ENDIAN);
1408 } else {
1409 proto_item *pi = proto_tree_add_item(tree, hf_nas_5gs_mm_scheme_output, tvb, offset, len - 8, ENC_NA);
1410 if ((scheme_id == 1 && len >= 49) || (scheme_id == 2 && len >= 50)) {
1411 uint32_t public_key_len;
1412 proto_tree *subtree = proto_item_add_subtree(pi, ett_nas_5gs_mm_scheme_output);
1413 if (scheme_id == 1) {
1414 public_key_len = 32;
1415 } else {
1416 public_key_len = 33;
1418 proto_tree_add_item(subtree, hf_nas_5gs_mm_scheme_output_ecc_public_key, tvb, offset, public_key_len, ENC_NA);
1419 offset += public_key_len;
1420 proto_tree_add_item(subtree, hf_nas_5gs_mm_scheme_output_ciphertext, tvb, offset, len - public_key_len - 16, ENC_NA);
1421 offset += len - public_key_len - 16;
1422 proto_tree_add_item(subtree, hf_nas_5gs_mm_scheme_output_mac_tag, tvb, offset, 8, ENC_BIG_ENDIAN);
1425 } else if (supi_fmt == 1 ||supi_fmt == 2 ||supi_fmt == 3) {
1426 /* NAI */
1427 proto_tree_add_item(tree, hf_nas_5gs_mm_suci_nai, tvb, offset, len - 1, ENC_UTF_8 | ENC_NA);
1428 } else {
1429 proto_tree_add_expert(tree, pinfo, &ei_nas_5gs_unknown_value, tvb, offset, len - 1);
1431 break;
1432 case 2:
1433 /* 5G-GUTI*/
1434 proto_tree_add_bitmask_list(tree, tvb, offset, 1, flags_spare_tid, ENC_BIG_ENDIAN);
1435 offset++;
1436 /* MCC digit 2 MCC digit 1
1437 * MNC digit 3 MCC digit 3
1438 * MNC digit 2 MNC digit 1
1440 offset = dissect_e212_mcc_mnc(tvb, pinfo, tree, offset, E212_GUAMI, true);
1441 /* AMF Region ID octet 7 */
1442 proto_tree_add_item(tree, hf_nas_5gs_amf_region_id, tvb, offset, 1, ENC_BIG_ENDIAN);
1443 offset += 1;
1444 /* AMF Set ID octet 8 */
1445 proto_tree_add_item(tree, hf_nas_5gs_amf_set_id, tvb, offset, 2, ENC_BIG_ENDIAN);
1446 offset++;
1447 /* AMF AMF Pointer AMF Set ID (continued) */
1448 proto_tree_add_item(tree, hf_nas_5gs_amf_pointer, tvb, offset, 1, ENC_BIG_ENDIAN);
1449 offset++;
1450 proto_tree_add_item_ret_uint(tree, hf_nas_5gs_5g_tmsi, tvb, offset, 4, ENC_BIG_ENDIAN, &fiveg_tmsi);
1451 ti = proto_tree_add_uint(tree, hf_3gpp_tmsi, tvb, offset, 4, fiveg_tmsi);
1452 proto_item_set_hidden(ti);
1453 break;
1454 case 3:
1455 /* IMEI */
1456 proto_tree_add_bitmask_list(tree, tvb, offset, 1, flags_odd_even_tid, ENC_BIG_ENDIAN);
1457 proto_tree_add_item(tree, hf_nas_5gs_mm_imei, tvb, offset, len, ENC_BCD_DIGITS_0_9 | ENC_LITTLE_ENDIAN | ENC_BCD_SKIP_FIRST);
1458 break;
1459 case 4:
1460 /*5G-S-TMSI*/
1461 proto_tree_add_bitmask_list(tree, tvb, offset, 1, flags_odd_even_tid, ENC_BIG_ENDIAN);
1462 offset++;
1463 /* AMF Set ID */
1464 proto_tree_add_item(tree, hf_nas_5gs_amf_set_id, tvb, offset, 2, ENC_BIG_ENDIAN);
1465 offset++;
1466 /* AMF Pointer AMF Set ID (continued) */
1467 proto_tree_add_item(tree, hf_nas_5gs_amf_pointer, tvb, offset, 1, ENC_BIG_ENDIAN);
1468 offset++;
1469 proto_tree_add_item_ret_uint(tree, hf_nas_5gs_5g_tmsi, tvb, offset, 4, ENC_BIG_ENDIAN, &fiveg_tmsi);
1470 ti = proto_tree_add_uint(tree, hf_3gpp_tmsi, tvb, offset, 4, fiveg_tmsi);
1471 proto_item_set_hidden(ti);
1472 break;
1473 case 5:
1474 /* IMEISV */
1475 proto_tree_add_bitmask_list(tree, tvb, offset, 1, flags_odd_even_tid, ENC_BIG_ENDIAN);
1476 /* XXXX Do we need the odd/even bit?*/
1477 proto_tree_add_item(tree, hf_nas_5gs_mm_imeisv, tvb, offset, len, ENC_BCD_DIGITS_0_9 | ENC_LITTLE_ENDIAN | ENC_BCD_SKIP_FIRST);
1478 break;
1479 case 6:
1480 /* MAC address */
1481 proto_tree_add_bitmask_list(tree, tvb, offset, 1, flags_mauri_tid, ENC_BIG_ENDIAN);
1482 offset++;
1483 proto_tree_add_item(tree, hf_nas_5gs_mm_mac_addr, tvb, offset, 6, ENC_NA);
1484 break;
1485 case 7:
1486 /* EUI-64 */
1487 proto_tree_add_bitmask_list(tree, tvb, offset, 1, flags_spare_tid, ENC_BIG_ENDIAN);
1488 offset++;
1489 proto_tree_add_item(tree, hf_nas_5gs_mm_eui_64, tvb, offset, 8, ENC_NA);
1490 break;
1492 default:
1493 proto_tree_add_item(tree, hf_nas_5gs_mm_type_id, tvb, offset, 1, ENC_BIG_ENDIAN);
1494 proto_tree_add_expert(tree, pinfo, &ei_nas_5gs_unknown_value, tvb, offset, len);
1495 break;
1498 return len;
1502 * 9.11.3.5 5GS network feature support
1505 static const value_string nas_5gs_nw_feat_sup_emc_values[] = {
1506 { 0x0, "Emergency services not supported" },
1507 { 0x1, "Emergency services supported in NR connected to 5GCN only" },
1508 { 0x2, "Emergency services supported in E-UTRA connected to 5GCN only" },
1509 { 0x3, "Emergency services supported in NR connected to 5GCN and E-UTRA connected to 5GCN" },
1510 { 0, NULL }
1513 static const value_string nas_5gs_nw_feat_sup_emf_values[] = {
1514 { 0x0, "Emergency services fallback not supported" },
1515 { 0x1, "Emergency services fallback supported in NR connected to 5GCN only" },
1516 { 0x2, "Emergency services fallback supported in E-UTRA connected to 5GCN only" },
1517 { 0x3, "Emergency services fallback supported in NR connected to 5GCN and E-UTRA connected to 5GCN" },
1518 { 0, NULL }
1521 static const true_false_string tfs_nas_5gs_nw_feat_sup_mpsi = {
1522 "Access identity 1 valid in RPLMN or equivalent PLMN",
1523 "Access identity 1 not valid in RPLMN or equivalent PLMN"
1526 static const true_false_string tfs_nas_5gs_nw_feat_sup_mcsi = {
1527 "Access identity 2 valid",
1528 "Access identity 2 not valid"
1531 static const value_string nas_5gs_nw_feat_sup_restrict_ec_values[] = {
1532 { 0x0, "WB-N1: Both CE mode A and CE mode B are not restricted / NB-N1: Use of enhanced coverage is not restricted" },
1533 { 0x1, "WB-N1: Both CE mode A and CE mode B are restricted / NB-N1: Use of enhanced coverage is restricted" },
1534 { 0x2, "WB-N1: CE mode B is restricted / NB-N1: Restricted" },
1535 { 0x3, "Restricted" },
1536 { 0, NULL }
1539 static uint16_t
1540 de_nas_5gs_mm_5gs_nw_feat_sup(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
1541 uint32_t offset, unsigned len,
1542 char *add_string _U_, int string_len _U_)
1544 uint32_t curr_offset = offset;
1546 static int * const flags_oct3[] = {
1547 &hf_nas_5gs_nw_feat_sup_mpsi_b7,
1548 &hf_nas_5gs_nw_feat_sup_ims_iwk_n26_b6,
1549 &hf_nas_5gs_nw_feat_sup_ims_emf_b5b4,
1550 &hf_nas_5gs_nw_feat_sup_ims_emc_b3b2,
1551 &hf_nas_5gs_nw_feat_sup_ims_vops_n3gpp,
1552 &hf_nas_5gs_nw_feat_sup_ims_vops_3gpp,
1553 NULL
1556 static int * const flags_oct4[] = {
1557 &hf_nas_5gs_nw_feat_sup_5g_ciot_up,
1558 &hf_nas_5gs_nw_feat_sup_5g_iphc_cp_ciot,
1559 &hf_nas_5gs_nw_feat_sup_n3_data,
1560 &hf_nas_5gs_nw_feat_sup_5g_cp_ciot,
1561 &hf_nas_5gs_nw_feat_sup_restrict_ec,
1562 &hf_nas_5gs_nw_feat_sup_mcsi,
1563 &hf_nas_5gs_nw_feat_sup_emcn3,
1564 NULL
1567 static int * const flags_oct5[] = {
1568 &hf_nas_5gs_nw_feat_sup_un_per,
1569 &hf_nas_5gs_nw_feat_sup_pr,
1570 &hf_nas_5gs_nw_feat_sup_rpr,
1571 &hf_nas_5gs_nw_feat_sup_piv,
1572 &hf_nas_5gs_nw_feat_sup_ncr,
1573 &hf_nas_5gs_nw_feat_sup_5g_ehc_cp_ciot,
1574 &hf_nas_5gs_nw_feat_sup_ats_ind,
1575 &hf_nas_5gs_nw_feat_sup_5g_lcs,
1576 NULL
1579 static int * const flags_oct6[] = {
1580 &hf_nas_5gs_spare_b7,
1581 &hf_nas_5gs_spare_b6,
1582 &hf_nas_5gs_spare_b5,
1583 &hf_nas_5gs_spare_b4,
1584 &hf_nas_5gs_nw_feat_sup_rslp,
1585 &hf_nas_5gs_nw_feat_sup_supl,
1586 &hf_nas_5gs_nw_feat_sup_lcs_upp,
1587 &hf_nas_5gs_nw_feat_sup_naps,
1588 NULL
1591 /* MPSI IWK N26 EMF EMC IMS VoPS octet 3*/
1592 proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, flags_oct3, ENC_BIG_ENDIAN);
1593 curr_offset++;
1595 if (len == 1) {
1596 return len;
1599 /* 5G-UP CIoT 5G-IPHC-CP CIoT N3 data 5G-CP CIoT RestrictEC MCSI EMCN3 octet 4*/
1600 proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, flags_oct4, ENC_BIG_ENDIAN);
1601 curr_offset++;
1603 if (len == 2) {
1604 return len;
1607 /* UN-PER PR RPR PIV NCR 5G-EHC-CP CIoT ATS-IND 5G-LCS octet 5*/
1608 proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, flags_oct5, ENC_BIG_ENDIAN);
1609 curr_offset++;
1611 if (len == 3) {
1612 return len;
1615 /* spare spare spare spare RSLP SUPL LCS-UPP NAPS octet 6*/
1616 proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, flags_oct6, ENC_BIG_ENDIAN);
1617 curr_offset++;
1619 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_nas_5gs_extraneous_data);
1621 return len;
1625 * 9.11.3.6 5GS registration result
1628 static const value_string nas_5gs_mm_reg_res_values[] = {
1629 { 0x1, "3GPP access" },
1630 { 0x2, "Non-3GPP access" },
1631 { 0x3, "3GPP access and non-3GPP access" },
1632 { 0, NULL }
1635 static true_false_string tfs_nas_5gs_mm_reg_res_nssaa_perf = {
1636 "Network slice-specific authentication and authorization is to be performed",
1637 "Network slice-specific authentication and authorization is not to be performed"
1640 static true_false_string tfs_nas_5gs_mm_reg_res_emergency_reg = {
1641 "Registered for emergency services",
1642 "Not registered for emergency services"
1645 static true_false_string tfs_nas_5gs_mm_reg_res_disaster_roaming_reg_res = {
1646 "Request for registration for disaster roaming services accepted as registration not for disaster roaming services",
1647 "No additional information"
1650 static uint16_t
1651 de_nas_5gs_mm_5gs_reg_res(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
1652 uint32_t offset, unsigned len _U_,
1653 char *add_string _U_, int string_len _U_)
1656 static int* const flags[] = {
1657 &hf_nas_5gs_mm_reg_res_disaster_roaming_reg_res,
1658 &hf_nas_5gs_mm_reg_res_emergency_reg,
1659 &hf_nas_5gs_mm_reg_res_nssaa_perf,
1660 &hf_nas_5gs_mm_reg_res_sms_allowed,
1661 &hf_nas_5gs_mm_reg_res_res,
1662 NULL
1665 /* 0 Spare 0 Spare 0 Spare NSSAA Performed SMS allowed 5GS registration result value */
1666 proto_tree_add_bitmask_list(tree, tvb, offset, 1, flags, ENC_BIG_ENDIAN);
1668 return 1;
1672 * 9.11.3.7 5GS registration type
1675 static const value_string nas_5gs_registration_type_values[] = {
1676 { 0x1, "initial registration" },
1677 { 0x2, "mobility registration updating" },
1678 { 0x3, "periodic registration updating" },
1679 { 0x4, "emergency registration" },
1680 { 0x5, "SNPN onboarding registration" },
1681 { 0x6, "disaster roaming mobility registration updating" },
1682 { 0x7, "disaster roaming initial registration" },
1683 { 0, NULL }
1686 static true_false_string nas_5gs_for_tfs = {
1687 "Follow-on request pending",
1688 "No follow-on request pending"
1691 static int * const nas_5gs_registration_type_flags[] = {
1692 &hf_nas_5gs_mm_for,
1693 &hf_nas_5gs_mm_5gs_reg_type,
1694 NULL
1697 static uint16_t
1698 de_nas_5gs_mm_5gs_reg_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
1699 uint32_t offset, unsigned len _U_,
1700 char *add_string _U_, int string_len _U_)
1705 /* FOR SMS requested 5GS registration type value octet 3*/
1706 proto_tree_add_bitmask_list(tree, tvb, offset, 1, nas_5gs_registration_type_flags, ENC_BIG_ENDIAN);
1708 return 1;
1712 * 9.11.3.8 5GS tracking area identity
1714 static uint16_t
1715 de_nas_5gs_mm_5gs_ta_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
1716 uint32_t offset, unsigned len _U_,
1717 char *add_string _U_, int string_len _U_)
1719 /* MCC digit 2 MCC digit 1 Octet 2*/
1720 /* MNC digit 3 MCC digit 3 Octet 3*/
1721 /* MNC digit 2 MNC digit 1 Octet 4*/
1722 /* TAC Octet 5 - 7 */
1723 uint32_t curr_offset;
1725 curr_offset = offset;
1727 curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, tree, curr_offset, E212_5GSTAI, true);
1728 proto_tree_add_item(tree, hf_nas_5gs_tac, tvb, curr_offset, 3, ENC_BIG_ENDIAN);
1729 curr_offset += 3;
1731 return curr_offset - offset;
1735 * 9.11.3.9 5GS tracking area identity list
1737 static const value_string nas_5gs_mm_tal_t_li_values[] = {
1738 { 0x00, "list of TACs belonging to one PLMN or SNPN, with non-consecutive TAC values" },
1739 { 0x01, "list of TACs belonging to one PLMN or SNPN, with consecutive TAC values" },
1740 { 0x02, "list of TAIs belonging to different PLMNs" },
1741 { 0, NULL } };
1743 static const value_string nas_5gs_mm_tal_num_e[] = {
1744 { 0x00, "1 element" },
1745 { 0x01, "2 elements" },
1746 { 0x02, "3 elements" },
1747 { 0x03, "4 elements" },
1748 { 0x04, "5 elements" },
1749 { 0x05, "6 elements" },
1750 { 0x06, "7 elements" },
1751 { 0x07, "8 elements" },
1752 { 0x08, "9 elements" },
1753 { 0x09, "10 elements" },
1754 { 0x0a, "11 elements" },
1755 { 0x0b, "12 elements" },
1756 { 0x0c, "13 elements" },
1757 { 0x0d, "14 elements" },
1758 { 0x0e, "15 elements" },
1759 { 0x0f, "16 elements" },
1760 { 0, NULL }
1763 static uint16_t
1764 de_nas_5gs_mm_5gs_ta_id_list(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
1765 uint32_t offset, unsigned len,
1766 char *add_string _U_, int string_len _U_)
1768 proto_tree *sub_tree;
1769 proto_item *item;
1771 static int * const flags[] = {
1772 &hf_nas_5gs_mm_tal_t_li,
1773 &hf_nas_5gs_mm_tal_num_e,
1774 NULL
1777 unsigned num_par_tal = 1;
1778 uint32_t curr_offset = offset;
1779 uint32_t start_offset;
1780 uint8_t tal_head, tal_t_li, tal_num_e;
1782 /*Partial tracking area list*/
1783 while ((curr_offset - offset) < len) {
1784 start_offset = curr_offset;
1785 sub_tree = proto_tree_add_subtree_format(tree, tvb, curr_offset, -1, ett_nas_5gs_mm_part_tal, &item, "Partial tracking area list %u", num_par_tal);
1786 /*Head of Partial tracking area list*/
1787 /* Type of list Number of elements octet 1 */
1788 tal_head = tvb_get_uint8(tvb, curr_offset);
1789 tal_t_li = (tal_head & 0x60) >> 5;
1790 tal_num_e = (tal_head & 0x1f) + 1;
1791 proto_tree_add_bitmask_list(sub_tree, tvb, curr_offset, 1, flags, ENC_BIG_ENDIAN);
1792 curr_offset++;
1793 switch (tal_t_li) {
1794 case 0:
1795 /*octet 2 MCC digit2 MCC digit1*/
1796 /*octet 3 MNC digit3 MCC digit3*/
1797 /*octet 4 MNC digit2 MNC digit1*/
1798 dissect_e212_mcc_mnc(tvb, pinfo, sub_tree, curr_offset, E212_5GSTAI, true);
1799 curr_offset += 3;
1800 while (tal_num_e > 0) {
1801 proto_tree_add_item(sub_tree, hf_nas_5gs_tac, tvb, curr_offset, 3, ENC_BIG_ENDIAN);
1802 curr_offset += 3;
1803 tal_num_e--;
1805 break;
1806 case 1:
1807 /*octet 2 MCC digit2 MCC digit1*/
1808 /*octet 3 MNC digit3 MCC digit3*/
1809 /*octet 4 MNC digit2 MNC digit1*/
1810 dissect_e212_mcc_mnc(tvb, pinfo, sub_tree, curr_offset, E212_5GSTAI, true);
1811 curr_offset += 3;
1813 /*octet 5 TAC 1*/
1814 proto_tree_add_item(sub_tree, hf_nas_5gs_tac, tvb, curr_offset, 3, ENC_BIG_ENDIAN);
1815 curr_offset+=3;
1816 break;
1817 case 2:
1818 while (tal_num_e > 0) {
1819 /*octet 2 MCC digit2 MCC digit1*/
1820 /*octet 3 MNC digit3 MCC digit3*/
1821 /*octet 4 MNC digit2 MNC digit1*/
1822 dissect_e212_mcc_mnc(tvb, pinfo, sub_tree, curr_offset, E212_5GSTAI, true);
1823 curr_offset += 3;
1825 /*octet 5 TAC 1*/
1826 proto_tree_add_item(sub_tree, hf_nas_5gs_tac, tvb, curr_offset, 3, ENC_BIG_ENDIAN);
1827 curr_offset += 3;
1829 tal_num_e--;
1831 break;
1832 case 3:
1833 dissect_e212_mcc_mnc(tvb, pinfo, sub_tree, curr_offset, E212_5GSTAI, true);
1834 curr_offset += 3;
1835 break;
1836 default:
1837 proto_tree_add_expert(sub_tree, pinfo, &ei_nas_5gs_unknown_value, tvb, curr_offset, len - 1);
1840 /*calculate the length of IE?*/
1841 proto_item_set_len(item, curr_offset - start_offset);
1842 /*calculate the number of Partial tracking area list*/
1843 num_par_tal++;
1846 return len;
1850 * 9.11.3.9A 5GS update type
1852 static const value_string nas_5gs_mm_5gs_pnb_ciot_values[] = {
1853 { 0x0, "no additional information" },
1854 { 0x1, "control plane CIoT 5GS optimization" },
1855 { 0x2, "user plane CIoT 5GS optimization" },
1856 { 0x3, "reserved" },
1857 { 0, NULL }
1860 static const value_string nas_5gs_mm_eps_pnb_ciot_values[] = {
1861 { 0x0, "no additional information" },
1862 { 0x1, "control plane CIoT EPS optimization" },
1863 { 0x2, "user plane CIoT EPS optimization" },
1864 { 0x3, "reserved" },
1865 { 0, NULL }
1868 static uint16_t
1869 de_nas_5gs_mm_update_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
1870 uint32_t offset, unsigned len _U_,
1871 char *add_string _U_, int string_len _U_)
1873 static int * const flags[] = {
1874 &hf_nas_5gs_spare_b7,
1875 &hf_nas_5gs_spare_b6,
1876 &hf_nas_5gs_mm_eps_pnb_ciot,
1877 &hf_nas_5gs_mm_5gs_pnb_ciot,
1878 &hf_nas_5gs_mm_ng_ran_rcu,
1879 &hf_nas_5gs_mm_sms_requested,
1880 NULL
1883 proto_tree_add_bitmask_list(tree, tvb, offset, 1, flags, ENC_BIG_ENDIAN);
1885 return 1;
1890 * 9.11.3.10 ABBA
1892 static uint16_t
1893 de_nas_5gs_mm_abba(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
1894 uint32_t offset, unsigned len,
1895 char *add_string _U_, int string_len _U_)
1897 proto_tree_add_item(tree, hf_nas_5gs_mm_abba, tvb, offset, len, ENC_NA);
1899 return len;
1903 * 9.11.3.11 Void
1907 * 9.11.3.12 Additional 5G security information
1909 static uint16_t
1910 de_nas_5gs_mm_add_5g_sec_inf(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
1911 uint32_t offset, unsigned len _U_,
1912 char *add_string _U_, int string_len _U_)
1914 static int * const flags[] = {
1915 &hf_nas_5gs_spare_b7,
1916 &hf_nas_5gs_spare_b6,
1917 &hf_nas_5gs_spare_b5,
1918 &hf_nas_5gs_spare_b4,
1919 &hf_nas_5gs_spare_b3,
1920 &hf_nas_5gs_spare_b2,
1921 &hf_nas_5gs_mm_rinmr,
1922 &hf_nas_5gs_mm_hdp,
1923 NULL
1926 proto_tree_add_bitmask_list(tree, tvb, offset, 1, flags, ENC_BIG_ENDIAN);
1928 return 1;
1932 * 9.11.3.12A Additional information requested
1934 static uint16_t
1935 de_nas_5gs_mm_add_inf_req(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_,
1936 uint32_t offset, unsigned len _U_,
1937 char* add_string _U_, int string_len _U_)
1939 static int* const flags[] = {
1940 &hf_nas_5gs_spare_b7,
1941 &hf_nas_5gs_spare_b6,
1942 &hf_nas_5gs_spare_b5,
1943 &hf_nas_5gs_spare_b4,
1944 &hf_nas_5gs_spare_b3,
1945 &hf_nas_5gs_spare_b2,
1946 &hf_nas_5gs_spare_b1,
1947 &hf_nas_5gs_mm_cipher_key,
1948 NULL
1951 proto_tree_add_bitmask_list(tree, tvb, offset, 1, flags, ENC_BIG_ENDIAN);
1953 return 1;
1957 * 9.11.3.13 Allowed PDU session status
1959 static true_false_string tfs_nas_5gs_allow_pdu_ses_sts_psi = {
1960 "user-plane resources of corresponding PDU session can be re-established over 3GPP access",
1961 "user-plane resources of corresponding PDU session is not allowed to be re-established over 3GPP access"
1964 static uint16_t
1965 de_nas_5gs_mm_allow_pdu_ses_sts(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
1966 uint32_t offset, unsigned len,
1967 char *add_string _U_, int string_len _U_)
1970 int curr_offset;
1972 static int * const psi_0_7_flags[] = {
1973 &hf_nas_5gs_allow_pdu_ses_sts_psi_7_b7,
1974 &hf_nas_5gs_allow_pdu_ses_sts_psi_6_b6,
1975 &hf_nas_5gs_allow_pdu_ses_sts_psi_5_b5,
1976 &hf_nas_5gs_allow_pdu_ses_sts_psi_4_b4,
1977 &hf_nas_5gs_allow_pdu_ses_sts_psi_3_b3,
1978 &hf_nas_5gs_allow_pdu_ses_sts_psi_2_b2,
1979 &hf_nas_5gs_allow_pdu_ses_sts_psi_1_b1,
1980 &hf_nas_5gs_allow_pdu_ses_sts_psi_0_b0,
1981 NULL
1984 static int * const psi_8_15_flags[] = {
1985 &hf_nas_5gs_allow_pdu_ses_sts_psi_15_b7,
1986 &hf_nas_5gs_allow_pdu_ses_sts_psi_14_b6,
1987 &hf_nas_5gs_allow_pdu_ses_sts_psi_13_b5,
1988 &hf_nas_5gs_allow_pdu_ses_sts_psi_12_b4,
1989 &hf_nas_5gs_allow_pdu_ses_sts_psi_11_b3,
1990 &hf_nas_5gs_allow_pdu_ses_sts_psi_10_b2,
1991 &hf_nas_5gs_allow_pdu_ses_sts_psi_9_b1,
1992 &hf_nas_5gs_allow_pdu_ses_sts_psi_8_b0,
1993 NULL
1996 curr_offset = offset;
1997 proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, psi_0_7_flags, ENC_BIG_ENDIAN);
1998 curr_offset++;
2000 proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, psi_8_15_flags, ENC_BIG_ENDIAN);
2001 curr_offset++;
2003 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_nas_5gs_extraneous_data);
2005 return (curr_offset - offset);
2009 * 9.11.3.14 Authentication failure parameter
2011 /* See subclause 10.5.3.2.2 in 3GPP TS 24.008 */
2014 * 9.11.3.15 Authentication parameter AUTN
2016 /* See subclause 10.5.3.1 in 3GPP TS 24.008 */
2019 * 9.11.3.16 Authentication parameter RAND
2022 /* See subclause 10.5.3.1 in 3GPP TS 24.008 */
2025 * 9.11.3.17 Authentication response parameter
2027 /* See subclause 9.9.3.4 in 3GPP TS 24.301 */
2030 * 9.11.3.18 Configuration update indication
2032 static uint16_t
2033 de_nas_5gs_mm_conf_upd_ind(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
2034 uint32_t offset, unsigned len _U_,
2035 char *add_string _U_, int string_len _U_)
2038 static int * const flags[] = {
2039 &hf_nas_5gs_spare_b3,
2040 &hf_nas_5gs_spare_b2,
2041 &hf_nas_5gs_mm_conf_upd_ind_red_b1,
2042 &hf_nas_5gs_mm_conf_upd_ind_ack_b0,
2043 NULL
2046 proto_tree_add_bitmask_list(tree, tvb, offset, 1, flags, ENC_BIG_ENDIAN);
2048 return 1;
2052 * 9.11.3.18A CAG information list
2054 static true_false_string tfs_5gs_mm_cag_info_entry_cag_only = {
2055 "the UE is not allowed to access 5GS via non-CAG cells",
2056 "the UE is allowed to access 5GS via non-CAG cells"
2059 static uint16_t
2060 dissect_nas_5gs_mm_cag_information_list(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo,
2061 uint32_t offset, unsigned len, bool is_ext)
2063 proto_tree *sub_tree;
2064 proto_item *item;
2065 unsigned num_entry = 1;
2066 uint32_t curr_offset = offset;
2067 uint32_t start_offset, entry_len;
2068 bool caili, lci;
2070 while ((curr_offset - offset) < len) {
2071 start_offset = curr_offset;
2072 sub_tree = proto_tree_add_subtree_format(tree, tvb, curr_offset, -1, ett_nas_5gs_mm_cag_info_entry,
2073 &item, "%sCAG information entry %u",
2074 is_ext ? "Extended " : "", num_entry);
2075 proto_tree_add_item_ret_uint(sub_tree, hf_nas_5gs_mm_cag_info_entry_len, tvb, curr_offset, is_ext ? 2 : 1, ENC_BIG_ENDIAN, &entry_len);
2076 curr_offset += is_ext ? 2 : 1;
2077 dissect_e212_mcc_mnc(tvb, pinfo, sub_tree, curr_offset, E212_NONE, true);
2078 curr_offset += 3;
2079 if (is_ext) {
2080 proto_tree_add_bits_item(sub_tree, hf_nas_5gs_spare_bits, tvb, (curr_offset << 3), 5, ENC_BIG_ENDIAN);
2081 proto_tree_add_item_ret_boolean(sub_tree, hf_nas_5gs_mm_cag_info_entry_caili, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &caili);
2082 proto_tree_add_item_ret_boolean(sub_tree, hf_nas_5gs_mm_cag_info_entry_lci, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &lci);
2083 } else {
2084 proto_tree_add_bits_item(sub_tree, hf_nas_5gs_spare_bits, tvb, (curr_offset << 3), 7, ENC_BIG_ENDIAN);
2085 caili = false;
2086 lci = false;
2088 proto_tree_add_item(sub_tree, hf_nas_5gs_mm_cag_info_entry_cag_only, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2089 curr_offset++;
2090 if (lci) {
2091 proto_tree_add_item_ret_uint(sub_tree, hf_nas_5gs_mm_cag_info_entry_cag_without_add_info_list_len, tvb, curr_offset, 2, ENC_BIG_ENDIAN, &entry_len);
2092 curr_offset += 2;
2094 while ((curr_offset - start_offset) < entry_len) {
2095 proto_tree_add_item(sub_tree, hf_nas_5gs_mm_cag_info_entry_cag_id, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
2096 curr_offset += 4;
2098 if (caili) {
2099 uint32_t caili_start_offset = curr_offset;
2100 unsigned num_entry2 = 1;
2102 proto_tree_add_item_ret_uint(sub_tree, hf_nas_5gs_mm_cag_info_entry_cag_with_add_info_list_len, tvb, curr_offset, 2, ENC_BIG_ENDIAN, &entry_len);
2103 curr_offset += 2;
2104 while ((curr_offset - caili_start_offset) < entry_len) {
2105 proto_tree *sub_tree2;
2106 proto_item *item2;
2107 bool tvii;
2108 uint32_t start_offset2 = curr_offset;
2110 sub_tree2 = proto_tree_add_subtree_format(sub_tree, tvb, curr_offset, -1, ett_nas_5gs_mm_cag_info_entry,
2111 &item2, "CAG-ID with additional information entry %u", num_entry2);
2112 proto_tree_add_item(sub_tree2, hf_nas_5gs_mm_cag_info_entry_cag_with_add_info_len, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
2113 curr_offset += 2;
2114 proto_tree_add_item(sub_tree2, hf_nas_5gs_mm_cag_info_entry_cag_id, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
2115 curr_offset += 4;
2116 proto_tree_add_bits_item(sub_tree2, hf_nas_5gs_spare_bits, tvb, (curr_offset << 3), 1, ENC_BIG_ENDIAN);
2117 proto_tree_add_bits_item(sub_tree2, hf_nas_5gs_mm_cag_info_entry_svii, tvb, (curr_offset << 3) + 1, 1, ENC_BIG_ENDIAN);
2118 proto_tree_add_bits_item(sub_tree2, hf_nas_5gs_mm_cag_info_entry_svii, tvb, (curr_offset << 3) + 2, 1, ENC_BIG_ENDIAN);
2119 proto_tree_add_bits_item(sub_tree2, hf_nas_5gs_mm_cag_info_entry_svii, tvb, (curr_offset << 3) + 3, 1, ENC_BIG_ENDIAN);
2120 proto_tree_add_bits_item(sub_tree2, hf_nas_5gs_mm_cag_info_entry_svii, tvb, (curr_offset << 3) + 4, 1, ENC_BIG_ENDIAN);
2121 proto_tree_add_bits_item(sub_tree2, hf_nas_5gs_mm_cag_info_entry_svii, tvb, (curr_offset << 3) + 5, 1, ENC_BIG_ENDIAN);
2122 proto_tree_add_bits_item(sub_tree2, hf_nas_5gs_mm_cag_info_entry_svii, tvb, (curr_offset << 3) + 6, 1, ENC_BIG_ENDIAN);
2123 proto_tree_add_item_ret_boolean(sub_tree2, hf_nas_5gs_mm_cag_info_entry_tvii, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &tvii);
2124 curr_offset++;
2125 if (tvii) {
2126 uint32_t time_periods, i;
2128 proto_tree_add_item_ret_uint(sub_tree2, hf_nas_5gs_mm_cag_info_entry_nb_time_periods, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &time_periods);
2129 curr_offset++;
2130 for (i = 0; i < time_periods; i++) {
2131 proto_tree_add_item(sub_tree2, hf_nas_5gs_mm_cag_info_entry_time_period, tvb, curr_offset, 16, ENC_NA);
2132 curr_offset += 16;
2135 proto_item_set_len(item2, curr_offset - start_offset2);
2136 num_entry2++;
2139 proto_item_set_len(item, curr_offset - start_offset);
2140 num_entry++;
2143 return len;
2146 static uint16_t
2147 de_nas_5gs_mm_cag_information_list(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo,
2148 uint32_t offset, unsigned len,
2149 char* add_string _U_, int string_len _U_)
2151 return dissect_nas_5gs_mm_cag_information_list(tvb, tree, pinfo, offset, len, false);
2155 * 9.11.3.18B CIoT small data container
2157 static void
2158 nas_5gs_decode_user_data_cont(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo,
2159 uint32_t offset, unsigned len, int hfindex)
2161 proto_item *item;
2163 item = proto_tree_add_item(tree, hfindex, tvb, offset, len, ENC_NA);
2164 if (g_nas_5gs_decode_user_data_container_as != DECODE_USER_DATA_AS_NONE) {
2165 tvbuff_t *user_data_cont_tvb;
2166 volatile dissector_handle_t handle;
2168 user_data_cont_tvb = tvb_new_subset_length(tvb, offset, len);
2169 if (g_nas_5gs_decode_user_data_container_as == DECODE_USER_DATA_AS_IP) {
2170 uint8_t first_byte = tvb_get_uint8(user_data_cont_tvb, 0);
2171 if (first_byte >= 0x45 && first_byte <= 0x4f && len > 20)
2172 handle = ipv4_handle;
2173 else if ((first_byte & 0xf0) == 0x60 && len > 40)
2174 handle = ipv6_handle;
2175 else
2176 handle = NULL;
2177 } else if (g_nas_5gs_decode_user_data_container_as == DECODE_USER_DATA_AS_NON_IP) {
2178 handle = non_ip_data_handle;
2179 } else {
2180 handle = ethernet_handle;
2182 if (handle) {
2183 col_append_str(pinfo->cinfo, COL_PROTOCOL, "/");
2184 col_set_fence(pinfo->cinfo, COL_PROTOCOL);
2185 col_append_str(pinfo->cinfo, COL_INFO, ", ");
2186 col_set_fence(pinfo->cinfo, COL_INFO);
2187 TRY {
2188 proto_tree *toptree = proto_tree_get_root(tree);
2189 call_dissector_only(handle, user_data_cont_tvb, pinfo, toptree, NULL);
2190 } CATCH_BOUNDS_ERRORS {
2191 /* Dissection exception: message was probably non IP and heuristic was too weak */
2192 proto_tree *subtree = proto_item_add_subtree(item, ett_nas_5gs_user_data_cont);
2193 show_exception(user_data_cont_tvb, pinfo, subtree, EXCEPT_CODE, GET_MESSAGE);
2194 } ENDTRY
2199 static const value_string nas_5gs_mm_ciot_small_data_cont_data_type_values[] = {
2200 { 0x00, "Control plane user data" },
2201 { 0x01, "SMS" },
2202 { 0x02, "Location services message container" },
2203 { 0, NULL }
2206 static const value_string nas_5gs_mm_ciot_small_data_cont_ddx_values[] = {
2207 { 0x00, "No information available" },
2208 { 0x01, "No further uplink and no further downlink data transmission subsequent to the uplink data transmission is expected" },
2209 { 0x02, "Only a single downlink data transmission and no further uplink data transmission subsequent to the uplink data transmission is expected" },
2210 { 0x03, "Reserved" },
2211 { 0, NULL }
2214 static uint16_t
2215 de_nas_5gs_mm_ciot_small_data_cont(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo,
2216 uint32_t offset, unsigned len,
2217 char* add_string _U_, int string_len _U_)
2219 uint32_t curr_offset = offset;
2220 uint32_t data_type, add_info_len;
2221 proto_tree *sub_tree;
2222 proto_item *item;
2224 proto_tree_add_item_ret_uint(tree, hf_nas_5gs_mm_ciot_small_data_cont_data_type,
2225 tvb, curr_offset, 1, ENC_BIG_ENDIAN, &data_type);
2226 switch (data_type) {
2227 case 0:
2228 proto_tree_add_item(tree, hf_nas_5gs_mm_ciot_small_data_cont_ddx,
2229 tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2230 proto_tree_add_item(tree, hf_nas_5gs_mm_ciot_small_data_cont_pdu_session_id,
2231 tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2232 curr_offset++;
2233 nas_5gs_decode_user_data_cont(tvb, tree, pinfo, curr_offset, len - curr_offset,
2234 hf_nas_5gs_mm_ciot_small_data_cont_data_contents);
2235 break;
2236 case 1:
2237 proto_tree_add_bits_item(tree, hf_nas_5gs_spare_bits, tvb,
2238 (curr_offset << 3) + 3, 5, ENC_BIG_ENDIAN);
2239 curr_offset++;
2240 item = proto_tree_add_item(tree, hf_nas_5gs_mm_ciot_small_data_cont_data_contents,
2241 tvb, curr_offset, len - curr_offset, ENC_NA);
2242 if (gsm_a_dtap_handle) {
2243 sub_tree = proto_item_add_subtree(item, ett_nas_5gs_ciot_small_data_cont_data_contents);
2244 call_dissector(gsm_a_dtap_handle, tvb_new_subset_length(tvb, curr_offset, curr_offset - len), pinfo, sub_tree);
2246 break;
2247 case 2:
2248 proto_tree_add_item(tree, hf_nas_5gs_mm_ciot_small_data_cont_ddx,
2249 tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2250 proto_tree_add_bits_item(tree, hf_nas_5gs_spare_bits, tvb,
2251 (curr_offset << 3) + 5, 3, ENC_BIG_ENDIAN);
2252 curr_offset++;
2253 proto_tree_add_item_ret_uint(tree, hf_nas_5gs_mm_ciot_small_data_cont_add_info_len,
2254 tvb, curr_offset, 1, ENC_BIG_ENDIAN, &add_info_len);
2255 curr_offset++;
2256 if (add_info_len > 0) {
2257 proto_tree_add_item(tree, hf_nas_5gs_mm_ciot_small_data_cont_add_info,
2258 tvb, curr_offset, add_info_len, ENC_NA);
2259 curr_offset += add_info_len;
2261 proto_tree_add_item(tree, hf_nas_5gs_mm_ciot_small_data_cont_data_contents,
2262 tvb, curr_offset, len - curr_offset, ENC_NA);
2263 break;
2264 default:
2265 proto_tree_add_expert(tree, pinfo, &ei_nas_5gs_unknown_value, tvb, curr_offset, len);
2266 break;
2269 return len;
2273 * 9.11.3.18C Ciphering key data
2276 static uint16_t
2277 de_nas_5gs_mm_ciphering_key_data(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo,
2278 uint32_t offset, unsigned len,
2279 char* add_string _U_, int string_len _U_)
2281 uint32_t saved_offset, curr_offset = offset, c0_len, pos_sib_len, tai_len, i = 1;
2282 uint8_t oct;
2283 struct tm tm;
2284 nstime_t tv;
2285 proto_item *pi;
2286 proto_tree *sub_tree;
2288 while ((curr_offset - offset) < len) {
2289 static int * const eutra_flags1[] = {
2290 &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_1_1,
2291 &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_1_2,
2292 &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_1_3,
2293 &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_1_4,
2294 &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_1_5,
2295 &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_1_6,
2296 &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_1_7,
2297 &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_1_8,
2298 NULL
2300 static int * const eutra_flags2[] = {
2301 &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_1,
2302 &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_2,
2303 &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_3,
2304 &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_4,
2305 &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_5,
2306 &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_6,
2307 &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_7,
2308 &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_8,
2309 NULL
2311 static int * const eutra_flags3[] = {
2312 &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_9,
2313 &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_10,
2314 &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_11,
2315 &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_12,
2316 &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_13,
2317 &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_14,
2318 &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_15,
2319 &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_16,
2320 NULL
2322 static int * const eutra_flags4[] = {
2323 &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_17,
2324 &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_18,
2325 &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_19,
2326 &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_20,
2327 &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_21,
2328 &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_22,
2329 &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_23,
2330 &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_24,
2331 NULL
2333 static int * const eutra_flags5[] = {
2334 &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_25,
2335 &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_3_1,
2336 &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_4_1,
2337 &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_5_1,
2338 &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_1_9,
2339 &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_1_10,
2340 &hf_nas_5gs_spare_b1,
2341 &hf_nas_5gs_spare_b0,
2342 NULL
2344 static int * const nr_flags1[] = {
2345 &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_1_1,
2346 &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_1_2,
2347 &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_1_3,
2348 &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_1_4,
2349 &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_1_5,
2350 &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_1_6,
2351 &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_1_7,
2352 &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_1_8,
2353 NULL
2355 static int * const nr_flags2[] = {
2356 &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_1,
2357 &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_2,
2358 &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_3,
2359 &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_4,
2360 &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_5,
2361 &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_6,
2362 &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_7,
2363 &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_8,
2364 NULL
2366 static int * const nr_flags3[] = {
2367 &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_9,
2368 &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_10,
2369 &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_11,
2370 &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_12,
2371 &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_13,
2372 &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_14,
2373 &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_15,
2374 &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_16,
2375 NULL
2377 static int * const nr_flags4[] = {
2378 &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_17,
2379 &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_18,
2380 &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_19,
2381 &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_20,
2382 &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_21,
2383 &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_22,
2384 &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_23,
2385 &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_3_1,
2386 NULL
2388 static int * const nr_flags5[] = {
2389 &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_4_1,
2390 &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_5_1,
2391 &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_6_1,
2392 &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_6_2,
2393 &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_6_3,
2394 &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_6_4,
2395 &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_6_5,
2396 &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_6_6,
2397 NULL
2399 static int * const nr_flags6[] = {
2400 &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_1_9,
2401 &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_1_10,
2402 &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_24,
2403 &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_25,
2404 &hf_nas_5gs_spare_b3,
2405 &hf_nas_5gs_spare_b2,
2406 &hf_nas_5gs_spare_b1,
2407 &hf_nas_5gs_spare_b0,
2408 NULL
2411 saved_offset = curr_offset;
2412 sub_tree = proto_tree_add_subtree_format(tree, tvb, curr_offset, -1, ett_nas_5gs_ciph_data_set,
2413 &pi, "Ciphering data set #%u", i++);
2414 proto_tree_add_item(sub_tree, hf_nas_5gs_mm_ciph_key_data_ciphering_set_id, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
2415 curr_offset += 2;
2416 proto_tree_add_item(sub_tree, hf_nas_5gs_mm_ciph_key_data_ciphering_key, tvb, curr_offset, 16, ENC_NA);
2417 curr_offset += 16;
2418 proto_tree_add_bits_item(sub_tree, hf_nas_5gs_spare_bits, tvb, offset<<3, 3, ENC_BIG_ENDIAN);
2419 proto_tree_add_item_ret_uint(sub_tree, hf_nas_5gs_mm_ciph_key_data_c0_len, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &c0_len);
2420 curr_offset++;
2421 if (c0_len) {
2422 proto_tree_add_item(sub_tree, hf_nas_5gs_mm_ciph_key_data_c0, tvb, curr_offset, c0_len, ENC_NA);
2423 curr_offset += c0_len;
2425 proto_tree_add_bits_item(sub_tree, hf_nas_5gs_spare_bits, tvb, offset<<3, 4, ENC_BIG_ENDIAN);
2426 proto_tree_add_item_ret_uint(sub_tree, hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_len, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &pos_sib_len);
2427 curr_offset++;
2428 if (pos_sib_len > 0) {
2429 proto_tree_add_bitmask_list(sub_tree, tvb, curr_offset, 1, eutra_flags1, ENC_NA);
2430 if (pos_sib_len >= 2)
2431 proto_tree_add_bitmask_list(sub_tree, tvb, curr_offset + 1, 1, eutra_flags2, ENC_NA);
2432 if (pos_sib_len >= 3)
2433 proto_tree_add_bitmask_list(sub_tree, tvb, curr_offset + 2, 1, eutra_flags3, ENC_NA);
2434 if (pos_sib_len >= 4)
2435 proto_tree_add_bitmask_list(sub_tree, tvb, curr_offset + 3, 1, eutra_flags4, ENC_NA);
2436 if (pos_sib_len >= 5)
2437 proto_tree_add_bitmask_list(sub_tree, tvb, curr_offset + 4, 1, eutra_flags5, ENC_NA);
2438 curr_offset += pos_sib_len;
2440 proto_tree_add_bits_item(sub_tree, hf_nas_5gs_spare_bits, tvb, offset<<3, 4, ENC_BIG_ENDIAN);
2441 proto_tree_add_item_ret_uint(sub_tree, hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_len, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &pos_sib_len);
2442 curr_offset++;
2443 if (pos_sib_len > 0) {
2444 proto_tree_add_bitmask_list(sub_tree, tvb, curr_offset, 1, nr_flags1, ENC_NA);
2445 if (pos_sib_len >= 2)
2446 proto_tree_add_bitmask_list(sub_tree, tvb, curr_offset + 1, 1, nr_flags2, ENC_NA);
2447 if (pos_sib_len >= 3)
2448 proto_tree_add_bitmask_list(sub_tree, tvb, curr_offset + 2, 1, nr_flags3, ENC_NA);
2449 if (pos_sib_len >= 4)
2450 proto_tree_add_bitmask_list(sub_tree, tvb, curr_offset + 3, 1, nr_flags4, ENC_NA);
2451 if (pos_sib_len >= 5)
2452 proto_tree_add_bitmask_list(sub_tree, tvb, curr_offset + 4, 1, nr_flags5, ENC_NA);
2453 if (pos_sib_len >= 6)
2454 proto_tree_add_bitmask_list(sub_tree, tvb, curr_offset + 5, 1, nr_flags6, ENC_NA);
2455 curr_offset += pos_sib_len;
2457 tm.tm_wday = 0;
2458 tm.tm_yday = 0;
2459 tm.tm_isdst = -1;
2460 oct = tvb_get_uint8(tvb, curr_offset);
2461 tm.tm_year = (oct & 0x0f)*10 + ((oct & 0xf0) >> 4) + 100;
2462 oct = tvb_get_uint8(tvb, curr_offset+1);
2463 tm.tm_mon = (oct & 0x0f)*10 + ((oct & 0xf0) >> 4) - 1;
2464 oct = tvb_get_uint8(tvb, curr_offset+2);
2465 tm.tm_mday = (oct & 0x0f)*10 + ((oct & 0xf0) >> 4);
2466 oct = tvb_get_uint8(tvb, curr_offset+3);
2467 tm.tm_hour = (oct & 0x0f)*10 + ((oct & 0xf0) >> 4);
2468 oct = tvb_get_uint8(tvb, curr_offset+4);
2469 tm.tm_min = (oct & 0x0f)*10 + ((oct & 0xf0) >> 4);
2470 tm.tm_sec = 0;
2471 tv.secs = mktime(&tm);
2472 tv.nsecs = 0;
2473 proto_tree_add_time_format_value(sub_tree, hf_nas_5gs_mm_ciph_key_data_validity_start_time, tvb, curr_offset, 5, &tv,
2474 "%s", abs_time_to_str(pinfo->pool, &tv, ABSOLUTE_TIME_LOCAL, false));
2475 curr_offset += 5;
2476 proto_tree_add_item(sub_tree, hf_nas_5gs_mm_ciph_key_data_validity_duration, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
2477 curr_offset += 2;
2478 proto_tree_add_item_ret_uint(sub_tree, hf_nas_5gs_mm_ciph_key_data_tais_list_len, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &tai_len);
2479 curr_offset++;
2480 if (tai_len) {
2481 de_nas_5gs_mm_5gs_ta_id_list(tvb, sub_tree, pinfo, curr_offset, tai_len, NULL, 0);
2482 curr_offset += tai_len;
2484 proto_item_set_len(pi, curr_offset - saved_offset);
2487 return len;
2491 * 9.11.3.18D Control plane service type
2493 static const value_string nas_5gs_mm_ctrl_plane_serv_type_values[] = {
2494 { 0x00, "mobile originating request" },
2495 { 0x01, "mobile terminating request" },
2496 { 0x02, "emergency services" },
2497 { 0x03, "emergency services fallback" },
2498 { 0, NULL }
2501 static uint16_t
2502 de_nas_5gs_mm_ctrl_plane_service_type(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_,
2503 uint32_t offset, unsigned len,
2504 char* add_string _U_, int string_len _U_)
2506 static int * const flags[] = {
2507 &hf_nas_5gs_spare_b3,
2508 &hf_nas_5gs_mm_ctrl_plane_serv_type,
2509 NULL
2512 proto_tree_add_bitmask_list(tree, tvb, offset, 1, flags, ENC_NA);
2514 return len;
2518 * 9.11.3.19 Daylight saving time
2520 /* See subclause 10.5.3.12 in 3GPP TS 24.008 */
2523 * 9.11.3.20 De-registration type
2525 static const true_false_string nas_5gs_mm_switch_off_tfs = {
2526 "Switch off",
2527 "Normal de-registration"
2530 static const true_false_string nas_5gs_mm_re_reg_req_tfs = {
2531 "re-registration required",
2532 "re-registration not required"
2535 static const value_string nas_5gs_mm_acc_type_vals[] = {
2536 { 0x1, "3GPP access"},
2537 { 0x2, "Non-3GPP access"},
2538 { 0x3, "3GPP access and non-3GPP access"},
2539 { 0, NULL }
2542 static uint16_t
2543 de_nas_5gs_mm_de_reg_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
2544 uint32_t offset, unsigned len _U_,
2545 char *add_string _U_, int string_len _U_)
2547 /* Switch off Re-registration required Access type */
2548 proto_tree_add_item(tree, hf_nas_5gs_mm_switch_off, tvb, offset, 1, ENC_BIG_ENDIAN);
2549 proto_tree_add_item(tree, hf_nas_5gs_mm_re_reg_req, tvb, offset, 1, ENC_BIG_ENDIAN);
2550 proto_tree_add_item(tree, hf_nas_5gs_mm_acc_type, tvb, offset, 1, ENC_BIG_ENDIAN);
2552 return 1;
2555 /* 9.11.3.21 Void*/
2556 /* 9.11.3.22 Void*/
2559 * 9.11.3.23 Emergency number list
2561 /* See subclause 10.5.3.13 in 3GPP TS 24.008 */
2564 * 9.11.3.24 EPS NAS message container
2566 static uint16_t
2567 de_nas_5gs_mm_eps_nas_msg_cont(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
2568 uint32_t offset, unsigned len,
2569 char *add_string _U_, int string_len _U_)
2571 /* an EPS NAS message as specified in 3GPP TS 24.301 */
2572 if (nas_eps_handle) {
2573 col_set_fence(pinfo->cinfo, COL_PROTOCOL);
2574 call_dissector(nas_eps_handle, tvb_new_subset_length(tvb, offset, len), pinfo, tree);
2577 return len;
2581 * 9.11.3.25 EPS NAS security algorithms
2583 /* See subclause 9.9.3.23 in 3GPP TS 24.301 */
2586 * 9.11.3.26 Extended emergency number list
2588 /* See subclause 9.9.3.37A in 3GPP TS 24.301 */
2591 * 9.11.3.26A Extended DRX parameters
2593 /* See subclause 10.5.5.32 in 3GPP TS 24.008 */
2595 /* 9.11.3.27 Void*/
2598 * 9.11.3.28 IMEISV request
2600 /* See subclause 10.5.5.10 in 3GPP TS 24.008 */
2603 * 9.11.3.29 LADN indication
2606 static uint16_t
2607 de_nas_5gs_mm_ladn_indic(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
2608 uint32_t offset, unsigned len,
2609 char *add_string _U_, int string_len _U_)
2611 proto_tree *sub_tree;
2612 proto_item *item;
2613 int i = 1;
2614 uint32_t length;
2615 uint32_t curr_offset;
2617 curr_offset = offset;
2619 while ((curr_offset - offset) < len) {
2620 sub_tree = proto_tree_add_subtree_format(tree, tvb, curr_offset, 2, ett_nas_5gs_mm_ladn_indic, &item, "LADN DNN value %u", i);
2621 /*LADN DNN value is coded as the length and value part of DNN information element as specified in subclause 9.11.2.1B starting with the second octet*/
2622 proto_tree_add_item_ret_uint(sub_tree, hf_nas_5gs_mm_length, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &length);
2623 curr_offset++;
2624 curr_offset += de_nas_5gs_cmn_dnn(tvb, sub_tree, pinfo, curr_offset, length, NULL, 0);
2625 proto_item_set_len(item, length + 1);
2627 i++;
2631 return len;
2635 * 9.11.3.30 LADN information
2638 static uint16_t
2639 de_nas_5gs_mm_ladn_inf(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
2640 uint32_t offset, unsigned len,
2641 char *add_string _U_, int string_len _U_)
2643 proto_tree *sub_tree;
2644 proto_item *item;
2645 int i = 1;
2646 uint32_t length;
2647 uint32_t curr_offset;
2649 curr_offset = offset;
2651 while ((curr_offset - offset) < len) {
2652 sub_tree = proto_tree_add_subtree_format(tree, tvb, curr_offset, 2, ett_nas_5gs_mm_ladn_indic, &item, "LADN %u", i);
2653 /* DNN value (octet 5 to octet m):
2654 * LADN DNN value is coded as the length and value part of DNN information element as specified in
2655 * subclause 9.11.2.1B starting with the second octet
2657 proto_tree_add_item_ret_uint(sub_tree, hf_nas_5gs_mm_length, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &length);
2658 curr_offset++;
2659 curr_offset += de_nas_5gs_cmn_dnn(tvb, sub_tree, pinfo, curr_offset, length, NULL, 0);
2660 /* 5GS tracking area identity list (octet m+1 to octet a):
2661 * 5GS tracking area identity list field is coded as the length and the value part of the
2662 * 5GS Tracking area identity list information element as specified in subclause 9.11.3.9
2663 * starting with the second octet
2665 proto_tree_add_item_ret_uint(sub_tree, hf_nas_5gs_mm_length, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &length);
2666 curr_offset++;
2667 curr_offset += de_nas_5gs_mm_5gs_ta_id_list(tvb, sub_tree, pinfo, curr_offset, length, NULL, 0);
2669 proto_item_set_len(item, curr_offset - offset);
2671 i++;
2675 return len;
2679 * 9.11.3.31 MICO indication
2681 static const true_false_string tfs_nas_5gs_raai = {
2682 "all PLMN registration area allocated",
2683 "all PLMN registration area not allocated"
2686 static uint16_t
2687 de_nas_5gs_mm_mico_ind(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
2688 uint32_t offset, unsigned len _U_,
2689 char *add_string _U_, int string_len _U_)
2691 static int * const flags[] = {
2692 &hf_nas_5gs_spare_b3,
2693 &hf_nas_5gs_spare_b2,
2694 &hf_nas_5gs_mm_sprti_b1,
2695 &hf_nas_5gs_mm_raai_b0,
2696 NULL
2699 proto_tree_add_bitmask_list(tree, tvb, offset, 1, flags, ENC_BIG_ENDIAN);
2701 return 1;
2705 * 9.11.3.31A MA PDU session information
2707 static const value_string nas_5gs_mm_ma_pdu_session_info_vals[] = {
2708 { 0x0, "No additional information"},
2709 { 0x1, "MA PDU session network upgrade is allowed"},
2710 { 0, NULL }
2713 static uint16_t
2714 de_nas_5gs_mm_ma_pdu_ses_inf(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_,
2715 uint32_t offset, unsigned len,
2716 char* add_string _U_, int string_len _U_)
2718 proto_tree_add_item(tree, hf_nas_5gs_mm_ma_pdu_session_info_value, tvb, offset, 1, ENC_BIG_ENDIAN);
2720 return len;
2724 * 9.11.3.31B Mapped NSSAI
2726 static const value_string nas_5gs_mm_sst_vals[] = {
2727 { 0x1, "eMBB"},
2728 { 0x2, "URLLC"},
2729 { 0x3, "MIoT"},
2730 { 0x4, "V2X"},
2731 { 0, NULL }
2734 static uint16_t
2735 de_nas_5gs_mm_mapped_nssai(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_,
2736 uint32_t offset, unsigned len,
2737 char* add_string _U_, int string_len _U_)
2739 proto_tree* sub_tree;
2740 proto_item* item;
2741 unsigned num_items = 1;
2742 uint32_t curr_offset = offset;
2743 uint32_t start_offset, nssai_len;
2745 /* Rejected NSSAI */
2746 while ((curr_offset - offset) < len) {
2747 start_offset = curr_offset;
2748 sub_tree = proto_tree_add_subtree_format(tree, tvb, curr_offset, -1, ett_nas_5gs_mm_mapped_nssai,
2749 &item, "Mapped S-NSSAI content %u", num_items++);
2751 proto_tree_add_item_ret_uint(sub_tree, hf_nas_5gs_mm_len_of_mapped_s_nssai, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &nssai_len);
2752 curr_offset++;
2753 proto_tree_add_item(sub_tree, hf_nas_5gs_mm_sst, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2754 curr_offset++;
2755 if (nssai_len > 1) {
2756 proto_tree_add_item(sub_tree, hf_nas_5gs_mm_sd, tvb, curr_offset, 3, ENC_BIG_ENDIAN);
2757 curr_offset += 3;
2759 proto_item_set_len(item, curr_offset - start_offset);
2762 return len;
2766 * 9.11.3.31C Mobile station classmark 2
2768 /* See subclause 10.5.1.6 in 3GPP TS 24.008 */
2771 * 9.11.3.32 NAS key set identifier
2773 static const true_false_string nas_5gs_mm_tsc_tfs = {
2774 "Mapped security context (for KSIASME)",
2775 "Native security context (for KSIAMF)"
2778 static uint16_t
2779 de_nas_5gs_mm_nas_key_set_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
2780 uint32_t offset, unsigned len _U_,
2781 char *add_string _U_, int string_len _U_)
2783 static int * const flags[] = {
2784 &hf_nas_5gs_mm_tsc,
2785 &hf_nas_5gs_mm_nas_key_set_id,
2786 NULL
2789 /* NAS key set identifier IEI TSC NAS key set identifier */
2790 proto_tree_add_bitmask_list(tree, tvb, offset, 1, flags, ENC_BIG_ENDIAN);
2792 return 1;
2795 /* High nibble version (LEFT_NIBBLE) */
2796 static uint16_t
2797 de_nas_5gs_mm_nas_key_set_id_h1(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_,
2798 uint32_t offset, unsigned len _U_,
2799 char* add_string _U_, int string_len _U_)
2801 static int* const flags[] = {
2802 &hf_nas_5gs_mm_tsc_h1,
2803 &hf_nas_5gs_mm_nas_key_set_id_h1,
2804 NULL
2807 /* NAS key set identifier IEI TSC NAS key set identifier */
2808 proto_tree_add_bitmask_list(tree, tvb, offset, 1, flags, ENC_BIG_ENDIAN);
2810 return 1;
2815 * 9.11.3.33 NAS message container
2817 static uint16_t
2818 de_nas_5gs_mm_nas_msg_cont(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
2819 uint32_t offset, unsigned len,
2820 char *add_string _U_, int string_len _U_)
2822 /* The purpose of the NAS message container IE is to encapsulate a plain 5GS NAS message. */
2823 /* a NAS message without NAS security header */
2824 struct nas5gs_private_data *nas5gs_data = nas5gs_get_private_data(pinfo);
2826 if (nas5gs_data->sec_hdr_type == NAS_5GS_PLAIN_NAS_MSG || g_nas_5gs_null_decipher) {
2827 dissect_nas_5gs(tvb_new_subset_length(tvb, offset, len), pinfo, tree, NULL);
2828 } else {
2829 proto_tree_add_subtree(tree, tvb, offset, len, ett_nas_5gs_enc, NULL, "Encrypted data");
2832 return len;
2836 * 9.11.3.34 NAS security algorithms
2839 static const value_string nas_5gs_mm_type_of_ip_algo_vals[] = {
2840 { 0x0, "5G-IA0 (null integrity protection algorithm)"},
2841 { 0x1, "128-5G-IA1"},
2842 { 0x2, "128-5G-IA2"},
2843 { 0x3, "128-5G-IA3"},
2844 { 0x4, "5G-IA4"},
2845 { 0x5, "5G-IA5"},
2846 { 0x6, "5G-IA6"},
2847 { 0x7, "5G-IA7"},
2848 { 0, NULL }
2851 static const value_string nas_5gs_mm_type_of_enc_algo_vals[] = {
2852 { 0x0, "5G-EA0 (null ciphering algorithm)"},
2853 { 0x1, "128-5G-EA1"},
2854 { 0x2, "128-5G-EA2"},
2855 { 0x3, "128-5G-EA3"},
2856 { 0x4, "5G-EA4"},
2857 { 0x5, "5G-EA5"},
2858 { 0x6, "5G-EA6"},
2859 { 0x7, "5G-EA7"},
2860 { 0, NULL }
2863 static uint16_t
2864 de_nas_5gs_mm_nas_sec_algo(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
2865 uint32_t offset, unsigned len _U_,
2866 char *add_string _U_, int string_len _U_)
2869 static int * const flags[] = {
2870 &hf_nas_5gs_mm_nas_sec_algo_enc,
2871 &hf_nas_5gs_mm_nas_sec_algo_ip,
2872 NULL
2875 proto_tree_add_bitmask_list(tree, tvb, offset, 1, flags, ENC_BIG_ENDIAN);
2877 return 1;
2882 * 9.11.3.35 Network name
2884 /* See subclause 10.5.3.5a in 3GPP TS 24.008 */
2888 * 9.11.3.36 Network slicing indication
2891 static const true_false_string nas_5gs_mm_dcni_tfs = {
2892 "Requested NSSAI created from default configured NSSAI",
2893 "Requested NSSAI not created from default configured NSSAI"
2896 static uint16_t
2897 de_nas_5gs_mm_nw_slicing_ind(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
2898 uint32_t offset, unsigned len,
2899 char *add_string _U_, int string_len _U_)
2901 static int * const flags[] = {
2902 &hf_nas_5gs_spare_b3,
2903 &hf_nas_5gs_spare_b2,
2904 &hf_nas_5gs_mm_dcni,
2905 &hf_nas_5gs_mm_nssci,
2906 NULL
2909 proto_tree_add_bitmask_list(tree, tvb, offset, 1, flags, ENC_BIG_ENDIAN);
2911 return len;
2915 * 9.11.3.37 NSSAI
2917 static uint16_t
2918 de_nas_5gs_mm_nssai(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
2919 uint32_t offset, unsigned len,
2920 char *add_string _U_, int string_len _U_)
2922 proto_tree *sub_tree;
2923 proto_item *item;
2924 int i = 1;
2925 uint32_t length;
2926 uint32_t curr_offset;
2928 curr_offset = offset;
2930 while ((curr_offset - offset) < len) {
2931 sub_tree = proto_tree_add_subtree_format(tree, tvb, curr_offset, 2, ett_nas_5gs_mm_nssai, &item, "S-NSSAI %u", i);
2933 proto_tree_add_item_ret_uint(sub_tree, hf_nas_5gs_mm_length, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &length);
2934 curr_offset++;
2935 curr_offset += de_nas_5gs_cmn_s_nssai(tvb, sub_tree, pinfo, curr_offset, length, NULL, 0);
2936 proto_item_set_len(item, length + 1);
2937 i++;
2941 return len;
2945 * 9.11.3.37A NSSAI inclusion mode
2949 static const value_string nas_5gs_mm_nssai_inc_mode_vals[] = {
2950 { 0x00, "A" },
2951 { 0x01, "B" },
2952 { 0x02, "C" },
2953 { 0x03, "D" },
2954 { 0, NULL } };
2956 static uint16_t
2957 de_nas_5gs_mm_nssai_inc_mode(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
2958 uint32_t offset, unsigned len,
2959 char *add_string _U_, int string_len _U_)
2961 static int * const flags[] = {
2962 &hf_nas_5gs_spare_b3,
2963 &hf_nas_5gs_spare_b2,
2964 &hf_nas_5gs_mm_nssai_inc_mode,
2965 NULL
2968 proto_tree_add_bitmask_list(tree, tvb, offset, 1, flags, ENC_BIG_ENDIAN);
2970 return len;
2974 * 9.11.3.38 Operator-defined access category definitions
2977 static void
2978 nas_5gs_mm_access_cat_number(char *s, uint32_t val)
2980 snprintf(s, ITEM_LABEL_LENGTH, "%u (%u)", 32+val, val);
2983 static void
2984 nas_5gs_mm_access_standardized_cat_number(char *s, uint32_t val)
2986 if (val <= 7)
2987 snprintf(s, ITEM_LABEL_LENGTH, "%u", val);
2988 else
2989 snprintf(s, ITEM_LABEL_LENGTH, "Reserved (%u)", val);
2992 static const value_string nas_5gs_mm_op_def_access_cat_criteria_type_vals[] = {
2993 { 0, "DNN" },
2994 { 1, "OS Id + OS App Id" },
2995 { 2, "S-NSSAI" },
2996 { 0, NULL }
2999 static uint16_t
3000 de_nas_5gs_mm_op_def_acc_cat_def(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
3001 uint32_t offset, unsigned len,
3002 char *add_string _U_, int string_len _U_)
3004 proto_tree *sub_tree, *sub_tree2, *sub_tree3;
3005 proto_item *item, *item2, *item3;
3006 uint32_t i = 1, j, k;
3007 uint32_t length, criteria_length, criteria_type, criteria_count;
3008 uint32_t curr_offset, saved_offset, saved_offset2, saved_offset3, criteria_offset;
3009 bool psac;
3011 curr_offset = offset;
3013 while ((curr_offset - offset) < len) {
3014 sub_tree = proto_tree_add_subtree_format(tree, tvb, curr_offset, 4, ett_nas_5gs_mm_op_def_acc_cat_def,
3015 &item, "Operator-defined access category definition %u", i);
3017 proto_tree_add_item_ret_uint(sub_tree, hf_nas_5gs_mm_op_def_access_cat_len, tvb,
3018 curr_offset, 1, ENC_BIG_ENDIAN, &length);
3019 curr_offset++;
3020 saved_offset = curr_offset;
3021 /* Precedence value */
3022 proto_tree_add_item(sub_tree, hf_nas_5gs_mm_op_def_access_cat_precedence,
3023 tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3024 curr_offset++;
3025 /* PSAC 0 Spare 0 Spare Operator-defined access category number */
3026 proto_tree_add_item_ret_boolean(sub_tree, hf_nas_5gs_mm_op_def_access_cat_psac,
3027 tvb, curr_offset, 1, ENC_BIG_ENDIAN, &psac);
3028 proto_tree_add_bits_item(sub_tree, hf_nas_5gs_spare_bits, tvb,
3029 (curr_offset << 3)+1, 2, ENC_BIG_ENDIAN);
3030 proto_tree_add_item(sub_tree, hf_nas_5gs_mm_op_def_access_cat_number,
3031 tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3032 curr_offset++;
3033 /* Length of criteria */
3034 proto_tree_add_item_ret_uint(sub_tree, hf_nas_5gs_mm_op_def_access_cat_criteria_length,
3035 tvb, curr_offset, 1, ENC_BIG_ENDIAN, &criteria_length);
3036 curr_offset++;
3037 criteria_offset = curr_offset;
3038 j = 1;
3039 while ((curr_offset - criteria_offset) < criteria_length) {
3040 saved_offset2 = curr_offset;
3041 sub_tree2 = proto_tree_add_subtree_format(sub_tree, tvb, curr_offset, 1, ett_nas_5gs_mm_op_def_acc_cat_criteria_component,
3042 &item2, "Criteria component %u", j++);
3043 /* Criteria */
3044 proto_tree_add_item_ret_uint(sub_tree2, hf_nas_5gs_mm_op_def_access_cat_criteria_type,
3045 tvb, curr_offset, 1, ENC_BIG_ENDIAN, &criteria_type);
3046 curr_offset++;
3047 switch (criteria_type) {
3048 case 0:
3049 proto_tree_add_item_ret_uint(sub_tree2, hf_nas_5gs_mm_op_def_access_cat_criteria_dnn_count,
3050 tvb, curr_offset, 1, ENC_BIG_ENDIAN, &criteria_count);
3051 curr_offset++;
3052 for (k = 1; k <= criteria_count; k++) {
3053 uint32_t dnn_len;
3054 saved_offset3 = curr_offset;
3055 sub_tree3 = proto_tree_add_subtree_format(sub_tree2, tvb, curr_offset, -1,
3056 ett_nas_5gs_mm_op_def_acc_cat_criteria, &item3, "DNN %u", k);
3057 proto_tree_add_item_ret_uint(sub_tree3, hf_nas_5gs_mm_op_def_access_cat_criteria_dnn_len,
3058 tvb, curr_offset, 1, ENC_BIG_ENDIAN, &dnn_len);
3059 curr_offset++;
3060 de_nas_5gs_cmn_dnn(tvb, sub_tree3, pinfo, curr_offset, dnn_len, NULL, 0);
3061 curr_offset += dnn_len;
3062 proto_item_set_len(item3, curr_offset - saved_offset3);
3064 break;
3065 case 1:
3066 proto_tree_add_item_ret_uint(sub_tree2, hf_nas_5gs_mm_op_def_access_cat_criteria_os_id_os_app_id_count,
3067 tvb, curr_offset, 1, ENC_BIG_ENDIAN, &criteria_count);
3068 curr_offset++;
3069 for (k = 1; k <= criteria_count; k++) {
3070 uint32_t os_app_id_len;
3071 saved_offset3 = curr_offset;
3072 sub_tree3 = proto_tree_add_subtree_format(sub_tree2, tvb, curr_offset, -1, ett_nas_5gs_mm_op_def_acc_cat_criteria,
3073 &item3, "OS Id + Os App Id %u", k);
3074 proto_tree_add_item(sub_tree3, hf_nas_5gs_mm_op_def_access_cat_criteria_os_id,
3075 tvb, curr_offset, 16, ENC_NA);
3076 curr_offset += 16;
3077 proto_tree_add_item_ret_uint(sub_tree3, hf_nas_5gs_mm_op_def_access_cat_criteria_os_app_id_len,
3078 tvb, curr_offset, 1, ENC_BIG_ENDIAN, &os_app_id_len);
3079 curr_offset++;
3080 proto_tree_add_item(sub_tree3, hf_nas_5gs_mm_op_def_access_cat_criteria_os_app_id,
3081 tvb, curr_offset, os_app_id_len, ENC_NA);
3082 curr_offset += os_app_id_len;
3083 proto_item_set_len(item3, curr_offset - saved_offset3);
3085 break;
3086 case 2:
3087 proto_tree_add_item_ret_uint(sub_tree2, hf_nas_5gs_mm_op_def_access_cat_criteria_s_nssai_count,
3088 tvb, curr_offset, 1, ENC_BIG_ENDIAN, &criteria_count);
3089 curr_offset++;
3090 for (k = 1; k <= criteria_count; k++) {
3091 uint32_t s_nssai_len;
3092 saved_offset3 = curr_offset;
3093 sub_tree3 = proto_tree_add_subtree_format(sub_tree2, tvb, curr_offset, -1,
3094 ett_nas_5gs_mm_op_def_acc_cat_criteria, &item3, "S-NSSAI %u", k);
3095 proto_tree_add_item_ret_uint(sub_tree3, hf_nas_5gs_mm_op_def_access_cat_criteria_s_nssai_len,
3096 tvb, curr_offset, 1, ENC_BIG_ENDIAN, &s_nssai_len);
3097 curr_offset++;
3098 curr_offset += de_nas_5gs_cmn_s_nssai(tvb, sub_tree3, pinfo, curr_offset, s_nssai_len, NULL, 0);
3099 proto_item_set_len(item3, curr_offset - saved_offset3);
3101 break;
3102 default:
3103 break;
3105 proto_item_set_len(item2, curr_offset - saved_offset2);
3107 if (psac) {
3108 /* 0 Spare 0 Spare 0 Spare Standardized access category */
3109 proto_tree_add_bits_item(sub_tree, hf_nas_5gs_spare_bits, tvb,
3110 (curr_offset << 3), 3, ENC_BIG_ENDIAN);
3111 proto_tree_add_item(sub_tree, hf_nas_5gs_mm_op_def_access_cat_standardized_number,
3112 tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3114 curr_offset = saved_offset + length;
3115 proto_item_set_len(item, length + 1);
3116 i++;
3119 return len;
3122 static const value_string nas_5gs_mm_pld_cont_event_notif_ind_type_vals[] = {
3123 { 0x0, "SRVCC handover cancelled, IMS session re-establishment required" },
3124 { 0, NULL }
3127 static const value_string nas_5gs_mm_pld_cont_opt_ie_type_vals[] = {
3128 { 0x12, "PDU session ID" },
3129 { 0x22, "S-NSSAI" },
3130 { 0x24, "Additional information" },
3131 { 0x25, "DNN" },
3132 { 0x37, "Back-off timer value" },
3133 { 0x58, "5GMM cause" },
3134 { 0x59, "Old PDU session ID" },
3135 { 0x80, "Request type" },
3136 { 0xa0, "MA PDU session information" },
3137 { 0xf0, "Release assistance indication" },
3138 { 0, NULL }
3142 * 9.11.3.39 Payload container
3144 static uint16_t
3145 // NOLINTNEXTLINE(misc-no-recursion)
3146 de_nas_5gs_mm_pld_cont(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
3147 uint32_t offset, unsigned len,
3148 char *add_string _U_, int string_len _U_)
3150 struct nas5gs_private_data *nas5gs_data = nas5gs_get_private_data(pinfo);
3152 increment_dissection_depth(pinfo);
3153 switch (nas5gs_data->payload_container_type) {
3154 case 1: /* N1 SM information */
3155 dissect_nas_5gs_common(tvb_new_subset_length(tvb, offset, len), pinfo, tree, 0, NULL);
3156 break;
3157 case 2: /* SMS */
3158 if (gsm_a_dtap_handle) {
3159 call_dissector(gsm_a_dtap_handle, tvb_new_subset_length(tvb, offset, len), pinfo, tree);
3160 } else {
3161 proto_tree_add_item(tree, hf_nas_5gs_mm_pld_cont, tvb, offset, len, ENC_NA);
3163 break;
3164 case 3: /* LPP */
3165 if (lpp_handle) {
3166 call_dissector(lpp_handle, tvb_new_subset_length(tvb, offset, len), pinfo, tree);
3167 } else {
3168 proto_tree_add_item(tree, hf_nas_5gs_mm_pld_cont, tvb, offset, len, ENC_NA);
3170 break;
3171 case 5: /* UE policy container */
3172 dissect_nas_5gs_updp(tvb_new_subset_length(tvb, offset, len), pinfo, tree);
3173 break;
3174 case 8: /* CIoT user data container */
3175 nas_5gs_decode_user_data_cont(tvb, tree, pinfo, offset, len, hf_nas_5gs_mm_pld_cont);
3176 break;
3177 case 9: /* service-level-AA container */
3178 de_nas_5gs_cmn_service_level_aa_cont(tvb, tree, pinfo, offset, len, NULL, 0);
3179 break;
3180 case 10: /* event notification */
3182 uint32_t curr_offset, events_count, event_len;
3183 unsigned i;
3185 curr_offset = offset;
3186 proto_tree_add_item_ret_uint(tree, hf_nas_5gs_mm_pld_cont_event_notif_ind_nb, tvb, curr_offset, 1, ENC_NA, &events_count);
3187 curr_offset++;
3188 for (i = 0; i < events_count; i++) {
3189 proto_item *item;
3190 proto_tree *subtree;
3192 subtree = proto_tree_add_subtree_format(tree, tvb, curr_offset, -1, ett_nas_5gs_mm_pld_cont_event_notif_ind, &item, "Event notification indicator %d", i + 1);
3193 proto_tree_add_item(subtree, hf_nas_5gs_mm_pld_cont_event_notif_ind_type, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3194 curr_offset++;
3195 proto_tree_add_item_ret_uint(subtree, hf_nas_5gs_mm_pld_cont_event_notif_ind_len, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &event_len);
3196 curr_offset++;
3197 proto_item_set_len(item, event_len + 2);
3198 if (event_len > 0) {
3199 proto_tree_add_item(subtree, hf_nas_5gs_mm_pld_cont_event_notif_ind_val, tvb, curr_offset, event_len, ENC_NA);
3200 curr_offset += event_len;
3204 break;
3205 case 15: /* multiple payloads */
3207 uint32_t curr_offset, entry_offset, payloads_count, payload_len, opt_ies_count, payload_type;
3208 uint32_t opt_ie_type, opt_ie_len, type_backup;
3209 unsigned i, j;
3211 curr_offset = offset;
3212 proto_tree_add_item_ret_uint(tree, hf_nas_5gs_mm_pld_cont_nb_entries, tvb, curr_offset, 1, ENC_NA, &payloads_count);
3213 curr_offset++;
3214 for (i = 0; i < payloads_count; i++) {
3215 proto_item *item;
3216 proto_tree *subtree, *subtree2;
3218 entry_offset = curr_offset;
3219 subtree = proto_tree_add_subtree_format(tree, tvb, curr_offset, -1, ett_nas_5gs_mm_pld_cont_pld_entry, &item, "Payload container entry %d", i + 1);
3220 proto_tree_add_item_ret_uint(subtree, hf_nas_5gs_mm_pld_cont_pld_cont_len, tvb, curr_offset, 2, ENC_BIG_ENDIAN, &payload_len);
3221 proto_item_set_len(item, payload_len + 2);
3222 curr_offset += 2;
3223 proto_tree_add_item_ret_uint(subtree, hf_nas_5gs_mm_pld_cont_nb_opt_ies, tvb, curr_offset, 1, ENC_NA, &opt_ies_count);
3224 proto_tree_add_item_ret_uint(subtree, hf_nas_5gs_mm_pld_cont_pld_cont_type, tvb, curr_offset, 1, ENC_NA, &payload_type);
3225 curr_offset++;
3226 for (j = 0; j < opt_ies_count; j++) {
3227 item = proto_tree_add_item_ret_uint(subtree, hf_nas_5gs_mm_pld_cont_opt_ie_type, tvb, curr_offset, 1, ENC_NA, &opt_ie_type);
3228 curr_offset++;
3229 subtree2 = proto_item_add_subtree(item, ett_nas_5gs_mm_pld_cont_opt_ie);
3230 proto_tree_add_item_ret_uint(subtree2, hf_nas_5gs_mm_pld_cont_opt_ie_len, tvb, curr_offset, 1, ENC_NA, &opt_ie_len);
3231 curr_offset++;
3232 switch (opt_ie_type) {
3233 case 0x12:
3234 de_nas_5gs_mm_pdu_ses_id_2(tvb, subtree2, pinfo, curr_offset, opt_ie_len, NULL, 0);
3235 break;
3236 case 0x22:
3237 de_nas_5gs_cmn_s_nssai(tvb, subtree2, pinfo, curr_offset, opt_ie_len, NULL, 0);
3238 break;
3239 case 0x24:
3240 de_nas_5gs_cmn_add_inf(tvb, subtree2, pinfo, curr_offset, opt_ie_len, NULL, 0);
3241 break;
3242 case 0x25:
3243 de_nas_5gs_cmn_dnn(tvb, subtree2, pinfo, curr_offset, opt_ie_len, NULL, 0);
3244 break;
3245 case 0x37:
3246 de_gc_timer3(tvb, subtree2, pinfo, curr_offset, opt_ie_len, NULL, 0);
3247 break;
3248 case 0x58:
3249 nas_5gs_mm_5gmm_status(tvb, subtree2, pinfo, curr_offset, opt_ie_len);
3250 break;
3251 case 0x59:
3252 de_nas_5gs_mm_pdu_ses_id_2(tvb, subtree2, pinfo, curr_offset, opt_ie_len, NULL, 0);
3253 break;
3254 case 0x80:
3255 de_nas_5gs_mm_req_type(tvb, subtree2, pinfo, curr_offset, opt_ie_len, NULL, 0);
3256 break;
3257 case 0xa0:
3258 de_nas_5gs_mm_ma_pdu_ses_inf(tvb, subtree2, pinfo, curr_offset, opt_ie_len, NULL, 0);
3259 break;
3260 case 0xf0:
3261 de_esm_rel_assist_ind(tvb, subtree2, pinfo, curr_offset, opt_ie_len, NULL, 0);
3262 break;
3263 default:
3264 proto_tree_add_item(subtree2, hf_nas_5gs_mm_pld_cont_opt_ie_val, tvb, curr_offset, opt_ie_len, ENC_NA);
3265 break;
3267 curr_offset += opt_ie_len;
3269 type_backup = nas5gs_data->payload_container_type;
3270 nas5gs_data->payload_container_type = payload_type;
3271 /* N.B. this recursive call can overwrite nas5gs_data->payload_container_type */
3272 de_nas_5gs_mm_pld_cont(tvb, subtree, pinfo, curr_offset, payload_len - (curr_offset - entry_offset), NULL, 0);
3273 curr_offset = entry_offset + payload_len + 2;
3274 nas5gs_data->payload_container_type = type_backup;
3277 break;
3278 default:
3279 proto_tree_add_item(tree, hf_nas_5gs_mm_pld_cont, tvb, offset, len, ENC_NA);
3280 break;
3282 decrement_dissection_depth(pinfo);
3284 return len;
3288 * 9.11.3.40 Payload container type
3290 static const value_string nas_5gs_mm_pld_cont_type_vals[] = {
3291 { 0x01, "N1 SM information" },
3292 { 0x02, "SMS" },
3293 { 0x03, "LTE Positioning Protocol (LPP) message container" },
3294 { 0x04, "SOR transparent container" },
3295 { 0x05, "UE policy container" },
3296 { 0x06, "UE parameters update transparent container" },
3297 { 0x07, "Location services message container" },
3298 { 0x08, "CIoT user data container" },
3299 { 0x09, "Service-level-AA container" },
3300 { 0x0a, "Event notification" },
3301 { 0x0b, "UPP-CMI container" },
3302 { 0x0c, "SLPP message container" },
3303 { 0x0f, "Multiple payloads" },
3304 { 0, NULL } };
3306 static uint16_t
3307 de_nas_5gs_mm_pld_cont_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
3308 uint32_t offset, unsigned len _U_,
3309 char *add_string _U_, int string_len _U_)
3311 struct nas5gs_private_data *nas5gs_data = nas5gs_get_private_data(pinfo);
3313 proto_tree_add_item_ret_uint(tree, hf_nas_5gs_mm_pld_cont_type, tvb, offset, 1, ENC_BIG_ENDIAN, &nas5gs_data->payload_container_type);
3315 return 1;
3319 * 9.11.3.41 PDU session identity 2
3321 static uint16_t
3322 de_nas_5gs_mm_pdu_ses_id_2(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
3323 uint32_t offset, unsigned len _U_,
3324 char *add_string _U_, int string_len _U_)
3326 proto_tree_add_item(tree, hf_nas_5gs_pdu_session_id, tvb, offset, 1, ENC_BIG_ENDIAN);
3328 return 1;
3332 * 9.11.3.42 PDU session reactivation result
3336 static true_false_string tfs_nas_5gs_pdu_ses_rect_res_psi = {
3337 "1",
3341 static uint16_t
3342 de_nas_5gs_mm_pdu_ses_react_res(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
3343 uint32_t offset, unsigned len,
3344 char *add_string _U_, int string_len _U_)
3346 int curr_offset;
3348 static int * const psi_0_7_flags[] = {
3349 &hf_nas_5gs_pdu_ses_rect_res_psi_7_b7,
3350 &hf_nas_5gs_pdu_ses_rect_res_psi_6_b6,
3351 &hf_nas_5gs_pdu_ses_rect_res_psi_5_b5,
3352 &hf_nas_5gs_pdu_ses_rect_res_psi_4_b4,
3353 &hf_nas_5gs_pdu_ses_rect_res_psi_3_b3,
3354 &hf_nas_5gs_pdu_ses_rect_res_psi_2_b2,
3355 &hf_nas_5gs_pdu_ses_rect_res_psi_1_b1,
3356 &hf_nas_5gs_pdu_ses_rect_res_psi_0_b0,
3357 NULL
3360 static int * const psi_8_15_flags[] = {
3361 &hf_nas_5gs_pdu_ses_rect_res_psi_15_b7,
3362 &hf_nas_5gs_pdu_ses_rect_res_psi_14_b6,
3363 &hf_nas_5gs_pdu_ses_rect_res_psi_13_b5,
3364 &hf_nas_5gs_pdu_ses_rect_res_psi_12_b4,
3365 &hf_nas_5gs_pdu_ses_rect_res_psi_11_b3,
3366 &hf_nas_5gs_pdu_ses_rect_res_psi_10_b2,
3367 &hf_nas_5gs_pdu_ses_rect_res_psi_9_b1,
3368 &hf_nas_5gs_pdu_ses_rect_res_psi_8_b0,
3369 NULL
3372 curr_offset = offset;
3373 proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, psi_0_7_flags, ENC_BIG_ENDIAN);
3374 curr_offset++;
3376 proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, psi_8_15_flags, ENC_BIG_ENDIAN);
3377 curr_offset++;
3379 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_nas_5gs_extraneous_data);
3381 return (curr_offset - offset);
3386 * 9.11.3.43 PDU session reactivation result error cause
3388 static uint16_t
3389 de_nas_5gs_mm_pdu_ses_react_res_err_c(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
3390 uint32_t offset, unsigned len,
3391 char *add_string _U_, int string_len _U_)
3393 uint32_t curr_offset = offset;
3395 /*Partial service area list*/
3396 while ((curr_offset - offset) < len) {
3397 proto_tree_add_item(tree, hf_nas_5gs_pdu_session_id, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3398 curr_offset++;
3399 proto_tree_add_item(tree, hf_nas_5gs_mm_5gmm_cause, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3400 curr_offset++;
3403 return len;
3407 * 9.11.3.44 PDU session status
3410 static true_false_string tfs_nas_5gs_pdu_ses_sts_psi = {
3411 "Not PDU SESSION INACTIVE",
3412 "PDU SESSION INACTIVE"
3415 static uint16_t
3416 de_nas_5gs_mm_pdu_ses_status(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
3417 uint32_t offset, unsigned len,
3418 char *add_string _U_, int string_len _U_)
3420 int curr_offset;
3422 static int * const psi_0_7_flags[] = {
3423 &hf_nas_5gs_pdu_ses_sts_psi_7_b7,
3424 &hf_nas_5gs_pdu_ses_sts_psi_6_b6,
3425 &hf_nas_5gs_pdu_ses_sts_psi_5_b5,
3426 &hf_nas_5gs_pdu_ses_sts_psi_4_b4,
3427 &hf_nas_5gs_pdu_ses_sts_psi_3_b3,
3428 &hf_nas_5gs_pdu_ses_sts_psi_2_b2,
3429 &hf_nas_5gs_pdu_ses_sts_psi_1_b1,
3430 &hf_nas_5gs_pdu_ses_sts_psi_0_b0,
3431 NULL
3434 static int * const psi_8_15_flags[] = {
3435 &hf_nas_5gs_pdu_ses_sts_psi_15_b7,
3436 &hf_nas_5gs_pdu_ses_sts_psi_14_b6,
3437 &hf_nas_5gs_pdu_ses_sts_psi_13_b5,
3438 &hf_nas_5gs_pdu_ses_sts_psi_12_b4,
3439 &hf_nas_5gs_pdu_ses_sts_psi_11_b3,
3440 &hf_nas_5gs_pdu_ses_sts_psi_10_b2,
3441 &hf_nas_5gs_pdu_ses_sts_psi_9_b1,
3442 &hf_nas_5gs_pdu_ses_sts_psi_8_b0,
3443 NULL
3446 curr_offset = offset;
3447 proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, psi_0_7_flags, ENC_BIG_ENDIAN);
3448 curr_offset++;
3450 proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, psi_8_15_flags, ENC_BIG_ENDIAN);
3451 curr_offset++;
3453 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_nas_5gs_extraneous_data);
3455 return (curr_offset - offset);
3461 * 9.11.3.45 PLMN list
3463 /* See subclause 10.5.1.13 in 3GPP TS 24.008 */
3466 * 9.11.3.46 Rejected NSSAI
3468 static const value_string nas_5gs_mm_rej_s_nssai_cause_vals[] = {
3469 { 0x00, "S-NSSAI not available in the current PLMN or SNPN" },
3470 { 0x01, "S-NSSAI not available in the current registration area" },
3471 { 0x02, "S-NSSAI not available due to the failed or revoked network slice-specific authentication and authorization" },
3472 { 0, NULL } };
3474 static uint16_t
3475 de_nas_5gs_mm_rej_nssai(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
3476 uint32_t offset, unsigned len,
3477 char *add_string _U_, int string_len _U_)
3479 proto_tree* sub_tree;
3480 proto_item* item;
3481 unsigned num_items = 1;
3482 uint32_t curr_offset = offset;
3483 uint32_t start_offset, nssai_len;
3485 /* Rejected NSSAI */
3486 while ((curr_offset - offset) < len) {
3487 start_offset = curr_offset;
3488 sub_tree = proto_tree_add_subtree_format(tree, tvb, curr_offset, -1, ett_nas_5gs_mm_rej_nssai, &item, "Rejected S-NSSAI %u", num_items++);
3490 /* Length of rejected S-NSSAI Cause value */
3491 proto_tree_add_item_ret_uint(sub_tree, hf_nas_5gs_mm_len_of_rej_s_nssai, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &nssai_len);
3492 proto_tree_add_item(sub_tree, hf_nas_5gs_mm_rej_s_nssai_cause, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3493 curr_offset++;
3494 /* SST */
3495 proto_tree_add_item(sub_tree, hf_nas_5gs_mm_sst, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3496 curr_offset += 1;
3497 if (nssai_len > 1) {
3498 /* SD octet 3 - octet 5* */
3499 proto_tree_add_item(sub_tree, hf_nas_5gs_mm_sd, tvb, curr_offset, 3, ENC_BIG_ENDIAN);
3500 curr_offset += 3;
3502 proto_item_set_len(item, curr_offset - start_offset);
3505 return len;
3509 * 9.11.3.46A Release assistance indication
3511 /* See subclause 9.9.4.25 in 3GPP TS 24.301 */
3514 * 9.11.3.47 Request type
3516 static const value_string nas_5gs_mm_req_type_vals[] = {
3517 { 0x01, "Initial request" },
3518 { 0x02, "Existing PDU session" },
3519 { 0x03, "Initial emergency request" },
3520 { 0x04, "Existing emergency PDU session" },
3521 { 0x05, "Modification request" },
3522 { 0x06, "MA PDU request" },
3523 { 0x07, "Reserved" },
3524 { 0, NULL } };
3526 static uint16_t
3527 de_nas_5gs_mm_req_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
3528 uint32_t offset, unsigned len _U_,
3529 char *add_string _U_, int string_len _U_)
3532 proto_tree_add_item(tree, hf_nas_5gs_mm_req_type, tvb, offset, 1, ENC_BIG_ENDIAN);
3534 return 1;
3539 * 9.11.3.48 S1 UE network capability
3541 /* See subclause 9.9.3.34 in 3GPP TS 24.301 */
3544 * 9.11.3.48A S1 UE security capability
3546 /*See subclause 9.9.3.36 in 3GPP TS 24.301 */
3549 * 9.11.3.49 Service area list
3551 static true_false_string tfs_nas_5gs_sal_al_t = {
3552 "TAIs in the list are in the non-allowed area",
3553 "TAIs in the list are in the allowed area"
3556 static const value_string nas_5gs_mm_sal_t_li_values[] = {
3557 { 0x00, "list of TACs belonging to one PLMN, with non-consecutive TAC values" },
3558 { 0x01, "list of TACs belonging to one PLMN, with consecutive TAC values" },
3559 { 0x02, "list of TAIs belonging to different PLMNs" },
3560 { 0x03, "All TAIs belonging to the PLMN are in the allowed area" },
3561 { 0, NULL } };
3563 static const value_string nas_5gs_mm_sal_num_e_vals[] = {
3564 { 0x00, "1" },
3565 { 0x01, "2" },
3566 { 0x02, "3" },
3567 { 0x03, "4" },
3568 { 0x04, "5" },
3569 { 0x05, "6" },
3570 { 0x06, "7" },
3571 { 0x07, "8" },
3572 { 0x08, "9" },
3573 { 0x09, "10" },
3574 { 0x0a, "11" },
3575 { 0x0b, "12" },
3576 { 0x0c, "13" },
3577 { 0x0d, "14" },
3578 { 0x0e, "15" },
3579 { 0x0f, "16" },
3580 { 0, NULL } };
3584 static uint16_t
3585 de_nas_5gs_mm_sal(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
3586 uint32_t offset, unsigned len,
3587 char *add_string _U_, int string_len _U_)
3589 proto_tree *sub_tree;
3590 proto_item *item;
3592 static int * const flags_sal[] = {
3593 &hf_nas_5gs_mm_sal_al_t,
3594 &hf_nas_5gs_mm_sal_t_li,
3595 &hf_nas_5gs_mm_sal_num_e,
3596 NULL
3599 unsigned num_par_sal = 1;
3600 uint32_t curr_offset = offset;
3601 uint32_t start_offset;
3602 uint8_t sal_head, sal_t_li, sal_num_e;
3604 /*Partial service area list*/
3605 while ((curr_offset - offset) < len) {
3606 start_offset = curr_offset;
3607 sub_tree = proto_tree_add_subtree_format(tree, tvb, curr_offset, -1, ett_nas_5gs_mm_part_sal, &item, "Partial service area list %u", num_par_sal);
3608 /*Head of Partial service area list*/
3609 /* Allowed type Type of list Number of elements octet 1 */
3610 sal_head = tvb_get_uint8(tvb, curr_offset);
3611 sal_t_li = (sal_head & 0x60) >> 5;
3612 sal_num_e = (sal_head & 0x1f) + 1;
3613 proto_tree_add_bitmask_list(sub_tree, tvb, curr_offset, 1, flags_sal, ENC_BIG_ENDIAN);
3614 curr_offset++;
3615 switch (sal_t_li) {
3616 case 0:
3617 /*octet 2 MCC digit2 MCC digit1*/
3618 /*octet 3 MNC digit3 MCC digit3*/
3619 /*octet 4 MNC digit2 MNC digit1*/
3620 dissect_e212_mcc_mnc(tvb, pinfo, sub_tree, curr_offset, E212_5GSTAI, true);
3621 curr_offset += 3;
3622 while (sal_num_e > 0) {
3623 proto_tree_add_item(sub_tree, hf_nas_5gs_tac, tvb, curr_offset, 3, ENC_BIG_ENDIAN);
3624 curr_offset += 3;
3625 sal_num_e--;
3627 break;
3628 case 1:
3629 /*octet 2 MCC digit2 MCC digit1*/
3630 /*octet 3 MNC digit3 MCC digit3*/
3631 /*octet 4 MNC digit2 MNC digit1*/
3632 dissect_e212_mcc_mnc(tvb, pinfo, sub_tree, curr_offset, E212_5GSTAI, true);
3633 curr_offset += 3;
3635 /*octet 5 TAC 1*/
3636 proto_tree_add_item(sub_tree, hf_nas_5gs_tac, tvb, curr_offset, 3, ENC_BIG_ENDIAN);
3637 curr_offset+=3;
3638 break;
3639 case 2:
3640 while (sal_num_e > 0) {
3641 /*octet 2 MCC digit2 MCC digit1*/
3642 /*octet 3 MNC digit3 MCC digit3*/
3643 /*octet 4 MNC digit2 MNC digit1*/
3644 dissect_e212_mcc_mnc(tvb, pinfo, sub_tree, curr_offset, E212_5GSTAI, true);
3645 curr_offset += 3;
3647 /*octet 5 TAC 1*/
3648 proto_tree_add_item(sub_tree, hf_nas_5gs_tac, tvb, curr_offset, 3, ENC_BIG_ENDIAN);
3649 curr_offset += 3;
3651 sal_num_e--;
3653 break;
3654 case 3:
3655 dissect_e212_mcc_mnc(tvb, pinfo, sub_tree, curr_offset, E212_5GSTAI, true);
3656 curr_offset += 3;
3657 break;
3658 default:
3659 proto_tree_add_expert(sub_tree, pinfo, &ei_nas_5gs_unknown_value, tvb, curr_offset, len - 1);
3664 /*calculate the length of IE?*/
3665 proto_item_set_len(item, curr_offset - start_offset);
3666 /*calculate the number of Partial service area list*/
3667 num_par_sal++;
3670 return len;
3675 * 9.11.3.50 Service type
3678 /* Used inline as H1 (Upper nibble)*/
3679 static const value_string nas_5gs_mm_serv_type_vals[] = {
3680 { 0x00, "Signalling" },
3681 { 0x01, "Data" },
3682 { 0x02, "Mobile terminated services" },
3683 { 0x03, "Emergency services" },
3684 { 0x04, "Emergency services fallback" },
3685 { 0x05, "High priority access" },
3686 { 0x06, "Elevated signalling" },
3687 { 0, NULL }
3690 static uint16_t
3691 de_nas_5gs_mm_serv_type(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_,
3692 uint32_t offset, unsigned len,
3693 char* add_string _U_, int string_len _U_)
3696 proto_tree_add_item(tree, hf_nas_5gs_mm_serv_type, tvb, offset, 1, ENC_BIG_ENDIAN);
3698 return len;
3702 * 9.11.3.50A SMS indication
3704 static uint16_t
3705 de_nas_5gs_mm_sms_ind(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
3706 uint32_t offset, unsigned len,
3707 char *add_string _U_, int string_len _U_)
3710 static int * const flags[] = {
3711 &hf_nas_5gs_spare_b3,
3712 &hf_nas_5gs_spare_b2,
3713 &hf_nas_5gs_spare_b1,
3714 &hf_nas_5gs_mm_sms_indic_sai,
3715 NULL
3718 proto_tree_add_bitmask_list(tree, tvb, offset, 1, flags, ENC_BIG_ENDIAN);
3720 return len;
3724 * 9.11.3.51 SOR transparent container
3726 static true_false_string tfs_nas_5gs_list_type = {
3727 "PLMN ID and access technology list",
3728 "Secured packet"
3731 static true_false_string tfs_nas_5gs_list_ind = {
3732 "List of preferred PLMN/access technology combinations is provided",
3733 "No list of preferred PLMN/access technology combinations is provided"
3736 static true_false_string tfs_nas_5gs_sor_data_type = {
3737 "Carries acknowledgement of successful reception of the steering of roaming information",
3738 "Carries steering of roaming information"
3741 static true_false_string tfs_nas_5gs_sor_sssi = {
3742 "SOR-SNPN-SI present",
3743 "subscribed SNPN or HPLMN indication that 'no change of the SOR-SNPN-SI stored in the UE is needed and thus no SOR-SNPN-SI is provided'"
3746 static uint16_t
3747 de_nas_5gs_mm_sor_transp_cont(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
3748 uint32_t offset, unsigned len,
3749 char *add_string _U_, int string_len _U_)
3751 /* Layout differs depending on SOR data type*/
3752 static int * const flags_dt0[] = {
3753 &hf_nas_5gs_spare_b7,
3754 &hf_nas_5gs_spare_b6,
3755 &hf_nas_5gs_spare_b5,
3756 &hf_nas_5gs_sor_hdr0_ap,
3757 &hf_nas_5gs_sor_hdr0_ack,
3758 &hf_nas_5gs_sor_hdr0_list_type,
3759 &hf_nas_5gs_sor_hdr0_list_ind,
3760 &hf_nas_5gs_sor_hdr0_sor_data_type,
3761 NULL
3764 static int * const flags_dt1[] = {
3765 &hf_nas_5gs_spare_b7,
3766 &hf_nas_5gs_spare_b6,
3767 &hf_nas_5gs_spare_b5,
3768 &hf_nas_5gs_spare_b4,
3769 &hf_nas_5gs_sor_msssnpnsils,
3770 &hf_nas_5gs_sor_mssnpnsi,
3771 &hf_nas_5gs_sor_mssi,
3772 &hf_nas_5gs_sor_hdr0_sor_data_type,
3773 NULL
3775 /* 3GPP TS 31.102 [22] subclause 4.2.5 */
3776 static int * const flags_access_tech_1[] = {
3777 &hf_nas_5gs_access_tech_o1_b7,
3778 &hf_nas_5gs_access_tech_o1_b6,
3779 &hf_nas_5gs_access_tech_o1_b5,
3780 &hf_nas_5gs_access_tech_o1_b4,
3781 &hf_nas_5gs_access_tech_o1_b3,
3782 &hf_nas_5gs_rfu_b2,
3783 &hf_nas_5gs_rfu_b1,
3784 &hf_nas_5gs_rfu_b0,
3785 NULL
3788 static int * const flags_access_tech_2[] = {
3789 &hf_nas_5gs_access_tech_o2_b7,
3790 &hf_nas_5gs_access_tech_o2_b6,
3791 &hf_nas_5gs_access_tech_o2_b5,
3792 &hf_nas_5gs_access_tech_o2_b4,
3793 &hf_nas_5gs_access_tech_o2_b3,
3794 &hf_nas_5gs_access_tech_o2_b2,
3795 &hf_nas_5gs_rfu_b1,
3796 &hf_nas_5gs_rfu_b0,
3797 NULL
3800 proto_tree *sub_tree;
3802 uint8_t oct, data_type, list_type, ap;
3803 uint32_t curr_offset = offset;
3804 int i = 1;
3806 oct = tvb_get_uint8(tvb, offset);
3807 data_type = oct & 0x01;
3808 if (data_type == 0) {
3809 /* SOR header octet 4*/
3810 proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, flags_dt0, ENC_BIG_ENDIAN);
3811 curr_offset++;
3812 list_type = (oct & 0x4) >> 2;
3813 ap = (oct & 0x10) >> 4;
3814 /* SOR-MAC-IAUSF octet 5-20 */
3815 proto_tree_add_item(tree, hf_nas_5gs_sor_mac_iausf, tvb, curr_offset, 16, ENC_NA);
3816 curr_offset += 16;
3817 /* CounterSOR octet 21-22 */
3818 proto_tree_add_item(tree, hf_nas_5gs_counter_sor, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
3819 curr_offset += 2;
3820 if (list_type == 0) {
3821 /* Secured packet octet 23* - 2048* */
3822 proto_tree_add_item(tree, hf_nas_5gs_sor_sec_pkt, tvb, curr_offset, len - 19, ENC_NA);
3823 curr_offset = curr_offset + (len - 19);
3824 } else if (ap == 1) {
3825 uint32_t plmn_id_act_len, cont_len;
3826 uint64_t oct_o_flags;
3828 static int * const flags_oct_o[] = {
3829 &hf_nas_5gs_sor_sssli,
3830 &hf_nas_5gs_sor_sssi,
3831 &hf_nas_5gs_sor_sscmi,
3832 &hf_nas_5gs_sor_si,
3833 NULL
3836 proto_tree_add_item_ret_uint(tree, hf_nas_5gs_sor_plmn_id_act_len, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &plmn_id_act_len);
3837 curr_offset++;
3838 while ((curr_offset - offset) < plmn_id_act_len) {
3839 sub_tree = proto_tree_add_subtree_format(tree, tvb, curr_offset, 5, ett_nas_5gs_mm_sor, NULL, "List item %u", i);
3840 curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, sub_tree, curr_offset, E212_NONE, true);
3841 curr_offset += 3;
3842 proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, flags_access_tech_1, ENC_BIG_ENDIAN);
3843 curr_offset++;
3844 proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, flags_access_tech_2, ENC_BIG_ENDIAN);
3845 curr_offset++;
3846 i++;
3848 proto_tree_add_bitmask_list_ret_uint64(tree, tvb, curr_offset, 1, flags_oct_o, ENC_BIG_ENDIAN, &oct_o_flags);
3849 curr_offset++;
3850 if (oct_o_flags & 0x01) {
3851 proto_tree_add_item_ret_uint(tree, hf_nas_5gs_sor_cmci_len, tvb, curr_offset, 2, ENC_BIG_ENDIAN, &cont_len);
3852 curr_offset += 2;
3853 proto_tree_add_item(tree, hf_nas_5gs_sor_cmci_payload, tvb, curr_offset, len, ENC_NA);
3854 curr_offset += len;
3856 if (oct_o_flags & 0x04) {
3857 proto_tree_add_item_ret_uint(tree, hf_nas_5gs_sor_snpn_si_len, tvb, curr_offset, 2, ENC_BIG_ENDIAN, &cont_len);
3858 curr_offset += 2;
3859 proto_tree_add_item(tree, hf_nas_5gs_sor_snpn_si_payload, tvb, curr_offset, len, ENC_NA);
3860 curr_offset += len;
3862 if (oct_o_flags & 0x08) {
3863 proto_tree_add_item_ret_uint(tree, hf_nas_5gs_sor_snpn_si_ls_len, tvb, curr_offset, 2, ENC_BIG_ENDIAN, &cont_len);
3864 curr_offset += 2;
3865 proto_tree_add_item(tree, hf_nas_5gs_sor_snpn_si_ls_payload, tvb, curr_offset, len, ENC_NA);
3866 curr_offset += len;
3868 } else {
3869 /* PLMN ID and access technology list octet 23*-102* */
3870 while ((curr_offset - offset) < len) {
3871 sub_tree = proto_tree_add_subtree_format(tree, tvb, curr_offset, 5, ett_nas_5gs_mm_sor, NULL, "List item %u", i);
3872 /* The PLMN ID and access technology list consists of PLMN ID and access technology identifier
3873 * and are coded as specified in 3GPP TS 31.102 [22] subclause 4.2.5
3874 * PLMN
3875 * Contents:
3876 * - Mobile Country Code (MCC) followed by the Mobile Network Code (MNC).
3877 * Coding:
3878 * - according to TS 24.008 [9].
3880 /* PLMN ID 1 octet 23*- 25* */
3881 curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, sub_tree, curr_offset, E212_NONE, true);
3882 /* access technology identifier 1 octet 26*- 27* */
3883 proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, flags_access_tech_1, ENC_BIG_ENDIAN);
3884 curr_offset++;
3885 proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, flags_access_tech_2, ENC_BIG_ENDIAN);
3886 curr_offset++;
3887 i++;
3891 } else {
3892 /* SOR header octet 4*/
3893 proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, flags_dt1, ENC_BIG_ENDIAN);
3894 curr_offset++;
3895 /* SOR-MAC-IUE octet 5 - 20*/
3896 proto_tree_add_item(tree, hf_nas_5gs_sor_mac_iue, tvb, curr_offset, 16, ENC_NA);
3897 curr_offset+=16;
3900 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_nas_5gs_extraneous_data);
3902 return (curr_offset - offset);
3907 * 9.11.3.52 Time zone
3909 /* See subclause 10.5.3.8 in 3GPP TS 24.008 */
3912 * 9.11.3.53 Time zone and time
3914 /* See subclause 10.5.3.9 in 3GPP TS 24.00 */
3917 * 9.11.3.53A UE parameters update transparent container
3919 static uint16_t
3920 de_nas_5gs_mm_ue_par_upd_transp_cont(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
3921 uint32_t offset, unsigned len,
3922 char *add_string _U_, int string_len _U_)
3924 proto_tree_add_expert(tree, pinfo, &ei_nas_5gs_ie_not_dis, tvb, offset, len);
3926 return len;
3931 * 9.11.3.54 UE security capability
3934 static uint16_t
3935 de_nas_5gs_mm_ue_sec_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
3936 uint32_t offset, unsigned len,
3937 char *add_string _U_, int string_len _U_)
3939 uint32_t curr_offset;
3941 static int * const oct3_flags[] = {
3942 &hf_nas_5gs_mm_5g_ea0,
3943 &hf_nas_5gs_mm_128_5g_ea1,
3944 &hf_nas_5gs_mm_128_5g_ea2,
3945 &hf_nas_5gs_mm_128_5g_ea3,
3946 &hf_nas_5gs_mm_5g_ea4,
3947 &hf_nas_5gs_mm_5g_ea5,
3948 &hf_nas_5gs_mm_5g_ea6,
3949 &hf_nas_5gs_mm_5g_ea7,
3950 NULL
3953 static int * const oct4_flags[] = {
3954 &hf_nas_5gs_mm_5g_ia0,
3955 &hf_nas_5gs_mm_5g_128_ia1,
3956 &hf_nas_5gs_mm_5g_128_ia2,
3957 &hf_nas_5gs_mm_5g_128_ia3,
3958 &hf_nas_5gs_mm_5g_ia4,
3959 &hf_nas_5gs_mm_5g_ia5,
3960 &hf_nas_5gs_mm_5g_ia6,
3961 &hf_nas_5gs_mm_5g_ia7,
3962 NULL
3965 static int * const oct5_flags[] = {
3966 &hf_nas_5gs_mm_eea0,
3967 &hf_nas_5gs_mm_128eea1,
3968 &hf_nas_5gs_mm_128eea2,
3969 &hf_nas_5gs_mm_eea3,
3970 &hf_nas_5gs_mm_eea4,
3971 &hf_nas_5gs_mm_eea5,
3972 &hf_nas_5gs_mm_eea6,
3973 &hf_nas_5gs_mm_eea7,
3974 NULL
3977 static int * const oct6_flags[] = {
3978 &hf_nas_5gs_mm_eia0,
3979 &hf_nas_5gs_mm_128eia1,
3980 &hf_nas_5gs_mm_128eia2,
3981 &hf_nas_5gs_mm_eia3,
3982 &hf_nas_5gs_mm_eia4,
3983 &hf_nas_5gs_mm_eia5,
3984 &hf_nas_5gs_mm_eia6,
3985 &hf_nas_5gs_mm_eia7,
3986 NULL
3989 curr_offset = offset;
3992 /* 5G-EA0 128-5G-EA1 128-5G-EA2 128-5G-EA3 5G-EA4 5G-EA5 5G-EA6 5G-EA7 octet 3 */
3993 proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, oct3_flags, ENC_NA);
3994 curr_offset++;
3996 /* 5G-IA0 128-5G-IA1 128-5G-IA2 128-5G-IA3 5G-IA4 5G-IA5 5G-IA6 5G-IA7 octet 4 */
3997 proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, oct4_flags, ENC_NA);
3998 curr_offset++;
4000 if (len == 2) {
4001 return len;
4004 /* EEA0 128-EEA1 128-EEA2 128-EEA3 EEA4 EEA5 EEA6 EEA7 octet 5 */
4005 proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, oct5_flags, ENC_NA);
4006 curr_offset++;
4008 /* EIA0 128-EIA1 128-EIA2 128-EIA3 EIA4 EIA5 EIA6 EIA7 octet 6 */
4009 proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, oct6_flags, ENC_NA);
4012 return len;
4016 * 9.11.3.55 UE's usage setting
4018 static true_false_string tfs_nas_5gs_mm_ue_usage_setting = {
4019 "Data centric",
4020 "Voice centric"
4023 static uint16_t
4024 de_nas_5gs_mm_ue_usage_set(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
4025 uint32_t offset, unsigned len,
4026 char *add_string _U_, int string_len _U_)
4028 static int * const flags[] = {
4029 &hf_nas_5gs_spare_b3,
4030 &hf_nas_5gs_spare_b2,
4031 &hf_nas_5gs_spare_b1,
4032 &hf_nas_5gs_mm_ue_usage_setting,
4033 NULL
4036 proto_tree_add_bitmask_list(tree, tvb, offset, 1, flags, ENC_BIG_ENDIAN);
4038 return len;
4042 * 9.11.3.56 UE status
4045 static true_false_string tfs_nas_5gs_mm_n1_mod = {
4046 "UE is in 5GMM-REGISTERED state",
4047 "UE is not in 5GMM-REGISTERED state"
4050 static true_false_string tfs_nas_5gs_mm_s1_mod = {
4051 "UE is in EMM-REGISTERED state",
4052 "UE is not in EMM-REGISTERED state"
4057 static uint16_t
4058 de_nas_5gs_mm_ue_status(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
4059 uint32_t offset, unsigned len _U_,
4060 char *add_string _U_, int string_len _U_)
4062 static int * const flags[] = {
4063 &hf_nas_5gs_spare_b7,
4064 &hf_nas_5gs_spare_b6,
4065 &hf_nas_5gs_spare_b5,
4066 &hf_nas_5gs_spare_b4,
4067 &hf_nas_5gs_spare_b3,
4068 &hf_nas_5gs_spare_b2,
4069 &hf_nas_5gs_mm_n1_mode_reg_b1,
4070 &hf_nas_5gs_mm_s1_mode_reg_b0,
4071 NULL
4074 /* 0 Spare 0 Spare 0 Spare 0 Spare 0 Spare 0 Spare N1 mode S1 mode reg */
4075 proto_tree_add_bitmask_list(tree, tvb, offset, 1, flags, ENC_BIG_ENDIAN);
4077 return 1;
4081 * 9.11.3.57 Uplink data status
4084 static true_false_string tfs_nas_5gs_ul_data_sts_psi = {
4085 "uplink data are pending",
4086 "no uplink data are pending"
4089 static uint16_t
4090 de_nas_5gs_mm_ul_data_status(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
4091 uint32_t offset, unsigned len,
4092 char *add_string _U_, int string_len _U_)
4094 int curr_offset;
4096 static int * const psi_0_7_flags[] = {
4097 &hf_nas_5gs_ul_data_sts_psi_7_b7,
4098 &hf_nas_5gs_ul_data_sts_psi_6_b6,
4099 &hf_nas_5gs_ul_data_sts_psi_5_b5,
4100 &hf_nas_5gs_ul_data_sts_psi_4_b4,
4101 &hf_nas_5gs_ul_data_sts_psi_3_b3,
4102 &hf_nas_5gs_ul_data_sts_psi_2_b2,
4103 &hf_nas_5gs_ul_data_sts_psi_1_b1,
4104 &hf_nas_5gs_ul_data_sts_psi_0_b0,
4105 NULL
4108 static int * const psi_8_15_flags[] = {
4109 &hf_nas_5gs_ul_data_sts_psi_15_b7,
4110 &hf_nas_5gs_ul_data_sts_psi_14_b6,
4111 &hf_nas_5gs_ul_data_sts_psi_13_b5,
4112 &hf_nas_5gs_ul_data_sts_psi_12_b4,
4113 &hf_nas_5gs_ul_data_sts_psi_11_b3,
4114 &hf_nas_5gs_ul_data_sts_psi_10_b2,
4115 &hf_nas_5gs_ul_data_sts_psi_9_b1,
4116 &hf_nas_5gs_ul_data_sts_psi_8_b0,
4117 NULL
4120 curr_offset = offset;
4121 proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, psi_0_7_flags, ENC_BIG_ENDIAN);
4122 curr_offset++;
4124 proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, psi_8_15_flags, ENC_BIG_ENDIAN);
4125 curr_offset++;
4127 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_nas_5gs_extraneous_data);
4129 return (curr_offset - offset);
4133 * 9.11.3.58 Void
4134 * 9.11.3.59 Void
4135 * 9.11.3.60 Void
4136 * 9.11.3.61 Void
4137 * 9.11.3.62 Void
4138 * 9.11.3.63 Void
4139 * 9.11.3.64 Void
4140 * 9.11.3.65 Void
4141 * 9.11.3.66 Void
4142 * 9.11.3.67 Void
4146 * 9.11.3.68 UE radio capability ID
4149 * The UE radio capability ID contents contain the UE radio capability ID as specified in 3GPP TS 23.003
4150 * with each digit coded in BCD, starting with the first digit coded in bits 4 to 1 of octet 3,
4151 * the second digit coded in bits 8 to 5 of octet 3, and so on. If the UE radio capability ID contains
4152 * an odd number of digits, bits 8 to 5 of the last octet (octet n) shall be coded as "1111".
4155 uint16_t
4156 de_nas_5gs_mm_ue_radio_cap_id(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_,
4157 uint32_t offset, unsigned len,
4158 char* add_string _U_, int string_len _U_)
4160 int curr_offset;
4162 curr_offset = offset;
4164 proto_tree_add_item(tree, hf_nas_5gs_mm_ue_radio_cap_id, tvb, curr_offset, len, ENC_BCD_DIGITS_0_9|ENC_LITTLE_ENDIAN);
4166 return len;
4170 * 9.11.3.69 UE radio capability ID deletion indication
4172 static const value_string nas_5gs_mm_ue_radio_cap_id_del_req_vals[] = {
4173 { 0x0, "UE radio capability ID deletion not requested" },
4174 { 0x1, "Network-assigned UE radio capability IDs deletion requested" },
4175 { 0, NULL }
4178 static uint16_t
4179 de_nas_5gs_mm_ue_radio_cap_id_del_ind(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_,
4180 uint32_t offset, unsigned len,
4181 char* add_string _U_, int string_len _U_)
4183 static int* const flags[] = {
4184 &hf_nas_5gs_spare_b3,
4185 &hf_nas_5gs_mm_ue_radio_cap_id_del_req,
4186 NULL
4189 proto_tree_add_bitmask_list(tree, tvb, offset, 1, flags, ENC_BIG_ENDIAN);
4191 return len;
4195 * 9.11.3.70 Truncated 5G-S-TMSI configuration
4197 static const value_string nas_5gs_mm_amf_trunc_set_id_vals[] = {
4198 { 0x0, "reserved" },
4199 { 0x1, "1 least significant bit of the AMF Set ID" },
4200 { 0x2, "2 least significant bit of the AMF Set ID" },
4201 { 0x3, "3 least significant bit of the AMF Set ID" },
4202 { 0x4, "4 least significant bit of the AMF Set ID" },
4203 { 0x5, "5 least significant bit of the AMF Set ID" },
4204 { 0x6, "6 least significant bit of the AMF Set ID" },
4205 { 0x7, "7 least significant bit of the AMF Set ID" },
4206 { 0x8, "8 least significant bit of the AMF Set ID" },
4207 { 0x9, "9 least significant bit of the AMF Set ID" },
4208 { 0xa, "10 least significant bit of the AMF Set ID" },
4209 { 0, NULL }
4212 static const value_string nas_5gs_mm_amf_trunc_pointer_vals[] = {
4213 { 0x0, "reserved" },
4214 { 0x1, "1 least significant bit of the AMF Pointer" },
4215 { 0x2, "2 least significant bit of the AMF Pointer" },
4216 { 0x3, "3 least significant bit of the AMF Pointer" },
4217 { 0x4, "4 least significant bit of the AMF Pointer" },
4218 { 0x5, "5 least significant bit of the AMF Pointer" },
4219 { 0x6, "6 least significant bit of the AMF Pointer" },
4220 { 0, NULL }
4223 static uint16_t
4224 de_nas_5gs_mm_truncated_5g_s_tmsi_conf(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_,
4225 uint32_t offset, unsigned len,
4226 char* add_string _U_, int string_len _U_)
4228 proto_tree_add_item(tree, hf_nas_5gs_mm_trunc_amf_set_id, tvb, offset, 1, ENC_BIG_ENDIAN);
4229 proto_tree_add_item(tree, hf_nas_5gs_mm_trunc_amf_pointer, tvb, offset, 1, ENC_BIG_ENDIAN);
4231 return len;
4235 * 9.11.3.71 WUS assistance information
4237 /* See subclause 9.9.3.62 in 3GPP TS 24.301 */
4240 * 9.11.3.72 N5GC indication
4242 static uint16_t
4243 de_nas_5gs_mm_n5gc_indication(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_,
4244 uint32_t offset, unsigned len _U_,
4245 char* add_string _U_, int string_len _U_)
4247 static int* const flags[] = {
4248 &hf_nas_5gs_spare_b3,
4249 &hf_nas_5gs_spare_b2,
4250 &hf_nas_5gs_spare_b1,
4251 &hf_nas_5gs_mm_n5gcreg_b0,
4252 NULL
4255 proto_tree_add_bitmask_list(tree, tvb, offset, 1, flags, ENC_BIG_ENDIAN);
4257 return 1;
4262 * 9.11.3.73 NB-N1 mode DRX parameters
4264 static const value_string nas_5gs_mm_nb_n1_drx_params_vals[] = {
4265 { 0x0, "DRX value not specified"},
4266 { 0x1, "DRX cycle parameter T = 32"},
4267 { 0x2, "DRX cycle parameter T = 64"},
4268 { 0x3, "DRX cycle parameter T = 128"},
4269 { 0x4, "DRX cycle parameter T = 256"},
4270 { 0x5, "DRX cycle parameter T = 512"},
4271 { 0x7, "DRX cycle parameter T = 1024"},
4272 { 0, NULL }
4275 static uint16_t
4276 de_nas_5gs_mm_nb_n1_mode_drx_pars(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_,
4277 uint32_t offset, unsigned len _U_,
4278 char* add_string _U_, int string_len _U_)
4280 proto_tree_add_bits_item(tree, hf_nas_5gs_spare_bits, tvb, offset << 3, 4, ENC_BIG_ENDIAN);
4281 proto_tree_add_item(tree, hf_nas_5gs_mm_nb_n1_drx_value, tvb, offset, 1, ENC_BIG_ENDIAN);
4283 return 1;
4287 * 9.11.3.74 Additional configuration indication
4289 static true_false_string tfs_nas_5gs_mm_scmr = {
4290 "release of N1 NAS signalling connection not required",
4291 "no additional information"
4294 static uint16_t
4295 de_nas_5gs_mm_additional_conf_ind(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_,
4296 uint32_t offset, unsigned len _U_,
4297 char* add_string _U_, int string_len _U_)
4299 static int* const flags[] = {
4300 &hf_nas_5gs_spare_b3,
4301 &hf_nas_5gs_spare_b2,
4302 &hf_nas_5gs_spare_b1,
4303 &hf_nas_5gs_mm_scmr,
4304 NULL
4307 proto_tree_add_bitmask_list(tree, tvb, offset, 1, flags, ENC_BIG_ENDIAN);
4309 return 1;
4313 * 9.11.3.75 Extended rejected NSSAI
4315 static const value_string nas_5gs_mm_extended_rejected_s_nssai_type_of_list_vals[] = {
4316 { 0x00, "list of S-NSSAIs without any associated back-off timer value" },
4317 { 0x01, "list of S-NSSAIs with one associated back-off timer value that applies to all S-NSSAIs in the list" },
4318 { 0, NULL }
4321 static const value_string nas_5gs_mm_extended_rejected_s_nssai_number_of_element_vals[] = {
4322 { 0x00, "1 element" },
4323 { 0x01, "2 elements" },
4324 { 0x02, "3 elements" },
4325 { 0x03, "4 elements" },
4326 { 0x04, "5 elements" },
4327 { 0x05, "6 elements" },
4328 { 0x06, "7 elements" },
4329 { 0x07, "8 elements" },
4330 { 0, NULL }
4333 static const value_string nas_5gs_mm_extended_rej_s_nssai_cause_vals[] = {
4334 { 0x00, "S-NSSAI not available in the current PLMN or SNPN" },
4335 { 0x01, "S-NSSAI not available in the current registration area" },
4336 { 0x02, "S-NSSAI not available due to the failed or revoked network slice-specific authentication and authorization" },
4337 { 0x03, "S-NSSAI not available due to maximum number of UEs reached" },
4338 { 0, NULL }
4341 static uint16_t
4342 de_nas_5gs_mm_extended_rejected_nssai(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_,
4343 uint32_t offset, unsigned len,
4344 char* add_string _U_, int string_len _U_)
4346 proto_tree* sub_partial_tree;
4347 proto_tree* sub_rejected_tree;
4348 proto_item* item;
4349 int i;
4350 unsigned num_partial_items = 1;
4351 uint32_t curr_offset = offset;
4352 uint32_t type_of_list, number_of_element, nssai_len;
4354 /* Rejected NSSAI */
4355 while ((curr_offset - offset) < len) {
4356 sub_partial_tree = proto_tree_add_subtree_format(tree, tvb, curr_offset, -1, ett_nas_5gs_mm_partial_extended_rejected_nssai_list,
4357 &item, "Partial extended rejected NSSAI list %u", num_partial_items);
4359 proto_tree_add_item(sub_partial_tree, hf_nas_5gs_mm_extended_rejected_nssai_spare, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4360 proto_tree_add_item_ret_uint(sub_partial_tree, hf_nas_5gs_mm_extended_rejected_nssai_type_of_list, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &type_of_list);
4361 proto_tree_add_item_ret_uint(sub_partial_tree, hf_nas_5gs_mm_extended_rejected_nssai_number_of_element, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &number_of_element);
4362 curr_offset++;
4364 if (type_of_list > 0) {
4365 item = proto_tree_add_item(sub_partial_tree, hf_nas_5gs_mm_extended_rejected_nssai_back_off_timer, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4366 de_gc_timer3(tvb, proto_item_add_subtree(item, ett_nas_5gs_mm_ext_rej_nssai_back_off_timer), pinfo, curr_offset, 1, NULL, 0);
4367 curr_offset++;
4370 for (i = 0; i < ((int)number_of_element + 1); i++)
4372 sub_rejected_tree = proto_tree_add_subtree_format(sub_partial_tree, tvb, curr_offset, -1, ett_nas_5gs_mm_ext_rej_nssai,
4373 &item, "Rejected S-NSSAI %u", i+1);
4375 /* Octet 3 and octet 4 shall always be included*/
4376 proto_tree_add_item_ret_uint(sub_rejected_tree, hf_nas_5gs_mm_len_of_rejected_s_nssai, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &nssai_len);
4377 proto_tree_add_item(sub_rejected_tree, hf_nas_5gs_mm_rejected_s_nssai_cause_value, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4378 proto_item_set_len(item, nssai_len);
4379 curr_offset++;
4380 proto_tree_add_item(sub_rejected_tree, hf_nas_5gs_mm_sst, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4381 curr_offset++;
4382 if (nssai_len < 3) {
4383 continue;
4385 /* If the octet 5 is included, then octet 6 and octet 7 shall be included.*/
4386 proto_tree_add_item(sub_rejected_tree, hf_nas_5gs_mm_sd, tvb, curr_offset, 3, ENC_BIG_ENDIAN);
4387 curr_offset += 3;
4388 if (nssai_len < 6) {
4389 continue;
4391 /* If the octet 8 is included, then octets 9, 10, and 11 may be included*/
4392 /* Mapped HPLMN SST */
4393 proto_tree_add_item(sub_rejected_tree, hf_nas_5gs_mm_mapped_hplmn_sst, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4394 curr_offset += 1;
4395 if (nssai_len < 7) {
4396 continue;
4398 /* Mapped HPLMN SD */
4399 proto_tree_add_item(sub_rejected_tree, hf_nas_5gs_mm_mapped_hplmn_ssd, tvb, offset, 3, ENC_BIG_ENDIAN);
4400 curr_offset += 3;
4402 num_partial_items++;
4404 return len;
4408 * 9.11.3.76 UE request type
4410 /* See subclause 9.9.3.65 in 3GPP TS 24.301 */
4413 * 9.11.3.77 Paging restriction
4415 static const value_string nas_5gs_mm_paging_restriction_type_vals[] = {
4416 { 0x00, "reserved" },
4417 { 0x01, "All paging is restricted" },
4418 { 0x02, "All paging is restricted except for voice service" },
4419 { 0x03, "All paging is restricted except for specified PDU session(s)" },
4420 { 0x04, "All paging is restricted except for voice service and specified PDU session(s)" },
4421 { 0, NULL }
4425 static uint16_t
4426 de_nas_5gs_mm_paging_restriction(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_,
4427 uint32_t offset, unsigned len,
4428 char* add_string _U_, int string_len _U_)
4430 uint64_t type;
4432 static int * const flags[] = {
4433 &hf_nas_5gs_spare_b7,
4434 &hf_nas_5gs_spare_b6,
4435 &hf_nas_5gs_spare_b5,
4436 &hf_nas_5gs_spare_b4,
4437 &hf_nas_5gs_mm_paging_restriction_type,
4438 NULL
4441 static int * const psi_0_7_flags[] = {
4442 &hf_nas_5gs_mm_paging_restriction_psi_7,
4443 &hf_nas_5gs_mm_paging_restriction_psi_6,
4444 &hf_nas_5gs_mm_paging_restriction_psi_5,
4445 &hf_nas_5gs_mm_paging_restriction_psi_4,
4446 &hf_nas_5gs_mm_paging_restriction_psi_3,
4447 &hf_nas_5gs_mm_paging_restriction_psi_2,
4448 &hf_nas_5gs_mm_paging_restriction_psi_1,
4449 &hf_nas_5gs_mm_paging_restriction_psi_0,
4450 NULL
4453 static int * const psi_8_15_flags[] = {
4454 &hf_nas_5gs_mm_paging_restriction_psi_15,
4455 &hf_nas_5gs_mm_paging_restriction_psi_14,
4456 &hf_nas_5gs_mm_paging_restriction_psi_13,
4457 &hf_nas_5gs_mm_paging_restriction_psi_12,
4458 &hf_nas_5gs_mm_paging_restriction_psi_11,
4459 &hf_nas_5gs_mm_paging_restriction_psi_10,
4460 &hf_nas_5gs_mm_paging_restriction_psi_9,
4461 &hf_nas_5gs_mm_paging_restriction_psi_8,
4462 NULL
4465 proto_tree_add_bitmask_list_ret_uint64(tree, tvb, offset, 1, flags, ENC_BIG_ENDIAN, &type);
4466 if (type == 3 || type == 4) {
4467 proto_tree_add_bitmask_list(tree, tvb, offset+1, 1, psi_0_7_flags, ENC_BIG_ENDIAN);
4468 proto_tree_add_bitmask_list(tree, tvb, offset+2, 1, psi_8_15_flags, ENC_BIG_ENDIAN);
4471 return len;
4475 * 9.11.3.79 NID
4477 static const dgt_set_t dgt0_f_bcd = {
4479 /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
4480 '0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'
4484 static uint16_t
4485 de_nas_5gs_mm_nid(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo,
4486 uint32_t offset, unsigned len,
4487 char* add_string _U_, int string_len _U_)
4489 char *nid;
4491 proto_tree_add_item(tree, hf_nas_5gs_mm_nid_assign_mode, tvb, offset, 1, ENC_BIG_ENDIAN);
4492 nid = tvb_get_bcd_string(pinfo->pool, tvb, offset, 6, &dgt0_f_bcd, true, true, false);
4493 proto_tree_add_string(tree, hf_nas_5gs_mm_nid_value, tvb, offset, 6, nid);
4495 return len;
4499 * 9.11.3.80 PEIPS assistance information
4501 static const value_string nas_5gs_mm_peips_assist_info_ue_paging_probability_info_vals[] = {
4502 { 0, "p00" },
4503 { 1, "p05" },
4504 { 2, "p10" },
4505 { 3, "p15" },
4506 { 4, "p20" },
4507 { 5, "p25" },
4508 { 6, "p30" },
4509 { 7, "p35" },
4510 { 8, "p40" },
4511 { 9, "p45" },
4512 { 10, "p50" },
4513 { 11, "p55" },
4514 { 12, "p60" },
4515 { 13, "p65" },
4516 { 14, "p70" },
4517 { 15, "p75" },
4518 { 16, "p80" },
4519 { 17, "p85" },
4520 { 18, "p90" },
4521 { 19, "p95" },
4522 { 20, "p100" },
4523 { 0, NULL }
4525 static value_string_ext nas_5gs_mm_peips_assist_info_ue_paging_probability_info_vals_ext =
4526 VALUE_STRING_EXT_INIT(nas_5gs_mm_peips_assist_info_ue_paging_probability_info_vals);
4528 static uint16_t
4529 de_nas_5gs_mm_peips_assist_info(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_,
4530 uint32_t offset, unsigned len,
4531 char* add_string _U_, int string_len _U_)
4533 uint32_t curr_offset, i;
4535 curr_offset = offset;
4536 i = 1;
4537 while ((curr_offset - offset) < len) {
4538 proto_tree *subtree;
4539 uint32_t type;
4541 subtree = proto_tree_add_subtree_format(tree, tvb, curr_offset, 1, ett_nas_5gs_mm_peips_assist_info, NULL, "PEIPS assistance information type %u", i);
4542 proto_tree_add_item_ret_uint(subtree, hf_nas_5gs_mm_peips_assist_info_type, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &type);
4543 if (type == 0)
4544 proto_tree_add_item(subtree, hf_nas_5gs_mm_peips_assist_info_paging_subgroup_id, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4545 else if (type == 1)
4546 proto_tree_add_item(subtree, hf_nas_5gs_mm_peips_assist_info_ue_paging_probability_info, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4547 curr_offset++;
4548 i++;
4551 return len;
4555 * 9.11.3.81 5GS additional request result
4557 static const value_string nas_5gs_mm_add_req_res_prd_vals[] = {
4558 { 0, "no additional information" },
4559 { 1, "paging restriction is accepted" },
4560 { 2, "paging restriction is rejected" },
4561 { 0, NULL }
4564 static uint16_t
4565 de_nas_5gs_mm_5gs_add_req_res(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_,
4566 uint32_t offset, unsigned len,
4567 char* add_string _U_, int string_len _U_)
4569 static int* const flags[] = {
4570 &hf_nas_5gs_spare_b7,
4571 &hf_nas_5gs_spare_b6,
4572 &hf_nas_5gs_spare_b5,
4573 &hf_nas_5gs_spare_b4,
4574 &hf_nas_5gs_spare_b3,
4575 &hf_nas_5gs_spare_b2,
4576 &hf_nas_5gs_mm_add_req_res_prd,
4577 NULL
4580 proto_tree_add_bitmask_list(tree, tvb, offset, 1, flags, ENC_BIG_ENDIAN);
4582 return len;
4586 * 9.11.3.82 NSSRG information
4588 static uint16_t
4589 de_nas_5gs_mm_nssrg_info(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo,
4590 uint32_t offset, unsigned len,
4591 char* add_string _U_, int string_len _U_)
4593 uint32_t curr_offset = offset, i = 1;
4595 while ((curr_offset - offset) < len) {
4596 proto_item *item;
4597 proto_tree *subtree;
4598 uint32_t start_offset, nssrg_len, s_nssai_len;
4600 subtree = proto_tree_add_subtree_format(tree, tvb, curr_offset, -1, ett_nas_5gs_mm_nssrg_info, &item, "NSSRG values for S-NSSAI %u", i);
4601 proto_tree_add_item_ret_uint(subtree, hf_nas_5gs_mm_nssrg_info_len, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &nssrg_len);
4602 curr_offset++;
4603 proto_item_set_len(item, nssrg_len + 1);
4604 start_offset = curr_offset;
4605 proto_tree_add_item_ret_uint(subtree, hf_nas_5gs_mm_nssrg_info_s_nssai_len, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &s_nssai_len);
4606 curr_offset++;
4607 curr_offset += de_nas_5gs_cmn_s_nssai(tvb, subtree, pinfo, curr_offset, s_nssai_len, NULL, 0);
4608 while ((curr_offset - start_offset) < nssrg_len) {
4609 proto_tree_add_item(subtree, hf_nas_5gs_mm_nssrg_info_nssrg, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4610 curr_offset++;
4612 i++;
4615 return len;
4619 * 9.11.3.83 List of PLMNs to be used in disaster condition
4621 static uint16_t
4622 de_nas_5gs_mm_plmns_list_disaster_cond(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo,
4623 uint32_t offset, unsigned len,
4624 char* add_string _U_, int string_len _U_)
4626 uint32_t curr_offset = offset, i = 1;
4628 while ((curr_offset - offset) < len) {
4629 proto_tree *subtree;
4631 subtree = proto_tree_add_subtree_format(tree, tvb, curr_offset, 3, ett_nas_5gs_mm_plmns_list_disaster_cond, NULL, "PLMN ID %u", i++);
4632 dissect_e212_mcc_mnc(tvb, pinfo, subtree, curr_offset, E212_5GSTAI, true);
4633 curr_offset += 3;
4636 return len;
4640 * 9.11.3.84 Registration wait range
4642 static uint16_t
4643 de_nas_5gs_mm_reg_wait_range(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo,
4644 uint32_t offset, unsigned len,
4645 char* add_string _U_, int string_len _U_)
4647 proto_tree *subtree;
4649 subtree = proto_tree_add_subtree(tree, tvb, offset, 1, ett_nas_5gs_mm_reg_wait_range, NULL, "Minimum registration wait time");
4650 de_gc_timer(tvb, subtree, pinfo, offset, 1, NULL, 0);
4651 subtree = proto_tree_add_subtree(tree, tvb, offset+1, 1, ett_nas_5gs_mm_reg_wait_range, NULL, "Minimum registration wait time");
4652 de_gc_timer(tvb, subtree, pinfo, offset, 1, NULL, 0);
4654 return len;
4658 * 9.11.3.85 PLMN identity
4660 static uint16_t
4661 de_nas_5gs_mm_plmn_id(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo,
4662 uint32_t offset, unsigned len,
4663 char* add_string _U_, int string_len _U_)
4665 dissect_e212_mcc_mnc(tvb, pinfo, tree, offset, E212_5GSTAI, true);
4667 return len;
4671 * 9.11.3.86 Extended CAG information list
4673 static uint16_t
4674 de_nas_5gs_mm_ext_cag_info_list(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo,
4675 uint32_t offset, unsigned len,
4676 char* add_string _U_ , int string_len _U_)
4678 return dissect_nas_5gs_mm_cag_information_list(tvb, tree, pinfo, offset, len, true);
4682 * 9.11.3.87 NSAG information
4684 static uint16_t
4685 de_nas_5gs_mm_nsag_info(tvbuff_t* tvb _U_, proto_tree* tree _U_, packet_info* pinfo _U_,
4686 uint32_t offset _U_, unsigned len,
4687 char* add_string _U_, int string_len _U_)
4689 uint32_t curr_offset = offset, i = 1;
4691 while ((curr_offset - offset) < len) {
4692 proto_item *item;
4693 proto_tree *subtree;
4694 uint32_t nsag_len, s_nssai_len, tai_len;
4696 subtree = proto_tree_add_subtree_format(tree, tvb, curr_offset, -1, ett_nas_5gs_mm_nsag_info, &item, "NSSRG values for S-NSSAI %u", i);
4697 proto_tree_add_item_ret_uint(subtree, hf_nas_5gs_mm_nsag_info_len, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &nsag_len);
4698 curr_offset++;
4699 proto_item_set_len(item, nsag_len + 1);
4700 proto_tree_add_item(subtree, hf_nas_5gs_mm_nsag_id, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4701 proto_tree_add_item_ret_uint(subtree, hf_nas_5gs_mm_nsag_info_s_nssai_len, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &s_nssai_len);
4702 curr_offset++;
4703 curr_offset += de_nas_5gs_cmn_s_nssai(tvb, subtree, pinfo, curr_offset, s_nssai_len, NULL, 0);
4704 proto_tree_add_item(subtree, hf_nas_5gs_mm_nsag_prio, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4705 curr_offset++;
4706 proto_tree_add_item_ret_uint(subtree, hf_nas_5gs_mm_nsag_tais_list_len, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &tai_len);
4707 curr_offset++;
4708 if (tai_len) {
4709 curr_offset += de_nas_5gs_mm_5gs_ta_id_list(tvb, subtree, pinfo, curr_offset, tai_len, NULL, 0);
4711 i++;
4714 return len;
4718 * 9.11.3.88 ProSe relay transaction identity
4720 static void
4721 nas_5gs_mm_prose_relay_trans_id(char *s, uint32_t val)
4723 if (val == 0)
4724 snprintf(s, ITEM_LABEL_LENGTH, "No ProSe relay transaction identity assigned (0)");
4725 else if (val == 255)
4726 snprintf(s, ITEM_LABEL_LENGTH, "Reserved (255)");
4727 else
4728 snprintf(s, ITEM_LABEL_LENGTH, "%u", val);
4731 static uint16_t
4732 de_nas_5gs_mm_prose_relay_trans_id(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_,
4733 uint32_t offset, unsigned len _U_,
4734 char* add_string _U_, int string_len _U_)
4736 proto_tree_add_item(tree, hf_nas_5gs_mm_prose_relay_trans_id, tvb, offset, 1, ENC_BIG_ENDIAN);
4738 return 1;
4742 * 9.11.3.89 Relay key request parameters
4744 static true_false_string tfs_nas_5gs_mm_relay_key_req_params_uit = {
4745 "CP-PRUK ID",
4746 "SUCI"
4749 static uint16_t
4750 de_nas_5gs_mm_relay_key_req_params(tvbuff_t* tvb _U_, proto_tree* tree _U_, packet_info* pinfo _U_,
4751 uint32_t offset _U_, unsigned len,
4752 char* add_string _U_, int string_len _U_)
4754 uint32_t curr_offset = offset;
4756 proto_tree_add_item(tree, hf_nas_5gs_mm_relay_key_req_params_relay_service_code, tvb, curr_offset, 3, ENC_BIG_ENDIAN);
4757 curr_offset += 3;
4758 proto_tree_add_item(tree, hf_nas_5gs_mm_relay_key_req_params_nonce_1, tvb, offset, 16, ENC_NA);
4759 curr_offset += 16;
4760 proto_tree_add_bits_item(tree, hf_nas_5gs_spare_bits, tvb, (curr_offset << 3), 7, ENC_BIG_ENDIAN);
4761 proto_tree_add_item(tree, hf_nas_5gs_mm_relay_key_req_params_uit, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4762 curr_offset++;
4763 proto_tree_add_item(tree, hf_nas_5gs_mm_relay_key_req_params_ue_id, tvb, curr_offset, len - (curr_offset - offset), ENC_NA);
4765 return len;
4769 * 9.11.3.90 Relay key response parameters
4771 static uint16_t
4772 de_nas_5gs_mm_relay_key_resp_params(tvbuff_t* tvb _U_, proto_tree* tree _U_, packet_info* pinfo _U_,
4773 uint32_t offset _U_, unsigned len,
4774 char* add_string _U_, int string_len _U_)
4776 uint32_t curr_offset = offset;
4778 proto_tree_add_item(tree, hf_nas_5gs_mm_relay_key_resp_params_key_knr_prose, tvb, curr_offset, 32, ENC_NA);
4779 curr_offset += 32;
4780 proto_tree_add_item(tree, hf_nas_5gs_mm_relay_key_resp_params_nonce_2, tvb, offset, 16, ENC_NA);
4781 curr_offset += 16;
4782 proto_tree_add_item(tree, hf_nas_5gs_mm_relay_key_resp_params_cp_pruk_id, tvb, curr_offset, len - (curr_offset - offset), ENC_NA);
4784 return len;
4788 * 9.11.3.91 Priority indicator
4790 static true_false_string tfs_nas_5gs_mm_prio_ind_mcsi = {
4791 "Access identity 2 valid",
4792 "Access identity 2 not valid"
4795 static true_false_string tfs_nas_5gs_mm_prio_ind_mpsi = {
4796 "Access identity 1 valid",
4797 "Access identity 1 not valid"
4800 static uint16_t
4801 de_nas_5gs_mm_prio_ind(tvbuff_t* tvb _U_, proto_tree* tree _U_, packet_info* pinfo _U_,
4802 uint32_t offset _U_, unsigned len _U_,
4803 char* add_string _U_, int string_len _U_)
4805 proto_tree_add_bits_item(tree, hf_nas_5gs_spare_bits, tvb, (offset << 3) + 4, 2, ENC_BIG_ENDIAN);
4806 proto_tree_add_item(tree, hf_nas_5gs_mm_prio_ind_mcsi, tvb, offset, 1, ENC_BIG_ENDIAN);
4807 proto_tree_add_item(tree, hf_nas_5gs_mm_prio_ind_mpsi, tvb, offset, 1, ENC_BIG_ENDIAN);
4809 return 1;
4813 * 9.11.3.92 SNPN list
4815 static uint16_t
4816 de_nas_5gs_mm_snpn_list(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo,
4817 uint32_t offset, unsigned len,
4818 char* add_string _U_, int string_len _U_)
4820 uint32_t curr_offset = offset, i = 1;
4822 while ((curr_offset - offset) < len) {
4823 proto_tree *subtree;
4824 char *nid;
4826 subtree = proto_tree_add_subtree_format(tree, tvb, curr_offset, 9, ett_nas_5gs_mm_snpn_list, NULL, "SNPN identity %u", i++);
4827 dissect_e212_mcc_mnc(tvb, pinfo, subtree, curr_offset, E212_NONE, true);
4828 curr_offset += 3;
4829 nid = tvb_get_bcd_string(pinfo->pool, tvb, curr_offset, 6, &dgt0_f_bcd, true, true, false);
4830 proto_tree_add_string(subtree, hf_nas_5gs_mm_nid_value, tvb, curr_offset, 6, nid);
4831 curr_offset += 6;
4834 return len;
4838 * 9.11.3.93 N3IWF identifier
4840 static const value_string nas_5gs_mm_n3iwf_id_type_vals[] = {
4841 { 1, "IPv4" },
4842 { 2, "IPv6" },
4843 { 3, "IPv4v6" },
4844 { 4, "FQDN" },
4845 { 0, NULL }
4848 static uint16_t
4849 de_nas_5gs_mm_n3iwf_id(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_,
4850 uint32_t offset, unsigned len,
4851 char* add_string _U_, int string_len _U_)
4853 uint32_t type;
4855 proto_tree_add_item_ret_uint(tree, hf_nas_5gs_mm_n3iwf_id_type, tvb, offset, 1, ENC_BIG_ENDIAN, &type);
4856 switch (type) {
4857 case 1:
4858 proto_tree_add_item(tree, hf_nas_5gs_mm_n3iwf_id_ipv4, tvb, offset+1, 4, ENC_BIG_ENDIAN);
4859 break;
4860 case 2:
4861 proto_tree_add_item(tree, hf_nas_5gs_mm_n3iwf_id_ipv6, tvb, offset+1, 16, ENC_NA);
4862 break;
4863 case 3:
4864 proto_tree_add_item(tree, hf_nas_5gs_mm_n3iwf_id_ipv4, tvb, offset+1, 4, ENC_BIG_ENDIAN);
4865 proto_tree_add_item(tree, hf_nas_5gs_mm_n3iwf_id_ipv6, tvb, offset+5, 16, ENC_NA);
4866 break;
4867 case 4:
4868 proto_tree_add_item(tree, hf_nas_5gs_mm_n3iwf_id_fqdn, tvb, offset+1, len-1, ENC_APN_STR|ENC_NA);
4869 break;
4870 default:
4871 break;
4874 return len;
4878 * 9.11.3.94 TNAN information
4880 static uint16_t
4881 de_nas_5gs_mm_tnan_info(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_ ,
4882 uint32_t offset, unsigned len,
4883 char* add_string _U_, int string_len _U_)
4885 uint32_t curr_offset = offset, ret_len;
4886 static int * const flags[] = {
4887 &hf_nas_5gs_spare_b7,
4888 &hf_nas_5gs_spare_b6,
4889 &hf_nas_5gs_spare_b5,
4890 &hf_nas_5gs_spare_b4,
4891 &hf_nas_5gs_spare_b3,
4892 &hf_nas_5gs_spare_b2,
4893 &hf_nas_5gs_mm_tnan_info_ssid_ind,
4894 &hf_nas_5gs_mm_tnan_info_tngf_id_ind,
4895 NULL
4897 uint64_t ret_flags;
4899 proto_tree_add_bitmask_list_ret_uint64(tree, tvb, curr_offset, 1, flags, ENC_BIG_ENDIAN, &ret_flags);
4900 curr_offset++;
4901 if (ret_flags & 0x01) {
4902 proto_tree_add_item_ret_uint(tree, hf_nas_5gs_mm_tnan_info_tngf_id_len, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &ret_len);
4903 curr_offset++;
4904 proto_tree_add_item(tree, hf_nas_5gs_mm_tnan_info_tngf_id, tvb, curr_offset, ret_len, ENC_NA);
4905 curr_offset += ret_len;
4907 if (ret_flags & 0x02) {
4908 proto_tree_add_item_ret_uint(tree, hf_nas_5gs_mm_tnan_info_ssid_len, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &ret_len);
4909 curr_offset++;
4910 proto_tree_add_item(tree, hf_nas_5gs_mm_tnan_info_ssid, tvb, curr_offset, ret_len, ENC_NA);
4911 /*curr_offset += ret_len;*/
4914 return len;
4918 * 9.11.3.95 RAN timing synchronization
4920 static uint16_t
4921 de_nas_5gs_mm_ran_timing_sync(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_,
4922 uint32_t offset, unsigned len,
4923 char* add_string _U_, int string_len _U_)
4925 proto_tree_add_bits_item(tree, hf_nas_5gs_spare_bits, tvb, offset << 3, 7, ENC_BIG_ENDIAN);
4926 proto_tree_add_item(tree, hf_nas_5gs_mm_ran_timing_sync_recreq, tvb, offset, 1, ENC_BIG_ENDIAN);
4928 return len;
4932 * 9.11.3.96 Extended LADN information
4934 static uint16_t
4935 de_nas_5gs_mm_ext_ladn_info(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo,
4936 uint32_t offset, unsigned len,
4937 char* add_string _U_, int string_len _U_)
4939 uint32_t curr_offset = offset;
4940 unsigned i = 1;
4942 while ((curr_offset - offset) < len) {
4943 proto_tree *subtree;
4944 proto_item *item;
4945 uint32_t start_offset = curr_offset, ret_len;
4947 subtree = proto_tree_add_subtree_format(tree, tvb, curr_offset, -1, ett_nas_5gs_mm_ext_ladn_info, &item, "LADN %u", i++);
4948 proto_tree_add_item_ret_uint(subtree, hf_nas_5gs_mm_length, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &ret_len);
4949 curr_offset++;
4950 curr_offset += de_nas_5gs_cmn_dnn(tvb, subtree, pinfo, curr_offset, len, NULL, 0);
4951 proto_tree_add_item_ret_uint(subtree, hf_nas_5gs_mm_length, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &ret_len);
4952 curr_offset++;
4953 curr_offset += de_nas_5gs_cmn_s_nssai(tvb, subtree, pinfo, curr_offset, ret_len, NULL, 0);
4954 proto_tree_add_item_ret_uint(subtree, hf_nas_5gs_mm_length, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &ret_len);
4955 curr_offset++;
4956 curr_offset += de_nas_5gs_mm_5gs_ta_id_list(tvb, subtree, pinfo, curr_offset, ret_len, NULL, 0);
4957 proto_item_set_len(item, curr_offset - start_offset);
4960 return len;
4964 * 9.11.3.97 Alternative NSSAI
4966 static uint16_t
4967 de_nas_5gs_mm_alt_nssai(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo,
4968 uint32_t offset, unsigned len,
4969 char* add_string _U_, int string_len _U_)
4971 uint32_t curr_offset = offset;
4972 unsigned i = 1;
4974 while ((curr_offset - offset) < len) {
4975 proto_tree *subtree, *subtree2;
4976 proto_item *item, *item2;
4977 uint32_t start_offset = curr_offset, start_offset2, ret_len;
4979 subtree = proto_tree_add_subtree_format(tree, tvb, curr_offset, -1, ett_nas_5gs_mm_alt_nssai, &item, "Entry %u", i++);
4980 subtree2 = proto_tree_add_subtree(subtree, tvb, curr_offset, -1, ett_nas_5gs_mm_alt_nssai_replaced, &item2, "S-NSSAI to be replaced");
4981 start_offset2 = curr_offset;
4982 proto_tree_add_item_ret_uint(subtree2, hf_nas_5gs_mm_length, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &ret_len);
4983 curr_offset++;
4984 curr_offset += de_nas_5gs_cmn_s_nssai(tvb, subtree2, pinfo, curr_offset, ret_len, NULL, 0);
4985 proto_item_set_len(item2, curr_offset - start_offset2);
4986 subtree2 = proto_tree_add_subtree(subtree, tvb, curr_offset, -1, ett_nas_5gs_mm_alt_nssai_alternative, &item2, "Alternative S-NSSAI");
4987 start_offset2 = curr_offset;
4988 proto_tree_add_item_ret_uint(subtree2, hf_nas_5gs_mm_length, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &ret_len);
4989 curr_offset++;
4990 curr_offset += de_nas_5gs_cmn_s_nssai(tvb, subtree2, pinfo, curr_offset, ret_len, NULL, 0);
4991 proto_item_set_len(item2, curr_offset - start_offset2);
4992 proto_item_set_len(item, curr_offset - start_offset);
4995 return len;
4999 * 9.11.3.98 Type 6 IE container
5001 #define TYPE6_IE_TLV_E(EOT_iei, EOT_pdu_type, EOT_elem_idx, EOT_elem_name_addition) \
5003 if ((signed)curr_len <= 0) return len; \
5004 if ((consumed = elem_tlv_e(tvb, tree, pinfo, (uint8_t) EOT_iei, EOT_pdu_type, EOT_elem_idx, curr_offset, curr_len, EOT_elem_name_addition)) > 0) \
5006 curr_offset += consumed; \
5007 curr_len -= consumed; \
5011 static uint16_t
5012 de_nas_5gs_mm_type_6_ie_cont(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo,
5013 uint32_t offset, unsigned len,
5014 char* add_string _U_, int string_len _U_)
5016 uint32_t curr_offset;
5017 uint32_t consumed;
5018 unsigned curr_len;
5020 curr_offset = offset;
5021 curr_len = len;
5023 /* Information elements and IEIs for the Registration accept type 6 IE container */
5024 /* 01 Extended LADN information Extended LADN information 9.11.3.96 O TLV-E 15-1787 */
5025 TYPE6_IE_TLV_E(0x01, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_EXT_LADN_INFO, NULL);
5026 /* 02 S-NSSAI location validity information S-NSSAI location validity information 9.11.3.100 O TLV-E 17-38611 */
5027 TYPE6_IE_TLV_E(0x02, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_S_NSSAI_LOC_VALID_INFO, NULL);
5028 /* 03 Partially allowed NSSAI Partial NSSAI 9.11.3.103 O TLV-E 3-808 */
5029 TYPE6_IE_TLV_E(0x03, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_PARTIAL_NSSAI, " - Partially allowed NSSAI");
5030 /* 04 Partially allowed NSSAI Partial NSSAI 9.11.3.103 O TLV-E 3-808 */
5031 TYPE6_IE_TLV_E(0x04, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_PARTIAL_NSSAI, " - Partially rejected NSSAI");
5033 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
5035 return len;
5039 * 9.11.9.99 Non-3GPP access path switching indication
5041 static uint16_t
5042 de_nas_5gs_mm_n3gpp_acc_path_switch_ind(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_,
5043 uint32_t offset, unsigned len,
5044 char* add_string _U_, int string_len _U_)
5046 proto_tree_add_bits_item(tree, hf_nas_5gs_spare_bits, tvb, offset << 3, 7, ENC_BIG_ENDIAN);
5047 proto_tree_add_item(tree, hf_nas_5gs_mm_n3gpp_acc_path_switch_ind_naps, tvb, offset, 1, ENC_BIG_ENDIAN);
5049 return len;
5053 * 9.11.3.100 S-NSSAI location validity information
5055 static uint16_t
5056 de_nas_5gs_mm_s_nssai_loc_valid_info(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo,
5057 uint32_t offset, unsigned len,
5058 char* add_string _U_, int string_len _U_)
5060 uint32_t curr_offset = offset;
5061 unsigned i = 1;
5063 while ((curr_offset - offset) < len) {
5064 proto_tree *subtree;
5065 proto_item *item;
5066 uint32_t start_offset = curr_offset, length, j;
5068 subtree = proto_tree_add_subtree_format(tree, tvb, curr_offset, -1, ett_nas_5gs_mm_s_nssai_loc_valid_info, &item, "Per-S-NSSAI location validity information for S-NSSAI %u", i++);
5069 proto_tree_add_item(subtree, hf_nas_5gs_mm_s_nssai_loc_valid_info_per_s_nssai_len, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
5070 curr_offset += 2;
5071 proto_tree_add_item_ret_uint(subtree, hf_nas_5gs_mm_length, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &length);
5072 curr_offset++;
5073 curr_offset += de_nas_5gs_cmn_s_nssai(tvb, subtree, pinfo, curr_offset, length, NULL, 0);
5074 proto_tree_add_item_ret_uint(subtree, hf_nas_5gs_mm_s_nssai_loc_valid_info_per_s_nssai_nb_nr_cgi, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &length);
5075 curr_offset++;
5076 for (j = 0; j < length; j++) {
5077 proto_tree_add_item(subtree, hf_nas_5gs_mm_s_nssai_loc_valid_info_per_s_nssai_nr_cell_id, tvb, curr_offset, 5, ENC_BIG_ENDIAN);
5078 curr_offset += 5;
5079 curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, tree, curr_offset, E212_NONE, true);
5081 proto_item_set_len(item, curr_offset - start_offset);
5084 return len;
5088 * 9.11.3.101 S-NSSAI time validity information
5090 static const value_string nas_5gs_mm_s_nssai_time_valid_info_time_window_recurrence_pattern_vals[] = {
5091 { 0, "Everyday" },
5092 { 1, "Every weekday" },
5093 { 2, "Every week" },
5094 { 3, "Every 2 weeks" },
5095 { 4, "Every month (absolute)" },
5096 { 5, "Every month (relative)" },
5097 { 6, "Every quarter (absolute)" },
5098 { 7, "Every quarter (relative)" },
5099 { 8, "Every 6 months (absolute)" },
5100 { 9, "Every 6 months (relative)" },
5101 { 0, NULL }
5104 static uint16_t
5105 de_nas_5gs_mm_s_nssai_time_valid_info(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo,
5106 uint32_t offset, unsigned len,
5107 char* add_string _U_, int string_len _U_)
5109 uint32_t curr_offset = offset;
5110 unsigned i = 1;
5112 while ((curr_offset - offset) < len) {
5113 proto_tree *subtree;
5114 proto_item *item;
5115 uint32_t start_offset = curr_offset, length, start_offset2, time_window_len;
5117 subtree = proto_tree_add_subtree_format(tree, tvb, curr_offset, -1, ett_nas_5gs_mm_s_nssai_time_valid_info, &item, "Per-S-NSSAI time validity information for S-NSSAI %u", i++);
5118 proto_tree_add_item(subtree, hf_nas_5gs_mm_s_nssai_time_valid_info_per_s_nssai_len, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5119 curr_offset++;
5120 proto_tree_add_item_ret_uint(subtree, hf_nas_5gs_mm_length, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &length);
5121 curr_offset++;
5122 curr_offset += de_nas_5gs_cmn_s_nssai(tvb, subtree, pinfo, curr_offset, length, NULL, 0);
5123 proto_tree_add_item_ret_uint(subtree, hf_nas_5gs_mm_s_nssai_time_valid_info_per_s_nssai_len, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &length);
5124 curr_offset++;
5125 start_offset2 = curr_offset;
5126 while ((curr_offset - start_offset2) < length) {
5127 proto_tree_add_item_ret_uint(subtree, hf_nas_5gs_mm_s_nssai_time_valid_info_time_window_len, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &time_window_len);
5128 curr_offset++;
5129 proto_tree_add_item(subtree, hf_nas_5gs_mm_s_nssai_time_valid_info_time_window_start_time, tvb, curr_offset, 8, ENC_NA);
5130 curr_offset += 8;
5131 proto_tree_add_item(subtree, hf_nas_5gs_mm_s_nssai_time_valid_info_time_window_stop_time, tvb, curr_offset, 8, ENC_NA);
5132 curr_offset += 8;
5133 if (time_window_len >= 9) {
5134 proto_tree_add_bits_item(tree, hf_nas_5gs_spare_bits, tvb, offset << 3, 4, ENC_BIG_ENDIAN);
5135 proto_tree_add_item(tree, hf_nas_5gs_mm_s_nssai_time_valid_info_time_window_recurrence_pattern, tvb, offset, 1, ENC_BIG_ENDIAN);
5136 curr_offset++;
5137 if (time_window_len >= 10) {
5138 proto_tree_add_item(subtree, hf_nas_5gs_mm_s_nssai_time_valid_info_time_window_recurrence_end_time, tvb, curr_offset, 8, ENC_NA);
5139 curr_offset += 8;
5143 proto_item_set_len(item, curr_offset - start_offset);
5146 return len;
5150 * 9.11.3.102 Non-3GPP path switching information
5152 static uint16_t
5153 de_nas_5gs_mm_n3gpp_path_switch_info(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_,
5154 uint32_t offset, unsigned len,
5155 char* add_string _U_, int string_len _U_)
5157 proto_tree_add_bits_item(tree, hf_nas_5gs_spare_bits, tvb, offset << 3, 7, ENC_BIG_ENDIAN);
5158 proto_tree_add_item(tree, hf_nas_5gs_mm_n3gpp_path_switch_info_nsonr, tvb, offset, 1, ENC_BIG_ENDIAN);
5160 return len;
5164 * 9.11.3.103 Partial NSSAI
5166 static uint16_t
5167 de_nas_5gs_mm_partial_nssai(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo,
5168 uint32_t offset, unsigned len,
5169 char* add_string _U_, int string_len _U_)
5171 uint32_t curr_offset = offset, ret_len;
5173 while ((curr_offset - offset) < len) {
5174 proto_tree_add_item_ret_uint(tree, hf_nas_5gs_mm_length, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &ret_len);
5175 curr_offset++;
5176 if (ret_len > 0)
5177 curr_offset += de_nas_5gs_cmn_s_nssai(tvb, tree, pinfo, curr_offset, ret_len, NULL, 0);
5178 proto_tree_add_item_ret_uint(tree, hf_nas_5gs_mm_length, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &ret_len);
5179 curr_offset++;
5180 if (ret_len > 0)
5181 curr_offset += de_nas_5gs_mm_5gs_ta_id_list(tvb, tree, pinfo, curr_offset, ret_len, NULL, 0);
5184 return len;
5188 * 9.11.3.104 AUN3 indication
5190 static uint16_t
5191 de_nas_5gs_mm_au3n_ind(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_,
5192 uint32_t offset, unsigned len,
5193 char* add_string _U_, int string_len _U_)
5195 proto_tree_add_bits_item(tree, hf_nas_5gs_spare_bits, tvb, offset << 3, 7, ENC_BIG_ENDIAN);
5196 proto_tree_add_item(tree, hf_nas_5gs_mm_au3n_ind_aun3reg, tvb, offset, 1, ENC_BIG_ENDIAN);
5198 return len;
5202 * 9.11.3.105 Feature authorization indication
5204 static const value_string nas_5gs_mm_feat_auth_ind_mbsrai_vals[] = {
5205 { 0, "no information" },
5206 { 1, "not authorized to operate as MBSR but allowed to operate as a UE" },
5207 { 2, "authorized to operate as MBSR" },
5208 { 0, NULL }
5211 static uint16_t
5212 de_nas_5gs_mm_feat_auth_ind(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_,
5213 uint32_t offset, unsigned len,
5214 char* add_string _U_, int string_len _U_)
5216 proto_tree_add_bits_item(tree, hf_nas_5gs_spare_bits, tvb, offset << 3, 6, ENC_BIG_ENDIAN);
5217 proto_tree_add_item(tree, hf_nas_5gs_mm_feat_auth_ind_mbsrai, tvb, offset, 1, ENC_BIG_ENDIAN);
5219 return len;
5223 * 9.11.3.106 Payload container information
5225 static const true_false_string tfs_nas_5gs_mm_payload_cont_info_pru = {
5226 "Payload container related to PRU",
5227 "Payload container not related to PRU"
5230 static uint16_t
5231 de_nas_5gs_mm_payload_cont_info(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_,
5232 uint32_t offset, unsigned len,
5233 char* add_string _U_, int string_len _U_)
5235 proto_tree_add_bits_item(tree, hf_nas_5gs_spare_bits, tvb, offset << 3, 7, ENC_BIG_ENDIAN);
5236 proto_tree_add_item(tree, hf_nas_5gs_mm_payload_cont_info_pru, tvb, offset, 1, ENC_BIG_ENDIAN);
5238 return len;
5242 * 9.11.3.107 AUN3 device security key
5244 static const value_string nas_5gs_mm_aun3_device_sec_key_askt_vals[] = {
5245 { 0, "Master session key is included" },
5246 { 1, "K_WAGF key is included" },
5247 { 0, NULL }
5250 static uint16_t
5251 de_nas_5gs_mm_aun3_device_sec_key(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_,
5252 uint32_t offset, unsigned len,
5253 char* add_string _U_, int string_len _U_)
5255 uint32_t ret_len;
5257 proto_tree_add_bits_item(tree, hf_nas_5gs_spare_bits, tvb, offset << 3, 6, ENC_BIG_ENDIAN);
5258 proto_tree_add_item(tree, hf_nas_5gs_mm_aun3_device_sec_key_askt, tvb, offset, 1, ENC_BIG_ENDIAN);
5259 proto_tree_add_item_ret_uint(tree, hf_nas_5gs_mm_aun3_device_sec_key_key_len, tvb, offset + 1, 1, ENC_BIG_ENDIAN, &ret_len);
5260 proto_tree_add_item(tree, hf_nas_5gs_mm_aun3_device_sec_key_key, tvb, offset + 2, ret_len, ENC_NA);
5262 return len;
5266 * 9.11.3.108 On-demand NSSAI
5268 static uint16_t
5269 de_nas_5gs_mm_on_demand_nssai(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo,
5270 uint32_t offset, unsigned len,
5271 char* add_string _U_, int string_len _U_)
5273 uint32_t curr_offset = offset;
5274 unsigned i = 1;
5276 while ((curr_offset - offset) < len) {
5277 proto_tree *subtree;
5278 proto_item *item;
5279 uint32_t start_offset = curr_offset, length, ret_len;
5281 subtree = proto_tree_add_subtree_format(tree, tvb, curr_offset, -1, ett_nas_5gs_mm_on_demand_nssai, &item, "Information of on-demand S-NSSAI %u", i++);
5282 proto_tree_add_item_ret_uint(subtree, hf_nas_5gs_mm_on_demand_nssai_len, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &length);
5283 curr_offset++;
5284 proto_tree_add_item_ret_uint(subtree, hf_nas_5gs_mm_length, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &ret_len);
5285 curr_offset++;
5286 curr_offset += de_nas_5gs_cmn_s_nssai(tvb, subtree, pinfo, curr_offset, ret_len, NULL, 0);
5287 if ((curr_offset - start_offset) < (length + 1)) {
5288 proto_tree_add_item(subtree, hf_nas_5gs_mm_on_demand_nssai_slice_dereg_inactiv_timer, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
5289 curr_offset += 2;
5291 proto_item_set_len(item, curr_offset - start_offset);
5294 return len;
5298 * 9.11.3.109 Extended 5GMM cause
5300 static const true_false_string tfs_nas_5gs_mm_ext_5gmm_cause_sat_nr = {
5301 "Satellite NG-RAN allowed in PLMN",
5302 "Satellite NG-RAN not allowed in PLMN"
5305 static uint16_t
5306 de_nas_5gs_mm_ext_5gmm_cause(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_,
5307 uint32_t offset, unsigned len,
5308 char* add_string _U_, int string_len _U_)
5310 proto_tree_add_bits_item(tree, hf_nas_5gs_spare_bits, tvb, offset << 3, 7, ENC_BIG_ENDIAN);
5311 proto_tree_add_item(tree, hf_nas_5gs_mm_ext_5gmm_cause_sat_nr, tvb, offset, 1, ENC_BIG_ENDIAN);
5313 return len;
5317 * 9.11.4 5GS session management (5GSM) information elements
5321 * 9.11.4.1 5GSM capability
5323 static const value_string nas_5gs_sm_atsss_st_b3_b6_vals[] = {
5324 { 0x0, "ATSSS not supported" },
5325 { 0x1, "ATSSS Low-Layer functionality with any steering mode allowed for ATSSS-LL supported" },
5326 { 0x2, "MPTCP functionality with any steering mode and ATSSS-LL functionality with only active-standby steering mode supported" },
5327 { 0x3, "MPTCP functionality with any steering mode and ATSSS-LL functionality with any steering mode allowed for ATSSS-LL supported" },
5328 { 0x4, "MPQUIC functionality with any steering mode and ATSSS-LL functionality with only active-standby steering mode supported" },
5329 { 0x5, "MPQUIC functionality with any steering mode and ATSSS-LL functionality with any steering mode allowed for ATSSS-LL supported" },
5330 { 0x6, "MPTCP functionality with any steering mode, MPQUIC functionality with any steering mode and ATSSS-LL functionality with only active-standby steering mode supported" },
5331 { 0x7, "MPTCP functionality with any steering mode, MPQUIC functionality with any steering mode and ATSSS-LL functionality with any steering mode allowed for ATSSS-LL supported" },
5332 { 0, NULL }
5335 static uint16_t
5336 de_nas_5gs_sm_5gsm_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
5337 uint32_t offset, unsigned len,
5338 char *add_string _U_, int string_len _U_)
5340 uint32_t curr_offset = offset;
5342 static int * const flags1[] = {
5343 &hf_nas_5gs_sm_tpmic_b7,
5344 &hf_nas_5gs_sm_atsss_st_b3_b6,
5345 &hf_nas_5gs_sm_ept_s1_b2,
5346 &hf_nas_5gs_sm_mh6_pdu_b1,
5347 &hf_nas_5gs_sm_rqos_b0,
5348 NULL
5351 static int * const flags2[] = {
5352 &hf_nas_5gs_spare_b7,
5353 &hf_nas_5gs_spare_b6,
5354 &hf_nas_5gs_spare_b5,
5355 &hf_nas_5gs_spare_b4,
5356 &hf_nas_5gs_spare_b3,
5357 &hf_nas_5gs_spare_b2,
5358 &hf_nas_5gs_sm_sdnaepc_b1,
5359 &hf_nas_5gs_sm_apmqf_b0,
5360 NULL
5363 proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, flags1, ENC_BIG_ENDIAN);
5364 curr_offset++;
5366 if ((curr_offset - offset) >= len)
5367 return (len);
5369 proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, flags2, ENC_BIG_ENDIAN);
5370 curr_offset++;
5372 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_nas_5gs_extraneous_data);
5374 return (curr_offset - offset);
5378 * 9.11.4.2 5GSM cause
5381 const value_string nas_5gs_sm_cause_vals[] = {
5382 { 0x08, "Operator determined barring" },
5383 { 0x1a, "Insufficient resources" },
5384 { 0x1b, "Missing or unknown DNN" },
5385 { 0x1c, "Unknown PDU session type" },
5386 { 0x1d, "User authentication or authorization failed" },
5387 { 0x1f, "Request rejected, unspecified" },
5388 { 0x20, "Service option not supported" },
5389 { 0x21, "Requested service option not subscribed" },
5390 { 0x22, "Service option temporarily out of order" }, /* no more defined, kept for backward compatibility */
5391 { 0x23, "PTI already in use" },
5392 { 0x24, "Regular deactivation" },
5393 { 0x25, "5GS QoS not accepted" },
5394 { 0x26, "Network failure" },
5395 { 0x27, "Reactivation requested" },
5396 { 0x29, "Semantic error in the TFT operation" },
5397 { 0x2a, "Syntactical error in the TFT operation" },
5398 { 0x2b, "Invalid PDU session identity" },
5399 { 0x2c, "Semantic errors in packet filter(s)" },
5400 { 0x2d, "Syntactical error in packet filter(s)" },
5401 { 0x2e, "Out of LADN service area" },
5402 { 0x2f, "PTI mismatch" },
5403 { 0x32, "PDU session type IPv4 only allowed" },
5404 { 0x33, "PDU session type IPv6 only allowed" },
5405 { 0x36, "PDU session does not exist" },
5406 { 0x39, "PDU session type IPv4v6 only allowed" },
5407 { 0x3a, "PDU session type Unstructured only allowed" },
5408 { 0x3b, "Unsupported 5QI value" },
5409 { 0x3d, "PDU session type Ethernet only allowed" },
5410 { 0x43, "Insufficient resources for specific slice and DNN" },
5411 { 0x44, "Not supported SSC mode" },
5412 { 0x45, "Insufficient resources for specific slice" },
5413 { 0x46, "Missing or unknown DNN in a slice" },
5414 { 0x51, "Invalid PTI value" },
5415 { 0x52, "Maximum data rate per UE for user-plane integrity protection is too low" },
5416 { 0x53, "Semantic error in the QoS operation" },
5417 { 0x54, "Syntactical error in the QoS operation" },
5418 { 0x55, "Invalid mapped EPS bearer identity" },
5419 { 0x56, "UAS services not allowed" },
5420 { 0x5f, "Semantically incorrect message" },
5421 { 0x60, "Invalid mandatory information" },
5422 { 0x61, "Message type non-existent or not implemented" },
5423 { 0x62, "Message type not compatible with the protocol state" },
5424 { 0x63, "Information element non-existent or not implemented" },
5425 { 0x64, "Conditional IE error" },
5426 { 0x65, "Message not compatible with the protocol state" },
5427 { 0x6f, "Protocol error, unspecified" },
5428 { 0, NULL }
5431 static uint16_t
5432 de_nas_5gs_sm_5gsm_cause(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
5433 uint32_t offset, unsigned len _U_,
5434 char *add_string _U_, int string_len _U_)
5436 uint32_t cause;
5438 proto_tree_add_item_ret_uint(tree, hf_nas_5gs_sm_5gsm_cause, tvb, offset, 1, ENC_BIG_ENDIAN, &cause);
5440 col_append_fstr(pinfo->cinfo, COL_INFO, " (%s)",
5441 val_to_str_const(cause, nas_5gs_sm_cause_vals, "Unknown"));
5444 return 1;
5448 * 9.11.4.3 Always-on PDU session indication
5450 static true_false_string tfs_nas_5gs_sm_apsi = {
5451 "required",
5452 "not allowed"
5455 static uint16_t
5456 de_nas_5gs_sm_always_on_pdu_ses_ind(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
5457 uint32_t offset, unsigned len,
5458 char *add_string _U_, int string_len _U_)
5460 static int * const flags[] = {
5461 &hf_nas_5gs_spare_b3,
5462 &hf_nas_5gs_spare_b2,
5463 &hf_nas_5gs_spare_b1,
5464 &hf_nas_5gs_sm_apsi,
5465 NULL
5468 proto_tree_add_bitmask_list(tree, tvb, offset, 1, flags, ENC_BIG_ENDIAN);
5470 return len;
5474 * 9.11.4.4 Always-on PDU session requested
5476 static uint16_t
5477 de_nas_5gs_sm_always_on_pdu_ses_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
5478 uint32_t offset, unsigned len,
5479 char *add_string _U_, int string_len _U_)
5481 static int * const flags[] = {
5482 &hf_nas_5gs_spare_b3,
5483 &hf_nas_5gs_spare_b2,
5484 &hf_nas_5gs_spare_b1,
5485 &hf_nas_5gs_sm_apsr,
5486 NULL
5489 proto_tree_add_bitmask_list(tree, tvb, offset, 1, flags, ENC_BIG_ENDIAN);
5491 return len;
5495 * 9.11.4.5 Allowed SSC mode
5498 static uint16_t
5499 de_nas_5gs_sm_5gsm_allowed_ssc_mode(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
5500 uint32_t offset, unsigned len _U_,
5501 char *add_string _U_, int string_len _U_)
5504 static int * const flags[] = {
5505 &hf_nas_5gs_spare_b3,
5506 &hf_nas_5gs_sm_all_ssc_mode_b2,
5507 &hf_nas_5gs_sm_all_ssc_mode_b1,
5508 &hf_nas_5gs_sm_all_ssc_mode_b0,
5509 NULL
5513 proto_tree_add_bitmask_list(tree, tvb, offset, 1, flags, ENC_BIG_ENDIAN);
5515 return 1;
5519 * 9.11.4.6 Extended protocol configuration options
5521 /* See subclause 10.5.6.3A in 3GPP TS 24.008 */
5524 * 9.11.4.7 Integrity protection maximum data rate
5526 static const value_string nas_5gs_sm_int_prot_max_data_rate_vals[] = {
5527 { 0x00, "64 kbps" },
5528 { 0x01, "NULL" },
5529 { 0xff, "Full data rate" },
5530 { 0, NULL }
5533 static uint16_t
5534 de_nas_5gs_sm_int_prot_max_data_rte(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
5535 uint32_t offset, unsigned len _U_,
5536 char *add_string _U_, int string_len _U_)
5538 /* Maximum data rate per UE for user-plane integrity protection for uplink */
5539 proto_tree_add_item(tree, hf_nas_5gs_sm_int_prot_max_data_rate_ul, tvb, offset, 1, ENC_BIG_ENDIAN);
5541 /* Maximum data rate per UE for user-plane integrity protection for downlink */
5542 proto_tree_add_item(tree, hf_nas_5gs_sm_int_prot_max_data_rate_dl, tvb, offset+1, 1, ENC_BIG_ENDIAN);
5544 return 2;
5548 * 9.11.4.8 Mapped EPS bearer contexts
5550 static const value_string nas_5gs_sm_mapd_eps_b_cont_opt_code_vals[] = {
5551 { 0x0, "Reserved" },
5552 { 0x01, "Create new EPS bearer" },
5553 { 0x02, "Delete existing EPS bearer" },
5554 { 0x03, "Modify existing EPS bearer" },
5555 { 0, NULL }
5558 static const value_string nas_5gs_sm_mapd_eps_b_cont_E_vals[] = {
5559 { 0x0, "parameters list is not included" },
5560 { 0x01, "parameters list is included" },
5561 { 0, NULL }
5564 static const value_string nas_5gs_sm_mapd_eps_b_cont_E_Modify_vals[] = {
5565 { 0x0, "extension of previously provided parameters list" },
5566 { 0x01, "replacement of all previously provided parameters list" },
5567 { 0, NULL }
5570 static const value_string nas_5gs_sm_mapd_eps_b_cont_param_id_vals[] = {
5571 { 0x01, "Mapped EPS QoS parameters" },
5572 { 0x02, "Mapped extended EPS QoS parameters" },
5573 { 0x03, "Traffic flow template" },
5574 { 0x04, "APN-AMBR" },
5575 { 0x05, "Extended APN-AMBR" },
5576 { 0, NULL }
5579 static uint16_t
5580 de_nas_5gs_sm_mapped_eps_b_cont(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
5581 uint32_t offset, unsigned len,
5582 char *add_string _U_, int string_len _U_)
5585 uint32_t curr_offset;
5586 proto_tree * sub_tree, *sub_tree1;
5587 uint32_t num_cont, length, opt_code, num_eps_parms, param_id;
5588 proto_item * item;
5589 unsigned i;
5591 curr_offset = offset;
5592 num_cont = 1;
5594 static int * const mapd_eps_b_cont_flags[] = {
5595 &hf_nas_5gs_sm_mapd_eps_b_cont_opt_code,
5596 &hf_nas_5gs_spare_b5,
5597 &hf_nas_5gs_sm_mapd_eps_b_cont_E,
5598 &hf_nas_5gs_sm_mapd_eps_b_cont_num_eps_parms,
5599 NULL
5602 static int * const mapd_eps_b_cont_flags_modify[] = {
5603 &hf_nas_5gs_sm_mapd_eps_b_cont_opt_code,
5604 &hf_nas_5gs_spare_b5,
5605 &hf_nas_5gs_sm_mapd_eps_b_cont_E_mod,
5606 &hf_nas_5gs_sm_mapd_eps_b_cont_num_eps_parms,
5607 NULL
5610 /* The IE contains a number of Mapped EPS bearer context */
5611 while ((curr_offset - offset) < len) {
5612 /* Figure 9.11.4.5.2: Mapped EPS bearer context */
5613 sub_tree = proto_tree_add_subtree_format(tree, tvb, curr_offset, -1, ett_nas_5gs_sm_mapd_eps_b_cont, &item,
5614 "Mapped EPS bearer context %u", num_cont);
5616 /* EPS bearer identity */
5617 proto_tree_add_item(sub_tree, hf_nas_5gs_sm_mapd_eps_b_cont_id, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5618 curr_offset++;
5620 /* Length of Mapped EPS bearer context*/
5621 proto_tree_add_item_ret_uint(sub_tree, hf_nas_5gs_sm_length, tvb, curr_offset, 2, ENC_BIG_ENDIAN, &length);
5622 curr_offset += 2;
5624 /* 8 7 6 5 4 3 2 1 */
5625 /* operation code | spare | E | number of EPS params */
5626 proto_item_set_len(item, length + 3);
5628 num_eps_parms = tvb_get_uint8(tvb, curr_offset);
5630 opt_code = (num_eps_parms & 0xc0) >> 6;
5631 num_eps_parms = num_eps_parms & 0x0f;
5633 /* operation code = 3 Modify existing EPS bearer */
5634 if (opt_code == 3) {
5635 proto_tree_add_bitmask_list(sub_tree, tvb, curr_offset, 1, mapd_eps_b_cont_flags_modify, ENC_BIG_ENDIAN);
5637 } else {
5638 proto_tree_add_bitmask_list(sub_tree, tvb, curr_offset, 1, mapd_eps_b_cont_flags, ENC_BIG_ENDIAN);
5641 curr_offset++;
5642 i = 1;
5644 /* EPS parameters list */
5645 while (num_eps_parms > 0) {
5647 sub_tree1 = proto_tree_add_subtree_format(sub_tree, tvb, curr_offset, -1, ett_nas_5gs_sm_mapd_eps_b_cont_params_list, &item,
5648 "EPS parameter %u", i);
5650 /* EPS parameter identifier */
5651 proto_tree_add_item_ret_uint(sub_tree1, hf_nas_5gs_sm_mapd_eps_b_cont_param_id, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &param_id);
5652 proto_item_append_text(item, " - %s", val_to_str_const(param_id, nas_5gs_sm_mapd_eps_b_cont_param_id_vals, "Unknown"));
5653 curr_offset++;
5655 /*length of the EPS parameter contents field */
5656 proto_tree_add_item_ret_uint(sub_tree1, hf_nas_5gs_sm_length, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &length);
5657 curr_offset++;
5659 proto_item_set_len(item, length + 2);
5660 /*content of the EPS parameter contents field */
5661 switch (param_id) {
5662 case 1:
5663 /* 01H (Mapped EPS QoS parameters) */
5664 de_esm_qos(tvb, sub_tree1, pinfo, curr_offset, length, NULL, 0);
5665 break;
5666 case 2:
5667 /* 02H (Mapped extended EPS QoS parameters) */
5668 de_esm_ext_eps_qos(tvb, sub_tree1, pinfo, curr_offset, length, NULL, 0);
5669 break;
5670 case 3:
5671 /* 03H (Traffic flow template)*/
5672 de_sm_tflow_temp(tvb, sub_tree1, pinfo, curr_offset, length, NULL, 0);
5673 break;
5674 case 4:
5675 /* 04H (APN-AMBR) */
5676 de_esm_apn_aggr_max_br(tvb, sub_tree1, pinfo, curr_offset, length, NULL, 0);
5677 break;
5678 case 5:
5679 /* 05H (extended APN-AMBR). */
5680 de_esm_ext_apn_agr_max_br(tvb, sub_tree1, pinfo, curr_offset, length, NULL, 0);
5681 break;
5682 default:
5683 proto_tree_add_item(sub_tree1, hf_nas_5gs_sm_mapd_eps_b_cont_eps_param_cont, tvb, curr_offset, length, ENC_NA);
5684 break;
5686 curr_offset +=length;
5687 i++;
5688 num_eps_parms--;
5691 num_cont++;
5694 return len;
5700 * 9.11.4.9 Maximum number of supported packet filters
5702 static uint16_t
5703 de_nas_5gs_sm_max_num_sup_pkt_flt(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
5704 uint32_t offset, unsigned len _U_,
5705 char *add_string _U_, int string_len _U_)
5707 static int * const flags[] = {
5708 &hf_nas_5gs_sm_max_nb_sup_pkt_flt_nb,
5709 &hf_nas_5gs_sm_max_nb_sup_pkt_flt_spare,
5710 NULL
5713 proto_tree_add_bitmask_list(tree, tvb, offset, 2, flags, ENC_BIG_ENDIAN);
5715 return 2;
5719 * 9.11.4.10 PDU address
5722 static const value_string nas_5gs_sm_pdu_ses_type_vals[] = {
5723 { 0x1, "IPv4" },
5724 { 0x2, "IPv6" },
5725 { 0x3, "IPv4v6" },
5726 { 0, NULL }
5730 static uint16_t
5731 de_nas_5gs_sm_pdu_address(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
5732 uint32_t offset, unsigned len,
5733 char *add_string _U_, int string_len _U_)
5735 proto_item *ti;
5736 bool si6lla;
5737 uint32_t pdu_addr;
5738 uint8_t interface_id[8];
5740 /* 0 Spare 0 Spare 0 Spare 0 Spare SI6LLA PDU session type value */
5741 proto_tree_add_item_ret_boolean(tree, hf_nas_5gs_sm_si6lla, tvb, offset, 1, ENC_BIG_ENDIAN, &si6lla);
5742 ti = proto_tree_add_item_ret_uint(tree, hf_nas_5gs_sm_pdu_ses_type, tvb, offset, 1, ENC_BIG_ENDIAN, &pdu_addr);
5743 offset++;
5745 /* PDU address information */
5746 switch (pdu_addr) {
5747 case 1:
5748 /* IPv4 */
5749 proto_tree_add_item(tree, hf_nas_5gs_sm_pdu_addr_inf_ipv4, tvb, offset, 4, ENC_BIG_ENDIAN);
5750 offset += 4;
5751 break;
5752 case 2:
5753 /* If the PDU session type value indicates IPv6, the PDU address information in octet 4 to octet 11
5754 * contains an interface identifier for the IPv6 link local address.
5756 tvb_memcpy(tvb, interface_id, offset, 8);
5757 proto_tree_add_bytes_format_value(tree, hf_nas_5gs_sm_pdu_addr_inf_ipv6, tvb, offset, 8, NULL,
5758 "::%x:%x:%x:%x", pntoh16(&interface_id[0]), pntoh16(&interface_id[2]),
5759 pntoh16(&interface_id[4]), pntoh16(&interface_id[6]));
5760 offset += 8;
5761 break;
5762 case 3:
5763 /* If the PDU session type value indicates IPv4v6, the PDU address information in octet 4 to octet 11
5764 * contains an interface identifier for the IPv6 link local address and in octet 12 to octet 15
5765 * contains an IPv4 address.
5767 tvb_memcpy(tvb, interface_id, offset, 8);
5768 proto_tree_add_bytes_format_value(tree, hf_nas_5gs_sm_pdu_addr_inf_ipv6, tvb, offset, 8, NULL,
5769 "::%x:%x:%x:%x", pntoh16(&interface_id[0]), pntoh16(&interface_id[2]),
5770 pntoh16(&interface_id[4]), pntoh16(&interface_id[6]));
5771 offset += 8;
5772 proto_tree_add_item(tree, hf_nas_5gs_sm_pdu_addr_inf_ipv4, tvb, offset, 4, ENC_BIG_ENDIAN);
5773 offset += 4;
5774 break;
5775 default:
5776 expert_add_info(pinfo, ti, &ei_nas_5gs_unknown_value);
5777 return len;
5780 /* SMF's IPv6 link local address */
5781 if (si6lla) {
5782 proto_tree_add_item(tree, hf_nas_5gs_sm_smf_ipv6_lla, tvb, offset, 16, ENC_NA);
5785 return len;
5789 * 9.11.4.11 PDU session type
5791 static const value_string nas_5gs_pdu_session_type_values[] = {
5792 { 0x1, "IPv4" },
5793 { 0x2, "Ipv6" },
5794 { 0x3, "Ipv4v6" },
5795 { 0x4, "Unstructured" },
5796 { 0x5, "Ethernet" },
5797 { 0, NULL }
5801 static uint16_t
5802 de_nas_5gs_sm_pdu_session_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
5803 uint32_t offset, unsigned len _U_,
5804 char *add_string _U_, int string_len _U_)
5807 proto_tree_add_item(tree, hf_nas_5gs_sm_pdu_session_type, tvb, offset, 1, ENC_BIG_ENDIAN);
5809 return 1;
5813 * 9.11.4.12 QoS flow descriptions
5816 static const value_string nas_5gs_sm_qos_des_flow_opt_code_vals[] = {
5817 { 0x00, "Reserved" },
5818 { 0x01, "Create new QoS flow description" },
5819 { 0x02, "Delete existing QoS flow description" },
5820 { 0x03, "Modify existing QoS flow description" },
5821 { 0, NULL }
5824 static const value_string nas_5gs_sm_param_id_values[] = {
5825 { 0x01, "5QI" },
5826 { 0x02, "GFBR uplink" },
5827 { 0x03, "GFBR downlink" },
5828 { 0x04, "MFBR uplink" },
5829 { 0x05, "MFBR downlink" },
5830 { 0x06, "Averaging window" },
5831 { 0x07, "EPS bearer identity" },
5832 { 0, NULL }
5835 uint16_t
5836 de_nas_5gs_sm_qos_flow_des(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
5837 uint32_t offset, unsigned len,
5838 char *add_string _U_, int string_len _U_)
5841 proto_tree *sub_tree, *sub_tree2;
5842 proto_item *item, *sub_item;
5843 int i = 1, j;
5844 uint32_t param_len, param_id;
5845 uint32_t curr_offset, start_offset, start_offset2;
5846 uint8_t num_param;
5847 uint32_t unit, mult, val;
5848 const char *unit_str;
5849 int hf_unit, hf_val;
5851 static int * const param_flags[] = {
5852 &hf_nas_5gs_sm_e,
5853 &hf_nas_5gs_sm_nof_params,
5854 NULL
5857 curr_offset = offset;
5859 while ((curr_offset - offset) < len) {
5861 /* QoS flow description */
5862 sub_tree = proto_tree_add_subtree_format(tree, tvb, curr_offset, len - (curr_offset - offset), ett_nas_5gs_sm_qos_params, &item, "QoS flow description %u", i);
5863 start_offset = curr_offset;
5865 /* 0 0 QFI */
5866 proto_tree_add_item(sub_tree, hf_nas_5gs_sm_qfi, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5867 curr_offset += 1;
5869 /* Operation code */
5870 proto_tree_add_item(sub_tree, hf_nas_5gs_sm_qos_des_flow_opt_code, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5871 curr_offset++;
5873 /* 0 Spare E Number of parameters */
5874 j = 1;
5875 num_param = tvb_get_uint8(tvb, curr_offset);
5876 num_param = num_param & 0x3f;
5877 proto_tree_add_bitmask_list(sub_tree, tvb, curr_offset, 1, param_flags, ENC_BIG_ENDIAN);
5878 curr_offset++;
5881 while (num_param > 0) {
5882 /* Parameter list */
5883 sub_tree2 = proto_tree_add_subtree_format(sub_tree, tvb, curr_offset, len - (curr_offset - offset), ett_nas_5gs_sm_qos_rules, &sub_item, "Parameter %u", j);
5884 start_offset2 = curr_offset;
5886 /* Parameter identifier */
5887 proto_tree_add_item_ret_uint(sub_tree2, hf_nas_5gs_sm_param_id, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &param_id);
5888 proto_item_append_text(item, " - %s", val_to_str_const(param_id, nas_5gs_sm_param_id_values, "Unknown"));
5889 curr_offset++;
5890 /* Length of parameter contents */
5891 proto_tree_add_item_ret_uint(sub_tree2, hf_nas_5gs_sm_param_len, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &param_len);
5892 curr_offset++;
5894 /*parameter content*/
5895 switch (param_id) {
5896 /* 01H (5QI)*/
5897 case 0x01:
5898 proto_tree_add_item(sub_tree2, hf_nas_5gs_sm_5qi, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5899 curr_offset += param_len;
5900 break;
5901 /* 02H (GFBR uplink); 04H (MFBR uplink);*/
5902 case 0x02:
5903 case 0x03:
5904 case 0x04:
5905 case 0x05:
5906 if (param_id == 2) {
5907 hf_unit = hf_nas_5gs_sm_unit_for_gfbr_ul;
5908 hf_val = hf_nas_5gs_sm_gfbr_ul;
5909 } else if (param_id == 3) {
5910 hf_unit = hf_nas_5gs_sm_unit_for_gfbr_dl;
5911 hf_val = hf_nas_5gs_sm_gfbr_dl;
5912 } else if (param_id == 4) {
5913 hf_unit = hf_nas_5gs_sm_unit_for_mfbr_ul;
5914 hf_val = hf_nas_5gs_sm_mfbr_ul;
5915 } else {
5916 hf_unit = hf_nas_5gs_sm_unit_for_mfbr_dl;
5917 hf_val = hf_nas_5gs_sm_mfbr_dl;
5919 proto_tree_add_item_ret_uint(sub_tree2, hf_unit, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &unit);
5920 curr_offset++;
5921 mult = get_ext_ambr_unit(unit, &unit_str);
5922 val = tvb_get_ntohs(tvb, curr_offset);
5923 proto_tree_add_uint_format_value(sub_tree2, hf_val, tvb, curr_offset, param_len - 1,
5924 val, "%u %s (%u)", val * mult, unit_str, val);
5925 curr_offset += (param_len - 1);
5926 break;
5927 case 0x06:
5928 proto_tree_add_item(sub_tree2, hf_nas_5gs_sm_averaging_window, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
5929 curr_offset += param_len;
5930 break;
5931 case 0x07:
5932 proto_tree_add_item(sub_tree2, hf_nas_5gs_sm_eps_bearer_id, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5933 curr_offset += param_len;
5934 break;
5935 default:
5936 proto_tree_add_item(sub_tree2, hf_nas_5gs_sm_param_cont, tvb, curr_offset, param_len, ENC_NA);
5937 curr_offset += param_len;
5938 break;
5940 num_param--;
5941 j++;
5942 proto_item_set_len(sub_item, curr_offset - start_offset2);
5944 i++;
5945 proto_item_set_len(item, curr_offset - start_offset);
5948 return len;
5951 * 9.11.4.13 QoS rules
5954 static true_false_string tfs_nas_5gs_sm_dqr = {
5955 "The QoS rule is the default QoS rule",
5956 "The QoS rule is not the default QoS rule"
5959 static const value_string nas_5gs_rule_operation_code_values[] = {
5960 { 0x0, "Reserved" },
5961 { 0x1, "Create new QoS rule" },
5962 { 0x2, "Delete existing QoS rule" },
5963 { 0x3, "Modify existing QoS rule and add packet filters" },
5964 { 0x4, "Modify existing QoS rule and replace packet filters" },
5965 { 0x5, "Modify existing QoS rule and delete packet filters" },
5966 { 0x6, "Modify existing QoS rule without modifying packet filters" },
5967 { 0x7, "Reserved" },
5968 { 0, NULL }
5971 static const value_string nas_5gs_sm_pf_type_values[] = {
5972 { 0x01, "Match-all type" },
5973 { 0x10, "IPv4 remote address type" },
5974 { 0x11, "IPv4 local address type" },
5975 { 0x21, "IPv6 remote address/prefix length type" },
5976 { 0x23, "IPv6 local address/prefix length type" },
5977 { 0x30, "Protocol identifier/Next header type" },
5978 { 0x40, "Single local port type" },
5979 { 0x41, "Local port range type" },
5980 { 0x50, "Single remote port type" },
5981 { 0x51, "Remote port range type" },
5982 { 0x60, "Security parameter index type" },
5983 { 0x70, "Type of service/Traffic class type" },
5984 { 0x80, "Flow label type" },
5985 { 0x81, "Destination MAC address type" },
5986 { 0x82, "Source MAC address type" },
5987 { 0x83, "802.1Q C-TAG VID type" },
5988 { 0x84, "802.1Q S-TAG VID type" },
5989 { 0x85, "802.1Q C-TAG PCP/DEI type" },
5990 { 0x86, "802.1Q S-TAG PCP/DEI type" },
5991 { 0x87, "Ethertype type" },
5992 { 0x88, "Destination MAC address range" },
5993 { 0x89, "Source MAC address range" },
5994 { 0, NULL }
5997 static const value_string nas_5gs_sm_pkt_flt_dir_values[] = {
5998 { 0x00, "Reserved" },
5999 { 0x01, "Downlink only" },
6000 { 0x02, "Uplink only" },
6001 { 0x03, "Bidirectional" },
6002 { 0, NULL }
6005 uint16_t
6006 de_nas_5gs_sm_qos_rules(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
6007 uint32_t offset, unsigned len,
6008 char *add_string _U_, int string_len _U_)
6011 proto_tree *sub_tree, *sub_tree2, *sub_tree3;
6012 proto_item *item, *item2;
6013 int i = 1, j, k = 1;
6014 uint32_t qos_rule_id, pf_len, pf_type, pfc_len;
6015 uint32_t length, curr_offset, saved_offset, start_offset;
6016 uint8_t num_pkt_flt, rop;
6018 static int * const pkt_flt_flags[] = {
6019 &hf_nas_5gs_sm_rop,
6020 &hf_nas_5gs_sm_dqr,
6021 &hf_nas_5gs_sm_nof_pkt_filters,
6022 NULL
6025 curr_offset = offset;
6027 while ((curr_offset - offset) < len) {
6029 /* QoS Rule */
6030 sub_tree = proto_tree_add_subtree_format(tree, tvb, curr_offset, -1, ett_nas_5gs_sm_qos_rules, &item, "QoS rule %u", i);
6032 /* QoS rule identifier Octet 4*/
6033 proto_tree_add_item_ret_uint(sub_tree, hf_nas_5gs_sm_qos_rule_id, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &qos_rule_id);
6034 curr_offset += 1;
6035 /* Length of QoS rule Octet 5 - 6*/
6036 proto_tree_add_item_ret_uint(sub_tree, hf_nas_5gs_sm_length, tvb, curr_offset, 2, ENC_BIG_ENDIAN, &length);
6037 curr_offset += 2;
6039 saved_offset = curr_offset;
6040 proto_item_set_len(item, length + 3);
6042 /* Rule operation code DQR bit Number of packet filters */
6043 num_pkt_flt = tvb_get_uint8(tvb, curr_offset);
6044 rop = num_pkt_flt >> 5;
6045 num_pkt_flt = num_pkt_flt & 0x0f;
6046 proto_tree_add_bitmask_list(sub_tree, tvb, curr_offset, 1, pkt_flt_flags, ENC_BIG_ENDIAN);
6047 curr_offset++;
6049 /* For the "delete existing QoS rule" operation and for the "modify existing QoS rule without modifying packet filters"
6050 * operation, the number of packet filters shall be coded as 0.
6052 if ((rop == 0) || (rop == 7)) {
6053 /* Reserved */
6054 proto_tree_add_expert(tree, pinfo, &ei_nas_5gs_unknown_value, tvb, curr_offset, length - 1);
6055 i++;
6056 curr_offset += (length - 1);
6057 continue;
6059 if (((rop == 2) || (rop == 6)) && (num_pkt_flt != 0)) {
6060 proto_tree_add_expert(tree, pinfo, &ei_nas_5gs_num_pkt_flt, tvb, curr_offset, length - 1);
6061 i++;
6062 curr_offset += (length - 1);
6063 continue;
6065 if ((rop == 2) && (length > 1)) {
6066 proto_tree_add_expert(tree, pinfo, &ei_nas_5gs_extraneous_data, tvb, curr_offset, length - 1);
6067 i++;
6068 curr_offset += (length - 1);
6069 continue;
6072 /* Packet filter list */
6073 j = 1;
6074 while (num_pkt_flt > 0) {
6075 sub_tree2 = proto_tree_add_subtree_format(sub_tree, tvb, curr_offset, -1, ett_nas_5gs_sm_qos_rules, &item, "Packet filter %u", j);
6076 start_offset = curr_offset;
6077 if (rop == 5) {
6078 /* modify existing QoS rule and delete packet filters */
6079 /* 0 0 0 0 Packet filter identifier x*/
6080 proto_tree_add_item(sub_tree2, hf_nas_5gs_sm_pkt_flt_id, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
6081 curr_offset++;
6082 } else {
6083 /* "create new QoS rule", or "modify existing QoS rule and add packet filters"
6084 * or "modify existing QoS rule and replace packet filters"
6086 /* 0 0 Packet filter direction 1 Packet filter identifier 1*/
6087 proto_tree_add_item(sub_tree2, hf_nas_5gs_sm_pkt_flt_dir, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
6088 proto_tree_add_item(sub_tree2, hf_nas_5gs_sm_pkt_flt_id, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
6089 curr_offset++;
6090 /* Length of packet filter contents */
6091 proto_tree_add_item_ret_uint(sub_tree2, hf_nas_5gs_sm_pf_len, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &pf_len);
6092 curr_offset++;
6094 k = 1;
6095 /* Packet filter contents */
6096 while (pf_len > 0) {
6097 sub_tree3 = proto_tree_add_subtree_format(sub_tree2, tvb, curr_offset, -1, ett_nas_5gs_sm_pkt_filter_components, &item2, "Packet filter component %u", k);
6098 /* Each packet filter component shall be encoded as a sequence of a one octet packet filter component type identifier
6099 * and a fixed length packet filter component value field.
6100 * The packet filter component type identifier shall be transmitted first.
6102 proto_tree_add_item_ret_uint(sub_tree3, hf_nas_5gs_sm_pf_type, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &pf_type);
6103 curr_offset++;
6104 /* Packet filter length contains the length of component type and content */
6105 pf_len--;
6106 switch (pf_type) {
6107 case 1:
6108 /* Match-all type
6109 * . If the "match-all type" packet filter component is present in the packet filter, no other packet filter
6110 * component shall be present in the packet filter and the length of the packet filter contents field shall
6111 * be set to one.
6113 pfc_len = 0;
6114 break;
6115 case 16:
6116 /* For "IPv4 remote address type", the packet filter component value field shall be encoded as a sequence
6117 * of a four octet IPv4 address field and a four octet IPv4 address mask field.
6118 * The IPv4 address field shall be transmitted first.
6120 case 17:
6121 /* For "IPv4 local address type", the packet filter component value field shall be encoded as defined
6122 * for "IPv4 remote address type"
6124 proto_tree_add_item(sub_tree3, hf_nas_5gs_sm_pdu_addr_inf_ipv4, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
6125 curr_offset += 4;
6126 proto_tree_add_item(sub_tree3, hf_nas_5gs_addr_mask_ipv4, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
6127 curr_offset += 4;
6128 pfc_len = 8;
6129 break;
6130 case 33:
6131 case 35:
6132 proto_tree_add_item(sub_tree3, hf_nas_5gs_ipv6, tvb, curr_offset, 16, ENC_NA);
6133 curr_offset += 16;
6134 proto_tree_add_item(sub_tree3, hf_nas_5gs_ipv6_prefix_len, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
6135 curr_offset++;
6136 pfc_len = 17;
6137 break;
6138 case 48:
6139 proto_tree_add_item(sub_tree3, hf_nas_5gs_protocol_identifier_or_next_hd, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
6140 curr_offset++;
6141 pfc_len = 1;
6142 break;
6143 case 64:
6144 case 80:
6145 proto_tree_add_item(sub_tree3, hf_nas_5gs_single_port_type, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
6146 curr_offset += 2;
6147 pfc_len = 2;
6148 break;
6149 case 65:
6150 case 81:
6151 proto_tree_add_item(sub_tree3, hf_nas_5gs_port_range_type_low, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
6152 curr_offset += 2;
6153 proto_tree_add_item(sub_tree3, hf_nas_5gs_port_range_type_high, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
6154 curr_offset += 2;
6155 pfc_len = 4;
6156 break;
6157 case 96:
6158 proto_tree_add_item(sub_tree3, hf_nas_5gs_sec_param_idx, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
6159 curr_offset += 4;
6160 pfc_len = 4;
6161 break;
6162 case 112:
6163 proto_tree_add_item(sub_tree3, hf_nas_5gs_tos_tc_val, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
6164 curr_offset++;
6165 proto_tree_add_item(sub_tree3, hf_nas_5gs_tos_tc_mask, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
6166 curr_offset++;
6167 pfc_len = 2;
6168 break;
6169 case 128:
6170 proto_tree_add_item(sub_tree3, hf_nas_5gs_flow_label, tvb, curr_offset, 3, ENC_BIG_ENDIAN);
6171 curr_offset += 3;
6172 pfc_len = 3;
6173 break;
6174 case 129:
6175 case 130:
6176 proto_tree_add_item(sub_tree3, hf_nas_5gs_mac_addr, tvb, curr_offset, 6, ENC_NA);
6177 curr_offset += 6;
6178 pfc_len = 6;
6179 break;
6180 case 131:
6181 case 132:
6182 proto_tree_add_item(sub_tree3, hf_nas_5gs_vlan_tag_vid, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
6183 curr_offset += 2;
6184 pfc_len = 2;
6185 break;
6186 case 133:
6187 case 134:
6188 proto_tree_add_item(sub_tree3, hf_nas_5gs_vlan_tag_pcp, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
6189 proto_tree_add_item(sub_tree3, hf_nas_5gs_vlan_tag_dei, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
6190 curr_offset++;
6191 pfc_len = 1;
6192 break;
6193 case 135:
6194 proto_tree_add_item(sub_tree3, hf_nas_5gs_ethertype, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
6195 curr_offset += 2;
6196 pfc_len = 2;
6197 break;
6198 case 136:
6199 case 137:
6200 proto_tree_add_item(sub_tree3, hf_nas_5gs_mac_addr_low, tvb, curr_offset, 6, ENC_NA);
6201 curr_offset += 6;
6202 proto_tree_add_item(sub_tree3, hf_nas_5gs_mac_addr_high, tvb, curr_offset, 6, ENC_NA);
6203 curr_offset += 6;
6204 pfc_len = 12;
6205 break;
6206 default:
6207 proto_tree_add_expert(sub_tree3, pinfo, &ei_nas_5gs_not_diss, tvb, curr_offset, pf_len);
6208 curr_offset += pf_len;
6209 pfc_len = pf_len;
6210 break;
6212 pf_len -= pfc_len;
6213 k++;
6214 proto_item_set_len(item2, pfc_len + 1);
6217 num_pkt_flt--;
6218 j++;
6219 proto_item_set_len(item, curr_offset - start_offset);
6222 if (rop != 2 && (curr_offset - saved_offset) < length) { /* Delete existing QoS rule */
6223 /* QoS rule precedence (octet z+1)
6224 * For the "delete existing QoS rule" operation, the QoS rule precedence value field shall not be included.
6225 * For the "create new QoS rule" operation, the QoS rule precedence value field shall be included.
6227 proto_tree_add_item(sub_tree, hf_nas_5gs_sm_qos_rule_precedence, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
6228 curr_offset++;
6229 if ((curr_offset - saved_offset) < length) {
6230 /* QoS flow identifier (QFI) (bits 6 to 1 of octet z+2)
6231 * For the "delete existing QoS rule" operation, the QoS flow identifier value field shall not be included.
6232 * For the "create new QoS rule" operation, the QoS flow identifier value field shall be included.
6234 proto_tree_add_item(sub_tree, hf_nas_5gs_spare_b7, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
6235 /* Segregation bit (bit 7 of octet z+2) */
6236 if (pinfo->link_dir == P2P_DIR_UL)
6237 proto_tree_add_item(sub_tree, hf_nas_5gs_sm_segregation, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
6238 else
6239 proto_tree_add_item(sub_tree, hf_nas_5gs_spare_b6, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
6240 proto_tree_add_item(sub_tree, hf_nas_5gs_sm_qfi, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
6241 curr_offset++;
6245 i++;
6248 return len;
6252 * 9.11.4.14 Session-AMBR
6255 static const value_string nas_5gs_sm_unit_for_session_ambr_values[] = {
6256 { 0x00, "value is not used" },
6257 { 0x01, "value is incremented in multiples of 1 Kbps" },
6258 { 0x02, "value is incremented in multiples of 4 Kbps" },
6259 { 0x03, "value is incremented in multiples of 16 Kbps" },
6260 { 0x04, "value is incremented in multiples of 64 Kbps" },
6261 { 0x05, "value is incremented in multiples of 256 kbps" },
6262 { 0x06, "value is incremented in multiples of 1 Mbps" },
6263 { 0x07, "value is incremented in multiples of 4 Mbps" },
6264 { 0x08, "value is incremented in multiples of 16 Mbps" },
6265 { 0x09, "value is incremented in multiples of 64 Mbps" },
6266 { 0x0a, "value is incremented in multiples of 256 Mbps" },
6267 { 0x0b, "value is incremented in multiples of 1 Gbps" },
6268 { 0x0c, "value is incremented in multiples of 4 Gbps" },
6269 { 0x0d, "value is incremented in multiples of 16 Gbps" },
6270 { 0x0e, "value is incremented in multiples of 64 Gbps" },
6271 { 0x0f, "value is incremented in multiples of 256 Gbps" },
6272 { 0x10, "value is incremented in multiples of 1 Tbps" },
6273 { 0x11, "value is incremented in multiples of 4 Tbps" },
6274 { 0x12, "value is incremented in multiples of 16 Tbps" },
6275 { 0x13, "value is incremented in multiples of 64 Tbps" },
6276 { 0x14, "value is incremented in multiples of 256 Tbps" },
6277 { 0x15, "value is incremented in multiples of 1 Pbps" },
6278 { 0x16, "value is incremented in multiples of 4 Pbps" },
6279 { 0x17, "value is incremented in multiples of 16 Pbps" },
6280 { 0x18, "value is incremented in multiples of 64 Pbps" },
6281 { 0x19, "value is incremented in multiples of 256 Pbps" },
6282 { 0, NULL }
6286 uint16_t
6287 de_nas_5gs_sm_session_ambr(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
6288 uint32_t offset, unsigned len,
6289 char *add_string _U_, int string_len _U_)
6291 uint32_t unit, mult, ambr_val;
6292 const char *unit_str;
6294 /* Unit for Session-AMBR for downlink */
6295 proto_tree_add_item_ret_uint(tree, hf_nas_5gs_sm_unit_for_session_ambr_dl, tvb, offset, 1, ENC_BIG_ENDIAN, &unit);
6296 offset++;
6298 /* Session-AMBR for downlink (octets 4 and 5) */
6299 mult = get_ext_ambr_unit(unit, &unit_str);
6300 ambr_val = tvb_get_ntohs(tvb, offset);
6301 proto_tree_add_uint_format_value(tree, hf_nas_5gs_sm_session_ambr_dl, tvb, offset, 2,
6302 ambr_val, "%u %s (%u)", ambr_val * mult, unit_str, ambr_val);
6303 offset += 2;
6305 proto_tree_add_item_ret_uint(tree, hf_nas_5gs_sm_unit_for_session_ambr_ul, tvb, offset, 1, ENC_NA, &unit);
6306 offset++;
6307 mult = get_ext_ambr_unit(unit, &unit_str);
6308 ambr_val = tvb_get_ntohs(tvb, offset);
6309 proto_tree_add_uint_format_value(tree, hf_nas_5gs_sm_session_ambr_ul, tvb, offset, 2,
6310 ambr_val, "%u %s (%u)", ambr_val * mult, unit_str, ambr_val);
6312 return len;
6316 * 9.11.4.15 SM PDU DN request container
6318 /* The SM PDU DN request container contains a DN-specific identity of the UE in the network access identifier (NAI) format */
6319 static uint16_t
6320 de_nas_5gs_sm_pdu_dn_req_cont(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
6321 uint32_t offset, unsigned len,
6322 char *add_string _U_, int string_len _U_)
6324 proto_tree_add_item(tree, hf_nas_5gs_sm_dm_spec_id, tvb, offset, len, ENC_UTF_8|ENC_NA);
6326 return len;
6330 * 9.11.4.16 SSC mode
6333 static const value_string nas_5gs_sc_mode_values[] = {
6334 { 0x1, "SSC mode 1" },
6335 { 0x2, "SSC mode 2" },
6336 { 0x3, "SSC mode 3" },
6337 { 0, NULL }
6341 static uint16_t
6342 de_nas_5gs_sm_ssc_mode(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
6343 uint32_t offset, unsigned len _U_,
6344 char *add_string _U_, int string_len _U_)
6347 proto_tree_add_item(tree, hf_nas_5gs_sm_sc_mode, tvb, offset, 1, ENC_BIG_ENDIAN);
6349 return 1;
6353 * 9.11.4.17 Re-attempt indicator
6355 static true_false_string tfs_nas_5gs_sm_eplmnc = {
6356 "UE is not allowed to re-attempt the procedure in an equivalent PLMN",
6357 "UE is allowed to re-attempt the procedure in an equivalent PLMN"
6360 static true_false_string tfs_nas_5gs_sm_ratc = {
6361 "UE is not allowed to re-attempt the procedure in S1 mode",
6362 "UE is allowed to re-attempt the procedure in S1 mode"
6365 static uint16_t
6366 de_nas_5gs_sm_re_attempt_ind(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_,
6367 uint32_t offset, unsigned len,
6368 char* add_string _U_, int string_len _U_)
6370 static int* const flags[] = {
6371 &hf_nas_5gs_spare_b7,
6372 &hf_nas_5gs_spare_b6,
6373 &hf_nas_5gs_spare_b5,
6374 &hf_nas_5gs_spare_b4,
6375 &hf_nas_5gs_spare_b3,
6376 &hf_nas_5gs_spare_b2,
6377 &hf_nas_5gs_sm_eplmnc,
6378 &hf_nas_5gs_sm_ratc,
6379 NULL
6382 proto_tree_add_bitmask_list(tree, tvb, offset, 1, flags, ENC_BIG_ENDIAN);
6384 return len;
6387 * 9.11.4.18 5GSM network feature support
6389 static uint16_t
6390 de_nas_5gs_sm_5gsm_nw_feature_sup(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_,
6391 uint32_t offset, unsigned len,
6392 char* add_string _U_, int string_len _U_)
6394 uint32_t curr_offset = offset;
6396 static int* const flags[] = {
6397 &hf_nas_5gs_spare_b7,
6398 &hf_nas_5gs_spare_b6,
6399 &hf_nas_5gs_spare_b5,
6400 &hf_nas_5gs_spare_b4,
6401 &hf_nas_5gs_spare_b3,
6402 &hf_nas_5gs_spare_b2,
6403 &hf_nas_5gs_sm_naps,
6404 &hf_nas_5gs_sm_ept_s1,
6405 NULL
6408 proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, flags, ENC_BIG_ENDIAN);
6409 curr_offset++;
6411 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_nas_5gs_extraneous_data);
6413 return (curr_offset - offset);
6416 * 9.11.4.19 Void
6420 * 9.11.4.20 Serving PLMN rate control
6421 * See subclause 9.9.4.28 in 3GPP TS 24.301
6425 * 9.11.4.21 5GSM congestion re-attempt indicator
6427 static true_false_string tfs_5gs_sm_catbo = {
6428 "The back-off timer is applied in the current access type",
6429 "The back-off timer is applied in both 3GPP access type and non-3GPP access type"
6432 static true_false_string tfs_5gs_sm_abo = {
6433 "The back-off timer is applied in all PLMNs or all equivalent SNPNs",
6434 "The back-off timer is applied in the registered PLMN or registered SNPN"
6437 static uint16_t
6438 de_nas_5gs_sm_5gsm_cong_re_attempt_ind(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_,
6439 uint32_t offset, unsigned len,
6440 char* add_string _U_, int string_len _U_)
6442 static int* const flags[] = {
6443 &hf_nas_5gs_spare_b7,
6444 &hf_nas_5gs_spare_b6,
6445 &hf_nas_5gs_spare_b5,
6446 &hf_nas_5gs_spare_b4,
6447 &hf_nas_5gs_spare_b3,
6448 &hf_nas_5gs_spare_b2,
6449 &hf_nas_5gs_sm_catbo,
6450 &hf_nas_5gs_sm_abo,
6451 NULL
6454 proto_tree_add_bitmask_list(tree, tvb, offset, 1, flags, ENC_BIG_ENDIAN);
6456 return len;
6460 * 9.11.4.22 ATSSS container
6462 static uint16_t
6463 de_nas_5gs_sm_atsss_cont(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_,
6464 uint32_t offset, unsigned len,
6465 char* add_string _U_, int string_len _U_)
6467 proto_tree_add_item(tree, hf_nas_5gs_sm_atsss_cont, tvb, offset, len, ENC_NA);
6469 return len;
6473 * 9.11.4.23 Control plane only indication
6475 static true_false_string tfs_5gs_sm_cpoi = {
6476 "PDU session can be used for control plane CIoT 5GS optimization only",
6477 "reserved"
6480 static uint16_t
6481 de_nas_5gs_sm_ctl_plane_only_ind(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_,
6482 uint32_t offset, unsigned len _U_,
6483 char* add_string _U_, int string_len _U_)
6485 static int* const flags[] = {
6486 &hf_nas_5gs_spare_b3,
6487 &hf_nas_5gs_spare_b2,
6488 &hf_nas_5gs_spare_b1,
6489 &hf_nas_5gs_sm_cpoi,
6490 NULL
6493 proto_tree_add_bitmask_list(tree, tvb, offset, 1, flags, ENC_BIG_ENDIAN);
6495 return 1;
6498 * 9.11.4.24 IP header compression configuration
6500 static const value_string nas_5gs_sm_ip_hdr_comp_config_add_ip_hdr_compr_cxt_setup_params_type_vals[] = {
6501 { 0x00, "0x0000 (No Compression)" },
6502 { 0x01, "0x0002 (UDP/IP)" },
6503 { 0x02, "0x0003 (ESP/IP)" },
6504 { 0x03, "0x0004 (IP)" },
6505 { 0x04, "0x0006 (TCP/IP)" },
6506 { 0x05, "0x0102 (UDP/IP)" },
6507 { 0x06, "0x0103 (ESP/IP)" },
6508 { 0x07, "0x0104 (IP)" },
6509 { 0x08, "Other" },
6510 { 0x0, NULL }
6513 static uint16_t
6514 de_nas_5gs_sm_ip_hdr_comp_conf(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_,
6515 uint32_t offset, unsigned len,
6516 char* add_string _U_, int string_len _U_)
6518 uint32_t curr_offset = offset;
6520 static int * const flags[] = {
6521 &hf_nas_5gs_spare_b7,
6522 &hf_nas_5gs_sm_ip_hdr_comp_config_p0104,
6523 &hf_nas_5gs_sm_ip_hdr_comp_config_p0103,
6524 &hf_nas_5gs_sm_ip_hdr_comp_config_p0102,
6525 &hf_nas_5gs_sm_ip_hdr_comp_config_p0006,
6526 &hf_nas_5gs_sm_ip_hdr_comp_config_p0004,
6527 &hf_nas_5gs_sm_ip_hdr_comp_config_p0003,
6528 &hf_nas_5gs_sm_ip_hdr_comp_config_p0002,
6529 NULL
6532 proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, flags, ENC_NA);
6533 curr_offset++;
6534 proto_tree_add_item(tree, hf_nas_5gs_sm_ip_hdr_comp_config_max_cid, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
6535 curr_offset += 2;
6537 if ((curr_offset - offset) >= len) {
6538 return len;
6541 proto_tree_add_item(tree, hf_nas_5gs_sm_ip_hdr_comp_config_add_ip_hdr_compr_cxt_setup_params_type, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
6542 curr_offset++;
6543 proto_tree_add_item(tree, hf_nas_5gs_sm_ip_hdr_comp_config_add_ip_hdr_compr_cxt_setup_params_cont, tvb, curr_offset, len - (curr_offset - offset), ENC_NA);
6545 return len;
6548 * 9.11.4.25 DS-TT Ethernet port MAC address
6550 static uint16_t
6551 de_nas_5gs_sm_ds_tt_eth_port_mac_addr(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_,
6552 uint32_t offset, unsigned len,
6553 char* add_string _U_, int string_len _U_)
6555 proto_tree_add_item(tree, hf_nas_5gs_sm_ds_tt_eth_port_mac_addr, tvb, offset, 6, ENC_NA);
6557 return len;
6561 * 9.11.4.26 UE-DS-TT residence time
6563 static uint16_t
6564 de_nas_5gs_sm_ue_ds_tt_residence_t(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_,
6565 uint32_t offset, unsigned len,
6566 char* add_string _U_, int string_len _U_)
6568 proto_tree_add_item(tree, hf_nas_5gs_sm_ue_ds_tt_residence_time, tvb, offset, 8, ENC_NA);
6570 return len;
6574 * 9.11.4.27 Port management information container
6576 static uint16_t
6577 de_nas_5gs_sm_port_mgnt_inf_cont(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_,
6578 uint32_t offset, unsigned len,
6579 char* add_string _U_, int string_len _U_)
6581 proto_tree_add_item(tree, hf_nas_5gs_sm_port_mgmt_info_cont, tvb, offset, len, ENC_NA);
6583 return len;
6587 * 9.11.4.28 Ethernet header compression configuration
6589 static const value_string nas_5gs_sm_eth_hdr_comp_config_cid_len_vals[] = {
6590 { 0x0, "Ethernet header compression not used" },
6591 { 0x1, "7 bits" },
6592 { 0x2, "15 bits" },
6593 { 0x0, NULL }
6596 static uint16_t
6597 de_nas_5gs_sm_eth_hdr_comp_conf(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_,
6598 uint32_t offset, unsigned len,
6599 char* add_string _U_, int string_len _U_)
6601 static int * const flags[] = {
6602 &hf_nas_5gs_spare_b7,
6603 &hf_nas_5gs_spare_b6,
6604 &hf_nas_5gs_spare_b5,
6605 &hf_nas_5gs_spare_b4,
6606 &hf_nas_5gs_spare_b3,
6607 &hf_nas_5gs_spare_b2,
6608 &hf_nas_5gs_sm_eth_hdr_comp_config_cid_len,
6609 NULL
6612 proto_tree_add_bitmask_list(tree, tvb, offset, 1, flags, ENC_NA);
6614 return len;
6618 * 9.11.4.29 Remote UE context list
6620 static uint16_t
6621 de_nas_5gs_sm_remote_ue_ctx_list(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo,
6622 uint32_t offset, unsigned len,
6623 char* add_string _U_, int string_len _U_)
6625 proto_tree_add_expert(tree, pinfo, &ei_nas_5gs_ie_not_dis, tvb, offset, len);
6627 return len;
6631 * 9.11.4.30 Requested MBS container
6633 static uint16_t
6634 de_nas_5gs_sm_req_mbs_cont(tvbuff_t* tvb _U_, proto_tree* tree _U_, packet_info* pinfo _U_,
6635 uint32_t offset _U_, unsigned len,
6636 char* add_string _U_, int string_len _U_)
6638 proto_tree_add_expert(tree, pinfo, &ei_nas_5gs_ie_not_dis, tvb, offset, len);
6640 return len;
6644 * 9.11.4.31 Received MBS container
6646 static uint16_t
6647 de_nas_5gs_sm_rec_mbs_cont(tvbuff_t* tvb _U_, proto_tree* tree _U_, packet_info* pinfo _U_,
6648 uint32_t offset _U_, unsigned len,
6649 char* add_string _U_, int string_len _U_)
6651 proto_tree_add_expert(tree, pinfo, &ei_nas_5gs_ie_not_dis, tvb, offset, len);
6653 return len;
6657 * 9.11.4.32 PDU session pair ID
6659 static uint16_t
6660 de_nas_5gs_sm_pdu_session_pair_id(tvbuff_t* tvb _U_, proto_tree* tree _U_, packet_info* pinfo _U_,
6661 uint32_t offset _U_, unsigned len,
6662 char* add_string _U_, int string_len _U_)
6664 proto_tree_add_item(tree, hf_nas_5gs_sm_pdu_session_pair_id, tvb, offset, 1, ENC_BIG_ENDIAN);
6666 return len;
6670 * 9.11.4.33 RSN
6672 static const value_string nas_5gs_sm_pdu_session_rsn_vals[] = {
6673 { 0x0, "v1"},
6674 { 0x1, "v2"},
6675 { 0, NULL }
6678 static uint16_t
6679 de_nas_5gs_sm_rsn(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_,
6680 uint32_t offset, unsigned len,
6681 char* add_string _U_, int string_len _U_)
6683 proto_tree_add_item(tree, hf_nas_5gs_sm_pdu_session_rsn, tvb, offset, 1, ENC_BIG_ENDIAN);
6685 return len;
6689 * 9.11.4.36 N3QAI
6691 static uint16_t
6692 de_nas_5gs_sm_n3qai(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo,
6693 uint32_t offset, unsigned len,
6694 char* add_string _U_, int string_len _U_)
6696 proto_tree_add_expert(tree, pinfo, &ei_nas_5gs_ie_not_dis, tvb, offset, len);
6698 return len;
6702 * 9.11.4.37 Non-3GPP delay budget
6704 static uint16_t
6705 de_nas_5gs_sm_n3gpp_delay_budget(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo,
6706 uint32_t offset, unsigned len,
6707 char* add_string _U_, int string_len _U_)
6709 proto_tree_add_expert(tree, pinfo, &ei_nas_5gs_ie_not_dis, tvb, offset, len);
6711 return len;
6715 * 9.11.4.38 URSP rule enforcement reports
6717 static uint16_t
6718 de_nas_5gs_sm_ursp_rule_enforce_reports(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo,
6719 uint32_t offset, unsigned len,
6720 char* add_string _U_, int string_len _U_)
6722 proto_tree_add_expert(tree, pinfo, &ei_nas_5gs_ie_not_dis, tvb, offset, len);
6724 return len;
6728 * 9.11.4.39 Protocol description
6730 static uint16_t
6731 de_nas_5gs_sm_prot_desc(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo,
6732 uint32_t offset, unsigned len,
6733 char* add_string _U_, int string_len _U_)
6735 proto_tree_add_expert(tree, pinfo, &ei_nas_5gs_ie_not_dis, tvb, offset, len);
6737 return len;
6741 * 9.10.2 Common information elements
6744 /* 9.10.2.1 Additional information*/
6746 static uint16_t
6747 de_nas_5gs_cmn_add_inf(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
6748 uint32_t offset, unsigned len,
6749 char *add_string _U_, int string_len _U_)
6751 proto_tree_add_item(tree, hf_nas_5gs_cmn_add_info, tvb, offset, len, ENC_NA);
6753 return len;
6757 * 9.11.2.1A Access type
6759 static const value_string nas_5gs_cmn_acc_type_vals[] = {
6760 { 0x1, "3GPP access"},
6761 { 0x2, "Non-3GPP access"},
6762 { 0, NULL }
6765 static int* const nas_5gs_cmn_access_type_flags[] = {
6766 &hf_nas_5gs_spare_b3,
6767 &hf_nas_5gs_spare_b2,
6768 &hf_nas_5gs_cmn_acc_type,
6769 NULL
6772 static uint16_t
6773 de_nas_5gs_cmn_access_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
6774 uint32_t offset, unsigned len _U_,
6775 char *add_string _U_, int string_len _U_)
6778 proto_tree_add_bitmask_list(tree, tvb, offset, 1, nas_5gs_cmn_access_type_flags, ENC_BIG_ENDIAN);
6780 return 1;
6785 * 9.11.2.1B DNN
6788 uint16_t
6789 de_nas_5gs_cmn_dnn(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
6790 uint32_t offset, unsigned len,
6791 char *add_string _U_, int string_len _U_)
6794 uint32_t curr_offset;
6795 proto_item *pi;
6797 curr_offset = offset;
6798 /* A DNN value field contains an APN as defined in 3GPP TS 23.003 */
6800 pi = proto_tree_add_item(tree, hf_nas_5gs_cmn_dnn, tvb, curr_offset, len, ENC_APN_STR | ENC_NA);
6802 if (len > 100) {
6803 expert_add_info(pinfo, pi, &ei_nas_5gs_dnn_too_long);
6805 curr_offset += len;
6807 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_nas_5gs_extraneous_data);
6809 return (curr_offset - offset);
6813 /* 9.11.2.2 EAP message*/
6815 static uint16_t
6816 de_nas_5gs_cmn_eap_msg(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
6817 uint32_t offset, unsigned len,
6818 char *add_string _U_, int string_len _U_)
6820 /* EAP message as specified in IETF RFC 3748 */
6821 if (eap_handle) {
6822 col_append_str(pinfo->cinfo, COL_PROTOCOL, "/");
6823 col_set_fence(pinfo->cinfo, COL_PROTOCOL);
6824 col_append_str(pinfo->cinfo, COL_INFO, ", ");
6825 col_set_fence(pinfo->cinfo, COL_INFO);
6826 call_dissector(eap_handle, tvb_new_subset_length(tvb, offset, len), pinfo, tree);
6829 return len;
6832 /* 9.11.2.3 GPRS timer */
6833 /* See subclause 10.5.7.3 in 3GPP TS 24.008 */
6835 /* 9.11.2.4 GPRS timer 2*/
6836 /* See subclause 10.5.7.4 in 3GPP TS 24.008 */
6838 /* 9.11.2.5 GPRS timer 3*/
6839 /* See subclause 10.5.7.4a in 3GPP TS 24.008 */
6841 /* 9.11.2.8 S-NSSAI */
6842 uint16_t
6843 de_nas_5gs_cmn_s_nssai(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
6844 uint32_t offset, unsigned len,
6845 char *add_string _U_, int string_len _U_)
6847 /* SST
6848 * This field contains the 8 bit SST value. The coding of the SST value part is defined in 3GPP TS 23.003
6850 proto_tree_add_item(tree, hf_nas_5gs_mm_sst, tvb, offset, 1, ENC_BIG_ENDIAN);
6851 if (len == 1) {
6852 return len;
6854 offset += 1;
6855 if (len > 2) {
6856 /* SD */
6857 proto_tree_add_item(tree, hf_nas_5gs_mm_sd, tvb, offset, 3, ENC_BIG_ENDIAN);
6858 if (len == 4) {
6859 return len;
6861 offset += 3;
6863 /* Mapped HPLMN SST */
6864 proto_tree_add_item(tree, hf_nas_5gs_mm_mapped_hplmn_sst, tvb, offset, 1, ENC_BIG_ENDIAN);
6865 if ((len == 2) || (len == 5)) {
6866 return len;
6868 offset += 1;
6869 /* Mapped HPLMN SD */
6870 proto_tree_add_item(tree, hf_nas_5gs_mm_mapped_hplmn_ssd, tvb, offset, 3, ENC_BIG_ENDIAN);
6872 return len;
6876 * 9.11.2.9 S1 mode to N1 mode NAS transparent container
6878 /* Message authentication code */
6879 /* Type of ciphering algorithmType of integrity protection algorithm */
6880 /* 0 Spare NCC TSC Key set identifier in 5G */
6881 /* Spare */
6882 /* Spare */
6884 /* 9.11.2.10 Service-level-AA container */
6885 #define NAS_5GS_TV_IE_MASK 0x80
6886 #define NAS_5GS_TV_IE_VAL 0x80
6887 #define NAS_5GS_TLV_E_IE_MASK 0xf0
6888 #define NAS_5GS_TLV_E_IE_VAL 0x70
6890 static const value_string nas_5gs_cmn_service_level_aa_param_type_vals[] = {
6891 { 0x10, "Service-level device ID"},
6892 { 0x20, "Service-level-AA server address"},
6893 { 0x30, "Service-level-AA response"},
6894 { 0x40, "Service-level-AA payload type"},
6895 { 0x70, "Service-level-AA payload"},
6896 { 0xa0, "Service-level-AA pending indication"},
6897 { 0, NULL }
6900 static const value_string nas_5gs_cmn_service_level_aa_param_serv_addr_type_vals[] = {
6901 { 1, "IPv4"},
6902 { 2, "IPv6"},
6903 { 3, "IPv4v6"},
6904 { 4, "FQDN"},
6905 { 0, NULL }
6908 static const value_string nas_5gs_cmn_service_level_aa_param_resp_c2ar_vals[] = {
6909 { 0, "No information"},
6910 { 1, "C2 authorization was successful"},
6911 { 2, "C2 authorization was not successful or C2 authorization is revoked"},
6912 { 3, "Reserved"},
6913 { 0, NULL }
6916 static const value_string nas_5gs_cmn_service_level_aa_param_resp_slar_vals[] = {
6917 { 0, "No information"},
6918 { 1, "Service level authentication and authorization was successful"},
6919 { 2, "Service level authentication and authorization was not successful or service level authorization is revoked"},
6920 { 3, "Reserved"},
6921 { 0, NULL }
6924 static const value_string nas_5gs_cmn_service_level_aa_param_payload_type_vals[] = {
6925 { 1, "UUAA payload"},
6926 { 2, "C2 authorization payload"},
6927 { 0, NULL }
6930 static true_false_string nas_5gs_cmn_service_level_aa_param_pending_ind_slapi_value = {
6931 "Service-level-AA procedure is to be performed",
6932 "Reserved"
6935 static true_false_string nas_5gs_enabled_not_enabled_value = {
6936 "Enabled",
6937 "Not enabled"
6940 uint16_t
6941 de_nas_5gs_cmn_service_level_aa_cont(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
6942 uint32_t offset, unsigned len,
6943 char *add_string _U_, int string_len _U_)
6945 uint32_t curr_offset, i;
6947 curr_offset = offset;
6948 i = 0;
6949 while ((curr_offset - offset) < len) {
6950 proto_item *item;
6951 proto_tree *subtree;
6952 uint32_t type, param_len, param_offset = curr_offset;
6954 subtree = proto_tree_add_subtree_format(tree, tvb, curr_offset, -1, ett_nas_5gs_cmn_service_level_aa_cont_param, &item, "Service-level-AA parameter %d", i + 1);
6955 type = tvb_get_uint8(tvb, curr_offset);
6956 if ((type & NAS_5GS_TV_IE_MASK) == NAS_5GS_TV_IE_VAL) {
6957 param_len = 0;
6958 type &= 0xf0;
6960 proto_tree_add_uint(subtree, hf_nas_5gs_cmn_service_level_aa_param_type, tvb, curr_offset, 1, type);
6961 curr_offset++;
6962 if ((type & NAS_5GS_TLV_E_IE_MASK) == NAS_5GS_TLV_E_IE_VAL) {
6963 proto_tree_add_item_ret_uint(subtree, hf_nas_5gs_cmn_service_level_aa_param_len, tvb, curr_offset, 2, ENC_BIG_ENDIAN, &param_len);
6964 curr_offset += 2;
6965 } else {
6966 proto_tree_add_item_ret_uint(subtree, hf_nas_5gs_cmn_service_level_aa_param_len, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &param_len);
6967 curr_offset++;
6969 proto_item_set_len(item, curr_offset + param_len - param_offset);
6970 switch (type) {
6971 case 0x10:
6972 proto_tree_add_item(subtree, hf_nas_5gs_cmn_service_level_aa_param_device_id, tvb, curr_offset, param_len, ENC_UTF_8|ENC_NA);
6973 break;
6974 case 0x20:
6976 uint32_t addr_type;
6978 proto_tree_add_item_ret_uint(subtree, hf_nas_5gs_cmn_service_level_aa_param_addr_type, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &addr_type);
6979 switch (addr_type) {
6980 case 1:
6981 proto_tree_add_item(subtree, hf_nas_5gs_cmn_service_level_aa_param_addr_ipv4, tvb, curr_offset+1, 4, ENC_BIG_ENDIAN);
6982 break;
6983 case 2:
6984 proto_tree_add_item(subtree, hf_nas_5gs_cmn_service_level_aa_param_addr_ipv6, tvb, curr_offset+1, 16, ENC_NA);
6985 break;
6986 case 3:
6987 proto_tree_add_item(subtree, hf_nas_5gs_cmn_service_level_aa_param_addr_ipv4, tvb, curr_offset+1, 4, ENC_BIG_ENDIAN);
6988 proto_tree_add_item(subtree, hf_nas_5gs_cmn_service_level_aa_param_addr_ipv6, tvb, curr_offset+5, 16, ENC_NA);
6989 break;
6990 case 4:
6991 proto_tree_add_item(subtree, hf_nas_5gs_cmn_service_level_aa_param_addr_fqdn, tvb, curr_offset+1, param_len-1, ENC_APN_STR|ENC_NA);
6992 break;
6993 default:
6994 break;
6997 break;
6998 case 0x30:
7000 static int * const flags[] = {
7001 &hf_nas_5gs_spare_b7,
7002 &hf_nas_5gs_spare_b6,
7003 &hf_nas_5gs_spare_b5,
7004 &hf_nas_5gs_spare_b4,
7005 &hf_nas_5gs_cmn_service_level_aa_param_resp_c2ar,
7006 &hf_nas_5gs_cmn_service_level_aa_param_resp_slar,
7007 NULL
7009 proto_tree_add_bitmask_list(subtree, tvb, curr_offset, 1, flags, ENC_BIG_ENDIAN);
7011 break;
7012 case 0x40:
7013 proto_tree_add_item(subtree, hf_nas_5gs_cmn_service_level_aa_param_payload_type, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
7014 break;
7015 case 0x70:
7016 proto_tree_add_item(subtree, hf_nas_5gs_cmn_service_level_aa_param_payload, tvb, curr_offset, param_len, ENC_NA);
7017 break;
7018 case 0xa0:
7020 static int * const flags[] = {
7021 &hf_nas_5gs_spare_b3,
7022 &hf_nas_5gs_spare_b2,
7023 &hf_nas_5gs_spare_b1,
7024 &hf_nas_5gs_cmn_service_level_aa_param_pending_ind_slapi,
7025 NULL
7027 /* curr_offset was already incremented, need to use previous byte */
7028 proto_tree_add_bitmask_list(subtree, tvb, curr_offset-1, 1, flags, ENC_BIG_ENDIAN);
7030 break;
7031 case 0x50:
7033 static int * const flags[] = {
7034 &hf_nas_5gs_spare_b3,
7035 &hf_nas_5gs_spare_b2,
7036 &hf_nas_5gs_spare_b1,
7037 &hf_nas_5gs_cmn_service_level_aa_param_service_status_ind_uas,
7038 NULL
7040 /* curr_offset was already incremented, need to use previous byte */
7041 proto_tree_add_bitmask_list(subtree, tvb, curr_offset-1, 1, flags, ENC_BIG_ENDIAN);
7043 break;
7044 default:
7045 proto_tree_add_item(subtree, hf_nas_5gs_cmn_service_level_aa_param_unknown, tvb, curr_offset, param_len, ENC_NA);
7046 break;
7048 curr_offset += param_len;
7049 i++;
7051 return len;
7055 * Note this enum must be of the same size as the element decoding list
7057 typedef enum
7059 DE_NAS_5GS_CMN_ADD_INF, /* 9.11.2.1 Additional information*/
7060 DE_NAS_5GS_ACCESS_TYPE, /* 9.11.2.1A Access type */
7061 DE_NAS_5GS_CMN_DNN, /* 9.11.2.1B DNN*/
7062 DE_NAS_5GS_CMN_EAP_MESSAGE, /* 9.11.2.2 EAP message*/
7063 DE_NAS_5GS_CMN_GPRS_TIMER, /* 9.11.2.3 GPRS timer */
7064 DE_NAS_5GS_CMN_GPRS_TIMER2, /* 9.11.2.4 GPRS timer 2*/
7065 DE_NAS_5GS_CMN_GPRS_TIMER3, /* 9.11.2.5 GPRS timer 3*/
7066 DE_NAS_5GS_CMN_INTRA_N1_MODE_NAS_TRANS_CONT, /* 9.11.2.6 Intra N1 mode NAS transparent container*/
7067 DE_NAS_5GS_CMN_N1_TO_S1_MODE_TRANS_CONT, /* 9.11.2.7 N1 mode to S1 mode NAS transparent container */
7068 DE_NAS_5GS_CMN_S_NSSAI, /* 9.11.2.8 S-NSSAI */
7069 DE_NAS_5GS_CMN_S1_TO_N1_MODE_TRANS_CONT, /* 9.11.2.9 S1 mode to N1 mode NAS transparent container */
7070 DE_NAS_5GS_CMN_SERVICE_LEVEL_AA_CONT, /* 9.11.2.10 Service-level-AA container */
7071 DE_NAS_5GS_COMMON_NONE /* NONE */
7073 nas_5gs_common_elem_idx_t;
7075 static const value_string nas_5gs_common_elem_strings[] = {
7076 { DE_NAS_5GS_CMN_ADD_INF, "Additional information" }, /* 9.11.2.1 Additional information*/
7077 { DE_NAS_5GS_ACCESS_TYPE, "Access type"}, /* 9.11.2.1A Access type */
7078 { DE_NAS_5GS_CMN_DNN, "DNN" }, /* 9.11.2.1B DNN*/
7079 { DE_NAS_5GS_CMN_EAP_MESSAGE, "EAP message" }, /* 9.11.2.2 EAP message*/
7080 { DE_NAS_5GS_CMN_GPRS_TIMER, "GPRS timer" }, /* 9.11.2.3 GPRS timer*/
7081 { DE_NAS_5GS_CMN_GPRS_TIMER2, "GPRS timer 2" }, /* 9.11.2.4 GPRS timer 2*/
7082 { DE_NAS_5GS_CMN_GPRS_TIMER3, "GPRS timer 3" }, /* 9.11.2.5 GPRS timer 3*/
7083 { DE_NAS_5GS_CMN_INTRA_N1_MODE_NAS_TRANS_CONT, "Intra N1 mode NAS transparent container" }, /* 9.11.2.6 Intra N1 mode NAS transparent container*/
7084 { DE_NAS_5GS_CMN_N1_TO_S1_MODE_TRANS_CONT, "N1 mode to S1 mode NAS transparent container" }, /* 9.11.2.7 N1 mode to S1 mode NAS transparent container */
7085 { DE_NAS_5GS_CMN_S_NSSAI, "S-NSSAI" }, /* 9.11.2.8 S-NSSAI */
7086 { DE_NAS_5GS_CMN_S1_TO_N1_MODE_TRANS_CONT, "S1 mode to N1 mode NAS transparent container" }, /* 9.11.2.9 S1 mode to N1 mode NAS transparent container */
7087 { DE_NAS_5GS_CMN_SERVICE_LEVEL_AA_CONT, "Service-level-AA container" }, /* 9.11.2.10 Service-level-AA container */
7088 { 0, NULL }
7090 value_string_ext nas_5gs_common_elem_strings_ext = VALUE_STRING_EXT_INIT(nas_5gs_common_elem_strings);
7092 #define NUM_NAS_5GS_COMMON_ELEM array_length(nas_5gs_common_elem_strings)
7093 int ett_nas_5gs_common_elem[NUM_NAS_5GS_COMMON_ELEM];
7096 uint16_t(*nas_5gs_common_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
7097 uint32_t offset, unsigned len,
7098 char *add_string, int string_len) = {
7099 /* 9.10.2 Common information elements */
7100 de_nas_5gs_cmn_add_inf, /* 9.11.2.1 Additional information*/
7101 de_nas_5gs_cmn_access_type, /* 9.11.2.1A Access type */
7102 de_nas_5gs_cmn_dnn, /* 9.11.2.1B DNN*/
7103 de_nas_5gs_cmn_eap_msg, /* 9.11.2.2 EAP message*/
7104 NULL, /* 9.11.2.3 GPRS timer*/
7105 NULL, /* 9.11.2.4 GPRS timer 2*/
7106 NULL, /* 9.11.2.5 GPRS timer 3*/
7107 NULL, /* 9.11.2.6 Intra N1 mode NAS transparent container*/
7108 NULL, /* 9.11.2.7 N1 mode to S1 mode NAS transparent container */
7109 de_nas_5gs_cmn_s_nssai, /* 9.11.2.8 S-NSSAI */
7110 NULL, /* 9.11.2.9 S1 mode to N1 mode NAS transparent container */
7111 de_nas_5gs_cmn_service_level_aa_cont, /* 9.11.2.10 Service-level-AA container */
7112 NULL, /* NONE */
7118 * 9.11.3 5GS mobility management (5GMM) information elements
7120 #if 0
7121 typedef enum
7123 DE_NAS_5GS_MM_5GMM_CAP, /* 9.11.3.1 5GMM capability*/
7124 DE_NAS_5GS_MM_5GMM_CAUSE, /* 9.11.3.2 5GMM cause*/
7125 DE_NAS_5GS_MM_5GS_DRX_PARAM, /* 9.11.3.2A 5GS DRX parameters*/
7126 DE_NAS_5GS_MM_5GS_IDENTITY_TYPE, /* 9.11.3.3 5GS identity type*/
7127 DE_NAS_5GS_MM_5GS_MOBILE_ID, /* 9.11.3.4 5GS mobile identity*/
7128 DE_NAS_5GS_MM_5GS_NW_FEAT_SUP, /* 9.11.3.5 5GS network feature support*/
7129 DE_NAS_5GS_MM_5GS_REG_RES, /* 9.11.3.6 5GS registration result*/
7130 DE_NAS_5GS_MM_5GS_REG_TYPE, /* 9.11.3.7 5GS registration type*/
7131 DE_NAS_5GS_MM_5GS_TA_ID, /* 9.11.3.8 5GS tracking area identity */
7132 DE_NAS_5GS_MM_5GS_TA_ID_LIST, /* 9.11.3.9 5GS tracking area identity list */
7133 DE_NAS_5GS_MM_UPDATE_TYPE, /* 9.11.3.9A 5GS update type */
7134 DE_NAS_5GS_MM_ABBA, /* 9.11.3.10 ABBA */
7135 /* 9.11.3.11 void */
7136 DE_NAS_5GS_MM_ADD_5G_SEC_INF, /* 9.11.3.12 Additional 5G security information */
7137 DE_NAS_5GS_MM_ADD_INF_REQ, /* 9.11.3.12A Additional information requested */
7138 DE_NAS_5GS_MM_ALLOW_PDU_SES_STS, /* 9.11.3.13 Allowed PDU session status*/
7139 DE_NAS_5GS_MM_AUT_FAIL_PAR, /* 9.11.3.14 Authentication failure parameter */
7140 DE_NAS_5GS_MM_AUT_PAR_AUTN, /* 9.11.3.15 Authentication parameter AUTN*/
7141 DE_NAS_5GS_MM_AUT_PAR_RAND, /* 9.11.3.16 Authentication parameter RAND*/
7142 DE_NAS_5GS_MM_AUT_RESP_PAR, /* 9.11.3.17 Authentication response parameter */
7143 DE_NAS_5GS_MM_CONF_UPD_IND, /* 9.11.3.18 Configuration update indication*/
7144 DE_NAS_5GS_MM_CAG_INFORMATION_LIST, /* 9.11.3.18A CAG information list*/
7145 DE_NAS_5GS_MM_CIOT_SMALL_DATA_CONT, /* 9.11.3.18B CIoT small data container */
7146 DE_NAS_5GS_MM_CIPHERING_KEY_DATA, /* 9.11.3.18C Ciphering key data*/
7147 DE_NAS_5GS_MM_CTRL_PLANE_SERVICE_TYPE, /* 9.11.3.18D Control plane service type*/
7148 DE_NAS_5GS_MM_DLGT_SAVING_TIME, /* 9.11.3.19 Daylight saving time*/
7149 DE_NAS_5GS_MM_DE_REG_TYPE, /* 9.11.3.20 De-registration type*/
7150 /* 9.11.3.21 Void */
7151 /* 9.11.3.22 Void*/
7152 DE_NAS_5GS_MM_EMRG_NR_LIST, /* 9.11.3.23 Emergency number list */
7153 DE_NAS_5GS_MM_EPS_BEARER_CTX_STATUS, /* 9.11.3.23A EPS bearer context status */
7154 DE_NAS_5GS_MM_EPS_NAS_MSG_CONT, /* 9.11.3.24 EPS NAS message container */
7155 DE_NAS_5GS_MM_EPS_NAS_SEC_ALGO, /* 9.11.3.25 EPS NAS security algorithms */
7156 DE_NAS_5GS_MM_EXT_EMERG_NUM_LIST, /* 9.11.3.26 Extended emergency number list */
7157 DE_NAS_5GS_MM_EXTENDED_DRX_PARAMETERS, /* 9.11.3.26A Extended DRX parameters */
7158 /* 9.11.3.27 Void*/
7159 DE_NAS_5GS_MM_IMEISV_REQ, /* 9.11.3.28 IMEISV request*/
7160 DE_NAS_5GS_MM_LADN_INDIC, /* 9.11.3.29 LADN indication*/
7161 DE_NAS_5GS_MM_LADN_INF, /* 9.11.3.30 LADN information */
7162 DE_NAS_5GS_MM_MICO_IND, /* 9.11.3.31 MICO indication*/
7163 DE_NAS_5GS_MM_MA_PDU_SES_INF, /* 9.11.3.31A MA PDU session information */
7164 DE_NAS_5GS_MM_MAPPED_NSSAI, /* 9.11.3.31B Mapped NSSAI */
7165 DE_NAS_5GS_MM_MOBILE_STATION_CLSMK_2, /* 9.11.3.31C Mobile station classmark 2 */
7166 DE_NAS_5GS_MM_NAS_KEY_SET_ID, /* 9.11.3.32 NAS key set identifier*/
7167 DE_NAS_5GS_MM_NAS_KEY_SET_ID_H1, /* 9.11.3.32 NAS key set identifier*/
7168 DE_NAS_5GS_MM_NAS_MSG_CONT, /* 9.11.3.33 NAS message container*/
7169 DE_NAS_5GS_MM_NAS_SEC_ALGO, /* 9.11.3.34 NAS security algorithms*/
7170 DE_NAS_5GS_MM_NW_NAME, /* 9.11.3.35 Network name*/
7171 DE_NAS_5GS_MM_NW_SLICING_IND, /* 9.11.3.36 Network slicing indication */
7172 DE_NAS_5GS_MM_NW_NON_3GPP_NW_PROV_POL, /* 9.11.3.36A Non-3GPP NW provided policies */
7173 DE_NAS_5GS_MM_NSSAI, /* 9.11.3.37 NSSAI*/
7174 DE_NAS_5GS_MM_NSSAI_INC_MODE, /* 9.11.3.37A NSSAI inclusion mode */
7175 DE_NAS_5GS_MM_OP_DEF_ACC_CAT_DEF, /* 9.11.3.38 Operator-defined access category definitions */
7176 DE_NAS_5GS_MM_PLD_CONT, /* 9.11.3.39 Payload container*/
7177 DE_NAS_5GS_MM_PLD_CONT_TYPE, /* 9.11.3.40 Payload container type*/
7178 DE_NAS_5GS_MM_PDU_SES_ID_2, /* 9.11.3.41 PDU session identity 2 */
7179 DE_NAS_5GS_MM_PDU_SES_REACT_RES, /* 9.11.3.42 PDU session reactivation result*/
7180 DE_NAS_5GS_MM_PDU_SES_REACT_RES_ERR_C, /* 9.11.3.43 PDU session reactivation result error cause */
7181 DE_NAS_5GS_MM_PDU_SES_STATUS, /* 9.11.3.44 PDU session status */
7182 DE_NAS_5GS_MM_PLMN_LIST, /* 9.11.3.45 PLMN list*/
7183 DE_NAS_5GS_MM_REJ_NSSAI, /* 9.11.3.46 Rejected NSSAI*/
7184 DE_NAS_5GS_MM_REL_ASS_IND, /* 9.11.3.46A Release assistance indication*/
7185 DE_NAS_5GS_MM_REQ_TYPE, /* 9.11.3.47 Request type */
7186 DE_NAS_5GS_MM_S1_UE_NW_CAP, /* 9.11.3.48 S1 UE network capability*/
7187 DE_NAS_5GS_MM_S1_UE_SEC_CAP, /* 9.11.3.48A S1 UE security capability*/
7188 DE_NAS_5GS_MM_SAL, /* 9.11.3.49 Service area list*/
7189 DE_NAS_5GS_MM_SERV_TYPE, /* 9.11.3.50 Service type,*/
7190 DE_NAS_5GS_MM_SMS_IND, /* 9.11.3.50A SMS indication */
7191 DE_NAS_5GS_MM_SOR_TRANSP_CONT, /* 9.11.3.51 SOR transparent container */
7192 DE_NAS_5GS_MM_SUPPORTED_CODEC_LIST, /* 9.11.3.51A Supported codec list */
7193 DE_NAS_5GS_MM_TZ, /* 9.11.3.52 Time zone*/
7194 DE_NAS_5GS_MM_TZ_AND_T, /* 9.11.3.53 Time zone and time*/
7195 DE_NAS_5GS_MM_UE_PAR_UPD_TRANSP_CONT, /* 9.11.3.53A UE parameters update transparent container */
7196 DE_NAS_5GS_MM_UE_SEC_CAP, /* 9.11.3.54 UE security capability*/
7197 DE_NAS_5GS_MM_UE_USAGE_SET, /* 9.11.3.55 UE's usage setting */
7198 DE_NAS_5GS_MM_UE_STATUS, /* 9.11.3.56 UE status */
7199 DE_NAS_5GS_MM_UL_DATA_STATUS, /* 9.11.3.57 Uplink data status */
7200 DE_NAS_5GS_MM_UE_RADIO_CAP_ID, /* 9.11.3.68 UE radio capability ID*/
7201 DE_NAS_5GS_MM_UE_RADIO_CAP_ID_DEL_IND, /* 9.11.3.69 UE radio capability ID deletion indication*/
7202 DE_NAS_5GS_MM_TRUNCATED_5G_S_TMSI_CONF, /* 9.11.3.70 Truncated 5G-S-TMSI configuration*/
7203 DE_NAS_5GS_MM_WUS_ASSISTANCE_INF, /* 9.11.3.71 WUS assistance information*/
7204 DE_NAS_5GS_MM_N5GC_INDICATION, /* 9.11.3.72 N5GC indication*/
7205 DE_NAS_5GS_MM_NB_N1_MODE_DRX_PARS, /* 9.11.3.73 NB-N1 mode DRX parameters*/
7206 DE_NAS_5GS_MM_ADDITIONAL_CONF_IND, /* 9.11.3.74 Additional configuration indication*/
7207 DE_NAS_5GS_MM_EXTENDED_REJECTED_NSSAI, /* 9.11.3.75 Extended rejected NSSAI*/
7208 DE_NAS_5GS_MM_UE_REQUEST_TYPE, /* 9.11.3.76 UE request type */
7209 DE_NAS_5GS_MM_PAGING_RESTRICTION, /* 9.11.3.77 Paging restriction */
7210 DE_NAS_5GS_MM_NID, /* 9.11.3.79 NID */
7211 DE_NAS_5GS_MM_PEIPS_ASSIST_INFO, /* 9.11.3.80 PEIPS assistance information */
7212 DE_NAS_5GS_MM_5GS_ADD_REQ_RES, /* 9.11.3.81 5GS additional request result */
7213 DE_NAS_5GS_MM_NSSRG_INFO, /* 9.11.3.82 NSSRG information */
7214 DE_NAS_5GS_MM_PLMNS_LIST_DISASTER_COND, /* 9.11.3.83 List of PLMNs to be used in disaster condition */
7215 DE_NAS_5GS_MM_REG_WAIT_RANGE, /* 9.11.3.84 Registration wait range */
7216 DE_NAS_5GS_MM_PLMN_ID, /* 9.11.3.85 PLMN identity */
7217 DE_NAS_5GS_MM_EXT_CAG_INFO_LIST, /* 9.11.3.86 Extended CAG information list */
7218 DE_NAS_5GS_MM_NSAG_INFO, /* 9.11.3.87 NSAG information */
7219 DE_NAS_5GS_MM_PROSE_RELAY_TRANS_ID, /* 9.11.3.88 ProSe relay transaction identity */
7220 DE_NAS_5GS_MM_RELAY_KEY_REQ_PARAMS, /* 9.11.3.89 Relay key request parameters */
7221 DE_NAS_5GS_MM_RELAY_KEY_RESP_PARAMS, /* 9.11.3.90 Relay key response parameters */
7222 DE_NAS_5GS_MM_PRIO_IND, /* 9.11.3.91 Priority indicator */
7223 DE_NAS_5GS_MM_SNPN_LIST, /* 9.11.3.92 SNPN list */
7224 DE_NAS_5GS_MM_N3IWF_ID, /* 9.11.3.93 N3IWF identifier */
7225 DE_NAS_5GS_MM_TNAN_INFO, /* 9.11.3.94 TNAN information */
7226 DE_NAS_5GS_MM_RAN_TIMING_SYNC, /* 9.11.3.95 RAN timing synchronization */
7227 DE_NAS_5GS_MM_EXT_LADN_INFO, /* 9.11.3.96 Extended LADN information */
7228 DE_NAS_5GS_MM_ALT_NSSAI, /* 9.11.3.97 Alternative NSSAI */
7229 DE_NAS_5GS_MM_TYPE_6_IE_CONT, /* 9.11.3.98 Type 6 IE container */
7230 DE_NAS_5GS_MM_N3GPP_ACC_PATH_SWITCH_IND, /* 9.11.9.99 Non-3GPP access path switching indication */
7231 DE_NAS_5GS_MM_S_NSSAI_LOC_VALID_INFO, /* 9.11.3.100 S-NSSAI location validity information */
7232 DE_NAS_5GS_MM_S_NSSAI_TIME_VALID_INFO, /* 9.11.3.101 S-NSSAI time validity information */
7233 DE_NAS_5GS_MM_N3GPP_PATH_SWITCH_INFO, /* 9.11.3.102 Non-3GPP path switching information */
7234 DE_NAS_5GS_MM_PARTIAL_NSSAI, /* 9.11.3.103 Partial NSSAI */
7235 DE_NAS_5GS_MM_AU3N_IND, /* 9.11.3.104 AUN3 indication */
7236 DE_NAS_5GS_MM_FEAT_AUTH_IND, /* 9.11.3.105 Feature authorization indication */
7237 DE_NAS_5GS_MM_PAYLOAD_CONT_INFO, /* 9.11.3.106 Payload container information */
7238 DE_NAS_5GS_MM_AUN3_DEVICE_SEC_KEY, /* 9.11.3.107 AUN3 device security key */
7239 DE_NAS_5GS_MM_ON_DEMAND_NSSAI, /* 9.11.3.108 On-demand NSSAI */
7240 DE_NAS_5GS_MM_EXT_5GMM_CAUSE, /* 9.11.3.109 Extended 5GMM cause */
7242 DE_NAS_5GS_MM_NONE /* NONE */
7244 nas_5gs_mm_elem_idx_t;
7245 #endif
7247 static const value_string nas_5gs_mm_elem_strings[] = {
7248 { DE_NAS_5GS_MM_5GMM_CAP, "5GMM capability" }, /* 9.11.3.1 5GMM capability*/
7249 { DE_NAS_5GS_MM_5GMM_CAUSE, "5GMM cause" }, /* 9.11.3.2 5GMM cause*/
7250 { DE_NAS_5GS_MM_5GS_DRX_PARAM, "5GS DRX parameters" }, /* 9.11.3.2A 5GS DRX parameters*/
7251 { DE_NAS_5GS_MM_5GS_IDENTITY_TYPE, "5GS identity type" }, /* 9.11.3.3 5GS identity type*/
7252 { DE_NAS_5GS_MM_5GS_MOBILE_ID, "5GS mobile identity" }, /* 9.11.3.4 5GS mobile identity*/
7253 { DE_NAS_5GS_MM_5GS_NW_FEAT_SUP, "5GS network feature support" }, /* 9.11.3.5 5GS network feature support*/
7254 { DE_NAS_5GS_MM_5GS_REG_RES, "5GS registration result" }, /* 9.11.3.6 5GS registration result*/
7255 { DE_NAS_5GS_MM_5GS_REG_TYPE, "5GS registration type" }, /* 9.11.3.7 5GS registration type*/
7256 { DE_NAS_5GS_MM_5GS_TA_ID, "5GS tracking area identity" }, /* 9.11.3.8 5GS tracking area identity */
7257 { DE_NAS_5GS_MM_5GS_TA_ID_LIST, "5GS tracking area identity list" }, /* 9.11.3.9 5GS tracking area identity list*/
7258 { DE_NAS_5GS_MM_UPDATE_TYPE, "5GS update type" }, /* 9.11.3.9A 5GS update type */
7259 { DE_NAS_5GS_MM_ABBA, "ABBA" }, /* 9.11.3.10 ABBA */
7260 /* 9.11.3.11 Void */
7261 { DE_NAS_5GS_MM_ADD_5G_SEC_INF, "Additional 5G security information" }, /* 9.11.3.12 Additional 5G security information */
7262 { DE_NAS_5GS_MM_ADD_INF_REQ, "Additional information requested" }, /* 9.11.3.12A Additional information requested */
7263 { DE_NAS_5GS_MM_ALLOW_PDU_SES_STS, "Allowed PDU session status" }, /* 9.11.3.13 Allowed PDU session status*/
7264 { DE_NAS_5GS_MM_AUT_FAIL_PAR, "Authentication failure parameter" }, /* 9.11.3.14 Authentication failure parameter*/
7265 { DE_NAS_5GS_MM_AUT_PAR_AUTN, "Authentication parameter AUTN" }, /* 9.11.3.15 Authentication parameter AUTN*/
7266 { DE_NAS_5GS_MM_AUT_PAR_RAND, "Authentication parameter RAND" }, /* 9.11.3.16 Authentication parameter RAND*/
7267 { DE_NAS_5GS_MM_AUT_RESP_PAR, "Authentication response parameter" }, /* 9.11.3.17 Authentication response parameter*/
7268 { DE_NAS_5GS_MM_CONF_UPD_IND, "Configuration update indication" }, /* 9.11.3.18 Configuration update indication*/
7269 { DE_NAS_5GS_MM_CAG_INFORMATION_LIST, "CAG information list" }, /* 9.11.3.18A CAG information list*/
7270 { DE_NAS_5GS_MM_CIOT_SMALL_DATA_CONT, "CIoT small data container" }, /* 9.11.3.18B CIoT small data container */
7271 { DE_NAS_5GS_MM_CIPHERING_KEY_DATA, "Ciphering key data" }, /* 9.11.3.18C Ciphering key data*/
7272 { DE_NAS_5GS_MM_CTRL_PLANE_SERVICE_TYPE, "Control plane service type" }, /* 9.11.3.18D Control plane service type*/
7273 { DE_NAS_5GS_MM_DLGT_SAVING_TIME, "Daylight saving time" }, /* 9.11.3.19 Daylight saving time*/
7274 { DE_NAS_5GS_MM_DE_REG_TYPE, "De-registration type" }, /* 9.11.3.20 De-registration type*/
7275 /* 9.11.3.21 Void */
7276 /* 9.11.3.22 Void*/
7277 { DE_NAS_5GS_MM_EMRG_NR_LIST, "Emergency number list" }, /* 9.11.3.23 Emergency number list*/
7278 { DE_NAS_5GS_MM_EPS_BEARER_CTX_STATUS, "EPS bearer context status" }, /* 9.11.3.23A EPS bearer context status */
7279 { DE_NAS_5GS_MM_EPS_NAS_MSG_CONT, "EPS NAS message container" }, /* 9.11.3.24 EPS NAS message container*/
7280 { DE_NAS_5GS_MM_EPS_NAS_SEC_ALGO, "EPS NAS security algorithms" }, /* 9.11.3.25 EPS NAS security algorithms*/
7281 { DE_NAS_5GS_MM_EXT_EMERG_NUM_LIST, "Extended emergency number list" }, /* 9.11.3.26 Extended emergency number list */
7282 { DE_NAS_5GS_MM_EXTENDED_DRX_PARAMETERS, "Extended DRX parameters" }, /* 9.11.3.26A Extended DRX parameters */
7283 /* 9.11.3.27 Void*/
7284 { DE_NAS_5GS_MM_IMEISV_REQ, "IMEISV request" }, /* 9.11.3.28 IMEISV request*/
7285 { DE_NAS_5GS_MM_LADN_INDIC, "LADN indication" }, /* 9.11.3.29 LADN indication*/
7286 { DE_NAS_5GS_MM_LADN_INF, "LADN information" }, /* 9.11.3.30 LADN information*/
7287 { DE_NAS_5GS_MM_MICO_IND, "MICO indication" }, /* 9.11.3.31 MICO indication*/
7288 { DE_NAS_5GS_MM_MA_PDU_SES_INF, "MA PDU session information" }, /* 9.11.3.31A MA PDU session information */
7289 { DE_NAS_5GS_MM_MAPPED_NSSAI, "Mapped NSSAI" }, /* 9.11.3.31B Mapped NSSAI */
7290 { DE_NAS_5GS_MM_MOBILE_STATION_CLSMK_2, "Mobile station classmark 2" }, /* 9.11.3.31C Mobile station classmark 2 */
7291 { DE_NAS_5GS_MM_NAS_KEY_SET_ID, "NAS key set identifier" }, /* 9.11.3.32 NAS key set identifier*/
7292 { DE_NAS_5GS_MM_NAS_KEY_SET_ID_H1, "NAS key set identifier" }, /* 9.11.3.32 NAS key set identifier*/
7293 { DE_NAS_5GS_MM_NAS_MSG_CONT, "NAS message container" }, /* 9.11.3.33 NAS message container*/
7294 { DE_NAS_5GS_MM_NAS_SEC_ALGO, "NAS security algorithms" }, /* 9.11.3.34 NAS security algorithms*/
7295 { DE_NAS_5GS_MM_NW_NAME, "Network name" }, /* 9.11.3.35 Network name*/
7296 { DE_NAS_5GS_MM_NW_SLICING_IND, "Network slicing indication" }, /* 9.11.3.36 Network slicing indication */
7297 { DE_NAS_5GS_MM_NW_NON_3GPP_NW_PROV_POL, "Non-3GPP NW provided policies" }, /* 9.11.3.36A Non-3GPP NW provided policies */
7298 { DE_NAS_5GS_MM_NSSAI, "NSSAI" }, /* 9.11.3.37 NSSAI*/
7299 { DE_NAS_5GS_MM_NSSAI_INC_MODE, "NSSAI inclusion mode" }, /* 9.11.3.37A NSSAI inclusion mode */
7300 { DE_NAS_5GS_MM_OP_DEF_ACC_CAT_DEF, "Operator-defined access category definitions" },/* 9.11.3.38 Operator-defined access category definitions */
7302 { DE_NAS_5GS_MM_PLD_CONT, "Payload container" }, /* 9.11.3.39 Payload container*/
7303 { DE_NAS_5GS_MM_PLD_CONT_TYPE, "Payload container type" }, /* 9.11.3.40 Payload container type*/
7304 { DE_NAS_5GS_MM_PDU_SES_ID_2, "PDU session identity 2" }, /* 9.11.3.42 PDU session identity 2*/
7305 { DE_NAS_5GS_MM_PDU_SES_REACT_RES, "PDU session reactivation result" }, /* 9.11.3.43 PDU session reactivation result*/
7306 { DE_NAS_5GS_MM_PDU_SES_REACT_RES_ERR_C, "PDU session reactivation result error cause" }, /* 9.11.3.43 PDU session reactivation result error cause*/
7307 { DE_NAS_5GS_MM_PDU_SES_STATUS, "PDU session status" }, /* 9.11.3.44 PDU session status*/
7308 { DE_NAS_5GS_MM_PLMN_LIST, "PLMN list" }, /* 9.11.3.45 PLMN list*/
7309 { DE_NAS_5GS_MM_REJ_NSSAI, "Rejected NSSAI" }, /* 9.11.3.46 Rejected NSSAI*/
7310 { DE_NAS_5GS_MM_REL_ASS_IND, "Release assistance indication" }, /* 9.11.3.46A Release assistance indication*/
7311 { DE_NAS_5GS_MM_REQ_TYPE, "Request type" }, /* 9.11.3.47 Request type*/
7312 { DE_NAS_5GS_MM_S1_UE_NW_CAP, "S1 UE network capability" }, /* 9.11.3.48 S1 UE network capability*/
7313 { DE_NAS_5GS_MM_S1_UE_SEC_CAP, "S1 UE security capability" }, /* 9.11.3.48A S1 UE security capability*/
7314 { DE_NAS_5GS_MM_SAL, "Service area list" }, /* 9.11.3.49 Service area list*/
7315 { DE_NAS_5GS_MM_SERV_TYPE, "Service type" }, /* 9.11.3.50 Service type*/
7316 { DE_NAS_5GS_MM_SMS_IND, "SMS indication" }, /* 9.11.3.50A SMS indication */
7317 { DE_NAS_5GS_MM_SOR_TRANSP_CONT, "SOR transparent container" }, /* 9.11.3.51 SOR transparent container */
7318 { DE_NAS_5GS_MM_SUPPORTED_CODEC_LIST, "Supported codec list" }, /* 9.11.3.51A Supported codec list */
7319 { DE_NAS_5GS_MM_TZ, "Time zone" }, /* 9.11.3.52 Time zone*/
7320 { DE_NAS_5GS_MM_TZ_AND_T, "Time zone and time" }, /* 9.11.3.53 Time zone and time*/
7321 { DE_NAS_5GS_MM_UE_PAR_UPD_TRANSP_CONT, "UE parameters update transparent container" }, /* 9.11.3.53A UE parameters update transparent container */
7322 { DE_NAS_5GS_MM_UE_SEC_CAP, "UE security capability" }, /* 9.11.3.54 UE security capability*/
7323 { DE_NAS_5GS_MM_UE_USAGE_SET, "UE's usage setting" }, /* 9.11.3.55 UE's usage setting*/
7324 { DE_NAS_5GS_MM_UE_STATUS, "UE status" }, /* 9.11.3.56 UE status*/
7325 { DE_NAS_5GS_MM_UL_DATA_STATUS, "Uplink data status" }, /* 9.11.3.57 Uplink data status*/
7326 { DE_NAS_5GS_MM_UE_RADIO_CAP_ID, "UE radio capability ID" }, /* 9.11.3.68 UE radio capability ID*/
7327 { DE_NAS_5GS_MM_UE_RADIO_CAP_ID_DEL_IND, "UE radio capability ID deletion indication" },/* 9.11.3.69 UE radio capability ID deletion indication*/
7328 { DE_NAS_5GS_MM_TRUNCATED_5G_S_TMSI_CONF, "Truncated 5G-S-TMSI configuration" }, /* 9.11.3.70 Truncated 5G-S-TMSI configuration*/
7329 { DE_NAS_5GS_MM_WUS_ASSISTANCE_INF, "WUS assistance information" }, /* 9.11.3.71 WUS assistance information*/
7330 { DE_NAS_5GS_MM_N5GC_INDICATION, "N5GC indication" }, /* 9.11.3.72 N5GC indication*/
7331 { DE_NAS_5GS_MM_NB_N1_MODE_DRX_PARS, "NB-N1 mode DRX parameters" }, /* 9.11.3.73 NB-N1 mode DRX parameters*/
7332 { DE_NAS_5GS_MM_ADDITIONAL_CONF_IND, "Additional configuration indication" },/* 9.11.3.74 Additional configuration indication*/
7333 { DE_NAS_5GS_MM_EXTENDED_REJECTED_NSSAI, "Extended rejected NSSAI" }, /* 9.11.3.75 Extended rejected NSSAI*/
7334 { DE_NAS_5GS_MM_UE_REQUEST_TYPE, "UE request type" }, /* 9.11.3.76 UE request type */
7335 { DE_NAS_5GS_MM_PAGING_RESTRICTION, "Paging restriction" }, /* 9.11.3.77 Paging restriction */
7336 { DE_NAS_5GS_MM_NID, "NID" }, /* 9.11.3.79 NID */
7337 { DE_NAS_5GS_MM_PEIPS_ASSIST_INFO, "PEIPS assistance information" }, /* 9.11.3.80 PEIPS assistance information */
7338 { DE_NAS_5GS_MM_5GS_ADD_REQ_RES, "5GS additional request result" }, /* 9.11.3.81 5GS additional request result */
7339 { DE_NAS_5GS_MM_NSSRG_INFO, "NSSRG information" }, /* 9.11.3.82 NSSRG information */
7340 { DE_NAS_5GS_MM_PLMNS_LIST_DISASTER_COND, "List of PLMNs to be used in disaster condition" },/* 9.11.3.83 List of PLMNs to be used in disaster condition */
7341 { DE_NAS_5GS_MM_REG_WAIT_RANGE, "Registration wait range" }, /* 9.11.3.84 Registration wait range */
7342 { DE_NAS_5GS_MM_PLMN_ID, "PLMN identity" }, /* 9.11.3.85 PLMN identity */
7343 { DE_NAS_5GS_MM_EXT_CAG_INFO_LIST, "Extended CAG information list" }, /* 9.11.3.86 Extended CAG information list */
7344 { DE_NAS_5GS_MM_NSAG_INFO, "NSAG information" }, /* 9.11.3.87 NSAG information */
7345 { DE_NAS_5GS_MM_PROSE_RELAY_TRANS_ID, "ProSe relay transaction identity" }, /* 9.11.3.88 ProSe relay transaction identity */
7346 { DE_NAS_5GS_MM_RELAY_KEY_REQ_PARAMS, "Relay key request parameters" }, /* 9.11.3.89 Relay key request parameters */
7347 { DE_NAS_5GS_MM_RELAY_KEY_RESP_PARAMS, "Relay key response parameters" }, /* 9.11.3.90 Relay key response parameters */
7348 { DE_NAS_5GS_MM_PRIO_IND, "Priority indicator" }, /* 9.11.3.91 Priority indicator */
7349 { DE_NAS_5GS_MM_SNPN_LIST, "SNPN list" }, /* 9.11.3.92 SNPN list */
7350 { DE_NAS_5GS_MM_N3IWF_ID, "N3IWF identifier" }, /* 9.11.3.93 N3IWF identifier */
7351 { DE_NAS_5GS_MM_TNAN_INFO, "TNAN information" }, /* 9.11.3.94 TNAN information */
7352 { DE_NAS_5GS_MM_RAN_TIMING_SYNC, "RAN timing synchronization" }, /* 9.11.3.95 RAN timing synchronization */
7353 { DE_NAS_5GS_MM_EXT_LADN_INFO, "Extended LADN information" }, /* 9.11.3.96 Extended LADN information */
7354 { DE_NAS_5GS_MM_ALT_NSSAI, "Alternative NSSAI" }, /* 9.11.3.97 Alternative NSSAI */
7355 { DE_NAS_5GS_MM_TYPE_6_IE_CONT, "Type 6 IE container" }, /* 9.11.3.98 Type 6 IE container */
7356 { DE_NAS_5GS_MM_N3GPP_ACC_PATH_SWITCH_IND, "Non-3GPP access path switching indication" },/* 9.11.9.99 Non-3GPP access path switching indication */
7357 { DE_NAS_5GS_MM_S_NSSAI_LOC_VALID_INFO, "S-NSSAI location validity information" },/* 9.11.3.100 S-NSSAI location validity information */
7358 { DE_NAS_5GS_MM_S_NSSAI_TIME_VALID_INFO, "S-NSSAI time validity information" }, /* 9.11.3.101 S-NSSAI time validity information */
7359 { DE_NAS_5GS_MM_N3GPP_PATH_SWITCH_INFO, "Non-3GPP path switching information" },/* 9.11.3.102 Non-3GPP path switching information */
7360 { DE_NAS_5GS_MM_PARTIAL_NSSAI, "Partial NSSAI" }, /* 9.11.3.103 Partial NSSAI */
7361 { DE_NAS_5GS_MM_AU3N_IND, "AUN3 indication" }, /* 9.11.3.104 AUN3 indication */
7362 { DE_NAS_5GS_MM_FEAT_AUTH_IND, "Feature authorization indication" }, /* 9.11.3.105 Feature authorization indication */
7363 { DE_NAS_5GS_MM_PAYLOAD_CONT_INFO, "Payload container information" }, /* 9.11.3.106 Payload container information */
7364 { DE_NAS_5GS_MM_AUN3_DEVICE_SEC_KEY, "AUN3 device security key" }, /* 9.11.3.107 AUN3 device security key */
7365 { DE_NAS_5GS_MM_ON_DEMAND_NSSAI, "On-demand NSSAI" }, /* 9.11.3.108 On-demand NSSAI */
7366 { DE_NAS_5GS_MM_EXT_5GMM_CAUSE, "Extended 5GMM cause" }, /* 9.11.3.109 Extended 5GMM cause */
7368 { 0, NULL }
7370 value_string_ext nas_5gs_mm_elem_strings_ext = VALUE_STRING_EXT_INIT(nas_5gs_mm_elem_strings);
7372 #define NUM_NAS_5GS_MM_ELEM array_length(nas_5gs_mm_elem_strings)
7373 int ett_nas_5gs_mm_elem[NUM_NAS_5GS_MM_ELEM];
7375 uint16_t(*nas_5gs_mm_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
7376 uint32_t offset, unsigned len,
7377 char *add_string, int string_len) = {
7378 /* 9.11.3 5GS mobility management (5GMM) information elements */
7379 de_nas_5gs_mm_5gmm_cap, /* 9.11.3.1 5GMM capability*/
7380 de_nas_5gs_mm_5gmm_cause, /* 9.11.3.2 5GMM cause*/
7381 de_nas_5gs_mm_5gs_drx_param, /* 9.11.3.2A 5GS DRX parameters*/
7382 de_nas_5gs_mm_5gs_identity_type, /* 9.11.3.3 5GS identity type*/
7383 de_nas_5gs_mm_5gs_mobile_id, /* 9.11.3.4 5GS mobile identity*/
7384 de_nas_5gs_mm_5gs_nw_feat_sup, /* 9.11.3.5 5GS network feature support*/
7385 de_nas_5gs_mm_5gs_reg_res, /* 9.11.3.6 5GS registration result*/
7386 de_nas_5gs_mm_5gs_reg_type, /* 9.11.3.7 5GS registration type*/
7387 de_nas_5gs_mm_5gs_ta_id, /* 9.11.3.8 5GS tracking area identity */
7388 de_nas_5gs_mm_5gs_ta_id_list, /* 9.11.3.9 5GS tracking area identity list */
7389 de_nas_5gs_mm_update_type, /* 9.11.3.9A 5GS update type */
7390 de_nas_5gs_mm_abba, /* 9.11.3.10 ABBA */
7391 /* 9.11.3.11 Void */
7392 de_nas_5gs_mm_add_5g_sec_inf, /* 9.11.3.12 Additional 5G security information */
7393 de_nas_5gs_mm_add_inf_req, /* 9.11.3.12A Additional information requested */
7394 de_nas_5gs_mm_allow_pdu_ses_sts, /* 9.11.3.13 Allowed PDU session status*/
7395 NULL, /* 9.11.3.14 Authentication failure parameter */
7396 NULL, /* 9.11.3.15 Authentication parameter AUTN*/
7397 NULL, /* 9.11.3.16 Authentication parameter RAND*/
7398 NULL, /* 9.11.3.17 Authentication response parameter */
7399 de_nas_5gs_mm_conf_upd_ind, /* 9.11.3.18 Configuration update indication*/
7400 de_nas_5gs_mm_cag_information_list, /* 9.11.3.18A CAG information list*/
7401 de_nas_5gs_mm_ciot_small_data_cont, /* 9.11.3.18B CIoT small data container */
7402 de_nas_5gs_mm_ciphering_key_data, /* 9.11.3.18C Ciphering key data*/
7403 de_nas_5gs_mm_ctrl_plane_service_type, /* 9.11.3.18D Control plane service type*/
7405 NULL, /* 9.11.3.19 Daylight saving time*/
7406 de_nas_5gs_mm_de_reg_type, /* 9.11.3.20 De-registration type*/
7407 /* 9.11.3.21 Void */
7408 /* 9.11.3.22 Void*/
7409 NULL, /* 9.11.3.23 Emergency number list*/
7410 NULL, /* 9.11.3.23A EPS bearer context status */
7411 de_nas_5gs_mm_eps_nas_msg_cont, /* 9.11.3.24 EPS NAS message container*/
7412 NULL, /* 9.11.3.25 EPS NAS security algorithms*/
7413 NULL, /* 9.11.3.26 Extended emergency number list*/
7414 NULL, /* 9.11.3.26A Extended DRX parameters */
7415 /* 9.11.3.27 Void*/
7416 NULL, /* 9.11.3.28 IMEISV request*/
7417 de_nas_5gs_mm_ladn_indic, /* 9.11.3.29 LADN indication*/
7418 de_nas_5gs_mm_ladn_inf, /* 9.11.3.30 LADN information*/
7419 de_nas_5gs_mm_mico_ind, /* 9.11.3.31 MICO indication*/
7420 de_nas_5gs_mm_ma_pdu_ses_inf, /* 9.11.3.31A MA PDU session information */
7421 de_nas_5gs_mm_mapped_nssai, /* 9.11.3.31B Mapped NSSAI */
7422 NULL, /* 9.11.3.31C Mobile station classmark 2 */
7424 de_nas_5gs_mm_nas_key_set_id, /* 9.11.3.32 NAS key set identifier*/
7425 de_nas_5gs_mm_nas_key_set_id_h1, /* 9.11.3.32 NAS key set identifier*/
7426 de_nas_5gs_mm_nas_msg_cont, /* 9.11.3.33 NAS message container*/
7427 de_nas_5gs_mm_nas_sec_algo, /* 9.11.3.34 NAS security algorithms*/
7428 NULL, /* 9.11.3.35 Network name*/
7429 de_nas_5gs_mm_nw_slicing_ind, /* 9.11.3.36 Network slicing indication */
7430 NULL, /* 9.11.3.36A Non-3GPP NW provided policies */
7431 de_nas_5gs_mm_nssai, /* 9.11.3.37 NSSAI*/
7432 de_nas_5gs_mm_nssai_inc_mode, /* 9.11.3.37A NSSAI inclusion mode */
7433 de_nas_5gs_mm_op_def_acc_cat_def, /* 9.11.3.38 Operator-defined access category definitions */
7434 de_nas_5gs_mm_pld_cont, /* 9.11.3.39 Payload container*/
7435 de_nas_5gs_mm_pld_cont_type, /* 9.11.3.40 Payload container type*/
7436 de_nas_5gs_mm_pdu_ses_id_2, /* 9.11.3.41 PDU session identity 2*/
7437 de_nas_5gs_mm_pdu_ses_react_res, /* 9.11.3.42 PDU session reactivation result*/
7438 de_nas_5gs_mm_pdu_ses_react_res_err_c, /* 9.11.3.43 PDU session reactivation result error cause */
7439 de_nas_5gs_mm_pdu_ses_status, /* 9.11.3.44 PDU session status*/
7440 NULL, /* 9.11.3.45 PLMN list*/
7441 de_nas_5gs_mm_rej_nssai, /* 9.11.3.46 Rejected NSSAI*/
7442 NULL, /* 9.11.3.46A Release assistance indication*/
7443 de_nas_5gs_mm_req_type, /* 9.11.3.47 Request type*/
7444 NULL, /* 9.11.3.48 S1 UE network capability*/
7445 NULL, /* 9.11.3.48A S1 UE security capability*/
7446 de_nas_5gs_mm_sal, /* 9.11.3.49 Service area list*/
7447 de_nas_5gs_mm_serv_type, /* 9.11.3.50 Service type*/
7448 de_nas_5gs_mm_sms_ind, /* 9.11.3.50A SMS indication */
7449 de_nas_5gs_mm_sor_transp_cont, /* 9.11.3.51 SOR transparent container */
7450 NULL, /* 9.11.3.51A Supported codec list */
7451 NULL, /* 9.11.3.52 Time zone*/
7452 NULL, /* 9.11.3.53 Time zone and time*/
7453 de_nas_5gs_mm_ue_par_upd_transp_cont, /* 9.11.3.53A UE parameters update transparent container */
7454 de_nas_5gs_mm_ue_sec_cap, /* 9.11.3.54 UE security capability*/
7455 de_nas_5gs_mm_ue_usage_set, /* 9.11.3.55 UE's usage setting*/
7456 de_nas_5gs_mm_ue_status, /* 9.11.3.56 UE status*/
7457 de_nas_5gs_mm_ul_data_status, /* 9.11.3.57 Uplink data status*/
7458 de_nas_5gs_mm_ue_radio_cap_id, /* 9.11.3.68 UE radio capability ID*/
7459 de_nas_5gs_mm_ue_radio_cap_id_del_ind, /* 9.11.3.69 UE radio capability ID deletion indication*/
7460 de_nas_5gs_mm_truncated_5g_s_tmsi_conf, /* 9.11.3.70 Truncated 5G-S-TMSI configuration*/
7461 NULL, /* 9.11.3.71 WUS assistance information*/
7462 de_nas_5gs_mm_n5gc_indication, /* 9.11.3.72 N5GC indication*/
7463 de_nas_5gs_mm_nb_n1_mode_drx_pars, /* 9.11.3.73 NB-N1 mode DRX parameters*/
7464 de_nas_5gs_mm_additional_conf_ind, /* 9.11.3.74 Additional configuration indication*/
7465 de_nas_5gs_mm_extended_rejected_nssai, /* 9.11.3.75 Extended rejected NSSAI*/
7466 NULL, /* 9.11.3.76 UE request type */
7467 de_nas_5gs_mm_paging_restriction, /* 9.11.3.77 Paging restriction */
7468 de_nas_5gs_mm_nid, /* 9.11.3.79 NID */
7469 de_nas_5gs_mm_peips_assist_info, /* 9.11.3.80 PEIPS assistance information */
7470 de_nas_5gs_mm_5gs_add_req_res, /* 9.11.3.81 5GS additional request result */
7471 de_nas_5gs_mm_nssrg_info, /* 9.11.3.82 NSSRG information */
7472 de_nas_5gs_mm_plmns_list_disaster_cond, /* 9.11.3.83 List of PLMNs to be used in disaster condition */
7473 de_nas_5gs_mm_reg_wait_range, /* 9.11.3.84 Registration wait range */
7474 de_nas_5gs_mm_plmn_id, /* 9.11.3.85 PLMN identity */
7475 de_nas_5gs_mm_ext_cag_info_list, /* 9.11.3.86 Extended CAG information list */
7476 de_nas_5gs_mm_nsag_info, /* 9.11.3.87 NSAG information */
7477 de_nas_5gs_mm_prose_relay_trans_id, /* 9.11.3.88 ProSe relay transaction identity */
7478 de_nas_5gs_mm_relay_key_req_params, /* 9.11.3.89 Relay key request parameters */
7479 de_nas_5gs_mm_relay_key_resp_params, /* 9.11.3.90 Relay key response parameters */
7480 de_nas_5gs_mm_prio_ind, /* 9.11.3.91 Priority indicator */
7481 de_nas_5gs_mm_snpn_list, /* 9.11.3.92 SNPN list */
7482 de_nas_5gs_mm_n3iwf_id, /* 9.11.3.93 N3IWF identifier */
7483 de_nas_5gs_mm_tnan_info, /* 9.11.3.94 TNAN information */
7484 de_nas_5gs_mm_ran_timing_sync, /* 9.11.3.95 RAN timing synchronization */
7485 de_nas_5gs_mm_ext_ladn_info, /* 9.11.3.96 Extended LADN information */
7486 de_nas_5gs_mm_alt_nssai, /* 9.11.3.97 Alternative NSSAI */
7487 de_nas_5gs_mm_type_6_ie_cont, /* 9.11.3.98 Type 6 IE container */
7488 de_nas_5gs_mm_n3gpp_acc_path_switch_ind, /* 9.11.9.99 Non-3GPP access path switching indication */
7489 de_nas_5gs_mm_s_nssai_loc_valid_info, /* 9.11.3.100 S-NSSAI location validity information */
7490 de_nas_5gs_mm_s_nssai_time_valid_info, /* 9.11.3.101 S-NSSAI time validity information */
7491 de_nas_5gs_mm_n3gpp_path_switch_info, /* 9.11.3.102 Non-3GPP path switching information */
7492 de_nas_5gs_mm_partial_nssai, /* 9.11.3.103 Partial NSSAI */
7493 de_nas_5gs_mm_au3n_ind, /* 9.11.3.104 AUN3 indication */
7494 de_nas_5gs_mm_feat_auth_ind, /* 9.11.3.105 Feature authorization indication */
7495 de_nas_5gs_mm_payload_cont_info, /* 9.11.3.106 Payload container information */
7496 de_nas_5gs_mm_aun3_device_sec_key, /* 9.11.3.107 AUN3 device security key */
7497 de_nas_5gs_mm_on_demand_nssai, /* 9.11.3.108 On-demand NSSAI */
7498 de_nas_5gs_mm_ext_5gmm_cause, /* 9.11.3.109 Extended 5GMM cause */
7500 NULL, /* NONE */
7505 * 9.11.4 5GS session management (5GSM) information elements
7508 typedef enum
7511 DE_NAS_5GS_SM_5GSM_CAP, /* 9.11.4.1 5GSM capability */
7512 DE_NAS_5GS_SM_5GSM_CAUSE, /* 9.11.4.2 5GSM cause */
7513 DE_NAS_5GS_SM_ALWAYS_ON_PDU_SES_IND, /* 9.11.4.3 Always-on PDU session indication */
7514 DE_NAS_5GS_SM_ALWAYS_ON_PDU_SES_REQ, /* 9.11.4.4 Always-on PDU session requested */
7515 DE_NAS_5GS_SM_5GSM_ALLOWED_SSC_MODE, /* 9.11.4.5 Allowed SSC mode */
7516 DE_NAS_5GS_SM_EXT_PROT_CONF_OPT, /* 9.11.4.6 Extended protocol configuration options */
7517 DE_NAS_5GS_SM_INT_PROT_MAX_DATA_RTE, /* 9.11.4.7 Integrity protection maximum data rate */
7518 DE_NAS_5GS_SM_MAPPED_EPS_B_CONT, /* 9.11.4.8 Mapped EPS bearer contexts */
7519 DE_NAS_5GS_SM_MAX_NUM_SUP_PKT_FLT, /* 9.11.4.9 Maximum number of supported packet filters */
7520 DE_NAS_5GS_SM_PDU_ADDRESS, /* 9.11.4.10 PDU address */
7521 DE_NAS_5GS_SM_PDU_SESSION_TYPE, /* 9.11.4.11 PDU session type */
7522 DE_NAS_5GS_SM_QOS_FLOW_DES, /* 9.11.4.12 QoS flow descriptions */
7523 DE_NAS_5GS_SM_QOS_RULES, /* 9.11.4.13 QoS rules */
7524 DE_NAS_5GS_SM_SESSION_AMBR, /* 9.11.4.14 Session-AMBR */
7525 DE_NAS_5GS_SM_PDU_DN_REQ_CONT, /* 9.11.4.15 SM PDU DN request container */
7526 DE_NAS_5GS_SM_SSC_MODE, /* 9.11.4.16 SSC mode */
7527 DE_NAS_5GS_SM_RE_ATTEMPT_IND, /* 9.11.4.17 Re-attempt indicator */
7528 DE_NAS_5GS_SM_5GSM_NW_FEATURE_SUP, /* 9.11.4.18 5GSM network feature support */
7529 /* 9.11.4.19 Void */
7530 DE_NAS_5GS_SM_SERVING_PLMN_RTE_CTL, /* 9.11.4.20 Serving PLMN rate control */
7531 DE_NAS_5GS_SM_5GSM_CONG_RE_ATTEMPT_IND, /* 9.11.4.21 5GSM congestion re-attempt indicator */
7532 DE_NAS_5GS_SM_ATSSS_CONT, /* 9.11.4.22 ATSSS container */
7533 DE_NAS_5GS_SM_CTL_PLANE_ONLY_IND, /* 9.11.4.23 Control plane only indication */
7534 DE_NAS_5GS_SM_IP_HDR_COMP_CONF, /* 9.11.4.24 IP header compression configuration */
7535 DE_NAS_5GS_SM_DS_TT_ETH_PORT_MAC_ADDR, /* 9.11.4.25 DS-TT Ethernet port MAC address */
7536 DE_NAS_5GS_SM_UE_DS_TT_RESIDENCE_T, /* 9.11.4.26 UE-DS-TT residence time */
7537 DE_NAS_5GS_SM_PORT_MGNT_INF_CONT, /* 9.11.4.27 Port management information container */
7538 DE_NAS_5GS_SM_ETH_HDR_COMP_CONF, /* 9.11.4.28 Ethernet header compression configuration */
7539 DE_NAS_5GS_SM_REMOTE_UE_CTX_LIST, /* 9.11.4.29 Remote UE context list */
7540 DE_NAS_5GS_SM_REQ_MBS_CONT, /* 9.11.4.30 Requested MBS container */
7541 DE_NAS_5GS_SM_REC_MBS_CONT, /* 9.11.4.31 Received MBS container */
7542 DE_NAS_5GS_SM_PDU_SESSION_PAIR_ID, /* 9.11.4.32 PDU session pair ID */
7543 DE_NAS_5GS_SM_RSN, /* 9.11.4.33 RSN */
7544 DE_NAS_5GS_SM_N3QAI, /* 9.11.4.36 N3QAI */
7545 DE_NAS_5GS_SM_N3GPP_DELAY_BUDGET, /* 9.11.4.37 Non-3GPP delay budget */
7546 DE_NAS_5GS_SM_URSP_RULE_ENFORCE_REPORTS,/* 9.11.4.38 URSP rule enforcement reports */
7547 DE_NAS_5GS_SM_PROT_DESC, /* 9.11.4.39 Protocol description */
7549 DE_NAS_5GS_SM_NONE /* NONE */
7551 nas_5gs_sm_elem_idx_t;
7554 static const value_string nas_5gs_sm_elem_strings[] = {
7555 { DE_NAS_5GS_SM_5GSM_CAP, "5GSM capability" }, /* 9.11.4.1 5GSM capability */
7556 { DE_NAS_5GS_SM_5GSM_CAUSE, "5GSM cause" }, /* 9.11.4.2 5GSM cause */
7557 { DE_NAS_5GS_SM_ALWAYS_ON_PDU_SES_IND, "Always-on PDU session indication" }, /* 9.11.4.3 Always-on PDU session indication */
7558 { DE_NAS_5GS_SM_ALWAYS_ON_PDU_SES_REQ, "Always-on PDU session requested" }, /* 9.11.4.4 Always-on PDU session requested */
7559 { DE_NAS_5GS_SM_5GSM_ALLOWED_SSC_MODE, "Allowed SSC mode" }, /* 9.11.4.5 Allowed SSC mode */
7560 { DE_NAS_5GS_SM_EXT_PROT_CONF_OPT, "Extended protocol configuration options" }, /* 9.11.4.6 Extended protocol configuration options */
7561 { DE_NAS_5GS_SM_INT_PROT_MAX_DATA_RTE, "Integrity protection maximum data rate" }, /* 9.11.4.7 Integrity protection maximum data rate */
7562 { DE_NAS_5GS_SM_MAPPED_EPS_B_CONT, "Mapped EPS bearer contexts" }, /* 9.11.4.8 Mapped EPS bearer contexts */
7563 { DE_NAS_5GS_SM_MAX_NUM_SUP_PKT_FLT, "Maximum number of supported packet filters" }, /* 9.11.4.9 Maximum number of supported packet filters */
7564 { DE_NAS_5GS_SM_PDU_ADDRESS, "PDU address" }, /* 9.11.4.10 PDU address */
7565 { DE_NAS_5GS_SM_PDU_SESSION_TYPE, "PDU session type" }, /* 9.11.4.11 PDU session type */
7566 { DE_NAS_5GS_SM_QOS_FLOW_DES, "QoS flow descriptions" }, /* 9.11.4.12 QoS flow descriptions */
7567 { DE_NAS_5GS_SM_QOS_RULES, "QoS rules" }, /* 9.11.4.13 QoS rules */
7568 { DE_NAS_5GS_SM_SESSION_AMBR, "Session-AMBR" }, /* 9.11.4.14 Session-AMBR */
7569 { DE_NAS_5GS_SM_PDU_DN_REQ_CONT, "SM PDU DN request container" }, /* 9.11.4.15 SM PDU DN request container */
7570 { DE_NAS_5GS_SM_SSC_MODE, "SSC mode" }, /* 9.11.4.16 SSC mode */
7571 { DE_NAS_5GS_SM_RE_ATTEMPT_IND, "Re-attempt indicator" }, /* 9.11.4.17 Re-attempt indicator */
7572 { DE_NAS_5GS_SM_5GSM_NW_FEATURE_SUP, "5GSM network feature support" }, /* 9.11.4.18 5GSM network feature support */
7573 /* 9.11.4.19 Void */
7574 { DE_NAS_5GS_SM_SERVING_PLMN_RTE_CTL, "Serving PLMN rate control" }, /* 9.11.4.20 Serving PLMN rate control */
7575 { DE_NAS_5GS_SM_5GSM_CONG_RE_ATTEMPT_IND, "5GSM congestion re-attempt indicator" }, /* 9.11.4.21 5GSM congestion re-attempt indicator */
7576 { DE_NAS_5GS_SM_ATSSS_CONT, "ATSSS container" }, /* 9.11.4.22 ATSSS container */
7577 { DE_NAS_5GS_SM_CTL_PLANE_ONLY_IND, "Control plane only indication" }, /* 9.11.4.23 Control plane only indication */
7578 { DE_NAS_5GS_SM_IP_HDR_COMP_CONF, "IP header compression configuration" }, /* 9.11.4.24 IP header compression configuration */
7579 { DE_NAS_5GS_SM_DS_TT_ETH_PORT_MAC_ADDR, " DS-TT Ethernet port MAC address" }, /* 9.11.4.25 DS-TT Ethernet port MAC address */
7580 { DE_NAS_5GS_SM_UE_DS_TT_RESIDENCE_T, "UE-DS-TT residence time" }, /* 9.11.4.26 UE-DS-TT residence time */
7581 { DE_NAS_5GS_SM_PORT_MGNT_INF_CONT, "Port management information container" }, /* 9.11.4.27 Port management information container */
7582 { DE_NAS_5GS_SM_ETH_HDR_COMP_CONF, "Ethernet header compression configuration" }, /* 9.11.4.28 Ethernet header compression configuration */
7583 { DE_NAS_5GS_SM_REMOTE_UE_CTX_LIST, "Remote UE context list" }, /* 9.11.4.29 Remote UE context list */
7584 { DE_NAS_5GS_SM_REQ_MBS_CONT, "Requested MBS container" }, /* 9.11.4.30 Requested MBS container */
7585 { DE_NAS_5GS_SM_REC_MBS_CONT, "Received MBS container" }, /* 9.11.4.30 Received MBS container */
7586 { DE_NAS_5GS_SM_PDU_SESSION_PAIR_ID, "PDU session pair ID" }, /* 9.11.4.32 PDU session pair ID */
7587 { DE_NAS_5GS_SM_RSN, "RSN" }, /* 9.11.4.33 RSN */
7588 { DE_NAS_5GS_SM_N3QAI, "N3QAI" }, /* 9.11.4.36 N3QAI */
7589 { DE_NAS_5GS_SM_N3GPP_DELAY_BUDGET, "Non-3GPP delay budget" }, /* 9.11.4.37 Non-3GPP delay budget */
7590 { DE_NAS_5GS_SM_URSP_RULE_ENFORCE_REPORTS, "URSP rule enforcement reports" }, /* 9.11.4.38 URSP rule enforcement reports */
7591 { DE_NAS_5GS_SM_PROT_DESC, "Protocol description" }, /* 9.11.4.39 Protocol description */
7593 { 0, NULL }
7595 value_string_ext nas_5gs_sm_elem_strings_ext = VALUE_STRING_EXT_INIT(nas_5gs_sm_elem_strings);
7597 #define NUM_NAS_5GS_SM_ELEM array_length(nas_5gs_sm_elem_strings)
7598 int ett_nas_5gs_sm_elem[NUM_NAS_5GS_SM_ELEM];
7600 uint16_t(*nas_5gs_sm_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
7601 uint32_t offset, unsigned len,
7602 char *add_string, int string_len) = {
7603 /* 5GS session management (5GSM) information elements */
7604 de_nas_5gs_sm_5gsm_cap, /* 9.11.4.1 5GSM capability */
7605 de_nas_5gs_sm_5gsm_cause, /* 9.11.4.2 5GSM cause */
7606 de_nas_5gs_sm_always_on_pdu_ses_ind, /* 9.11.4.3 Always-on PDU session indication */
7607 de_nas_5gs_sm_always_on_pdu_ses_req, /* 9.11.4.4 Always-on PDU session requested */
7608 de_nas_5gs_sm_5gsm_allowed_ssc_mode, /* 9.11.4.5 Allowed SSC mode */
7609 NULL, /* 9.11.4.6 Extended protocol configuration options */
7610 de_nas_5gs_sm_int_prot_max_data_rte, /* 9.11.4.7 Integrity protection maximum data rate */
7611 de_nas_5gs_sm_mapped_eps_b_cont, /* 9.11.4.8 Mapped EPS bearer contexts */
7612 de_nas_5gs_sm_max_num_sup_pkt_flt, /* 9.11.4.9 Maximum number of supported packet filters */
7613 de_nas_5gs_sm_pdu_address, /* 9.11.4.10 PDU address */
7614 de_nas_5gs_sm_pdu_session_type, /* 9.11.4.11 PDU session type */
7615 de_nas_5gs_sm_qos_flow_des, /* 9.11.4.12 QoS flow descriptions */
7616 de_nas_5gs_sm_qos_rules, /* 9.11.4.13 QoS rules */
7617 de_nas_5gs_sm_session_ambr, /* 9.11.4.14 Session-AMBR */
7618 de_nas_5gs_sm_pdu_dn_req_cont, /* 9.11.4.15 SM PDU DN request container */
7619 de_nas_5gs_sm_ssc_mode, /* 9.11.4.16 SSC mode */
7620 de_nas_5gs_sm_re_attempt_ind, /* 9.11.4.17 Re-attempt indicator */
7621 de_nas_5gs_sm_5gsm_nw_feature_sup, /* 9.11.4.18 5GSM network feature support */
7622 /* 9.11.4.19 Void */
7623 NULL, /* 9.11.4.20 Serving PLMN rate control */
7624 de_nas_5gs_sm_5gsm_cong_re_attempt_ind, /* 9.11.4.21 5GSM congestion re-attempt indicator */
7625 de_nas_5gs_sm_atsss_cont, /* 9.11.4.22 ATSSS container */
7626 de_nas_5gs_sm_ctl_plane_only_ind, /* 9.11.4.23 Control plane only indication */
7627 de_nas_5gs_sm_ip_hdr_comp_conf, /* 9.11.4.24 IP header compression configuration */
7628 de_nas_5gs_sm_ds_tt_eth_port_mac_addr, /* 9.11.4.25 DS-TT Ethernet port MAC address */
7629 de_nas_5gs_sm_ue_ds_tt_residence_t, /* 9.11.4.26 UE-DS-TT residence time */
7630 de_nas_5gs_sm_port_mgnt_inf_cont, /* 9.11.4.27 Port management information container */
7631 de_nas_5gs_sm_eth_hdr_comp_conf, /* 9.11.4.28 Ethernet header compression configuration */
7632 de_nas_5gs_sm_remote_ue_ctx_list, /* 9.11.4.29 Remote UE context list */
7633 de_nas_5gs_sm_req_mbs_cont, /* 9.11.4.30 Requested MBS container */
7634 de_nas_5gs_sm_rec_mbs_cont, /* 9.11.4.31 Received MBS container */
7635 de_nas_5gs_sm_pdu_session_pair_id, /* 9.11.4.32 PDU session pair ID */
7636 de_nas_5gs_sm_rsn, /* 9.11.4.33 RSN */
7637 de_nas_5gs_sm_n3qai, /* 9.11.4.36 N3QAI */
7638 de_nas_5gs_sm_n3gpp_delay_budget, /* 9.11.4.37 Non-3GPP delay budget */
7639 de_nas_5gs_sm_ursp_rule_enforce_reports,/* 9.11.4.38 URSP rule enforcement reports */
7640 de_nas_5gs_sm_prot_desc, /* 9.11.4.39 Protocol description */
7642 NULL, /* NONE */
7645 /* Gap fill msg decoding*/
7646 static void
7647 nas_5gs_exp_not_dissected_yet(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
7650 proto_tree_add_expert(tree, pinfo, &ei_nas_5gs_msg_not_dis, tvb, offset, len);
7654 * 8.2.1 Authentication request
7656 static void
7657 nas_5gs_mm_authentication_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
7659 uint32_t curr_offset;
7660 uint32_t consumed;
7661 unsigned curr_len;
7663 curr_offset = offset;
7664 curr_len = len;
7666 /*ngKSI NAS key set identifier 9.11.3.29 M V 1/2 */
7667 /* Spare half octet Spare half octet 9.5 M V 1/2 H1 */
7668 proto_tree_add_item(tree, hf_nas_5gs_spare_half_octet, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
7669 ELEM_MAND_V(NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_NAS_KEY_SET_ID, " - ngKSI", ei_nas_5gs_missing_mandatory_element);
7670 /* ABBA ABBA 9.11.3.10 M LV 3-n */
7671 ELEM_MAND_LV(NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_ABBA, NULL, ei_nas_5gs_missing_mandatory_element);
7672 /*21 Authentication parameter RAND (5G authentication challenge) Authentication parameter RAND 9.11.3.13 O TV 17*/
7673 ELEM_OPT_TV(0x21, GSM_A_PDU_TYPE_DTAP, DE_AUTH_PARAM_RAND, " - 5G authentication challenge");
7674 /*20 Authentication parameter AUTN (5G authentication challenge) Authentication parameter AUTN 9.11.3.14 O TLV 18*/
7675 ELEM_OPT_TLV(0x20, GSM_A_PDU_TYPE_DTAP, DE_AUTH_PARAM_AUTN, " - 5G authentication challenge");
7676 /*78 EAP message EAP message 9.10.2.2 O TLV-E 7-1503 */
7677 ELEM_OPT_TLV_E(0x78, NAS_5GS_PDU_TYPE_COMMON, DE_NAS_5GS_CMN_EAP_MESSAGE, NULL);
7680 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
7684 *8.2.2 Authentication response
7686 static void
7687 nas_5gs_mm_authentication_resp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
7689 uint32_t curr_offset;
7690 uint32_t consumed;
7691 unsigned curr_len;
7693 curr_offset = offset;
7694 curr_len = len;
7696 /* 2D Authentication response parameter Authentication response parameter 9.11.3.15 O TLV 6-18 */
7697 ELEM_OPT_TLV( 0x2d, NAS_PDU_TYPE_EMM, DE_EMM_AUTH_RESP_PAR, NULL);
7698 /* 78 EAP message EAP message 9.10.2.2 O TLV-E 7-1503 */
7699 ELEM_OPT_TLV_E(0x78, NAS_5GS_PDU_TYPE_COMMON, DE_NAS_5GS_CMN_EAP_MESSAGE, NULL);
7701 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
7706 * 8.2.3 Authentication result
7708 static void
7709 nas_5gs_mm_authentication_result(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
7711 uint32_t curr_offset;
7712 uint32_t consumed;
7713 unsigned curr_len;
7715 curr_offset = offset;
7716 curr_len = len;
7718 /* ngKSI NAS key set identifier 9.11.3.27 M V 1/2
7719 Spare half octet Spare half octet 9.5 M V 1/2 H1 */
7720 proto_tree_add_item(tree, hf_nas_5gs_spare_half_octet, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
7721 ELEM_MAND_V(NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_NAS_KEY_SET_ID, " - ngKSI", ei_nas_5gs_missing_mandatory_element);
7722 /* EAP message EAP message 9.11.2.2 M LV-E 7-1503 */
7723 ELEM_MAND_LV_E(NAS_5GS_PDU_TYPE_COMMON, DE_NAS_5GS_CMN_EAP_MESSAGE, NULL, ei_nas_5gs_missing_mandatory_element);
7724 /* 38 ABBA ABBA 9.11.3.10 O TLV 4-n */
7725 ELEM_OPT_TLV(0x38, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_ABBA, NULL);
7726 /* 55 AUN3 device security key AUN3 device security key 9.11.3.107 O TLV 36-n */
7727 ELEM_OPT_TLV(0x55, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_AUN3_DEVICE_SEC_KEY, NULL);
7729 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
7733 * 8.2.4 Authentication failure
7735 static void
7736 nas_5gs_mm_authentication_failure(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
7738 uint32_t curr_offset;
7739 uint32_t consumed;
7740 unsigned curr_len;
7742 curr_offset = offset;
7743 curr_len = len;
7745 /* 5GMM cause 5GMM cause 9.11.3.2 M V 1 */
7746 ELEM_MAND_V(NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_5GMM_CAUSE, NULL, ei_nas_5gs_missing_mandatory_element);
7748 /* 30 Authentication failure parameter Authentication failure parameter 9.11.3.14 O TLV 16 */
7749 ELEM_OPT_TLV(0x30, GSM_A_PDU_TYPE_DTAP, DE_AUTH_FAIL_PARAM, NULL);
7751 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
7755 * 8.2.5 Authentication reject
7757 static void
7758 nas_5gs_mm_authentication_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
7760 uint32_t curr_offset;
7761 uint32_t consumed;
7762 unsigned curr_len;
7764 curr_offset = offset;
7765 curr_len = len;
7767 /* 78 EAP message EAP message 9.11.2.2 O TLV-E 7-1503 */
7768 ELEM_OPT_TLV_E(0x78, NAS_5GS_PDU_TYPE_COMMON, DE_NAS_5GS_CMN_EAP_MESSAGE, NULL);
7771 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
7776 * 8.2.6 Registration request
7779 static void
7780 nas_5gs_mm_registration_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7782 uint32_t curr_offset;
7783 uint32_t consumed;
7784 unsigned curr_len;
7786 curr_offset = offset;
7787 curr_len = len;
7789 /* Direction: UE to network */
7790 pinfo->link_dir = P2P_DIR_UL;
7792 /* Initialize the private struct */
7793 nas5gs_get_private_data(pinfo);
7795 /* ngKSI NAS key set identifier 9.11.3.32 M V 1/2 H1*/
7796 /* 5GS registration type 5GS registration type 9.11.3.7 M V 1/2 H0*/
7797 ELEM_MAND_VV_SHORT(NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_5GS_REG_TYPE, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_NAS_KEY_SET_ID_H1, ei_nas_5gs_missing_mandatory_element);
7799 /* Mobile identity 5GS mobile identity 9.11.3.4 M LV-E 6-n*/
7800 ELEM_MAND_LV_E(NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_5GS_MOBILE_ID, NULL, ei_nas_5gs_missing_mandatory_element);
7802 /*C- Non-current native NAS KSI NAS key set identifier 9.11.3.32 O TV 1*/
7803 ELEM_OPT_TV_SHORT(0xc0, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_NAS_KEY_SET_ID, " - native KSI");
7805 /*10 5GMM capability 5GMM capability 9.11.3.1 O TLV 3-15*/
7806 ELEM_OPT_TLV(0x10, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_5GMM_CAP, NULL);
7808 /*2E UE security capability UE security capability 9.11.3.54 O TLV 4-10*/
7809 ELEM_OPT_TLV(0x2e, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_UE_SEC_CAP, NULL);
7811 /*2F Requested NSSAI NSSAI 9.11.3.37 O TLV 4-74*/
7812 ELEM_OPT_TLV(0x2f, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_NSSAI, " - Requested NSSAI");
7814 /*52 Last visited registered TAI 5GS tracking area identity 9.11.3.8 O TV 7 */
7815 ELEM_OPT_TV(0x52, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_5GS_TA_ID, " - Last visited registered TAI");
7817 /*17 S1 UE network capability S1 UE network capability 9.11.3.48 O TLV 4-15 */
7818 ELEM_OPT_TLV(0x17, NAS_PDU_TYPE_EMM, DE_EMM_UE_NET_CAP, NULL);
7820 /*40 Uplink data status Uplink data status 9.11.3.57 O TLV 4-34 */
7821 ELEM_OPT_TLV(0x40, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_UL_DATA_STATUS, NULL);
7823 /*50 PDU session status PDU session status 9.11.3.44 O TLV 4-34 */
7824 ELEM_OPT_TLV(0x50, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_PDU_SES_STATUS, NULL);
7826 /*B- MICO indication MICO indication 9.11.3.31 O TV 1*/
7827 ELEM_OPT_TV_SHORT(0xb0, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_MICO_IND, NULL);
7829 /*2B UE status UE status 9.11.3.56 O TLV 3*/
7830 ELEM_OPT_TLV(0x2b, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_UE_STATUS, NULL);
7832 /*77 Additional GUTI 5GS mobile identity 9.11.3.4 O TLV-E 14 */
7833 ELEM_OPT_TLV_E(0x77, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_5GS_MOBILE_ID, " - Additional GUTI");
7835 /*25 Allowed PDU session status Allowed PDU session status 9.11.3.13 O TLV 4 - 34 */
7836 ELEM_OPT_TLV(0x25, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_ALLOW_PDU_SES_STS, NULL);
7838 /*18 UE's usage setting UE's usage setting 9.11.3.55 O TLV 3 */
7839 ELEM_OPT_TLV(0x18, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_UE_USAGE_SET, NULL);
7841 /*51 Requested DRX parameters 5GS DRX parameters 9.11.3.2A O TLV 3 */
7842 ELEM_OPT_TLV(0x51, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_5GS_DRX_PARAM, " - Requested DRX parameters");
7844 /*70 EPS NAS message container EPS NAS message container 9.11.3.24 O TLV-E 4-n */
7845 ELEM_OPT_TLV_E(0x70, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_EPS_NAS_MSG_CONT, NULL);
7847 /* 74 LADN indication LADN indication 9.11.3.29 O TLV-E 3-811 */
7848 ELEM_OPT_TLV_E(0x74, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_LADN_INDIC, NULL);
7850 /* 8- Payload container type Payload container type 9.11.3.40 O TV 1 */
7851 ELEM_OPT_TV_SHORT(0x80, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_PLD_CONT_TYPE, NULL);
7853 /* 7B Payload container Payload container 9.11.3.39 O TLV-E 4-65538 */
7854 ELEM_OPT_TLV_E(0x7B, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_PLD_CONT, NULL);
7856 /* 9- Network slicing indication Network slicing indication 9.11.3.36 O TV 1 */
7857 ELEM_OPT_TV_SHORT(0x90, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_NW_SLICING_IND, NULL);
7859 /* 53 5GS update type 5GS update type 9.11.3.9A O TLV 3 */
7860 ELEM_OPT_TLV(0x53, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_UPDATE_TYPE, NULL);
7862 /* 41 Mobile station classmark 2 Mobile station classmark 2 9.11.3.31C O TLV 5 */
7863 ELEM_OPT_TLV(0x41, NAS_PDU_TYPE_COMMON, DE_EPS_MS_CM_2 , NULL );
7865 /* 42 Supported Codecs Supported Codec List 9.11.3.51A O TLV 5-n */
7866 ELEM_OPT_TLV(0x42, GSM_A_PDU_TYPE_DTAP, DE_SUP_CODEC_LIST, " - Supported Codecs");
7868 /* 71 NAS message container NAS message container 9.11.3.33 O TLV-E 4-n */
7869 ELEM_OPT_TLV_E(0x71, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_NAS_MSG_CONT, NULL);
7871 /* 60 EPS bearer context status EPS bearer context status 9.11.3.23A O TLV 4 */
7872 ELEM_OPT_TLV(0x60, NAS_PDU_TYPE_COMMON, DE_EPS_CMN_EPS_BE_CTX_STATUS, NULL);
7874 /* 6E Requested extended DRX parameters Extended DRX parameters 9.11.3.60 O TLV 3-4 */
7875 ELEM_OPT_TLV(0x6E, GSM_A_PDU_TYPE_GM, DE_EXT_DRX_PARAMS, NULL);
7876 /* 6A T3324 value GPRS timer 3 9.11.2.5 O TLV 3 */
7877 ELEM_OPT_TLV(0x6A, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - T3324 value");
7878 /* 67 UE radio capability ID UE radio capability ID 9.11.3.68 O TLV 3-n */
7879 ELEM_OPT_TLV(0x67, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_UE_RADIO_CAP_ID, NULL);
7880 /* 35 Requested mapped NSSAI Mapped NSSAI 9.11.3.31B O TLV 3-42 */
7881 ELEM_OPT_TLV(0x35, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_MAPPED_NSSAI, NULL);
7882 /* 48 Additional information requested Additional information requested 9.11.3.12A O TLV 3 */
7883 ELEM_OPT_TLV(0x48, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_ADD_INF_REQ, NULL);
7884 /* 1A Requested WUS assistance information WUS assistance information 9.11.3.71 O TLV 3-n */
7885 ELEM_OPT_TLV(0x1A, NAS_PDU_TYPE_EMM, DE_EMM_WUS_ASSIST_INFO, " - Requested");
7886 /* A- N5GC indication N5GC indication 9.11.3.72 O T 1 */
7887 ELEM_OPT_TV_SHORT(0xA0, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_N5GC_INDICATION, NULL);
7888 /* 30 Requested NB-N1 mode DRX parameters NB-N1 mode DRX parameters 9.11.3.73 O TLV 3 */
7889 ELEM_OPT_TLV(0x30, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_NB_N1_MODE_DRX_PARS, NULL);
7890 /* 29 UE request type UE request type 9.11.3.76 O TLV 3 */
7891 ELEM_OPT_TLV(0x29, NAS_PDU_TYPE_EMM, DE_EMM_UE_REQUEST_TYPE, NULL);
7892 /* 28 Paging restriction Paging restriction 9.11.3.77 O TLV 3-35 */
7893 ELEM_OPT_TLV(0x28, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_PAGING_RESTRICTION, NULL);
7894 /* 72 Service-level-AA container Service-level-AA container 9.11.2.10 O TLV-E 4-65538 */
7895 ELEM_OPT_TLV_E(0x72, NAS_5GS_PDU_TYPE_COMMON, DE_NAS_5GS_CMN_SERVICE_LEVEL_AA_CONT, NULL);
7896 /* 32 NID NID 9.11.3.79 O TLV 8 */
7897 ELEM_OPT_TLV(0x32, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_NID, NULL);
7898 /* 16 UE determined PLMN with disaster condition PLMN identity 9.11.3.85 O TLV 5 */
7899 ELEM_OPT_TLV(0x16, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_PLMN_ID, " - UE determined PLMN with disaster condition");
7900 /* 2A Requested PEIPS assistance information PEIPS assistance information 9.11.3.80 O TLV 3-n */
7901 ELEM_OPT_TLV(0x2A, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_PEIPS_ASSIST_INFO, " - Requested");
7902 /* 3B Requested T3512 value GPRS timer 3 9.11.2.5 O TLV 3 */
7903 ELEM_OPT_TLV(0x3B, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - Requested T3512 value");
7904 /* 3C Unavailability information Unavailability information 9.11.2.20 O TLV 3-9 */
7905 ELEM_OPT_TLV(0x3C, NAS_PDU_TYPE_EMM, DE_EMM_UNAVAIL_INFO, NULL);
7906 /* 3F Non-3GPP path switching information Non-3GPP path switching information 9.11.3.102 O TLV 3 */
7907 ELEM_OPT_TLV(0x3F, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_N3GPP_PATH_SWITCH_INFO, NULL);
7908 /* 56 AUN3 indication AUN3 indication 9.11.3.104 O TLV 3 */
7909 ELEM_OPT_TLV(0x56, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_AU3N_IND, NULL);
7911 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
7916 * 8.2.7 Registration accept
7919 static void
7920 nas_5gs_mm_registration_accept(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
7922 uint32_t curr_offset;
7923 uint32_t consumed;
7924 unsigned curr_len;
7926 curr_offset = offset;
7927 curr_len = len;
7929 /* 5GS registration result 5GS registration result 9.11.3.6 M LV 2*/
7930 ELEM_MAND_LV(NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_5GS_REG_RES, NULL, ei_nas_5gs_missing_mandatory_element);
7931 /*77 5G-GUTI 5GS mobile identity 9.11.3.4 O TLV-E 14 */
7932 ELEM_OPT_TLV_E(0x77, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_5GS_MOBILE_ID, " - 5G-GUTI");
7933 /*4A Equivalent PLMNs PLMN list 9.11.3.33 O TLV 5-47*/
7934 ELEM_OPT_TLV(0x4a, GSM_A_PDU_TYPE_COMMON, DE_PLMN_LIST, " - Equivalent PLMNs");
7935 /*54 TAI list Tracking area identity list 9.11.3.9 O TLV 9-114 */
7936 ELEM_OPT_TLV(0x54, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_5GS_TA_ID_LIST, NULL);
7937 /*15 Allowed NSSAI NSSAI 9.11.3.28 O TLV 4-74*/
7938 ELEM_OPT_TLV(0x15, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_NSSAI, " - Allowed NSSAI");
7939 /*11 Rejected NSSAI Rejected NSSAI 9.11.3.46 O TLV 4-42*/
7940 ELEM_OPT_TLV(0x11, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_REJ_NSSAI, NULL);
7941 /*31 Configured NSSAI NSSAI 9.11.3.34 O TLV 4-146 */
7942 ELEM_OPT_TLV(0x31, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_NSSAI, " - Configured NSSAI");
7943 /*21 5GS network feature support 5GS network feature support 9.11.3.5 O TLV 3-5 */
7944 ELEM_OPT_TLV(0x21, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_5GS_NW_FEAT_SUP, NULL);
7945 /*50 PDU session status PDU session status 9.10.2.2 O TLV 4*/
7946 ELEM_OPT_TLV(0x50, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_PDU_SES_STATUS, NULL);
7947 /*26 PDU session reactivation result PDU session reactivation result 9.11.3.32 O TLV 4-32*/
7948 ELEM_OPT_TLV(0x26, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_PDU_SES_REACT_RES, NULL);
7949 /*72 PDU session reactivation result error cause PDU session reactivation result error cause 9.11.3.40 O TLV-E 5-515*/
7950 ELEM_OPT_TLV_E(0x72, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_PDU_SES_REACT_RES_ERR_C, NULL);
7951 /*79 LADN information LADN information 9.11.3.19 O TLV-E 11-1579*/
7952 ELEM_OPT_TLV_E(0x79, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_LADN_INF, NULL);
7953 /*B- MICO indication MICO indication 9.11.3.31 O TV 1*/
7954 ELEM_OPT_TV_SHORT(0xb0, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_MICO_IND, NULL);
7955 /* 9- Network slicing indication Network slicing indication 9.11.3.36 O TV 1 */
7956 ELEM_OPT_TV_SHORT(0x90, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_NW_SLICING_IND, NULL);
7957 /*27 Service area list Service area list 9.11.3.47 O TLV 6-194*/
7958 ELEM_OPT_TLV(0x27, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_SAL, NULL);
7959 /*5E T3512 value GPRS timer 3 9.11.2.5 O TLV 3*/
7960 ELEM_OPT_TLV(0x5E, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - T3512 value");
7961 /*5D Non-3GPP de-registration timer value GPRS timer 2 9.11.3.20 O TLV 3*/
7962 ELEM_OPT_TLV(0x5D, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - Non-3GPP de-registration timer value");
7963 /*16 T3502 value GPRS timer 2 9.10.2.4 O TLV 3*/
7964 ELEM_OPT_TLV(0x16, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3502 value");
7965 /*34 Emergency number list Emergency number list 9.11.3.17 O TLV 5-50*/
7966 ELEM_OPT_TLV(0x34, GSM_A_PDU_TYPE_DTAP, DE_EMERGENCY_NUM_LIST, NULL);
7967 /*7A Extended emergency number list Extended emergency number list 9.11.3.24 O TLV-E 7-65538 */
7968 ELEM_OPT_TLV_E(0x7A, NAS_PDU_TYPE_EMM, DE_EMM_EXT_EMERG_NUM_LIST, NULL);
7969 /*73 SOR transparent container SOR transparent container 9.11.3.51 O TLV-E 20-2048 */
7970 ELEM_OPT_TLV_E(0x73, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_SOR_TRANSP_CONT, NULL);
7971 /*78 EAP message EAP message 9.10.2.2 O TLV-E 7-1503 */
7972 ELEM_OPT_TLV_E(0x78, NAS_5GS_PDU_TYPE_COMMON, DE_NAS_5GS_CMN_EAP_MESSAGE, NULL);
7973 /* A- NSSAI inclusion mode NSSAI inclusion mode 9.11.3.37A O TV 1 */
7974 ELEM_OPT_TV_SHORT(0xA0, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_NSSAI_INC_MODE, NULL);
7975 /* 76 Operator-defined access category definitions Operator-defined access category definitions 9.11.3.38 O TLV-E 3-8323 */
7976 ELEM_OPT_TLV_E(0x76, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_OP_DEF_ACC_CAT_DEF, NULL);
7977 /* 51 Negotiated DRX parameters 5GS DRX parameters 9.11.3.2A O TLV 3 */
7978 ELEM_OPT_TLV(0x51, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_5GS_DRX_PARAM, " - Negotiated DRX parameters");
7979 /* D- Non-3GPP NW policies Non-3GPP NW provided policies 9.11.3.36A O TV 1 */
7980 ELEM_OPT_TV_SHORT(0xD0, GSM_A_PDU_TYPE_GM, DE_NON_3GPP_NW_PROV_POL, NULL);
7981 /* 60 EPS bearer context status EPS bearer context status 9.11.3.59 O TLV 4 */
7982 ELEM_OPT_TLV(0x60, NAS_PDU_TYPE_COMMON, DE_EPS_CMN_EPS_BE_CTX_STATUS, NULL);
7983 /* 6E Negotiated extended DRX parameters Extended DRX parameters 9.11.3.60 O TLV 3-4 */
7984 ELEM_OPT_TLV(0x6E, GSM_A_PDU_TYPE_GM, DE_EXT_DRX_PARAMS, NULL);
7985 /* 6C T3447 value GPRS timer 3 9.11.2.5 O TLV 3 */
7986 ELEM_OPT_TLV(0x6C, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - T3447 value");
7987 /* 6B T3448 value GPRS timer 3 9.11.2.4 O TLV 3 */
7988 ELEM_OPT_TLV(0x6B, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3448 value");
7989 /* 6A T3324 value GPRS timer 3 9.11.2.5 O TLV 3 */
7990 ELEM_OPT_TLV(0x6A, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - T3324 value");
7991 /* 67 UE radio capability ID UE radio capability ID 9.11.3.yy O TLV 3-n */
7992 ELEM_OPT_TLV(0x67, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_UE_RADIO_CAP_ID, NULL);
7993 /* E- UE radio capability ID deletion indication UE radio capability ID deletion indication 9.11.3.69 O TV 1 */
7994 ELEM_OPT_TV_SHORT(0xE0, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_UE_RADIO_CAP_ID_DEL_IND, NULL);
7995 /* 39 Pending NSSAI NSSAI 9.11.3.37 O TLV 4-146 */
7996 ELEM_OPT_TLV(0x39, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_NSSAI, " - Pending NSSAI");
7997 /* 74 Ciphering key data Ciphering key data 9.11.3.18C O TLV-E 34-n */
7998 ELEM_OPT_TLV_E(0x74, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_CIPHERING_KEY_DATA, NULL);
7999 /* 75 CAG information list CAG information list 9.11.3.18A O TLV-E 3-n */
8000 ELEM_OPT_TLV_E(0x75, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_CAG_INFORMATION_LIST, NULL);
8001 /* 1B Truncated 5G-S-TMSI configuration Truncated 5G-S-TMSI configuration 9.11.3.70 O TLV 3 */
8002 ELEM_OPT_TLV(0x1B, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_TRUNCATED_5G_S_TMSI_CONF, NULL);
8003 /* 1C Negotiated WUS assistance information WUS assistance information 9.11.3.71 O TLV 3-n */
8004 ELEM_OPT_TLV(0x1C, NAS_PDU_TYPE_EMM, DE_EMM_WUS_ASSIST_INFO, " - Negotiated");
8005 /* 29 Negotiated NB-N1 mode DRX parameters NB-N1 mode DRX parameters 9.11.3.73 O TLV 3 */
8006 ELEM_OPT_TLV(0x29, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_NB_N1_MODE_DRX_PARS, NULL);
8007 /* 68 Extended rejected NSSAI Extended rejected NSSAI 9.11.3.75 O TLV 5-90 */
8008 ELEM_OPT_TLV(0x68, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_EXTENDED_REJECTED_NSSAI, NULL);
8009 /* 7B Service-level-AA container Service-level-AA container 9.11.2.10 O TLV-E 4-65538 */
8010 ELEM_OPT_TLV_E(0x7B, NAS_5GS_PDU_TYPE_COMMON, DE_NAS_5GS_CMN_SERVICE_LEVEL_AA_CONT, NULL);
8011 /* 33 Negotiated PEIPS assistance information PEIPS assistance information 9.11.3.80 O TLV 3-n */
8012 ELEM_OPT_TLV(0x33, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_PEIPS_ASSIST_INFO, " - Negotiated");
8013 /* 35 5GS additional request result 5GS additional request result 9.11.3.81 O TLV 3 */
8014 ELEM_OPT_TLV(0x35, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_5GS_ADD_REQ_RES, NULL);
8015 /* 70 NSSRG information NSSRG information 9.11.3.82 O TLV-E 7-4099 */
8016 ELEM_OPT_TLV_E(0x70, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_NSSRG_INFO, NULL);
8017 /* 14 Disaster roaming wait range Registration wait range 9.11.3.84 O TLV 4 */
8018 ELEM_OPT_TLV(0x14, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_REG_WAIT_RANGE, " - Disaster roaming");
8019 /* 2C Disaster return wait range Registration wait range 9.11.3.84 O TLV 4 */
8020 ELEM_OPT_TLV(0x2C, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_REG_WAIT_RANGE, " - Disaster return");
8021 /* 13 List of PLMNs to be used in disaster condition List of PLMNs to be used in disaster condition 9.11.3.83 O TLV 2-n */
8022 ELEM_OPT_TLV(0x13, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_PLMNS_LIST_DISASTER_COND, NULL);
8023 /* 1D Forbidden TAI(s) for the list of "5GS forbidden tracking areas for roaming" 5GS tracking area identity list 9.11.3.9 O TLV 9-114 */
8024 ELEM_OPT_TLV(0x1D, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_5GS_TA_ID_LIST, " - Forbidden TAI(s) for the list of \"5GS forbidden tracking areas for roaming\"");
8025 /* 1E Forbidden TAI(s) for the list of "5GS forbidden tracking areas for regional provision of service" 5GS tracking area identity list 9.11.3.9 O TLV 9-114 */
8026 ELEM_OPT_TLV(0x1E, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_5GS_TA_ID_LIST, " - Forbidden TAI(s) for the list of \"5GS forbidden tracking areas for regional provision of service\"");
8027 /* 71 Extended CAG information list Extended CAG information list 9.11.3.86 O TLV-E 3-n */
8028 ELEM_OPT_TLV_E(0x71, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_EXT_CAG_INFO_LIST, NULL);
8029 /* 7C NSAG information NSAG information 9.11.3.87 O TLV-E 9-3143 */
8030 ELEM_OPT_TLV_E(0x7C, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_NSAG_INFO, NULL);
8031 /* 3D Equivalent SNPNs SNPN list 9.11.3.92 O TLV 11-137 */
8032 ELEM_OPT_TLV(0x3D, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_SNPN_LIST, " - Equivalent SNPNs");
8033 /* 32 NID NID 9.11.3.79 O TLV 8 */
8034 ELEM_OPT_TLV(0x32, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_NID, NULL);
8035 /* 7D Registration accept type 6 IE container Type 6 IE container 9.11.3.98 O TLV-E 6-65538 */
8036 ELEM_OPT_TLV_E(0x7D, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_TYPE_6_IE_CONT, " - Registration accept type 6 IE container");
8037 /* 4B RAN timing synchronization RAN timing synchronization 9.11.3.95 O TLV 3 */
8038 ELEM_OPT_TLV(0x4B, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_RAN_TIMING_SYNC, NULL);
8039 /* 4C Alternative NSSAI Alternative NSSAI 9.11.3.97 O TLV 2-146 */
8040 ELEM_OPT_TLV(0x4C, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_ALT_NSSAI, NULL);
8041 /* 4F Maximum time offset GPRS timer 3 9.11.2.5 O TLV 3 */
8042 ELEM_OPT_TLV(0x4F, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - Maximum time offset");
8043 /* 5B S-NSSAI time validity information S-NSSAI time validity information 9.11.3.101 O TLV 23-257 */
8044 ELEM_OPT_TLV(0x5B, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_S_NSSAI_TIME_VALID_INFO, NULL);
8045 /* 3C Unavailability configuration Unavailability configuration 9.11.2.21 O TLV 3-9 */
8046 ELEM_OPT_TLV(0x3C, NAS_PDU_TYPE_EMM, DE_EMM_UNAVAIL_CONFIG, NULL);
8047 /* 5C Feature authorization indication Feature authorization indication 9.11.3.105 O TLV 3-257 */
8048 ELEM_OPT_TLV(0x5C, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_FEAT_AUTH_IND, NULL);
8049 /* 61 On-demand NSSAI On-demand NSSAI 9.11.3.108 O TLV 5-210 */
8050 ELEM_OPT_TLV(0x61, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_ON_DEMAND_NSSAI, NULL);
8052 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
8057 * 8.2.8 Registration complete
8059 static void
8060 nas_5gs_mm_registration_complete(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
8062 uint32_t curr_offset;
8063 uint32_t consumed;
8064 unsigned curr_len;
8066 curr_offset = offset;
8067 curr_len = len;
8069 /* 73 SOR transparent container SOR transparent container 9.11.3.51 O TLV-E 20-2048 */
8070 ELEM_OPT_TLV_E(0x73, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_SOR_TRANSP_CONT, NULL);
8072 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
8077 * 8.2.9 Registration reject
8079 static void
8080 nas_5gs_mm_registration_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
8082 uint32_t curr_offset;
8083 uint32_t consumed;
8084 unsigned curr_len;
8086 curr_offset = offset;
8087 curr_len = len;
8089 /* 5GMM cause 5GMM cause 9.11.3.2 M V 1 */
8090 ELEM_MAND_V(NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_5GMM_CAUSE, NULL, ei_nas_5gs_missing_mandatory_element);
8091 /* 5F T3346 value GPRS timer 2 9.11.3.16 O TLV 3 */
8092 ELEM_OPT_TLV(0x5F, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3346 value");
8093 /* 16 T3502 value GPRS timer 2 9.10.2.4 O TLV 3 */
8094 ELEM_OPT_TLV(0x16, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3502 value");
8095 /* 78 EAP message EAP message 9.10.2.2 O TLV-E 7-1503 */
8096 ELEM_OPT_TLV_E(0x78, NAS_5GS_PDU_TYPE_COMMON, DE_NAS_5GS_CMN_EAP_MESSAGE, NULL);
8097 /* 69 Rejected NSSAI Rejected NSSAI 9.11.3.46 O TLV 4-42 DE_NAS_5GS_MM_REJ_NSSAI*/
8098 ELEM_OPT_TLV(0x69, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_REJ_NSSAI, NULL);
8099 /* 75 CAG information list CAG information list 9.11.3.18A O TLV-E 3-n */
8100 ELEM_OPT_TLV_E(0x75, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_CAG_INFORMATION_LIST, NULL);
8101 /* 68 Extended rejected NSSAI Extended rejected NSSAI 9.11.3.75 O TLV 5-90 */
8102 ELEM_OPT_TLV(0x68, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_EXTENDED_REJECTED_NSSAI, NULL);
8103 /* 2C Disaster return wait range Registration wait range 9.11.3.84 O TLV 4 */
8104 ELEM_OPT_TLV(0x2C, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_REG_WAIT_RANGE, " - Disaster return");
8105 /* 71 Extended CAG information list Extended CAG information list 9.11.3.86 O TLV-E 3-n */
8106 ELEM_OPT_TLV_E(0x71, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_EXT_CAG_INFO_LIST, NULL);
8107 /* 3A Lower bound timer value GPRS timer 3 9.11.2.5 O TLV 3 */
8108 ELEM_OPT_TLV(0x3A, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - Lower bound timer value");
8109 /* 1D Forbidden TAI(s) for the list of "5GS forbidden tracking areas for roaming" 5GS tracking area identity list 9.11.3.9 O TLV 9-114 */
8110 ELEM_OPT_TLV(0x1D, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_5GS_TA_ID_LIST, " - Forbidden TAI(s) for the list of \"5GS forbidden tracking areas for roaming\"");
8111 /* 1E Forbidden TAI(s) for the list of "5GS forbidden tracking areas for regional provision of service" 5GS tracking area identity list 9.11.3.9 O TLV 9-114 */
8112 ELEM_OPT_TLV(0x1E, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_5GS_TA_ID_LIST, " - Forbidden TAI(s) for the list of \"5GS forbidden tracking areas for regional provision of service\"");
8113 /* 3E N3IWF identifier N3IWF identifier 9.11.3.93 O TLV 7-n */
8114 ELEM_OPT_TLV(0x3E, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_N3IWF_ID, NULL);
8115 /* 4D TNAN information TNAN information 9.11.3.94 O TLV 3-n */
8116 ELEM_OPT_TLV(0x4D, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_TNAN_INFO, NULL);
8117 /* 62 Extended 5GMM cause Extended 5GMM cause 9.11.3.109 O TLV 3 */
8118 ELEM_OPT_TLV(0x62, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_EXT_5GMM_CAUSE, NULL);
8120 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
8125 * 8.2.10 UL NAS transport
8127 static void
8128 nas_5gs_mm_ul_nas_transp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
8130 uint32_t curr_offset;
8131 uint32_t consumed;
8132 unsigned curr_len;
8134 /* Direction: UE to network */
8135 pinfo->link_dir = P2P_DIR_UL;
8137 curr_offset = offset;
8138 curr_len = len;
8140 /* Initialize the private struct */
8141 nas5gs_get_private_data(pinfo);
8143 /*Payload container type Payload container type 9.11.3.31 M V 1/2 */
8144 /*Spare half octet Spare half octet 9.5 M V 1/2*/
8145 proto_tree_add_item(tree, hf_nas_5gs_spare_half_octet, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
8146 ELEM_MAND_V(NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_PLD_CONT_TYPE, NULL, ei_nas_5gs_missing_mandatory_element);
8147 /*Payload container Payload container 9.11.3.30 M LV-E 3-65537*/
8148 ELEM_MAND_LV_E(NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_PLD_CONT, NULL, ei_nas_5gs_missing_mandatory_element);
8149 /*12 PDU session ID PDU session identity 2 9.11.3.41 C TV 2 */
8150 ELEM_OPT_TV(0x12, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_PDU_SES_ID_2, " - PDU session ID");
8151 /*59 Old PDU session ID PDU session identity 2 9.11.3.41 O TV 2 */
8152 ELEM_OPT_TV(0x59, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_PDU_SES_ID_2, " - Old PDU session ID");
8153 /*8- Request type Request type 9.11.3.42 O TV 1 */
8154 ELEM_OPT_TV_SHORT(0x80, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_REQ_TYPE, NULL);
8155 /*22 S-NSSAI S-NSSAI 9.11.2.8 O TLV 3-10 */
8156 ELEM_OPT_TLV(0x22, NAS_5GS_PDU_TYPE_COMMON, DE_NAS_5GS_CMN_S_NSSAI, NULL);
8157 /*25 DNN DNN 9.11.2.1B O TLV 3-102 */
8158 ELEM_OPT_TLV(0x25, NAS_5GS_PDU_TYPE_COMMON, DE_NAS_5GS_CMN_DNN, NULL);
8159 /*24 Additional information Additional information 9.10.2.1 O TLV 3-n */
8160 ELEM_OPT_TLV(0x24, NAS_5GS_PDU_TYPE_COMMON, DE_NAS_5GS_CMN_ADD_INF, NULL);
8161 /* A- MA PDU session information MA PDU session information 9.11.3.31A O TV 1 DE_NAS_5GS_MM_MA_PDU_SES_INF*/
8162 ELEM_OPT_TV_SHORT(0xA0, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_MA_PDU_SES_INF, NULL);
8163 /* F- Release assistance indication Release assistance indication 9.11.3.46A O TV 1 */
8164 ELEM_OPT_TV_SHORT(0xF0, NAS_PDU_TYPE_ESM, DE_ESM_REL_ASSIST_IND, NULL);
8165 /*4E Non-3GPP access path switching indication Non-3GPP access path switching indication 9.11.3.99 O TLV 3 */
8166 ELEM_OPT_TLV(0x4E, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_N3GPP_ACC_PATH_SWITCH_IND, NULL);
8167 /*5A Alternative S-NSSAI S-NSSAI 9.11.2.8 O TLV 3-10 */
8168 ELEM_OPT_TLV(0x5A, NAS_5GS_PDU_TYPE_COMMON, DE_NAS_5GS_CMN_S_NSSAI, " - Alternative S-NSSAI");
8169 /* 9- Payload container information Payload container information 9.11.3.106 O TV 1 */
8170 ELEM_OPT_TV_SHORT(0x90, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_PAYLOAD_CONT_INFO, NULL);
8172 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
8177 * 8.2.11 DL NAS transport
8179 static void
8180 nas_5gs_mm_dl_nas_transp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
8182 uint32_t curr_offset;
8183 uint32_t consumed;
8184 unsigned curr_len;
8186 /* Direction: network to UE */
8187 pinfo->link_dir = P2P_DIR_DL;
8189 curr_offset = offset;
8190 curr_len = len;
8192 /* Initialize the private struct */
8193 nas5gs_get_private_data(pinfo);
8195 /*Payload container type Payload container type 9.11.3.40 M V 1/2 H0*/
8196 /*Spare half octet Spare half octet 9.5 M V 1/2 H1*/
8197 proto_tree_add_item(tree, hf_nas_5gs_spare_half_octet, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
8198 ELEM_MAND_V(NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_PLD_CONT_TYPE, NULL, ei_nas_5gs_missing_mandatory_element);
8199 /*Payload container Payload container 9.11.3.39 M LV-E 3-65537*/
8200 ELEM_MAND_LV_E(NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_PLD_CONT, NULL, ei_nas_5gs_missing_mandatory_element);
8201 /*12 PDU session ID PDU session identity 2 9.11.3.41 C TV 2 */
8202 ELEM_OPT_TV(0x12, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_PDU_SES_ID_2, " - PDU session ID");
8203 /*24 Additional information Additional information 9.10.2.1 O TLV 3-n*/
8204 ELEM_OPT_TLV(0x24, NAS_5GS_PDU_TYPE_COMMON, DE_NAS_5GS_CMN_ADD_INF, NULL);
8205 /*58 5GMM cause 5GMM cause 9.11.3.2 O TV 2 */
8206 ELEM_OPT_TV(0x58, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_5GMM_CAUSE, NULL);
8207 /*37 Back-off timer value GPRS timer 3 9.11.2.5 O TLV 3 */
8208 ELEM_OPT_TLV(0x37, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - Back-off timer value");
8209 /*3A Lower bound timer value GPRS timer 3 9.11.2.5 O TLV 3 */
8210 ELEM_OPT_TLV(0x3A, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - Lower bound timer value");
8212 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
8217 * 8.2.12 De-registration request (UE originating de-registration)
8219 static void
8220 nas_5gs_mm_de_reg_req_ue_orig(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
8222 uint32_t curr_offset;
8223 uint32_t consumed;
8224 unsigned curr_len;
8226 curr_offset = offset;
8227 curr_len = len;
8229 /* De-registration type De-registration type 9.11.3.18 M V 1 */
8230 /* ngKSI NAS key set identifier 9.11.3.32 M V 1/2 H1 */
8231 ELEM_MAND_VV_SHORT(NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_DE_REG_TYPE, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_NAS_KEY_SET_ID_H1, ei_nas_5gs_missing_mandatory_element);
8232 /*5GS mobile identity 5GS mobile identity 9.11.3.4 M LV-E 6-n */
8233 ELEM_MAND_LV_E(NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_5GS_MOBILE_ID, NULL, ei_nas_5gs_missing_mandatory_element);
8234 /* 3C Unavailability information Unavailability information 9.11.2.20 O TLV 3-9 */
8235 ELEM_OPT_TLV(0x3C, NAS_PDU_TYPE_EMM, DE_EMM_UNAVAIL_INFO, NULL);
8236 /* 71 NAS message container NAS message container 9.11.3.33 O TLV-E 4-n */
8237 ELEM_OPT_TLV_E(0x71, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_NAS_MSG_CONT, NULL);
8239 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
8244 * 8.2.13 De-registration accept (UE originating de-registration)
8246 /* No data */
8249 * 8.2.14 De-registration request (UE terminated de-registration)
8251 static void
8252 nas_5gs_mm_de_registration_req_ue_term(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
8254 uint32_t curr_offset;
8255 uint32_t consumed;
8256 unsigned curr_len;
8258 curr_offset = offset;
8259 curr_len = len;
8261 /* De-registration type De-registration type 9.11.3.20 M V 1 */
8262 ELEM_MAND_V(NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_DE_REG_TYPE, NULL, ei_nas_5gs_missing_mandatory_element);
8263 /* Spare half octet Spare half octet 9.5 M V 1/2 */
8264 /* 58 5GMM cause 5GMM cause 9.11.3.2 O TV 2 */
8265 ELEM_OPT_TV(0x58, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_5GMM_CAUSE, NULL);
8266 /* 5F T3346 value GPRS timer 2 9.11.2.4 O TLV 3 */
8267 ELEM_OPT_TLV(0x5F, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3346 value");
8268 /* 6D Rejected NSSAI Rejected NSSAI 9.11.3.46 O TLV 4-42 */
8269 ELEM_OPT_TLV(0x6D, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_REJ_NSSAI, NULL);
8270 /* 75 CAG information list CAG information list 9.11.3.18A O TLV-E 3-n */
8271 ELEM_OPT_TLV_E(0x75, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_CAG_INFORMATION_LIST, NULL);
8272 /* 68 Extended rejected NSSAI Extended rejected NSSAI 9.11.3.75 O TLV 5-90 */
8273 ELEM_OPT_TLV(0x68, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_EXTENDED_REJECTED_NSSAI, NULL);
8274 /* 2C Disaster return wait range Registration wait range 9.11.3.84 O TLV 4 */
8275 ELEM_OPT_TLV(0x2C, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_REG_WAIT_RANGE, " - Disaster return");
8276 /* 71 Extended CAG information list Extended CAG information list 9.11.3.86 O TLV-E 3-n */
8277 ELEM_OPT_TLV_E(0x71, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_EXT_CAG_INFO_LIST, NULL);
8278 /* 3A Lower bound timer value GPRS timer 3 9.11.2.5 O TLV 3 */
8279 ELEM_OPT_TLV(0x3A, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - Lower bound timer value");
8280 /* 1D Forbidden TAI(s) for the list of "5GS forbidden tracking areas for roaming" 5GS tracking area identity list 9.11.3.9 O TLV 9-114 */
8281 ELEM_OPT_TLV(0x1D, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_5GS_TA_ID_LIST, " - Forbidden TAI(s) for the list of \"5GS forbidden tracking areas for roaming\"");
8282 /* 1E Forbidden TAI(s) for the list of "5GS forbidden tracking areas for regional provision of service" 5GS tracking area identity list 9.11.3.9 O TLV 9-114 */
8283 ELEM_OPT_TLV(0x1E, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_5GS_TA_ID_LIST, " - Forbidden TAI(s) for the list of \"5GS forbidden tracking areas for regional provision of service\"");
8285 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
8290 * 8.2.15 De-registration accept (UE terminated de-registration)
8292 /* No data */
8296 * 8.2.16 Service request
8298 static void
8299 nas_5gs_mm_service_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
8301 uint32_t curr_offset;
8302 uint32_t consumed;
8303 unsigned curr_len;
8305 curr_offset = offset;
8306 curr_len = len;
8308 /* ngKSI NAS key set identifier 9.11.3.29 M V 1/2 */
8309 /* Service type Service type 9.11.3.50 M V 1/2 */
8310 ELEM_MAND_VV_SHORT(NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_NAS_KEY_SET_ID, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_SERV_TYPE, ei_nas_5gs_missing_mandatory_element);
8311 /* 5G-S-TMSI 5GS mobile identity 9.11.3.4 M LV 6 */
8312 ELEM_MAND_LV_E(NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_5GS_MOBILE_ID, NULL, ei_nas_5gs_missing_mandatory_element);
8313 /*40 Uplink data status Uplink data status 9.11.3.53 O TLV 4 - 34*/
8314 ELEM_OPT_TLV(0x40, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_UL_DATA_STATUS, NULL);
8315 /*50 PDU session status PDU session status 9.11.3.40 O TLV 4 - 34*/
8316 ELEM_OPT_TLV(0x50, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_PDU_SES_STATUS, NULL);
8317 /*25 Allowed PDU session status Allowed PDU session status 9.11.3.11 O TLV 4 - 34*/
8318 ELEM_OPT_TLV(0x25, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_ALLOW_PDU_SES_STS, NULL);
8319 /* 71 NAS message container NAS message container 9.11.3.33 O TLV-E 4-n */
8320 ELEM_OPT_TLV_E(0x71, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_NAS_MSG_CONT, NULL);
8321 /* 29 UE request type UE request type 9.11.3.76 O TLV 3 */
8322 ELEM_OPT_TLV(0x29, NAS_PDU_TYPE_EMM, DE_EMM_UE_REQUEST_TYPE, NULL);
8323 /* 28 Paging restriction Paging restriction 9.11.3.77 O TLV 3-35 */
8324 ELEM_OPT_TLV(0x28, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_PAGING_RESTRICTION, NULL);
8326 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
8331 * 8.2.17 Service accept
8333 static void
8334 nas_5gs_mm_service_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
8336 uint32_t curr_offset;
8337 uint32_t consumed;
8338 unsigned curr_len;
8340 curr_offset = offset;
8341 curr_len = len;
8343 /*50 PDU session status PDU session status 9.11.3.44 O TLV 4-34*/
8344 ELEM_OPT_TLV(0x50, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_PDU_SES_STATUS, NULL);
8346 /*26 PDU session reactivation result PDU session reactivation result 9.11.3.42 O TLV 4-32*/
8347 ELEM_OPT_TLV(0x26, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_PDU_SES_REACT_RES, NULL);
8348 /*72 PDU session reactivation result error cause PDU session reactivation result error cause 9.11.3.43 O TLV-E 5-515 */
8349 ELEM_OPT_TLV_E(0x72, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_PDU_SES_REACT_RES_ERR_C, NULL);
8350 /*78 EAP message EAP message 9.11.2.2 O TLV-E 7-1503*/
8351 ELEM_OPT_TLV_E(0x78, NAS_5GS_PDU_TYPE_COMMON, DE_NAS_5GS_CMN_EAP_MESSAGE, NULL);
8352 /* 6B T3448 value GPRS timer 2 9.11.2.4 O TLV 3 */
8353 ELEM_OPT_TLV(0x6B, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3448 value");
8354 /* 34 5GS additional request result 5GS additional request result 9.11.3.81 O TLV 3 */
8355 ELEM_OPT_TLV(0x34, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_5GS_ADD_REQ_RES, NULL);
8356 /* 1D Forbidden TAI(s) for the list of "5GS forbidden tracking areas for roaming" 5GS tracking area identity list 9.11.3.9 O TLV 9-114 */
8357 ELEM_OPT_TLV(0x1D, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_5GS_TA_ID_LIST, " - Forbidden TAI(s) for the list of \"5GS forbidden tracking areas for roaming\"");
8358 /* 1E Forbidden TAI(s) for the list of "5GS forbidden tracking areas for regional provision of service" 5GS tracking area identity list 9.11.3.9 O TLV 9-114 */
8359 ELEM_OPT_TLV(0x1E, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_5GS_TA_ID_LIST, " - Forbidden TAI(s) for the list of \"5GS forbidden tracking areas for regional provision of service\"");
8361 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
8365 * 8.2.18 Service reject
8367 static void
8368 nas_5gs_mm_service_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
8370 uint32_t curr_offset;
8371 uint32_t consumed;
8372 unsigned curr_len;
8374 curr_offset = offset;
8375 curr_len = len;
8377 /* 5GMM cause 5GMM cause 9.11.3.2 M V 1 */
8378 ELEM_MAND_V(NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_5GMM_CAUSE, NULL, ei_nas_5gs_missing_mandatory_element);
8379 /*50 PDU session status PDU session status 9.11.3.44 O TLV 4*/
8380 ELEM_OPT_TLV(0x50, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_PDU_SES_STATUS, NULL);
8381 /* 5F T3346 value GPRS timer 2 9.11.2.4 O TLV 3 */
8382 ELEM_OPT_TLV(0x5F, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3346 value");
8383 /* 78 EAP message EAP message 9.11.2.2 O TLV-E 7-1503 */
8384 ELEM_OPT_TLV_E(0x78, NAS_5GS_PDU_TYPE_COMMON, DE_NAS_5GS_CMN_EAP_MESSAGE, NULL);
8385 /* 6B T3448 value GPRS timer 3 9.11.2.4 O TLV 3 */
8386 ELEM_OPT_TLV(0x6B, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3448 value");
8387 /* 75 CAG information list CAG information list 9.11.3.18A O TLV-E 3-n */
8388 ELEM_OPT_TLV_E(0x75, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_CAG_INFORMATION_LIST, NULL);
8389 /* 2C Disaster return wait range Registration wait range 9.11.3.84 O TLV 4 */
8390 ELEM_OPT_TLV(0x2C, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_REG_WAIT_RANGE, " - Disaster return");
8391 /* 71 Extended CAG information list Extended CAG information list 9.11.3.86 O TLV-E 3-n */
8392 ELEM_OPT_TLV_E(0x71, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_EXT_CAG_INFO_LIST, NULL);
8393 /* 3A Lower bound timer value GPRS timer 3 9.11.2.5 O TLV 3 */
8394 ELEM_OPT_TLV(0x3A, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - Lower bound timer value");
8395 /* 1D Forbidden TAI(s) for the list of "5GS forbidden tracking areas for roaming" 5GS tracking area identity list 9.11.3.9 O TLV 9-114 */
8396 ELEM_OPT_TLV(0x1D, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_5GS_TA_ID_LIST, " - Forbidden TAI(s) for the list of \"5GS forbidden tracking areas for roaming\"");
8397 /* 1E Forbidden TAI(s) for the list of "5GS forbidden tracking areas for regional provision of service" 5GS tracking area identity list 9.11.3.9 O TLV 9-114 */
8398 ELEM_OPT_TLV(0x1E, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_5GS_TA_ID_LIST, " - Forbidden TAI(s) for the list of \"5GS forbidden tracking areas for regional provision of service\"");
8400 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
8405 * 8.2.19 Configuration update command
8407 static void
8408 nas_5gs_mm_conf_upd_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
8410 uint32_t curr_offset;
8411 uint32_t consumed;
8412 unsigned curr_len;
8414 curr_offset = offset;
8415 curr_len = len;
8417 /*D- Configuration update indication Configuration update indication 9.11.3.16 O TV 1 */
8418 ELEM_OPT_TV_SHORT(0xD0, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_CONF_UPD_IND, NULL);
8419 /*77 5G-GUTI 5GS mobile identity 9.11.3.4 O TLV TBD*/
8420 ELEM_OPT_TLV_E(0x77, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_5GS_MOBILE_ID, NULL);
8421 /*54 TAI list Tracking area identity list 9.11.3.45 O TLV 8-98*/
8422 ELEM_OPT_TLV(0x54, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_5GS_TA_ID_LIST, NULL);
8423 /*15 Allowed NSSAI NSSAI 9.11.3.28 O TLV 4-74*/
8424 ELEM_OPT_TLV(0x15, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_NSSAI, " - Allowed NSSAI");
8425 /*27 Service area list Service area list 9.11.3.39 O TLV 6-194 */
8426 ELEM_OPT_TLV(0x27, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_SAL, NULL);
8427 /*43 Full name for network Network name 9.11.3.26 O TLV 3-n*/
8428 ELEM_OPT_TLV(0x43, GSM_A_PDU_TYPE_DTAP, DE_NETWORK_NAME, " - Full name for network");
8429 /*45 Short name for network Network name 9.11.3.26 O TLV 3-n*/
8430 ELEM_OPT_TLV(0x45, GSM_A_PDU_TYPE_DTAP, DE_NETWORK_NAME, " - Short Name");
8431 /*46 Local time zone Time zone 9.11.3.52 O TV 2*/
8432 ELEM_OPT_TV(0x46, GSM_A_PDU_TYPE_DTAP, DE_TIME_ZONE, " - Local");
8433 /*47 Universal time and local time zone Time zone and time 9.11.3.53 O TV 8*/
8434 ELEM_OPT_TV(0x47, GSM_A_PDU_TYPE_DTAP, DE_TIME_ZONE_TIME, " - Universal Time and Local Time Zone");
8435 /*49 Network daylight saving time Daylight saving time 9.11.3.11 O TLV 3*/
8436 ELEM_OPT_TLV(0x49, GSM_A_PDU_TYPE_DTAP, DE_DAY_SAVING_TIME, NULL);
8437 /*79 LADN information LADN information 9.11.3.19 O TLV-E 11-1579*/
8438 ELEM_OPT_TLV_E(0x79, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_LADN_INF, NULL);
8439 /*B- MICO indication MICO indication 9.11.3.31 O TV 1*/
8440 ELEM_OPT_TV_SHORT(0xB0, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_MICO_IND, NULL);
8441 /* 9- Network slicing indication Network slicing indication 9.11.3.36 O TV 1 */
8442 ELEM_OPT_TV_SHORT(0x90, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_NW_SLICING_IND, NULL);
8443 /*31 Configured NSSAI NSSAI 9.11.3.28 O TLV 4-74*/
8444 ELEM_OPT_TLV(0x31, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_NSSAI, " - Configured NSSAI");
8445 /*11 Rejected NSSAI Rejected NSSAI 9.11.3.46 O TLV 4-42*/
8446 ELEM_OPT_TLV(0x11, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_REJ_NSSAI, NULL);
8447 /* 76 Operator-defined access category definitions Operator-defined access category definitions 9.11.3.38 O TLV-E 3-8323 */
8448 ELEM_OPT_TLV_E(0x76, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_OP_DEF_ACC_CAT_DEF, NULL);
8449 /* F- SMS indication SMS indication 9.10.3.50A O TV 1 */
8450 ELEM_OPT_TV_SHORT(0xF0, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_SMS_IND, NULL);
8451 /* 6C T3447 value GPRS timer 3 9.11.2.5 O TLV 3 */
8452 ELEM_OPT_TLV(0x6c, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - T3447");
8453 /* 75 C75 CAG information list CAG information list 9.11.3.18A O TLV-E 3-n */
8454 ELEM_OPT_TLV_E(0x75, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_CAG_INFORMATION_LIST, NULL);
8455 /* 67 UE radio capability ID UE radio capability ID 9.11.3.68 O TLV 3-n */
8456 ELEM_OPT_TLV(0x67, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_UE_RADIO_CAP_ID, NULL);
8457 /* A- UE radio capability ID deletion indication UE radio capability ID deletion indication 9.11.3.69 O TV 1 */
8458 ELEM_OPT_TV_SHORT(0xA0, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_UE_RADIO_CAP_ID_DEL_IND, NULL);
8459 /* 44 5GS registration result 5GS registration result 9.11.3.6 O TLV 3 */
8460 ELEM_OPT_TLV(0x44, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_5GS_REG_RES, NULL);
8461 /* 1B Truncated 5G-S-TMSI configuration Truncated 5G-S-TMSI configuration 9.11.3.70 O TLV 3 */
8462 ELEM_OPT_TLV(0x1B, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_TRUNCATED_5G_S_TMSI_CONF, NULL);
8463 /* C- Additional configuration indication Additional configuration indication 9.11.3.74 O TV 1 */
8464 ELEM_OPT_TV_SHORT(0xC0, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_ADDITIONAL_CONF_IND, NULL);
8465 /* 68 Extended rejected NSSAI Extended rejected NSSAI 9.11.3.75 O TLV 5-90 */
8466 ELEM_OPT_TLV(0x68, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_EXTENDED_REJECTED_NSSAI, NULL);
8467 /* 72 Service-level-AA container Service-level-AA container 9.11.2.10 O TLV-E 4-65538 */
8468 ELEM_OPT_TLV_E(0x72, NAS_5GS_PDU_TYPE_COMMON, DE_NAS_5GS_CMN_SERVICE_LEVEL_AA_CONT, NULL);
8469 /* 70 NSSRG information NSSRG information 9.11.3.82 O TLV-E 7-4099 */
8470 ELEM_OPT_TLV_E(0x70, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_NSSRG_INFO, NULL);
8471 /* 14 Disaster roaming wait range Registration wait range 9.11.3.84 O TLV 4 */
8472 ELEM_OPT_TLV(0x14, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_REG_WAIT_RANGE, " - Disaster roaming");
8473 /* 2C Disaster return wait range Registration wait range 9.11.3.84 O TLV 4 */
8474 ELEM_OPT_TLV(0x2C, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_REG_WAIT_RANGE, " - Disaster return");
8475 /* 13 List of PLMNs to be used in disaster condition List of PLMNs to be used in disaster condition 9.11.3.83 O TLV 2-n */
8476 ELEM_OPT_TLV(0x13, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_PLMNS_LIST_DISASTER_COND, NULL);
8477 /* 71 Extended CAG information list Extended CAG information list 9.11.3.86 O TLV-E 3-n */
8478 ELEM_OPT_TLV_E(0x71, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_EXT_CAG_INFO_LIST, NULL);
8479 /* 1F Updated PEIPS assistance information PEIPS assistance information 9.11.3.80 O TLV 3-n */
8480 ELEM_OPT_TLV(0x1F, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_PEIPS_ASSIST_INFO, " - Updated");
8481 /* 73 NSAG information NSAG information 9.11.3.87 O TLV-E 9-3143 */
8482 ELEM_OPT_TLV_E(0x73, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_NSAG_INFO, NULL);
8483 /* E- Priority indicator Priority indicator 9.11.3.91 O TV 1 */
8484 ELEM_OPT_TV_SHORT(0xE0, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_PRIO_IND, NULL);
8485 /* 4B RAN timing synchronization RAN timing synchronization 9.11.3.95 O TLV 3 */
8486 ELEM_OPT_TLV(0x4B, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_RAN_TIMING_SYNC, NULL);
8487 /* 78 Extended LADN information Extended LADN information 9.11.3.96 O TLV-E 3-1787 */
8488 ELEM_OPT_TLV_E(0x78, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_EXT_LADN_INFO, NULL);
8489 /* 4C Alternative NSSAI Alternative NSSAI 9.11.3.97 O TLV 2-146 */
8490 ELEM_OPT_TLV(0x4C, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_ALT_NSSAI, NULL);
8491 /* 7B S-NSSAI location validity information S-NSSAI location validity information 9.11.3.100 O TLV-E 17-38611 */
8492 ELEM_OPT_TLV_E(0x7B, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_ALT_NSSAI, NULL);
8493 /* 5B S-NSSAI time validity information S-NSSAI time validity information 9.11.3.101 O TLV 23-257 */
8494 ELEM_OPT_TLV(0x5B, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_S_NSSAI_TIME_VALID_INFO, NULL);
8495 /* 4F Maximum time offset GPRS timer 3 9.11.2.5 O TLV 3 */
8496 ELEM_OPT_TLV(0x4F, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - Maximum time offset");
8497 /* 74 Partially allowed NSSAI Partial NSSAI 9.11.3.103 O TLV-E 3-808 */
8498 ELEM_OPT_TLV_E(0x74, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_PARTIAL_NSSAI, " - Partially allowed NSSAI");
8499 /* 7A Partially rejected NSSAI Partial NSSAI 9.11.3.103 O TLV-E 3-808 */
8500 ELEM_OPT_TLV_E(0x7A, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_PARTIAL_NSSAI, " - Partially rejected NSSAI");
8501 /* 5C Feature authorization indication Feature authorization indication 9.11.3.105 O TLV 3-257 */
8502 ELEM_OPT_TLV(0x5C, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_FEAT_AUTH_IND, NULL);
8503 /* 61 On-demand NSSAI On-demand NSSAI 9.11.3.108 O TLV 5-210 */
8504 ELEM_OPT_TLV(0x61, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_ON_DEMAND_NSSAI, NULL);
8506 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
8511 * 8.2.20 Configuration update complete
8513 static void
8514 nas_5gs_mm_conf_update_comp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
8516 uint32_t curr_offset;
8517 unsigned curr_len;
8519 curr_offset = offset;
8520 curr_len = len;
8522 /* No Data */
8523 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
8526 * 8.2.21 Identity request
8528 static void
8529 nas_5gs_mm_id_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
8531 uint32_t curr_offset;
8532 uint32_t consumed;
8533 unsigned curr_len;
8535 curr_offset = offset;
8536 curr_len = len;
8538 /* Identity type 5GS identity type 9.11.3.3 M V 1/2 */
8539 /* Spare half octet Spare half octet 9.5 M V 1/2 */
8540 proto_tree_add_item(tree, hf_nas_5gs_spare_half_octet, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
8541 ELEM_MAND_V(NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_5GS_IDENTITY_TYPE, NULL, ei_nas_5gs_missing_mandatory_element);
8544 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
8549 * 8.2.22 Identity response
8551 static void
8552 nas_5gs_mm_id_resp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
8554 uint32_t curr_offset;
8555 uint32_t consumed;
8556 unsigned curr_len;
8558 curr_offset = offset;
8559 curr_len = len;
8561 /* Mobile identity 5GS mobile identity 9.11.3.4 M LV-E 3-n */
8562 ELEM_MAND_LV_E(NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_5GS_MOBILE_ID, NULL, ei_nas_5gs_missing_mandatory_element);
8565 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
8570 * 8.2.23 Notification
8572 static void
8573 nas_5gs_mm_notification(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
8575 uint32_t curr_offset;
8576 uint32_t consumed;
8577 unsigned curr_len;
8579 curr_offset = offset;
8580 curr_len = len;
8582 /* Access type Access type 9.11.2.1A M V 1/2 DE_NAS_5GS_ACCESS_TYPE */
8583 /* Spare half octet Spare half octet 9.5 M V 1/2 */
8584 proto_tree_add_item(tree, hf_nas_5gs_spare_half_octet, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
8585 ELEM_MAND_V(NAS_5GS_PDU_TYPE_COMMON, DE_NAS_5GS_ACCESS_TYPE, NULL, ei_nas_5gs_missing_mandatory_element);
8588 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
8593 * 8.2.24 Notification response
8595 static void
8596 nas_5gs_mm_notification_resp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
8598 uint32_t curr_offset;
8599 uint32_t consumed;
8600 unsigned curr_len;
8602 curr_offset = offset;
8603 curr_len = len;
8605 /* 50 PDU session status PDU session status 9.11.3.40 O TLV 4-34 */
8606 ELEM_OPT_TLV(0x50, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_PDU_SES_STATUS, NULL);
8608 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
8613 * 8.2.25 Security mode command
8615 static void
8616 nas_5gs_mm_sec_mode_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
8618 uint32_t curr_offset;
8619 uint32_t consumed;
8620 unsigned curr_len;
8622 curr_offset = offset;
8623 curr_len = len;
8625 /* Direction: network to UE */
8626 /*Selected NAS security algorithms NAS security algorithms 9.11.3.34 M V 1 */
8627 ELEM_MAND_V(NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_NAS_SEC_ALGO, NULL, ei_nas_5gs_missing_mandatory_element);
8628 /*ngKSI NAS key set identifier 9.11.3.32 M V 1/2 */
8629 /* Spare half octet Spare half octet 9.5 M V 1/2 */
8630 proto_tree_add_item(tree, hf_nas_5gs_spare_half_octet, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
8631 ELEM_MAND_V(NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_NAS_KEY_SET_ID, " - ngKSI", ei_nas_5gs_missing_mandatory_element);
8632 /*Replayed UE security capabilities UE security capability 9.11.3.54 M LV 3-5*/
8633 ELEM_MAND_LV(NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_UE_SEC_CAP, " - Replayed UE security capabilities", ei_nas_5gs_missing_mandatory_element);
8634 /*E- IMEISV request IMEISV request 9.11.3.28 O TV 1*/
8635 ELEM_OPT_TV_SHORT(0xE0, NAS_PDU_TYPE_EMM, DE_EMM_IMEISV_REQ, NULL);
8636 /*57 Selected EPS NAS security algorithms EPS NAS security algorithms 9.11.3.25 O TV 2 */
8637 ELEM_OPT_TV(0x57, NAS_PDU_TYPE_EMM, DE_EMM_NAS_SEC_ALGS, " - Selected EPS NAS security algorithms");
8638 /*36 Additional 5G security information Additional 5G security information 9.11.3.12 O TLV 3 */
8639 ELEM_OPT_TLV(0x36, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_ADD_5G_SEC_INF, NULL);
8640 /*78 EAP message EAP message 9.10.2.2 O TLV-E 7*/
8641 ELEM_OPT_TLV_E(0x78, NAS_5GS_PDU_TYPE_COMMON, DE_NAS_5GS_CMN_EAP_MESSAGE, NULL);
8642 /*38 ABBA ABBA 9.11.3.10 O TLV 4-n */
8643 ELEM_OPT_TLV(0x38, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_ABBA, NULL);
8644 /*19 Replayed S1 UE security capabilities S1 UE security capability 9.11.3.48A O TLV 4-7 */
8645 ELEM_OPT_TLV(0x19, NAS_PDU_TYPE_EMM, DE_EMM_UE_SEC_CAP, " - Replayed S1 UE security capabilities");
8646 /* 55 AUN3 device security key AUN3 device security key 9.11.3.107 O TLV 36-257 */
8647 ELEM_OPT_TLV(0x55, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_AUN3_DEVICE_SEC_KEY, NULL);
8649 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
8654 * 8.2.26 Security mode complete
8656 static void
8657 nas_5gs_mm_sec_mode_comp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
8659 uint32_t curr_offset;
8660 uint32_t consumed;
8661 unsigned curr_len;
8663 curr_offset = offset;
8664 curr_len = len;
8666 /* 77 IMEISV 5G mobile identity 9.11.3.4 O TLV-E 11 */
8667 ELEM_OPT_TLV_E(0x77, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_5GS_MOBILE_ID, NULL);
8668 /* 71 NAS message container NAS message container 9.11.3.33 O TLV-E 4-n */
8669 ELEM_OPT_TLV_E(0x71, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_NAS_MSG_CONT, NULL);
8670 /* 78 non-IMEISV PEI 5GS mobile identity 9.11.3.4 O TLV-E 7-n */
8671 ELEM_OPT_TLV_E(0x78, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_5GS_MOBILE_ID, " - non-IMEISV PEI");
8673 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
8678 * 8.2.27 Security mode reject
8681 static void
8682 nas_5gs_mm_sec_mode_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
8684 uint32_t curr_offset;
8685 uint32_t consumed;
8686 unsigned curr_len;
8688 curr_offset = offset;
8689 curr_len = len;
8691 /* 5GMM cause 5GMM cause 9.11.3.2 M V 1 */
8692 ELEM_MAND_V(NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_5GMM_CAUSE, NULL, ei_nas_5gs_missing_mandatory_element);
8694 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
8699 * 8.2.28 Security protected 5GS NAS message
8703 * 8.2.29 5GMM status
8706 static void
8707 nas_5gs_mm_5gmm_status(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
8709 uint32_t curr_offset;
8710 uint32_t consumed;
8711 unsigned curr_len;
8713 curr_offset = offset;
8714 curr_len = len;
8716 /* Direction: both*/
8717 /* 5GMM cause 5GMM cause 9.11.3.2 M V 1 */
8718 ELEM_MAND_V(NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_5GMM_CAUSE, NULL, ei_nas_5gs_missing_mandatory_element);
8720 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
8725 * 8.2.30 Control Plane Service request
8728 static void
8729 nas_5gs_mm_control_plane_service_req(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_, uint32_t offset, unsigned len)
8731 uint32_t curr_offset;
8732 uint32_t consumed;
8733 unsigned curr_len;
8735 curr_offset = offset;
8736 curr_len = len;
8738 /* UE to network */
8739 pinfo->link_dir = P2P_DIR_UL;
8741 /* Control plane service type Control plane service type 9.11.3.18D M V 1/2 */
8742 /* ngKSI NAS key set identifier 9.11.3.32 M V 1/2 */
8743 ELEM_MAND_VV_SHORT(NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_CTRL_PLANE_SERVICE_TYPE, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_NAS_KEY_SET_ID_H1, ei_nas_5gs_missing_mandatory_element);
8744 /* 6F CIoT small data container CIoT small data container 9.11.3.18B O TLV 4-257 */
8745 ELEM_OPT_TLV(0x6f, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_CIOT_SMALL_DATA_CONT, NULL);
8746 /* 8- Payload container type Payload container type 9.11.3.40 O TV 1 */
8747 ELEM_OPT_TV_SHORT(0x80, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_PLD_CONT_TYPE, NULL);
8748 /* 7B Payload container Payload container 9.11.3.39 O TLV-E 4-65538 */
8749 ELEM_OPT_TLV_E(0x7B, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_PLD_CONT, NULL);
8750 /* 12 PDU session ID PDU session identity 2 9.11.3.41 C TV 2 */
8751 ELEM_OPT_TV(0x12, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_PDU_SES_ID_2, " - PDU session ID");
8752 /* 50 PDU session status PDU session status 9.11.3.44 O TLV 4-34 */
8753 ELEM_OPT_TLV(0x50, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_PDU_SES_STATUS, NULL);
8754 /* F- Release assistance indication Release assistance indication 9.11.3.46A O TV 1 */
8755 ELEM_OPT_TV_SHORT(0xF0, NAS_PDU_TYPE_ESM, DE_ESM_REL_ASSIST_IND, NULL);
8756 /* 40 Uplink data status Uplink data status 9.11.3.57 O TLV 4-34 */
8757 ELEM_OPT_TLV(0x40, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_UL_DATA_STATUS, NULL);
8758 /* 71 NAS message container NAS message container 9.11.3.33 O TLV-E 4-n */
8759 ELEM_OPT_TLV_E(0x71, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_NAS_MSG_CONT, NULL);
8760 /* 24 Additional information Additional information 9.11.2.1 O TLV 3-n */
8761 ELEM_OPT_TLV_E(0x71, NAS_5GS_PDU_TYPE_COMMON, DE_NAS_5GS_CMN_ADD_INF, NULL);
8762 /* 25 Allowed PDU session status Allowed PDU session status 9.11.3.11 O TLV 4-34 */
8763 ELEM_OPT_TLV(0x25, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_ALLOW_PDU_SES_STS, NULL);
8764 /* 29 UE request type UE request type 9.11.3.76 O TLV 3 */
8765 ELEM_OPT_TLV(0x29, NAS_PDU_TYPE_EMM, DE_EMM_UE_REQUEST_TYPE, NULL);
8766 /* 28 Paging restriction Paging restriction 9.11.3.77 O TLV 3-35 */
8767 ELEM_OPT_TLV(0x28, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_PAGING_RESTRICTION, NULL);
8769 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
8774 * 8.2.31 Network slice-specific authentication command
8776 static void
8777 nas_5gs_mm_nw_slice_spec_auth_cmd(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_, uint32_t offset, unsigned len)
8779 uint32_t curr_offset;
8780 uint32_t consumed;
8781 unsigned curr_len;
8783 curr_offset = offset;
8784 curr_len = len;
8786 /* network to UE */
8787 /* S-NSSAI S-NSSAI 9.11.2.8 M LV 2-5 */
8788 ELEM_MAND_LV(NAS_5GS_PDU_TYPE_COMMON, DE_NAS_5GS_CMN_S_NSSAI, NULL, ei_nas_5gs_missing_mandatory_element);
8789 /* EAP message EAP message 9.11.2.2 M LV-E 6-1502 */
8790 ELEM_MAND_LV_E(NAS_5GS_PDU_TYPE_COMMON, DE_NAS_5GS_CMN_EAP_MESSAGE, NULL, ei_nas_5gs_missing_mandatory_element);
8792 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
8797 * 8.2.32 Network slice-specific authentication complete
8799 static void
8800 nas_5gs_mm_nw_slice_spec_auth_comp(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_, uint32_t offset, unsigned len)
8802 uint32_t curr_offset;
8803 uint32_t consumed;
8804 unsigned curr_len;
8806 curr_offset = offset;
8807 curr_len = len;
8809 /* UE to network */
8810 /* S-NSSAI S-NSSAI 9.11.2.8 M LV 2-5 */
8811 ELEM_MAND_LV(NAS_5GS_PDU_TYPE_COMMON, DE_NAS_5GS_CMN_S_NSSAI, NULL, ei_nas_5gs_missing_mandatory_element);
8812 /* EAP message EAP message 9.11.2.2 M LV-E 6-1502 */
8813 ELEM_MAND_LV_E(NAS_5GS_PDU_TYPE_COMMON, DE_NAS_5GS_CMN_EAP_MESSAGE, NULL, ei_nas_5gs_missing_mandatory_element);
8815 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
8820 * 8.2.33 Network slice-specific authentication result
8822 static void
8823 nas_5gs_mm_nw_slice_spec_auth_res(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_, uint32_t offset, unsigned len)
8825 uint32_t curr_offset;
8826 uint32_t consumed;
8827 unsigned curr_len;
8829 curr_offset = offset;
8830 curr_len = len;
8832 /* network to UE */
8833 /* S-NSSAI S-NSSAI 9.11.2.8 M LV 2-5 */
8834 ELEM_MAND_LV(NAS_5GS_PDU_TYPE_COMMON, DE_NAS_5GS_CMN_S_NSSAI, NULL, ei_nas_5gs_missing_mandatory_element);
8835 /* EAP message EAP message 9.11.2.2 M LV-E 6-1502 */
8836 ELEM_MAND_LV_E(NAS_5GS_PDU_TYPE_COMMON, DE_NAS_5GS_CMN_EAP_MESSAGE, NULL, ei_nas_5gs_missing_mandatory_element);
8838 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
8843 * 8.2.34 Relay key request
8845 static void
8846 nas_5gs_mm_relay_key_request(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_, uint32_t offset, unsigned len)
8848 uint32_t curr_offset;
8849 uint32_t consumed;
8850 unsigned curr_len;
8852 curr_offset = offset;
8853 curr_len = len;
8855 /* UE to network */
8856 /* PRTI ProSe relay transaction identity 9.11.3.88 M V 1 */
8857 ELEM_MAND_V(NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_PROSE_RELAY_TRANS_ID, NULL, ei_nas_5gs_missing_mandatory_element);
8858 /* Relay key request parameters Relay key request parameters 9.11.3.89 M LV-E 22-65537 */
8859 ELEM_MAND_LV_E(NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_RELAY_KEY_REQ_PARAMS, NULL, ei_nas_5gs_missing_mandatory_element);
8861 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
8865 * 8.2.35 Relay key accept
8867 static void
8868 nas_5gs_mm_relay_key_accept(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_, uint32_t offset, unsigned len)
8870 uint32_t curr_offset;
8871 uint32_t consumed;
8872 unsigned curr_len;
8874 curr_offset = offset;
8875 curr_len = len;
8877 /* network to UE */
8878 /* PRTI ProSe relay transaction identity 9.11.3.88 M V 1 */
8879 ELEM_MAND_V(NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_PROSE_RELAY_TRANS_ID, NULL, ei_nas_5gs_missing_mandatory_element);
8880 /* Relay key response parameters Relay key response parameters 9.11.3.90 M LV-E 51-65537 */
8881 ELEM_MAND_LV_E(NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_RELAY_KEY_REQ_PARAMS, NULL, ei_nas_5gs_missing_mandatory_element);
8882 /* 78 EAP message EAP message 9.10.2.2 O TLV-E 7 - 1503 */
8883 ELEM_OPT_TLV_E(0x78, NAS_5GS_PDU_TYPE_COMMON, DE_NAS_5GS_CMN_EAP_MESSAGE, NULL);
8885 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
8889 * 8.2.36 Relay key reject
8891 static void
8892 nas_5gs_mm_relay_key_reject(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_, uint32_t offset, unsigned len)
8894 uint32_t curr_offset;
8895 uint32_t consumed;
8896 unsigned curr_len;
8898 curr_offset = offset;
8899 curr_len = len;
8901 /* network to UE */
8902 /* PRTI ProSe relay transaction identity 9.11.3.88 M V 1 */
8903 ELEM_MAND_V(NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_PROSE_RELAY_TRANS_ID, NULL, ei_nas_5gs_missing_mandatory_element);
8904 /* 78 EAP message EAP message 9.10.2.2 O TLV-E 7 - 1503 */
8905 ELEM_OPT_TLV_E(0x78, NAS_5GS_PDU_TYPE_COMMON, DE_NAS_5GS_CMN_EAP_MESSAGE, NULL);
8907 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
8911 * 8.2.37 Relay authentication request
8913 static void
8914 nas_5gs_mm_relay_authentication_request(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_, uint32_t offset, unsigned len)
8916 uint32_t curr_offset;
8917 uint32_t consumed;
8918 unsigned curr_len;
8920 curr_offset = offset;
8921 curr_len = len;
8923 /* network to UE */
8924 /* PRTI ProSe relay transaction identity 9.11.3.88 M V 1 */
8925 ELEM_MAND_V(NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_PROSE_RELAY_TRANS_ID, NULL, ei_nas_5gs_missing_mandatory_element);
8926 /* EAP message EAP message 9.10.2.2 O LV-E 6 - 1502 */
8927 ELEM_MAND_LV_E(NAS_5GS_PDU_TYPE_COMMON, DE_NAS_5GS_CMN_EAP_MESSAGE, NULL, ei_nas_5gs_missing_mandatory_element);
8929 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
8933 * 8.2.38 Relay authentication response
8935 static void
8936 nas_5gs_mm_relay_authentication_response(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_, uint32_t offset, unsigned len)
8938 uint32_t curr_offset;
8939 uint32_t consumed;
8940 unsigned curr_len;
8942 curr_offset = offset;
8943 curr_len = len;
8945 /* UE to network */
8946 /* PRTI ProSe relay transaction identity 9.11.3.88 M V 1 */
8947 ELEM_MAND_V(NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_PROSE_RELAY_TRANS_ID, NULL, ei_nas_5gs_missing_mandatory_element);
8948 /* EAP message EAP message 9.10.2.2 O LV-E 6 - 1502 */
8949 ELEM_MAND_LV_E(NAS_5GS_PDU_TYPE_COMMON, DE_NAS_5GS_CMN_EAP_MESSAGE, NULL, ei_nas_5gs_missing_mandatory_element);
8951 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
8954 /* 8.3 5GS session management messages */
8957 * 8.3.1 PDU session establishment request
8959 static void
8960 nas_5gs_sm_pdu_ses_est_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
8962 uint32_t curr_offset;
8963 uint32_t consumed;
8964 unsigned curr_len;
8966 curr_offset = offset;
8967 curr_len = len;
8969 /* Direction: UE to network */
8970 pinfo->link_dir = P2P_DIR_UL;
8972 /*Integrity protection maximum data rate Integrity protection maximum data rate 9.11.4.7 M V 2*/
8973 ELEM_MAND_V(NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_INT_PROT_MAX_DATA_RTE, NULL, ei_nas_5gs_missing_mandatory_element);
8974 /*9- PDU session type PDU session type 9.11.4.5 O TV 1*/
8975 ELEM_OPT_TV_SHORT(0x90, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_PDU_SESSION_TYPE, NULL);
8976 /*A- SSC mode SSC mode 9.11.4.9 O TV 1*/
8977 ELEM_OPT_TV_SHORT(0xa0, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_SSC_MODE, NULL);
8978 /*28 5GSM capability 5GSM capability 9.11.4.10 O TLV 3-15 */
8979 ELEM_OPT_TLV(0x28, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_5GSM_CAP, NULL);
8980 /*55 Maximum number of supported packet filter Maximum number of supported packet filter 9.11.4.9 O TV 3*/
8981 ELEM_OPT_TV(0x55, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_MAX_NUM_SUP_PKT_FLT, NULL);
8982 /* B- Always-on PDU session requested Always-on PDU session requested 9.11.4.4 O TV 1 */
8983 ELEM_OPT_TV_SHORT(0xB0, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_ALWAYS_ON_PDU_SES_REQ, NULL);
8984 /*39 SM PDU DN request container SM PDU DN request container 9.11.4.15 O TLV 3-255 */
8985 ELEM_OPT_TLV(0x39, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_PDU_DN_REQ_CONT, NULL);
8986 /*7B Extended protocol configuration options Extended protocol configuration options 9.11.4.2 O TLV-E 4-65538*/
8987 ELEM_OPT_TLV_E(0x7B, NAS_PDU_TYPE_ESM, DE_ESM_EXT_PCO, NULL);
8988 /* 66 Header compression configuration Header compression configuration 9.11.4.24 O TLV 5-257 */
8989 ELEM_OPT_TLV(0x66, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_IP_HDR_COMP_CONF, NULL);
8990 /* 6E DS-TT Ethernet port MAC address DS-TT Ethernet port MAC address 9.11.4.25 O TLV 8 */
8991 ELEM_OPT_TLV(0x6E, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_DS_TT_ETH_PORT_MAC_ADDR, NULL);
8992 /* 6F UE-DS-TT residence time UE-DS-TT residence time 9.11.4.26 O TLV 10 */
8993 ELEM_OPT_TLV(0x6F, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_UE_DS_TT_RESIDENCE_T, NULL);
8994 /* 74 Port management information container Port management information container 9.11.4.27 O TLV-E 8-65538 */
8995 ELEM_OPT_TLV_E(0x74, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_PORT_MGNT_INF_CONT, NULL);
8996 /* 1F Ethernet header compression configuration Ethernet header compression configuration 9.11.4.28 O TLV 3 */
8997 ELEM_OPT_TLV(0x1F, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_ETH_HDR_COMP_CONF, NULL);
8998 /* 29 Suggested interface identifier PDU address 9.11.4.10 O TLV 11 */
8999 ELEM_OPT_TLV(0x29, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_PDU_ADDRESS, " - Suggested interface identifier");
9000 /* 72 Service-level-AA container Service-level-AA container 9.11.2.10 O TLV-E 4-65538 */
9001 ELEM_OPT_TLV_E(0x72, NAS_5GS_PDU_TYPE_COMMON, DE_NAS_5GS_CMN_SERVICE_LEVEL_AA_CONT, NULL);
9002 /* 70 Requested MBS container Requested MBS container 9.11.4.30 O TLV-E 8-65538 */
9003 ELEM_OPT_TLV_E(0x70, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_REQ_MBS_CONT, NULL);
9004 /* 34 PDU session pair ID PDU session pair ID 9.11.4.32 O TLV 3 */
9005 ELEM_OPT_TLV(0x34, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_PDU_SESSION_PAIR_ID, NULL);
9006 /* 35 RSN RSN 9.11.4.33 O TLV 3 */
9007 ELEM_OPT_TLV(0x35, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_RSN, NULL);
9008 /* 36 URSP rule enforcement reports URSP rule enforcement reports 9.11.4.38 O TLV 4-n */
9009 ELEM_OPT_TLV(0x36, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_URSP_RULE_ENFORCE_REPORTS, NULL);
9011 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
9016 * 8.3.2 PDU session establishment accept
9018 static void
9019 nas_5gs_sm_pdu_ses_est_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
9021 uint32_t curr_offset;
9022 uint32_t consumed;
9023 unsigned curr_len;
9025 curr_offset = offset;
9026 curr_len = len;
9028 /* Direction: network to UE */
9029 pinfo->link_dir = P2P_DIR_DL;
9031 /*Selected SSC mode SSC mode 9.11.4.9 M V 1/2 H1*/
9032 proto_tree_add_item(tree, hf_nas_5gs_sm_sel_sc_mode, tvb, offset, 1, ENC_BIG_ENDIAN);
9033 /*Selected PDU session type PDU session type 9.11.4.5 M V 1/2 H0*/
9034 ELEM_MAND_V(NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_PDU_SESSION_TYPE, " - Selected PDU session type", ei_nas_5gs_missing_mandatory_element);
9035 /*Authorized QoS rules QoS rules 9.11.4.6 M LV-E 2-65537 DE_NAS_5GS_SM_QOS_RULES*/
9036 ELEM_MAND_LV_E(NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_QOS_RULES, " - Authorized QoS rules", ei_nas_5gs_missing_mandatory_element);
9037 /*Session AMBR Session-AMBR 9.11.4.14 M LV 7 */
9038 ELEM_MAND_LV(NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_SESSION_AMBR, NULL, ei_nas_5gs_missing_mandatory_element);
9039 /*59 5GSM cause 5GSM cause 9.11.4.2 O TV 2*/
9040 ELEM_OPT_TV(0x59, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_5GSM_CAUSE, NULL);
9041 /*29 PDU address PDU address 9.11.4.10 O TLV 7 */
9042 ELEM_OPT_TLV(0x29, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_PDU_ADDRESS, NULL);
9043 /*56 RQ timer value GPRS timer 9.10.2.3 O TV 2*/
9044 ELEM_OPT_TV(0x56, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER, " - RQ timer value");
9045 /*22 S-NSSAI S-NSSAI 9.11.2.8 O TLV 3-6*/
9046 ELEM_OPT_TLV(0x22, NAS_5GS_PDU_TYPE_COMMON, DE_NAS_5GS_CMN_S_NSSAI, NULL);
9047 /* 8- Always-on PDU session indication Always-on PDU session indication 9.11.4.3 O TV 1 */
9048 ELEM_OPT_TV_SHORT(0x80, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_ALWAYS_ON_PDU_SES_IND, NULL);
9049 /* 75 Mapped EPS bearer contexts Mapped EPS bearer contexts 9.11.4.9 O TLV-E 7-65538 */
9050 ELEM_OPT_TLV_E(0x75, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_MAPPED_EPS_B_CONT, NULL);
9051 /*78 EAP message EAP message 9.11.3.14 O TLV-E 7-1503*/
9052 ELEM_OPT_TLV_E(0x78, NAS_5GS_PDU_TYPE_COMMON, DE_NAS_5GS_CMN_EAP_MESSAGE, NULL);
9053 /*79 Authorized QoS flow descriptions QoS flow descriptions 9.11.4.12 O TLV-E 6-65538 */
9054 ELEM_OPT_TLV_E(0x79, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_QOS_FLOW_DES, " - Authorized");
9055 /*7B Extended protocol configuration options Extended protocol configuration options 9.11.4.2 O TLV-E 4-65538*/
9056 ELEM_OPT_TLV_E(0x7B, NAS_PDU_TYPE_ESM, DE_ESM_EXT_PCO, NULL);
9057 /* 25 DNN DNN 9.11.2.1B O TLV 3-102 */
9058 ELEM_OPT_TLV(0x25, NAS_5GS_PDU_TYPE_COMMON, DE_NAS_5GS_CMN_DNN, NULL);
9059 /* 17 5GSM network feature support 5GSM network feature support 9.11.4.18 O TLV 3-15 */
9060 ELEM_OPT_TLV(0x17, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_5GSM_NW_FEATURE_SUP, NULL);
9061 /* 18 Serving PLMN rate control Serving PLMN rate control 9.11.4.20 O TLV 4 */
9062 ELEM_OPT_TLV(0x18, NAS_PDU_TYPE_ESM, DE_ESM_SERV_PLMN_RATE_CTRL, NULL);
9063 /* 77 ATSSS container ATSSS container 9.11.4.22 O TLV-E 3-65538 */
9064 ELEM_OPT_TLV_E(0x77, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_ATSSS_CONT, NULL);
9065 /* C- Control plane only indication Control plane only indication 9.11.4.23 O TV 1 */
9066 ELEM_OPT_TV_SHORT(0xC0, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_CTL_PLANE_ONLY_IND, NULL);
9067 /* 66 IP header compression configuration IP header compression configuration 9.11.4.24 O TLV 5-257 */
9068 ELEM_OPT_TLV(0x66, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_IP_HDR_COMP_CONF, NULL);
9069 /* 1F Ethernet header compression configuration Ethernet header compression configuration 9.11.4.28 O TLV 3 */
9070 ELEM_OPT_TLV(0x1F, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_ETH_HDR_COMP_CONF, NULL);
9071 /* 72 Service-level-AA container Service-level-AA container 9.11.2.10 O TLV-E 4-65538 */
9072 ELEM_OPT_TLV_E(0x72, NAS_5GS_PDU_TYPE_COMMON, DE_NAS_5GS_CMN_SERVICE_LEVEL_AA_CONT, NULL);
9073 /* 71 Received MBS container Received MBS container 9.11.4.31 O TLV-E 8-65538 */
9074 ELEM_OPT_TLV_E(0x71, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_REC_MBS_CONT, NULL);
9075 /* 70 N3QAI N3QAI 9.11.4.36 O TLV-E 9-n */
9076 ELEM_OPT_TLV_E(0x70, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_N3QAI, NULL);
9077 /* 73 Protocol description Protocol description 9.11.4.39 O TLV-E 6-n */
9078 ELEM_OPT_TLV_E(0x73, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_PROT_DESC, NULL);
9080 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
9085 * 8.3.3 PDU session establishment reject
9088 static void
9089 nas_5gs_sm_pdu_ses_est_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
9091 uint32_t curr_offset;
9092 uint32_t consumed;
9093 unsigned curr_len;
9095 curr_offset = offset;
9096 curr_len = len;
9098 /* Direction: network to UE */
9099 pinfo->link_dir = P2P_DIR_DL;
9101 /* 5GSM cause 5GSM cause 9.11.4.2 M V 1 */
9102 ELEM_MAND_V(NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_5GSM_CAUSE, " - ESM cause", ei_nas_5gs_missing_mandatory_element);
9103 /*37 Back-off timer value GPRS timer 3 9.11.2.5 O TLV 3 */
9104 ELEM_OPT_TLV(0x37, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - Back-off timer value");
9105 /*F- Allowed SSC mode Allowed SSC mode 9.11.4.3 O TV 1*/
9106 ELEM_OPT_TV_SHORT(0xF0, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_5GSM_ALLOWED_SSC_MODE, NULL);
9107 /*78 EAP message EAP message 9.11.3.14 O TLV - E 7 - 1503*/
9108 ELEM_OPT_TLV_E(0x78, NAS_5GS_PDU_TYPE_COMMON, DE_NAS_5GS_CMN_EAP_MESSAGE, NULL);
9109 /* 61 5GSM congestion re-attempt indicator 5GSM congestion re-attempt indicator 9.11.4.21 O TLV 3 */
9110 ELEM_OPT_TLV(0x61, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_5GSM_CONG_RE_ATTEMPT_IND, NULL);
9111 /*7B Extended protocol configuration options Extended protocol configuration options 9.11.4.2 O TLV - E 4 - 65538*/
9112 ELEM_OPT_TLV_E(0x7B, NAS_PDU_TYPE_ESM, DE_ESM_EXT_PCO, NULL);
9113 /* 1D Re-attempt indicator Re-attempt indicator 9.11.4.17 O TLV 3 */
9114 ELEM_OPT_TLV(0x1D, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_RE_ATTEMPT_IND, NULL);
9115 /* 72 Service-level-AA container Service-level-AA container 9.11.2.10 O TLV-E 4-65538 */
9116 ELEM_OPT_TLV_E(0x72, NAS_5GS_PDU_TYPE_COMMON, DE_NAS_5GS_CMN_SERVICE_LEVEL_AA_CONT, NULL);
9118 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
9123 * 8.3.4 PDU session authentication command
9126 static void
9127 nas_5gs_sm_pdu_ses_auth_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
9129 uint32_t curr_offset;
9130 uint32_t consumed;
9131 unsigned curr_len;
9133 curr_offset = offset;
9134 curr_len = len;
9136 /* Direction: network to UE */
9137 pinfo->link_dir = P2P_DIR_DL;
9139 /*EAP message EAP message 9.11.2.2 M LV-E 6-1502 */
9140 ELEM_MAND_LV_E(NAS_5GS_PDU_TYPE_COMMON, DE_NAS_5GS_CMN_EAP_MESSAGE, NULL, ei_nas_5gs_missing_mandatory_element);
9142 /*7B Extended protocol configuration options Extended protocol configuration options 9.11.4.2 O TLV - E 4 - 65538*/
9143 ELEM_OPT_TLV_E(0x7B, NAS_PDU_TYPE_ESM, DE_ESM_EXT_PCO, NULL);
9146 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
9150 * 8.3.5 PDU session authentication complete
9153 static void
9154 nas_5gs_sm_pdu_ses_auth_comp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
9156 uint32_t curr_offset;
9157 uint32_t consumed;
9158 unsigned curr_len;
9160 curr_offset = offset;
9161 curr_len = len;
9163 /* Direction: UE to network */
9164 pinfo->link_dir = P2P_DIR_UL;
9166 /*EAP message EAP message 9.11.2.2 M LV-E 6-1502 */
9167 ELEM_MAND_LV_E(NAS_5GS_PDU_TYPE_COMMON, DE_NAS_5GS_CMN_EAP_MESSAGE, NULL, ei_nas_5gs_missing_mandatory_element);
9169 /*7B Extended protocol configuration options Extended protocol configuration options 9.11.4.2 O TLV - E 4 - 65538*/
9170 ELEM_OPT_TLV_E(0x7B, NAS_PDU_TYPE_ESM, DE_ESM_EXT_PCO, NULL);
9173 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
9178 * 8.3.6 PDU session authentication result
9180 static void
9181 nas_5gs_sm_pdu_ses_auth_res(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
9183 uint32_t curr_offset;
9184 uint32_t consumed;
9185 unsigned curr_len;
9187 curr_offset = offset;
9188 curr_len = len;
9190 /* Direction: network to UE */
9191 pinfo->link_dir = P2P_DIR_DL;
9193 /*EAP message EAP message 9.11.2.2 O TLV-E 7-1503 */
9194 ELEM_OPT_TLV_E(0x78, NAS_5GS_PDU_TYPE_COMMON, DE_NAS_5GS_CMN_EAP_MESSAGE, NULL);
9196 /*7B Extended protocol configuration options Extended protocol configuration options 9.11.4.2 O TLV - E 4 - 65538*/
9197 ELEM_OPT_TLV_E(0x7B, NAS_PDU_TYPE_ESM, DE_ESM_EXT_PCO, NULL);
9199 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
9204 *8.3.7 PDU session modification request
9207 static void
9208 nas_5gs_sm_pdu_ses_mod_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
9210 uint32_t curr_offset;
9211 uint32_t consumed;
9212 unsigned curr_len;
9214 curr_offset = offset;
9215 curr_len = len;
9217 /* Direction: UE to network */
9218 pinfo->link_dir = P2P_DIR_UL;
9220 /* 28 5GSM capability 5GSM capability 9.11.4.10 O TLV 3-15 */
9221 ELEM_OPT_TLV(0x28, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_5GSM_CAP, NULL);
9222 /* 59 5GSM cause 5GSM cause 9.11.4.2 O TV 2 */
9223 ELEM_OPT_TV(0x59, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_5GSM_CAUSE, NULL);
9224 /* 55 Maximum number of supported packet filter Maximum number of supported packet filter 9.11.4.6 O TV 3*/
9225 ELEM_OPT_TV(0x55, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_MAX_NUM_SUP_PKT_FLT, NULL);
9226 /* B- Always-on PDU session requested Always-on PDU session requested 9.11.4.4 O TV 1 */
9227 ELEM_OPT_TV_SHORT(0xB0, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_ALWAYS_ON_PDU_SES_REQ, NULL);
9228 /* 13 Integrity protection maximum data rate Integrity protection maximum data rate 9.11.4.7 O TV 3 */
9229 ELEM_OPT_TV(0x13, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_INT_PROT_MAX_DATA_RTE, NULL);
9230 /* 7A Requested QoS rules QoS rules 9.11.4.6 O TLV-E 3-65538 */
9231 ELEM_OPT_TLV_E(0x7A, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_QOS_RULES, " - Requested QoS rules");
9232 /* 79 Requested QoS flow descriptions QoS flow descriptions 9.11.4.12 O TLV-E 5-65538 */
9233 ELEM_OPT_TLV_E(0x79, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_QOS_FLOW_DES, " - Authorized");
9234 /* 75 Mapped EPS bearer contexts Mapped EPS bearer contexts 9.11.4.8 O TLV-E 7-65538 */
9235 ELEM_OPT_TLV_E(0x75, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_MAPPED_EPS_B_CONT, NULL);
9236 /* 7B Extended protocol configuration options Extended protocol configuration options 9.11.4.2 O TLV - E 4 - 65538*/
9237 ELEM_OPT_TLV_E(0x7B, NAS_PDU_TYPE_ESM, DE_ESM_EXT_PCO, NULL);
9238 /* 74 Port management information container Port management information container 9.11.4.27 O TLV-E 4-65538 */
9239 ELEM_OPT_TLV_E(0x74, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_PORT_MGNT_INF_CONT, NULL);
9240 /* 66 IP header compression configuration Header compression configuration 9.11.4.24 O TLV 5-257 */
9241 ELEM_OPT_TLV(0x66, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_IP_HDR_COMP_CONF, NULL);
9242 /* 1F Ethernet header compression configuration Ethernet header compression configuration 9.11.4.28 O TLV 3 */
9243 ELEM_OPT_TLV(0x1F, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_ETH_HDR_COMP_CONF, NULL);
9244 /* 70 Requested MBS container Requested MBS container 9.11.4.30 O TLV-E 8-65538 */
9245 ELEM_OPT_TLV_E(0x70, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_REQ_MBS_CONT, NULL);
9246 /* 72 Service-level-AA container Service-level-AA container 9.11.2.10 O TLV-E 4-65538 */
9247 ELEM_OPT_TLV_E(0x72, NAS_5GS_PDU_TYPE_COMMON, DE_NAS_5GS_CMN_SERVICE_LEVEL_AA_CONT, NULL);
9248 /* 73 Non-3GPP delay budget Non-3GPP delay budget 9.11.4.37 O TLV-E 6-n */
9249 ELEM_OPT_TLV_E(0x73, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_N3GPP_DELAY_BUDGET, NULL);
9250 /* 36 URSP rule enforcement reports URSP rule enforcement reports 9.11.4.38 O TLV 4-n */
9251 ELEM_OPT_TLV(0x36, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_URSP_RULE_ENFORCE_REPORTS, NULL);
9253 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
9258 * 8.3.8 PDU session modification reject
9261 static void
9262 nas_5gs_sm_pdu_ses_mod_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
9264 uint32_t curr_offset;
9265 uint32_t consumed;
9266 unsigned curr_len;
9268 curr_offset = offset;
9269 curr_len = len;
9271 /* Direction: network to UE */
9272 pinfo->link_dir = P2P_DIR_DL;
9274 /* 5GSM cause 5GSM cause 9.11.4.2 M V 1 */
9275 ELEM_MAND_V(NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_5GSM_CAUSE, NULL, ei_nas_5gs_missing_mandatory_element);
9277 /*37 Back-off timer value GPRS timer 3 9.11.2.5 O TLV 3 */
9278 ELEM_OPT_TLV(0x37, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - Back-off timer value");
9280 /* 61 5GSM congestion re-attempt indicator 5GSM congestion re-attempt indicator 9.11.4.21 O TLV 3 */
9281 ELEM_OPT_TLV(0x61, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_5GSM_CONG_RE_ATTEMPT_IND, NULL);
9283 /*7B Extended protocol configuration options Extended protocol configuration options 9.11.4.6 O TLV - E 4 - 65538*/
9284 ELEM_OPT_TLV_E(0x7B, NAS_PDU_TYPE_ESM, DE_ESM_EXT_PCO, NULL);
9286 /* 1D Re-attempt indicator Re-attempt indicator 9.11.4.17 O TLV 3 */
9287 ELEM_OPT_TLV(0x1D, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_RE_ATTEMPT_IND, NULL);
9289 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
9294 * 8.3.9 PDU session modification command
9297 static void
9298 nas_5gs_sm_pdu_ses_mod_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
9300 uint32_t curr_offset;
9301 uint32_t consumed;
9302 unsigned curr_len;
9304 curr_offset = offset;
9305 curr_len = len;
9307 /* Direction: network to UE */
9308 pinfo->link_dir = P2P_DIR_DL;
9310 /*59 5GSM cause 5GSM cause 9.11.4.2 O TV 2*/
9311 ELEM_OPT_TV(0x59, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_5GSM_CAUSE, NULL);
9312 /*2A Session AMBR Session-AMBR 9.11.4.14 O TLV 8*/
9313 ELEM_OPT_TLV(0x2A, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_SESSION_AMBR, NULL);
9314 /*56 RQ timer value GPRS timer 9.11.4.3 O TV 2*/
9315 ELEM_OPT_TV(0x56, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER, " - PDU session release time");
9316 /* 8- Always-on PDU session indication Always-on PDU session indication 9.11.4.3 O TV 1 */
9317 ELEM_OPT_TV_SHORT(0x80, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_ALWAYS_ON_PDU_SES_IND, NULL);
9318 /*7A Authorized QoS rules QoS rules 9.11.4.6 O TLV-E 3-65538*/
9319 ELEM_OPT_TLV_E(0x7A, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_QOS_RULES, " - Authorized QoS rules");
9320 /*75 Mapped EPS bearer contexts Mapped EPS bearer contexts 9.11.4.5 O TLV-E 7-65538*/
9321 ELEM_OPT_TLV_E(0x75, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_MAPPED_EPS_B_CONT, NULL);
9322 /*79 Authorized QoS flow descriptions QoS flow descriptions 9.11.4.12 O TLV-E 6-65538*/
9323 ELEM_OPT_TLV_E(0x79, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_QOS_FLOW_DES, " - Authorized");
9324 /*7B Extended protocol configuration options Extended protocol configuration options 9.11.4.2 O TLV-E 4-65538*/
9325 ELEM_OPT_TLV_E(0x7B, NAS_PDU_TYPE_ESM, DE_ESM_EXT_PCO, NULL);
9326 /* 77 ATSSS container ATSSS container 9.11.4.22 O TLV-E 3-65538 */
9327 ELEM_OPT_TLV_E(0x77, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_ATSSS_CONT, NULL);
9328 /* 66 66 IP header compression configuration IP header compression configuration 9.11.4.24 O TLV 5-257 */
9329 ELEM_OPT_TLV(0x66, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_IP_HDR_COMP_CONF, NULL);
9330 /* 74 Port management information container Port management information container 9.11.4.27 O TLV-E 4-65538 */
9331 ELEM_OPT_TLV_E(0x74, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_PORT_MGNT_INF_CONT, NULL);
9332 /* 1E Serving PLMN rate control Serving PLMN rate control 9.11.4.20 O TLV 4 */
9333 ELEM_OPT_TLV(0x1E, NAS_PDU_TYPE_ESM, DE_ESM_SERV_PLMN_RATE_CTRL, NULL);
9334 /* 1F Ethernet header compression configuration Ethernet header compression configuration 9.11.4.28 O TLV 3 */
9335 ELEM_OPT_TLV(0x1F, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_ETH_HDR_COMP_CONF, NULL);
9336 /* 71 Received MBS container Received MBS container 9.11.4.31 O TLV-E 8-65538 */
9337 ELEM_OPT_TLV_E(0x71, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_REC_MBS_CONT, NULL);
9338 /* 72 Service-level-AA container Service-level-AA container 9.11.2.10 O TLV-E 4-65538 */
9339 ELEM_OPT_TLV_E(0x72, NAS_5GS_PDU_TYPE_COMMON, DE_NAS_5GS_CMN_SERVICE_LEVEL_AA_CONT, NULL);
9340 /* 5A Alternative S-NSSAI S-NSSAI 9.11.2.8 O TLV 3-10 */
9341 ELEM_OPT_TLV(0x5A, NAS_5GS_PDU_TYPE_COMMON, DE_NAS_5GS_CMN_S_NSSAI, " - Alternative S-NSSAI");
9342 /* 70 N3QAI N3QAI 9.11.4.36 O TLV-E 9-n */
9343 ELEM_OPT_TLV_E(0x70, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_N3QAI, NULL);
9344 /* 73 Protocol description Protocol description 9.11.4.39 O TLV-E 6-n */
9345 ELEM_OPT_TLV_E(0x73, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_PROT_DESC, NULL);
9347 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
9352 * 8.3.10 PDU session modification complete
9355 static void
9356 nas_5gs_sm_pdu_ses_mod_comp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
9358 uint32_t curr_offset;
9359 uint32_t consumed;
9360 unsigned curr_len;
9362 curr_offset = offset;
9363 curr_len = len;
9365 /* Direction: UE to network */
9366 pinfo->link_dir = P2P_DIR_UL;
9368 /* 7B Extended protocol configuration options Extended protocol configuration options 9.11.4.2 O TLV - E 4 - 65538*/
9369 ELEM_OPT_TLV_E(0x7B, NAS_PDU_TYPE_ESM, DE_ESM_EXT_PCO, NULL);
9370 /* 59 5GSM cause 5GSM cause 9.11.4.2 O TV 2*/
9371 ELEM_OPT_TV(0x59, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_5GSM_CAUSE, NULL);
9372 /* 7B Extended protocol configuration options Extended protocol configuration options 9.11.4.6 O TLV-E 4-65538 */
9373 ELEM_OPT_TLV_E(0x7B, NAS_PDU_TYPE_ESM, DE_ESM_EXT_PCO, NULL);
9374 /* 74 Port management information container Port management information container 9.11.4.27 O TLV-E 4-65538 */
9375 ELEM_OPT_TLV_E(0x74, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_PORT_MGNT_INF_CONT, NULL);
9377 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
9382 * 8.3.11 PDU session modification command reject
9385 static void
9386 nas_5gs_sm_pdu_ses_mod_com_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
9388 uint32_t curr_offset;
9389 uint32_t consumed;
9390 unsigned curr_len;
9392 curr_offset = offset;
9393 curr_len = len;
9395 /* Direction: UE to network */
9396 pinfo->link_dir = P2P_DIR_UL;
9398 /* 5GSM cause 5GSM cause 9.11.4.2 M V 1 */
9399 ELEM_MAND_V(NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_5GSM_CAUSE, NULL, ei_nas_5gs_missing_mandatory_element);
9400 /*7B Extended protocol configuration options Extended protocol configuration options 9.11.4.2 O TLV - E 4 - 65538*/
9401 ELEM_OPT_TLV_E(0x7B, NAS_PDU_TYPE_ESM, DE_ESM_EXT_PCO, NULL);
9403 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
9408 * 8.3.12 PDU session release request
9411 static void
9412 nas_5gs_sm_pdu_ses_rel_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
9414 uint32_t curr_offset;
9415 uint32_t consumed;
9416 unsigned curr_len;
9418 curr_offset = offset;
9419 curr_len = len;
9421 /* Direction: UE to network */
9422 pinfo->link_dir = P2P_DIR_UL;
9424 /* 59 5GSM cause 5GSM cause 9.11.4.2 O TV 2 */
9425 ELEM_OPT_TV(0x59, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_5GSM_CAUSE, NULL);
9426 /* 7B Extended protocol configuration options Extended protocol configuration options 9.11.4.2 O TLV - E 4 - 65538*/
9427 ELEM_OPT_TLV_E(0x7B, NAS_PDU_TYPE_ESM, DE_ESM_EXT_PCO, NULL);
9429 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
9434 * 8.3.13 PDU session release reject
9437 static void
9438 nas_5gs_sm_pdu_ses_rel_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
9440 uint32_t curr_offset;
9441 uint32_t consumed;
9442 unsigned curr_len;
9444 curr_offset = offset;
9445 curr_len = len;
9447 /* Direction: network to UE */
9448 pinfo->link_dir = P2P_DIR_DL;
9450 /* 5GSM cause 5GSM cause 9.11.4.2 M V 1 */
9451 ELEM_MAND_V(NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_5GSM_CAUSE, NULL, ei_nas_5gs_missing_mandatory_element);
9452 /*7B Extended protocol configuration options Extended protocol configuration options 9.11.4.2 O TLV - E 4 - 65538*/
9453 ELEM_OPT_TLV_E(0x7B, NAS_PDU_TYPE_ESM, DE_ESM_EXT_PCO, NULL);
9455 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
9460 * 8.3.14 PDU session release command
9463 static void
9464 nas_5gs_sm_pdu_ses_rel_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
9466 uint32_t curr_offset;
9467 uint32_t consumed;
9468 unsigned curr_len;
9470 curr_offset = offset;
9471 curr_len = len;
9473 /* Direction: network to UE */
9474 pinfo->link_dir = P2P_DIR_DL;
9476 /* 5GSM cause 5GSM cause 9.11.4.2 M V 1 */
9477 ELEM_MAND_V(NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_5GSM_CAUSE, NULL, ei_nas_5gs_missing_mandatory_element);
9478 /*37 Back-off timer value GPRS timer 3 9.11.2.5 O TLV 3 */
9479 ELEM_OPT_TLV(0x37, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - Back-off timer value");
9480 /*78 EAP message EAP message 9.10.2.2 O TLV - E 7 - 1503*/
9481 ELEM_OPT_TLV_E(0x78, NAS_5GS_PDU_TYPE_COMMON, DE_NAS_5GS_CMN_EAP_MESSAGE, NULL);
9482 /* 61 5GSM congestion re-attempt indicator 5GSM congestion re-attempt indicator 9.11.4.21 O TLV 3 */
9483 ELEM_OPT_TLV(0x61, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_5GSM_CONG_RE_ATTEMPT_IND, NULL);
9484 /* 7B Extended protocol configuration options Extended protocol configuration options 9.11.4.2 O TLV - E 4 - 65538*/
9485 ELEM_OPT_TLV_E(0x7B, NAS_PDU_TYPE_ESM, DE_ESM_EXT_PCO, NULL);
9486 /* D- Access type Access type 9.11.2.1A O TV 1 */
9487 ELEM_OPT_TV_SHORT(0xD0, NAS_5GS_PDU_TYPE_COMMON, DE_NAS_5GS_ACCESS_TYPE, NULL);
9488 /* 72 Service-level-AA container Service-level-AA container 9.11.2.10 O TLV-E 4-65538 */
9489 ELEM_OPT_TLV_E(0x72, NAS_5GS_PDU_TYPE_COMMON, DE_NAS_5GS_CMN_SERVICE_LEVEL_AA_CONT, NULL);
9490 /* 5A Alternative S-NSSAI S-NSSAI 9.11.2.8 O TLV 3-10 */
9491 ELEM_OPT_TLV(0x5A, NAS_5GS_PDU_TYPE_COMMON, DE_NAS_5GS_CMN_S_NSSAI, " - Alternative S-NSSAI");
9493 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
9498 * 8.3.15 PDU session release complete
9501 static void
9502 nas_5gs_sm_pdu_ses_rel_comp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
9504 uint32_t curr_offset;
9505 uint32_t consumed;
9506 unsigned curr_len;
9508 curr_offset = offset;
9509 curr_len = len;
9511 /* Direction: UE to network */
9512 pinfo->link_dir = P2P_DIR_UL;
9514 /* 59 5GSM cause 5GSM cause 9.11.4.2 O TV 2 */
9515 ELEM_OPT_TV(0x59, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_5GSM_CAUSE, NULL);
9516 /*7B Extended protocol configuration options Extended protocol configuration options 9.11.4.2 O TLV - E 4 - 65538*/
9517 ELEM_OPT_TLV_E(0x7B, NAS_PDU_TYPE_ESM, DE_ESM_EXT_PCO, NULL);
9519 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
9523 * 8.3.16 5GSM status
9526 static void
9527 nas_5gs_sm_5gsm_status(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
9529 uint32_t curr_offset;
9530 uint32_t consumed;
9531 unsigned curr_len;
9533 curr_offset = offset;
9534 curr_len = len;
9536 /* Direction: both */
9537 /* 5GSM cause 5GSM cause 9.11.4.2 M V 1 */
9538 ELEM_MAND_V(NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_5GSM_CAUSE, NULL, ei_nas_5gs_missing_mandatory_element);
9540 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
9544 * 8.3.17 Service-level authentication command
9547 static void
9548 nas_5gs_sm_serv_level_auth_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
9550 uint32_t curr_offset;
9551 uint32_t consumed;
9552 unsigned curr_len;
9554 curr_offset = offset;
9555 curr_len = len;
9557 /* Direction: network to UE */
9558 /* Service-level-AA container Service-level-AA container 9.11.2.10 M LV-E 5-n */
9559 ELEM_MAND_LV_E(NAS_5GS_PDU_TYPE_COMMON, DE_NAS_5GS_CMN_SERVICE_LEVEL_AA_CONT, NULL, ei_nas_5gs_missing_mandatory_element);
9561 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
9565 * 8.3.18 Service-level authentication complete
9568 static void
9569 nas_5gs_sm_serv_level_auth_comp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
9571 uint32_t curr_offset;
9572 uint32_t consumed;
9573 unsigned curr_len;
9575 curr_offset = offset;
9576 curr_len = len;
9578 /* Direction: UE to network */
9579 /* Service-level-AA container Service-level-AA container 9.11.2.10 M LV-E 5-n */
9580 ELEM_MAND_LV_E(NAS_5GS_PDU_TYPE_COMMON, DE_NAS_5GS_CMN_SERVICE_LEVEL_AA_CONT, NULL, ei_nas_5gs_missing_mandatory_element);
9582 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
9586 * 8.3.19 Remote UE report
9589 static void
9590 nas_5gs_sm_remote_ue_report(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
9592 uint32_t curr_offset;
9593 uint32_t consumed;
9594 unsigned curr_len;
9596 curr_offset = offset;
9597 curr_len = len;
9599 /* Direction: UE to network */
9600 /* 76 Remote UE context connected Remote UE context list 9.11.4.29 O TLV-E 16-65538 */
9601 ELEM_OPT_TLV_E(0x76, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_REMOTE_UE_CTX_LIST, " - Connected");
9602 /* 70 Remote UE context disconnected Remote UE context list 9.11.4.29 O TLV-E 16-65538 */
9603 ELEM_OPT_TLV_E(0x70, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_REMOTE_UE_CTX_LIST, " - Disconnected");
9605 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
9609 * 8.3.20 Remote UE report response
9612 static void
9613 nas_5gs_sm_remote_ue_resp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
9615 uint32_t curr_offset;
9616 unsigned curr_len;
9618 curr_offset = offset;
9619 curr_len = len;
9621 /* Direction: network to UE */
9623 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
9626 /* TS 29.502 6.1.6.4.4 n1SmInfoFromUe, n1SmInfoToUe, unknownN1SmInfo */
9629 * 6.1.6.4.4-1 n1SmInfoFromUE
9631 static void
9632 nas_5gs_n1_sm_info_from_ue(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
9634 uint32_t curr_offset;
9635 uint32_t consumed;
9636 unsigned curr_len;
9638 curr_offset = offset;
9639 curr_len = len;
9641 /* Direction: UE to network */
9642 pinfo->link_dir = P2P_DIR_UL;
9644 /*9- PDU session type PDU session type 9.11.4.5 O TV 1*/
9645 ELEM_OPT_TV_SHORT(0x90, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_PDU_SESSION_TYPE, NULL);
9647 /*A- SSC mode SSC mode 9.11.4.9 O TV 1*/
9648 ELEM_OPT_TV_SHORT(0xa0, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_SSC_MODE, NULL);
9650 /*55 Maximum number of supported packet filter Maximum number of supported packet filter 9.11.4.9 O TV 3*/
9651 ELEM_OPT_TV(0x55, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_MAX_NUM_SUP_PKT_FLT, NULL);
9653 /* 13 Integrity protection maximum data rate Integrity protection maximum data rate 9.11.4.7 O TV 3 */
9654 ELEM_OPT_TV(0x13, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_INT_PROT_MAX_DATA_RTE, NULL);
9656 /*39 SM PDU DN request container SM PDU DN request container 9.11.4.15 O TLV 3-255 */
9657 ELEM_OPT_TLV(0x39, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_PDU_DN_REQ_CONT, NULL);
9659 /*7B Extended protocol configuration options Extended protocol configuration options 9.11.4.2 O TLV-E 4-65538*/
9660 ELEM_OPT_TLV_E(0x7B, NAS_PDU_TYPE_ESM, DE_ESM_EXT_PCO, NULL);
9662 /*78 EAP message EAP message 9.10.2.2 O TLV - E 7 - 1503*/
9663 ELEM_OPT_TLV_E(0x78, NAS_5GS_PDU_TYPE_COMMON, DE_NAS_5GS_CMN_EAP_MESSAGE, NULL);
9665 /* 7A Requested QoS rules QoS rules 9.11.4.13 O TLV-E 3-65538 */
9666 ELEM_OPT_TLV_E(0x7A, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_QOS_RULES, " - Requested QoS rules");
9668 /*79 Requested QoS flow descriptions QoS flow descriptions 9.11.4.12 O TLV-E 6-65538*/
9669 ELEM_OPT_TLV_E(0x79, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_QOS_FLOW_DES, " - Requested");
9671 /* 59 5GSM cause 5GSM cause 9.11.4.2 O TV 2 */
9672 ELEM_OPT_TV(0x59, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_5GSM_CAUSE, NULL);
9674 /*28 5GSM capability 5GSM capability 9.11.4.10 O TLV 3-15 */
9675 ELEM_OPT_TLV(0x28, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_5GSM_CAP, NULL);
9677 /*75 Mapped EPS bearer contexts Mapped EPS bearer contexts 9.11.4.5 O TLV-E 7-65538*/
9678 ELEM_OPT_TLV_E(0x75, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_MAPPED_EPS_B_CONT, NULL);
9680 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
9684 * 6.1.6.4.4-2 n1SmInfoToUE
9686 static void
9687 nas_5gs_n1_sm_info_to_ue(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
9689 uint32_t curr_offset;
9690 uint32_t consumed;
9691 unsigned curr_len;
9693 curr_offset = offset;
9694 curr_len = len;
9696 /* Direction: network to UE*/
9697 pinfo->link_dir = P2P_DIR_DL;
9699 /*56 RQ timer value GPRS timer 9.11.4.3 O TV 2*/
9700 ELEM_OPT_TV(0x56, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER, " - PDU session release time");
9702 /*78 EAP message EAP message 9.10.2.2 O TLV - E 7 - 1503*/
9703 ELEM_OPT_TLV_E(0x78, NAS_5GS_PDU_TYPE_COMMON, DE_NAS_5GS_CMN_EAP_MESSAGE, NULL);
9705 /*F- Allowed SSC mode Allowed SSC mode 9.11.4.3 O TV 1*/
9706 ELEM_OPT_TV_SHORT(0xF0, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_5GSM_ALLOWED_SSC_MODE, NULL);
9708 /*7B Extended protocol configuration options Extended protocol configuration options 9.11.4.2 O TLV-E 4-65538*/
9709 ELEM_OPT_TLV_E(0x7B, NAS_PDU_TYPE_ESM, DE_ESM_EXT_PCO, NULL);
9711 /* 59 5GSM cause 5GSM cause 9.11.4.2 O TV 2 */
9712 ELEM_OPT_TV(0x59, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_5GSM_CAUSE, NULL);
9714 /*75 Mapped EPS bearer contexts Mapped EPS bearer contexts 9.11.4.5 O TLV-E 7-65538*/
9715 ELEM_OPT_TLV_E(0x75, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_MAPPED_EPS_B_CONT, NULL);
9717 /* 77 ATSSS container ATSSS container 9.11.4.22 O TLV-E 3-65538 */
9718 ELEM_OPT_TLV_E(0x77, NAS_5GS_PDU_TYPE_SM, DE_NAS_5GS_SM_ATSSS_CONT, NULL);
9720 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
9724 * 6.1.6.4.4 unknownN1SmInfo
9726 static void
9727 nas_5gs_unknown_n1_sm_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
9729 uint32_t curr_offset;
9730 unsigned curr_len;
9732 curr_offset = offset;
9733 curr_len = len;
9735 /* Direction: network to UE*/
9736 pinfo->link_dir = P2P_DIR_DL;
9738 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_5gs_extraneous_data);
9741 /* Traffic descriptor component type identifier */
9742 static const value_string nas_5gs_ursp_traff_desc_component_type_values[] = {
9743 { 0x01, "Match-all type" },
9744 { 0x08, "OS Id + OS App Id type" },
9745 { 0x10, "IPv4 remote address type" },
9746 { 0x21, "IPv6 remote address/prefix length type" },
9747 { 0x30, "Protocol identifier/next header type" },
9748 { 0x50, "Single remote port type" },
9749 { 0x51, "Remote port range type" },
9750 { 0x52, "IP 3 tuple type" },
9751 { 0x60, "Security parameter index type" },
9752 { 0x70, "Type of service/traffic class type" },
9753 { 0x80, "Flow label type" },
9754 { 0x81, "Destination MAC address type" },
9755 { 0x83, "802.1Q C-TAG VID type" },
9756 { 0x84, "802.1Q S-TAG VID type" },
9757 { 0x85, "802.1Q C-TAG PCP/DEI type" },
9758 { 0x86, "802.1Q S-TAG PCP/DEI type" },
9759 { 0x87, "Ethertype type" },
9760 { 0x88, "DNN type" },
9761 { 0x90, "Connection capabilities type" },
9762 { 0x91, "Destination FQDN" },
9763 { 0x92, "Regular expression" },
9764 { 0xa0, "OS App Id type" },
9765 { 0xa1, "Destination MAC address range type"},
9766 { 0, NULL }
9769 static const range_string nas_5gs_ursp_traff_desc_conn_cap_values[] = {
9770 { 0x01, 0x01, "IMS" },
9771 { 0x02, 0x02, "MMS" },
9772 { 0x04, 0x04, "SUPL" },
9773 { 0x08, 0x08, "Internet" },
9774 { 0x20, 0x3f, "Operator specific" },
9775 { 0, 0, NULL }
9778 static void
9779 de_nas_5gs_ursp_traff_desc(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree)
9781 int len = tvb_reported_length(tvb);
9782 uint32_t traff_desc;
9783 int offset = 0;
9784 uint32_t length, i;
9787 Traffic descriptor (octets v+5 to w)
9788 The traffic descriptor field is of variable size and contains a variable number (at least one) of traffic descriptor components.
9789 Each traffic descriptor component shall be encoded as a sequence of one octet traffic descriptor component type identifier
9790 and a traffic descriptor component value field. The traffic descriptor component type identifier shall be transmitted first.
9792 while (offset < len) {
9793 proto_tree_add_item_ret_uint(tree, hf_nas_5gs_ursp_traff_desc, tvb, offset, 1, ENC_BIG_ENDIAN, &traff_desc);
9794 offset++;
9795 switch (traff_desc) {
9796 case 0x01:
9797 /* Match-all type*/
9798 return;
9799 case 0x08:
9800 /* For "OS Id + OS App Id type", the traffic descriptor component value field shall be encoded as
9801 a sequence of a sixteen octet OS Id field, a one octet OS App Id length field, and an OS App Id field.
9802 The OS Id field shall be transmitted first. The OS Id field contains a Universally Unique IDentifier (UUID)
9803 as specified in IETF RFC 4122 [16]. */
9804 proto_tree_add_item(tree, hf_nas_5gs_os_id, tvb, offset, 16, ENC_BIG_ENDIAN);
9805 offset += 16;
9806 proto_tree_add_item_ret_uint(tree, hf_nas_5gs_os_app_id_len, tvb, offset, 1, ENC_BIG_ENDIAN, &length);
9807 offset += 1;
9808 proto_tree_add_item(tree, hf_nas_5gs_os_app_id, tvb, offset, length, ENC_NA);
9809 offset += length;
9810 break;
9811 case 0x10:
9812 /* For "IPv4 remote address type", the traffic descriptor component value field shall be encoded as
9813 a sequence of a four octet IPv4 address field and a four octet IPv4 address mask field.
9814 The IPv4 address field shall be transmitted first. */
9815 proto_tree_add_item(tree, hf_nas_5gs_ursp_traff_desc_ipv4, tvb, offset, 4, ENC_BIG_ENDIAN);
9816 offset += 4;
9817 proto_tree_add_item(tree, hf_nas_5gs_ursp_traff_desc_ipv4_mask, tvb, offset, 4, ENC_BIG_ENDIAN);
9818 offset += 4;
9819 break;
9820 case 0x21:
9821 /* For "IPv6 remote address/prefix length type", the traffic descriptor component value field shall be encoded as
9822 a sequence of a sixteen octet IPv6 address field and one octet prefix length field.
9823 The IPv6 address field shall be transmitted first. */
9824 proto_tree_add_item(tree, hf_nas_5gs_ursp_traff_desc_ipv6, tvb, offset, 16, ENC_NA);
9825 offset += 16;
9826 proto_tree_add_item(tree, hf_nas_5gs_ursp_traff_desc_ipv6_prefix_len, tvb, offset, 1, ENC_NA);
9827 offset += 1;
9828 break;
9829 case 0x30:
9830 /* For "protocol identifier/next header type", the traffic descriptor component value field shall be encoded as
9831 one octet which specifies the IPv4 protocol identifier or Ipv6 next header. */
9832 proto_tree_add_item(tree, hf_nas_5gs_ursp_traff_desc_next_hdr, tvb, offset, 1, ENC_BIG_ENDIAN);
9833 offset += 1;
9834 break;
9835 case 0x50:
9836 /* For "single remote port type", the traffic descriptor component value field shall be encoded as
9837 two octets which specify a port number. */
9838 proto_tree_add_item(tree, hf_nas_5gs_ursp_traff_desc_single_remote_port, tvb, offset, 2, ENC_BIG_ENDIAN);
9839 offset += 2;
9840 break;
9841 case 0x51:
9842 /* For "remote port range type", the traffic descriptor component value field shall be encoded as a sequence of
9843 a two octet port range low limit field and a two octet port range high limit field.
9844 The port range low limit field shall be transmitted first. */
9845 proto_tree_add_item(tree, hf_nas_5gs_ursp_traff_desc_remote_port_range_low, tvb, offset, 2, ENC_BIG_ENDIAN);
9846 offset += 2;
9847 proto_tree_add_item(tree, hf_nas_5gs_ursp_traff_desc_remote_port_range_high, tvb, offset, 2, ENC_BIG_ENDIAN);
9848 offset += 2;
9849 break;
9850 /* For "IP 3 tuple type", the traffic descriptor component value field shall be encoded as a
9851 sequence of a one octet IP 3 tuple information bitmap field where:
9852 - bit 1 set to zero indicates that the IPv4 address field is absent;
9853 - bit 1 set to one indicates that the IPv4 address field is present;
9854 - bit 2 set to zero indicates that the IPv6 remote address/prefix length field is absent;
9855 - bit 2 set to one indicates that the IPv6 remote address/prefix length field is present;
9856 - bit 3 set to zero indicates that the protocol identifier/next header field is absent;
9857 - bit 3 set to one indicates that the protocol identifier/next header field is present;
9858 - bit 4 set to zero indicates that the single remote port field is absent;
9859 - bit 4 set to one indicates that the single remote port field is present;
9860 - bit 5 set to zero indicates that the remote port range field is absent;
9861 - bit 5 set to one indicates that the remote port range field is present; and
9862 - bits 6,7, and 8 are spare bits;
9863 followed by a four octet IPv4 address field and a four octet IPv4 address mask field, if
9864 the IPv4 address field is present;
9865 followed by a sixteen octet IPv6 address field and one octet prefix length field, if the
9866 IPv6 remote address/prefix length field is present;
9867 followed by one octet which specifies the IPv4 protocol identifier or IPv6 next header, if
9868 the protocol identifier/next header field is present;
9869 followed by two octets which specify a port number, if the single remote port field is
9870 present;
9871 followed by a two octet port range low limit field and a two octet port range high limit
9872 field, if the remote port range field is present.
9873 The IP 3 tuple information bitmap field shall be transmitted first.
9874 The traffic descriptor component value field shall not contain both the IPv4 address
9875 field and the IPv6 remote address/prefix length field. If the traffic descriptor component
9876 value field contains both the IPv4 address field and the IPv6 remote address/prefix
9877 length field, the receiving entity shall ignore the URSP rule.
9878 The traffic descriptor component value field shall not contain both the single remote
9879 port field and the remote port range field. If the traffic descriptor component value field
9880 contains both the single remote port field and the remote port range field, the receiving
9881 entity shall ignore the URSP rule.
9882 The traffic descriptor component value field shall contain at least one of the IPv4
9883 address field, IPv6 remote address/prefix length field, the protocol identifier/next
9884 header field, the single remote port field and the remote port range field, otherwise the
9885 receiving entity shall ignore the URSP rule. */
9886 case 0x60:
9887 /* For "security parameter index type", the traffic descriptor component value field shall be encoded as
9888 four octets which specify the IPSec security parameter index. */
9889 proto_tree_add_item(tree, hf_nas_5gs_ursp_traff_desc_sec_param_index, tvb, offset, 4, ENC_BIG_ENDIAN);
9890 offset += 4;
9891 break;
9892 case 0x70:
9893 /* For "type of service/traffic class type", the traffic descriptor component value field shall be encoded as a
9894 sequence of a one octet type-of-service/traffic class field and a one octet type-of-service/traffic class mask field.
9895 The type-of-service/traffic class field shall be transmitted first. */
9896 proto_tree_add_item(tree, hf_nas_5gs_ursp_traff_desc_tos_tc, tvb, offset, 1, ENC_NA);
9897 offset += 1;
9898 proto_tree_add_item(tree, hf_nas_5gs_ursp_traff_desc_tos_tc_mask, tvb, offset, 1, ENC_NA);
9899 offset += 1;
9900 break;
9901 case 0x80:
9902 /* For "flow label type", the traffic descriptor component value field shall be encoded as three octets
9903 which specify the IPv6 flow label. The bits 8 through 5 of the first octet shall be spare whereas the
9904 remaining 20 bits shall contain the IPv6 flow label. */
9905 proto_tree_add_item(tree, hf_nas_5gs_ursp_traff_desc_flow_label, tvb, offset, 3, ENC_BIG_ENDIAN);
9906 offset += 3;
9907 break;
9908 case 0x81:
9909 /* For "destination MAC address type", the traffic descriptor component value field shall be encoded as
9910 6 octets which specify a MAC address. */
9911 proto_tree_add_item(tree, hf_nas_5gs_ursp_traff_desc_dest_mac_addr, tvb, offset, 6, ENC_NA);
9912 offset += 6;
9913 break;
9914 case 0x83:
9915 /* For "802.1Q C-TAG VID type", the traffic descriptor component value field shall be encoded as
9916 two octets which specify the VID of the customer-VLAN tag (C-TAG).
9917 The bits 8 through 5 of the first octet shall be spare whereas the remaining 12 bits shall contain the VID. */
9918 proto_tree_add_item(tree, hf_nas_5gs_ursp_traff_desc_ctag_vid, tvb, offset, 2, ENC_BIG_ENDIAN);
9919 offset += 2;
9920 break;
9921 case 0x84:
9922 /* For "802.1Q S-TAG VID type", the traffic descriptor component value field shall be encoded as
9923 two octets which specify the VID of the service-VLAN tag (S-TAG).
9924 The bits 8 through 5 of the first octet shall be spare whereas the remaining 12 bits shall contain the VID. */
9925 proto_tree_add_item(tree, hf_nas_5gs_ursp_traff_desc_stag_vid, tvb, offset, 2, ENC_BIG_ENDIAN);
9926 offset += 2;
9927 break;
9928 case 0x85:
9929 /* For "802.1Q C-TAG PCP/DEI type", the traffic descriptor component value field shall be encoded as
9930 one octet which specifies the 802.1Q C-TAG PCP and DEI. The bits 8 through 5 of the octet shall be spare,
9931 and the bits 4 through 2 contain the PCP and bit 1 contains the DEI. */
9932 proto_tree_add_item(tree, hf_nas_5gs_ursp_traff_desc_ctag_pcp, tvb, offset, 1, ENC_NA);
9933 proto_tree_add_item(tree, hf_nas_5gs_ursp_traff_desc_ctag_dei, tvb, offset, 1, ENC_NA);
9934 offset += 1;
9935 break;
9936 case 0x86:
9937 /* For "802.1Q S-TAG PCP/DEI type", the traffic descriptor component value field shall be encoded as
9938 one octet which specifies the 802.1Q S-TAG PCP.
9939 The bits 8 through 5 of the octet shall be spare, and the bits 4 through 2 contain the PCP and bit 1 contains the DEI. */
9940 proto_tree_add_item(tree, hf_nas_5gs_ursp_traff_desc_stag_pcp, tvb, offset, 1, ENC_NA);
9941 proto_tree_add_item(tree, hf_nas_5gs_ursp_traff_desc_stag_dei, tvb, offset, 1, ENC_NA);
9942 offset += 1;
9943 break;
9944 case 0x87:
9945 /* For "ethertype type", the traffic descriptor component value field shall be encoded as
9946 two octets which specify an ethertype. */
9947 proto_tree_add_item(tree, hf_nas_5gs_ursp_traff_desc_ethertype, tvb, offset, 2, ENC_BIG_ENDIAN);
9948 offset += 2;
9949 break;
9950 case 0x88:
9951 /* For "DNN type", the traffic descriptor component value field shall be encoded as
9952 a sequence of a one octet DNN length field and a DNN value field of a variable size.
9953 The DNN value contains an APN as defined in 3GPP TS 23.003 [4]. */
9954 proto_tree_add_item_ret_uint(tree, hf_nas_5gs_dnn_len, tvb, offset, 1, ENC_BIG_ENDIAN, &length);
9955 offset++;
9956 de_nas_5gs_cmn_dnn(tvb, tree, pinfo, offset, length, NULL, 0);
9957 offset += length;
9958 break;
9959 case 0x90:
9960 /* For "connection capabilities” type, the traffic descriptor component value field shall be encoded as
9961 a sequence of one octet for number of network capabilities followed by one or more octets,
9962 each containing a connection capability identifier encoded as follows:
9963 Bits
9964 8 7 6 5 4 3 2 1
9965 0 0 0 0 0 0 0 1 IMS
9966 0 0 0 0 0 0 1 0 MMS
9967 0 0 0 0 0 1 0 0 SUPL
9968 0 0 0 0 1 0 0 0 Internet
9969 All other values are spare. If received they shall be interpreted as unknown. */
9970 proto_tree_add_item_ret_uint(tree, hf_nas_5gs_ursp_traff_desc_conn_cap_len, tvb, offset, 1, ENC_NA, &length);
9971 offset += 1;
9972 for (i = 0; i < length; i++)
9973 proto_tree_add_item(tree, hf_nas_5gs_ursp_traff_desc_conn_cap, tvb, offset+i, 1, ENC_NA);
9974 offset += length;
9975 break;
9976 case 0x91:
9977 /* For "destination FQDN" type, the traffic descriptor component value field shall be encoded as
9978 a sequence of one octet destination FQDN length field and a destination FQDN value of variable size.
9979 The destination FQDN value field shall be encoded as defined in IETF RFC 1035 [12]. */
9980 proto_tree_add_item_ret_uint(tree, hf_nas_5gs_ursp_traff_desc_dest_fqdn_len, tvb, offset, 1, ENC_NA, &length);
9981 offset += 1;
9982 proto_tree_add_item(tree, hf_nas_5gs_ursp_traff_desc_dest_fqdn, tvb, offset, length, ENC_APN_STR|ENC_NA);
9983 offset += length;
9984 break;
9985 /* For "regular expression" type, the traffic descriptor component value field shall be
9986 encoded as a sequence of one octet regular expression length field and a regular
9987 expression value of variable size. The regular expression value field shall take the form
9988 of Extended Regular Expressions (ERE) as defined in chapter 9 in IEEE 1003.1-
9989 2004 Part 1 [19]. */
9990 case 0xa0:
9991 /* For "OS App Id type", the traffic descriptor component value field shall be encoded as
9992 a one octet OS App Id length field and an OS App Id field. */
9993 proto_tree_add_item_ret_uint(tree, hf_nas_5gs_os_app_id_len, tvb, offset, 1, ENC_BIG_ENDIAN, &length);
9994 offset += 1;
9995 proto_tree_add_item(tree, hf_nas_5gs_os_app_id, tvb, offset, length, ENC_NA);
9996 offset += length;
9997 break;
9998 case 0xa1:
9999 /* For "destination MAC address range type", the traffic descriptor component value field
10000 shall be encoded as a sequence of a 6 octet destination MAC address range low limit
10001 field and a 6 octet destination MAC address range high limit field. The destination MAC
10002 address range low limit field shall be transmitted first.*/
10003 proto_tree_add_item(tree, hf_nas_5gs_ursp_traff_desc_dest_mac_addr_range_low, tvb, offset, 6, ENC_NA);
10004 offset += 6;
10005 proto_tree_add_item(tree, hf_nas_5gs_ursp_traff_desc_dest_mac_addr_range_high, tvb, offset, 6, ENC_NA);
10006 offset += 6;
10007 break;
10008 default:
10009 proto_tree_add_expert(tree, pinfo, &ei_nas_5gs_ie_not_dis, tvb, offset, -1);
10010 return;
10016 Route selection descriptor contents (octets b+5 to c)
10017 The route selection descriptor contents field is of variable size and contains a variable number (at least one)
10018 of route selection descriptor components. Each route selection descriptor component shall be encoded as a sequence of
10019 a one octet route selection descriptor component type identifier and
10020 a route selection descriptor component value field.
10021 The route selection descriptor component type identifier shall be transmitted first.
10023 Route selection descriptor component type identifier
10024 Bits
10025 8 7 6 5 4 3 2 1
10026 0 0 0 0 0 0 0 1 SSC mode type
10027 0 0 0 0 0 0 1 0 S-NSSAI type
10028 0 0 0 0 0 1 0 0 DNN type
10029 0 0 0 0 1 0 0 0 PDU session type type
10030 0 0 0 1 0 0 0 0 Preferred access type type
10031 0 0 0 1 0 0 0 1 Multi-access preference type
10032 0 0 1 0 0 0 0 0 Non-seamless non-3GPP offload indication type
10033 0 1 0 0 0 0 0 0 Location criteria type
10034 1 0 0 0 0 0 0 0 Time window type
10035 1 0 0 0 0 0 0 1 5G ProSe layer-3 UE-to-network relay offload indication type
10036 1 0 0 0 0 0 1 0 PDU session pair ID type (NOTE 5)
10037 1 0 0 0 0 0 1 1 RSN type (NOTE 5)
10039 All other values are spare. If received they shall be interpreted as unknown.
10042 static const value_string nas_5gs_ursp_r_sel_desc_comp_type_values[] = {
10043 { 0x01, "SSC mode" },
10044 { 0x02, "S-NSSAI" },
10045 { 0x04, "DNN" },
10046 { 0x08, "PDU session type" },
10047 { 0x10, "Preferred access type" },
10048 { 0x11, "Multi-access preference" },
10049 { 0x20, "Non-seamless non-3GPP offload indication" },
10050 { 0x40, "Location criteria type" },
10051 { 0x80, "Time window type" },
10052 { 0x81, "5G ProSe layer-3 UE-to-network relay offload type" },
10053 { 0x82, "PDU session pair ID type" },
10054 { 0x83, "RSN type" },
10055 { 0, NULL }
10058 static void
10059 de_nas_5gs_ursp_r_sel_desc(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree)
10061 int len = tvb_reported_length(tvb);
10062 uint32_t type_id;
10063 int offset = 0;
10064 uint32_t length;
10066 while (offset < len) {
10068 /* Route selection descriptor component type identifier */
10069 proto_tree_add_item_ret_uint(tree, hf_nas_5gs_ursp_ursp_r_sel_desc_comp_type, tvb, offset, 1, ENC_BIG_ENDIAN, &type_id);
10070 offset++;
10072 switch (type_id) {
10073 case 0x01: /* SSC mode*/
10074 /* For "SSC mode type", the route selection descriptor component value field shall be encoded as a
10075 one octet SSC mode field. The bits 8 through 4 of the octet shall be spare,
10076 and the bits 3 through 1 shall be encoded as the value part of the SSC mode information element
10077 defined in subclause 9.11.4.16 of 3GPP TS 24.501.
10078 The "SSC mode type" route selection descriptor component shall not appear more than once
10079 in the route selection descriptor.*/
10080 proto_tree_add_item(tree, hf_nas_5gs_sm_sc_mode, tvb, offset, 1, ENC_BIG_ENDIAN);
10081 offset++;
10082 break;
10083 case 0x02: /* S-NSSAI type*/
10084 /* For "S-NSSAI type", the route selection descriptor component value field shall be
10085 * encoded as a sequence of a one octet S-NSSAI length field and an S-NSSAI value
10086 * field of a variable size. The S-NSSAI value shall be encoded as the value part of the
10087 * S-NSSAI information element defined in clause 9.11.2.8 of 3GPP TS 24.501 [11], without
10088 * the mapped HPLMN SST field and without the mapped HPLMN SD field. */
10089 proto_tree_add_item_ret_uint(tree, hf_nas_5gs_mm_len_of_mapped_s_nssai, tvb, offset, 1, ENC_BIG_ENDIAN, &length);
10090 offset++;
10091 de_nas_5gs_cmn_s_nssai(tvb, tree, pinfo, offset, length, NULL, 0);
10092 offset += length;
10093 break;
10094 case 0x04: /* DNN */
10095 /* For "DNN type", the route selection descriptor component value field shall be encoded as a
10096 sequence of a one octet DNN length field and a DNN value field of a variable size.
10097 The DNN value contains an APN as defined in 3GPP TS 23.003.*/
10098 proto_tree_add_item_ret_uint(tree, hf_nas_5gs_dnn_len, tvb, offset, 1, ENC_BIG_ENDIAN, &length);
10099 offset++;
10100 de_nas_5gs_cmn_dnn(tvb, tree, pinfo, offset, length, NULL, 0);
10101 offset += length;
10102 break;
10103 case 0x08: /* PDU session type*/
10104 /* For "PDU session type type", the route selection descriptor component value field shall be encoded as a
10105 one octet PDU session type field. The bits 8 through 4 of the octet shall be spare, and the bits 3 through 1
10106 shall be encoded as the value part of the PDU session type information element defined in
10107 subclause 9.11.4.11 of 3GPP TS 24.501.
10108 The "PDU session type type" route selection descriptor component shall not appear more than once
10109 in the route selection descriptor.*/
10110 proto_tree_add_item(tree, hf_nas_5gs_sm_pdu_session_type, tvb, offset, 1, ENC_BIG_ENDIAN);
10111 offset++;
10112 break;
10113 case 0x10: /* preferred access type type */
10114 /* For "preferred access type type", the route selection descriptor component value field shall be encoded as a
10115 one octet preferred access type field. The bits 8 through 3 shall be spare, and the bits 2 and 1 shall be
10116 encoded as the value part of the access type information element defined in subclause 9.11.2.1A of 3GPP TS 24.501.
10117 The "preferred access type type" route selection descriptor component shall not appear more than once
10118 in the route selection descriptor.*/
10119 proto_tree_add_bitmask_list(tree, tvb, offset, 1, nas_5gs_cmn_access_type_flags, ENC_BIG_ENDIAN);
10120 offset++;
10121 break;
10122 case 0x11: /* Multi-access preference */
10123 /* For "multi-access preference type", the route selection descriptor component value field shall be of zero length.
10124 The "multi-access preference type" route selection descriptor component shall not appear more than once
10125 in the route selection descriptor.
10126 The "multi-access preference type" route selection descriptor component in the route selection descriptor
10127 indicates the multi-access preference.*/
10128 break;
10129 case 0x20: /* non-seamless non-3GPP offload indication type */
10130 /* For "non-seamless non-3GPP offload indication type", the route selection descriptor component shall not include
10131 the route selection descriptor component value field.
10132 The "non-seamless non-3GPP offload indication type" route selection descriptor component shall not appear more than once
10133 in the route selection descriptor.
10134 If the "non-seamless non-3GPP offload indication type" route selection descriptor component is included
10135 in a route selection descriptor, there shall be no route selection descriptor component with a type other than
10136 "non-seamless non-3GPP offload indication type" in the route selection descriptor.*/
10137 break;
10138 default:
10139 proto_tree_add_expert(tree, pinfo, &ei_nas_5gs_ie_not_dis, tvb, offset, -1);
10140 return;
10145 /* Dissect UE policy part encoded as specified in 3GPP TS 24.526 */
10146 static void
10147 de_nas_5gs_ue_policies_ursp(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree)
10149 proto_tree* sub_tree, * traff_desc_sub_tree, *r_sel_list_tree, *r_sel_tree, *r_sel_desc_sub_tree;
10150 proto_item* item, *r_sel_list;
10151 uint32_t len = tvb_reported_length(tvb);
10152 uint32_t curr_offset = 0, offset;
10153 uint32_t list_len, traff_desc_len, r_sel_desc_lst_len, r_sel_desc_len, r_sel_desc_cont_len;
10155 int i = 0;
10156 while ((curr_offset) < len) {
10157 i++;
10158 sub_tree = proto_tree_add_subtree_format(tree, tvb, curr_offset, -1, ett_nas_5gs_ue_policies_ursp, &item,
10159 "URSP rule %u", i);
10160 /* Length of URSP rule octet v octet v+1 */
10161 proto_tree_add_item_ret_uint(sub_tree, hf_nas_5gs_ursp_rule_len, tvb, curr_offset, 2, ENC_BIG_ENDIAN, &list_len);
10162 proto_item_set_len(item, list_len + 2);
10163 curr_offset += 2;
10165 /* Precedence value of URSP rule octet v+2 */
10166 proto_tree_add_item(sub_tree, hf_nas_5gs_ursp_rule_prec, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
10167 curr_offset += 1;
10169 /* Length of traffic descriptor octet v+3 octet v+4 */
10170 proto_tree_add_item_ret_uint(sub_tree, hf_nas_5gs_ursp_traff_desc_lst_len, tvb, curr_offset, 2, ENC_BIG_ENDIAN, &traff_desc_len);
10171 curr_offset += 2;
10173 /* Traffic descriptor octet v+5 octet w */
10174 traff_desc_sub_tree = proto_tree_add_subtree(sub_tree, tvb, curr_offset, traff_desc_len, ett_nas_5gs_ursp_traff_desc, NULL, "Traffic descriptor");
10175 de_nas_5gs_ursp_traff_desc(tvb_new_subset_length(tvb, curr_offset, traff_desc_len), pinfo, traff_desc_sub_tree);
10176 curr_offset += traff_desc_len;
10178 /* Length of route selection descriptor list octet w+1 octet w+2 */
10179 proto_tree_add_item_ret_uint(sub_tree, hf_nas_5gs_ursp_r_sel_desc_lst_len, tvb, curr_offset, 2, ENC_BIG_ENDIAN, &r_sel_desc_lst_len);
10180 curr_offset += 2;
10182 /* Route selection descriptor list */
10183 offset = curr_offset;
10184 r_sel_list = proto_tree_add_item(sub_tree, hf_nas_5gs_ursp_r_sel_desc_lst, tvb, curr_offset, r_sel_desc_lst_len, ENC_NA);
10185 r_sel_list_tree = proto_item_add_subtree(r_sel_list, ett_nas_5gs_usrp_r_sel_list);
10186 int j = 0;
10187 while ((curr_offset - offset) < r_sel_desc_lst_len) {
10188 j++;
10189 r_sel_tree = proto_tree_add_subtree_format(r_sel_list_tree, tvb, curr_offset, -1, ett_nas_5gs_usrp_r_sel, &item,
10190 "Route selection descriptor %u", j);
10191 /* Length of route selection descriptor octet b octet b+1 */
10192 proto_tree_add_item_ret_uint(r_sel_tree, hf_nas_5gs_ursp_traff_desc_len, tvb, curr_offset, 2, ENC_BIG_ENDIAN, &r_sel_desc_len);
10193 curr_offset += 2;
10194 /* Precedence value of route selection descriptor octet b + 2 */
10195 proto_tree_add_item(r_sel_tree, hf_nas_5gs_ursp_r_sel_des_prec, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
10196 curr_offset++;
10198 /* Length of route selection descriptor contents octet b + 3 octet b + 4 */
10199 proto_tree_add_item_ret_uint(r_sel_tree, hf_nas_5gs_ursp_r_sel_des_cont_len, tvb, curr_offset, 2, ENC_BIG_ENDIAN, &r_sel_desc_cont_len);
10200 curr_offset += 2;
10201 /* Route selection descriptor contents octet b+5 octet c */
10202 r_sel_desc_sub_tree = proto_tree_add_subtree(r_sel_tree, tvb, curr_offset, r_sel_desc_cont_len, ett_nas_5gs_ursp_r_sel_desc_cont, NULL, "Route selection descriptor contents");
10203 de_nas_5gs_ursp_r_sel_desc(tvb_new_subset_length(tvb, curr_offset, r_sel_desc_cont_len), pinfo, r_sel_desc_sub_tree);
10204 curr_offset += r_sel_desc_cont_len;
10206 curr_offset = offset + r_sel_desc_lst_len;
10211 /* D.6.2 UE policy section management list */
10213 static const value_string nas_5gs_updp_ue_policy_part_type_vals[] = {
10214 { 0x0, "Reserved"},
10215 { 0x1, "URSP"},
10216 { 0x2, "ANDSP"},
10217 { 0, NULL }
10220 static uint16_t
10221 de_nas_5gs_updp_ue_policy_section_mgm_lst(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo,
10222 uint32_t offset, unsigned len,
10223 char* add_string _U_, int string_len _U_)
10225 proto_tree *sub_tree, *sub_tree2, *sub_tree3;
10226 proto_item* item;
10227 uint32_t curr_offset = offset;
10228 uint32_t sub_list_len, instr_len, policy_len;
10230 /* UE policy section management list contents Octet 4 - Octet z*/
10231 int i = 0;
10232 while ((curr_offset - offset) < len) {
10233 /* UE policy section management sublist (PLMN X) */
10234 i++;
10235 sub_tree = proto_tree_add_subtree_format(tree, tvb, curr_offset, -1, ett_nas_5gs_updp_ue_policy_section_mgm_lst, &item,
10236 "UE policy section management sublist (PLMN %u)", i);
10237 /* Length of UE policy section management sublist */
10238 proto_tree_add_item_ret_uint(sub_tree, hf_nas_5gs_updp_ue_pol_sect_sublst_len, tvb, curr_offset, 2, ENC_BIG_ENDIAN, &sub_list_len);
10239 proto_item_set_len(item, sub_list_len + 2);
10240 curr_offset += 2;
10241 /* MCC digit 2 MCC digit 1
10242 * MNC digit 3 MCC digit 3
10243 * MNC digit 2 MNC digit 1
10245 curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, sub_tree, curr_offset, E212_NONE, true);
10246 /* UE policy section management sublist contents*/
10247 /* Instruction X */
10248 int j = 1;
10249 sub_list_len = sub_list_len - 3;
10250 while (sub_list_len > 0){
10251 sub_tree2 = proto_tree_add_subtree_format(sub_tree, tvb, curr_offset, -1, ett_nas_5gs_updp_ue_policy_section_mgm_sublst, &item,
10252 "Instruction %u", j);
10253 /* Instruction contents length */
10254 proto_tree_add_item_ret_uint(sub_tree2, hf_nas_5gs_updp_instr_len, tvb, curr_offset, 2, ENC_BIG_ENDIAN, &instr_len);
10255 curr_offset += 2;
10256 /* UPSC */
10257 proto_tree_add_item(sub_tree2, hf_nas_5gs_updp_upsc, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
10258 curr_offset += 2;
10259 proto_item_set_len(item, instr_len + 2);
10260 /* UE policy section contents */
10261 sub_list_len = sub_list_len - instr_len - 2;
10262 instr_len = instr_len - 2;
10263 int k = 1;
10264 while (instr_len > 0) {
10265 uint32_t ue_policy_type;
10266 sub_tree3 = proto_tree_add_subtree_format(sub_tree2, tvb, curr_offset, -1, ett_nas_5gs_updp_ue_policy_section_mgm_sublst, &item,
10267 "UE policy part %u", k);
10268 /* UE policy part contents length */
10269 proto_tree_add_item_ret_uint(sub_tree3, hf_nas_5gs_updp_policy_len, tvb, curr_offset, 2, ENC_BIG_ENDIAN, &policy_len);
10270 curr_offset += 2;
10271 proto_item_set_len(item, policy_len + 2);
10272 /* UE policy part type */
10273 proto_tree_add_item_ret_uint(sub_tree3, hf_nas_5gs_updp_ue_policy_part_type, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &ue_policy_type);
10274 curr_offset++;
10275 /* UE policy part contents, This field contains a UE policy part encoded as specified in 3GPP TS 24.526 */
10276 switch (ue_policy_type) {
10277 case 1: /* 5.2 Encoding of UE policy part type URSP */
10278 de_nas_5gs_ue_policies_ursp(tvb_new_subset_length(tvb, curr_offset, policy_len - 1), pinfo, sub_tree3);
10279 break;
10280 default:
10281 proto_tree_add_item(sub_tree3, hf_nas_5gs_updp_ue_policy_part_cont, tvb, curr_offset, policy_len - 1, ENC_NA);
10282 break;
10284 curr_offset += (policy_len - 1);
10285 instr_len = instr_len - (policy_len + 2);
10286 k++;
10288 j++;
10292 return len;
10295 /* D.6.3 UE policy section management result */
10296 static uint16_t
10297 de_nas_5gs_updp_ue_policy_section_mgm_res(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo,
10298 uint32_t offset, unsigned len,
10299 char* add_string _U_, int string_len _U_)
10301 proto_tree *sub_tree, *sub_tree2;
10302 proto_item* item;
10303 uint32_t curr_offset = offset;
10304 uint32_t number_of_result;
10306 /* UE policy section management result contents Octet 4 - Octet z*/
10307 int i = 0;
10308 while ((curr_offset - offset) < len) {
10309 /* UE policy section management subresult (PLMN X) */
10310 i++;
10311 sub_tree = proto_tree_add_subtree_format(tree, tvb, curr_offset, -1, ett_nas_5gs_updp_ue_policy_section_mgm_lst, &item,
10312 "UE policy section management subresult (PLMN %u)", i);
10313 /* Number of result */
10314 proto_tree_add_item_ret_uint(sub_tree, hf_nas_5gs_updp_ue_pol_sect_subresult_len, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &number_of_result);
10315 curr_offset += 1;
10316 /* MCC digit 2 MCC digit 1
10317 * MNC digit 3 MCC digit 3
10318 * MNC digit 2 MNC digit 1
10320 curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, sub_tree, curr_offset, E212_NONE, true);
10321 /* UE policy section management subresult contents*/
10322 /* Result X */
10323 int j = 1;
10324 while (number_of_result > 0){
10325 sub_tree2 = proto_tree_add_subtree_format(sub_tree, tvb, curr_offset, -1, ett_nas_5gs_updp_ue_policy_section_mgm_sublst, &item,
10326 "Result %u", j);
10327 /* UPSC */
10328 proto_tree_add_item(sub_tree2, hf_nas_5gs_updp_upsc, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
10329 curr_offset += 2;
10330 /* Failed instruction order */
10331 proto_tree_add_item(sub_tree2, hf_nas_5gs_updp_failed_instruction_order, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
10332 curr_offset += 2;
10333 /* Cause */
10334 proto_tree_add_item(sub_tree2, hf_nas_5gs_upds_cause, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
10335 curr_offset += 1;
10336 j++;
10337 number_of_result--;
10341 return len;
10344 /* D.6.4 UPSI list */
10345 static uint16_t
10346 de_nas_5gs_updp_upsi_list(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_,
10347 uint32_t offset, unsigned len,
10348 char* add_string _U_, int string_len _U_)
10350 proto_tree* sub_tree;
10351 proto_item* item;
10352 uint32_t curr_offset = offset;
10353 uint32_t end_offset = offset + len;
10354 int32_t sublist_len;
10356 /* UPSI sublist (PLMN 1) */
10357 int i = 1;
10358 while (curr_offset < end_offset ) {
10359 sub_tree = proto_tree_add_subtree_format(tree, tvb, curr_offset, -1, ett_nas_5gs_updp_upsi_list, &item,
10360 " UPSI sublist (PLMN %u)", i++);
10361 proto_tree_add_item_ret_int(sub_tree, hf_nas_5gs_upsi_sublist_len, tvb, curr_offset, 2, ENC_BIG_ENDIAN, &sublist_len);
10362 proto_item_set_len(item, sublist_len + 2);
10363 curr_offset += 2;
10364 curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, sub_tree, curr_offset, E212_NONE, true);
10365 sublist_len -= 3;
10366 while (sublist_len > 0) {
10367 proto_tree_add_item(sub_tree, hf_nas_5gs_upsc, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
10368 curr_offset += 2;
10369 sublist_len -= 2;
10374 return len;
10377 /* D.6.5 UE policy classmark */
10378 static uint16_t
10379 de_nas_5gs_updp_ue_policy_cm(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_,
10380 uint32_t offset, unsigned len,
10381 char* add_string _U_, int string_len _U_)
10383 static int* const flags_oct3[] = {
10384 &hf_nas_5gs_spare_b7,
10385 &hf_nas_5gs_spare_b6,
10386 &hf_nas_5gs_spare_b5,
10387 &hf_nas_5gs_spare_b4,
10388 &hf_nas_5gs_spare_b3,
10389 &hf_nas_5gs_spare_b2,
10390 &hf_nas_5gs_spare_b1,
10391 &hf_nas_5gs_sup_andsp,
10392 NULL
10395 proto_tree_add_bitmask_list(tree, tvb, offset, 1, flags_oct3, ENC_NA);
10397 return len;
10400 /* D.6.6 UE OS Id */
10401 static uint16_t
10402 de_nas_5gs_updp_ue_os_id(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_,
10403 uint32_t offset, unsigned len,
10404 char* add_string _U_, int string_len _U_)
10406 uint32_t curr_offset = offset;
10407 /* OS Id:
10408 * The OS Id is coded as a sequence of a sixteen octet OS Id value field.
10409 * The OS Id value field is defined as Universally Unique IDentifier (UUID) as specified in IETF RFC 4122 [35A].
10411 proto_tree_add_item(tree, hf_nas_5gs_ue_os_id, tvb, curr_offset, len, ENC_BIG_ENDIAN);
10413 return len;
10416 /* D.6.7 UE policy network classmark */
10417 static true_false_string tfs_nas_5gs_nssui = {
10418 "UE is not allowed to accept URSP signalled by non-subscribed SNPNs",
10419 "UE is allowed to accept URSP signalled by non-subscribed SNPNs"
10422 static uint16_t
10423 de_nas_5gs_updp_ue_policy_nw_classmark(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_,
10424 uint32_t offset, unsigned len,
10425 char* add_string _U_, int string_len _U_)
10427 uint32_t curr_offset = offset;
10429 proto_tree_add_bits_item(tree, hf_nas_5gs_spare_bits, tvb, (curr_offset << 3), 7, ENC_BIG_ENDIAN);
10430 proto_tree_add_item(tree, hf_nas_5gs_nssui, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
10431 curr_offset++;
10433 while ((curr_offset - offset) < len) {
10434 proto_tree_add_item(tree, hf_nas_5gs_spare_bits, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
10435 curr_offset++;
10438 return len;
10441 /* 24.587 8.3.1 UPDS cause */
10442 static const value_string nas_5gs_updp_upds_cause_vals[] = {
10443 { 0x1f, "Request rejected, unspecified"},
10444 { 0x20, "Service option not supported"},
10445 { 0x22, "Service option temporarily out of order"},
10446 { 0x23, "PTI already in use"},
10447 { 0x5f, "Semantically incorrect message"},
10448 { 0x60, "Invalid mandatory information"},
10449 { 0x61, "Message type non-existent or not implemented"},
10450 { 0x62, "Message type not compatible with the protocol state"},
10451 { 0x53, "Information element non-existent or not implemented"},
10452 { 0x64, "Conditional IE error"},
10453 { 0x6f, "Protocol error, unspecified"},
10454 { 0, NULL }
10457 static uint16_t
10458 de_nas_5gs_updp_upds_cause(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_,
10459 uint32_t offset, unsigned len,
10460 char* add_string _U_, int string_len _U_)
10462 proto_tree_add_item(tree, hf_nas_5gs_upds_cause, tvb, offset, 1, ENC_BIG_ENDIAN);
10464 return len;
10467 /* 24.587 8.3.2 Requested UE policies */
10468 static uint16_t
10469 de_nas_5gs_updp_req_ue_policies(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo,
10470 uint32_t offset, unsigned len _U_,
10471 char* add_string _U_, int string_len _U_)
10473 uint32_t curr_offset = offset;
10475 static int* const flags[] = {
10476 &hf_nas_5gs_spare_b7,
10477 &hf_nas_5gs_spare_b6,
10478 &hf_nas_5gs_spare_b5,
10479 &hf_nas_5gs_spare_b4,
10480 &hf_nas_5gs_spare_b3,
10481 &hf_nas_5gs_spare_b2,
10482 &hf_nas_5gs_v2xuui,
10483 &hf_nas_5gs_v2xpc5i,
10484 NULL
10487 proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, flags, ENC_BIG_ENDIAN);
10488 curr_offset++;
10490 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_nas_5gs_extraneous_data);
10492 return (curr_offset - offset);
10495 /* D.6 Information elements coding */
10496 typedef enum
10498 DE_NAS_5GS_UPDP_UE_POLICY_SECTION_MGM_LST, /* D.6.2 UE policy section management list */
10499 DE_NAS_5GS_UPDP_UE_POLICY_SECTION_MGM_RES, /* D.6.3 UE policy section management result */
10500 DE_NAS_5GS_UPDP_UPSI_LIST, /* D.6.4 UPSI list */
10501 DE_NAS_5GS_UPDP_UE_POLICY_CM, /* D.6.5 UE policy classmark */
10502 DE_NAS_5GS_UPDP_UE_OS_ID, /* D.6.6 UE OS Id */
10503 DE_NAS_5GS_UPDP_UE_POLICY_NW_CLASSMARK, /* D.6.7 UE policy network classmark */
10505 DE_NAS_5GS_UPDP_UPDS_CAUSE, /* 24.587 8.3.1 UPDS cause */
10506 DE_NAS_5GS_UPDP_REQ_UE_POLICIES, /* 24.587 8.3.2 Requested UE policies */
10508 DE_NAS_5GS_UPDP_NONE /* NONE */
10510 nas_5gs_updp_elem_idx_t;
10512 static const value_string nas_5gs_updp_elem_strings[] = {
10513 { DE_NAS_5GS_UPDP_UE_POLICY_SECTION_MGM_LST, "UE policy section management list" }, /* D.6.2 UE policy section management list */
10514 { DE_NAS_5GS_UPDP_UE_POLICY_SECTION_MGM_RES, "UE policy section management result" }, /* D.6.3 UE policy section management result */
10515 { DE_NAS_5GS_UPDP_UPSI_LIST, "UPSI list" }, /* D.6.4 UPSI list */
10516 { DE_NAS_5GS_UPDP_UE_POLICY_CM, "UE policy classmark" }, /* D.6.5 UE policy classmark */
10517 { DE_NAS_5GS_UPDP_UE_OS_ID, "UE OS Id" }, /* D.6.6 UE OS Id */
10518 { DE_NAS_5GS_UPDP_UE_POLICY_NW_CLASSMARK, "UE policy network classmark" }, /* D.6.7 UE policy network classmark */
10520 { DE_NAS_5GS_UPDP_UPDS_CAUSE, "UPDS cause" }, /* 24.587 8.3.1 UPDS cause */
10521 { DE_NAS_5GS_UPDP_REQ_UE_POLICIES, "Requested UE policies" }, /* 24.587 8.3.2 Requested UE policies */
10523 { 0, NULL }
10525 value_string_ext nas_5gs_updp_elem_strings_ext = VALUE_STRING_EXT_INIT(nas_5gs_updp_elem_strings);
10527 #define NUM_NAS_5GS_UPDP_ELEM array_length(nas_5gs_updp_elem_strings)
10528 int ett_nas_5gs_updp_elem[NUM_NAS_5GS_UPDP_ELEM];
10530 uint16_t(*nas_5gs_updp_elem_fcn[])(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo,
10531 uint32_t offset, unsigned len,
10532 char* add_string, int string_len) = {
10533 /* 5GS session management (5GSM) information elements */
10534 de_nas_5gs_updp_ue_policy_section_mgm_lst, /* D.6.2 UE policy section management list */
10535 de_nas_5gs_updp_ue_policy_section_mgm_res, /* D.6.3 UE policy section management result */
10536 de_nas_5gs_updp_upsi_list, /* D.6.4 UPSI list */
10537 de_nas_5gs_updp_ue_policy_cm, /* D.6.5 UE policy classmark */
10538 de_nas_5gs_updp_ue_os_id, /* D.6.6 UE OS Id */
10539 de_nas_5gs_updp_ue_policy_nw_classmark, /* D.6.7 UE policy network classmark */
10541 de_nas_5gs_updp_upds_cause, /* 24.587 8.3.1 UPDS cause */
10542 de_nas_5gs_updp_req_ue_policies, /* 24.587 8.3.2 Requested UE policies */
10544 NULL, /* NONE */
10548 /* D.5.1 Manage UE policy command */
10549 static void
10550 nas_5gs_updp_manage_ue_policy_cmd(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo, uint32_t offset, unsigned len)
10552 uint32_t curr_offset;
10553 uint32_t consumed;
10554 unsigned curr_len;
10556 curr_offset = offset;
10557 curr_len = len;
10559 /* Direction: network to UE */
10560 pinfo->link_dir = P2P_DIR_DL;
10562 /* UE policy section management list UE policy section management list D.6.2 M LV-E 11-65537 */
10563 ELEM_MAND_LV_E(NAS_5GS_PDU_TYPE_UPDP, DE_NAS_5GS_UPDP_UE_POLICY_SECTION_MGM_LST, NULL, ei_nas_5gs_missing_mandatory_element);
10565 /* 42 UE policy network classmark UE policy network classmark D.6.7 O TLV 3-5 */
10566 ELEM_OPT_TLV(0x42, NAS_5GS_PDU_TYPE_UPDP, DE_NAS_5GS_UPDP_UE_POLICY_NW_CLASSMARK, NULL);
10570 /* D.5.2 Manage UE policy complete */
10572 Direction: UE to network
10573 No data
10576 static void
10577 nas_5gs_updp_manage_ue_policy_cmd_cmpl(tvbuff_t* tvb _U_, proto_tree* tree _U_, packet_info* pinfo, uint32_t offset _U_, unsigned len _U_)
10579 /* Direction: UE to network */
10580 pinfo->link_dir = P2P_DIR_UL;
10582 /* No data */
10585 /* D.5.3 Manage UE policy command reject*/
10586 static void
10587 nas_5gs_updp_manage_ue_policy_cmd_rej(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo, uint32_t offset, unsigned len)
10589 uint32_t curr_offset;
10590 uint32_t consumed;
10591 unsigned curr_len;
10593 curr_offset = offset;
10594 curr_len = len;
10596 /* Direction: UE to network */
10597 pinfo->link_dir = P2P_DIR_UL;
10599 /* UE policy section management result UE policy section management result D.6.3 M LV-E 11-65537 */
10600 ELEM_MAND_LV_E(NAS_5GS_PDU_TYPE_UPDP, DE_NAS_5GS_UPDP_UE_POLICY_SECTION_MGM_RES, NULL, ei_nas_5gs_missing_mandatory_element);
10605 /* D.5.4 UE state indication */
10606 static void
10607 nas_5gs_updp_ue_state_indication(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo, uint32_t offset, unsigned len)
10609 uint32_t curr_offset;
10610 uint32_t consumed;
10611 unsigned curr_len;
10613 curr_offset = offset;
10614 curr_len = len;
10616 /* Direction: UE to network */
10617 pinfo->link_dir = P2P_DIR_UL;
10619 /* UPSI list UPSI list D.6.4 M LV-E 9-65537*/
10620 ELEM_MAND_LV_E(NAS_5GS_PDU_TYPE_UPDP, DE_NAS_5GS_UPDP_UPSI_LIST, NULL, ei_nas_5gs_missing_mandatory_element);
10622 /* UE policy classmark UE policy classmark D.6.5 M LV 2 - 4*/
10623 ELEM_MAND_LV(NAS_5GS_PDU_TYPE_UPDP, DE_NAS_5GS_UPDP_UE_POLICY_CM, NULL, ei_nas_5gs_missing_mandatory_element);
10625 /* 41 UE OS Id OS Id D.6.6 O TLV 18-242 */
10626 ELEM_OPT_TLV(0x41, NAS_5GS_PDU_TYPE_UPDP, DE_NAS_5GS_UPDP_UE_OS_ID, NULL);
10631 /* 24.587 7.2.1 UE policy provisioning request */
10632 static void
10633 nas_5gs_updp_ue_policy_prov_req(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo, uint32_t offset, unsigned len)
10635 uint32_t curr_offset;
10636 uint32_t consumed;
10637 unsigned curr_len;
10639 curr_offset = offset;
10640 curr_len = len;
10642 /* Direction: UE to network */
10643 pinfo->link_dir = P2P_DIR_UL;
10645 /* Requested UE policies Requested UE policies 8.3.2 M LV 2-3 */
10646 ELEM_MAND_LV(NAS_5GS_PDU_TYPE_UPDP, DE_NAS_5GS_UPDP_REQ_UE_POLICIES, NULL, ei_nas_5gs_missing_mandatory_element);
10651 /* 24.587 7.2.2 UE policy provisioning reject */
10652 static void
10653 nas_5gs_updp_ue_policy_prov_rej(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo, uint32_t offset, unsigned len)
10655 uint32_t curr_offset;
10656 uint32_t consumed;
10657 unsigned curr_len;
10659 curr_offset = offset;
10660 curr_len = len;
10662 /* Direction: UE to network */
10663 pinfo->link_dir = P2P_DIR_DL;
10665 /* UPDS cause UPDS cause 8.3.1 M V 1 */
10666 ELEM_MAND_V(NAS_5GS_PDU_TYPE_UPDP, DE_NAS_5GS_UPDP_UPDS_CAUSE, NULL, ei_nas_5gs_missing_mandatory_element);
10671 /* 9.7 Message type */
10673 /* 5GS mobility management messages */
10674 static const value_string nas_5gs_mm_message_type_vals[] = {
10675 { 0x41, "Registration request"},
10676 { 0x42, "Registration accept"},
10677 { 0x43, "Registration complete"},
10678 { 0x44, "Registration reject"},
10679 { 0x45, "Deregistration request (UE originating)"},
10680 { 0x46, "Deregistration accept (UE originating)"},
10681 { 0x47, "Deregistration request (UE terminated)"},
10682 { 0x48, "Deregistration accept (UE terminated)"},
10684 { 0x49, "Not used in current version"},
10685 { 0x4a, "Not used in current version" },
10686 { 0x4b, "Not used in current version" },
10688 { 0x4c, "Service request"},
10689 { 0x4d, "Service reject"},
10690 { 0x4e, "Service accept"},
10691 { 0x4f, "Control plane service request"},
10693 { 0x50, "Network slice-specific authentication command"},
10694 { 0x51, "Network slice-specific authentication complete"},
10695 { 0x52, "Network slice-specific authentication result"},
10696 { 0x53, "Not used in current version"},
10697 { 0x54, "Configuration update command"},
10698 { 0x55, "Configuration update complete"},
10699 { 0x56, "Authentication request"},
10700 { 0x57, "Authentication response"},
10701 { 0x58, "Authentication reject"},
10702 { 0x59, "Authentication failure"},
10703 { 0x5a, "Authentication result"},
10704 { 0x5b, "Identity request"},
10705 { 0x5c, "Identity response"},
10706 { 0x5d, "Security mode command"},
10707 { 0x5e, "Security mode complete"},
10708 { 0x5f, "Security mode reject"},
10710 { 0x60, "Not used in current version"},
10711 { 0x61, "Not used in current version"},
10712 { 0x62, "Not used in current version"},
10713 { 0x63, "Not used in current version"},
10715 { 0x64, "5GMM status"},
10716 { 0x65, "Notification"},
10717 { 0x66, "Notification response"},
10718 { 0x67, "UL NAS transport"},
10719 { 0x68, "DL NAS transport"},
10721 { 0x69, "Relay key request"},
10722 { 0x6a, "Relay key accept"},
10723 { 0x6b, "Relay key reject"},
10724 { 0x6c, "Relay authentication request"},
10725 { 0x6d, "Relay authentication response"},
10726 { 0, NULL }
10729 static value_string_ext nas_5gs_mm_msg_strings_ext = VALUE_STRING_EXT_INIT(nas_5gs_mm_message_type_vals);
10731 #define NUM_NAS_5GS_MM_MSG array_length(nas_5gs_mm_message_type_vals)
10732 static int ett_nas_5gs_mm_msg[NUM_NAS_5GS_MM_MSG];
10733 static void(*nas_5gs_mm_msg_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len) = {
10734 nas_5gs_mm_registration_req, /* 0x41 Registration request */
10735 nas_5gs_mm_registration_accept, /* 0x42 Registration accept */
10736 nas_5gs_mm_registration_complete, /* 0x43 Registration complete */
10737 nas_5gs_mm_registration_rej, /* 0x44 Registration reject */
10738 nas_5gs_mm_de_reg_req_ue_orig, /* 0x45 Deregistration request (UE originating) */
10739 NULL, /* 0x46 Deregistration accept (UE originating) No data*/
10740 nas_5gs_mm_de_registration_req_ue_term, /* 0x47 Deregistration request (UE terminated) */
10741 NULL, /* 0x48 Deregistration accept (UE terminated) No data */
10743 nas_5gs_exp_not_dissected_yet, /* 0x49 Not used in current version */
10744 nas_5gs_exp_not_dissected_yet, /* 0x4a Not used in current version */
10745 nas_5gs_exp_not_dissected_yet, /* 0x4b Not used in current version */
10747 nas_5gs_mm_service_req, /* 0x4c Service request */
10748 nas_5gs_mm_service_rej, /* 0x4d Service reject */
10749 nas_5gs_mm_service_acc, /* 0x4e Service accept */
10750 nas_5gs_mm_control_plane_service_req, /* 0x4f Control plane service request */
10752 nas_5gs_mm_nw_slice_spec_auth_cmd, /* 0x50 Network slice-specific authentication command */
10753 nas_5gs_mm_nw_slice_spec_auth_comp, /* 0x51 Network slice-specific authentication complete */
10754 nas_5gs_mm_nw_slice_spec_auth_res, /* 0x52 Network slice-specific authentication result */
10755 nas_5gs_exp_not_dissected_yet, /* 0x53 Not used in current version */
10756 nas_5gs_mm_conf_upd_cmd, /* 0x54 Configuration update command */
10757 nas_5gs_mm_conf_update_comp, /* 0x55 Configuration update complete */
10758 nas_5gs_mm_authentication_req, /* 0x56 Authentication request */
10759 nas_5gs_mm_authentication_resp, /* 0x57 Authentication response */
10760 nas_5gs_mm_authentication_rej, /* 0x58 Authentication reject */
10761 nas_5gs_mm_authentication_failure, /* 0x59 Authentication failure */
10762 nas_5gs_mm_authentication_result, /* 0x5a Authentication result */
10763 nas_5gs_mm_id_req, /* 0x5b Identity request */
10764 nas_5gs_mm_id_resp, /* 0x5c Identity response */
10765 nas_5gs_mm_sec_mode_cmd, /* 0x5d Security mode command */
10766 nas_5gs_mm_sec_mode_comp, /* 0x5e Security mode complete */
10767 nas_5gs_mm_sec_mode_rej, /* 0x5f Security mode reject */
10769 nas_5gs_exp_not_dissected_yet, /* 0x60 Not used in current version */
10770 nas_5gs_exp_not_dissected_yet, /* 0x61 Not used in current version */
10771 nas_5gs_exp_not_dissected_yet, /* 0x62 Not used in current version */
10772 nas_5gs_exp_not_dissected_yet, /* 0x63 Not used in current version */
10774 nas_5gs_mm_5gmm_status, /* 0x64 5GMM status */
10775 nas_5gs_mm_notification, /* 0x65 Notification */
10776 nas_5gs_mm_notification_resp, /* 0x66 Notification */
10777 nas_5gs_mm_ul_nas_transp, /* 0x67 UL NAS transport */
10778 nas_5gs_mm_dl_nas_transp, /* 0x68 DL NAS transport */
10780 nas_5gs_mm_relay_key_request, /* 0x69 Relay key request */
10781 nas_5gs_mm_relay_key_accept, /* 0x6a Relay key accept */
10782 nas_5gs_mm_relay_key_reject, /* 0x6b Relay key reject */
10783 nas_5gs_mm_relay_authentication_request, /* 0x6c Relay authentication request */
10784 nas_5gs_mm_relay_authentication_response, /* 0x6d Relay authentication response */
10785 NULL, /* NONE */
10790 /* 5GS session management messages */
10791 static const value_string nas_5gs_sm_message_type_vals[] = {
10793 { 0xc1, "PDU session establishment request"},
10794 { 0xc2, "PDU session establishment accept"},
10795 { 0xc3, "PDU session establishment reject"},
10797 { 0xc4, "Not used in current version"},
10799 { 0xc5, "PDU session authentication command"},
10800 { 0xc6, "PDU session authentication complete"},
10801 { 0xc7, "PDU session authentication result"},
10803 { 0xc8, "Not used in current version"},
10805 { 0xc9, "PDU session modification request"},
10806 { 0xca, "PDU session modification reject"},
10807 { 0xcb, "PDU session modification command"},
10808 { 0xcc, "PDU session modification complete"},
10809 { 0xcd, "PDU session modification command reject"},
10811 { 0xce, "Not used in current version"},
10812 { 0xcf, "Not used in current version"},
10813 { 0xd0, "Not used in current version"},
10815 { 0xd1, "PDU session release request"},
10816 { 0xd2, "PDU session release reject"},
10817 { 0xd3, "PDU session release command"},
10818 { 0xd4, "PDU session release complete"},
10820 { 0xd5, "Not used in current version"},
10822 { 0xd6, "5GSM status"},
10824 { 0xd7, "Not used in current version"},
10826 { 0xd8, "Service-level authentication command"},
10827 { 0xd9, "Service-level authentication complete"},
10829 { 0xda, "Remote UE report"},
10830 { 0xdb, "Remote UE report response"},
10831 { 0, NULL }
10833 static value_string_ext nas_5gs_sm_msg_strings_ext = VALUE_STRING_EXT_INIT(nas_5gs_sm_message_type_vals);
10835 #define NUM_NAS_5GS_SM_MSG array_length(nas_5gs_sm_message_type_vals)
10836 static int ett_nas_5gs_sm_msg[NUM_NAS_5GS_SM_MSG];
10838 static void(*nas_5gs_sm_msg_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len) = {
10839 nas_5gs_sm_pdu_ses_est_req, /* 0xc1 PDU session establishment request */
10840 nas_5gs_sm_pdu_ses_est_acc, /* 0xc2 PDU session establishment accept */
10841 nas_5gs_sm_pdu_ses_est_rej, /* 0xc3 PDU session establishment reject */
10843 nas_5gs_exp_not_dissected_yet, /* 0xc4 Not used in current version */
10845 nas_5gs_sm_pdu_ses_auth_cmd, /* 0xc5 PDU session authentication command */
10846 nas_5gs_sm_pdu_ses_auth_comp, /* 0xc6 PDU session authentication complete */
10847 nas_5gs_sm_pdu_ses_auth_res, /* 0xc7 PDU session authentication result */
10849 nas_5gs_exp_not_dissected_yet, /* 0xc8 Not used in current version */
10851 nas_5gs_sm_pdu_ses_mod_req, /* 0xc9 PDU session modification request */
10852 nas_5gs_sm_pdu_ses_mod_rej, /* 0xca PDU session modification reject */
10853 nas_5gs_sm_pdu_ses_mod_cmd, /* 0xcb PDU session modification command */
10854 nas_5gs_sm_pdu_ses_mod_comp, /* 0xcc PDU session modification complete */
10855 nas_5gs_sm_pdu_ses_mod_com_rej, /* 0xcd PDU session modification command reject */
10857 nas_5gs_exp_not_dissected_yet, /* 0xce Not used in current version */
10858 nas_5gs_exp_not_dissected_yet, /* 0xcf Not used in current version */
10859 nas_5gs_exp_not_dissected_yet, /* 0xd0 Not used in current version */
10861 nas_5gs_sm_pdu_ses_rel_req, /* 0xd1 PDU session release request */
10862 nas_5gs_sm_pdu_ses_rel_rej, /* 0xd2 PDU session release reject */
10863 nas_5gs_sm_pdu_ses_rel_cmd, /* 0xd3 PDU session release command */
10864 nas_5gs_sm_pdu_ses_rel_comp, /* 0xd4 PDU session release complete */
10866 nas_5gs_exp_not_dissected_yet, /* 0xd5 Not used in current version */
10868 nas_5gs_sm_5gsm_status, /* 0xd6 5GSM status */
10870 nas_5gs_exp_not_dissected_yet, /* 0xd7 Not used in current version */
10872 nas_5gs_sm_serv_level_auth_cmd, /* 0xd8 Service-level authentication command */
10873 nas_5gs_sm_serv_level_auth_comp, /* 0xd9 Service-level authentication complete */
10875 nas_5gs_sm_remote_ue_report, /* 0xda Remote UE report */
10876 nas_5gs_sm_remote_ue_resp, /* 0xdb Remote UE report response */
10878 NULL, /* NONE */
10882 /* Table D.6.1.1: UE policy delivery service message type */
10883 static const value_string nas_5gs_updp_msg_strings[] = {
10884 { 0x0, "Reserved"},
10885 { 0x1, "MANAGE UE POLICY COMMAND"},
10886 { 0x2, "MANAGE UE POLICY COMPLETE"},
10887 { 0x3, "MANAGE UE POLICY COMMAND REJECT"},
10888 { 0x4, "UE STATE INDICATION"},
10889 { 0x5, "UE POLICY PROVISIONING REQUEST"},
10890 { 0x6, "UE POLICY PROVISIONING REJECT"},
10891 { 0, NULL }
10893 static value_string_ext nas_5gs_updp_msg_strings_ext = VALUE_STRING_EXT_INIT(nas_5gs_updp_msg_strings);
10895 #define NUM_NAS_5GS_UPDP_MSG array_length(nas_5gs_updp_msg_strings)
10896 static int ett_nas_5gs_updp_msg[NUM_NAS_5GS_UPDP_MSG];
10898 static void(*nas_5gs_updp_msg_fcn[])(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo, uint32_t offset, unsigned len) = {
10899 nas_5gs_exp_not_dissected_yet, /* 0x0 Reserved */
10900 nas_5gs_updp_manage_ue_policy_cmd, /* 0x1 MANAGE UE POLICY COMMAND */
10901 nas_5gs_updp_manage_ue_policy_cmd_cmpl,/* 0x2 MANAGE UE POLICY COMPLETE */
10902 nas_5gs_updp_manage_ue_policy_cmd_rej, /* 0x3 MANAGE UE POLICY COMMAND REJECT */
10903 nas_5gs_updp_ue_state_indication, /* 0x4 UE STATE INDICATION */
10904 nas_5gs_updp_ue_policy_prov_req, /* 0x5 UE POLICY PROVISIONING REQUEST */
10905 nas_5gs_updp_ue_policy_prov_rej, /* 0x6 UE POLICY PROVISIONING REJECT */
10907 NULL, /* NONE */
10911 static void
10912 get_nas_5gsmm_msg_params(uint8_t oct, const char **msg_str, int *ett_tree, int *hf_idx, msg_fcn *msg_fcn_p)
10914 int idx;
10916 *msg_str = try_val_to_str_idx_ext((uint32_t)(oct & 0xff), &nas_5gs_mm_msg_strings_ext, &idx);
10917 *hf_idx = hf_nas_5gs_mm_msg_type;
10918 if (*msg_str != NULL) {
10919 *ett_tree = ett_nas_5gs_mm_msg[idx];
10920 *msg_fcn_p = nas_5gs_mm_msg_fcn[idx];
10924 static void
10925 get_nas_5gssm_msg_params(uint8_t oct, const char **msg_str, int *ett_tree, int *hf_idx, msg_fcn *msg_fcn_p)
10927 int idx;
10929 *msg_str = try_val_to_str_idx_ext((uint32_t)(oct & 0xff), &nas_5gs_sm_msg_strings_ext, &idx);
10930 *hf_idx = hf_nas_5gs_sm_msg_type;
10931 if (*msg_str != NULL) {
10932 *ett_tree = ett_nas_5gs_sm_msg[idx];
10933 *msg_fcn_p = nas_5gs_sm_msg_fcn[idx];
10937 static void
10938 get_nas_5gs_updp_msg_params(uint8_t oct, const char** msg_str, int* ett_tree, int* hf_idx, msg_fcn* msg_fcn_p)
10940 int idx;
10942 *msg_str = try_val_to_str_idx_ext((uint32_t)(oct & 0xff), &nas_5gs_updp_msg_strings_ext, &idx);
10943 *hf_idx = hf_nas_5gs_updp_msg_type;
10944 if (*msg_str != NULL) {
10945 *ett_tree = ett_nas_5gs_updp_msg[idx];
10946 *msg_fcn_p = nas_5gs_updp_msg_fcn[idx];
10950 static void
10951 dissect_nas_5gs_sm_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
10953 const char *msg_str;
10954 uint32_t len;
10955 int ett_tree;
10956 int hf_idx;
10957 void(*msg_fcn_p)(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len);
10958 uint8_t oct;
10960 len = tvb_reported_length(tvb);
10962 /* Message type IE*/
10963 oct = tvb_get_uint8(tvb, offset);
10964 msg_fcn_p = NULL;
10965 ett_tree = -1;
10966 hf_idx = -1;
10967 msg_str = NULL;
10969 get_nas_5gssm_msg_params(oct, &msg_str, &ett_tree, &hf_idx, &msg_fcn_p);
10971 if (msg_str) {
10972 col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, msg_str);
10974 else {
10975 proto_tree_add_expert_format(tree, pinfo, &ei_nas_5gs_sm_unknown_msg_type, tvb, offset, 1, "Unknown Message Type 0x%02x", oct);
10976 return;
10980 * Add NAS message name
10982 proto_tree_add_item(tree, hf_idx, tvb, offset, 1, ENC_BIG_ENDIAN);
10983 offset++;
10986 * decode elements
10988 if (msg_fcn_p == NULL)
10990 if (tvb_reported_length_remaining(tvb, offset)) {
10991 proto_tree_add_item(tree, hf_nas_5gs_msg_elems, tvb, offset, len - offset, ENC_NA);
10994 else
10996 (*msg_fcn_p)(tvb, tree, pinfo, offset, len - offset);
11001 static void
11002 dissect_nas_5gs_mm_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
11005 const char *msg_str;
11006 uint32_t len;
11007 int ett_tree;
11008 int hf_idx;
11009 void(*msg_fcn_p)(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len);
11010 uint8_t oct;
11012 len = tvb_reported_length(tvb);
11014 /* Message type IE*/
11015 oct = tvb_get_uint8(tvb, offset);
11016 msg_fcn_p = NULL;
11017 ett_tree = -1;
11018 hf_idx = -1;
11019 msg_str = NULL;
11021 get_nas_5gsmm_msg_params(oct, &msg_str, &ett_tree, &hf_idx, &msg_fcn_p);
11023 if (msg_str) {
11024 col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, msg_str);
11026 else {
11027 proto_tree_add_expert_format(tree, pinfo, &ei_nas_5gs_mm_unknown_msg_type, tvb, offset, 1, "Unknown Message Type 0x%02x", oct);
11028 return;
11032 * Add NAS message name
11034 proto_tree_add_item(tree, hf_idx, tvb, offset, 1, ENC_BIG_ENDIAN);
11035 offset++;
11038 * decode elements
11040 if (msg_fcn_p == NULL)
11042 if (tvb_reported_length_remaining(tvb, offset)) {
11043 proto_tree_add_item(tree, hf_nas_5gs_msg_elems, tvb, offset, len - offset, ENC_NA);
11046 else
11048 (*msg_fcn_p)(tvb, tree, pinfo, offset, len - offset);
11053 /* 6.1.6.4.4 n1SmInfoFromUe, n1SmInfoToUe, unknownN1SmInfo */
11054 static void
11055 dissect_nas_5gs_sm_info(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, int offset, const char *n1_msg_class)
11057 uint32_t len;
11058 void(*msg_fcn_p)(tvbuff_t * tvb, proto_tree * tree, packet_info * pinfo, uint32_t offset, unsigned len);
11060 /* make entry in the Protocol column on summary display */
11061 col_append_sep_str(pinfo->cinfo, COL_PROTOCOL, "/", "NAS-5GS");
11063 len = tvb_reported_length(tvb);
11064 msg_fcn_p = NULL;
11066 if (!strcmp(n1_msg_class, N1_SMINFO_FROM_UE)) {
11067 msg_fcn_p = nas_5gs_n1_sm_info_from_ue;
11068 } else if (!strcmp(n1_msg_class, N1_SMINFO_TO_UE)) {
11069 msg_fcn_p = nas_5gs_n1_sm_info_to_ue;
11070 } else if (!strcmp(n1_msg_class, UNKNOWN_N1_SMINFO)) {
11071 msg_fcn_p = nas_5gs_unknown_n1_sm_info;
11072 } else {
11073 proto_tree_add_expert_format(tree, pinfo, &ei_nas_5gs_sm_unknown_msg_type, tvb, offset, -1, "Unknown Message Type");
11074 return;
11077 col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, n1_msg_class);
11080 * Add PDCP message name
11082 proto_tree_add_item(tree, hf_nas_5gs_sm_msg_type, tvb, offset, 1, ENC_BIG_ENDIAN);
11083 offset++;
11086 * decode elements
11088 (*msg_fcn_p)(tvb, tree, pinfo, offset, len - offset);
11092 /* UPDP */
11093 /* D.6.1 UE policy delivery service message type */
11095 void
11096 dissect_nas_5gs_updp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
11099 const char* msg_str;
11100 uint32_t len;
11101 int ett_tree;
11102 int hf_idx;
11103 void(*msg_fcn_p)(tvbuff_t * tvb, proto_tree * tree, packet_info * pinfo, uint32_t offset, unsigned len);
11104 uint8_t oct;
11105 int offset = 0;
11107 len = tvb_reported_length(tvb);
11109 /* 9.6 Procedure transaction identity
11110 * Bits 1 to 8 of the third octet of every 5GSM message contain the procedure transaction identity.
11111 * The procedure transaction identity and its use are defined in 3GPP TS 24.007
11112 * XXX Only 5GSM ?
11114 proto_tree_add_item(tree, hf_nas_5gs_proc_trans_id, tvb, offset, 1, ENC_BIG_ENDIAN);
11115 offset++;
11117 /* Message type IE*/
11118 oct = tvb_get_uint8(tvb, offset);
11119 msg_fcn_p = NULL;
11120 ett_tree = -1;
11121 hf_idx = -1;
11122 msg_str = NULL;
11124 get_nas_5gs_updp_msg_params(oct, &msg_str, &ett_tree, &hf_idx, &msg_fcn_p);
11126 if (msg_str) {
11127 col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, msg_str);
11129 else {
11130 proto_tree_add_expert_format(tree, pinfo, &ei_nas_5gs_updp_unknown_msg_type, tvb, offset, 1, "Unknown Message Type 0x%02x", oct);
11131 return;
11135 * Add PDCP message name
11137 proto_tree_add_item(tree, hf_idx, tvb, offset, 1, ENC_BIG_ENDIAN);
11138 offset++;
11141 * decode elements
11143 if (msg_fcn_p == NULL)
11145 if (tvb_reported_length_remaining(tvb, offset)) {
11146 proto_tree_add_item(tree, hf_nas_5gs_msg_elems, tvb, offset, len - offset, ENC_NA);
11149 else
11151 (*msg_fcn_p)(tvb, tree, pinfo, offset, len - offset);
11157 const value_string nas_5gs_pdu_session_id_vals[] = {
11158 { 0x00, "No PDU session identity assigned" },
11159 { 0x01, "PDU session identity value 1" },
11160 { 0x02, "PDU session identity value 2" },
11161 { 0x03, "PDU session identity value 3" },
11162 { 0x04, "PDU session identity value 4" },
11163 { 0x05, "PDU session identity value 5" },
11164 { 0x06, "PDU session identity value 6" },
11165 { 0x07, "PDU session identity value 7" },
11166 { 0x08, "PDU session identity value 8" },
11167 { 0x09, "PDU session identity value 9" },
11168 { 0x0a, "PDU session identity value 10" },
11169 { 0x0b, "PDU session identity value 11" },
11170 { 0x0c, "PDU session identity value 12" },
11171 { 0x0d, "PDU session identity value 13" },
11172 { 0x0e, "PDU session identity value 14" },
11173 { 0x0f, "PDU session identity value 15" },
11174 { 0, NULL }
11177 static int
11178 dissect_nas_5gs_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, void* data)
11180 proto_tree *sub_tree;
11181 uint32_t epd;
11183 /* Plain NAS 5GS Message */
11184 sub_tree = proto_tree_add_subtree(tree, tvb, offset, -1, ett_nas_5gs_plain, NULL, "Plain NAS 5GS Message");
11185 /* Extended protocol discriminator octet 1 */
11186 proto_tree_add_item_ret_uint(sub_tree, hf_nas_5gs_epd, tvb, offset, 1, ENC_BIG_ENDIAN, &epd);
11187 offset++;
11188 /* Security header type associated with a spare half octet; or
11189 * PDU session identity octet 2
11191 switch (epd) {
11192 case TGPP_PD_5GMM:
11193 /* 9.5 Spare half octet
11194 * Bits 5 to 8 of the second octet of every 5GMM message contains the spare half octet
11195 * which is filled with spare bits set to zero.
11197 proto_tree_add_item(sub_tree, hf_nas_5gs_spare_half_octet, tvb, offset, 1, ENC_BIG_ENDIAN);
11198 proto_tree_add_item(sub_tree, hf_nas_5gs_security_header_type, tvb, offset, 1, ENC_BIG_ENDIAN);
11199 break;
11200 case TGPP_PD_5GSM:
11201 /* 9.4 PDU session identity
11202 * Bits 1 to 8 of the second octet of every 5GSM message contain the PDU session identity IE.
11203 * The PDU session identity and its use to identify a message flow are defined in 3GPP TS 24.007
11205 proto_tree_add_item(sub_tree, hf_nas_5gs_pdu_session_id, tvb, offset, 1, ENC_BIG_ENDIAN);
11206 offset++;
11207 /* 9.6 Procedure transaction identity
11208 * Bits 1 to 8 of the third octet of every 5GSM message contain the procedure transaction identity.
11209 * The procedure transaction identity and its use are defined in 3GPP TS 24.007
11210 * XXX Only 5GSM ?
11212 proto_tree_add_item(sub_tree, hf_nas_5gs_proc_trans_id, tvb, offset, 1, ENC_BIG_ENDIAN);
11213 break;
11214 default:
11215 if ((epd & 0xf) == 15 && gsm_a_dtap_handle) {
11216 /* dissect Test Procedure messages */
11217 return call_dissector_with_data(gsm_a_dtap_handle, tvb_new_subset_remaining(tvb, offset - 1), pinfo, sub_tree, data);
11219 proto_tree_add_expert_format(sub_tree, pinfo, &ei_nas_5gs_unknown_pd, tvb, offset, -1, "Not a NAS 5GS PD %u (%s)",
11220 epd, val_to_str_const(epd, nas_5gs_epd_vals, "Unknown"));
11221 return 0;
11224 offset++;
11226 switch (epd) {
11227 case TGPP_PD_5GMM:
11228 /* 5GS mobility management messages */
11229 dissect_nas_5gs_mm_msg(tvb, pinfo, sub_tree, offset);
11230 break;
11231 case TGPP_PD_5GSM:
11232 /* 5GS session management messages. */
11233 dissect_nas_5gs_sm_msg(tvb, pinfo, sub_tree, offset);
11234 break;
11235 default:
11236 DISSECTOR_ASSERT_NOT_REACHED();
11237 break;
11240 return tvb_reported_length(tvb);
11243 static int
11244 dissect_nas_5gs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
11246 proto_item *item;
11247 proto_tree *nas_5gs_tree, *sub_tree;
11248 int offset = 0;
11249 uint8_t sec_hdr_type, ext_pd;
11250 struct nas5gs_private_data *nas5gs_data = nas5gs_get_private_data(pinfo);
11252 /* make entry in the Protocol column on summary display */
11253 col_append_sep_str(pinfo->cinfo, COL_PROTOCOL, "/", "NAS-5GS");
11255 item = proto_tree_add_item(tree, proto_nas_5gs, tvb, 0, -1, ENC_NA);
11256 nas_5gs_tree = proto_item_add_subtree(item, ett_nas_5gs);
11258 /* Extended protocol discriminator octet 1 */
11259 ext_pd = tvb_get_uint8(tvb, offset);
11260 if (ext_pd == TGPP_PD_5GSM) {
11261 return dissect_nas_5gs_common(tvb, pinfo, nas_5gs_tree, offset, data);
11263 /* Security header type associated with a spare half octet; or
11264 * PDU session identity octet 2 */
11265 /* Determine if it's a plain 5GS NAS Message or not */
11266 sec_hdr_type = tvb_get_uint8(tvb, offset + 1);
11267 nas5gs_data->sec_hdr_type = sec_hdr_type;
11268 if (sec_hdr_type == NAS_5GS_PLAIN_NAS_MSG) {
11269 return dissect_nas_5gs_common(tvb, pinfo, nas_5gs_tree, offset, data);
11271 /* Security protected NAS 5GS message*/
11272 sub_tree = proto_tree_add_subtree(nas_5gs_tree, tvb, offset, 7, ett_nas_5gs_sec, NULL, "Security protected NAS 5GS message");
11274 /* Extended protocol discriminator octet 1 */
11275 proto_tree_add_item(sub_tree, hf_nas_5gs_epd, tvb, offset, 1, ENC_BIG_ENDIAN);
11276 offset++;
11277 /* Security header type associated with a spare half octet octet 2 */
11278 proto_tree_add_item(sub_tree, hf_nas_5gs_spare_half_octet, tvb, offset, 1, ENC_BIG_ENDIAN);
11279 proto_tree_add_item(sub_tree, hf_nas_5gs_security_header_type, tvb, offset, 1, ENC_BIG_ENDIAN);
11280 offset++;
11281 /* Message authentication code octet 3 - 6 */
11282 proto_tree_add_item(sub_tree, hf_nas_5gs_msg_auth_code, tvb, offset, 4, ENC_BIG_ENDIAN);
11283 offset += 4;
11284 /* Sequence number octet 7 */
11285 proto_tree_add_item(sub_tree, hf_nas_5gs_seq_no, tvb, offset, 1, ENC_BIG_ENDIAN);
11286 offset++;
11288 if ((sec_hdr_type != NAS_5GS_INTEG_CIPH_NAS_MSG && sec_hdr_type != NAS_5GS_INTEG_CIPH_NEW_NAS_MSG) ||
11289 g_nas_5gs_null_decipher) {
11290 return dissect_nas_5gs_common(tvb, pinfo, nas_5gs_tree, offset, data);
11291 } else {
11292 proto_tree_add_subtree(nas_5gs_tree, tvb, offset, -1, ett_nas_5gs_enc, NULL, "Encrypted data");
11295 return tvb_reported_length(tvb);
11298 /* 9.11.2.6 Intra N1 mode NAS transparent container */
11299 static true_false_string nas_5gs_kacf_tfs = {
11300 "A new K_AMF has been calculated by the network",
11301 "A new K_AMF has not been calculated by the network"
11304 void
11305 de_nas_5gs_intra_n1_mode_nas_transparent_cont(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_)
11307 int offset = 0;
11309 static int * const flags[] = {
11310 &hf_nas_5gs_spare_b7,
11311 &hf_nas_5gs_spare_b6,
11312 &hf_nas_5gs_spare_b5,
11313 &hf_nas_5gs_kacf,
11314 &hf_nas_5gs_mm_tsc,
11315 &hf_nas_5gs_mm_nas_key_set_id,
11316 NULL
11319 proto_tree_add_item(tree, hf_nas_5gs_msg_auth_code, tvb, offset, 4, ENC_BIG_ENDIAN);
11320 offset += 4;
11321 proto_tree_add_item(tree, hf_nas_5gs_mm_nas_sec_algo_enc, tvb, offset, 1, ENC_BIG_ENDIAN);
11322 proto_tree_add_item(tree, hf_nas_5gs_mm_nas_sec_algo_ip, tvb, offset, 1, ENC_BIG_ENDIAN);
11323 offset++;
11324 proto_tree_add_bitmask_list(tree, tvb, offset, 1, flags, ENC_NA);
11325 offset++;
11326 proto_tree_add_item(tree, hf_nas_5gs_seq_no, tvb, offset, 1, ENC_BIG_ENDIAN);
11329 /* 9.11.2.7 N1 mode to S1 mode NAS transparent container */
11330 void
11331 de_nas_5gs_n1_mode_to_s1_mode_nas_transparent_cont(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_)
11333 proto_tree_add_item(tree, hf_nas_5gs_seq_no, tvb, 0, 1, ENC_BIG_ENDIAN);
11336 /* 9.11.2.9 S1 mode to N1 mode NAS transparent container */
11337 void
11338 de_nas_5gs_s1_mode_to_n1_mode_nas_transparent_cont(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_)
11340 int offset = 0;
11342 static int * const oct8_flags[] = {
11343 &hf_nas_5gs_spare_b7,
11344 &hf_nas_5gs_ncc,
11345 &hf_nas_5gs_mm_tsc,
11346 &hf_nas_5gs_mm_nas_key_set_id,
11347 NULL
11350 proto_tree_add_item(tree, hf_nas_5gs_msg_auth_code, tvb, offset, 4, ENC_BIG_ENDIAN);
11351 offset += 4;
11352 proto_tree_add_item(tree, hf_nas_5gs_mm_nas_sec_algo_enc, tvb, offset, 1, ENC_BIG_ENDIAN);
11353 proto_tree_add_item(tree, hf_nas_5gs_mm_nas_sec_algo_ip, tvb, offset, 1, ENC_BIG_ENDIAN);
11354 offset++;
11355 proto_tree_add_bitmask_list(tree, tvb, offset, 1, oct8_flags, ENC_NA);
11356 offset++;
11357 proto_tree_add_item(tree, hf_nas_5gs_spare_octet, tvb, offset, 1, ENC_BIG_ENDIAN);
11358 offset++;
11359 proto_tree_add_item(tree, hf_nas_5gs_spare_octet, tvb, offset, 1, ENC_BIG_ENDIAN);
11362 /* 3GPP TS 29.502 chapter 6.1.6.4.2 and 29.518 chapter 6.1.6.4.2 */
11363 static int
11364 dissect_nas_5gs_media_type(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
11366 int ret;
11367 char *json_data;
11368 const char *n1_msg_class, *str;
11369 jsmntok_t *tokens, *cur_tok;
11370 dissector_handle_t subdissector;
11371 tvbuff_t* json_tvb = (tvbuff_t*)p_get_proto_data(pinfo->pool, pinfo, proto_json, 0);
11372 media_content_info_t *content_info = (media_content_info_t *)data;
11374 if (!json_tvb || !content_info || !content_info->content_id)
11375 return 0;
11377 json_data = tvb_get_string_enc(pinfo->pool, json_tvb, 0, tvb_reported_length(json_tvb), ENC_UTF_8|ENC_NA);
11378 ret = json_parse(json_data, NULL, 0);
11379 if (ret <= 0)
11380 return 0;
11381 tokens = wmem_alloc_array(pinfo->pool, jsmntok_t, ret);
11382 if (json_parse(json_data, tokens, ret) <= 0)
11383 return 0;
11384 cur_tok = json_get_object(json_data, tokens, "n1MessageContainer");
11385 if (cur_tok) {
11386 n1_msg_class = json_get_string(json_data, cur_tok, "n1MessageClass");
11387 if (!n1_msg_class)
11388 return 0;
11389 cur_tok = json_get_object(json_data, cur_tok, "n1MessageContent");
11390 if (!cur_tok)
11391 return 0;
11392 str = json_get_string(json_data, cur_tok, "contentId");
11393 } else {
11394 cur_tok = json_get_object(json_data, tokens, "n1SmMsg");
11395 if (cur_tok) {
11396 n1_msg_class = "SM";
11397 str = json_get_string(json_data, cur_tok, "contentId");
11398 } else {
11399 /* TS 29.502 ch6.1.6.4.4 n1SmInfoFromUe, n1SmInfoToUe, unknownN1SmInfo */
11400 cur_tok = json_get_object(json_data, tokens, N1_SMINFO_FROM_UE);
11401 n1_msg_class = N1_SMINFO_FROM_UE;
11403 if (!cur_tok) {
11404 cur_tok = json_get_object(json_data, tokens, N1_SMINFO_TO_UE);
11405 n1_msg_class = N1_SMINFO_TO_UE;
11407 if (!cur_tok) {
11408 cur_tok = json_get_object(json_data, tokens, UNKNOWN_N1_SMINFO);
11409 n1_msg_class = UNKNOWN_N1_SMINFO;
11411 if (cur_tok) {
11412 str = json_get_string(json_data, cur_tok, "contentId");
11413 } else {
11414 return 0;
11418 if (!str || strcmp(str, content_info->content_id))
11419 return 0;
11420 if (!strcmp(n1_msg_class, "5GMM") ||
11421 !strcmp(n1_msg_class, "SM")) {
11422 subdissector = nas_5gs_handle;
11423 } else if (!strcmp(n1_msg_class, N1_SMINFO_FROM_UE) ||
11424 !strcmp(n1_msg_class, N1_SMINFO_TO_UE) ||
11425 !strcmp(n1_msg_class, UNKNOWN_N1_SMINFO)) {
11426 dissect_nas_5gs_sm_info(tvb, pinfo, tree, 0, n1_msg_class);
11427 return tvb_captured_length(tvb);
11428 } else if (!strcmp(n1_msg_class, "LPP")) {
11429 subdissector = lpp_handle;
11430 } else if (!strcmp(n1_msg_class, "SMS")) {
11431 subdissector = gsm_a_dtap_handle;
11432 } else if (!strcmp(n1_msg_class, "UPDP")) {
11433 /* UE policy delivery service */
11434 dissect_nas_5gs_updp(tvb, pinfo, tree);
11435 return tvb_captured_length(tvb);
11436 } else {
11437 subdissector = NULL;
11440 if (subdissector) {
11441 call_dissector_with_data(subdissector, tvb, pinfo, tree, NULL);
11442 return tvb_captured_length(tvb);
11443 } else {
11444 return 0;
11448 static unsigned
11449 get_nas_5gs_tcp_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset, void *data _U_)
11451 return tvb_get_ntohs(tvb, offset) + 2;
11454 static int
11455 dissect_nas_5gs_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
11457 col_clear(pinfo->cinfo, COL_INFO);
11458 return dissect_nas_5gs(tvb_new_subset_remaining(tvb, 2), pinfo, tree, data);
11461 static int
11462 dissect_nas_5gs_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
11464 tcp_dissect_pdus(tvb, pinfo, tree, true, 2, get_nas_5gs_tcp_len,
11465 dissect_nas_5gs_tcp_pdu, data);
11466 return tvb_reported_length(tvb);
11469 /* Heuristic dissector looks for "nas-5gs" string at packet start */
11470 static bool dissect_nas_5gs_heur(tvbuff_t *tvb, packet_info *pinfo,
11471 proto_tree *tree, void *data _U_)
11473 int offset = 0;
11474 tvbuff_t *nas_tvb;
11476 /* Needs to be at least as long as:
11477 - the signature string
11478 - at least one byte of NAS PDU payload */
11479 if (tvb_captured_length_remaining(tvb, offset) < (int)(strlen(PFNAME)+1)) {
11480 return false;
11483 /* OK, compare with signature string */
11484 if (tvb_strneql(tvb, offset, PFNAME, strlen(PFNAME)) != 0) {
11485 return false;
11487 offset += (int)strlen(PFNAME);
11489 /* Clear protocol name */
11490 col_clear(pinfo->cinfo, COL_PROTOCOL);
11492 /* Clear info column */
11493 col_clear(pinfo->cinfo, COL_INFO);
11495 /* Create tvb that starts at actual NAS PDU */
11496 nas_tvb = tvb_new_subset_remaining(tvb, offset);
11497 dissect_nas_5gs(nas_tvb, pinfo, tree, NULL);
11499 return true;
11502 void
11503 proto_register_nas_5gs(void)
11506 /* List of fields */
11508 static hf_register_info hf[] = {
11509 { &hf_nas_5gs_epd,
11510 { "Extended protocol discriminator", "nas-5gs.epd",
11511 FT_UINT8, BASE_DEC, VALS(nas_5gs_epd_vals), 0x0,
11512 NULL, HFILL }
11514 { &hf_nas_5gs_spare_bits,
11515 { "Spare", "nas-5gs.spare_bits",
11516 FT_UINT8, BASE_HEX, NULL, 0,
11517 NULL, HFILL }
11519 { &hf_nas_5gs_spare_b7,
11520 { "Spare", "nas-5gs.spare_b7",
11521 FT_UINT8, BASE_DEC, NULL, 0x80,
11522 NULL, HFILL }
11524 { &hf_nas_5gs_spare_b6,
11525 { "Spare", "nas-5gs.spare_b6",
11526 FT_UINT8, BASE_DEC, NULL, 0x40,
11527 NULL, HFILL }
11529 { &hf_nas_5gs_spare_b5,
11530 { "Spare", "nas-5gs.spare_b5",
11531 FT_UINT8, BASE_DEC, NULL, 0x20,
11532 NULL, HFILL }
11534 { &hf_nas_5gs_spare_b4,
11535 { "Spare", "nas-5gs.spare_b4",
11536 FT_UINT8, BASE_DEC, NULL, 0x10,
11537 NULL, HFILL }
11539 { &hf_nas_5gs_spare_b3,
11540 { "Spare", "nas-5gs.spare_b3",
11541 FT_UINT8, BASE_DEC, NULL, 0x08,
11542 NULL, HFILL }
11544 { &hf_nas_5gs_spare_b2,
11545 { "Spare", "nas-5gs.spare_b2",
11546 FT_UINT8, BASE_DEC, NULL, 0x04,
11547 NULL, HFILL }
11549 { &hf_nas_5gs_spare_b1,
11550 { "Spare", "nas-5gs.spare_b1",
11551 FT_UINT8, BASE_DEC, NULL, 0x02,
11552 NULL, HFILL }
11554 { &hf_nas_5gs_spare_b0,
11555 { "Spare", "nas-5gs.spare_b0",
11556 FT_UINT8, BASE_DEC, NULL, 0x01,
11557 NULL, HFILL }
11559 { &hf_nas_5gs_rfu_b2,
11560 { "Reserved for Future Use(RFU)", "nas-5gs.rfu.b2",
11561 FT_UINT8, BASE_DEC, NULL, 0x04,
11562 NULL, HFILL }
11564 { &hf_nas_5gs_rfu_b1,
11565 { "Reserved for Future Use(RFU)", "nas-5gs.rfu.b1",
11566 FT_UINT8, BASE_DEC, NULL, 0x02,
11567 NULL, HFILL }
11569 { &hf_nas_5gs_rfu_b0,
11570 { "Reserved for Future Use(RFU)", "nas-5gs.rfu.b0",
11571 FT_UINT8, BASE_DEC, NULL, 0x01,
11572 NULL, HFILL }
11575 { &hf_nas_5gs_security_header_type,
11576 { "Security header type", "nas-5gs.security_header_type",
11577 FT_UINT8, BASE_DEC, VALS(nas_5gs_security_header_type_vals), 0x0f,
11578 NULL, HFILL }
11580 { &hf_nas_5gs_msg_auth_code,
11581 { "Message authentication code", "nas-5gs.msg_auth_code",
11582 FT_UINT32, BASE_HEX, NULL, 0x0,
11583 NULL, HFILL }
11585 { &hf_nas_5gs_seq_no,
11586 { "Sequence number", "nas-5gs.seq_no",
11587 FT_UINT8, BASE_DEC, NULL, 0x0,
11588 NULL, HFILL }
11590 { &hf_nas_5gs_mm_msg_type,
11591 { "Message type", "nas-5gs.mm.message_type",
11592 FT_UINT8, BASE_HEX | BASE_EXT_STRING, &nas_5gs_mm_msg_strings_ext, 0x0,
11593 NULL, HFILL }
11595 { &hf_nas_5gs_sm_msg_type,
11596 { "Message type", "nas-5gs.sm.message_type",
11597 FT_UINT8, BASE_HEX | BASE_EXT_STRING, &nas_5gs_sm_msg_strings_ext, 0x0,
11598 NULL, HFILL }
11600 { &hf_nas_5gs_updp_msg_type,
11601 { "Message type", "nas-5gs.updp.message_type",
11602 FT_UINT8, BASE_HEX | BASE_EXT_STRING, &nas_5gs_updp_msg_strings_ext, 0x0,
11603 NULL, HFILL }
11605 { &hf_nas_5gs_common_elem_id,
11606 { "Element ID", "nas-5gs.common.elem_id",
11607 FT_UINT8, BASE_HEX, NULL, 0,
11608 NULL, HFILL }
11610 { &hf_nas_5gs_mm_elem_id,
11611 { "Element ID", "nas-5gs.mm.elem_id",
11612 FT_UINT8, BASE_HEX, NULL, 0,
11613 NULL, HFILL }
11615 { &hf_nas_5gs_sm_elem_id,
11616 { "Element ID", "nas-5gs.sm.elem_id",
11617 FT_UINT8, BASE_HEX, NULL, 0,
11618 NULL, HFILL }
11620 { &hf_nas_5gs_updp_elem_id,
11621 { "Element ID", "nas-5gs.updp.elem_id",
11622 FT_UINT8, BASE_HEX, NULL, 0,
11623 NULL, HFILL }
11625 { &hf_nas_5gs_proc_trans_id,
11626 { "Procedure transaction identity", "nas-5gs.proc_trans_id",
11627 FT_UINT8, BASE_DEC, NULL, 0x0,
11628 NULL, HFILL }
11630 { &hf_nas_5gs_spare_half_octet,
11631 { "Spare Half Octet", "nas-5gs.spare_half_octet",
11632 FT_UINT8, BASE_DEC, NULL, 0xf0,
11633 NULL, HFILL }
11635 { &hf_nas_5gs_spare_octet,
11636 { "Spare", "nas-5gs.spare_octet",
11637 FT_UINT8, BASE_DEC, NULL, 0x0,
11638 NULL, HFILL }
11640 { &hf_nas_5gs_pdu_session_id,
11641 { "PDU session identity", "nas-5gs.pdu_session_id",
11642 FT_UINT8, BASE_DEC, VALS(nas_5gs_pdu_session_id_vals), 0x0,
11643 NULL, HFILL }
11645 { &hf_nas_5gs_msg_elems,
11646 { "Message Elements", "nas-5gs.message_elements",
11647 FT_BYTES, BASE_NONE, NULL, 0x0,
11648 NULL, HFILL }
11650 { &hf_nas_5gs_cmn_add_info,
11651 { "Additional information", "nas-5gs.cmn.add_info",
11652 FT_BYTES, BASE_NONE, NULL,0x0,
11653 NULL, HFILL }
11655 { &hf_nas_5gs_cmn_acc_type,
11656 { "Access type", "nas-5gs.cmn.acc_type",
11657 FT_UINT8, BASE_DEC, VALS(nas_5gs_cmn_acc_type_vals), 0x03,
11658 NULL, HFILL }
11660 { &hf_nas_5gs_cmn_dnn,
11661 { "DNN", "nas-5gs.cmn.dnn",
11662 FT_STRING, BASE_NONE, NULL, 0x0,
11663 NULL, HFILL }
11665 { &hf_nas_5gs_cmn_service_level_aa_param_type,
11666 { "Type of service-level-AA parameter", "nas-5gs.cmn.service_level_aa_param.type",
11667 FT_UINT8, BASE_HEX, VALS(nas_5gs_cmn_service_level_aa_param_type_vals), 0x0,
11668 NULL, HFILL }
11670 { &hf_nas_5gs_cmn_service_level_aa_param_len,
11671 { "Length of service-level-AA parameter", "nas-5gs.cmn.service_level_aa_param.len",
11672 FT_UINT16, BASE_DEC, NULL, 0x0,
11673 NULL, HFILL }
11675 { &hf_nas_5gs_cmn_service_level_aa_param_device_id,
11676 { "Service-level device ID", "nas-5gs.cmn.service_level_aa_param.device_id",
11677 FT_STRING, BASE_NONE, NULL, 0x0,
11678 NULL, HFILL }
11680 { &hf_nas_5gs_cmn_service_level_aa_param_addr_type,
11681 { "Service-level-AA server address type", "nas-5gs.cmn.service_level_aa_param.addr.type",
11682 FT_UINT8, BASE_HEX, VALS(nas_5gs_cmn_service_level_aa_param_serv_addr_type_vals), 0x0,
11683 NULL, HFILL }
11685 { &hf_nas_5gs_cmn_service_level_aa_param_addr_ipv4,
11686 { "Service-level-AA server address IPv4", "nas-5gs.cmn.service_level_aa_param.addr.ipv4",
11687 FT_IPv4, BASE_NONE, NULL, 0x0,
11688 NULL, HFILL }
11690 { &hf_nas_5gs_cmn_service_level_aa_param_addr_ipv6,
11691 { "Service-level-AA server address IPv6", "nas-5gs.cmn.service_level_aa_param.addr.ipv6",
11692 FT_IPv6, BASE_NONE, NULL, 0x0,
11693 NULL, HFILL }
11695 { &hf_nas_5gs_cmn_service_level_aa_param_addr_fqdn,
11696 { "Service-level-AA server address FQDN", "nas-5gs.cmn.service_level_aa_param.addr.fqdn",
11697 FT_STRING, BASE_NONE, NULL, 0x0,
11698 NULL, HFILL }
11700 { &hf_nas_5gs_cmn_service_level_aa_param_resp_c2ar,
11701 { "C2 authorization result field (C2AR)", "nas-5gs.cmn.service_level_aa_param.response.c2ar",
11702 FT_UINT8, BASE_DEC, VALS(nas_5gs_cmn_service_level_aa_param_resp_c2ar_vals), 0x0c,
11703 NULL, HFILL }
11705 { &hf_nas_5gs_cmn_service_level_aa_param_resp_slar,
11706 { "Service-level-AA result field (SLAR)", "nas-5gs.cmn.service_level_aa_param.response.slar",
11707 FT_UINT8, BASE_DEC, VALS(nas_5gs_cmn_service_level_aa_param_resp_slar_vals), 0x03,
11708 NULL, HFILL }
11710 { &hf_nas_5gs_cmn_service_level_aa_param_payload_type,
11711 { "Service-level-AA payload type", "nas-5gs.cmn.service_level_aa_param.payload_type",
11712 FT_UINT8, BASE_DEC, VALS(nas_5gs_cmn_service_level_aa_param_payload_type_vals), 0x0,
11713 NULL, HFILL }
11715 { &hf_nas_5gs_cmn_service_level_aa_param_payload,
11716 { "Service-level-AA payload", "nas-5gs.cmn.service_level_aa_param.payload",
11717 FT_BYTES, BASE_NONE, NULL, 0x0,
11718 NULL, HFILL }
11720 { &hf_nas_5gs_cmn_service_level_aa_param_pending_ind_slapi,
11721 { "Service-level-AA pending indication (SLAPI)", "nas-5gs.cmn.service_level_aa_param.pending_indication.slapi",
11722 FT_BOOLEAN, 8, TFS(&nas_5gs_cmn_service_level_aa_param_pending_ind_slapi_value), 0x01,
11723 NULL, HFILL }
11725 { &hf_nas_5gs_cmn_service_level_aa_param_service_status_ind_uas,
11726 { "UAS", "nas-5gs.cmn.service_level_aa_param.service_status_indication.uas",
11727 FT_BOOLEAN, 8, TFS(&nas_5gs_enabled_not_enabled_value), 0x01,
11728 NULL, HFILL }
11730 { &hf_nas_5gs_cmn_service_level_aa_param_unknown,
11731 { "Value of service-level-AA parameter", "nas-5gs.cmn.service_level_aa_param.unknown",
11732 FT_BYTES, BASE_NONE, NULL, 0x0,
11733 NULL, HFILL }
11735 { &hf_nas_5gs_mm_for,
11736 { "Follow-On Request bit (FOR)", "nas-5gs.mm.for",
11737 FT_BOOLEAN, 8, TFS(&nas_5gs_for_tfs), 0x08,
11738 NULL, HFILL }
11740 { &hf_nas_5gs_mm_sms_requested,
11741 { "SMS over NAS transport requested (SMS requested)", "nas-5gs.mm.sms_requested",
11742 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
11743 NULL, HFILL }
11745 { &hf_nas_5gs_mm_ng_ran_rcu,
11746 { "NG-RAN Radio Capability Update (NG-RAN-RCU)", "nas-5gs.mm.ng_ran_rcu",
11747 FT_BOOLEAN, 8, TFS(&tfs_needed_not_needed), 0x02,
11748 NULL, HFILL }
11750 { &hf_nas_5gs_mm_5gs_pnb_ciot,
11751 { "5GS Preferred CIoT network behaviour (5GS PNB-CIoT)", "nas-5gs.mm.5gs_pnb_ciot",
11752 FT_UINT8, BASE_DEC, VALS(nas_5gs_mm_5gs_pnb_ciot_values), 0x0c,
11753 NULL, HFILL }
11755 { &hf_nas_5gs_mm_eps_pnb_ciot,
11756 { "EPS Preferred CIoT network behaviour (EPS-PNB-CIoT)", "nas-5gs.mm.eps_pnb_ciot",
11757 FT_UINT8, BASE_DEC, VALS(nas_5gs_mm_eps_pnb_ciot_values), 0x30,
11758 NULL, HFILL }
11760 { &hf_nas_5gs_mm_5gs_reg_type,
11761 { "5GS registration type", "nas-5gs.mm.5gs_reg_type",
11762 FT_UINT8, BASE_DEC, VALS(nas_5gs_registration_type_values), 0x07,
11763 NULL, HFILL }
11765 { &hf_nas_5gs_mm_tsc,
11766 { "Type of security context flag (TSC)", "nas-5gs.mm.tsc",
11767 FT_BOOLEAN, 8, TFS(&nas_5gs_mm_tsc_tfs), 0x08,
11768 NULL, HFILL }
11770 { &hf_nas_5gs_mm_nas_key_set_id,
11771 { "NAS key set identifier", "nas-5gs.mm.nas_key_set_id",
11772 FT_UINT8, BASE_DEC, NULL, 0x07,
11773 NULL, HFILL }
11775 { &hf_nas_5gs_mm_tsc_h1,
11776 { "Type of security context flag (TSC)", "nas-5gs.mm.tsc.h1",
11777 FT_BOOLEAN, 8, TFS(&nas_5gs_mm_tsc_tfs), 0x80,
11778 NULL, HFILL }
11780 { &hf_nas_5gs_mm_nas_key_set_id_h1,
11781 { "NAS key set identifier", "nas-5gs.mm.nas_key_set_id.h1",
11782 FT_UINT8, BASE_DEC, NULL, 0x70,
11783 NULL, HFILL }
11785 { &hf_nas_5gs_mm_5gmm_cause,
11786 { "5GMM cause", "nas-5gs.mm.5gmm_cause",
11787 FT_UINT8, BASE_DEC, VALS(nas_5gs_mm_cause_vals), 0x0,
11788 NULL, HFILL }
11790 { &hf_nas_5gs_mm_pld_cont_type,
11791 { "Payload container type", "nas-5gs.mm.pld_cont_type",
11792 FT_UINT8, BASE_DEC, VALS(nas_5gs_mm_pld_cont_type_vals), 0x0f,
11793 NULL, HFILL }
11795 { &hf_nas_5gs_mm_sst,
11796 { "Slice/service type (SST)", "nas-5gs.mm.sst",
11797 FT_UINT8, BASE_DEC, VALS(nas_5gs_mm_sst_vals), 0x0,
11798 NULL, HFILL }
11800 { &hf_nas_5gs_mm_sd,
11801 { "Slice differentiator (SD)", "nas-5gs.mm.mm_sd",
11802 FT_UINT24, BASE_DEC, NULL, 0x0,
11803 NULL, HFILL }
11805 { &hf_nas_5gs_mm_mapped_hplmn_sst,
11806 { "Mapped HPLMN SST", "nas-5gs.mm.mapped_hplmn_sst",
11807 FT_UINT8, BASE_DEC, NULL, 0x0,
11808 NULL, HFILL }
11810 { &hf_nas_5gs_mm_mapped_hplmn_ssd,
11811 { "Mapped HPLMN SD", "nas-5gs.mm.mapped_hplmn_ssd",
11812 FT_UINT24, BASE_DEC, NULL, 0x0,
11813 NULL, HFILL }
11815 { &hf_nas_5gs_mm_switch_off,
11816 { "Switch off", "nas-5gs.mm.switch_off",
11817 FT_BOOLEAN, 8, TFS(&nas_5gs_mm_switch_off_tfs), 0x08,
11818 NULL, HFILL }
11820 { &hf_nas_5gs_mm_re_reg_req,
11821 { "Re-registration required", "nas-5gs.mm.re_reg_req",
11822 FT_BOOLEAN, 8, TFS(&nas_5gs_mm_re_reg_req_tfs), 0x04,
11823 NULL, HFILL }
11825 { &hf_nas_5gs_mm_acc_type,
11826 { "Access type", "nas-5gs.mm.acc_type",
11827 FT_UINT8, BASE_DEC, VALS(nas_5gs_mm_acc_type_vals), 0x03,
11828 NULL, HFILL }
11830 { &hf_nas_5gs_mm_raai_b0,
11831 { "Registration Area Allocation Indication (RAAI)", "nas-5gs.mm.raai_b0",
11832 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_raai), 0x01,
11833 NULL, HFILL }
11835 { &hf_nas_5gs_mm_sprti_b1,
11836 { "Strictly Periodic Registration Timer Indication (SPRTI)", "nas-5gs.mm.sprti_b1",
11837 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02,
11838 NULL, HFILL }
11840 { &hf_nas_5gs_mm_ma_pdu_session_info_value,
11841 { "MA PDU session information value", "nas-5gs.mm.ma_pdu_session_info_value",
11842 FT_UINT8, BASE_DEC, VALS(nas_5gs_mm_ma_pdu_session_info_vals), 0x0f,
11843 NULL, HFILL }
11845 { &hf_nas_5gs_mm_len_of_mapped_s_nssai,
11846 { "Length of Mapped S-NSSAI content", "nas-5gs.mm.len_of_mapped_s_nssai",
11847 FT_UINT8, BASE_DEC, NULL, 0,
11848 NULL, HFILL }
11850 { &hf_nas_5gs_mm_conf_upd_ind_ack_b0,
11851 { "Acknowledgement", "nas-5gs.mm.conf_upd_ind.ack",
11852 FT_BOOLEAN, 8, TFS(&tfs_requested_not_requested), 0x01,
11853 NULL, HFILL }
11855 { &hf_nas_5gs_mm_conf_upd_ind_red_b1,
11856 { "Registration", "nas-5gs.mm.conf_upd_ind.red",
11857 FT_BOOLEAN, 8, TFS(&tfs_requested_not_requested), 0x02,
11858 NULL, HFILL }
11860 { &hf_nas_5gs_mm_cag_info_entry_len,
11861 { "Length of entry contents", "nas-5gs.mm.cag_info.entry.len",
11862 FT_UINT16, BASE_DEC, NULL, 0,
11863 NULL, HFILL }
11865 { &hf_nas_5gs_mm_cag_info_entry_cag_only,
11866 { "CAG only", "nas-5gs.mm.cag_info.entry.cag_only",
11867 FT_BOOLEAN, 8, TFS(&tfs_5gs_mm_cag_info_entry_cag_only), 0x01,
11868 NULL, HFILL }
11870 { &hf_nas_5gs_mm_cag_info_entry_lci,
11871 { "Length of CAG-IDs indicator (LCI)", "nas-5gs.mm.cag_info.entry.lci",
11872 FT_BOOLEAN, 8, TFS(&tfs_present_absent), 0x02,
11873 NULL, HFILL }
11875 { &hf_nas_5gs_mm_cag_info_entry_caili,
11876 { "CAG-ID with additional information list indicator (CAILI)", "nas-5gs.mm.cag_info.entry.caili",
11877 FT_BOOLEAN, 8, TFS(&tfs_present_absent), 0x04,
11878 NULL, HFILL }
11880 { &hf_nas_5gs_mm_cag_info_entry_cag_without_add_info_list_len,
11881 { "Length of CAG-IDs without additional information list", "nas-5gs.mm.cag_info.entry.cag_without_add_info_list_len",
11882 FT_UINT16, BASE_DEC, NULL, 0,
11883 NULL, HFILL }
11885 { &hf_nas_5gs_mm_cag_info_entry_cag_with_add_info_list_len,
11886 { "Length of CAG-IDs with additional information list contents", "nas-5gs.mm.cag_info.entry.cag_with_add_info_list_len",
11887 FT_UINT16, BASE_DEC, NULL, 0,
11888 NULL, HFILL }
11890 { &hf_nas_5gs_mm_cag_info_entry_cag_with_add_info_len,
11891 { "Length of CAG-ID with additional information contents", "nas-5gs.mm.cag_info.entry.cag_with_add_info_len",
11892 FT_UINT16, BASE_DEC, NULL, 0,
11893 NULL, HFILL }
11895 { &hf_nas_5gs_mm_cag_info_entry_cag_id,
11896 { "CAG-ID", "nas-5gs.mm.cag_info.entry.cag_id",
11897 FT_UINT32, BASE_HEX, NULL, 0,
11898 NULL, HFILL }
11900 { &hf_nas_5gs_mm_cag_info_entry_svii,
11901 { "Spare validity information indicator (SVII)", "nas-5gs.mm.cag_info.entry.svii",
11902 FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_absent), 0x0,
11903 NULL, HFILL }
11905 { &hf_nas_5gs_mm_cag_info_entry_tvii,
11906 { "Time validity information indicator (TVII)", "nas-5gs.mm.cag_info.entry.tvii",
11907 FT_BOOLEAN, 8, TFS(&tfs_present_absent), 0x01,
11908 NULL, HFILL }
11910 { &hf_nas_5gs_mm_cag_info_entry_nb_time_periods,
11911 { "Number of time periods", "nas-5gs.mm.cag_info.entry.nb_time_periods",
11912 FT_UINT8, BASE_DEC, NULL, 0x0,
11913 NULL, HFILL }
11915 { &hf_nas_5gs_mm_cag_info_entry_time_period,
11916 { "Number of time periods", "nas-5gs.mm.cag_info.entry.time_period",
11917 FT_BYTES, BASE_NONE, NULL, 0x0,
11918 NULL, HFILL }
11920 { &hf_nas_5gs_mm_ciot_small_data_cont_data_type,
11921 { "Data type", "nas-5gs.mm.ciot_small_data_cont.data_type",
11922 FT_UINT8, BASE_DEC, VALS(nas_5gs_mm_ciot_small_data_cont_data_type_values), 0xe0,
11923 NULL, HFILL }
11925 { &hf_nas_5gs_mm_ciot_small_data_cont_ddx,
11926 { "Downlink data expected (DDX)", "nas-5gs.mm.ciot_small_data_cont.ddx",
11927 FT_UINT8, BASE_DEC, VALS(nas_5gs_mm_ciot_small_data_cont_ddx_values), 0x18,
11928 NULL, HFILL }
11930 { &hf_nas_5gs_mm_ciot_small_data_cont_pdu_session_id,
11931 { "PDU session identity", "nas-5gs.mm.ciot_small_data_cont.pdu_session_id",
11932 FT_UINT8, BASE_DEC, VALS(nas_5gs_pdu_session_id_vals), 0x07,
11933 NULL, HFILL }
11935 { &hf_nas_5gs_mm_ciot_small_data_cont_add_info_len,
11936 { "Length of additional information", "nas-5gs.mm.ciot_small_data_cont.add_info_len",
11937 FT_UINT8, BASE_DEC, NULL, 0,
11938 NULL, HFILL }
11940 { &hf_nas_5gs_mm_ciot_small_data_cont_add_info,
11941 { "Additional information", "nas-5gs.mm.ciot_small_data_cont.add_info",
11942 FT_BYTES, BASE_NONE, NULL, 0,
11943 NULL, HFILL }
11945 { &hf_nas_5gs_mm_ciot_small_data_cont_data_contents,
11946 { "Data contents", "nas-5gs.mm.ciot_small_data_cont.data_contents",
11947 FT_BYTES, BASE_NONE, NULL, 0,
11948 NULL, HFILL }
11950 { &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_1_1,
11951 { "Ciphering data set for E-UTRA positioning SIB type 1-1","nas-5gs.mm.ciph_key_data.eutra_pos_sib_type_1_1",
11952 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x80,
11953 NULL, HFILL }
11955 { &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_1_2,
11956 { "Ciphering data set for E-UTRA positioning SIB type 1-2","nas-5gs.mm.ciph_key_data.eutra_pos_sib_type_1_2",
11957 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x40,
11958 NULL, HFILL }
11960 { &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_1_3,
11961 { "Ciphering data set for E-UTRA positioning SIB type 1-3","nas-5gs.mm.ciph_key_data.eutra_pos_sib_type_1_3",
11962 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x20,
11963 NULL, HFILL }
11965 { &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_1_4,
11966 { "Ciphering data set for E-UTRA positioning SIB type 1-4","nas-5gs.mm.ciph_key_data.eutra_pos_sib_type_1_4",
11967 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x10,
11968 NULL, HFILL }
11970 { &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_1_5,
11971 { "Ciphering data set for E-UTRA positioning SIB type 1-5","nas-5gs.mm.ciph_key_data.eutra_pos_sib_type_1_5",
11972 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x08,
11973 NULL, HFILL }
11975 { &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_1_6,
11976 { "Ciphering data set for E-UTRA positioning SIB type 1-6","nas-5gs.mm.ciph_key_data.eutra_pos_sib_type_1_6",
11977 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x04,
11978 NULL, HFILL }
11980 { &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_1_7,
11981 { "Ciphering data set for E-UTRA positioning SIB type 1-7","nas-5gs.mm.ciph_key_data.eutra_pos_sib_type_1_7",
11982 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x02,
11983 NULL, HFILL }
11985 { &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_1_8,
11986 { "Ciphering data set for E-UTRA positioning SIB type 1-8","nas-5gs.mm.ciph_key_data.eutra_pos_sib_type_1_8",
11987 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x01,
11988 NULL, HFILL }
11990 { &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_1,
11991 { "Ciphering data set for E-UTRA positioning SIB type 2-1","nas-5gs.mm.ciph_key_data.eutra_pos_sib_type_2_1",
11992 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x80,
11993 NULL, HFILL }
11995 { &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_2,
11996 { "Ciphering data set for E-UTRA positioning SIB type 2-2","nas-5gs.mm.ciph_key_data.eutra_pos_sib_type_2_2",
11997 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x40,
11998 NULL, HFILL }
12000 { &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_3,
12001 { "Ciphering data set for E-UTRA positioning SIB type 2-3","nas-5gs.mm.ciph_key_data.eutra_pos_sib_type_2_3",
12002 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x20,
12003 NULL, HFILL }
12005 { &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_4,
12006 { "Ciphering data set for E-UTRA positioning SIB type 2-4","nas-5gs.mm.ciph_key_data.eutra_pos_sib_type_2_4",
12007 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x10,
12008 NULL, HFILL }
12010 { &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_5,
12011 { "Ciphering data set for E-UTRA positioning SIB type 2-5","nas-5gs.mm.ciph_key_data.eutra_pos_sib_type_2_5",
12012 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x08,
12013 NULL, HFILL }
12015 { &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_6,
12016 { "Ciphering data set for E-UTRA positioning SIB type 2-6","nas-5gs.mm.ciph_key_data.eutra_pos_sib_type_2_6",
12017 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x04,
12018 NULL, HFILL }
12020 { &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_7,
12021 { "Ciphering data set for E-UTRA positioning SIB type 2-7","nas-5gs.mm.ciph_key_data.eutra_pos_sib_type_2_7",
12022 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x02,
12023 NULL, HFILL }
12025 { &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_8,
12026 { "Ciphering data set for E-UTRA positioning SIB type 2-8","nas-5gs.mm.ciph_key_data.eutra_pos_sib_type_2_8",
12027 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x01,
12028 NULL, HFILL }
12030 { &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_9,
12031 { "Ciphering data set for E-UTRA positioning SIB type 2-9","nas-5gs.mm.ciph_key_data.eutra_pos_sib_type_2_9",
12032 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x80,
12033 NULL, HFILL }
12035 { &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_10,
12036 { "Ciphering data set for E-UTRA positioning SIB type 2-10","nas-5gs.mm.ciph_key_data.eutra_pos_sib_type_2_10",
12037 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x40,
12038 NULL, HFILL }
12040 { &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_11,
12041 { "Ciphering data set for E-UTRA positioning SIB type 2-11","nas-5gs.mm.ciph_key_data.eutra_pos_sib_type_2_11",
12042 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x20,
12043 NULL, HFILL }
12045 { &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_12,
12046 { "Ciphering data set for E-UTRA positioning SIB type 2-12","nas-5gs.mm.ciph_key_data.eutra_pos_sib_type_2_12",
12047 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x10,
12048 NULL, HFILL }
12050 { &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_13,
12051 { "Ciphering data set for E-UTRA positioning SIB type 2-13","nas-5gs.mm.ciph_key_data.eutra_pos_sib_type_2_13",
12052 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x08,
12053 NULL, HFILL }
12055 { &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_14,
12056 { "Ciphering data set for E-UTRA positioning SIB type 2-14","nas-5gs.mm.ciph_key_data.eutra_pos_sib_type_2_14",
12057 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x04,
12058 NULL, HFILL }
12060 { &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_15,
12061 { "Ciphering data set for E-UTRA positioning SIB type 2-15","nas-5gs.mm.ciph_key_data.eutra_pos_sib_type_2_15",
12062 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x02,
12063 NULL, HFILL }
12065 { &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_16,
12066 { "Ciphering data set for E-UTRA positioning SIB type 2-16","nas-5gs.mm.ciph_key_data.eutra_pos_sib_type_2_16",
12067 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x01,
12068 NULL, HFILL }
12070 { &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_17,
12071 { "Ciphering data set for E-UTRA positioning SIB type 2-17","nas-5gs.mm.ciph_key_data.eutra_pos_sib_type_2_17",
12072 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x80,
12073 NULL, HFILL }
12075 { &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_18,
12076 { "Ciphering data set for E-UTRA positioning SIB type 2-18","nas-5gs.mm.ciph_key_data.eutra_pos_sib_type_2_18",
12077 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x40,
12078 NULL, HFILL }
12080 { &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_19,
12081 { "Ciphering data set for E-UTRA positioning SIB type 2-19","nas-5gs.mm.ciph_key_data.eutra_pos_sib_type_2_19",
12082 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x20,
12083 NULL, HFILL }
12085 { &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_20,
12086 { "Ciphering data set for E-UTRA positioning SIB type 2-20","nas-5gs.mm.ciph_key_data.eutra_pos_sib_type_2_20",
12087 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x10,
12088 NULL, HFILL }
12090 { &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_21,
12091 { "Ciphering data set for E-UTRA positioning SIB type 2-21","nas-5gs.mm.ciph_key_data.eutra_pos_sib_type_2_21",
12092 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x08,
12093 NULL, HFILL }
12095 { &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_22,
12096 { "Ciphering data set for E-UTRA positioning SIB type 2-22","nas-5gs.mm.ciph_key_data.eutra_pos_sib_type_2_22",
12097 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x04,
12098 NULL, HFILL }
12100 { &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_23,
12101 { "Ciphering data set for E-UTRA positioning SIB type 2-23","nas-5gs.mm.ciph_key_data.eutra_pos_sib_type_2_23",
12102 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x02,
12103 NULL, HFILL }
12105 { &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_24,
12106 { "Ciphering data set for E-UTRA positioning SIB type 2-24","nas-5gs.mm.ciph_key_data.eutra_pos_sib_type_2_24",
12107 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x01,
12108 NULL, HFILL }
12110 { &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_2_25,
12111 { "Ciphering data set for E-UTRA positioning SIB type 2-25","nas-5gs.mm.ciph_key_data.eutra_pos_sib_type_2_25",
12112 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x80,
12113 NULL, HFILL }
12115 { &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_3_1,
12116 { "Ciphering data set for E-UTRA positioning SIB type 3-1","nas-5gs.mm.ciph_key_data.eutra_pos_sib_type_3_1",
12117 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x40,
12118 NULL, HFILL }
12120 { &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_4_1,
12121 { "Ciphering data set for E-UTRA positioning SIB type 4-1","nas-5gs.mm.ciph_key_data.eutra_pos_sib_type_4_1",
12122 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x20,
12123 NULL, HFILL }
12125 { &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_5_1,
12126 { "Ciphering data set for E-UTRA positioning SIB type 5-1","nas-5gs.mm.ciph_key_data.eutra_pos_sib_type_5_1",
12127 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x10,
12128 NULL, HFILL }
12130 { &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_1_9,
12131 { "Ciphering data set for E-UTRA positioning SIB type 1-9","nas-5gs.mm.ciph_key_data.eutra_pos_sib_type_1_9",
12132 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x08,
12133 NULL, HFILL }
12135 { &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_type_1_10,
12136 { "Ciphering data set for E-UTRA positioning SIB type 1-10","nas-5gs.mm.ciph_key_data.eutra_pos_sib_type_1_10",
12137 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x04,
12138 NULL, HFILL }
12140 { &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_1_1,
12141 { "Ciphering data set for NR positioning SIB type 1-1","nas-5gs.mm.ciph_key_data.nr_pos_sib_type_1_1",
12142 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x80,
12143 NULL, HFILL }
12145 { &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_1_2,
12146 { "Ciphering data set for NR positioning SIB type 1-2","nas-5gs.mm.ciph_key_data.nr_pos_sib_type_1_2",
12147 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x40,
12148 NULL, HFILL }
12150 { &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_1_3,
12151 { "Ciphering data set for NR positioning SIB type 1-3","nas-5gs.mm.ciph_key_data.nr_pos_sib_type_1_3",
12152 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x20,
12153 NULL, HFILL }
12155 { &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_1_4,
12156 { "Ciphering data set for NR positioning SIB type 1-4","nas-5gs.mm.ciph_key_data.nr_pos_sib_type_1_4",
12157 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x10,
12158 NULL, HFILL }
12160 { &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_1_5,
12161 { "Ciphering data set for NR positioning SIB type 1-5","nas-5gs.mm.ciph_key_data.nr_pos_sib_type_1_5",
12162 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x08,
12163 NULL, HFILL }
12165 { &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_1_6,
12166 { "Ciphering data set for NR positioning SIB type 1-6","nas-5gs.mm.ciph_key_data.nr_pos_sib_type_1_6",
12167 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x04,
12168 NULL, HFILL }
12170 { &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_1_7,
12171 { "Ciphering data set for NR positioning SIB type 1-7","nas-5gs.mm.ciph_key_data.nr_pos_sib_type_1_7",
12172 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x02,
12173 NULL, HFILL }
12175 { &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_1_8,
12176 { "Ciphering data set for NR positioning SIB type 1-8","nas-5gs.mm.ciph_key_data.nr_pos_sib_type_1_8",
12177 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x01,
12178 NULL, HFILL }
12180 { &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_1,
12181 { "Ciphering data set for NR positioning SIB type 2-1","nas-5gs.mm.ciph_key_data.nr_pos_sib_type_2_1",
12182 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x80,
12183 NULL, HFILL }
12185 { &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_2,
12186 { "Ciphering data set for NR positioning SIB type 2-2","nas-5gs.mm.ciph_key_data.nr_pos_sib_type_2_2",
12187 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x40,
12188 NULL, HFILL }
12190 { &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_3,
12191 { "Ciphering data set for NR positioning SIB type 2-3","nas-5gs.mm.ciph_key_data.nr_pos_sib_type_2_3",
12192 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x20,
12193 NULL, HFILL }
12195 { &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_4,
12196 { "Ciphering data set for NR positioning SIB type 2-4","nas-5gs.mm.ciph_key_data.nr_pos_sib_type_2_4",
12197 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x10,
12198 NULL, HFILL }
12200 { &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_5,
12201 { "Ciphering data set for NR positioning SIB type 2-5","nas-5gs.mm.ciph_key_data.nr_pos_sib_type_2_5",
12202 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x08,
12203 NULL, HFILL }
12205 { &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_6,
12206 { "Ciphering data set for NR positioning SIB type 2-6","nas-5gs.mm.ciph_key_data.nr_pos_sib_type_2_6",
12207 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x04,
12208 NULL, HFILL }
12210 { &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_7,
12211 { "Ciphering data set for NR positioning SIB type 2-7","nas-5gs.mm.ciph_key_data.nr_pos_sib_type_2_7",
12212 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x02,
12213 NULL, HFILL }
12215 { &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_8,
12216 { "Ciphering data set for NR positioning SIB type 2-8","nas-5gs.mm.ciph_key_data.nr_pos_sib_type_2_8",
12217 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x01,
12218 NULL, HFILL }
12220 { &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_9,
12221 { "Ciphering data set for NR positioning SIB type 2-9","nas-5gs.mm.ciph_key_data.nr_pos_sib_type_2_9",
12222 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x80,
12223 NULL, HFILL }
12225 { &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_10,
12226 { "Ciphering data set for NR positioning SIB type 2-10","nas-5gs.mm.ciph_key_data.nr_pos_sib_type_2_10",
12227 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x40,
12228 NULL, HFILL }
12230 { &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_11,
12231 { "Ciphering data set for NR positioning SIB type 2-11","nas-5gs.mm.ciph_key_data.nr_pos_sib_type_2_11",
12232 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x20,
12233 NULL, HFILL }
12235 { &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_12,
12236 { "Ciphering data set for NR positioning SIB type 2-12","nas-5gs.mm.ciph_key_data.nr_pos_sib_type_2_12",
12237 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x10,
12238 NULL, HFILL }
12240 { &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_13,
12241 { "Ciphering data set for NR positioning SIB type 2-13","nas-5gs.mm.ciph_key_data.nr_pos_sib_type_2_13",
12242 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x08,
12243 NULL, HFILL }
12245 { &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_14,
12246 { "Ciphering data set for NR positioning SIB type 2-14","nas-5gs.mm.ciph_key_data.nr_pos_sib_type_2_14",
12247 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x04,
12248 NULL, HFILL }
12250 { &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_15,
12251 { "Ciphering data set for NR positioning SIB type 2-15","nas-5gs.mm.ciph_key_data.nr_pos_sib_type_2_15",
12252 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x02,
12253 NULL, HFILL }
12255 { &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_16,
12256 { "Ciphering data set for NR positioning SIB type 2-16","nas-5gs.mm.ciph_key_data.nr_pos_sib_type_2_16",
12257 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x01,
12258 NULL, HFILL }
12260 { &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_17,
12261 { "Ciphering data set for NR positioning SIB type 2-17","nas-5gs.mm.ciph_key_data.nr_pos_sib_type_2_17",
12262 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x80,
12263 NULL, HFILL }
12265 { &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_18,
12266 { "Ciphering data set for NR positioning SIB type 2-18","nas-5gs.mm.ciph_key_data.nr_pos_sib_type_2_18",
12267 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x40,
12268 NULL, HFILL }
12270 { &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_19,
12271 { "Ciphering data set for NR positioning SIB type 2-19","nas-5gs.mm.ciph_key_data.nr_pos_sib_type_2_19",
12272 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x20,
12273 NULL, HFILL }
12275 { &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_20,
12276 { "Ciphering data set for NR positioning SIB type 2-20","nas-5gs.mm.ciph_key_data.nr_pos_sib_type_2_20",
12277 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x10,
12278 NULL, HFILL }
12280 { &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_21,
12281 { "Ciphering data set for NR positioning SIB type 2-21","nas-5gs.mm.ciph_key_data.nr_pos_sib_type_2_21",
12282 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x08,
12283 NULL, HFILL }
12285 { &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_22,
12286 { "Ciphering data set for NR positioning SIB type 2-22","nas-5gs.mm.ciph_key_data.nr_pos_sib_type_2_22",
12287 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x04,
12288 NULL, HFILL }
12290 { &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_23,
12291 { "Ciphering data set for NR positioning SIB type 2-23","nas-5gs.mm.ciph_key_data.nr_pos_sib_type_2_23",
12292 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x02,
12293 NULL, HFILL }
12295 { &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_3_1,
12296 { "Ciphering data set for NR positioning SIB type 3-1","nas-5gs.mm.ciph_key_data.nr_pos_sib_type_3_1",
12297 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x01,
12298 NULL, HFILL }
12300 { &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_4_1,
12301 { "Ciphering data set for NR positioning SIB type 4-1","nas-5gs.mm.ciph_key_data.nr_pos_sib_type_4_1",
12302 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x80,
12303 NULL, HFILL }
12305 { &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_5_1,
12306 { "Ciphering data set for NR positioning SIB type 5-1","nas-5gs.mm.ciph_key_data.nr_pos_sib_type_5_1",
12307 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x40,
12308 NULL, HFILL }
12310 { &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_6_1,
12311 { "Ciphering data set for NR positioning SIB type 6-1","nas-5gs.mm.ciph_key_data.nr_pos_sib_type_6_1",
12312 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x20,
12313 NULL, HFILL }
12315 { &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_6_2,
12316 { "Ciphering data set for NR positioning SIB type 6-2","nas-5gs.mm.ciph_key_data.nr_pos_sib_type_6_2",
12317 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x10,
12318 NULL, HFILL }
12320 { &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_6_3,
12321 { "Ciphering data set for NR positioning SIB type 6-3","nas-5gs.mm.ciph_key_data.nr_pos_sib_type_6_3",
12322 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x08,
12323 NULL, HFILL }
12325 { &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_6_4,
12326 { "Ciphering data set for NR positioning SIB type 6-4","nas-5gs.mm.ciph_key_data.nr_pos_sib_type_6_4",
12327 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x04,
12328 NULL, HFILL }
12330 { &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_6_5,
12331 { "Ciphering data set for NR positioning SIB type 6-5","nas-5gs.mm.ciph_key_data.nr_pos_sib_type_6_5",
12332 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x02,
12333 NULL, HFILL }
12335 { &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_6_6,
12336 { "Ciphering data set for NR positioning SIB type 6-6","nas-5gs.mm.ciph_key_data.nr_pos_sib_type_6_6",
12337 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x01,
12338 NULL, HFILL }
12340 { &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_1_9,
12341 { "Ciphering data set for NR positioning SIB type 1-9","nas-5gs.mm.ciph_key_data.nr_pos_sib_type_1_9",
12342 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x80,
12343 NULL, HFILL }
12345 { &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_1_10,
12346 { "Ciphering data set for NR positioning SIB type 1-10","nas-5gs.mm.ciph_key_data.nr_pos_sib_type_1_10",
12347 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x40,
12348 NULL, HFILL }
12350 { &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_24,
12351 { "Ciphering data set for NR positioning SIB type 2-24","nas-5gs.mm.ciph_key_data.nr_pos_sib_type_2_24",
12352 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x20,
12353 NULL, HFILL }
12355 { &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_type_2_25,
12356 { "Ciphering data set for NR positioning SIB type 2-25","nas-5gs.mm.ciph_key_data.nr_pos_sib_type_2_25",
12357 FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x10,
12358 NULL, HFILL }
12360 { &hf_nas_5gs_mm_ciph_key_data_ciphering_set_id,
12361 { "Ciphering set ID","nas-5gs.mm.ciph_key_data.ciphering_set_id",
12362 FT_UINT16, BASE_DEC, NULL, 0x0,
12363 NULL, HFILL }
12365 { &hf_nas_5gs_mm_ciph_key_data_ciphering_key,
12366 { "Ciphering key","nas-5gs.mm.ciph_key_data.ciphering_key",
12367 FT_BYTES, BASE_NONE, NULL, 0x0,
12368 NULL, HFILL }
12370 { &hf_nas_5gs_mm_ciph_key_data_c0_len,
12371 { "c0 length","nas-5gs.mm.ciph_key_data.c0_len",
12372 FT_UINT8, BASE_DEC, NULL, 0x1f,
12373 NULL, HFILL }
12375 { &hf_nas_5gs_mm_ciph_key_data_c0,
12376 { "c0","nas-5gs.mm.ciph_key_data.c0",
12377 FT_BYTES, BASE_NONE, NULL, 0x0,
12378 NULL, HFILL }
12380 { &hf_nas_5gs_mm_ciph_key_data_eutra_pos_sib_len,
12381 { "E-UTRA posSIB length","nas-5gs.mm.ciph_key_data.eutra_pos_sib_len",
12382 FT_UINT8, BASE_DEC, NULL, 0x0f,
12383 NULL, HFILL }
12385 { &hf_nas_5gs_mm_ciph_key_data_nr_pos_sib_len,
12386 { "NR posSIB length","nas-5gs.mm.ciph_key_data.nr_pos_sib_len",
12387 FT_UINT8, BASE_DEC, NULL, 0x0f,
12388 NULL, HFILL }
12390 { &hf_nas_5gs_mm_ciph_key_data_validity_start_time,
12391 { "Validity start time", "nas-5gs.mm.ciph_key_data.validity_start_time",
12392 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL, 0x0,
12393 NULL, HFILL }
12395 { &hf_nas_5gs_mm_ciph_key_data_validity_duration,
12396 { "Validity duration", "nas-5gs.mm.ciph_key_data.validity_duration",
12397 FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_minute_minutes), 0x0,
12398 NULL, HFILL }
12400 { &hf_nas_5gs_mm_ciph_key_data_tais_list_len,
12401 { "TAIs list length", "nas-5gs.mm.ciph_key_data.tais_list_len",
12402 FT_UINT8, BASE_DEC, NULL, 0x0,
12403 NULL, HFILL }
12405 { &hf_nas_5gs_mm_ctrl_plane_serv_type,
12406 { "Control plane service type", "nas-5gs.mm.ctrl_plane_serv_type",
12407 FT_UINT8, BASE_DEC, VALS(nas_5gs_mm_ctrl_plane_serv_type_values), 0x07,
12408 NULL, HFILL }
12410 { &hf_nas_5gs_mm_nas_sec_algo_enc,
12411 { "Type of ciphering algorithm", "nas-5gs.mm.nas_sec_algo_enc",
12412 FT_UINT8, BASE_DEC, VALS(nas_5gs_mm_type_of_enc_algo_vals), 0xf0,
12413 NULL, HFILL }
12415 { &hf_nas_5gs_mm_nas_sec_algo_ip,
12416 { "Type of integrity protection algorithm", "nas-5gs.mm.nas_sec_algo_ip",
12417 FT_UINT8, BASE_DEC, VALS(nas_5gs_mm_type_of_ip_algo_vals), 0x0f,
12418 NULL, HFILL }
12420 { &hf_nas_5gs_mm_s1_mode_b0,
12421 { "EPC NAS supported (S1 mode)", "nas-5gs.mm.s1_mode_b0",
12422 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
12423 NULL, HFILL }
12425 { &hf_nas_5gs_mm_ho_attach_b1,
12426 { "ATTACH REQUEST message containing PDN CONNECTIVITY REQUEST message for handover support (HO attach)", "nas-5gs.mm.ho_attach_b1",
12427 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02,
12428 NULL, HFILL }
12430 { &hf_nas_5gs_mm_lpp_cap_b2,
12431 { "LTE Positioning Protocol (LPP) capability", "nas-5gs.mm.lpp_cap_b2",
12432 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x04,
12433 NULL, HFILL }
12435 { &hf_nas_5gs_mm_restrict_ec_b3,
12436 { "Restriction on use of enhanced coverage support (RestrictEC)", "nas-5gs.mm.restrict_ec_b3",
12437 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x08,
12438 NULL, HFILL }
12440 { &hf_nas_5gs_mm_5g_cp_ciot_b4,
12441 { "Control plane CIoT 5GS optimization (5G-CP CIoT)", "nas-5gs.mm.5g_cp_ciot_b4",
12442 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x10,
12443 NULL, HFILL }
12445 { &hf_nas_5gs_mm_n3_data_b5,
12446 { "N3 data transfer (N3 data)", "nas-5gs.mm.n3_data_b5",
12447 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x20,
12448 NULL, HFILL }
12450 { &hf_nas_5gs_mm_5g_iphc_cp_ciot_b6,
12451 { "IP header compression for control plane CIoT 5GS optimization (5G-IPHC-CP CIoT)", "nas-5gs.mm.5g_iphc_cp_ciot_b6",
12452 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x40,
12453 NULL, HFILL }
12455 { &hf_nas_5gs_mm_sgc_b7,
12456 { "Service gap control (SGC)", "nas-5gs.mm.sgc_b7",
12457 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x80,
12458 NULL, HFILL }
12460 { &hf_nas_5gs_mm_5g_srvcc_b0,
12461 { "5G-SRVCC from NG-RAN to UTRAN (5GSRVCC) capability", "nas-5gs.mm.5g_srvcc_b0",
12462 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
12463 NULL, HFILL }
12465 { &hf_nas_5gs_mm_5g_up_ciot_b1,
12466 { "User plane CIoT 5GS optimization (5G-UP CIoT)", "nas-5gs.mm.5g_up_ciot_b1",
12467 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02,
12468 NULL, HFILL }
12470 { &hf_nas_5gs_mm_v2x_b2,
12471 { "V2X capability (V2X)", "nas-5gs.mm.v2x_b2",
12472 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x04,
12473 NULL, HFILL }
12475 { &hf_nas_5gs_mm_v2xcepc5_b3,
12476 { "V2X communication over E-UTRA-PC5 capability (V2XCEPC5)", "nas-5gs.mm.v2xcepc5_b3",
12477 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x08,
12478 NULL, HFILL }
12480 { &hf_nas_5gs_mm_v2xcnpc5_b4,
12481 { "V2X communication over NR-PC5 capability (V2XCNPC5)", "nas-5gs.mm.v2xcnpc5_b4",
12482 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x10,
12483 NULL, HFILL }
12485 { &hf_nas_5gs_mm_5g_lcs_b5,
12486 { "Location Services (5G-LCS) notification mechanisms capability", "nas-5gs.mm.5g_lcs_b5",
12487 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x20,
12488 NULL, HFILL }
12490 { &hf_nas_5gs_mm_nssaa_b6,
12491 { "Network slice-specific authentication and authorization (NSSAA)", "nas-5gs.mm.nssaa_b6",
12492 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x40,
12493 NULL, HFILL }
12495 { &hf_nas_5gs_mm_racs_b7,
12496 { "Radio capability signalling optimisation (RACS) capability", "nas-5gs.mm.racs_b7",
12497 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x80,
12498 NULL, HFILL }
12500 { &hf_nas_5gs_mm_cag_b0,
12501 { "Closed Access Group (CAG) capability", "nas-5gs.mm.cag_b0",
12502 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
12503 NULL, HFILL }
12505 { &hf_nas_5gs_mm_wsusa_b1,
12506 { "WUS assistance (WUSA) information reception capability", "nas-5gs.mm.wsusa_b1",
12507 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02,
12508 NULL, HFILL }
12510 { &hf_nas_5gs_mm_multiple_up_b2,
12511 { "Multiple user-plane resources support (multipleUP)", "nas-5gs.mm.multiple_up_b2",
12512 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x04,
12513 NULL, HFILL }
12515 { &hf_nas_5gs_mm_5g_ehc_cp_ciot_b3,
12516 { "Ethernet header compression for control plane CIoT 5GS optimization (5G-EHC-CP CIoT)", "nas-5gs.mm.ehc_cp_ciot_b3",
12517 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x08,
12518 NULL, HFILL }
12520 { &hf_nas_5gs_mm_er_nssai_b4,
12521 { "Extended rejected NSSAI (ER-NSSAI)", "nas-5gs.mm.er_nssai_b4",
12522 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x10,
12523 NULL, HFILL }
12525 { &hf_nas_5gs_mm_5g_prose_dd_b5,
12526 { "5G ProSe direct discovery (5G ProSe-dd)", "nas-5gs.mm.prose_dd_b5",
12527 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x20,
12528 NULL, HFILL }
12530 { &hf_nas_5gs_mm_5g_prose_dc_b6,
12531 { "5G ProSe direct communication (5G ProSe-dc)", "nas-5gs.mm.prose_dc_b6",
12532 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x40,
12533 NULL, HFILL }
12535 { &hf_nas_5gs_mm_5g_prose_l2relay_b7,
12536 { "5G ProSe layer-2 UE-to-network-relay (5G ProSe-l2relay)", "nas-5gs.mm.prose_l2relay_b7",
12537 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x80,
12538 NULL, HFILL }
12540 { &hf_nas_5gs_mm_5g_prose_l3relay_b0,
12541 { "5G ProSe layer-3 UE-to-network-relay (5G ProSe-l3relay)", "nas-5gs.mm.5g_prose_l3relay_b0",
12542 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
12543 NULL, HFILL }
12545 { &hf_nas_5gs_mm_5g_prose_l2rmt_b1,
12546 { "5G ProSe layer-2 UE-to-network-remote (5G ProSe-l2rmt)", "nas-5gs.mm.5g_prose_l2rmt_b1",
12547 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02,
12548 NULL, HFILL }
12550 { &hf_nas_5gs_mm_5g_prose_l3rmt_b2,
12551 { "5G ProSe layer-3 UE-to-network-remote (5G ProSe-l3rmt)", "nas-5gs.mm.5g_prose_l3rmt_b2",
12552 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x04,
12553 NULL, HFILL }
12555 { &hf_nas_5gs_mm_nr_pssi_b3,
12556 { "NR paging subgroup support indication (NR-PSSI)", "nas-5gs.mm.nr_pssi_b3",
12557 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x08,
12558 NULL, HFILL }
12560 { &hf_nas_5gs_mm_ncr_b4,
12561 { "N1 NAS signalling connection release (NCR)", "nas-5gs.mm.ncr_b4",
12562 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x10,
12563 NULL, HFILL }
12565 { &hf_nas_5gs_mm_piv_b5,
12566 { "Paging indication for voice services (PIV)", "nas-5gs.mm.piv_b5",
12567 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x20,
12568 NULL, HFILL }
12570 { &hf_nas_5gs_mm_rpr_b6,
12571 { "Reject paging request (RPR)", "nas-5gs.mm.rpr_b6",
12572 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x40,
12573 NULL, HFILL }
12575 { &hf_nas_5gs_mm_pr_b7,
12576 { "Paging restriction (PR)", "nas-5gs.mm.pr_b7",
12577 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x80,
12578 NULL, HFILL }
12580 { &hf_nas_5gs_mm_nssrg_b0,
12581 { "NSSRG", "nas-5gs.mm.nssrg_b0",
12582 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
12583 NULL, HFILL }
12585 { &hf_nas_5gs_mm_mint_b1,
12586 { "Minimization of service interruption (MINT)", "nas-5gs.mm.mint_b1",
12587 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02,
12588 NULL, HFILL }
12590 { &hf_nas_5gs_mm_event_notif_b2,
12591 { "Event notification", "nas-5gs.mm.event_notif_b2",
12592 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x04,
12593 NULL, HFILL }
12595 { &hf_nas_5gs_mm_ssnpnsi_b3,
12596 { "SOR-SNPN-SI (SSNPNSI)", "nas-5gs.mm.ssnpnsi_b3",
12597 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x08,
12598 NULL, HFILL }
12600 { &hf_nas_5gs_mm_ex_cag_b4,
12601 { "Extended CAG information list support (Ex-CAG)", "nas-5gs.mm.ex_cag_b4",
12602 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x10,
12603 NULL, HFILL }
12605 { &hf_nas_5gs_mm_nsag_b5,
12606 { "NSAG", "nas-5gs.mm.nsag_b5",
12607 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x20,
12608 NULL, HFILL }
12610 { &hf_nas_5gs_mm_uas_b6,
12611 { "UAS", "nas-5gs.mm.uas_b6",
12612 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x40,
12613 NULL, HFILL }
12615 { &hf_nas_5gs_mm_mpsiu_b7,
12616 { "MPSIU", "nas-5gs.mm.mpsiu_b7",
12617 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x80,
12618 NULL, HFILL }
12620 { &hf_nas_5gs_mm_rcmap_b0,
12621 { "RCMAP", "nas-5gs.mm.rcmap_b0",
12622 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
12623 NULL, HFILL }
12625 { &hf_nas_5gs_mm_rcman_b1,
12626 { "RCMAN", "nas-5gs.mm.rcman_b1",
12627 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02,
12628 NULL, HFILL }
12630 { &hf_nas_5gs_mm_esi_b2,
12631 { "ESI", "nas-5gs.mm.esi_b2",
12632 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x04,
12633 NULL, HFILL }
12635 { &hf_nas_5gs_mm_eci_b3,
12636 { "ECI", "nas-5gs.mm.eci_b3",
12637 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x08,
12638 NULL, HFILL }
12640 { &hf_nas_5gs_mm_rantiming_b4,
12641 { "RANtiming", "nas-5gs.mm.rantiming_b4",
12642 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x10,
12643 NULL, HFILL }
12645 { &hf_nas_5gs_mm_ladn_ds_b5,
12646 { "LADN-DS", "nas-5gs.mm.ladn_ds_b5",
12647 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x20,
12648 NULL, HFILL }
12650 { &hf_nas_5gs_mm_nsr_b6,
12651 { "NSR", "nas-5gs.mm.nsr_b6",
12652 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x40,
12653 NULL, HFILL }
12655 { &hf_nas_5gs_mm_sbts_b7,
12656 { "SBTS", "nas-5gs.mm.sbts_b7",
12657 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x80,
12658 NULL, HFILL }
12660 { &hf_nas_5gs_mm_a2xepc5_b0,
12661 { "A2XEPC5", "nas-5gs.mm.a2xepc5_b0",
12662 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
12663 NULL, HFILL }
12665 { &hf_nas_5gs_mm_a2xnpc5_b1,
12666 { "A2XNPC5", "nas-5gs.mm.a2xnpc5_b1",
12667 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02,
12668 NULL, HFILL }
12670 { &hf_nas_5gs_mm_un_per_b2,
12671 { "UN-PER", "nas-5gs.mm.un_per_b2",
12672 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x04,
12673 NULL, HFILL }
12675 { &hf_nas_5gs_mm_sbns_b3,
12676 { "SBNS", "nas-5gs.mm.sbns_b3",
12677 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x08,
12678 NULL, HFILL }
12680 { &hf_nas_5gs_mm_rslps_b4,
12681 { "RSLPS", "nas-5gs.mm.rslps_b4",
12682 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x10,
12683 NULL, HFILL }
12685 { &hf_nas_5gs_mm_5g_prose_l2u2u_relay_b5,
12686 { "5G ProSe-l2U2U relay", "nas-5gs.mm.5g_prose_l2u2u_relay_b5",
12687 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x20,
12688 NULL, HFILL }
12690 { &hf_nas_5gs_mm_5g_prose_l3u2u_relay_b6,
12691 { "5G ProSe-l3U2U relay", "nas-5gs.mm.5g_prose_l3u2u_relay_b6",
12692 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x40,
12693 NULL, HFILL }
12695 { &hf_nas_5gs_mm_5g_prose_l2end_b7,
12696 { "5G ProSe-l2end", "nas-5gs.mm.5g_prose_l2end_b7",
12697 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x80,
12698 NULL, HFILL }
12700 { &hf_nas_5gs_mm_5g_prose_l3end_b0,
12701 { "5G ProSe-l3end", "nas-5gs.mm.5g_prose_l3end_b0",
12702 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
12703 NULL, HFILL }
12705 { &hf_nas_5gs_mm_rslp_b1,
12706 { "RSLP", "nas-5gs.mm.rslp_b1",
12707 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02,
12708 NULL, HFILL }
12710 { &hf_nas_5gs_mm_pns_b2,
12711 { "PNS", "nas-5gs.mm.pns_b2",
12712 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x04,
12713 NULL, HFILL }
12715 { &hf_nas_5gs_mm_lcs_upp_b3,
12716 { "LCS-UPP", "nas-5gs.mm.lcs_upp_b3",
12717 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x08,
12718 NULL, HFILL }
12720 { &hf_nas_5gs_mm_supl_b4,
12721 { "SUPL", "nas-5gs.mm.supl_b4",
12722 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x10,
12723 NULL, HFILL }
12725 { &hf_nas_5gs_mm_tempns_b5,
12726 { "TempNS", "nas-5gs.mm.tempns_b5",
12727 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x20,
12728 NULL, HFILL }
12730 { &hf_nas_5gs_mm_slvi_b6,
12731 { "SLVI", "nas-5gs.mm.slvi_b6",
12732 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x40,
12733 NULL, HFILL }
12735 { &hf_nas_5gs_mm_a2x_uu_b7,
12736 { "A2X-Uu", "nas-5gs.mm.a2x_uu_b7",
12737 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x80,
12738 NULL, HFILL }
12740 { &hf_nas_5gs_mm_mcsiu_b0,
12741 { "MCSIU", "nas-5gs.mm.mcsiu_b0",
12742 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
12743 NULL, HFILL }
12745 { &hf_nas_5gs_mm_nvl_satnr_b1,
12746 { "NVL-SATNR", "nas-5gs.mm.nvl_satnr_b1",
12747 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02,
12748 NULL, HFILL }
12750 { &hf_nas_5gs_rslpl_b2,
12751 { "RSLPL", "nas-5gs.mm.rslpl_b2",
12752 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x04,
12753 NULL, HFILL }
12755 { &hf_nas_5gs_nsuc_b3,
12756 { "NSUC", "nas-5gs.mm.nsuc_b3",
12757 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x08,
12758 NULL, HFILL }
12760 { &hf_nas_5gs_mm_type_id,
12761 { "Type of identity", "nas-5gs.mm.type_id",
12762 FT_UINT8, BASE_DEC, VALS(nas_5gs_mm_type_id_vals), 0x07,
12763 NULL, HFILL }
12765 { &hf_nas_5gs_mm_odd_even,
12766 { "Odd/even indication","nas-5gs.mm.odd_even",
12767 FT_BOOLEAN, 8, TFS(&nas_5gs_odd_even_tfs), 0x08,
12768 NULL, HFILL }
12770 { &hf_nas_5gs_mm_length,
12771 { "Length", "nas-5gs.mm.length",
12772 FT_UINT8, BASE_DEC, NULL, 0x0,
12773 NULL, HFILL }
12775 { &hf_nas_5gs_mm_abba,
12776 { "ABBA Contents", "nas-5gs.mm.abba_contents",
12777 FT_BYTES, BASE_NONE, NULL, 0x00,
12778 NULL, HFILL }
12780 { &hf_nas_5gs_mm_pld_cont,
12781 { "Payload container", "nas-5gs.mm.pld_cont",
12782 FT_BYTES, BASE_NONE, NULL, 0x0,
12783 NULL, HFILL }
12785 { &hf_nas_5gs_mm_pld_cont_event_notif_ind_nb,
12786 { "Number of event notification indicators", "nas-5gs.mm.pld_cont.event_notif_ind.nb",
12787 FT_UINT8, BASE_DEC, NULL, 0x0,
12788 NULL, HFILL }
12790 { &hf_nas_5gs_mm_pld_cont_event_notif_ind_type,
12791 { "Type of event notification indicator", "nas-5gs.mm.pld_cont.event_notif_ind.type",
12792 FT_UINT8, BASE_HEX, VALS(nas_5gs_mm_pld_cont_event_notif_ind_type_vals), 0x0,
12793 NULL, HFILL }
12795 { &hf_nas_5gs_mm_pld_cont_event_notif_ind_len,
12796 { "Length of event notification indicator", "nas-5gs.mm.pld_cont.event_notif_ind.len",
12797 FT_UINT8, BASE_DEC, NULL, 0x0,
12798 NULL, HFILL }
12800 { &hf_nas_5gs_mm_pld_cont_event_notif_ind_val,
12801 { "Value of event notification indicator", "nas-5gs.mm.pld_cont.event_notif_ind.val",
12802 FT_BYTES, BASE_NONE, NULL, 0x0,
12803 NULL, HFILL }
12805 { &hf_nas_5gs_mm_pld_cont_nb_entries,
12806 { "Number of entries", "nas-5gs.mm.pld_cont.nb_entries",
12807 FT_UINT8, BASE_DEC, NULL, 0x0,
12808 NULL, HFILL }
12810 { &hf_nas_5gs_mm_pld_cont_pld_cont_len,
12811 { "Length of Payload container entry", "nas-5gs.mm.pld_cont.pld_cont_len",
12812 FT_UINT16, BASE_DEC, NULL, 0x0,
12813 NULL, HFILL }
12815 { &hf_nas_5gs_mm_pld_cont_nb_opt_ies,
12816 { "Number of optional IEs", "nas-5gs.mm.pld_cont.nb_opt_ies",
12817 FT_UINT8, BASE_DEC, NULL, 0xf0,
12818 NULL, HFILL }
12820 { &hf_nas_5gs_mm_pld_cont_pld_cont_type,
12821 { "Payload container type", "nas-5gs.mm.pld_cont.pld_cont_type",
12822 FT_UINT8, BASE_DEC, VALS(nas_5gs_mm_pld_cont_type_vals), 0x0f,
12823 NULL, HFILL }
12825 { &hf_nas_5gs_mm_pld_cont_opt_ie_type,
12826 { "Type of optional IE", "nas-5gs.mm.pld_cont.opt_ie_type",
12827 FT_UINT8, BASE_HEX, VALS(nas_5gs_mm_pld_cont_opt_ie_type_vals), 0x0,
12828 NULL, HFILL }
12830 { &hf_nas_5gs_mm_pld_cont_opt_ie_len,
12831 { "Length of optional IE", "nas-5gs.mm.pld_cont.opt_ie_len",
12832 FT_UINT8, BASE_DEC, NULL, 0x0,
12833 NULL, HFILL }
12835 { &hf_nas_5gs_mm_pld_cont_opt_ie_val,
12836 { "Value of optional IE", "nas-5gs.mm.pld_cont.opt_ie_val",
12837 FT_BYTES, BASE_NONE, NULL, 0x0,
12838 NULL, HFILL }
12840 { &hf_nas_5gs_mm_req_type,
12841 { "Request type", "nas-5gs.mm.req_type",
12842 FT_UINT8, BASE_DEC, VALS(nas_5gs_mm_req_type_vals), 0x07,
12843 NULL, HFILL }
12845 { &hf_nas_5gs_mm_serv_type,
12846 { "Service type", "nas-5gs.mm.serv_type",
12847 FT_UINT8, BASE_DEC, VALS(nas_5gs_mm_serv_type_vals), 0x70,
12848 NULL, HFILL }
12850 { &hf_nas_5gs_mm_5g_ea0,
12851 { "5G-EA0","nas-5gs.mm.5g_ea0",
12852 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x80,
12853 NULL, HFILL }
12855 { &hf_nas_5gs_mm_128_5g_ea1,
12856 { "128-5G-EA1","nas-5gs.mm.128_5g_ea1",
12857 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x40,
12858 NULL, HFILL }
12860 { &hf_nas_5gs_mm_128_5g_ea2,
12861 { "128-5G-EA2","nas-5gs.mm.128_5g_ea2",
12862 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x20,
12863 NULL, HFILL }
12865 { &hf_nas_5gs_mm_128_5g_ea3,
12866 { "128-5G-EA3","nas-5gs.mm.128_5g_ea3",
12867 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x10,
12868 NULL, HFILL }
12870 { &hf_nas_5gs_mm_5g_ea4,
12871 { "5G-EA4","nas-5gs.mm.5g_ea4",
12872 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x08,
12873 NULL, HFILL }
12875 { &hf_nas_5gs_mm_5g_ea5,
12876 { "5G-EA5","nas-5gs.mm.5g_ea5",
12877 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x04,
12878 NULL, HFILL }
12880 { &hf_nas_5gs_mm_5g_ea6,
12881 { "5G-EA6","nas-5gs.mm.5g_ea6",
12882 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02,
12883 NULL, HFILL }
12885 { &hf_nas_5gs_mm_5g_ea7,
12886 { "5G-EA7","nas-5gs.mm.5g_ea7",
12887 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
12888 NULL, HFILL }
12890 { &hf_nas_5gs_mm_5g_ia0,
12891 { "5G-IA0","nas-5gs.mm.ia0",
12892 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x80,
12893 NULL, HFILL }
12895 { &hf_nas_5gs_mm_5g_128_ia1,
12896 { "128-5G-IA1","nas-5gs.mm.5g_128_ia1",
12897 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x40,
12898 NULL, HFILL }
12900 { &hf_nas_5gs_mm_5g_128_ia2,
12901 { "128-5G-IA2","nas-5gs.mm.5g_128_ia2",
12902 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x20,
12903 NULL, HFILL }
12905 { &hf_nas_5gs_mm_5g_128_ia3,
12906 { "128-5G-IA3","nas-5gs.mm.5g_128_ia3",
12907 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x10,
12908 NULL, HFILL }
12910 { &hf_nas_5gs_mm_5g_ia4,
12911 { "5G-IA4","nas-5gs.mm.5g_128_ia4",
12912 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x08,
12913 NULL, HFILL }
12915 { &hf_nas_5gs_mm_5g_ia5,
12916 { "5G-IA5","nas-5gs.mm.5g_ia5",
12917 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x04,
12918 NULL, HFILL }
12920 { &hf_nas_5gs_mm_5g_ia6,
12921 { "5G-IA6","nas-5gs.mm.5g_ia6",
12922 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02,
12923 NULL, HFILL }
12925 { &hf_nas_5gs_mm_5g_ia7,
12926 { "5G-IA7","nas-5gs.mm.5g_ia7",
12927 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
12928 NULL, HFILL }
12930 { &hf_nas_5gs_mm_eea0,
12931 { "EEA0","nas-5gs.mm.eea0",
12932 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x80,
12933 NULL, HFILL }
12935 { &hf_nas_5gs_mm_128eea1,
12936 { "128-EEA1","nas-5gs.mm.128eea1",
12937 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x40,
12938 NULL, HFILL }
12940 { &hf_nas_5gs_mm_128eea2,
12941 { "128-EEA2","nas-5gs.mm.128eea2",
12942 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x20,
12943 NULL, HFILL }
12945 { &hf_nas_5gs_mm_eea3,
12946 { "128-EEA3","nas-5gs.mm.eea3",
12947 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x10,
12948 NULL, HFILL }
12950 { &hf_nas_5gs_mm_eea4,
12951 { "EEA4","nas-5gs.mm.eea4",
12952 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x08,
12953 NULL, HFILL }
12955 { &hf_nas_5gs_mm_eea5,
12956 { "EEA5","nas-5gs.mm.eea5",
12957 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x04,
12958 NULL, HFILL }
12960 { &hf_nas_5gs_mm_eea6,
12961 { "EEA6","nas-5gs.mm.eea6",
12962 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02,
12963 NULL, HFILL }
12965 { &hf_nas_5gs_mm_eea7,
12966 { "EEA7","nas-5gs.mm.eea7",
12967 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
12968 NULL, HFILL }
12970 { &hf_nas_5gs_mm_eia0,
12971 { "EIA0","nas-5gs.mm.eia0",
12972 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x80,
12973 NULL, HFILL }
12975 { &hf_nas_5gs_mm_128eia1,
12976 { "128-EIA1","nas-5gs.mm.128eia1",
12977 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x40,
12978 NULL, HFILL }
12980 { &hf_nas_5gs_mm_128eia2,
12981 { "128-EIA2","nas-5gs.mm.128eia2",
12982 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x20,
12983 NULL, HFILL }
12985 { &hf_nas_5gs_mm_eia3,
12986 { "128-EIA3","nas-5gs.mm.eia3",
12987 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x10,
12988 NULL, HFILL }
12990 { &hf_nas_5gs_mm_eia4,
12991 { "EIA4","nas-5gs.mm.eia4",
12992 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x08,
12993 NULL, HFILL }
12995 { &hf_nas_5gs_mm_eia5,
12996 { "EIA5","nas-5gs.mm.eia5",
12997 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x04,
12998 NULL, HFILL }
13000 { &hf_nas_5gs_mm_eia6,
13001 { "EIA6","nas-5gs.mm.eia6",
13002 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02,
13003 NULL, HFILL }
13005 { &hf_nas_5gs_mm_eia7,
13006 { "EIA7","nas-5gs.mm.eia7",
13007 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
13008 NULL, HFILL }
13010 { &hf_nas_5gs_mm_n1_mode_reg_b1,
13011 { "N1 mode reg","nas-5gs.mm.n1_mode_reg_b1",
13012 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_mm_n1_mod), 0x02,
13013 NULL, HFILL }
13015 { &hf_nas_5gs_mm_s1_mode_reg_b0,
13016 { "S1 mode reg","nas-5gs.mm.s1_mode_reg_b0",
13017 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_mm_s1_mod), 0x01,
13018 NULL, HFILL }
13020 { &hf_nas_5gs_mm_sal_al_t,
13021 { "Allowed type","nas-5gs.mm.sal_al_t",
13022 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_sal_al_t), 0x80,
13023 NULL, HFILL }
13025 { &hf_nas_5gs_mm_sal_t_li,
13026 { "Type of list", "nas-5gs.mm.sal_t_li",
13027 FT_UINT8, BASE_DEC, VALS(nas_5gs_mm_sal_t_li_values), 0x60,
13028 NULL, HFILL }
13030 { &hf_nas_5gs_mm_sal_num_e,
13031 { "Number of elements", "nas-5gs.mm.sal_num_e",
13032 FT_UINT8, BASE_DEC, VALS(nas_5gs_mm_sal_num_e_vals), 0x1f,
13033 NULL, HFILL }
13035 { &hf_nas_5gs_sm_pdu_session_type,
13036 { "PDU session type", "nas-5gs.sm.pdu_session_type",
13037 FT_UINT8, BASE_DEC, VALS(nas_5gs_pdu_session_type_values), 0x07,
13038 NULL, HFILL }
13040 { &hf_nas_5gs_pdu_ses_sts_psi_0_b0,
13041 { "Spare","nas-5gs.pdu_ses_sts_psi_0_b0",
13042 FT_BOOLEAN, 8, NULL, 0x01,
13043 NULL, HFILL }
13045 { &hf_nas_5gs_pdu_ses_sts_psi_1_b1,
13046 { "PSI(1)","nas-5gs.pdu_ses_sts_psi_1_b1",
13047 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_pdu_ses_sts_psi), 0x02,
13048 NULL, HFILL }
13050 { &hf_nas_5gs_pdu_ses_sts_psi_2_b2,
13051 { "PSI(2)","nas-5gs.pdu_ses_sts_psi_2_b2",
13052 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_pdu_ses_sts_psi), 0x04,
13053 NULL, HFILL }
13055 { &hf_nas_5gs_pdu_ses_sts_psi_3_b3,
13056 { "PSI(3)","nas-5gs.pdu_ses_sts_psi_3_b3",
13057 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_pdu_ses_sts_psi), 0x08,
13058 NULL, HFILL }
13060 { &hf_nas_5gs_pdu_ses_sts_psi_4_b4,
13061 { "PSI(4)","nas-5gs.pdu_ses_sts_psi_4_b4",
13062 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_pdu_ses_sts_psi), 0x10,
13063 NULL, HFILL }
13065 { &hf_nas_5gs_pdu_ses_sts_psi_5_b5,
13066 { "PSI(5)","nas-5gs.pdu_ses_sts_psi_5_b5",
13067 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_pdu_ses_sts_psi), 0x20,
13068 NULL, HFILL }
13070 { &hf_nas_5gs_pdu_ses_sts_psi_6_b6,
13071 { "PSI(6)","nas-5gs.pdu_ses_sts_psi_6_b6",
13072 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_pdu_ses_sts_psi), 0x40,
13073 NULL, HFILL }
13075 { &hf_nas_5gs_pdu_ses_sts_psi_7_b7,
13076 { "PSI(7)","nas-5gs.pdu_ses_sts_psi_7_b7",
13077 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_pdu_ses_sts_psi), 0x80,
13078 NULL, HFILL }
13080 { &hf_nas_5gs_pdu_ses_sts_psi_8_b0,
13081 { "PSI(8)","nas-5gs.pdu_ses_sts_psi_8_b0",
13082 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_pdu_ses_sts_psi), 0x01,
13083 NULL, HFILL }
13085 { &hf_nas_5gs_pdu_ses_sts_psi_9_b1,
13086 { "PSI(9)","nas-5gs.pdu_ses_sts_psi_9_b1",
13087 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_pdu_ses_sts_psi), 0x02,
13088 NULL, HFILL }
13090 { &hf_nas_5gs_pdu_ses_sts_psi_10_b2,
13091 { "PSI(10)","nas-5gs.pdu_ses_sts_psi_10_b2",
13092 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_pdu_ses_sts_psi), 0x04,
13093 NULL, HFILL }
13095 { &hf_nas_5gs_pdu_ses_sts_psi_11_b3,
13096 { "PSI(11)","nas-5gs.pdu_ses_sts_psi_11_b3",
13097 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_pdu_ses_sts_psi), 0x08,
13098 NULL, HFILL }
13100 { &hf_nas_5gs_pdu_ses_sts_psi_12_b4,
13101 { "PSI(12)","nas-5gs.pdu_ses_sts_psi_12_b4",
13102 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_pdu_ses_sts_psi), 0x10,
13103 NULL, HFILL }
13105 { &hf_nas_5gs_pdu_ses_sts_psi_13_b5,
13106 { "PSI(13)","nas-5gs.pdu_ses_sts_psi_13_b5",
13107 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_pdu_ses_sts_psi), 0x20,
13108 NULL, HFILL }
13110 { &hf_nas_5gs_pdu_ses_sts_psi_14_b6,
13111 { "PSI(14)","nas-5gs.pdu_ses_sts_psi_14_b6",
13112 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_pdu_ses_sts_psi), 0x40,
13113 NULL, HFILL }
13115 { &hf_nas_5gs_pdu_ses_sts_psi_15_b7,
13116 { "PSI(15)","nas-5gs.pdu_ses_sts_psi_15_b7",
13117 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_pdu_ses_sts_psi), 0x80,
13118 NULL, HFILL }
13120 { &hf_nas_5gs_pdu_ses_rect_res_psi_0_b0,
13121 { "PSI(0) Spare","nas-5gs.pdu_ses_rect_res_psi_0_b0",
13122 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_pdu_ses_rect_res_psi), 0x01,
13123 NULL, HFILL }
13125 { &hf_nas_5gs_pdu_ses_rect_res_psi_1_b1,
13126 { "PSI(1)","nas-5gs.pdu_ses_rect_res_psi_1_b1",
13127 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_pdu_ses_rect_res_psi), 0x02,
13128 NULL, HFILL }
13130 { &hf_nas_5gs_pdu_ses_rect_res_psi_2_b2,
13131 { "PSI(2)","nas-5gs.pdu_ses_rect_res_psi_2_b2",
13132 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_pdu_ses_rect_res_psi), 0x04,
13133 NULL, HFILL }
13135 { &hf_nas_5gs_pdu_ses_rect_res_psi_3_b3,
13136 { "PSI(3)","nas-5gs.pdu_ses_rect_res_psi_3_b3",
13137 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_pdu_ses_rect_res_psi), 0x08,
13138 NULL, HFILL }
13140 { &hf_nas_5gs_pdu_ses_rect_res_psi_4_b4,
13141 { "PSI(4)","nas-5gs.pdu_ses_rect_res_psi_4_b4",
13142 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_pdu_ses_rect_res_psi), 0x10,
13143 NULL, HFILL }
13145 { &hf_nas_5gs_pdu_ses_rect_res_psi_5_b5,
13146 { "PSI(5)","nas-5gs.pdu_ses_rect_res_psi_5_b5",
13147 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_pdu_ses_rect_res_psi), 0x20,
13148 NULL, HFILL }
13150 { &hf_nas_5gs_pdu_ses_rect_res_psi_6_b6,
13151 { "PSI(6)","nas-5gs.pdu_ses_rect_res_psi_6_b6",
13152 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_pdu_ses_rect_res_psi), 0x40,
13153 NULL, HFILL }
13155 { &hf_nas_5gs_pdu_ses_rect_res_psi_7_b7,
13156 { "PSI(7)","nas-5gs.pdu_ses_rect_res_psi_7_b7",
13157 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_pdu_ses_rect_res_psi), 0x80,
13158 NULL, HFILL }
13160 { &hf_nas_5gs_pdu_ses_rect_res_psi_8_b0,
13161 { "PSI(8)","nas-5gs.pdu_ses_rect_res_psi_8_b0",
13162 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_pdu_ses_rect_res_psi), 0x01,
13163 NULL, HFILL }
13165 { &hf_nas_5gs_pdu_ses_rect_res_psi_9_b1,
13166 { "PSI(9)","nas-5gs.pdu_ses_rect_res_psi_9_b1",
13167 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_pdu_ses_rect_res_psi), 0x02,
13168 NULL, HFILL }
13170 { &hf_nas_5gs_pdu_ses_rect_res_psi_10_b2,
13171 { "PSI(10)","nas-5gs.pdu_ses_rect_res_psi_10_b2",
13172 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_pdu_ses_rect_res_psi), 0x04,
13173 NULL, HFILL }
13175 { &hf_nas_5gs_pdu_ses_rect_res_psi_11_b3,
13176 { "PSI(11)","nas-5gs.pdu_ses_rect_res_psi_11_b3",
13177 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_pdu_ses_rect_res_psi), 0x08,
13178 NULL, HFILL }
13180 { &hf_nas_5gs_pdu_ses_rect_res_psi_12_b4,
13181 { "PSI(12)","nas-5gs.pdu_ses_rect_res_psi_12_b4",
13182 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_pdu_ses_rect_res_psi), 0x10,
13183 NULL, HFILL }
13185 { &hf_nas_5gs_pdu_ses_rect_res_psi_13_b5,
13186 { "PSI(13)","nas-5gs.pdu_ses_res_psi_13_b5",
13187 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_pdu_ses_rect_res_psi), 0x20,
13188 NULL, HFILL }
13190 { &hf_nas_5gs_pdu_ses_rect_res_psi_14_b6,
13191 { "PSI(14)","nas-5gs.pdu_ses_res_psi_14_b6",
13192 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_pdu_ses_rect_res_psi), 0x40,
13193 NULL, HFILL }
13195 { &hf_nas_5gs_pdu_ses_rect_res_psi_15_b7,
13196 { "PSI(15)","nas-5gs.pdu_ses_res_psi_15_b7",
13197 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_pdu_ses_rect_res_psi), 0x80,
13198 NULL, HFILL }
13200 { &hf_nas_5gs_ul_data_sts_psi_0_b0,
13201 { "Spare","nas-5gs.ul_data_sts_psi_0_b0",
13202 FT_BOOLEAN, 8, NULL, 0x01,
13203 NULL, HFILL }
13205 { &hf_nas_5gs_ul_data_sts_psi_1_b1,
13206 { "PSI(1)","nas-5gs.ul_data_sts_psi_1_b1",
13207 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_ul_data_sts_psi), 0x02,
13208 NULL, HFILL }
13210 { &hf_nas_5gs_ul_data_sts_psi_2_b2,
13211 { "PSI(2)","nas-5gs.ul_data_sts_psi_2_b2",
13212 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_ul_data_sts_psi), 0x04,
13213 NULL, HFILL }
13215 { &hf_nas_5gs_ul_data_sts_psi_3_b3,
13216 { "PSI(3)","nas-5gs.ul_data_sts_psi_3_b3",
13217 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_ul_data_sts_psi), 0x08,
13218 NULL, HFILL }
13220 { &hf_nas_5gs_ul_data_sts_psi_4_b4,
13221 { "PSI(4)","nas-5gs.ul_data_sts_psi_4_b4",
13222 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_ul_data_sts_psi), 0x10,
13223 NULL, HFILL }
13225 { &hf_nas_5gs_ul_data_sts_psi_5_b5,
13226 { "PSI(5)","nas-5gs.ul_data_sts_psi_5_b5",
13227 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_ul_data_sts_psi), 0x20,
13228 NULL, HFILL }
13230 { &hf_nas_5gs_ul_data_sts_psi_6_b6,
13231 { "PSI(6)","nas-5gs.ul_data_sts_psi_6_b6",
13232 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_ul_data_sts_psi), 0x40,
13233 NULL, HFILL }
13235 { &hf_nas_5gs_ul_data_sts_psi_7_b7,
13236 { "PSI(7)","nas-5gs.ul_data_sts_psi_7_b7",
13237 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_ul_data_sts_psi), 0x80,
13238 NULL, HFILL }
13240 { &hf_nas_5gs_ul_data_sts_psi_8_b0,
13241 { "PSI(8)","nas-5gs.ul_data_sts_psi_8_b0",
13242 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_ul_data_sts_psi), 0x01,
13243 NULL, HFILL }
13245 { &hf_nas_5gs_ul_data_sts_psi_9_b1,
13246 { "PSI(9)","nas-5gs.ul_data_sts_psi_9_b1",
13247 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_ul_data_sts_psi), 0x02,
13248 NULL, HFILL }
13250 { &hf_nas_5gs_ul_data_sts_psi_10_b2,
13251 { "PSI(10)","nas-5gs.ul_data_sts_psi_10_b2",
13252 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_ul_data_sts_psi), 0x04,
13253 NULL, HFILL }
13255 { &hf_nas_5gs_ul_data_sts_psi_11_b3,
13256 { "PSI(11)","nas-5gs.ul_data_sts_psi_11_b3",
13257 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_ul_data_sts_psi), 0x08,
13258 NULL, HFILL }
13260 { &hf_nas_5gs_ul_data_sts_psi_12_b4,
13261 { "PSI(12)","nas-5gs.ul_data_sts_psi_12_b4",
13262 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_ul_data_sts_psi), 0x10,
13263 NULL, HFILL }
13265 { &hf_nas_5gs_ul_data_sts_psi_13_b5,
13266 { "PSI(13)","nas-5gs.ul_data_sts_psi_13_b5",
13267 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_ul_data_sts_psi), 0x20,
13268 NULL, HFILL }
13270 { &hf_nas_5gs_ul_data_sts_psi_14_b6,
13271 { "PSI(14)","nas-5gs.ul_data_sts_psi_14_b6",
13272 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_ul_data_sts_psi), 0x40,
13273 NULL, HFILL }
13275 { &hf_nas_5gs_ul_data_sts_psi_15_b7,
13276 { "PSI(15)","nas-5gs.ul_data_sts_psi_15_b7",
13277 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_ul_data_sts_psi), 0x80,
13278 NULL, HFILL }
13280 { &hf_nas_5gs_allow_pdu_ses_sts_psi_0_b0,
13281 { "Spare","nas-5gs.allow_pdu_ses_sts_psi_0_b0",
13282 FT_BOOLEAN, 8, NULL, 0x01,
13283 NULL, HFILL }
13285 { &hf_nas_5gs_allow_pdu_ses_sts_psi_1_b1,
13286 { "PSI(1)","nas-5gs.allow_pdu_ses_sts_psi_1_b1",
13287 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_allow_pdu_ses_sts_psi), 0x02,
13288 NULL, HFILL }
13290 { &hf_nas_5gs_allow_pdu_ses_sts_psi_2_b2,
13291 { "PSI(2)","nas-5gs.allow_pdu_ses_sts_psi_2_b2",
13292 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_allow_pdu_ses_sts_psi), 0x04,
13293 NULL, HFILL }
13295 { &hf_nas_5gs_allow_pdu_ses_sts_psi_3_b3,
13296 { "PSI(3)","nas-5gs.allow_pdu_ses_sts_psi_3_b3",
13297 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_allow_pdu_ses_sts_psi), 0x08,
13298 NULL, HFILL }
13300 { &hf_nas_5gs_allow_pdu_ses_sts_psi_4_b4,
13301 { "PSI(4)","nas-5gs.allow_pdu_ses_sts_psi_4_b4",
13302 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_allow_pdu_ses_sts_psi), 0x10,
13303 NULL, HFILL }
13305 { &hf_nas_5gs_allow_pdu_ses_sts_psi_5_b5,
13306 { "PSI(5)","nas-5gs.allow_pdu_ses_sts_psi_5_b5",
13307 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_allow_pdu_ses_sts_psi), 0x20,
13308 NULL, HFILL }
13310 { &hf_nas_5gs_allow_pdu_ses_sts_psi_6_b6,
13311 { "PSI(6)","nas-5gs.allow_pdu_ses_sts_psi_6_b6",
13312 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_allow_pdu_ses_sts_psi), 0x40,
13313 NULL, HFILL }
13315 { &hf_nas_5gs_allow_pdu_ses_sts_psi_7_b7,
13316 { "PSI(7)","nas-5gs.allow_pdu_ses_sts_psi_7_b7",
13317 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_allow_pdu_ses_sts_psi), 0x80,
13318 NULL, HFILL }
13320 { &hf_nas_5gs_allow_pdu_ses_sts_psi_8_b0,
13321 { "PSI(8)","nas-5gs.allow_pdu_ses_sts_psi_8_b0",
13322 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_allow_pdu_ses_sts_psi), 0x01,
13323 NULL, HFILL }
13325 { &hf_nas_5gs_allow_pdu_ses_sts_psi_9_b1,
13326 { "PSI(9)","nas-5gs.allow_pdu_ses_sts_psi_9_b1",
13327 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_allow_pdu_ses_sts_psi), 0x02,
13328 NULL, HFILL }
13330 { &hf_nas_5gs_allow_pdu_ses_sts_psi_10_b2,
13331 { "PSI(10)","nas-5gs.allow_pdu_ses_sts_psi_10_b2",
13332 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_allow_pdu_ses_sts_psi), 0x04,
13333 NULL, HFILL }
13335 { &hf_nas_5gs_allow_pdu_ses_sts_psi_11_b3,
13336 { "PSI(11)","nas-5gs.allow_pdu_ses_sts_psi_11_b3",
13337 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_allow_pdu_ses_sts_psi), 0x08,
13338 NULL, HFILL }
13340 { &hf_nas_5gs_allow_pdu_ses_sts_psi_12_b4,
13341 { "PSI(12)","nas-5gs.allow_pdu_ses_sts_psi_12_b4",
13342 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_allow_pdu_ses_sts_psi), 0x10,
13343 NULL, HFILL }
13345 { &hf_nas_5gs_allow_pdu_ses_sts_psi_13_b5,
13346 { "PSI(13)","nas-5gs.allow_pdu_ses_sts_psi_13_b5",
13347 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_allow_pdu_ses_sts_psi), 0x20,
13348 NULL, HFILL }
13350 { &hf_nas_5gs_allow_pdu_ses_sts_psi_14_b6,
13351 { "PSI(14)","nas-5gs.allow_pdu_ses_sts_psi_14_b6",
13352 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_allow_pdu_ses_sts_psi), 0x40,
13353 NULL, HFILL }
13355 { &hf_nas_5gs_allow_pdu_ses_sts_psi_15_b7,
13356 { "PSI(15)","nas-5gs.allow_pdu_ses_sts_psi_15_b7",
13357 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_allow_pdu_ses_sts_psi), 0x80,
13358 NULL, HFILL }
13360 { &hf_nas_5gs_sm_sc_mode,
13361 { "SSC mode", "nas-5gs.sm.sc_mode",
13362 FT_UINT8, BASE_DEC, VALS(nas_5gs_sc_mode_values), 0x07,
13363 NULL, HFILL }
13365 { &hf_nas_5gs_sm_eplmnc,
13366 { "EPLMNC", "nas-5gs.sm.eplmnc",
13367 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_sm_eplmnc), 0x02,
13368 NULL, HFILL }
13370 { &hf_nas_5gs_sm_ratc,
13371 { "RATC", "nas-5gs.sm.ratc",
13372 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_sm_ratc), 0x01,
13373 NULL, HFILL }
13375 { &hf_nas_5gs_sm_naps,
13376 { "Non-3GPP access path switching (NAPS)", "nas-5gs.sm.naps",
13377 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02,
13378 NULL, HFILL }
13380 { &hf_nas_5gs_sm_ept_s1,
13381 { "Ethernet PDN type in S1 mode (EPT-S1)", "nas-5gs.sm.ept_s1",
13382 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
13383 NULL, HFILL }
13385 { &hf_nas_5gs_sm_catbo,
13386 { "Current Access Type Back-off timer (CATBO)", "nas-5gs.sm.catbo",
13387 FT_BOOLEAN, 8, TFS(&tfs_5gs_sm_catbo), 0x02,
13388 NULL, HFILL }
13390 { &hf_nas_5gs_sm_abo,
13391 { "All PLMNs Back-off timer (ABO)", "nas-5gs.sm.abo",
13392 FT_BOOLEAN, 8, TFS(&tfs_5gs_sm_abo), 0x01,
13393 NULL, HFILL }
13395 { &hf_nas_5gs_sm_atsss_cont,
13396 { "ATSSS container contents", "nas-5gs.sm.atsss_cont",
13397 FT_BYTES, BASE_NONE, NULL, 0,
13398 NULL, HFILL }
13400 { &hf_nas_5gs_sm_cpoi,
13401 { "Control plane only indication value (CPOI)", "nas-5gs.sm.cpoi",
13402 FT_BOOLEAN, 8, TFS(&tfs_5gs_sm_cpoi), 0x01,
13403 NULL, HFILL }
13405 { &hf_nas_5gs_sm_ip_hdr_comp_config_p0104,
13406 { "RoHC profile 0x0104 (IP)", "nas-5gs.sm.ip_hdr_comp_config.p0104",
13407 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x40,
13408 NULL, HFILL }
13410 { &hf_nas_5gs_sm_ip_hdr_comp_config_p0103,
13411 { "RoHC profile 0x0103 (ESP/IP)", "nas-5gs.sm.ip_hdr_comp_config.p0103",
13412 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x20,
13413 NULL, HFILL }
13415 { &hf_nas_5gs_sm_ip_hdr_comp_config_p0102,
13416 { "RoHC profile 0x0102 (UDP/IP)", "nas-5gs.sm.ip_hdr_comp_config.p0102",
13417 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x10,
13418 NULL, HFILL }
13420 { &hf_nas_5gs_sm_ip_hdr_comp_config_p0006,
13421 { "RoHC profile 0x0006 (TCP/IP)", "nas-5gs.sm.ip_hdr_comp_config.p0006",
13422 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x08,
13423 NULL, HFILL }
13425 { &hf_nas_5gs_sm_ip_hdr_comp_config_p0004,
13426 { "RoHC profile 0x0004 (IP)", "nas-5gs.sm.ip_hdr_comp_config.p0004",
13427 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x04,
13428 NULL, HFILL }
13430 { &hf_nas_5gs_sm_ip_hdr_comp_config_p0003,
13431 { "RoHC profile 0x0003 (ESP/IP)", "nas-5gs.sm.ip_hdr_comp_config.p0003",
13432 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02,
13433 NULL, HFILL }
13435 { &hf_nas_5gs_sm_ip_hdr_comp_config_p0002,
13436 { "RoHC profile 0x0002 (UDP/IP)", "nas-5gs.sm.ip_hdr_comp_config.p0002",
13437 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
13438 NULL, HFILL }
13440 { &hf_nas_5gs_sm_ip_hdr_comp_config_max_cid,
13441 { "MAX_CID", "nas-5gs.sm.ip_hdr_comp_config.max_cid",
13442 FT_UINT16, BASE_DEC, NULL, 0x0,
13443 NULL, HFILL }
13445 { &hf_nas_5gs_sm_ip_hdr_comp_config_add_ip_hdr_compr_cxt_setup_params_type,
13446 { "Additional header compression context setup parameters type", "nas-5gs.sm.ip_hdr_comp_config.add_hdr_compr_cxt_setup_params_type",
13447 FT_UINT8, BASE_HEX, VALS(nas_5gs_sm_ip_hdr_comp_config_add_ip_hdr_compr_cxt_setup_params_type_vals), 0x0,
13448 NULL, HFILL }
13450 { &hf_nas_5gs_sm_ip_hdr_comp_config_add_ip_hdr_compr_cxt_setup_params_cont,
13451 { "Additional header compression context setup parameters container", "nas-5gs.sm.ip_hdr_comp_config.add_hdr_compr_cxt_setup_params_cont",
13452 FT_BYTES, BASE_NONE, NULL, 0x0,
13453 NULL, HFILL }
13455 { &hf_nas_5gs_sm_ds_tt_eth_port_mac_addr,
13456 { "DS-TT Ethernet port MAC address", "nas-5gs.sm.ds_tt_eth_port_mac_addr",
13457 FT_ETHER, BASE_NONE, NULL, 0x0,
13458 NULL, HFILL }
13460 { &hf_nas_5gs_sm_ue_ds_tt_residence_time,
13461 { "UE-DS-TT residence time", "nas-5gs.sm.ue_ds_tt_residence_time",
13462 FT_BYTES, BASE_NONE, NULL, 0x0,
13463 NULL, HFILL }
13465 { &hf_nas_5gs_sm_port_mgmt_info_cont,
13466 { "Port management information container", "nas-5gs.sm.port_mgmt_info_cont",
13467 FT_BYTES, BASE_NONE, NULL, 0x0,
13468 NULL, HFILL }
13470 { &hf_nas_5gs_sm_eth_hdr_comp_config_cid_len,
13471 { "Port management information container", "nas-5gs.sm.eth_hdr_comp_config.cid_len",
13472 FT_UINT8, BASE_DEC, VALS(nas_5gs_sm_eth_hdr_comp_config_cid_len_vals), 0x03,
13473 NULL, HFILL }
13475 { &hf_nas_5gs_sm_pdu_session_pair_id,
13476 { "PDU session pair ID", "nas-5gs.sm.pdu_session_pair_id",
13477 FT_UINT8, BASE_DEC, NULL, 0x0,
13478 NULL, HFILL }
13480 { &hf_nas_5gs_sm_pdu_session_rsn,
13481 { "RSN", "nas-5gs.sm.rsn",
13482 FT_UINT8, BASE_DEC, VALS(nas_5gs_sm_pdu_session_rsn_vals), 0x0,
13483 NULL, HFILL }
13485 { &hf_nas_5gs_sm_sel_sc_mode,
13486 { "Selected SSC mode", "nas-5gs.sm.sel_sc_mode",
13487 FT_UINT8, BASE_DEC, VALS(nas_5gs_sc_mode_values), 0x70,
13488 NULL, HFILL }
13490 { &hf_nas_5gs_sm_tpmic_b7,
13491 { "Transfer of port management information containers (TPMIC)", "nas-5gs.sm.tpmic",
13492 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x80,
13493 NULL, HFILL }
13495 { &hf_nas_5gs_sm_atsss_st_b3_b6,
13496 { "Supported ATSSS steering functionalities and steering modes (ATSSS-ST)", "nas-5gs.sm.atsss_st",
13497 FT_UINT8, BASE_DEC, VALS(nas_5gs_sm_atsss_st_b3_b6_vals), 0x78,
13498 NULL, HFILL }
13500 { &hf_nas_5gs_sm_ept_s1_b2,
13501 { "Ethernet PDN type in S1 mode (EPT-S1)", "nas-5gs.sm.ept_s1",
13502 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x04,
13503 NULL, HFILL }
13505 { &hf_nas_5gs_sm_mh6_pdu_b1,
13506 { "Multi-homed IPv6 PDU session (MH6-PDU)", "nas-5gs.sm.mh6_pdu",
13507 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02,
13508 NULL, HFILL }
13510 { &hf_nas_5gs_sm_rqos_b0,
13511 { "Reflective QoS (RqoS)", "nas-5gs.sm.rqos",
13512 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
13513 NULL, HFILL }
13515 { &hf_nas_5gs_sm_sdnaepc_b1,
13516 { "Secondary DN authentication and authorization over EPC (SDNAEPC)", "nas-5gs.sm.sdnaepc",
13517 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02,
13518 NULL, HFILL }
13520 { &hf_nas_5gs_sm_apmqf_b0,
13521 { "Access performance measurements per QoS flow rule (APMQF)", "nas-5gs.sm.apmqf",
13522 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
13523 NULL, HFILL }
13525 { &hf_nas_5gs_sm_5gsm_cause,
13526 { "5GSM cause", "nas-5gs.sm.5gsm_cause",
13527 FT_UINT8, BASE_DEC, VALS(nas_5gs_sm_cause_vals), 0x0,
13528 NULL, HFILL }
13530 { &hf_nas_5gs_sm_apsi,
13531 { "Always-on PDU session", "nas-5gs.sm.apsi",
13532 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_sm_apsi), 0x01,
13533 NULL, HFILL }
13535 { &hf_nas_5gs_sm_apsr,
13536 { "Always-on PDU session", "nas-5gs.sm.apsr",
13537 FT_BOOLEAN, 8, TFS(&tfs_requested_not_requested), 0x01,
13538 NULL, HFILL }
13540 { &hf_nas_5gs_sm_int_prot_max_data_rate_ul,
13541 { "Integrity protection maximum data rate for uplink", "nas-5gs.sm.int_prot_max_data_rate_ul",
13542 FT_UINT8, BASE_DEC, VALS(nas_5gs_sm_int_prot_max_data_rate_vals), 0x0,
13543 NULL, HFILL }
13545 { &hf_nas_5gs_sm_int_prot_max_data_rate_dl,
13546 { "Integrity protection maximum data rate for downlink", "nas-5gs.sm.int_prot_max_data_rate_dl",
13547 FT_UINT8, BASE_DEC, VALS(nas_5gs_sm_int_prot_max_data_rate_vals), 0x0,
13548 NULL, HFILL }
13550 { &hf_nas_5gs_sm_si6lla,
13551 { "SMF's IPv6 link local address (SI6LLA)", "nas-5gs.sm.si6lla",
13552 FT_BOOLEAN, 8, TFS(&tfs_present_absent), 0x08,
13553 NULL, HFILL }
13555 { &hf_nas_5gs_sm_pdu_ses_type,
13556 { "PDU session type", "nas-5gs.sm.pdu_ses_type",
13557 FT_UINT8, BASE_DEC, VALS(nas_5gs_sm_pdu_ses_type_vals), 0x07,
13558 NULL, HFILL }
13560 { &hf_nas_5gs_sm_pdu_addr_inf_ipv4,
13561 { "PDU address information", "nas-5gs.sm.pdu_addr_inf_ipv4",
13562 FT_IPv4, BASE_NONE, NULL, 0x0,
13563 NULL, HFILL }
13565 { &hf_nas_5gs_sm_pdu_addr_inf_ipv6,
13566 { "PDU address information", "nas-5gs.sm.pdu_addr_inf_ipv6",
13567 FT_BYTES, BASE_NONE, NULL, 0x0,
13568 NULL, HFILL }
13570 { &hf_nas_5gs_sm_smf_ipv6_lla,
13571 { "SMF's IPv6 link local address", "nas-5gs.sm.smf_ipv6_lla",
13572 FT_IPv6, BASE_NONE, NULL, 0x0,
13573 NULL, HFILL }
13575 { &hf_nas_5gs_sm_qos_rule_id,
13576 { "QoS rule identifier", "nas-5gs.sm.qos_rule_id",
13577 FT_UINT8, BASE_DEC, NULL, 0x0,
13578 NULL, HFILL }
13580 { &hf_nas_5gs_sm_length,
13581 { "Length", "nas-5gs.sm.length",
13582 FT_UINT16, BASE_DEC, NULL, 0x0,
13583 NULL, HFILL }
13585 { &hf_nas_5gs_sm_rop,
13586 { "Rule operation code", "nas-5gs.sm.rop",
13587 FT_UINT8, BASE_DEC, VALS(nas_5gs_rule_operation_code_values), 0xe0,
13588 NULL, HFILL }
13590 { &hf_nas_5gs_sm_dqr,
13591 { "DQR", "nas-5gs.sm.dqr",
13592 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_sm_dqr), 0x10,
13593 NULL, HFILL }
13595 { &hf_nas_5gs_sm_nof_pkt_filters,
13596 { "Number of packet filters", "nas-5gs.sm.nof_pkt_filters",
13597 FT_UINT8, BASE_DEC, NULL, 0x0f,
13598 NULL, HFILL }
13600 { &hf_nas_5gs_sm_pkt_flt_dir,
13601 { "Packet filter direction", "nas-5gs.sm.pkt_flt_dir",
13602 FT_UINT8, BASE_DEC, VALS(nas_5gs_sm_pkt_flt_dir_values), 0x30,
13603 NULL, HFILL }
13605 { &hf_nas_5gs_sm_pkt_flt_id,
13606 { "Packet filter identifier", "nas-5gs.sm.pkt_flt_id",
13607 FT_UINT8, BASE_DEC, NULL, 0x0f,
13608 NULL, HFILL }
13610 { &hf_nas_5gs_sm_pf_len,
13611 { "Length", "nas-5gs.sm.pf_len",
13612 FT_UINT8, BASE_DEC, NULL, 0x0,
13613 NULL, HFILL }
13615 { &hf_nas_5gs_sm_pf_type,
13616 { "Packet filter component type", "nas-5gs.sm.pf_type",
13617 FT_UINT8, BASE_DEC, VALS(nas_5gs_sm_pf_type_values), 0x0,
13618 NULL, HFILL }
13620 { &hf_nas_5gs_sm_e,
13621 { "E bit", "nas-5gs.sm.e",
13622 FT_UINT8, BASE_DEC, NULL, 0x40,
13623 NULL, HFILL }
13625 { &hf_nas_5gs_sm_nof_params,
13626 { "Number of parameters", "nas-5gs.sm.nof_params",
13627 FT_UINT8, BASE_DEC, NULL, 0x3f,
13628 NULL, HFILL }
13630 { &hf_nas_5gs_sm_param_id,
13631 { "Parameter identifier", "nas-5gs.sm.param_id",
13632 FT_UINT8, BASE_DEC, VALS(nas_5gs_sm_param_id_values), 0x0,
13633 NULL, HFILL }
13635 { &hf_nas_5gs_sm_param_len,
13636 { "Length", "nas-5gs.sm.param_len",
13637 FT_UINT8, BASE_DEC, NULL, 0x0,
13638 NULL, HFILL }
13640 { &hf_nas_5gs_addr_mask_ipv4,
13641 { "IPv4 address mask", "nas-5gs.ipv4_address_mask",
13642 FT_IPv4, BASE_NONE, NULL, 0x0,
13643 NULL, HFILL }
13645 { &hf_nas_5gs_ipv6,
13646 { "IPv6 address", "nas-5gs.ipv6_address",
13647 FT_IPv6, BASE_NONE, NULL, 0x0,
13648 NULL, HFILL }
13650 { &hf_nas_5gs_ipv6_prefix_len,
13651 { "IPv6 prefix length", "nas-5gs.ipv6_prefix_len",
13652 FT_UINT8, BASE_DEC, NULL, 0x0,
13653 NULL, HFILL }
13655 { &hf_nas_5gs_protocol_identifier_or_next_hd,
13656 { "Protocol identifier/Next header type", "nas-5gs.protocol_identifier_or_next_hd",
13657 FT_UINT8, BASE_DEC | BASE_EXT_STRING, &ipproto_val_ext, 0x0,
13658 NULL, HFILL }
13660 { &hf_nas_5gs_sm_qos_rule_precedence,
13661 { "QoS rule precedence", "nas-5gs.sm.qos_rule_precedence",
13662 FT_UINT8, BASE_DEC, NULL, 0x0,
13663 NULL, HFILL }
13665 { &hf_nas_5gs_sm_segregation,
13666 { "Segregation", "nas-5gs.sm.segregation",
13667 FT_BOOLEAN, 8, TFS(&tfs_requested_not_requested), 0x40,
13668 NULL, HFILL }
13670 { &hf_nas_5gs_sm_param_cont,
13671 { "Parameter content", "nas-5gs.sm.param_content",
13672 FT_BYTES, BASE_NONE, NULL, 0x0,
13673 NULL, HFILL }
13675 { &hf_nas_5gs_sm_5qi,
13676 { "5QI", "nas-5gs.sm.5qi",
13677 FT_UINT8, BASE_DEC, NULL, 0x0,
13678 NULL, HFILL }
13680 { &hf_nas_5gs_sm_unit_for_gfbr_ul,
13681 { "Unit for GFBR uplink", "nas-5gs.sm.unit_for_gfbr_ul",
13682 FT_UINT8, BASE_DEC, VALS(nas_5gs_sm_unit_for_session_ambr_values), 0x0,
13683 NULL, HFILL }
13685 { &hf_nas_5gs_sm_gfbr_ul,
13686 { "GFBR uplink", "nas-5gs.sm.gfbr_ul",
13687 FT_UINT16, BASE_DEC, NULL, 0x0,
13688 NULL, HFILL }
13690 { &hf_nas_5gs_sm_unit_for_gfbr_dl,
13691 { "Unit for GFBR downlink", "nas-5gs.sm.unit_for_gfbr_dl",
13692 FT_UINT8, BASE_DEC, VALS(nas_5gs_sm_unit_for_session_ambr_values), 0x0,
13693 NULL, HFILL }
13695 { &hf_nas_5gs_sm_gfbr_dl,
13696 { "GFBR downlink", "nas-5gs.sm.gfbr_dl",
13697 FT_UINT16, BASE_DEC, NULL, 0x0,
13698 NULL, HFILL }
13700 { &hf_nas_5gs_sm_unit_for_mfbr_ul,
13701 { "Unit for MFBR uplink", "nas-5gs.sm.unit_for_mfbr_ul",
13702 FT_UINT8, BASE_DEC, VALS(nas_5gs_sm_unit_for_session_ambr_values), 0x0,
13703 NULL, HFILL }
13705 { &hf_nas_5gs_sm_mfbr_ul,
13706 { "MFBR uplink", "nas-5gs.sm.mfbr_ul",
13707 FT_UINT16, BASE_DEC, NULL, 0x0,
13708 NULL, HFILL }
13710 { &hf_nas_5gs_sm_unit_for_mfbr_dl,
13711 { "Unit for MFBR downlink", "nas-5gs.sm.unit_for_mfbr_dl",
13712 FT_UINT8, BASE_DEC, VALS(nas_5gs_sm_unit_for_session_ambr_values), 0x0,
13713 NULL, HFILL }
13715 { &hf_nas_5gs_sm_mfbr_dl,
13716 { "MFBR downlink", "nas-5gs.sm.mfbr_dl",
13717 FT_UINT16, BASE_DEC, NULL, 0x0,
13718 NULL, HFILL }
13720 { &hf_nas_5gs_sm_averaging_window,
13721 { "Averaging window", "nas-5gs.sm.averaging_window",
13722 FT_UINT16, BASE_DEC | BASE_UNIT_STRING, UNS(&units_millisecond_milliseconds), 0x0,
13723 NULL, HFILL }
13725 { &hf_nas_5gs_sm_eps_bearer_id,
13726 { "EPS bearer identity", "nas-5gs.sm.eps_bearer_id",
13727 FT_UINT8, BASE_DEC, NULL, 0xf0,
13728 NULL, HFILL }
13730 { &hf_nas_5gs_sm_qfi,
13731 { "Qos flow identifier", "nas-5gs.sm.qfi",
13732 FT_UINT8, BASE_DEC, NULL, 0x3f,
13733 NULL, HFILL }
13735 { &hf_nas_5gs_sm_mapd_eps_b_cont_id,
13736 { "EPS bearer identity", "nas-5gs.sm.mapd_eps_b_cont_id",
13737 FT_UINT8, BASE_DEC, NULL, 0xf0,
13738 NULL, HFILL }
13740 { &hf_nas_5gs_sm_mapd_eps_b_cont_opt_code,
13741 { "Operation code", "nas-5gs.sm.mapd_eps_b_cont_opt_code",
13742 FT_UINT8, BASE_DEC, VALS(nas_5gs_sm_mapd_eps_b_cont_opt_code_vals), 0xc0,
13743 NULL, HFILL }
13745 { &hf_nas_5gs_sm_qos_des_flow_opt_code,
13746 { "Operation code", "nas-5gs.sm.hf_nas_5gs_sm_qos_des_flow_opt_code",
13747 FT_UINT8, BASE_DEC, VALS(nas_5gs_sm_qos_des_flow_opt_code_vals), 0xe0,
13748 NULL, HFILL }
13750 { &hf_nas_5gs_sm_mapd_eps_b_cont_E,
13751 { "E bit", "nas-5gs.sm.mapd_eps_b_cont_E",
13752 FT_UINT8, BASE_DEC, VALS(nas_5gs_sm_mapd_eps_b_cont_E_vals), 0x10,
13753 NULL, HFILL }
13755 { &hf_nas_5gs_sm_mapd_eps_b_cont_E_mod,
13756 { "E bit", "nas-5gs.sm.mapd_eps_b_cont_E_mod",
13757 FT_UINT8, BASE_DEC, VALS(nas_5gs_sm_mapd_eps_b_cont_E_Modify_vals), 0x10,
13758 NULL, HFILL }
13760 { &hf_nas_5gs_sm_mapd_eps_b_cont_num_eps_parms,
13761 { "Number of EPS parameters", "nas-5gs.sm.mapd_eps_b_cont_num_eps_parms",
13762 FT_UINT8, BASE_DEC, NULL, 0x0f,
13763 NULL, HFILL }
13765 { &hf_nas_5gs_sm_mapd_eps_b_cont_param_id,
13766 { "EPS parameter identity", "nas-5gs.sm.mapd_eps_b_cont_param_id",
13767 FT_UINT8, BASE_DEC, VALS(nas_5gs_sm_mapd_eps_b_cont_param_id_vals), 0x0,
13768 NULL, HFILL }
13770 { &hf_nas_5gs_sm_unit_for_session_ambr_dl,
13771 { "Unit for Session-AMBR for downlink", "nas-5gs.sm.unit_for_session_ambr_dl",
13772 FT_UINT8, BASE_DEC, VALS(nas_5gs_sm_unit_for_session_ambr_values), 0x0,
13773 NULL, HFILL }
13775 { &hf_nas_5gs_sm_unit_for_session_ambr_ul,
13776 { "Unit for Session-AMBR for uplink", "nas-5gs.sm.unit_for_session_ambr_ul",
13777 FT_UINT8, BASE_DEC, VALS(nas_5gs_sm_unit_for_session_ambr_values), 0x0,
13778 NULL, HFILL }
13780 { &hf_nas_5gs_sm_session_ambr_dl,
13781 { "Session-AMBR for downlink", "nas-5gs.sm.session_ambr_dl",
13782 FT_UINT16, BASE_DEC, NULL, 0x0,
13783 NULL, HFILL }
13785 { &hf_nas_5gs_sm_session_ambr_ul,
13786 { "Session-AMBR for uplink", "nas-5gs.sm.session_ambr_ul",
13787 FT_UINT16, BASE_DEC, NULL, 0x0,
13788 NULL, HFILL }
13790 { &hf_nas_5gs_sm_dm_spec_id,
13791 { "DN-specific identity", "nas-5gs.sm.dm_spec_id",
13792 FT_STRING, BASE_NONE, NULL, 0x0,
13793 NULL, HFILL }
13795 { &hf_nas_5gs_sm_all_ssc_mode_b0,
13796 { "SSC mode 1", "nas-5gs.sm.all_ssc_mode_b0",
13797 FT_BOOLEAN, 8, TFS(&tfs_allowed_not_allowed), 0x01,
13798 NULL, HFILL }
13800 { &hf_nas_5gs_sm_all_ssc_mode_b1,
13801 { "SSC mode 2", "nas-5gs.sm.all_ssc_mode_b1",
13802 FT_BOOLEAN, 8, TFS(&tfs_allowed_not_allowed), 0x02,
13803 NULL, HFILL }
13805 { &hf_nas_5gs_sm_all_ssc_mode_b2,
13806 { "SSC mode 3", "nas-5gs.sm.all_ssc_mode_b2",
13807 FT_BOOLEAN, 8, TFS(&tfs_allowed_not_allowed), 0x04,
13808 NULL, HFILL }
13810 { &hf_nas_5gs_mm_supi_fmt,
13811 { "SUPI format","nas-5gs.mm.suci.supi_fmt",
13812 FT_UINT8, BASE_DEC, VALS(nas_5gs_mm_supi_fmt_vals), 0x70,
13813 NULL, HFILL }
13815 { &hf_nas_5gs_mm_routing_indicator,
13816 { "Routing indicator", "nas-5gs.mm.suci.routing_indicator",
13817 FT_STRING, BASE_NONE, NULL, 0,
13818 NULL, HFILL }
13820 { &hf_nas_5gs_mm_prot_scheme_id,
13821 { "Protection scheme Id", "nas-5gs.mm.suci.scheme_id",
13822 FT_UINT8, BASE_DEC, VALS(nas_5gs_mm_prot_scheme_id_vals), 0x0f,
13823 NULL, HFILL }
13825 { &hf_nas_5gs_mm_pki,
13826 { "Home network public key identifier", "nas-5gs.mm.suci.pki",
13827 FT_UINT8, BASE_DEC, NULL, 0x0,
13828 NULL, HFILL }
13830 { &hf_nas_5gs_mm_suci_msin,
13831 { "MSIN", "nas-5gs.mm.suci.msin",
13832 FT_STRING, BASE_NONE, NULL, 0,
13833 NULL, HFILL }
13835 { &hf_nas_5gs_mm_scheme_output,
13836 { "Scheme output", "nas-5gs.mm.suci.scheme_output",
13837 FT_BYTES, BASE_NONE, NULL, 0x0,
13838 NULL, HFILL }
13840 { &hf_nas_5gs_mm_scheme_output_ecc_public_key,
13841 { "ECC ephemeral public key", "nas-5gs.mm.suci.scheme_output.ecc_public_key",
13842 FT_BYTES, BASE_NONE, NULL, 0x0,
13843 NULL, HFILL }
13845 { &hf_nas_5gs_mm_scheme_output_ciphertext,
13846 { "Ciphertext", "nas-5gs.mm.suci.scheme_output.ciphertext",
13847 FT_BYTES, BASE_NONE, NULL, 0x0,
13848 NULL, HFILL }
13850 { &hf_nas_5gs_mm_scheme_output_mac_tag,
13851 { "MAC tag", "nas-5gs.mm.suci.scheme_output.mac_tag",
13852 FT_UINT64, BASE_HEX, NULL, 0x0,
13853 NULL, HFILL }
13855 { &hf_nas_5gs_mm_suci_nai,
13856 { "NAI", "nas-5gs.mm.suci.nai",
13857 FT_STRING, BASE_NONE, NULL, 0x0,
13858 NULL, HFILL }
13860 { &hf_nas_5gs_mm_imei,
13861 { "IMEI", "nas-5gs.mm.imei",
13862 FT_STRING, BASE_NONE, NULL, 0,
13863 NULL, HFILL }
13865 { &hf_nas_5gs_mm_imeisv,
13866 { "IMEISV", "nas-5gs.mm.imeisv",
13867 FT_STRING, BASE_NONE, NULL, 0,
13868 NULL, HFILL }
13870 { &hf_nas_5gs_mm_mauri,
13871 { "MAC address usage restriction indication (MAURI)", "nas-5gs.mm.mauri",
13872 FT_BOOLEAN, 8, TFS(&nas_5gs_mauri_tfs), 0x08,
13873 NULL, HFILL }
13875 { &hf_nas_5gs_mm_mac_addr,
13876 { "MAC address", "nas-5gs.mm.mac_addr",
13877 FT_ETHER, BASE_NONE, NULL, 0,
13878 NULL, HFILL }
13880 { &hf_nas_5gs_mm_eui_64,
13881 { "EUI-64", "nas-5gs.mm.eui_64",
13882 FT_EUI64, BASE_NONE, NULL, 0,
13883 NULL, HFILL }
13885 { &hf_nas_5gs_mm_reg_res_res,
13886 { "5GS registration result", "nas-5gs.mm.reg_res.res",
13887 FT_UINT8, BASE_DEC, VALS(nas_5gs_mm_reg_res_values), 0x07,
13888 NULL, HFILL }
13890 { &hf_nas_5gs_mm_reg_res_sms_allowed,
13891 { "SMS over NAS", "nas-5gs.mm.reg_res.sms_all",
13892 FT_BOOLEAN, 8, TFS(&tfs_allowed_not_allowed), 0x08,
13893 NULL, HFILL }
13895 { &hf_nas_5gs_mm_reg_res_nssaa_perf,
13896 { "NSSAA Performed", "nas-5gs.mm.reg_res.nssaa_perf",
13897 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_mm_reg_res_nssaa_perf), 0x10,
13898 NULL, HFILL }
13900 { &hf_nas_5gs_mm_reg_res_emergency_reg,
13901 { "Emergency registered", "nas-5gs.mm.reg_res.emergency_reg",
13902 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_mm_reg_res_emergency_reg), 0x20,
13903 NULL, HFILL }
13905 { &hf_nas_5gs_mm_reg_res_disaster_roaming_reg_res,
13906 { "Disaster roaming registration result", "nas-5gs.mm.reg_res.disaster_roaming_reg_res",
13907 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_mm_reg_res_disaster_roaming_reg_res), 0x40,
13908 NULL, HFILL }
13910 { &hf_nas_5gs_amf_region_id,
13911 { "AMF Region ID", "nas-5gs.amf_region_id",
13912 FT_UINT8, BASE_DEC, NULL, 0x0,
13913 NULL, HFILL }
13915 { &hf_nas_5gs_amf_set_id,
13916 { "AMF Set ID", "nas-5gs.amf_set_id",
13917 FT_UINT16, BASE_DEC, NULL, 0xffc0,
13918 NULL, HFILL }
13920 { &hf_nas_5gs_amf_pointer,
13921 { "AMF Pointer", "nas-5gs.amf_pointer",
13922 FT_UINT8, BASE_DEC, NULL, 0x3f,
13923 NULL, HFILL }
13925 { &hf_nas_5gs_5g_tmsi,
13926 { "5G-TMSI", "nas-5gs.5g_tmsi",
13927 FT_UINT32, BASE_DEC_HEX, NULL, 0x0,
13928 NULL, HFILL }
13930 { &hf_nas_5gs_nw_feat_sup_ims_vops_3gpp,
13931 { "IMS voice over PS session indicator (IMS VoPS)", "nas-5gs.nw_feat_sup.vops_3gpp",
13932 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
13933 NULL, HFILL }
13935 { &hf_nas_5gs_nw_feat_sup_ims_vops_n3gpp,
13936 { "IMS voice over PS session over non-3GPP access indicator (IMS-VoPS-N3GPP)", "nas-5gs.nw_feat_sup.vops_n3gpp",
13937 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02,
13938 NULL, HFILL }
13940 { &hf_nas_5gs_nw_feat_sup_ims_emc_b3b2,
13941 { "Emergency service support indicator (EMC)", "nas-5gs.nw_feat_sup.emc",
13942 FT_UINT8, BASE_DEC, VALS(nas_5gs_nw_feat_sup_emc_values), 0x0c,
13943 NULL, HFILL }
13945 { &hf_nas_5gs_nw_feat_sup_ims_emf_b5b4,
13946 { "Emergency service fallback indicator (EMF)", "nas-5gs.nw_feat_sup.emf",
13947 FT_UINT8, BASE_DEC, VALS(nas_5gs_nw_feat_sup_emf_values), 0x30,
13948 NULL, HFILL }
13950 { &hf_nas_5gs_nw_feat_sup_ims_iwk_n26_b6,
13951 { "Interworking without N26 (IWK N26)", "nas-5gs.nw_feat_sup.iwk_n26",
13952 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x40,
13953 NULL, HFILL }
13955 { &hf_nas_5gs_nw_feat_sup_mpsi_b7,
13956 { "MPS indicator (MPSI)", "nas-5gs.nw_feat_sup.mpsi",
13957 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_nw_feat_sup_mpsi), 0x80,
13958 NULL, HFILL }
13960 { &hf_nas_5gs_nw_feat_sup_emcn3,
13961 { "Emergency services over non-3GPP access (EMCN3)", "nas-5gs.nw_feat_sup.emcn3",
13962 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
13963 NULL, HFILL }
13965 { &hf_nas_5gs_nw_feat_sup_mcsi,
13966 { "MCS indicator (MCSI)", "nas-5gs.nw_feat_sup.mcsi",
13967 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_nw_feat_sup_mcsi), 0x02,
13968 NULL, HFILL }
13970 { &hf_nas_5gs_nw_feat_sup_restrict_ec,
13971 { "Restriction on enhanced coverage (RestrictEC)", "nas-5gs.nw_feat_sup.restrict_ec",
13972 FT_UINT8, BASE_DEC, VALS(nas_5gs_nw_feat_sup_restrict_ec_values), 0x0c,
13973 NULL, HFILL }
13975 { &hf_nas_5gs_nw_feat_sup_5g_cp_ciot,
13976 { "Control plane CIoT 5GS optimization (5G-CP CIoT)", "nas-5gs.nw_feat_sup.5g_cp_ciot",
13977 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x10,
13978 NULL, HFILL }
13980 { &hf_nas_5gs_nw_feat_sup_n3_data,
13981 { "N3 data transfer (N3 data)", "nas-5gs.nw_feat_sup.n3_data",
13982 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x20,
13983 NULL, HFILL }
13985 { &hf_nas_5gs_nw_feat_sup_5g_iphc_cp_ciot,
13986 { "IP header compression for control plane CIoT 5GS optimization (5G-IPHC-CP CIoT)", "nas-5gs.nw_feat_sup.5g_iphc_cp_ciot",
13987 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x40,
13988 NULL, HFILL }
13990 { &hf_nas_5gs_nw_feat_sup_5g_ciot_up,
13991 { "User plane CIoT 5GS optimization (5G-UP CIoT)", "nas-5gs.nw_feat_sup.5g_ciot_up",
13992 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x80,
13993 NULL, HFILL }
13995 { &hf_nas_5gs_nw_feat_sup_5g_lcs,
13996 { "Location Services indicator in 5GC (5G-LCS)", "nas-5gs.nw_feat_sup.5g_lcs",
13997 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
13998 NULL, HFILL }
14000 { &hf_nas_5gs_nw_feat_sup_ats_ind,
14001 { "ATSSS support indicator (ATS-IND)", "nas-5gs.nw_feat_sup.ats_ind",
14002 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02,
14003 NULL, HFILL }
14005 { &hf_nas_5gs_nw_feat_sup_5g_ehc_cp_ciot,
14006 { "Ethernet header compression for control plane CIoT 5GS optimization (5G-EHC-CP CIoT)", "nas-5gs.nw_feat_sup.5g_ehc_cp_ciot",
14007 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x04,
14008 NULL, HFILL }
14010 { &hf_nas_5gs_nw_feat_sup_ncr,
14011 { "N1 NAS signalling connection release (NCR)", "nas-5gs.nw_feat_sup.ncr",
14012 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x08,
14013 NULL, HFILL }
14015 { &hf_nas_5gs_nw_feat_sup_piv,
14016 { "Paging indication for voice services (PIV)", "nas-5gs.nw_feat_sup.piv",
14017 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x10,
14018 NULL, HFILL }
14020 { &hf_nas_5gs_nw_feat_sup_rpr,
14021 { "Reject paging request (RPR)", "nas-5gs.nw_feat_sup.rpr",
14022 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x20,
14023 NULL, HFILL }
14025 { &hf_nas_5gs_nw_feat_sup_pr,
14026 { "Paging restriction (PR)", "nas-5gs.nw_feat_sup.pr",
14027 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x40,
14028 NULL, HFILL }
14030 { &hf_nas_5gs_nw_feat_sup_un_per,
14031 { "Unavailability period (UN-PER)", "nas-5gs.nw_feat_sup.un_per",
14032 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x80,
14033 NULL, HFILL }
14035 { &hf_nas_5gs_nw_feat_sup_naps,
14036 { "Non-3GPP access path switching (NAPS)", "nas-5gs.nw_feat_sup.naps",
14037 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
14038 NULL, HFILL }
14040 { &hf_nas_5gs_nw_feat_sup_lcs_upp,
14041 { "LCS-UPP user plane positioning (LCS-UPP)", "nas-5gs.nw_feat_sup.lcs_upp",
14042 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02,
14043 NULL, HFILL }
14045 { &hf_nas_5gs_nw_feat_sup_supl,
14046 { "SUPL user plane positioning (SUPL)", "nas-5gs.nw_feat_sup.supl",
14047 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x04,
14048 NULL, HFILL }
14050 { &hf_nas_5gs_nw_feat_sup_rslp,
14051 { "Ranging and sidelink positioning support (RSLP)", "nas-5gs.nw_feat_sup.rslp",
14052 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x08,
14053 NULL, HFILL }
14057 { &hf_nas_5gs_tac,
14058 { "TAC", "nas-5gs.tac",
14059 FT_UINT24, BASE_DEC, NULL, 0x0,
14060 NULL, HFILL }
14062 { &hf_nas_5gs_mm_tal_t_li,
14063 { "Type of list", "nas-5gs.mm.tal_t_li",
14064 FT_UINT8, BASE_DEC, VALS(nas_5gs_mm_tal_t_li_values), 0x60,
14065 NULL, HFILL }
14067 { &hf_nas_5gs_mm_tal_num_e,
14068 { "Number of elements", "nas-5gs.mm.tal_num_e",
14069 FT_UINT8, BASE_DEC, VALS(nas_5gs_mm_tal_num_e), 0x1f,
14070 NULL, HFILL }
14072 { &hf_nas_5gs_sm_mapd_eps_b_cont_eps_param_cont,
14073 { "EPS parameter contents", "nas-5gs.sm.mapd_eps_b_cont_eps_param_cont",
14074 FT_BYTES, BASE_NONE, NULL, 0x0,
14075 NULL, HFILL }
14077 { &hf_nas_5gs_sm_max_nb_sup_pkt_flt_nb,
14078 { "Maximum number of supported packet filters", "nas-5gs.sm.max_nb_sup_pkt_flt.nb",
14079 FT_UINT16, BASE_DEC, NULL, 0xffe0,
14080 NULL, HFILL }
14082 { &hf_nas_5gs_sm_max_nb_sup_pkt_flt_spare,
14083 { "Spare", "nas-5gs.sm.max_nb_sup_pkt_flt.spare",
14084 FT_UINT16, BASE_HEX, NULL, 0x001f,
14085 NULL, HFILL }
14087 { &hf_nas_5gs_kacf,
14088 { "K_AMF change flag", "nas-5gs.kacf",
14089 FT_BOOLEAN, 8, TFS(&nas_5gs_kacf_tfs), 0x10,
14090 NULL, HFILL }
14092 { &hf_nas_5gs_ncc,
14093 { "NCC", "nas-5gs.ncc",
14094 FT_UINT8, BASE_DEC, NULL, 0x70,
14095 NULL, HFILL }
14097 { &hf_nas_5gs_mm_rinmr,
14098 { "Retransmission of initial NAS message request (RINMR)", "nas-5gs.mm.rinmr",
14099 FT_BOOLEAN, 8, TFS(&tfs_requested_not_requested), 0x02,
14100 NULL, HFILL }
14102 { &hf_nas_5gs_mm_hdp,
14103 { "Horizontal derivation parameter (HDP)", "nas-5gs.mm.hdp",
14104 FT_BOOLEAN, 8, TFS(&tfs_required_not_required), 0x01,
14105 NULL, HFILL }
14107 { &hf_nas_5gs_mm_cipher_key,
14108 { "Cipher Key", "nas-5gs.mm.cipher_key",
14109 FT_BOOLEAN, 8, TFS(&tfs_requested_not_requested), 0x01,
14110 NULL, HFILL }
14112 { &hf_nas_5gs_mm_dcni,
14113 { "Default configured NSSAI indication (DCNI)", "nas-5gs.mm.dcni",
14114 FT_BOOLEAN, 8, TFS(&nas_5gs_mm_dcni_tfs), 0x02,
14115 NULL, HFILL }
14117 { &hf_nas_5gs_mm_nssci,
14118 { "Network slicing subscription change indication (NSSCI)", "nas-5gs.mm.nssci",
14119 FT_BOOLEAN, 8, TFS(&tfs_changed_not_changed), 0x01,
14120 NULL, HFILL }
14122 { &hf_nas_5gs_mm_nssai_inc_mode,
14123 { "NSSAI inclusion mode", "nas-5gs.mm.nssai_inc_mode",
14124 FT_UINT8, BASE_DEC, VALS(nas_5gs_mm_nssai_inc_mode_vals), 0x03,
14125 NULL, HFILL }
14127 { &hf_nas_5gs_mm_ue_usage_setting,
14128 { "UE's usage setting", "nas-5gs.mm.ue_usage_setting",
14129 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_mm_ue_usage_setting), 0x01,
14130 NULL, HFILL }
14132 { &hf_nas_5gs_mm_5gs_drx_param,
14133 { "DRX value", "nas-5gs.mm.drx_value",
14134 FT_UINT8, BASE_DEC, VALS(nas_5gs_mm_drx_vals), 0x0f,
14135 NULL, HFILL }
14137 { &hf_nas_5gs_mm_op_def_access_cat_len,
14138 { "Length of operator-defined access category definition contents", "nas-5gs.mm.operator_defined_access_cat.len",
14139 FT_UINT8, BASE_DEC, NULL, 0x0,
14140 NULL, HFILL }
14142 { &hf_nas_5gs_mm_op_def_access_cat_precedence,
14143 { "Precedence", "nas-5gs.mm.operator_defined_access_cat.precedence",
14144 FT_UINT8, BASE_DEC, NULL, 0x0,
14145 NULL, HFILL }
14147 { &hf_nas_5gs_mm_op_def_access_cat_psac,
14148 { "Presence of standardized access category", "nas-5gs.mm.operator_defined_access_cat.psac",
14149 FT_BOOLEAN, 8, TFS(&tfs_included_not_included), 0x80,
14150 NULL, HFILL }
14152 { &hf_nas_5gs_mm_op_def_access_cat_number,
14153 { "Access category number", "nas-5gs.mm.operator_defined_access_cat.number",
14154 FT_UINT8, BASE_CUSTOM, CF_FUNC(nas_5gs_mm_access_cat_number), 0x1f,
14155 NULL, HFILL }
14157 { &hf_nas_5gs_mm_op_def_access_cat_criteria_length,
14158 { "Length of criteria", "nas-5gs.mm.operator_defined_access_cat.criteria_length",
14159 FT_UINT8, BASE_DEC, NULL, 0x0,
14160 NULL, HFILL }
14162 { &hf_nas_5gs_mm_op_def_access_cat_criteria_type,
14163 { "Criteria type", "nas-5gs.mm.operator_defined_access_cat.criteria_type",
14164 FT_UINT8, BASE_DEC, VALS(nas_5gs_mm_op_def_access_cat_criteria_type_vals), 0x0,
14165 NULL, HFILL }
14167 { &hf_nas_5gs_mm_op_def_access_cat_criteria_dnn_count,
14168 { "DNN count", "nas-5gs.mm.operator_defined_access_cat.criteria_dnn_count",
14169 FT_UINT8, BASE_DEC, NULL, 0x0,
14170 NULL, HFILL }
14172 { &hf_nas_5gs_mm_op_def_access_cat_criteria_dnn_len,
14173 { "DNN length", "nas-5gs.mm.operator_defined_access_cat.criteria_dnn_len",
14174 FT_UINT8, BASE_DEC, NULL, 0x0,
14175 NULL, HFILL }
14177 { &hf_nas_5gs_mm_op_def_access_cat_criteria_os_id_os_app_id_count,
14178 { "OS Id + OS App Id count", "nas-5gs.mm.operator_defined_access_cat.criteria_os_id_os_app_id_count",
14179 FT_UINT8, BASE_DEC, NULL, 0x0,
14180 NULL, HFILL }
14182 { &hf_nas_5gs_mm_op_def_access_cat_criteria_os_id,
14183 { "OS Id", "nas-5gs.mm.operator_defined_access_cat.criteria_os_id",
14184 FT_GUID, BASE_NONE, NULL, 0x0,
14185 NULL, HFILL }
14187 { &hf_nas_5gs_mm_op_def_access_cat_criteria_os_app_id_len,
14188 { "OS App Id length", "nas-5gs.mm.operator_defined_access_cat.criteria_os_app_id_len",
14189 FT_UINT8, BASE_DEC, NULL, 0x0,
14190 NULL, HFILL }
14192 { &hf_nas_5gs_mm_op_def_access_cat_criteria_os_app_id,
14193 { "OS App Id", "nas-5gs.mm.operator_defined_access_cat.criteria_os_app_id",
14194 FT_BYTES, BASE_NONE, NULL, 0x0,
14195 NULL, HFILL }
14197 { &hf_nas_5gs_mm_op_def_access_cat_criteria_s_nssai_count,
14198 { "S-NSSAI count", "nas-5gs.mm.operator_defined_access_cat.criteria_s_nssai_count",
14199 FT_UINT8, BASE_DEC, NULL, 0x0,
14200 NULL, HFILL }
14202 { &hf_nas_5gs_mm_op_def_access_cat_criteria_s_nssai_len,
14203 { "S-NSSAI length", "nas-5gs.mm.operator_defined_access_cat.criteria_s_nssai_len",
14204 FT_UINT8, BASE_DEC, NULL, 0x0,
14205 NULL, HFILL }
14207 { &hf_nas_5gs_mm_op_def_access_cat_standardized_number,
14208 { "Standardized access category number", "nas-5gs.mm.operator_defined_access_cat.standardized_number",
14209 FT_UINT8, BASE_CUSTOM, CF_FUNC(nas_5gs_mm_access_standardized_cat_number), 0x1f,
14210 NULL, HFILL }
14212 { &hf_nas_5gs_mm_sms_indic_sai,
14213 { "SMS over NAS", "nas-5gs.mm.ms_indic.sai",
14214 FT_BOOLEAN, 8, TFS(&tfs_allowed_not_allowed), 0x01,
14215 "SMS availability indication (SAI)", HFILL }
14217 { &hf_nas_5gs_sor_hdr0_ap,
14218 { "Additional parameters (AP)", "nas-5gs.sor_hdr0.ap",
14219 FT_BOOLEAN, 8, TFS(&tfs_included_not_included), 0x10,
14220 NULL, HFILL }
14222 { &hf_nas_5gs_sor_hdr0_ack,
14223 { "Acknowledgement (ACK)", "nas-5gs.sor_hdr0.ack",
14224 FT_BOOLEAN, 8, TFS(&tfs_requested_not_requested), 0x08,
14225 NULL, HFILL }
14227 { &hf_nas_5gs_sor_hdr0_list_type,
14228 { "List type", "nas-5gs.sor_hdr0.list_type",
14229 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_list_type), 0x04,
14230 NULL, HFILL }
14232 { &hf_nas_5gs_sor_hdr0_list_ind,
14233 { "List indication", "nas-5gs.sor_hdr0.list_ind",
14234 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_list_ind), 0x02,
14235 NULL, HFILL }
14237 { &hf_nas_5gs_sor_hdr0_sor_data_type,
14238 { "SOR data type", "nas-5gs.sor.sor_data_type",
14239 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_sor_data_type), 0x01,
14240 NULL, HFILL }
14242 { &hf_nas_5gs_sor_mssi,
14243 { "ME support of SOR-CMCI indicator (MSSI)", "nas-5gs.sor.mssi",
14244 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02,
14245 NULL, HFILL }
14247 { &hf_nas_5gs_sor_mssnpnsi,
14248 { "ME support of SOR-SNPN-SI indicator (MSSNPNSI)", "nas-5gs.sor.mssnpnsi",
14249 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x04,
14250 NULL, HFILL }
14252 { &hf_nas_5gs_sor_msssnpnsils,
14253 { "MS support of SOR-SNPN-SI-LS indicator (MSSNPNSILS)", "nas-5gs.sor.msssnpnsils",
14254 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x08,
14255 NULL, HFILL }
14257 { &hf_nas_5gs_sor_mac_iue,
14258 { "SOR-MAC-IUE", "nas-5gs.mm.sor_mac_iue",
14259 FT_BYTES, BASE_NONE, NULL, 0x0,
14260 NULL, HFILL }
14262 { &hf_nas_5gs_sor_mac_iausf,
14263 { "SOR-MAC-IAUSF", "nas-5gs.mm.sor_mac_iausf",
14264 FT_BYTES, BASE_NONE, NULL, 0x0,
14265 NULL, HFILL }
14267 { &hf_nas_5gs_counter_sor,
14268 { "CounterSOR", "nas-5gs.mm.counter_sor",
14269 FT_UINT16, BASE_DEC, NULL, 0x0,
14270 NULL, HFILL }
14272 { &hf_nas_5gs_sor_sec_pkt,
14273 { "Secured packet", "nas-5gs.mm.sor_sec_pkt",
14274 FT_BYTES, BASE_NONE, NULL, 0x0,
14275 NULL, HFILL }
14277 { &hf_nas_5gs_sor_sssli,
14278 { "SOR-SNPN-SI-LS indicator", "nas-5gs.mm.sor_sssli",
14279 FT_BOOLEAN, 8, TFS(&tfs_present_absent), 0x08,
14280 NULL, HFILL }
14282 { &hf_nas_5gs_sor_sssi,
14283 { "SOR-SNPN-SI indicator", "nas-5gs.mm.sor_sssi",
14284 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_sor_sssi), 0x04,
14285 NULL, HFILL }
14287 { &hf_nas_5gs_sor_sscmi,
14288 { "Store SOR-CMCI in ME indicator (SSCMI)", "nas-5gs.mm.sor_sscmi",
14289 FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x02,
14290 NULL, HFILL }
14292 { &hf_nas_5gs_sor_si,
14293 { "SOR-CMCI indicator (SI)", "nas-5gs.mm.sor_si",
14294 FT_BOOLEAN, 8, TFS(&tfs_present_absent), 0x01,
14295 NULL, HFILL }
14297 { &hf_nas_5gs_sor_plmn_id_act_len,
14298 { "Length of PLMN ID and access technology list", "nas-5gs.mm.sor_plmn_id_act_len",
14299 FT_UINT8, BASE_DEC, NULL, 0x0,
14300 NULL, HFILL }
14302 { &hf_nas_5gs_sor_cmci_len,
14303 { "Length of SOR-CMCI contents", "nas-5gs.mm.sor_cmci_len",
14304 FT_UINT16, BASE_DEC, NULL, 0x0,
14305 NULL, HFILL }
14307 { &hf_nas_5gs_sor_cmci_payload,
14308 { "SOR-CMCI contents payload", "nas-5gs.mm.sor_cmci_payload",
14309 FT_BYTES, BASE_NONE, NULL, 0x0,
14310 NULL, HFILL }
14312 { &hf_nas_5gs_sor_snpn_si_len,
14313 { "Length of SOR-SNPN-SI contents", "nas-5gs.mm.snpn_si_len",
14314 FT_UINT16, BASE_DEC, NULL, 0x0,
14315 NULL, HFILL }
14317 { &hf_nas_5gs_sor_snpn_si_payload,
14318 { "SOR-SNPN-SI contents payload", "nas-5gs.mm.snpn_si_payload",
14319 FT_BYTES, BASE_NONE, NULL, 0x0,
14320 NULL, HFILL }
14322 { &hf_nas_5gs_sor_snpn_si_ls_len,
14323 { "Length of SOR-SNPN-SI-LS contents", "nas-5gs.mm.snpn_si_ls_len",
14324 FT_UINT16, BASE_DEC, NULL, 0x0,
14325 NULL, HFILL }
14327 { &hf_nas_5gs_sor_snpn_si_ls_payload,
14328 { "SOR-SNPN-SI-LS contents payload", "nas-5gs.mm.snpn_si_ls_payload",
14329 FT_BYTES, BASE_NONE, NULL, 0x0,
14330 NULL, HFILL }
14332 { &hf_nas_5gs_access_tech_o1_b7,
14333 { "Access technology UTRAN", "nas-5gs.access_tech_o1_b7.utran",
14334 FT_BOOLEAN, 8, TFS(&tfs_selected_not_selected), 0x80,
14335 NULL, HFILL }
14337 { &hf_nas_5gs_access_tech_o1_b6,
14338 { "Access technology E-UTRAN", "nas-5gs.access_tech_o1_b6.e_utran",
14339 FT_BOOLEAN, 8, TFS(&tfs_selected_not_selected), 0x40,
14340 NULL, HFILL }
14342 { &hf_nas_5gs_access_tech_o1_b5,
14343 { "Access technology E-UTRAN in WB-S1 mode", "nas-5gs.access_tech_o1_b5.e_utran_in_wb_s1_mode",
14344 FT_BOOLEAN, 8, TFS(&tfs_selected_not_selected), 0x20,
14345 NULL, HFILL }
14347 { &hf_nas_5gs_access_tech_o1_b4,
14348 { "Access technology E-UTRAN in NB-S1 mode", "nas-5gs.access_tech_o1_b4.e_utran_in_nb_s1_mode",
14349 FT_BOOLEAN, 8, TFS(&tfs_selected_not_selected), 0x10,
14350 NULL, HFILL }
14352 { &hf_nas_5gs_access_tech_o1_b3,
14353 { "Access technology NG-RAN", "nas-5gs.access_tech_o1_b3.ng_ran",
14354 FT_BOOLEAN, 8, TFS(&tfs_selected_not_selected), 0x08,
14355 NULL, HFILL }
14357 { &hf_nas_5gs_access_tech_o2_b7,
14358 { "Access technology GSM", "nas-5gs.access_tech_o2_b7.gsm",
14359 FT_BOOLEAN, 8, TFS(&tfs_selected_not_selected), 0x80,
14360 NULL, HFILL }
14362 { &hf_nas_5gs_access_tech_o2_b6,
14363 { "Access technology GSM COMPACT", "nas-5gs.access_tech_o2_b6.gsm_compact",
14364 FT_BOOLEAN, 8, TFS(&tfs_selected_not_selected), 0x40,
14365 NULL, HFILL }
14367 { &hf_nas_5gs_access_tech_o2_b5,
14368 { "Access technology CDMA2000 HRPD", "nas-5gs.access_tech_o2_b5.cdma2000_hrpd",
14369 FT_BOOLEAN, 8, TFS(&tfs_selected_not_selected), 0x20,
14370 NULL, HFILL }
14372 { &hf_nas_5gs_access_tech_o2_b4,
14373 { "Access technology CDMA2000 1xRTT", "nas-5gs.access_tech_o2_b4.cdma2000_1x_rtt",
14374 FT_BOOLEAN, 8, TFS(&tfs_selected_not_selected), 0x10,
14375 NULL, HFILL }
14377 { &hf_nas_5gs_access_tech_o2_b3,
14378 { "Access technology EC-GSM-IoT", "nas-5gs.access_tech_o2_b3.ec_gsm_iot",
14379 FT_BOOLEAN, 8, TFS(&tfs_selected_not_selected), 0x08,
14380 NULL, HFILL }
14382 { &hf_nas_5gs_access_tech_o2_b2,
14383 { "Access technology GSM", "nas-5gs.access_tech_o2_b2.gsm",
14384 FT_BOOLEAN, 8, TFS(&tfs_selected_not_selected), 0x04,
14385 NULL, HFILL }
14387 { &hf_nas_5gs_single_port_type,
14388 { "Port number", "nas-5gs.single_port_number",
14389 FT_UINT16, BASE_DEC, NULL, 0x0,
14390 NULL, HFILL }
14392 { &hf_nas_5gs_port_range_type_low,
14393 { "Port range low limit", "nas-5gs.port_range_low_limit",
14394 FT_UINT16, BASE_DEC, NULL, 0x0,
14395 NULL, HFILL }
14397 { &hf_nas_5gs_port_range_type_high,
14398 { "Port range high limit", "nas-5gs.port_range_high_limit",
14399 FT_UINT16, BASE_DEC, NULL, 0x0,
14400 NULL, HFILL }
14402 { &hf_nas_5gs_sec_param_idx,
14403 { "Security parameter index", "nas-5gs.security_parameter_index",
14404 FT_UINT32, BASE_HEX, NULL, 0x0,
14405 NULL, HFILL }
14407 { &hf_nas_5gs_tos_tc_val,
14408 { "Type of service/Traffic class value", "nas-5gs.tos_tc_value",
14409 FT_UINT8, BASE_HEX, NULL, 0x0,
14410 NULL, HFILL }
14412 { &hf_nas_5gs_tos_tc_mask,
14413 { "Type of service/Traffic class mask", "nas-5gs.tos_tc_mask",
14414 FT_UINT8, BASE_HEX, NULL, 0x0,
14415 NULL, HFILL }
14417 { &hf_nas_5gs_flow_label,
14418 { "Flow label", "nas-5gs.flow_label",
14419 FT_UINT24, BASE_HEX, NULL, 0x0fffff,
14420 NULL, HFILL }
14422 { &hf_nas_5gs_mac_addr,
14423 { "MAC address", "nas-5gs.mac_addr",
14424 FT_ETHER, BASE_NONE, NULL, 0x0,
14425 NULL, HFILL }
14427 { &hf_nas_5gs_vlan_tag_vid,
14428 { "VID", "nas-5gs.vlan_tag_vid",
14429 FT_UINT16, BASE_HEX, NULL, 0x0fff,
14430 NULL, HFILL }
14432 { &hf_nas_5gs_vlan_tag_pcp,
14433 { "PCP", "nas-5gs.vlan_tag_pcp",
14434 FT_UINT8, BASE_HEX, NULL, 0x0e,
14435 NULL, HFILL }
14437 { &hf_nas_5gs_vlan_tag_dei,
14438 { "DEI", "nas-5gs.vlan_tag_dei",
14439 FT_UINT8, BASE_HEX, NULL, 0x01,
14440 NULL, HFILL }
14442 { &hf_nas_5gs_ethertype,
14443 { "Ethertype", "nas-5gs.ethertype",
14444 FT_UINT16, BASE_HEX, VALS(etype_vals), 0x0,
14445 NULL, HFILL }
14447 { &hf_nas_5gs_mac_addr_low,
14448 { "MAC address range low limit", "nas-5gs.mac_addr_low",
14449 FT_ETHER, BASE_NONE, NULL, 0x0,
14450 NULL, HFILL }
14452 { &hf_nas_5gs_mac_addr_high,
14453 { "MAC address range high limit", "nas-5gs.mac_addr",
14454 FT_ETHER, BASE_NONE, NULL, 0x0,
14455 NULL, HFILL }
14457 { &hf_nas_5gs_updp_ue_pol_sect_sublst_len,
14458 { "Length", "nas-5gs.updp.ue_pol_sect_sublst_len",
14459 FT_UINT16, BASE_DEC, NULL, 0x0,
14460 NULL, HFILL }
14462 { &hf_nas_5gs_updp_ue_pol_sect_subresult_len,
14463 { "Number of results", "nas-5gs.updp.ue_pol_sect_subresult_len",
14464 FT_UINT8, BASE_DEC, NULL, 0x0,
14465 NULL, HFILL }
14467 { &hf_nas_5gs_updp_instr_len,
14468 { "Length", "nas-5gs.updp.instr_len",
14469 FT_UINT16, BASE_DEC, NULL, 0x0,
14470 NULL, HFILL }
14472 { &hf_nas_5gs_updp_upsc,
14473 { "UPSC", "nas-5gs.updp.upsc",
14474 FT_UINT16, BASE_DEC, NULL, 0x0,
14475 NULL, HFILL }
14477 { &hf_nas_5gs_updp_failed_instruction_order,
14478 { "Failed instruction order", "nas-5gs.updp.failed_instruction_order",
14479 FT_UINT16, BASE_DEC, NULL, 0x0,
14480 NULL, HFILL }
14482 { &hf_nas_5gs_updp_policy_len,
14483 { "Length", "nas-5gs.updp.policy_len",
14484 FT_UINT16, BASE_DEC, NULL, 0x0,
14485 NULL, HFILL }
14487 { &hf_nas_5gs_updp_ue_policy_part_type,
14488 { "UE policy part type", "nas-5gs.updp.ue_policy_part_type",
14489 FT_UINT8, BASE_DEC, VALS(nas_5gs_updp_ue_policy_part_type_vals), 0x0f,
14490 NULL, HFILL }
14492 { &hf_nas_5gs_updp_ue_policy_part_cont,
14493 { "UE policy part contents", "nas-5gs.updp.ue_policy_part_cont",
14494 FT_BYTES, BASE_NONE, NULL, 0x0,
14495 NULL, HFILL }
14497 { &hf_nas_5gs_ursp_rule_len,
14498 { "Length", "nas-5gs.ursp.rule_len",
14499 FT_UINT16, BASE_DEC, NULL, 0x0,
14500 NULL, HFILL }
14502 { &hf_nas_5gs_ursp_rule_prec,
14503 { "Precedence", "nas-5gs.ursp.rule_prec",
14504 FT_UINT8, BASE_DEC, NULL, 0x0,
14505 NULL, HFILL }
14507 { &hf_nas_5gs_ursp_traff_desc_lst_len,
14508 { "Length", "nas-5gs.ursp.traff_desc_len",
14509 FT_UINT16, BASE_DEC, NULL, 0x0,
14510 NULL, HFILL }
14512 { &hf_nas_5gs_ursp_traff_desc,
14513 { "Traffic descriptor", "nas-5gs.ursp.traff_desc",
14514 FT_UINT8, BASE_DEC, VALS(nas_5gs_ursp_traff_desc_component_type_values), 0x0,
14515 NULL, HFILL }
14517 { &hf_nas_5gs_ursp_r_sel_desc_lst_len,
14518 { "Length", "nas-5gs.ursp.r_sel_desc_lst_len",
14519 FT_UINT16, BASE_DEC, NULL, 0x0,
14520 NULL, HFILL }
14522 { &hf_nas_5gs_ursp_r_sel_desc_lst,
14523 { "Route selection descriptor list", "nas-5gs.ursp.r_sel_desc_lst",
14524 FT_BYTES, BASE_NONE, NULL, 0x0,
14525 NULL, HFILL }
14527 { &hf_nas_5gs_ursp_traff_desc_ipv4,
14528 { "IPv4 address", "nas-5gs.ursp.traff_desc.ipv4",
14529 FT_IPv4, BASE_NONE, NULL, 0x0,
14530 NULL, HFILL }
14532 { &hf_nas_5gs_ursp_traff_desc_ipv4_mask,
14533 { "IPv4 mask", "nas-5gs.ursp.traff_desc.ipv4_mask",
14534 FT_IPv4, BASE_NONE, NULL, 0x0,
14535 NULL, HFILL }
14537 { &hf_nas_5gs_ursp_traff_desc_ipv6,
14538 { "IPv6 address", "nas-5gs.ursp.traff_desc.ipv6",
14539 FT_IPv6, BASE_NONE, NULL, 0x0,
14540 NULL, HFILL }
14542 { &hf_nas_5gs_ursp_traff_desc_ipv6_prefix_len,
14543 { "IPv6 prefix length", "nas-5gs.ursp.traff_desc.ipv6_prefix_len",
14544 FT_UINT8, BASE_DEC, NULL, 0x0,
14545 NULL, HFILL }
14547 { &hf_nas_5gs_ursp_traff_desc_next_hdr,
14548 { "Protocol identifier/next header type", "nas-5gs.ursp.traff_desc.next_hdr",
14549 FT_UINT8, BASE_DEC | BASE_EXT_STRING, &ipproto_val_ext, 0x0,
14550 NULL, HFILL }
14552 { &hf_nas_5gs_ursp_traff_desc_single_remote_port,
14553 { "Remote port", "nas-5gs.ursp.traff_desc.single_remote_port",
14554 FT_UINT16, BASE_DEC, NULL, 0x0,
14555 NULL, HFILL }
14557 { &hf_nas_5gs_ursp_traff_desc_remote_port_range_low,
14558 { "Remote port range low", "nas-5gs.ursp.traff_desc.remote_port_range_low",
14559 FT_UINT16, BASE_DEC, NULL, 0x0,
14560 NULL, HFILL }
14562 { &hf_nas_5gs_ursp_traff_desc_remote_port_range_high,
14563 { "Remote port range high", "nas-5gs.ursp.traff_desc.remote_port_range_high",
14564 FT_UINT16, BASE_DEC, NULL, 0x0,
14565 NULL, HFILL }
14567 { &hf_nas_5gs_ursp_traff_desc_sec_param_index,
14568 { "Security parameter index", "nas-5gs.ursp.traff_desc.sec_param_index",
14569 FT_UINT32, BASE_HEX, NULL, 0x0,
14570 NULL, HFILL }
14572 { &hf_nas_5gs_ursp_traff_desc_tos_tc,
14573 { "Type of service/traffic class", "nas-5gs.ursp.traff_desc.tos_tc",
14574 FT_UINT8, BASE_HEX, NULL, 0x0,
14575 NULL, HFILL }
14577 { &hf_nas_5gs_ursp_traff_desc_tos_tc_mask,
14578 { "Type of service/traffic class mask", "nas-5gs.ursp.traff_desc.tos_tc_mask",
14579 FT_UINT8, BASE_HEX, NULL, 0x0,
14580 NULL, HFILL }
14582 { &hf_nas_5gs_ursp_traff_desc_flow_label,
14583 { "Flow label", "nas-5gs.ursp.traff_desc.flow_label",
14584 FT_UINT24, BASE_HEX, NULL, 0x0fffff,
14585 NULL, HFILL }
14587 { &hf_nas_5gs_ursp_traff_desc_dest_mac_addr,
14588 { "Destination MAC address", "nas-5gs.ursp.traff_desc.dest_mac_addr",
14589 FT_ETHER, BASE_NONE, NULL, 0x0,
14590 NULL, HFILL }
14592 { &hf_nas_5gs_ursp_traff_desc_ctag_vid,
14593 { "802.1Q C-TAG VID", "nas-5gs.ursp.traff_desc.ctag_vid",
14594 FT_UINT16, BASE_HEX, NULL, 0x0fff,
14595 NULL, HFILL }
14597 { &hf_nas_5gs_ursp_traff_desc_stag_vid,
14598 { "802.1Q S-TAG VID", "nas-5gs.ursp.traff_desc.stag_vid",
14599 FT_UINT16, BASE_HEX, NULL, 0x0fff,
14600 NULL, HFILL }
14602 { &hf_nas_5gs_ursp_traff_desc_ctag_pcp,
14603 { "802.1Q C-TAG PCP", "nas-5gs.ursp.traff_desc.ctag_pcp",
14604 FT_UINT8, BASE_HEX, NULL, 0x0e,
14605 NULL, HFILL }
14607 { &hf_nas_5gs_ursp_traff_desc_ctag_dei,
14608 { "802.1Q C-TAG DEI", "nas-5gs.ursp.traff_desc.ctag_dei",
14609 FT_UINT8, BASE_HEX, NULL, 0x01,
14610 NULL, HFILL }
14612 { &hf_nas_5gs_ursp_traff_desc_stag_pcp,
14613 { "802.1Q S-TAG PCP", "nas-5gs.ursp.traff_desc.stag_pcp",
14614 FT_UINT8, BASE_HEX, NULL, 0x0e,
14615 NULL, HFILL }
14617 { &hf_nas_5gs_ursp_traff_desc_stag_dei,
14618 { "802.1Q S-TAG DEI", "nas-5gs.ursp.traff_desc.stag_dei",
14619 FT_UINT8, BASE_HEX, NULL, 0x01,
14620 NULL, HFILL }
14622 { &hf_nas_5gs_ursp_traff_desc_ethertype,
14623 { "Ethertype", "nas-5gs.ursp.traff_desc.ethertype",
14624 FT_UINT16, BASE_HEX, VALS(etype_vals), 0x0,
14625 NULL, HFILL }
14627 { &hf_nas_5gs_ursp_traff_desc_conn_cap_len,
14628 { "Connection capabilities length", "nas-5gs.ursp.traff_desc.conn_cap_len",
14629 FT_UINT8, BASE_DEC, NULL, 0x0,
14630 NULL, HFILL }
14632 { &hf_nas_5gs_ursp_traff_desc_conn_cap,
14633 { "Connection capability", "nas-5gs.ursp.traff_desc.conn_cap",
14634 FT_UINT8, BASE_HEX | BASE_RANGE_STRING, RVALS(nas_5gs_ursp_traff_desc_conn_cap_values), 0x0,
14635 NULL, HFILL }
14637 { &hf_nas_5gs_ursp_traff_desc_dest_fqdn_len,
14638 { "Destination FQDN length", "nas-5gs.ursp.traff_desc.dest_fqdn_len",
14639 FT_UINT8, BASE_DEC, NULL, 0x0,
14640 NULL, HFILL }
14642 { &hf_nas_5gs_ursp_traff_desc_dest_fqdn,
14643 { "Destination FQDN", "nas-5gs.ursp.traff_desc.dest_fqdn",
14644 FT_STRING, BASE_NONE, NULL, 0x0,
14645 NULL, HFILL }
14647 { &hf_nas_5gs_ursp_traff_desc_dest_mac_addr_range_low,
14648 { "Destination MAC address range low", "nas-5gs.ursp.traff_desc.dest_mac_addr_range_low",
14649 FT_ETHER, BASE_NONE, NULL, 0x0,
14650 NULL, HFILL }
14652 { &hf_nas_5gs_ursp_traff_desc_dest_mac_addr_range_high,
14653 { "Destination MAC address range high", "nas-5gs.ursp.traff_desc.dest_mac_addr_range_high",
14654 FT_ETHER, BASE_NONE, NULL, 0x0,
14655 NULL, HFILL }
14657 { &hf_nas_5gs_ursp_traff_desc_len,
14658 { "Length", "nas-5gs.ursp.r_sel_desc_len",
14659 FT_UINT16, BASE_DEC, NULL, 0x0,
14660 NULL, HFILL }
14662 { &hf_nas_5gs_ursp_r_sel_des_prec,
14663 { "Precedence", "nas-5gs.ursp.r_sel_des_prec",
14664 FT_UINT8, BASE_DEC, NULL, 0x0,
14665 NULL, HFILL }
14667 { &hf_nas_5gs_ursp_r_sel_des_cont_len,
14668 { "Length", "nas-5gs.ursp.r_sel_des_cont_len",
14669 FT_UINT16, BASE_DEC, NULL, 0x0,
14670 NULL, HFILL }
14672 { &hf_nas_5gs_ursp_ursp_r_sel_desc_comp_type,
14673 { "Route selection descriptor component type identifier", "nas-5gs.ursp.r_sel_desc_comp_type",
14674 FT_UINT8, BASE_DEC, VALS(nas_5gs_ursp_r_sel_desc_comp_type_values), 0x0,
14675 NULL, HFILL }
14677 { &hf_nas_5gs_dnn_len,
14678 { "Length", "nas-5gs.dnn_len",
14679 FT_UINT8, BASE_DEC, NULL, 0x0,
14680 NULL, HFILL }
14682 { &hf_nas_5gs_sup_andsp,
14683 { "Support ANDSP", "nas-5gs.sup_andsp",
14684 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
14685 NULL, HFILL }
14687 { &hf_nas_5gs_nssui,
14688 { "Non-subscribed SNPN signalled URSP handling indication (NSSUI)", "nas-5gs.nssui",
14689 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_nssui), 0x01,
14690 NULL, HFILL }
14692 { &hf_nas_5gs_upsi_sublist_len,
14693 { "Length", "nas-5gs.upsi_sublist_len",
14694 FT_INT32, BASE_DEC, NULL, 0x0,
14695 NULL, HFILL }
14697 { &hf_nas_5gs_upsc,
14698 { "UPSC", "nas-5gs.upsc",
14699 FT_UINT16, BASE_HEX, NULL, 0x0,
14700 NULL, HFILL }
14702 { &hf_nas_5gs_os_id,
14703 { "OS id(UUID)", "nas-5gs.os_id",
14704 FT_GUID, BASE_NONE, NULL, 0x0,
14705 NULL, HFILL } },
14706 { &hf_nas_5gs_upds_cause,
14707 { "UPDS cause", "nas-5gs.upds_cause",
14708 FT_UINT8, BASE_DEC, VALS(nas_5gs_updp_upds_cause_vals), 0x0,
14709 NULL, HFILL }
14711 { &hf_nas_5gs_v2xuui,
14712 { "UE policies for V2X communication over Uu indicator (V2XUUI)", "nas-5gs.v2xuui",
14713 FT_BOOLEAN, 8, TFS(&tfs_requested_not_requested), 0x02,
14714 NULL, HFILL }
14716 { &hf_nas_5gs_v2xpc5i,
14717 { "UE policies for V2X communication over PC5 indicator (V2XPC5I)", "nas-5gs.v2xpc5i",
14718 FT_BOOLEAN, 8, TFS(&tfs_requested_not_requested), 0x01,
14719 NULL, HFILL }
14721 { &hf_nas_5gs_os_app_id_len,
14722 { "Length", "nas-5gs.app_id_len",
14723 FT_UINT8, BASE_DEC, NULL, 0x0,
14724 NULL, HFILL }
14726 { &hf_nas_5gs_os_app_id,
14727 { "OS App id", "nas-5gs.os_app_id",
14728 FT_BYTES, BASE_NONE, NULL, 0x0,
14729 NULL, HFILL } },
14730 { &hf_nas_5gs_mm_len_of_rej_s_nssai,
14731 { "Length of rejected S-NSSAI", "nas-5gs.mm.len_of_rej_s_nssai",
14732 FT_UINT8, BASE_DEC, NULL, 0xf0,
14733 NULL, HFILL }
14735 { &hf_nas_5gs_mm_rej_s_nssai_cause,
14736 { "Cause", "nas-5gs.mm.rej_s_nssai.cause",
14737 FT_UINT8, BASE_DEC, VALS(nas_5gs_mm_rej_s_nssai_cause_vals), 0x0f,
14738 NULL, HFILL }
14740 { &hf_nas_5gs_mm_ue_radio_cap_id,
14741 { "UE radio capability ID", "nas-5gs.mm.ue_radio_cap_id",
14742 FT_STRING, BASE_NONE, NULL, 0x0,
14743 NULL, HFILL }
14745 { &hf_nas_5gs_mm_ue_radio_cap_id_del_req,
14746 { "Deletion request", "nas-5gs.mm.ue_radio_cap_id_del_req",
14747 FT_UINT8, BASE_DEC, VALS(nas_5gs_mm_ue_radio_cap_id_del_req_vals), 0x07,
14748 NULL, HFILL }
14750 { &hf_nas_5gs_mm_trunc_amf_set_id,
14751 { "Truncated AMF Set ID value", "nas-5gs.mm.trunc_amf_set_id",
14752 FT_UINT8, BASE_DEC, VALS(nas_5gs_mm_amf_trunc_set_id_vals), 0xf0,
14753 NULL, HFILL }
14755 { &hf_nas_5gs_mm_trunc_amf_pointer,
14756 { "Truncated AMF Pointer value", "nas-5gs.mm.trunc_amf_pointer",
14757 FT_UINT8, BASE_DEC, VALS(nas_5gs_mm_amf_trunc_pointer_vals), 0x0f,
14758 NULL, HFILL }
14760 { &hf_nas_5gs_mm_n5gcreg_b0,
14761 { "N5GC device indication bit (N5GCREG)", "nas-5gs.mm.n5gcreg",
14762 FT_BOOLEAN, 8, TFS(&tfs_requested_not_requested), 0x01,
14763 NULL, HFILL }
14765 { &hf_nas_5gs_mm_nb_n1_drx_value,
14766 { "NB-N1 mode DRX value", "nas-5gs.mm.nb_n1_drx_value",
14767 FT_UINT8, BASE_DEC, VALS(nas_5gs_mm_nb_n1_drx_params_vals), 0x0f,
14768 NULL, HFILL }
14770 { &hf_nas_5gs_mm_scmr,
14771 { "Signalling connection maintain request (SCMR)", "nas-5gs.mm.scmr",
14772 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_mm_scmr), 0x01,
14773 NULL, HFILL }
14775 { &hf_nas_5gs_mm_extended_rejected_nssai_number_of_element,
14776 { "Number of element", "nas-5gs.mm.extended_rejected_nssai.number_of_element",
14777 FT_UINT8, BASE_DEC, VALS(nas_5gs_mm_extended_rejected_s_nssai_number_of_element_vals), 0x0f,
14778 NULL, HFILL }
14780 { &hf_nas_5gs_mm_extended_rejected_nssai_type_of_list,
14781 { "Type of list", "nas-5gs.mm.extended_rejected_nssai.type_of_list",
14782 FT_UINT8, BASE_DEC, VALS(nas_5gs_mm_extended_rejected_s_nssai_type_of_list_vals), 0x70,
14783 NULL, HFILL }
14785 { &hf_nas_5gs_mm_extended_rejected_nssai_spare,
14786 { "Spare", "nas-5gs.mm.extended_rejected_nssai.spare",
14787 FT_UINT8, BASE_DEC, NULL, 0x80,
14788 NULL, HFILL }
14790 { &hf_nas_5gs_mm_extended_rejected_nssai_back_off_timer,
14791 { "Back-off timer value", "nas-5gs.mm.extended_rejected_nssai.back_off_timer",
14792 FT_UINT8, BASE_HEX, NULL, 0x0,
14793 NULL, HFILL }
14795 { &hf_nas_5gs_mm_len_of_rejected_s_nssai,
14796 { "Length of rejected S-NSSAI", "nas-5gs.mm.rejected_s_nssai.length",
14797 FT_UINT8, BASE_DEC, NULL, 0xf0,
14798 NULL, HFILL }
14800 { &hf_nas_5gs_mm_rejected_s_nssai_cause_value,
14801 { "Cause value", "nas-5gs.mm.rejected_s_nssai.cause_value",
14802 FT_UINT8, BASE_DEC, VALS(nas_5gs_mm_extended_rej_s_nssai_cause_vals), 0x0f,
14803 NULL, HFILL }
14805 { &hf_nas_5gs_mm_paging_restriction_type,
14806 { "Paging restriction type", "nas-5gs.mm.paging_restriction.type",
14807 FT_UINT8, BASE_DEC, VALS(nas_5gs_mm_paging_restriction_type_vals), 0x0f,
14808 NULL, HFILL }
14810 { &hf_nas_5gs_mm_paging_restriction_psi_7,
14811 { "PSI(7)", "nas-5gs.mm.paging_restriction.psi_7",
14812 FT_BOOLEAN, 8, TFS(&tfs_restricted_not_restricted), 0x80,
14813 NULL, HFILL }
14815 { &hf_nas_5gs_mm_paging_restriction_psi_6,
14816 { "PSI(6)", "nas-5gs.mm.paging_restriction.psi_6",
14817 FT_BOOLEAN, 8, TFS(&tfs_restricted_not_restricted), 0x40,
14818 NULL, HFILL }
14820 { &hf_nas_5gs_mm_paging_restriction_psi_5,
14821 { "PSI(5)", "nas-5gs.mm.paging_restriction.psi_5",
14822 FT_BOOLEAN, 8, TFS(&tfs_restricted_not_restricted), 0x20,
14823 NULL, HFILL }
14825 { &hf_nas_5gs_mm_paging_restriction_psi_4,
14826 { "PSI(4)", "nas-5gs.mm.paging_restriction.psi_4",
14827 FT_BOOLEAN, 8, TFS(&tfs_restricted_not_restricted), 0x10,
14828 NULL, HFILL }
14830 { &hf_nas_5gs_mm_paging_restriction_psi_3,
14831 { "PSI(3)", "nas-5gs.mm.paging_restriction.psi_3",
14832 FT_BOOLEAN, 8, TFS(&tfs_restricted_not_restricted), 0x08,
14833 NULL, HFILL }
14835 { &hf_nas_5gs_mm_paging_restriction_psi_2,
14836 { "PSI(2)", "nas-5gs.mm.paging_restriction.psi_2",
14837 FT_BOOLEAN, 8, TFS(&tfs_restricted_not_restricted), 0x04,
14838 NULL, HFILL }
14840 { &hf_nas_5gs_mm_paging_restriction_psi_1,
14841 { "PSI(1)", "nas-5gs.mm.paging_restriction.psi_1",
14842 FT_BOOLEAN, 8, TFS(&tfs_restricted_not_restricted), 0x02,
14843 NULL, HFILL }
14845 { &hf_nas_5gs_mm_paging_restriction_psi_0,
14846 { "PSI(0)", "nas-5gs.mm.paging_restriction.psi_0",
14847 FT_BOOLEAN, 8, TFS(&tfs_restricted_not_restricted), 0x01,
14848 NULL, HFILL }
14850 { &hf_nas_5gs_mm_paging_restriction_psi_15,
14851 { "PSI(15)", "nas-5gs.mm.paging_restriction.psi_15",
14852 FT_BOOLEAN, 8, TFS(&tfs_restricted_not_restricted), 0x80,
14853 NULL, HFILL }
14855 { &hf_nas_5gs_mm_paging_restriction_psi_14,
14856 { "PSI(14)", "nas-5gs.mm.paging_restriction.psi_14",
14857 FT_BOOLEAN, 8, TFS(&tfs_restricted_not_restricted), 0x40,
14858 NULL, HFILL }
14860 { &hf_nas_5gs_mm_paging_restriction_psi_13,
14861 { "PSI(13)", "nas-5gs.mm.paging_restriction.psi_13",
14862 FT_BOOLEAN, 8, TFS(&tfs_restricted_not_restricted), 0x20,
14863 NULL, HFILL }
14865 { &hf_nas_5gs_mm_paging_restriction_psi_12,
14866 { "PSI(12)", "nas-5gs.mm.paging_restriction.psi_12",
14867 FT_BOOLEAN, 8, TFS(&tfs_restricted_not_restricted), 0x10,
14868 NULL, HFILL }
14870 { &hf_nas_5gs_mm_paging_restriction_psi_11,
14871 { "PSI(11)", "nas-5gs.mm.paging_restriction.psi_11",
14872 FT_BOOLEAN, 8, TFS(&tfs_restricted_not_restricted), 0x08,
14873 NULL, HFILL }
14875 { &hf_nas_5gs_mm_paging_restriction_psi_10,
14876 { "PSI(10)", "nas-5gs.mm.paging_restriction.psi_10",
14877 FT_BOOLEAN, 8, TFS(&tfs_restricted_not_restricted), 0x04,
14878 NULL, HFILL }
14880 { &hf_nas_5gs_mm_paging_restriction_psi_9,
14881 { "PSI(9)", "nas-5gs.mm.paging_restriction.psi_9",
14882 FT_BOOLEAN, 8, TFS(&tfs_restricted_not_restricted), 0x02,
14883 NULL, HFILL }
14885 { &hf_nas_5gs_mm_paging_restriction_psi_8,
14886 { "PSI(8)", "nas-5gs.mm.paging_restriction.psi_8",
14887 FT_BOOLEAN, 8, TFS(&tfs_restricted_not_restricted), 0x01,
14888 NULL, HFILL }
14890 { &hf_nas_5gs_mm_nid_assign_mode,
14891 { "Assignment mode", "nas-5gs.mm.nid.assign_mode",
14892 FT_UINT8, BASE_HEX, NULL, 0x0f,
14893 NULL, HFILL }
14895 { &hf_nas_5gs_mm_nid_value,
14896 { "NID value", "nas-5gs.mm.nid.value",
14897 FT_STRING, BASE_NONE, NULL, 0x0,
14898 NULL, HFILL }
14900 { &hf_nas_5gs_mm_peips_assist_info_type,
14901 { "Type of information", "nas-5gs.mm.eips_assist_info.type",
14902 FT_UINT8, BASE_DEC, NULL, 0xe0,
14903 NULL, HFILL }
14905 { &hf_nas_5gs_mm_peips_assist_info_paging_subgroup_id,
14906 { "Paging subgroup ID", "nas-5gs.mm.eips_assist_info.paging_subgroup_id",
14907 FT_UINT8, BASE_DEC, NULL, 0x1f,
14908 NULL, HFILL }
14910 { &hf_nas_5gs_mm_peips_assist_info_ue_paging_probability_info,
14911 { "UE paging probability information", "nas-5gs.mm.eips_assist_info.ue_paging_probability_info",
14912 FT_UINT8, BASE_DEC|BASE_EXT_STRING, &nas_5gs_mm_peips_assist_info_ue_paging_probability_info_vals_ext, 0x1f,
14913 NULL, HFILL }
14915 { &hf_nas_5gs_mm_add_req_res_prd,
14916 { "Paging restriction decision (PRD)", "nas-5gs.mm.add_request_result.prd",
14917 FT_UINT8, BASE_DEC, VALS(nas_5gs_mm_add_req_res_prd_vals), 0x03,
14918 NULL, HFILL }
14920 { &hf_nas_5gs_mm_nssrg_info_len,
14921 { "Length of NSSRG values for S-NSSAI", "nas-5gs.mm.nssrg_info.len",
14922 FT_UINT8, BASE_DEC, NULL, 0x0,
14923 NULL, HFILL }
14925 { &hf_nas_5gs_mm_nssrg_info_s_nssai_len,
14926 { "S-NSSAI length", "nas-5gs.mm.nssrg_info.s_nssai_len",
14927 FT_UINT8, BASE_DEC, NULL, 0x0,
14928 NULL, HFILL }
14930 { &hf_nas_5gs_mm_nssrg_info_nssrg,
14931 { "NSSRG", "nas-5gs.mm.nssrg_info.nssrg",
14932 FT_UINT8, BASE_DEC, NULL, 0x0,
14933 NULL, HFILL }
14935 { &hf_nas_5gs_mm_nsag_info_len,
14936 { "Length of NSAG", "nas-5gs.mm.nsag_info.len",
14937 FT_UINT8, BASE_DEC, NULL, 0x0,
14938 NULL, HFILL }
14940 { &hf_nas_5gs_mm_nsag_id,
14941 { "NSAG identifier", "nas-5gs.mm.nsag_info.identifier",
14942 FT_UINT8, BASE_DEC, NULL, 0x0,
14943 NULL, HFILL }
14945 { &hf_nas_5gs_mm_nsag_info_s_nssai_len,
14946 { "Length of S-NSSAI list of NSAG", "nas-5gs.mm.nsag_info.s_nssai_len",
14947 FT_UINT8, BASE_DEC, NULL, 0x0,
14948 NULL, HFILL }
14950 { &hf_nas_5gs_mm_nsag_prio,
14951 { "NSAG priority", "nas-5gs.mm.nsag_info.priority",
14952 FT_UINT8, BASE_DEC, NULL, 0x0,
14953 NULL, HFILL }
14955 { &hf_nas_5gs_mm_nsag_tais_list_len,
14956 { "TAIs list length", "nas-5gs.mm.nsag_info.tais_list_len",
14957 FT_UINT8, BASE_DEC, NULL, 0x0,
14958 NULL, HFILL }
14960 { &hf_nas_5gs_mm_prose_relay_trans_id,
14961 { "ProSe relay transaction identity", "nas-5gs.mm.prose_relay_trans_id",
14962 FT_UINT8, BASE_CUSTOM, CF_FUNC(nas_5gs_mm_prose_relay_trans_id), 0,
14963 NULL, HFILL }
14965 { &hf_nas_5gs_mm_relay_key_req_params_relay_service_code,
14966 { "Relay service code", "nas-5gs.mm.relay_key_req_params.relay_service_code",
14967 FT_UINT24, BASE_DEC, NULL, 0,
14968 NULL, HFILL }
14970 { &hf_nas_5gs_mm_relay_key_req_params_nonce_1,
14971 { "Nonce_1", "nas-5gs.mm.relay_key_req_params.nonce_1",
14972 FT_BYTES, BASE_NONE, NULL, 0,
14973 NULL, HFILL }
14975 { &hf_nas_5gs_mm_relay_key_req_params_uit,
14976 { "UE ID type (UIT)", "nas-5gs.mm.relay_key_req_params.uit",
14977 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_mm_relay_key_req_params_uit), 0x01,
14978 NULL, HFILL }
14980 { &hf_nas_5gs_mm_relay_key_req_params_ue_id,
14981 { "UE identity", "nas-5gs.mm.relay_key_req_params.ue_id",
14982 FT_BYTES, BASE_NONE, NULL, 0,
14983 NULL, HFILL }
14985 { &hf_nas_5gs_mm_relay_key_resp_params_key_knr_prose,
14986 { "Key KNR_ProSe", "nas-5gs.mm.relay_key_resp_params.key_knr_prose",
14987 FT_BYTES, BASE_NONE, NULL, 0x0,
14988 NULL, HFILL }
14990 { &hf_nas_5gs_mm_relay_key_resp_params_nonce_2,
14991 { "Nonce_2", "nas-5gs.mm.relay_key_resp_params.nonce_2",
14992 FT_BYTES, BASE_NONE, NULL, 0x0,
14993 NULL, HFILL }
14995 { &hf_nas_5gs_mm_relay_key_resp_params_cp_pruk_id,
14996 { "CP-PRUK ID", "nas-5gs.mm.relay_key_resp_params.cp_pruk_id",
14997 FT_BYTES, BASE_NONE, NULL, 0x0,
14998 NULL, HFILL }
15000 { &hf_nas_5gs_mm_prio_ind_mcsi,
15001 { "MCS indicator (MCSI)", "nas-5gs.mm.priority_indicator.mcsi",
15002 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_mm_prio_ind_mcsi), 0x02,
15003 NULL, HFILL }
15005 { &hf_nas_5gs_mm_prio_ind_mpsi,
15006 { "MPS indicator (MPSI)", "nas-5gs.mm.priority_indicator.mpsi",
15007 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_mm_prio_ind_mpsi), 0x01,
15008 NULL, HFILL }
15010 { &hf_nas_5gs_mm_n3iwf_id_type,
15011 { "N3IWF identifier type", "nas-5gs.mm.n3iwf_id.type",
15012 FT_UINT8, BASE_DEC, VALS(nas_5gs_mm_n3iwf_id_type_vals), 0x0,
15013 NULL, HFILL }
15015 { &hf_nas_5gs_mm_n3iwf_id_ipv4,
15016 { "N3IWF address IPv4", "nas-5gs.mm.n3iwf_id.ipv4",
15017 FT_IPv4, BASE_NONE, NULL, 0x0,
15018 NULL, HFILL }
15020 { &hf_nas_5gs_mm_n3iwf_id_ipv6,
15021 { "N3IWF address IPv6", "nas-5gs.mm.n3iwf_id.ipv6",
15022 FT_IPv6, BASE_NONE, NULL, 0x0,
15023 NULL, HFILL }
15025 { &hf_nas_5gs_mm_n3iwf_id_fqdn,
15026 { "N3IWF address FQDN", "nas-5gs.mm.n3iwf_id.fqdn",
15027 FT_STRING, BASE_NONE, NULL, 0x0,
15028 NULL, HFILL }
15030 { &hf_nas_5gs_mm_tnan_info_ssid_ind,
15031 { "SSID indication", "nas-5gs.mm.tnan_info.ssid_ind",
15032 FT_BOOLEAN, 8, TFS(&tfs_included_not_included), 0x02,
15033 NULL, HFILL }
15035 { &hf_nas_5gs_mm_tnan_info_tngf_id_ind,
15036 { "TNGF ID indication", "nas-5gs.mm.tnan_info.tngf_id_ind",
15037 FT_BOOLEAN, 8, TFS(&tfs_included_not_included), 0x01,
15038 NULL, HFILL }
15040 { &hf_nas_5gs_mm_tnan_info_tngf_id_len,
15041 { "TNGF ID length", "nas-5gs.mm.tnan_info.tngf_id_len",
15042 FT_UINT8, BASE_DEC, NULL, 0x0,
15043 NULL, HFILL }
15045 { &hf_nas_5gs_mm_tnan_info_tngf_id,
15046 { "TNGF ID", "nas-5gs.mm.tnan_info.tngf_id",
15047 FT_BYTES, BASE_SHOW_UTF_8_PRINTABLE, NULL, 0x0,
15048 NULL, HFILL }
15050 { &hf_nas_5gs_mm_tnan_info_ssid_len,
15051 { "SSID length", "nas-5gs.mm.tnan_info.ssid_len",
15052 FT_UINT8, BASE_DEC, NULL, 0x0,
15053 NULL, HFILL }
15055 { &hf_nas_5gs_mm_tnan_info_ssid,
15056 { "SSID", "nas-5gs.mm.tnan_info.ssid",
15057 FT_BYTES, BASE_SHOW_UTF_8_PRINTABLE, NULL, 0x0,
15058 NULL, HFILL }
15060 { &hf_nas_5gs_mm_ran_timing_sync_recreq,
15061 { "RecReq", "nas-5gs.mm.ran_timing_sync.recreq",
15062 FT_BOOLEAN, 8, TFS(&tfs_requested_not_requested), 0x01,
15063 NULL, HFILL }
15065 { &hf_nas_5gs_mm_n3gpp_acc_path_switch_ind_naps,
15066 { "Non-3GPP access path switching (NAPS)", "nas-5gs.mm.n3gpp_acc_path_switch_ind.naps",
15067 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
15068 NULL, HFILL }
15070 { &hf_nas_5gs_mm_s_nssai_loc_valid_info_per_s_nssai_len,
15071 { "Length of Per-S-NSSAI location validity information for S-NSSAI", "nas-5gs.mm.s_nssai_loc_valid_info.per_s_nssai_len",
15072 FT_UINT16, BASE_DEC, NULL, 0x0,
15073 NULL, HFILL }
15075 { &hf_nas_5gs_mm_s_nssai_loc_valid_info_per_s_nssai_nb_nr_cgi,
15076 { "Number of NR CGIs", "nas-5gs.mm.s_nssai_loc_valid_info.nb_nr_cgi",
15077 FT_UINT8, BASE_DEC, NULL, 0x0,
15078 NULL, HFILL }
15080 { &hf_nas_5gs_mm_s_nssai_loc_valid_info_per_s_nssai_nr_cell_id,
15081 { "NR Cell ID", "nas-5gs.mm.s_nssai_loc_valid_info.nr_cell_id",
15082 FT_UINT40, BASE_HEX, NULL, 0x0,
15083 NULL, HFILL }
15085 { &hf_nas_5gs_mm_s_nssai_time_valid_info_per_s_nssai_len,
15086 { "Length of Per-S-NSSAI time validity information for S-NSSAI", "nas-5gs.mm.s_nssai_time_valid_info.per_s_nssai_len",
15087 FT_UINT8, BASE_DEC, NULL, 0x0,
15088 NULL, HFILL }
15090 { &hf_nas_5gs_mm_s_nssai_time_valid_info_time_window_len,
15091 { "Length of Time window", "nas-5gs.mm.s_nssai_time_valid_info.time_window_len",
15092 FT_UINT8, BASE_DEC, NULL, 0x0,
15093 NULL, HFILL }
15095 { &hf_nas_5gs_mm_s_nssai_time_valid_info_time_window_start_time,
15096 { "Start time", "nas-5gs.mm.s_nssai_time_valid_info.time_window_start_time",
15097 FT_UINT64, BASE_HEX, NULL, 0x0,
15098 NULL, HFILL }
15100 { &hf_nas_5gs_mm_s_nssai_time_valid_info_time_window_stop_time,
15101 { "Stop time", "nas-5gs.mm.s_nssai_time_valid_info.time_window_stop_time",
15102 FT_UINT64, BASE_HEX, NULL, 0x0,
15103 NULL, HFILL }
15105 { &hf_nas_5gs_mm_s_nssai_time_valid_info_time_window_recurrence_pattern,
15106 { "Recurrence pattern", "nas-5gs.mm.s_nssai_time_valid_info.time_window_recurrence_pattern",
15107 FT_UINT8, BASE_DEC, VALS(nas_5gs_mm_s_nssai_time_valid_info_time_window_recurrence_pattern_vals), 0x0f,
15108 NULL, HFILL }
15110 { &hf_nas_5gs_mm_s_nssai_time_valid_info_time_window_recurrence_end_time,
15111 { "Recurrence end time", "nas-5gs.mm.s_nssai_time_valid_info.recurrence_end_time",
15112 FT_UINT64, BASE_HEX, NULL, 0x0,
15113 NULL, HFILL }
15115 { &hf_nas_5gs_mm_n3gpp_path_switch_info_nsonr,
15116 { "Non-3GPP path switching while using old non-3GPP resources (NSONR)", "nas-5gs.mm.n3gpp_path_switch_info.nsonr",
15117 FT_BOOLEAN, 8, TFS(&tfs_requested_not_requested), 0x01,
15118 NULL, HFILL }
15120 { &hf_nas_5gs_mm_au3n_ind_aun3reg,
15121 { "AUN3 device registration (AUN3REG)", "nas-5gs.mm.au3n_ind.aun3reg",
15122 FT_BOOLEAN, 8, TFS(&tfs_requested_not_requested), 0x01,
15123 NULL, HFILL }
15125 { &hf_nas_5gs_mm_feat_auth_ind_mbsrai,
15126 { "MBSR authorization indication (MBSRAI)", "nas-5gs.mm.feat_auth_ind.mbsrai",
15127 FT_UINT8, BASE_DEC, VALS(nas_5gs_mm_feat_auth_ind_mbsrai_vals), 0x03,
15128 NULL, HFILL }
15130 { &hf_nas_5gs_mm_payload_cont_info_pru,
15131 { "PRU related content (PRU)", "nas-5gs.mm.payload_cont_info.pru",
15132 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_mm_payload_cont_info_pru), 0x01,
15133 NULL, HFILL }
15135 { &hf_nas_5gs_mm_aun3_device_sec_key_askt,
15136 { "AUN3 device security key type (ASKT)", "nas-5gs.mm.aun3_device_sec_key.askt",
15137 FT_UINT8, BASE_DEC, VALS(nas_5gs_mm_aun3_device_sec_key_askt_vals), 0x03,
15138 NULL, HFILL }
15140 { &hf_nas_5gs_mm_aun3_device_sec_key_key_len,
15141 { "Length of key content", "nas-5gs.mm.aun3_device_sec_key.key_len",
15142 FT_UINT8, BASE_DEC, NULL, 0x0,
15143 NULL, HFILL }
15145 { &hf_nas_5gs_mm_aun3_device_sec_key_key,
15146 { "Key content", "nas-5gs.mm.aun3_device_sec_key.key",
15147 FT_BYTES, BASE_NONE, NULL, 0x0,
15148 NULL, HFILL }
15150 { &hf_nas_5gs_mm_on_demand_nssai_len,
15151 { "Length of Information of on-demand S-NSSAI", "nas-5gs.mm.on_demand_nssai.len",
15152 FT_UINT8, BASE_DEC, NULL, 0x0,
15153 NULL, HFILL }
15155 { &hf_nas_5gs_mm_on_demand_nssai_slice_dereg_inactiv_timer,
15156 { "Slice deregistration inactivity timer", "nas-5gs.mm.on_demand_nssai.slice_dereg_inactiv_timer",
15157 FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_seconds), 0x0,
15158 NULL, HFILL }
15160 { &hf_nas_5gs_mm_ext_5gmm_cause_sat_nr,
15161 { "PRU related content (PRU)", "nas-5gs.mm.ext_5gmm_cause.sat_nr",
15162 FT_BOOLEAN, 8, TFS(&tfs_nas_5gs_mm_ext_5gmm_cause_sat_nr), 0x01,
15163 NULL, HFILL }
15165 { &hf_nas_5gs_ue_os_id,
15166 { "UE OS ID UUID", "nas-5gs.ue_os_id",
15167 FT_GUID, BASE_NONE, NULL, 0x0,
15168 NULL, HFILL }
15172 unsigned i;
15173 unsigned last_offset;
15175 /* Setup protocol subtree array */
15176 #define NUM_INDIVIDUAL_ELEMS 53
15177 int *ett[NUM_INDIVIDUAL_ELEMS +
15178 NUM_NAS_5GS_COMMON_ELEM +
15179 NUM_NAS_5GS_MM_MSG + NUM_NAS_5GS_MM_ELEM +
15180 NUM_NAS_5GS_SM_MSG + NUM_NAS_5GS_SM_ELEM +
15181 NUM_NAS_5GS_UPDP_MSG + NUM_NAS_5GS_UPDP_ELEM
15184 ett[0] = &ett_nas_5gs;
15185 ett[1] = &ett_nas_5gs_mm_nssai;
15186 ett[2] = &ett_nas_5gs_mm_pdu_ses_id;
15187 ett[3] = &ett_nas_5gs_sm_qos_rules;
15188 ett[4] = &ett_nas_5gs_sm_qos_params;
15189 ett[5] = &ett_nas_5gs_plain;
15190 ett[6] = &ett_nas_5gs_sec;
15191 ett[7] = &ett_nas_5gs_mm_part_sal;
15192 ett[8] = &ett_nas_5gs_mm_part_tal;
15193 ett[9] = &ett_nas_5gs_sm_mapd_eps_b_cont;
15194 ett[10] = &ett_nas_5gs_sm_mapd_eps_b_cont_params_list;
15195 ett[11] = &ett_nas_5gs_enc;
15196 ett[12] = &ett_nas_5gs_mm_ladn_indic;
15197 ett[13] = &ett_nas_5gs_mm_sor;
15198 ett[14] = &ett_nas_5gs_sm_pkt_filter_components;
15199 ett[15] = &ett_nas_5gs_updp_ue_policy_section_mgm_lst;
15200 ett[16] = &ett_nas_5gs_updp_ue_policy_section_mgm_sublst;
15201 ett[17] = &ett_nas_5gs_ue_policies_ursp;
15202 ett[18] = &ett_nas_5gs_ursp_traff_desc;
15203 ett[19] = &ett_nas_5gs_usrp_r_sel_list;
15204 ett[20] = &ett_nas_5gs_usrp_r_sel;
15205 ett[21] = &ett_nas_5gs_ursp_r_sel_desc_cont;
15206 ett[22] = &ett_nas_5gs_updp_upsi_list;
15207 ett[23] = &ett_nas_5gs_mm_rej_nssai;
15208 ett[24] = &ett_nas_5gs_mm_scheme_output;
15209 ett[25] = &ett_nas_5gs_mm_pld_cont_pld_entry;
15210 ett[26] = &ett_nas_5gs_mm_pld_cont_opt_ie;
15211 ett[27] = &ett_nas_5gs_mm_cag_info_entry;
15212 ett[28] = &ett_nas_5gs_ciot_small_data_cont_data_contents;
15213 ett[29] = &ett_nas_5gs_user_data_cont;
15214 ett[30] = &ett_nas_5gs_ciph_data_set;
15215 ett[31] = &ett_nas_5gs_mm_mapped_nssai;
15216 ett[32] = &ett_nas_5gs_mm_partial_extended_rejected_nssai_list;
15217 ett[33] = &ett_nas_5gs_mm_ext_rej_nssai_back_off_timer;
15218 ett[34] = &ett_nas_5gs_mm_ext_rej_nssai;
15219 ett[35] = &ett_nas_5gs_mm_op_def_acc_cat_def;
15220 ett[36] = &ett_nas_5gs_mm_op_def_acc_cat_criteria_component;
15221 ett[37] = &ett_nas_5gs_mm_op_def_acc_cat_criteria;
15222 ett[38] = &ett_nas_5gs_cmn_service_level_aa_cont_param;
15223 ett[39] = &ett_nas_5gs_mm_pld_cont_event_notif_ind;
15224 ett[40] = &ett_nas_5gs_mm_peips_assist_info;
15225 ett[41] = &ett_nas_5gs_mm_nssrg_info;
15226 ett[42] = &ett_nas_5gs_mm_plmns_list_disaster_cond;
15227 ett[43] = &ett_nas_5gs_mm_reg_wait_range;
15228 ett[44] = &ett_nas_5gs_mm_nsag_info;
15229 ett[45] = &ett_nas_5gs_mm_snpn_list;
15230 ett[46] = &ett_nas_5gs_mm_ext_ladn_info;
15231 ett[47] = &ett_nas_5gs_mm_alt_nssai;
15232 ett[48] = &ett_nas_5gs_mm_alt_nssai_replaced;
15233 ett[49] = &ett_nas_5gs_mm_alt_nssai_alternative;
15234 ett[50] = &ett_nas_5gs_mm_s_nssai_loc_valid_info;
15235 ett[51] = &ett_nas_5gs_mm_s_nssai_time_valid_info;
15236 ett[52] = &ett_nas_5gs_mm_on_demand_nssai;
15238 last_offset = NUM_INDIVIDUAL_ELEMS;
15240 for (i = 0; i < NUM_NAS_5GS_COMMON_ELEM; i++, last_offset++)
15242 ett[last_offset] = &ett_nas_5gs_common_elem[i];
15245 /* MM */
15246 for (i = 0; i < NUM_NAS_5GS_MM_MSG; i++, last_offset++)
15248 ett[last_offset] = &ett_nas_5gs_mm_msg[i];
15251 for (i = 0; i < NUM_NAS_5GS_MM_ELEM; i++, last_offset++)
15253 ett[last_offset] = &ett_nas_5gs_mm_elem[i];
15256 for (i = 0; i < NUM_NAS_5GS_SM_MSG; i++, last_offset++)
15258 ett[last_offset] = &ett_nas_5gs_sm_msg[i];
15261 for (i = 0; i < NUM_NAS_5GS_SM_ELEM; i++, last_offset++)
15263 ett[last_offset] = &ett_nas_5gs_sm_elem[i];
15266 for (i = 0; i < NUM_NAS_5GS_UPDP_MSG; i++, last_offset++)
15268 ett[last_offset] = &ett_nas_5gs_updp_msg[i];
15271 for (i = 0; i < NUM_NAS_5GS_UPDP_ELEM; i++, last_offset++)
15273 ett[last_offset] = &ett_nas_5gs_updp_elem[i];
15276 static ei_register_info ei[] = {
15277 { &ei_nas_5gs_extraneous_data, { "nas-5gs.extraneous_data", PI_PROTOCOL, PI_NOTE, "Extraneous Data, dissector bug or later version spec(report to wireshark.org)", EXPFILL }},
15278 { &ei_nas_5gs_unknown_pd,{ "nas-5gs.unknown_pd", PI_PROTOCOL, PI_ERROR, "Unknown protocol discriminator", EXPFILL } },
15279 { &ei_nas_5gs_mm_unknown_msg_type,{ "nas-5gs.mm.unknown_msg_type", PI_PROTOCOL, PI_WARN, "Unknown Message Type", EXPFILL } },
15280 { &ei_nas_5gs_sm_unknown_msg_type,{ "nas-5gs.sm.unknown_msg_type", PI_PROTOCOL, PI_WARN, "Unknown Message Type", EXPFILL } },
15281 { &ei_nas_5gs_updp_unknown_msg_type,{ "nas-5gs.updp.unknown_msg_type", PI_PROTOCOL, PI_WARN, "Unknown Message Type", EXPFILL } },
15282 { &ei_nas_5gs_msg_not_dis,{ "nas-5gs.msg_not_dis", PI_PROTOCOL, PI_WARN, "MSG IEs not dissected yet", EXPFILL } },
15283 { &ei_nas_5gs_ie_not_dis,{ "nas-5gs.ie_not_dis", PI_PROTOCOL, PI_WARN, "IE not dissected yet", EXPFILL } },
15284 { &ei_nas_5gs_missing_mandatory_element,{ "nas-5gs.missing_mandatory_element", PI_PROTOCOL, PI_ERROR, "Missing Mandatory element, rest of dissection is suspect", EXPFILL } },
15285 { &ei_nas_5gs_dnn_too_long,{ "nas-5gs.dnn_too_long", PI_PROTOCOL, PI_ERROR, "DNN encoding has more than 100 octets", EXPFILL } },
15286 { &ei_nas_5gs_unknown_value,{ "nas-5gs.unknown_value", PI_PROTOCOL, PI_ERROR, "Value not according to (decoded)specification", EXPFILL } },
15287 { &ei_nas_5gs_num_pkt_flt,{ "nas-5gs.num_pkt_flt", PI_PROTOCOL, PI_ERROR, "num_pkt_flt != 0", EXPFILL } },
15288 { &ei_nas_5gs_not_diss,{ "nas-5gs.not_diss", PI_PROTOCOL, PI_NOTE, "Not dissected yet", EXPFILL } },
15291 expert_module_t* expert_nas_5gs;
15292 module_t *nas_5GS_module;
15294 /* Register protocol */
15295 proto_nas_5gs = proto_register_protocol(PNAME, PSNAME, PFNAME);
15296 /* Register fields and subtrees */
15297 proto_register_field_array(proto_nas_5gs, hf, array_length(hf));
15298 proto_register_subtree_array(ett, array_length(ett));
15299 expert_nas_5gs = expert_register_protocol(proto_nas_5gs);
15300 expert_register_field_array(expert_nas_5gs, ei, array_length(ei));
15302 /* Backward compatibility with old filters name */
15303 proto_register_alias(proto_nas_5gs, "nas_5gs");
15305 /* Register dissector */
15306 nas_5gs_handle = register_dissector(PFNAME, dissect_nas_5gs, proto_nas_5gs);
15308 nas_5GS_module = prefs_register_protocol(proto_nas_5gs, proto_reg_handoff_nas_5gs);
15310 prefs_register_bool_preference(nas_5GS_module,
15311 "null_decipher",
15312 "Try to detect and decode 5G-EA0 ciphered messages",
15313 "This should work when the NAS ciphering algorithm is NULL (5G-EEA0)",
15314 &g_nas_5gs_null_decipher);
15316 prefs_register_enum_preference(nas_5GS_module, "decode_user_data_container_as",
15317 "Try to decode User Data Container content as",
15318 NULL,
15319 &g_nas_5gs_decode_user_data_container_as,
15320 nas_5gs_user_data_container_as_vals, false);
15322 prefs_register_dissector_preference(nas_5GS_module, "non_ip_data_dissector",
15323 "Dissector name for non IP data", NULL,
15324 &g_nas_5gs_non_ip_data_dissector);
15327 void
15328 proto_reg_handoff_nas_5gs(void)
15330 static bool initialized = false;
15332 if (!initialized) {
15333 heur_dissector_add("udp", dissect_nas_5gs_heur, "NAS-5GS over UDP", "nas_5gs_udp", proto_nas_5gs, HEURISTIC_DISABLE);
15334 eap_handle = find_dissector("eap");
15335 nas_eps_handle = find_dissector("nas-eps");
15336 lpp_handle = find_dissector("lpp");
15337 gsm_a_dtap_handle = find_dissector("gsm_a_dtap");
15338 ipv4_handle = find_dissector("ip");
15339 ipv6_handle = find_dissector("ipv6");
15340 ethernet_handle = find_dissector("eth_withoutfcs");
15341 dissector_add_string("media_type", "application/vnd.3gpp.5gnas", create_dissector_handle(dissect_nas_5gs_media_type, proto_nas_5gs));
15342 dissector_add_for_decode_as("tcp.port", create_dissector_handle(dissect_nas_5gs_tcp, proto_nas_5gs));
15343 proto_json = proto_get_id_by_filter_name("json");
15344 initialized = true;
15346 if (g_nas_5gs_non_ip_data_dissector[0] != '\0') {
15347 non_ip_data_handle = find_dissector(g_nas_5gs_non_ip_data_dissector);
15348 } else {
15349 non_ip_data_handle = NULL;
15354 * Editor modelines
15356 * Local Variables:
15357 * c-basic-offset: 4
15358 * tab-width: 8
15359 * indent-tabs-mode: nil
15360 * End:
15362 * ex: set shiftwidth=4 tabstop=8 expandtab:
15363 * :indentSize=4:tabSize=8:noTabs=true: