Skip to main content

Message Header

The following section deals with the specific format of Host to Host messages and algorithms describing the proper response to a given message.

Each message begins with a 144 bit header containing the following fields:

  1. HOST-TO-IMP leader (32 bits) as specified in BBN Reports 1822

  2. to port ID (i.e., the id of the port receiving the message) (24 bits)

  3. MSG TYPE (8 bits) IN, OUT, FLUSH, etc.

  4. from port ID (i.e., id or the port sending the message) (24 bits)

  5. initiating Host's table position (8 bits) see below.

  6. HOST "sourcing" this message (8 bits) see below.

  7. RENDEZVOUS HOST (8 bits)

  8. bit count of data (16 bits)

The header format has been arranged so that no data item will cross a word boundary on machines with 16, 32, and 36-bit words, except where the size of the item is greater than the word size. The actual arrangement of bytes within words is shown in the following figures for these three word sizes. For the benefit of 36-bit Hosts, bytes 4 and 13 (numbering from 0) are unused. The 2 and 3-byte items do not cross word boundaries except for the port ID's on the 16 bit machines. This attention to packing and unpacking ease was given both for general convenience, and in particular because Hosts may wish to examine the header at interrupt level to determine where the rest of the message should go.

   +-------------+-------------+
0 | HOST/IMP | DESTINATION |
| FLAGS | |
+-------------+-------------+
1 | LINK | /////////// |
| | /////////// |
+-------------+-------------+
2 | /////////// | |
| /////////// | |
+-------------+ |
3 | TO PORT ID |
| |
+-------------+-------------+
4 | MESSAGE | |
| TYPE | |
+-------------+ |
5 | FROM PORT ID |
| |
+-------------+-------------+
6 | TABLE | /////////// |
| POSITION | /////////// |
+-------------+-------------+
7 | SOURCE | RENDEZVOUS |
| HOST | HOST |
+-------------+-------------+
8 | BIT COUNT |
| |
+-------------+-------------+
| |
9 | DATA |
// //
| |
+-------------+-------------+

16-bit Host Format

+-------------+
| | ////////// = unused
| | //////////
+-------------+
8 bits
   0             8            16            24            32     36
+-------------+-------------+-------------+-------------+------+
0 | HOST/IMP | FOREIGN | LINK | ////////////////// |
| FLAGS | HOST | | ////////////////// |
+------+------+-------------+-------------+-------+-----+------+
1 | //// | TO PORT ID | MESSAGE |
| //// | | TYPE |
+------+------+-------------+-------------+-------------+------+
2 | FROM PORT ID | TABLE | //// |
| | POSITION | //// |
+------+-------------+-------------+------+-------------+------+
3 | //// | SOURCE | RENDEZVOUS | BIT COUNT |
| //// | HOST | HOST | |
+------+-------------+-------------+---------------------------+
| |
4 | |
// DATA //
| |
| |
+-------------+-------------+-------------+-------------+------+

36-bit Host Format
   +-------------+-------------+-------------+-------------+
0 | HOST/IMP | FOREIGN | LINK | /////////// |
| FLAGS | HOST | | /////////// |
+-------------+-------------+-------------+-------------+
1 | /////////// | TO PORT ID |
| | |
+-------------+-------------+-------------+-------------+
2 | MESSAGE | FROM PORT ID |
| TYPE | |
+-------------+-------------+-------------+-------------+
3 | TABLE | /////////// | SOURCE | RENDEZVOUS |
| POSITION | /////////// | HOST | HOST |
+-------------+-------------+-------------+-------------+
| BIT COUNT | |
| | |
+-------------+-------------+ |
| |
// DATA //
| |
+-------------+-------------+-------------+-------------+

32-bit Host Format

The fields within the Host/IMP leader are already familiar to NCP programmers however, two points about these fields are worth mentioning. First, the destination field originally contains the number of the rendezvous Host. After rendezvous at a intermediate site, the destination field contains the source of the message rendezvous with. Second, the link field for the MSP experiment can only contain link number 192-195. We have not taken the time to figure out a sensible allocation of these four links among all the messages which might be sent using the MSP. One alternative is to cycle over the links to increase the bandwidth of the "pipe" between any two Hosts. For the time being, until further consideration is given to this issue, we suggest each Host at a site using one (unique) link for all its communication.

The message types we have to represent in the message type field are few now: we suggest message type 2 for SEND or OUT messages and message 3 for RECEIVE or IN messages. Message type 4 is the FLUSH message, if FLUSH is used.

The rendezvous Host field needs no comment. Except that the field is unnecessary after the rendezvous has taken place and could then be used for something else.

The bit count is a count of data bits in an OUT message or the size of the input buffer (not including the header) in an IN message. Thus the sender process can tell from the IN message bit count when it receives the IN message how much of the data in the OUT message was accepted by the receiver process and can use this knowledge to retransmit the remainder of the message if so desired. After the rendezvous, we recommend that all of the data in the message be sent on the source of the IN message even if the OUT bit count was greater than the IN bit count. Thus, at the receiver Host the monitor has the option (if it wants to take it) of discarding the message for being too long, sending the number of bits the receiver process has done an IN for into the receiver process and discarding the rest, or queuing the rest of the bits and somehow notify the receiver process that there are more bits which the receiver process can ask for.

The to- and from-port-id fields are 24-bit numbers. This size was chosen to help the TIPs. The first eight bits of a port Id should be the number of the Host at which this port id was created. Note well, that this is not necessarily the Host at which the port is being used. This is necessary since rendezvous take place at intermediate sites and because ports may move from site to site. We suggest that all port ids with the first eight bits all zero be reserved for network-wide use. In particular, a port id with all 24 bits zero will be used to mean "ANY". This gives us the options of:

  • RECEIVE from ANY to SPECIFIC
  • RECEIVE from SPECIFIC to SPECIFIC
  • SEND from SPECIFIC to ANY
  • and SEND from SPECIFIC to SPECIFIC

Examples of the use of these options will be given below.

The other options (RECEIVE to ANY) and (SEND from ANY) we feel are kind of useless but would not prohibit them. We believe that in the absence of explicit specification of rendezvous Host, the use of an ANY port id in the user's system call should affect the default rendezvous site as follows:

  • RECEIVE from ANY--rendezvous in receiver
  • RECEIVE from SPECIFIC--rendezvous in sender
  • SEND to ANY--rendezvous in sender
  • SEND to SPECIFIC--rendezvous in sender

The less significant 16 bits of the id can be used however a Host wants to. For instance, eight bits might be used as a process id and eight bits might be used as a channel specification within the specified process. We suggest that each Host reserve the port ids with the middle eight bits all zero for special uses as well known ports.

The table position field is included to help prevent costly table searches at interrupt level. Hosts sending INs and OUTs, put in the table position field the rendezvous table position of the SEND or RECEIVE associated with the IN or OUT. At an intermediate Host rendezvous, the table position fields in the matching IN and OUT are swapped so that when the messages arrive at the opposite end, the matching SEND and RECEIVE can be found quickly. The MSP must do the swap at the rendezvous, but of course the MSPs need not fill in the table position field when first transmitting an IN or OUT in which case the information arriving in an IN or OUT will be meaningless. The general algorithm, then, is to check the table position as specified in this field and if that fails, search the whole table.

The source field is filled in INs and OUTs by the MSP which originally sends these messages. At the rendezvous the source of each message is preserved in the message being forwarded to the final Host. When an IN or OUT arrives at a process, the process can use the source information to update its understanding of the rendezvous Host (e.g., when the destination Host and rendezvous Host are different).