SSF.OS.OSPFv2
Class LinkInfo

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

public class LinkInfo
extends java.lang.Object

A unit of information describing a link and used in the contents of a link state advertisement.


Field Summary
static int LINK_INFO_SIZE
          The size of this Link Info.
 int linkData
          This holds additional data about the link.
 int linkID
          This variable holds the ID of the link.
 int linkType
          This field holds the type of the link.
 int metric
          The cost of using this router link.
 int numOfTOSMetrics
          The number of different TOS metrics given for this link.
 
Constructor Summary
LinkInfo(int id, int data, int type, int met)
           
LinkInfo(int id, int data, int type, int tos, int met)
          Constructs a new unit of link information given router and link information.
 
Method Summary
 boolean compare(LinkInfo test)
          Take a LinkInfo an compare it to this LinkInfo.
 LinkInfo copy()
          Return an exact copy of this LinkInfo
 boolean equals(java.lang.Object o)
          Determines if a given object describes the same link as this object.
static int size()
          returns the size of this LinkInfo.
 java.lang.String toString()
          Converts the link information to a string.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LINK_INFO_SIZE

public static final int LINK_INFO_SIZE
The size of this Link Info. Orientated by RFC 2328.

See Also:
Constant Field Values

linkID

public int linkID
This variable holds the ID of the link.


linkData

public int linkData
This holds additional data about the link.


linkType

public int linkType
This field holds the type of the link.


numOfTOSMetrics

public int numOfTOSMetrics
The number of different TOS metrics given for this link.


metric

public int metric
The cost of using this router link.

Constructor Detail

LinkInfo

public LinkInfo(int id,
                int data,
                int type,
                int tos,
                int met)
Constructs a new unit of link information given router and link information.


LinkInfo

public LinkInfo(int id,
                int data,
                int type,
                int met)
Method Detail

toString

public java.lang.String toString()
Converts the link information to a string.

Overrides:
toString in class java.lang.Object
Returns:
the link information as a string

size

public static int size()
returns the size of this LinkInfo.


equals

public boolean equals(java.lang.Object o)
Determines if a given object describes the same link as this object.

Overrides:
equals in class java.lang.Object
Returns:
true only if the object is of type LinkInfo and describes the same link as this object

copy

public LinkInfo copy()
Return an exact copy of this LinkInfo


compare

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