beautypg.com

Os_udp::payload, Context, Usage – Brocade Virtual ADX OpenScript API Guide (Supporting ADX v03.1.00) User Manual

Page 46: Input parameters, Return values, Example, Description

background image

34

Brocade Virtual ADX OpenScript API Guide

53-1003243-01

Methods

4

Context

Called in UDP context only.

Usage

Can be used to perform load-balancing based on the UDP payload length.

Input Parameters

None.

Return Values

The following table contains the return values.

Example

OS_UDP::payload

Description

Returns the UDP payload of the current packet. Buffering of multiple packets is not supported.

Context

Can be called in UDP context only.

Usage

Can be used to perform load-balancing based on the UDP payload.

Input Parameters

None.

TABLE 25

Return Values

Name

Type

Description

bytes

Payload length in bytes

use OS_UDP;

use OS_SLB;

sub UDP_CLIENT_DATA{

my $length = OS_UDP::getPayloadLength;

if($length > 1500) {

OS_SLB::drop;

}

}