3 * Routines for Packet Forwarding Control Protocol (PFCP) dissection
5 * Copyright 2017, Anders Broman <anders.broman@ericsson.com>
7 * Wireshark - Network traffic analyzer
8 * By Gerald Combs <gerald@wireshark.org>
9 * Copyright 1998 Gerald Combs
11 * SPDX-License-Identifier: GPL-2.0-or-later
13 * Ref 3GPP TS 29.244 V14.1.0 (2017-09)
17 #include <epan/packet.h>
18 #include <epan/expert.h>
19 #include <epan/sminmpec.h>
20 #include <epan/addr_resolv.h> /* Needed for BASE_ENTERPRISES */
22 #include "packet-ntp.h"
24 void proto_register_pfcp(void);
25 void proto_reg_handoff_pfcp(void);
27 static dissector_handle_t pfcp_handle;
28 static dissector_handle_t pfcp_3gpp_ies_handle;
30 #define UDP_PORT_PFCP 8805
32 static int proto_pfcp = -1;
34 static int hf_pfcp_msg_type = -1;
35 static int hf_pfcp_msg_length = -1;
36 static int hf_pfcp_hdr_flags = -1;
37 static int hf_pfcp_version = -1;
38 static int hf_pfcp_mp_flag = -1;
39 static int hf_pfcp_s_flag = -1;
40 static int hf_pfcp_seid = -1;
41 static int hf_pfcp_seqno = -1;
42 static int hf_pfcp_mp = -1;
44 static int hf_pfcp2_ie = -1;
45 static int hf_pfcp2_ie_len = -1;
46 static int hf_pfcp2_enterprise_ie = -1;
47 static int hf_pfcp_enterprice_id = -1;
49 static int hf_pfcp_spare_b2 = -1;
50 static int hf_pfcp_spare_b3 = -1;
51 static int hf_pfcp_spare_b4 = -1;
52 static int hf_pfcp_spare_b5 = -1;
53 static int hf_pfcp_spare_b6 = -1;
54 static int hf_pfcp_spare_b7 = -1;
55 static int hf_pfcp_spare_b7_b6 = -1;
56 static int hf_pfcp_spare_b7_b5 = -1;
57 static int hf_pfcp_spare_b7_b4 = -1;
58 static int hf_pfcp_spare_b7_b3 = -1;
59 static int hf_pfcp_spare_b7_b2 = -1;
60 static int hf_pfcp_spare_b7_b1 = -1;
61 static int hf_pfcp_spare_h0 = -1;
62 static int hf_pfcp_spare_h1 = -1;
63 static int hf_pfcp_spare_oct = -1;
64 static int hf_pfcp_spare = -1;
66 static int hf_pfcp2_cause = -1;
67 static int hf_pfcp_node_id_type = -1;
68 static int hf_pfcp_node_id_ipv4 = -1;
69 static int hf_pfcp_node_id_ipv6 = -1;
70 static int hf_pfcp_node_id_fqdn = -1;
71 static int hf_pfcp_recovery_time_stamp = -1;
72 static int hf_pfcp_f_seid_flags = -1;
73 static int hf_pfcp_b0_v6 = -1;
74 static int hf_pfcp_b1_v4 = -1;
75 static int hf_pfcp_f_seid_ipv4 = -1;
76 static int hf_pfcp_f_seid_ipv6 = -1;
77 static int hf_pfcp_pdr_id = -1;
78 static int hf_pfcp_precedence = -1;
79 static int hf_pfcp_source_interface = -1;
80 static int hf_pfcp_f_teid_flags = -1;
81 static int hf_pfcp_fteid_flg_spare = -1;
82 static int hf_pfcp_fteid_flg_b3_ch_id = -1;
83 static int hf_pfcp_fteid_flg_b2_ch = -1;
84 static int hf_pfcp_fteid_flg_b1_v6 = -1;
85 static int hf_pfcp_fteid_flg_b0_v4 = -1;
86 static int hf_pfcp_f_teid_ch_id = -1;
87 static int hf_pfcp_f_teid_teid = -1;
88 static int hf_pfcp_f_teid_ipv4 = -1;
89 static int hf_pfcp_f_teid_ipv6 = -1;
90 static int hf_pfcp_network_instance = -1;
91 static int hf_pfcp_pdn_type = -1;
92 static int hf_pfcp_failed_rule_id_type = -1;
93 static int hf_pfcp_time_qouta_mechanism_bti_type = -1;
94 static int hf_pfcp_time_qouta_mechanism_bti = -1;
95 static int hf_pfcp_ue_ip_address_flags = -1;
96 static int hf_pfcp_ue_ip_address_flag_b0_v6 = -1;
97 static int hf_pfcp_ue_ip_address_flag_b1_v4 = -1;
98 static int hf_pfcp_ue_ip_address_flag_b2_sd = -1;
99 static int hf_pfcp_ue_ip_addr_ipv4 = -1;
100 static int hf_pfcp_ue_ip_add_ipv6 = -1;
101 static int hf_pfcp_application_id = -1;
102 static int hf_pfcp_sdf_filter_flags = -1;
103 static int hf_pfcp_sdf_filter_b0_fd = -1;
104 static int hf_pfcp_sdf_filter_b1_ttc = -1;
105 static int hf_pfcp_sdf_filter_b2_spi = -1;
106 static int hf_pfcp_sdf_filter_b3_fl = -1;
107 static int hf_pfcp_flow_desc_len = -1;
108 static int hf_pfcp_fd = -1;
109 static int hf_pfcp_ttc = -1;
110 static int hf_pfcp_spi = -1;
111 static int hf_pfcp_fl = -1;
112 static int hf_pfcp_out_hdr_desc = -1;
113 static int hf_pfcp_far_id_flg = -1;
114 static int hf_pfcp_far_id = -1;
115 static int hf_pfcp_urr_id_flg = -1;
116 static int hf_pfcp_urr_id = -1;
117 static int hf_pfcp_qer_id_flg = -1;
118 static int hf_pfcp_qer_id = -1;
119 static int hf_pfcp_predef_rules_name = -1;
120 static int hf_pfcp_apply_action_flags = -1;
121 static int hf_pfcp_apply_action_b4_dupl = -1;
122 static int hf_pfcp_apply_action_b3_nocp = -1;
123 static int hf_pfcp_apply_action_b2_buff = -1;
124 static int hf_pfcp_apply_action_b1_forw = -1;
125 static int hf_pfcp_apply_action_b0_drop = -1;
126 static int hf_pfcp_bar_id = -1;
127 static int hf_pfcp_fq_csid_node_id_type = -1;
128 static int hf_pfcp_num_csid = -1;
129 static int hf_pfcp_fq_csid_node_id_ipv4 = -1;
130 static int hf_pfcp_fq_csid_node_id_ipv6 = -1;
131 static int hf_pfcp_fq_csid_node_id_mcc_mnc = -1;
132 static int hf_pfcp_fq_csid_node_id_int = -1;
133 static int hf_pfcp_fq_csid = -1;
134 static int hf_pfcp_measurement_period = -1;
135 static int hf_pfcp_duration_measurement = -1;
136 static int hf_pfcp_time_of_first_packet = -1;
137 static int hf_pfcp_time_of_last_packet = -1;
138 static int hf_pfcp_dst_interface = -1;
139 static int hf_pfcp_redirect_address_type = -1;
140 static int hf_pfcp_redirect_server_addr_len = -1;
141 static int hf_pfcp_redirect_server_address = -1;
142 static int hf_pfcp_linked_urr_id = -1;
143 static int hf_pfcp_outer_hdr_desc = -1;
144 static int hf_pfcp_outer_hdr_creation_teid = -1;
145 static int hf_pfcp_outer_hdr_creation_ipv4 = -1;
146 static int hf_pfcp_outer_hdr_creation_ipv6 = -1;
147 static int hf_pfcp_outer_hdr_creation_port = -1;
148 static int hf_pfcp_tos_traf_class = -1;
149 static int hf_pfcp_time_threshold = -1;
150 static int hf_pfcp_forwarding_policy_id_len = -1;
151 static int hf_pfcp_forwarding_policy_id = -1;
152 static int hf_pfcp_measurement_method_flags = -1;
153 static int hf_pfcp_b0_durat = -1;
154 static int hf_pfcp_b1_volume = -1;
155 static int hf_pfcp_b2_event = -1;
156 static int hf_pfcp_subsequent_time_threshold = -1;
157 static int hf_pfcp_inactivity_detection_time = -1;
158 static int hf_pfcp_monitoring_time = -1;
160 static int hf_pfcp_reporting_triggers = -1;
161 static int hf_pfcp_reporting_triggers_b15_liusa = -1;
162 static int hf_pfcp_reporting_triggers_b14_droth = -1;
163 static int hf_pfcp_reporting_triggers_b13_stopt = -1;
164 static int hf_pfcp_reporting_triggers_b12_start = -1;
165 static int hf_pfcp_reporting_triggers_b11_quhti = -1;
166 static int hf_pfcp_reporting_triggers_b10_timth = -1;
167 static int hf_pfcp_reporting_triggers_b9_volth = -1;
168 static int hf_pfcp_reporting_triggers_b8_perio = -1;
169 static int hf_pfcp_reporting_triggers_b7_b3_spare = -1;
170 static int hf_pfcp_reporting_triggers_b2_envcl = -1;
171 static int hf_pfcp_reporting_triggers_b1_timqu = -1;
172 static int hf_pfcp_reporting_triggers_b0_volqu = -1;
174 static int hf_pfcp_volume_threshold = -1;
175 static int hf_pfcp_b2_dlvol = -1;
176 static int hf_pfcp_b1_ulvol = -1;
177 static int hf_pfcp_b0_tovol = -1;
178 static int hf_pfcp_volume_threshold_tovol = -1;
179 static int hf_pfcp_volume_threshold_ulvol = -1;
180 static int hf_pfcp_volume_threshold_dlvol = -1;
182 static int hf_pfcp_volume_quota = -1;
183 static int hf_pfcp_volume_quota_tovol = -1;
184 static int hf_pfcp_volume_quota_ulvol = -1;
185 static int hf_pfcp_volume_quota_dlvol = -1;
187 static int hf_pfcp_subseq_volume_threshold = -1;
188 static int hf_pfcp_subseq_volume_threshold_b2_dlvol = -1;
189 static int hf_pfcp_subseq_volume_threshold_b1_ulvol = -1;
190 static int hf_pfcp_subseq_volume_threshold_b0_tovol = -1;
191 static int hf_pfcp_subseq_volume_threshold_tovol = -1;
192 static int hf_pfcp_subseq_volume_threshold_ulvol = -1;
193 static int hf_pfcp_subseq_volume_threshold_dlvol = -1;
194 static int hf_pfcp_time_quota = -1;
195 static int hf_pfcp_start_time = -1;
196 static int hf_pfcp_end_time = -1;
197 static int hf_pfcp_quota_holding_time = -1;
198 static int hf_pfcp_dropped_dl_traffic_threshold = -1;
199 static int hf_pfcp_dropped_dl_traffic_threshold_b0_dlpa = -1;
200 static int hf_pfcp_downlink_packets = -1;
201 static int hf_pfcp_qer_correlation_id = -1;
202 static int hf_pfcp_gate_status = -1;
203 static int hf_pfcp_gate_status_b0b1_dlgate = -1;
204 static int hf_pfcp_gate_status_b3b2_ulgate = -1;
205 static int hf_pfcp_ul_mbr = -1;
206 static int hf_pfcp_dl_mbr = -1;
207 static int hf_pfcp_ul_gbr = -1;
208 static int hf_pfcp_dl_gbr = -1;
209 static int hf_pfcp_report_type = -1;
210 static int hf_pfcp_b2_erir = -1;
211 static int hf_pfcp_b1_usar = -1;
212 static int hf_pfcp_b0_dldr = -1;
213 static int hf_pfcp_offending_ie = -1;
215 static int hf_pfcp_up_function_features = -1;
216 static int hf_pfcp_b1_b7_spare = -1;
217 static int hf_pfcp_b0_empu = -1;
218 static int hf_pfcp_b15_treu = -1;
219 static int hf_pfcp_b14_heeu = -1;
220 static int hf_pfcp_b13_pfdm = -1;
221 static int hf_pfcp_b12_ftup = -1;
222 static int hf_pfcp_b11_trst = -1;
223 static int hf_pfcp_b10_dlbd = -1;
224 static int hf_pfcp_b9_ddnd = -1;
225 static int hf_pfcp_b8_bucp = -1;
226 static int hf_pfcp_sequence_number = -1;
227 static int hf_pfcp_metric = -1;
228 static int hf_pfcp_timer_unit = -1;
229 static int hf_pfcp_timer_value = -1;
231 static int hf_pfcp_usage_report_trigger = -1;
232 static int hf_pfcp_usage_report_trigger_b15_immer = -1;
233 static int hf_pfcp_usage_report_trigger_b14_droth = -1;
234 static int hf_pfcp_usage_report_trigger_b13_stopt = -1;
235 static int hf_pfcp_usage_report_trigger_b12_start = -1;
236 static int hf_pfcp_usage_report_trigger_b11_quhti = -1;
237 static int hf_pfcp_usage_report_trigger_b10_timth = -1;
238 static int hf_pfcp_usage_report_trigger_b9_volth = -1;
239 static int hf_pfcp_usage_report_trigger_b8_perio = -1;
240 static int hf_pfcp_usage_report_trigger_b7_b6_spare = -1;
241 static int hf_pfcp_usage_report_trigger_b5_envcl = -1;
242 static int hf_pfcp_usage_report_trigger_b4_monit = -1;
243 static int hf_pfcp_usage_report_trigger_b3_termr = -1;
244 static int hf_pfcp_usage_report_trigger_b2_liusa = -1;
245 static int hf_pfcp_usage_report_trigger_b1_timqu = -1;
246 static int hf_pfcp_usage_report_trigger_b0_volqu = -1;
248 static int hf_pfcp_volume_measurement = -1;
249 static int hf_pfcp_vol_meas_tovol = -1;
250 static int hf_pfcp_vol_meas_ulvol = -1;
251 static int hf_pfcp_vol_meas_dlvol = -1;
252 static int hf_pfcp_cp_function_features = -1;
253 static int hf_pfcp_b0_load = -1;
254 static int hf_pfcp_b1_ovrl = -1;
255 static int hf_pfcp_usage_information = -1;
256 static int hf_pfcp_b3_ube = -1;
257 static int hf_pfcp_b2_uae = -1;
258 static int hf_pfcp_b1_aft = -1;
259 static int hf_pfcp_b0_bef = -1;
260 static int hf_pfcp_application_instance_id = -1;
261 static int hf_pfcp_flow_dir = -1;
262 static int hf_pfcp_packet_rate = -1;
263 static int hf_pfcp_ulpr_b0 = -1;
264 static int hf_pfcp_dlpr_b1 = -1;
265 static int hf_pfcp_ul_time_unit = -1;
266 static int hf_pfcp_max_ul_pr = -1;
267 static int hf_pfcp_dl_time_unit = -1;
268 static int hf_pfcp_max_dl_pr = -1;
269 static int hf_pfcp_dl_flow_level_marking = -1;
270 static int hf_pfcp_b0_ttc = -1;
271 static int hf_pfcp_b1_sci = -1;
272 static int hf_pfcp_sci = -1;
273 static int hf_pfcp_dl_data_notification_delay = -1;
274 static int hf_pfcp_packet_count = -1;
275 static int hf_pfcp_pfcp_dl_data_service_inf_flags = -1;
276 static int hf_pfcp_b0_ppi = -1;
277 static int hf_pfcp_ppi = -1;
278 static int hf_pfcp_sxsmreq_flags = -1;
279 static int hf_pfcp_b0_drobu = -1;
280 static int hf_pfcp_b1_sndem = -1;
281 static int hf_pfcp_b2_qaurr = -1;
282 static int hf_pfcp_sxsrrsp_flags = -1;
283 static int hf_pfcp_pfd_contents_flags = -1;
284 static int hf_pfcp_b0_fd = -1;
285 static int hf_pfcp_b3_cp = -1;
286 static int hf_pfcp_b2_dn = -1;
287 static int hf_pfcp_b1_url = -1;
288 static int hf_pfcp_url_len = -1;
289 static int hf_pfcp_url = -1;
290 static int hf_pfcp_dn_len = -1;
291 static int hf_pfcp_dn = -1;
292 static int hf_pfcp_cp_len = -1;
293 static int hf_pfcp_cp = -1;
294 static int hf_pfcp_header_type = -1;
295 static int hf_pfcp_hf_len = -1;
296 static int hf_pfcp_hf_name = -1;
297 static int hf_pfcp_hf_val_len = -1;
298 static int hf_pfcp_hf_val = -1;
299 static int hf_pfcp_measurement_info = -1;
300 static int hf_pfcp_b0_mbqe = -1;
301 static int hf_pfcp_b1_inam = -1;
302 static int hf_pfcp_node_report_type = -1;
303 static int hf_pfcp_b0_upfr = -1;
304 static int hf_pfcp_remote_gtp_u_peer = -1;
305 static int hf_pfcp_gtp_u_peer_flag_b0_v6 = -1;
306 static int hf_pfcp_gtp_u_peer_flag_b1_v4 = -1;
307 static int hf_pfcp_remote_gtp_u_peer_ipv4 = -1;
308 static int hf_pfcp_remote_gtp_u_peer_ipv6 = -1;
309 static int hf_pfcp_ur_seqn = -1;
310 static int hf_pfcp_oci_flags = -1;
311 static int hf_pfcp_b0_aoci = -1;
312 static int hf_pfcp_sx_assoc_rel_req_flags = -1;
313 static int hf_pfcp_b0_sarr = -1;
314 static int hf_pfcp_upiri_flags = -1;
315 static int hf_pfcp_upiri_flg_b0_v4 = -1;
316 static int hf_pfcp_upiri_flg_b1_v6 = -1;
317 static int hf_pfcp_upiri_flg_b5_assoni = -1;
318 static int hf_pfcp_upiri_teidri = -1;
319 static int hf_pfcp_upiri_teid_range = -1;
320 static int hf_pfcp_upiri_ipv4 = -1;
321 static int hf_pfcp_upiri_ipv6 = -1;
322 static int hf_pfcp_upiri_network_instance = -1;
323 static int hf_pfcp_user_plane_inactivity_timer = -1;
325 static int ett_pfcp = -1;
326 static int ett_pfcp_flags = -1;
327 static int ett_pfcp_ie = -1;
328 static int ett_pfcp_grouped_ie = -1;
329 static int ett_pfcp_f_seid_flags = -1;
330 static int ett_f_teid_flags = -1;
331 static int ett_pfcp_ue_ip_address_flags = -1;
332 static int ett_pfcp_sdf_filter_flags = -1;
333 static int ett_pfcp_apply_action_flags = -1;
334 static int ett_pfcp_measurement_method_flags = -1;
335 static int ett_pfcp_reporting_triggers = -1;
336 static int ett_pfcp_volume_threshold = -1;
337 static int ett_pfcp_volume_quota = -1;
338 static int ett_pfcp_subseq_volume_threshold = -1;
339 static int ett_pfcp_dropped_dl_traffic_threshold = -1;
340 static int ett_pfcp_gate_status = -1;
341 static int ett_pfcp_report_type = -1;
342 static int ett_pfcp_up_function_features = -1;
343 static int ett_pfcp_report_trigger = -1;
344 static int ett_pfcp_volume_measurement = -1;
345 static int ett_pfcp_cp_function_features = -1;
346 static int ett_pfcp_usage_information = -1;
347 static int ett_pfcp_packet_rate = -1;
348 static int ett_pfcp_pfcp_dl_flow_level_marking = -1;
349 static int ett_pfcp_dl_data_service_inf = -1;
350 static int ett_pfcp_sxsmreq = -1;
351 static int ett_pfcp_sxsrrsp = -1;
352 static int ett_pfcp_measurement_info = -1;
353 static int ett_pfcp_node_report_type = -1;
354 static int ett_pfcp_remote_gtp_u_peer = -1;
355 static int ett_pfcp_oci_flags = -1;
356 static int ett_sx_assoc_rel_req_flags = -1;
357 static int ett_pfcp_upiri_flags = -1;
359 static expert_field ei_pfcp_ie_reserved = EI_INIT;
360 static expert_field ei_pfcp_ie_data_not_decoded = EI_INIT;
361 static expert_field ei_pfcp_ie_not_decoded_null = EI_INIT;
362 static expert_field ei_pfcp_ie_not_decoded_to_large = EI_INIT;
363 static expert_field ei_pfcp_enterprise_ie_3gpp = EI_INIT;
364 static expert_field ei_pfcp_ie_encoding_error = EI_INIT;
368 static dissector_table_t pfcp_enterprise_ies_dissector_table;
370 static void dissect_pfcp_ies_common(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, gint offset, guint8 message_type);
371 static void dissect_pfcp_create_pdr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
372 static void dissect_pfcp_pdi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
373 static void dissect_pfcp_create_far(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
374 static void dissect_pfcp_forwarding_parameters(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
375 static void dissect_pfcp_duplicating_parameters(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
376 static void dissect_pfcp_create_urr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
377 static void dissect_pfcp_create_qer(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
378 static void dissect_pfcp_created_pdr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
379 static void dissect_pfcp_update_pdr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
380 static void dissect_pfcp_update_far(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
381 static void dissect_pfcp_upd_forwarding_param(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
382 static void dissect_pfcp_update_bar(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
383 static void dissect_pfcp_update_urr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
384 static void dissect_pfcp_update_qer(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
385 static void dissect_pfcp_remove_pdr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
386 static void dissect_pfcp_remove_far(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
387 static void dissect_pfcp_remove_urr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
388 static void dissect_pfcp_remove_qer(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
389 static void dissect_pfcp_load_control_information(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
390 static void dissect_pfcp_overload_control_information(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
391 static void dissect_pfcp_application_ids_pfds(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
392 static void dissect_pfcp_pfd_context(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
393 static void dissect_pfcp_application_detection_inf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
394 static void dissect_pfcp_pfcp_query_urr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
395 static void dissect_pfcp_usage_report_smr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
396 static void dissect_pfcp_usage_report_sdr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
397 static void dissect_pfcp_usage_report_srr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
398 static void dissect_pfcp_downlink_data_report(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
399 static void dissect_pfcp_create_bar(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
400 static void dissect_pfcp_update_bar_smr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
401 static void dissect_pfcp_remove_bar(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
402 static void dissect_pfcp_error_indication_report(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
403 static void dissect_pfcp_user_plane_path_failure_report(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
404 static void dissect_pfcp_update_duplicating_parameters(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
406 static const true_false_string pfcp_id_predef_dynamic_tfs = {
411 #define PFCP_MSG_RESERVED_0 0
413 static const value_string pfcp_message_type[] = {
414 {PFCP_MSG_RESERVED_0, "Reserved"},
415 /* Sx Node related messages */
417 { 1, "Sx Heartbeat Request"},
418 { 2, "Sx Heartbeat Response"},
419 { 3, "Sx PFD Management Request"},
420 { 4, "Sx PFD Management Response"},
421 { 5, "Sx Association Setup Request"},
422 { 6, "Sx Association Setup Response"},
423 { 7, "Sx Association Update Request"},
424 { 8, "Sx Association Update Response"},
425 { 9, "Sx Association Release Request"},
426 { 10, "Sx Association Release Response"},
427 { 11, "Sx Version Not Supported Response"},
428 { 12, "Sx Node Report Request"},
429 { 13, "Sx Node Report Response"},
430 { 14, "Sx Session Set Deletion Request"},
431 { 15, "Sx Session Set Deletion Response"},
432 //16 to 49 For future use
433 //Sx Session related messages
434 { 50, "Sx Session Establishment Request"},
435 { 51, "Sx Session Establishment Response"},
436 { 52, "Sx Session Modification Request"},
437 { 53, "Sx Session Modification Response"},
438 { 54, "Sx Session Deletion Request"},
439 { 55, "Sx Session Deletion Response"},
440 { 56, "Sx Session Report Request"},
441 { 57, "Sx Session Report Response"},
442 //58 to 99 For future use
444 //100 to 255 For future use
447 static value_string_ext pfcp_message_type_ext = VALUE_STRING_EXT_INIT(pfcp_message_type);
449 /* 8.1.2 Information Element Types */
450 #define PFCP_IE_ID_CREATE_PDR 1
451 #define PFCP_IE_ID_PDI 2
452 #define PFCP_IE_CREATE_FAR 3
453 #define PFCP_IE_FORWARDING_PARAMETERS 4
454 #define PFCP_IE_DUPLICATING_PARAMETERS 5
455 #define PFCP_IE_CREATE_URR 6
456 #define PFCP_IE_CREATE_QER 7
457 #define PFCP_IE_CREATED_PDR 8
458 #define PFCP_IE_UPDATE_PDR 9
459 #define PFCP_IE_UPDATE_FAR 10
460 #define PFCP_IE_UPD_FORWARDING_PARAM 11
461 #define PFCP_IE_UPDATE_BAR 12
462 #define PFCP_IE_UPDATE_URR 13
463 #define PFCP_IE_UPDATE_QER 14
464 #define PFCP_IE_REMOVE_PDR 15
465 #define PFCP_IE_REMOVE_FAR 16
466 #define PFCP_IE_REMOVE_URR 17
467 #define PFCP_IE_REMOVE_QER 18
469 #define PFCP_LOAD_CONTROL_INFORMATION 51
470 #define PFCP_OVERLOAD_CONTROL_INFORMATION 54
471 #define PFCP_APPLICATION_IDS_PFDS 58
472 #define PFCP_PFD_CONTEXT 59
473 #define PFCP_APPLICATION_DETECTION_INF 68
474 #define PFCP_QUERY_URR 77
475 #define PFCP_USAGE_REPORT_SMR 78
476 #define PFCP_USAGE_REPORT_SDR 79
477 #define PFCP_USAGE_REPORT_SRR 80
478 #define PFCP_DOWNLINK_DATA_REPORT 83
479 #define PFCP_CREATE_BAR 85
480 #define PFCP_UPDATE_BAR_SMR 86
481 #define PFCP_REMOVE_BAR 87
482 #define PFCP_ERROR_INDICATION_REPORT 99
483 #define PFCP_USER_PLANE_PATH_FAILURE_REPORT 102
484 #define PFCP_UPDATE_DUPLICATING_PARAMETERS 105
486 static const value_string pfcp_ie_type[] = {
489 { 1, "Create PDR"}, /* Extendable / Table 7.5.2.2-1 */
490 { 2, "PDI"}, /* Extendable / Table 7.5.2.2-2 */
491 { 3, "Create FAR"}, /* Extendable / Table 7.5.2.3-1 */
492 { 4, "Forwarding Parameters"}, /* Extendable / Table 7.5.2.3-2 */
493 { 5, "Duplicating Parameters"}, /* Extendable / Table 7.5.2.3-3 */
494 { 6, "Create URR"}, /* Extendable / Table 7.5.2.4-1 */
495 { 7, "Create QER"}, /* Extendable / Table 7.5.2.5-1 */
496 { 8, "Created PDR"}, /* Extendable / Table 7.5.3.2-1 */
497 { 9, "Update PDR" }, /* Extendable / Table 7.5.4.2-1 */
498 { 10, "Update FAR" }, /* Extendable / Table 7.5.4.3-1 */
499 { 11, "Update Forwarding Parameters" }, /* Extendable / Table 7.5.4.3-2 */
500 { 12, "Update BAR (Sx Session Report Response)" }, /* Extendable / Table 7.5.9.2-1 */
501 { 13, "Update URR" }, /* Extendable / Table 7.5.4.4 */
502 { 14, "Update QER" }, /* Extendable / Table 7.5.4.5 */
503 { 15, "Remove PDR" }, /* Extendable / Table 7.5.4.6 */
504 { 16, "Remove FAR" }, /* Extendable / Table 7.5.4.7 */
505 { 17, "Remove URR" }, /* Extendable / Table 7.5.4.8 */
506 { 18, "Remove QER" }, /* Extendable / Table 7.5.4.9 */
507 { 19, "Cause" }, /* Fixed / Subclause 8.2.1 */
508 { 20, "Source Interface" }, /* Extendable / Subclause 8.2.2 */
509 { 21, "F-TEID" }, /* Extendable / Subclause 8.2.3 */
510 { 22, "Network Instance" }, /* Variable Length / Subclause 8.2.4 */
511 { 23, "SDF Filter" }, /* Extendable / Subclause 8.2.5 */
512 { 24, "Application ID" }, /* Variable Length / Subclause 8.2.6 */
513 { 25, "Gate Status" }, /* Extendable / Subclause 8.2.7 */
514 { 26, "MBR" }, /* Extendable / Subclause 8.2.8 */
515 { 27, "GBR" }, /* Extendable / Subclause 8.2.9 */
516 { 28, "QER Correlation ID" }, /* Extendable / Subclause 8.2.10 */
517 { 29, "Precedence" }, /* Extendable / Subclause 8.2.11 */
518 { 30, "DL Transport Level Marking" }, /* Extendable / Subclause 8.2.12 */
519 { 31, "Volume Threshold" }, /* Extendable /Subclause 8.2.13 */
520 { 32, "Time Threshold" }, /* Extendable /Subclause 8.2.14 */
521 { 33, "Monitoring Time" }, /* Extendable /Subclause 8.2.15 */
522 { 34, "Subsequent Volume Threshold" }, /* Extendable /Subclause 8.2.16 */
523 { 35, "Subsequent Time Threshold" }, /* Extendable /Subclause 8.2.17 */
524 { 36, "Inactivity Detection Time" }, /* Extendable /Subclause 8.2.18 */
525 { 37, "Reporting Triggers" }, /* Extendable /Subclause 8.2.19 */
526 { 38, "Redirect Information" }, /* Extendable /Subclause 8.2.20 */
527 { 39, "Report Type" }, /* Extendable / Subclause 8.2.21 */
528 { 40, "Offending IE" }, /* Fixed / Subclause 8.2.22 */
529 { 41, "Forwarding Policy" }, /* Extendable / Subclause 8.2.23 */
530 { 42, "Destination Interface" }, /* Extendable / Subclause 8.2.24 */
531 { 43, "UP Function Features" }, /* Extendable / Subclause 8.2.25 */
532 { 44, "Apply Action" }, /* Extendable / Subclause 8.2.26 */
533 { 45, "Downlink Data Service Information" }, /* Extendable / Subclause 8.2.27 */
534 { 46, "Downlink Data Notification Delay" }, /* Extendable / Subclause 8.2.28 */
535 { 47, "DL Buffering Duration" }, /* Extendable / Subclause 8.2.29 */
536 { 48, "DL Buffering Suggested Packet Count" }, /* Variable / Subclause 8.2.30 */
537 { 49, "SxSMReq-Flags" }, /* Extendable / Subclause 8.2.31 */
538 { 50, "SxSRRsp-Flags" }, /* Extendable / Subclause 8.2.32 */
539 { 51, "Load Control Information" }, /* Extendable / Table 7.5.3.3-1 */
540 { 52, "Sequence Number" }, /* Fixed Length / Subclause 8.2.33 */
541 { 53, "Metric" }, /* Fixed Length / Subclause 8.2.34 */
542 { 54, "Overload Control Information" }, /* Extendable / Table 7.5.3.4-1 */
543 { 55, "Timer" }, /* Extendable / Subclause 8.2 35 */
544 { 56, "Packet Detection Rule ID" }, /* Extendable / Subclause 8.2 36 */
545 { 57, "F-SEID" }, /* Extendable / Subclause 8.2 37 */
546 { 58, "Application ID's PFDs" }, /* Extendable / Table 7.4.3.1-2 */
547 { 59, "PFD context" }, /* Extendable / Table 7.4.3.1-3 */
548 { 60, "Node ID" }, /* Extendable / Subclause 8.2.38 */
549 { 61, "PFD contents" }, /* Extendable / Subclause 8.2.39 */
550 { 62, "Measurement Method" }, /* Extendable / Subclause 8.2.40 */
551 { 63, "Usage Report Trigger" }, /* Extendable / Subclause 8.2.41 */
552 { 64, "Measurement Period" }, /* Extendable / Subclause 8.2.42 */
553 { 65, "FQ-CSID" }, /* Extendable / Subclause 8.2.43 */
554 { 66, "Volume Measurement" }, /* Extendable / Subclause 8.2.44 */
555 { 67, "Duration Measurement" }, /* Extendable / Subclause 8.2.45 */
556 { 68, "Application Detection Information" }, /* Extendable / Table 7.5.8.3-2 */
557 { 69, "Time of First Packet" }, /* Extendable / Subclause 8.2.46 */
558 { 70, "Time of Last Packet" }, /* Extendable / Subclause 8.2.47 */
559 { 71, "Quota Holding Time" }, /* Extendable / Subclause 8.2.48 */
560 { 72, "Dropped DL Traffic Threshold" }, /* Extendable / Subclause 8.2.49 */
561 { 73, "Volume Quota" }, /* Extendable / Subclause 8.2.50 */
562 { 74, "Time Quota" }, /* Extendable / Subclause 8.2.51 */
563 { 75, "Start Time" }, /* Extendable / Subclause 8.2.52 */
564 { 76, "End Time" }, /* Extendable / Subclause 8.2.53 */
565 { 77, "Query URR" }, /* Extendable / Table 7.5.4.10-1 */
566 { 78, "Usage Report (in Session Modification Response)" }, /* Extendable / Table 7.5.5.2-1 */
567 { 79, "Usage Report (Session Deletion Response)" }, /* Extendable / Table 7.5.7.2-1 */
568 { 80, "Usage Report (Session Report Request)" }, /* Extendable / Table 7.5.8.3-1 */
569 { 81, "URR ID" }, /* Extendable / Subclause 8.2.54 */
570 { 82, "Linked URR ID" }, /* Extendable / Subclause 8.2.55 */
571 { 83, "Downlink Data Report" }, /* Extendable / Table 7.5.8.2-1 */
572 { 84, "Outer Header Creation" }, /* Extendable / Subclause 8.2.56 */
573 { 85, "Create BAR" }, /* Extendable / Table 7.5.2.6-1 */
574 { 86, "Update BAR (Session Modification Request)" }, /* Extendable / Table 7.5.4.11-1 */
575 { 87, "Remove BAR" }, /* Extendable / Table 7.5.4.12-1 */
576 { 88, "BAR ID" }, /* Extendable / Subclause 8.2.57 */
577 { 89, "CP Function Features" }, /* Extendable / Subclause 8.2.58 */
578 { 90, "Usage Information" }, /* Extendable / Subclause 8.2.59 */
579 { 91, "Application Instance ID" }, /* Variable Length / Subclause 8.2.60 */
580 { 92, "Flow Information" }, /* Extendable / Subclause 8.2.61 */
581 { 93, "UE IP Address" }, /* Extendable / Subclause 8.2.62 */
582 { 94, "Packet Rate" }, /* Extendable / Subclause 8.2.63 */
583 { 95, "Outer Header Removal" }, /* Extendable / Subclause 8.2.64 */
584 { 96, "Recovery Time Stamp" }, /* Extendable / Subclause 8.2.65 */
585 { 97, "DL Flow Level Marking" }, /* Extendable / Subclause 8.2.66 */
586 { 98, "Header Enrichment" }, /* Extendable / Subclause 8.2.67 */
587 { 99, "Error Indication Report" }, /* Extendable / Table 7.5.8.4-1 */
588 { 100, "Measurement Information" }, /* Extendable / Subclause 8.2.68 */
589 { 101, "Node Report Type" }, /* Extendable / Subclause 8.2.69 */
590 { 102, "User Plane Path Failure Report" }, /* Extendable / Table 7.4.5.1.2-1 */
591 { 103, "Remote GTP-U Peer" }, /* Extendable / Subclause 8.2.70 */
592 { 104, "UR-SEQN" }, /* Fixed Length / Subclause 8.2.71 */
593 { 105, "Update Duplicating Parameters" }, /* Extendable / Table 7.5.4.3-3 */
594 { 106, "Activate Predefined Rules" }, /* Variable Length / Subclause 8.2.72 */
595 { 107, "Deactivate Predefined Rules" }, /* Variable Length / Subclause 8.2.73 */
596 { 108, "FAR ID" }, /* Extendable / Subclause 8.2.74 */
597 { 109, "QER ID" }, /* Extendable / Subclause 8.2.75 */
598 { 110, "OCI Flags" }, /* Extendable / Subclause 8.2.76 */
599 { 111, "Sx Association Release Request" }, /* Extendable / Subclause 8.2.77 */
600 { 112, "Graceful Release Period" }, /* Extendable / Subclause 8.2.78 */
601 { 113, "PDN Type" }, /* Fixed Length / Subclause 8.2.79 */
602 { 114, "Failed Rule ID" }, /* Extendable / Subclause 8.2.80 */
603 { 115, "Time Quota Mechanism" }, /* Extendable / Subclause 8.2.81 */
604 { 116, "User Plane IP Resource Information" }, /* Extendable / Subclause 8.2.82 */
605 { 117, "User Plane Inactivity Timer" }, /* Extendable / Subclause 8.2.83 */
606 //118 to 65535 Spare. For future use.
610 static value_string_ext pfcp_ie_type_ext = VALUE_STRING_EXT_INIT(pfcp_ie_type);
613 dissect_pfcp_reserved(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
615 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_reserved, tvb, 0, length);
621 static const value_string pfcp_cause_vals[] = {
624 { 1, "Request accepted(success)" },
626 { 64, "Request rejected(reason not specified)" },
627 { 65, "Session context not found" },
628 { 66, "Mandatory IE missing" },
629 { 67, "Conditional IE missing" },
630 { 68, "Invalid length" },
631 { 69, "Mandatory IE incorrect" },
632 { 70, "Invalid Forwarding Policy" },
633 { 71, "Invalid F - TEID allocation option" },
634 { 72, "No established Sx Association" },
635 { 73, "Rule creation / modification Failure" },
636 { 74, "PFCP entity in congestion" },
637 { 75, "No resources available" },
638 { 76, "Service not supported" },
639 { 77, "System failure" },
640 /* 78 to 255 Spare for future use in a response message. */
645 dissect_pfcp_cause(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 message_type _U_)
647 /* Octet 5 Cause value */
648 proto_tree_add_item(tree, hf_pfcp2_cause, tvb, 0, 1, ENC_BIG_ENDIAN);
651 * 8.2.2 Source Interface
653 static const value_string pfcp_source_interface_vals[] = {
658 { 3, "CP-function" },
662 dissect_pfcp_source_interface(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type _U_)
666 /* Octet 5 Spare Interface value */
667 proto_tree_add_item(tree, hf_pfcp_spare_h1, tvb, offset, 1, ENC_BIG_ENDIAN);
668 proto_tree_add_item_ret_uint(tree, hf_pfcp_source_interface, tvb, offset, 1, ENC_BIG_ENDIAN, &value);
671 proto_item_append_text(item, "%s", val_to_str_const(value, pfcp_source_interface_vals, "Unknown"));
673 if (offset < length) {
674 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
682 dissect_pfcp_f_teid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
685 guint64 fteid_flags_val;
687 static const int * pfcp_fteid_flags[] = {
688 &hf_pfcp_fteid_flg_spare,
689 &hf_pfcp_fteid_flg_b3_ch_id,
690 &hf_pfcp_fteid_flg_b2_ch,
691 &hf_pfcp_fteid_flg_b1_v6,
692 &hf_pfcp_fteid_flg_b0_v4,
695 /* Octet 5 Spare Spare Spare Spare CHID CH V6 V4*/
696 proto_tree_add_bitmask_with_flags_ret_uint64(tree, tvb, offset, hf_pfcp_f_teid_flags,
697 ett_f_teid_flags, pfcp_fteid_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT | BMT_NO_TFS, &fteid_flags_val);
699 /* The following flags are coded within Octet 5:
700 * Bit 1 - V4: If this bit is set to "1" and the CH bit is not set, then the IPv4 address field shall be present,
701 * otherwise the IPv4 address field shall not be present.
702 * Bit 2 - V6: If this bit is set to "1" and the CH bit is not set, then the IPv6 address field shall be present,
703 * otherwise the IPv6 address field shall not be present.
704 * Bit 3 - CH (CHOOSE): If this bit is set to "1", then the TEID, IPv4 address and IPv6 address fields shall not be
705 * present and the UP function shall assign an F-TEID with an IP4 or an IPv6 address if the V4 or V6 bit is set respectively.
706 * This bit shall only be set by the CP function.
707 * Bit 4 - CHID (CHOOSE_ID):If this bit is set to "1", then the UP function shall assign the same F-TEID to the
708 * PDRs requested to be created in a Sx Session Establishment Request or Sx Session Modification Request with
709 * the same CHOOSE ID value.
710 * This bit may only be set to "1" if the CH bit is set to "1".
711 * This bit shall only be set by the CP function.
714 if ((fteid_flags_val & 0x4) == 4) {
715 if ((fteid_flags_val & 0x8) == 8) {
716 proto_tree_add_item(tree, hf_pfcp_f_teid_ch_id, tvb, offset, 1, ENC_NA);
721 /* Octet 6 to 9 TEID */
722 proto_tree_add_item(tree, hf_pfcp_f_teid_teid, tvb, offset, 4, ENC_BIG_ENDIAN);
725 if ((fteid_flags_val & 0x1) == 1) {
726 /* m to (m+3) IPv4 address */
727 proto_tree_add_item(tree, hf_pfcp_f_teid_ipv4, tvb, offset, 4, ENC_BIG_ENDIAN);
730 if ((fteid_flags_val & 0x2) == 2) {
731 /* p to (p+15) IPv6 address */
732 proto_tree_add_item(tree, hf_pfcp_f_teid_ipv6, tvb, offset, 16, ENC_NA);
735 /* If the value of CH bit is set to "0", but the value of CHID bit is "1" */
736 if ((fteid_flags_val & 0x8) == 8) {
737 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_encoding_error, tvb, 0, 1);
740 if (offset < length) {
741 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
746 * 8.2.4 Network Instance
749 dissect_pfcp_network_instance(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
752 /* Octet 5 5 to (n+4) Network Instance
753 * The Network instance field shall be encoded as an OctetString
755 proto_tree_add_item(tree, hf_pfcp_network_instance, tvb, offset, length, ENC_NA);
761 dissect_pfcp_sdf_filter(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 message_type _U_)
767 static const int * pfcp_sdf_filter_flags[] = {
769 &hf_pfcp_sdf_filter_b3_fl,
770 &hf_pfcp_sdf_filter_b2_spi,
771 &hf_pfcp_sdf_filter_b1_ttc,
772 &hf_pfcp_sdf_filter_b0_fd,
775 /* Octet 5 Spare FL SPI TTC FD*/
776 proto_tree_add_bitmask_with_flags_ret_uint64(tree, tvb, offset, hf_pfcp_sdf_filter_flags,
777 ett_pfcp_sdf_filter_flags, pfcp_sdf_filter_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT | BMT_NO_TFS, &flags_val);
780 proto_tree_add_item(tree, hf_pfcp_spare, tvb, offset, 1, ENC_BIG_ENDIAN);
783 if ((flags_val & 0x1) == 1) {
784 /* FD (Flow Description): If this bit is set to "1",
785 * then the Length of Flow Description and the Flow Description fields shall be present
787 /* m to (m+1) Length of Flow Description */
788 proto_tree_add_item_ret_uint(tree, hf_pfcp_flow_desc_len, tvb, offset, 2, ENC_BIG_ENDIAN, &fd_length);
791 * The Flow Description field, when present, shall be encoded as an OctetString
792 * as specified in subclause 5.4.2 of 3GPP TS 29.212
794 proto_tree_add_item(tree, hf_pfcp_fd, tvb, offset, fd_length, ENC_NA);
797 if ((flags_val & 0x2) == 2) {
798 /* TTC (ToS Traffic Class): If this bit is set to "1", then the ToS Traffic Class field shall be present */
799 /* ToS Traffic Class field, when present, shall be encoded as an OctetString on two octets
800 * as specified in subclause 5.3.15 of 3GPP TS 29.212
802 proto_tree_add_item(tree, hf_pfcp_ttc, tvb, offset, 2, ENC_NA);
806 if ((flags_val & 0x4) == 4) {
807 /* SPI (The Security Parameter Index) field, when present, shall be encoded as an OctetString on four octets and shall
808 * contain the IPsec security parameter index (which is a 32-bit field),
809 * as specified in subclause 5.3.51 of 3GPP TS 29.212
811 proto_tree_add_item(tree, hf_pfcp_spi, tvb, offset, 4, ENC_NA);
814 if ((flags_val & 0x8) == 8) {
815 /* FL (Flow Label), when present, shall be encoded as an OctetString on 3 octets as specified in
816 * subclause 5.3.52 of 3GPP TS 29.212 and shall contain an IPv6 flow label (which is a 20-bit field).
817 * The bits 8 to 5 of the octet "v" shall be spare and set to zero, and the remaining 20 bits shall
818 * contain the IPv6 flow label.*/
819 proto_tree_add_item(tree, hf_pfcp_fl, tvb, offset, 3, ENC_NA);
823 if (offset < length) {
824 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
828 * 8.2.6 Application ID
831 dissect_pfcp_application_id(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
834 /* Octet 5 to (n+4) Application Identifier
835 * The Application Identifier shall be encoded as an OctetString (see 3GPP TS 29.212)
837 proto_tree_add_item(tree, hf_pfcp_application_id, tvb, offset, length, ENC_NA);
842 static const value_string pfcp_gate_status_vals[] = {
850 dissect_pfcp_gate_status(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
854 static const int * pfcp_gate_status_flags[] = {
855 &hf_pfcp_gate_status_b3b2_ulgate,
856 &hf_pfcp_gate_status_b0b1_dlgate,
859 /* Octet 5 Spare UL Gate DL Gate */
860 proto_tree_add_bitmask_with_flags(tree, tvb, offset, hf_pfcp_gate_status,
861 ett_pfcp_gate_status, pfcp_gate_status_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT);
864 if (offset < length) {
865 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
875 dissect_pfcp_mbr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
878 int len1 = (length != 10) ? length/2 : 5;
880 /* In case length is not in accordance with documentation */
882 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_encoding_error, tvb, 0, 1);
886 * The UL/DL MBR fields shall be encoded as kilobits per second (1 kbps = 1000 bps) in binary value
888 proto_tree_add_item(tree, hf_pfcp_ul_mbr, tvb, offset, len1, ENC_BIG_ENDIAN);
891 /* 10 to 14 DL MBR */
892 proto_tree_add_item(tree, hf_pfcp_dl_mbr, tvb, offset, len1, ENC_BIG_ENDIAN);
895 if (offset < length) {
896 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
905 dissect_pfcp_gbr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
908 int len1 = (length != 10) ? length/2 : 5;
910 /* In case length is not in accordance with documentation */
912 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_encoding_error, tvb, 0, 1);
916 * The UL/DL MBR fields shall be encoded as kilobits per second (1 kbps = 1000 bps) in binary value
918 proto_tree_add_item(tree, hf_pfcp_ul_gbr, tvb, offset, len1, ENC_BIG_ENDIAN);
921 /* 10 to 14 DL GBR */
922 proto_tree_add_item(tree, hf_pfcp_dl_gbr, tvb, offset, len1, ENC_BIG_ENDIAN);
925 if (offset < length) {
926 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
932 * 8.2.10 QER Correlation ID
935 dissect_pfcp_qer_correlation_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type _U_)
939 /* 5 to 8 QER Correlation ID value */
940 proto_tree_add_item_ret_uint(tree, hf_pfcp_qer_correlation_id, tvb, offset, 4, ENC_BIG_ENDIAN, &value);
943 proto_item_append_text(item, "%u", value);
945 if (offset < length) {
946 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
954 dissect_pfcp_precedence(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type _U_)
958 /* Octet 5 5 to 8 Precedence value */
959 proto_tree_add_item_ret_uint(tree, hf_pfcp_precedence, tvb, offset, 4, ENC_BIG_ENDIAN, &value);
962 proto_item_append_text(item, "%u", value);
964 if (offset < length) {
965 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
970 * 8.2.12 Transport Level Marking
973 dissect_pfcp_transport_level_marking(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
976 /* Octet 5 to 6 ToS/Traffic Class
977 * The ToS/Traffic Class shall be encoded on two octets as an OctetString.
978 * The first octet shall contain the IPv4 Type-of-Service or the IPv6 Traffic-Class field and the second octet shall contain the ToS/Traffic Class mask field
980 proto_tree_add_item(tree, hf_pfcp_tos_traf_class, tvb, offset, 2, ENC_BIG_ENDIAN);
983 if (offset < length) {
984 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
990 * 8.2.13 Volume Threshold
993 dissect_pfcp_volume_threshold(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
998 static const int * pfcp_volume_threshold_flags[] = {
999 &hf_pfcp_spare_b7_b3,
1005 /* Octet 5 Spare DLVOL ULVOL TOVOL*/
1006 proto_tree_add_bitmask_with_flags_ret_uint64(tree, tvb, offset, hf_pfcp_volume_threshold,
1007 ett_pfcp_volume_threshold, pfcp_volume_threshold_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT, &flags_val);
1010 /* The Total Volume, Uplink Volume and Downlink Volume fields shall be encoded as an Unsigned64 binary integer value.
1011 * They shall contain the total, uplink or downlink number of octets respectively.
1013 if ((flags_val & 0x1) == 1) {
1014 /* m to (m+7) Total Volume
1015 * TOVOL: If this bit is set to "1", then the Total Volume field shall be present
1017 proto_tree_add_item(tree, hf_pfcp_volume_threshold_tovol, tvb, offset, 8, ENC_BIG_ENDIAN);
1020 if ((flags_val & 0x2) == 2) {
1021 /* p to (p+7) Uplink Volume
1022 * ULVOL: If this bit is set to "1", then the Uplink Volume field shall be present
1024 proto_tree_add_item(tree, hf_pfcp_volume_threshold_ulvol, tvb, offset, 8, ENC_BIG_ENDIAN);
1027 if ((flags_val & 0x4) == 4) {
1028 /* q to (q+7) Downlink Volume
1029 * DLVOL: If this bit is set to "1", then the Downlink Volume field shall be present
1031 proto_tree_add_item(tree, hf_pfcp_volume_threshold_dlvol, tvb, offset, 8, ENC_BIG_ENDIAN);
1035 if (offset < length) {
1036 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
1040 * 8.2.14 Time Threshold
1043 dissect_pfcp_time_threshold(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type _U_)
1048 /* Octet 5 to 8 Time Threshold
1049 * The Time Threshold field shall be encoded as an Unsigned32 binary integer value.
1050 * It shall contain the duration in seconds.
1052 proto_tree_add_item_ret_uint(tree, hf_pfcp_time_threshold, tvb, offset, 4, ENC_BIG_ENDIAN, &value);
1055 proto_item_append_text(item, "%u s", value);
1057 if (offset < length) {
1058 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
1064 * 8.2.15 Monitoring Time
1067 dissect_pfcp_monitoring_time(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type _U_)
1069 const gchar *time_str;
1072 /* The Monitoring Time field shall indicate the monitoring time in UTC time.
1073 * Octets 5 to 8 shall be encoded in the same format as the first four octets
1074 * of the 64-bit timestamp format as defined in section 6 of IETF RFC 5905.
1076 time_str = tvb_ntp_fmt_ts_sec(tvb, 0);
1077 proto_tree_add_string(tree, hf_pfcp_monitoring_time, tvb, offset, 4, time_str);
1078 proto_item_append_text(item, "%s", time_str);
1081 if (offset < length) {
1082 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
1087 * 8.2.16 Subsequent Volume Threshold
1090 dissect_pfcp_subseq_volume_threshold(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
1095 static const int * pfcp_subseq_volume_threshold_flags[] = {
1096 &hf_pfcp_spare_b7_b3,
1097 &hf_pfcp_subseq_volume_threshold_b2_dlvol,
1098 &hf_pfcp_subseq_volume_threshold_b1_ulvol,
1099 &hf_pfcp_subseq_volume_threshold_b0_tovol,
1102 /* Octet 5 Spare DLVOL ULVOL TOVOL*/
1103 proto_tree_add_bitmask_with_flags_ret_uint64(tree, tvb, offset, hf_pfcp_subseq_volume_threshold,
1104 ett_pfcp_subseq_volume_threshold, pfcp_subseq_volume_threshold_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT, &flags_val);
1107 /* The Total Volume, Uplink Volume and Downlink Volume fields shall be encoded as an Unsigned64 binary integer value.
1108 * They shall contain the total, uplink or downlink number of octets respectively.
1110 if ((flags_val & 0x1) == 1) {
1111 /* m to (m+7) Total Volume
1112 * TOVOL: If this bit is set to "1", then the Total Volume field shall be present
1114 proto_tree_add_item(tree, hf_pfcp_subseq_volume_threshold_tovol, tvb, offset, 8, ENC_BIG_ENDIAN);
1117 if ((flags_val & 0x2) == 2) {
1118 /* p to (p+7) Uplink Volume
1119 * ULVOL: If this bit is set to "1", then the Uplink Volume field shall be present
1121 proto_tree_add_item(tree, hf_pfcp_subseq_volume_threshold_ulvol, tvb, offset, 8, ENC_BIG_ENDIAN);
1124 if ((flags_val & 0x4) == 4) {
1125 /* q to (q+7) Downlink Volume
1126 * DLVOL: If this bit is set to "1", then the Downlink Volume field shall be present
1128 proto_tree_add_item(tree, hf_pfcp_subseq_volume_threshold_dlvol, tvb, offset, 8, ENC_BIG_ENDIAN);
1132 if (offset < length) {
1133 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
1138 * 8.2.17 Subsequent Time Threshold
1141 dissect_pfcp_subsequent_time_threshold(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type _U_)
1145 /* 5 to 8 Subsequent Time Threshold */
1146 proto_tree_add_item_ret_uint(tree, hf_pfcp_subsequent_time_threshold, tvb, offset, 4, ENC_BIG_ENDIAN, &value);
1149 proto_item_append_text(item, "%u s", value);
1151 if (offset < length) {
1152 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
1156 * 8.2.18 Inactivity Detection Time
1159 dissect_pfcp_inactivity_detection_time(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type _U_)
1163 /* 5 to 8 Inactivity Detection Time */
1164 proto_tree_add_item_ret_uint(tree, hf_pfcp_inactivity_detection_time, tvb, offset, 4, ENC_BIG_ENDIAN, &value);
1167 proto_item_append_text(item, "%u s", value);
1169 if (offset < length) {
1170 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
1175 * 8.2.19 Reporting Triggers
1178 dissect_pfcp_reporting_triggers(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
1182 static const int * pfcp_reporting_triggers_flags[] = {
1183 &hf_pfcp_reporting_triggers_b15_liusa,
1184 &hf_pfcp_reporting_triggers_b14_droth,
1185 &hf_pfcp_reporting_triggers_b13_stopt,
1186 &hf_pfcp_reporting_triggers_b12_start,
1187 &hf_pfcp_reporting_triggers_b11_quhti,
1188 &hf_pfcp_reporting_triggers_b10_timth,
1189 &hf_pfcp_reporting_triggers_b9_volth,
1190 &hf_pfcp_reporting_triggers_b8_perio,
1191 &hf_pfcp_reporting_triggers_b7_b3_spare,
1192 &hf_pfcp_reporting_triggers_b2_envcl,
1193 &hf_pfcp_reporting_triggers_b1_timqu,
1194 &hf_pfcp_reporting_triggers_b0_volqu,
1197 /* Octet 5 [Bits 15-08] LIUSA DROTH STOPT START QUHTI TIMTH VOLTH PERIO */
1198 /* Octet 6 [Bits 07-00] SPARE SPARE SPARE SPARE SPARE ENVCL TIMQU VOLQU */
1199 proto_tree_add_bitmask_with_flags(tree, tvb, offset, hf_pfcp_reporting_triggers,
1200 ett_pfcp_reporting_triggers, pfcp_reporting_triggers_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT);
1203 if (offset < length) {
1204 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
1210 * 8.2.20 Redirect Information
1212 static const value_string pfcp_redirect_address_type_vals[] = {
1214 { 0, "IPv4 address" },
1215 { 1, "IPv6 address" },
1222 dissect_pfcp_redirect_information(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
1225 guint32 value, addr_len;
1227 /* Octet Spare Redirect Address Type */
1228 proto_tree_add_item(tree, hf_pfcp_spare_h1, tvb, offset, 1, ENC_BIG_ENDIAN);
1229 proto_tree_add_item_ret_uint(tree, hf_pfcp_redirect_address_type, tvb, offset, 1, ENC_BIG_ENDIAN, &value);
1232 /* 6-7 Redirect Server Address Length=a */
1233 proto_tree_add_item_ret_uint(tree, hf_pfcp_redirect_server_addr_len, tvb, offset, 2, ENC_BIG_ENDIAN, &addr_len);
1236 /* 8-(8+a) Redirect Server Address */
1237 proto_tree_add_item(tree, hf_pfcp_redirect_server_address, tvb, offset, addr_len, ENC_UTF_8 | ENC_NA);
1240 if (offset < length) {
1241 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
1245 * 8.2.21 Report Type
1248 dissect_pfcp_report_type(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
1252 static const int * pfcp_report_type_flags[] = {
1253 &hf_pfcp_spare_b7_b3,
1259 /* Octet 5 Spare ERIR USAR DLDR */
1260 proto_tree_add_bitmask_with_flags(tree, tvb, offset, hf_pfcp_report_type,
1261 ett_pfcp_report_type, pfcp_report_type_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT);
1264 if (offset < length) {
1265 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
1270 * 8.2.22 Offending IE
1273 dissect_pfcp_offending_ie(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item, guint16 length _U_, guint8 message_type _U_)
1276 /* Octet 5 to 6 Type of the offending IE */
1277 proto_tree_add_item_ret_uint(tree, hf_pfcp_offending_ie, tvb, 0, 2, ENC_BIG_ENDIAN, &value);
1279 proto_item_append_text(item, "%s", val_to_str_const(value, pfcp_ie_type, "Unknown"));
1283 * 8.2.23 Forwarding Policy
1286 dissect_pfcp_forwarding_policy(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
1291 /* Octet Forwarding Policy Identifier Length */
1292 proto_tree_add_item_ret_uint(tree, hf_pfcp_forwarding_policy_id_len, tvb, offset, 1, ENC_BIG_ENDIAN, &id_len);
1295 proto_tree_add_item(tree, hf_pfcp_forwarding_policy_id, tvb, offset, id_len, ENC_NA);
1298 if (offset < length) {
1299 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
1304 * 8.2.24 Destination Interface
1306 static const value_string pfcp_dst_interface_vals[] = {
1311 { 3, "CP- Function" },
1312 { 4, "LI Function" },
1317 dissect_pfcp_destination_interface(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type _U_)
1322 /* Octet 5 Spare Interface value*/
1323 proto_tree_add_item(tree, hf_pfcp_spare_h1, tvb, offset, 1, ENC_BIG_ENDIAN);
1324 proto_tree_add_item_ret_uint(tree, hf_pfcp_dst_interface, tvb, offset, 1, ENC_BIG_ENDIAN, &value);
1327 proto_item_append_text(item, "%s", val_to_str_const(value, pfcp_dst_interface_vals, "Unknown"));
1329 if (offset < length) {
1330 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
1335 * 8.2.25 UP Function Features
1338 dissect_pfcp_up_function_features(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
1342 static const int * pfcp_up_function_features_flags[] = {
1351 &hf_pfcp_b1_b7_spare,
1355 /* Octet 5 TREU HEEU PFDM FTUP TRST DLBD DDND BUCP*/
1356 /* Octet 6 Spare Spare Spare Spare Spare Spare Spare EMPU*/
1357 proto_tree_add_bitmask_with_flags(tree, tvb, offset, hf_pfcp_up_function_features,
1358 ett_pfcp_up_function_features, pfcp_up_function_features_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT);
1361 if (offset < length) {
1362 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
1367 * 8.2.26 Apply Action
1370 dissect_pfcp_apply_action(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
1374 static const int * pfcp_apply_action_flags[] = {
1375 &hf_pfcp_spare_b7_b5,
1376 &hf_pfcp_apply_action_b4_dupl,
1377 &hf_pfcp_apply_action_b3_nocp,
1378 &hf_pfcp_apply_action_b2_buff,
1379 &hf_pfcp_apply_action_b1_forw,
1380 &hf_pfcp_apply_action_b0_drop,
1383 /* Octet 5 Spare Spare Spare DUPL NOCP BUFF FORW DROP */
1384 proto_tree_add_bitmask_with_flags(tree, tvb, offset, hf_pfcp_apply_action_flags,
1385 ett_pfcp_apply_action_flags, pfcp_apply_action_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT | BMT_NO_TFS);
1388 if (offset < length) {
1389 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
1394 * 8.2.27 Downlink Data Service Information
1397 dissect_pfcp_dl_data_service_inf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
1402 static const int * pfcp_dl_data_service_inf_flags[] = {
1403 &hf_pfcp_spare_b7_b1,
1407 /* Octet 5 Spare PPI */
1408 proto_tree_add_bitmask_with_flags_ret_uint64(tree, tvb, offset, hf_pfcp_pfcp_dl_data_service_inf_flags,
1409 ett_pfcp_dl_data_service_inf, pfcp_dl_data_service_inf_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT | BMT_NO_TFS, &flags);
1411 /* The PPI flag in octet 5 indicates whether the Paging Policy Indication value in octet 'm' shall be present */
1412 if ((flags & 0x1) == 1) {
1413 /* m Spare Paging Policy Indication value
1414 * encoded as the DSCP in TOS (IPv4) or TC (IPv6) information received in the IP payload of the GTP-U packet
1415 * from the PGW (see IETF RFC 2474
1417 proto_tree_add_item(tree, hf_pfcp_spare_b7_b6, tvb, offset, 1, ENC_BIG_ENDIAN);
1418 proto_tree_add_item(tree, hf_pfcp_ppi, tvb, offset, 1, ENC_BIG_ENDIAN);
1422 if (offset < length) {
1423 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
1428 * 8.2.28 Downlink Data Notification Delay
1431 dissect_pfcp_dl_data_notification_delay(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type _U_)
1435 /* Octet 5 Delay Value in integer multiples of 50 millisecs, or zero */
1436 proto_tree_add_item_ret_uint(tree, hf_pfcp_dl_data_notification_delay, tvb, offset, 1, ENC_BIG_ENDIAN, &value);
1439 proto_item_append_text(item, "%u ms", value * 50);
1441 if (offset < length) {
1442 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
1447 * 8.2.29 DL Buffering Duration
1449 static const value_string pfcp_timer_unit_vals[] = {
1450 { 0, "value is incremented in multiples of 2 seconds" },
1451 { 1, "value is incremented in multiples of 1 minute" },
1452 { 2, "value is incremented in multiples of 10 minutes" },
1453 { 3, "value is incremented in multiples of 1 hour" },
1454 { 4, "value is incremented in multiples of 10 hour" },
1455 { 5, "values shall be interpreted as multiples of 1 minute(version 14.0.0)" },
1456 { 6, "values shall be interpreted as multiples of 1 minute(version 14.0.0)" },
1457 { 7, "value indicates that the timer is infinite" },
1462 dissect_pfcp_dl_buffering_dur(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item, guint16 length _U_, guint8 message_type _U_)
1465 guint32 unit, value;
1467 /* Octet 5 Timer unit Timer value */
1468 proto_tree_add_item_ret_uint(tree, hf_pfcp_timer_unit, tvb, offset, 1, ENC_BIG_ENDIAN, &unit);
1469 proto_tree_add_item_ret_uint(tree, hf_pfcp_timer_value, tvb, offset, 1, ENC_BIG_ENDIAN, &value);
1475 proto_item_append_text(item, "%u s", value * 2);
1478 proto_item_append_text(item, "%u min", value);
1481 proto_item_append_text(item, "%u min", value * 10);
1484 proto_item_append_text(item, "%u hours", value);
1487 proto_item_append_text(item, "%u hours", value * 10);
1490 proto_item_append_text(item, "%u Infinite", value);
1494 proto_item_append_text(item, "%u min", value * 10);
1497 if ((unit != 7) && (value == 0)) {
1498 proto_item_append_text(item, " Stopped");
1501 if (offset < length) {
1502 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
1508 * 8.2.30 DL Buffering Suggested Packet Count
1511 dissect_pfcp_dl_buffering_suggested_packet_count(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
1513 /* Octet 5 to n+4 Packet Count Value
1514 * The length shall be set to 1 or 2 octets.
1516 proto_tree_add_item(tree, hf_pfcp_packet_count, tvb, 0, length, ENC_BIG_ENDIAN);
1519 * 8.2.31 SxSMReq-Flags
1522 dissect_pfcp_sxsmreq_flags(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
1526 static const int * pfcp_sxsmreq_flags[] = {
1527 &hf_pfcp_spare_b7_b3,
1533 /* Octet 5 Spare Spare Spare Spare Spare QAURR SNDEM DROBU */
1534 proto_tree_add_bitmask_with_flags(tree, tvb, offset, hf_pfcp_sxsmreq_flags,
1535 ett_pfcp_sxsmreq, pfcp_sxsmreq_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT);
1538 if (offset < length) {
1539 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
1544 * 8.2.32 SxSRRsp-Flags
1547 dissect_pfcp_sxsrrsp_flags(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
1551 static const int * pfcp_sxsrrsp_flags[] = {
1552 &hf_pfcp_spare_b7_b1,
1556 /* Octet 5 Spare Spare Spare Spare Spare Spare Spare DROBU */
1557 proto_tree_add_bitmask_with_flags(tree, tvb, offset, hf_pfcp_sxsrrsp_flags,
1558 ett_pfcp_sxsrrsp, pfcp_sxsrrsp_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT);
1561 if (offset < length) {
1562 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
1568 * 8.2.33 Sequence Number
1571 dissect_pfcp_sequence_number(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item, guint16 length _U_, guint8 message_type _U_)
1574 /* Octet 5 to 8 Sequence Number */
1575 proto_tree_add_item_ret_uint(tree, hf_pfcp_sequence_number, tvb, 0, 4, ENC_BIG_ENDIAN, &value);
1577 proto_item_append_text(item, "%u", value);
1585 dissect_pfcp_metric(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item, guint16 length _U_, guint8 message_type _U_)
1588 /* Octet 5 Metric */
1589 proto_tree_add_item_ret_uint(tree, hf_pfcp_metric, tvb, 0, 1, ENC_BIG_ENDIAN, &value);
1591 proto_item_append_text(item, "%u", value);
1599 dissect_pfcp_timer(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item, guint16 length _U_, guint8 message_type _U_)
1602 guint32 unit, value;
1604 /* Octet 5 Timer unit Timer value */
1605 proto_tree_add_item_ret_uint(tree, hf_pfcp_timer_unit, tvb, offset, 1, ENC_BIG_ENDIAN, &unit);
1606 proto_tree_add_item_ret_uint(tree, hf_pfcp_timer_value, tvb, offset, 1, ENC_BIG_ENDIAN, &value);
1612 proto_item_append_text(item, "%u s", value * 2);
1615 proto_item_append_text(item, "%u min", value);
1618 proto_item_append_text(item, "%u min", value * 10);
1621 proto_item_append_text(item, "%u hours", value);
1624 proto_item_append_text(item, "%u hours", value * 10);
1627 proto_item_append_text(item, "%u Infinite", value);
1631 proto_item_append_text(item, "%u min", value * 10);
1634 if ((unit != 7) && (value == 0)) {
1635 proto_item_append_text(item, " Stopped");
1638 if (offset < length) {
1639 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
1645 * 8.2.36 Packet Detection Rule ID (PDR ID)
1648 decode_pfcp_pdr_id(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item, gint offset)
1651 /* Octet 5 to 6 Rule ID*/
1652 proto_tree_add_item_ret_uint(tree, hf_pfcp_pdr_id, tvb, offset, 2, ENC_BIG_ENDIAN, &rule_id);
1655 proto_item_append_text(item, "%u", rule_id);
1660 dissect_pfcp_pdr_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type _U_)
1664 offset = decode_pfcp_pdr_id(tvb, pinfo, tree, item, offset);
1666 if (offset < length) {
1667 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
1674 dissect_pfcp_f_seid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
1677 guint64 f_seid_flags;
1679 static const int * pfcp_f_seid_flags[] = {
1690 /* Octet 5 Spare Spare Spare Spare Spare Spare V4 V6*/
1691 proto_tree_add_bitmask_with_flags_ret_uint64(tree, tvb, offset, hf_pfcp_f_seid_flags,
1692 ett_pfcp_f_seid_flags, pfcp_f_seid_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT | BMT_NO_TFS, &f_seid_flags);
1695 if ((f_seid_flags & 0x3) == 0) {
1696 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_encoding_error, tvb, 0, 1);
1699 /* Octet 6 to 13 SEID */
1700 proto_tree_add_item(tree, hf_pfcp_seid, tvb, offset, 8, ENC_BIG_ENDIAN);
1702 /* IPv4 address (if present)*/
1703 if ((f_seid_flags & 0x2) == 2) {
1704 proto_tree_add_item(tree, hf_pfcp_f_seid_ipv4, tvb, offset, 4, ENC_BIG_ENDIAN);
1707 /* IPv6 address (if present)*/
1708 if ((f_seid_flags & 0x1) == 1) {
1709 proto_tree_add_item(tree, hf_pfcp_f_seid_ipv6, tvb, offset, 16, ENC_NA);
1712 if (offset < length) {
1713 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
1721 static const value_string pfcp_node_id_type_vals[] = {
1723 { 0, "IPv4 address" },
1724 { 1, "IPv6 address" },
1730 dissect_pfcp_node_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type _U_)
1732 int offset = 0, name_len, tmp;
1733 guint32 node_id_type;
1734 guint8 *fqdn = NULL;
1736 /* Octet 5 Spare Node ID Type*/
1737 proto_tree_add_item(tree, hf_pfcp_spare_h1, tvb, offset, 1, ENC_BIG_ENDIAN);
1738 proto_tree_add_item_ret_uint(tree, hf_pfcp_node_id_type, tvb, offset, 1, ENC_BIG_ENDIAN, &node_id_type);
1741 switch (node_id_type) {
1744 proto_tree_add_item(tree, hf_pfcp_node_id_ipv4, tvb, offset, 4, ENC_BIG_ENDIAN);
1745 proto_item_append_text(item, "IPv4 %s", tvb_ip_to_str(tvb, offset));
1750 proto_tree_add_item(tree, hf_pfcp_node_id_ipv6, tvb, offset, 16, ENC_NA);
1751 proto_item_append_text(item, "IPv6 %s", tvb_ip6_to_str(tvb, offset));
1755 /* FQDN, the Node ID value encoding shall be identical to the encoding of a FQDN
1756 * within a DNS message of section 3.1 of IETF RFC 1035 [27] but excluding the trailing zero byte.
1759 name_len = tvb_get_guint8(tvb, offset);
1760 /* NOTE 1: The FQDN field in the IE is not encoded as a dotted string as commonly used in DNS master zone files. */
1761 if (name_len < 0x40) {
1762 fqdn = tvb_get_string_enc(wmem_packet_scope(), tvb, offset + 1, length - 2, ENC_ASCII);
1764 if (name_len >= length - 2)
1767 name_len = name_len + fqdn[tmp] + 1;
1771 /* In case the FQDN field is incorrectly in dotted string form.*/
1773 fqdn = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, length - 1, ENC_ASCII);
1774 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_encoding_error, tvb, offset, length - 1);
1776 proto_tree_add_string(tree, hf_pfcp_node_id_fqdn, tvb, offset, length - 1, fqdn);
1777 proto_item_append_text(item, "%s", fqdn);
1778 offset += length - 1;
1785 if (offset < length) {
1786 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
1791 * 8.2.39 PFD Contents
1794 dissect_pfcp_pfd_contents(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
1800 static const int * pfcp_pfd_contents_flags[] = {
1801 &hf_pfcp_spare_b7_b4,
1808 /* Octet 5 Spare CP DN URL FD*/
1809 proto_tree_add_bitmask_with_flags_ret_uint64(tree, tvb, offset, hf_pfcp_pfd_contents_flags,
1810 ett_pfcp_measurement_method_flags, pfcp_pfd_contents_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT, &flags);
1813 /* Bit 1 - FD (Flow Description): If this bit is set to "1", then the Length of Flow Description
1814 * and the Flow Description fields shall be present
1816 if ((flags & 0x1) == 1) {
1817 /* The Flow Description field, when present, shall be encoded as an OctetString
1818 * as specified in subclause 6.4.3.7 of 3GPP TS 29.251
1820 /* m to (m+1) Length of Flow Description */
1821 proto_tree_add_item_ret_uint(tree, hf_pfcp_flow_desc_len, tvb, offset, 2, ENC_BIG_ENDIAN, &len);
1824 /* (m+2) to p Flow Description */
1825 proto_tree_add_item(tree, hf_pfcp_fd, tvb, offset, len, ENC_NA);
1830 /* Bit 2 - URL (URL): If this bit is set to "1", then the Length of URL and the URL fields shall be present */
1831 if ((flags & 0x2) == 2) {
1832 /* q to (q+1) Length of URL */
1833 proto_tree_add_item_ret_uint(tree, hf_pfcp_url_len, tvb, offset, 2, ENC_BIG_ENDIAN, &len);
1835 /* (q+2) to r URL */
1836 proto_tree_add_item(tree, hf_pfcp_url, tvb, offset, len, ENC_NA);
1841 /* Bit 3 - DN (Domain Name): If this bit is set to "1", then the Length of Domain Name and
1842 * the Domain Name fields shall be present
1844 if ((flags & 0x4) == 4) {
1845 /* s to (s+1) Length of Domain Name */
1846 proto_tree_add_item_ret_uint(tree, hf_pfcp_dn_len, tvb, offset, 2, ENC_BIG_ENDIAN, &len);
1848 /* (s+2) to t Domain Name */
1849 proto_tree_add_item(tree, hf_pfcp_dn, tvb, offset, len, ENC_NA);
1853 /* Bit 4 - CP (Custom PFD Content): If this bit is set to "1", then the Length of Custom PFD Content and
1854 * the Custom PFD Content fields shall be present
1856 if ((flags & 0x8) == 8) {
1857 /* u to (u+1) Length of Custom PFD Content */
1858 proto_tree_add_item_ret_uint(tree, hf_pfcp_cp_len, tvb, offset, 2, ENC_BIG_ENDIAN, &len);
1860 /* (u+2) to v Custom PFD Content */
1861 proto_tree_add_item(tree, hf_pfcp_cp, tvb, offset, len, ENC_NA);
1865 if (offset < length) {
1866 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
1871 * 8.2.40 Measurement Method
1874 dissect_pfcp_measurement_method(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
1878 static const int * pfcp_measurement_method_flags[] = {
1879 &hf_pfcp_spare_b7_b3,
1885 /* Octet 5 Spare Spare Spare Spare Spare EVENT VOLUM DURAT*/
1886 proto_tree_add_bitmask_with_flags(tree, tvb, offset, hf_pfcp_measurement_method_flags,
1887 ett_pfcp_measurement_method_flags, pfcp_measurement_method_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT);
1890 if (offset < length) {
1891 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
1897 * 8.2.41 Usage Report Trigger
1900 dissect_pfcp_usage_report_trigger(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
1904 static const int * pfcp_usage_report_trigger_flags[] = {
1906 &hf_pfcp_usage_report_trigger_b15_immer,
1907 &hf_pfcp_usage_report_trigger_b14_droth,
1908 &hf_pfcp_usage_report_trigger_b13_stopt,
1909 &hf_pfcp_usage_report_trigger_b12_start,
1910 &hf_pfcp_usage_report_trigger_b11_quhti,
1911 &hf_pfcp_usage_report_trigger_b10_timth,
1912 &hf_pfcp_usage_report_trigger_b9_volth,
1913 &hf_pfcp_usage_report_trigger_b8_perio,
1914 &hf_pfcp_usage_report_trigger_b7_b6_spare,
1915 &hf_pfcp_usage_report_trigger_b5_envcl,
1916 &hf_pfcp_usage_report_trigger_b4_monit,
1917 &hf_pfcp_usage_report_trigger_b3_termr,
1918 &hf_pfcp_usage_report_trigger_b2_liusa,
1919 &hf_pfcp_usage_report_trigger_b1_timqu,
1920 &hf_pfcp_usage_report_trigger_b0_volqu,
1923 /* Octet 5 IMMER DROTH STOPT START QUHTI TIMTH VOLTH PERIO*/
1924 /* Octet 6 Spare Spare ENVCL MONIT TERMR LIUSA TIMQU VOLQU*/
1925 proto_tree_add_bitmask_with_flags(tree, tvb, offset, hf_pfcp_usage_report_trigger,
1926 ett_pfcp_report_trigger, pfcp_usage_report_trigger_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT);
1929 if (offset < length) {
1930 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
1936 * 8.2.42 Measurement Period
1939 dissect_pfcp_measurement_period(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type _U_)
1943 /* 5 to 8 Measurement Period*/
1944 proto_tree_add_item_ret_uint(tree, hf_pfcp_measurement_period, tvb, offset, 4, ENC_BIG_ENDIAN, &value);
1947 proto_item_append_text(item, "%u", value);
1949 if (offset < length) {
1950 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
1955 * 8.2.43 Fully qualified PDN Connection Set Identifier (FQ-CSID)
1957 static const value_string pfcp_fq_csid_node_id_type_vals[] = {
1959 { 0, "Node-Address is a global unicast IPv4 address" },
1960 { 1, "Node-Address is a global unicast IPv6 address" },
1961 { 2, "Node-Address is a 4 octets long field" },
1966 dissect_pfcp_fq_csid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
1969 guint32 node_id_type, num_csid;
1971 /* Octet 5 FQ-CSID Node-ID Type Number of CSIDs= m*/
1972 proto_tree_add_item_ret_uint(tree, hf_pfcp_fq_csid_node_id_type, tvb, offset, 1, ENC_BIG_ENDIAN, &node_id_type);
1973 proto_tree_add_item_ret_uint(tree, hf_pfcp_num_csid, tvb, offset, 1, ENC_BIG_ENDIAN, &num_csid);
1976 /* 6 to p Node-Address */
1977 switch (node_id_type) {
1979 /* 0 indicates that Node-Address is a global unicast IPv4 address and p = 9 */
1980 proto_tree_add_item(tree, hf_pfcp_fq_csid_node_id_ipv4, tvb, offset, 4, ENC_BIG_ENDIAN);
1984 /* 1 indicates that Node-Address is a global unicast IPv6 address and p = 21 */
1985 proto_tree_add_item(tree, hf_pfcp_fq_csid_node_id_ipv6, tvb, offset, 16, ENC_NA);
1989 /* 2 indicates that Node-Address is a 4 octets long field with a 32 bit value stored in network order, and p= 9
1990 * Most significant 20 bits are the binary encoded value of (MCC * 1000 + MNC).
1991 * Least significant 12 bits is a 12 bit integer assigned by an operator to an MME, SGW-C, SGW-U, PGW-C or PGW-U
1993 proto_tree_add_item(tree, hf_pfcp_fq_csid_node_id_mcc_mnc, tvb, offset, 4, ENC_BIG_ENDIAN);
1994 proto_tree_add_item(tree, hf_pfcp_fq_csid_node_id_int, tvb, offset, 4, ENC_BIG_ENDIAN);
1998 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2002 while (num_csid > 0) {
2003 proto_tree_add_item(tree, hf_pfcp_fq_csid, tvb, offset, 2, ENC_BIG_ENDIAN);
2007 if (offset < length) {
2008 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2013 * 8.2.44 Volume Measurement
2016 dissect_pfcp_volume_measurement(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
2021 static const int * pfcp_volume_measurement_flags[] = {
2022 &hf_pfcp_spare_b7_b3,
2028 /* Octet 5 Spare DLVOL ULVOL TOVOL*/
2029 proto_tree_add_bitmask_with_flags_ret_uint64(tree, tvb, offset, hf_pfcp_volume_measurement,
2030 ett_pfcp_volume_measurement, pfcp_volume_measurement_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT, &flags);
2033 /* Bit 1 - TOVOL: If this bit is set to "1", then the Total Volume field shall be present*/
2034 if ((flags & 0x1) == 1) {
2035 /* m to (m+7) Total Volume */
2036 proto_tree_add_item(tree, hf_pfcp_vol_meas_tovol, tvb, offset, 8, ENC_BIG_ENDIAN);
2039 /* Bit 2 - ULVOL: If this bit is set to "1", then the Total Volume field shall be present*/
2040 if ((flags & 0x2) == 2) {
2041 /* p to (p+7) Uplink Volume */
2042 proto_tree_add_item(tree, hf_pfcp_vol_meas_ulvol, tvb, offset, 8, ENC_BIG_ENDIAN);
2045 /* Bit 3 - DLVOL: If this bit is set to "1", then the Total Volume field shall be present*/
2046 if ((flags & 0x4) == 4) {
2047 /*q to (q+7) Downlink Volume */
2048 proto_tree_add_item(tree, hf_pfcp_vol_meas_dlvol, tvb, offset, 8, ENC_BIG_ENDIAN);
2052 if (offset < length) {
2053 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2058 * 8.2.45 Duration Measurement
2061 dissect_pfcp_duration_measurement(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type _U_)
2065 /* 5 to 8 Duration value*/
2066 proto_tree_add_item_ret_uint(tree, hf_pfcp_duration_measurement, tvb, offset, 4, ENC_BIG_ENDIAN, &value);
2069 proto_item_append_text(item, "%u s", value);
2071 if (offset < length) {
2072 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2076 * 8.2.46 Time of First Packet
2079 dissect_pfcp_time_of_first_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type _U_)
2082 const gchar *time_str;
2084 /* Octets 5 to 8 shall be encoded in the same format as the first four octets of the 64-bit timestamp
2085 * format as defined in section 6 of IETF RFC 5905
2088 time_str = tvb_ntp_fmt_ts_sec(tvb, 0);
2089 proto_tree_add_string(tree, hf_pfcp_time_of_first_packet, tvb, offset, 4, time_str);
2090 proto_item_append_text(item, "%s", time_str);
2093 if (offset < length) {
2094 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2098 * 8.2.47 Time of Last Packet
2101 dissect_pfcp_time_of_last_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type _U_)
2104 const gchar *time_str;
2106 /* Octets 5 to 8 shall be encoded in the same format as the first four octets of the 64-bit timestamp
2107 * format as defined in section 6 of IETF RFC 5905
2110 time_str = tvb_ntp_fmt_ts_sec(tvb, 0);
2111 proto_tree_add_string(tree, hf_pfcp_time_of_last_packet, tvb, offset, 4, time_str);
2112 proto_item_append_text(item, "%s", time_str);
2115 if (offset < length) {
2116 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2120 * 8.2.48 Quota Holding Time
2123 dissect_pfcp_quota_holding_time(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type _U_)
2127 /* Octet 5 to 8 Time Quota value
2128 * TThe Time Quota value shall be encoded as an Unsigned32 binary integer value. It contains a duration in seconds
2130 proto_tree_add_item_ret_uint(tree, hf_pfcp_quota_holding_time, tvb, offset, 4, ENC_BIG_ENDIAN, &value);
2133 proto_item_append_text(item, "%u s", value);
2135 if (offset < length) {
2136 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2142 * 8.2.49 Dropped DL Traffic Threshold
2145 dissect_pfcp_dropped_dl_traffic_threshold(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
2150 static const int * pfcp_dropped_dl_traffic_threshold_flags[] = {
2151 &hf_pfcp_dropped_dl_traffic_threshold_b0_dlpa,
2154 /* Octet 5 Spare DLPA*/
2155 proto_tree_add_bitmask_with_flags_ret_uint64(tree, tvb, offset, hf_pfcp_dropped_dl_traffic_threshold,
2156 ett_pfcp_dropped_dl_traffic_threshold, pfcp_dropped_dl_traffic_threshold_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT, &flags_val);
2159 if ((flags_val & 0x1) == 1) {
2160 /* m to (m+7) Downlink Packets
2161 * DLPA: If this bit is set to "1", then the Downlink Packets field shall be present
2163 proto_tree_add_item(tree, hf_pfcp_downlink_packets, tvb, offset, 8, ENC_BIG_ENDIAN);
2166 if (offset < length) {
2167 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2171 * 8.2.50 Volume Quota
2174 dissect_pfcp_volume_quota(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
2179 static const int * pfcp_volume_quota_flags[] = {
2180 &hf_pfcp_spare_b7_b3,
2186 /* Octet 5 Spare DLVOL ULVOL TOVOL*/
2187 proto_tree_add_bitmask_with_flags_ret_uint64(tree, tvb, offset, hf_pfcp_volume_quota,
2188 ett_pfcp_volume_quota, pfcp_volume_quota_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT, &flags_val);
2191 /* The Total Volume, Uplink Volume and Downlink Volume fields shall be encoded as an Unsigned64 binary integer value.
2192 * They shall contain the total, uplink or downlink number of octets respectively.
2194 if ((flags_val & 0x1) == 1) {
2195 /* m to (m+7) Total Volume
2196 * TOVOL: If this bit is set to "1", then the Total Volume field shall be present
2198 proto_tree_add_item(tree, hf_pfcp_volume_quota_tovol, tvb, offset, 8, ENC_BIG_ENDIAN);
2201 if ((flags_val & 0x2) == 2) {
2202 /* p to (p+7) Uplink Volume
2203 * ULVOL: If this bit is set to "1", then the Uplink Volume field shall be present
2205 proto_tree_add_item(tree, hf_pfcp_volume_quota_ulvol, tvb, offset, 8, ENC_BIG_ENDIAN);
2208 if ((flags_val & 0x4) == 4) {
2209 /* q to (q+7) Downlink Volume
2210 * DLVOL: If this bit is set to "1", then the Downlink Volume field shall be present
2212 proto_tree_add_item(tree, hf_pfcp_volume_quota_dlvol, tvb, offset, 8, ENC_BIG_ENDIAN);
2216 if (offset < length) {
2217 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2224 dissect_pfcp_time_quota(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type _U_)
2228 /* Octet 5 to 8 Time Quota value
2229 * TThe Time Quota value shall be encoded as an Unsigned32 binary integer value. It contains a duration in seconds
2231 proto_tree_add_item_ret_uint(tree, hf_pfcp_time_quota, tvb, offset, 4, ENC_BIG_ENDIAN, &value);
2234 proto_item_append_text(item, "%u s", value);
2236 if (offset < length) {
2237 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2245 dissect_pfcp_start_time(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type _U_)
2247 const gchar *time_str;
2250 /* The Start Time field shall contain a UTC time. Octets 5 to 8 are encoded in the same format as
2251 * the first four octets of the 64-bit timestamp format as defined in section 6 of IETF RFC 5905 [26].
2253 time_str = tvb_ntp_fmt_ts_sec(tvb, 0);
2254 proto_tree_add_string(tree, hf_pfcp_start_time, tvb, offset, 4, time_str);
2255 proto_item_append_text(item, "%s", time_str);
2258 if (offset < length) {
2259 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2267 dissect_pfcp_end_time(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type _U_)
2269 const gchar *time_str;
2272 /* The End Time field shall contain a UTC time. Octets 5 to 8 are encoded in the same format as
2273 * the first four octets of the 64-bit timestamp format as defined in section 6 of IETF RFC 5905 [26].
2275 time_str = tvb_ntp_fmt_ts_sec(tvb, 0);
2276 proto_tree_add_string(tree, hf_pfcp_end_time, tvb, offset, 4, time_str);
2277 proto_item_append_text(item, "%s", time_str);
2280 if (offset < length) {
2281 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2290 decode_pfcp_urr_id(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint offset)
2293 /* Octet 5 to 8 URR ID value
2294 * The bit 8 of octet 5 is used to indicate if the Rule ID is dynamically allocated by the CP function
2295 * or predefined in the UP function. If set to 0, it indicates that the Rule is dynamically provisioned
2296 * by the CP Function. If set to 1, it indicates that the Rule is predefined in the UP Function
2298 proto_tree_add_item(tree, hf_pfcp_urr_id_flg, tvb, offset, 4, ENC_BIG_ENDIAN);
2299 proto_tree_add_item_ret_uint(tree, hf_pfcp_urr_id, tvb, offset, 4, ENC_BIG_ENDIAN, &urr_id);
2302 proto_item_append_text(item, "%s %u",
2303 ((urr_id & 80000000) ? pfcp_id_predef_dynamic_tfs.true_string : pfcp_id_predef_dynamic_tfs.false_string),
2304 (urr_id & 0x7fffffff));
2309 dissect_pfcp_urr_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
2313 offset = decode_pfcp_urr_id(tvb, pinfo, tree, item, offset);
2315 if (offset < length) {
2316 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2321 * 8.2.55 Linked URR ID IE
2324 dissect_pfcp_linked_urr_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type _U_)
2328 /* Octet 5 to 8 Linked URR ID value
2329 * The Linked URR ID value shall be encoded as an Unsigned32 binary integer value
2331 proto_tree_add_item_ret_uint(tree, hf_pfcp_linked_urr_id, tvb, offset, 4, ENC_BIG_ENDIAN, &value);
2334 proto_item_append_text(item, "%u s", value);
2336 if (offset < length) {
2337 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2342 * 8.2.56 Outer Header Creation
2345 static const value_string pfcp_outer_hdr_desc_vals[] = {
2347 { 0x0100, "GTP-U/UDP/IPv4 " },
2348 { 0x0200, "GTP-U/UDP/IPv6 " },
2349 { 0x0300, "GTP-U/UDP/IPv4/IPv6 " },
2350 { 0x0400, "UDP/IPv4 " },
2351 { 0x0800, "UDP/IPv6 " },
2352 { 0x0C00, "UDP/IPv4/IPv6 " },
2357 dissect_pfcp_outer_header_creation(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
2362 /* Octet 5 Outer Header Creation Description */
2363 proto_tree_add_item_ret_uint(tree, hf_pfcp_outer_hdr_desc, tvb, offset, 2, ENC_BIG_ENDIAN, &value);
2367 * The TEID field shall be present if the Outer Header Creation Description requests the creation of a GTP-U header.
2368 * Otherwise it shall not be present
2370 if ((value & 0x0100) || (value & 0x0200)) {
2371 proto_tree_add_item(tree, hf_pfcp_outer_hdr_creation_teid, tvb, offset, 4, ENC_BIG_ENDIAN);
2377 * The IPv4 Address field shall be present if the Outer Header Creation Description requests the creation of a IPv4 header
2379 if ((value & 0x0100) || (value & 0x0400)) {
2380 proto_tree_add_item(tree, hf_pfcp_outer_hdr_creation_ipv4, tvb, offset, 4, ENC_BIG_ENDIAN);
2386 * The IPv6 Address field shall be present if the Outer Header Creation Description requests the creation of a IPv6 header
2388 if ((value & 0x0200) || (value & 0x0800)) {
2389 proto_tree_add_item(tree, hf_pfcp_outer_hdr_creation_ipv6, tvb, offset, 16, ENC_NA);
2394 * r to (r+1) Port Number
2395 * The Port Number field shall be present if the Outer Header Creation Description requests the creation of a UDP/IP header
2397 if ((value & 0x0400) || (value & 0x0800)) {
2398 proto_tree_add_item(tree, hf_pfcp_outer_hdr_creation_port, tvb, offset, 2, ENC_BIG_ENDIAN);
2402 if (offset < length) {
2403 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2411 decode_pfcp_bar_id(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 offset)
2413 /* Octet 5 BAR ID value
2414 * The BAR ID value shall be encoded as a binary integer value
2416 proto_tree_add_item(tree, hf_pfcp_bar_id, tvb, offset, 1, ENC_BIG_ENDIAN);
2422 dissect_pfcp_bar_id(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
2426 offset = decode_pfcp_bar_id(tvb, pinfo, tree, item, offset);
2428 if (offset < length) {
2429 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2435 * 8.2.58 CP Function Features
2438 dissect_pfcp_cp_function_features(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
2442 static const int * pfcp_cp_function_features_flags[] = {
2451 proto_tree_add_bitmask_with_flags(tree, tvb, offset, hf_pfcp_cp_function_features,
2452 ett_pfcp_cp_function_features, pfcp_cp_function_features_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT);
2455 if (offset < length) {
2456 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2462 * 8.2.59 Usage Information
2465 dissect_pfcp_usage_information(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
2469 static const int * pfcp_usage_information_flags[] = {
2477 /* Octet 5 Spare UBE UAE AFT BEF */
2478 proto_tree_add_bitmask_with_flags(tree, tvb, offset, hf_pfcp_usage_information,
2479 ett_pfcp_usage_information, pfcp_usage_information_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT);
2482 if (offset < length) {
2483 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2489 * 8.2.60 Application Instance ID
2492 dissect_pfcp_application_instance_id(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
2494 /* Octet 5 5 to (n+4) Application Instance Identifier
2495 * The Application Instance Identifier shall be encoded as an OctetString (see 3GPP TS 29.212)
2497 proto_tree_add_item(tree, hf_pfcp_application_instance_id, tvb, 0, length, ENC_NA);
2501 * 8.2.61 Flow Information
2503 static const value_string pfcp_flow_dir_vals[] = {
2504 { 0, "Unspecified" },
2505 { 1, "Downlink (traffic to the UE)" },
2506 { 2, "Uplink (traffic from the UE)" },
2507 { 3, "Bidirectional" },
2512 dissect_pfcp_flow_inf(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
2516 /* Octet 5 Spare Flow Direction */
2517 proto_tree_add_item(tree, hf_pfcp_spare_b7_b3, tvb, offset, 1, ENC_BIG_ENDIAN);
2518 proto_tree_add_item(tree, hf_pfcp_flow_dir, tvb, offset, 1, ENC_BIG_ENDIAN);
2521 /* 6 to 7 Length of Flow Description */
2522 proto_tree_add_item_ret_uint(tree, hf_pfcp_flow_desc_len, tvb, offset, 2, ENC_BIG_ENDIAN, &len);
2525 * The Flow Description field, when present, shall be encoded as an OctetString
2526 * as specified in subclause 5.4.2 of 3GPP TS 29.212
2528 proto_tree_add_item(tree, hf_pfcp_fd, tvb, offset, len, ENC_NA);
2531 if (offset < length) {
2532 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2538 * 8.2.62 UE IP Address
2540 static const true_false_string pfcp_ue_ip_add_sd_flag_vals = {
2541 "Destination IP address",
2542 "Source IP address",
2546 dissect_pfcp_ue_ip_address(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
2549 guint64 ue_ip_address_flags;
2551 static const int * pfcp_ue_ip_address_flags[] = {
2552 &hf_pfcp_spare_b7_b3,
2553 &hf_pfcp_ue_ip_address_flag_b2_sd,
2554 &hf_pfcp_ue_ip_address_flag_b1_v4,
2555 &hf_pfcp_ue_ip_address_flag_b0_v6,
2558 /* Octet 5 Spare S/D V4 V6*/
2559 proto_tree_add_bitmask_with_flags_ret_uint64(tree, tvb, offset, hf_pfcp_ue_ip_address_flags,
2560 ett_pfcp_ue_ip_address_flags, pfcp_ue_ip_address_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT | BMT_NO_TFS, &ue_ip_address_flags);
2563 /* IPv4 address (if present)*/
2564 if ((ue_ip_address_flags & 0x2) == 2) {
2565 proto_tree_add_item(tree, hf_pfcp_ue_ip_addr_ipv4, tvb, offset, 4, ENC_BIG_ENDIAN);
2568 /* IPv6 address (if present)*/
2569 if ((ue_ip_address_flags & 0x1) == 1) {
2570 proto_tree_add_item(tree, hf_pfcp_ue_ip_add_ipv6, tvb, offset, 16, ENC_NA);
2574 if (offset < length) {
2575 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2580 * 8.2.63 Packet Rate
2582 static const value_string pfcp_pr_time_unit_vals[] = {
2592 dissect_pfcp_packet_rate(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
2597 static const int * pfcp_packet_rate_flags[] = {
2598 &hf_pfcp_spare_b7_b2,
2603 /* Octet 5 Spare DLPR ULPR */
2604 proto_tree_add_bitmask_with_flags_ret_uint64(tree, tvb, offset, hf_pfcp_packet_rate,
2605 ett_pfcp_packet_rate, pfcp_packet_rate_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT, &flags);
2608 /* Bit 1 - ULPR (Uplink Packet Rate): If this bit is set to "1", then octets m to (m+2) shall be present */
2609 if ((flags & 0x1) == 1) {
2611 proto_tree_add_item(tree, hf_pfcp_spare_b7_b3, tvb, offset, 1, ENC_BIG_ENDIAN);
2612 proto_tree_add_item(tree, hf_pfcp_ul_time_unit, tvb, offset, 1, ENC_BIG_ENDIAN);
2614 /* (m+1) to (m+2) Maximum Uplink Packet Rate */
2615 proto_tree_add_item(tree, hf_pfcp_max_ul_pr, tvb, offset, 2, ENC_BIG_ENDIAN);
2618 /* Bit 2 - DLPR (Downlink Packet Rate): If this bit is set to "1", then octets p to (p+2) shall be present*/
2619 if ((flags & 0x2) == 2) {
2620 proto_tree_add_item(tree, hf_pfcp_spare_b7_b3, tvb, offset, 1, ENC_BIG_ENDIAN);
2621 proto_tree_add_item(tree, hf_pfcp_dl_time_unit, tvb, offset, 1, ENC_BIG_ENDIAN);
2623 /* (m+1) to (m+2) Maximum Uplink Packet Rate */
2624 proto_tree_add_item(tree, hf_pfcp_max_dl_pr, tvb, offset, 2, ENC_BIG_ENDIAN);
2628 if (offset < length) {
2629 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2635 * 8.2.64 Outer Header Removal
2637 static const value_string pfcp_out_hdr_desc_vals[] = {
2638 { 0, "GTP-U/UDP/IPv4" },
2639 { 1, "GTP-U/UDP/IPv6" },
2646 dissect_pfcp_outer_hdr_rem(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
2650 /* Octet 5 to (n+4) Application Identifier
2651 * The Application Identifier shall be encoded as an OctetString (see 3GPP TS 29.212)
2653 proto_tree_add_item_ret_uint(tree, hf_pfcp_out_hdr_desc, tvb, offset, 1, ENC_BIG_ENDIAN, &value);
2656 proto_item_append_text(item, "%s", val_to_str_const(value, pfcp_out_hdr_desc_vals, "Unknown"));
2658 if (offset < length) {
2659 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2663 * 8.2.65 Recovery Time Stamp
2667 dissect_pfcp_recovery_time_stamp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type _U_)
2669 const gchar *time_str;
2672 /* indicates the UTC time when the node started. Octets 5 to 8 are encoded in the same format as
2673 * the first four octets of the 64-bit timestamp format as defined in section 6 of IETF RFC 5905 [26].
2675 time_str = tvb_ntp_fmt_ts_sec(tvb, 0);
2676 proto_tree_add_string(tree, hf_pfcp_recovery_time_stamp, tvb, offset, 4, time_str);
2677 proto_item_append_text(item, "%s", time_str);
2680 if (offset < length) {
2681 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2686 * 8.2.66 DL Flow Level Marking
2689 dissect_pfcp_dl_flow_level_marking(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
2694 static const int * pfcp_dl_flow_level_marking_flags[] = {
2695 &hf_pfcp_spare_b7_b2,
2700 /* Octet 5 Spare SCI TTC*/
2701 proto_tree_add_bitmask_with_flags_ret_uint64(tree, tvb, offset, hf_pfcp_dl_flow_level_marking,
2702 ett_pfcp_pfcp_dl_flow_level_marking, pfcp_dl_flow_level_marking_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT, &flags_val);
2705 /* Bit 1 - TTC (ToS/Traffic Class): If this bit is set to "1",
2706 * then the ToS/Traffic Class field shall be present
2708 if ((flags_val & 0x1) == 1) {
2709 /* m to (m+1) ToS/Traffic Class
2710 * The ToS/Traffic Class shall be encoded on two octets as an OctetString.
2711 * The first octet shall contain the IPv4 Type-of-Service or the IPv6 Traffic-Class field and
2712 * the second octet shall contain the ToS/Traffic Class mask field
2714 proto_tree_add_item(tree, hf_pfcp_tos_traf_class, tvb, offset, 2, ENC_BIG_ENDIAN);
2717 /* SCI (Service Class Indicator): If this bit is set to "1",
2718 * then the Service Class Indicator field shall be present
2720 if ((flags_val & 0x2) == 2) {
2721 /* Octets p and (p+1) of the Service Class Indicator field, when present,
2722 * shall be encoded respectively as octets 2 and 3 of the Service Class Indicator Extension Header
2723 * specified in Figure 5.2.2.3-1 of 3GPP TS 29.281
2725 proto_tree_add_item(tree, hf_pfcp_sci, tvb, offset, 2, ENC_BIG_ENDIAN);
2729 if (offset < length) {
2730 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2736 * 8.2.67 Header Enrichment
2738 static const value_string pfcp_header_type_vals[] = {
2744 dissect_pfcp_header_enrichment(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
2748 /* Octet 5 Spare Header Type
2750 proto_tree_add_item(tree, hf_pfcp_spare_b7_b5, tvb, offset, 1, ENC_BIG_ENDIAN);
2751 proto_tree_add_item(tree, hf_pfcp_header_type, tvb, offset, 1, ENC_BIG_ENDIAN);
2754 /* 6 Length of Header Field Name */
2755 proto_tree_add_item_ret_uint(tree, hf_pfcp_hf_len, tvb, offset, 1, ENC_BIG_ENDIAN, &len);
2758 /* 7 to m Header Field Name
2759 * Header Field Name shall be encoded as an OctetString
2761 proto_tree_add_item(tree, hf_pfcp_hf_name, tvb, offset, len, ENC_NA);
2764 /* p Length of Header Field Value*/
2765 proto_tree_add_item_ret_uint(tree, hf_pfcp_hf_val_len, tvb, offset, 1, ENC_BIG_ENDIAN, &len);
2768 /* (p+1) to q Header Field Value */
2769 proto_tree_add_item(tree, hf_pfcp_hf_val, tvb, offset, len, ENC_NA);
2772 if (offset < length) {
2773 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2778 * 8.2.68 Measurement Information
2781 dissect_pfcp_measurement_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
2785 static const int * pfcp_measurement_info_flags[] = {
2786 &hf_pfcp_spare_b7_b2,
2791 /* Octet 5 Spare INAM MBQE */
2792 proto_tree_add_bitmask_with_flags(tree, tvb, offset, hf_pfcp_measurement_info,
2793 ett_pfcp_measurement_info, pfcp_measurement_info_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT);
2796 if (offset < length) {
2797 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2802 * 8.2.69 Node Report Type
2805 dissect_pfcp_node_report_type(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
2809 static const int * pfcp_node_report_type_flags[] = {
2810 &hf_pfcp_spare_b7_b1,
2814 /* Octet 5 Spare INAM MBQE */
2815 proto_tree_add_bitmask_with_flags(tree, tvb, offset, hf_pfcp_node_report_type,
2816 ett_pfcp_node_report_type, pfcp_node_report_type_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT);
2819 if (offset < length) {
2820 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2825 * 8.2.70 Remote GTP-U Peer
2828 dissect_pfcp_remote_gtp_u_peer(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type _U_)
2833 static const int * pfcp_remote_gtp_u_peer_flags[] = {
2834 &hf_pfcp_spare_b7_b2,
2835 &hf_pfcp_gtp_u_peer_flag_b1_v4,
2836 &hf_pfcp_gtp_u_peer_flag_b0_v6,
2839 /* Octet 5 Spare V4 V6*/
2840 proto_tree_add_bitmask_with_flags_ret_uint64(tree, tvb, offset, hf_pfcp_remote_gtp_u_peer,
2841 ett_pfcp_remote_gtp_u_peer, pfcp_remote_gtp_u_peer_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT | BMT_NO_TFS, &flags);
2844 /* IPv6 address (if present)*/
2845 if ((flags & 0x1) == 1) {
2846 proto_tree_add_item(tree, hf_pfcp_remote_gtp_u_peer_ipv6, tvb, offset, 16, ENC_NA);
2847 proto_item_append_text(item, "IPv6 %s", tvb_ip6_to_str(tvb, offset));
2850 /* IPv4 address (if present)*/
2851 if ((flags & 0x2) == 2) {
2852 proto_tree_add_item(tree, hf_pfcp_remote_gtp_u_peer_ipv4, tvb, offset, 4, ENC_BIG_ENDIAN);
2853 proto_item_append_text(item, "IPv4 %s", tvb_ip_to_str(tvb, offset));
2857 if (offset < length) {
2858 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2867 dissect_pfcp_ur_seqn(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 message_type _U_)
2872 * The UR-SEQN value shall be encoded as an Unsigned32 binary integer value
2874 proto_tree_add_item_ret_uint(tree, hf_pfcp_ur_seqn, tvb, 0, 4, ENC_BIG_ENDIAN, &value);
2876 proto_item_append_text(item, "%u", value);
2882 * 8.2.72 Activate Predefined Rules
2885 dissect_pfcp_act_predef_rules(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
2888 /* Octet 5 to (n+4) Predefined Rules Name
2889 * The Predefined Rules Name field shall be encoded as an OctetString
2891 proto_tree_add_item(tree, hf_pfcp_predef_rules_name, tvb, offset, length, ENC_NA);
2894 * 8.2.73 Deactivate Predefined Rules
2897 dissect_pfcp_deact_predef_rules(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
2900 /* Octet 5 to (n+4) Predefined Rules Name
2901 * The Predefined Rules Name field shall be encoded as an OctetString
2903 proto_tree_add_item(tree, hf_pfcp_predef_rules_name, tvb, offset, length, ENC_NA);
2909 decode_pfcp_far_id(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, gint offset)
2912 /* Octet 5 to 8 FAR ID value
2913 * The bit 8 of octet 5 is used to indicate if the Rule ID is dynamically allocated
2914 * by the CP function or predefined in the UP function. If set to 0, it indicates that
2915 * the Rule is dynamically provisioned by the CP Function. If set to 1, it indicates that
2916 * the Rule is predefined in the UP Function.
2918 proto_tree_add_item(tree, hf_pfcp_far_id_flg, tvb, offset, 4, ENC_BIG_ENDIAN);
2919 proto_tree_add_item_ret_uint(tree, hf_pfcp_far_id, tvb, offset, 4, ENC_BIG_ENDIAN, &far_id);
2922 proto_item_append_text(item, "%s %u",
2923 ((far_id&80000000)? pfcp_id_predef_dynamic_tfs.true_string : pfcp_id_predef_dynamic_tfs.false_string),
2924 (far_id & 0x7fffffff));
2929 dissect_pfcp_far_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
2933 offset = decode_pfcp_far_id(tvb, pinfo, tree, item, offset);
2935 if (offset < length) {
2936 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2944 decode_pfcp_qer_id(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint offset)
2947 /* Octet 5 to 8 QER ID value
2948 * The bit 8 of octet 5 is used to indicate if the Rule ID is dynamically allocated by the CP function
2949 * or predefined in the UP function. If set to 0, it indicates that the Rule is dynamically provisioned
2950 * by the CP Function. If set to 1, it indicates that the Rule is predefined in the UP Function
2952 proto_tree_add_item(tree, hf_pfcp_qer_id_flg, tvb, offset, 4, ENC_BIG_ENDIAN);
2953 proto_tree_add_item_ret_uint(tree, hf_pfcp_qer_id, tvb, offset, 4, ENC_BIG_ENDIAN, &qer_id);
2956 proto_item_append_text(item, "%s %u",
2957 ((qer_id & 80000000) ? pfcp_id_predef_dynamic_tfs.true_string : pfcp_id_predef_dynamic_tfs.false_string),
2958 (qer_id & 0x7fffffff));
2964 dissect_pfcp_qer_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
2968 offset = decode_pfcp_qer_id(tvb, pinfo, tree, item, offset);
2970 if (offset < length) {
2971 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2979 dissect_pfcp_oci_flags(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
2983 static const int * pfcp_oci_flags_flags[] = {
2984 &hf_pfcp_spare_b7_b1,
2988 /* Octet 5 Spare AOCI */
2989 proto_tree_add_bitmask_with_flags(tree, tvb, offset, hf_pfcp_oci_flags,
2990 ett_pfcp_oci_flags, pfcp_oci_flags_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT);
2993 if (offset < length) {
2994 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
3000 * 8.2.77 Sx Association Release Request
3003 dissect_pfcp_sx_assoc_rel_req(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
3007 static const int * pfcp_sx_assoc_rel_req_flags[] = {
3008 &hf_pfcp_spare_b7_b1,
3012 /* Octet 5 Spare SARR */
3013 proto_tree_add_bitmask_with_flags(tree, tvb, offset, hf_pfcp_sx_assoc_rel_req_flags,
3014 ett_sx_assoc_rel_req_flags, pfcp_sx_assoc_rel_req_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT);
3017 if (offset < length) {
3018 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
3024 * 8.2.78 Graceful Release Period
3027 dissect_pfcp_graceful_release_period(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item, guint16 length _U_, guint8 message_type _U_)
3030 guint32 unit, value;
3032 /* Octet 5 Timer unit Timer value */
3033 proto_tree_add_item_ret_uint(tree, hf_pfcp_timer_unit, tvb, offset, 1, ENC_BIG_ENDIAN, &unit);
3034 proto_tree_add_item_ret_uint(tree, hf_pfcp_timer_value, tvb, offset, 1, ENC_BIG_ENDIAN, &value);
3040 proto_item_append_text(item, "%u s", value * 2);
3043 proto_item_append_text(item, "%u min", value);
3046 proto_item_append_text(item, "%u min", value * 10);
3049 proto_item_append_text(item, "%u hours", value);
3052 proto_item_append_text(item, "%u hours", value * 10);
3055 proto_item_append_text(item, "%u Infinite", value);
3059 proto_item_append_text(item, "%u min", value * 10);
3062 if ((unit != 7) && (value == 0)) {
3063 proto_item_append_text(item, " Stopped");
3066 if (offset < length) {
3067 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
3074 static const value_string pfcp_pdn_type_vals[] = {
3084 dissect_pfcp_pdn_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
3088 /* Octet 5 Application Identifier
3089 * The Application Identifier shall be encoded as an OctetString (see 3GPP TS 29.212)
3091 proto_tree_add_item_ret_uint(tree, hf_pfcp_pdn_type, tvb, offset, 1, ENC_BIG_ENDIAN, &value);
3094 proto_item_append_text(item, "%s", val_to_str_const(value, pfcp_pdn_type_vals, "Unknown"));
3096 if (offset < length) {
3097 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
3101 * 8.2.80 Failed Rule ID
3103 static const value_string pfcp_failed_rule_id_type_vals[] = {
3113 dissect_pfcp_failed_rule_id(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
3118 /* Octet 5 Rule ID Type */
3119 proto_tree_add_item_ret_uint(tree, hf_pfcp_failed_rule_id_type, tvb, offset, 1, ENC_BIG_ENDIAN, &rule_type);
3122 proto_item_append_text(item, "%s", val_to_str_const(rule_type, pfcp_failed_rule_id_type_vals, "Unknown"));
3124 /* 6 to p Rule ID value
3125 * The length and the value of the Rule ID value field shall be set as specified for the
3126 * PDR ID, FAR ID, QER ID, URR ID and BAR ID IE types respectively.
3128 switch (rule_type) {
3131 offset = decode_pfcp_pdr_id(tvb, pinfo, tree, item, offset);
3135 offset = decode_pfcp_far_id(tvb, pinfo, tree, item, offset);
3139 offset = decode_pfcp_qer_id(tvb, pinfo, tree, item, offset);
3143 offset = decode_pfcp_urr_id(tvb, pinfo, tree, item, offset);
3147 offset = decode_pfcp_bar_id(tvb, pinfo, tree, item, offset);
3153 if (offset < length) {
3154 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
3158 * 8.2.81 Time Quota Mechanism
3160 static const value_string pfcp_time_qouta_mechanism_bti_type_vals[] = {
3167 dissect_pfcp_time_qouta_mechanism(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
3172 /* Octet 5 BIT Type */
3173 proto_tree_add_item_ret_uint(tree, hf_pfcp_time_qouta_mechanism_bti_type, tvb, offset, 1, ENC_BIG_ENDIAN, &bti_type);
3176 proto_item_append_text(item, "%s", val_to_str_const(bti_type, pfcp_time_qouta_mechanism_bti_type_vals, "Unknown"));
3178 /* Base Time Interval
3179 * The Base Time Interval, shall be encoded as an Unsigned32
3180 * as specified in subclause 7.2.29 of 3GPP TS 32.299
3182 proto_tree_add_item(tree, hf_pfcp_time_qouta_mechanism_bti, tvb, offset, 4, ENC_BIG_ENDIAN);
3185 if (offset < length) {
3186 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
3190 * 8.2.82 User Plane IP Resource Information
3193 dissect_pfcp_user_plane_ip_resource_infomation(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
3196 guint64 upiri_flags_val;
3197 guint32 upiri_teid_range;
3199 static const int * pfcp_upiri_flags[] = {
3200 &hf_pfcp_spare_b7_b6,
3201 &hf_pfcp_upiri_flg_b5_assoni,
3202 &hf_pfcp_upiri_flg_b1_v6,
3203 &hf_pfcp_upiri_flg_b0_v4,
3206 /* Octet 5 Spare Spare ASSONI TEIDRI TEIDRI TEIDRI V6 V4*/
3207 proto_tree_add_bitmask_with_flags_ret_uint64(tree, tvb, offset, hf_pfcp_upiri_flags,
3208 ett_pfcp_upiri_flags, pfcp_upiri_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT | BMT_NO_TFS, &upiri_flags_val);
3210 /* The following flags are coded within Octet 5:
3211 * Bit 1 - V4: If this bit is set to "1" and the CH bit is not set, then the IPv4 address field shall be present,
3212 * otherwise the IPv4 address field shall not be present.
3213 * Bit 2 - V6: If this bit is set to "1" and the CH bit is not set, then the IPv6 address field shall be present,
3214 * otherwise the IPv6 address field shall not be present.
3215 * Bit 3-5 - TEIDRI (TEID Range Indication): the value of this field indicates the number of bits in the most significant
3216 * octet of a TEID that are used to partition the TEID range, e.g. if this field is set to "4", then the first
3217 * 4 bits in the TEID are used to partition the TEID range.
3218 * Bit 6 - ASSONI (Associated Network Instance): if this bit is set to "1", then the Network Instance field shall be present,
3219 * otherwise the Network Instance field shall not be present,
3220 * i.e. User Plane IP Resource Information provided can be used by CP function for any Network Instance of
3221 * GTP-U user plane in the UP function.
3224 /* Octet 5, bit 3-5, TEID Range Indication */
3225 proto_tree_add_item_ret_uint(tree, hf_pfcp_upiri_teidri, tvb, offset, 1, ENC_BIG_ENDIAN, &upiri_teid_range);
3228 if (upiri_teid_range > 0)
3230 /* Octet 6 TEID Range */
3231 proto_tree_add_item(tree, hf_pfcp_upiri_teid_range, tvb, offset, 1, ENC_BIG_ENDIAN);
3235 if ((upiri_flags_val & 0x1) == 1) {
3236 /* m to (m+3) IPv4 address */
3237 proto_tree_add_item(tree, hf_pfcp_upiri_ipv4, tvb, offset, 4, ENC_BIG_ENDIAN);
3240 if ((upiri_flags_val & 0x2) == 2) {
3241 /* p to (p+15) IPv6 address */
3242 proto_tree_add_item(tree, hf_pfcp_upiri_ipv6, tvb, offset, 16, ENC_NA);
3245 if ((upiri_flags_val & 0x20) == 32) {
3246 /* k to (l) Network Instance */
3247 proto_tree_add_item(tree, hf_pfcp_upiri_network_instance, tvb, offset, length - offset, ENC_NA);
3251 if (offset < length) {
3252 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
3258 * 8.2.83 User Plane Inactivity Timer
3261 dissect_pfcp_user_plane_inactivity_timer(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
3266 * The User Plane Inactivity Timer field shall be encoded as an Unsigned32 binary integer value.
3267 * The timer value "0" shall be interpreted as an indication that
3268 * user plane inactivity detection and reporting is stopped.
3271 /* 5 to 8 Inactivity Timer */
3272 proto_tree_add_item_ret_uint(tree, hf_pfcp_user_plane_inactivity_timer, tvb, offset, 4, ENC_BIG_ENDIAN, &value);
3276 proto_item_append_text(item, " (Stopped)");
3278 if (offset < length) {
3279 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
3284 /* Array of functions to dissect IEs
3285 * (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type)
3287 typedef struct _pfcp_ie {
3288 void(*decode) (tvbuff_t *, packet_info *, proto_tree *, proto_item *, guint16, guint8);
3291 static const pfcp_ie_t pfcp_ies[] = {
3292 /* 0 */ { dissect_pfcp_reserved },
3293 /* 1 */ { dissect_pfcp_create_pdr }, /* Create PDR Extendable / Table 7.5.2.2-1 */
3294 /* 2 */ { dissect_pfcp_pdi }, /* PDI Extendable / Table 7.5.2.2-2 */
3295 /* 3 */ { dissect_pfcp_create_far }, /* Create FAR Extendable / Table 7.5.2.3-1 */
3296 /* 4 */ { dissect_pfcp_forwarding_parameters }, /* Forwarding Parameters Extendable / Table 7.5.2.3-2 */
3297 /* 5 */ { dissect_pfcp_duplicating_parameters }, /* Duplicating Parameters Extendable / Table 7.5.2.3-3 */
3298 /* 6 */ { dissect_pfcp_create_urr }, /* Create URR Extendable / Table 7.5.2.4-1 */
3299 /* 7 */ { dissect_pfcp_create_qer }, /* Create QER Extendable / Table 7.5.2.5-1 */
3300 /* 8 */ { dissect_pfcp_created_pdr }, /* Created PDR Extendable / Table 7.5.3.2-1 */
3301 /* 9 */ { dissect_pfcp_update_pdr }, /* Update PDR Extendable / Table 7.5.4.2-1 */
3302 /* 10 */ { dissect_pfcp_update_far }, /* Update FAR Extendable / Table 7.5.4.3-1 */
3303 /* 11 */ { dissect_pfcp_upd_forwarding_param }, /* Update Forwarding Parameters Extendable / Table 7.5.4.3-2 */
3304 /* 12 */ { dissect_pfcp_update_bar }, /* Update BAR (Sx Session Report Response) Extendable / Table 7.5.9.2-1 */
3305 /* 13 */ { dissect_pfcp_update_urr }, /* Update URR Extendable / Table 7.5.4.4 */
3306 /* 14 */ { dissect_pfcp_update_qer }, /* Update QER Extendable / Table 7.5.4.5 */
3307 /* 15 */ { dissect_pfcp_remove_pdr }, /* Remove PDR Extendable / Table 7.5.4.6 */
3308 /* 16 */ { dissect_pfcp_remove_far }, /* Remove FAR Extendable / Table 7.5.4.7 */
3309 /* 17 */ { dissect_pfcp_remove_urr }, /* Remove URR Extendable / Table 7.5.4.8 */
3310 /* 18 */ { dissect_pfcp_remove_qer }, /* Remove QER Extendable / Table 7.5.4.9 */
3311 /* 19 */ { dissect_pfcp_cause }, /* Cause Fixed / Subclause 8.2.1 */
3312 /* 20 */ { dissect_pfcp_source_interface }, /* Source Interface Extendable / Subclause 8.2.2 */
3313 /* 21 */ { dissect_pfcp_f_teid }, /* F-TEID Extendable / Subclause 8.2.3 */
3314 /* 22 */ { dissect_pfcp_network_instance }, /* Network Instance Variable Length / Subclause 8.2.4 */
3315 /* 23 */ { dissect_pfcp_sdf_filter }, /* SDF Filter Extendable / Subclause 8.2.5 */
3316 /* 24 */ { dissect_pfcp_application_id }, /* Application ID Variable Length / Subclause 8.2.6 */
3317 /* 25 */ { dissect_pfcp_gate_status }, /* Gate Status Extendable / Subclause 8.2.7 */
3318 /* 26 */ { dissect_pfcp_mbr }, /* MBR Extendable / Subclause 8.2.8 */
3319 /* 27 */ { dissect_pfcp_gbr }, /* GBR Extendable / Subclause 8.2.9 */
3320 /* 28 */ { dissect_pfcp_qer_correlation_id }, /* QER Correlation ID Extendable / Subclause 8.2.10 */
3321 /* 29 */ { dissect_pfcp_precedence }, /* Precedence Extendable / Subclause 8.2.11 */
3322 /* 30 */ { dissect_pfcp_transport_level_marking }, /* Transport Level Marking Extendable / Subclause 8.2.12 */
3323 /* 31 */ { dissect_pfcp_volume_threshold }, /* Volume Threshold Extendable /Subclause 8.2.13 */
3324 /* 32 */ { dissect_pfcp_time_threshold }, /* Time Threshold Extendable /Subclause 8.2.14 */
3325 /* 33 */ { dissect_pfcp_monitoring_time }, /* Monitoring Time Extendable /Subclause 8.2.15 */
3326 /* 34 */ { dissect_pfcp_subseq_volume_threshold }, /* Subsequent Volume Threshold Extendable /Subclause 8.2.16 */
3327 /* 35 */ { dissect_pfcp_subsequent_time_threshold }, /* Subsequent Time Threshold Extendable /Subclause 8.2.17 */
3328 /* 36 */ { dissect_pfcp_inactivity_detection_time }, /* Inactivity Detection Time Extendable /Subclause 8.2.18 */
3329 /* 37 */ { dissect_pfcp_reporting_triggers }, /* Reporting Triggers Extendable /Subclause 8.2.19 */
3330 /* 38 */ { dissect_pfcp_redirect_information }, /* Redirect Information Extendable /Subclause 8.2.20 */
3331 /* 39 */ { dissect_pfcp_report_type }, /* Report Type Extendable / Subclause 8.2.21 */
3332 /* 40 */ { dissect_pfcp_offending_ie }, /* Offending IE Fixed / Subclause 8.2.22 */
3333 /* 41 */ { dissect_pfcp_forwarding_policy }, /* Forwarding Policy Extendable / Subclause 8.2.23 */
3334 /* 42 */ { dissect_pfcp_destination_interface }, /* Destination Interface Extendable / Subclause 8.2.24 */
3335 /* 43 */ { dissect_pfcp_up_function_features }, /* UP Function Features Extendable / Subclause 8.2.25 */
3336 /* 44 */ { dissect_pfcp_apply_action }, /* Apply Action Extendable / Subclause 8.2.26 */
3337 /* 45 */ { dissect_pfcp_dl_data_service_inf }, /* Downlink Data Service Information Extendable / Subclause 8.2.27 */
3338 /* 46 */ { dissect_pfcp_dl_data_notification_delay }, /* Downlink Data Notification Delay Extendable / Subclause 8.2.28 */
3339 /* 47 */ { dissect_pfcp_dl_buffering_dur }, /* DL Buffering Duration Extendable / Subclause 8.2.29 */
3340 /* 48 */ { dissect_pfcp_dl_buffering_suggested_packet_count }, /* DL Buffering Suggested Packet Count Variable / Subclause 8.2.30 */
3341 /* 49 */ { dissect_pfcp_sxsmreq_flags }, /* SxSMReq-Flags Extendable / Subclause 8.2.31 */
3342 /* 50 */ { dissect_pfcp_sxsrrsp_flags }, /* SxSRRsp-Flags Extendable / Subclause 8.2.32 */
3343 /* 51 */ { dissect_pfcp_load_control_information }, /* Load Control Information Extendable / Table 7.5.3.3-1 */
3344 /* 52 */ { dissect_pfcp_sequence_number }, /* Sequence Number Fixed Length / Subclause 8.2.33 */
3345 /* 53 */ { dissect_pfcp_metric }, /* Metric Fixed Length / Subclause 8.2.34 */
3346 /* 54 */ { dissect_pfcp_overload_control_information }, /* Overload Control Information Extendable / Table 7.5.3.4-1 */
3347 /* 55 */ { dissect_pfcp_timer }, /* Timer Extendable / Subclause 8.2 35 */
3348 /* 56 */ { dissect_pfcp_pdr_id }, /* Packet Detection Rule ID Extendable / Subclause 8.2 36 */
3349 /* 57 */ { dissect_pfcp_f_seid }, /* F-SEID Extendable / Subclause 8.2 37 */
3350 /* 58 */ { dissect_pfcp_application_ids_pfds }, /* Application ID's PFDs Extendable / Table 7.4.3.1-2 */
3351 /* 59 */ { dissect_pfcp_pfd_context }, /* PFD context Extendable / Table 7.4.3.1-3 */
3352 /* 60 */ { dissect_pfcp_node_id }, /* Node ID Extendable / Subclause 8.2.38 */
3353 /* 61 */ { dissect_pfcp_pfd_contents }, /* PFD contents Extendable / Subclause 8.2.39 */
3354 /* 62 */ { dissect_pfcp_measurement_method }, /* Measurement Method Extendable / Subclause 8.2.40 */
3355 /* 63 */ { dissect_pfcp_usage_report_trigger }, /* Usage Report Trigger Extendable / Subclause 8.2.41 */
3356 /* 64 */ { dissect_pfcp_measurement_period }, /* Measurement Period Extendable / Subclause 8.2.42 */
3357 /* 65 */ { dissect_pfcp_fq_csid }, /* FQ-CSID Extendable / Subclause 8.2.43 */
3358 /* 66 */ { dissect_pfcp_volume_measurement }, /* Volume Measurement Extendable / Subclause 8.2.44 */
3359 /* 67 */ { dissect_pfcp_duration_measurement }, /* Duration Measurement Extendable / Subclause 8.2.45 */
3360 /* 68 */ { dissect_pfcp_application_detection_inf }, /* Application Detection Information Extendable / Table 7.5.8.3-2 */
3361 /* 69 */ { dissect_pfcp_time_of_first_packet }, /* Time of First Packet Extendable / Subclause 8.2.46 */
3362 /* 70 */ { dissect_pfcp_time_of_last_packet }, /* Time of Last Packet Extendable / Subclause 8.2.47 */
3363 /* 71 */ { dissect_pfcp_quota_holding_time }, /* Quota Holding Time Extendable / Subclause 8.2.48 */
3364 /* 72 */ { dissect_pfcp_dropped_dl_traffic_threshold }, /* Dropped DL Traffic Threshold Extendable / Subclause 8.2.49 */
3365 /* 73 */ { dissect_pfcp_volume_quota }, /* Volume Quota Extendable / Subclause 8.2.50 */
3366 /* 74 */ { dissect_pfcp_time_quota }, /* Time Quota Extendable / Subclause 8.2.51 */
3367 /* 75 */ { dissect_pfcp_start_time }, /* Start Time Extendable / Subclause 8.2.52 */
3368 /* 76 */ { dissect_pfcp_end_time }, /* End Time Extendable / Subclause 8.2.53 */
3369 /* 77 */ { dissect_pfcp_pfcp_query_urr }, /* Query URR Extendable / Table 7.5.4.10-1 */
3370 /* 78 */ { dissect_pfcp_usage_report_smr }, /* Usage Report (in Session Modification Response) Extendable / Table 7.5.5.2-1 */
3371 /* 79 */ { dissect_pfcp_usage_report_sdr }, /* Usage Report (Session Deletion Response) Extendable / Table 7.5.7.2-1 */
3372 /* 80 */ { dissect_pfcp_usage_report_srr }, /* Usage Report (Session Report Request) Extendable / Table 7.5.8.3-1 */
3373 /* 81 */ { dissect_pfcp_urr_id }, /* URR ID Extendable / Subclause 8.2.54 */
3374 /* 82 */ { dissect_pfcp_linked_urr_id }, /* Linked URR ID Extendable / Subclause 8.2.55 */
3375 /* 83 */ { dissect_pfcp_downlink_data_report }, /* Downlink Data Report Extendable / Table 7.5.8.2-1 */
3376 /* 84 */ { dissect_pfcp_outer_header_creation }, /* Outer Header Creation Extendable / Subclause 8.2.56 */
3377 /* 85 */ { dissect_pfcp_create_bar }, /* Create BAR Extendable / Table 7.5.2.6-1 */
3378 /* 86 */ { dissect_pfcp_update_bar_smr }, /* Update BAR (Session Modification Request) Extendable / Table 7.5.4.11-1 */
3379 /* 87 */ { dissect_pfcp_remove_bar }, /* Remove BAR Extendable / Table 7.5.4.12-1 */
3380 /* 88 */ { dissect_pfcp_bar_id }, /* BAR ID Extendable / Subclause 8.2.57 */
3381 /* 89 */ { dissect_pfcp_cp_function_features }, /* CP Function Features Extendable / Subclause 8.2.58 */
3382 /* 90 */ { dissect_pfcp_usage_information }, /* Usage Information Extendable / Subclause 8.2.59 */
3383 /* 91 */ { dissect_pfcp_application_instance_id }, /* Application Instance ID Variable Length / Subclause 8.2.60 */
3384 /* 92 */ { dissect_pfcp_flow_inf }, /* Flow Information Extendable / Subclause 8.2.61 */
3385 /* 93 */ { dissect_pfcp_ue_ip_address }, /* UE IP Address Extendable / Subclause 8.2.62 */
3386 /* 94 */ { dissect_pfcp_packet_rate }, /* Packet Rate Extendable / Subclause 8.2.63 */
3387 /* 95 */ { dissect_pfcp_outer_hdr_rem }, /* Outer Header Removal Extendable / Subclause 8.2.64 */
3388 /* 96 */ { dissect_pfcp_recovery_time_stamp }, /* Recovery Time Stamp Extendable / Subclause 8.2.65 */
3389 /* 97 */ { dissect_pfcp_dl_flow_level_marking }, /* DL Flow Level Marking Extendable / Subclause 8.2.66 */
3390 /* 98 */ { dissect_pfcp_header_enrichment }, /* Header Enrichment Extendable / Subclause 8.2.67 */
3391 /* 99 */ { dissect_pfcp_error_indication_report }, /* Error Indication Report Extendable / Table 7.5.8.4-1 */
3392 /* 100 */ { dissect_pfcp_measurement_info }, /* Measurement Information Extendable / Subclause 8.2.68 */
3393 /* 101 */ { dissect_pfcp_node_report_type }, /* Node Report Type Extendable / Subclause 8.2.69 */
3394 /* 102 */ { dissect_pfcp_user_plane_path_failure_report }, /* User Plane Path Failure Report Extendable / Table 7.4.5.1.2-1 */
3395 /* 103 */ { dissect_pfcp_remote_gtp_u_peer }, /* Remote GTP-U Peer Extendable / Subclause 8.2.70 */
3396 /* 104 */ { dissect_pfcp_ur_seqn }, /* UR-SEQN Fixed Length / Subclause 8.2.71 */
3397 /* 105 */ { dissect_pfcp_update_duplicating_parameters }, /* Update Duplicating Parameters Extendable / Table 7.5.4.3-3 */
3398 /* 106 */ { dissect_pfcp_act_predef_rules }, /* Activate Predefined Rules Variable Length / Subclause 8.2.72 */
3399 /* 107 */ { dissect_pfcp_deact_predef_rules }, /* Deactivate Predefined Rules Variable Length / Subclause 8.2.73 */
3400 /* 108 */ { dissect_pfcp_far_id }, /* FAR ID Extendable / Subclause 8.2.74 */
3401 /* 109 */ { dissect_pfcp_qer_id }, /* QER ID Extendable / Subclause 8.2.75 */
3402 /* 110 */ { dissect_pfcp_oci_flags }, /* OCI Flags Extendable / Subclause 8.2.76 */
3403 /* 111 */ { dissect_pfcp_sx_assoc_rel_req }, /* Sx Association Release Request Extendable / Subclause 8.2.77 */
3404 /* 112 */ { dissect_pfcp_graceful_release_period }, /* Graceful Release Period Extendable / Subclause 8.2.78 */
3405 /* 113 */ { dissect_pfcp_pdn_type }, /* PDN Type Fixed Length / Subclause 8.2.79 */
3406 /* 114 */ { dissect_pfcp_failed_rule_id }, /* Failed Rule ID Extendable / Subclause 8.2.80 */
3407 /* 115 */ { dissect_pfcp_time_qouta_mechanism }, /* Time Quota Mechanism Extendable / Subclause 8.2.81 */
3408 /* 116 */ { dissect_pfcp_user_plane_ip_resource_infomation }, /* User Plane IP Resource Information Extendable / Subclause 8.2.82 */
3409 /* 117 */ { dissect_pfcp_user_plane_inactivity_timer }, /* User Plane Inactivity Timer Extendable / Subclause 8.2.83 */
3410 { NULL }, /* End of List */
3413 #define NUM_PFCP_IES (sizeof(pfcp_ies)/sizeof(pfcp_ie_t))
3414 /* Set up the array to hold "etts" for each IE*/
3415 gint ett_pfcp_elem[NUM_PFCP_IES-1];
3417 /* 7.2.3.3 Grouped Information Elements */
3420 dissect_pfcp_grouped_ie(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type, int ett_index)
3424 proto_tree *grouped_tree;
3426 proto_item_append_text(item, "[Grouped IE]");
3427 grouped_tree = proto_item_add_subtree(tree, ett_index);
3429 new_tvb = tvb_new_subset_length(tvb, offset, length);
3430 dissect_pfcp_ies_common(new_tvb, pinfo, grouped_tree, 0, message_type);
3435 dissect_pfcp_pdi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type)
3437 dissect_pfcp_grouped_ie(tvb, pinfo, tree, item, length, message_type, ett_pfcp_elem[PFCP_IE_ID_PDI]);
3441 dissect_pfcp_create_pdr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type)
3443 dissect_pfcp_grouped_ie(tvb, pinfo, tree, item, length, message_type, ett_pfcp_elem[PFCP_IE_ID_CREATE_PDR]);
3447 dissect_pfcp_create_far(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type)
3449 dissect_pfcp_grouped_ie(tvb, pinfo, tree, item, length, message_type, ett_pfcp_elem[PFCP_IE_CREATE_FAR]);
3453 dissect_pfcp_forwarding_parameters(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type)
3455 dissect_pfcp_grouped_ie(tvb, pinfo, tree, item, length, message_type, ett_pfcp_elem[PFCP_IE_FORWARDING_PARAMETERS]);
3459 dissect_pfcp_duplicating_parameters(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type)
3461 dissect_pfcp_grouped_ie(tvb, pinfo, tree, item, length, message_type, ett_pfcp_elem[PFCP_IE_DUPLICATING_PARAMETERS]);
3465 dissect_pfcp_create_urr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type)
3467 dissect_pfcp_grouped_ie(tvb, pinfo, tree, item, length, message_type, ett_pfcp_elem[PFCP_IE_CREATE_URR]);
3471 dissect_pfcp_create_qer(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type)
3473 dissect_pfcp_grouped_ie(tvb, pinfo, tree, item, length, message_type, ett_pfcp_elem[PFCP_IE_CREATE_QER]);
3477 dissect_pfcp_created_pdr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type)
3479 dissect_pfcp_grouped_ie(tvb, pinfo, tree, item, length, message_type, ett_pfcp_elem[PFCP_IE_CREATED_PDR]);
3483 dissect_pfcp_update_pdr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type)
3485 dissect_pfcp_grouped_ie(tvb, pinfo, tree, item, length, message_type, ett_pfcp_elem[PFCP_IE_UPDATE_PDR]);
3489 dissect_pfcp_update_far(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type)
3491 dissect_pfcp_grouped_ie(tvb, pinfo, tree, item, length, message_type, ett_pfcp_elem[PFCP_IE_UPDATE_FAR]);
3495 dissect_pfcp_upd_forwarding_param(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type)
3497 dissect_pfcp_grouped_ie(tvb, pinfo, tree, item, length, message_type, ett_pfcp_elem[PFCP_IE_UPD_FORWARDING_PARAM]);
3501 dissect_pfcp_update_bar(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type)
3503 dissect_pfcp_grouped_ie(tvb, pinfo, tree, item, length, message_type, ett_pfcp_elem[PFCP_IE_UPDATE_BAR]);
3507 dissect_pfcp_update_urr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type)
3509 dissect_pfcp_grouped_ie(tvb, pinfo, tree, item, length, message_type, ett_pfcp_elem[PFCP_IE_UPDATE_URR]);
3513 dissect_pfcp_update_qer(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type)
3515 dissect_pfcp_grouped_ie(tvb, pinfo, tree, item, length, message_type, ett_pfcp_elem[PFCP_IE_UPDATE_QER]);
3519 dissect_pfcp_remove_pdr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type)
3521 dissect_pfcp_grouped_ie(tvb, pinfo, tree, item, length, message_type, ett_pfcp_elem[PFCP_IE_REMOVE_PDR]);
3525 dissect_pfcp_remove_far(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type)
3527 dissect_pfcp_grouped_ie(tvb, pinfo, tree, item, length, message_type, ett_pfcp_elem[PFCP_IE_REMOVE_FAR]);
3531 dissect_pfcp_remove_urr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type)
3533 dissect_pfcp_grouped_ie(tvb, pinfo, tree, item, length, message_type, ett_pfcp_elem[PFCP_IE_REMOVE_URR]);
3537 dissect_pfcp_remove_qer(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type)
3539 dissect_pfcp_grouped_ie(tvb, pinfo, tree, item, length, message_type, ett_pfcp_elem[PFCP_IE_REMOVE_QER]);
3543 dissect_pfcp_load_control_information(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type)
3545 dissect_pfcp_grouped_ie(tvb, pinfo, tree, item, length, message_type, ett_pfcp_elem[PFCP_LOAD_CONTROL_INFORMATION]);
3549 dissect_pfcp_overload_control_information(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type)
3551 dissect_pfcp_grouped_ie(tvb, pinfo, tree, item, length, message_type, ett_pfcp_elem[PFCP_OVERLOAD_CONTROL_INFORMATION]);
3555 dissect_pfcp_application_ids_pfds(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type)
3557 dissect_pfcp_grouped_ie(tvb, pinfo, tree, item, length, message_type, ett_pfcp_elem[PFCP_APPLICATION_IDS_PFDS]);
3561 dissect_pfcp_pfd_context(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type)
3563 dissect_pfcp_grouped_ie(tvb, pinfo, tree, item, length, message_type, ett_pfcp_elem[PFCP_PFD_CONTEXT]);
3568 dissect_pfcp_application_detection_inf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type)
3570 dissect_pfcp_grouped_ie(tvb, pinfo, tree, item, length, message_type, ett_pfcp_elem[PFCP_APPLICATION_DETECTION_INF]);
3574 dissect_pfcp_pfcp_query_urr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type)
3576 dissect_pfcp_grouped_ie(tvb, pinfo, tree, item, length, message_type, ett_pfcp_elem[PFCP_QUERY_URR]);
3580 dissect_pfcp_usage_report_smr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type)
3582 dissect_pfcp_grouped_ie(tvb, pinfo, tree, item, length, message_type, ett_pfcp_elem[PFCP_USAGE_REPORT_SMR]);
3586 dissect_pfcp_usage_report_sdr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type)
3588 dissect_pfcp_grouped_ie(tvb, pinfo, tree, item, length, message_type, ett_pfcp_elem[PFCP_USAGE_REPORT_SDR]);
3592 dissect_pfcp_usage_report_srr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type)
3594 dissect_pfcp_grouped_ie(tvb, pinfo, tree, item, length, message_type, ett_pfcp_elem[PFCP_USAGE_REPORT_SRR]);
3598 dissect_pfcp_downlink_data_report(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type)
3600 dissect_pfcp_grouped_ie(tvb, pinfo, tree, item, length, message_type, ett_pfcp_elem[PFCP_DOWNLINK_DATA_REPORT]);
3604 dissect_pfcp_create_bar(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type)
3606 dissect_pfcp_grouped_ie(tvb, pinfo, tree, item, length, message_type, ett_pfcp_elem[PFCP_CREATE_BAR]);
3610 dissect_pfcp_update_bar_smr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type)
3612 dissect_pfcp_grouped_ie(tvb, pinfo, tree, item, length, message_type, ett_pfcp_elem[PFCP_UPDATE_BAR_SMR]);
3616 dissect_pfcp_remove_bar(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type)
3618 dissect_pfcp_grouped_ie(tvb, pinfo, tree, item, length, message_type, ett_pfcp_elem[PFCP_REMOVE_BAR]);
3622 dissect_pfcp_error_indication_report(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type)
3624 dissect_pfcp_grouped_ie(tvb, pinfo, tree, item, length, message_type, ett_pfcp_elem[PFCP_ERROR_INDICATION_REPORT]);
3628 dissect_pfcp_user_plane_path_failure_report(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type)
3630 dissect_pfcp_grouped_ie(tvb, pinfo, tree, item, length, message_type, ett_pfcp_elem[PFCP_USER_PLANE_PATH_FAILURE_REPORT]);
3634 dissect_pfcp_update_duplicating_parameters(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type)
3636 dissect_pfcp_grouped_ie(tvb, pinfo, tree, item, length, message_type, ett_pfcp_elem[PFCP_UPDATE_DUPLICATING_PARAMETERS]);
3641 dissect_pfcp_ies_common(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, gint offset, guint8 message_type)
3643 proto_tree *ie_tree;
3646 guint16 type, length, enterprise_type;
3647 guint16 enterprise_id;
3649 /* 8.1.1 Information Element Format */
3651 Octets 8 7 6 5 4 3 2 1
3652 1 to 2 Type = xxx (decimal)
3654 p to (p+1) Enterprise ID
3655 k to (n+4) IE specific data or content of a grouped IE
3657 If the Bit 8 of Octet 1 is not set, this indicates that the IE is defined by 3GPP and the Enterprise ID is absent.
3658 If Bit 8 of Octet 1 is set, this indicates that the IE is defined by a vendor and the Enterprise ID is present
3659 identified by the Enterprise ID
3662 /*Enterprise ID : if the IE type value is within the range of 32768 to 65535,
3663 * this field shall contain the IANA - assigned "SMI Network Management Private Enterprise Codes"
3664 * value of the vendor defining the IE.
3666 /* Length: this field contains the length of the IE excluding the first four octets, which are common for all IEs */
3668 /* Process the IEs*/
3669 while (offset < (gint)tvb_reported_length(tvb)) {
3671 type = tvb_get_ntohs(tvb, offset);
3672 length = tvb_get_ntohs(tvb, offset + 2);
3674 if ((type & 0x8000) == 0x8000 ) {
3675 enterprise_id = tvb_get_ntohs(tvb, offset + 4);
3676 enterprise_type = (type & 0x8000);
3677 ie_tree = proto_tree_add_subtree_format(tree, tvb, offset, 4 + length, ett_pfcp_ie, &ti, "Enterprise %s specific IE: %u",
3678 try_enterprises_lookup(enterprise_id),
3681 proto_tree_add_item(ie_tree, hf_pfcp2_enterprise_ie, tvb, offset, 2, ENC_BIG_ENDIAN);
3684 proto_tree_add_item(ie_tree, hf_pfcp2_ie_len, tvb, offset, 2, ENC_BIG_ENDIAN);
3687 /* Bit 8 of Octet 1 is set, this indicates that the IE is defined by a vendor and the Enterprise ID is present */
3688 proto_tree_add_item(ie_tree, hf_pfcp_enterprice_id, tvb, offset, 2, ENC_BIG_ENDIAN);
3690 /* give the whole IE to the subdissector */
3691 ie_tvb = tvb_new_subset_length(tvb, offset-4, length);
3692 dissector_try_uint_new(pfcp_enterprise_ies_dissector_table, enterprise_id, ie_tvb, pinfo, ie_tree, FALSE, ti);
3696 if (type < (NUM_PFCP_IES - 1)) {
3697 tmp_ett = ett_pfcp_elem[type];
3699 tmp_ett = ett_pfcp_ie;
3701 ie_tree = proto_tree_add_subtree_format(tree, tvb, offset, 4 + length, tmp_ett, &ti, "%s : ",
3702 val_to_str_ext_const(type, &pfcp_ie_type_ext, "Unknown"));
3704 proto_tree_add_item(ie_tree, hf_pfcp2_ie, tvb, offset, 2, ENC_BIG_ENDIAN);
3706 proto_tree_add_item(ie_tree, hf_pfcp2_ie_len, tvb, offset, 2, ENC_BIG_ENDIAN);
3708 if (type < (NUM_PFCP_IES -1)) {
3709 ie_tvb = tvb_new_subset_length(tvb, offset, length);
3710 if(pfcp_ies[type].decode){
3711 (*pfcp_ies[type].decode) (ie_tvb, pinfo, ie_tree, ti, length, message_type);
3713 /* NULL function pointer, we have no decoding function*/
3714 proto_tree_add_expert(ie_tree, pinfo, &ei_pfcp_ie_not_decoded_null, tvb, offset, length);
3717 /* IE id outside of array, We have no decoding function for it */
3718 proto_tree_add_expert(ie_tree, pinfo, &ei_pfcp_ie_not_decoded_to_large, tvb, offset, length);
3727 dissect_pfcp(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void *data _U_)
3730 proto_tree *sub_tree;
3733 guint8 message_type;
3736 static const int * pfcp_hdr_flags[] = {
3746 col_set_str(pinfo->cinfo, COL_PROTOCOL, "PFCP");
3747 col_clear(pinfo->cinfo, COL_INFO);
3749 message_type = tvb_get_guint8(tvb, 1);
3750 col_set_str(pinfo->cinfo, COL_INFO, val_to_str_ext_const(message_type, &pfcp_message_type_ext, "Unknown"));
3752 item = proto_tree_add_item(tree, proto_pfcp, tvb, 0, -1, ENC_NA);
3753 sub_tree = proto_item_add_subtree(item, ett_pfcp);
3755 /* 7.2.2 Message Header */
3757 Octet 8 7 6 5 4 3 2 1
3758 1 | Version |Spare|Spare|Spare| MP | S |
3760 3 | Message Length (1st Octet) |
3761 4 | Message Length (2nd Octet) |
3762 m to | If S flag is set to 1, then SEID shall be |
3763 k(m+7) | placed into octets 5-12. Otherwise, SEID field |
3764 | is not present at all. |
3765 n to | Sequence Number |
3771 proto_tree_add_bitmask_with_flags_ret_uint64(sub_tree, tvb, offset, hf_pfcp_hdr_flags,
3772 ett_pfcp_flags, pfcp_hdr_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT, &pfcp_flags);
3775 /* Octet 2 Message Type */
3776 proto_tree_add_item(sub_tree, hf_pfcp_msg_type, tvb, offset, 1, ENC_BIG_ENDIAN);
3779 /* Octet 3 - 4 Message Length */
3780 proto_tree_add_item_ret_uint(sub_tree, hf_pfcp_msg_length, tvb, offset, 2, ENC_BIG_ENDIAN, &length);
3783 if ((pfcp_flags & 0x1) == 1) {
3784 /* If S flag is set to 1, then SEID shall be placed into octets 5-12*/
3785 /* Session Endpoint Identifier 8 Octets */
3786 proto_tree_add_item(sub_tree, hf_pfcp_seid, tvb, offset, 8, ENC_BIG_ENDIAN);
3789 /* 7.2.2.2 PFCP Header for Node Related Messages */
3791 Octet 8 7 6 5 4 3 2 1
3792 1 | Version |Spare|Spare|Spare| MP=0 | S=0 |
3794 3 | Message Length (1st Octet) |
3795 4 | Message Length (2nd Octet) |
3796 5 | Sequence Number (1st Octet) |
3797 6 | Sequence Number (2st Octet) |
3798 7 | Sequence Number (3st Octet) |
3801 proto_tree_add_item(sub_tree, hf_pfcp_seqno, tvb, offset, 3, ENC_BIG_ENDIAN);
3803 if ((pfcp_flags & 0x2) == 0x2) {
3804 /* If the "MP" flag is set to "1", then bits 8 to 5 of octet 16 shall indicate the message priority.*/
3805 proto_tree_add_item(sub_tree, hf_pfcp_mp, tvb, offset, 1, ENC_BIG_ENDIAN);
3806 proto_tree_add_item(sub_tree, hf_pfcp_spare_h0, tvb, offset, 1, ENC_BIG_ENDIAN);
3808 proto_tree_add_item(sub_tree, hf_pfcp_spare_oct, tvb, offset, 1, ENC_BIG_ENDIAN);
3812 /* Dissect the IEs in the message */
3813 dissect_pfcp_ies_common(tvb, pinfo, sub_tree, offset, message_type);
3815 return tvb_reported_length(tvb);
3818 /* Enterprise IE decoding 3GPP */
3820 dissect_pfcp_3gpp_enterprise_ies(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
3822 proto_item *top_item = (proto_item *)data;
3823 /* We are give the complete ie, but the first 6 octets are dissected in the pfcp dissector*/
3824 proto_item_append_text(top_item, " Enterprise ID set to '10415' shall not be used for the vendor specific IEs.");
3825 proto_tree_add_expert(tree, pinfo, &ei_pfcp_enterprise_ie_3gpp, tvb, 0, -1);
3827 return tvb_reported_length(tvb);
3831 proto_register_pfcp(void)
3834 static hf_register_info hf_pfcp[] = {
3836 { &hf_pfcp_msg_type,
3837 { "Message Type", "pfcp.msg_type",
3838 FT_UINT8, BASE_DEC | BASE_EXT_STRING, &pfcp_message_type_ext, 0x0,
3841 { &hf_pfcp_msg_length,
3842 { "Length", "pfcp.length",
3843 FT_UINT8, BASE_DEC, NULL, 0x0,
3846 { &hf_pfcp_hdr_flags,
3847 { "Flags", "pfcp.flags",
3848 FT_UINT8, BASE_HEX, NULL, 0x0,
3852 { "Version", "pfcp.version",
3853 FT_UINT8, BASE_DEC, NULL, 0xe0,
3857 { "MP", "pfcp.mp_flag",
3858 FT_BOOLEAN, 8, NULL, 0x02,
3863 FT_BOOLEAN, 8, NULL, 0x01,
3866 { &hf_pfcp_spare_b2,
3867 { "Spare", "pfcp.spare_b2",
3868 FT_UINT8, BASE_DEC, NULL, 0x04,
3871 { &hf_pfcp_spare_b3,
3872 { "Spare", "pfcp.spare_b3",
3873 FT_UINT8, BASE_DEC, NULL, 0x08,
3876 { &hf_pfcp_spare_b4,
3877 { "Spare", "pfcp.spare_b4",
3878 FT_UINT8, BASE_DEC, NULL, 0x10,
3881 { &hf_pfcp_spare_b5,
3882 { "Spare", "pfcp.spare_b5",
3883 FT_UINT8, BASE_DEC, NULL, 0x20,
3886 { &hf_pfcp_spare_b6,
3887 { "Spare", "pfcp.spare_b6",
3888 FT_UINT8, BASE_DEC, NULL, 0x40,
3891 { &hf_pfcp_spare_b7,
3892 { "Spare", "pfcp.spare_b7",
3893 FT_UINT8, BASE_DEC, NULL, 0x80,
3896 { &hf_pfcp_spare_b7_b6,
3897 { "Spare", "pfcp.spare_b7_b6",
3898 FT_UINT8, BASE_DEC, NULL, 0xc0,
3901 { &hf_pfcp_spare_b7_b5,
3902 { "Spare", "pfcp.spare_b7_b5",
3903 FT_UINT8, BASE_DEC, NULL, 0xe0,
3906 { &hf_pfcp_spare_b7_b4,
3907 { "Spare", "pfcp.spare_b7_b4",
3908 FT_UINT8, BASE_DEC, NULL, 0xf0,
3911 { &hf_pfcp_spare_b7_b3,
3912 { "Spare", "pfcp.spare_b7_b3",
3913 FT_UINT8, BASE_DEC, NULL, 0xf8,
3916 { &hf_pfcp_spare_b7_b2,
3917 { "Spare", "pfcp.spare_b7_b2",
3918 FT_UINT8, BASE_DEC, NULL, 0xfc,
3921 { &hf_pfcp_spare_b7_b1,
3922 { "Spare", "pfcp.spare_b7_b1",
3923 FT_UINT8, BASE_DEC, NULL, 0xfe,
3926 { &hf_pfcp_spare_oct,
3927 { "Spare", "pfcp.spare_oct",
3928 FT_UINT8, BASE_DEC, NULL, 0x0,
3931 { &hf_pfcp_spare_h0,
3932 { "Spare", "pfcp.spare_h0",
3933 FT_UINT8, BASE_DEC, NULL, 0x0f,
3936 { &hf_pfcp_spare_h1,
3937 { "Spare", "pfcp.spare_h1",
3938 FT_UINT8, BASE_DEC, NULL, 0xf0,
3942 { "Spare", "pfcp.spare",
3943 FT_UINT8, BASE_DEC, NULL, 0x0,
3947 { "SEID", "pfcp.seid",
3948 FT_UINT64, BASE_HEX, NULL, 0x0,
3952 { "Sequence Number", "pfcp.seqno",
3953 FT_UINT24, BASE_DEC, NULL, 0x0,
3957 { "Message Priority", "pfcp.mp",
3958 FT_UINT24, BASE_DEC, NULL, 0xf0,
3961 { &hf_pfcp_enterprice_id,
3962 { "Enterprise ID", "pfcp.enterprice_id",
3963 FT_UINT16, BASE_ENTERPRISES, STRINGS_ENTERPRISES,
3964 0x0, NULL, HFILL } },
3966 { "IE Type", "pfcp.ie_type",
3967 FT_UINT16, BASE_DEC | BASE_EXT_STRING, &pfcp_ie_type_ext, 0x0,
3970 { &hf_pfcp2_enterprise_ie,
3971 { "Enterprise specific IE Type", "pfcp.enterprise_ie",
3972 FT_UINT16, BASE_DEC, NULL, 0x7fff,
3976 { "IE Length", "pfcp.ie_len",
3977 FT_UINT16, BASE_DEC, NULL, 0x0,
3980 { &hf_pfcp_recovery_time_stamp,
3981 { "Recovery Time Stamp", "pfcp.recovery_time_stamp",
3982 FT_STRING, BASE_NONE, NULL, 0,
3986 { "Cause", "pfcp.cause",
3987 FT_UINT8, BASE_DEC, VALS(pfcp_cause_vals), 0x0,
3990 { &hf_pfcp_node_id_type,
3991 { "Node ID Type", "pfcp.node_id_type",
3992 FT_UINT8, BASE_DEC, VALS(pfcp_node_id_type_vals), 0x0f,
3995 { &hf_pfcp_node_id_ipv4,
3996 { "Node ID IPv4", "pfcp.node_id_ipv4",
3997 FT_IPv4, BASE_NONE, NULL, 0x0,
4000 { &hf_pfcp_node_id_ipv6,
4001 { "Node ID IPv6", "pfcp.node_id_ipv6",
4002 FT_IPv6, BASE_NONE, NULL, 0x0,
4005 { &hf_pfcp_node_id_fqdn,
4006 { "Node ID FQDN", "pfcp.node_id_fqdn",
4007 FT_STRING, BASE_NONE, NULL, 0x0,
4010 { &hf_pfcp_f_seid_flags,
4011 { "Flags", "pfcp.f_seid_flags",
4012 FT_UINT8, BASE_HEX, NULL, 0x0,
4016 { "V6 (IPv6)", "pfcp.f_seid_flags.v6",
4017 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x01,
4021 { "V4 (IPv4)", "pfcp.f_seid_flags.v4",
4022 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x02,
4025 { &hf_pfcp_f_seid_ipv4,
4026 { "IPv4 address", "pfcp.f_seid.ipv4",
4027 FT_IPv4, BASE_NONE, NULL, 0x0,
4030 { &hf_pfcp_f_seid_ipv6,
4031 { "IPv6 address", "pfcp.f_seid.ipv6",
4032 FT_IPv6, BASE_NONE, NULL, 0x0,
4036 { "Rule ID", "pfcp.pdr_id",
4037 FT_UINT16, BASE_DEC, NULL, 0x0,
4040 { &hf_pfcp_precedence,
4041 { "Precedence", "pfcp.precedence",
4042 FT_UINT16, BASE_DEC, NULL, 0x0,
4045 { &hf_pfcp_source_interface,
4046 { "Source Interface", "pfcp.source_interface",
4047 FT_UINT8, BASE_DEC, VALS(pfcp_source_interface_vals), 0x0f,
4050 { &hf_pfcp_f_teid_flags,
4051 { "Flags", "pfcp.f_teid_flags",
4052 FT_UINT8, BASE_HEX, NULL, 0x0,
4055 { &hf_pfcp_fteid_flg_spare,
4056 { "Spare", "pfcp.fteid_flg.spare",
4057 FT_UINT8, BASE_DEC, NULL, 0xf0,
4060 { &hf_pfcp_fteid_flg_b3_ch_id,
4061 { "CHID (CHOOSE_ID)", "pfcp.f_teid_flags.ch_id",
4062 FT_BOOLEAN, 8, NULL, 0x08,
4065 { &hf_pfcp_fteid_flg_b2_ch,
4066 { "CH (CHOOSE)", "pfcp.f_teid_flags.ch",
4067 FT_BOOLEAN, 8, NULL, 0x04,
4070 { &hf_pfcp_fteid_flg_b1_v6,
4071 { "V6 (IPv6)", "pfcp.f_teid_flags.v6",
4072 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x02,
4075 { &hf_pfcp_fteid_flg_b0_v4,
4076 { "V4 (IPv4)", "pfcp.f_teid_flags.v4",
4077 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x01,
4080 { &hf_pfcp_f_teid_ch_id,
4081 { "Choose Id", "pfcp.f_teid.choose_id",
4082 FT_BYTES, BASE_NONE, NULL, 0x0,
4085 { &hf_pfcp_f_teid_teid,
4086 { "TEID", "pfcp.f_teid.teid",
4087 FT_UINT32, BASE_HEX, NULL, 0x0,
4090 { &hf_pfcp_f_teid_ipv4,
4091 { "IPv4 address", "pfcp.f_teid.ipv4_addr",
4092 FT_IPv4, BASE_NONE, NULL, 0x0,
4095 { &hf_pfcp_f_teid_ipv6,
4096 { "IPv6 address", "pfcp.f_teid.ipv6_addr",
4097 FT_IPv6, BASE_NONE, NULL, 0x0,
4100 { &hf_pfcp_network_instance,
4101 { "Network Instance", "pfcp.network_instance",
4102 FT_BYTES, BASE_NONE, NULL, 0x0,
4105 { &hf_pfcp_pdn_type,
4106 { "PDN Type", "pfcp.pdn_type",
4107 FT_UINT8, BASE_DEC, VALS(pfcp_pdn_type_vals), 0x7,
4110 { &hf_pfcp_failed_rule_id_type,
4111 { "Failed Rule ID Type", "pfcp.failed_rule_id_type",
4112 FT_UINT8, BASE_DEC, VALS(pfcp_failed_rule_id_type_vals), 0x7,
4115 { &hf_pfcp_time_qouta_mechanism_bti_type,
4116 { "Base Time Interval Type", "pfcp.time_qouta_mechanism_bti_type",
4117 FT_UINT8, BASE_DEC, VALS(pfcp_time_qouta_mechanism_bti_type_vals), 0x3,
4120 { &hf_pfcp_time_qouta_mechanism_bti,
4121 { "Base Time Interval", "pfcp.time_qouta_mechanism_bti",
4122 FT_UINT32, BASE_DEC, NULL, 0x0,
4125 { &hf_pfcp_ue_ip_address_flags,
4126 { "Flags", "pfcp.ue_ip_address_flags",
4127 FT_UINT8, BASE_HEX, NULL, 0x0,
4130 { &hf_pfcp_ue_ip_address_flag_b0_v6,
4131 { "V6 (IPv6)", "pfcp.ue_ip_address_flag.v6",
4132 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x01,
4135 { &hf_pfcp_ue_ip_address_flag_b1_v4,
4136 { "V4 (IPv4)", "pfcp.ue_ip_address_flag.v4",
4137 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x02,
4140 { &hf_pfcp_ue_ip_address_flag_b2_sd,
4141 { "S/D", "pfcp.ue_ip_address_flag.sd",
4142 FT_BOOLEAN, 8, TFS(&pfcp_ue_ip_add_sd_flag_vals), 0x04,
4145 { &hf_pfcp_ue_ip_addr_ipv4,
4146 { "IPv4 address", "pfcp.ue_ip_addr_ipv4",
4147 FT_IPv4, BASE_NONE, NULL, 0x0,
4150 { &hf_pfcp_ue_ip_add_ipv6,
4151 { "IPv6 address", "pfcp.ue_ip_addr_ipv6",
4152 FT_IPv6, BASE_NONE, NULL, 0x0,
4155 { &hf_pfcp_application_id,
4156 { "Application Identifier", "pfcp.application_id",
4157 FT_BYTES, BASE_NONE, NULL, 0x0,
4160 { &hf_pfcp_sdf_filter_flags,
4161 { "Flags", "pfcp.sdf_filter_flags",
4162 FT_UINT8, BASE_HEX, NULL, 0x0,
4165 { &hf_pfcp_sdf_filter_b0_fd,
4166 { "FD (Flow Description)", "pfcp.sdf_filter.fd",
4167 FT_BOOLEAN, 8, NULL, 0x01,
4170 { &hf_pfcp_sdf_filter_b1_ttc,
4171 { "TTC (ToS Traffic Class)", "pfcp.sdf_filter.ttc",
4172 FT_BOOLEAN, 8, NULL, 0x02,
4175 { &hf_pfcp_sdf_filter_b2_spi,
4176 { "SPI (Security Parameter Index)", "pfcp.sdf_filter.spi",
4177 FT_BOOLEAN, 8, NULL, 0x04,
4180 { &hf_pfcp_sdf_filter_b3_fl,
4181 { "FL (Flow Label)", "pfcp.sdf_filter.fl",
4182 FT_BOOLEAN, 8, NULL, 0x08,
4185 { &hf_pfcp_flow_desc_len,
4186 { "Length of Flow Description", "pfcp.flow_desc_len",
4187 FT_UINT16, BASE_DEC, NULL, 0x0,
4191 { "Flow Description field", "pfcp.fd",
4192 FT_BYTES, BASE_NONE, NULL, 0x0,
4196 { "ToS Traffic Class field", "pfcp.ttc",
4197 FT_BYTES, BASE_NONE, NULL, 0x0,
4201 { "Security Parameter Index field", "pfcp.spi",
4202 FT_BYTES, BASE_NONE, NULL, 0x0,
4206 { "Flow Label field", "pfcp.fl",
4207 FT_BYTES, BASE_NONE, NULL, 0x0,
4210 { &hf_pfcp_out_hdr_desc,
4211 { "Outer Header Removal Description", "pfcp.out_hdr_desc",
4212 FT_UINT8, BASE_DEC, VALS(pfcp_out_hdr_desc_vals), 0x0,
4215 { &hf_pfcp_far_id_flg,
4216 { "Allocation type", "pfcp.far_id_flg",
4217 FT_BOOLEAN, 32, TFS(&pfcp_id_predef_dynamic_tfs), 0x80000000,
4221 { "FAR ID", "pfcp.far_id",
4222 FT_UINT32, BASE_DEC, NULL, 0x7fffffff,
4225 { &hf_pfcp_urr_id_flg,
4226 { "Allocation type", "pfcp.urr_id_flg",
4227 FT_BOOLEAN, 32, TFS(&pfcp_id_predef_dynamic_tfs), 0x80000000,
4231 { "URR ID", "pfcp.urr_id",
4232 FT_UINT32, BASE_DEC, NULL, 0x7fffffff,
4235 { &hf_pfcp_qer_id_flg,
4236 { "Allocation type", "pfcp.qer_id_flg",
4237 FT_BOOLEAN, 32, TFS(&pfcp_id_predef_dynamic_tfs), 0x80000000,
4241 { "QER ID", "pfcp.qer_id",
4242 FT_UINT32, BASE_DEC, NULL, 0x7fffffff,
4245 { &hf_pfcp_predef_rules_name,
4246 { "Predefined Rules Name", "pfcp.predef_rules_name",
4247 FT_BYTES, BASE_NONE, NULL, 0x0,
4250 { &hf_pfcp_apply_action_flags,
4251 { "Flags", "pfcp.apply_action_flags",
4252 FT_UINT8, BASE_HEX, NULL, 0x0,
4255 { &hf_pfcp_apply_action_b0_drop,
4256 { "DROP (Drop)", "pfcp.apply_action.drop",
4257 FT_BOOLEAN, 8, NULL, 0x01,
4260 { &hf_pfcp_apply_action_b1_forw,
4261 { "FORW (Forward)", "pfcp.apply_action.forw",
4262 FT_BOOLEAN, 8, NULL, 0x02,
4265 { &hf_pfcp_apply_action_b2_buff,
4266 { "BUFF (Buffer)", "pfcp.apply_action.buff",
4267 FT_BOOLEAN, 8, NULL, 0x04,
4270 { &hf_pfcp_apply_action_b3_nocp,
4271 { "NOCP (Notify the CP function)", "pfcp.apply_action.nocp",
4272 FT_BOOLEAN, 8, NULL, 0x08,
4275 { &hf_pfcp_apply_action_b4_dupl,
4276 { "DUPL (Duplicate)", "pfcp.apply_action.dupl",
4277 FT_BOOLEAN, 8, NULL, 0x10,
4281 { "BAR ID", "pfcp.bar_id",
4282 FT_UINT8, BASE_DEC, NULL, 0x0,
4285 { &hf_pfcp_fq_csid_node_id_type,
4286 { "FQ-CSID Node-ID Type", "pfcp.fq_csid_node_id_type",
4287 FT_UINT8, BASE_DEC, VALS(pfcp_fq_csid_node_id_type_vals), 0xf0,
4290 { &hf_pfcp_num_csid,
4291 { "Number of CSID", "pfcp.num_csid",
4292 FT_UINT8, BASE_DEC, NULL, 0x0f,
4295 { &hf_pfcp_fq_csid_node_id_ipv4,
4296 { "Node-Address", "pfcp.q_csid_node_id.ipv4",
4297 FT_IPv4, BASE_NONE, NULL, 0x0,
4300 { &hf_pfcp_fq_csid_node_id_ipv6,
4301 { "Node-Address", "pfcp.q_csid_node_id.ipv6",
4302 FT_IPv6, BASE_NONE, NULL, 0x0,
4305 { &hf_pfcp_fq_csid_node_id_mcc_mnc,
4306 { "Node-Address MCC MNC", "pfcp.q_csid_node_id.mcc_mnc",
4307 FT_UINT32, BASE_DEC, NULL, 0xfffff000,
4310 { &hf_pfcp_fq_csid_node_id_int,
4311 { "Node-Address Number", "pfcp.q_csid_node_id.int",
4312 FT_UINT32, BASE_DEC, NULL, 0x00000fff,
4316 { "PDN Connection Set Identifier (CSID)", "pfcp.csid",
4317 FT_UINT16, BASE_DEC, NULL, 0x0,
4320 { &hf_pfcp_measurement_period,
4321 { "Measurement Period", "pfcp.measurement_period",
4322 FT_UINT32, BASE_DEC, NULL, 0x0,
4325 { &hf_pfcp_duration_measurement,
4326 { "Duration", "pfcp.duration_measurement",
4327 FT_UINT32, BASE_DEC, NULL, 0x0,
4330 { &hf_pfcp_time_of_first_packet,
4331 { "Time of First Packet", "pfcp.time_of_first_packet",
4332 FT_STRING, BASE_NONE, NULL, 0,
4335 { &hf_pfcp_time_of_last_packet,
4336 { "Time of Last Packet", "pfcp.time_of_last_packet",
4337 FT_STRING, BASE_NONE, NULL, 0,
4340 { &hf_pfcp_dst_interface,
4341 { "Interface", "pfcp.dst_interface",
4342 FT_UINT8, BASE_DEC, VALS(pfcp_dst_interface_vals), 0x0f,
4345 { &hf_pfcp_redirect_address_type,
4346 { "Redirect Address Type", "pfcp.redirect_address_type",
4347 FT_UINT8, BASE_DEC, VALS(pfcp_redirect_address_type_vals), 0x0f,
4350 { &hf_pfcp_redirect_server_addr_len,
4351 { "Redirect Server Address Length", "pfcp.redirect_server_addr_len",
4352 FT_UINT16, BASE_DEC, NULL, 0x0,
4355 { &hf_pfcp_redirect_server_address,
4356 { "Redirect Server Address", "pfcp.redirect_server_address",
4357 FT_STRING, BASE_NONE, NULL, 0x0,
4360 { &hf_pfcp_linked_urr_id,
4361 { "Linked URR ID", "pfcp.linked_urr_id",
4362 FT_UINT16, BASE_DEC, NULL, 0x0,
4365 { &hf_pfcp_outer_hdr_desc,
4366 { "Outer Header Creation Description", "pfcp.outer_hdr_desc",
4367 FT_UINT16, BASE_DEC, VALS(pfcp_outer_hdr_desc_vals), 0x0,
4370 { &hf_pfcp_outer_hdr_creation_teid,
4371 { "TEID", "pfcp.outer_hdr_creation.teid",
4372 FT_UINT32, BASE_HEX, NULL, 0x0,
4375 { &hf_pfcp_outer_hdr_creation_ipv4,
4376 { "IPv4 Address", "pfcp.outer_hdr_creation.ipv4",
4377 FT_IPv4, BASE_NONE, NULL, 0x0,
4380 { &hf_pfcp_outer_hdr_creation_ipv6,
4381 { "IPv6 Address", "pfcp.outer_hdr_creation.ipv6",
4382 FT_IPv6, BASE_NONE, NULL, 0x0,
4385 { &hf_pfcp_outer_hdr_creation_port,
4386 { "Port Number", "pfcp.outer_hdr_creation.port",
4387 FT_UINT16, BASE_DEC, NULL, 0x0,
4390 { &hf_pfcp_tos_traf_class,
4391 { "ToS/Traffic Class", "pfcp.tos_traf_class.port",
4392 FT_UINT16, BASE_DEC, NULL, 0x0,
4395 { &hf_pfcp_time_threshold,
4396 { "Time Threshold", "pfcp.time_threshold",
4397 FT_UINT16, BASE_DEC, NULL, 0x0,
4400 { &hf_pfcp_forwarding_policy_id_len,
4401 { "Forwarding Policy Identifier Length", "pfcp.forwarding_policy_id_len",
4402 FT_UINT8, BASE_DEC, NULL, 0x0,
4405 { &hf_pfcp_forwarding_policy_id,
4406 { "Forwarding Policy Identifier", "pfcp.forwarding_policy_id",
4407 FT_BYTES, BASE_NONE, NULL, 0x0,
4410 { &hf_pfcp_measurement_method_flags,
4411 { "Flags", "pfcp.measurement_method_flags",
4412 FT_UINT8, BASE_HEX, NULL, 0x0,
4415 { &hf_pfcp_b0_durat,
4416 { "DURAT (Duration)", "pfcp.measurement_method_flags.durat",
4417 FT_BOOLEAN, 8, NULL, 0x01,
4420 { &hf_pfcp_b1_volume,
4421 { "VOLUM (Volume)", "pfcp.measurement_method_flags.volume",
4422 FT_BOOLEAN, 8, NULL, 0x02,
4425 { &hf_pfcp_b2_event,
4426 { "EVENT (Event)", "pfcp.measurement_method_flags.event",
4427 FT_BOOLEAN, 8, NULL, 0x04,
4430 { &hf_pfcp_subsequent_time_threshold,
4431 { "Subsequent Time Threshold", "pfcp.subsequent_time_threshold",
4432 FT_UINT32, BASE_DEC, NULL, 0x0,
4435 { &hf_pfcp_inactivity_detection_time,
4436 { "Inactivity Detection Time", "pfcp.inactivity_detection_time",
4437 FT_UINT32, BASE_DEC, NULL, 0x0,
4440 { &hf_pfcp_monitoring_time,
4441 { "Monitoring Time", "pfcp.monitoring_time",
4442 FT_STRING, BASE_NONE, NULL, 0,
4445 { &hf_pfcp_reporting_triggers,
4446 { "Flags", "pfcp.reporting_triggers_flags",
4447 FT_UINT16, BASE_HEX, NULL, 0x0,
4450 { &hf_pfcp_reporting_triggers_b0_volqu,
4451 { "VOLQU (Volume Quota)", "pfcp.reporting_triggers_flags.volqu",
4452 FT_BOOLEAN, 16, NULL, 0x0001,
4455 { &hf_pfcp_reporting_triggers_b1_timqu,
4456 { "TIMQU (Time Quota)", "pfcp.reporting_triggers_flags.timqu",
4457 FT_BOOLEAN, 16, NULL, 0x0002,
4460 { &hf_pfcp_reporting_triggers_b2_envcl,
4461 { "ENVCL (Envelope Closure)", "pfcp.reporting_triggers_flags.envcl",
4462 FT_BOOLEAN, 16, NULL, 0x0004,
4465 { &hf_pfcp_reporting_triggers_b7_b3_spare,
4466 { "Spare", "pfcp.reporting_triggers_flags.spare",
4467 FT_UINT16, BASE_DEC, NULL, 0x00F8,
4470 { &hf_pfcp_reporting_triggers_b8_perio,
4471 { "PERIO (Periodic Reporting)", "pfcp.reporting_triggers_flags.perio",
4472 FT_BOOLEAN, 16, NULL, 0x0100,
4475 { &hf_pfcp_reporting_triggers_b9_volth,
4476 { "VOLTH (Volume Threshold)", "pfcp.reporting_triggers_flags.volth",
4477 FT_BOOLEAN, 16, NULL, 0x0200,
4480 { &hf_pfcp_reporting_triggers_b10_timth,
4481 { "TIMTH (Time Threshold)", "pfcp.reporting_triggers_flags.timth",
4482 FT_BOOLEAN, 16, NULL, 0x0400,
4485 { &hf_pfcp_reporting_triggers_b11_quhti,
4486 { "QUHTI (Quota Holding Time)", "pfcp.reporting_triggers_flags.quhti",
4487 FT_BOOLEAN, 16, NULL, 0x0800,
4490 { &hf_pfcp_reporting_triggers_b12_start,
4491 { "START (Start of Traffic)", "pfcp.reporting_triggers_flags.start",
4492 FT_BOOLEAN, 16, NULL, 0x1000,
4495 { &hf_pfcp_reporting_triggers_b13_stopt,
4496 { "STOPT (Stop of Traffic)", "pfcp.reporting_triggers_flags.stopt",
4497 FT_BOOLEAN, 16, NULL, 0x2000,
4500 { &hf_pfcp_reporting_triggers_b14_droth,
4501 { "DROTH (Dropped DL Traffic Threshold)", "pfcp.reporting_triggers_flags.droth",
4502 FT_BOOLEAN, 16, NULL, 0x4000,
4505 { &hf_pfcp_reporting_triggers_b15_liusa,
4506 { "LIUSA (Linked Usage Reporting)", "pfcp.reporting_triggers_flags.liusa",
4507 FT_BOOLEAN, 16, NULL, 0x8000,
4511 { &hf_pfcp_usage_report_trigger,
4512 { "Flags", "pfcp.usage_report_trigger",
4513 FT_UINT16, BASE_HEX, NULL, 0x0,
4517 { &hf_pfcp_usage_report_trigger_b0_volqu,
4518 { "VOLQU (Volume Quota)", "pfcp.usage_report_trigger_flags.volqu",
4519 FT_BOOLEAN, 16, NULL, 0x0001,
4522 { &hf_pfcp_usage_report_trigger_b1_timqu,
4523 { "TIMQU (Time Quota)", "pfcp.usage_report_trigger_flags.timqu",
4524 FT_BOOLEAN, 16, NULL, 0x0002,
4527 { &hf_pfcp_usage_report_trigger_b2_liusa,
4528 { "LIUSA (Linked Usage Reporting)", "pfcp.usage_report_trigger_flags.liusa",
4529 FT_BOOLEAN, 16, NULL, 0x0004,
4532 { &hf_pfcp_usage_report_trigger_b3_termr,
4533 { "TERMR (Termination Report)", "pfcp.usage_report_trigger.term",
4534 FT_BOOLEAN, 16, NULL, 0x0008,
4537 { &hf_pfcp_usage_report_trigger_b4_monit,
4538 { "MONIT (Monitoring Time)", "pfcp.usage_report_trigger.monit",
4539 FT_BOOLEAN, 16, NULL, 0x0010,
4542 { &hf_pfcp_usage_report_trigger_b5_envcl,
4543 { "ENVCL (Envelope Closure)", "pfcp.usage_report_trigger_flags.envcl",
4544 FT_BOOLEAN, 16, NULL, 0x0020,
4547 { &hf_pfcp_usage_report_trigger_b7_b6_spare,
4548 { "Spare", "pfcp.reporting_triggers_flags.spare",
4549 FT_UINT16, BASE_DEC, NULL, 0x00C0,
4552 { &hf_pfcp_usage_report_trigger_b8_perio,
4553 { "PERIO (Periodic Reporting)", "pfcp.usage_report_trigger_flags.perio",
4554 FT_BOOLEAN, 16, NULL, 0x0100,
4557 { &hf_pfcp_usage_report_trigger_b9_volth,
4558 { "VOLTH (Volume Threshold)", "pfcp.usage_report_trigger_flags.volth",
4559 FT_BOOLEAN, 16, NULL, 0x0200,
4562 { &hf_pfcp_usage_report_trigger_b10_timth,
4563 { "TIMTH (Time Threshold)", "pfcp.usage_report_trigger_flags.timth",
4564 FT_BOOLEAN, 16, NULL, 0x0400,
4567 { &hf_pfcp_usage_report_trigger_b11_quhti,
4568 { "QUHTI (Quota Holding Time)", "pfcp.usage_report_trigger_flags.quhti",
4569 FT_BOOLEAN, 16, NULL, 0x0800,
4572 { &hf_pfcp_usage_report_trigger_b12_start,
4573 { "START (Start of Traffic)", "pfcp.usage_report_trigger_flags.start",
4574 FT_BOOLEAN, 16, NULL, 0x1000,
4577 { &hf_pfcp_usage_report_trigger_b13_stopt,
4578 { "STOPT (Stop of Traffic)", "pfcp.usage_report_trigger_flags.stopt",
4579 FT_BOOLEAN, 16, NULL, 0x2000,
4582 { &hf_pfcp_usage_report_trigger_b14_droth,
4583 { "DROTH (Dropped DL Traffic Threshold)", "pfcp.usage_report_trigger_flags.droth",
4584 FT_BOOLEAN, 16, NULL, 0x4000,
4587 { &hf_pfcp_usage_report_trigger_b15_immer,
4588 { "IMMER (Immediate Report)", "pfcp.usage_report_trigger.immer",
4589 FT_BOOLEAN, 16, NULL, 0x8000,
4593 { &hf_pfcp_volume_threshold,
4594 { "Flags", "pfcp.volume_threshold",
4595 FT_UINT8, BASE_HEX, NULL, 0x0,
4598 { &hf_pfcp_b0_tovol,
4599 { "TOVOL", "pfcp.tovol_flg",
4600 FT_BOOLEAN, 8, NULL, 0x01,
4603 { &hf_pfcp_b1_ulvol,
4604 { "ULVOL", "pfcp.ulvol_flg",
4605 FT_BOOLEAN, 8, NULL, 0x02,
4608 { &hf_pfcp_b2_dlvol,
4609 { "DLVOL", "pfcp.dlvol_flg",
4610 FT_BOOLEAN, 8, NULL, 0x04,
4613 { &hf_pfcp_volume_threshold_tovol,
4614 { "Total Volume", "pfcp.volume_threshold.tovol",
4615 FT_UINT64, BASE_DEC, NULL, 0x0,
4618 { &hf_pfcp_volume_threshold_ulvol,
4619 { "Uplink Volume", "pfcp.volume_threshold.ulvol",
4620 FT_UINT64, BASE_DEC, NULL, 0x0,
4623 { &hf_pfcp_volume_threshold_dlvol,
4624 { "Downlink Volume", "pfcp.volume_threshold.dlvol",
4625 FT_UINT64, BASE_DEC, NULL, 0x0,
4628 { &hf_pfcp_volume_quota,
4629 { "Flags", "pfcp.volume_quota",
4630 FT_UINT8, BASE_HEX, NULL, 0x0,
4633 { &hf_pfcp_volume_quota_tovol,
4634 { "Total Volume", "pfcp.volume_quota.tovol",
4635 FT_UINT64, BASE_DEC, NULL, 0x0,
4638 { &hf_pfcp_volume_quota_ulvol,
4639 { "Uplink Volume", "pfcp.volume_quota.ulvol",
4640 FT_UINT64, BASE_DEC, NULL, 0x0,
4643 { &hf_pfcp_volume_quota_dlvol,
4644 { "Downlink Volume", "pfcp.volume_quota.dlvol",
4645 FT_UINT64, BASE_DEC, NULL, 0x0,
4648 { &hf_pfcp_subseq_volume_threshold,
4649 { "Flags", "pfcp.subseq_volume_threshold",
4650 FT_UINT8, BASE_HEX, NULL, 0x0,
4653 { &hf_pfcp_subseq_volume_threshold_b0_tovol,
4654 { "TOVOL", "pfcp.subseq_volume_threshold.tovol_flg",
4655 FT_BOOLEAN, 8, NULL, 0x01,
4658 { &hf_pfcp_subseq_volume_threshold_b1_ulvol,
4659 { "ULVOL", "pfcp.subseq_volume_threshold.ulvol_flg",
4660 FT_BOOLEAN, 8, NULL, 0x02,
4663 { &hf_pfcp_subseq_volume_threshold_b2_dlvol,
4664 { "DLVOL", "pfcp.subseq_volume_threshold.dlvol_flg",
4665 FT_BOOLEAN, 8, NULL, 0x04,
4668 { &hf_pfcp_subseq_volume_threshold_tovol,
4669 { "Total Volume", "pfcp.subseq_volume_threshold.tovol",
4670 FT_UINT64, BASE_DEC, NULL, 0x0,
4673 { &hf_pfcp_subseq_volume_threshold_ulvol,
4674 { "Uplink Volume", "pfcp.subseq_volume_threshold.ulvol",
4675 FT_UINT64, BASE_DEC, NULL, 0x0,
4678 { &hf_pfcp_subseq_volume_threshold_dlvol,
4679 { "Downlink Volume", "pfcp.subseq_volume_threshold.dlvol",
4680 FT_UINT64, BASE_DEC, NULL, 0x0,
4683 { &hf_pfcp_time_quota,
4684 { "Time Quota", "pfcp.time_quota",
4685 FT_UINT32, BASE_DEC, NULL, 0x0,
4688 { &hf_pfcp_start_time,
4689 { "Start Time", "pfcp.start_time",
4690 FT_STRING, BASE_NONE, NULL, 0,
4693 { &hf_pfcp_end_time,
4694 { "End Time", "pfcp.start_time",
4695 FT_STRING, BASE_NONE, NULL, 0,
4698 { &hf_pfcp_quota_holding_time,
4699 { "Quota Holding Time", "pfcp.quota_holding_time",
4700 FT_UINT32, BASE_DEC, NULL, 0x0,
4703 { &hf_pfcp_dropped_dl_traffic_threshold,
4704 { "Flags", "pfcp.dropped_dl_traffic_threshold",
4705 FT_UINT8, BASE_HEX, NULL, 0x0,
4708 { &hf_pfcp_dropped_dl_traffic_threshold_b0_dlpa,
4709 { "DLPA", "pfcp.dropped_dl_traffic_threshold.dlpa_flg",
4710 FT_BOOLEAN, 8, NULL, 0x01,
4713 { &hf_pfcp_downlink_packets,
4714 { "Downlink Packets", "pfcp.downlink_packets",
4715 FT_UINT64, BASE_DEC, NULL, 0x0,
4718 { &hf_pfcp_qer_correlation_id,
4719 { "QER Correlation ID", "pfcp.qer_correlation_id",
4720 FT_UINT32, BASE_DEC, NULL, 0x0,
4723 { &hf_pfcp_gate_status,
4724 { "Flags", "pfcp.gate_status",
4725 FT_UINT8, BASE_HEX, NULL, 0x0,
4728 { &hf_pfcp_gate_status_b0b1_dlgate,
4729 { "DL Gate", "pfcp.gate_status.ulgate",
4730 FT_UINT8, BASE_DEC, VALS(pfcp_gate_status_vals), 0x03,
4733 { &hf_pfcp_gate_status_b3b2_ulgate,
4734 { "UL Gate", "pfcp.gate_status.ulgate",
4735 FT_UINT8, BASE_DEC, VALS(pfcp_gate_status_vals), 0x0e,
4739 { "UL MBR", "pfcp.ul_mbr",
4740 FT_UINT40, BASE_DEC, NULL, 0x0,
4744 { "DL MBR", "pfcp.dl_mbr",
4745 FT_UINT40, BASE_DEC, NULL, 0x0,
4749 { "UL GBR", "pfcp.ul_gbr",
4750 FT_UINT40, BASE_DEC, NULL, 0x0,
4754 { "DL GBR", "pfcp.dl_gbr",
4755 FT_UINT40, BASE_DEC, NULL, 0x0,
4758 { &hf_pfcp_report_type,
4759 { "Flags", "pfcp.report_type",
4760 FT_UINT8, BASE_HEX, NULL, 0x0,
4764 { "ERIR (Error Indication Report)", "pfcp.report_type.erir",
4765 FT_BOOLEAN, 8, NULL, 0x04,
4769 { "USAR (Usage Report)", "pfcp.report_type.usar",
4770 FT_BOOLEAN, 8, NULL, 0x02,
4774 { "DLDR (Downlink Data Report)", "pfcp.report_type.dldr",
4775 FT_BOOLEAN, 8, NULL, 0x01,
4778 { &hf_pfcp_offending_ie,
4779 { "Type of the offending IE", "pfcp.offending_ie",
4780 FT_UINT16, BASE_DEC | BASE_EXT_STRING, &pfcp_ie_type_ext, 0x0,
4784 { &hf_pfcp_up_function_features,
4785 { "Flags", "pfcp.up_function_features",
4786 FT_UINT16, BASE_HEX, NULL, 0x0,
4790 { "BUCP", "pfcp.up_function_features.bucp",
4791 FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0100,
4792 "Downlink Data Buffering in CP function", HFILL }
4795 { "DDND", "pfcp.up_function_features.ddnd",
4796 FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0200,
4797 "Buffering parameter 'Downlink Data Notification Delay", HFILL }
4799 { &hf_pfcp_b10_dlbd,
4800 { "DLBD", "pfcp.up_function_features.dlbd",
4801 FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0400,
4804 { &hf_pfcp_b11_trst,
4805 { "TRST", "pfcp.up_function_features.trst",
4806 FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0800,
4807 "Traffic Steering", HFILL }
4809 { &hf_pfcp_b12_ftup,
4810 { "FTUP", "pfcp.up_function_features.ftup",
4811 FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x1000,
4812 "F-TEID allocation / release in the UP function", HFILL }
4814 { &hf_pfcp_b13_pfdm,
4815 { "PFDM", "pfcp.up_function_features.pfdm",
4816 FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x2000,
4817 "PFD Management procedure", HFILL }
4819 { &hf_pfcp_b14_heeu,
4820 { "HEEU", "pfcp.up_function_features.heeu",
4821 FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x4000,
4822 "Header Enrichment of Uplink traffic", HFILL }
4824 { &hf_pfcp_b15_treu,
4825 { "TREU", "pfcp.up_function_features.treu",
4826 FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x8000,
4827 "Traffic Redirection Enforcement in the UP function", HFILL }
4830 { "EMPU", "pfcp.up_function_features.empu",
4831 FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0001,
4832 "Sending of End Marker packets", HFILL }
4834 { &hf_pfcp_b1_b7_spare,
4835 { "Spare", "pfcp.up_function_features.spare",
4836 FT_BOOLEAN, 16, NULL , 0x00FE,
4837 "Sending of End Marker packets", HFILL }
4839 { &hf_pfcp_sequence_number,
4840 { "Sequence Number", "pfcp.sequence_number",
4841 FT_UINT32, BASE_DEC, NULL, 0x0,
4845 { "Metric", "pfcp.metric",
4846 FT_UINT8, BASE_DEC, NULL, 0x0,
4849 { &hf_pfcp_timer_unit,
4850 { "Timer unit", "pfcp.timer_unit",
4851 FT_UINT8, BASE_DEC, VALS(pfcp_timer_unit_vals), 0xe0,
4854 { &hf_pfcp_timer_value,
4855 { "Timer value", "pfcp.timer_value",
4856 FT_UINT8, BASE_DEC, NULL, 0x1f,
4859 { &hf_pfcp_volume_measurement,
4860 { "Flags", "pfcp.volume_measurement",
4861 FT_UINT8, BASE_HEX, NULL, 0x0,
4864 { &hf_pfcp_vol_meas_tovol,
4865 { "Total Volume", "pfcp.volume_measurement.tovol",
4866 FT_UINT64, BASE_DEC, NULL, 0x0,
4869 { &hf_pfcp_vol_meas_ulvol,
4870 { "Uplink Volume", "pfcp.volume_measurement.ulvol",
4871 FT_UINT64, BASE_DEC, NULL, 0x0,
4874 { &hf_pfcp_vol_meas_dlvol,
4875 { "Downlink Volume", "pfcp.volume_measurement.dlvol",
4876 FT_UINT64, BASE_DEC, NULL, 0x0,
4879 { &hf_pfcp_cp_function_features,
4880 { "Flags", "pfcp.cp_function_features",
4881 FT_UINT8, BASE_HEX, NULL, 0x0,
4885 { "LOAD", "pfcp.cp_function_features.load",
4886 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
4887 "Load Control", HFILL }
4890 { "OVRL", "pfcp.cp_function_features.ovrl",
4891 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02,
4892 "Overload Control", HFILL }
4894 { &hf_pfcp_usage_information,
4895 { "Flags", "pfcp.usage_information",
4896 FT_UINT8, BASE_HEX, NULL, 0x0,
4900 { "BEF (Before)", "pfcp.usage_information.bef",
4901 FT_BOOLEAN, 8, NULL, 0x01,
4905 { "AFT (After)", "pfcp.usage_information.aft",
4906 FT_BOOLEAN, 8, NULL, 0x02,
4910 { "UAE (Usage After Enforcement)", "pfcp.usage_information.uae",
4911 FT_BOOLEAN, 8, NULL, 0x04,
4915 { "UBE (Usage Before Enforcement)", "pfcp.usage_information.ube",
4916 FT_BOOLEAN, 8, NULL, 0x08,
4919 { &hf_pfcp_application_instance_id,
4920 { "Application Instance Identifier", "pfcp.application_instance_id",
4921 FT_BYTES, BASE_NONE, NULL, 0x0,
4924 { &hf_pfcp_flow_dir,
4925 { "Flow Direction", "pfcp.flow_dir",
4926 FT_UINT8, BASE_DEC, VALS(pfcp_flow_dir_vals), 0x07,
4929 { &hf_pfcp_packet_rate,
4930 { "Flags", "pfcp.packet_rate",
4931 FT_UINT8, BASE_HEX, NULL, 0x0,
4935 { "ULPR (Uplink Packet Rate)", "pfcp.packet_rate.ulpr",
4936 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x01,
4940 { "DLPR (Downlink Packet Rate)", "pfcp.packet_rate.dlpr",
4941 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x02,
4944 { &hf_pfcp_ul_time_unit,
4945 { "Uplink Time Unit", "pfcp.ul_time_unit",
4946 FT_UINT8, BASE_DEC, VALS(pfcp_pr_time_unit_vals), 0x07,
4949 { &hf_pfcp_max_ul_pr,
4950 { "Maximum Uplink Packet Rate", "pfcp.max_ul_pr",
4951 FT_UINT16, BASE_DEC, NULL, 0x0,
4954 { &hf_pfcp_dl_time_unit,
4955 { "Downlink Time Unit", "pfcp.dl_time_unit",
4956 FT_UINT8, BASE_DEC, VALS(pfcp_pr_time_unit_vals), 0x07,
4959 { &hf_pfcp_max_dl_pr,
4960 { "Maximum Downlink Packet Rate", "pfcp.max_dl_pr",
4961 FT_UINT16, BASE_DEC, NULL, 0x0,
4964 { &hf_pfcp_dl_flow_level_marking,
4965 { "Flags", "pfcp.dl_flow_level_marking",
4966 FT_UINT8, BASE_HEX, NULL, 0x0,
4970 { "TTC (ToS/Traffic Class)", "pfcp.dl_flow_level_marking.ttc",
4971 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x01,
4975 { "SCI(Service Class Indicator)", "pfcp.dl_flow_level_marking.sci",
4976 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x02,
4980 { "Service Class Indicator", "pfcp.sci",
4981 FT_UINT16, BASE_HEX, NULL, 0x0,
4984 { &hf_pfcp_dl_data_notification_delay,
4985 { "Delay Value", "pfcp.dl_data_notification_delay",
4986 FT_UINT8, BASE_DEC, NULL, 0x0,
4987 "Delay Value in integer multiples of 50 millisecs, or zero", HFILL }
4989 { &hf_pfcp_packet_count,
4990 { "Packet Count", "pfcp.packet_count",
4991 FT_UINT16, BASE_DEC, NULL, 0x0,
4994 { &hf_pfcp_pfcp_dl_data_service_inf_flags,
4995 { "Flags", "pfcp.dl_data_service_inf_flags",
4996 FT_UINT8, BASE_HEX, NULL, 0x0,
5000 { "PPI(Paging Policy Indication)", "pfcp.dl_data_service_inf.ppi",
5001 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x01,
5005 { "Paging Policy Indication", "pfcp.ppi",
5006 FT_UINT16, BASE_DEC, NULL, 0x7f,
5009 { &hf_pfcp_sxsmreq_flags,
5010 { "Flags", "pfcp.sxsmreq_flags",
5011 FT_UINT8, BASE_HEX, NULL, 0x0,
5014 { &hf_pfcp_b0_drobu,
5015 { "DROBU (Drop Buffered Packets)", "pfcp.sxsmreq_flags.drobu",
5016 FT_BOOLEAN, 8, NULL, 0x01,
5019 { &hf_pfcp_b1_sndem,
5020 { "SNDEM (Send End Marker Packets)", "pfcp.sxsmreq_flags.sndem",
5021 FT_BOOLEAN, 8, NULL, 0x02,
5024 { &hf_pfcp_b2_qaurr,
5025 { "QAURR (Query All URRs)", "pfcp.sxsmreq_flags.qaurr",
5026 FT_BOOLEAN, 8, NULL, 0x04,
5029 { &hf_pfcp_sxsrrsp_flags,
5030 { "Flags", "pfcp.sxsrrsp_flags",
5031 FT_UINT8, BASE_HEX, NULL, 0x0,
5034 { &hf_pfcp_pfd_contents_flags,
5035 { "Flags", "pfcp.pfd_contents_flags",
5036 FT_UINT8, BASE_HEX, NULL, 0x0,
5040 { "FD (Flow Description)", "pfcp.pfd_contents_flags.fd",
5041 FT_BOOLEAN, 8, NULL, 0x01,
5045 { "URL (URL)", "pfcp.pfd_contents_flags.url",
5046 FT_BOOLEAN, 8, NULL, 0x02,
5050 { "DN (Domain Name)", "pfcp.pfd_contents_flags.dn",
5051 FT_BOOLEAN, 8, NULL, 0x04,
5055 { "CP (Custom PFD Content)", "pfcp.pfd_contents_flags.cp",
5056 FT_BOOLEAN, 8, NULL, 0x08,
5060 { "Length of URL", "pfcp.url_len",
5061 FT_UINT16, BASE_DEC, NULL, 0x0,
5065 { "URL", "pfcp.url",
5066 FT_BYTES, BASE_NONE, NULL, 0x0,
5070 { "Length of Domain Name", "pfcp.dn_len",
5071 FT_UINT16, BASE_DEC, NULL, 0x0,
5075 { "Domain Name", "pfcp.dn",
5076 FT_BYTES, BASE_NONE, NULL, 0x0,
5080 { "Length of Custom PFD Content", "pfcp.cp_len",
5081 FT_UINT16, BASE_DEC, NULL, 0x0,
5085 { "Custom PFD Content", "pfcp.cp",
5086 FT_BYTES, BASE_NONE, NULL, 0x0,
5089 { &hf_pfcp_header_type,
5090 { "Header Type", "pfcp.header_type",
5091 FT_UINT8, BASE_DEC, VALS(pfcp_header_type_vals), 0x1f,
5095 { "Length of Header Field Name", "pfcp.hf_len",
5096 FT_UINT8, BASE_DEC, NULL, 0x0,
5100 { "Header Field Name", "pfcp.hf_name",
5101 FT_BYTES, BASE_NONE, NULL, 0x0,
5104 { &hf_pfcp_hf_val_len,
5105 { "Length of Header Field Value", "pfcp.hf_val_len",
5106 FT_UINT8, BASE_DEC, NULL, 0x0,
5110 { "Header Field Value", "pfcp.hf_val",
5111 FT_BYTES, BASE_NONE, NULL, 0x0,
5114 { &hf_pfcp_measurement_info,
5115 { "Flags", "pfcp.measurement_info",
5116 FT_UINT8, BASE_HEX, NULL, 0x0,
5120 { "MBQE (Measurement Before QoS Enforcement)", "pfcp.measurement_info.fd",
5121 FT_BOOLEAN, 8, NULL, 0x01,
5125 { "INAM (Inactive Measurement)", "pfcp.measurement_info.inam",
5126 FT_BOOLEAN, 8, NULL, 0x02,
5129 { &hf_pfcp_node_report_type,
5130 { "Flags", "pfcp.node_report_type",
5131 FT_UINT8, BASE_HEX, NULL, 0x0,
5135 { "UPFR (User Plane Path Failure Report)", "pfcp.node_report_type.upfr",
5136 FT_BOOLEAN, 8, NULL, 0x01,
5139 { &hf_pfcp_remote_gtp_u_peer,
5140 { "Flags", "pfcp.remote_gtp_u_peer",
5141 FT_UINT8, BASE_HEX, NULL, 0x0,
5144 { &hf_pfcp_gtp_u_peer_flag_b0_v6,
5145 { "V6 (IPv6)", "pfcp.gtp_u_peer_flag.v6",
5146 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x01,
5149 { &hf_pfcp_gtp_u_peer_flag_b1_v4,
5150 { "V4 (IPv4)", "pfcp.gtp_u_peer_flag.v4",
5151 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x02,
5154 { &hf_pfcp_remote_gtp_u_peer_ipv4,
5155 { "IPv4 address", "pfcp.node_id_ipv4",
5156 FT_IPv4, BASE_NONE, NULL, 0x0,
5159 { &hf_pfcp_remote_gtp_u_peer_ipv6,
5160 { "IPv6 address", "pfcp.node_id_ipv6",
5161 FT_IPv6, BASE_NONE, NULL, 0x0,
5165 { "UR-SEQN", "pfcp.ur_seqn",
5166 FT_UINT32, BASE_DEC, NULL, 0x0,
5169 { &hf_pfcp_oci_flags,
5170 { "Flags", "pfcp.oci_flags",
5171 FT_UINT8, BASE_HEX, NULL, 0x0,
5175 { "AOCI: Associate OCI with Node ID", "pfcp.oci_flags.aoci",
5176 FT_BOOLEAN, 8, NULL, 0x01,
5179 { &hf_pfcp_sx_assoc_rel_req_flags,
5180 { "Flags", "pfcp.sx_assoc_rel_req",
5181 FT_UINT8, BASE_HEX, NULL, 0x0,
5185 { "SARR (Sx Association Release Request)", "pfcp.sx_assoc_rel_req.sarr",
5186 FT_BOOLEAN, 8, NULL, 0x01,
5189 { &hf_pfcp_upiri_flags,
5190 { "Flags", "pfcp.upiri_flags",
5191 FT_UINT8, BASE_HEX, NULL, 0x0,
5194 { &hf_pfcp_upiri_flg_b5_assoni,
5195 { "ASSONI (Associated Network Instance)", "pfcp.upiri_flags.assoni",
5196 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x20,
5199 { &hf_pfcp_upiri_flg_b1_v6,
5200 { "V6 (IPv6)", "pfcp.upiri_flags.v6",
5201 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x02,
5204 { &hf_pfcp_upiri_flg_b0_v4,
5205 { "V4 (IPv4)", "pfcp.upiri_flags.v4",
5206 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x01,
5209 { &hf_pfcp_upiri_teidri,
5210 { "TEID Range Indication", "pfcp.upiri.teidri",
5211 FT_UINT8, BASE_DEC, NULL, 0x1C,
5214 { &hf_pfcp_upiri_teid_range,
5215 { "TEID", "pfcp.upiri.teid_range",
5216 FT_UINT32, BASE_HEX, NULL, 0x0,
5219 { &hf_pfcp_upiri_ipv4,
5220 { "IPv4 address", "pfcp.upiri.ipv4_addr",
5221 FT_IPv4, BASE_NONE, NULL, 0x0,
5224 { &hf_pfcp_upiri_ipv6,
5225 { "IPv6 address", "pfcp.upiri.ipv6_addr",
5226 FT_IPv6, BASE_NONE, NULL, 0x0,
5229 { &hf_pfcp_upiri_network_instance,
5230 { "Network Instance", "pfcp.upiri.network_instance",
5231 FT_BYTES, BASE_NONE, NULL, 0x0,
5234 { &hf_pfcp_user_plane_inactivity_timer,
5235 { "User Plane Inactivity Timer", "pfcp.user_plane_inactivity_time",
5236 FT_UINT32, BASE_DEC|BASE_UNIT_STRING, &units_seconds, 0,
5242 /* Setup protocol subtree array */
5243 #define NUM_INDIVIDUAL_ELEMS_PFCP 33
5244 gint *ett[NUM_INDIVIDUAL_ELEMS_PFCP +
5245 (NUM_PFCP_IES - 1)];
5248 ett[1] = &ett_pfcp_flags;
5249 ett[2] = &ett_pfcp_ie;
5250 ett[3] = &ett_pfcp_grouped_ie;
5251 ett[4] = &ett_pfcp_f_seid_flags;
5252 ett[5] = &ett_f_teid_flags;
5253 ett[6] = &ett_pfcp_ue_ip_address_flags;
5254 ett[7] = &ett_pfcp_sdf_filter_flags;
5255 ett[8] = &ett_pfcp_apply_action_flags;
5256 ett[9] = &ett_pfcp_measurement_method_flags;
5257 ett[10] = &ett_pfcp_reporting_triggers;
5258 ett[11] = &ett_pfcp_volume_threshold;
5259 ett[12] = &ett_pfcp_volume_quota;
5260 ett[13] = &ett_pfcp_subseq_volume_threshold;
5261 ett[14] = &ett_pfcp_dropped_dl_traffic_threshold;
5262 ett[15] = &ett_pfcp_gate_status;
5263 ett[16] = &ett_pfcp_report_type;
5264 ett[17] = &ett_pfcp_up_function_features;
5265 ett[18] = &ett_pfcp_report_trigger;
5266 ett[19] = &ett_pfcp_volume_measurement;
5267 ett[20] = &ett_pfcp_cp_function_features;
5268 ett[21] = &ett_pfcp_usage_information;
5269 ett[22] = &ett_pfcp_packet_rate;
5270 ett[23] = &ett_pfcp_pfcp_dl_flow_level_marking;
5271 ett[24] = &ett_pfcp_dl_data_service_inf;
5272 ett[25] = &ett_pfcp_sxsmreq;
5273 ett[26] = &ett_pfcp_sxsrrsp;
5274 ett[27] = &ett_pfcp_measurement_info;
5275 ett[28] = &ett_pfcp_node_report_type;
5276 ett[29] = &ett_pfcp_remote_gtp_u_peer;
5277 ett[30] = &ett_pfcp_oci_flags;
5278 ett[31] = &ett_sx_assoc_rel_req_flags;
5279 ett[32] = &ett_pfcp_upiri_flags;
5282 static ei_register_info ei[] = {
5283 { &ei_pfcp_ie_reserved,{ "pfcp.ie_id_reserved", PI_PROTOCOL, PI_ERROR, "Reserved IE value used", EXPFILL } },
5284 { &ei_pfcp_ie_data_not_decoded,{ "pfcp.ie_data_not_decoded", PI_UNDECODED, PI_NOTE, "IE data not decoded by WS yet", EXPFILL } },
5285 { &ei_pfcp_ie_not_decoded_null,{ "pfcp.ie_not_decoded_null", PI_UNDECODED, PI_NOTE, "IE not decoded yet(WS:no decoding function(NULL))", EXPFILL } },
5286 { &ei_pfcp_ie_not_decoded_to_large,{ "pfcp.ie_not_decoded", PI_UNDECODED, PI_NOTE, "IE not decoded yet(WS:IE id to large)", EXPFILL } },
5287 { &ei_pfcp_enterprise_ie_3gpp,{ "pfcp.ie_enterprise_3gpp", PI_PROTOCOL, PI_ERROR, "IE not decoded yet(WS:No vendor dissector)", EXPFILL } },
5288 { &ei_pfcp_ie_encoding_error,{ "pfcp.ie_encoding_error", PI_PROTOCOL, PI_ERROR, "IE wrongly encoded)", EXPFILL } },
5291 expert_module_t* expert_pfcp;
5293 guint last_index = NUM_INDIVIDUAL_ELEMS_PFCP, i;
5295 for (i = 0; i < (NUM_PFCP_IES-1); i++, last_index++)
5297 ett_pfcp_elem[i] = -1;
5298 ett[last_index] = &ett_pfcp_elem[i];
5300 proto_pfcp = proto_register_protocol("Packet Forwarding Control Protocol", "PFCP", "pfcp");
5301 pfcp_handle = register_dissector("pfcp", dissect_pfcp, proto_pfcp);
5303 proto_register_field_array(proto_pfcp, hf_pfcp, array_length(hf_pfcp));
5304 proto_register_subtree_array(ett, array_length(ett));
5305 expert_pfcp = expert_register_protocol(proto_pfcp);
5306 expert_register_field_array(expert_pfcp, ei, array_length(ei));
5308 /* Register dissector table for enterprise IE dissectors */
5309 pfcp_enterprise_ies_dissector_table = register_dissector_table("pfcp.enterprise_ies", "PFCP Enterprice IEs",
5310 proto_pfcp, FT_UINT32, BASE_DEC);
5312 pfcp_3gpp_ies_handle = register_dissector("pfcp_3gpp_ies", dissect_pfcp_3gpp_enterprise_ies, proto_pfcp);
5318 proto_reg_handoff_pfcp(void)
5320 dissector_add_uint_with_preference("udp.port", UDP_PORT_PFCP, pfcp_handle);
5321 /* Register 3GPP in the table to give expert info and serve as an example how to add decoding of enterprise IEs*/
5322 dissector_add_uint("pfcp.enterprise_ies", VENDOR_THE3GPP, pfcp_3gpp_ies_handle);
5328 * Editor modelines - http://www.wireshark.org/tools/modelines.html
5333 * indent-tabs-mode: nil
5336 * vi: set shiftwidth=4 tabstop=8 expandtab:
5337 * :indentSize=4:tabSize=8:noTabs=true: