Package org.onlab.packet.ipv6
Class BaseOptions
- java.lang.Object
- 
- org.onlab.packet.BasePacket
- 
- org.onlab.packet.ipv6.BaseOptions
 
 
- 
- All Implemented Interfaces:
- IPacket,- IExtensionHeader
 - Direct Known Subclasses:
- DestinationOptions,- HopByHopOptions
 
 public class BaseOptions extends BasePacket implements IExtensionHeader Base class for hop-by-hop options and destination options.
- 
- 
Field SummaryFields Modifier and Type Field Description static byteFIXED_HEADER_LENGTHstatic byteFIXED_OPTIONS_LENGTHprotected byteheaderExtLengthstatic byteLENGTH_UNITprotected bytenextHeaderprotected byte[]optionsprotected bytetype- 
Fields inherited from class org.onlab.packet.BasePacketparent, payload
 
- 
 - 
Constructor SummaryConstructors Constructor Description BaseOptions()
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Deserializer<BaseOptions>deserializer()Deserializer function for IPv6 base options.booleanequals(Object obj)bytegetHeaderExtLength()Gets the extension length of this header.bytegetNextHeader()Gets the type of next header.byte[]getOptions()Gets the options.protected bytegetType()Gets the type of this option.inthashCode()byte[]serialize()Sets all payloads parent packet if applicable, then serializes this packet and all payloads.BaseOptionssetHeaderExtLength(byte headerExtLength)Sets the extension length of this header.BaseOptionssetNextHeader(byte nextHeader)Sets the type of next header.BaseOptionssetOptions(byte[] options)Sets the options.protected BaseOptionssetType(byte type)Sets the type of this option.StringtoString()- 
Methods inherited from class org.onlab.packet.BasePacketclone, getParent, getPayload, resetChecksum, setParent, setPayload
 
- 
 
- 
- 
- 
Field Detail- 
FIXED_HEADER_LENGTHpublic static final byte FIXED_HEADER_LENGTH - See Also:
- Constant Field Values
 
 - 
FIXED_OPTIONS_LENGTHpublic static final byte FIXED_OPTIONS_LENGTH - See Also:
- Constant Field Values
 
 - 
LENGTH_UNITpublic static final byte LENGTH_UNIT - See Also:
- Constant Field Values
 
 - 
nextHeaderprotected byte nextHeader 
 - 
headerExtLengthprotected byte headerExtLength 
 - 
optionsprotected byte[] options 
 - 
typeprotected byte type 
 
- 
 - 
Method Detail- 
getNextHeaderpublic byte getNextHeader() Description copied from interface:IExtensionHeaderGets the type of next header.- Specified by:
- getNextHeaderin interface- IExtensionHeader
- Returns:
- next header
 
 - 
setNextHeaderpublic BaseOptions setNextHeader(byte nextHeader) Description copied from interface:IExtensionHeaderSets the type of next header.- Specified by:
- setNextHeaderin interface- IExtensionHeader
- Parameters:
- nextHeader- the next header to set
- Returns:
- this
 
 - 
getHeaderExtLengthpublic byte getHeaderExtLength() Gets the extension length of this header.- Returns:
- header length
 
 - 
setHeaderExtLengthpublic BaseOptions setHeaderExtLength(byte headerExtLength) Sets the extension length of this header.- Parameters:
- headerExtLength- the header length to set
- Returns:
- this
 
 - 
getOptionspublic byte[] getOptions() Gets the options.- Returns:
- the options
 
 - 
setOptionspublic BaseOptions setOptions(byte[] options) Sets the options.- Parameters:
- options- the options to set
- Returns:
- this
 
 - 
getTypeprotected byte getType() Gets the type of this option.- Returns:
- the type
 
 - 
setTypeprotected BaseOptions setType(byte type) Sets the type of this option. Must be either IPv6.PROTOCOL_HOPOPT or IPv6.PROTOCOL_DSTOPT- Parameters:
- type- the type to set
- Returns:
- this
 
 - 
serializepublic byte[] serialize() Description copied from interface:IPacketSets all payloads parent packet if applicable, then serializes this packet and all payloads.
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- BasePacket
 
 - 
equalspublic boolean equals(Object obj) - Overrides:
- equalsin class- BasePacket
 
 - 
deserializerpublic static Deserializer<BaseOptions> deserializer() Deserializer function for IPv6 base options.- Returns:
- deserializer function
 
 
- 
 
-