public class DhcpRelayAgentOption extends DhcpOption
Modifier and Type | Class and Description |
---|---|
static class |
DhcpRelayAgentOption.RelayAgentInfoOptions |
code, data, DEFAULT_LEN, length, OPT_CODE_LEN, UNSIGNED_BYTE_MASK
parent, payload
Constructor and Description |
---|
DhcpRelayAgentOption() |
Modifier and Type | Method and Description |
---|---|
void |
addSubOption(DhcpOption subOption)
Adds a sub-option for this option.
|
static Deserializer<DhcpOption> |
deserializer()
Deserializer function for DHCP relay agent option.
|
boolean |
equals(java.lang.Object obj) |
DhcpOption |
getSubOption(byte code)
Gets sub-option from this option by given option code.
|
int |
hashCode() |
DhcpOption |
removeSubOption(byte code)
Removes a sub-option by given sub-option code.
|
byte[] |
serialize()
Sets all payloads parent packet if applicable, then serializes this
packet and all payloads.
|
getCode, getData, getLength, setCode, setData, setLength, toString
clone, getParent, getPayload, resetChecksum, setParent, setPayload
public byte[] serialize()
IPacket
serialize
in interface IPacket
serialize
in class DhcpOption
public static Deserializer<DhcpOption> deserializer()
public DhcpOption getSubOption(byte code)
code
- the option codepublic void addSubOption(DhcpOption subOption)
subOption
- the sub-optionpublic DhcpOption removeSubOption(byte code)
code
- the code for sub-optionpublic boolean equals(java.lang.Object obj)
equals
in class DhcpOption
public int hashCode()
hashCode
in class DhcpOption