[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
Communications Technical Reference, Volume 1

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);
int fildes;
int op;
char *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, see "ioctl Operations (op) for DLC" and "Parameter Blocks by ioctl Operation for DLC" .

Parameters

fildes Specifies the file descriptor of the target GDLC.
op Specifies the operation to be performed by GDLC. See "ioctl Operations (op) for DLC" for a listing of all possible operators.
arg Specifies the address of the parameter block. See "Parameter Blocks by ioctl Operations for DLC" for a listing of possible values.

Return Values

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:

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

Implementation Specifics

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

Related Information

The ioctl subroutine.

ioctl Operations (op) for DLC .

Parameter Blocks by ioctl Operation for DLC .

Generic Data Link Control (GDLC) Environment Introduction in AIX Version 4.3 Communications Programming Concepts.


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