summaryrefslogtreecommitdiff
path: root/trafgen.8
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2016-02-01 15:56:10 +0100
committerTobias Klauser <tklauser@distanz.ch>2016-02-01 16:22:24 +0100
commitf26175af848bfb3faaedd98b402949e8bd7ab8bc (patch)
tree3901fb68dd629e08abc02b81349ff4cb6b26f213 /trafgen.8
parent0042946ef9e332e32af00a0fe0c6c7b6eec4b0e1 (diff)
trafgen: parser: Add TCP header generation function
Add a function 'tcp()' to generate TCP headers from the trafgen configuration language. Fields supported: sp|sport TCP source port (default 0) dp|dport TCP destination port (default 0) seq Sequence number (default: 0) aseq|ackseq Acknowledgement number (default 0) doff|hlen Header length/data offset (default: 5) cwr Congestion Window Reduced flag (default: 0) ece|ecn ECN-Echo flag (default: 0) urg Urgent flag (default: 0) ack Acknowledgement flag (default: 0) psh Push flag (default: 0) rst Reset flag (default: 0) syn Synchronize flag (default: 0) fin Finish flag (default: 0) win|window Receive window size (default: 0) csum Checksum field (calculated automatically) urgptr Urgent pointer (default: 0) Example (SYN on port 80/http): { tcp(dport=80, syn, window=5840) } Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'trafgen.8')
-rw-r--r--trafgen.859
1 files changed, 59 insertions, 0 deletions
diff --git a/trafgen.8 b/trafgen.8
index 48a252c..207cfc5 100644
--- a/trafgen.8
+++ b/trafgen.8
@@ -428,6 +428,65 @@ By default, if the lower level header is Ethernet, its EtherType field is set to
By default, if the lower level header is IPv4, its protocol field is set to
0x11 (UDP).
+.I TCP
+:
+.B tcp(sp=<number>, dp=<number>, seq=<number>, aseq|ackseq=<number>, doff|hlen=<number>,
+.B cwr, ece|ecn, urg, ack, psh, rst, syn, fin, win|window=<number>, csum=<number>,
+.B urgptr=<number>)
+.sp
+.in +4
+.B sp|sport
+- Source port (default: 0)
+.sp
+.B dp|dport
+- Destination port (default: 0)
+.sp
+.B seq
+- Sequence number (default: 0)
+.sp
+.B aseq|ackseq
+- Acknowledgement number (default: 0)
+.sp
+.B doff|hlen
+- Header size (data offset) in number of 32-bit words (default: 5)
+.sp
+.B cwr
+- Congestion Window Reduced (CWR) flag (default: 0)
+.sp
+.B ece|ecn
+- ECN-Echo (ECE) flag (default: 0)
+.sp
+.B urg
+- Urgent flag (default: 0)
+.sp
+.B ack
+- Acknowledgement flag (default: 0)
+.sp
+.B psh
+- Push flag (default: 0)
+.sp
+.B rst
+- Reset flag (default: 0)
+.sp
+.B syn
+- Synchronize flag (default: 0)
+.sp
+.B fin
+- Finish flag (default: 0)
+.sp
+.B win|window
+- Receive window size (default: 0)
+.sp
+.B csum
+- Checksum field over IPv4 pseudo header (calculated by default)
+.sp
+.B urgptr
+- Urgent pointer (default: 0)
+.sp
+.in -4
+By default, if the lower level header is IPv4, its protocol field is set to
+0x6 (TCP).
+
Simple example of a UDP Echo packet:
.PP
.in +5