PCAP_OPEN_DEAD(3) Library Functions Manual PCAP_OPEN_DEAD(3)NAME
pcap_open_dead, pcap_open_dead_with_tstamp_precision - open a fake pcap_t for compiling filters or opening a capture for output
pcap_t *pcap_open_dead(int linktype, int snaplen);
pcap_t *pcap_open_dead_with_tstamp_precision(int linktype, int snaplen,
pcap_open_dead() and pcap_open_dead_with_tstamp_precision() are used for creating a pcap_t structure to use when calling the other func-
tions in libpcap. It is typically used when just using libpcap for compiling BPF code; it can also be used if using pcap_dump_open(),
pcap_dump(), and pcap_dump_close() to write a savefile if there is no pcap_t that supplies the packets to be written.
linktype specifies the link-layer type for the pcap_t.
snaplen specifies the snapshot length for the pcap_t.
When pcap_open_dead_with_tstamp_precision(), is used to create a pcap_t for use with pcap_dump_open(), precision specifies the time stamp
precision for packets; PCAP_TSTAMP_PRECISION_MICRO should be specified if the packets to be written have time stamps in seconds and
microseconds, and PCAP_TSTAMP_PRECISION_NANO should be specified if the packets to be written have time stamps in seconds and nanoseconds.
Its value does not affect pcap_compile().
SEE ALSO pcap(3), pcap_compile(3), pcap_dump_open(3), pcap-linktype(7)
1 July 2013 PCAP_OPEN_DEAD(3)
Check Out this Related Man Page
PCAP_DUMP_OPEN(3) Library Functions Manual PCAP_DUMP_OPEN(3)NAME
pcap_dump_open, pcap_dump_fopen - open a file to which to write packets
pcap_dumper_t *pcap_dump_open(pcap_t *p, const char *fname);
pcap_dumper_t *pcap_dump_fopen(pcap_t *p, FILE *fp);
pcap_dump_open() 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. Note that on Windows, that stream should be opened in binary
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.
A pointer to a pcap_dumper_t structure to use in subsequent pcap_dump() and pcap_dump_close() calls is returned on success. NULL is
returned on failure. If NULL is returned, pcap_geterr(p) can be used to get the error text.
SEE ALSO pcap(3), pcap_create(3), pcap_activate(3), pcap_open_offline(3), pcap_open_live(3), pcap_open_dead(3), pcap_dump(3), pcap_dump_close(3),
5 April 2008 PCAP_DUMP_OPEN(3)
Hi a am writing a C Programe on Vi Editor (File Handelling),and i am compiling it using fcc but it not compiling ,Even Vi not saving my file.Tell me how can i do that.One More Thing I want to know that ,Is their any subsitute of conio.h. (3 Replies)
I am compiling some set of SQL scripts in a set of sub directories demoed as below. After compiling log files are being created.
Each and every time after compiling time I had to go subdir by subdir to delete the log files. I am sure there should be simple way to look for all log... (4 Replies)
Upgrading FC3 kernel 2.6.9-1.667 to 2.6.10 and compiling it
Upgrading FC3 kernel 2.6.9-1.667 to 2.6.10 and compiling it( almost same steps to upgrade to 2.6.11 and above ....note--> also check additional documentation)
1. First of... (0 Replies)
Anyone know why I'm getting the below compiling errors when I #include the <sys/shm.h> file to my .h file?....
This is on a 64bitmode machine but compiling some code in 32bitmode with the OBJECT_MODE set to 32. When I don't include this file, all compiles fine. But the shm.h file is needed for... (0 Replies)
I want to write a small application using Libpcap in C on Linux.
Currently, it starts to sniff and waits for the packets. But that's not what I need actually. I want it to wait for N seconds and then stop listening. (I think there's something wrong with my usage of 'pcap_open_live'...)
How... (0 Replies)
I tried to compile the files in basic_dump_ex using cygwin :
but I got this :
cc -g -O -mno-cygwin -I ../../include -c -o basic_dump_ex.o basic_dump_ex.c
cc: error: unrecognized command line option ‘-mno-cygwin’... (6 Replies)