3.1.5.1.1 Receiving a DATA Packet

When a DATA packet is received in the SESSION ESTABLISHED state:

  • If a higher layer posted a receive, finish that receive with the data in the packet; otherwise, buffer the packet in the ReceivePacketQueue variable of the Session object.

  • If the value of the WNDW field of the DATA packet is greater than the value of the HighWaterForSend variable of the Session object, the receiver of the DATA packet MUST do the following:

    • If there are any packets waiting to be sent (section 3.1.4.3), the SMP layer sends the packets to its peer, up to and including the value of the packet number defined by the WNDW field.

    • Set the value of the HighWaterForSend variable of the Session object equal to the value of the WNDW field of the DATA packet.

  • If the value of the SEQNUM field of the DATA packet is not equal to the value of the SeqNumForRecv variable of the Session object plus 1, an error is raised to the higher layer and the underlying transport layer is closed.

Note When a DATA packet is received in the FIN SENT state, the packet is ignored.

Note When a DATA packet is received in the FIN RECEIVED state, an error SHOULD be raised to the higher layer and the underlying transport connection SHOULD be closed.