[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
Kernel and Subsystems Technical Reference, Volume 2

CIO_GET_STAT (Get Status) entioctl Ethernet Device Handler Operation

Purpose

Returns the current Ethernet adapter and device handler status.

Description

Note: Only user-mode callers can use the CIO_GET_STAT operation.

The CIO_GET_STAT operation returns the current Ethernet adapter and device handler status. The device handler fills in the parameter block with the appropriate information upon return. For this operation, the arg parameter points to a status block structure. This structure is defined in the /usr/include/sys/comio.h file.

Status Blocks for the Ethernet Device Handler

Status blocks are used to communicate status and exception information to user-mode processes.

User-mode processes receive a status block whenever they request a CIO_GET_STAT operation. A user-mode process can wait for the next available status block by issuing a entselect entry point with the specified POLLPRI event.

Status blocks contain a code field and possible options. The code field indicates the type of status block code (for example, CIO_START_DONE).

Ethernet-specific status blocks are:

The Ethernet device handler also returns the following general communications status blocks:

CIO_START_DONE

On successful completion of the CIO_START entioctl operation, a status block having the following fields is provided:

option[0] CIO_OK.
option[1] The two high-order bytes contain the two high-order bytes of the network address. The two low-order bytes contain the middle two bytes of the network address.
option[2] The two low-order bytes contain the two low-order bytes of the network address.

CIO_HALT_DONE

On successful completion of the CIO_HALT entioctl operation, a status block having the following fields is provided:

option[0] CIO_OK
option[1] Not used
option[2] Not used

Execution Environment

A CIO_GET_STAT operation can be called from the process environment only.

Return Values

The return codes for the CIO_GET_STAT operation are:

EACCES Indicates that permission was denied.
EBUSY Indicates that the open request was denied because the device was already open in Diagnostic mode or because the adapter was busy.
ENODEV Indicates that no such device exists.
ENXIO Indicates that an attempt was made to use an unconfigured device.

Implementation Specifics

The CIO_GET_STAT operation functions with an Ethernet High-Performance LAN adapter that has been correctly configured for use on a qualified network. Consult the adapter specifications for more information on configuring the network adapter and network qualifications.

Related Information

The entioctl entry point.


[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]