Skip to main content

12. Appendix B -- Backward compatibility

The WPS will support the use of HAP version 0 by hosts until all hosts have upgraded to version 1. The WPS determines which HAP version the host is using by examining the Restart Request and/or Restart Complete control messages sent by the host to the WPS. If the host initiates a restart and thus sends both a Restart Request and a Restart Complete, and if the HAP version numbers in the two messages differ, the version number in the Restart Complete will prevail. The WPS will always set the version number to 1. If the host sends 0 in the version number field, version 0 compatiblity mode will be invoked.

Version 0 of HAP did not contain the PROTOCOL ID field in the datagram and stream message headers. Instead, the IL bit in the Type of Service word was used to indicate the presence or absence of an Internet Protocol (IP) header (any version number) following the HAP header. This is the original description of that bit:

3[1] Internet/Local Flag. This flag is set by a source host to specify to a destination host whether the data portion of the message contains an Internet Protocol (IP) header [3]. This field is passed transparently by the source and destination WPSen for traffic between network hosts. This field is examined by WPS Agents in order to support Internet operation.

  • 0 = Internet
  • 1 = Local

Conversion Algorithms

Link control messages (e.g., Restart Request) do not require conversion. Datagram and stream messages sent by or to a host running HAP version 0 will be converted by the WPS. Message conversion will probably cause the maximum throughput of hosts using HAP version 0 to be somewhat lower than that of hosts using HAP version 1.

HAP version 0 used the IL bit in the HAP Type of Service word to indicate the presence or absence of an IP header. Version 1 uses the Protocol ID field. To convert host-to-WPS messages, the IL bit will be cleared, and the protocol ID field will be inserted, with the value indicated:

        IL was   Destination   Protocol ID set to:
------ ------------- ---------------------
0 any HAP_PROTO_IP (0x800)
1 Service Agent HAP_PROTO_SETUP (1)
1 other HAP_PROTO_NONE (0)

To convert WPS-to-host messages, the protocol ID field will be deleted, and the IL bit will be set by: IL = (protocol_id was HAP_PROTO_IP) ? 0 : 1;

HAP_PROTO_IP (see Appendix C) will be used for IP "versions" 3 (GG protocol), 4 (IP), and 5 (ST).

The datagram message header fields TTL and PRI have been swapped in HAP version 0 compared to version 1. The conversion code swaps the contents of these two fields for hosts running version 0.

The stream message header field TTL in HAP version 0 was replaced by the PRE field in version 1. Since the only permitted value of TTL was 1, and it is a valid PRE value, no conversion is necessary.

In HAP version 0, messages between a host and the Service Agent were allowed to contain Internet Protocol headers. No hosts use that capability, so no provision will be made to accommodate IP headers in Setups between hosts and the Service Agent.

In version 0, the Restart Request control message contained a "reason for restart" field. That field was ignored in all current implementations and has been eliminated in version 1.

Current implementations expect the WPS to insert an "incarnation count" in bits 5-10 of the first word of both Restart Request and Restart Complete messages. This functionality has been replaced by the "SL" bit in the Restart Complete message in version 1. Compatibility code will be added if needed, but it is expected that none will be needed.