ipfix-export: refactor fields in flow_report_main 11/34011/3
authorPaul Atkins <patkins@graphiant.com>
Tue, 21 Sep 2021 19:49:12 +0000 (20:49 +0100)
committerNeale Ranns <neale@graphiant.com>
Mon, 22 Nov 2021 09:30:09 +0000 (09:30 +0000)
commit9ec6449e298ed10695c4afbba951ac46daa52e43
treeef9589f9e172ea905587812e440c3dfc9d1fc5a0
parenta3767bda9817eab15dd0eca0955d5ad194ec8840
ipfix-export: refactor fields in flow_report_main

Pull out the fields in flow_report_main_t that are specific to a single
exporter and move them into a new structure that represents an exporter.
Add a pool of exporters to flow_report_main_t and do a pool_get() to get
the entry at index 0, so that the existing users of the code need only
change the path at which they access the old fields and have no need to
make further code changes.  In functions that were accessing the fields
that now make up the ipfix_exporter create a local var that points to the
first (always valid) exporter and use this as the base for the fields
rather than finding them from flow_report_main.

This is in preparation for supporting multiple flow_exporters.

Note that at the moment the code supports multiple 'streams' for a given
exporter, where each stream has its own source port, domain id and template
space. But all streams within an exporter have the same destination address,
so this is not the same as multiple exporters.

Type: refactor
Signed-off-by: Paul Atkins <patkins@graphiant.com>
Change-Id: I49f5c7fb9e901773351d31dc8a59178c37e99301
src/plugins/flowprobe/flowprobe.c
src/plugins/flowprobe/node.c
src/plugins/ioam/analyse/ioam_summary_export.c
src/plugins/ioam/udp-ping/udp_ping_export.c
src/plugins/nat/lib/ipfix_logging.c
src/vnet/ipfix-export/flow_api.c
src/vnet/ipfix-export/flow_report.c
src/vnet/ipfix-export/flow_report.h
src/vnet/ipfix-export/flow_report_classify.c