I need to ocncatenate two values into one variable and separate them by a :
Basically, I need to build a string/variable that looks like clientaddress:clientport. I’ve tried to enter this in the iRule:
set srctoken [concat [IP::addr] [TCP::client_port]]
However, when I try to save the iRule, I get an error that says [wrong args] [IP::addr]
Also, I can’t seem to figure out what’s the proper way to insert a “:” betweent he argument. If the client’s IP address is 10.1.1.1 and destination port is 80, then I need to create a string that looks like 10.1.1.1:80
Oh, as to your second question, you can try just setting the variable, rather than using concat, if you want to add something in between the two values.
Something like this:
set myVar [IP::client_addr] + ":" + [TCP::client_port]
or
set myVar "[IP::client_addr] : [TCP::client_port]"