net.clackrouter.routing
Class RIPRoutingEntry
java.lang.Object
net.clackrouter.routing.RoutingEntry
net.clackrouter.routing.RIPRoutingEntry
- All Implemented Interfaces:
- java.lang.Comparable
public class RIPRoutingEntry
- extends RoutingEntry
Extension of RoutingEntry
to also hold RIP data within a RoutingTable
.
Field Summary |
int |
cost
the cost of reaching this network |
static int |
INFINITE_COST
|
boolean |
isLocal
whether this network is local (i.e., connected) to this router |
static short |
MAX_TTL
|
static short |
NO_TTL
|
short |
ttl
the time-to-live of this routing entry |
Constructor Summary |
RIPRoutingEntry(java.net.InetAddress dest,
java.net.InetAddress mask,
java.net.InetAddress next,
java.lang.String iface,
short t,
int c,
boolean local)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
INFINITE_COST
public static int INFINITE_COST
MAX_TTL
public static short MAX_TTL
NO_TTL
public static short NO_TTL
ttl
public short ttl
- the time-to-live of this routing entry
cost
public int cost
- the cost of reaching this network
isLocal
public boolean isLocal
- whether this network is local (i.e., connected) to this router
RIPRoutingEntry
public RIPRoutingEntry(java.net.InetAddress dest,
java.net.InetAddress mask,
java.net.InetAddress next,
java.lang.String iface,
short t,
int c,
boolean local)
createLocalRIPRoutingEntry
public static RIPRoutingEntry createLocalRIPRoutingEntry(java.net.InetAddress network,
java.net.InetAddress mask,
java.lang.String local_interface,
int cost)
createNonLocalRIPRoutingEntry
public static RIPRoutingEntry createNonLocalRIPRoutingEntry(java.net.InetAddress network,
java.net.InetAddress mask,
java.net.InetAddress nextHop,
java.lang.String interface_name,
short ttl,
int cost)