diff options
author | 2016-12-20 17:59:27 -0500 | |
---|---|---|
committer | 2016-12-22 19:04:16 +0000 | |
commit | 504b83009a00d70c777c04014967494642074d52 (patch) | |
tree | 8159edc93c0027b0dac200875edf1f07481bbbff /plugins/flowperpkt-plugin/flowperpkt/flowperpkt.h | |
parent | abea9664983b723023e692d77fd4fe3ca29c1e34 (diff) |
Add L2 flow-record generation
Change-Id: I32a9513f2b66d35e0abe2aeb6eb86a4729ba7f74
Signed-off-by: Dave Barach <dave@barachs.net>
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__ */ |