dlcioctl Entry Point of the GDLC Device Manager

Purpose

Issues specific commands to generic data link control (GDLC).

Syntax

#include <sys/device.h>
#include <sys/gdlextcb.h>
int dlcioctl (devno, op, arg, devflag, chan, ext)
Note: The dlc prefix is replaced with the three-digit prefix for the specific GDLC device manager being controlled.

Description

The dlcioctl entry point is called when an application program invokes the ioctl subroutine or when a kernel user calls the fp_ioctl kernel service. The dlcioctl routine decodes commands for special functions in the GDLC.

Each GDLC supports the dlcioctl entry point as its switch table entry for the ioctl subroutine. The file system calls this entry point from the process environment only.

Parameters

Item Description
devno Indicates major and minor device numbers. This is a dev_t device number that specifies both the major and minor device numbers of the GDLC device manager. One dev_t device number exists for each type of GDLC, such as Ethernet, Token-Ring, or SDLC.
op Specifies the parameter from the subroutine that specifies the operation to be performed.
arg Indicates the parameter from the subroutine that specifies the address of a parameter block.
devflag Specifies the flag word with the following flags defined:
DKERNEL
Entry point called by kernel routine using the fp_open kernel service. This indicates that the arg parameter points to kernel space.
DREAD
Open for reading. This flag is ignored.
DWRITE
Open for writing. This flag is ignored.
DAPPEND
Open for appending. This flag is ignored.
DNDELAY
Device open in nonblocking mode. This flag is ignored.
chan Specifies the channel ID assigned by GDLC in the dlcmpx routine at open time.
ext Specifies the extended subroutine parameter. This parameter is ignored by GDLC.

Return Values

The following return values are defined in the /usr/include/sys/errno.h file.

Value Description
0 Indicates a successful operation.
EBADF Indicates a bad file number.
EINVAL Indicates an invalid value.
ENOMEM Indicates insufficient resources to satisfy the ioctl subroutine.