I am geeting closer. Here is a draft:
so basically the client sends a PSH,ACK it sends a string "LOGIN:userid:passwd" in the tcp paylod.
We don't want the iRule to be implemented if the client is doing an initial login.
So I am looking at first six octets - LOGIN to determine whether to use the iRule or not.
when CLIENT_ACCEPTED {
set payload_string = [TCP::collect 6]
log local0. "\$payload_string"
if (payload_string contains "LOGIN")
{
}
else
{
set src_ip_and_port [[IP::client_addr] ":" [TCP::client_port] ]
if { $src_ip_and_port != "" } {
persist uie $src_ip_and_port
}
}
}
}