1PCAP_ACTIVATE(3PCAP)                                      PCAP_ACTIVATE(3PCAP)
2
3
4

NAME

6       pcap_activate - activate a capture handle
7

SYNOPSIS

9       #include <pcap/pcap.h>
10
11       int pcap_activate(pcap_t *p);
12

DESCRIPTION

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

RETURN VALUE

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_WARN‐
22       ING_TSTAMP_TYPE_NOTSUP on success if the time stamp type specified in a
23       previous  pcap_set_tstamp_type()  call  isn't  supported by the capture
24       source (the time stamp type is left as the  default),  PCAP_WARNING  on
25       success  with any other warning, PCAP_ERROR_ACTIVATED if the handle has
26       already been activated, PCAP_ERROR_NO_SUCH_DEVICE if the capture source
27       specified    when    the    handle    was    created   doesn't   exist,
28       PCAP_ERROR_PERM_DENIED if the process doesn't have permission  to  open
29       the  capture  source, PCAP_ERROR_PROMISC_PERM_DENIED if the process has
30       permission to open the capture source but doesn't  have  permission  to
31       put  it  into promiscuous mode, PCAP_ERROR_RFMON_NOTSUP if monitor mode
32       was specified but the capture  source  doesn't  support  monitor  mode,
33       PCAP_ERROR_IFACE_NOT_UP if the capture source is not up, and PCAP_ERROR
34       if another error occurred.  If PCAP_WARNING or PCAP_ERROR is  returned,
35       pcap_geterr()  or  pcap_perror() may be called with p as an argument to
36       fetch or display  a  message  describing  the  warning  or  error.   If
37       PCAP_WARNING_PROMISC_NOTSUP,        PCAP_ERROR_NO_SUCH_DEVICE,       or
38       PCAP_ERROR_PERM_DENIED is returned, pcap_geterr() or pcap_perror()  may
39       be  called  with p as an argument to fetch or display an message giving
40       additional details about the problem that might be useful for debugging
41       the problem if it's unexpected.
42

SEE ALSO

44       pcap(3PCAP)
45
46
47
48                                 5 April 2008             PCAP_ACTIVATE(3PCAP)
Impressum