Provides the means for transmitting data to the Serial Optical Link (SOL) device handler.
#include <sys/device.h> #include <sys/comio.h> #include <sys/soluser.h>
int sol_write (devno, uiop, chan, arg) dev_t devno; struct uio *uiop; int chan; struct write_extension *arg;
devno | Specifies major and minor device numbers. |
uiop | Points to a uio structure specifying the location and length of the caller's data. |
chan | Specifies the channel number assigned by the sol_mpx entry point. |
arg | Points to a write_extension structure. If the arg parameter is null, default values are assumed. |
The sol_write entry point provides the means for transmitting data to the SOL device handler. The kernel calls this entry point when a user-mode caller issues a write, writex, writev, or writevx subroutine.
For a user-mode process, the kernel fills in the uio structure with the appropriate values. A kernel-mode process must fill in the uio structure as described by the ddwrite communications entry point.
For the sol_write entry point, the arg parameter may point to a write_extension structure. This structure is defined in the /usr/include/sys/comio.h file and contains the following fields:
status | Indicates the status condition that occurred. Possible values for the returned status field are: |
flag | Consists of a possible bitwise OR of the following: |
write_id | For a user-mode caller, the write_id field is returned to the caller by the CIO_GET_STAT operation (if the CIO_ACK_TX_DONE option is selected). For a kernel-mode caller, the write_id field is returned to the caller by the stat_fn routine that was provided at open time. |
The data packet must start with a 4-byte field for the destination processor ID (the ID goes in the low-order byte), followed by a 1-byte field for the destination netid . When the data is received at the destination, the 4-byte processor ID will be stripped off, so that the first byte is the 1-byte netid.
The maximum packet size allowed is SOL_MAX_XMIT, as defined in the /usr/include/sys/soluser.h file.
In case of a link failure, the device handler uses any link that is available. In-order reception of data frames is not guaranteed unless the S (serialized) option is specified on the open of the device. See the sol_mpx entry point for a description of this option.
Note: When the Network Systems Corp. DX Router is used for communication, in-order reception cannot be guaranteed even when using a serialized open.
The sol_write entry point can be called from the process environment only.
The sol_write 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.
Serial Optical Link Device Handler Entry Points.
The uio structure in AIX Version 4.3 Technical Reference: Kernel and Subsystems Volume 1.
The write, writex, writev, or writevx subroutine.
The sol_mpx entry point.
The stat_fn routine.