public class BaseOptions extends BasePacket implements IExtensionHeader
Modifier and Type | Field and Description |
---|---|
static byte |
FIXED_HEADER_LENGTH |
static byte |
FIXED_OPTIONS_LENGTH |
protected byte |
headerExtLength |
static byte |
LENGTH_UNIT |
protected byte |
nextHeader |
protected byte[] |
options |
protected byte |
type |
parent, payload
Constructor and Description |
---|
BaseOptions() |
Modifier and Type | Method and Description |
---|---|
static Deserializer<BaseOptions> |
deserializer()
Deserializer function for IPv6 base options.
|
boolean |
equals(Object obj) |
byte |
getHeaderExtLength()
Gets the extension length of this header.
|
byte |
getNextHeader()
Gets the type of next header.
|
byte[] |
getOptions()
Gets the options.
|
protected byte |
getType()
Gets the type of this option.
|
int |
hashCode() |
byte[] |
serialize()
Sets all payloads parent packet if applicable, then serializes this
packet and all payloads.
|
BaseOptions |
setHeaderExtLength(byte headerExtLength)
Sets the extension length of this header.
|
BaseOptions |
setNextHeader(byte nextHeader)
Sets the type of next header.
|
BaseOptions |
setOptions(byte[] options)
Sets the options.
|
protected BaseOptions |
setType(byte type)
Sets the type of this option.
|
String |
toString() |
clone, getParent, getPayload, resetChecksum, setParent, setPayload
public static final byte FIXED_HEADER_LENGTH
public static final byte FIXED_OPTIONS_LENGTH
public static final byte LENGTH_UNIT
protected byte nextHeader
protected byte headerExtLength
protected byte[] options
protected byte type
public byte getNextHeader()
IExtensionHeader
getNextHeader
in interface IExtensionHeader
public BaseOptions setNextHeader(byte nextHeader)
IExtensionHeader
setNextHeader
in interface IExtensionHeader
nextHeader
- the next header to setpublic byte getHeaderExtLength()
public BaseOptions setHeaderExtLength(byte headerExtLength)
headerExtLength
- the header length to setpublic byte[] getOptions()
public BaseOptions setOptions(byte[] options)
options
- the options to setprotected byte getType()
protected BaseOptions setType(byte type)
type
- the type to setpublic byte[] serialize()
IPacket
public int hashCode()
hashCode
in class BasePacket
public boolean equals(Object obj)
equals
in class BasePacket
public static Deserializer<BaseOptions> deserializer()