This is automatically generated documentation. Edit after the "COMMENTS" heading; changes to the main body will be lost.
TCPRewriter -- Click element;
rewrites TCP packets' addresses, ports, and sequence numbers
TCPRewriter(INPUTSPEC1, ..., INPUTSPECn [, KEYWORDS])
Package: tcpudp (core)
Rewrites TCP flows by changing their source address, source port, destination
address, and/or destination port, and optionally, their sequence numbers and
acknowledgement numbers. It also changes the destination IP address
annotation; see the DST_ANNO keyword argument below.
This element is an IPRewriter-like element. Please read the IPRewriter
documentation for more information and a detailed description of its
In addition to IPRewriter's functionality, the TCPRewriter element can add or
subtract amounts from incoming packets' sequence and acknowledgement numbers,
including any SACK acknowledgement numbers. Each newly created mapping starts
with these deltas at zero; other elements can request changes to a given
mapping. For example, FTPPortMapper uses this facility.
Keyword arguments determine how often stale mappings should be removed.
- TCP_TIMEOUT time
- Time out TCP connections every time seconds. Default is 24 hours. This
timeout applies to TCP connections for which payload data has been seen
flowing in both directions.
- TCP_DONE_TIMEOUT time
- Time out completed TCP connections every time seconds. Default is 4
minutes. FIN and RST flags mark TCP connections as complete.
- TCP_NODATA_TIMEOUT time
- Time out non-bidirectional TCP connections every time seconds. Default is 5
minutes. A non-bidirectional TCP connection is one in which payload data
hasn't been seen in at least one direction.
- TCP_GUARANTEE time
- Preserve each TCP connection mapping for at least time seconds after each
successfully processed packet. Defaults to 5 seconds. Incoming flows are
dropped if an TCPRewriter's mapping table is full of guaranteed flows.
- REAP_INTERVAL time
- Reap timed-out connections every time seconds. Default is 15 minutes.
- MAPPING_CAPACITY capacity
- Set the maximum number of mappings this rewriter can hold to capacity.
Capacity can either be an integer or the name of another rewriter-like
element, in which case this element will share the other element's capacity.
- Boolean. If true, then set the destination IP address annotation on passing
packets to the rewritten destination address. Default is true.
- mappings (read-only)
- Returns a human-readable description of the TCPRewriter's current set of