Provides access to the token-ring adapters by way of the token-ring device handler.
The tokn character special file provides access to the token-ring device handler that provides access to a token-ring local area network. The device handler supports up to four token-ring adapters.
When accessing the token-ring device handler, the following should be taken into account:
The device handler may be loaded and unloaded. The device handler supports the configuration calls to initialize and terminate itself.
Calls other than the open and close subroutines are discussed based on the mode in which the device handler is operating.
The token-ring device handler provides specific support for the open, close, read, write, and ioctl subroutines.
The device handler supports the
/dev/tokn special file as a character-multiplex special
file. The special file must be opened for both reading and writing (O_RDWR). There are no particular
considerations for closing the special file. The special file name used
in an open call depends upon how the device is to be opened.
The three types of special file names are:
Can take the form of a read, readx, readv, or readvx subroutine. For this call, the device handler copies the data into the buffer specified by the caller.
Can take the form of a write, writex, writev, or writevx subroutine. For this call, the device handler copies the user data into a kernel buffer and transmits the data on the LAN.
The token-ring device handler
supports the following ioctl operations:
CIO_GET_STAT | Returns current adapter and device handler status. |
CIO_HALT | Halts a session and removes a network ID from the network ID table. |
CIO_QUERY | Returns the current counter values, as defined in the /usr/include/sys/comio.h and /usr/include/sys/tokuser.h files. |
CIO_START | Starts a session and registers a network ID. |
IOCINFO | Returns a structure of device information to the user specified area. The devtype field is DD_NET_DH and the devsubtype field is DD_TR, as defined in the /usr/include/sys/devinfo.h file. |
TOK_GRP_ADDR | Allows the setting of the active group address for the token-ring adapter. |
TOK_FUNC_ADDR | Allows the setting of a functional address for the token-ring adapter. |
TOK_QVPD | Returns adapter vital product data. |
TOK_RING_INFO | Returns information about the token-ring device. |
The following error conditions may
be returned when accessing the device handler through the
dev/tokn special file:
This file functions with the token-ring Device Handler.
The close subroutine, open subroutine, read or readx subroutine, write or writex subroutine.