2 * flowperpkt.h - skeleton vpp engine plug-in header file
4 * Copyright (c) <current-year> <your-organization>
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at:
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
17 #ifndef __included_flowperpkt_h__
18 #define __included_flowperpkt_h__
20 #include <vnet/vnet.h>
21 #include <vnet/ip/ip.h>
22 #include <vnet/ethernet/ethernet.h>
24 #include <vppinfra/hash.h>
25 #include <vppinfra/error.h>
26 #include <vnet/flow/flow_report.h>
27 #include <vnet/flow/flow_report_classify.h>
31 * @brief flow-per-packet plugin header file
35 /** API message ID base */
38 /** Have the reports [templates] been created? */
39 int ipv4_report_created;
40 int l2_report_created;
42 /** stream/template IDs */
46 /** ipfix buffers under construction, per-worker thread */
47 vlib_buffer_t **ipv4_buffers_per_worker;
48 vlib_buffer_t **l2_buffers_per_worker;
50 /** frames containing ipfix buffers, per-worker thread */
51 vlib_frame_t **ipv4_frames_per_worker;
52 vlib_frame_t **l2_frames_per_worker;
54 /** next record offset, per worker thread */
55 u16 *ipv4_next_record_offset_per_worker;
56 u16 *l2_next_record_offset_per_worker;
58 /** Time reference pair */
59 u64 nanosecond_time_0;
62 /** convenience vlib_main_t pointer */
63 vlib_main_t *vlib_main;
64 /** convenience vnet_main_t pointer */
65 vnet_main_t *vnet_main;
73 } flowperpkt_variant_t;
75 extern flowperpkt_main_t flowperpkt_main;
77 extern vlib_node_registration_t flowperpkt_ipv4_node;
79 void flowperpkt_flush_callback_ipv4 (void);
80 void flowperpkt_flush_callback_l2 (void);
82 #endif /* __included_flowperpkt_h__ */
85 * fd.io coding-style-patch-verification: ON
88 * eval: (c-set-style "gnu")