SSF.OS.OSPFv2
Class HelloPacket

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

public class HelloPacket
extends ProtocolMessage

This class implements an OSPF Hello packet. The following from RFC 2328 was not included: 1.) Version 2.) Packet length 3.) Checksum 4.) Authentication


Field Summary
 int BDR
           
 int DR
           
 int helloInterval
           
 java.util.Vector neighborIDs
           
 int netMask
           
 boolean[] options
           
 int routerDeadInterval
           
 int routerPrio
           
static int STD_LENGTH
           
 
Constructor Summary
HelloPacket(int helloInterval, boolean[] options, int routerDeadInterval, java.util.Vector neighborIDs)
          This one creates a Hello Packet for nonbroadcast mediums
HelloPacket(int netMask, int helloInterval, boolean[] options, int routerPrio, int routerDeadInterval, int DR, int BDR, java.util.Vector neighborIDs)
          This one creates a Hello Packet for broadcast mediums
 
Method Summary
 int bytecount()
          Return the total size (in bytes) of this Hello Packet body.
 void carryPayload(ProtocolMessage payload)
          Append a ProtocolMessage to this ProtocolMessage.
 int header_bytecount()
          Return the size (in bytes) of this header only, don't include the payload, if any.
 java.lang.String toString()
           
 
Methods inherited from class SSF.OS.ProtocolMessage
copy, dropHeader, dropPayload, frombytes, fromVersion, payload, previous, size, tobytes, version
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

netMask

public int netMask

helloInterval

public int helloInterval

options

public boolean[] options

routerPrio

public int routerPrio

routerDeadInterval

public int routerDeadInterval

DR

public int DR

BDR

public int BDR

neighborIDs

public java.util.Vector neighborIDs

STD_LENGTH

public static final int STD_LENGTH
See Also:
Constant Field Values
Constructor Detail

HelloPacket

public HelloPacket(int netMask,
                   int helloInterval,
                   boolean[] options,
                   int routerPrio,
                   int routerDeadInterval,
                   int DR,
                   int BDR,
                   java.util.Vector neighborIDs)
This one creates a Hello Packet for broadcast mediums


HelloPacket

public HelloPacket(int helloInterval,
                   boolean[] options,
                   int routerDeadInterval,
                   java.util.Vector neighborIDs)
This one creates a Hello Packet for nonbroadcast mediums

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()
Return the total size (in bytes) of this Hello Packet 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 the payload, if any. Hello Packets don't have payload.

Overrides:
header_bytecount in class ProtocolMessage

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object