DRCL J-Sim API

drcl.inet.tool
Class routing_msp

java.lang.Object
  extended bydrcl.DrclObj
      extended bydrcl.comp.Component
          extended bydrcl.net.Module
              extended bydrcl.inet.tool.routing_msp
All Implemented Interfaces:
java.lang.Cloneable, ObjectCloneable, ObjectDuplicable, java.io.Serializable

public class routing_msp
extends Module

This class sets up static routes between a source node and one or more destination nodes. The routes being set up form a shortest path tree.

To use this class, simply invoke one of the setup(...) methods.

Specifically, this class uses Util.explore() to explore the topology from the source node. And then from that topology, it builds a shortest path tree rooted at the source node. The appropriate routing table entries are then added to involved nodes by Node.addRTEntry().

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class drcl.comp.Component
Component.Locks
 
Field Summary
 
Fields inherited from class drcl.net.Module
downPort, PortGroup_DOWN, PortGroup_UP, upPort
 
Fields inherited from class drcl.comp.Component
FLAG_COMPONENT_NOTIFICATION, FLAG_DEBUG_ENABLED, FLAG_DIRECT_OUTPUT_ENABLED, FLAG_ENABLED, FLAG_ERROR_ENABLED, FLAG_EVENT_ENABLED, FLAG_GARBAGE_DISPLAY_ENABLED, FLAG_GARBAGE_ENABLED, FLAG_PORT_NOTIFICATION, FLAG_STARTED, FLAG_STOPPED, FLAG_TRACE_ENABLED, FLAG_UNDEFINED_START, id, infoPort, locks, name, parent, PortGroup_DEFAULT_GROUP, PortGroup_EVENT, PortGroup_SERVICE, Root, Trace_DATA, Trace_SEND
 
Constructor Summary
routing_msp()
           
routing_msp(java.lang.String id_)
           
 
Method Summary
 void duplicate(java.lang.Object source_)
          Duplicate the fields of a routing protocol object given a source routing protocol object.
 int mincost(drcl.inet.tool.routing_msp.NodeStruct[] nodestruct)
          Method used by SPF for finding the minimum cost node.
 drcl.inet.tool.routing_msp.PathStruct[] mspf(int source_id, int[] dest_id, int[][] neighbor)
          Assumes that each link costs 1, i.e., find a min hop count path tree.
 void reset()
          Reset the routing protocol.
 void setup(Component src_, Component dest_, long destAddr_, long destAddrMask_)
          Useful for hierarchical network where dest_ could be a network * component with (destAddr_, destAddrMask_) as its network address.
 void setup(Component src_, java.lang.Object[] dest_, long destAddr_)
           
 void setup(Component src_, java.lang.Object[] dest_, long destAddr_, long destAddrMask_)
           
 void setup(Component src_, java.lang.Object[] dests_, long srcAddr_, long srcAddrMask_, long destAddr_, long destAddrMask_)
          Useful for hierarchical network where comp_ could be the set of components (networks and nodes) that constitute the network address destAddr_/ destAddrMask_).
 void setup(Node src_, Node dest_)
           
 void setup(Node src_, Node dest_, java.lang.String bidirect_)
           
 void setup2(Component src_, java.lang.Object[] dests_, long srcAddr_, long srcAddrMask_, long destAddr_, long destAddrMask_)
          Useful for hierarchical network where dest_ could be a network component with (destAddr_, destAddrMask_) as its network address.
 
Methods inherited from class drcl.net.Module
cancelTimeout, setTimeout, setTimeoutAt
 
Methods inherited from class drcl.comp.Component
addComponent, addComponent, addEventPort, addEventPort, addForkPort, addPort, addPort, addPort, addPort, addPort, addPort, addPort, addPort, addServerPort, addServerPort, cancelFork, connect, containsComponent, containsComponent, containsPort, debug, disconnectAll, disconnectAllPeers, disconnectAllPorts, drop, drop, error, error, expose, exposeEventPorts, exposePort, exposePort, exposePort, exposePort, exposePort, findAvailable, findAvailable, findAvailable, fork, forkAt, getAllComponents, getAllPorts, getAllPorts, getAllWiresInside, getAllWiresInsideOut, getAllWiresOut, getComponent, getComponentFlag, getComponentFlag, getContract, getContractHT, getContractHT, getDebugFlagsInBinary, getDebugLevelNames, getID, getName, getParent, getPort, getPort, getRoot, getTime, iduplicate, info, isAncestorOf, isContainer, isDebugEnabled, isDebugEnabledAt, isDirectlyRelatedTo, isDirectOutputEnabled, isEnabled, isErrorNoticeEnabled, isEventExportEnabled, isGarbageDisplayEnabled, isGarbageEnabled, isPortRemovable, isStarted, isStopped, isTraceEnabled, lock, notify, notifyAll, operate, reboot, removeAll, removeAllComponents, removeAllPorts, removeAllPorts, removeComponent, removeComponent, removePort, removePort, removePort, resume, run, sduplicate, send, sendAt, setComponentFlag, setComponentFlag, setDebugEnabled, setDebugEnabled, setDebugEnabledAt, setDebugEnabledAt, setDebugEnabledAt, setDirectOutputEnabled, setDirectOutputEnabled, setEnabled, setErrorNoticeEnabled, setErrorNoticeEnabled, setEventExportEnabled, setEventExportEnabled, setExecutionBoundary, setGarbageDisplayEnabled, setGarbageDisplayEnabled, setGarbageEnabled, setGarbageEnabled, setID, setID, setName, setPort, setPort, setTraceEnabled, setTraceEnabled, sleepFor, sleepUntil, stop, toString, unexpose, unlock, useLocalForkManager, useLocalForkManager, wait
 
Methods inherited from class drcl.DrclObj
clone
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

routing_msp

public routing_msp()

routing_msp

public routing_msp(java.lang.String id_)
Method Detail

reset

public void reset()
Reset the routing protocol.

Overrides:
reset in class Component

duplicate

public void duplicate(java.lang.Object source_)
Duplicate the fields of a routing protocol object given a source routing protocol object.

Specified by:
duplicate in interface ObjectDuplicable
Overrides:
duplicate in class Module
Parameters:
source_ - an existing routing protocol object.

setup

public void setup(Node src_,
                  Node dest_)

setup

public void setup(Node src_,
                  Node dest_,
                  java.lang.String bidirect_)

setup

public void setup(Component src_,
                  Component dest_,
                  long destAddr_,
                  long destAddrMask_)
Useful for hierarchical network where dest_ could be a network * component with (destAddr_, destAddrMask_) as its network address.

Parameters:
destAddr_ - destination address, could be a multicast address.

setup

public void setup(Component src_,
                  java.lang.Object[] dest_,
                  long destAddr_)
Parameters:
destAddr_ - destination address, could be a multicast address.

setup

public void setup(Component src_,
                  java.lang.Object[] dest_,
                  long destAddr_,
                  long destAddrMask_)
Parameters:
destAddr_ - destination address, could be a multicast address.

setup2

public void setup2(Component src_,
                   java.lang.Object[] dests_,
                   long srcAddr_,
                   long srcAddrMask_,
                   long destAddr_,
                   long destAddrMask_)
Useful for hierarchical network where dest_ could be a network component with (destAddr_, destAddrMask_) as its network address.

Parameters:
destAddr_ - destination address, could be a multicast address.

mspf

public drcl.inet.tool.routing_msp.PathStruct[] mspf(int source_id,
                                                    int[] dest_id,
                                                    int[][] neighbor)
Assumes that each link costs 1, i.e., find a min hop count path tree. Method to select the shortest path tree given a source and a set of destinations. This method does not use node address.


mincost

public int mincost(drcl.inet.tool.routing_msp.NodeStruct[] nodestruct)
Method used by SPF for finding the minimum cost node.


setup

public void setup(Component src_,
                  java.lang.Object[] dests_,
                  long srcAddr_,
                  long srcAddrMask_,
                  long destAddr_,
                  long destAddrMask_)
Useful for hierarchical network where comp_ could be the set of components (networks and nodes) that constitute the network address destAddr_/ destAddrMask_).

Parameters:
destAddr_ - destination address, could be a multicast address.

DRCL J-Sim API

Copyright © 1998-2003 Distributed Real-time Computing Lab (DRCL). All Rights Reserved.     ~ To J-Sim Home ~