Berkeley Packet Filter question

2002-03-07 Thread David Boggs
[reposted from FreeBSD-questions] I'm writing a network device driver. I'm using FreeBSD 4.4-RELEASE. I can't get BPF to work; it dereferences a nil pointer. Attached below is some BPF code. As I read it, bpfattach() is passed an ifp (struct ifnet *). It mallocs a 'bpf_if' (1) and installs th

Re: Berkeley Packet Filter question

2002-03-07 Thread Brooks Davis
On Thu, Mar 07, 2002 at 03:29:44PM -0800, David Boggs wrote: > Attached below is some BPF code. As I read it, bpfattach() is passed > an ifp (struct ifnet *). It mallocs a 'bpf_if' (1) and installs the ifp > in it (2). Then it uses this pointer to ZERO a pointer in the ifp named > if_bpf (3) (p