Using bpf filter in a kernel module

Hi,
I'm new to FreeBSD. I was wondering if it is possible to filter the packets with bpf using a kernel module? Or is it only possible to filter packet from the user level by using the filter machine and ioctl?
 
I thought that PF is filtering packets from kernel level and not from user level otherwise things would be terribly slow.

Seriously, from where you got such information?
 
oops sorry. what i meant is usually bpf filters packets at kernel level and then sends it to the user level. But is it possible for me to filter the packets using a kernel module which uses bpf?

Thanks.
 
Back
Top