Making devices
Greg 'groggy' Lehey
grog at FreeBSD.org
Mon Apr 7 22:33:06 PDT 2003
On Tuesday, 8 April 2003 at 1:12:36 -0400, David Banning wrote:
> On Mon, Apr 07, 2003 at 10:33:20PM -0700, A.Z. wrote:
>> Quick question...
>>
>> How to create new devices under FreeBSD 5.0 ?
>> In particular case I need to create bunch of bpf devices.
They should appear automatically. You should have one if you have bpf
configured or the kld loaded. When you open them, they clone. For
example,
$ ls -l /dev
...
crw-rw-rw- 1 root wheel 30, 0x00030004 Apr 7 14:52 audio0.3
crw------- 1 root wheel 23, 0 Apr 7 14:52 bpf0
crw-rw-rw- 1 root wheel 21, 0 Apr 7 14:52 bpsm0
$ tcpdump
tcpdump: listening on wi0
15:00:16.755852 sydney.lemis.com.49156 > wantadilla.lemis.com.x11: P 1376454855:1376454919(64) ack 3154843215 win 33304 <nop,nop,timestamp 8684522 370287376> (DF)
15:00:16.756280 sydney.lemis.com.49156 > wantadilla.lemis.com.x11: P 64:312(248) ack 1 win 33304 <nop,nop,timestamp 8684522 370287376> (DF)
^C
$ ls -l /dev
...
crw-rw-rw- 1 root wheel 30, 0x00030004 Apr 7 14:52 audio0.3
crw------- 1 root wheel 23, 0 Apr 7 14:52 bpf0
crw------- 1 root wheel 23, 1 Apr 7 14:52 bpf1
crw-rw-rw- 1 root wheel 21, 0 Apr 7 14:52 bpsm0
> man MAKEDEV
MAKEDEV no longer exists in FreeBSD 5.0. devfs creates the device
nodes automatically.
Greg
--
When replying to this message, please copy the original recipients.
If you don't, I may ignore the reply or reply to the original recipients.
For more information, see http://www.lemis.com/questions.html
See complete headers for address and phone numbers
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20030408/77007d33/attachment.bin
More information about the freebsd-questions
mailing list