Documentation of the test_tool Program

 

1. Running the program from the command line

The SCTP-Test program is controlled by a script file (see chapter 2)

The name of the script file must be specified as a command line parameter:

test_tool <scriptfile>

The program directory contains two examples of script files ("script1" and "script2"). They can be run on different machines and do some (useless) communication. Of course, IP-addresses in the INITIALIZE and ASSOCIATE commands have to be adapted first.

 

 

2. The Script File

2.1 Syntax description

The syntax of commands depends on whether they have parameters or not. If parameters are specified, they always consist of a key and a value. The value may either be a positive integer or a character string. Character strings may optionally be enclosed in quotation marks (see remarks below).

COMMAND;

COMMAND: PARAMKEY=VALUE, PARAMKEY=VALUE, ..... ;

 

Comments are preceded by at least one '#' character and may occur anywhere in the script file:

# COMMENT (to be printed on ‘stdout’ when reached in script file)

## COMMENT (NOT to be printed)

 

Examples:

INITIALIZE: IP=192.168.0.1, PORT=10000, INSTREAMS=15, OUTSTREAMS=15;

SET_PAYLOAD_BODY: CONTENTS="Hello, world!", LENGTH=200;

DISABLE_RECEIVE;

 

 

2.2 Commands and Parameters

 

2.2.1 Loops

Syntax: LOOP: TIMES=<number of executions of the loop body>;

<loop body>

ENDLOOP;

 

2.2.2 Initialization

Command: INITIALIZE

Parameters: IP=<local IP address>

PORT=<local port>

INSTREAMS=<maximum number of in-streams>

OUTSTREAMS=<maximum number of out-streams>

 

2.2.3 Pause in script

Command: PAUSE

Parameter: TIME=<delay time in milliseconds>

 

2.2.4 Wait for an association

Command: WAIT_FOR_ASSOC

Parameters: none

 

2.2.5 Associate

Command: ASSOCIATE

Parameters: IP=<destination IP>

PORT=<destination port>

OUTSTREAMS=<number of out-streams>

2.2.6 Shutdown an association

Command: SHUTDOWN

Parameters: none

 

2.2.7 Abort an association

Command: ABORT

Parameters: none

 

2.2.8 Send chunks

Command: SEND_CHUNKS

Parameters: NUM=<number of chunks to be sent>

DELAY=<delay (in msec) between two successive chunks> (optional; default: 0)

STREAM=<stream ID> (optional; default: 0)

 

2.2.9 Disable chunk receive on stream 0

Command: DISABLE_RECEIVE

Parameters: none

 

2.2.10 Enable chunk receive (on stream 0)

Command: ENABLE_RECEIVE

Parameters: none

 

 

2.2.11 Set payload header

Command: SET_PAYLOAD_HEADER

Parameters: TYPE=<TYPE in hexadecimal format (2 bytes)>

MBU=<MBU in hexadecimal format (1 byte)>

MCH=<MCH in hexadecimal format (1 byte)>

JC1=<JC1 in hexadecimal format (1 byte)>

JC2=<JC2 in hexadecimal format (1 byte)>

 

2.2.12 Set payload body

Command: SET_PAYLOAD_BODY

Parameters: CONTENTS=<payload body>

LENGTH=<body length>

CONTENTS=ABCDEFGHIJKLMNOPQRSTUVWXYZ

LENGTH=26

Example: if the CONTENTS string is set to "abc" and the LENGTH is set to "10", the payload body will actually be set to "abcabcabca".

 

2.2.13 Set receive mode

Command: SET_RECEIVE_MODE

Parameter: MODE=MIRROR | DISCARD

 

2.2.14 Set Heartbeat Time Interval

Command: SET_HEARTBEAT

Parameter: TIMEINTERVAL=<heartbeat time interval in msec>

 

2.2.15 Set local receiver window size

Command: SET_RWND

Parameter: SIZE=<size of local receiver window in bytes>

 

2.2.16 Set local receive queue size

Command: SET_RECV_QUEUE

Parameter: SIZE=<maximum number of chunks queued in the receive queue>

 

2.2.17 Set acknowledge delay

Command: SET_ACK_DELAY

Parameter: ACK=<acknowledge delay in msec>