Package org.onlab.packet.pim
Class PIMHelloOption
- java.lang.Object
-
- org.onlab.packet.pim.PIMHelloOption
-
public class PIMHelloOption extends Object
PIM HELLO option.
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_GENID
static short
DEFAULT_HOLDTIME
static short
DEFAULT_OVERRIDEINTERVAL
static int
DEFAULT_PRIORITY
static short
DEFAULT_PRUNEDELAY
static short
GENID_LENGTH
static short
HOLDTIME_LENGTH
static int
MINIMUM_OPTION_LEN_BYTES
static short
OPT_ADDRLIST
static short
OPT_GENID
static short
OPT_HOLDTIME
static short
OPT_PRIORITY
static short
OPT_PRUNEDELAY
static short
PRIORITY_LENGTH
static short
PRUNEDELAY_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 PIMHelloOption
create(short type, short length, ByteBuffer value)
Creates a new PIM Hello option with the specified values.static PIMHelloOption
createGenID(int genId)
Creates a new generation ID option with a particular generation ID.static PIMHelloOption
createHoldTime(short holdTime)
Creates a new hold time option.static PIMHelloOption
createPriority(int priority)
Creates a new priority option.static PIMHelloOption
createPruneDelay(short propagationDelay, short overrideInterval)
Creates a new LAN Prune Delay option.static PIMHelloOption
deserialize(ByteBuffer bb)
short
getOptLength()
short
getOptType()
byte[]
getValue()
byte[]
serialize()
void
setOptLength(short len)
void
setOptType(short type)
void
setValue(byte[] value)
void
setValue(ByteBuffer bb)
String
toString()
-
-
-
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(ByteBuffer bb)
-
setValue
public void setValue(byte[] value)
-
getValue
public byte[] getValue()
-
create
public static PIMHelloOption create(short type, short length, 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(ByteBuffer bb) throws DeserializationException
- Throws:
DeserializationException
-
serialize
public byte[] serialize()
-
-