User guide

9: Client Applications Commands and Responses
DC 900-1338I 185
9.2.8 Reading from the ICP Link
The ICP sends the following types of messages to the client:
Command acknowledgments (discussed in earlier sections)
Responses to information requests (such as link statistics, Section 9.2.7.2 on
page 179)
Data read from the wide area network (discussed below)
The client calls the DLI
dlRead function to access these messages. The application deter-
mines the content of the read buffer by examining the
usProtCommand field of the
DLI_OPT_ARGS data structure (refer back to Tabl e 92 on page 161).
The application allocates a
DLI_OPT_ARGS structure (Figure 91 on page 158), then
provides the address of the structure along with the address of a pointer to a buffer to
the DLI
dlRead function.
9.2.8.1 Reading Normal Data
The read command receives normal data that has arrived on one of the ICP ports. The
fields of the ICP and protocol headers that the ICP sends to the client application con-
tain the following values:
ICP_HDR
count = size of protocol header (16 bytes) plus size of data
command = DLI_ICP_CMD_READ
status = 0 (success) or an error code
PROT_HDR
command = DLI_PROT_SEND_NORM_DATA
modifier = 0 (success) or an error code
session = session ID
DATA AREA = incoming data
To provide the client with messages read from the link, the ICP sends a message with
the optional arguments structure shown in Figure 920. The ICP places the data read