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

CIO_QUERY (Query Statistics) entioctl Ethernet Device Handler Operation

Purpose

Reads the counter values accumulated by the Ethernet device handler.

Description

The CIO_QUERY operation reads the counter values accumulated by the device handler. The counters are initialized to 0 (zero) by each CIO_START operation issued.

For the CIO_QUERY operation, the arg parameter points to a query_parms structure. This structure is defined in the /usr/include/sys/comio.h file and contains the following fields:

status Specifies the current status condition. This field accepts two possible status values:
buffptr Specifies the address of a buffer where the returned statistics are to be placed.
bufflen Specifies the length of the buffer.
clearall When set to a value of CIO_QUERY_CLEAR, the counters are cleared upon completion of the call. This value is defined in the /usr/include/sys/comio.h file.

The CIO_QUERY operation specifies the device-specific information placed in the supplied buffer. The counter placed in the supplied buffer by this operation is the ent_query_stats_t structure, which is defined in the /usr/include/sys/entuser.h file.

Execution Environment

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

Return Values

The return codes for the CIO_QUERY operation are:

ENOMEM Indicates insufficient memory.
EIO Indicates the caller's buffer is too small.
EBUSY Indicates the open request was denied because the device was already open in Diagnostic mode or because the adapter was busy.
ENODEV Indicates no such device exists.
ENXIO Indicates an attempt to use an unconfigured device.

Implementation Specifics

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

Related Information

The entioctl entry point, entopen entry point.

The CIO_START entioctl Ethernet Device Handler Operation.


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