Allows kernel to open the generic data link control (GDLC) device manager by its device name.
#include <sys/gdlextcb.h>
#include <fcntl.h>
fp_open (path, oflags, cmode, ext, segflag, fpp)
Item | Description |
---|---|
path | Consists of a character string containing the /dev special
file name of the GDLC device manager, with the name of the communications
device handler appended. The format is shown in the following example:
|
oflags | Specifies a value to set the file status flag. The GDLC device
manager ignores all but the following values:
|
cmode | Specifies the O_CREAT mode parameter. This is ignored by GDLC. |
ext | Specifies the extended kernel service parameter. This is a pointer to the dlc_open_ext extended I/O structure for open subroutines. The argument for this parameter must be in the kernel space. "open Subroutine Extended Parameters for DLC"AIX® Version 7.1 Technical Reference: Communications, Volume 1provides more information on the extension parameter. |
segflag | Specifies the segment flag indicating where the path parameter
is located:
|
fpp | Specifies the returned file pointer. This parameter is passed by reference and updated by the file I/O subsystem to be the file pointer for this open subroutine. |
The fp_open kernel service allows the kernel user to open a GDLC device manager by specifying the special file names of both the DLC and the communications device handler. Since the GDLC device manager is multiplexed, more than one process can open it (or the same process multiple times) and still have unique channel identifications.
Each open carries the communications device handler's special file name so that the DLC knows which port to transfer data on.
The kernel user must also provide functional entry addresses in order to obtain receive data and exception conditions. Each GDLC supports the fp_open kernel service via its dlcopen entry point. The fp_open kernel service may be called from the process environment only. "Using GDLC Special Kernel Services" in AIX Version 6.1 Communications Programming Concepts provides additional information.
Upon successful completion, this service returns a value of 0 and a valid file pointer in the fpp parameter.
Item | Description |
---|---|
ECHILD | Indicates that the service cannot create a kernel process. |
EINVAL | Indicates an invalid value. |
ENODEV | Indicates that no such device handler is present. |
ENOMEM | Indicates insufficient resources to satisfy the open. |
EFAULT | Indicates that the kernel service, such as the copyin or initp service, has failed. |
These return values are defined in the /usr/include/sys/errno.h file.