File: cap.h

package info (click to toggle)
darkstat 3.0.715-1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 816 kB
  • sloc: ansic: 6,542; sh: 355; makefile: 172; php: 15
file content (21 lines) | stat: -rw-r--r-- 622 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* darkstat 3
 * copyright (c) 2001-2011 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_init(const char *device, const char *filter, int promisc);
void cap_fd_set(fd_set *read_set, int *max_fd,
   struct timeval *timeout, int *need_timeout);
void cap_poll(fd_set *read_set);
void cap_stop(void);

void cap_from_file(const char *capfile, const char *filter);

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