The Node(DSP/4dsp) file provides information used by the idmknodd utility to create the special device files for the devices supported by this driver. A sample Node file is:
$maxchan 1 sample sample/%i/normal c 0 sample sample/%i/delay c 1The $maxchan value specifies the maximum supported channel number for the driver. This value must match the value passed to the drv_attach(D3) function in the
drv_maxchanmember of the drvinfo(D4) structure. Drivers that support only a single channel set $maxchan 0. This example is for a driver that supports two channels.
$maxchan determines the number of device nodes that the idmknodd command will create per instance of a device. For example, an 8-port serial board usually requires at least 16 nodes, two for each port to indicate modem or non-modem control, so $maxchan would be set to 15.
Drivers that use open redirection (``cloning'') should create one channel for the initial open plus one for each clone channel. See open(D2) for more information about open redirection.
The remaining lines in the Node file control the actual files created in the /dev directory. The first field is the name of the driver, to match that field in the other DSP files. The second field specifies the name that will be given to the special device files. This sample uses %i to indicate that one node will be created for each instance of this driver's device, using the specified name as a root name. See ``Device instance''. %i is required for DDI 8 drivers on early releases of SVR5. Beginning with Release 7.1, %i is optional.
This line will create special device files with names such as /dev/sample0 and /dev/sample1. This field could specify a subdirectory to be used. For example, a value of mdi/foo0 creates a special device file named /dev/mdi/foo0.
The c specifies the type; this will be a character special device file. The 0 in the first line and 1 in the second line are the channel numbers.
Additional fields are documented on the Node(DSP/4dsp) manual page. You can specify the user and group permissions and the security level. Note that the user and group must be specified as decimal integer values rather than using strings such as ``root'' and ``sys''.
Note that special device nodes for DDI versions prior to version 8 are created by the idmknod utility and use a different format for their Node files. See the Node(DSP/4dsp) manual page for details.