Package org.onlab.packet.pim
Class PIMHelloOption
- java.lang.Object
-
- org.onlab.packet.pim.PIMHelloOption
-
public class PIMHelloOption extends java.lang.ObjectPIM HELLO option.
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_GENIDstatic shortDEFAULT_HOLDTIMEstatic shortDEFAULT_OVERRIDEINTERVALstatic intDEFAULT_PRIORITYstatic shortDEFAULT_PRUNEDELAYstatic shortGENID_LENGTHstatic shortHOLDTIME_LENGTHstatic intMINIMUM_OPTION_LEN_BYTESstatic shortOPT_ADDRLISTstatic shortOPT_GENIDstatic shortOPT_HOLDTIMEstatic shortOPT_PRIORITYstatic shortOPT_PRUNEDELAYstatic shortPRIORITY_LENGTHstatic shortPRUNEDELAY_LENGTH
-
Constructor Summary
Constructors Constructor Description PIMHelloOption()Constructs a new hello option with no fields set.PIMHelloOption(short type)Set a PIM Hello option by type.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PIMHelloOptioncreate(short type, short length, java.nio.ByteBuffer value)Creates a new PIM Hello option with the specified values.static PIMHelloOptioncreateGenID(int genId)Creates a new generation ID option with a particular generation ID.static PIMHelloOptioncreateHoldTime(short holdTime)Creates a new hold time option.static PIMHelloOptioncreatePriority(int priority)Creates a new priority option.static PIMHelloOptioncreatePruneDelay(short propagationDelay, short overrideInterval)Creates a new LAN Prune Delay option.static PIMHelloOptiondeserialize(java.nio.ByteBuffer bb)shortgetOptLength()shortgetOptType()byte[]getValue()byte[]serialize()voidsetOptLength(short len)voidsetOptType(short type)voidsetValue(byte[] value)voidsetValue(java.nio.ByteBuffer bb)java.lang.StringtoString()
-
-
-
Field Detail
-
OPT_HOLDTIME
public static final short OPT_HOLDTIME
- See Also:
- Constant Field Values
-
HOLDTIME_LENGTH
public static final short HOLDTIME_LENGTH
- See Also:
- Constant Field Values
-
DEFAULT_HOLDTIME
public static final short DEFAULT_HOLDTIME
- See Also:
- Constant Field Values
-
OPT_PRUNEDELAY
public static final short OPT_PRUNEDELAY
- See Also:
- Constant Field Values
-
PRUNEDELAY_LENGTH
public static final short PRUNEDELAY_LENGTH
- See Also:
- Constant Field Values
-
DEFAULT_PRUNEDELAY
public static final short DEFAULT_PRUNEDELAY
- See Also:
- Constant Field Values
-
DEFAULT_OVERRIDEINTERVAL
public static final short DEFAULT_OVERRIDEINTERVAL
- See Also:
- Constant Field Values
-
OPT_PRIORITY
public static final short OPT_PRIORITY
- See Also:
- Constant Field Values
-
PRIORITY_LENGTH
public static final short PRIORITY_LENGTH
- See Also:
- Constant Field Values
-
DEFAULT_PRIORITY
public static final int DEFAULT_PRIORITY
- See Also:
- Constant Field Values
-
OPT_GENID
public static final short OPT_GENID
- See Also:
- Constant Field Values
-
GENID_LENGTH
public static final short GENID_LENGTH
- See Also:
- Constant Field Values
-
DEFAULT_GENID
public static final int DEFAULT_GENID
- See Also:
- Constant Field Values
-
OPT_ADDRLIST
public static final short OPT_ADDRLIST
- See Also:
- Constant Field Values
-
MINIMUM_OPTION_LEN_BYTES
public static final int MINIMUM_OPTION_LEN_BYTES
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PIMHelloOption
public PIMHelloOption()
Constructs a new hello option with no fields set.
-
PIMHelloOption
public PIMHelloOption(short type)
Set a PIM Hello option by type. The length and default value of the type will be auto filled in by default.- Parameters:
type- hello option type
-
-
Method Detail
-
setOptType
public void setOptType(short type)
-
getOptType
public short getOptType()
-
setOptLength
public void setOptLength(short len)
-
getOptLength
public short getOptLength()
-
setValue
public void setValue(java.nio.ByteBuffer bb)
-
setValue
public void setValue(byte[] value)
-
getValue
public byte[] getValue()
-
create
public static PIMHelloOption create(short type, short length, java.nio.ByteBuffer value)
Creates a new PIM Hello option with the specified values.- Parameters:
type- hello option typelength- option lengthvalue- option value- Returns:
- new PIM Hello option
-
createPriority
public static PIMHelloOption createPriority(int priority)
Creates a new priority option.- Parameters:
priority- priority- Returns:
- priority option
-
createHoldTime
public static PIMHelloOption createHoldTime(short holdTime)
Creates a new hold time option.- Parameters:
holdTime- hold time- Returns:
- hold time option
-
createGenID
public static PIMHelloOption createGenID(int genId)
Creates a new generation ID option with a particular generation ID.- Parameters:
genId- generation ID value- Returns:
- generation ID option
-
createPruneDelay
public static PIMHelloOption createPruneDelay(short propagationDelay, short overrideInterval)
Creates a new LAN Prune Delay option.- Parameters:
propagationDelay- prune delayoverrideInterval- override interval- Returns:
- prune delay option
-
deserialize
public static PIMHelloOption deserialize(java.nio.ByteBuffer bb) throws DeserializationException
- Throws:
DeserializationException
-
serialize
public byte[] serialize()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-