net.clackrouter.routing
Class RoutingEntry

java.lang.Object
  extended by net.clackrouter.routing.RoutingEntry
All Implemented Interfaces:
java.lang.Comparable
Direct Known Subclasses:
OSPFRoutingEntry, RIPRoutingEntry

public class RoutingEntry
extends java.lang.Object
implements java.lang.Comparable

Represents a single routing entry contained by a RoutingTable.


Field Summary
 java.lang.String interface_name
          Name of outgoing interface for the next-hop associated with this entry
 long last_access
           
 java.net.InetAddress mask
          The mask portion of the destination address for this entry
 java.net.InetAddress network
          The network portion of the destination address for this entry
 java.net.InetAddress nextHop
          IP Address of the next-hop router for this entry
 
Constructor Summary
RoutingEntry(java.net.InetAddress dest, java.net.InetAddress next, java.net.InetAddress net_mask, java.lang.String iface)
           
 
Method Summary
 int compareTo(java.lang.Object obj)
           
 java.net.InetAddress getDestination()
           
 java.lang.String getInterface()
           
 java.net.InetAddress getMask()
           
 java.net.InetAddress getNextHop()
           
 boolean isDefault()
           
 boolean matches(java.net.InetAddress destIn)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

network

public java.net.InetAddress network
The network portion of the destination address for this entry


mask

public java.net.InetAddress mask
The mask portion of the destination address for this entry


nextHop

public java.net.InetAddress nextHop
IP Address of the next-hop router for this entry


interface_name

public java.lang.String interface_name
Name of outgoing interface for the next-hop associated with this entry


last_access

public long last_access
Constructor Detail

RoutingEntry

public RoutingEntry(java.net.InetAddress dest,
                    java.net.InetAddress next,
                    java.net.InetAddress net_mask,
                    java.lang.String iface)
Method Detail

getDestination

public java.net.InetAddress getDestination()

getMask

public java.net.InetAddress getMask()

getNextHop

public java.net.InetAddress getNextHop()

getInterface

public java.lang.String getInterface()

isDefault

public boolean isDefault()

matches

public boolean matches(java.net.InetAddress destIn)

compareTo

public int compareTo(java.lang.Object obj)
Specified by:
compareTo in interface java.lang.Comparable

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object