Advanced TCP traffic generator
Packet capture support for the Flowgrind daemon. More...
|void||fg_pcap_cleanup (void *arg)|
|Cleanup method to be called after dumping of the specified flow has finished. More...|
|void||fg_pcap_go (struct flow *flow)|
|Start a tcpdump to capture traffic of the provided flow. More...|
|Initialize flowgrind's pcap library. More...|
|static void *||fg_pcap_work (void *arg)|
|Worker method performing actual packet capturing for the provided flow. More...|
|static pcap_if_t *||alldevs|
|static char||errbuf [PCAP_ERRBUF_SIZE] = ""|
Packet capture support for the Flowgrind daemon.
Definition in file fg_pcap.c.
|void fg_pcap_cleanup||(||void *||arg||)|
Cleanup method to be called after dumping of the specified flow has finished.
It closes the handle to the savefile and the handle to the device whose traffic was captured.
|[in]||arg||pointer to the flow whose dumping finished|
|void fg_pcap_go||(||struct flow *||flow||)|
Start a tcpdump to capture traffic of the provided flow.
If the flow was not configured for tcp dumping or dumping is already in progress the method will do nothing and return immediately. Otherwise the method blocks until the actual capturing starts. In case an error occurs a log message is created.
|[in]||flow||the flow whose traffic should be captured|
Initialize flowgrind's pcap library.
This method fills internal structures on which other methods of this library depend. It is therefore crucial to call it before any call to other methods of this library.
Worker method performing actual packet capturing for the provided flow.
It prepares the flow for packet capturing by figuring out the correct device, constructing the pcap filter, etc. and finally starts capturing. Synchronizes with fg_pcap_go() after initialization before starting capturing.
|[in]||arg||pointer to the flow whose traffic should be captured|