J-Sim v1.2.1-p7 API

drcl.inet.protocol.dvmrp
Class DVMRPFCPacket

java.lang.Object
  extended bydrcl.DrclObj
      extended bydrcl.inet.protocol.dvmrp.DVMRPFCPacket
All Implemented Interfaces:
java.lang.Cloneable, ObjectDuplicable, java.io.Serializable

public class DVMRPFCPacket
extends DrclObj

Defines the format of the packets used by DVMRP to exchange forwarding table with neighbors.

See Also:
Serialized Form

Constructor Summary
DVMRPFCPacket()
           
DVMRPFCPacket(int version_, long src_, long group_, long srcmask_, boolean ack_)
          Creates a graft(-ack) packet.
DVMRPFCPacket(int version_, long src_, long group_, long srcmask_, int pruneLifetime_)
          Creates a prune packet
 
Method Summary
 java.lang.Object clone()
          Returns a clone of this object.
 void duplicate(java.lang.Object source_)
          opies the content of the source_ object to this object.
 int getCommand()
           
 long getGroup()
          Retrieves the group field.
 int getPruneLifetime()
          Retrieves the prune lifetime field.
 long getSource()
          Retrieves the source field.
 long getSourceMask()
          Retrieves the source network mask field.
 int getVersion()
           
 boolean isGraft()
           
 boolean isGraftAck()
           
 boolean isPrune()
           
 void setCommand(int value_)
           
 void setGroup(long value_)
           
 void setPruneLifetime(int value_)
           
 void setSource(long value_)
           
 void setSourceMask(long value_)
           
 void setVersion(int value_)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DVMRPFCPacket

public DVMRPFCPacket()

DVMRPFCPacket

public DVMRPFCPacket(int version_,
                     long src_,
                     long group_,
                     long srcmask_,
                     int pruneLifetime_)
Creates a prune packet

Parameters:
pruneLifetime_ - in seconds.

DVMRPFCPacket

public DVMRPFCPacket(int version_,
                     long src_,
                     long group_,
                     long srcmask_,
                     boolean ack_)
Creates a graft(-ack) packet.

Method Detail

getCommand

public int getCommand()

getVersion

public int getVersion()

isPrune

public boolean isPrune()

isGraft

public boolean isGraft()

isGraftAck

public boolean isGraftAck()

getSource

public long getSource()
Retrieves the source field.


getGroup

public long getGroup()
Retrieves the group field.


getSourceMask

public long getSourceMask()
Retrieves the source network mask field.


getPruneLifetime

public int getPruneLifetime()
Retrieves the prune lifetime field.


setCommand

public void setCommand(int value_)

setVersion

public void setVersion(int value_)

setSource

public void setSource(long value_)

setSourceMask

public void setSourceMask(long value_)

setGroup

public void setGroup(long value_)

setPruneLifetime

public void setPruneLifetime(int value_)

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().

Specified by:
duplicate in interface ObjectDuplicable
Overrides:
duplicate in class DrclObj

clone

public java.lang.Object clone()
Description copied from class: DrclObj
Returns a clone of this object. By default, this method creates an object of the same class and calls DrclObj.duplicate(Object) to duplicate the content of this object to the newly-created one.

This method uses getClass().newInstance() to create new instance. Hence, subclasses need to override this method only if the subclass is not declared as public or does not have explicit no-argument constructor. A subclass may override this method for performance reason.

Specified by:
clone in interface ObjectDuplicable
Overrides:
clone in class DrclObj

toString

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

J-Sim v1.2.1-p7 API

Copyright © 1998-2003 Distributed Real-time Computing Lab (DRCL). All Rights Reserved.     ~ To J-Sim Home ~