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.
On Darwin systems version 13 or later, a source argument of "all" or "any" can be used to capture packets from all interfaces. A source
argument of NULL can be used to capture packets from all physical interfaces, i.e. excluding loopback, virtual and tunnel 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)
3 January 2014 PCAP_CREATE(3PCAP)
Check Out this Related 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.
On Darwin systems version 13 or later, a source argument of "all" or "any" can be used to capture packets from all interfaces. A source
argument of NULL can be used to capture packets from all physical interfaces, i.e. excluding loopback, virtual and tunnel 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)
Hi All,
I want to create a script that capture only Date & Time, Current CPU % usage, Disk % usage, Mem % usage and Top process based on this output;
Data Collected: 05/17/08 17:19:49
Refresh Interval: 600 seconds
GlancePlus Started/Reset: 05/17/08 08:19:45
B3692A GlancePlus... (18 Replies)
Hi,
i am using a linux CentOS machine. I have 2 real network interfaces
eth0, eth1 and 2 virtual interfaces tap0 and tap1. I am using PCAP library to capture
the packets on theses interfaces. If i specify the interface as "any",
i cannot find a way to know from which interface the packet... (1 Reply)
Hi,
I want to capture snmp packets in AIX.
When i give print from AIX6.1, Printer will give its response thru' snmp.
I used iptrace command like below, but it is not capturing snmp packets other packets are captured like udp, tcp..
1. iptrace command:
/usr/sbin/iptrace -a -i en0... (1 Reply)
Hi,
My first post to this group...
I have a need to to parse a source file which is a capture from a network analyser.
I have two fields that need to be checked:
- Field 7 represents the packet length (an integer), and
Field 4 represents a network address (e.g. 192.168.25.3)
- The... (10 Replies)
Hi,
I want to know the os name via c/c++ source code.so please help me to do the same.
I will appreciate if anyone can provide me the source code.
Thanks in advance.. (9 Replies)
We are using Solaris 10 for our Radiation Treatment Planning and need to create a simulation for our service engineers. I need a screen capture tool that can not only capture screens, but create movies of mouse movements (similar to Captivate). I have contacted Oracle and talked to several people... (2 Replies)
Hi,
I am trying to capture manually crafted IP packets, created using Scapy, to a pcap file that can later be replayed using tcpreplay.
When using wireshark, I can successfully capture these packets and view them in wireshark.
However, when using tcpdump, these packets are then shown in... (2 Replies)
Hi,
I need to collect IP address of all servers (more than 300). One way is put it in for loop and run nslookup for that servers list, but there are multiple fields in output.
(tty/dev/pts/13): bash: 1011 > nslookup vplssor04
Server: 10.58.115.34
Address: 10.58.115.34#53
Name: ... (7 Replies)