Main home page
Send an e-mail
 Concept |  Features |  A first example |  Examples of complex usage 
GASP stands for 'Generator and Analyzer System for Protocols'. It allows you to decode and encode any protocols you specify.

The main use is probably to test networks applications : you can construct packets by hand and test the behavior of your program when facing some strange packets. But you can image a lot of other application : e.g. manipulating graphical file or executable headers. Just describe the specification of the structured data.

GASP is divided in two parts : a compiler which take the specification of the protocols and generate the code to handle it, this code is a new Tcl command as GASP in build upon Tcl/Tk and extends the scripting facilities provided by Tcl.

Enough words, let's see how all this works. Let image you're working on a TCP/IP packet. To dump the IP header and change some values, it is quite simple :

% pkt ip configure
-version 4 -headerlength 5 -tos {routine {-delay -throughput -reliability -res1 -res2}}
-length 69 -identification 12345 -flags {-res -df -mf} -fragoffset 0 -ttl 10
-protocol tcp -checksum 27768 -src -dest -options {}
% pkt ip configure -dest -flags +df


Copyright © 2000 Laurent Riesterer.
Last modified on Mar 2, 2000.