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

entread Ethernet Device Handler Entry Point

Purpose

Provides the means of receiving data from the Ethernet device handler.

Syntax

#include <sys/device.h>
#include <sys/uio.h>
int entread (devno, uiop, chan, ext)
dev_t devno;
struct uio *uiop;
int chan, ext;

Parameters

devno Specifies major and minor device numbers.
uiop Points to a uio structure. This structure is defined in the /usr/include/sys/uio.h file.
chan Specifies the channel number assigned by the entmpx routine.
ext Can specify the address of the entread parameter block. If the ext parameter is null, then no parameter block is specified.

Description

Note: The entread entry point should only be called by user-mode callers.

The entread entry point provides the means of receiving data from the Ethernet device handler. When a user-mode caller issues a read, readx, readv, or readvx subroutine, the kernel calls the entread entry point.

When the entread entry point is called, the file system fills in the uio structure fields with the appropriate values. In addition, the device handler copies the data into the buffer specified by the caller.

For the entread entry point, the ext parameter may point to the read_extension structure. This structure is defined in the /usr/include/sys/comio.h file and contains the following field:

status Contains one of the following status codes:

Execution Environment

An entread 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 entread entry point are the following:

EACCES Indicates permission was denied because the device was already open. Diagnostic mode open request denied.
EFAULT Indicates a specified address is not valid.
EINTR Indicates an interrupted system call.
EIO Indicates an I/O error.
EMSGSIZE Indicates the data returned was too large for the buffer.
EBUSY Indicates the maximum number of opens was exceeded.
ENODEV Indicates the specified device does not exist.
ENOCONNECT Indicates no connection was established.
ENXIO Indicates an attempt to use an unconfigured device.

Implementation Specifics

The entread 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 entmpx entry point.

Common Communications Status and Exception Codes in AIX Kernel Extensions and Device Support Programming Concepts.


[ Previous | Next | Contents | Home | Search ]