Package org.onlab.packet.dhcp
Class DhcpRelayAgentOption
- java.lang.Object
- 
- org.onlab.packet.BasePacket
- 
- org.onlab.packet.dhcp.DhcpOption
- 
- org.onlab.packet.dhcp.DhcpRelayAgentOption
 
 
 
- 
- All Implemented Interfaces:
- IPacket
 
 public class DhcpRelayAgentOption extends DhcpOption Representation of DHCP relay agent option (option 82).
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classDhcpRelayAgentOption.RelayAgentInfoOptions
 - 
Field Summary- 
Fields inherited from class org.onlab.packet.dhcp.DhcpOptioncode, data, DEFAULT_LEN, length, OPT_CODE_LEN, UNSIGNED_BYTE_MASK
 - 
Fields inherited from class org.onlab.packet.BasePacketparent, payload
 
- 
 - 
Constructor SummaryConstructors Constructor Description DhcpRelayAgentOption()
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddSubOption(DhcpOption subOption)Adds a sub-option for this option.static Deserializer<DhcpOption>deserializer()Deserializer function for DHCP relay agent option.booleanequals(java.lang.Object obj)DhcpOptiongetSubOption(byte code)Gets sub-option from this option by given option code.inthashCode()DhcpOptionremoveSubOption(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.- 
Methods inherited from class org.onlab.packet.dhcp.DhcpOptiongetCode, getData, getLength, setCode, setData, setLength, toString
 - 
Methods inherited from class org.onlab.packet.BasePacketclone, getParent, getPayload, resetChecksum, setParent, setPayload
 
- 
 
- 
- 
- 
Method Detail- 
serializepublic byte[] serialize() Description copied from interface:IPacketSets all payloads parent packet if applicable, then serializes this packet and all payloads.- Specified by:
- serializein interface- IPacket
- Overrides:
- serializein class- DhcpOption
- Returns:
- a byte[] containing this packet and payloads
 
 - 
deserializerpublic static Deserializer<DhcpOption> deserializer() Deserializer function for DHCP relay agent option.- Returns:
- deserializer function
 
 - 
getSubOptionpublic DhcpOption getSubOption(byte code) Gets sub-option from this option by given option code.- Parameters:
- code- the option code
- Returns:
- sub-option of given code; null if there is no sub-option for given code
 
 - 
addSubOptionpublic void addSubOption(DhcpOption subOption) Adds a sub-option for this option.- Parameters:
- subOption- the sub-option
 
 - 
removeSubOptionpublic DhcpOption removeSubOption(byte code) Removes a sub-option by given sub-option code.- Parameters:
- code- the code for sub-option
- Returns:
- sub-option removed; null of sub-option not exists
 
 - 
equalspublic boolean equals(java.lang.Object obj) - Overrides:
- equalsin class- DhcpOption
 
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- DhcpOption
 
 
- 
 
-