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;
324 static int ett_pfcp = -1;
325 static int ett_pfcp_flags = -1;
326 static int ett_pfcp_ie = -1;
327 static int ett_pfcp_grouped_ie = -1;
328 static int ett_pfcp_f_seid_flags = -1;
329 static int ett_f_teid_flags = -1;
330 static int ett_pfcp_ue_ip_address_flags = -1;
331 static int ett_pfcp_sdf_filter_flags = -1;
332 static int ett_pfcp_apply_action_flags = -1;
333 static int ett_pfcp_measurement_method_flags = -1;
334 static int ett_pfcp_reporting_triggers = -1;
335 static int ett_pfcp_volume_threshold = -1;
336 static int ett_pfcp_volume_quota = -1;
337 static int ett_pfcp_subseq_volume_threshold = -1;
338 static int ett_pfcp_dropped_dl_traffic_threshold = -1;
339 static int ett_pfcp_gate_status = -1;
340 static int ett_pfcp_report_type = -1;
341 static int ett_pfcp_up_function_features = -1;
342 static int ett_pfcp_report_trigger = -1;
343 static int ett_pfcp_volume_measurement = -1;
344 static int ett_pfcp_cp_function_features = -1;
345 static int ett_pfcp_usage_information = -1;
346 static int ett_pfcp_packet_rate = -1;
347 static int ett_pfcp_pfcp_dl_flow_level_marking = -1;
348 static int ett_pfcp_dl_data_service_inf = -1;
349 static int ett_pfcp_sxsmreq = -1;
350 static int ett_pfcp_sxsrrsp = -1;
351 static int ett_pfcp_measurement_info = -1;
352 static int ett_pfcp_node_report_type = -1;
353 static int ett_pfcp_remote_gtp_u_peer = -1;
354 static int ett_pfcp_oci_flags = -1;
355 static int ett_sx_assoc_rel_req_flags = -1;
356 static int ett_pfcp_upiri_flags = -1;
358 static expert_field ei_pfcp_ie_reserved = EI_INIT;
359 static expert_field ei_pfcp_ie_data_not_decoded = EI_INIT;
360 static expert_field ei_pfcp_ie_not_decoded_null = EI_INIT;
361 static expert_field ei_pfcp_ie_not_decoded_to_large = EI_INIT;
362 static expert_field ei_pfcp_enterprise_ie_3gpp = EI_INIT;
363 static expert_field ei_pfcp_ie_encoding_error = EI_INIT;
367 static dissector_table_t pfcp_enterprise_ies_dissector_table;
369 static void dissect_pfcp_ies_common(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, gint offset, guint8 message_type);
370 static void dissect_pfcp_create_pdr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
371 static void dissect_pfcp_pdi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
372 static void dissect_pfcp_create_far(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
373 static void dissect_pfcp_forwarding_parameters(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
374 static void dissect_pfcp_duplicating_parameters(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
375 static void dissect_pfcp_create_urr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
376 static void dissect_pfcp_create_qer(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
377 static void dissect_pfcp_created_pdr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
378 static void dissect_pfcp_update_pdr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
379 static void dissect_pfcp_update_far(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
380 static void dissect_pfcp_upd_forwarding_param(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
381 static void dissect_pfcp_update_bar(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
382 static void dissect_pfcp_update_urr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
383 static void dissect_pfcp_update_qer(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
384 static void dissect_pfcp_remove_pdr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
385 static void dissect_pfcp_remove_far(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
386 static void dissect_pfcp_remove_urr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
387 static void dissect_pfcp_remove_qer(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
388 static void dissect_pfcp_load_control_information(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
389 static void dissect_pfcp_overload_control_information(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
390 static void dissect_pfcp_application_ids_pfds(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
391 static void dissect_pfcp_pfd_context(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
392 static void dissect_pfcp_application_detection_inf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
393 static void dissect_pfcp_pfcp_query_urr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
394 static void dissect_pfcp_usage_report_smr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
395 static void dissect_pfcp_usage_report_sdr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
396 static void dissect_pfcp_usage_report_srr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
397 static void dissect_pfcp_downlink_data_report(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
398 static void dissect_pfcp_create_bar(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
399 static void dissect_pfcp_update_bar_smr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
400 static void dissect_pfcp_remove_bar(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
401 static void dissect_pfcp_error_indication_report(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
402 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);
403 static void dissect_pfcp_update_duplicating_parameters(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type);
405 static const true_false_string pfcp_id_predef_dynamic_tfs = {
410 #define PFCP_MSG_RESERVED_0 0
412 static const value_string pfcp_message_type[] = {
413 {PFCP_MSG_RESERVED_0, "Reserved"},
414 /* Sx Node related messages */
416 { 1, "Sx Heartbeat Request"},
417 { 2, "Sx Heartbeat Response"},
418 { 3, "Sx PFD Management Request"},
419 { 4, "Sx PFD Management Response"},
420 { 5, "Sx Association Setup Request"},
421 { 6, "Sx Association Setup Response"},
422 { 7, "Sx Association Update Request"},
423 { 8, "Sx Association Update Response"},
424 { 9, "Sx Association Release Request"},
425 { 10, "Sx Association Release Response"},
426 { 11, "Sx Version Not Supported Response"},
427 { 12, "Sx Node Report Request"},
428 { 13, "Sx Node Report Response"},
429 { 14, "Sx Session Set Deletion Request"},
430 { 15, "Sx Session Set Deletion Response"},
431 //16 to 49 For future use
432 //Sx Session related messages
433 { 50, "Sx Session Establishment Request"},
434 { 51, "Sx Session Establishment Response"},
435 { 52, "Sx Session Modification Request"},
436 { 53, "Sx Session Modification Response"},
437 { 54, "Sx Session Deletion Request"},
438 { 55, "Sx Session Deletion Response"},
439 { 56, "Sx Session Report Request"},
440 { 57, "Sx Session Report Response"},
441 //58 to 99 For future use
443 //100 to 255 For future use
446 static value_string_ext pfcp_message_type_ext = VALUE_STRING_EXT_INIT(pfcp_message_type);
448 /* 8.1.2 Information Element Types */
449 #define PFCP_IE_ID_CREATE_PDR 1
450 #define PFCP_IE_ID_PDI 2
451 #define PFCP_IE_CREATE_FAR 3
452 #define PFCP_IE_FORWARDING_PARAMETERS 4
453 #define PFCP_IE_DUPLICATING_PARAMETERS 5
454 #define PFCP_IE_CREATE_URR 6
455 #define PFCP_IE_CREATE_QER 7
456 #define PFCP_IE_CREATED_PDR 8
457 #define PFCP_IE_UPDATE_PDR 9
458 #define PFCP_IE_UPDATE_FAR 10
459 #define PFCP_IE_UPD_FORWARDING_PARAM 11
460 #define PFCP_IE_UPDATE_BAR 12
461 #define PFCP_IE_UPDATE_URR 13
462 #define PFCP_IE_UPDATE_QER 14
463 #define PFCP_IE_REMOVE_PDR 15
464 #define PFCP_IE_REMOVE_FAR 16
465 #define PFCP_IE_REMOVE_URR 17
466 #define PFCP_IE_REMOVE_QER 18
468 #define PFCP_LOAD_CONTROL_INFORMATION 51
469 #define PFCP_OVERLOAD_CONTROL_INFORMATION 54
470 #define PFCP_APPLICATION_IDS_PFDS 58
471 #define PFCP_PFD_CONTEXT 59
472 #define PFCP_APPLICATION_DETECTION_INF 68
473 #define PFCP_QUERY_URR 77
474 #define PFCP_USAGE_REPORT_SMR 78
475 #define PFCP_USAGE_REPORT_SDR 79
476 #define PFCP_USAGE_REPORT_SRR 80
477 #define PFCP_DOWNLINK_DATA_REPORT 83
478 #define PFCP_CREATE_BAR 85
479 #define PFCP_UPDATE_BAR_SMR 86
480 #define PFCP_REMOVE_BAR 87
481 #define PFCP_ERROR_INDICATION_REPORT 99
482 #define PFCP_USER_PLANE_PATH_FAILURE_REPORT 102
483 #define PFCP_UPDATE_DUPLICATING_PARAMETERS 105
485 static const value_string pfcp_ie_type[] = {
488 { 1, "Create PDR"}, /* Extendable / Table 7.5.2.2-1 */
489 { 2, "PDI"}, /* Extendable / Table 7.5.2.2-2 */
490 { 3, "Create FAR"}, /* Extendable / Table 7.5.2.3-1 */
491 { 4, "Forwarding Parameters"}, /* Extendable / Table 7.5.2.3-2 */
492 { 5, "Duplicating Parameters"}, /* Extendable / Table 7.5.2.3-3 */
493 { 6, "Create URR"}, /* Extendable / Table 7.5.2.4-1 */
494 { 7, "Create QER"}, /* Extendable / Table 7.5.2.5-1 */
495 { 8, "Created PDR"}, /* Extendable / Table 7.5.3.2-1 */
496 { 9, "Update PDR" }, /* Extendable / Table 7.5.4.2-1 */
497 { 10, "Update FAR" }, /* Extendable / Table 7.5.4.3-1 */
498 { 11, "Update Forwarding Parameters" }, /* Extendable / Table 7.5.4.3-2 */
499 { 12, "Update BAR (Sx Session Report Response)" }, /* Extendable / Table 7.5.9.2-1 */
500 { 13, "Update URR" }, /* Extendable / Table 7.5.4.4 */
501 { 14, "Update QER" }, /* Extendable / Table 7.5.4.5 */
502 { 15, "Remove PDR" }, /* Extendable / Table 7.5.4.6 */
503 { 16, "Remove FAR" }, /* Extendable / Table 7.5.4.7 */
504 { 17, "Remove URR" }, /* Extendable / Table 7.5.4.8 */
505 { 18, "Remove QER" }, /* Extendable / Table 7.5.4.9 */
506 { 19, "Cause" }, /* Fixed / Subclause 8.2.1 */
507 { 20, "Source Interface" }, /* Extendable / Subclause 8.2.2 */
508 { 21, "F-TEID" }, /* Extendable / Subclause 8.2.3 */
509 { 22, "Network Instance" }, /* Variable Length / Subclause 8.2.4 */
510 { 23, "SDF Filter" }, /* Extendable / Subclause 8.2.5 */
511 { 24, "Application ID" }, /* Variable Length / Subclause 8.2.6 */
512 { 25, "Gate Status" }, /* Extendable / Subclause 8.2.7 */
513 { 26, "MBR" }, /* Extendable / Subclause 8.2.8 */
514 { 27, "GBR" }, /* Extendable / Subclause 8.2.9 */
515 { 28, "QER Correlation ID" }, /* Extendable / Subclause 8.2.10 */
516 { 29, "Precedence" }, /* Extendable / Subclause 8.2.11 */
517 { 30, "DL Transport Level Marking" }, /* Extendable / Subclause 8.2.12 */
518 { 31, "Volume Threshold" }, /* Extendable /Subclause 8.2.13 */
519 { 32, "Time Threshold" }, /* Extendable /Subclause 8.2.14 */
520 { 33, "Monitoring Time" }, /* Extendable /Subclause 8.2.15 */
521 { 34, "Subsequent Volume Threshold" }, /* Extendable /Subclause 8.2.16 */
522 { 35, "Subsequent Time Threshold" }, /* Extendable /Subclause 8.2.17 */
523 { 36, "Inactivity Detection Time" }, /* Extendable /Subclause 8.2.18 */
524 { 37, "Reporting Triggers" }, /* Extendable /Subclause 8.2.19 */
525 { 38, "Redirect Information" }, /* Extendable /Subclause 8.2.20 */
526 { 39, "Report Type" }, /* Extendable / Subclause 8.2.21 */
527 { 40, "Offending IE" }, /* Fixed / Subclause 8.2.22 */
528 { 41, "Forwarding Policy" }, /* Extendable / Subclause 8.2.23 */
529 { 42, "Destination Interface" }, /* Extendable / Subclause 8.2.24 */
530 { 43, "UP Function Features" }, /* Extendable / Subclause 8.2.25 */
531 { 44, "Apply Action" }, /* Extendable / Subclause 8.2.26 */
532 { 45, "Downlink Data Service Information" }, /* Extendable / Subclause 8.2.27 */
533 { 46, "Downlink Data Notification Delay" }, /* Extendable / Subclause 8.2.28 */
534 { 47, "DL Buffering Duration" }, /* Extendable / Subclause 8.2.29 */
535 { 48, "DL Buffering Suggested Packet Count" }, /* Variable / Subclause 8.2.30 */
536 { 49, "SxSMReq-Flags" }, /* Extendable / Subclause 8.2.31 */
537 { 50, "SxSRRsp-Flags" }, /* Extendable / Subclause 8.2.32 */
538 { 51, "Load Control Information" }, /* Extendable / Table 7.5.3.3-1 */
539 { 52, "Sequence Number" }, /* Fixed Length / Subclause 8.2.33 */
540 { 53, "Metric" }, /* Fixed Length / Subclause 8.2.34 */
541 { 54, "Overload Control Information" }, /* Extendable / Table 7.5.3.4-1 */
542 { 55, "Timer" }, /* Extendable / Subclause 8.2 35 */
543 { 56, "Packet Detection Rule ID" }, /* Extendable / Subclause 8.2 36 */
544 { 57, "F-SEID" }, /* Extendable / Subclause 8.2 37 */
545 { 58, "Application ID's PFDs" }, /* Extendable / Table 7.4.3.1-2 */
546 { 59, "PFD context" }, /* Extendable / Table 7.4.3.1-3 */
547 { 60, "Node ID" }, /* Extendable / Subclause 8.2.38 */
548 { 61, "PFD contents" }, /* Extendable / Subclause 8.2.39 */
549 { 62, "Measurement Method" }, /* Extendable / Subclause 8.2.40 */
550 { 63, "Usage Report Trigger" }, /* Extendable / Subclause 8.2.41 */
551 { 64, "Measurement Period" }, /* Extendable / Subclause 8.2.42 */
552 { 65, "FQ-CSID" }, /* Extendable / Subclause 8.2.43 */
553 { 66, "Volume Measurement" }, /* Extendable / Subclause 8.2.44 */
554 { 67, "Duration Measurement" }, /* Extendable / Subclause 8.2.45 */
555 { 68, "Application Detection Information" }, /* Extendable / Table 7.5.8.3-2 */
556 { 69, "Time of First Packet" }, /* Extendable / Subclause 8.2.46 */
557 { 70, "Time of Last Packet" }, /* Extendable / Subclause 8.2.47 */
558 { 71, "Quota Holding Time" }, /* Extendable / Subclause 8.2.48 */
559 { 72, "Dropped DL Traffic Threshold" }, /* Extendable / Subclause 8.2.49 */
560 { 73, "Volume Quota" }, /* Extendable / Subclause 8.2.50 */
561 { 74, "Time Quota" }, /* Extendable / Subclause 8.2.51 */
562 { 75, "Start Time" }, /* Extendable / Subclause 8.2.52 */
563 { 76, "End Time" }, /* Extendable / Subclause 8.2.53 */
564 { 77, "Query URR" }, /* Extendable / Table 7.5.4.10-1 */
565 { 78, "Usage Report (in Session Modification Response)" }, /* Extendable / Table 7.5.5.2-1 */
566 { 79, "Usage Report (Session Deletion Response)" }, /* Extendable / Table 7.5.7.2-1 */
567 { 80, "Usage Report (Session Report Request)" }, /* Extendable / Table 7.5.8.3-1 */
568 { 81, "URR ID" }, /* Extendable / Subclause 8.2.54 */
569 { 82, "Linked URR ID" }, /* Extendable / Subclause 8.2.55 */
570 { 83, "Downlink Data Report" }, /* Extendable / Table 7.5.8.2-1 */
571 { 84, "Outer Header Creation" }, /* Extendable / Subclause 8.2.56 */
572 { 85, "Create BAR" }, /* Extendable / Table 7.5.2.6-1 */
573 { 86, "Update BAR (Session Modification Request)" }, /* Extendable / Table 7.5.4.11-1 */
574 { 87, "Remove BAR" }, /* Extendable / Table 7.5.4.12-1 */
575 { 88, "BAR ID" }, /* Extendable / Subclause 8.2.57 */
576 { 89, "CP Function Features" }, /* Extendable / Subclause 8.2.58 */
577 { 90, "Usage Information" }, /* Extendable / Subclause 8.2.59 */
578 { 91, "Application Instance ID" }, /* Variable Length / Subclause 8.2.60 */
579 { 92, "Flow Information" }, /* Extendable / Subclause 8.2.61 */
580 { 93, "UE IP Address" }, /* Extendable / Subclause 8.2.62 */
581 { 94, "Packet Rate" }, /* Extendable / Subclause 8.2.63 */
582 { 95, "Outer Header Removal" }, /* Extendable / Subclause 8.2.64 */
583 { 96, "Recovery Time Stamp" }, /* Extendable / Subclause 8.2.65 */
584 { 97, "DL Flow Level Marking" }, /* Extendable / Subclause 8.2.66 */
585 { 98, "Header Enrichment" }, /* Extendable / Subclause 8.2.67 */
586 { 99, "Error Indication Report" }, /* Extendable / Table 7.5.8.4-1 */
587 { 100, "Measurement Information" }, /* Extendable / Subclause 8.2.68 */
588 { 101, "Node Report Type" }, /* Extendable / Subclause 8.2.69 */
589 { 102, "User Plane Path Failure Report" }, /* Extendable / Table 7.4.5.1.2-1 */
590 { 103, "Remote GTP-U Peer" }, /* Extendable / Subclause 8.2.70 */
591 { 104, "UR-SEQN" }, /* Fixed Length / Subclause 8.2.71 */
592 { 105, "Update Duplicating Parameters" }, /* Extendable / Table 7.5.4.3-3 */
593 { 106, "Activate Predefined Rules" }, /* Variable Length / Subclause 8.2.72 */
594 { 107, "Deactivate Predefined Rules" }, /* Variable Length / Subclause 8.2.73 */
595 { 108, "FAR ID" }, /* Extendable / Subclause 8.2.74 */
596 { 109, "QER ID" }, /* Extendable / Subclause 8.2.75 */
597 { 110, "OCI Flags" }, /* Extendable / Subclause 8.2.76 */
598 { 111, "Sx Association Release Request" }, /* Extendable / Subclause 8.2.77 */
599 { 112, "Graceful Release Period" }, /* Extendable / Subclause 8.2.78 */
600 { 113, "PDN Type" }, /* Fixed Length / Subclause 8.2.79 */
601 { 114, "Failed Rule ID" }, /* Extendable / Subclause 8.2.80 */
602 { 115, "Time Quota Mechanism" }, /* Extendable / Subclause 8.2.81 */
603 { 116, "User Plane IP Resource Information" }, /* Extendable / Subclause 8.2.82 */
604 //117 to 65535 Spare. For future use.
608 static value_string_ext pfcp_ie_type_ext = VALUE_STRING_EXT_INIT(pfcp_ie_type);
611 dissect_pfcp_reserved(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
613 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_reserved, tvb, 0, length);
619 static const value_string pfcp_cause_vals[] = {
622 { 1, "Request accepted(success)" },
624 { 64, "Request rejected(reason not specified)" },
625 { 65, "Session context not found" },
626 { 66, "Mandatory IE missing" },
627 { 67, "Conditional IE missing" },
628 { 68, "Invalid length" },
629 { 69, "Mandatory IE incorrect" },
630 { 70, "Invalid Forwarding Policy" },
631 { 71, "Invalid F - TEID allocation option" },
632 { 72, "No established Sx Association" },
633 { 73, "Rule creation / modification Failure" },
634 { 74, "PFCP entity in congestion" },
635 { 75, "No resources available" },
636 { 76, "Service not supported" },
637 { 77, "System failure" },
638 /* 78 to 255 Spare for future use in a response message. */
643 dissect_pfcp_cause(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 message_type _U_)
645 /* Octet 5 Cause value */
646 proto_tree_add_item(tree, hf_pfcp2_cause, tvb, 0, 1, ENC_BIG_ENDIAN);
649 * 8.2.2 Source Interface
651 static const value_string pfcp_source_interface_vals[] = {
656 { 3, "CP-function" },
660 dissect_pfcp_source_interface(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type _U_)
664 /* Octet 5 Spare Interface value */
665 proto_tree_add_item(tree, hf_pfcp_spare_h1, tvb, offset, 1, ENC_BIG_ENDIAN);
666 proto_tree_add_item_ret_uint(tree, hf_pfcp_source_interface, tvb, offset, 1, ENC_BIG_ENDIAN, &value);
669 proto_item_append_text(item, "%s", val_to_str_const(value, pfcp_source_interface_vals, "Unknown"));
671 if (offset < length) {
672 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
680 dissect_pfcp_f_teid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
683 guint64 fteid_flags_val;
685 static const int * pfcp_fteid_flags[] = {
686 &hf_pfcp_fteid_flg_spare,
687 &hf_pfcp_fteid_flg_b3_ch_id,
688 &hf_pfcp_fteid_flg_b2_ch,
689 &hf_pfcp_fteid_flg_b1_v6,
690 &hf_pfcp_fteid_flg_b0_v4,
693 /* Octet 5 Spare Spare Spare Spare CHID CH V6 V4*/
694 proto_tree_add_bitmask_with_flags_ret_uint64(tree, tvb, offset, hf_pfcp_f_teid_flags,
695 ett_f_teid_flags, pfcp_fteid_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT | BMT_NO_TFS, &fteid_flags_val);
697 /* The following flags are coded within Octet 5:
698 * 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,
699 * otherwise the IPv4 address field shall not be present.
700 * 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,
701 * otherwise the IPv6 address field shall not be present.
702 * Bit 3 - CH (CHOOSE): If this bit is set to "1", then the TEID, IPv4 address and IPv6 address fields shall not be
703 * 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.
704 * This bit shall only be set by the CP function.
705 * Bit 4 - CHID (CHOOSE_ID):If this bit is set to "1", then the UP function shall assign the same F-TEID to the
706 * PDRs requested to be created in a Sx Session Establishment Request or Sx Session Modification Request with
707 * the same CHOOSE ID value.
708 * This bit may only be set to "1" if the CH bit is set to "1".
709 * This bit shall only be set by the CP function.
712 if ((fteid_flags_val & 0x4) == 4) {
713 if ((fteid_flags_val & 0x8) == 8) {
714 proto_tree_add_item(tree, hf_pfcp_f_teid_ch_id, tvb, offset, 1, ENC_NA);
719 /* Octet 6 to 9 TEID */
720 proto_tree_add_item(tree, hf_pfcp_f_teid_teid, tvb, offset, 4, ENC_BIG_ENDIAN);
723 if ((fteid_flags_val & 0x1) == 1) {
724 /* m to (m+3) IPv4 address */
725 proto_tree_add_item(tree, hf_pfcp_f_teid_ipv4, tvb, offset, 4, ENC_BIG_ENDIAN);
728 if ((fteid_flags_val & 0x2) == 2) {
729 /* p to (p+15) IPv6 address */
730 proto_tree_add_item(tree, hf_pfcp_f_teid_ipv6, tvb, offset, 16, ENC_NA);
733 /* If the value of CH bit is set to "0", but the value of CHID bit is "1" */
734 if ((fteid_flags_val & 0x8) == 8) {
735 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_encoding_error, tvb, 0, 1);
738 if (offset < length) {
739 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
744 * 8.2.4 Network Instance
747 dissect_pfcp_network_instance(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
750 /* Octet 5 5 to (n+4) Network Instance
751 * The Network instance field shall be encoded as an OctetString
753 proto_tree_add_item(tree, hf_pfcp_network_instance, tvb, offset, length, ENC_NA);
759 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_)
765 static const int * pfcp_sdf_filter_flags[] = {
767 &hf_pfcp_sdf_filter_b3_fl,
768 &hf_pfcp_sdf_filter_b2_spi,
769 &hf_pfcp_sdf_filter_b1_ttc,
770 &hf_pfcp_sdf_filter_b0_fd,
773 /* Octet 5 Spare FL SPI TTC FD*/
774 proto_tree_add_bitmask_with_flags_ret_uint64(tree, tvb, offset, hf_pfcp_sdf_filter_flags,
775 ett_pfcp_sdf_filter_flags, pfcp_sdf_filter_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT | BMT_NO_TFS, &flags_val);
778 proto_tree_add_item(tree, hf_pfcp_spare, tvb, offset, 1, ENC_BIG_ENDIAN);
781 if ((flags_val & 0x1) == 1) {
782 /* FD (Flow Description): If this bit is set to "1",
783 * then the Length of Flow Description and the Flow Description fields shall be present
785 /* m to (m+1) Length of Flow Description */
786 proto_tree_add_item_ret_uint(tree, hf_pfcp_flow_desc_len, tvb, offset, 2, ENC_BIG_ENDIAN, &fd_length);
789 * The Flow Description field, when present, shall be encoded as an OctetString
790 * as specified in subclause 5.4.2 of 3GPP TS 29.212
792 proto_tree_add_item(tree, hf_pfcp_fd, tvb, offset, fd_length, ENC_NA);
795 if ((flags_val & 0x2) == 2) {
796 /* TTC (ToS Traffic Class): If this bit is set to "1", then the ToS Traffic Class field shall be present */
797 /* ToS Traffic Class field, when present, shall be encoded as an OctetString on two octets
798 * as specified in subclause 5.3.15 of 3GPP TS 29.212
800 proto_tree_add_item(tree, hf_pfcp_ttc, tvb, offset, 2, ENC_NA);
804 if ((flags_val & 0x4) == 4) {
805 /* SPI (The Security Parameter Index) field, when present, shall be encoded as an OctetString on four octets and shall
806 * contain the IPsec security parameter index (which is a 32-bit field),
807 * as specified in subclause 5.3.51 of 3GPP TS 29.212
809 proto_tree_add_item(tree, hf_pfcp_spi, tvb, offset, 4, ENC_NA);
812 if ((flags_val & 0x8) == 8) {
813 /* FL (Flow Label), when present, shall be encoded as an OctetString on 3 octets as specified in
814 * subclause 5.3.52 of 3GPP TS 29.212 and shall contain an IPv6 flow label (which is a 20-bit field).
815 * The bits 8 to 5 of the octet "v" shall be spare and set to zero, and the remaining 20 bits shall
816 * contain the IPv6 flow label.*/
817 proto_tree_add_item(tree, hf_pfcp_fl, tvb, offset, 3, ENC_NA);
821 if (offset < length) {
822 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
826 * 8.2.6 Application ID
829 dissect_pfcp_application_id(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
832 /* Octet 5 to (n+4) Application Identifier
833 * The Application Identifier shall be encoded as an OctetString (see 3GPP TS 29.212)
835 proto_tree_add_item(tree, hf_pfcp_application_id, tvb, offset, length, ENC_NA);
840 static const value_string pfcp_gate_status_vals[] = {
848 dissect_pfcp_gate_status(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
852 static const int * pfcp_gate_status_flags[] = {
853 &hf_pfcp_gate_status_b3b2_ulgate,
854 &hf_pfcp_gate_status_b0b1_dlgate,
857 /* Octet 5 Spare UL Gate DL Gate */
858 proto_tree_add_bitmask_with_flags(tree, tvb, offset, hf_pfcp_gate_status,
859 ett_pfcp_gate_status, pfcp_gate_status_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT);
862 if (offset < length) {
863 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
873 dissect_pfcp_mbr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
876 int len1 = (length != 10) ? length/2 : 5;
878 /* In case length is not in accordance with documentation */
880 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_encoding_error, tvb, 0, 1);
884 * The UL/DL MBR fields shall be encoded as kilobits per second (1 kbps = 1000 bps) in binary value
886 proto_tree_add_item(tree, hf_pfcp_ul_mbr, tvb, offset, len1, ENC_BIG_ENDIAN);
889 /* 10 to 14 DL MBR */
890 proto_tree_add_item(tree, hf_pfcp_dl_mbr, tvb, offset, len1, ENC_BIG_ENDIAN);
893 if (offset < length) {
894 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
903 dissect_pfcp_gbr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
906 int len1 = (length != 10) ? length/2 : 5;
908 /* In case length is not in accordance with documentation */
910 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_encoding_error, tvb, 0, 1);
914 * The UL/DL MBR fields shall be encoded as kilobits per second (1 kbps = 1000 bps) in binary value
916 proto_tree_add_item(tree, hf_pfcp_ul_gbr, tvb, offset, len1, ENC_BIG_ENDIAN);
919 /* 10 to 14 DL GBR */
920 proto_tree_add_item(tree, hf_pfcp_dl_gbr, tvb, offset, len1, ENC_BIG_ENDIAN);
923 if (offset < length) {
924 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
930 * 8.2.10 QER Correlation ID
933 dissect_pfcp_qer_correlation_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type _U_)
937 /* 5 to 8 QER Correlation ID value */
938 proto_tree_add_item_ret_uint(tree, hf_pfcp_qer_correlation_id, tvb, offset, 4, ENC_BIG_ENDIAN, &value);
941 proto_item_append_text(item, "%u", value);
943 if (offset < length) {
944 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
952 dissect_pfcp_precedence(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type _U_)
956 /* Octet 5 5 to 8 Precedence value */
957 proto_tree_add_item_ret_uint(tree, hf_pfcp_precedence, tvb, offset, 4, ENC_BIG_ENDIAN, &value);
960 proto_item_append_text(item, "%u", value);
962 if (offset < length) {
963 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
968 * 8.2.12 Transport Level Marking
971 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_)
974 /* Octet 5 to 6 ToS/Traffic Class
975 * The ToS/Traffic Class shall be encoded on two octets as an OctetString.
976 * 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
978 proto_tree_add_item(tree, hf_pfcp_tos_traf_class, tvb, offset, 2, ENC_BIG_ENDIAN);
981 if (offset < length) {
982 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
988 * 8.2.13 Volume Threshold
991 dissect_pfcp_volume_threshold(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
996 static const int * pfcp_volume_threshold_flags[] = {
997 &hf_pfcp_spare_b7_b3,
1003 /* Octet 5 Spare DLVOL ULVOL TOVOL*/
1004 proto_tree_add_bitmask_with_flags_ret_uint64(tree, tvb, offset, hf_pfcp_volume_threshold,
1005 ett_pfcp_volume_threshold, pfcp_volume_threshold_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT, &flags_val);
1008 /* The Total Volume, Uplink Volume and Downlink Volume fields shall be encoded as an Unsigned64 binary integer value.
1009 * They shall contain the total, uplink or downlink number of octets respectively.
1011 if ((flags_val & 0x1) == 1) {
1012 /* m to (m+7) Total Volume
1013 * TOVOL: If this bit is set to "1", then the Total Volume field shall be present
1015 proto_tree_add_item(tree, hf_pfcp_volume_threshold_tovol, tvb, offset, 8, ENC_BIG_ENDIAN);
1018 if ((flags_val & 0x2) == 2) {
1019 /* p to (p+7) Uplink Volume
1020 * ULVOL: If this bit is set to "1", then the Uplink Volume field shall be present
1022 proto_tree_add_item(tree, hf_pfcp_volume_threshold_ulvol, tvb, offset, 8, ENC_BIG_ENDIAN);
1025 if ((flags_val & 0x4) == 4) {
1026 /* q to (q+7) Downlink Volume
1027 * DLVOL: If this bit is set to "1", then the Downlink Volume field shall be present
1029 proto_tree_add_item(tree, hf_pfcp_volume_threshold_dlvol, tvb, offset, 8, ENC_BIG_ENDIAN);
1033 if (offset < length) {
1034 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
1038 * 8.2.14 Time Threshold
1041 dissect_pfcp_time_threshold(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type _U_)
1046 /* Octet 5 to 8 Time Threshold
1047 * The Time Threshold field shall be encoded as an Unsigned32 binary integer value.
1048 * It shall contain the duration in seconds.
1050 proto_tree_add_item_ret_uint(tree, hf_pfcp_time_threshold, tvb, offset, 4, ENC_BIG_ENDIAN, &value);
1053 proto_item_append_text(item, "%u s", value);
1055 if (offset < length) {
1056 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
1062 * 8.2.15 Monitoring Time
1065 dissect_pfcp_monitoring_time(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type _U_)
1067 const gchar *time_str;
1070 /* The Monitoring Time field shall indicate the monitoring time in UTC time.
1071 * Octets 5 to 8 shall be encoded in the same format as the first four octets
1072 * of the 64-bit timestamp format as defined in section 6 of IETF RFC 5905.
1074 time_str = tvb_ntp_fmt_ts_sec(tvb, 0);
1075 proto_tree_add_string(tree, hf_pfcp_monitoring_time, tvb, offset, 4, time_str);
1076 proto_item_append_text(item, "%s", time_str);
1079 if (offset < length) {
1080 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
1085 * 8.2.16 Subsequent Volume Threshold
1088 dissect_pfcp_subseq_volume_threshold(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
1093 static const int * pfcp_subseq_volume_threshold_flags[] = {
1094 &hf_pfcp_spare_b7_b3,
1095 &hf_pfcp_subseq_volume_threshold_b2_dlvol,
1096 &hf_pfcp_subseq_volume_threshold_b1_ulvol,
1097 &hf_pfcp_subseq_volume_threshold_b0_tovol,
1100 /* Octet 5 Spare DLVOL ULVOL TOVOL*/
1101 proto_tree_add_bitmask_with_flags_ret_uint64(tree, tvb, offset, hf_pfcp_subseq_volume_threshold,
1102 ett_pfcp_subseq_volume_threshold, pfcp_subseq_volume_threshold_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT, &flags_val);
1105 /* The Total Volume, Uplink Volume and Downlink Volume fields shall be encoded as an Unsigned64 binary integer value.
1106 * They shall contain the total, uplink or downlink number of octets respectively.
1108 if ((flags_val & 0x1) == 1) {
1109 /* m to (m+7) Total Volume
1110 * TOVOL: If this bit is set to "1", then the Total Volume field shall be present
1112 proto_tree_add_item(tree, hf_pfcp_subseq_volume_threshold_tovol, tvb, offset, 8, ENC_BIG_ENDIAN);
1115 if ((flags_val & 0x2) == 2) {
1116 /* p to (p+7) Uplink Volume
1117 * ULVOL: If this bit is set to "1", then the Uplink Volume field shall be present
1119 proto_tree_add_item(tree, hf_pfcp_subseq_volume_threshold_ulvol, tvb, offset, 8, ENC_BIG_ENDIAN);
1122 if ((flags_val & 0x4) == 4) {
1123 /* q to (q+7) Downlink Volume
1124 * DLVOL: If this bit is set to "1", then the Downlink Volume field shall be present
1126 proto_tree_add_item(tree, hf_pfcp_subseq_volume_threshold_dlvol, tvb, offset, 8, ENC_BIG_ENDIAN);
1130 if (offset < length) {
1131 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
1136 * 8.2.17 Subsequent Time Threshold
1139 dissect_pfcp_subsequent_time_threshold(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type _U_)
1143 /* 5 to 8 Subsequent Time Threshold */
1144 proto_tree_add_item_ret_uint(tree, hf_pfcp_subsequent_time_threshold, tvb, offset, 4, ENC_BIG_ENDIAN, &value);
1147 proto_item_append_text(item, "%u s", value);
1149 if (offset < length) {
1150 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
1154 * 8.2.18 Inactivity Detection Time
1157 dissect_pfcp_inactivity_detection_time(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type _U_)
1161 /* 5 to 8 Inactivity Detection Time */
1162 proto_tree_add_item_ret_uint(tree, hf_pfcp_inactivity_detection_time, tvb, offset, 4, ENC_BIG_ENDIAN, &value);
1165 proto_item_append_text(item, "%u s", value);
1167 if (offset < length) {
1168 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
1173 * 8.2.19 Reporting Triggers
1176 dissect_pfcp_reporting_triggers(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
1180 static const int * pfcp_reporting_triggers_flags[] = {
1181 &hf_pfcp_reporting_triggers_b15_liusa,
1182 &hf_pfcp_reporting_triggers_b14_droth,
1183 &hf_pfcp_reporting_triggers_b13_stopt,
1184 &hf_pfcp_reporting_triggers_b12_start,
1185 &hf_pfcp_reporting_triggers_b11_quhti,
1186 &hf_pfcp_reporting_triggers_b10_timth,
1187 &hf_pfcp_reporting_triggers_b9_volth,
1188 &hf_pfcp_reporting_triggers_b8_perio,
1189 &hf_pfcp_reporting_triggers_b7_b3_spare,
1190 &hf_pfcp_reporting_triggers_b2_envcl,
1191 &hf_pfcp_reporting_triggers_b1_timqu,
1192 &hf_pfcp_reporting_triggers_b0_volqu,
1195 /* Octet 5 [Bits 15-08] LIUSA DROTH STOPT START QUHTI TIMTH VOLTH PERIO */
1196 /* Octet 6 [Bits 07-00] SPARE SPARE SPARE SPARE SPARE ENVCL TIMQU VOLQU */
1197 proto_tree_add_bitmask_with_flags(tree, tvb, offset, hf_pfcp_reporting_triggers,
1198 ett_pfcp_reporting_triggers, pfcp_reporting_triggers_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT);
1201 if (offset < length) {
1202 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
1208 * 8.2.20 Redirect Information
1210 static const value_string pfcp_redirect_address_type_vals[] = {
1212 { 0, "IPv4 address" },
1213 { 1, "IPv6 address" },
1220 dissect_pfcp_redirect_information(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
1223 guint32 value, addr_len;
1225 /* Octet Spare Redirect Address Type */
1226 proto_tree_add_item(tree, hf_pfcp_spare_h1, tvb, offset, 1, ENC_BIG_ENDIAN);
1227 proto_tree_add_item_ret_uint(tree, hf_pfcp_redirect_address_type, tvb, offset, 1, ENC_BIG_ENDIAN, &value);
1230 /* 6-7 Redirect Server Address Length=a */
1231 proto_tree_add_item_ret_uint(tree, hf_pfcp_redirect_server_addr_len, tvb, offset, 2, ENC_BIG_ENDIAN, &addr_len);
1234 /* 8-(8+a) Redirect Server Address */
1235 proto_tree_add_item(tree, hf_pfcp_redirect_server_address, tvb, offset, addr_len, ENC_UTF_8 | ENC_NA);
1238 if (offset < length) {
1239 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
1243 * 8.2.21 Report Type
1246 dissect_pfcp_report_type(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
1250 static const int * pfcp_report_type_flags[] = {
1251 &hf_pfcp_spare_b7_b3,
1257 /* Octet 5 Spare ERIR USAR DLDR */
1258 proto_tree_add_bitmask_with_flags(tree, tvb, offset, hf_pfcp_report_type,
1259 ett_pfcp_report_type, pfcp_report_type_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT);
1262 if (offset < length) {
1263 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
1268 * 8.2.22 Offending IE
1271 dissect_pfcp_offending_ie(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item, guint16 length _U_, guint8 message_type _U_)
1274 /* Octet 5 to 6 Type of the offending IE */
1275 proto_tree_add_item_ret_uint(tree, hf_pfcp_offending_ie, tvb, 0, 2, ENC_BIG_ENDIAN, &value);
1277 proto_item_append_text(item, "%s", val_to_str_const(value, pfcp_ie_type, "Unknown"));
1281 * 8.2.23 Forwarding Policy
1284 dissect_pfcp_forwarding_policy(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
1289 /* Octet Forwarding Policy Identifier Length */
1290 proto_tree_add_item_ret_uint(tree, hf_pfcp_forwarding_policy_id_len, tvb, offset, 1, ENC_BIG_ENDIAN, &id_len);
1293 proto_tree_add_item(tree, hf_pfcp_forwarding_policy_id, tvb, offset, id_len, ENC_NA);
1296 if (offset < length) {
1297 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
1302 * 8.2.24 Destination Interface
1304 static const value_string pfcp_dst_interface_vals[] = {
1309 { 3, "CP- Function" },
1310 { 4, "LI Function" },
1315 dissect_pfcp_destination_interface(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type _U_)
1320 /* Octet 5 Spare Interface value*/
1321 proto_tree_add_item(tree, hf_pfcp_spare_h1, tvb, offset, 1, ENC_BIG_ENDIAN);
1322 proto_tree_add_item_ret_uint(tree, hf_pfcp_dst_interface, tvb, offset, 1, ENC_BIG_ENDIAN, &value);
1325 proto_item_append_text(item, "%s", val_to_str_const(value, pfcp_dst_interface_vals, "Unknown"));
1327 if (offset < length) {
1328 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
1333 * 8.2.25 UP Function Features
1336 dissect_pfcp_up_function_features(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
1340 static const int * pfcp_up_function_features_flags[] = {
1349 &hf_pfcp_b1_b7_spare,
1353 /* Octet 5 TREU HEEU PFDM FTUP TRST DLBD DDND BUCP*/
1354 /* Octet 6 Spare Spare Spare Spare Spare Spare Spare EMPU*/
1355 proto_tree_add_bitmask_with_flags(tree, tvb, offset, hf_pfcp_up_function_features,
1356 ett_pfcp_up_function_features, pfcp_up_function_features_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT);
1359 if (offset < length) {
1360 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
1365 * 8.2.26 Apply Action
1368 dissect_pfcp_apply_action(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
1372 static const int * pfcp_apply_action_flags[] = {
1373 &hf_pfcp_spare_b7_b5,
1374 &hf_pfcp_apply_action_b4_dupl,
1375 &hf_pfcp_apply_action_b3_nocp,
1376 &hf_pfcp_apply_action_b2_buff,
1377 &hf_pfcp_apply_action_b1_forw,
1378 &hf_pfcp_apply_action_b0_drop,
1381 /* Octet 5 Spare Spare Spare DUPL NOCP BUFF FORW DROP */
1382 proto_tree_add_bitmask_with_flags(tree, tvb, offset, hf_pfcp_apply_action_flags,
1383 ett_pfcp_apply_action_flags, pfcp_apply_action_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT | BMT_NO_TFS);
1386 if (offset < length) {
1387 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
1392 * 8.2.27 Downlink Data Service Information
1395 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_)
1400 static const int * pfcp_dl_data_service_inf_flags[] = {
1401 &hf_pfcp_spare_b7_b1,
1405 /* Octet 5 Spare PPI */
1406 proto_tree_add_bitmask_with_flags_ret_uint64(tree, tvb, offset, hf_pfcp_pfcp_dl_data_service_inf_flags,
1407 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);
1409 /* The PPI flag in octet 5 indicates whether the Paging Policy Indication value in octet 'm' shall be present */
1410 if ((flags & 0x1) == 1) {
1411 /* m Spare Paging Policy Indication value
1412 * encoded as the DSCP in TOS (IPv4) or TC (IPv6) information received in the IP payload of the GTP-U packet
1413 * from the PGW (see IETF RFC 2474
1415 proto_tree_add_item(tree, hf_pfcp_spare_b7_b6, tvb, offset, 1, ENC_BIG_ENDIAN);
1416 proto_tree_add_item(tree, hf_pfcp_ppi, tvb, offset, 1, ENC_BIG_ENDIAN);
1420 if (offset < length) {
1421 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
1426 * 8.2.28 Downlink Data Notification Delay
1429 dissect_pfcp_dl_data_notification_delay(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type _U_)
1433 /* Octet 5 Delay Value in integer multiples of 50 millisecs, or zero */
1434 proto_tree_add_item_ret_uint(tree, hf_pfcp_dl_data_notification_delay, tvb, offset, 1, ENC_BIG_ENDIAN, &value);
1437 proto_item_append_text(item, "%u ms", value * 50);
1439 if (offset < length) {
1440 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
1445 * 8.2.29 DL Buffering Duration
1447 static const value_string pfcp_timer_unit_vals[] = {
1448 { 0, "value is incremented in multiples of 2 seconds" },
1449 { 1, "value is incremented in multiples of 1 minute" },
1450 { 2, "value is incremented in multiples of 10 minutes" },
1451 { 3, "value is incremented in multiples of 1 hour" },
1452 { 4, "value is incremented in multiples of 10 hour" },
1453 { 5, "values shall be interpreted as multiples of 1 minute(version 14.0.0)" },
1454 { 6, "values shall be interpreted as multiples of 1 minute(version 14.0.0)" },
1455 { 7, "value indicates that the timer is infinite" },
1460 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_)
1463 guint32 unit, value;
1465 /* Octet 5 Timer unit Timer value */
1466 proto_tree_add_item_ret_uint(tree, hf_pfcp_timer_unit, tvb, offset, 1, ENC_BIG_ENDIAN, &unit);
1467 proto_tree_add_item_ret_uint(tree, hf_pfcp_timer_value, tvb, offset, 1, ENC_BIG_ENDIAN, &value);
1473 proto_item_append_text(item, "%u s", value * 2);
1476 proto_item_append_text(item, "%u min", value);
1479 proto_item_append_text(item, "%u min", value * 10);
1482 proto_item_append_text(item, "%u hours", value);
1485 proto_item_append_text(item, "%u hours", value * 10);
1488 proto_item_append_text(item, "%u Infinite", value);
1492 proto_item_append_text(item, "%u min", value * 10);
1495 if ((unit != 7) && (value == 0)) {
1496 proto_item_append_text(item, " Stopped");
1499 if (offset < length) {
1500 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
1506 * 8.2.30 DL Buffering Suggested Packet Count
1509 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_)
1511 /* Octet 5 to n+4 Packet Count Value
1512 * The length shall be set to 1 or 2 octets.
1514 proto_tree_add_item(tree, hf_pfcp_packet_count, tvb, 0, length, ENC_BIG_ENDIAN);
1517 * 8.2.31 SxSMReq-Flags
1520 dissect_pfcp_sxsmreq_flags(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
1524 static const int * pfcp_sxsmreq_flags[] = {
1525 &hf_pfcp_spare_b7_b3,
1531 /* Octet 5 Spare Spare Spare Spare Spare QAURR SNDEM DROBU */
1532 proto_tree_add_bitmask_with_flags(tree, tvb, offset, hf_pfcp_sxsmreq_flags,
1533 ett_pfcp_sxsmreq, pfcp_sxsmreq_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT);
1536 if (offset < length) {
1537 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
1542 * 8.2.32 SxSRRsp-Flags
1545 dissect_pfcp_sxsrrsp_flags(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
1549 static const int * pfcp_sxsrrsp_flags[] = {
1550 &hf_pfcp_spare_b7_b1,
1554 /* Octet 5 Spare Spare Spare Spare Spare Spare Spare DROBU */
1555 proto_tree_add_bitmask_with_flags(tree, tvb, offset, hf_pfcp_sxsrrsp_flags,
1556 ett_pfcp_sxsrrsp, pfcp_sxsrrsp_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT);
1559 if (offset < length) {
1560 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
1566 * 8.2.33 Sequence Number
1569 dissect_pfcp_sequence_number(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item, guint16 length _U_, guint8 message_type _U_)
1572 /* Octet 5 to 8 Sequence Number */
1573 proto_tree_add_item_ret_uint(tree, hf_pfcp_sequence_number, tvb, 0, 4, ENC_BIG_ENDIAN, &value);
1575 proto_item_append_text(item, "%u", value);
1583 dissect_pfcp_metric(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item, guint16 length _U_, guint8 message_type _U_)
1586 /* Octet 5 Metric */
1587 proto_tree_add_item_ret_uint(tree, hf_pfcp_metric, tvb, 0, 1, ENC_BIG_ENDIAN, &value);
1589 proto_item_append_text(item, "%u", value);
1597 dissect_pfcp_timer(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item, guint16 length _U_, guint8 message_type _U_)
1600 guint32 unit, value;
1602 /* Octet 5 Timer unit Timer value */
1603 proto_tree_add_item_ret_uint(tree, hf_pfcp_timer_unit, tvb, offset, 1, ENC_BIG_ENDIAN, &unit);
1604 proto_tree_add_item_ret_uint(tree, hf_pfcp_timer_value, tvb, offset, 1, ENC_BIG_ENDIAN, &value);
1610 proto_item_append_text(item, "%u s", value * 2);
1613 proto_item_append_text(item, "%u min", value);
1616 proto_item_append_text(item, "%u min", value * 10);
1619 proto_item_append_text(item, "%u hours", value);
1622 proto_item_append_text(item, "%u hours", value * 10);
1625 proto_item_append_text(item, "%u Infinite", value);
1629 proto_item_append_text(item, "%u min", value * 10);
1632 if ((unit != 7) && (value == 0)) {
1633 proto_item_append_text(item, " Stopped");
1636 if (offset < length) {
1637 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
1643 * 8.2.36 Packet Detection Rule ID (PDR ID)
1646 decode_pfcp_pdr_id(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item, gint offset)
1649 /* Octet 5 to 6 Rule ID*/
1650 proto_tree_add_item_ret_uint(tree, hf_pfcp_pdr_id, tvb, offset, 2, ENC_BIG_ENDIAN, &rule_id);
1653 proto_item_append_text(item, "%u", rule_id);
1658 dissect_pfcp_pdr_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type _U_)
1662 offset = decode_pfcp_pdr_id(tvb, pinfo, tree, item, offset);
1664 if (offset < length) {
1665 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
1672 dissect_pfcp_f_seid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
1675 guint64 f_seid_flags;
1677 static const int * pfcp_f_seid_flags[] = {
1688 /* Octet 5 Spare Spare Spare Spare Spare Spare V4 V6*/
1689 proto_tree_add_bitmask_with_flags_ret_uint64(tree, tvb, offset, hf_pfcp_f_seid_flags,
1690 ett_pfcp_f_seid_flags, pfcp_f_seid_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT | BMT_NO_TFS, &f_seid_flags);
1693 if ((f_seid_flags & 0x3) == 0) {
1694 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_encoding_error, tvb, 0, 1);
1697 /* Octet 6 to 13 SEID */
1698 proto_tree_add_item(tree, hf_pfcp_seid, tvb, offset, 8, ENC_BIG_ENDIAN);
1700 /* IPv4 address (if present)*/
1701 if ((f_seid_flags & 0x2) == 2) {
1702 proto_tree_add_item(tree, hf_pfcp_f_seid_ipv4, tvb, offset, 4, ENC_BIG_ENDIAN);
1705 /* IPv6 address (if present)*/
1706 if ((f_seid_flags & 0x1) == 1) {
1707 proto_tree_add_item(tree, hf_pfcp_f_seid_ipv6, tvb, offset, 16, ENC_NA);
1710 if (offset < length) {
1711 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
1719 static const value_string pfcp_node_id_type_vals[] = {
1721 { 0, "IPv4 address" },
1722 { 1, "IPv6 address" },
1728 dissect_pfcp_node_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type _U_)
1730 int offset = 0, name_len, tmp;
1731 guint32 node_id_type;
1732 guint8 *fqdn = NULL;
1734 /* Octet 5 Spare Node ID Type*/
1735 proto_tree_add_item(tree, hf_pfcp_spare_h1, tvb, offset, 1, ENC_BIG_ENDIAN);
1736 proto_tree_add_item_ret_uint(tree, hf_pfcp_node_id_type, tvb, offset, 1, ENC_BIG_ENDIAN, &node_id_type);
1739 switch (node_id_type) {
1742 proto_tree_add_item(tree, hf_pfcp_node_id_ipv4, tvb, offset, 4, ENC_BIG_ENDIAN);
1743 proto_item_append_text(item, "IPv4 %s", tvb_ip_to_str(tvb, offset));
1748 proto_tree_add_item(tree, hf_pfcp_node_id_ipv6, tvb, offset, 16, ENC_NA);
1749 proto_item_append_text(item, "IPv6 %s", tvb_ip6_to_str(tvb, offset));
1753 /* FQDN, the Node ID value encoding shall be identical to the encoding of a FQDN
1754 * within a DNS message of section 3.1 of IETF RFC 1035 [27] but excluding the trailing zero byte.
1757 name_len = tvb_get_guint8(tvb, offset);
1758 /* NOTE 1: The FQDN field in the IE is not encoded as a dotted string as commonly used in DNS master zone files. */
1759 if (name_len < 0x40) {
1760 fqdn = tvb_get_string_enc(wmem_packet_scope(), tvb, offset + 1, length - 2, ENC_ASCII);
1762 if (name_len >= length - 2)
1765 name_len = name_len + fqdn[tmp] + 1;
1769 /* In case the FQDN field is incorrectly in dotted string form.*/
1771 fqdn = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, length - 1, ENC_ASCII);
1772 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_encoding_error, tvb, offset, length - 1);
1774 proto_tree_add_string(tree, hf_pfcp_node_id_fqdn, tvb, offset, length - 1, fqdn);
1775 proto_item_append_text(item, "%s", fqdn);
1776 offset += length - 1;
1783 if (offset < length) {
1784 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
1789 * 8.2.39 PFD Contents
1792 dissect_pfcp_pfd_contents(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
1798 static const int * pfcp_pfd_contents_flags[] = {
1799 &hf_pfcp_spare_b7_b4,
1806 /* Octet 5 Spare CP DN URL FD*/
1807 proto_tree_add_bitmask_with_flags_ret_uint64(tree, tvb, offset, hf_pfcp_pfd_contents_flags,
1808 ett_pfcp_measurement_method_flags, pfcp_pfd_contents_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT, &flags);
1811 /* Bit 1 - FD (Flow Description): If this bit is set to "1", then the Length of Flow Description
1812 * and the Flow Description fields shall be present
1814 if ((flags & 0x1) == 1) {
1815 /* The Flow Description field, when present, shall be encoded as an OctetString
1816 * as specified in subclause 6.4.3.7 of 3GPP TS 29.251
1818 /* m to (m+1) Length of Flow Description */
1819 proto_tree_add_item_ret_uint(tree, hf_pfcp_flow_desc_len, tvb, offset, 2, ENC_BIG_ENDIAN, &len);
1822 /* (m+2) to p Flow Description */
1823 proto_tree_add_item(tree, hf_pfcp_fd, tvb, offset, len, ENC_NA);
1828 /* Bit 2 - URL (URL): If this bit is set to "1", then the Length of URL and the URL fields shall be present */
1829 if ((flags & 0x2) == 2) {
1830 /* q to (q+1) Length of URL */
1831 proto_tree_add_item_ret_uint(tree, hf_pfcp_url_len, tvb, offset, 2, ENC_BIG_ENDIAN, &len);
1833 /* (q+2) to r URL */
1834 proto_tree_add_item(tree, hf_pfcp_url, tvb, offset, len, ENC_NA);
1839 /* Bit 3 - DN (Domain Name): If this bit is set to "1", then the Length of Domain Name and
1840 * the Domain Name fields shall be present
1842 if ((flags & 0x4) == 4) {
1843 /* s to (s+1) Length of Domain Name */
1844 proto_tree_add_item_ret_uint(tree, hf_pfcp_dn_len, tvb, offset, 2, ENC_BIG_ENDIAN, &len);
1846 /* (s+2) to t Domain Name */
1847 proto_tree_add_item(tree, hf_pfcp_dn, tvb, offset, len, ENC_NA);
1851 /* Bit 4 - CP (Custom PFD Content): If this bit is set to "1", then the Length of Custom PFD Content and
1852 * the Custom PFD Content fields shall be present
1854 if ((flags & 0x8) == 8) {
1855 /* u to (u+1) Length of Custom PFD Content */
1856 proto_tree_add_item_ret_uint(tree, hf_pfcp_cp_len, tvb, offset, 2, ENC_BIG_ENDIAN, &len);
1858 /* (u+2) to v Custom PFD Content */
1859 proto_tree_add_item(tree, hf_pfcp_cp, tvb, offset, len, ENC_NA);
1863 if (offset < length) {
1864 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
1869 * 8.2.40 Measurement Method
1872 dissect_pfcp_measurement_method(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
1876 static const int * pfcp_measurement_method_flags[] = {
1877 &hf_pfcp_spare_b7_b3,
1883 /* Octet 5 Spare Spare Spare Spare Spare EVENT VOLUM DURAT*/
1884 proto_tree_add_bitmask_with_flags(tree, tvb, offset, hf_pfcp_measurement_method_flags,
1885 ett_pfcp_measurement_method_flags, pfcp_measurement_method_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT);
1888 if (offset < length) {
1889 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
1895 * 8.2.41 Usage Report Trigger
1898 dissect_pfcp_usage_report_trigger(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
1902 static const int * pfcp_usage_report_trigger_flags[] = {
1904 &hf_pfcp_usage_report_trigger_b15_immer,
1905 &hf_pfcp_usage_report_trigger_b14_droth,
1906 &hf_pfcp_usage_report_trigger_b13_stopt,
1907 &hf_pfcp_usage_report_trigger_b12_start,
1908 &hf_pfcp_usage_report_trigger_b11_quhti,
1909 &hf_pfcp_usage_report_trigger_b10_timth,
1910 &hf_pfcp_usage_report_trigger_b9_volth,
1911 &hf_pfcp_usage_report_trigger_b8_perio,
1912 &hf_pfcp_usage_report_trigger_b7_b6_spare,
1913 &hf_pfcp_usage_report_trigger_b5_envcl,
1914 &hf_pfcp_usage_report_trigger_b4_monit,
1915 &hf_pfcp_usage_report_trigger_b3_termr,
1916 &hf_pfcp_usage_report_trigger_b2_liusa,
1917 &hf_pfcp_usage_report_trigger_b1_timqu,
1918 &hf_pfcp_usage_report_trigger_b0_volqu,
1921 /* Octet 5 IMMER DROTH STOPT START QUHTI TIMTH VOLTH PERIO*/
1922 /* Octet 6 Spare Spare ENVCL MONIT TERMR LIUSA TIMQU VOLQU*/
1923 proto_tree_add_bitmask_with_flags(tree, tvb, offset, hf_pfcp_usage_report_trigger,
1924 ett_pfcp_report_trigger, pfcp_usage_report_trigger_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT);
1927 if (offset < length) {
1928 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
1934 * 8.2.42 Measurement Period
1937 dissect_pfcp_measurement_period(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type _U_)
1941 /* 5 to 8 Measurement Period*/
1942 proto_tree_add_item_ret_uint(tree, hf_pfcp_measurement_period, tvb, offset, 4, ENC_BIG_ENDIAN, &value);
1945 proto_item_append_text(item, "%u", value);
1947 if (offset < length) {
1948 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
1953 * 8.2.43 Fully qualified PDN Connection Set Identifier (FQ-CSID)
1955 static const value_string pfcp_fq_csid_node_id_type_vals[] = {
1957 { 0, "Node-Address is a global unicast IPv4 address" },
1958 { 1, "Node-Address is a global unicast IPv6 address" },
1959 { 2, "Node-Address is a 4 octets long field" },
1964 dissect_pfcp_fq_csid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
1967 guint32 node_id_type, num_csid;
1969 /* Octet 5 FQ-CSID Node-ID Type Number of CSIDs= m*/
1970 proto_tree_add_item_ret_uint(tree, hf_pfcp_fq_csid_node_id_type, tvb, offset, 1, ENC_BIG_ENDIAN, &node_id_type);
1971 proto_tree_add_item_ret_uint(tree, hf_pfcp_num_csid, tvb, offset, 1, ENC_BIG_ENDIAN, &num_csid);
1974 /* 6 to p Node-Address */
1975 switch (node_id_type) {
1977 /* 0 indicates that Node-Address is a global unicast IPv4 address and p = 9 */
1978 proto_tree_add_item(tree, hf_pfcp_fq_csid_node_id_ipv4, tvb, offset, 4, ENC_BIG_ENDIAN);
1982 /* 1 indicates that Node-Address is a global unicast IPv6 address and p = 21 */
1983 proto_tree_add_item(tree, hf_pfcp_fq_csid_node_id_ipv6, tvb, offset, 16, ENC_NA);
1987 /* 2 indicates that Node-Address is a 4 octets long field with a 32 bit value stored in network order, and p= 9
1988 * Most significant 20 bits are the binary encoded value of (MCC * 1000 + MNC).
1989 * 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
1991 proto_tree_add_item(tree, hf_pfcp_fq_csid_node_id_mcc_mnc, tvb, offset, 4, ENC_BIG_ENDIAN);
1992 proto_tree_add_item(tree, hf_pfcp_fq_csid_node_id_int, tvb, offset, 4, ENC_BIG_ENDIAN);
1996 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2000 while (num_csid > 0) {
2001 proto_tree_add_item(tree, hf_pfcp_fq_csid, tvb, offset, 2, ENC_BIG_ENDIAN);
2005 if (offset < length) {
2006 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2011 * 8.2.44 Volume Measurement
2014 dissect_pfcp_volume_measurement(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
2019 static const int * pfcp_volume_measurement_flags[] = {
2020 &hf_pfcp_spare_b7_b3,
2026 /* Octet 5 Spare DLVOL ULVOL TOVOL*/
2027 proto_tree_add_bitmask_with_flags_ret_uint64(tree, tvb, offset, hf_pfcp_volume_measurement,
2028 ett_pfcp_volume_measurement, pfcp_volume_measurement_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT, &flags);
2031 /* Bit 1 - TOVOL: If this bit is set to "1", then the Total Volume field shall be present*/
2032 if ((flags & 0x1) == 1) {
2033 /* m to (m+7) Total Volume */
2034 proto_tree_add_item(tree, hf_pfcp_vol_meas_tovol, tvb, offset, 8, ENC_BIG_ENDIAN);
2037 /* Bit 2 - ULVOL: If this bit is set to "1", then the Total Volume field shall be present*/
2038 if ((flags & 0x2) == 2) {
2039 /* p to (p+7) Uplink Volume */
2040 proto_tree_add_item(tree, hf_pfcp_vol_meas_ulvol, tvb, offset, 8, ENC_BIG_ENDIAN);
2043 /* Bit 3 - DLVOL: If this bit is set to "1", then the Total Volume field shall be present*/
2044 if ((flags & 0x4) == 4) {
2045 /*q to (q+7) Downlink Volume */
2046 proto_tree_add_item(tree, hf_pfcp_vol_meas_dlvol, tvb, offset, 8, ENC_BIG_ENDIAN);
2050 if (offset < length) {
2051 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2056 * 8.2.45 Duration Measurement
2059 dissect_pfcp_duration_measurement(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type _U_)
2063 /* 5 to 8 Duration value*/
2064 proto_tree_add_item_ret_uint(tree, hf_pfcp_duration_measurement, tvb, offset, 4, ENC_BIG_ENDIAN, &value);
2067 proto_item_append_text(item, "%u s", value);
2069 if (offset < length) {
2070 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2074 * 8.2.46 Time of First Packet
2077 dissect_pfcp_time_of_first_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type _U_)
2080 const gchar *time_str;
2082 /* Octets 5 to 8 shall be encoded in the same format as the first four octets of the 64-bit timestamp
2083 * format as defined in section 6 of IETF RFC 5905
2086 time_str = tvb_ntp_fmt_ts_sec(tvb, 0);
2087 proto_tree_add_string(tree, hf_pfcp_time_of_first_packet, tvb, offset, 4, time_str);
2088 proto_item_append_text(item, "%s", time_str);
2091 if (offset < length) {
2092 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2096 * 8.2.47 Time of Last Packet
2099 dissect_pfcp_time_of_last_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type _U_)
2102 const gchar *time_str;
2104 /* Octets 5 to 8 shall be encoded in the same format as the first four octets of the 64-bit timestamp
2105 * format as defined in section 6 of IETF RFC 5905
2108 time_str = tvb_ntp_fmt_ts_sec(tvb, 0);
2109 proto_tree_add_string(tree, hf_pfcp_time_of_last_packet, tvb, offset, 4, time_str);
2110 proto_item_append_text(item, "%s", time_str);
2113 if (offset < length) {
2114 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2118 * 8.2.48 Quota Holding Time
2121 dissect_pfcp_quota_holding_time(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type _U_)
2125 /* Octet 5 to 8 Time Quota value
2126 * TThe Time Quota value shall be encoded as an Unsigned32 binary integer value. It contains a duration in seconds
2128 proto_tree_add_item_ret_uint(tree, hf_pfcp_quota_holding_time, tvb, offset, 4, ENC_BIG_ENDIAN, &value);
2131 proto_item_append_text(item, "%u s", value);
2133 if (offset < length) {
2134 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2140 * 8.2.49 Dropped DL Traffic Threshold
2143 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_)
2148 static const int * pfcp_dropped_dl_traffic_threshold_flags[] = {
2149 &hf_pfcp_dropped_dl_traffic_threshold_b0_dlpa,
2152 /* Octet 5 Spare DLPA*/
2153 proto_tree_add_bitmask_with_flags_ret_uint64(tree, tvb, offset, hf_pfcp_dropped_dl_traffic_threshold,
2154 ett_pfcp_dropped_dl_traffic_threshold, pfcp_dropped_dl_traffic_threshold_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT, &flags_val);
2157 if ((flags_val & 0x1) == 1) {
2158 /* m to (m+7) Downlink Packets
2159 * DLPA: If this bit is set to "1", then the Downlink Packets field shall be present
2161 proto_tree_add_item(tree, hf_pfcp_downlink_packets, tvb, offset, 8, ENC_BIG_ENDIAN);
2164 if (offset < length) {
2165 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2169 * 8.2.50 Volume Quota
2172 dissect_pfcp_volume_quota(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
2177 static const int * pfcp_volume_quota_flags[] = {
2178 &hf_pfcp_spare_b7_b3,
2184 /* Octet 5 Spare DLVOL ULVOL TOVOL*/
2185 proto_tree_add_bitmask_with_flags_ret_uint64(tree, tvb, offset, hf_pfcp_volume_quota,
2186 ett_pfcp_volume_quota, pfcp_volume_quota_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT, &flags_val);
2189 /* The Total Volume, Uplink Volume and Downlink Volume fields shall be encoded as an Unsigned64 binary integer value.
2190 * They shall contain the total, uplink or downlink number of octets respectively.
2192 if ((flags_val & 0x1) == 1) {
2193 /* m to (m+7) Total Volume
2194 * TOVOL: If this bit is set to "1", then the Total Volume field shall be present
2196 proto_tree_add_item(tree, hf_pfcp_volume_quota_tovol, tvb, offset, 8, ENC_BIG_ENDIAN);
2199 if ((flags_val & 0x2) == 2) {
2200 /* p to (p+7) Uplink Volume
2201 * ULVOL: If this bit is set to "1", then the Uplink Volume field shall be present
2203 proto_tree_add_item(tree, hf_pfcp_volume_quota_ulvol, tvb, offset, 8, ENC_BIG_ENDIAN);
2206 if ((flags_val & 0x4) == 4) {
2207 /* q to (q+7) Downlink Volume
2208 * DLVOL: If this bit is set to "1", then the Downlink Volume field shall be present
2210 proto_tree_add_item(tree, hf_pfcp_volume_quota_dlvol, tvb, offset, 8, ENC_BIG_ENDIAN);
2214 if (offset < length) {
2215 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2222 dissect_pfcp_time_quota(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type _U_)
2226 /* Octet 5 to 8 Time Quota value
2227 * TThe Time Quota value shall be encoded as an Unsigned32 binary integer value. It contains a duration in seconds
2229 proto_tree_add_item_ret_uint(tree, hf_pfcp_time_quota, tvb, offset, 4, ENC_BIG_ENDIAN, &value);
2232 proto_item_append_text(item, "%u s", value);
2234 if (offset < length) {
2235 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2243 dissect_pfcp_start_time(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type _U_)
2245 const gchar *time_str;
2248 /* The Start Time field shall contain a UTC time. Octets 5 to 8 are encoded in the same format as
2249 * the first four octets of the 64-bit timestamp format as defined in section 6 of IETF RFC 5905 [26].
2251 time_str = tvb_ntp_fmt_ts_sec(tvb, 0);
2252 proto_tree_add_string(tree, hf_pfcp_start_time, tvb, offset, 4, time_str);
2253 proto_item_append_text(item, "%s", time_str);
2256 if (offset < length) {
2257 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2265 dissect_pfcp_end_time(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type _U_)
2267 const gchar *time_str;
2270 /* The End Time field shall contain a UTC time. Octets 5 to 8 are encoded in the same format as
2271 * the first four octets of the 64-bit timestamp format as defined in section 6 of IETF RFC 5905 [26].
2273 time_str = tvb_ntp_fmt_ts_sec(tvb, 0);
2274 proto_tree_add_string(tree, hf_pfcp_end_time, tvb, offset, 4, time_str);
2275 proto_item_append_text(item, "%s", time_str);
2278 if (offset < length) {
2279 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2288 decode_pfcp_urr_id(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint offset)
2291 /* Octet 5 to 8 URR ID value
2292 * The bit 8 of octet 5 is used to indicate if the Rule ID is dynamically allocated by the CP function
2293 * or predefined in the UP function. If set to 0, it indicates that the Rule is dynamically provisioned
2294 * by the CP Function. If set to 1, it indicates that the Rule is predefined in the UP Function
2296 proto_tree_add_item(tree, hf_pfcp_urr_id_flg, tvb, offset, 4, ENC_BIG_ENDIAN);
2297 proto_tree_add_item_ret_uint(tree, hf_pfcp_urr_id, tvb, offset, 4, ENC_BIG_ENDIAN, &urr_id);
2300 proto_item_append_text(item, "%s %u",
2301 ((urr_id & 80000000) ? pfcp_id_predef_dynamic_tfs.true_string : pfcp_id_predef_dynamic_tfs.false_string),
2302 (urr_id & 0x7fffffff));
2307 dissect_pfcp_urr_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
2311 offset = decode_pfcp_urr_id(tvb, pinfo, tree, item, offset);
2313 if (offset < length) {
2314 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2319 * 8.2.55 Linked URR ID IE
2322 dissect_pfcp_linked_urr_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type _U_)
2326 /* Octet 5 to 8 Linked URR ID value
2327 * The Linked URR ID value shall be encoded as an Unsigned32 binary integer value
2329 proto_tree_add_item_ret_uint(tree, hf_pfcp_linked_urr_id, tvb, offset, 4, ENC_BIG_ENDIAN, &value);
2332 proto_item_append_text(item, "%u s", value);
2334 if (offset < length) {
2335 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2340 * 8.2.56 Outer Header Creation
2343 static const value_string pfcp_outer_hdr_desc_vals[] = {
2345 { 0x01, "GTP-U/UDP/IPv4 " },
2346 { 0x02, "GTP-U/UDP/IPv6 " },
2347 { 0x03, "GTP-U/UDP/IPv4/IPv6 " },
2348 { 0x04, "UDP/IPv4 " },
2349 { 0x08, "UDP/IPv6 " },
2350 { 0x0C, "UDP/IPv4/IPv6 " },
2355 dissect_pfcp_outer_header_creation(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
2360 /* Octet 5 Outer Header Creation Description */
2361 proto_tree_add_item_ret_uint(tree, hf_pfcp_outer_hdr_desc, tvb, offset, 2, ENC_BIG_ENDIAN, &value);
2365 * The TEID field shall be present if the Outer Header Creation Description requests the creation of a GTP-U header.
2366 * Otherwise it shall not be present
2368 if ((value & 0x01) || (value & 0x02)) {
2369 proto_tree_add_item(tree, hf_pfcp_outer_hdr_creation_teid, tvb, offset, 4, ENC_BIG_ENDIAN);
2375 * The IPv4 Address field shall be present if the Outer Header Creation Description requests the creation of a IPv4 header
2377 if ((value & 0x01) || (value & 0x04)) {
2378 proto_tree_add_item(tree, hf_pfcp_outer_hdr_creation_ipv4, tvb, offset, 4, ENC_BIG_ENDIAN);
2384 * The IPv6 Address field shall be present if the Outer Header Creation Description requests the creation of a IPv6 header
2386 if ((value & 0x02) || (value & 0x08)) {
2387 proto_tree_add_item(tree, hf_pfcp_outer_hdr_creation_ipv6, tvb, offset, 16, ENC_NA);
2392 * r to (r+1) Port Number
2393 * The Port Number field shall be present if the Outer Header Creation Description requests the creation of a UDP/IP header
2395 if ((value & 0x04) || (value & 0x08)) {
2396 proto_tree_add_item(tree, hf_pfcp_outer_hdr_creation_port, tvb, offset, 2, ENC_BIG_ENDIAN);
2400 if (offset < length) {
2401 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2409 decode_pfcp_bar_id(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 offset)
2411 /* Octet 5 BAR ID value
2412 * The BAR ID value shall be encoded as a binary integer value
2414 proto_tree_add_item(tree, hf_pfcp_bar_id, tvb, offset, 1, ENC_BIG_ENDIAN);
2420 dissect_pfcp_bar_id(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
2424 offset = decode_pfcp_bar_id(tvb, pinfo, tree, item, offset);
2426 if (offset < length) {
2427 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2433 * 8.2.58 CP Function Features
2436 dissect_pfcp_cp_function_features(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
2440 static const int * pfcp_cp_function_features_flags[] = {
2449 proto_tree_add_bitmask_with_flags(tree, tvb, offset, hf_pfcp_cp_function_features,
2450 ett_pfcp_cp_function_features, pfcp_cp_function_features_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT);
2453 if (offset < length) {
2454 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2460 * 8.2.59 Usage Information
2463 dissect_pfcp_usage_information(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
2467 static const int * pfcp_usage_information_flags[] = {
2475 /* Octet 5 Spare UBE UAE AFT BEF */
2476 proto_tree_add_bitmask_with_flags(tree, tvb, offset, hf_pfcp_usage_information,
2477 ett_pfcp_usage_information, pfcp_usage_information_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT);
2480 if (offset < length) {
2481 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2487 * 8.2.60 Application Instance ID
2490 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_)
2492 /* Octet 5 5 to (n+4) Application Instance Identifier
2493 * The Application Instance Identifier shall be encoded as an OctetString (see 3GPP TS 29.212)
2495 proto_tree_add_item(tree, hf_pfcp_application_instance_id, tvb, 0, length, ENC_NA);
2499 * 8.2.61 Flow Information
2501 static const value_string pfcp_flow_dir_vals[] = {
2502 { 0, "Unspecified" },
2503 { 1, "Downlink (traffic to the UE)" },
2504 { 2, "Uplink (traffic from the UE)" },
2505 { 3, "Bidirectional" },
2510 dissect_pfcp_flow_inf(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
2514 /* Octet 5 Spare Flow Direction */
2515 proto_tree_add_item(tree, hf_pfcp_spare_b7_b3, tvb, offset, 1, ENC_BIG_ENDIAN);
2516 proto_tree_add_item(tree, hf_pfcp_flow_dir, tvb, offset, 1, ENC_BIG_ENDIAN);
2519 /* 6 to 7 Length of Flow Description */
2520 proto_tree_add_item_ret_uint(tree, hf_pfcp_flow_desc_len, tvb, offset, 2, ENC_BIG_ENDIAN, &len);
2523 * The Flow Description field, when present, shall be encoded as an OctetString
2524 * as specified in subclause 5.4.2 of 3GPP TS 29.212
2526 proto_tree_add_item(tree, hf_pfcp_fd, tvb, offset, len, ENC_NA);
2529 if (offset < length) {
2530 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2536 * 8.2.62 UE IP Address
2538 static const true_false_string pfcp_ue_ip_add_sd_flag_vals = {
2539 "Destination IP address",
2540 "Source IP address",
2544 dissect_pfcp_ue_ip_address(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
2547 guint64 ue_ip_address_flags;
2549 static const int * pfcp_ue_ip_address_flags[] = {
2550 &hf_pfcp_spare_b7_b3,
2551 &hf_pfcp_ue_ip_address_flag_b2_sd,
2552 &hf_pfcp_ue_ip_address_flag_b1_v4,
2553 &hf_pfcp_ue_ip_address_flag_b0_v6,
2556 /* Octet 5 Spare S/D V4 V6*/
2557 proto_tree_add_bitmask_with_flags_ret_uint64(tree, tvb, offset, hf_pfcp_ue_ip_address_flags,
2558 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);
2561 /* IPv4 address (if present)*/
2562 if ((ue_ip_address_flags & 0x2) == 2) {
2563 proto_tree_add_item(tree, hf_pfcp_ue_ip_addr_ipv4, tvb, offset, 4, ENC_BIG_ENDIAN);
2566 /* IPv6 address (if present)*/
2567 if ((ue_ip_address_flags & 0x1) == 1) {
2568 proto_tree_add_item(tree, hf_pfcp_ue_ip_add_ipv6, tvb, offset, 16, ENC_NA);
2572 if (offset < length) {
2573 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2578 * 8.2.63 Packet Rate
2580 static const value_string pfcp_pr_time_unit_vals[] = {
2590 dissect_pfcp_packet_rate(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
2595 static const int * pfcp_packet_rate_flags[] = {
2596 &hf_pfcp_spare_b7_b2,
2601 /* Octet 5 Spare DLPR ULPR */
2602 proto_tree_add_bitmask_with_flags_ret_uint64(tree, tvb, offset, hf_pfcp_packet_rate,
2603 ett_pfcp_packet_rate, pfcp_packet_rate_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT, &flags);
2606 /* Bit 1 - ULPR (Uplink Packet Rate): If this bit is set to "1", then octets m to (m+2) shall be present */
2607 if ((flags & 0x1) == 1) {
2609 proto_tree_add_item(tree, hf_pfcp_spare_b7_b3, tvb, offset, 1, ENC_BIG_ENDIAN);
2610 proto_tree_add_item(tree, hf_pfcp_ul_time_unit, tvb, offset, 1, ENC_BIG_ENDIAN);
2612 /* (m+1) to (m+2) Maximum Uplink Packet Rate */
2613 proto_tree_add_item(tree, hf_pfcp_max_ul_pr, tvb, offset, 2, ENC_BIG_ENDIAN);
2616 /* Bit 2 - DLPR (Downlink Packet Rate): If this bit is set to "1", then octets p to (p+2) shall be present*/
2617 if ((flags & 0x2) == 2) {
2618 proto_tree_add_item(tree, hf_pfcp_spare_b7_b3, tvb, offset, 1, ENC_BIG_ENDIAN);
2619 proto_tree_add_item(tree, hf_pfcp_dl_time_unit, tvb, offset, 1, ENC_BIG_ENDIAN);
2621 /* (m+1) to (m+2) Maximum Uplink Packet Rate */
2622 proto_tree_add_item(tree, hf_pfcp_max_dl_pr, tvb, offset, 2, ENC_BIG_ENDIAN);
2626 if (offset < length) {
2627 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2633 * 8.2.64 Outer Header Removal
2635 static const value_string pfcp_out_hdr_desc_vals[] = {
2636 { 0, "GTP-U/UDP/IPv4" },
2637 { 1, "GTP-U/UDP/IPv6" },
2644 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_)
2648 /* Octet 5 to (n+4) Application Identifier
2649 * The Application Identifier shall be encoded as an OctetString (see 3GPP TS 29.212)
2651 proto_tree_add_item_ret_uint(tree, hf_pfcp_out_hdr_desc, tvb, offset, 1, ENC_BIG_ENDIAN, &value);
2654 proto_item_append_text(item, "%s", val_to_str_const(value, pfcp_out_hdr_desc_vals, "Unknown"));
2656 if (offset < length) {
2657 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2661 * 8.2.65 Recovery Time Stamp
2665 dissect_pfcp_recovery_time_stamp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type _U_)
2667 const gchar *time_str;
2670 /* indicates the UTC time when the node started. Octets 5 to 8 are encoded in the same format as
2671 * the first four octets of the 64-bit timestamp format as defined in section 6 of IETF RFC 5905 [26].
2673 time_str = tvb_ntp_fmt_ts_sec(tvb, 0);
2674 proto_tree_add_string(tree, hf_pfcp_recovery_time_stamp, tvb, offset, 4, time_str);
2675 proto_item_append_text(item, "%s", time_str);
2678 if (offset < length) {
2679 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2684 * 8.2.66 DL Flow Level Marking
2687 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_)
2692 static const int * pfcp_dl_flow_level_marking_flags[] = {
2693 &hf_pfcp_spare_b7_b2,
2698 /* Octet 5 Spare SCI TTC*/
2699 proto_tree_add_bitmask_with_flags_ret_uint64(tree, tvb, offset, hf_pfcp_dl_flow_level_marking,
2700 ett_pfcp_pfcp_dl_flow_level_marking, pfcp_dl_flow_level_marking_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT, &flags_val);
2703 /* Bit 1 - TTC (ToS/Traffic Class): If this bit is set to "1",
2704 * then the ToS/Traffic Class field shall be present
2706 if ((flags_val & 0x1) == 1) {
2707 /* m to (m+1) ToS/Traffic Class
2708 * The ToS/Traffic Class shall be encoded on two octets as an OctetString.
2709 * The first octet shall contain the IPv4 Type-of-Service or the IPv6 Traffic-Class field and
2710 * the second octet shall contain the ToS/Traffic Class mask field
2712 proto_tree_add_item(tree, hf_pfcp_tos_traf_class, tvb, offset, 2, ENC_BIG_ENDIAN);
2715 /* SCI (Service Class Indicator): If this bit is set to "1",
2716 * then the Service Class Indicator field shall be present
2718 if ((flags_val & 0x2) == 2) {
2719 /* Octets p and (p+1) of the Service Class Indicator field, when present,
2720 * shall be encoded respectively as octets 2 and 3 of the Service Class Indicator Extension Header
2721 * specified in Figure 5.2.2.3-1 of 3GPP TS 29.281
2723 proto_tree_add_item(tree, hf_pfcp_sci, tvb, offset, 2, ENC_BIG_ENDIAN);
2727 if (offset < length) {
2728 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2734 * 8.2.67 Header Enrichment
2736 static const value_string pfcp_header_type_vals[] = {
2742 dissect_pfcp_header_enrichment(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
2746 /* Octet 5 Spare Header Type
2748 proto_tree_add_item(tree, hf_pfcp_spare_b7_b5, tvb, offset, 1, ENC_BIG_ENDIAN);
2749 proto_tree_add_item(tree, hf_pfcp_header_type, tvb, offset, 1, ENC_BIG_ENDIAN);
2752 /* 6 Length of Header Field Name */
2753 proto_tree_add_item_ret_uint(tree, hf_pfcp_hf_len, tvb, offset, 1, ENC_BIG_ENDIAN, &len);
2756 /* 7 to m Header Field Name
2757 * Header Field Name shall be encoded as an OctetString
2759 proto_tree_add_item(tree, hf_pfcp_hf_name, tvb, offset, len, ENC_NA);
2762 /* p Length of Header Field Value*/
2763 proto_tree_add_item_ret_uint(tree, hf_pfcp_hf_val_len, tvb, offset, 1, ENC_BIG_ENDIAN, &len);
2766 /* (p+1) to q Header Field Value */
2767 proto_tree_add_item(tree, hf_pfcp_hf_val, tvb, offset, len, ENC_NA);
2770 if (offset < length) {
2771 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2776 * 8.2.68 Measurement Information
2779 dissect_pfcp_measurement_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
2783 static const int * pfcp_measurement_info_flags[] = {
2784 &hf_pfcp_spare_b7_b2,
2789 /* Octet 5 Spare INAM MBQE */
2790 proto_tree_add_bitmask_with_flags(tree, tvb, offset, hf_pfcp_measurement_info,
2791 ett_pfcp_measurement_info, pfcp_measurement_info_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT);
2794 if (offset < length) {
2795 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2800 * 8.2.69 Node Report Type
2803 dissect_pfcp_node_report_type(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
2807 static const int * pfcp_node_report_type_flags[] = {
2808 &hf_pfcp_spare_b7_b1,
2812 /* Octet 5 Spare INAM MBQE */
2813 proto_tree_add_bitmask_with_flags(tree, tvb, offset, hf_pfcp_node_report_type,
2814 ett_pfcp_node_report_type, pfcp_node_report_type_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT);
2817 if (offset < length) {
2818 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2823 * 8.2.70 Remote GTP-U Peer
2826 dissect_pfcp_remote_gtp_u_peer(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type _U_)
2831 static const int * pfcp_remote_gtp_u_peer_flags[] = {
2832 &hf_pfcp_spare_b7_b2,
2833 &hf_pfcp_gtp_u_peer_flag_b1_v4,
2834 &hf_pfcp_gtp_u_peer_flag_b0_v6,
2837 /* Octet 5 Spare V4 V6*/
2838 proto_tree_add_bitmask_with_flags_ret_uint64(tree, tvb, offset, hf_pfcp_remote_gtp_u_peer,
2839 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);
2842 /* IPv6 address (if present)*/
2843 if ((flags & 0x1) == 1) {
2844 proto_tree_add_item(tree, hf_pfcp_remote_gtp_u_peer_ipv6, tvb, offset, 16, ENC_NA);
2845 proto_item_append_text(item, "IPv6 %s", tvb_ip6_to_str(tvb, offset));
2848 /* IPv4 address (if present)*/
2849 if ((flags & 0x2) == 2) {
2850 proto_tree_add_item(tree, hf_pfcp_remote_gtp_u_peer_ipv4, tvb, offset, 4, ENC_BIG_ENDIAN);
2851 proto_item_append_text(item, "IPv4 %s", tvb_ip_to_str(tvb, offset));
2855 if (offset < length) {
2856 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2865 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_)
2870 * The UR-SEQN value shall be encoded as an Unsigned32 binary integer value
2872 proto_tree_add_item_ret_uint(tree, hf_pfcp_ur_seqn, tvb, 0, 4, ENC_BIG_ENDIAN, &value);
2874 proto_item_append_text(item, "%u", value);
2880 * 8.2.72 Activate Predefined Rules
2883 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_)
2886 /* Octet 5 to (n+4) Predefined Rules Name
2887 * The Predefined Rules Name field shall be encoded as an OctetString
2889 proto_tree_add_item(tree, hf_pfcp_predef_rules_name, tvb, offset, length, ENC_NA);
2892 * 8.2.73 Deactivate Predefined Rules
2895 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_)
2898 /* Octet 5 to (n+4) Predefined Rules Name
2899 * The Predefined Rules Name field shall be encoded as an OctetString
2901 proto_tree_add_item(tree, hf_pfcp_predef_rules_name, tvb, offset, length, ENC_NA);
2907 decode_pfcp_far_id(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, gint offset)
2910 /* Octet 5 to 8 FAR ID value
2911 * The bit 8 of octet 5 is used to indicate if the Rule ID is dynamically allocated
2912 * by the CP function or predefined in the UP function. If set to 0, it indicates that
2913 * the Rule is dynamically provisioned by the CP Function. If set to 1, it indicates that
2914 * the Rule is predefined in the UP Function.
2916 proto_tree_add_item(tree, hf_pfcp_far_id_flg, tvb, offset, 4, ENC_BIG_ENDIAN);
2917 proto_tree_add_item_ret_uint(tree, hf_pfcp_far_id, tvb, offset, 4, ENC_BIG_ENDIAN, &far_id);
2920 proto_item_append_text(item, "%s %u",
2921 ((far_id&80000000)? pfcp_id_predef_dynamic_tfs.true_string : pfcp_id_predef_dynamic_tfs.false_string),
2922 (far_id & 0x7fffffff));
2927 dissect_pfcp_far_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
2931 offset = decode_pfcp_far_id(tvb, pinfo, tree, item, offset);
2933 if (offset < length) {
2934 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2942 decode_pfcp_qer_id(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint offset)
2945 /* Octet 5 to 8 QER ID value
2946 * The bit 8 of octet 5 is used to indicate if the Rule ID is dynamically allocated by the CP function
2947 * or predefined in the UP function. If set to 0, it indicates that the Rule is dynamically provisioned
2948 * by the CP Function. If set to 1, it indicates that the Rule is predefined in the UP Function
2950 proto_tree_add_item(tree, hf_pfcp_qer_id_flg, tvb, offset, 4, ENC_BIG_ENDIAN);
2951 proto_tree_add_item_ret_uint(tree, hf_pfcp_qer_id, tvb, offset, 4, ENC_BIG_ENDIAN, &qer_id);
2954 proto_item_append_text(item, "%s %u",
2955 ((qer_id & 80000000) ? pfcp_id_predef_dynamic_tfs.true_string : pfcp_id_predef_dynamic_tfs.false_string),
2956 (qer_id & 0x7fffffff));
2962 dissect_pfcp_qer_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
2966 offset = decode_pfcp_qer_id(tvb, pinfo, tree, item, offset);
2968 if (offset < length) {
2969 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2977 dissect_pfcp_oci_flags(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
2981 static const int * pfcp_oci_flags_flags[] = {
2982 &hf_pfcp_spare_b7_b1,
2986 /* Octet 5 Spare AOCI */
2987 proto_tree_add_bitmask_with_flags(tree, tvb, offset, hf_pfcp_oci_flags,
2988 ett_pfcp_oci_flags, pfcp_oci_flags_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT);
2991 if (offset < length) {
2992 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
2998 * 8.2.77 Sx Association Release Request
3001 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_)
3005 static const int * pfcp_sx_assoc_rel_req_flags[] = {
3006 &hf_pfcp_spare_b7_b1,
3010 /* Octet 5 Spare SARR */
3011 proto_tree_add_bitmask_with_flags(tree, tvb, offset, hf_pfcp_sx_assoc_rel_req_flags,
3012 ett_sx_assoc_rel_req_flags, pfcp_sx_assoc_rel_req_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT);
3015 if (offset < length) {
3016 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
3022 * 8.2.78 Graceful Release Period
3025 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_)
3028 guint32 unit, value;
3030 /* Octet 5 Timer unit Timer value */
3031 proto_tree_add_item_ret_uint(tree, hf_pfcp_timer_unit, tvb, offset, 1, ENC_BIG_ENDIAN, &unit);
3032 proto_tree_add_item_ret_uint(tree, hf_pfcp_timer_value, tvb, offset, 1, ENC_BIG_ENDIAN, &value);
3038 proto_item_append_text(item, "%u s", value * 2);
3041 proto_item_append_text(item, "%u min", value);
3044 proto_item_append_text(item, "%u min", value * 10);
3047 proto_item_append_text(item, "%u hours", value);
3050 proto_item_append_text(item, "%u hours", value * 10);
3053 proto_item_append_text(item, "%u Infinite", value);
3057 proto_item_append_text(item, "%u min", value * 10);
3060 if ((unit != 7) && (value == 0)) {
3061 proto_item_append_text(item, " Stopped");
3064 if (offset < length) {
3065 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
3072 static const value_string pfcp_pdn_type_vals[] = {
3082 dissect_pfcp_pdn_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_)
3086 /* Octet 5 Application Identifier
3087 * The Application Identifier shall be encoded as an OctetString (see 3GPP TS 29.212)
3089 proto_tree_add_item_ret_uint(tree, hf_pfcp_pdn_type, tvb, offset, 1, ENC_BIG_ENDIAN, &value);
3092 proto_item_append_text(item, "%s", val_to_str_const(value, pfcp_pdn_type_vals, "Unknown"));
3094 if (offset < length) {
3095 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
3099 * 8.2.80 Failed Rule ID
3101 static const value_string pfcp_failed_rule_id_type_vals[] = {
3111 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_)
3116 /* Octet 5 Rule ID Type */
3117 proto_tree_add_item_ret_uint(tree, hf_pfcp_failed_rule_id_type, tvb, offset, 1, ENC_BIG_ENDIAN, &rule_type);
3120 proto_item_append_text(item, "%s", val_to_str_const(rule_type, pfcp_failed_rule_id_type_vals, "Unknown"));
3122 /* 6 to p Rule ID value
3123 * The length and the value of the Rule ID value field shall be set as specified for the
3124 * PDR ID, FAR ID, QER ID, URR ID and BAR ID IE types respectively.
3126 switch (rule_type) {
3129 offset = decode_pfcp_pdr_id(tvb, pinfo, tree, item, offset);
3133 offset = decode_pfcp_far_id(tvb, pinfo, tree, item, offset);
3137 offset = decode_pfcp_qer_id(tvb, pinfo, tree, item, offset);
3141 offset = decode_pfcp_urr_id(tvb, pinfo, tree, item, offset);
3145 offset = decode_pfcp_bar_id(tvb, pinfo, tree, item, offset);
3151 if (offset < length) {
3152 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
3156 * 8.2.81 Time Quota Mechanism
3158 static const value_string pfcp_time_qouta_mechanism_bti_type_vals[] = {
3165 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_)
3170 /* Octet 5 BIT Type */
3171 proto_tree_add_item_ret_uint(tree, hf_pfcp_time_qouta_mechanism_bti_type, tvb, offset, 1, ENC_BIG_ENDIAN, &bti_type);
3174 proto_item_append_text(item, "%s", val_to_str_const(bti_type, pfcp_time_qouta_mechanism_bti_type_vals, "Unknown"));
3176 /* Base Time Interval
3177 * The Base Time Interval, shall be encoded as an Unsigned32
3178 * as specified in subclause 7.2.29 of 3GPP TS 32.299
3180 proto_tree_add_item(tree, hf_pfcp_time_qouta_mechanism_bti, tvb, offset, 4, ENC_BIG_ENDIAN);
3183 if (offset < length) {
3184 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
3188 * 8.2.82 User Plane IP Resource Information
3191 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_)
3194 guint64 upiri_flags_val;
3195 guint32 upiri_teid_range;
3197 static const int * pfcp_upiri_flags[] = {
3198 &hf_pfcp_spare_b7_b6,
3199 &hf_pfcp_upiri_flg_b5_assoni,
3200 &hf_pfcp_upiri_flg_b1_v6,
3201 &hf_pfcp_upiri_flg_b0_v4,
3204 /* Octet 5 Spare Spare ASSONI TEIDRI TEIDRI TEIDRI V6 V4*/
3205 proto_tree_add_bitmask_with_flags_ret_uint64(tree, tvb, offset, hf_pfcp_upiri_flags,
3206 ett_pfcp_upiri_flags, pfcp_upiri_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT | BMT_NO_TFS, &upiri_flags_val);
3208 /* The following flags are coded within Octet 5:
3209 * 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,
3210 * otherwise the IPv4 address field shall not be present.
3211 * 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,
3212 * otherwise the IPv6 address field shall not be present.
3213 * Bit 3-5 - TEIDRI (TEID Range Indication): the value of this field indicates the number of bits in the most significant
3214 * octet of a TEID that are used to partition the TEID range, e.g. if this field is set to "4", then the first
3215 * 4 bits in the TEID are used to partition the TEID range.
3216 * Bit 6 - ASSONI (Associated Network Instance): if this bit is set to "1", then the Network Instance field shall be present,
3217 * otherwise the Network Instance field shall not be present,
3218 * i.e. User Plane IP Resource Information provided can be used by CP function for any Network Instance of
3219 * GTP-U user plane in the UP function.
3222 /* Octet 5, bit 3-5, TEID Range Indication */
3223 proto_tree_add_item_ret_uint(tree, hf_pfcp_upiri_teidri, tvb, offset, 1, ENC_BIG_ENDIAN, &upiri_teid_range);
3226 if (upiri_teid_range > 0)
3228 /* Octet 6 TEID Range */
3229 proto_tree_add_item(tree, hf_pfcp_upiri_teid_range, tvb, offset, 1, ENC_BIG_ENDIAN);
3233 if ((upiri_flags_val & 0x1) == 1) {
3234 /* m to (m+3) IPv4 address */
3235 proto_tree_add_item(tree, hf_pfcp_upiri_ipv4, tvb, offset, 4, ENC_BIG_ENDIAN);
3238 if ((upiri_flags_val & 0x2) == 2) {
3239 /* p to (p+15) IPv6 address */
3240 proto_tree_add_item(tree, hf_pfcp_upiri_ipv6, tvb, offset, 16, ENC_NA);
3243 if ((upiri_flags_val & 0x20) == 32) {
3244 /* k to (l) Network Instance */
3245 proto_tree_add_item(tree, hf_pfcp_upiri_network_instance, tvb, offset, length - offset, ENC_NA);
3249 if (offset < length) {
3250 proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
3255 /* Array of functions to dissect IEs
3256 * (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type)
3258 typedef struct _pfcp_ie {
3259 void(*decode) (tvbuff_t *, packet_info *, proto_tree *, proto_item *, guint16, guint8);
3262 static const pfcp_ie_t pfcp_ies[] = {
3263 /* 0 */ { dissect_pfcp_reserved },
3264 /* 1 */ { dissect_pfcp_create_pdr }, /* Create PDR Extendable / Table 7.5.2.2-1 */
3265 /* 2 */ { dissect_pfcp_pdi }, /* PDI Extendable / Table 7.5.2.2-2 */
3266 /* 3 */ { dissect_pfcp_create_far }, /* Create FAR Extendable / Table 7.5.2.3-1 */
3267 /* 4 */ { dissect_pfcp_forwarding_parameters }, /* Forwarding Parameters Extendable / Table 7.5.2.3-2 */
3268 /* 5 */ { dissect_pfcp_duplicating_parameters }, /* Duplicating Parameters Extendable / Table 7.5.2.3-3 */
3269 /* 6 */ { dissect_pfcp_create_urr }, /* Create URR Extendable / Table 7.5.2.4-1 */
3270 /* 7 */ { dissect_pfcp_create_qer }, /* Create QER Extendable / Table 7.5.2.5-1 */
3271 /* 8 */ { dissect_pfcp_created_pdr }, /* Created PDR Extendable / Table 7.5.3.2-1 */
3272 /* 9 */ { dissect_pfcp_update_pdr }, /* Update PDR Extendable / Table 7.5.4.2-1 */
3273 /* 10 */ { dissect_pfcp_update_far }, /* Update FAR Extendable / Table 7.5.4.3-1 */
3274 /* 11 */ { dissect_pfcp_upd_forwarding_param }, /* Update Forwarding Parameters Extendable / Table 7.5.4.3-2 */
3275 /* 12 */ { dissect_pfcp_update_bar }, /* Update BAR (Sx Session Report Response) Extendable / Table 7.5.9.2-1 */
3276 /* 13 */ { dissect_pfcp_update_urr }, /* Update URR Extendable / Table 7.5.4.4 */
3277 /* 14 */ { dissect_pfcp_update_qer }, /* Update QER Extendable / Table 7.5.4.5 */
3278 /* 15 */ { dissect_pfcp_remove_pdr }, /* Remove PDR Extendable / Table 7.5.4.6 */
3279 /* 16 */ { dissect_pfcp_remove_far }, /* Remove FAR Extendable / Table 7.5.4.7 */
3280 /* 17 */ { dissect_pfcp_remove_urr }, /* Remove URR Extendable / Table 7.5.4.8 */
3281 /* 18 */ { dissect_pfcp_remove_qer }, /* Remove QER Extendable / Table 7.5.4.9 */
3282 /* 19 */ { dissect_pfcp_cause }, /* Cause Fixed / Subclause 8.2.1 */
3283 /* 20 */ { dissect_pfcp_source_interface }, /* Source Interface Extendable / Subclause 8.2.2 */
3284 /* 21 */ { dissect_pfcp_f_teid }, /* F-TEID Extendable / Subclause 8.2.3 */
3285 /* 22 */ { dissect_pfcp_network_instance }, /* Network Instance Variable Length / Subclause 8.2.4 */
3286 /* 23 */ { dissect_pfcp_sdf_filter }, /* SDF Filter Extendable / Subclause 8.2.5 */
3287 /* 24 */ { dissect_pfcp_application_id }, /* Application ID Variable Length / Subclause 8.2.6 */
3288 /* 25 */ { dissect_pfcp_gate_status }, /* Gate Status Extendable / Subclause 8.2.7 */
3289 /* 26 */ { dissect_pfcp_mbr }, /* MBR Extendable / Subclause 8.2.8 */
3290 /* 27 */ { dissect_pfcp_gbr }, /* GBR Extendable / Subclause 8.2.9 */
3291 /* 28 */ { dissect_pfcp_qer_correlation_id }, /* QER Correlation ID Extendable / Subclause 8.2.10 */
3292 /* 29 */ { dissect_pfcp_precedence }, /* Precedence Extendable / Subclause 8.2.11 */
3293 /* 30 */ { dissect_pfcp_transport_level_marking }, /* Transport Level Marking Extendable / Subclause 8.2.12 */
3294 /* 31 */ { dissect_pfcp_volume_threshold }, /* Volume Threshold Extendable /Subclause 8.2.13 */
3295 /* 32 */ { dissect_pfcp_time_threshold }, /* Time Threshold Extendable /Subclause 8.2.14 */
3296 /* 33 */ { dissect_pfcp_monitoring_time }, /* Monitoring Time Extendable /Subclause 8.2.15 */
3297 /* 34 */ { dissect_pfcp_subseq_volume_threshold }, /* Subsequent Volume Threshold Extendable /Subclause 8.2.16 */
3298 /* 35 */ { dissect_pfcp_subsequent_time_threshold }, /* Subsequent Time Threshold Extendable /Subclause 8.2.17 */
3299 /* 36 */ { dissect_pfcp_inactivity_detection_time }, /* Inactivity Detection Time Extendable /Subclause 8.2.18 */
3300 /* 37 */ { dissect_pfcp_reporting_triggers }, /* Reporting Triggers Extendable /Subclause 8.2.19 */
3301 /* 38 */ { dissect_pfcp_redirect_information }, /* Redirect Information Extendable /Subclause 8.2.20 */
3302 /* 39 */ { dissect_pfcp_report_type }, /* Report Type Extendable / Subclause 8.2.21 */
3303 /* 40 */ { dissect_pfcp_offending_ie }, /* Offending IE Fixed / Subclause 8.2.22 */
3304 /* 41 */ { dissect_pfcp_forwarding_policy }, /* Forwarding Policy Extendable / Subclause 8.2.23 */
3305 /* 42 */ { dissect_pfcp_destination_interface }, /* Destination Interface Extendable / Subclause 8.2.24 */
3306 /* 43 */ { dissect_pfcp_up_function_features }, /* UP Function Features Extendable / Subclause 8.2.25 */
3307 /* 44 */ { dissect_pfcp_apply_action }, /* Apply Action Extendable / Subclause 8.2.26 */
3308 /* 45 */ { dissect_pfcp_dl_data_service_inf }, /* Downlink Data Service Information Extendable / Subclause 8.2.27 */
3309 /* 46 */ { dissect_pfcp_dl_data_notification_delay }, /* Downlink Data Notification Delay Extendable / Subclause 8.2.28 */
3310 /* 47 */ { dissect_pfcp_dl_buffering_dur }, /* DL Buffering Duration Extendable / Subclause 8.2.29 */
3311 /* 48 */ { dissect_pfcp_dl_buffering_suggested_packet_count }, /* DL Buffering Suggested Packet Count Variable / Subclause 8.2.30 */
3312 /* 49 */ { dissect_pfcp_sxsmreq_flags }, /* SxSMReq-Flags Extendable / Subclause 8.2.31 */
3313 /* 50 */ { dissect_pfcp_sxsrrsp_flags }, /* SxSRRsp-Flags Extendable / Subclause 8.2.32 */
3314 /* 51 */ { dissect_pfcp_load_control_information }, /* Load Control Information Extendable / Table 7.5.3.3-1 */
3315 /* 52 */ { dissect_pfcp_sequence_number }, /* Sequence Number Fixed Length / Subclause 8.2.33 */
3316 /* 53 */ { dissect_pfcp_metric }, /* Metric Fixed Length / Subclause 8.2.34 */
3317 /* 54 */ { dissect_pfcp_overload_control_information }, /* Overload Control Information Extendable / Table 7.5.3.4-1 */
3318 /* 55 */ { dissect_pfcp_timer }, /* Timer Extendable / Subclause 8.2 35 */
3319 /* 56 */ { dissect_pfcp_pdr_id }, /* Packet Detection Rule ID Extendable / Subclause 8.2 36 */
3320 /* 57 */ { dissect_pfcp_f_seid }, /* F-SEID Extendable / Subclause 8.2 37 */
3321 /* 58 */ { dissect_pfcp_application_ids_pfds }, /* Application ID's PFDs Extendable / Table 7.4.3.1-2 */
3322 /* 59 */ { dissect_pfcp_pfd_context }, /* PFD context Extendable / Table 7.4.3.1-3 */
3323 /* 60 */ { dissect_pfcp_node_id }, /* Node ID Extendable / Subclause 8.2.38 */
3324 /* 61 */ { dissect_pfcp_pfd_contents }, /* PFD contents Extendable / Subclause 8.2.39 */
3325 /* 62 */ { dissect_pfcp_measurement_method }, /* Measurement Method Extendable / Subclause 8.2.40 */
3326 /* 63 */ { dissect_pfcp_usage_report_trigger }, /* Usage Report Trigger Extendable / Subclause 8.2.41 */
3327 /* 64 */ { dissect_pfcp_measurement_period }, /* Measurement Period Extendable / Subclause 8.2.42 */
3328 /* 65 */ { dissect_pfcp_fq_csid }, /* FQ-CSID Extendable / Subclause 8.2.43 */
3329 /* 66 */ { dissect_pfcp_volume_measurement }, /* Volume Measurement Extendable / Subclause 8.2.44 */
3330 /* 67 */ { dissect_pfcp_duration_measurement }, /* Duration Measurement Extendable / Subclause 8.2.45 */
3331 /* 68 */ { dissect_pfcp_application_detection_inf }, /* Application Detection Information Extendable / Table 7.5.8.3-2 */
3332 /* 69 */ { dissect_pfcp_time_of_first_packet }, /* Time of First Packet Extendable / Subclause 8.2.46 */
3333 /* 70 */ { dissect_pfcp_time_of_last_packet }, /* Time of Last Packet Extendable / Subclause 8.2.47 */
3334 /* 71 */ { dissect_pfcp_quota_holding_time }, /* Quota Holding Time Extendable / Subclause 8.2.48 */
3335 /* 72 */ { dissect_pfcp_dropped_dl_traffic_threshold }, /* Dropped DL Traffic Threshold Extendable / Subclause 8.2.49 */
3336 /* 73 */ { dissect_pfcp_volume_quota }, /* Volume Quota Extendable / Subclause 8.2.50 */
3337 /* 74 */ { dissect_pfcp_time_quota }, /* Time Quota Extendable / Subclause 8.2.51 */
3338 /* 75 */ { dissect_pfcp_start_time }, /* Start Time Extendable / Subclause 8.2.52 */
3339 /* 76 */ { dissect_pfcp_end_time }, /* End Time Extendable / Subclause 8.2.53 */
3340 /* 77 */ { dissect_pfcp_pfcp_query_urr }, /* Query URR Extendable / Table 7.5.4.10-1 */
3341 /* 78 */ { dissect_pfcp_usage_report_smr }, /* Usage Report (in Session Modification Response) Extendable / Table 7.5.5.2-1 */
3342 /* 79 */ { dissect_pfcp_usage_report_sdr }, /* Usage Report (Session Deletion Response) Extendable / Table 7.5.7.2-1 */
3343 /* 80 */ { dissect_pfcp_usage_report_srr }, /* Usage Report (Session Report Request) Extendable / Table 7.5.8.3-1 */
3344 /* 81 */ { dissect_pfcp_urr_id }, /* URR ID Extendable / Subclause 8.2.54 */
3345 /* 82 */ { dissect_pfcp_linked_urr_id }, /* Linked URR ID Extendable / Subclause 8.2.55 */
3346 /* 83 */ { dissect_pfcp_downlink_data_report }, /* Downlink Data Report Extendable / Table 7.5.8.2-1 */
3347 /* 84 */ { dissect_pfcp_outer_header_creation }, /* Outer Header Creation Extendable / Subclause 8.2.56 */
3348 /* 85 */ { dissect_pfcp_create_bar }, /* Create BAR Extendable / Table 7.5.2.6-1 */
3349 /* 86 */ { dissect_pfcp_update_bar_smr }, /* Update BAR (Session Modification Request) Extendable / Table 7.5.4.11-1 */
3350 /* 87 */ { dissect_pfcp_remove_bar }, /* Remove BAR Extendable / Table 7.5.4.12-1 */
3351 /* 88 */ { dissect_pfcp_bar_id }, /* BAR ID Extendable / Subclause 8.2.57 */
3352 /* 89 */ { dissect_pfcp_cp_function_features }, /* CP Function Features Extendable / Subclause 8.2.58 */
3353 /* 90 */ { dissect_pfcp_usage_information }, /* Usage Information Extendable / Subclause 8.2.59 */
3354 /* 91 */ { dissect_pfcp_application_instance_id }, /* Application Instance ID Variable Length / Subclause 8.2.60 */
3355 /* 92 */ { dissect_pfcp_flow_inf }, /* Flow Information Extendable / Subclause 8.2.61 */
3356 /* 93 */ { dissect_pfcp_ue_ip_address }, /* UE IP Address Extendable / Subclause 8.2.62 */
3357 /* 94 */ { dissect_pfcp_packet_rate }, /* Packet Rate Extendable / Subclause 8.2.63 */
3358 /* 95 */ { dissect_pfcp_outer_hdr_rem }, /* Outer Header Removal Extendable / Subclause 8.2.64 */
3359 /* 96 */ { dissect_pfcp_recovery_time_stamp }, /* Recovery Time Stamp Extendable / Subclause 8.2.65 */
3360 /* 97 */ { dissect_pfcp_dl_flow_level_marking }, /* DL Flow Level Marking Extendable / Subclause 8.2.66 */
3361 /* 98 */ { dissect_pfcp_header_enrichment }, /* Header Enrichment Extendable / Subclause 8.2.67 */
3362 /* 99 */ { dissect_pfcp_error_indication_report }, /* Error Indication Report Extendable / Table 7.5.8.4-1 */
3363 /* 100 */ { dissect_pfcp_measurement_info }, /* Measurement Information Extendable / Subclause 8.2.68 */
3364 /* 101 */ { dissect_pfcp_node_report_type }, /* Node Report Type Extendable / Subclause 8.2.69 */
3365 /* 102 */ { dissect_pfcp_user_plane_path_failure_report }, /* User Plane Path Failure Report Extendable / Table 7.4.5.1.2-1 */
3366 /* 103 */ { dissect_pfcp_remote_gtp_u_peer }, /* Remote GTP-U Peer Extendable / Subclause 8.2.70 */
3367 /* 104 */ { dissect_pfcp_ur_seqn }, /* UR-SEQN Fixed Length / Subclause 8.2.71 */
3368 /* 105 */ { dissect_pfcp_update_duplicating_parameters }, /* Update Duplicating Parameters Extendable / Table 7.5.4.3-3 */
3369 /* 106 */ { dissect_pfcp_act_predef_rules }, /* Activate Predefined Rules Variable Length / Subclause 8.2.72 */
3370 /* 107 */ { dissect_pfcp_deact_predef_rules }, /* Deactivate Predefined Rules Variable Length / Subclause 8.2.73 */
3371 /* 108 */ { dissect_pfcp_far_id }, /* FAR ID Extendable / Subclause 8.2.74 */
3372 /* 109 */ { dissect_pfcp_qer_id }, /* QER ID Extendable / Subclause 8.2.75 */
3373 /* 110 */ { dissect_pfcp_oci_flags }, /* OCI Flags Extendable / Subclause 8.2.76 */
3374 /* 111 */ { dissect_pfcp_sx_assoc_rel_req }, /* Sx Association Release Request Extendable / Subclause 8.2.77 */
3375 /* 112 */ { dissect_pfcp_graceful_release_period }, /* Graceful Release Period Extendable / Subclause 8.2.78 */
3376 /* 113 */ { dissect_pfcp_pdn_type }, /* PDN Type Fixed Length / Subclause 8.2.79 */
3377 /* 114 */ { dissect_pfcp_failed_rule_id }, /* Failed Rule ID Extendable / Subclause 8.2.80 */
3378 /* 115 */ { dissect_pfcp_time_qouta_mechanism }, /* Time Quota Mechanism Extendable / Subclause 8.2.81 */
3379 /* 116 */ { dissect_pfcp_user_plane_ip_resource_infomation }, /* User Plane IP Resource Information Extendable / Subclause 8.2.82 */
3380 { NULL }, /* End of List */
3383 #define NUM_PFCP_IES (sizeof(pfcp_ies)/sizeof(pfcp_ie_t))
3384 /* Set up the array to hold "etts" for each IE*/
3385 gint ett_pfcp_elem[NUM_PFCP_IES-1];
3387 /* 7.2.3.3 Grouped Information Elements */
3390 dissect_pfcp_grouped_ie(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type, int ett_index)
3394 proto_tree *grouped_tree;
3396 proto_item_append_text(item, "[Grouped IE]");
3397 grouped_tree = proto_item_add_subtree(tree, ett_index);
3399 new_tvb = tvb_new_subset_length(tvb, offset, length);
3400 dissect_pfcp_ies_common(new_tvb, pinfo, grouped_tree, 0, message_type);
3405 dissect_pfcp_pdi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type)
3407 dissect_pfcp_grouped_ie(tvb, pinfo, tree, item, length, message_type, ett_pfcp_elem[PFCP_IE_ID_PDI]);
3411 dissect_pfcp_create_pdr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type)
3413 dissect_pfcp_grouped_ie(tvb, pinfo, tree, item, length, message_type, ett_pfcp_elem[PFCP_IE_ID_CREATE_PDR]);
3417 dissect_pfcp_create_far(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type)
3419 dissect_pfcp_grouped_ie(tvb, pinfo, tree, item, length, message_type, ett_pfcp_elem[PFCP_IE_CREATE_FAR]);
3423 dissect_pfcp_forwarding_parameters(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type)
3425 dissect_pfcp_grouped_ie(tvb, pinfo, tree, item, length, message_type, ett_pfcp_elem[PFCP_IE_FORWARDING_PARAMETERS]);
3429 dissect_pfcp_duplicating_parameters(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type)
3431 dissect_pfcp_grouped_ie(tvb, pinfo, tree, item, length, message_type, ett_pfcp_elem[PFCP_IE_DUPLICATING_PARAMETERS]);
3435 dissect_pfcp_create_urr(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_CREATE_URR]);
3441 dissect_pfcp_create_qer(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_CREATE_QER]);
3447 dissect_pfcp_created_pdr(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_CREATED_PDR]);
3453 dissect_pfcp_update_pdr(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_UPDATE_PDR]);
3459 dissect_pfcp_update_far(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_UPDATE_FAR]);
3465 dissect_pfcp_upd_forwarding_param(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_UPD_FORWARDING_PARAM]);
3471 dissect_pfcp_update_bar(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_UPDATE_BAR]);
3477 dissect_pfcp_update_urr(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_UPDATE_URR]);
3483 dissect_pfcp_update_qer(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_QER]);
3489 dissect_pfcp_remove_pdr(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_REMOVE_PDR]);
3495 dissect_pfcp_remove_far(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_REMOVE_FAR]);
3501 dissect_pfcp_remove_urr(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_REMOVE_URR]);
3507 dissect_pfcp_remove_qer(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_REMOVE_QER]);
3513 dissect_pfcp_load_control_information(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_LOAD_CONTROL_INFORMATION]);
3519 dissect_pfcp_overload_control_information(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_OVERLOAD_CONTROL_INFORMATION]);
3525 dissect_pfcp_application_ids_pfds(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_APPLICATION_IDS_PFDS]);
3531 dissect_pfcp_pfd_context(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_PFD_CONTEXT]);
3538 dissect_pfcp_application_detection_inf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type)
3540 dissect_pfcp_grouped_ie(tvb, pinfo, tree, item, length, message_type, ett_pfcp_elem[PFCP_APPLICATION_DETECTION_INF]);
3544 dissect_pfcp_pfcp_query_urr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type)
3546 dissect_pfcp_grouped_ie(tvb, pinfo, tree, item, length, message_type, ett_pfcp_elem[PFCP_QUERY_URR]);
3550 dissect_pfcp_usage_report_smr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type)
3552 dissect_pfcp_grouped_ie(tvb, pinfo, tree, item, length, message_type, ett_pfcp_elem[PFCP_USAGE_REPORT_SMR]);
3556 dissect_pfcp_usage_report_sdr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type)
3558 dissect_pfcp_grouped_ie(tvb, pinfo, tree, item, length, message_type, ett_pfcp_elem[PFCP_USAGE_REPORT_SDR]);
3562 dissect_pfcp_usage_report_srr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type)
3564 dissect_pfcp_grouped_ie(tvb, pinfo, tree, item, length, message_type, ett_pfcp_elem[PFCP_USAGE_REPORT_SRR]);
3568 dissect_pfcp_downlink_data_report(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_DOWNLINK_DATA_REPORT]);
3574 dissect_pfcp_create_bar(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_CREATE_BAR]);
3580 dissect_pfcp_update_bar_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_UPDATE_BAR_SMR]);
3586 dissect_pfcp_remove_bar(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_REMOVE_BAR]);
3592 dissect_pfcp_error_indication_report(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_ERROR_INDICATION_REPORT]);
3598 dissect_pfcp_user_plane_path_failure_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_USER_PLANE_PATH_FAILURE_REPORT]);
3604 dissect_pfcp_update_duplicating_parameters(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_UPDATE_DUPLICATING_PARAMETERS]);
3611 dissect_pfcp_ies_common(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, gint offset, guint8 message_type)
3613 proto_tree *ie_tree;
3616 guint16 type, length, enterprise_type;
3617 guint16 enterprise_id;
3619 /* 8.1.1 Information Element Format */
3621 Octets 8 7 6 5 4 3 2 1
3622 1 to 2 Type = xxx (decimal)
3624 p to (p+1) Enterprise ID
3625 k to (n+4) IE specific data or content of a grouped IE
3627 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.
3628 If Bit 8 of Octet 1 is set, this indicates that the IE is defined by a vendor and the Enterprise ID is present
3629 identified by the Enterprise ID
3632 /*Enterprise ID : if the IE type value is within the range of 32768 to 65535,
3633 * this field shall contain the IANA - assigned "SMI Network Management Private Enterprise Codes"
3634 * value of the vendor defining the IE.
3636 /* Length: this field contains the length of the IE excluding the first four octets, which are common for all IEs */
3638 /* Process the IEs*/
3639 while (offset < (gint)tvb_reported_length(tvb)) {
3641 type = tvb_get_ntohs(tvb, offset);
3642 length = tvb_get_ntohs(tvb, offset + 2);
3644 if ((type & 0x8000) == 0x8000 ) {
3645 enterprise_id = tvb_get_ntohs(tvb, offset + 4);
3646 enterprise_type = (type & 0x8000);
3647 ie_tree = proto_tree_add_subtree_format(tree, tvb, offset, 4 + length, ett_pfcp_ie, &ti, "Enterprise %s specific IE: %u",
3648 try_enterprises_lookup(enterprise_id),
3651 proto_tree_add_item(ie_tree, hf_pfcp2_enterprise_ie, tvb, offset, 2, ENC_BIG_ENDIAN);
3654 proto_tree_add_item(ie_tree, hf_pfcp2_ie_len, tvb, offset, 2, ENC_BIG_ENDIAN);
3657 /* Bit 8 of Octet 1 is set, this indicates that the IE is defined by a vendor and the Enterprise ID is present */
3658 proto_tree_add_item(ie_tree, hf_pfcp_enterprice_id, tvb, offset, 2, ENC_BIG_ENDIAN);
3660 /* give the whole IE to the subdissector */
3661 ie_tvb = tvb_new_subset_length(tvb, offset-4, length);
3662 dissector_try_uint_new(pfcp_enterprise_ies_dissector_table, enterprise_id, ie_tvb, pinfo, ie_tree, FALSE, ti);
3666 if (type < (NUM_PFCP_IES - 1)) {
3667 tmp_ett = ett_pfcp_elem[type];
3669 tmp_ett = ett_pfcp_ie;
3671 ie_tree = proto_tree_add_subtree_format(tree, tvb, offset, 4 + length, tmp_ett, &ti, "%s : ",
3672 val_to_str_ext_const(type, &pfcp_ie_type_ext, "Unknown"));
3674 proto_tree_add_item(ie_tree, hf_pfcp2_ie, tvb, offset, 2, ENC_BIG_ENDIAN);
3676 proto_tree_add_item(ie_tree, hf_pfcp2_ie_len, tvb, offset, 2, ENC_BIG_ENDIAN);
3678 if (type < (NUM_PFCP_IES -1)) {
3679 ie_tvb = tvb_new_subset_length(tvb, offset, length);
3680 if(pfcp_ies[type].decode){
3681 (*pfcp_ies[type].decode) (ie_tvb, pinfo, ie_tree, ti, length, message_type);
3683 /* NULL function pointer, we have no decoding function*/
3684 proto_tree_add_expert(ie_tree, pinfo, &ei_pfcp_ie_not_decoded_null, tvb, offset, length);
3687 /* IE id outside of array, We have no decoding function for it */
3688 proto_tree_add_expert(ie_tree, pinfo, &ei_pfcp_ie_not_decoded_to_large, tvb, offset, length);
3697 dissect_pfcp(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void *data _U_)
3700 proto_tree *sub_tree;
3703 guint8 message_type;
3706 static const int * pfcp_hdr_flags[] = {
3716 col_set_str(pinfo->cinfo, COL_PROTOCOL, "PFCP");
3717 col_clear(pinfo->cinfo, COL_INFO);
3719 message_type = tvb_get_guint8(tvb, 1);
3720 col_set_str(pinfo->cinfo, COL_INFO, val_to_str_ext_const(message_type, &pfcp_message_type_ext, "Unknown"));
3722 item = proto_tree_add_item(tree, proto_pfcp, tvb, 0, -1, ENC_NA);
3723 sub_tree = proto_item_add_subtree(item, ett_pfcp);
3725 /* 7.2.2 Message Header */
3727 Octet 8 7 6 5 4 3 2 1
3728 1 | Version |Spare|Spare|Spare| MP | S |
3730 3 | Message Length (1st Octet) |
3731 4 | Message Length (2nd Octet) |
3732 m to | If S flag is set to 1, then SEID shall be |
3733 k(m+7) | placed into octets 5-12. Otherwise, SEID field |
3734 | is not present at all. |
3735 n to | Sequence Number |
3741 proto_tree_add_bitmask_with_flags_ret_uint64(sub_tree, tvb, offset, hf_pfcp_hdr_flags,
3742 ett_pfcp_flags, pfcp_hdr_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT, &pfcp_flags);
3745 /* Octet 2 Message Type */
3746 proto_tree_add_item(sub_tree, hf_pfcp_msg_type, tvb, offset, 1, ENC_BIG_ENDIAN);
3749 /* Octet 3 - 4 Message Length */
3750 proto_tree_add_item_ret_uint(sub_tree, hf_pfcp_msg_length, tvb, offset, 2, ENC_BIG_ENDIAN, &length);
3753 if ((pfcp_flags & 0x1) == 1) {
3754 /* If S flag is set to 1, then SEID shall be placed into octets 5-12*/
3755 /* Session Endpoint Identifier 8 Octets */
3756 proto_tree_add_item(sub_tree, hf_pfcp_seid, tvb, offset, 8, ENC_BIG_ENDIAN);
3759 /* 7.2.2.2 PFCP Header for Node Related Messages */
3761 Octet 8 7 6 5 4 3 2 1
3762 1 | Version |Spare|Spare|Spare| MP=0 | S=0 |
3764 3 | Message Length (1st Octet) |
3765 4 | Message Length (2nd Octet) |
3766 5 | Sequence Number (1st Octet) |
3767 6 | Sequence Number (2st Octet) |
3768 7 | Sequence Number (3st Octet) |
3771 proto_tree_add_item(sub_tree, hf_pfcp_seqno, tvb, offset, 3, ENC_BIG_ENDIAN);
3773 if ((pfcp_flags & 0x2) == 0x2) {
3774 /* If the "MP" flag is set to "1", then bits 8 to 5 of octet 16 shall indicate the message priority.*/
3775 proto_tree_add_item(sub_tree, hf_pfcp_mp, tvb, offset, 1, ENC_BIG_ENDIAN);
3776 proto_tree_add_item(sub_tree, hf_pfcp_spare_h0, tvb, offset, 1, ENC_BIG_ENDIAN);
3778 proto_tree_add_item(sub_tree, hf_pfcp_spare_oct, tvb, offset, 1, ENC_BIG_ENDIAN);
3782 /* Dissect the IEs in the message */
3783 dissect_pfcp_ies_common(tvb, pinfo, sub_tree, offset, message_type);
3785 return tvb_reported_length(tvb);
3788 /* Enterprise IE decoding 3GPP */
3790 dissect_pfcp_3gpp_enterprise_ies(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
3792 proto_item *top_item = (proto_item *)data;
3793 /* We are give the complete ie, but the first 6 octets are dissected in the pfcp dissector*/
3794 proto_item_append_text(top_item, " Enterprise ID set to '10415' shall not be used for the vendor specific IEs.");
3795 proto_tree_add_expert(tree, pinfo, &ei_pfcp_enterprise_ie_3gpp, tvb, 0, -1);
3797 return tvb_reported_length(tvb);
3801 proto_register_pfcp(void)
3804 static hf_register_info hf_pfcp[] = {
3806 { &hf_pfcp_msg_type,
3807 { "Message Type", "pfcp.msg_type",
3808 FT_UINT8, BASE_DEC | BASE_EXT_STRING, &pfcp_message_type_ext, 0x0,
3811 { &hf_pfcp_msg_length,
3812 { "Length", "pfcp.length",
3813 FT_UINT8, BASE_DEC, NULL, 0x0,
3816 { &hf_pfcp_hdr_flags,
3817 { "Flags", "pfcp.flags",
3818 FT_UINT8, BASE_HEX, NULL, 0x0,
3822 { "Version", "pfcp.version",
3823 FT_UINT8, BASE_DEC, NULL, 0xe0,
3827 { "MP", "pfcp.mp_flag",
3828 FT_BOOLEAN, 8, NULL, 0x02,
3833 FT_BOOLEAN, 8, NULL, 0x01,
3836 { &hf_pfcp_spare_b2,
3837 { "Spare", "pfcp.spare_b2",
3838 FT_UINT8, BASE_DEC, NULL, 0x04,
3841 { &hf_pfcp_spare_b3,
3842 { "Spare", "pfcp.spare_b3",
3843 FT_UINT8, BASE_DEC, NULL, 0x08,
3846 { &hf_pfcp_spare_b4,
3847 { "Spare", "pfcp.spare_b4",
3848 FT_UINT8, BASE_DEC, NULL, 0x10,
3851 { &hf_pfcp_spare_b5,
3852 { "Spare", "pfcp.spare_b5",
3853 FT_UINT8, BASE_DEC, NULL, 0x20,
3856 { &hf_pfcp_spare_b6,
3857 { "Spare", "pfcp.spare_b6",
3858 FT_UINT8, BASE_DEC, NULL, 0x40,
3861 { &hf_pfcp_spare_b7,
3862 { "Spare", "pfcp.spare_b7",
3863 FT_UINT8, BASE_DEC, NULL, 0x80,
3866 { &hf_pfcp_spare_b7_b6,
3867 { "Spare", "pfcp.spare_b7_b6",
3868 FT_UINT8, BASE_DEC, NULL, 0xc0,
3871 { &hf_pfcp_spare_b7_b5,
3872 { "Spare", "pfcp.spare_b7_b5",
3873 FT_UINT8, BASE_DEC, NULL, 0xe0,
3876 { &hf_pfcp_spare_b7_b4,
3877 { "Spare", "pfcp.spare_b7_b4",
3878 FT_UINT8, BASE_DEC, NULL, 0xf0,
3881 { &hf_pfcp_spare_b7_b3,
3882 { "Spare", "pfcp.spare_b7_b3",
3883 FT_UINT8, BASE_DEC, NULL, 0xf8,
3886 { &hf_pfcp_spare_b7_b2,
3887 { "Spare", "pfcp.spare_b7_b2",
3888 FT_UINT8, BASE_DEC, NULL, 0xfc,
3891 { &hf_pfcp_spare_b7_b1,
3892 { "Spare", "pfcp.spare_b7_b1",
3893 FT_UINT8, BASE_DEC, NULL, 0xfe,
3896 { &hf_pfcp_spare_oct,
3897 { "Spare", "pfcp.spare_oct",
3898 FT_UINT8, BASE_DEC, NULL, 0x0,
3901 { &hf_pfcp_spare_h0,
3902 { "Spare", "pfcp.spare_h0",
3903 FT_UINT8, BASE_DEC, NULL, 0x0f,
3906 { &hf_pfcp_spare_h1,
3907 { "Spare", "pfcp.spare_h1",
3908 FT_UINT8, BASE_DEC, NULL, 0xf0,
3912 { "Spare", "pfcp.spare",
3913 FT_UINT8, BASE_DEC, NULL, 0x0,
3917 { "SEID", "pfcp.seid",
3918 FT_UINT64, BASE_HEX, NULL, 0x0,
3922 { "Sequence Number", "pfcp.seqno",
3923 FT_UINT24, BASE_DEC, NULL, 0x0,
3927 { "Message Priority", "pfcp.mp",
3928 FT_UINT24, BASE_DEC, NULL, 0xf0,
3931 { &hf_pfcp_enterprice_id,
3932 { "Enterprise ID", "pfcp.enterprice_id",
3933 FT_UINT16, BASE_ENTERPRISES, STRINGS_ENTERPRISES,
3934 0x0, NULL, HFILL } },
3936 { "IE Type", "pfcp.ie_type",
3937 FT_UINT16, BASE_DEC | BASE_EXT_STRING, &pfcp_ie_type_ext, 0x0,
3940 { &hf_pfcp2_enterprise_ie,
3941 { "Enterprise specific IE Type", "pfcp.enterprise_ie",
3942 FT_UINT16, BASE_DEC, NULL, 0x7fff,
3946 { "IE Length", "pfcp.ie_len",
3947 FT_UINT16, BASE_DEC, NULL, 0x0,
3950 { &hf_pfcp_recovery_time_stamp,
3951 { "Recovery Time Stamp", "pfcp.recovery_time_stamp",
3952 FT_STRING, BASE_NONE, NULL, 0,
3956 { "Cause", "pfcp.cause",
3957 FT_UINT8, BASE_DEC, VALS(pfcp_cause_vals), 0x0,
3960 { &hf_pfcp_node_id_type,
3961 { "Node ID Type", "pfcp.node_id_type",
3962 FT_UINT8, BASE_DEC, VALS(pfcp_node_id_type_vals), 0x0f,
3965 { &hf_pfcp_node_id_ipv4,
3966 { "Node ID IPv4", "pfcp.node_id_ipv4",
3967 FT_IPv4, BASE_NONE, NULL, 0x0,
3970 { &hf_pfcp_node_id_ipv6,
3971 { "Node ID IPv6", "pfcp.node_id_ipv6",
3972 FT_IPv6, BASE_NONE, NULL, 0x0,
3975 { &hf_pfcp_node_id_fqdn,
3976 { "Node ID FQDN", "pfcp.node_id_fqdn",
3977 FT_STRING, BASE_NONE, NULL, 0x0,
3980 { &hf_pfcp_f_seid_flags,
3981 { "Flags", "pfcp.f_seid_flags",
3982 FT_UINT8, BASE_HEX, NULL, 0x0,
3986 { "V6 (IPv6)", "pfcp.f_seid_flags.v6",
3987 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x01,
3991 { "V4 (IPv4)", "pfcp.f_seid_flags.v4",
3992 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x02,
3995 { &hf_pfcp_f_seid_ipv4,
3996 { "IPv4 address", "pfcp.f_seid.ipv4",
3997 FT_IPv4, BASE_NONE, NULL, 0x0,
4000 { &hf_pfcp_f_seid_ipv6,
4001 { "IPv6 address", "pfcp.f_seid.ipv6",
4002 FT_IPv6, BASE_NONE, NULL, 0x0,
4006 { "Rule ID", "pfcp.pdr_id",
4007 FT_UINT16, BASE_DEC, NULL, 0x0,
4010 { &hf_pfcp_precedence,
4011 { "Precedence", "pfcp.precedence",
4012 FT_UINT16, BASE_DEC, NULL, 0x0,
4015 { &hf_pfcp_source_interface,
4016 { "Source Interface", "pfcp.source_interface",
4017 FT_UINT8, BASE_DEC, VALS(pfcp_source_interface_vals), 0x0f,
4020 { &hf_pfcp_f_teid_flags,
4021 { "Flags", "pfcp.f_teid_flags",
4022 FT_UINT8, BASE_HEX, NULL, 0x0,
4025 { &hf_pfcp_fteid_flg_spare,
4026 { "Spare", "pfcp.fteid_flg.spare",
4027 FT_UINT8, BASE_DEC, NULL, 0xf0,
4030 { &hf_pfcp_fteid_flg_b3_ch_id,
4031 { "CHID (CHOOSE_ID)", "pfcp.f_teid_flags.ch_id",
4032 FT_BOOLEAN, 8, NULL, 0x08,
4035 { &hf_pfcp_fteid_flg_b2_ch,
4036 { "CH (CHOOSE)", "pfcp.f_teid_flags.ch",
4037 FT_BOOLEAN, 8, NULL, 0x04,
4040 { &hf_pfcp_fteid_flg_b1_v6,
4041 { "V6 (IPv6)", "pfcp.f_teid_flags.v6",
4042 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x02,
4045 { &hf_pfcp_fteid_flg_b0_v4,
4046 { "V4 (IPv4)", "pfcp.f_teid_flags.v4",
4047 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x01,
4050 { &hf_pfcp_f_teid_ch_id,
4051 { "Choose Id", "pfcp.f_teid.choose_id",
4052 FT_BYTES, BASE_NONE, NULL, 0x0,
4055 { &hf_pfcp_f_teid_teid,
4056 { "TEID", "pfcp.f_teid.teid",
4057 FT_UINT32, BASE_HEX, NULL, 0x0,
4060 { &hf_pfcp_f_teid_ipv4,
4061 { "IPv4 address", "pfcp.f_teid.ipv4_addr",
4062 FT_IPv4, BASE_NONE, NULL, 0x0,
4065 { &hf_pfcp_f_teid_ipv6,
4066 { "IPv6 address", "pfcp.f_teid.ipv6_addr",
4067 FT_IPv6, BASE_NONE, NULL, 0x0,
4070 { &hf_pfcp_network_instance,
4071 { "Network Instance", "pfcp.network_instance",
4072 FT_BYTES, BASE_NONE, NULL, 0x0,
4075 { &hf_pfcp_pdn_type,
4076 { "PDN Type", "pfcp.pdn_type",
4077 FT_UINT8, BASE_DEC, VALS(pfcp_pdn_type_vals), 0x7,
4080 { &hf_pfcp_failed_rule_id_type,
4081 { "Failed Rule ID Type", "pfcp.failed_rule_id_type",
4082 FT_UINT8, BASE_DEC, VALS(pfcp_failed_rule_id_type_vals), 0x7,
4085 { &hf_pfcp_time_qouta_mechanism_bti_type,
4086 { "Base Time Interval Type", "pfcp.time_qouta_mechanism_bti_type",
4087 FT_UINT8, BASE_DEC, VALS(pfcp_time_qouta_mechanism_bti_type_vals), 0x3,
4090 { &hf_pfcp_time_qouta_mechanism_bti,
4091 { "Base Time Interval", "pfcp.time_qouta_mechanism_bti",
4092 FT_UINT32, BASE_DEC, NULL, 0x0,
4095 { &hf_pfcp_ue_ip_address_flags,
4096 { "Flags", "pfcp.ue_ip_address_flags",
4097 FT_UINT8, BASE_HEX, NULL, 0x0,
4100 { &hf_pfcp_ue_ip_address_flag_b0_v6,
4101 { "V6 (IPv6)", "pfcp.ue_ip_address_flag.v6",
4102 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x01,
4105 { &hf_pfcp_ue_ip_address_flag_b1_v4,
4106 { "V4 (IPv4)", "pfcp.ue_ip_address_flag.v4",
4107 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x02,
4110 { &hf_pfcp_ue_ip_address_flag_b2_sd,
4111 { "S/D", "pfcp.ue_ip_address_flag.sd",
4112 FT_BOOLEAN, 8, TFS(&pfcp_ue_ip_add_sd_flag_vals), 0x04,
4115 { &hf_pfcp_ue_ip_addr_ipv4,
4116 { "IPv4 address", "pfcp.ue_ip_addr_ipv4",
4117 FT_IPv4, BASE_NONE, NULL, 0x0,
4120 { &hf_pfcp_ue_ip_add_ipv6,
4121 { "IPv6 address", "pfcp.ue_ip_addr_ipv6",
4122 FT_IPv6, BASE_NONE, NULL, 0x0,
4125 { &hf_pfcp_application_id,
4126 { "Application Identifier", "pfcp.application_id",
4127 FT_BYTES, BASE_NONE, NULL, 0x0,
4130 { &hf_pfcp_sdf_filter_flags,
4131 { "Flags", "pfcp.sdf_filter_flags",
4132 FT_UINT8, BASE_HEX, NULL, 0x0,
4135 { &hf_pfcp_sdf_filter_b0_fd,
4136 { "FD (Flow Description)", "pfcp.sdf_filter.fd",
4137 FT_BOOLEAN, 8, NULL, 0x01,
4140 { &hf_pfcp_sdf_filter_b1_ttc,
4141 { "TTC (ToS Traffic Class)", "pfcp.sdf_filter.ttc",
4142 FT_BOOLEAN, 8, NULL, 0x02,
4145 { &hf_pfcp_sdf_filter_b2_spi,
4146 { "SPI (Security Parameter Index)", "pfcp.sdf_filter.spi",
4147 FT_BOOLEAN, 8, NULL, 0x04,
4150 { &hf_pfcp_sdf_filter_b3_fl,
4151 { "FL (Flow Label)", "pfcp.sdf_filter.fl",
4152 FT_BOOLEAN, 8, NULL, 0x08,
4155 { &hf_pfcp_flow_desc_len,
4156 { "Length of Flow Description", "pfcp.flow_desc_len",
4157 FT_UINT16, BASE_DEC, NULL, 0x0,
4161 { "Flow Description field", "pfcp.fd",
4162 FT_BYTES, BASE_NONE, NULL, 0x0,
4166 { "ToS Traffic Class field", "pfcp.ttc",
4167 FT_BYTES, BASE_NONE, NULL, 0x0,
4171 { "Security Parameter Index field", "pfcp.spi",
4172 FT_BYTES, BASE_NONE, NULL, 0x0,
4176 { "Flow Label field", "pfcp.fl",
4177 FT_BYTES, BASE_NONE, NULL, 0x0,
4180 { &hf_pfcp_out_hdr_desc,
4181 { "Outer Header Removal Description", "pfcp.out_hdr_desc",
4182 FT_UINT8, BASE_DEC, VALS(pfcp_out_hdr_desc_vals), 0x0,
4185 { &hf_pfcp_far_id_flg,
4186 { "Allocation type", "pfcp.far_id_flg",
4187 FT_BOOLEAN, 32, TFS(&pfcp_id_predef_dynamic_tfs), 0x80000000,
4191 { "FAR ID", "pfcp.far_id",
4192 FT_UINT32, BASE_DEC, NULL, 0x7fffffff,
4195 { &hf_pfcp_urr_id_flg,
4196 { "Allocation type", "pfcp.urr_id_flg",
4197 FT_BOOLEAN, 32, TFS(&pfcp_id_predef_dynamic_tfs), 0x80000000,
4201 { "URR ID", "pfcp.urr_id",
4202 FT_UINT32, BASE_DEC, NULL, 0x7fffffff,
4205 { &hf_pfcp_qer_id_flg,
4206 { "Allocation type", "pfcp.qer_id_flg",
4207 FT_BOOLEAN, 32, TFS(&pfcp_id_predef_dynamic_tfs), 0x80000000,
4211 { "QER ID", "pfcp.qer_id",
4212 FT_UINT32, BASE_DEC, NULL, 0x7fffffff,
4215 { &hf_pfcp_predef_rules_name,
4216 { "Predefined Rules Name", "pfcp.predef_rules_name",
4217 FT_BYTES, BASE_NONE, NULL, 0x0,
4220 { &hf_pfcp_apply_action_flags,
4221 { "Flags", "pfcp.apply_action_flags",
4222 FT_UINT8, BASE_HEX, NULL, 0x0,
4225 { &hf_pfcp_apply_action_b0_drop,
4226 { "DROP (Drop)", "pfcp.apply_action.drop",
4227 FT_BOOLEAN, 8, NULL, 0x01,
4230 { &hf_pfcp_apply_action_b1_forw,
4231 { "FORW (Forward)", "pfcp.apply_action.forw",
4232 FT_BOOLEAN, 8, NULL, 0x02,
4235 { &hf_pfcp_apply_action_b2_buff,
4236 { "BUFF (Buffer)", "pfcp.apply_action.buff",
4237 FT_BOOLEAN, 8, NULL, 0x04,
4240 { &hf_pfcp_apply_action_b3_nocp,
4241 { "NOCP (Notify the CP function)", "pfcp.apply_action.nocp",
4242 FT_BOOLEAN, 8, NULL, 0x08,
4245 { &hf_pfcp_apply_action_b4_dupl,
4246 { "DUPL (Duplicate)", "pfcp.apply_action.dupl",
4247 FT_BOOLEAN, 8, NULL, 0x10,
4251 { "BAR ID", "pfcp.bar_id",
4252 FT_UINT8, BASE_DEC, NULL, 0x0,
4255 { &hf_pfcp_fq_csid_node_id_type,
4256 { "FQ-CSID Node-ID Type", "pfcp.fq_csid_node_id_type",
4257 FT_UINT8, BASE_DEC, VALS(pfcp_fq_csid_node_id_type_vals), 0xf0,
4260 { &hf_pfcp_num_csid,
4261 { "Number of CSID", "pfcp.num_csid",
4262 FT_UINT8, BASE_DEC, NULL, 0x0f,
4265 { &hf_pfcp_fq_csid_node_id_ipv4,
4266 { "Node-Address", "pfcp.q_csid_node_id.ipv4",
4267 FT_IPv4, BASE_NONE, NULL, 0x0,
4270 { &hf_pfcp_fq_csid_node_id_ipv6,
4271 { "Node-Address", "pfcp.q_csid_node_id.ipv6",
4272 FT_IPv6, BASE_NONE, NULL, 0x0,
4275 { &hf_pfcp_fq_csid_node_id_mcc_mnc,
4276 { "Node-Address MCC MNC", "pfcp.q_csid_node_id.mcc_mnc",
4277 FT_UINT32, BASE_DEC, NULL, 0xfffff000,
4280 { &hf_pfcp_fq_csid_node_id_int,
4281 { "Node-Address Number", "pfcp.q_csid_node_id.int",
4282 FT_UINT32, BASE_DEC, NULL, 0x00000fff,
4286 { "PDN Connection Set Identifier (CSID)", "pfcp.csid",
4287 FT_UINT16, BASE_DEC, NULL, 0x0,
4290 { &hf_pfcp_measurement_period,
4291 { "Measurement Period", "pfcp.measurement_period",
4292 FT_UINT32, BASE_DEC, NULL, 0x0,
4295 { &hf_pfcp_duration_measurement,
4296 { "Duration", "pfcp.duration_measurement",
4297 FT_UINT32, BASE_DEC, NULL, 0x0,
4300 { &hf_pfcp_time_of_first_packet,
4301 { "Time of First Packet", "pfcp.time_of_first_packet",
4302 FT_STRING, BASE_NONE, NULL, 0,
4305 { &hf_pfcp_time_of_last_packet,
4306 { "Time of Last Packet", "pfcp.time_of_last_packet",
4307 FT_STRING, BASE_NONE, NULL, 0,
4310 { &hf_pfcp_dst_interface,
4311 { "Interface", "pfcp.dst_interface",
4312 FT_UINT8, BASE_DEC, VALS(pfcp_dst_interface_vals), 0x0f,
4315 { &hf_pfcp_redirect_address_type,
4316 { "Redirect Address Type", "pfcp.redirect_address_type",
4317 FT_UINT8, BASE_DEC, VALS(pfcp_redirect_address_type_vals), 0x0f,
4320 { &hf_pfcp_redirect_server_addr_len,
4321 { "Redirect Server Address Length", "pfcp.redirect_server_addr_len",
4322 FT_UINT16, BASE_DEC, NULL, 0x0,
4325 { &hf_pfcp_redirect_server_address,
4326 { "Redirect Server Address", "pfcp.redirect_server_address",
4327 FT_STRING, BASE_NONE, NULL, 0x0,
4330 { &hf_pfcp_linked_urr_id,
4331 { "Linked URR ID", "pfcp.linked_urr_id",
4332 FT_UINT16, BASE_DEC, NULL, 0x0,
4335 { &hf_pfcp_outer_hdr_desc,
4336 { "Outer Header Creation Description", "pfcp.outer_hdr_desc",
4337 FT_UINT8, BASE_DEC, VALS(pfcp_outer_hdr_desc_vals), 0x0,
4340 { &hf_pfcp_outer_hdr_creation_teid,
4341 { "TEID", "pfcp.outer_hdr_creation.teid",
4342 FT_UINT32, BASE_HEX, NULL, 0x0,
4345 { &hf_pfcp_outer_hdr_creation_ipv4,
4346 { "IPv4 Address", "pfcp.outer_hdr_creation.ipv4",
4347 FT_IPv4, BASE_NONE, NULL, 0x0,
4350 { &hf_pfcp_outer_hdr_creation_ipv6,
4351 { "IPv6 Address", "pfcp.outer_hdr_creation.ipv6",
4352 FT_IPv6, BASE_NONE, NULL, 0x0,
4355 { &hf_pfcp_outer_hdr_creation_port,
4356 { "Port Number", "pfcp.outer_hdr_creation.port",
4357 FT_UINT16, BASE_DEC, NULL, 0x0,
4360 { &hf_pfcp_tos_traf_class,
4361 { "ToS/Traffic Class", "pfcp.tos_traf_class.port",
4362 FT_UINT16, BASE_DEC, NULL, 0x0,
4365 { &hf_pfcp_time_threshold,
4366 { "Time Threshold", "pfcp.time_threshold",
4367 FT_UINT16, BASE_DEC, NULL, 0x0,
4370 { &hf_pfcp_forwarding_policy_id_len,
4371 { "Forwarding Policy Identifier Length", "pfcp.forwarding_policy_id_len",
4372 FT_UINT8, BASE_DEC, NULL, 0x0,
4375 { &hf_pfcp_forwarding_policy_id,
4376 { "Forwarding Policy Identifier", "pfcp.forwarding_policy_id",
4377 FT_BYTES, BASE_NONE, NULL, 0x0,
4380 { &hf_pfcp_measurement_method_flags,
4381 { "Flags", "pfcp.measurement_method_flags",
4382 FT_UINT8, BASE_HEX, NULL, 0x0,
4385 { &hf_pfcp_b0_durat,
4386 { "DURAT (Duration)", "pfcp.measurement_method_flags.durat",
4387 FT_BOOLEAN, 8, NULL, 0x01,
4390 { &hf_pfcp_b1_volume,
4391 { "VOLUM (Volume)", "pfcp.measurement_method_flags.volume",
4392 FT_BOOLEAN, 8, NULL, 0x02,
4395 { &hf_pfcp_b2_event,
4396 { "EVENT (Event)", "pfcp.measurement_method_flags.event",
4397 FT_BOOLEAN, 8, NULL, 0x04,
4400 { &hf_pfcp_subsequent_time_threshold,
4401 { "Subsequent Time Threshold", "pfcp.subsequent_time_threshold",
4402 FT_UINT32, BASE_DEC, NULL, 0x0,
4405 { &hf_pfcp_inactivity_detection_time,
4406 { "Inactivity Detection Time", "pfcp.inactivity_detection_time",
4407 FT_UINT32, BASE_DEC, NULL, 0x0,
4410 { &hf_pfcp_monitoring_time,
4411 { "Monitoring Time", "pfcp.monitoring_time",
4412 FT_STRING, BASE_NONE, NULL, 0,
4415 { &hf_pfcp_reporting_triggers,
4416 { "Flags", "pfcp.reporting_triggers_flags",
4417 FT_UINT16, BASE_HEX, NULL, 0x0,
4420 { &hf_pfcp_reporting_triggers_b0_volqu,
4421 { "VOLQU (Volume Quota)", "pfcp.reporting_triggers_flags.volqu",
4422 FT_BOOLEAN, 16, NULL, 0x0001,
4425 { &hf_pfcp_reporting_triggers_b1_timqu,
4426 { "TIMQU (Time Quota)", "pfcp.reporting_triggers_flags.timqu",
4427 FT_BOOLEAN, 16, NULL, 0x0002,
4430 { &hf_pfcp_reporting_triggers_b2_envcl,
4431 { "ENVCL (Envelope Closure)", "pfcp.reporting_triggers_flags.envcl",
4432 FT_BOOLEAN, 16, NULL, 0x0004,
4435 { &hf_pfcp_reporting_triggers_b7_b3_spare,
4436 { "Spare", "pfcp.reporting_triggers_flags.spare",
4437 FT_UINT16, BASE_DEC, NULL, 0x00F8,
4440 { &hf_pfcp_reporting_triggers_b8_perio,
4441 { "PERIO (Periodic Reporting)", "pfcp.reporting_triggers_flags.perio",
4442 FT_BOOLEAN, 16, NULL, 0x0100,
4445 { &hf_pfcp_reporting_triggers_b9_volth,
4446 { "VOLTH (Volume Threshold)", "pfcp.reporting_triggers_flags.volth",
4447 FT_BOOLEAN, 16, NULL, 0x0200,
4450 { &hf_pfcp_reporting_triggers_b10_timth,
4451 { "TIMTH (Time Threshold)", "pfcp.reporting_triggers_flags.timth",
4452 FT_BOOLEAN, 16, NULL, 0x0400,
4455 { &hf_pfcp_reporting_triggers_b11_quhti,
4456 { "QUHTI (Quota Holding Time)", "pfcp.reporting_triggers_flags.quhti",
4457 FT_BOOLEAN, 16, NULL, 0x0800,
4460 { &hf_pfcp_reporting_triggers_b12_start,
4461 { "START (Start of Traffic)", "pfcp.reporting_triggers_flags.start",
4462 FT_BOOLEAN, 16, NULL, 0x1000,
4465 { &hf_pfcp_reporting_triggers_b13_stopt,
4466 { "STOPT (Stop of Traffic)", "pfcp.reporting_triggers_flags.stopt",
4467 FT_BOOLEAN, 16, NULL, 0x2000,
4470 { &hf_pfcp_reporting_triggers_b14_droth,
4471 { "DROTH (Dropped DL Traffic Threshold)", "pfcp.reporting_triggers_flags.droth",
4472 FT_BOOLEAN, 16, NULL, 0x4000,
4475 { &hf_pfcp_reporting_triggers_b15_liusa,
4476 { "LIUSA (Linked Usage Reporting)", "pfcp.reporting_triggers_flags.liusa",
4477 FT_BOOLEAN, 16, NULL, 0x8000,
4481 { &hf_pfcp_usage_report_trigger,
4482 { "Flags", "pfcp.usage_report_trigger",
4483 FT_UINT16, BASE_HEX, NULL, 0x0,
4487 { &hf_pfcp_usage_report_trigger_b0_volqu,
4488 { "VOLQU (Volume Quota)", "pfcp.usage_report_trigger_flags.volqu",
4489 FT_BOOLEAN, 16, NULL, 0x0001,
4492 { &hf_pfcp_usage_report_trigger_b1_timqu,
4493 { "TIMQU (Time Quota)", "pfcp.usage_report_trigger_flags.timqu",
4494 FT_BOOLEAN, 16, NULL, 0x0002,
4497 { &hf_pfcp_usage_report_trigger_b2_liusa,
4498 { "LIUSA (Linked Usage Reporting)", "pfcp.usage_report_trigger_flags.liusa",
4499 FT_BOOLEAN, 16, NULL, 0x0004,
4502 { &hf_pfcp_usage_report_trigger_b3_termr,
4503 { "TERMR (Termination Report)", "pfcp.usage_report_trigger.term",
4504 FT_BOOLEAN, 16, NULL, 0x0008,
4507 { &hf_pfcp_usage_report_trigger_b4_monit,
4508 { "MONIT (Monitoring Time)", "pfcp.usage_report_trigger.monit",
4509 FT_BOOLEAN, 16, NULL, 0x0010,
4512 { &hf_pfcp_usage_report_trigger_b5_envcl,
4513 { "ENVCL (Envelope Closure)", "pfcp.usage_report_trigger_flags.envcl",
4514 FT_BOOLEAN, 16, NULL, 0x0020,
4517 { &hf_pfcp_usage_report_trigger_b7_b6_spare,
4518 { "Spare", "pfcp.reporting_triggers_flags.spare",
4519 FT_UINT16, BASE_DEC, NULL, 0x00C0,
4522 { &hf_pfcp_usage_report_trigger_b8_perio,
4523 { "PERIO (Periodic Reporting)", "pfcp.usage_report_trigger_flags.perio",
4524 FT_BOOLEAN, 16, NULL, 0x0100,
4527 { &hf_pfcp_usage_report_trigger_b9_volth,
4528 { "VOLTH (Volume Threshold)", "pfcp.usage_report_trigger_flags.volth",
4529 FT_BOOLEAN, 16, NULL, 0x0200,
4532 { &hf_pfcp_usage_report_trigger_b10_timth,
4533 { "TIMTH (Time Threshold)", "pfcp.usage_report_trigger_flags.timth",
4534 FT_BOOLEAN, 16, NULL, 0x0400,
4537 { &hf_pfcp_usage_report_trigger_b11_quhti,
4538 { "QUHTI (Quota Holding Time)", "pfcp.usage_report_trigger_flags.quhti",
4539 FT_BOOLEAN, 16, NULL, 0x0800,
4542 { &hf_pfcp_usage_report_trigger_b12_start,
4543 { "START (Start of Traffic)", "pfcp.usage_report_trigger_flags.start",
4544 FT_BOOLEAN, 16, NULL, 0x1000,
4547 { &hf_pfcp_usage_report_trigger_b13_stopt,
4548 { "STOPT (Stop of Traffic)", "pfcp.usage_report_trigger_flags.stopt",
4549 FT_BOOLEAN, 16, NULL, 0x2000,
4552 { &hf_pfcp_usage_report_trigger_b14_droth,
4553 { "DROTH (Dropped DL Traffic Threshold)", "pfcp.usage_report_trigger_flags.droth",
4554 FT_BOOLEAN, 16, NULL, 0x4000,
4557 { &hf_pfcp_usage_report_trigger_b15_immer,
4558 { "IMMER (Immediate Report)", "pfcp.usage_report_trigger.immer",
4559 FT_BOOLEAN, 16, NULL, 0x8000,
4563 { &hf_pfcp_volume_threshold,
4564 { "Flags", "pfcp.volume_threshold",
4565 FT_UINT8, BASE_HEX, NULL, 0x0,
4568 { &hf_pfcp_b0_tovol,
4569 { "TOVOL", "pfcp.tovol_flg",
4570 FT_BOOLEAN, 8, NULL, 0x01,
4573 { &hf_pfcp_b1_ulvol,
4574 { "ULVOL", "pfcp.ulvol_flg",
4575 FT_BOOLEAN, 8, NULL, 0x02,
4578 { &hf_pfcp_b2_dlvol,
4579 { "DLVOL", "pfcp.dlvol_flg",
4580 FT_BOOLEAN, 8, NULL, 0x04,
4583 { &hf_pfcp_volume_threshold_tovol,
4584 { "Total Volume", "pfcp.volume_threshold.tovol",
4585 FT_UINT64, BASE_DEC, NULL, 0x0,
4588 { &hf_pfcp_volume_threshold_ulvol,
4589 { "Uplink Volume", "pfcp.volume_threshold.ulvol",
4590 FT_UINT64, BASE_DEC, NULL, 0x0,
4593 { &hf_pfcp_volume_threshold_dlvol,
4594 { "Downlink Volume", "pfcp.volume_threshold.dlvol",
4595 FT_UINT64, BASE_DEC, NULL, 0x0,
4598 { &hf_pfcp_volume_quota,
4599 { "Flags", "pfcp.volume_quota",
4600 FT_UINT8, BASE_HEX, NULL, 0x0,
4603 { &hf_pfcp_volume_quota_tovol,
4604 { "Total Volume", "pfcp.volume_quota.tovol",
4605 FT_UINT64, BASE_DEC, NULL, 0x0,
4608 { &hf_pfcp_volume_quota_ulvol,
4609 { "Uplink Volume", "pfcp.volume_quota.ulvol",
4610 FT_UINT64, BASE_DEC, NULL, 0x0,
4613 { &hf_pfcp_volume_quota_dlvol,
4614 { "Downlink Volume", "pfcp.volume_quota.dlvol",
4615 FT_UINT64, BASE_DEC, NULL, 0x0,
4618 { &hf_pfcp_subseq_volume_threshold,
4619 { "Flags", "pfcp.subseq_volume_threshold",
4620 FT_UINT8, BASE_HEX, NULL, 0x0,
4623 { &hf_pfcp_subseq_volume_threshold_b0_tovol,
4624 { "TOVOL", "pfcp.subseq_volume_threshold.tovol_flg",
4625 FT_BOOLEAN, 8, NULL, 0x01,
4628 { &hf_pfcp_subseq_volume_threshold_b1_ulvol,
4629 { "ULVOL", "pfcp.subseq_volume_threshold.ulvol_flg",
4630 FT_BOOLEAN, 8, NULL, 0x02,
4633 { &hf_pfcp_subseq_volume_threshold_b2_dlvol,
4634 { "DLVOL", "pfcp.subseq_volume_threshold.dlvol_flg",
4635 FT_BOOLEAN, 8, NULL, 0x04,
4638 { &hf_pfcp_subseq_volume_threshold_tovol,
4639 { "Total Volume", "pfcp.subseq_volume_threshold.tovol",
4640 FT_UINT64, BASE_DEC, NULL, 0x0,
4643 { &hf_pfcp_subseq_volume_threshold_ulvol,
4644 { "Uplink Volume", "pfcp.subseq_volume_threshold.ulvol",
4645 FT_UINT64, BASE_DEC, NULL, 0x0,
4648 { &hf_pfcp_subseq_volume_threshold_dlvol,
4649 { "Downlink Volume", "pfcp.subseq_volume_threshold.dlvol",
4650 FT_UINT64, BASE_DEC, NULL, 0x0,
4653 { &hf_pfcp_time_quota,
4654 { "Time Quota", "pfcp.time_quota",
4655 FT_UINT32, BASE_DEC, NULL, 0x0,
4658 { &hf_pfcp_start_time,
4659 { "Start Time", "pfcp.start_time",
4660 FT_STRING, BASE_NONE, NULL, 0,
4663 { &hf_pfcp_end_time,
4664 { "End Time", "pfcp.start_time",
4665 FT_STRING, BASE_NONE, NULL, 0,
4668 { &hf_pfcp_quota_holding_time,
4669 { "Quota Holding Time", "pfcp.quota_holding_time",
4670 FT_UINT32, BASE_DEC, NULL, 0x0,
4673 { &hf_pfcp_dropped_dl_traffic_threshold,
4674 { "Flags", "pfcp.dropped_dl_traffic_threshold",
4675 FT_UINT8, BASE_HEX, NULL, 0x0,
4678 { &hf_pfcp_dropped_dl_traffic_threshold_b0_dlpa,
4679 { "DLPA", "pfcp.dropped_dl_traffic_threshold.dlpa_flg",
4680 FT_BOOLEAN, 8, NULL, 0x01,
4683 { &hf_pfcp_downlink_packets,
4684 { "Downlink Packets", "pfcp.downlink_packets",
4685 FT_UINT64, BASE_DEC, NULL, 0x0,
4688 { &hf_pfcp_qer_correlation_id,
4689 { "QER Correlation ID", "pfcp.qer_correlation_id",
4690 FT_UINT32, BASE_DEC, NULL, 0x0,
4693 { &hf_pfcp_gate_status,
4694 { "Flags", "pfcp.gate_status",
4695 FT_UINT8, BASE_HEX, NULL, 0x0,
4698 { &hf_pfcp_gate_status_b0b1_dlgate,
4699 { "DL Gate", "pfcp.gate_status.ulgate",
4700 FT_UINT8, BASE_DEC, VALS(pfcp_gate_status_vals), 0x03,
4703 { &hf_pfcp_gate_status_b3b2_ulgate,
4704 { "UL Gate", "pfcp.gate_status.ulgate",
4705 FT_UINT8, BASE_DEC, VALS(pfcp_gate_status_vals), 0x0e,
4709 { "UL MBR", "pfcp.ul_mbr",
4710 FT_UINT40, BASE_DEC, NULL, 0x0,
4714 { "DL MBR", "pfcp.dl_mbr",
4715 FT_UINT40, BASE_DEC, NULL, 0x0,
4719 { "UL GBR", "pfcp.ul_gbr",
4720 FT_UINT40, BASE_DEC, NULL, 0x0,
4724 { "DL GBR", "pfcp.dl_gbr",
4725 FT_UINT40, BASE_DEC, NULL, 0x0,
4728 { &hf_pfcp_report_type,
4729 { "Flags", "pfcp.report_type",
4730 FT_UINT8, BASE_HEX, NULL, 0x0,
4734 { "ERIR (Error Indication Report)", "pfcp.report_type.erir",
4735 FT_BOOLEAN, 8, NULL, 0x04,
4739 { "USAR (Usage Report)", "pfcp.report_type.usar",
4740 FT_BOOLEAN, 8, NULL, 0x02,
4744 { "DLDR (Downlink Data Report)", "pfcp.report_type.dldr",
4745 FT_BOOLEAN, 8, NULL, 0x01,
4748 { &hf_pfcp_offending_ie,
4749 { "Type of the offending IE", "pfcp.offending_ie",
4750 FT_UINT16, BASE_DEC | BASE_EXT_STRING, &pfcp_ie_type_ext, 0x0,
4754 { &hf_pfcp_up_function_features,
4755 { "Flags", "pfcp.up_function_features",
4756 FT_UINT16, BASE_HEX, NULL, 0x0,
4760 { "BUCP", "pfcp.up_function_features.bucp",
4761 FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0100,
4762 "Downlink Data Buffering in CP function", HFILL }
4765 { "DDND", "pfcp.up_function_features.ddnd",
4766 FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0200,
4767 "Buffering parameter 'Downlink Data Notification Delay", HFILL }
4769 { &hf_pfcp_b10_dlbd,
4770 { "DLBD", "pfcp.up_function_features.dlbd",
4771 FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0400,
4774 { &hf_pfcp_b11_trst,
4775 { "TRST", "pfcp.up_function_features.trst",
4776 FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0800,
4777 "Traffic Steering", HFILL }
4779 { &hf_pfcp_b12_ftup,
4780 { "FTUP", "pfcp.up_function_features.ftup",
4781 FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x1000,
4782 "F-TEID allocation / release in the UP function", HFILL }
4784 { &hf_pfcp_b13_pfdm,
4785 { "PFDM", "pfcp.up_function_features.pfdm",
4786 FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x2000,
4787 "PFD Management procedure", HFILL }
4789 { &hf_pfcp_b14_heeu,
4790 { "HEEU", "pfcp.up_function_features.heeu",
4791 FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x4000,
4792 "Header Enrichment of Uplink traffic", HFILL }
4794 { &hf_pfcp_b15_treu,
4795 { "TREU", "pfcp.up_function_features.treu",
4796 FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x8000,
4797 "Traffic Redirection Enforcement in the UP function", HFILL }
4800 { "EMPU", "pfcp.up_function_features.empu",
4801 FT_BOOLEAN, 16, TFS(&tfs_supported_not_supported), 0x0001,
4802 "Sending of End Marker packets", HFILL }
4804 { &hf_pfcp_b1_b7_spare,
4805 { "Spare", "pfcp.up_function_features.spare",
4806 FT_BOOLEAN, 16, NULL , 0x00FE,
4807 "Sending of End Marker packets", HFILL }
4809 { &hf_pfcp_sequence_number,
4810 { "Sequence Number", "pfcp.sequence_number",
4811 FT_UINT32, BASE_DEC, NULL, 0x0,
4815 { "Metric", "pfcp.metric",
4816 FT_UINT8, BASE_DEC, NULL, 0x0,
4819 { &hf_pfcp_timer_unit,
4820 { "Timer unit", "pfcp.timer_unit",
4821 FT_UINT8, BASE_DEC, VALS(pfcp_timer_unit_vals), 0xe0,
4824 { &hf_pfcp_timer_value,
4825 { "Timer value", "pfcp.timer_value",
4826 FT_UINT8, BASE_DEC, NULL, 0x1f,
4829 { &hf_pfcp_volume_measurement,
4830 { "Flags", "pfcp.volume_measurement",
4831 FT_UINT8, BASE_HEX, NULL, 0x0,
4834 { &hf_pfcp_vol_meas_tovol,
4835 { "Total Volume", "pfcp.volume_measurement.tovol",
4836 FT_UINT64, BASE_DEC, NULL, 0x0,
4839 { &hf_pfcp_vol_meas_ulvol,
4840 { "Uplink Volume", "pfcp.volume_measurement.ulvol",
4841 FT_UINT64, BASE_DEC, NULL, 0x0,
4844 { &hf_pfcp_vol_meas_dlvol,
4845 { "Downlink Volume", "pfcp.volume_measurement.dlvol",
4846 FT_UINT64, BASE_DEC, NULL, 0x0,
4849 { &hf_pfcp_cp_function_features,
4850 { "Flags", "pfcp.cp_function_features",
4851 FT_UINT8, BASE_HEX, NULL, 0x0,
4855 { "LOAD", "pfcp.cp_function_features.load",
4856 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
4857 "Load Control", HFILL }
4860 { "OVRL", "pfcp.cp_function_features.ovrl",
4861 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02,
4862 "Overload Control", HFILL }
4864 { &hf_pfcp_usage_information,
4865 { "Flags", "pfcp.usage_information",
4866 FT_UINT8, BASE_HEX, NULL, 0x0,
4870 { "BEF (Before)", "pfcp.usage_information.bef",
4871 FT_BOOLEAN, 8, NULL, 0x01,
4875 { "AFT (After)", "pfcp.usage_information.aft",
4876 FT_BOOLEAN, 8, NULL, 0x02,
4880 { "UAE (Usage After Enforcement)", "pfcp.usage_information.uae",
4881 FT_BOOLEAN, 8, NULL, 0x04,
4885 { "UBE (Usage Before Enforcement)", "pfcp.usage_information.ube",
4886 FT_BOOLEAN, 8, NULL, 0x08,
4889 { &hf_pfcp_application_instance_id,
4890 { "Application Instance Identifier", "pfcp.application_instance_id",
4891 FT_BYTES, BASE_NONE, NULL, 0x0,
4894 { &hf_pfcp_flow_dir,
4895 { "Flow Direction", "pfcp.flow_dir",
4896 FT_UINT8, BASE_DEC, VALS(pfcp_flow_dir_vals), 0x07,
4899 { &hf_pfcp_packet_rate,
4900 { "Flags", "pfcp.packet_rate",
4901 FT_UINT8, BASE_HEX, NULL, 0x0,
4905 { "ULPR (Uplink Packet Rate)", "pfcp.packet_rate.ulpr",
4906 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x01,
4910 { "DLPR (Downlink Packet Rate)", "pfcp.packet_rate.dlpr",
4911 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x02,
4914 { &hf_pfcp_ul_time_unit,
4915 { "Uplink Time Unit", "pfcp.ul_time_unit",
4916 FT_UINT8, BASE_DEC, VALS(pfcp_pr_time_unit_vals), 0x07,
4919 { &hf_pfcp_max_ul_pr,
4920 { "Maximum Uplink Packet Rate", "pfcp.max_ul_pr",
4921 FT_UINT16, BASE_DEC, NULL, 0x0,
4924 { &hf_pfcp_dl_time_unit,
4925 { "Downlink Time Unit", "pfcp.dl_time_unit",
4926 FT_UINT8, BASE_DEC, VALS(pfcp_pr_time_unit_vals), 0x07,
4929 { &hf_pfcp_max_dl_pr,
4930 { "Maximum Downlink Packet Rate", "pfcp.max_dl_pr",
4931 FT_UINT16, BASE_DEC, NULL, 0x0,
4934 { &hf_pfcp_dl_flow_level_marking,
4935 { "Flags", "pfcp.dl_flow_level_marking",
4936 FT_UINT8, BASE_HEX, NULL, 0x0,
4940 { "TTC (ToS/Traffic Class)", "pfcp.dl_flow_level_marking.ttc",
4941 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x01,
4945 { "SCI(Service Class Indicator)", "pfcp.dl_flow_level_marking.sci",
4946 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x02,
4950 { "Service Class Indicator", "pfcp.sci",
4951 FT_UINT16, BASE_HEX, NULL, 0x0,
4954 { &hf_pfcp_dl_data_notification_delay,
4955 { "Delay Value", "pfcp.dl_data_notification_delay",
4956 FT_UINT8, BASE_DEC, NULL, 0x0,
4957 "Delay Value in integer multiples of 50 millisecs, or zero", HFILL }
4959 { &hf_pfcp_packet_count,
4960 { "Packet Count", "pfcp.packet_count",
4961 FT_UINT16, BASE_DEC, NULL, 0x0,
4964 { &hf_pfcp_pfcp_dl_data_service_inf_flags,
4965 { "Flags", "pfcp.dl_data_service_inf_flags",
4966 FT_UINT8, BASE_HEX, NULL, 0x0,
4970 { "PPI(Paging Policy Indication)", "pfcp.dl_data_service_inf.ppi",
4971 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x01,
4975 { "Paging Policy Indication", "pfcp.ppi",
4976 FT_UINT16, BASE_DEC, NULL, 0x7f,
4979 { &hf_pfcp_sxsmreq_flags,
4980 { "Flags", "pfcp.sxsmreq_flags",
4981 FT_UINT8, BASE_HEX, NULL, 0x0,
4984 { &hf_pfcp_b0_drobu,
4985 { "DROBU (Drop Buffered Packets)", "pfcp.sxsmreq_flags.drobu",
4986 FT_BOOLEAN, 8, NULL, 0x01,
4989 { &hf_pfcp_b1_sndem,
4990 { "SNDEM (Send End Marker Packets)", "pfcp.sxsmreq_flags.sndem",
4991 FT_BOOLEAN, 8, NULL, 0x02,
4994 { &hf_pfcp_b2_qaurr,
4995 { "QAURR (Query All URRs)", "pfcp.sxsmreq_flags.qaurr",
4996 FT_BOOLEAN, 8, NULL, 0x04,
4999 { &hf_pfcp_sxsrrsp_flags,
5000 { "Flags", "pfcp.sxsrrsp_flags",
5001 FT_UINT8, BASE_HEX, NULL, 0x0,
5004 { &hf_pfcp_pfd_contents_flags,
5005 { "Flags", "pfcp.pfd_contents_flags",
5006 FT_UINT8, BASE_HEX, NULL, 0x0,
5010 { "FD (Flow Description)", "pfcp.pfd_contents_flags.fd",
5011 FT_BOOLEAN, 8, NULL, 0x01,
5015 { "URL (URL)", "pfcp.pfd_contents_flags.url",
5016 FT_BOOLEAN, 8, NULL, 0x02,
5020 { "DN (Domain Name)", "pfcp.pfd_contents_flags.dn",
5021 FT_BOOLEAN, 8, NULL, 0x04,
5025 { "CP (Custom PFD Content)", "pfcp.pfd_contents_flags.cp",
5026 FT_BOOLEAN, 8, NULL, 0x08,
5030 { "Length of URL", "pfcp.url_len",
5031 FT_UINT16, BASE_DEC, NULL, 0x0,
5035 { "URL", "pfcp.url",
5036 FT_BYTES, BASE_NONE, NULL, 0x0,
5040 { "Length of Domain Name", "pfcp.dn_len",
5041 FT_UINT16, BASE_DEC, NULL, 0x0,
5045 { "Domain Name", "pfcp.dn",
5046 FT_BYTES, BASE_NONE, NULL, 0x0,
5050 { "Length of Custom PFD Content", "pfcp.cp_len",
5051 FT_UINT16, BASE_DEC, NULL, 0x0,
5055 { "Custom PFD Content", "pfcp.cp",
5056 FT_BYTES, BASE_NONE, NULL, 0x0,
5059 { &hf_pfcp_header_type,
5060 { "Header Type", "pfcp.header_type",
5061 FT_UINT8, BASE_DEC, VALS(pfcp_header_type_vals), 0x1f,
5065 { "Length of Header Field Name", "pfcp.hf_len",
5066 FT_UINT8, BASE_DEC, NULL, 0x0,
5070 { "Header Field Name", "pfcp.hf_name",
5071 FT_BYTES, BASE_NONE, NULL, 0x0,
5074 { &hf_pfcp_hf_val_len,
5075 { "Length of Header Field Value", "pfcp.hf_val_len",
5076 FT_UINT8, BASE_DEC, NULL, 0x0,
5080 { "Header Field Value", "pfcp.hf_val",
5081 FT_BYTES, BASE_NONE, NULL, 0x0,
5084 { &hf_pfcp_measurement_info,
5085 { "Flags", "pfcp.measurement_info",
5086 FT_UINT8, BASE_HEX, NULL, 0x0,
5090 { "MBQE (Measurement Before QoS Enforcement)", "pfcp.measurement_info.fd",
5091 FT_BOOLEAN, 8, NULL, 0x01,
5095 { "INAM (Inactive Measurement)", "pfcp.measurement_info.inam",
5096 FT_BOOLEAN, 8, NULL, 0x02,
5099 { &hf_pfcp_node_report_type,
5100 { "Flags", "pfcp.node_report_type",
5101 FT_UINT8, BASE_HEX, NULL, 0x0,
5105 { "UPFR (User Plane Path Failure Report)", "pfcp.node_report_type.upfr",
5106 FT_BOOLEAN, 8, NULL, 0x01,
5109 { &hf_pfcp_remote_gtp_u_peer,
5110 { "Flags", "pfcp.remote_gtp_u_peer",
5111 FT_UINT8, BASE_HEX, NULL, 0x0,
5114 { &hf_pfcp_gtp_u_peer_flag_b0_v6,
5115 { "V6 (IPv6)", "pfcp.gtp_u_peer_flag.v6",
5116 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x01,
5119 { &hf_pfcp_gtp_u_peer_flag_b1_v4,
5120 { "V4 (IPv4)", "pfcp.gtp_u_peer_flag.v4",
5121 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x02,
5124 { &hf_pfcp_remote_gtp_u_peer_ipv4,
5125 { "IPv4 address", "pfcp.node_id_ipv4",
5126 FT_IPv4, BASE_NONE, NULL, 0x0,
5129 { &hf_pfcp_remote_gtp_u_peer_ipv6,
5130 { "IPv6 address", "pfcp.node_id_ipv6",
5131 FT_IPv6, BASE_NONE, NULL, 0x0,
5135 { "UR-SEQN", "pfcp.ur_seqn",
5136 FT_UINT32, BASE_DEC, NULL, 0x0,
5139 { &hf_pfcp_oci_flags,
5140 { "Flags", "pfcp.oci_flags",
5141 FT_UINT8, BASE_HEX, NULL, 0x0,
5145 { "AOCI: Associate OCI with Node ID", "pfcp.oci_flags.aoci",
5146 FT_BOOLEAN, 8, NULL, 0x01,
5149 { &hf_pfcp_sx_assoc_rel_req_flags,
5150 { "Flags", "pfcp.sx_assoc_rel_req",
5151 FT_UINT8, BASE_HEX, NULL, 0x0,
5155 { "SARR (Sx Association Release Request)", "pfcp.sx_assoc_rel_req.sarr",
5156 FT_BOOLEAN, 8, NULL, 0x01,
5159 { &hf_pfcp_upiri_flags,
5160 { "Flags", "pfcp.upiri_flags",
5161 FT_UINT8, BASE_HEX, NULL, 0x0,
5164 { &hf_pfcp_upiri_flg_b5_assoni,
5165 { "ASSONI (Associated Network Instance)", "pfcp.upiri_flags.assoni",
5166 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x20,
5169 { &hf_pfcp_upiri_flg_b1_v6,
5170 { "V6 (IPv6)", "pfcp.upiri_flags.v6",
5171 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x02,
5174 { &hf_pfcp_upiri_flg_b0_v4,
5175 { "V4 (IPv4)", "pfcp.upiri_flags.v4",
5176 FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x01,
5179 { &hf_pfcp_upiri_teidri,
5180 { "TEID Range Indication", "pfcp.upiri.teidri",
5181 FT_UINT8, BASE_DEC, NULL, 0x1C,
5184 { &hf_pfcp_upiri_teid_range,
5185 { "TEID", "pfcp.upiri.teid_range",
5186 FT_UINT32, BASE_HEX, NULL, 0x0,
5189 { &hf_pfcp_upiri_ipv4,
5190 { "IPv4 address", "pfcp.upiri.ipv4_addr",
5191 FT_IPv4, BASE_NONE, NULL, 0x0,
5194 { &hf_pfcp_upiri_ipv6,
5195 { "IPv6 address", "pfcp.upiri.ipv6_addr",
5196 FT_IPv6, BASE_NONE, NULL, 0x0,
5199 { &hf_pfcp_upiri_network_instance,
5200 { "Network Instance", "pfcp.upiri.network_instance",
5201 FT_BYTES, BASE_NONE, NULL, 0x0,
5207 /* Setup protocol subtree array */
5208 #define NUM_INDIVIDUAL_ELEMS_PFCP 33
5209 gint *ett[NUM_INDIVIDUAL_ELEMS_PFCP +
5210 (NUM_PFCP_IES - 1)];
5213 ett[1] = &ett_pfcp_flags;
5214 ett[2] = &ett_pfcp_ie;
5215 ett[3] = &ett_pfcp_grouped_ie;
5216 ett[4] = &ett_pfcp_f_seid_flags;
5217 ett[5] = &ett_f_teid_flags;
5218 ett[6] = &ett_pfcp_ue_ip_address_flags;
5219 ett[7] = &ett_pfcp_sdf_filter_flags;
5220 ett[8] = &ett_pfcp_apply_action_flags;
5221 ett[9] = &ett_pfcp_measurement_method_flags;
5222 ett[10] = &ett_pfcp_reporting_triggers;
5223 ett[11] = &ett_pfcp_volume_threshold;
5224 ett[12] = &ett_pfcp_volume_quota;
5225 ett[13] = &ett_pfcp_subseq_volume_threshold;
5226 ett[14] = &ett_pfcp_dropped_dl_traffic_threshold;
5227 ett[15] = &ett_pfcp_gate_status;
5228 ett[16] = &ett_pfcp_report_type;
5229 ett[17] = &ett_pfcp_up_function_features;
5230 ett[18] = &ett_pfcp_report_trigger;
5231 ett[19] = &ett_pfcp_volume_measurement;
5232 ett[20] = &ett_pfcp_cp_function_features;
5233 ett[21] = &ett_pfcp_usage_information;
5234 ett[22] = &ett_pfcp_packet_rate;
5235 ett[23] = &ett_pfcp_pfcp_dl_flow_level_marking;
5236 ett[24] = &ett_pfcp_dl_data_service_inf;
5237 ett[25] = &ett_pfcp_sxsmreq;
5238 ett[26] = &ett_pfcp_sxsrrsp;
5239 ett[27] = &ett_pfcp_measurement_info;
5240 ett[28] = &ett_pfcp_node_report_type;
5241 ett[29] = &ett_pfcp_remote_gtp_u_peer;
5242 ett[30] = &ett_pfcp_oci_flags;
5243 ett[31] = &ett_sx_assoc_rel_req_flags;
5244 ett[32] = &ett_pfcp_upiri_flags;
5247 static ei_register_info ei[] = {
5248 { &ei_pfcp_ie_reserved,{ "pfcp.ie_id_reserved", PI_PROTOCOL, PI_ERROR, "Reserved IE value used", EXPFILL } },
5249 { &ei_pfcp_ie_data_not_decoded,{ "pfcp.ie_data_not_decoded", PI_UNDECODED, PI_NOTE, "IE data not decoded by WS yet", EXPFILL } },
5250 { &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 } },
5251 { &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 } },
5252 { &ei_pfcp_enterprise_ie_3gpp,{ "pfcp.ie_enterprise_3gpp", PI_PROTOCOL, PI_ERROR, "IE not decoded yet(WS:No vendor dissector)", EXPFILL } },
5253 { &ei_pfcp_ie_encoding_error,{ "pfcp.ie_encoding_error", PI_PROTOCOL, PI_ERROR, "IE wrongly encoded)", EXPFILL } },
5256 expert_module_t* expert_pfcp;
5258 guint last_index = NUM_INDIVIDUAL_ELEMS_PFCP, i;
5260 for (i = 0; i < (NUM_PFCP_IES-1); i++, last_index++)
5262 ett_pfcp_elem[i] = -1;
5263 ett[last_index] = &ett_pfcp_elem[i];
5265 proto_pfcp = proto_register_protocol("Packet Forwarding Control Protocol", "PFCP", "pfcp");
5266 pfcp_handle = register_dissector("pfcp", dissect_pfcp, proto_pfcp);
5268 proto_register_field_array(proto_pfcp, hf_pfcp, array_length(hf_pfcp));
5269 proto_register_subtree_array(ett, array_length(ett));
5270 expert_pfcp = expert_register_protocol(proto_pfcp);
5271 expert_register_field_array(expert_pfcp, ei, array_length(ei));
5273 /* Register dissector table for enterprise IE dissectors */
5274 pfcp_enterprise_ies_dissector_table = register_dissector_table("pfcp.enterprise_ies", "PFCP Enterprice IEs",
5275 proto_pfcp, FT_UINT32, BASE_DEC);
5277 pfcp_3gpp_ies_handle = register_dissector("pfcp_3gpp_ies", dissect_pfcp_3gpp_enterprise_ies, proto_pfcp);
5283 proto_reg_handoff_pfcp(void)
5285 dissector_add_uint_with_preference("udp.port", UDP_PORT_PFCP, pfcp_handle);
5286 /* Register 3GPP in the table to give expert info and serve as an example how to add decoding of enterprise IEs*/
5287 dissector_add_uint("pfcp.enterprise_ies", VENDOR_THE3GPP, pfcp_3gpp_ies_handle);
5293 * Editor modelines - http://www.wireshark.org/tools/modelines.html
5298 * indent-tabs-mode: nil
5301 * vi: set shiftwidth=4 tabstop=8 expandtab:
5302 * :indentSize=4:tabSize=8:noTabs=true: