|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--SSF.Net.RoutingInfo
Forwarding data stored in a node in a RoutingTable.
| Field Summary | |
static int |
UNDEFINED_ADMINISTRATIVE_DISTANCE
|
| Constructor Summary | |
RoutingInfo()
|
|
| Method Summary | |
abstract RoutingInfo |
addRoute(RoutingInfo newRoute)
Insert one or more new routes into the linked list, sorted primarily by administrative distance and secondarily by cost. |
abstract int |
adist()
Returns the administrative distance. |
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. |
abstract int |
cost()
Returns the cost. |
protected static java.lang.String |
decodeSource(byte srcid)
Returns the string representation of a protocol name given the byte code for the protocol. |
abstract java.lang.String |
dest_ip()
Returns the destination IP address. |
protected static byte |
encodeSource(java.lang.String name)
Returns the byte value of a protocol given the string representation of the protocol name. |
abstract RoutingInfo |
findRouteFrom(java.lang.String protocol)
Find the first (best) route inserted by the named protocol. |
abstract RoutingInfo[] |
findRoutesFrom(java.lang.String protocol)
Return the list of routes inserted by the given protocol. |
abstract java.lang.String |
getProtocol()
|
abstract NIC |
next_hop_interface()
Return the next hop inteface (NIC) object. |
abstract int |
next_hop_ip()
Returns the next hop IP address. |
abstract RoutingInfo |
nextRoute()
Returns the next route info entry for the same IP address (if any). |
abstract 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). |
abstract 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). |
abstract 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. |
abstract java.lang.String |
toString()
Returns the routing information as a string. |
abstract 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 |
public static final int UNDEFINED_ADMINISTRATIVE_DISTANCE
| Constructor Detail |
public RoutingInfo()
| Method Detail |
public abstract NIC next_hop_interface()
public abstract java.lang.String dest_ip()
public abstract int next_hop_ip()
public abstract int cost()
public abstract int adist()
public abstract java.lang.String getProtocol()
public abstract RoutingInfo nextRoute()
public abstract RoutingInfo addRoute(RoutingInfo newRoute)
public abstract RoutingInfo removeRoute(RoutingInfo oldRoute)
public abstract RoutingInfo removeRoutesFrom(java.lang.String protocol)
public abstract RoutingInfo[] findRoutesFrom(java.lang.String protocol)
public abstract RoutingInfo findRouteFrom(java.lang.String protocol)
public abstract java.lang.String toString()
toString in class java.lang.Object
public abstract 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 abstract 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.
protected static java.lang.String decodeSource(byte srcid)
srcid - The byte code of the protocol.
protected static byte encodeSource(java.lang.String name)
name - The name of the protocol.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||