This NEMEA module switch byte order of fields in unirec messages received on input and forwards them to output interface.
- Input: 1
- Output: 1
-nDon't forward EOF message.
-h [trap,1]Print help message for this module / for libtrap specific parameters.-i IFC_SPECSpecification of interface types and their parameters.-vBe verbose.-vvBe more verbose.-vvvBe even more verbose.
Fields of received unirec message are iterated and endianness is changed for those with the following types:
UINT16UINT32UINT64INT16INT32INT64FLOATDOUBLETIME
and for metadata of the following types:
BYTESSTRING
Then the altered unirec message is sent to output interface.
For instance, endiverter can be used when exporting and reading flow from OpenWrt router, where OpenWrt
uses different byte order.
+----------------------+ +----------------------+
| | | |
| OpenWrt | | linux |
| | | |
| MIPS | | x86 |
| big endian | | little endian |
| | | |
| | | |
| +--------------+ | | +--------------+ |
| | | | msg | | | |
| | flow_meter +-----------------> endiverter | |
| | | | | | | |
| +--------------+ | | +-------+------+ |
| | | | |
+----------------------+ | converted | msg |
| | |
| +-------v------+ |
| | | |
| | logger | |
| | | |
| +--------------+ |
| |
+----------------------+