CIO_GET_STAT ddioctl Communications PDH Operation

Purpose

Returns the next status block in a status queue to user-mode process.

Syntax

#include <sys/device.h>
#include <sys/comio.h>

int ddioctl
(
devno, op, parmptr,
devflag, chan, ext)
dev_t  devno;
int  op;
struct status_block * parmptr;
ulong  devflag;
int  chan,
ext;

Parameters

Item Description
devno Specifies major and minor device numbers.
op Indicates the entry point for the CIO_GET_STAT operation.
parmptr Points to a status_block structure. This structure is defined in the /usr/include/sys/comio.h file.
devflag Specifies the DKERNEL flag. This flag must be clear, indicating a call by a user-mode process.
chan Specifies the channel number assigned by the device-handler ddmpx entry point.
ext Indicates device-dependent.

Description

Note: This entry point should not be called by kernel-mode processes.

The CIO_GET_STAT operation returns the next status block in the status queue to a user-mode process.

Execution Environment

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

Return Values

In general, communication device handlers use the common codes defined for an operation. However, device handlers for specific communication devices may return device-specific codes. The common return codes for the CIO_GET_STAT operation are the following:

Item Description
ENXIO Indicates an attempt to use an unconfigured device.
EFAULT Indicates the specified address is not valid.
EINVAL Indicates a parameter is not valid.
EACCES Indicates a call from a kernel process is not valid.
EBUSY Indicates the maximum number of opens was exceeded.
ENODEV Indicates the device does not exist.