[ Previous | Next | Contents | Home | Search ]
AIX Version 4.3 Kernel and Subsystems Technical Reference, Volume 2

entopen Ethernet Device Handler Entry Point

Purpose

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

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.

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:

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.)

Implementation Specifics

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.

Related Information

The entclose entry point, entmpx entry point.

The open, openx, or create subroutine.

The CIO_START entioctl Ethernet Device Handler Operation.


[ Previous | Next | Contents | Home | Search ]