Garbler info

"Unix Datagram Sockets and the Network Garbler"

BSD datagram sockets provide unreliable message transmission. However, because of the local network environment, communication between the instructional machines is much more well-behaved than in a typical real-world environment. To simulate a more realistic setting, and provide a means for your team to thoroughly test the project implementation, you will be required to use the ATM network garbler.

The ATM network garbler discards and corrupts (note that no byte in the ATM cell header is corrupted) datagrams according to parameters that are set at run-time. The object code for the garbler is in ~hollings/garb/atm-garb.o on the class cluster. The header file is also in the same directory. Note that it is compiled for the Alpha machines. Your program must be compiled under this environment in order to use the package. And your program should be linked with atm-garb.o.

To use the garbler, your program only needs to follow three steps . Firstly, include the atm-garb.h header file. And instead of using sendto(3) to send datagrams, you must use the garb_sendto_normal() routine provided by atm-garb.o for the usual signalling and data cells. For the routing cells, you should use garb_sendto_routing(). The parameters for both these call remain the same as the UDP sendto(), except that the len parameter must be 53, the ATM cell size for both functions. Lastly, when your program starts up, it should initialize the garbler by calling the routine garb_init().

garb_init() sets the garbler's parameter values by reading the initialization file atm-garb.init in the process's current directory.

The parameter values must be listed one per line in the order shown below, with no intervening blank lines. A comment can follow each value (on the same line).

For the demo, the probabilities for dropping and corrupting the routing cells will be set to ZERO. Of course, you are welcome to set non-zero values for these and demo it.

You should NEVER send a signalling or data cell through the garb_sendto_routing() function. Doing this is considered cheating (we have ways of detecting this !), and you will be penalized for that.

The print statistics routine (described later in this document) prints the number of AAL7 trailers going through garb_sendto_routing(). Make sure you always see a value ZERO here. Otherwise, it means you are sending a data cell as a routing cell and this, as mentioned before, is not allowed.

A sample garbler initialization file is provided in ~hollings/garb/atm-garb.init. To cause the garbler to have absolutely no effect, set the values of all the parameters to 0.

Another function which may be useful is garb_print_stats(). The function prints out the version number of the garbler, the current values of the garbler's parameters, and some simple statistics like number of cells garbled. It does NOT change any of the parameter values.


Last changed: April 3, 1997 by Jeff Hollingsworth