Network Collectors

Listening over the Network - TCP Recommended:

An additional type, fbListener_t, is used to build Collecting Processes to listen for connections from IPFIX Exporting Processes via the network. To use a listener, first create an fbInfoModel_t and an fbSession_t as above, without defining any external templates. Instead of maintaining state for a particular Transport Session, this fbSession_t instance will be used as a template for each Transport Session created by the listener.

Then create an fbListener_t to encapsulate a passive socket on the network to wait for connections from Exporting Processes using the fbListenerAlloc() call.

To wait for a connection from an Exporting Process, call fbListenerWait(), which handles the cloning of the fbSession_t, the creation of the fbCollector_t, and the creation of the buffer for reading from that collector, and returns the newly created fBuf_t instance.

Each listener tracks every active collector/buffer (i.e., each active Session) it created; the fbListenerWait() call will return an fBuf_t from which another IPFIX Message may be read if no new connections are available. The preferred parameter may be used to request an fBuf_t to try first, to minimize switching among available Sessions. See the documentation for fbListenerWait() for more details.