**This is automatically generated documentation.** Edit after the "[[#COMMENTS|COMMENTS]]" heading; changes to the main body will be lost. ====== TCPRewriter Element Documentation ====== ===== NAME ===== **TCPRewriter** -- Click element; rewrites TCP packets' addresses, ports, and sequence numbers ===== SYNOPSIS ===== TCPRewriter(INPUTSPEC1, ..., INPUTSPECn [, KEYWORDS]) **Ports**: 1 or more inputs, 1-256 outputs\\ **Processing**: push\\ **Package**: tcpudp (core)\\ ===== DESCRIPTION ===== 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 INPUTSPEC arguments. 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. ? **TCP_DONE_TIMEOUT //time//** ! Time out completed TCP connections every //time// seconds. Default is 30 seconds. FIN and RST flags mark TCP connections as complete. ? **REAP_TCP //time//** ! Reap timed-out TCP connections every //time// seconds. If no packets corresponding to a given mapping have been seen for TCP_TIMEOUT, remove the mapping as stale. Default is 1 hour. ? **REAP_TCP_DONE //time//** ! Reap timed-out completed TCP connections every //time// seconds. Default is 10 seconds. ? **DST_ANNO** ! Boolean. If true, then set the destination IP address annotation on passing packets to the rewritten destination address. Default is true. ===== ELEMENT HANDLERS ===== ? **mappings (read-only)** ! Returns a human-readable description of the TCPRewriter's current set of mappings. ===== SEE ALSO ===== [[IPRewriter]], [[IPAddrRewriter]], [[IPAddrPairRewriter]], [[IPRewriterPatterns]], [[FTPPortMapper]] Generated by 'click-elem2man' from '../elements/tcpudp/tcprewriter.hh' on 24/May/2007. ===== COMMENTS =====