[ Previous | Next | Contents | Home | Search ]
AIX Version 4.3 Kernel and Subsystems Technical Reference, Volume 2

tokconfig Token-Ring Device Handler Entry Point

Purpose

Provides functions for initializing, terminating, and querying the vital product data (VPD) of the token-ring device handler.

Syntax

#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;

Parameters

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.

Description

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.

Execution Environment

The tokconfig entry point can be called from the process environment only.

Return Values

Depending on the operation selected, the tokconfig entry point returns values.

Return Values for the CFG_INIT Operation

ENOMEM Indicates the routine was unable to allocate space for the DDS.
EEXIST Indicates the device was already initialized.
EINVAL Indicates the DDS provided is not valid.
ENXIO Indicates the initialization of the token-ring device was unsuccessful.
EFAULT Indicates that the specified address is not valid.

Return Values for the CFG_TERM Operation

EBUSY Indicates there are outstanding opens unable to terminate.
ENOENT Indicates there was no device to terminate.
EACCES Indicates the device was not configured.
EEXIST Unable to remove the device from the device switch table.

Return Values for the CFG_QVPD Operation

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.

Implementation Specifics

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.

Related Information

The uio structure in AIX Version 4.3 Technical Reference: Kernel and Subsystems Volume 1.


[ Previous | Next | Contents | Home | Search ]