next up previous contents
Next: System definition Up: Traffic control simulator Previous: Phases underneath tcsim   Contents


Simulations are described in a file. Each description begins with the definition of interfaces, followed by the configuration of traffic control elements (e.g. with a tcng description or a set of tc commands), and then continues with instructions for timing and packet enqueuing or dequeuing.

When using include files, they are usually included at the beginning of the configuration file. Variable assignments may appear anywhere in the file, and are typically placed after the configuration part.


#include "packet.def"
#include ""

/* interface eth0, running at 10 Mbps */
dev eth0 10 Mbps {
    /* configuration in tcng:
       FIFO queue limited to 100 packets */
    fifo (limit 100p);

/* a few global variables */

/* send packet at time t=0s */
send TCP_PCK($tcp_SYN=1)

/* wait until t=1s, then send the next packet */
time 1s
send TCP_PCK($tcp_PSH=1)

/* wait until t=2s, then terminate */
time 2s


Martin A. Brown 2003-11-06