NAME

  GEN_InvalidStreamIdent.seq - Generation of error cause Invalid Stream Identifier


PURPOSE

  To check that if DATA chunk is received with an invalid stream identifier, the
  endpoint should immediately send an ERROR chunk with cause set to "Invalid
  Stream Identifier" and discard the DATA chunk.


SYNOPSIS

  ./GEN_InvalidStreamIdent.seq [-tooloption ...] -pkt ./GEN_InvalidStreamIdent.def
    -tooloption : v6eval tool option
  See Also: ../common/STD_PKT_COMMON.def
            ../common/SCTP_COMMON.def


PRE-TEST CONDITION

  Association is established between endpoint A and B. Arrange data 
  in endpoint A such that DATA chunk with invalid stream identifier
  is sent to endpoint B.


TEST PROCEDURE

  Endpoint A                           Endpoint B                ULP
  (ESTABLISHED)                        (ESTABLISHED)
  DATA          ----------------->
  (with Invalid Stream Identifier)
                <-----------------      ERROR
                                        Invalid Stream Identifier)
  TEST DESCRIPTION:
  1. Send DATA chunk from endpoint A to B with invalid stream
     identifier.
  2. Check A: ERROR should be received at endpoint A.
  3. Check B: Error cause in ERROR is set to "Invalid Stream
     Identifier".
  4. Check C: SACK should be received at endpoint A.


NOTE

  None


REFERENCE

  RFC 4960
  3.3.10.1.  Invalid Stream Identifier (1)
    Cause of error
    ---------------
    Invalid Stream Identifier: Indicates endpoint received a DATA chunk
    sent to a nonexistent stream.
        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        |     Cause Code=1              |      Cause Length=8           |
        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        |        Stream Identifier      |         (Reserved)            |
        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    Stream Identifier: 16 bits (unsigned integer)
      Contains the Stream Identifier of the DATA chunk received in
      error.
    Reserved: 16 bits
      This field is reserved.  It is set to all 0's on transmit and
      ignored on receipt.
  6.5.  Stream Identifier and Stream Sequence Number
    Every DATA chunk MUST carry a valid stream identifier.  If an
    endpoint receives a DATA chunk with an invalid stream identifier, it
    shall acknowledge the reception of the DATA chunk following the
    normal procedure, immediately send an ERROR chunk with cause set to
    "Invalid Stream Identifier" (see Section 3.3.10), and discard the
    DATA chunk.  The endpoint may bundle the ERROR chunk in the same
    packet as the SACK as long as the ERROR follows the SACK.
    The Stream Sequence Number in all the streams MUST start from 0 when
    the association is established.  Also, when the Stream Sequence
    Number reaches the value 65535 the next Stream Sequence Number MUST
    be set to 0.