|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--SSF.Net.RoutingInfo
|
+--SSF.Net.RoutingInfoIC
Forwarding data stored in a node in a RoutingTable (in core).
| Field Summary | |
protected int |
ADIST
Administrative Distance -- for tiebreaking among routing protocols |
protected int |
COST
Cost metric -- unused for the moment |
protected java.lang.String |
DEST_IP
Destination IP address prefix. |
protected NIC |
INTERFACE
Reference to the network interface that gets us to the next hop |
protected int |
NEXT_HOP_IP
IP address of the node that's the next hop |
protected RoutingInfoIC |
nextRoute
Linked list of routes to the same destination IP address |
protected java.lang.String |
PROTOCOL
Name of the routing protocol where this route originated. |
| Fields inherited from class SSF.Net.RoutingInfo |
UNDEFINED_ADMINISTRATIVE_DISTANCE |
| Constructor Summary | |
RoutingInfoIC(java.lang.String dest_ip,
int next_hop,
NIC iface,
int cost,
int adist,
java.lang.String src)
|
|
| Method Summary | |
RoutingInfo |
addRoute(RoutingInfo newRte)
Insert one or more new routes into the linked list, sorted primarily by administrative distance and secondarily by cost. |
int |
adist()
Returns the administrative distance. |
int |
cost()
Returns the cost. |
java.lang.String |
dest_ip()
Returns the destination IP address. |
RoutingInfo |
findRouteFrom(java.lang.String protocol)
Find the first (best) route inserted by the named protocol. |
RoutingInfo[] |
findRoutesFrom(java.lang.String protocol)
Return the list of routes inserted by the given protocol. |
java.lang.String |
getProtocol()
|
NIC |
next_hop_interface()
Return the next hop inteface (NIC) object. |
int |
next_hop_ip()
Returns the next hop IP address. |
RoutingInfo |
nextRoute()
Returns the next route info entry for the same IP address (if any). |
RoutingInfo |
removeRoute(RoutingInfo oldRoute)
Remove the given route, and return the new head route (either this route, or if this route was removed, the next route). |
RoutingInfo |
removeRoutesFrom(java.lang.String protocol)
Remove routes from the given protocol, and return the new head route (either this route, or if this route was removed, the next route). |
int |
toBytes(byte[] bytes,
int bindex,
boolean usenhi,
Net topnet)
Converts this routing info into a series of bytes and inserts them into a given byte array. |
java.lang.String |
toString()
Returns the routing information as a string. |
java.lang.String |
toString(boolean usenhi,
Net topnet)
Returns the routing information as a string. |
| Methods inherited from class SSF.Net.RoutingInfo |
approxBytes, bytes2info, decodeSource, encodeSource |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected java.lang.String DEST_IP
protected int NEXT_HOP_IP
protected NIC INTERFACE
protected int COST
protected int ADIST
protected RoutingInfoIC nextRoute
protected java.lang.String PROTOCOL
| Constructor Detail |
public RoutingInfoIC(java.lang.String dest_ip,
int next_hop,
NIC iface,
int cost,
int adist,
java.lang.String src)
| Method Detail |
public final NIC next_hop_interface()
RoutingInfo
next_hop_interface in class RoutingInfopublic final java.lang.String dest_ip()
RoutingInfo
dest_ip in class RoutingInfopublic final int next_hop_ip()
RoutingInfo
next_hop_ip in class RoutingInfopublic int cost()
cost in class RoutingInfopublic int adist()
adist in class RoutingInfopublic final java.lang.String getProtocol()
getProtocol in class RoutingInfopublic RoutingInfo nextRoute()
RoutingInfo
nextRoute in class RoutingInfopublic RoutingInfo addRoute(RoutingInfo newRte)
addRoute in class RoutingInfopublic RoutingInfo removeRoute(RoutingInfo oldRoute)
removeRoute in class RoutingInfopublic RoutingInfo removeRoutesFrom(java.lang.String protocol)
removeRoutesFrom in class RoutingInfopublic RoutingInfo[] findRoutesFrom(java.lang.String protocol)
findRoutesFrom in class RoutingInfopublic RoutingInfo findRouteFrom(java.lang.String protocol)
findRouteFrom in class RoutingInfopublic java.lang.String toString()
toString in class RoutingInfo
public java.lang.String toString(boolean usenhi,
Net topnet)
toString in class RoutingInfousenhi - Whether to use the NHI or IP prefix address format.topnet - The top-level Net in the simulation.
public int toBytes(byte[] bytes,
int bindex,
boolean usenhi,
Net topnet)
toBytes in class RoutingInfobytes - A byte array in which to place the results.bindex - The index into the given byte array at which to begin
placing the results.usenhi - Whether or not to use NHI addressing.topnet - The top-level Net in the simulation.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||