|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjist.swans.route.RouteAodv.RouteTable
private static class RouteAodv.RouteTable
A routing table contains a hash map, consisting of NetAddress->RouteTableEntry mappings.
| Field Summary | |
|---|---|
private NetAddress |
localAddr
Address of local node. |
private java.util.HashMap |
table
The routing table. |
| Constructor Summary | |
|---|---|
RouteAodv.RouteTable(NetAddress netAddr)
Constructs a RouteTable object. |
|
| Method Summary | |
|---|---|
void |
add(NetAddress key,
RouteAodv.RouteTableEntry value)
Adds a new entry to the routing table. |
java.util.LinkedList |
destsViaHop(MacAddress hop)
Returns all destinations through a given next hop. |
RouteAodv.RouteTableEntry |
lookup(NetAddress key)
Look up routing information for a given destination address. |
void |
printTable()
Print contents of routing table, for debugging purposes. |
private boolean |
remove(NetAddress key)
Removes entry with given key from routing table. |
boolean |
removeList(java.util.LinkedList list)
Remove all route table entries whose destination is specified in a given list. |
void |
removeNextHop(MacAddress nextHop)
Remove all routing table entries with a given next hop address. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private java.util.HashMap table
private NetAddress localAddr
| Constructor Detail |
|---|
public RouteAodv.RouteTable(NetAddress netAddr)
netAddr - local address of this node| Method Detail |
|---|
public void add(NetAddress key,
RouteAodv.RouteTableEntry value)
key - destination addressvalue - routing information for this destinationprivate boolean remove(NetAddress key)
key - destination net address
public RouteAodv.RouteTableEntry lookup(NetAddress key)
key - destination address
public boolean removeList(java.util.LinkedList list)
list - List of destinations (of type NetAddress)
public void removeNextHop(MacAddress nextHop)
nextHop - the next hop addresspublic java.util.LinkedList destsViaHop(MacAddress hop)
hop - Next hop address
public void printTable()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||