|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--SSF.Net.TERoutingInfo
Forwarding data stored in a node in a RoutingTable
| Field Summary | |
protected double |
COST
Cost metric -- unused for the moment |
private java.lang.String |
DEST_IP
destination IP address |
protected TEInterface |
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 TERoutingInfo |
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. |
| Constructor Summary | |
TERoutingInfo(int destaddr,
TEInterface iface,
double cost1)
|
|
TERoutingInfo(java.lang.String dest_ip,
int next_hop,
TEInterface iface,
double cost)
|
|
| Method Summary | |
TERoutingInfo |
addRoute(TERoutingInfo newRoute)
Insert one or more new routes into the linked list, sorted by COST; return the new head route (either the new route, or this route, whichever is lower-cost). |
static int |
approxBytes()
Returns an estimate of the number of bytes that would be produced by the conversion performed in toBytes. |
static int |
bytes2info(java.lang.StringBuffer info,
byte[] bytes,
int bindex,
boolean usenhi)
Converts a series of bytes to routing info in string format. |
TEInterface |
next_hop_interface()
|
int |
next_hop_ip()
|
TERoutingInfo |
removeRoute(TERoutingInfo oldRoute)
Remove the given route, 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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
private java.lang.String DEST_IP
protected int NEXT_HOP_IP
protected TEInterface INTERFACE
protected double COST
protected TERoutingInfo nextRoute
protected java.lang.String PROTOCOL
| Constructor Detail |
public TERoutingInfo(int destaddr,
TEInterface iface,
double cost1)
public TERoutingInfo(java.lang.String dest_ip,
int next_hop,
TEInterface iface,
double cost)
| Method Detail |
public final int next_hop_ip()
public TERoutingInfo addRoute(TERoutingInfo newRoute)
public TERoutingInfo removeRoute(TERoutingInfo oldRoute)
public final TEInterface next_hop_interface()
public java.lang.String toString()
toString in class java.lang.Object
public java.lang.String toString(boolean usenhi,
Net topnet)
usenhi - 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)
bytes - 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.
public static int approxBytes()
toBytes. Whether or not NHI
addressing is used can make a difference, so there's a parameter for that
option.
toBytes
public static int bytes2info(java.lang.StringBuffer info,
byte[] bytes,
int bindex,
boolean usenhi)
info - A StringBuffer into which the results will be placed.
It must be initialized to the empty string.bytes - The byte array to convert to routing info.bindex - The index into the given byte array from which to begin
converting.usenhi - Whether or not to use NHI addressing.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||