Skip to content

Latest commit

 

History

History
31 lines (25 loc) · 985 Bytes

findnodebyipaddress.adoc

File metadata and controls

31 lines (25 loc) · 985 Bytes

FindNodeByIPAddress()

FindNodeByIPAddress(ipaddress, currentNode) => Node

Look up [class-node] object by primary IP address or IP address of one of the interfaces.

If trusted node validation is enforced, currentNode should point to execution context object (instance of [class-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

[class-netobj]

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

Return

Instance of [class-node] object or null if not found or not accessible.

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