sleinen / samplicator

Send copies of (UDP) datagrams to multiple receivers, with optional sampling and spoofing
GNU General Public License v2.0
389 stars 132 forks source link

Netflow v9 source_id #64

Open fredbcode opened 5 years ago

fredbcode commented 5 years ago

Hello,

I'm trying to debug Netflow V9 from CISCO without source_id value The goal is to add IP source (router who generates flow) to the source_id https://netflow.caligare.com/netflow_v9.htm before duplication.

This can be very useful to find the source device Any advice on how to do this would be greatly appreciated

For now I'm trying to see the buffer without any success https://github.com/sleinen/samplicator/blob/master/samplicate.c#L346

I added this right after if (n > 0) { fpdu[n] = '\0'; printf("Test received message: %s size: %ld\n", fpdu, sizeof (fpdu) ); }

But fpdu message is always empty (size not of course), I don't understand why I guess there is something specific here, a basic client/server UDP test works well

I guess that show the socket data can also be very interesting for debugging purpose in many cases

Thanks