User guide
9: Client Applications — Commands and Responses
DC 900-1338I 165
From the ICP’s perspective, the
attach command establishes a session between the client
application and one of the ICP links. A successful
attach command gives the ICP and the
client application IDs that are unique to the current session with which they can relay
information.
The protocol session identifier is used by the ICP to manage information exchanged
between the client application and a specific link. The protocol session identifier is
requested by the client, then defined and returned by the ICP.
For the
attach command, the fields of the ICP and protocol headers that the ICP receives
contain the following values:
ICP_HDR
count = size of protocol header (16 bytes)
command = DLI_ICP_CMD_ATTACH
status = high bits indicate byte ordering
params[0] = return node number
PROT_HDR
link = link number
After the ICP processes the attach command, it returns these headers with the following
field modifications:
ICP_HDR
status = error code or zero if successful
PROT_HDR
modifier = error code or zero if successful
session = session ID assigned by the ICP
The ICP receives an ICP header containing DLI_ICP_CMD_ATTACH in the command
field and a return node number (assigned by msgmux for the Freeway server or the ICP
driver for the embedded ICP product) in the
params[0] field. It also receives a link num-
ber in the
link field of the protocol header. If the ICP can successfully complete the
attach, it returns a session number in the
session field of the protocol header and a zero
(indicating success) in both the
status field of the ICP header and the modifier field of the