Brocade Virtual ADX OpenScript API Guide (Supporting ADX v Manual de usuario Pagina 45

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 132
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 44
Brocade Virtual ADX OpenScript API Guide 33
53-1003243-01
Methods
4
Example
OS_UDP::getLength
Returns UDP header and payload length in bytes.
Context
Called in UDP context only.
Usage
Can be used to perform load-balancing based on the UDP length.
Input Parameters
None.
Return Values
The following table contains the return values.
Example
OS_UDP::getPayloadLength
Returns UDP payload length in bytes.
TABLE 24 Return Values
Name Type Description
bytes Packet length in bytes
use OS_UDP;
use OS_SLB;
sub UDP_CLIENT_DATA{
if(OS_UDP::dst == 21){
OS_SLB::drop;
} else {
OS_SLB::forward(4);
}
}
use OS_UDP;
use OS_SLB;
sub UDP_CLIENT_DATA{
my $length = OS_UDP::getLength();
if ($length > 1500) {
OS_SLB::drop;
}
}
Vista de pagina 44
1 2 ... 40 41 42 43 44 45 46 47 48 49 50 ... 131 132

Comentarios a estos manuales

Sin comentarios