ltm rule command TCP client port
iRule(1) BIG-IP TMSH Manual iRule(1)
TCP::client_port
Returns the client port of the TCP connection.
SYNOPSIS
TCP::client_port
DESCRIPTION
Returns the TCP port/service number of the clientside TCP connection.
This command is equivalent to the TCP::remote_port command in a
clientside context, and to the BIG-IP 4.x variable client_port.
Syntax
TCP::client_port
* Returns the TCP port/service number of the clientside TCP
connection.
RETURN VALUE
The port advertised by the client. Even on SERVER events, it still
returns the client port from the clientside.
VALID DURING
CLIENT_ACCEPTED, CLIENT_CLOSED, CLIENT_DATA, SERVER_CLOSED,
SERVER_CONNECTED, SERVER_DATA, SIP_REQUEST, SIP_REQUEST_SEND,
SIP_RESPONSE, STREAM_MATCHED, TCP_GTM
EXAMPLES
when SERVER_CONNECTED {
# This logs information about:
# * the clientside part of the client<->LTM connection, and
# * the serverside part of the LTM<->server connection.
log local0.info "Complete connection: [IP::client_addr]:[TCP::client_port]<->LTM<->[IP::server_addr]:[TCP::server_port]"
}
HINTS
SEE ALSO
UDP::client_port
CHANGE LOG
@BIGIP-9.0.0 --First introduced the command.
BIG-IP 2017-01-31 iRule(1)