Concepts
3. CONCEPTS
3a. Introduction
Before a detailed description of the command structures is undertaken it seems appropriate to introduce several of the concepts upon which the FEP is predicated.
The following section serves to briefly describe the FEP commands, and to elaborate on the concepts of addressing and types of connections provided.
3b. Commands (General)
- BEGIN Command
This command is sent from the host to the front-end processor. Its function is to direct the establishment of one or more network connections. The type and number of connections is specified in the BEGIN command string.
- LISTEN Command
Through this command the host indicates its willingness to accept requests for connection arriving from other hosts. It directs the front-end processor to LISTEN for any such connection requests. The number and type of connections are specified in the command string.
- RESPONSE Command
The front-end processor uses the RESPONSE command to indicate to the host that a particular path specified in a BEGIN or LISTEN command is now open or that the open attempt failed.
- MESSAGE Command
Message text passing between the host and its front-end processor is sent in this command string. The MESSAGE command is bi-directional, and is the same for host or front-end.
- INTERRUPT Command
The INTERRUPT command is sent by either the host of FE. Its most common use is to convey that the user wishes to terminate what he is doing - i.e., he has depressed the Control-C, ATTN, or INT key.
- END Command
One or more connections may be closed by either the FE or the host issuing this command. The connection(s) which are affected by the action of the END are specified in the command string.
- REPLY Command
This command is required to be sent by both the host and FE to acknowledge receipt of all command types (except REPLY). The success or failure of the command being acknowledged is conveyed in the REPLY command string.
3c. Connections
In order to engage in a meaningful conversation, the parties involved must be connected. A network connection is defined by the ARPA Host-Host Protocol document (Nic #8246) as follows : "A connection couples two processes so that output from one process is input to the other. Connections are defined to be unidirectional, so two connections are necessary if a pair of processes are to converse in both directions." The components of a connection, the sockets, are defined: "... a socket forms the reference for one end of a connection, and a connection is fully specified by a pair of sockets. A socket is identified by a Host number and a 32-bit socket number. The same number in different Hosts represents different sockets."
The existing network protocols incorporate prescribed strategies for selecting socket assignments, pairing sockets to form connections, and in the number of connections required to implement the protocol.
Conversations, in most cases, are bi-directional. Thus to simplify the Host's procedures in these cases, FEP permits duplex connections on which the Host can both send and receive. Send only and Receive only connections are also available for those situations where communication is one-way.
Thus, FEP provides the flexibility to reduce complexity in the Host, in addition to accommodating existing protocols and allowing for the development of new protocols.
3d. Addressing
Conversations in FEP are uniquely identified at initiation by some combination of Host address, Index number, Path number and Socket assignment. The Host address and Socket assignment are required to form the connection(s); thereafter the Index and Path are sufficient to identify the conversation.
Host Address
If, through the BEGIN command, the local Host explicitly directs the creation of network connection(s), it must specify the address of the foreign host to which it desires communication. If the local host indicates a willingness to communicate, through the LISTEN command, the Front-End processor will supply the address of the connecting foreign host(s) in its RESPONSE command(s).
Socket
A socket is either a send socket or a receive socket. This property is called the socket's gender. The sockets at either end of a network connection must be of opposite gender. As previously defined a socket forms the reference for one end of a network connection. To the extent possible, the FEP shields the Host from the responsibility of assigning sockets for individual conversations. However, because the socket is a fundamental part of the addressing mechanism of the network, the Host may need to be aware of socket assignments when establishing connections.
It is through a "well-advertised" socket that a host provides services to other members of the network community. The Initial Connection Protocol (ICP) [1] is used to first connect to the well-advertised socket in order to exchange the number of a presently unused socket which is then used for the connections required so that the well-advertised socket can be freed for others attempting to connect.
When establishing a conversation (with a BEGIN or LISTEN command) the Host indicates in the value of the CONN-TYPE field whether the socket specified is to be employed directly, or to be used as an initial connection socket.
3e. Index/Path Addressing
Indexes are values assigned by the local Host to identify network conversations. When conversations are established (with the BEGIN or LISTEN commands) the Host must specify an index value. This value will be associated with the resultant conversations for their duration.
It is often necessary to affiliate conversations [2]. To accommodate this, data paths are defined such that each index has one or more path(s) associated with it (a path can not exist except as a subordinate to an index) and all network communication is transmitted on some path.
The maximum number of indexes which may be in use at any one time, and the maximum number of paths within one index are installation parameters.
Index 0 is reserved for controlling other indexes, and logically represent the "pipe" through which all other indexes "flow."
Addresses in FEP command strings are conveyed by the pair of fields "INDEX" and "PATH." In commands which cause new indexes to be opened, or new data paths to be added to an existing index (BEGIN or LISTEN), the PATH field indicates the first path to be acted upon by this command. For those commands which do not create new paths or indexes, if PATH is 0, then all paths associated with this INDEX are addressed; if PATH is non-zero, only the specific path within the specified INDEX is addressed.
3f. Path Types
A path can be one of three types:
- a. DUPLEX - both the Host and the FE can issue MESSAGE commands on the path.
- b. SEND - only the Host can issue MESSAGE commands on the path.
- c. RECEIVE - only the FE can issue MESSAGE commands on the path.
The paths within an index may be a mixture of path types but one BEGIN/LISTEN must be used for each contiguous set of the same type.
An FEP path is analogous to a network connection with the following exception. Network connections are always simplex. This is true for paths of type SEND or RECEIVE. However, a DUPLEX path is formed by the FE connecting two local sockets to two foreign sockets. This is a "duplex connection" which is composed of two network (simplex) connections.
3g. Modes of Establishing a Path
One or more paths are established by the action of a single BEGIN or LISTEN command, with the mode specified in the CONN-TYPE field of the command. Each of the path types is established in one of two modes - directly or via ICP. The gender of the path (its ability to receive or send or both) is not affected by the mode.
When any of the path types is specified with the ICP mode, the socket value in the SOCKET field is used as the "well-advertised" socket and an actual working socket will be exchanged according to the Initial Connection Protocol. When the direct mode is indicated, the specified socket is used as the working socket.
In either mode, when multiple paths are indicated, the next higher socket number values of the appropriate gender are selected for each path. [3]
3h. Translation
When the Host sets up a path(s) (with a BEGIN or LISTEN command) it identifies what type of translation or data-mapping it requires the FE to perform on all data transmitted on this path(s). This is specified by two values - one giving the format of the data transmitted between the FE and the network, the other giving the format of the data between the Host and the FE. [4]
3i. Flow Control
All commands (except REPLYs) must be REPLYED to by the receiver. The sender is blocked from sending more commands on the same path until a REPLY has been received. The REPLY command serves two functions: it indicates the success/failure of the last transmission on the path, and it also indicates a willingness of the receiver to accept more data on that path. Receipt of any valid REPLY on an open path is sufficient to unblock it for END or INTERRUPT commands. Thus a receiver who will not (or can not) accept more data (MESSAGE commands) on a given path need not block the sender from ENDing the path if he desires. An indication of "READY" in the reply serves to unblock the path for MESSAGE commands also.
In the normal case, the REPLY performs both functions concurrently. However, when the receiver is not ready to accept more data, he can REPLY indicating only success/failure of the last command which should be sufficient to allow the sender to free the transmission buffer, requeue the command for retransmission if necessary, etc. and wait for another REPLY command announcing the receiver's ability to accept more data.
3j. Exceptional Conditions
When a command is received and can not be executed, the REPLY command is used to notify the sender of the command. To do this, the bits of CODE field of the REPLY are set to show the CATEGORY of the error and its TYPE within that category (see Section 3h).