|
J-Sim v1.2.1-p7 API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectdrcl.DrclObj
drcl.comp.Component
drcl.net.Module
drcl.inet.Protocol
drcl.inet.protocol.Routing
drcl.inet.protocol.dv.DV
Implements a routing information protocol (RIP, RFC1058, RFC2453). Split-horizon with poison reverse, triggered updates and "holddown" state for deleted routes are implemented.
The protocol takes advantages of the NEIGHBOR_UP event from the core service layer to activate the protocol at the beginning.
When a new neighbor is discovered, the protocol sends a request message at the
interface, starts a triggered update at the other interfaces; and sets up the
regular update timer if necessary.
| Nested Class Summary |
| Nested classes inherited from class drcl.comp.Component |
Component.Locks |
| Field Summary | |
static int |
DEBUG_IO
|
static int |
DEBUG_ROUTE
|
static int |
DEBUG_SEND_UPDATE
|
static int |
DEBUG_TIMEOUT
|
static double |
DELETE_TIMEOUT_PERIOD
Hold-down timeout period for entries to be removed. |
static int |
INFINITY
Infinity metric. |
static double |
MAX_TIME_OUT_VARIANCE
Timeout variance for updating the distance vector information. |
static double |
NEIGHBOR_TIMEOUT_PERIOD
Routing table entry timeout period. |
static double |
REGULAR_UPDATE_TIMEOUT_PERIOD
Regular update timeout period. |
static double |
TRIGGERED_UPDATE_TIMEOUT_PERIOD
Triggered update timeout period. |
| Fields inherited from class drcl.inet.protocol.Routing |
queryPort, rtconfigPort |
| Fields inherited from class drcl.net.Module |
address, downPort, PortGroup_DOWN, PortGroup_UP, timerPort, upPort |
| Constructor Summary | |
DV()
|
|
DV(java.lang.String id_)
|
|
| Method Summary | |
protected void |
dataArriveAtDownPort(java.lang.Object msg_,
Port downPort_)
The handler invoked when a packet arrives at a "down" port. |
void |
duplicate(java.lang.Object source_)
Duplicates the content of source_, including ID, name, child components and connections among them, to this component. |
java.lang.String[] |
getDebugLevelNames()
Returns the names of defined debug levels; subclasses should override this method if debug levels are defined. |
java.lang.String |
getName()
Returns the (informational) name of the component. |
java.lang.String |
info()
Provide routing table information. |
protected void |
neighborDownEventHandler(int ifindex_,
NetAddress neighbor_,
Port inPort_)
Called back when a neighbor down event is received. |
protected void |
neighborUpEventHandler(int ifindex_,
NetAddress neighbor_,
Port inPort_)
Neighbor up event: sends a request to the neighbor. |
protected void |
process(java.lang.Object data_,
Port inPort_)
This method classifies inPort_ and delegates process of data
to the appropriate handler. |
void |
reset()
Resets the component for being used anew. |
int[] |
routeQueryHandler(InetPacket pkt_,
int incomingIf_,
Port inPort_)
Called back when a unicast/multicast query event is received. |
int[] |
routeQueryHandler(RTKey key_,
Port inPort_)
Called back when a unicast/multicast query event is received. |
protected void |
timeout(java.lang.Object data_)
The handler invoked when a timeout event occurs. |
| Methods inherited from class drcl.inet.protocol.Routing |
addRTEntry, addRTEntry, addRTEntry, addRTEntry, addRTEntry, addRTEntry, addRTEntry, graftRTEntry, graftRTEntry, graftRTEntry, pruneRTEntry, pruneRTEntry, pruneRTEntry, removeAllRTEntries, removeRTEntry, removeRTEntry, replaceRTEntry, replaceRTEntry, retrieveAllRTEntries, retrieveBestRTEntryDest, retrieveRTEntry, retrieveRTEntryDest, retrieveRTEntrySrc |
| Methods inherited from class drcl.net.Module |
cancelTimeout, dataArriveAtUpPort, deliver, getAddress, removeDefaultDownPort, removeDefaultUpPort, removeTimerPort, setAddress, setTimeout, setTimeoutAt |
| Methods inherited from class drcl.DrclObj |
clone |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final double REGULAR_UPDATE_TIMEOUT_PERIOD
public static final double MAX_TIME_OUT_VARIANCE
public static final double NEIGHBOR_TIMEOUT_PERIOD
public static final double DELETE_TIMEOUT_PERIOD
public static final double TRIGGERED_UPDATE_TIMEOUT_PERIOD
public static final int INFINITY
public static final int DEBUG_IO
public static final int DEBUG_TIMEOUT
public static final int DEBUG_ROUTE
public static final int DEBUG_SEND_UPDATE
| Constructor Detail |
public DV()
public DV(java.lang.String id_)
| Method Detail |
public java.lang.String getName()
Component
getName in class Componentpublic java.lang.String[] getDebugLevelNames()
Component
getDebugLevelNames in class Componentpublic void duplicate(java.lang.Object source_)
Component
duplicate in interface ObjectDuplicableduplicate in class Protocolpublic java.lang.String info()
info in class Componentpublic void reset()
Component
reset in class Component
protected void neighborUpEventHandler(int ifindex_,
NetAddress neighbor_,
Port inPort_)
neighborUpEventHandler in class Protocolifindex_ - index of the interface.Protocol.createIFEventPort()
protected void neighborDownEventHandler(int ifindex_,
NetAddress neighbor_,
Port inPort_)
Protocol
neighborDownEventHandler in class Protocolifindex_ - index of the interface.Protocol.createIFEventPort()
protected void process(java.lang.Object data_,
Port inPort_)
ModuleinPort_ and delegates process of data
to the appropriate handler. If a subclass decides to override this method,
then it should call super.process(data_, inPort_) to make those
handlers effective.
process in class ModuleModule.dataArriveAtUpPort(Object, drcl.comp.Port),
Module.dataArriveAtDownPort(Object, drcl.comp.Port),
Module.processOther(Object, drcl.comp.Port)protected void timeout(java.lang.Object data_)
Module
timeout in class ModuleModule.setTimeout(Object, double),
Module.setTimeoutAt(Object, double)
protected void dataArriveAtDownPort(java.lang.Object msg_,
Port downPort_)
Module
dataArriveAtDownPort in class Module
public int[] routeQueryHandler(RTKey key_,
Port inPort_)
Protocol
routeQueryHandler in class ProtocolRTLookup,
Protocol.createUcastQueryPort(),
Protocol.createMcastQueryPort()
public int[] routeQueryHandler(InetPacket pkt_,
int incomingIf_,
Port inPort_)
Protocol
routeQueryHandler in class ProtocolRTLookup,
Protocol.createUcastQueryPort(),
Protocol.createMcastQueryPort()
|
J-Sim v1.2.1-p7 API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||