net.clackrouter.routing
Class RIPRoutingEntry

java.lang.Object
  extended by net.clackrouter.routing.RoutingEntry
      extended by 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
 
Fields inherited from class net.clackrouter.routing.RoutingEntry
interface_name, last_access, mask, network, nextHop
 
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)
           
 
Method Summary
static RIPRoutingEntry createLocalRIPRoutingEntry(java.net.InetAddress network, java.net.InetAddress mask, java.lang.String local_interface, int cost)
           
static RIPRoutingEntry createNonLocalRIPRoutingEntry(java.net.InetAddress network, java.net.InetAddress mask, java.net.InetAddress nextHop, java.lang.String interface_name, short ttl, int cost)
           
 
Methods inherited from class net.clackrouter.routing.RoutingEntry
compareTo, getDestination, getInterface, getMask, getNextHop, isDefault, matches, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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

Constructor Detail

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)
Method Detail

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)