aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/ipfix-export/flow_report.h
diff options
context:
space:
mode:
authorPaul Atkins <patkins@graphiant.com>2021-09-22 14:56:17 +0100
committerNeale Ranns <neale@graphiant.com>2021-11-22 09:30:09 +0000
commitd747dd9501b97d90b51961a8a1716ab66a2400e1 (patch)
tree4fbdc1230a738a0f45bb2d6f648a84a160c22ffe /src/vnet/ipfix-export/flow_report.h
parenta6e131e3e6ae4b8b97d65d508cbd9c2d5664c498 (diff)
ipfix-export: support creating multiple exporters
The existing api set_ipfix_exporter only allows for the creation of a single exporter. In some cases it is desirable to export data to multiple different destinations. Allow users to create multiple ipfix exporters to support this. Add a new api that allows for the creation of multiple exporters, and store them in a pool of exporters. The exporter created by the old API will always be in index 0 of the pool. Exporters created by the new API will be given the next available index in the pool, and will return this index to the API caller so that they can track the exporter they created. The collector_address is the key for the exporter, so changes can be made by doing a further call to the API with the same collector_address. Type: improvement Signed-off-by: Paul Atkins <patkins@graphiant.com> Change-Id: Id71c98cffcf8d141d890b40fb90a40b90a91d1d6
Diffstat (limited to 'src/vnet/ipfix-export/flow_report.h')
-rw-r--r--src/vnet/ipfix-export/flow_report.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/vnet/ipfix-export/flow_report.h b/src/vnet/ipfix-export/flow_report.h
index 7f0c92d3a92..65ddebcac3e 100644
--- a/src/vnet/ipfix-export/flow_report.h
+++ b/src/vnet/ipfix-export/flow_report.h
@@ -20,6 +20,7 @@
#include <vnet/ethernet/ethernet.h>
#include <vnet/ethernet/packet.h>
#include <vnet/ip/ip_packet.h>
+#include <vnet/ip/ip_types.h>
#include <vnet/ip/ip4_packet.h>
#include <vnet/ip/ip6_packet.h>
#include <vnet/udp/udp_packet.h>
@@ -185,6 +186,11 @@ void vnet_stream_reset (ipfix_exporter_t *exp, u32 stream_index);
int vnet_stream_change (ipfix_exporter_t *exp, u32 old_domain_id,
u16 old_src_port, u32 new_domain_id, u16 new_src_port);
+/*
+ * Search all the exporters for one that has a matching destination address.
+ */
+ipfix_exporter_t *vnet_ipfix_exporter_lookup (ip4_address_t *ipfix_collector);
+
#endif /* __included_vnet_flow_report_h__ */
/*