📄 rfc891.txt
字号:
corresponding to 1972, bits 5-9 contain the day of the month andDCN Local-Network Protocols Page 11D.L. Mills 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. DCN Local-Network Protocols Page 12D.L. Mills 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. ParametersADDRESS-OFFSET This is an integer which represents the value of the Internet address field corresponding to the first host in HOST-TABLE.DCN Local-Network Protocols Page 13D.L. MillsNHOSTS 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 FieldsPKT.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.DCN Local-Network Protocols Page 14D.L. MillsPKT.TSP This 16-bit field contains a variable used in roundtrip delay calculations.3.2 CLOCK Process (CLK) The timekeeping system maintains three clocks: (1) the physicalclock, which is determined by a hardware oscillator/counter; (2) theapparent clock, which maintains the time-of-day used by clientprocesses and (3) the actual clock, which represents the time-of-dayprovided by an outside reference. The apparent and actual clocks aremaintained as 48-bit quantities with 32 bits of significance availableto client processes. These clocks run at a rate of 1000 Hz and arereset at midnight UT. The CLOCK process consists of a set of state variables along witha set of procedures that are called as the result of hardwareinterrupts and client requests. An interval timer is assumedlogically separate from the local clock mechanism, although both couldbe derived from the same timing source.3.2.1. Local VariablesCLK.CLOCK This is a 48-bit fixed-point state variable used to represent the apparent time-of-day. The decimal point is to the right of bit 16 (numbering from the right at bit 0). Bit 16 increments at a rate equivalent to 1000 Hz independent of the hardware clock. (In the case of programmable-clock hardware the value of CLK.CLOCK must be corrected as described below.) CLK.COUNT This is a hardware register that increments at rate R. It can be represented by a simple line clock, which causes interrupts at the line-frequency rate, or by a programmable clock, which contains a 16-bit register that is programmed to count at a 1000-Hz rate and causes an interrupt on overflow. The register is considered a fixed-point variable with decimal point to the right of bit 0.CLK.DELTA This is a 48-bit signed fixed-point state variable used to represent the increment to be added to CLK.CLOCK to yield the actual time-of-day. The decimal point is to the right of bit 16.3.2.3. ParametersADJUST-FRACTION This is an integer which defines the shift count used to compute a fraction that is used as a multiplier of CLK.DELTA to correct CLK.CLOCK once each clock-adjust interval. A value of seven is suggested. DCN Local-Network Protocols Page 15D.L. MillsADJUST-INTERVAL This is an integer which defines the clock-adjust interval in milliseconds. A value of 500 (one-half second) is suggested for the line clock and 4000 (four seconds) for the 1000-Hz clock.CLOCK-TICK This is a fixed-point integer which defines the increment in milliseconds to be added to CLK.CLOCK as the result of a clock tick. The decimal point is to the right of bit 16. In the case of a line-clock interrupt, the value of CLOCK-TICK should be 16.66666 (60 Hz) or 20.00000 (50 Hz). In the case of a 1000-Hz programmable-clock overflow, the value should be 65536.00000. HOLD-INTERVAL This is an integer which defines the number of seconds that HOLD will count down after CLK.CLOCK has been reset. The resulting interval must be at least as long as the maximum HELLO-INTERVAL used by any HELLO process.3.2.3. Events and ProceduresINCREMENT-CLOCK Event This event is evoked as the result of a tick interrupt, in the case of a line clock, or a counter overflow, in the case of the 1000-Hz clock. It causes the logical clock to be incremented by the value of CLOCK-TICK. 1. Add the value of CLOCK-TICK to CLK.CLOCK.ADJUST-CLOCK Event This event is evoked once every ADJUST-INTERVAL milliseconds to slew the apparent clock time to the actual clock time as set by the SET-CLOCK procedure. This is done by subtracting a fraction of the correction factor CLK.DELTA from the value of CLK.DELTA and adding the same fraction to CLK.CLOCK. This continues until either the next SET-CLOCK call or CLK.DELTA has been reduced to zero. The suggested values for ADJUST-INTERVAL and ADJUST-FRACTION represent a maximum slew rate of less than +-2 milliseconds per second, in the case of 1000-Hz clock. The action is to smooth noisy clock corrections received from neighboring systems to obtain a high-quality local reference, while insuring the apparent clock time is always monotonically increasing. 1. Shift the 48-bit value of CLK.DELTA arithmetically ADJUST-FRACTION bits to the right, discarding bits from the right and saving the result in a temporary variable F. Assuming the decimal point of F to be positioned to the right of bit 16 and sign-extending as necessary, subtract F from CLK.DELTA and add F to CLK.CLOCK.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -