Ip api reference, Overview, Methods – Brocade Virtual ADX OpenScript API Guide (Supporting ADX v03.1.00) User Manual
Page 17: Os_ip::src, Chapter 2

Brocade Virtual ADX OpenScript API Guide
5
53-1003243-01
Chapter
2
IP API reference
In this chapter
This chapter contains the following sections:
•
•
Overview
The OS_IP module includes the APIs to retrieve the fields in the current IP header.
The use <package> statement needs to be in the declaration block of the script for methods of that
package to be used.
For example: to use the OS_IP methods, the OS_IP package must be declared as follows:
use OS_IP;
Methods
OS_IP::src
Description
Returns the source IP address of incoming packet. If called in client connection context, the
function will return a client's IP address. If called in server connection context it will return the
server's IP address. In the generic context, it will return an IP address from where the current
packet is originating.
Context
Called in context of TCP, UDP and HTTP.
Usage
Performs Layer 3, layer 4 or layer 7 actions based on the IP header. This API supports both IPv4 and
IPv6.
Input Parameters
None