Appendix: Off-loaded TCP (Part 1)
Per-Protocol Offloading Descriptions
1. Command Level Interface to an Off-loaded TCP
This appendix discusses the use of the commands described in the body of this document to provide an interface between a Host process and an off-loaded interpreter of the DoD's Transmission Control Protocol (TCP). The interface described here is functionally equivalent to the interface found in the MIL-STD 1778 specification of TCP. It is not, however, identical, in that some features of the interface are particularly relevant only in an inboard implementation.
The first section describes the mapping between the interface events of MIL-STD 1778 and the commands and responses of this H-FP, and highlights the unique features of the interface. The next sections discuss the details of each command. These details include the specialized usages of the command and the protocol-idiosyncratic parameters for that command.
1.1. Relation to MIL-STD 1778 Interface
Most of the requests and responses of the TCP interface specified in MIL-STD 1778 are mapped directly to H-FP Commands and responses. The exceptions are noted in the following descriptions.
1.1.1. Requests
Unspecified Passive Open, Fully Specified Passive Open, Active Open, and Active Open with Data requests are all implemented using variations of the Begin command. The distinction between Passive and Active Open is made using the Active/Passive parameter of Begin. The distinction between unspecified and fully specified lies in the presence or absence of the destination address fields. An active open with data is identical to a normal active open, except for the presence of data following the command.
The Send Service Request is implemented using the Transmit command. Special protocol idiosyncratic parameters are provided for Urgent, Push, and changing the ULP timeout action and values. The response to the Transmit command indicates that the appropriate Send call has been made. There is no corresponding response in the specified TCP interface; its only significance is that the Host can issue another Transmit command.
The Allocate event is a specification feature of MIL-STD 1778 to indicate the willingness of the user to accept incoming data across the interface. However, because this is precisely the type of flow control provided by the Channel level, the Allocate event would be a superfluous mechanism. Thus, there is no direct analogy to that event in the H-FP interface. A Host process indicates its willingness to accept new data by informing the channel via its flow control interface (if it has an explicit one).
Close and Abort are provided by the End command. Close uses the graceful version of the End command, while Abort uses the abrupt version. The response indicates that the End command has been received and the corresponding Close or Abort was issued. There is no corresponding response in the specified TCP interface.
Status is provided by using the query form of the Status command. The response to the Status command contains the information (see below).
1.1.2. Responses
The Open Id response is provided so that the user has a shorthand name by which to refer to the connection. With an outboarded TCP interpreter, there is a one-to-one mapping between TCP connections and H-FP channels. Hence, the Open Id event is not needed, since the channel ID is sufficient to indicate the desired connection.
The Open Failure and Open Success responses are provided using OPE-generated responses to Begin commands (which provide the Active and Passive Service response primitives) issued by the Host. The value of the response code indicates whether the Begin command succeeded or failed, and can be mapped to the appropriate Open Failure or Open Success indication by the Host.
Deliver is provided by having the OPE issue a Transmit command. As mentioned above, the "flow control" between the TCP interpreter and the Host is provided by the Channel layer, so no explicit interface events are needed. The response to the Transmit command indicates the data was received by the Host process. There is no corresponding response in the specified TCP interface.
The Closing and Terminate service responses are provided using the End command. Closing is indicated using the graceful version of the command, while terminate is provided using the abrupt version. The response indicates the End command was received by the Host process. There is no corresponding response in the specified TCP interface.
Status Response is provided by a response to the query version of the Status command. The status information is communicated via protocol-idiosyncratic parameters following the Response code.
Error messages are reported using the spontaneously generated version of the Status command issued by the OPE. The error message is provided in a parameter. The response indicates the error message was received by the Host process. There is no corresponding event in the specified TCP interface.
1.2. The Begin Command
The Begin command is used in TCP in three major ways:
-
To inform the OPE that a process in the Host wishes to open a connection to a particular port on a internet address.
-
To inform the OPE that a process in the Host wishes to be informed when a connection attempt is made to any or to a specific port at this Host's internet address.
-
To inform the Host that a connection attempt to the OPE has arrived, and there was no Begin of the second type (passive open) issued by the Host relevant to that particular port.
1.2.1. Specialized Usage
There are four major aspects to the specialized usage of the Begin command and its parameters. These parameters are:
-
The meaning of the Mediation Level parameter
-
The selection of blocking treatment of Transmit command
-
The meaning of the address components
-
The selection of the TCP Active Open with Data primitive.
The Mediation Level parameter has only two possible values when offloading TCP. These are "9" and "0". The normal usage of an off-loaded TCP uses the value "9", which means the Host is in no way involved in the operation of TCP. The value "0" indicates the Host wishes to negotiate with the TCP options.
The normal TCP Send event is non-blocking. That is, when a user issues the send command, it counts on the reliability services of TCP, and is not explicitly notified when the data has reached the other end of the connection and been properly acknowledged. Hence, the default value for this parameter with TCP is "N". There are some applications where the user may not wish to receive a response to a Transmit command until the data has been acknowledged by the other end of the connection. In these cases, the value "B" should be used for this parameter. If such a feature is not supported by the offloaded TCP interpreter, then it is acceptable to issue a 100 level Conditional acceptance indicating that blocking is not supported, but the Begin command will proceed using non-blocking Transmits.
The primary address components of the local and remote addresses refer to the internet addresses of (or a symbolic Host name for) the respective Hosts. The secondary components refer to the particular sockets at those internet addresses. Normally, the secondary components (ports) are specified numerically. They may, however, be specified by name if the port is a well-known service port. In an Active Begin command, the remote addresses primary and secondary components must be specified. The local address components need not be specified, unless the user wishes to indicate that the connection should be from a particular port or a particular internet address of a multi-homed Host. In a Passive Begin command, the remote addresses are specified only if connection attempts from one particular Host are of interest. The local address secondary component must be used to indicate on which port to perform the Listen.
The way the TCP Active Open with data is provided is by including the data with the Begin Command. This data is included in the same Channel level chunk, immediately following the newline. If the data is more than a single chunk can hold, then the multi-chunk command feature of the H-FP must be used.
1.2.2. Protocol-Idiosyncratic Parameters
The protocol-idiosyncratic parameter identified for the TCP interface is the "ULP timeout" information. This information includes whether the offloaded interpreter should abort the connection on a ULP timeout or report it to the inboard user, and also the numerical value of the timeout interval. The format chosen for this parameter is a single letter followed immediately (with no spaces) by an ASCII number. The letter can be either "R" or "A", and indicates that the ULP timeout should cause a report or an abort, respectively. The number is interpreted to be the timeout interval in seconds.
1.2.3. Examples of the Command
An example of an Active Begin command that might be issued by an inboard user Telnet is:
C BE TCP A ISIA 9 N 23 ,, 60 R 0 -pi R120 <nl>
ISIA is the destination Host, 23 is the well-known port number for Telnet connections, a Begin timeout of 60 seconds was chosen. The desired type of service is to strive for good response time, the transmissions are expected to be in small units, and protocol-idiosyncratic parameter R120 implies that a ULP timeout of 120 seconds should be reported.
An example of a Passive Begin Command that might be issued by an inboard server Telnet is:
C BE TCP P ,, 9 N ,, 23 ,, R 0 -pi R120 <nl>
The major differences are that no remote address components are specified, and the local secondary address component is identified as the socket on which the Listen is being performed. Also, the default ("infinite") timeout is taken.