User guide

166 DC 900-1338I
Protocol Software Toolkit Programmer Guide
protocol header. Any subsequent transactions involving this session number will be
transmitted from the ICP via the corresponding node number.
There is a correspondence between node numbers and session numbers. (Chapter 7
provides more information on node numbers and the host/ICP interface). All the com-
mands in Section 9.2.1 on page 162, from the
attach command on, must have this ses-
sion number in the
session field of the protocol header. (The msgmux or ICP driver
copies the protocol session ID from the
usProtSessionID field in the clients
DLI_OPT_ARGS to the session field in the protocol header.) If the attach is unsuccessful
(for example, the link has already been attached or the link or node number is invalid),
the ICP returns an appropriate error code in the
status field of the ICP header and the
modifier field of the protocol header. The Freeway Data Link Interface Reference Guide
lists possible error codes.
The response to the attach is read with a call to
dlRead. If the attach was successful, the
optional argument structure in the response is as shown in Figure 95.
DLI_OPT_ARGS.usFWPacketType n/a
DLI_OPT_ARGS.usFWCommand n/a
DLI_OPT_ARGS.usFWStatus n/a
DLI_OPT_ARGS.usICPClientID n/a
DLI_OPT_ARGS.usICPServerID n/a
DLI_OPT_ARGS.usICPCommand DLI_ICP_CMD_ATTACH
DLI_OPT_ARGS.iICPStatus DLI_ICP_ERR_NO_ERR
DLI_OPT_ARGS.usICPParms [0] n/a
DLI_OPT_ARGS.usICPParms [1] n/a
DLI_OPT_ARGS.usICPParms [2] n/a
DLI_OPT_ARGS.usProtCommand DLI_ICP_CMD_ATTACH
DLI_OPT_ARGS.iProtModifier n/a
DLI_OPT_ARGS.usProtLinkID link the session relates to
DLI_OPT_ARGS.usProtCircuitID n/a
DLI_OPT_ARGS.usProtSessionID Protocol Session ID
DLI_OPT_ARGS.usProtSequence n/a
DLI_OPT_ARGS.usProtXParms [0] n/a
DLI_OPT_ARGS.usProtXParms [1] n/a
Figure 95: Attach Response Format