.\" Title: tgn
.\" Author:
.\" Generator: DocBook XSL Stylesheets v1.73.2
.\" Date: 09 September 2009
.\" Manual:
.\" Source:
.\"
.TH "TGN" "1" "09 September 2009" "" ""
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.SH "NAME"
tgn \- a network traffic generator
.SH "SYNOPSIS"
.HP 4
\fBtgn\fR [\fB\-V\fR] [\fB\-v\fR] [\fB\-l\fR] [\fB\-s\fR\ \fIrandom\ seed\fR] [\fB\-w\fR\ \fIPCAP\ filename\fR] [\fB\-o\fR\ \fIoutput\ speaker\fR] [\fB\-c\fR\ \fIpacket\ count\fR] [\fB\-h\fR] [\fIPDU\ definition\fR]
.SH "DESCRIPTION"
.PP
\fBtgn\fR
is a network traffic generator\&. It is command\-line interface (CLI) program that does the same thing as the
\fBsend_network\fR
command of the
\fBNetwork Expect\fR
framework\&. Refer to nexp(1)
for additional details regarding the
\fBsend_network\fR
command\&.
.PP
The only mandatory option is a PDU definition\&.
.PP
The
\fB\-c\fR
switch allows to specify the number of packets to send\&. If
\fB\-c\fR
is not provided then the number of packets to send is calculated automatically based on the PDU definition\&.
.PP
\fB\-V\fR
causes
\fBtgn\fR
to print its version number and exit\&.
.PP
The
\fB\-s\fR
flag allows to specify a random seed that will cause predicatibility of pseudo\-random numbers generated by
\fBtgn\fR
during execution of a script\&. In cases where
\fBtgn\fR
is used as a protocol fuzzer, this option is useful to be able to re\-generate a specific test case\&.
.PP
\fB\-v\fR
increases the verbosity level\&. Additional information may be displayed when the verbosity level is higher\&.
.PP
The
\fB\-l\fR
flag causes
\fBtgn\fR
to display all available network speakers and exit\&. See nexp(1)
for a discussion of network speakers\&.
.PP
The
\fB\-o\fR
flag allows to select a specific network speaker for output\&. Use the
\fB\-l\fR
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
\fBtgn\fR
is not run with root privileges, the "hex" speaker is used\&.
.PP
The PDU definition is a string that defines a PDU\&. It uses libpbuild PDU syntax\&.
.SH "EXAMPLES"
.sp
.RS 4
.nf
shell# tgn \-o eth0 "ip(dst = 192\&.168\&.1\&.1)/icmp\-echo(id = \'random\')"
.fi
.RE
.sp
.RS 4
.nf
shell# tgn "ip(src = 192\&.168\&.0\&.1, dst = <192\&.168\&.0\&.10, 192\&.168\&.0\&.11>,ttl = <1, 2>)/" \e
"tcp(src = \'random\', dst = 22\&.\&.25, window = 16384,syn, seq = \'random\', ack\-seq = 0)"
.fi
.RE
.sp
.RS 4
.nf
shell# tgn \-w /tmp/cap \-c 5 "ether()/ip(dst = 1\&.2\&.3\&.4++)/icmp\-echo(seq = 0++)" \e
&& wireshark /tmp/cap
.fi
.RE
.SH "BUGS"
.PP
\fBtgn\fR
has not been ported to Microsoft Windows\&.
.SH "VERSION"
.PP
This man page is correct for version 1\&.0 of
\fBtgn\fR\&.
.SH "SEE ALSO"
.PP
nexp\-numspec(1), nexp\-payload(1), nexp\-ether(5), nexp\-gre(5), nexp\-ip(5), nexp\-mpls(5), nexp(1)
.SH "AUTHOR"
.PP
\fBNetwork Expect\fR
was written by Eloy Paris \&. However,
\fBNetwork Expect\fR
borrows ideas from lots of Open Source tools like Nemesis, Packit, hping, Expect, and Scapy\&. The
\fBNetwork Expect\fR
author is indebted to the authors of these tools for their contribution\&.
.PP
This man page was written by Eloy Paris\&.