2 * copyright (c) 2001-2014 Emil Mikulic.
4 * cap.h: interface to libpcap.
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>
11 extern unsigned int cap_pkts_recv
, cap_pkts_drop
;
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
);
20 void cap_free_args(void);
22 void cap_from_file(const char *capfile
);
24 /* vim:set ts=3 sw=3 tw=78 expandtab: */