
36 Brocade Virtual ADX OpenScript API Guide
53-1003243-01
Methods
4
Example
OS_UDP::raw
Description
Returns the data within a UDP packet including the UDP header.
Context
Called in context of UDP.
Usage
Used in performing load-balancing based on the whole UDP packet.
Input Parameters
None.
Return Values
The following table contains the return values.
Example
TABLE 28 Return Values
Name Type Description
string Raw data within the UDP packet.
use OS_UDP;
sub UDP_CLIENT_DATA{
$data = OS_UDP::payload;
$data_hex = unpack("H*", "$data");
$data ~= s/xyz/abc/g;
OS_UDP::payload($data);
}
use OS_UDP;
sub UDP_CLIENT_DATA{
$raw_data = OS_UDP::raw;
$data_hex = unpack("H*", "$data");
if (defined $raw_data)
{
# process raw data
}
}
Comentarios a estos manuales