SSF.OS.OSPFv2
Class NetworkEntry

java.lang.Object
  |
  +--SSF.OS.OSPFv2.NetworkEntry

public class NetworkEntry
extends java.lang.Object

A routing table entry describing the set of shortest paths leading to a network destination. This includes the ID of the area in which the link state information of this entry was built. All other values of these entries are encoded in the OSPFv2 Routing Table structure.


Field Summary
 int area
          This field indicates the area whose link state information has led to the network entry's collection of paths.
 int cost
          The link state cost of the paths to the network.
 java.util.Vector equalCostPaths
          A Vector holding all equal-cost paths in form of ShortestPath objects.
 LSA lsOrigin
          In case of path-type INTRA_AREA this field references the LSA that directly references the destination.
 byte pathType
          The type of path of the set of shortest paths to the destination network.
 int type2Cost
          This field is valid only if pathType is of TYPE_2_EXTERNAL.
 
Constructor Summary
NetworkEntry(int area, byte pType, int c, int t2c, LSA lso, java.util.Vector paths)
          Constructs a new NetworkEntry and set the fields to the given values.
 
Method Summary
 boolean equalCost(NetworkEntry netwEntry)
          Test whether the cost of this NetworkEntry is equal to the cost of netwEntry.
 boolean equals(java.lang.Object netEntObj)
          Compare this NetworkEntry with another one.
 boolean sameShortestPaths(NetworkEntry netwEntry)
          Test whether the equal-cost paths, stored in this NetworkEntry are the same as the one stored in netwEntry.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

area

public int area
This field indicates the area whose link state information has led to the network entry's collection of paths. Only the best area is kept, therefore it is encoded as single field in an entry.


pathType

public byte pathType
The type of path of the set of shortest paths to the destination network. The values of pathType are specified in class OSPF.


cost

public int cost
The link state cost of the paths to the network.


type2Cost

public int type2Cost
This field is valid only if pathType is of TYPE_2_EXTERNAL. Then it indicates the cost of path's external portion.


lsOrigin

public LSA lsOrigin
In case of path-type INTRA_AREA this field references the LSA that directly references the destination. The current version of OSPFv2 does not support broadcast, so the destination may be only a stub network, and therefore the value is always a ROUTER_LSA.


equalCostPaths

public java.util.Vector equalCostPaths
A Vector holding all equal-cost paths in form of ShortestPath objects.

Constructor Detail

NetworkEntry

public NetworkEntry(int area,
                    byte pType,
                    int c,
                    int t2c,
                    LSA lso,
                    java.util.Vector paths)
Constructs a new NetworkEntry and set the fields to the given values.

Parameters:
area - ID of area whose link state information has led to this entry.
pType - The path type of the set of shortest paths.
c - The cost of the shortest paths.
t2c - External portion of path's cost.
lso - The LSA describing the LS Origin (currently only Router-LSAs, but not used in any calculations).
paths - A Vector holding ShortestPath objects which uniquely identifies the various shortest paths.
Method Detail

equalCost

public boolean equalCost(NetworkEntry netwEntry)
Test whether the cost of this NetworkEntry is equal to the cost of netwEntry.

Parameters:
netwEntry - NetworkEntry whose cost is compared.
Returns:
boolean value indicating whether the two costs are equal or not.

sameShortestPaths

public boolean sameShortestPaths(NetworkEntry netwEntry)
Test whether the equal-cost paths, stored in this NetworkEntry are the same as the one stored in netwEntry.

Parameters:
netwEntry - NetworkEntry whose equalCostPaths Vector is compared.
Returns:
boolean value indicating whether the equalCostPaths Vectors of both NetworkEntries are identical or not.

equals

public boolean equals(java.lang.Object netEntObj)
Compare this NetworkEntry with another one. Return true if they are equal else false.

Overrides:
equals in class java.lang.Object
Parameters:
netEntObj - NetworkEntry to compare.
Returns:
boolean value indicating whether the two entries are equal or not.