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(java.lang.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.
|
java.lang.String |
toString() |
clone, getParent, getPayload, resetChecksum, setParent, setPayloadpublic 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()
IExtensionHeadergetNextHeader in interface IExtensionHeaderpublic BaseOptions setNextHeader(byte nextHeader)
IExtensionHeadersetNextHeader in interface IExtensionHeadernextHeader - 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()
IPacketpublic int hashCode()
hashCode in class BasePacketpublic boolean equals(java.lang.Object obj)
equals in class BasePacketpublic static Deserializer<BaseOptions> deserializer()
public java.lang.String toString()
toString in class java.lang.Object