drcl.inet.protocol.ospf
Class OSPF_Packet
java.lang.Object
|
+--drcl.DrclObj
|
+--drcl.net.Packet
|
+--drcl.inet.protocol.ospf.OSPF_Packet
- All Implemented Interfaces:
- java.lang.Cloneable, ObjectDuplicable, PacketWrapper, java.io.Serializable
- public class OSPF_Packet
- extends Packet
This class implements a generic OSPF packet. The following from RFC 2328
are not included:
1) OSPF Version number
2) Packet length
3) Checksum
4) Authentication Type
5) Authentication
ref: RFC 2328 A.3.1 p.190
- See Also:
- Serialized Form
|
Constructor Summary |
protected |
OSPF_Packet(int type,
int routerid,
int areaid)
constructs an OSPF_Pkt_header with a given type, router ID, area ID |
|
Method Summary |
java.lang.String |
_toString(java.lang.String separator_)
Prints the packet header. |
java.lang.Object |
clone()
Returns a clone of this wrapper instance. |
void |
duplicate(java.lang.Object source_)
opies the content of the source_ object to this object. |
protected int |
getAreaID()
|
protected int |
getLength()
|
java.lang.String |
getName()
Returns the name of this packet. |
protected int |
getRouterID()
|
protected int |
getType()
|
| Methods inherited from class drcl.net.Packet |
equals, getBody, getByteCount, getHeaderSize, getPacketCount, getPacketSize, getPacketType, setBody, setBody, setHeaderSize, setPacketSize, setSize, toString, toString, wraps |
| Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
OSPF_HEADER_LEN
protected static final int OSPF_HEADER_LEN
OSPF_Packet
protected OSPF_Packet(int type,
int routerid,
int areaid)
- constructs an OSPF_Pkt_header with a given type, router ID, area ID
getType
protected int getType()
getRouterID
protected int getRouterID()
getAreaID
protected int getAreaID()
getLength
protected int getLength()
getName
public java.lang.String getName()
- Description copied from class:
Packet
- Returns the name of this packet.
- Overrides:
getName in class Packet
_toString
public java.lang.String _toString(java.lang.String separator_)
- Description copied from class:
Packet
- Prints the packet header.
- Overrides:
_toString in class Packet
duplicate
public void duplicate(java.lang.Object source_)
- Description copied from class:
DrclObj
- opies the content of the
source_ object to this object.
he subclass must implement this method to realize DrclObj.clone().
- Overrides:
duplicate in class Packet
clone
public java.lang.Object clone()
- Description copied from interface:
PacketWrapper
- Returns a clone of this wrapper instance.
- Overrides:
clone in class DrclObj
Copyright © 2001 - DRCL, OSU ~ Back to JavaSim Home ~