1PCAP_SETFILTER(3PCAP)                                    PCAP_SETFILTER(3PCAP)
2
3
4

NAME

6       pcap_setfilter - set the filter
7

SYNOPSIS

9       #include <pcap/pcap.h>
10
11       int pcap_setfilter(pcap_t *p, struct bpf_program *fp);
12

DESCRIPTION

14       pcap_setfilter()  is used to specify a filter program.  fp is a pointer
15       to a bpf_program struct, usually the result  of  a  call  to  pcap_com‐
16       pile().
17

RETURN VALUE

19       pcap_setfilter()  returns  0  on  success  and -1 on failure.  If -1 is
20       returned, pcap_geterr() or pcap_perror() may be called  with  p  as  an
21       argument to fetch or display the error text.
22

SEE ALSO

24       pcap(3PCAP), pcap_compile(3PCAP), pcap_geterr(3PCAP)
25
26
27
28                                 5 April 2008            PCAP_SETFILTER(3PCAP)
Impressum