To connect to the above interfaces of routing module, a node provides
a similar set of interfaces:
- In order to know which module to register during creation, the Node
class keeps a list of modules as a class variable.
The default value of this list contains only the base routing
The Node class provides the following two procs to manipulate
this module list:
[name]Node::enable-module & If module
RtModule/[name] exists, this proc puts [name] into the
[name]Node::disable-module & If
[name] is in the module
list, remove it from the list.
When a node is created, it goes through the module list of the Node
class, creates all modules included in the list, and register these
modules at the node.
After a node is created, one may use the following instprocs to list
modules registered at the node, or to get a handle of a module with
a particular name:
Node::list-modules & Return a list of the handles (shadow
objects) of all registered modules.
[name]Node::get-module & Return a
handle of the
registered module whose name matches the given one. Notice that
any routing module can only have a single instance registered at
- To allow routing modules register their interests of routing
updates, a node object provide the following instprocs:
[module]Node::route-notify & Add module into route
update notification list.
[module]Node::unreg-route-notify & Remove module
from route update notification list.
Similarly, the following instprocs provide hooks on the attachment
of transport agents:
[module]Node::port-notify & Add module into agent
attachment notification list.
[module]Node::unreg-port-notify & Remove module from
agent attachment notification list.
Notice that in all of these instprocs, parameter module
should be a module handle instead of a module name.
- Node provides the following instprocs to manipulate its address and
- [module, clsfr, hook]Node::insert-entry inserts
classifier clsfr into the entry point of the node. It also
associates the new classifier with module so that if this
classifier is removed later, module will be unregistered.
If hook is specified as a number, the existing classifier
will be inserted into slot hook of the new classifier.
In this way, one may establish a ``chain'' of classifiers; see
Figure 5.2 for an example.
NOTE: clsfr needs NOT to be a classifier. In some
cases one may want to put an agent, or any class derived from
Connector, at the entry point of a node. In such cases, one simply
supplies target to parameter hook.
- [module, clsfr, hook]Node::install-entry differs from
Node::insert-entry in that it deletes the existing
classifier at the node entry point, unregisters any associated
routing module, and installs the new classifier at that point.
If hook is given, and the old classifier is connected into
a classifier chain, it will connect the chain into slot
hook of the new classifier.
As above, if hook equals to target, clsfr
will be treated as an object derived from Connector instead of a
- [demux, port]Node::install-demux places the given
classifier demux as the default demultiplexer. If
port is given, it plugs the existing demultiplexer into
slot port of the new one. Notice that in either case it does
not delete the existing demultiplexer.