SSF.OS.OSPFv2
Class Router_LSA

java.lang.Object
  |
  +--SSF.OS.ProtocolMessage
        |
        +--SSF.OS.OSPFv2.Router_LSA

public class Router_LSA
extends ProtocolMessage

This class implements an OSPF Router Link State Advertisement. The following from RFC 2328 was not included: 1.) TOS 2.) TOS Metric


Field Summary
 boolean isAreaBorderRouter
          Indicates the B-bit in an Router-LSA (Border)
 boolean isASBoundaryRouter
          Indicates the E-bit in an Router-LSA (External)
 boolean isVirtLinkEndPoint
          Indicates the V-bit in an Router-LSA (Virtual)
 java.util.Vector links
          A Vector collecting all link descriptions (LinkInfo) belonging to this Router_LSA.
 
Constructor Summary
Router_LSA(boolean v, boolean e, boolean b)
           
 
Method Summary
 void addLink(LinkInfo link)
          add a new link info to this router LSA.
 int bytecount()
          Return the total size (in bytes) of this Router_LSA body.
 void carryPayload(ProtocolMessage payload)
          Append a ProtocolMessage to this ProtocolMessage.
 ProtocolMessage copy()
          Return an exact copy of this data structure.
 boolean equals(java.lang.Object test)
          Take a Router_LSA an compare it to this Router_LSA.
 int getNumOfLinks()
          Return the Number of link informations stored in this Router_LSA.
 int header_bytecount()
          Return the size (in bytes) of this header only, don't include a payload.
 
Methods inherited from class SSF.OS.ProtocolMessage
dropHeader, dropPayload, frombytes, fromVersion, payload, previous, size, tobytes, version
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

isVirtLinkEndPoint

public boolean isVirtLinkEndPoint
Indicates the V-bit in an Router-LSA (Virtual)


isASBoundaryRouter

public boolean isASBoundaryRouter
Indicates the E-bit in an Router-LSA (External)


isAreaBorderRouter

public boolean isAreaBorderRouter
Indicates the B-bit in an Router-LSA (Border)


links

public java.util.Vector links
A Vector collecting all link descriptions (LinkInfo) belonging to this Router_LSA.

Constructor Detail

Router_LSA

public Router_LSA(boolean v,
                  boolean e,
                  boolean b)
Method Detail

carryPayload

public void carryPayload(ProtocolMessage payload)
Description copied from class: ProtocolMessage
Append a ProtocolMessage to this ProtocolMessage.

Overrides:
carryPayload in class ProtocolMessage

addLink

public void addLink(LinkInfo link)
add a new link info to this router LSA.


getNumOfLinks

public int getNumOfLinks()
Return the Number of link informations stored in this Router_LSA.


bytecount

public int bytecount()
Return the total size (in bytes) of this Router_LSA body. All and only fields specified in RFC 2328 are included in calculation!!!

Overrides:
bytecount in class ProtocolMessage

header_bytecount

public int header_bytecount()
Return the size (in bytes) of this header only, don't include a payload. Router_LSA Classes don't have payload.

Overrides:
header_bytecount in class ProtocolMessage

copy

public ProtocolMessage copy()
Return an exact copy of this data structure. This method is used indirectly by the Neighbor Data Structure to send a copy of a Router LSA to its associated Neighbor.

Overrides:
copy in class ProtocolMessage

equals

public boolean equals(java.lang.Object test)
Take a Router_LSA an compare it to this Router_LSA. If there is no difference between them return true else false.

Overrides:
equals in class java.lang.Object
Parameters:
test - Object referencing a Router_LSA to compare.
Returns:
boolean value indicating whether the contents of the Router_LSAs are equal.