3.1.5.1.2 ACK Datagrams

The following steps specify the creation of an ACK datagram:

  1. An RDPUDP_FEC_HEADER structure (section 2.2.2.1) MUST be appended to the UDP datagram.

    • The snSourceAck variable MUST be set to the largest sequence number the receiver has seen so far. Sequence numbers will wrap over after overflow, and the receiver MUST handle this case.

    • The uReceiveWindowSize variable MUST be set to the size of the receive buffer. The receive buffer is the number of packets the receiver specified it can buffer.

    • The uFlags flag MUST be set as follows:

      • The RDPUDP_FLAG_ACK flag MUST be set.

      • The RDPUDP_FLAG_CN flag SHOULD be set only if the receiver has detected a lost datagram and has not received a datagram with the RDPUDP_FLAG_CWR flag corresponding to that RDPUDP_FLAG_CN flag.

      • The RDPUDP_FLAG_ACK_OF_ACKS flag SHOULD be set only if the sender sends an ACK for the section ACK vector (section 2.2.2.7.1).

  2. An RDPUDP_ACK_VECTOR_HEADER structure (section 2.2.2.7) header MUST be appended as follows:

    • The uAckVectorSize variable MUST be set to the number of elements in the array.

    • An array of elements, that captures the receiver’s queue by using run-length encoding (RLE), as specified in section 3.1.1.4.1.

  3. An RDPUDP_ACK_OF_ACKVECTOR_HEADER structure (section 2.2.2.6) SHOULD be appended by the sender if both of the following occur:

    • The RDPUDP_FLAG_ACK_OF_ACKS flag is set.

    • The snAckOfAcksSeqNum variable was set as the new start position of the ACK Vector.