ioctl Subroutine Interface for Data Link Control (DLC) Devices

Purpose

Transfers special commands to generic data link control (GDLC) using a file descriptor.

Syntax

#include <sys/ioctl.h>
#include <sys/devinfo.h>
#include <sys/gdlextcb.h>

int ioctl ( fildes,  op,  arg);

Description

The ioctl subroutine initiates various GDLC functions, such as changing configuration parameters, contacting a remote link, and testing a link. Most of these operations can be completed before returning to the user (synchronously). Since some operations take longer, asynchronous results are returned later using the exception condition notification. Application users can obtain these exceptions using the DLC_GET_EXCEP ioctl operation. For more information on the functions that can be initiated using the ioctl subroutine.

Each GDLC supports the ioctl subroutine interface via its dlcioctl entry point. This subroutine may be called from the process environment only.

Parameters

Item Description
fildes Specifies the file descriptor of the target GDLC.
op Specifies the operation to be performed by GDLC.
arg Specifies the address of the parameter block.

Return Values

Item Description
0 Indicates a successful operation.

If an error occurs, a value of -1 is returned with one of the following error values available using the errno global variable, as defined in the /usr/include/sys/errno.h file:

Value Description
EBADF Indicates a bad file number.
EINVAL Indicates an invalid argument.
ENOMEM Indicates insufficient resources to satisfy the ioctl subroutine.