[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Communications Technical Reference, Volume 1

dlcmpx Entry Point of the GDLC Device Manager

Purpose

Decodes the device handler's special file name appended to the open call.

Syntax

#include <sys/device.h>
int dlcmpx (devno, chanp, channame)
dev_t devno;
int *chanp;
char *channame;
Note: The dlc prefix is replaced with the three-digit prefix for the specific GDLC device manager being opened.

Description

The operating system calls the dlcmpx entry point when a generic data link control (GDLC) channel is allocated. This routine decodes the name of the device handler appended to the end of the GDLC special file name at open time. GDLC allocates the channel and returns the value in the chanp parameter.

This routine is also called following a close subroutine to deallocate the channel. In this case the chanp parameter is passed to GDLC to identify the channel being deallocated. Since GDLC allocates a new channel for each open subroutine, a dlcmpx routine follows each call to the dlcclose routine.

Parameters

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. There is one dev_t device number for each type of GDLC, such as Ethernet, Token-Ring, or SDLC.
chanp Specifies the channel ID returned if a valid path name exists for the device handler, and the openflag is set. If no channel ID is allocated, this parameter is set to a value of -1 by GDLC.
channame Points to the appended path name (path name extension) of the device handler that is used by GDLC to attach to the network. If this is null, the channel is deallocated.

Return Values

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

0 Indicates a successful operation.
EBADF Indicates a bad file number.
EINVAL Indicates an invalid value.

Implementation Specifics

Each GDLC supports the dlcmpx entry point as its switch table entry for the open and close subroutines. The file system calls this entry point from the process environment only.

Related Information

The close subroutine, open subroutine.

The ddmpx device entry point.

The dlcclose entry point for the GDLC device manager, dlcopen entry point for the GDLC device manager.

Generic Data Link Control (GDLC) Environment Overview in AIX Version 4.3 Communications Programming Concepts.


[ Previous | Next | Contents | Glossary | Home | Search ]