verinec.netsim.util.tables
Class RoutingTable
java.lang.Object
java.util.AbstractMap
verinec.netsim.util.tables.AddressTable
verinec.netsim.util.tables.RoutingTable
- All Implemented Interfaces:
- Map
public class RoutingTable
- extends AddressTable
- Version:
- $Revision: 47 $
- Author:
- Dominik Jungo
|
Constructor Summary |
RoutingTable()
Creates a new RoutingTable |
| Methods inherited from class java.util.AbstractMap |
clear, clone, containsKey, containsValue, equals, get, hashCode, isEmpty, keySet, putAll, remove, size, toString, values |
RoutingTable
public RoutingTable()
- Creates a new RoutingTable
put
public Object put(Object arg0,
Object arg1,
Object arg2,
double time)
- adds an entry to the routing table
- Parameters:
arg0 - a key (destination address)arg1 - the address of the interfacearg2 - the address of the used gatewaytime - creation time of this entry
- Returns:
- the old value with the key arg0.
null if there is no value with this key.
getInterface
public IAddress getInterface(IAddress key)
- gets the Address of the Interface over which data will be send to the
destination address (
key). A matching algrothym using
netmasks is used. If no interface address matches the address of the
interface connected to default gateway is returned.
- Parameters:
key - the destination address
- Returns:
- address of the interface over which data will be send to
destination.