User guide
9: Client Applications — Commands and Responses
DC 900-1338I 167
9.2.4 Terminating a Session with an ICP Link (Detach)
When the DLI configuration file parameter protocol is set to raw (protocol="raw"), a call
to the
dlClose function terminates a data path to the ICP for a given link. However,
before the session is terminated, it is important to allow the ICP to release the space
allocated by it for session management. This is accomplished by issuing a call to
dlWrite
with the optional argument structure as shown in Figure 9–6. After the ICP releases the
session, the application can call
dlClose to terminate the session with the ICP
From the ICP’s perspective, the
detach command terminates an active session between
the client and the ICP. When the application is finished with the ICP session, it writes a
detach command to the ICP. The application establishes a DLI_OPT_ARGS structure
requesting the detach, then sends the structure to the ICP with a call to the DLI
dlWrite
function.
For the
detach command, the fields of the ICP and protocol headers that the ICP
receives contain the following values:
DLI_OPT_ARGS.usFWPacketType FW_DATA
DLI_OPT_ARGS.usFWCommand FW_ICP_WRITE
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_DETACH
DLI_OPT_ARGS.iICPStatus n/a
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_DETACH
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 Session to end
DLI_OPT_ARGS.usProtSequence n/a
DLI_OPT_ARGS.usProtXParms [0] n/a
DLI_OPT_ARGS.usProtXParms [1] n/a
Figure 9–6: Detach Command Format