Package org.onlab.packet.pim
Class PIMHello
- java.lang.Object
-
- org.onlab.packet.BasePacket
-
- org.onlab.packet.pim.PIMHello
-
- All Implemented Interfaces:
IPacket
public class PIMHello extends BasePacket
-
-
Field Summary
-
Fields inherited from class org.onlab.packet.BasePacket
parent, payload
-
-
Constructor Summary
Constructors Constructor Description PIMHello()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addOption(PIMHelloOption opt)
Add a PIM Hello option to this hello message.void
createDefaultOptions()
Create a PIM Hello packet with the most common hello options and default values.IPacket
deserialize(byte[] data, int offset, int length)
XXX: This is deprecated, DO NOT USE, use the deserializer() function instead.static Deserializer<PIMHello>
deserializer()
Deserialize this hello message.java.util.Map<java.lang.Short,PIMHelloOption>
getOptions()
byte[]
serialize()
Sets all payloads parent packet if applicable, then serializes this packet and all payloads.java.lang.String
toString()
-
Methods inherited from class org.onlab.packet.BasePacket
clone, equals, getParent, getPayload, hashCode, resetChecksum, setParent, setPayload
-
-
-
-
Method Detail
-
createDefaultOptions
public void createDefaultOptions()
Create a PIM Hello packet with the most common hello options and default values. The values of any options can be easily changed by modifying the value of the option with the desired change.
-
addOption
public void addOption(PIMHelloOption opt)
Add a PIM Hello option to this hello message. Note- Parameters:
opt
- the PIM Hello option we are adding
-
getOptions
public java.util.Map<java.lang.Short,PIMHelloOption> getOptions()
-
serialize
public byte[] serialize()
Sets all payloads parent packet if applicable, then serializes this packet and all payloads.- Returns:
- a byte[] containing this packet and payloads
-
deserialize
public IPacket deserialize(byte[] data, int offset, int length)
XXX: This is deprecated, DO NOT USE, use the deserializer() function instead.- Parameters:
data
- bytes to deserializeoffset
- offset to start deserializing fromlength
- length of the data to deserialize- Returns:
- nothing
-
deserializer
public static Deserializer<PIMHello> deserializer()
Deserialize this hello message.- Returns:
- a deserialized hello message
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-