PCAP_OPEN_DEAD(3PCAP)PCAP_OPEN_DEAD(3PCAP)NAME
pcap_open_dead, pcap_open_dead_with_tstamp_precision - open a fake pcap_t for compiling filters or opening a capture for output
SYNOPSIS
#include <pcap/pcap.h>
pcap_t *pcap_open_dead(int linktype, int snaplen);
pcap_t *pcap_open_dead_with_tstamp_precision(int linktype, int snaplen,
u_int precision);
DESCRIPTION
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(3PCAP), pcap_compile(3PCAP), pcap_dump_open(3PCAP), pcap-linktype(7)
3 January 2014 PCAP_OPEN_DEAD(3PCAP)
Check Out this Related Man Page
PCAP_DUMP_OPEN(3PCAP)PCAP_DUMP_OPEN(3PCAP)NAME
pcap_dump_open, pcap_dump_fopen - open a file to which to write packets
SYNOPSIS
#include <pcap/pcap.h>
pcap_dumper_t *pcap_dump_open(pcap_t *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() 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
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 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 snap-
shot length as p, it will write new packets at the end of the file.
RETURN VALUES
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(3PCAP), pcap_create(3PCAP), pcap_activate(3PCAP), pcap_open_offline(3PCAP), pcap_open_live(3PCAP), pcap_open_dead(3PCAP),
pcap_dump(3PCAP), pcap_dump_close(3PCAP), pcap_geterr(3PCAP), pcap-savefile(5@)
16 February 2015 PCAP_DUMP_OPEN(3PCAP)
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)
Hello friends,
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)
what does the following mean and how can it be fixed
tcpdump: WARNING: arptype 65535 not supported by libpcap - falling back to cooked socket
Couldn't find user 'pcap' (1 Reply)
tcpdump: WARNING: arptype 65535 not supported by libpcap - falling back to cooked socket
cannot find user pcap
What does this mean ^^ and how can it be fixed? (1 Reply)
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 :
/cygdrive/c/WpdPack/Examples-pcap/basic_dump_ex
$make
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)