The class defines the procedure init-all../ns-2/route-proto.tclrtObject::init-all; this procedure takes a list of nodes as arguments, and creates a rtObject at each of the nodes in its argument list. It subsequently invokes its compute-routes.
The assumption is that the constructor for each of the new objects will instantiate the ``Direct'' route protocol at each of these nodes. This route protocol is responsible for computing the routes to immediately adjacent neighbors. When compute-routes is run by the init-all procedure, these direct routes are installed in the node by the appropriate route object.
The other instance procedures in this class are:
The nextHop_ contains the link that will be used to reach the particular destination; rtpref_ and metric_ are the preference and metric for the route installed in the node; rtVia_ is the name of the agent whose route is installed in the node.
The constructor also creates the instance of the Direct route protocol, and invokes compute-routes for that protocol.
If multiple paths are in use, then it returns a list of the neighbor nodes that will be used.
If the node does not have a route to the destination, the procedure will return -1.
The routine checks the protocol agent's instance variable, rtsChanged_ to see if any of the routes in that protocol have changed since the protocol was last examined. It then uses the protocol's instance variable arrays, nextHop_, rtpref_, and metric_ to compute its own arrays. The rtObject will install or modify any of the routes as the changes are found.
If any of the routes at the node have changed, the rtObject will invoke the protocol agent's instance procedures, send-updates with the number of changes as argument. It will then invoke the multicast route object, if it exists.
The next set of routines are used to query the rtObject for various state information.
A typical dump output is:
Tom Henderson 2011-11-05