SSF.OS.OSPF
Class LSDatabase

java.lang.Object
  |
  +--SSF.OS.OSPF.LSDatabase

public class LSDatabase
extends java.lang.Object

An OSPF Link State database.


Field Summary
static int AS_BOUNDARY
           
static int AS_EXT
           
 java.util.Hashtable ASboundary
           
 java.util.Hashtable ASExt
           
static int ROUTER_LINK
           
 java.util.Hashtable RouterLink
          A list of physical links between one given router and other routers in the same network area (to which it is connected).
static int SUMMARY_NET
           
 java.util.Hashtable SummaryNet
           
 
Constructor Summary
LSDatabase(sOSPF o)
           
 
Method Summary
 java.util.Vector getASboundary()
          Returns a list of all the AS boundary routers in this database.
 java.util.Vector getASExtNetworks()
          Returns a list of all the AS boundary routers in this database.
 java.util.Vector getStubNetworks()
          Returns a list of all the stub network links in this database.
 java.util.Vector getSummaryNets()
          Returns a list of all the stub network links in other databases.
 boolean isModified()
          Return true if this OSPF Database has been modified after last Dijkstra.
static java.lang.String linksToString(java.util.Vector list, java.lang.String ind, boolean usenhi)
          Converts a table of link information to a string.
 void setModified(boolean mod)
           
 java.lang.String toString()
          Returns this OSPF link state database as a string.
 java.lang.String toString(java.lang.String ind, boolean usenhi)
          Returns this OSPF link state database as a string.
 java.lang.String toVString(java.lang.String ind, boolean usenhi)
          Returns this OSPF link state database as a string specially formatted for use with a validation test.
 void updateLink(int linktype, java.lang.String nhipref, LinkInfo newNode)
          Each element of RouterLink keeps track of physical links between a given router and other routers in the same network area.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ROUTER_LINK

public static final int ROUTER_LINK
See Also:
Constant Field Values

SUMMARY_NET

public static final int SUMMARY_NET
See Also:
Constant Field Values

AS_BOUNDARY

public static final int AS_BOUNDARY
See Also:
Constant Field Values

AS_EXT

public static final int AS_EXT
See Also:
Constant Field Values

RouterLink

public java.util.Hashtable RouterLink
A list of physical links between one given router and other routers in the same network area (to which it is connected).


SummaryNet

public java.util.Hashtable SummaryNet

ASboundary

public java.util.Hashtable ASboundary

ASExt

public java.util.Hashtable ASExt
Constructor Detail

LSDatabase

public LSDatabase(sOSPF o)
Method Detail

toString

public java.lang.String toString(java.lang.String ind,
                                 boolean usenhi)
Returns this OSPF link state database as a string.

Parameters:
ind - A string to use for indenting each line of the output string.
usenhi - Whether to use NHI addressing or IP addressing.
Returns:
the OSPF link state database as a string

toVString

public java.lang.String toVString(java.lang.String ind,
                                  boolean usenhi)
Returns this OSPF link state database as a string specially formatted for use with a validation test.

Parameters:
ind - A string to use for indenting each line of the output string.
usenhi - Whether to use NHI addressing or IP addressing.
Returns:
the OSPF link state database as a string for use with a validation test

toString

public java.lang.String toString()
Returns this OSPF link state database as a string.

Overrides:
toString in class java.lang.Object
Returns:
the OSPF link state database as a string

linksToString

public static java.lang.String linksToString(java.util.Vector list,
                                             java.lang.String ind,
                                             boolean usenhi)
Converts a table of link information to a string.

Parameters:
ind - A string to use for indenting each line of the output string.
usenhi - Whether to use NHI addressing or IP addressing.
Returns:
the table of link info as a string

getStubNetworks

public java.util.Vector getStubNetworks()
Returns a list of all the stub network links in this database.


getSummaryNets

public java.util.Vector getSummaryNets()
Returns a list of all the stub network links in other databases.


getASboundary

public java.util.Vector getASboundary()
Returns a list of all the AS boundary routers in this database.


getASExtNetworks

public java.util.Vector getASExtNetworks()
Returns a list of all the AS boundary routers in this database.


updateLink

public void updateLink(int linktype,
                       java.lang.String nhipref,
                       LinkInfo newNode)
Each element of RouterLink keeps track of physical links between a given router and other routers in the same network area.


isModified

public boolean isModified()
Return true if this OSPF Database has been modified after last Dijkstra.


setModified

public void setModified(boolean mod)