public class Dhcp6Option extends BasePacket
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_LEN |
protected static int |
UNSIGNED_SHORT_MASK |
parent, payload
Constructor and Description |
---|
Dhcp6Option()
Default constructor.
|
Dhcp6Option(Dhcp6Option dhcp6Option)
Constructs a DHCPv6 option based on information from other DHCPv6 option.
|
Modifier and Type | Method and Description |
---|---|
static Deserializer<Dhcp6Option> |
deserializer()
Gets deserializer of DHCPv6 option.
|
boolean |
equals(java.lang.Object obj) |
short |
getCode()
Gets the code of this option.
|
byte[] |
getData()
Gets the data of this option.
|
short |
getLength()
Gets the length of this option.
|
protected com.google.common.base.MoreObjects.ToStringHelper |
getToStringHelper() |
int |
hashCode() |
byte[] |
serialize()
Sets all payloads parent packet if applicable, then serializes this
packet and all payloads.
|
void |
setCode(short code)
Sets the code of this option.
|
void |
setData(byte[] data)
Sets the data of this option.
|
void |
setLength(short length)
Sets length of this option.
|
java.lang.String |
toString() |
clone, getParent, getPayload, resetChecksum, setParent, setPayload
public static final int DEFAULT_LEN
protected static final int UNSIGNED_SHORT_MASK
public Dhcp6Option()
public Dhcp6Option(Dhcp6Option dhcp6Option)
dhcp6Option
- other DHCPv6 optionpublic void setCode(short code)
code
- the code to setpublic void setData(byte[] data)
data
- the data to setpublic void setLength(short length)
length
- the length to setpublic short getCode()
public short getLength()
public byte[] getData()
public static Deserializer<Dhcp6Option> deserializer()
public byte[] serialize()
IPacket
protected com.google.common.base.MoreObjects.ToStringHelper getToStringHelper()
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class BasePacket
public boolean equals(java.lang.Object obj)
equals
in class BasePacket