ltm rule command PCP response
iRule(1) BIG-IP TMSH Manual iRule(1)
PCP::response
Provides access to the data in a PCP response packet.
SYNOPSIS
PCP::response (opcode |
lifetime |
version |
protocol |
result |
client-addr |
internal-port |
assigned-ext-port |
assigned-ext-addr)
DESCRIPTION
This command provides access to the data in a PCP (Port Control
Protocol) response packet. Access to this data is read-only, and the
data in the PCP response cannot be modified via the PCP::response
command.
Syntax
PCP::response version
* Returns the PCP version of the response.
PCP::response opcode
* Returns the opcode of the PCP response as a string, either
"announce", "peer" or "map". If the opcode is invalid, the field is
returned as an integer.
PCP::response lifetime
* Returns the lifetime field from the PCP response.
PCP::response protocol
* Returns the protocol of the matching PCP request as a string,
either "tcp" or "udp". If the protocol is invalid, the field is
returned as an integer. This subcommand is only valid for a PCP map
response. "NA" is returned if called on a peer or announce
response.
PCP::response internal-port
* Returns the internal port of the matching PCP request. This
subcommand is only valid for a PCP map response. "NA" is returned
if called on a peer or announce response.
PCP::response client-addr
* Returns the client address of the matching PCP request.
PCP::response result
* Returns the result field of the PCP response. This is an integer
between 0 and 255. 0 denotes success. All others denote failure of
the PCP request.
PCP::response assigned-ext-port
* Returns the assigned external port in the PCP response. This
subcommand is only valid for a PCP map response. "NA" is returned
if called on a peer or announce response.
PCP::response assigned-ext-addr
* Returns the assigned external address in the PCP response. This
subcommand is only valid for a PCP map response. "NA" is returned
if called on a peer or announce response.
RETURN VALUE
VALID DURING
PCP_RESPONSE
EXAMPLES
when PCP_RESPONSE {
if {[PCP::response opcode] == "map" && [PCP::response result] != 0] } {
log "PCP map request from\
[PCP::response client-addr]:[PCP::response internal-port]\
failed with a result of [PCP::response result]"
}
}
HINTS
SEE ALSO
CHANGE LOG
@BIGIP-11.5.0 --First introduced the command.
BIG-IP 2017-01-31 iRule(1)