beautypg.com

Os_udp::payload ($data), Return values, Example – Brocade Virtual ADX OpenScript API Guide (Supporting ADX v03.1.00) User Manual

Page 47: Context, Usage, Input parameters

background image

Brocade Virtual ADX OpenScript API Guide

35

53-1003243-01

Methods

4

Return Values

The following table contains the return values.

Example

OS_UDP::payload ($data)

Replaces the existing UDP payload in a packet with the value supplied.

Context

Can be called in UDP context only.

Usage

Can be used to modify the UDP payload.

Input Parameters

The following table contains the input values.

Return Values

None

TABLE 26

Return Values

Name

Type

Description

string

String representing the UDP
payload

TABLE 27

Input Values

Name

Type

Description

$data

string

A string representing the
contents of the payload.

use OS_UDP;

sub UDP_CLIENT_DATA{

$data = OS_UDP::payload;

$data_hex = unpack("H*", "$data");

print "Hex format of UDP payload is - $data_hex\n";

}