1PCAP_ACTIVATE(3PCAP) PCAP_ACTIVATE(3PCAP)
2
3
4
6 pcap_activate - activate a capture handle
7
9 #include <pcap/pcap.h>
10
11 int pcap_activate(pcap_t *p);
12
14 pcap_activate() is used to activate a packet capture handle to look at
15 packets on the network, with the options that were set on the handle
16 being in effect.
17
19 pcap_activate() returns 0 on success without warnings, PCAP_WARN‐
20 ING_PROMISC_NOTSUP on success on a device that doesn't support promis‐
21 cuous mode if promiscuous mode was requested, PCAP_WARNING on success
22 with any other warning, PCAP_ERROR_ACTIVATED if the handle has already
23 been activated, PCAP_ERROR_NO_SUCH_DEVICE if the capture source speci‐
24 fied when the handle was created doesn't exist, PCAP_ERROR_PERM_DENIED
25 if the process doesn't have permission to open the capture source,
26 PCAP_ERROR_RFMON_NOTSUP if monitor mode was specified but the capture
27 source doesn't support monitor mode, PCAP_ERROR_IFACE_NOT_UP if the
28 capture source is not up, and PCAP_ERROR if another error occurred. If
29 PCAP_WARNING or PCAP_ERROR is returned, pcap_geterr() or pcap_perror()
30 may be called with p as an argument to fetch or display a message
31 describing the warning or error. If PCAP_WARNING_PROMISC_NOTSUP,
32 PCAP_ERROR_NO_SUCH_DEVICE, or PCAP_ERROR_PERM_DENIED is returned,
33 pcap_geterr() or pcap_perror() may be called with p as an argument to
34 fetch or display an message giving additional details about the problem
35 that might be useful for debugging the problem if it's unexpected.
36
38 pcap(3PCAP)
39
40
41
42 5 April 2008 PCAP_ACTIVATE(3PCAP)