I started by doing this:
#ifndef __linux__
/* the original includes */
#include <net/pfilt.h>
#include <net/bpf.h>
#else
/* the linux includes */
#include <linux/types.h>
#undef __KERNEL__
#include <linux/filter.h>
/* Linux has different names for everything, sigh. */
#define bpf_insn sock_filter
#define bpf_program sock_fprog
#define bf_len len
#define bf_insns filter
#endif
Between that, and changing the way the filter is installed, that got me
part way there. But at the moment I'm stuck because the program has
references to a struct bpf_hdr that the filter is supposed to put at the
start of captured packets. I've looked through the system includes, and I
can't seem to find any equivalent, but surely it must be defined somewhere?
Thanks for any suggestions or advice!
Eric
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/