Skip to main content

8. Initialization

The Host Access Protocol uses a number of state variables that must be initialized in order to function properly. These variables are associated with the send and receive message numbers used by the acceptance/refusal mechanism and the statistics maintained to support link monitoring. Link initialization should be carried out when a machine is initially powered up, when it does a system restart, when the ON state (see below) times out, when a loopback condition times out (see Section 9), or whenever the link transitions from non-operational to operational status.

Initialization is accomplished by the exchange of Restart Request (RR) and Restart Complete (RC) messages between a host and a WPS. Either end (or both ends) may send an initial RR, and both ends must have sent and received an RC message in order to declare the link up. Because the RC message is a reply (to an RR or RC), receipt of an RC message by both ends guarantees that the physical link is operating in both directions. The initialization state diagram that must be implemented by both WPS and host is shown in Figure 36. Five states are identified in the state diagram:

OFF Entered upon recognition of a requirement to restart. The interface in the Host or WPS can recognize this requirement itself or be forced to restart by receipt of an RR message from the other end while in the ON state.

INIT Local state variables have been initialized but no RC messages have yet been sent or received. If receipt of an RR initiated the restart, or if an RR has been received since this restart began, send an RC (optional, reduces startup time). Otherwise, send an RR to alert the other end of the restart.

RR-SNT A request to reinitialize (RR) has been sent to the other end, but no RR or RC messages have been received.

RC-SNT An RC has been sent to the other end in response to an RR. The interface is waiting to receive an RC.

ON RC messages have been both sent and received. Local counters have been zeroed. Data and control messages can now be exchanged between the WPS and host.

All states have 10-second timeouts (not illustrated) which return the protocol to the OFF state. The occurrence of any events other than those indicated in the diagram are ignored.

                              .-----.
         Any Timeout or ----->| OFF |<----------------------------+
         Device Down          `--+--'                             |
                                 |                                |
                                 | (When I/O Device Up)           |
                                 V                                |
                             .-------.                            |
                             | INIT  |                            |
                             `---+---'                            |
                                 |                                |
                   (Yes)         V            (No)                |
                  +---------RR Received?----------+               |
                  |                               |               |
                  |                            Send RR            |
                  |                               |               |
                  |                               V               |
                  |                           .--------.          |
               Send RC <-----+-------<--------+ RR-SNT |          |
                  |          |       (Rcv RR) `---+----'          |
                  |          |                    | (Rcv RC)      |
                  V          |                    |               |
             .--------.      |                    |               |
             | RC-SNT +--->--+                 Send RC            |
             `----+---'  (Rcv RR)                 |               |
         (Rcv RC) |                               |               |
                  |                               |               |
                  +------->------+-------<--------+               |
                                 |                                |
                      Initialize Status Counters                  |
                                 |                                |
                                 V                                |
                              .-----.   Rcv RR   or               |
              Rcv Any  +----->| ON  +---------------------->------+
              Other    |      `--+--'   Fail to Rcv Status message
                       +---------+      for 10 seconds
                      HAP LINK RESTART STATE DIAGRAM
                                 Figure 36

The Restart Request control message (Figure 37) is sent by either a host or a WPS when it wishes to restart a link. The Restart Request causes all the monitoring statistics reported in the Status Message to be reset to zero and stops all traffic on the link in both directions. The Restart Complete message (Figure 38) is sent in response to a received Restart Request or Restart Complete to complete link initialization. The Restart Complete carries a field used by the host to enable or disable the acceptance/refusal mechanism for the link being restarted (see Section 5). After the Restart Complete is processed, traffic may flow on the link.

The allocation and state of network resources (streams and groups) are separate from the state of the host's access link(s) to the WPS. The Information Request message (see Section 6.5) may be used by a host to determine what resources it has. If the "SL" bit is set in the Restart Complete message from the WPS, and if the host believes it has resources allocated to it, the host is strongly encouraged to use an Information Request to verify that it still has its resources.

                 0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
0 | 1|LB| 0 |VERSION | 0 | 3 |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
1 | HEADER CHECKSUM |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
2 | HOST ADDRESS |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
3 | LINK NUMBER |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
RESTART REQUEST
Figure 37

0[0] Message Type = 1 (Control Message).

0[1] Loopback indicator.

0[2-4] Reserved. Must be zero.

0[5-7] HAP version number. Use 1. Use of zero invokes backward compatibility code (see Appendix B).

0[8-11] Reserved. Must be zero.

0[12-15] Control Message Type = 3 (Restart Request).

1[0-15] Header Checksum. The checksum is the 2's-complement of the 2's-complement sum of words 0-3 (excluding the checksum word itself).

2[0-15] Host Address. The WPS inserts the primary network address of the host. The host may insert any of its network addresses in this field (hosts may have more than one logical address per physical port). The WPS will only bring up the HAP link if the host address is valid for the port being used.

3[0-15] Link Number. This field contains the sender's identification of the physical link being used. This information is used to identify the link when reporting errors to the Network Operations Center (NOC).

                 0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
0 | 1|LB| 0 |VERSION | 0 |SL|AR| 4 |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
1 | HEADER CHECKSUM |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
2 | HOST ADDRESS |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
3 | LINK NUMBER |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
RESTART COMPLETE
Figure 38

0[0] Message Type = 1 (Control Message).

0[1] Loopback indicator.

0[2-4] Reserved. Must be zero.

0[5-7] HAP version number. Use 1. Use of zero invokes backward compatibility code (see Appendix B).

0[8-9] Reserved. Must be zero.

0[10] Service loss alert (boolean) (WPS to host only; host must send zero). If the WPS has any reason to believe that the resources allocated to the host may not match what the host believes is allocated, SL is set to one. If SL is one, a host that believes it owns any resources is strongly encouraged to use an Information Request to verify that the resources are still allocated. SL will be one the first time a link is brought up after a WPS is restarted, and may be set in other cases.

0[11] Acceptance/Refusal Control. This bit is used by the host to enable or disable the acceptance/refusal mechanism for all traffic on the link.

  • 0 = Disable acceptance/refusal
  • 1 = Enable acceptance/refusal

0[12-15] Control Message Type = 4 (Restart Complete).

1[0-15] Header Checksum. Covers words 0-3.

2[0-15] Host Address.

3[0-15] Link Number.