INDIR(3)INDIR(3)NAMEindir - attach to device indirectly by name
SYNOPSIS
bind #*name [!spec] dir
DESCRIPTION
Indir allows any other device to be referred to by its name instead of
its perhaps arbitrary single character type; indir itself has the type
character `*'. It has no name space of its own. On attach (see
attach(5)) indir interprets its device specifier string as the name of
a device to which it should attach, optionally followed by specifier
spec for that device, separated from the name by an exclamation mark.
Attaching to indir (eg, by sys-bind(2)), effectively attaches to the
device with the given name and spec, and all subsequent operations in
the resulting name space access that device, not indir itself.
For example, to access cap(3), one could write:
bind -a '#*cap' /dev
The following commands both list the second instance of ether(3), first
directly, then using indir:
ls '#l1'
ls '#*ether!1'
The file /dev/drivers (see cons(3)) lists the names of currently con‐
figured devices.
Credit
Invented by Bruce Ellis for Lucent's internal Research Inferno to help
name dynamically-loaded device drivers. This is a re-implementation.
SOURCE
/emu/port/devindir.c
/os/port/devindir.c
SEE ALSObind(1), sys-bind(2), cons(3)DIAGNOSTICS
If name is not configured, indir returns a suitable diagnostic in the
error string.
BUGS
Arguably the kernel could simply look up the name itself.
INDIR(3)