Os_tcp::payload ($data), Constraint, Performance impact – Brocade Virtual ADX OpenScript API Guide (Supporting ADX v03.1.00) User Manual
Page 40: Example, Context, Usage, Input parameters, Return values

28
Brocade Virtual ADX OpenScript API Guide
53-1003243-01
Methods
3
Constraint
A “TCP_SERVER_DATA/ TCP_CLIENT_DATA” buffered payload will be forwarded to the default server.
If a user wants to change or override a default server selection, an explicit call to
“OS_SLB::forward” needs to be done. Depending on the application traffic, PERL utilities unpack/
pack might have to be used before manipulating the payload.
Performance Impact
This function will have a significant impact on system performance.
Example
OS_TCP::payload ($data)
Replaces the existing TCP payload in a packet with the value supplied.
Context
Can be called in either the “TCP_SERVER_DATA” or “TCP_CLIENT_DATA” context only.
Usage
Can be used to modify the TCP payload.
Input Parameters
The following table contains the input values.
Return Values
None
TABLE 21
Input Values
Name
Type
Description
$data
string
A string representing the
contents of the payload.
use OS_TCP;
use OS_SLB;
sub TCP_CLIENT_ESTABLISHED {
OS_TCP::collect;
}
sub TCP_CLIENT_DATA{
$data = OS_TCP::payload;
$data =~ m/index/undef/g;
OS_TCP::payload($data);
OS_SLB::forward(4);
}