Manual Chapter : Message Creation

Applies To:

Show Versions Show Versions

BIG-IP LTM

  • 16.0.0, 15.1.0, 15.0.1, 15.0.0, 14.1.2, 14.1.0, 14.0.1, 14.0.0, 13.1.3, 13.1.1, 13.1.0
Manual Chapter

Message Creation

The data stream will need to be parsed during CLIENT_DATA and SERVER_DATA iRule events for messages. Once the bytes of a message has been collected, a message object will need to be created and populated.
The GENERICMESSAGE::message create command is used to create and populate a message.
Once a message is created, the GENERICMESSAGE_INGRESS event will be raised and the script author may modify and the message.
Upon completion of the GENERMESSAGE_INGRESS event, the message will be forwarded to the router for routing.
An example script that parses the input stream to create message follows. This example identifies a request message as having the destination address specified at the start of the message separated from the data of the message by a ':'.
when CLIENT_DATA { set lines [split [TCP::payload] "\n"] TCP::payload 0 0 foreach line $lines { set line [string trim $line] if { [string length $line] > 0 } { if { $capture_name == 1 } { ... } else { set tokens [split $line ":"] if {[llength $tokens] > 1} { GENERICMESSAGE::message create [join [lrange $tokens 1 end] ":"] [lindex $tokens 0] } else { GENERICMESSAGE::message create $line } } } } TCP::release TCP::collect } when SERVER_DATA { set lines [split [TCP::payload] "\n"] TCP::payload 0 0 foreach line $lines { set line [string trim $line] if { [string length $line] > 0 } { if { $capture_name == 1 } { ... } else { set tokens [split $line ":"] if {[llength $tokens] > 1} { GENERICMESSAGE::message create [join [lrange $tokens 1 end] ":"] [lindex $tokens 0] } else { GENERICMESSAGE::message create $line } } } } TCP::release TCP::collect }