Opens a generic data link control (GDLC) channel.
#include <sys/device.h> #include <sys/gdlextcb.h>
int dlcopen (devno, devflag, chan, ext) dev_t devno; ulong_t devflag; int chan, ext;
Note: The dlc prefix is replaced with the three-digit prefix for the specific GDLC device manager being opened.
The dlcopen entry point is called when a user's application program invokes the open or openx subroutine, or when a kernel user calls the fp_open kernel service. The GDLC device manager opens the specified communications device handler and creates a kernel process to catch posted events from that port. Additional opens to the same port share both the device handler open and the GDLC kernel process created on the original open.
Note: It may be more advantageous to handle the actual device handler open and kernel process creation in the dlcmpx routine. This is left as a specific DLC's option.
The following return values are defined in the /usr/include/sys/errno.h file.
0 | Indicates a successful operation. |
ECHILD | Indicates that the device manager 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 subroutine. |
EFAULT | Indicates that a kernel service, such as the copyin or initp kernel service was unsuccessful. |
Each GDLC supports the dlcopen entry point as its switch table entry for the open and openx subroutines. The file system calls this entry point from the process environment only.
The open or openx subroutine.
The ddopen device entry point.
The dlcclose entry point of the GDLC device manager, dlcmpx entry point of the GDLC device manager.
The fp_open kernel service, copyin kernel service, initp kernel service.
Generic Data Link Control (GDLC) Environment Overview in AIX Version 4.3 Communications Programming Concepts.