entopen Ethernet Device Handler Entry Point

Purpose

Note: This function is supported in AIX® 5.1 and earlier only.

Initializes the Ethernet device handler and allocates the required system resources.

Syntax

#include <sys/device.h>
#include <sys/comio.h>
#include <sys/entuser.h>

int entopen (devno, devflag, chan, ext)
dev_t  devno;
ulong  devflag;
int  chan,  ext;

Parameters

Item Description
devno Specifies major and minor device numbers for both kernel- and user-mode entry pointers.
devflag Specifies the DKERNEL flag, which must be set for a kernel-mode entry pointer. This flag cannot be set for user-mode entry pointers.
chan Specifies the channel number assigned by the entmpx routine for both kernel- and user-mode entry pointers.
ext Points to a kopen_ext structure. This structure is defined in the /usr/include/sys/comio.h file. This parameter is valid only for kernel-mode users; it is null for user-mode users.

Description

The entopen entry point prepares the Ethernet device for transmitting and receiving data. It is called when a user-mode entry pointer issues an open, openx, or creat subroutine. After the entopen entry point has successfully completed, the entry pointer must issue a CIO_START operation before using the Ethernet device handler. The device handler is then opened for reading and writing data.

The entopen entry point functions with an Ethernet High-Performance LAN adapter that has been correctly configured for use on a qualified network. Consult the adapter specifications for more information on configuring the network adapter and network qualifications.

Execution Environment

An entopen entry point can be called from the process environment only.

Return Values

In general, communication device handlers use the common return codes defined for an entry point. However, device handlers for specific communication devices may return device-specific codes. The common return codes for the entopen entry point are the following:

Return Code Description
EINVAL Indicates a range or op code that is not valid, or that the device is not in diagnostic mode.
ENOMEM Indicates insufficient memory.
ENOTREADY Indicates that the device was not ready. The first CIO_START operation was not issued and hence not completed.
ENXIO Indicates that no such device exists. (The maximum number of adapters was exceeded.)