diff options
Diffstat (limited to 'plugins/flowperpkt-plugin/flowperpkt/flowperpkt.h')
-rw-r--r-- | plugins/flowperpkt-plugin/flowperpkt/flowperpkt.h | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/plugins/flowperpkt-plugin/flowperpkt/flowperpkt.h b/plugins/flowperpkt-plugin/flowperpkt/flowperpkt.h index 31e685eb..20f6939d 100644 --- a/plugins/flowperpkt-plugin/flowperpkt/flowperpkt.h +++ b/plugins/flowperpkt-plugin/flowperpkt/flowperpkt.h @@ -35,15 +35,25 @@ typedef struct /** API message ID base */ u16 msg_id_base; - /** Has the report been created? */ - int report_created; + /** Have the reports [templates] been created? */ + int ipv4_report_created; + int l2_report_created; + + /** stream/template IDs */ + u16 ipv4_report_id; + u16 l2_report_id; /** ipfix buffers under construction, per-worker thread */ - vlib_buffer_t **buffers_per_worker; + vlib_buffer_t **ipv4_buffers_per_worker; + vlib_buffer_t **l2_buffers_per_worker; + /** frames containing ipfix buffers, per-worker thread */ - vlib_frame_t **frames_per_worker; + vlib_frame_t **ipv4_frames_per_worker; + vlib_frame_t **l2_frames_per_worker; + /** next record offset, per worker thread */ - u16 *next_record_offset_per_worker; + u16 *ipv4_next_record_offset_per_worker; + u16 *l2_next_record_offset_per_worker; /** Time reference pair */ u64 nanosecond_time_0; @@ -55,11 +65,19 @@ typedef struct vnet_main_t *vnet_main; } flowperpkt_main_t; +typedef enum +{ + FLOW_VARIANT_IPV4, + FLOW_VARIANT_L2, + FLOW_N_VARIANTS, +} flowperpkt_variant_t; + extern flowperpkt_main_t flowperpkt_main; -vlib_node_registration_t flowperpkt_node; +extern vlib_node_registration_t flowperpkt_ipv4_node; -void flowperpkt_flush_callback (void); +void flowperpkt_flush_callback_ipv4 (void); +void flowperpkt_flush_callback_l2 (void); #endif /* __included_flowperpkt_h__ */ |