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) char path; unsigned int oflags; unsigned int cmode; int ext; unsigned int segflag; struct file **fpp;
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:
/dev/dlcether/ent0 | ||||
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 4.3 Technical Reference: Communications Volume 1 provides 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. "Using GDLC Special Kernel Services" in AIX 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.
These return values are defined in the /usr/include/sys/errno.h file.
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.
The copyin kernel service, fp_open kernel service, initp kernel service.
The fp_close kernel service for data link control (DLC) devices.
open Subroutine Extended Parameters for DLC in AIX Version 4.3 Technical Reference: Communications Volume 1.
Generic Data Link Control (GDLC) Environment Overview and Using GDLC Special Kernel Services in AIX Version 4.3 Communications Programming Concepts.