Developer info
The architecture of the ipfixprobe can be described by the following diagram:
Process plugin
The ipfixprobe contains script that creates template for new process plugin. To use it follow these steps:
Run the script:
cd process
./create_plugin.sh
To create the process plugin follow these steps:
Add plugin_name.hpp and plugin_name.cpp files to ipfixprobe_process_src variable in Makefile.am.
Implement process plugin event functions. Don't forget to remove unused events to keep default implementation.
Set PLUGIN_NAME_UNIREC_TEMPLATE and IPFIX_PLUGIN_NAME_TEMPLATE macros to export Unirec or IPFIX data respectively.
Define Unirec and IPFIX fields to export Unirec or IPFIX respectively.
Implement fill_ipfix and fill_unirec.
Update README.md.
Process plugin events
pre_create Is called before the creation of new flow from the initial packet.
post_create is called after the flow is created, taket newly created flow and initial packet.
pre_update is called when incoming packet belongs to the existing flow, before the data from the packet are added to the flow.
post_update is called after the data of the packet are added to the flow.
pre_export is called right before the flow is exported.
Input plugin
You can also create own input plugin.
To create the input plugin follow these steps:
- Create plugin_name.hpp and plugin_name.cpp in the input directory.
- Add plugin_name.hpp and plugin_name.cpp files to ipfixprobe_input_src variable in Makefile.am.
- Create a plugin class that inherites from the Input plugin class.
- Override virtual Plugin class methods (init, close, get_parser, get_name) and Input plugin method to receive new packets(get).