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

CIO_QUERY (Query Statistics) tokioctl Token-Ring Device Handler Operation

Purpose

Allows the caller to read the counter values accumulated by a token-ring device handler.

Description

The CIO_QUERY tokioctl operation is used by the caller to read the counter values accumulated by a token-ring device handler. The first call to the tokopen entry point initializes the counters to 0.

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

status Indicates the status of the port. Returns one of the following status values:
  • CIO_OK
  • CIO_INV_CMD
buffptr Specifies the address of a buffer where the returned statistics are to be placed.
bufflen Specifies the length of the buffer.
clearall When this value equals CIO_QUERY_CLEAR, the counters are cleared upon completion of call. The CIO_QUERY_CLEAR label can be found in the /usr/include/sys/comio.h file.

The counters placed in the supplied buffer by the CIO_QUERY operation are the counters declared in the tok_query_stats_t structure defined in the /usr/include/sys/tokuser.h file.

Execution Environment

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

Return Values

EFAULT Indicates that the specified address is not valid.
EINVAL Indicates that a parameter is not valid.

Implementation Specifics

The CIO_QUERY operation 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 ddioctl (CIO_QUERY) entry point.

The tokioctl entry point, tokopen entry point.

Common Communications Status and Exception Codes in AIX Kernel Extensions and Device Support Programming Concepts.


[ Previous | Next | Contents | Home | Search ]