|
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.inet.core.RT
The component that manages the routing table of a network node.
It does not distinguish unicast and multicast addresses.
To be exact, it does not distinguish the types of addresses at all.
Basically, all it does is to maintain the mapping from a set of
RTKeys to the corresponding
RTEntries.
As a service provider, this component provides the services that are described by the following contracts (contract classes) and the bound ports:
| SERVICE | PORT |
| Route Lookup Service ( RTLookup)
| .service_rt@ |
| Configuration Service ( RTConfig)
| .service_rt@ |
In addition, this component may export the following events:
| EVENT | PORT | DESCRIPTION |
| RT Entry Added | .rt_ucast@ .rt_mcast@ | Event object is the entry or array of entries being added. |
| RT Entry Removed | .rt_ucast@ .rt_mcast@ | Event object is the entry or array of entries being removed. |
| RT Entry Modified | .rt_ucast@ .rt_mcast@ | Event object is a two-element array that consists of the old and the new entries. |
Properties:
| NAME | DESCRIPTION |
| staticEntries | Array of the static route entries (never timed out) of the node. |
RTLookup,
RTConfig,
RTKey,
RTEntry,
Serialized Form| Nested Class Summary |
| Nested classes inherited from class drcl.comp.Component |
Component.Locks |
| Field Summary | |
static java.lang.String |
IMPLEMENTATION
|
static java.lang.String |
MULTIPLE_FIELD
|
static java.lang.String |
RADIX_TREE
|
| Fields inherited from interface drcl.inet.core.InetCoreConstants |
CONFIG_PORT_ID, PULL_PORT_ID |
| Constructor Summary | |
RT()
|
|
RT(java.lang.String id_)
|
|
| Method Summary | |
RTEntry[] |
_getAll()
Returns all the route entry(-ies) stored in this component. |
void |
_graftprune(boolean graft_,
RTKey key_,
BitSet bs_,
java.lang.Object ext_,
double timeout_)
|
void |
add(RTKey key_,
RTEntry entry_)
Adds a key-entry pair to the routing table. |
void |
add(RTKey key_,
RTEntry entry_,
double timeout_)
Adds a key-entry pair with timeout to the routing table. |
java.lang.Object |
clear()
Removes and returns all the route entries stored in this component. |
java.lang.String |
diag()
|
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.Object |
get(RTKey key_,
java.lang.String matchType_)
Returns the matched entry(-ies). |
Address |
getAddress()
Returns the address scheme. |
RTEntry[] |
getStaticEntries()
Returns the static route entries (entries never timed out). |
void |
graft(RTKey key_,
BitSet bs_)
Grafts the interfaces to the entry exactly matched by the given key. |
void |
graft(RTKey key_,
BitSet bs_,
double timeout_)
Grafts the interfaces to the entry exactly matched by the given key. |
java.lang.String |
info()
Returns information regarding this component. |
int[] |
lookup(InetPacket pkt_,
long src_,
long dest_,
int incomingIf_)
|
protected void |
process(java.lang.Object data_,
Port inPort_)
The main callback method of a component. |
void |
prune(RTKey key_,
BitSet bs_)
Prunes the interfaces from the entry exactly matched by the given key. |
void |
prune(RTKey key_,
BitSet bs_,
double timeout_)
Prunes the interfaces from the entry exactly matched by the given key. |
java.lang.Object |
remove(RTKey key_,
java.lang.String matchType_)
Removes the matched entry(-ies). |
void |
reset()
Resets the component for being used anew. |
void |
setAddress(Address addr_)
Sets the address scheme. |
void |
setStaticEntries(RTEntry[] all_)
Sets the static route entries (entries never timed out). |
| 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 java.lang.String RADIX_TREE
public static final java.lang.String MULTIPLE_FIELD
public static java.lang.String IMPLEMENTATION
| Constructor Detail |
public RT()
public RT(java.lang.String id_)
| Method Detail |
public void reset()
Component
reset in class Componentpublic void duplicate(java.lang.Object source_)
Component
duplicate in interface ObjectDuplicableduplicate in class Componentpublic java.lang.String info()
Component
info in class Componentpublic java.lang.String diag()
protected void process(java.lang.Object data_,
Port inPort_)
Component
process in class Componentdata_ - the arrival data.inPort_ - the port where the data arrives.
public int[] lookup(InetPacket pkt_,
long src_,
long dest_,
int incomingIf_)
public void add(RTKey key_,
RTEntry entry_,
double timeout_)
public void add(RTKey key_,
RTEntry entry_)
public void graft(RTKey key_,
BitSet bs_)
public void graft(RTKey key_,
BitSet bs_,
double timeout_)
public void _graftprune(boolean graft_,
RTKey key_,
BitSet bs_,
java.lang.Object ext_,
double timeout_)
public void prune(RTKey key_,
BitSet bs_)
public void prune(RTKey key_,
BitSet bs_,
double timeout_)
public java.lang.Object get(RTKey key_,
java.lang.String matchType_)
key_ - the key to match.matchType_ - Map.MATCH_EXACT,
Map.MATCH_LONGEST,
Map.MATCH_ALL or
Map.MATCH_WILDCARD.
public RTEntry[] _getAll()
public java.lang.Object remove(RTKey key_,
java.lang.String matchType_)
key_ - the key to match.matchType_ - Map.MATCH_EXACT,
Map.MATCH_LONGEST,
Map.MATCH_ALL or
Map.MATCH_WILDCARD.
public java.lang.Object clear()
public RTEntry[] getStaticEntries()
public void setStaticEntries(RTEntry[] all_)
public void setAddress(Address addr_)
public Address getAddress()
|
J-Sim v1.2.1-p7 API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||