Returns device statistics and device-dependent information.
Note: The counters and profile information can only be cleared by a system user.
The CIO_QUERY x25sioctl operation returns the ras_log field of the define device structure (DDS).
For the CIO_QUERY operation, the arg parameter returns a pointer to the query_params structure. This structure contains the following fields:
| status | Contains the returned value if the return code is EIO. | 
| bufptr | Points to an x25_query_data structure. This structure contains the following fields: | 
| buflen | Specifies the length of the buffer. | 
| clearall | Clears the statistics when set to CIO_QUERY_CLEAR. Any other setting leaves the statistics unchanged. | 
The x25_stats structure identifies X.25-specific statistics. Information in this structure includes the transmit_profile field. This field provides a profile of the transmission packet sizes in use on a port and can be used for configuration of adapter buffers. The transmit_profile field contains a count of the number of packets sent since the device was last configured. The size of these packets must be in the range specified.
| Index | Size | 
|---|---|
| 0 | Packet size not known | 
| 1 | Reserved | 
| 2 | Reserved | 
| 3 | Reserved | 
| 4 | 0 - 15 | 
| 5 | 16 - 31 | 
| 6 | 32 - 63 | 
| 7 | 64 - 127 | 
| 8 | 128 - 255 | 
| 9 | 256 - 511 | 
| 10 | 512 - 1023 | 
| 11 | 1024 - 2047 | 
| 12 | 2048 - 4095 | 
| >12 | Reserved | 
The CIO_QUERY operation can be called from the process environment only.
A return code of -1 indicates an unsuccessful operation and the kernel sets the errno global variable to one of the following values:
The CIO_QUERY operation functions with an X.25 Interface Co-Processor/2 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 x25sioctl device handler entry point.