ltm rule command DATAGRAM tcp
iRule(1) BIG-IP TMSH Manual iRule(1)
DATAGRAM::tcp
Returns TCP header and payload information.
SYNOPSIS
DATAGRAM::tcp (flags | payload_length | window)
DATAGRAM::tcp (option | option_count) (IPV4_OPTION)?
DATAGRAM::tcp payload (LENGTH)?
DESCRIPTION
This iRules command returns tcp header information. Note: throws an
error if L4 protocol of the current connection is not TCP
DATAGRAM::tcp flags
* This command returns TCP header flags as an integer value.
DATAGRAM::tcp option
* This command returns a Tcl list of TCP options. See
DATAGRAM::ip option for details on behavior.
DATAGRAM::tcp option [option-code]
* This command returns a Tcl list of TCP option values for TCP option
with a given option code. See DATAGRAM::ip option for details
on behavior.
DATAGRAM::tcp option_count
* This command returns a number of TCP options in the TCP header of
IP datagram.
DATAGRAM::tcp option_count [option-code]
* This command returns a number of TCP options with specified option
code in the TCP hesder of IP datagram.
DATAGRAM::tcp payload []
* Returns the content of the current TCP payload. If is specified and more than
bytes are available, only the first bytes of collected data are returned.
DATAGRAM::tcp payload_length
* Returns the length, in bytes, of the current TCP payload.
DATAGRAM::tcp window
* This command returns TCP header window field as an integer value.
RETURN VALUE
VALID DURING
FLOW_INIT, CLIENT_DATA
EXAMPLES
when FLOW_INIT {
if { [IP::protocol] == 6 } {
log local0. "TCP Flow: [IP::client_addr] [TCP::client_port] --> [IP::local_addr] [TCP::local_port]"
log local0. "TCP Payload Length = [DATAGRAM::tcp payload_length] Payload: [DATAGRAM::tcp payload 100]"
}
}
HINTS
SEE ALSO
CHANGE LOG
@BIGIP-11.6.0 --First introduced the command.
BIG-IP 2017-01-31 iRule(1)