5. Flow Control Messages
The WPS supports an acceptance/refusal (A/R) mechanism in each direction on the host access link. The A/R mechanism is enabled for the link by the host by setting a bit in the Restart Complete control message (see Section 8). Each datagram and stream message contains an 8-bit message number used to identify the message for flow control purposes. When the A/R mechanism is enabled, the message number is incremented modulo 256 in successive messages, skipping over message number zero (zero indicates that A/R's are disabled for that message). Up to 127 messages may be outstanding (awaiting acceptance or refusal) in each direction. If the receiver of a message is unable to accept the message, a refusal indication containing the message number of the refused message and the reason for the refusal is returned. The refusal indication may be piggybacked on data messages in the opposite direction over the link or may be sent in a separate control message in the absence of reverse data traffic.
Acceptance indications are returned in a similar manner, either piggybacked on data messages or in a separate control message. An acceptance is returned by the receiver to indicate that the identified message was received from the host access link and was not refused. Acceptance indications returned by the WPS are not an end-to-end acknowledgement and do not imply any guarantee of delivery to the destination host(s), or even any assurance that the message will not be intentionally discarded by the network. They are sent primarily to facilitate buffer management in the host.
To reduce the number of A/R messages exchanged, a single A/R indication can be returned for multiple (lower numbered) previously unacknowledged messages. Explicit acceptance of message number N implies implicit acceptance of outstanding messages with numbers N-1, N-2, etc., according to the definition of acceptance outlined above. Analogous interpretation of the refusal message number allows the receiver of a group of messages to reject them as a group when they all are being refused for the same reason. As a further efficiency measure, HAP permits aggregation of any mix of A/R indications into a single A/R control message. Such a message might be used, for example, to reject a group of messages where the refusal code on each is different.
In some circumstances the overhead associated with processing A/R messages may prove unattractive. For these cases, it is possible to disable the A/R mechanism and operate the HAP interface in a purely discard mode. The ability to effect this on a link basis has already been noted (see Sections 2 and 8). In addition, messages with sequence number zero are taken as messages for which the A/R mechanism is selectively disabled. To permit critical feedback, even when operating in discard mode, HAP defines an "Unnumbered Response" control message. Flow control information, and other information which cannot be sent as an A/R indication, is sent in an Unnumbered Response control message. The format of this type of message is illustrated in Figure 5.
The format shown in Figure 3 is used both for A/R indications that are piggybacked on data messages (word 2), and for aggregated A/R information in A/R control messages. The format of A/R control messages is shown in Figure 4.
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|AR| REFUSAL CODE | A/R MESSAGE NUMBER |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
ACCEPTANCE/REFUSAL WORD
Figure 3
[0] Acceptance/Refusal Type. This field identifies whether A/R information is an acceptance or a refusal.
- 0 = Acceptance
- 1 = Refusal
[1-7] Refusal Code. When the Acceptance/Refusal Type = 1, this field gives the Refusal Code.
- 0 = Priority not being accepted
- 1 = Source WPS congestion
- 2 = Destination WPS congestion
- 3 = Destination host dead
- 4 = Destination WPS dead
- 5 = Illegal destination host address
- 6 = Destination host access not allowed
- 7 = Illegal source host address
- 8 = Message lost in access link
- 9 = Invalid stream ID
- 10 = Illegal source host for stream ID
- 11 = Message length too long
- 12 = Stream message too early
- 13 = Illegal control message type
- 14 = Illegal refusal code in A/R
- 15 = Can't implement loop
- 16 = Destination host congestion
- 17 = Delivery refused
- 18 = Odd byte length packet (not allowed)
- 19 = Invalid stream time-to-live value
- 20 = "Reliability length" exceeds message length
[8-15] A/R Message Number. This field contains the number of the message to which this acceptance/refusal refers. It also applies to all outstanding messages with earlier numbers. Note that this field can never be zero since a message number of zero implies that the A/R mechanism is disabled.
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
0 | 1|LB|GOPRI| 0 | LENGTH | 1 |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
1 | HEADER CHECKSUM |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
| |
2-N : A/R's :
| |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
ACCEPTANCE/REFUSAL MESSAGE
Figure 4
0[0] Message Class = 1 (Control Message).
0[1] Loopback indicator.
0[2-3] Go-Priority.
0[4-7] Reserved.
0[8-11] Message Length. This field contains the total length of this message in words (N+1).
0[12-15] Control Message Type = 1 (Acceptance/Refusal).
1[0-15] Header Checksum. The checksum is the 2's-complement of the 2's-complement sum of words 0-N (excluding the checksum word itself).
2[0-15] Acceptance/Refusal Word.
3-N Additional Acceptance/Refusal Words (optional).
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
0 | 1|LB|GOPRI| 0 | RES-CODE | 5 |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
1 | HEADER CHECKSUM |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
2 | RESPONSE INFO |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
3 | RESPONSE INFO |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
UNNUMBERED RESPONSE
Figure 5
0[0] Message Class = 1 (Control Message).
0[1] Loopback indicator.
0[2-3] Go-Priority.
0[4-7] Reserved.
0[8-11] Response Code.
- 3 = Destination unreachable
- 5 = Illegal destination host address
- 7 = Illegal source host address
- 9 = Nonexistent stream ID
- 10 = Illegal stream ID
- 13 = Protocol violation
- 15 = Can't implement loop
0[12-15] Control Message Type = 5 (Unnumbered Response).
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] Response Information. If Response Code is:
- 3 : Destination Host Address
- 5 : Destination Host Address
- 7 : Source Host Address
- 9 : Stream ID (right justified)
- 10 : Stream ID (right justified)
- 13 : Word 0 of offending message
- 15 : Word 0 of Loopback Request message
3[0-15] Response Information. If Response Code is:
- 3,5,7, or 9 : Undefined
- 10 : Source Host Address
- 13 : Word 3 of offending message, or 0 if no word 3
- 15 : Word 2 of Loopback Request message