[netflow-tools] Flowd-0.9 Python Library Problem

Damien Miller djm at mindrot.org
Sun Sep 23 19:46:51 EST 2007

On Mon, 17 Sep 2007, Jesse Kempf wrote:

> I'm looking at extracting the individual netflow parsers from flowd.c,
> but it seems like each of the process_netflow_v?() functions are
> tightly bound to flowd's tracking of the sanity of the sending agents.

Yes, Netflow v.9 requires collectors to hold state.

> It shouldn't be too unreasonable to generalize this with a struct
> of function pointers for handlers for each of the error conditions
> checked for in process_netflow_v?(). Then the caller could have his
> functions handled however he may please, as in the incrementing of
> peer->ninvalid in flowd.c, or throwing exceptions in the case of a
> Python library.

It might be cleaner to make these function return an integer error code
and propogate these back up to process_packet() (or higher).


More information about the netflow-tools mailing list