User guide

DC 900-1338I 157
Chapter
9
Client Applications
Commands and Responses
This chapter presents the data structures required for the client application to exchange
messages with the ICP, followed by the details of the individual commands and
responses.
9.1 Client and ICP Interface Data Structures
The data link interface (DLI) provides a session-level interface between a client applica-
tion and the sample protocol software resident on an ICP. Messages traveling from the
client application go over the Ethernet to the Freeway server or ICP driver and end up
at the ICP. From the clients perspective, these messages consist of data buffers supple-
mented with the DLI optional arguments data structure to provide the protocol-spe-
cific information required for Raw operation (refer back to Section 8.1.1.1 on
page 143). Figure91 shows the C definition of the DLI optional arguments struc-
ture.
From the ICPs perspective, these messages consist of the
api_msg data structure shown
in Figure 92. The
icp_hdr structure is of type ICP_HDR and the prot_hdr structure is of
type
PROT_HDR, as shown in Figure 93.
Ta bl e 9 1 shows the equivalent fields between the
DLI_OPT_ARGS structure and the
ICP_HDR and PROT_HDR structures. The client API translates between the
DLI_OPT_ARGS and the api_msg data structures. The usICPCommand field of the
DLI_OPT_ARGS structure corresponds to the command field of the ICP_HDR structure.
The
usProtCommand field of the DLI_OPT_ARGS structure corresponds to the command
field of the PROT_HDR structure.