DRCL JavaSim API

drcl.inet.tool
Class routing_msp

java.lang.Object
  |
  +--drcl.DrclObj
        |
        +--drcl.comp.Component
              |
              +--drcl.net.Module
                    |
                    +--drcl.inet.tool.routing_msp
All Implemented Interfaces:
java.lang.Cloneable, 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

Inner classes inherited from class drcl.comp.Component
Component.LockPack
 
Fields inherited from class drcl.net.Module
address, downPort, PortGroup_DOWN, PortGroup_UP, timerPort, 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, lockHead, 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)
          Assume 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 dest_ could be a network component with (destAddr_, destAddrMask_) as its network address.
 void setup(Node src_, Node dest_)
           
 void setup(Node src_, Node dest_, java.lang.String bidirect_)
           
 
Methods inherited from class drcl.net.Module
cancelTimeout, dataArriveAtDownPort, dataArriveAtUpPort, deliver, getAddress, process, processOther, removeDefaultDownPort, removeDefaultUpPort, removeTimerPort, setAddress, setTimeout, setTimeoutAt, timeout
 
Methods inherited from class drcl.comp.Component
_resume, _start, _stop, addComponent, addComponent, addEventPort, addEventPort, addForkPort, addPort, addPort, addPort, addPort, addPort, addPort, addPort, addPort, addServerPort, addServerPort, cancelFork, componentAdded, componentRemoved, connect, containsComponent, containsComponent, containsPort, debug, disconnectAll, disconnectAllPeers, disconnectAllPorts, drop, drop, error, error, expose, exposeEventPorts, exposePort, exposePort, exposePort, exposePort, exposePort, findAvailable, findAvailable, findAvailable, finishing, fork, forkAt, getAllComponents, getAllPorts, getAllPorts, getAllWiresInside, getAllWiresInsideOut, getAllWiresOut, getComponent, getComponentFlag, getComponentFlag, getContract, getContractHT, getContractHT, getDebugFlagsInBinary, getDebugLevelNames, getForkManager, getID, getName, getParent, getPort, getPort, getRoot, getRuntime, getTime, iduplicate, info, isAncestorOf, isComponentNotificationEnabled, isContainer, isDebugEnabled, isDebugEnabledAt, isDirectOutputEnabled, isEnabled, isErrorNoticeEnabled, isEventExportEnabled, isGarbageDisplayEnabled, isGarbageEnabled, isPortNotificationEnabled, isPortRemovable, isStarted, isStopped, isTraceEnabled, lock, notify, notifyAll, operate, portAdded, portRemoved, reboot, removeAll, removeAllComponents, removeAllPorts, removeAllPorts, removeComponent, removeComponent, removePort, removePort, removePort, resume, run, sduplicate, send, sendAt, setComponentFlag, setComponentFlag, setComponentNotificationEnabled, setContract, setDebugEnabled, setDebugEnabled, setDebugEnabledAt, setDebugEnabledAt, setDebugEnabledAt, setDirectOutputEnabled, setDirectOutputEnabled, setEnabled, setErrorNoticeEnabled, setErrorNoticeEnabled, setEventExportEnabled, setEventExportEnabled, setExecutionBoundary, setGarbageDisplayEnabled, setGarbageDisplayEnabled, setGarbageEnabled, setGarbageEnabled, setID, setID, setName, setPort, setPort, setPortNotificationEnabled, setPortRemovable, setRuntime, 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, finalize, 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.
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.

setup

public void setup(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)
Assume 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.

DRCL JavaSim API

Copyright © 2001 - DRCL, OSU     ~ Back to JavaSim Home ~