intro – introduction to the Plan 9 devices
A Plan 9
implements a file tree for client processes.
A file name beginning with a pound sign, such as
names the root of a file tree implemented by
kernel device driver
identified by the character after the pound sign.
Such names are usually bound to conventional locations
in the name space.
For example, after
bind("#c", "/dev", MREPL)
will list the files provided by the
A kernel device driver is a
in the sense of the Plan 9 File Protocol, 9P (see Section 5),
but with the messages implemented by local
rather than remote procedure calls.
Also, several of the messages
have no subroutine equivalents.
When a system call is passed a file name beginning with
it looks at the next character, and if that is a valid
it performs an
on the corresponding device to get a channel representing the
root of that device’s file tree.
If there are any characters after the device character but
before the next
or end of string, those characters are passed as parameter
to the attach. For example,
identifies the number 2 IP protocol stack
Each kernel device has a conventional place at which to be bound
to the name space.
sections of the following pages includes a
command to put the device in the conventional place.
Most of these binds are done automatically by
on the file
When typed to
commands will need quotes to protect the