summaryrefslogtreecommitdiffstats
path: root/src/vnet/ipfix-export/flow_report.h
diff options
context:
space:
mode:
authorPaul Atkins <patkins@graphiant.com>2021-10-04 15:43:56 +0100
committerNeale Ranns <neale@graphiant.com>2021-11-22 09:30:09 +0000
commit5140484529d420af47d6aa8ffbe6818621d8b55f (patch)
tree0946e14e9556e5b63b2285a1562d92994d3db717 /src/vnet/ipfix-export/flow_report.h
parent0ea1485361dfd23fe5f2522495efb9990df5a790 (diff)
ipfix-export: Change exp to use ip_address
Modify the ipfix_exporter to use ip_address instead of the ipv4 specific version. Modify the current code so that it writes into the v4 specific part of the address, i.e. we are not yet fully supporting IPv6. For the exporter configured via the original API (the one that is always in slot0) we will not support IPv6 addresses. Type: improvement Signed-off-by: Paul Atkins <patkins@graphiant.com> Change-Id: Ic9854ac62aaee76a7a55a958234c456fd9828c4c
Diffstat (limited to 'src/vnet/ipfix-export/flow_report.h')
-rw-r--r--src/vnet/ipfix-export/flow_report.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/vnet/ipfix-export/flow_report.h b/src/vnet/ipfix-export/flow_report.h
index 319533decac..cd0cafb6158 100644
--- a/src/vnet/ipfix-export/flow_report.h
+++ b/src/vnet/ipfix-export/flow_report.h
@@ -46,6 +46,14 @@ typedef struct
ipfix_template_packet_t ipfix;
} ip4_ipfix_template_packet_t;
+/* Used to build the rewrite */
+typedef struct
+{
+ ip6_header_t ip6;
+ udp_header_t udp;
+ ipfix_template_packet_t ipfix;
+} ip6_ipfix_template_packet_t;
+
struct flow_report_main;
struct flow_report;
struct ipfix_exporter;
@@ -155,9 +163,9 @@ typedef struct ipfix_exporter
flow_report_stream_t *streams;
/* ipfix collector ip address, port, our ip address, fib index */
- ip4_address_t ipfix_collector;
+ ip_address_t ipfix_collector;
u16 collector_port;
- ip4_address_t src_address;
+ ip_address_t src_address;
u32 fib_index;
/* Path MTU */
@@ -235,7 +243,8 @@ int vnet_stream_change (ipfix_exporter_t *exp, u32 old_domain_id,
/*
* Search all the exporters for one that has a matching destination address.
*/
-ipfix_exporter_t *vnet_ipfix_exporter_lookup (ip4_address_t *ipfix_collector);
+ipfix_exporter_t *
+vnet_ipfix_exporter_lookup (const ip_address_t *ipfix_collector);
/*
* Get the currently in use buffer for the given stream on the given core.