pcap_dump_fopen(3) - Linux man page
Name
pcap_dump_open, pcap_dump_fopen - open a file to which to write packetsSynopsis
#include <pcap/pcap.h> pcap_dumper_t *pcap_dump_open(pcap_t *p, const char *fname); pcap_dumper_t *pcap_dump_fopen(pcap_t *p, FILE *fp);
Description
pcap_dump_fopen() is called to write data to an existing open stream fp. Note that on Windows, that stream should be opened in binary mode.
p is a capture or ''savefile'' handle returned by an earlier call to pcap_create() and activated by an earlier call to pcap_activate(), or returned by an earlier call to pcap_open_offline(), pcap_open_live(), or pcap_open_dead(). The link-layer type and snapshot length from p are used as the link-layer type and snapshot length of the output file.