16.3. Filter functions reference

This section contains a reference for each of functions that can be used in JavaScript filters.

Table 16.13. JavaScript filter functions

Function Description Type
Subnet membership
Tests if an address is in a subnet
inSubnet(address, subnet, maskBits) returns true if address is in subnet with maskBits boolean
inSubnet(address, subnetName) returns true if address is in subnetName, where subnetName has been previously defined as a named subnet in sFlowTrend-Pro. boolean
inIPRange(address, rangeStart, rangeEnd) returns true if address is in the IP range defined by rangeStart to rangeEnd. rangeStart and rangeEnd must be valid IPv4 or IPv6 addresses (specified as a string), and rangeStart must be a lower address than rangeEnd. boolean
Output ifIndex
Tests output interfaces
outputIfIndexIncludes(ifIndex) returns true if the output interfaces includes ifIndex boolean