pcap_dump_open(3) pcap_dump_open(3)
NAME
pcap_dump_open, pcap_dump_fopen - open a file to which to write packets
SYNOPSIS
#include <pcap/pcap.h> pcap_dump_open(3) *p, const char *fname); pcap_dumper_t *pcap_dump_open_append(pcap_t *p, const char *fname); pcap_dumper_t *pcap_dump_fopen(pcap_t *p, FILE *fp);
DESCRIPTION
pcap_dump_open(3) is called to open a ``savefile'' for writing. fname specifies the name of the file to open. The file will have the same format as those used by tcpdump(1) and tcpslice(1). The name "-" is a synonym for stdout. pcap_dump_fopen() is called to write data to an existing open stream fp; this stream will be closed by a subsequent call to pcap_dump_close(). time stamp precision, link-layer type, and snapshot length from p are used as the link-layer type and snapshot length of the output file. pcap_dump_open_append() is like pcap_dump_open but does not create the file if it does not exist and, if it does already exist, and is a pcap file with the same byte order as the host opening the file, and has the same time stamp precision, link-layer header type, and snapshot length as p, it will write new packets at the end of the) 22 June 2018 pcap_dump_open(3)
libpcap 1.9.0 - Generated Sat Jul 28 16:14:01 CDT 2018