18f2425bc0a84a7968ff18f948487204d87da0b6
[darkstat-debian] / cap.h
1 /* darkstat 3
2 * copyright (c) 2001-2011 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_init(const char *device, const char *filter, int promisc);
14 void cap_fd_set(fd_set *read_set, int *max_fd,
15 struct timeval *timeout, int *need_timeout);
16 void cap_poll(fd_set *read_set);
17 void cap_stop(void);
18
19 void cap_from_file(const char *capfile, const char *filter);
20
21 /* vim:set ts=3 sw=3 tw=78 expandtab: */