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

entwrite Ethernet Device Handler Entry Point

Purpose

Provides the means for transmitting data from the Ethernet device.

Syntax

#include <sys/device.h>
#include <sys/uio.h>
#include <sys/comio.h>
#include <sys/entuser.h>
int entwrite (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 that provides variables to control the data transfer operation. This uio structure is defined in the /usr/include/sys/uio.h file.
chan Specifies the channel number assigned by the entmpx entry point.
ext Specifies the address of the entwrite parameter block. If the ext parameter is null, then no parameter block is specified.

Description

The entwrite entry point provides the means for transmitting data for the Ethernet device. The kernel calls it when a user-mode caller issues a write, writex, writev, or writevx subroutine.

For a user-mode caller, the file system fills in the uio structure variables with the appropriate values. A kernel-mode caller must fill in the uio structure in the same manner as the general ddwrite entry point.

For the entwrite entry point, the ext parameter is a pointer to a write_extension structure. This structure is defined in the /usr/include/sys/comio.h file and contains the following fields:

status Identifies the status of the write operation. This field is in the write_extension structure and accepts the following values:
write_id For a user-mode caller, the write_id field is returned to the caller by the CIO_GET_STAT operation if the ACK_TX_DONE option is selected. For a kernel-mode caller, the write_id field is returned to the caller by the stat_fn function that was provided at open time.

Execution Environment

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

EAGAIN Indicates the transmit queue is full.
EFAULT Indicates a specified address is not valid.
EINTR Indicates an interrupted system call.
EINVAL Indicates an address range or op code is not valid.
ENOCONNECT Indicates no connection was established.
ENOMEM Indicates insufficient memory.
EBUSY Indicates the maximum number of opens was exceeded.
ENODEV Indicates the specified device does not exist.
ENXIO Indicates an attempt to use an unconfigured device.

Implementation Specifics

The entwrite 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, entread entry point, ent_fastwrt entry point.

The CIO_GET_FASTWRT ddioctl Communications PDH Operation.

The write, writex, writev, or writevx subroutine.

The uio structure.


[ Previous | Next | Contents | Home | Search ]