SSF.OS.OSPFv2
Class Summary_LSA

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

public class Summary_LSA
extends ProtocolMessage

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


Field Summary
 int metric
          The cost of this route.
 int netMask
          For Type 3 summary-LSAs: The destination network's IP address mask.
 
Constructor Summary
Summary_LSA(int cost)
          Type 4 Summary_LSA constructor.
Summary_LSA(int mask, int cost)
          Type 3 Summary_LSA constructor.
 
Method Summary
 int bytecount()
          Return the total size (in bytes) of this header plus the payload, if any.
 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 Summary_LSA an compare it to this Summary_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

netMask

public int netMask
For Type 3 summary-LSAs: The destination network's IP address mask. For Type 4 summary-LSAs: The value must be zero.


metric

public int metric
The cost of this route. Expressed in the same units as the interface costs in Router_LSA.

Constructor Detail

Summary_LSA

public Summary_LSA(int mask,
                   int cost)
Type 3 Summary_LSA constructor.

Parameters:
mask - int value representing the destination network's IP address mask.
cost - int value representing the cost of this route.

Summary_LSA

public Summary_LSA(int cost)
Type 4 Summary_LSA constructor.

Parameters:
cost - int value representing the cost of this route.
Method Detail

carryPayload

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

Overrides:
carryPayload in class ProtocolMessage

bytecount

public int bytecount()
Description copied from class: ProtocolMessage
Return the total size (in bytes) of this header plus the payload, if any. Defaults to zero; override in derived classes.

Overrides:
bytecount in class ProtocolMessage
Returns:
int value indicating the total size (in bytes) of this Summary_LSA body.

header_bytecount

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

Overrides:
header_bytecount in class ProtocolMessage
Returns:
int value indicating the total size (in bytes) of this Summary_LSA body.

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 Summary LSA to its associated Neighbor.

Overrides:
copy in class ProtocolMessage

equals

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

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