- tgn [-V] [-v] [-l] [-s random seed] [-w PCAP filename] [-o output speaker] [-c packet count] [-h] [PDU definition]
The only mandatory option is a PDU definition.
The -c switch allows to specify the number of packets to send. If -c is not provided then the number of packets to send is calculated automatically based on the PDU definition.
-V causes tgn to print its version number and exit.
The -s flag allows to specify a random seed that will cause predicatibility of pseudo-random numbers generated by tgn during execution of a script. In cases where tgn is used as a protocol fuzzer, this option is useful to be able to re-generate a specific test case.
-v increases the verbosity level. Additional information may be displayed when the verbosity level is higher.
The -l flag causes tgn to display all available network speakers and exit. See nexp(1) for a discussion of network speakers.
The -o flag allows to select a specific network speaker for output. Use the -l option to list available speakers. By default, the "ip" speaker (kernel-routed IP packet delivery) is tried first and if it is not available, which can happen if tgn is not run with root privileges, the "hex" speaker is used.
The PDU definition is a string that defines a PDU. It uses libpbuild PDU syntax.
shell# tgn -o eth0 "ip(dst = 192.168.1.1)/icmp-echo(id = 'random')"
shell# tgn "ip(src = 192.168.0.1, dst = <192.168.0.10, 192.168.0.11>,ttl = <1, 2>)/" \ "tcp(src = 'random', dst = 22..25, window = 16384,syn, seq = 'random', ack-seq = 0)"
shell# tgn -w /tmp/cap -c 5 "ether()/ip(dst = 184.108.40.206++)/icmp-echo(seq = 0++)" \ && wireshark /tmp/cap
tgn has not been ported to Microsoft Windows.
This man page is correct for version 1.0 of tgn.
Network Expect was written by Eloy Paris <[email protected]>. However, Network Expect borrows ideas from lots of Open Source tools like Nemesis, Packit, hping, Expect, and Scapy. The Network Expect author is indebted to the authors of these tools for their contribution.
This man page was written by Eloy Paris.