
32 Brocade Virtual ADX OpenScript API Guide
53-1003243-01
Methods
4
Return Values
The following table contains the return values.
Example
OS_UDP::dst
Returns the destination port number if called in correct context otherwise undefined is returned.
Context
Called in UDP context.
Usage
Can be used to perform load-balancing based on the destination port.
Input Parameters
None.
Return Values
The following table contains the return values.
TABLE 22 Return Values
Name Type Description
Source port number
TABLE 23 Return Values
Name Type Description
Destination port number
use OS_UDP;
use OS_SLB;
sub UDP_CLIENT_DATA{
my $port = OS_UDP::src();
if($port == 1000){
OS_SLB::drop;
} else {
OS_SLB::forward(4);
}
}
Comentarios a estos manuales