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

sol_read Serial Optical Link Device Handler Entry Point


Provides the means for receiving data from the Serial Optical Link (SOL) device handler.


#include  <sys/device.h>
#include  <sys/comio.h>
#include  <sys/soluser.h>
int sol_read (devno, uiop, chan, arg)
dev_t devno;
struct uio *uiop;
int chan;
struct read_extension *arg;


devno Specifies the major and minor device numbers.
uiop Points to a uio structure. For a calling user-mode process, the uio structure specifies the location and length of the caller's data area in which to transfer information. The kernel fills in the uio structure for the user.
chan Specifies the channel number assigned by the sol_mpx entry point.
arg Has a value of null or else points to a read_extension structure. This structure is defined in the /usr/include/sys/comio.h file.


Note: Only user-mode callers should use the sol_read entry point.

The sol_read entry point provides the means for receiving data from the SOL device handler. When a user-mode caller issues a read, readx, readv, or readvx subroutine, the kernel calls the sol_read entry point. Any data available for the specified channel is returned.

For this operation, the arg parameter may point to the read_extension structure. This structure is defined in the /usr/include/sys/comio.h file and contains the following fields:

status Contains additional information about the completion of the sol_read entry point. Possible values for this field are:
CIO_OK Indicates the operation was successful.
CIO_BUF_OVRFLW Indicates the user buffer was too small, and the data was truncated.
netid Not used
sessid Not use.

The data received does contain the 4-byte field for the processor ID. Therefore, the first byte of data will be the netid field.

Execution Environment

The sol_read entry point can be called from the process environment only.

Return Values

EACCES Indicates an illegal call from a kernel-mode user.
ENODEV Indicates an invalid minor number was specified.
EINTR Indicates a system call was interrupted.
EMSGSIZE Indicates the data was too large to fit into the receive buffer and that no arg parameter was supplied to provide an alternate means of reporting this error with a status of CIO_BUF_OVFLW.
EFAULT Indicates an invalid address was supplied.
ENOCONNECT Indicates the device has not been started.

Implementation Specifics

The sol_read entry point functions with a Serial Link Adapter and Serial Optical Channel Converter that have been correctly configured for use on a qualified network. Consult hardware specifications for more information on configuring hardware and network qualifications.

Related Information

Serial Optical Link Device Handler Entry Points.

The uio structure in AIX Version 4.3 Technical Reference: Kernel and Subsystems Volume 1.

The sol_mpx entry point.

The read, readx, readv, or readvx subroutine.

[ Previous | Next | Contents | Home | Search ]