File: cap.h

package info (click to toggle)
darkstat 3.0.722-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 868 kB
  • sloc: ansic: 7,585; sh: 660; javascript: 213; makefile: 174; php: 15
file content (24 lines) | stat: -rw-r--r-- 735 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* darkstat 3
 * copyright (c) 2001-2014 Emil Mikulic.
 *
 * cap.h: interface to libpcap.
 */

#include <sys/types.h> /* OpenBSD needs this before select */
#include <sys/time.h> /* FreeBSD 4 needs this for struct timeval */
#include <sys/select.h>

extern unsigned int cap_pkts_recv, cap_pkts_drop;

void cap_add_ifname(const char *ifname); /* call one or more times */
void cap_add_filter(const char *filter); /* call zero or more times */
void cap_start(const int promisc);
void cap_fd_set(fd_set *read_set, int *max_fd,
   struct timeval *timeout, int *need_timeout);
int cap_poll(fd_set *read_set);
void cap_stop(void);
void cap_free_args(void);

void cap_from_file(const char *capfile);

/* vim:set ts=3 sw=3 tw=78 expandtab: */