//////////////////////////////////////////////////////////////////////
// PPPTraf 1.0. (C) DiSKiLLeR, 9/2/2000. (diskiller@cnbinc.com) //
// //
// This program is distributed under the terms of the GNU License. //
// Please refer to the file README and COPYING. //
//////////////////////////////////////////////////////////////////////
#ifndef BPF_H
#define BPF_H
/*
* Called to init the BPF code. (opens a /dev/bpf*, sets it up, etc)
* Pass in the Network Interface to listen to. (tun0, ppp0, ed0, etc)
*/
int bpf_init(char *interface);
/*
* Goes into an infinite loop reading data from the /dev/bpf and storing it.
* NOTE! It never returns! Run as a seperate thread.
*/
void bpf_loop();
/*
* Returns the number of dropped bpf packets. (ioctl() call).
*/
int bpf_dropped();
/*
* Called to shutdown the BPF code. (ie. stops the bpf_loop thread), closes
* /dev/bpf devices, and cleans up. Returns 0.
*/
int bpf_shutdown();
#endif
syntax highlighted by Code2HTML, v. 0.9.1