Content inspection api reference, Os_payload_inspect module overview, Content inspection api considerations – Brocade Virtual ADX OpenScript API Guide (Supporting ADX v03.1.00) User Manual
Page 121: Chapter 9
Brocade Virtual ADX OpenScript API Guide
109
53-1003243-01
Chapter
9
Content Inspection API Reference
In this chapter
This chapter contains the following sections:
•
OS_PAYLOAD_INSPECT module overview . . . . . . . . . . . . . . . . . . . . . . . . . . 109
•
OS_PAYLOAD_INSPECT module overview
The OS_PAYLOAD_INSPECT module includes APIs to inspect unlimited amounts of streaming
payload content from either the client or server side and, when required, to change the content.
These APIs can perform the following functions:
•
Match and replace text strings, binary signatures, and encoded patterns in HTTP. These APIs
also allow you to define the match criteria for the length of the text string or binary pattern.
•
Generate match events that can be used as triggers for logging, filtering, and carrying out
security policies
The use <package> statement needs to be in the declaration block of the script for methods of that
package to be used.
For example, to use the OS_PAYLOAD_INSPECT methods, the OS_PAYLOAD_INSPECT package must
be declared in the following format:
use OS_PAYLOAD_INSPECT;
Content Inspection API considerations
•
Content Inspection APIs support the Perl regular expression notation method to specify match
patterns. The use of the variables $1, $2, and so on, in the replacement strings is not
supported. You must write your own Perl source code in an event handler to use those regular
expression references in forming the final content.
•
Brocade recommends the use of single quotes when inputting regular expression parameters.
If you use double quotes, the regular expression string may be decoded differently from single
quotes, for example, $ and ^.
•
The supported character encoding is ASCII and UTF-8.