ltm rule command SCTP collect
iRule(1) BIG-IP TMSH Manual iRule(1)
SCTP::collect
Collects the specified amount of content data.
SYNOPSIS
SCTP::collect (COLLECT_BYTES)?
DESCRIPTION
Causes SCTP to start collecting the specified amount of content data.
After collecting the data, event CLIENT_DATA will be triggered.
SCTP::collect
Causes SCTP to start collecting the specified amount of content
data. The parameter specifies the minimum number of bytes to collect.
SCTP::collect
When length is not specified, CLIENT_DATA will be triggered for
every received packet. To stop collecting data, use SCTP::release.
RETURN VALUE
VALID DURING
EXAMPLES
1)
when CLIENT_ACCEPTED {
SCTP::collect 15
}
when CLIENT_DATA {
if { [SCTP::payload 15] contains "XYZ" } {
pool xyz_servers
} else {
pool web_servers
}
SCTP::release
}
2)
when CLIENT_ACCEPTED {
log local0.debug "CLIENT_ACCEPTED"
SCTP::collect
}
when CLIENT_DATA {
set tcplen [SCTP::payload length]
log local0.debug "CLIENT_DATA ($tcplen)"
#Assume that you need at least 20 bytes of data for some purpose
if { $tcplen >= 20 } {
log local0.debug "Collected at least 20 bytes. releasing"
#Release collected data
SCTP::release
# Collect new data - CLIENT_DATA will be called again
SCTP::collect
}
}
HINTS
SEE ALSO
CHANGE LOG
@BIGIP-9.4.2 --First introduced the command.
BIG-IP 2017-01-31 iRule(1)