Berkeley packet filter device in kernel config

Max Laier max at love2party.net
Wed Mar 24 12:15:36 PST 2004


On Wednesday 24 March 2004 20:33, MaNUaL wrote:
> Hi. I am using 5.2.1-RELEASE-p3 and in the GENERIC
> configuration file of the kernel in
> /usr/src/sys/i386/conf there is the following line:
>
> device bpf # Berkeley packet filter
>
> Though, in the FreeBSD handbook it says:
>
> pseudo-device bpf # Berkeley packet filter
>
> I have used "device bpf" but there is no /dev/bpf* at
> all...
>
> Am i missing something here? How should i define this?
> pseudo-device or device?

"pseudo-device" is gone for a long time now (in 5.x at least). If the handbook 
referse to pseudo-device it must be updated.

"device bpf" gives what you are looking for, but the device nodes are not 
created as long as they are not used. Try for example:
# tcpdump -i lo0
^C
and you will find /dev/bpf0 afterwards. More information on this topic is in 
the archives ... search for "mega patch", "device cloning" and "bfp0" --- 
iirc the same issue was discussed back then. I think you just have to open() 
or stat() the device and devfs will do the rest.

-- 
Best regards,				| mlaier at freebsd.org
Max Laier				| ICQ #67774661
http://pf4freebsd.love2party.net/	| mlaier at EFnet
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: signature
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20040324/4248de0a/attachment.bin


More information about the freebsd-current mailing list