PCAP_CLOSE(3PCAP)PCAP_CLOSE(3PCAP)NAME
pcap_close - close a capture device or savefile
SYNOPSIS
#include <pcap/pcap.h>
void pcap_close(pcap_t *p);
DESCRIPTION
pcap_close() closes the files associated with p and deallocates resources.
SEE ALSO pcap(3PCAP)
3 January 2014 PCAP_CLOSE(3PCAP)
Check Out this Related Man Page
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)
hi
plz help me modifying the following code (use pcap) to include concepts of parallel programming or multi threading. I am trying from the past 1 week to change the code and apply concepts of threads but have been unsuccessful.. pls guide me..
/* This section contains additional information... (1 Reply)
HI
For the past 1 week i have been trying to include the concepts of parallel programming or thread in the sniffex.c code. Haven't been able to..
Please suggest sm appropriate modifications to the following code:
/*
* sniffex.c
*
* Sniffer example of TCP/IP packet capture using... (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)
Hi all
My application is a monitoring application that monitors the incoming udp packet when ever required. When ever a particular source ip and port and dest ip and port is provided the filter will be framed based them. For eg,
char filterExpr;
filterExpr = "udp and src host 192.168.16.100... (0 Replies)