NetworkPath

Represents network path between two nodes, as returned by Node::traceRoute() and Node::traceL2Path() methods. Path consists of hops represented by NetworkPathElement objects.

Instance attributes

hopCount: int

Number of hops in the path.

hops: Array

Array of NetworkPathElement objects, ordered from source to destination.

isComplete: bool

TRUE if the path reaches the destination node. Incomplete path means that trace stopped at some hop because the next hop could not be determined (for example, missing routing information or unknown layer 2 topology).

sourceAddress: String

IP address of the source node used for the trace, or null if unknown.

path = $node.traceRoute(FindObject("core-router"));
if (path != null)
{
   println("Path " .. (path.isComplete ? "complete" : "incomplete") .. ", " .. path.hopCount .. " hops:");
   for (hop : path.hops)
      println("   " .. hop);
}