Brocade Communications Systems ServerIron ADX 12.4.00 Service Manual Page 17

  • Download
  • Add to my manuals
  • Print
  • Page
    / 34
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 16
ServerIron ADX OpenScript Guide 7
53-1002445-01
Chapter
2
OpenScript Fundamentals
Overview
This following sections of this chapter describe the process of creating a simple script using the
Perl-based, OpenScript environment.
Structure of a ServerIron ADX Perl script
The structure of a Perl script written for OpenScript differs slightly from the standard free-flowing
script program usually associated with Perl. In a regular perl script, methods (subs) can be freely
defined and invoked from the main body of the script. To provide for optimal packet processing,
scripts written for the OpenScript environment build their behavior around the scripting engine with
application and protocol event handlers. These handlers are a published list of events that a user
script can catch by enclosing their event handling code in a Perl function or sub named after the
event. Figure 3 provides a list of application and protocol events provided for OpenScript. For a
complete list of events, see the Brocade OpenScript API Reference Guide.
TABLE 3 Application and Protocol Events in ADX scripts
Application/
Protocol
Event Description Attached Script Method Use
HTTP On request header parsing
completion
HTTP_REQUEST Perform request header
inspection and insertion/deletion
Request payload data
available. Called when entire
payload available.
Only triggered by collect() API.
HTTP_REQUEST_DATA Inspect and modify HTTP request
payload data.
On response header parsing
completion
HTTP_RESPONSE Perform response header
inspection and insertion/deletion.
Response payload data
available. Called when entire
response payload is available.
Only triggered by collect() API.
HTTP_RESPONSE_DATA Inspect and modify HTTP response
payload.
TCP On new client SYN request. TCP_CLIENT_SYN Authentication, connection
rate-limiting based on IP.
On successful TCP client
connection establishment.
TCP_CLIENT_ESTABLISHED Pre TCP data transfer processing
context.
On client initiating a TCP
CLOSE.
TCP_CLIENT_CLOSE Update counters/state.
On receiving a TCP client
RESET
TCP_CLIENT_RESET Update counters/state.
Page view 16
1 2 ... 12 13 14 15 16 17 18 19 20 21 22 ... 33 34

Comments to this Manuals

No comments