Commands: BEGIN and LISTEN
4. COMMANDS
4a. Introduction
All communications between the Host and the FE is performed by means of commands. The commands are given names for documentation purposes but are distinguished by the binary value of the first field of the command string. Command strings will be padded with zeros up to the next multiple of an installation defined parameter. (This value will be dependent on the capabilities of the hardware interface between the Host and the FE.)
Field lengths within a command string are specified as some number of bits. These information bits will be right-justified within the least number of bytes needed to hold them. The size of a byte will be an installation parameter which will normally be 8 bits but other values will be accommodated as necessary.
The values and meanings of the CODE field of the REPLY command are given for each command within the following descriptions:
4b. 1: BEGIN
Format
BEGIN INDEX PATH HOST SOCKET TRANS-TYPE CONN-TYPE NPATHS
Use
This command is sent only from the Host to the FE. Its function is to direct the FE to establish one or more logical connections (paths) on the specified index between the Host and the FE.
Its use has three different modes (depending on the value of the PATH field) :
- mode (a) - to set up a new index and to direct the FE to attempt to establish network connections for the one or more paths specified within this index.
- mode (b) - to attempt to establish network connections for an existing (but at present closed) path within the already set-up index.
- Mode (c) - to attempt to establish network connections for one or more new paths within the already set-up index.
Parameters
- a) BEGIN is an 8-bit field with the value 1.
- b) INDEX is a 16-bit field, specifying the index. Note that the value 0 is reserved for special use (see Section 4).
- c) PATH is an 8-bit field, specifying the path(s) which are to be established. Its value identifies the mode of the BEGIN (see above) :
- mode (a) - its value must be 1.
- mode (b) - its value must be that of the path to be "re-opened."
- mode (c) - its value must be exactly one greater than the current number of paths defined within this index.
- d) HOST is a 32-bit field specifying the foreign host with which connections are to be established.
- e) SOCKET is a 32-bit field, specifying the first or only socket at the foreign host to which connections are to be made.
- f) TRANS-TYPE is a 16-bit field which directs the FE to perform this type of translation on all data (i.e. TEXT in the MESSAGE command string) sent on every path being established by this command. The first 8 bits specify the format of the data on the network side; the second 8 bits specify the format of the data on the Host side. The values assigned to the particular formats (eq. ASCII, EBCDIC etc.) are installation parameters; however, the value 0 will always mean "bit string" and thus if either of the 8-bit sub-fields contains 0, then no mapping will be performed.
- g) CONN-TYPE is an 16-bit field, specifying the type and mode of connection(s) to be established for the specified path(s). Its value informs the FE how to associate sockets with indexes/paths (see Sections 2f and 2g).
Value Type Mode
7 Duplex via ICP
6 Duplex direct
5 Receive via ICP
4 Receive direct
3 Send via ICP
2 Send direct
- h) NPATHS is an 8-bit field, specifying the number of paths which this command directs the FE to attempt to establish connections for. If the BEGIN is of mode (b) then its value must be 1. Otherwise the sum of its value and the value of the PATH field is the new current number of paths plus one.
Error CODES in REPLY
Category Type Meaning
3 1 PATH invalid for new index
3 2 PATH invalid for old index
3 3 PATH already open
3 4 HOST unknown
3 5 TRANSLATION-TYPE invalid
3 6 CONNECTION-TYPE invalid
3 7 NPATHS invalid for old path on old index
3 8 Specified socket inconsistent with CONN-TYPE
3 9 INDEX invalid, not ready for business
4 1 No new connections - FE full
4 2 No new connections - closing down soon
4c. 2: LISTEN
Format
LISTEN INDEX PATH HOST SOCKET TRANS-TYPE CONN-TYPE NPATHS
Use
This command is sent only from the Host to the FE.
Its function is to direct the FE to "listen," i.e., to hold the specified paths pending until such time as a request for connection (RFC) is received from the network to the specified local socket. then to set up connections and to respond with a RESPONSE command for each path.
Its use has three different modes (depending on the value of the PATH field) :
- mode (a) - to set up a new index and to listen on the specified local socket in order to establish connections for the specified paths.
- mode (b) - to listen on the specified socket in order to establish connections for the specified, existing (but at present closed) path within the already set-up index.
- mode (c) - to listen on the specified socket in order to establish connections for the specified new path(s) within the already set-up index.
By use of the HOST parameter, the FE can be directed to accept RFCs from any host or only from the specified host.
Parameters
- a) LISTEN is an 8-bit field with value 2.
- b) INDEX is a 16-bit field specifying the index.
- c) PATH is an 8-bit field specifying the first of the one or more paths which are to be held pending receipt of a RFC. Its value identifies the mode of the LISTEN (see above) :
- mode (a) - its value must be 1.
- mode (b) - its value must be that of the existing path.
- mode (c) - its value must be exactly one greater than the current number of paths within this index.
- d) HOST is a 32-bit field specifying the host from which RFCs are to be accepted; a value of 0 implies from any host.
- e) SOCKET is a 32-bit field specifying the local socket on which the FE is to listen for RFCs.
- f) TRANS-TYPE is a 16-bit field specifying the type of translation the FE is to perform on all data sent on every path established as a result of this command. Its values are the same as in the BEGIN command.
- g) CONN-TYPE is an 16-bit field specifying the type and mode of the connection(s) to be established for the specified path(s) when an RFC is received. Its values are the same as in the BEGIN command.
- h) NPATHS is an 8-bit field specifying the number of paths which this command associates with the specified index and which are to be established. If the LISTEN is of mode (b) then its value must be 1. Otherwise the sum of its value and the value of the PATH field is the new current number of paths plus one, within this index. Thus its value is the number of extra RFCs for which the FE is listening on this socket.
Error CODEs in REPLY
Category Type Meaning
3 1 PATH invalid for new index
3 2 PATH invalid for old index
3 3 PATH already open
3 4 HOST unknown
3 5 TRANSLATION-TYPE invalid
3 6 CONNECTION-TYPE INVALID
3 7 NPATHS invalid for old path on old index
3 8 Specified socket inconsistent with CONN-TYPE
3 9 INDEX invalid, not ready for business
3 10 Socket already in use.
4 1 No new listens - FE full
4 2 No new listens - closing down soon