Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

pcap_create(3pcap) [x11r4 man page]

PCAP_CREATE(3PCAP)														PCAP_CREATE(3PCAP)

NAME
pcap_create - create a live capture handle SYNOPSIS
#include <pcap/pcap.h> char errbuf[PCAP_ERRBUF_SIZE]; pcap_t *pcap_create(const char *source, char *errbuf); DESCRIPTION
pcap_create() is used to create a packet capture handle to look at packets on the network. source is a string that specifies the network device to open; on Linux systems with 2.2 or later kernels, a source argument of "any" or NULL can be used to capture packets from all interfaces. The returned handle must be activated with pcap_activate() before packets can be captured with it; options for the capture, such as promis- cuous mode, can be set on the handle before activating it. RETURN VALUE
pcap_create() returns a pcap_t * on success and NULL on failure. If NULL is returned, errbuf is filled in with an appropriate error mes- sage. errbuf is assumed to be able to hold at least PCAP_ERRBUF_SIZE chars. SEE ALSO
pcap(3PCAP), pcap_activate(3PCAP) 5 April 2008 PCAP_CREATE(3PCAP)

Check Out this Related Man Page

PCAP_OPEN_LIVE(3PCAP)													     PCAP_OPEN_LIVE(3PCAP)

NAME
pcap_open_live - open a device for capturing SYNOPSIS
#include <pcap/pcap.h> char errbuf[PCAP_ERRBUF_SIZE]; pcap_t *pcap_open_live(const char *device, int snaplen, int promisc, int to_ms, char *errbuf); DESCRIPTION
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 interfaces. 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. RETURN VALUE
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)
Man Page

We Also Found This Discussion For You

1. UNIX for Advanced & Expert Users

Shopt -s histappend

What is the point of this? Whenever I close my shell it appends to the history file without adding this. I have never seen it overwrite my history file. # When the shell exits, append to the history file instead of overwriting it shopt -s histappend (3 Replies)
Discussion started by: cokedude
3 Replies