[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Files Reference

entn Special File

Purpose

Provides access to Ethernet high-performance LAN adapters by way of the Ethernet device handler.

Description

The /dev/entn character special file provides access to the Ethernet device handler for the purpose of providing access to an Ethernet LAN. The device handler supports up to four adapters, each of which may be running either or both of the standard Ethernet and IEEE 802.3 protocols.

Usage Considerations

When accessing the Ethernet device handler, the following should be taken into account:

Driver Initialization and Termination

The device handler can be loaded and unloaded. The handler supports the configuration calls to initialize and terminate itself.

Special File Support

Calls other than the open and close subroutines are discussed based on the mode in which the device handler is operating.

Subroutine Support

The Ethernet device handler supports the open and close, read, write, and ioctl subroutines in the following manner:

open and close Subroutines

The device handler supports the /dev/entn special file as a character-multiplex special file. The special file must be opened for both reading and writing (O_RDWR). However, there are no particular considerations for closing the special file. The special file name used in an open call depends upon how the device is to be opened. Types of special file names are:

/dev/entn An open call to this device is used to start the device handler for the selected port, where the value of n is 0 <= n <= 7.
/dev/entn/D An open call to this device is used to start the device handler for the selected port in diagnostic mode, where the value of n is 0 <= n <= 7.
read Subroutine

Can take the form of a read, readx, readv, or readvx subroutine. For this call, the device handler copies the data into the buffer specified by the caller.

write Subroutine

Can take the form of a write, writex, writev, or writevx subroutine. For this call, the device handler copies the user data into a buffer and transmits the data on the LAN.

ioctl Subroutine

The Ethernet device handler supports the following ioctl operations:

CCC_GET_VPD Returns adapter vital product data (VPD) if available and valid.
CIO_GET_FASTWRT Returns the parameters required to issue an ent_fastwrt call.
CIO_GET_STAT Returns current adapter and device handler status.
CIO_HALT Halts a session and unregisters a network ID.
CIO_QUERY Returns the current RAS counter values, as defined in the sys/comio.h and sys/entuser.h files.
CIO_START Starts a session and registers a network ID.
ENT_SET_MULTI Sets or clears a multicast address.
IOCINFO Returns a device information structure to the user specified area. The devtype field value is DD_NET_DH and the devsubtype field is value DD_EN, as defined in the sys/devinfo.h file.

Error Codes

The following error codes may be returned when accessing the device handler through the dev/entn special file:

EACCES Permission to access the port is denied for one of the following reasons:
  • The device has not been initialized.
  • The request to open the device in Diagnostic mode is denied.
  • The call is from a kernel mode process.
EAFNOSUPPORT The address family is not supported by the protocol, or the multicast bit in the address is not set.
EAGAIN The transmit queue is full.
EBUSY The request is denied because the device is already opened in Diagnostic mode, or the maximum number of opens was reached.
EEXIST The define device structure (DDS) already exists.
EFAULT An address or parameter was specified that is not valid.
EINTR A subroutine call was interrupted.
EINVAL A range or operation code that is not valid was specified, or the device is not in Diagnostic mode.
EIO An I/O error occurred.
ENOBUFS No buffers are available.
ENOCONNECT A connection was not established.
ENODEV The device does not exist.
ENOENT There is no DDS to delete.
ENOMEM The device does not have enough memory.
ENOMSG No message of desired type was available.
ENOSPC No space is left on the device (the multicast table is full).
ENOTREADY The device is not ready, a CIO_START operation was not issued, or the operation was issued but did not complete.
ENXIO The device does not exist, or the maximum number of adapters was exceeded.
EUNATCH The protocol driver is not attached.

Related Information

The close subroutine, open subroutine, read or readx subroutine, write or writex subroutine, ioctl subroutine.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]