PCAP_LOOKUPDEV(3) Library Functions Manual PCAP_LOOKUPDEV(3)NAME
pcap_lookupdev - find the default device on which to capture
char *pcap_lookupdev(char *errbuf);
pcap_lookupdev() returns a pointer to a string giving the name of a network device suitable for use with pcap_create() and pcap_activate(),
or with pcap_open_live(), and with pcap_lookupnet(). If there is an error, NULL is returned and errbuf is filled in with an appropriate
error message. errbuf is assumed to be able to hold at least PCAP_ERRBUF_SIZE chars.
SEE ALSO pcap(3), pcap_create(3), pcap_activate(3), pcap_open_live(3), pcap_lookupnet(3)
5 April 2008 PCAP_LOOKUPDEV(3)
Check Out this Related Man Page
pcap_open_live - open a device for capturing
pcap_t *pcap_open_live(const char *device, int snaplen,
int promisc, int to_ms, char *errbuf);
pcap_open_live() is used to obtain a packet capture handle to look at packets on the network. device is a string that specifies the net-
work device to open; on Linux systems with 2.2 or later kernels, a device argument of "any" or NULL can be used to capture packets from all
snaplen specifies the snapshot length to be set on the handle.
promisc specifies if the interface is to be put into promiscuous mode.
to_ms specifies the read timeout in milliseconds.
pcap_open_live() returns a pcap_t * on success and NULL on failure. If NULL is returned, errbuf is filled in with an appropriate error
message. errbuf may also be set to warning text when pcap_open_live() succeeds; to detect this case the caller should store a zero-length
string in errbuf before calling pcap_open_live() and display the warning to the user if errbuf is no longer a zero-length string. errbuf
is assumed to be able to hold at least PCAP_ERRBUF_SIZE chars.
SEE ALSO pcap(3PCAP), pcap_create(3PCAP), pcap_activate(3PCAP)
5 April 2008 PCAP_OPEN_LIVE(3PCAP)
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)
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:
* Sniffer example of TCP/IP packet capture using... (1 Reply)
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,
filterExpr = "udp and src host 192.168.16.100... (0 Replies)