Provides functions for initializing, terminating, and querying the vital product data (VPD) of the token-ring device handler.
#include <sys/device.h> #include <sys/uio.h> #include <sys/comio.h> #include <sys/tokuser.h>
int tokconfig (devno, cmd, uiop) dev_t devno; int cmd; struct uio *uiop;
devno | Specifies major and minor device numbers. |
cmd | Identifies the function to be performed by the tokconfig routine. |
uiop | Points to a uio structure, that describes the relevant data area for reading or writing. |
The tokconfig entry point provides functions for initializing, terminating, and querying the VPD of the token-ring device handler. The tokconfig routine is invoked at device configuration time. The tokconfig entry point provides the following three operations:
CFG_INIT | Initializes the token-ring device handler. The token-ring device handler
registers the entry points in the device switch table.
The token-ring define device structure (DDS) address and length is described in the uio structure. The DDS is copied into an internal save area by the device handler. |
CFG_TERM | Terminates the token-ring device handler. If there are no outstanding opens, the token-ring device handler marks itself terminated and prevents subsequent opens. All dynamically allocated areas are freed. All token-ring device handler entry points are removed from the device switch table. |
CFG_QVPD | Returns the token-ring VPD to the caller. The VPD is placed in the area specified by the caller in the uio structure. |
The tokconfig entry point can be called from the process environment only.
Depending on the operation selected, the tokconfig entry point returns values.
ENOENT | Indicates there was no device to query the VPD. |
EFAULT | Indicates that the specified address is not valid. |
EACCES | Indicates the token-ring device handler is not initialized. |
The tokconfig entry point functions with a Token-Ring High Performance Network adapter that has been correctly configured for use on a qualified network. Consult adapter specifications for more information on configuring the adapter and network qualifications.
The uio structure in AIX Version 4.3 Technical Reference: Kernel and Subsystems Volume 1.