|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--SSF.OS.OSPFv2.HashMapRoutingTable
An implementation of OSPF routing table usingn HashMaps to distinguish between router and network entries.
| Field Summary | |
OSPF |
myOSPF
A link to the OSPF session this routing table belongs to. |
java.util.HashMap |
networks
A HashMap storing routing table entries with destination "network". |
java.util.HashMap |
routers
A HashMap storing routing table entries with destination "router". |
| Constructor Summary | |
HashMapRoutingTable(OSPF o)
Create a new OSPF Routing Table formed by two HashMaps. |
|
| Method Summary | |
void |
add(NetworkEntry newNEntry,
java.lang.String key)
add a new entry (NetworkEntry) to the routing table whose destination is a network. |
void |
add(RouterEntry newREntry,
java.lang.Integer key,
java.lang.Integer areaID)
add a new entry (RouterEntry) to the routing table whose destination is a router. |
void |
delNet(java.lang.String key)
remove an entry from HashMap "networks". |
void |
delRout(java.lang.Integer key,
java.lang.Integer aID)
remove a particular route from HashMap "routers". |
void |
delRouter(java.lang.Integer key)
remove ALL routes to a particular router. |
RouterEntry |
getDest(java.lang.Integer destID,
java.lang.Integer destArea)
Lookup the routing table for a particular RouterEntry and return it if it exists. |
NetworkEntry |
getDest(java.lang.String destID)
Lookup the routing table for a NetworkEntry and return it if it exists. |
int |
getNetCost(java.lang.String netKey,
int areaID)
Return the cost of a NetworkEntry Object specified by its key String. |
java.lang.Object[] |
getNetKeys()
return the keys of all network entries. |
java.lang.String |
getPathType(byte type)
Convert the given path type in a String. |
java.lang.Integer |
getPrefASBREntryArea(java.lang.Integer key)
return the id of the area which stores the Summary LSA that lead to the preferred RouterEntry leading to a particular AS Boundary router. |
int |
getRoutCost(java.lang.Integer routKey,
int areaID)
Return the cost of the RouterEntry Object describing the preferred paths to an AS Boundary Router. |
java.util.Iterator |
getRoutKeys()
return the key values of all router entries. |
void |
print()
print this Table in a form following the examples of RFC 2328 chapter 11. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public java.util.HashMap routers
public java.util.HashMap networks
public OSPF myOSPF
| Constructor Detail |
public HashMapRoutingTable(OSPF o)
| Method Detail |
public void add(RouterEntry newREntry,
java.lang.Integer key,
java.lang.Integer areaID)
newREntry - RouterEntry to be added.key - Integer representing the destinations router's ID.areaID - Integer representing area's ID whose link state information has led
to the RouterEntry.
public void add(NetworkEntry newNEntry,
java.lang.String key)
newNEntry - NetworkEntry to be added.key - String consisting of an ip address followed by a slash followed by a
network mask. It uniquely identifys the NetworkEntry.public NetworkEntry getDest(java.lang.String destID)
destID - String, representing the identifier of the network entry.
public RouterEntry getDest(java.lang.Integer destID,
java.lang.Integer destArea)
destID - Integer, representing the identifier of the router entry.destArea - Integer, representing the id of the area who is responsible for the entry.
public int getNetCost(java.lang.String netKey,
int areaID)
netKey - String which uniquely identifies the NetworkEntry if it exists.areaID - id of the area in which a new Summary LSA should be installed.
public int getRoutCost(java.lang.Integer routKey,
int areaID)
routKey - Integer representing the ASBR's router id.areaID - id of the area in which a new Summary LSA should be installed.
public java.lang.Integer getPrefASBREntryArea(java.lang.Integer key)
key - Integer Object indicating the AS Boundary router's router id.
public void delNet(java.lang.String key)
key - String Object, representing the key value of the network destination.
public void delRout(java.lang.Integer key,
java.lang.Integer aID)
key - Integer Object, representing the key value of the router destination.aID - Integer Object, representing the id of the area who has lead to this entry.public void delRouter(java.lang.Integer key)
key - Integer Object, representing the id of the router to be removed.public java.lang.Object[] getNetKeys()
public java.util.Iterator getRoutKeys()
public void print()
public java.lang.String getPathType(byte type)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||