fp_ioctl Kernel Service for Data Link Control (DLC) Devices
Purpose
Transfers special commands from the kernel to generic data link control (GDLC) using a file pointer.
Syntax
#include <sys/gdlextcb.h>
#include <fcntl.h>
int fp_ioctl (fp, cmd, arg, ext)
Parameters
Item | Description |
---|---|
fp | Specifies the file pointer of the target GDLC. |
cmd | Specifies the operation to be performed by GDLC. |
arg | Specifies the address of the parameter block. The argument for this parameter must be in the kernel space. |
ext | Specifies the extension parameter. This parameter is ignored by GDLC. |
Description
Various GDLC functions can be initiated using the fp_ioctl kernel service, such as changing configuration parameters, contacting the remote, and testing a link. Most of these operations can be completed before returning to the user synchronously. Some operations take longer, so asynchronous results are returned much later using the exception function handler. GDLC calls the kernel user's exception handler to complete these results. Each GDLC supports the fp_ioctl kernel service by way of its dlcioctl entry point. The fp_ioctl kernel service may be called from the process environment only.
Return Values
Item | Description |
---|---|
0 | Indicates a successful completion. |
ENXIO | Indicates an invalid file pointer. |
EINVAL | Indicates an invalid value. |
ENOMEM | Indicates insufficient resources to satisfy the ioctl subroutine. |
These return values are defined in the /usr/include/sys/errno.h file.