1 /* darkstat 3
2  * copyright (c) 2001-2014 Emil Mikulic.
3  *
4  * cap.h: interface to libpcap.
5  */
6 
7 #include <sys/types.h> /* OpenBSD needs this before select */
8 #include <sys/time.h> /* FreeBSD 4 needs this for struct timeval */
9 #include <sys/select.h>
10 
11 extern unsigned int cap_pkts_recv, cap_pkts_drop;
12 
13 void cap_add_ifname(const char *ifname); /* call one or more times */
14 void cap_add_filter(const char *filter); /* call zero or more times */
15 void cap_start(const int promisc);
16 void cap_fd_set(fd_set *read_set, int *max_fd,
17    struct timeval *timeout, int *need_timeout);
18 int cap_poll(fd_set *read_set);
19 void cap_stop(void);
20 void cap_free_args(void);
21 
22 void cap_from_file(const char *capfile);
23 
24 /* vim:set ts=3 sw=3 tw=78 expandtab: */
25