Forum Discussion
Mike_Rausch_628
Nimbostratus
Aug 14, 2007TCP Info Logging
I am trying to write an irule that will log the TCP info that is being sent to and from the server/client. What exactly does the TCP::collect command grab?
Andy_Herrman_22
Nimbostratus
Aug 14, 2007TCP::collect gets the raw bytes that are sent. The data collected will be available in the CLIENT_DATA event.
For example:
when CLIENT_ACCEPTED {
TCP::collect 16
}
when CLIENT_DATA {
For logging in other events
set cli "[IP::client_addr]:[TCP::remote_port]"
set dataVal [TCP::payload]
binary scan $dataVal H16 hexRep
log local0. "TCP connection ($cli) sent: $hexRep"
}When the client connects this will cause (at least) 16 bytes to be collected. It then converts that data to a hex representation and logs it.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects