Valid8 Logo PRODUCTS | SERVICES | SUPPORT | ABOUT US | CONTACT
Valid8 Logo


HOME


NEWS
ARCHIVES


PRODUCTS

SIP
MEGACO
MGCP
SCTP
SIGTRAN
H.323
RTP
HARDWARE
MOBILE
OTHER

CUSTOMERS


PRIVACY





>> QUICK LINKS

TESTING AREAS EXPLAINED

CONVERSION TOOLS

GLOSSARY




SCTP Signaling Tester and Conformance Test Suite
Boundary Test Example
Contact Sales
 

 

 

//===============================================================================

//

//  SHUTDOWN chunk - tests for too short and too long

//

//

//       0                   1                   2                   3

//       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1

//      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

//      |   Type = 7    | Chunk  Flags  |      Length = 8               |

//      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

//      |                      Cumulative TSN Ack                       |

//      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

//

//

//  NOTE:  USE_CORRECT_LENGTH_VALUE uses the correct length of the chunk as

//         if there were no modifications to its actual size.

//

//         A SHUTDOWN chunk is normally created as an 8-byte chunk, so

//         the Length field would be set to 8, regardless of how many

//         bytes long the chunk actually is.

//

//         USE_ACTUAL_LENGTH uses the actual physical packet size as if it

//         were created normally.

//

//         A SHUTDOWN chunk is normally 8 bytes long, so the chunk would

//         actually by 8 bytes, regardless of what the Length field is

//         set to.

//

 

 

SCENARIO SCTP_Test_SHUTDOWN_TOO_SHORT;

TESTPURPOSE 'Send specific SHUTDOWN packets that are too short.';

 

START;

    CALL SCTP_Reset_Connection;

 

 

    // NOTE:  The real packet would be 8 bytes long

    //        (i.e., an 8-byte packet that says it's 8 bytes long)

 

 

    // This sends an 8-byte chunk that says it's 4 bytes

    //

    OUTPUT SHUTDOWN_TOO_SHORT(

                     4,                             // chunk Length field

                     USE_ACTUAL_LENGTH,             // actual size of chunk

                     Cumulative_Peer_TSN + Shutdown_TSN_OFFSET_VAL)

                VIA  SCTP_PCO1;

 

 

    // This sends a 4-byte chunk that says it's 8 bytes

    //

    OUTPUT SHUTDOWN_TOO_SHORT(

                     USE_CORRECT_LENGTH_VALUE,      // chunk Length field

                     4,                             // actual size of chunk

                     Cumulative_Peer_TSN + Shutdown_TSN_OFFSET_VAL)

                VIA  SCTP_PCO1;

 

    VERDICT(PASS);

    STOP;

 

ENDSCENARIO;

 

 

 

SCENARIO SCTP_Test_SHUTDOWN_TOO_LONG;

TESTPURPOSE 'Send specific SHUTDOWN packets that are too long.';

 

START;

    CALL SCTP_Reset_Connection;

 

 

    // NOTE:  The real packet would be 8 bytes long

    //        (i.e., an 8-byte packet that says it's 8 bytes long)

 

 

    // This sends a regular normal packet (both the Length value and

    // the physical size of the chunk are "use the real value")

    //

    OUTPUT SHUTDOWN_TOO_LONG(

                     USE_CORRECT_LENGTH_VALUE,      // chunk Length field

                     USE_ACTUAL_LENGTH,             // actual size of chunk

                     Cumulative_Peer_TSN + Shutdown_TSN_OFFSET_VAL)

                VIA  SCTP_PCO1;

 

 

    // This sends an 8-byte chunk that says it's 16 bytes

    //

    OUTPUT SHUTDOWN_TOO_LONG(

                     16,                            // chunk Length field

                     USE_ACTUAL_LENGTH,             // actual size of chunk

                     Cumulative_Peer_TSN + Shutdown_TSN_OFFSET_VAL)

                VIA  SCTP_PCO1;

 

 

    // This sends a 32-byte chunk that says it's 8 bytes

    //

    OUTPUT SHUTDOWN_TOO_LONG(

                     USE_CORRECT_LENGTH_VALUE,      // chunk Length field

                     32,                            // actual size of chunk

                     Cumulative_Peer_TSN + Shutdown_TSN_OFFSET_VAL)

                VIA  SCTP_PCO1;

 

 

    // This sends a 20-byte chunk that says it's 20 bytes

    //

    OUTPUT SHUTDOWN_TOO_LONG(

                     20,                            // chunk Length field

                     20,                            // actual size of chunk

                     Cumulative_Peer_TSN + Shutdown_TSN_OFFSET_VAL)

                VIA  SCTP_PCO1;

 

 

    // This sends a 7-byte chunk that says it's 7 bytes

    //

    OUTPUT SHUTDOWN_TOO_LONG(

                     7,                             // chunk Length field

                     7,                             // actual size of chunk

                     Cumulative_Peer_TSN + Shutdown_TSN_OFFSET_VAL)

                VIA  SCTP_PCO1;

 

 

    // This sends a 7-byte chunk that says it's 8 bytes

    //

    OUTPUT SHUTDOWN_TOO_LONG(

                     7,                             // chunk Length field

                     USE_ACTUAL_LENGTH,             // actual size of chunk

                     Cumulative_Peer_TSN + Shutdown_TSN_OFFSET_VAL)

                VIA  SCTP_PCO1;

 

 

    // This sends an 8-byte chunk that says it's 7 bytes

    //

    OUTPUT SHUTDOWN_TOO_LONG(

                     USE_CORRECT_LENGTH_VALUE,      // chunk Length field

                     7,                             // actual size of chunk

                     Cumulative_Peer_TSN + Shutdown_TSN_OFFSET_VAL)

                VIA  SCTP_PCO1;

 

    VERDICT(PASS);

    STOP;

 

ENDSCENARIO;