Formal Specification and Data Structures
The following sections provide a formal framework which describe the DCN HELLO protocol. This protocol is run between neighboring DCN hosts that share a common point-to-point link and provides automatic connectivity determination, routing and timekeeping functions.
The descriptions to follow are organized as follows: First a summary of data structures describes the global variables and packet formats. Then three processes which implement the protocol are described: the CLOCK, HELLO and HOST processes. The description of these processes is organized into sections that describe (1) the local variables used by that process, (2) the parameters and constants and (3) the events that initiate processing together with the procedures they evoke. In the case of variables a distinction is made between state variables, which retain their contents between procedure calls, and temporaries, which have a lifetime extending only while the process is running. Except as noted below, the initial contents of state variables are unimportant.
3.1. Data Structures
3.1.1. Global Variables
ADDRESS
This is a 32-bit bit-string temporary variable used to contain an Internet address.
CLOCK-HID
This is an eight-bit integer state variable used to contain the host ID of the local-net host to be used as the master clock. It is initialized to the appropriate value depending upon the net configuration.
DATE
This is a 16-bit bit-string state variable used to contain the date in RT-11 format. Bits 0-4 contain the year, with zero corresponding to 1972, bits 5-9 contain the day of the month and bits 10-14 contain the month, starting with one for January.
DATE-VALID
This is a one-bit state variable used to indicate whether the local date and time are synchronized with the master clock. A value of one indicates the local clock is not synchronized with the master clock. This variable is set to one initially and when the local time-of-day rolls over past midnight. It is set to zero each time a valid date and time update has been received from the master clock.
DELAY
This is a 16-bit integer temporary variable which represents the roundtrip delay in milliseconds to a host.
HID
This is an eight-bit integer temporary variable containing the host ID of some host on the local net.
There is a one-to-one correspondence between the Internet addresses of local hosts and their HIDs. The mapping between them is selected on the basis of the octet number of the Internet address. For DCN hosts it is the fourth octet, while for hosts directly connected to a class-A ARPANET IMP or gateway, it is the third octet (logical-host field). The contents of this octet are to be added to ADDRESS-OFFSET to form the HID associated with the address.
HOLD
This is an eight-bit counter state variable indicating whether timestamps are valid or not. While HOLD is nonzero, timestamps should be considered invalid. When set to some nonzero value, the counter decrements to zero at a 1-Hz rate. Its initial value is zero.
HOST-TABLE
This is a table of NHOSTS entries indexed by host ID (HID). There is one entry for each host in the local net. Each entry has the following format:
HOST-TABLE.DELAY
This is a 16-bit field containing the computed roundtrip delay in milliseconds to host HID.
HOST-TABLE.OFFSET
This is a 16-bit field containing the computed signed offset in milliseconds which must be added to the local apparent clock to agree with the apparent clock of host HID.
HOST-TABLE.PID
This is an eight-bit field containing the PID of the net-output process selected by the routing algorithm to forward packets to host HID.
HOST-TABLE.TTL
This is an eight-bit field used as a time-to-live indicator. It is decremented by the HOST process once each second and initialized to a chosen value when a HELLO message is received. The table is initialized with the HOST-TABLE.DELAY field set to MAXDELAY for all entries. The contents of the other fields are unimportant.
LOCAL-ADDRESS
This is a 32-bit bit-string state variable used to contain the local host Internet address.
NET-TABLE
This is a table of NNETS entries with the following format:
NET-TABLE.HID
This is an eight-bit field containing the host ID of the pseudo-process to forward packets to the NET-TABLE.NET net.
NET-TABLE.NET
This is a 24-bit field containing an Internet class-A (eight bits), class-B (16 bits) or class-C (24 bits) net number. Note that the actual field width for class-B net numbers is 24 bits in order to provide a subnet capability, in which the high-order eight bits of the 16-bit host address is interpreted as the subnet number.
The table is constructed at configuration time and must include an entry for every net that is a potential neighbor. A neighbor net is defined as a net containing a host that can be directly connected to a host on the local net. The entry for such a net is initialized with NET-TABLE.NET set to the neighbor net number and NET-TABLE.HID set to an arbitrary vitual-host ID not assigned any other local-net virtual host.
The remaining entries in NET-TABLE are initialized at initial-boot time with the NET-TABLE.NET fields set to zero and the NET-TABLE.HID fields set to a configuration-selected host ID to be used to forward packets to all nets other than neighbor nets. In the case where a gateway module is included in the local host configuration, the GGP and/or EGP protocols will be used to maintain these entries; while, in the case where no gateway module is included, only one such entry is required.
OFFSET
This is a 16-bit signed integer temporary variable which represents the offset in milliseconds to be added to the apparent clock time to yield the apparent clock time of the neighbor host.
3.1.2. Parameters
ADDRESS-OFFSET
This is an integer which represents the value of the Internet address field corresponding to the first host in HOST-TABLE.
NHOSTS
This is an integer which defines the number of entries in HOST-TABLE.
NNETS
This is an integer which defines the number of entries in MET-TABLE.
3.1.3. HELLO Packet Fields
PKT.ADDRESS-OFFSET
This eight-bit is copied from ADDRESS-OFFSET by the sender.
PKT.DATESTAMP
Bits 0-14 of this 16-bit field are copied from DATE by the sender, while bit 15 is copied from DATE-VALID.
PKT.DATE-VALID
This one-bit field is bit 15 of PKT.DATESTAMP.
PKT.DESTINATION
This 32-bit field is part of the IP header. It is copied from HLO.NEIGHBOR-ADDRESS by the sender.
PKT.HOST-TABLE
This is a table of PKT.NHOSTS entries, each entry of which consists of two fields. The entries are indexed by host ID and have the following format:
PKT.HOST-TABLE.DELAY
This 16-bit field is copied from the corresponding HOST-TABLE.DELAY field by the sender.
PKT.HOST-TABLE.OFFSET
This 16-bit field is copied from the corresponding HOST-TABLE.OFFSET field by the sender.
PKT.LENGTH
This 16-bit field is part of the IP header. It is set by the sender to the number of octets in the packet.
PKT.NHOSTS
This eight-bit field is copied from NHOST by the sender.
PKT.SOURCE
This 16-bit field is part of the IP header. It is copied from LOCAL-ADDRESS by the sender.
PKT.TIMESTAMP
This 32-bit field contains the apparent time the packet was transmitted in milliseconds past midnight UT.
PKT.TSP
This 16-bit field contains a variable used in roundtrip delay calculations.