public class DhcpOption extends BasePacket
Modifier and Type | Field and Description |
---|---|
protected byte |
code |
protected byte[] |
data |
static int |
DEFAULT_LEN |
protected byte |
length |
static int |
OPT_CODE_LEN |
protected static int |
UNSIGNED_BYTE_MASK |
parent, payload
Constructor and Description |
---|
DhcpOption() |
Modifier and Type | Method and Description |
---|---|
static Deserializer<DhcpOption> |
deserializer()
Deserializer function for DHCP option.
|
boolean |
equals(java.lang.Object obj) |
byte |
getCode() |
byte[] |
getData() |
byte |
getLength() |
int |
hashCode() |
byte[] |
serialize()
Sets all payloads parent packet if applicable, then serializes this
packet and all payloads.
|
DhcpOption |
setCode(byte code) |
DhcpOption |
setData(byte[] data) |
DhcpOption |
setLength(byte length) |
java.lang.String |
toString() |
clone, getParent, getPayload, resetChecksum, setParent, setPayload
public static final int OPT_CODE_LEN
public static final int DEFAULT_LEN
protected static final int UNSIGNED_BYTE_MASK
protected byte code
protected byte length
protected byte[] data
public byte[] serialize()
IPacket
public static Deserializer<DhcpOption> deserializer()
public byte getCode()
public DhcpOption setCode(byte code)
code
- the code to setpublic byte getLength()
public DhcpOption setLength(byte length)
length
- the length to setpublic byte[] getData()
public DhcpOption setData(byte[] data)
data
- the data to setpublic int hashCode()
hashCode
in class BasePacket
public boolean equals(java.lang.Object obj)
equals
in class BasePacket
public java.lang.String toString()
toString
in class java.lang.Object