This is the documentation for the development version. There are no official binaries for it; build it from the source code in git. Download links on these pages work only after the release. For the current release, see version 7.0.

FindNodeByIPAddress

FindNodeByIPAddress(ipaddress, currentNode): Node

Look up Node object by primary IP address or IP address of one of the interfaces. Zone 0 is searched first, then all other zones.

If trusted node validation is enforced, currentNode should point to execution context object (instance of NetObj, $node in most cases). If trusted nodes are disabled (default server configuration), currentNode can be omitted or set to null.

Table 1. Parameters

ipaddress

String

IP address.

currentNode

NetObj

Lookup context or null if trusted nodes validation is disabled. Optional parameter.

Return

Instance of Node object or null if not found or not accessible.

node = FindNodeByIPAddress("192.168.1.1", $node);
if (node != NULL) println(node.name); // Prints node name if node with given IP address is found