Package org.onlab.packet.dhcp
Class Dhcp6InterfaceIdOption
- java.lang.Object
-
- org.onlab.packet.BasePacket
-
- org.onlab.packet.dhcp.Dhcp6Option
-
- org.onlab.packet.dhcp.Dhcp6InterfaceIdOption
-
- All Implemented Interfaces:
IPacket
public final class Dhcp6InterfaceIdOption extends Dhcp6Option
Relay option for DHCPv6. Based on RFC-3315.
-
-
Field Summary
-
Fields inherited from class org.onlab.packet.dhcp.Dhcp6Option
DEFAULT_LEN, UNSIGNED_SHORT_MASK
-
Fields inherited from class org.onlab.packet.BasePacket
parent, payload
-
-
Constructor Summary
Constructors Constructor Description Dhcp6InterfaceIdOption()
Default constructor.Dhcp6InterfaceIdOption(Dhcp6Option dhcp6Option)
Constructs a DHCPv6 relay option with DHCPv6 option.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Deserializer<Dhcp6Option>
deserializer()
Gets deserializer for DHCPv6 relay option.short
getCode()
Gets the code of this option.byte[]
getData()
Gets the data of this option.byte[]
getInPort()
Gets inPort string.short
getLength()
Gets the length of this option.MacAddress
getMacAddress()
Gets Mac address.short
getVlanId()
Gets the vlan id of interface id.void
setInPort(byte[] port)
Sets inPort string.void
setMacAddress(MacAddress macAddress)
Sets MacAddress address.void
setVlanId(short vlanId)
Sets the vlan id of interface id.String
toString()
-
Methods inherited from class org.onlab.packet.dhcp.Dhcp6Option
equals, getToStringHelper, hashCode, serialize, setCode, setData, setLength
-
Methods inherited from class org.onlab.packet.BasePacket
clone, getParent, getPayload, resetChecksum, setParent, setPayload
-
-
-
-
Constructor Detail
-
Dhcp6InterfaceIdOption
public Dhcp6InterfaceIdOption()
Default constructor.
-
Dhcp6InterfaceIdOption
public Dhcp6InterfaceIdOption(Dhcp6Option dhcp6Option)
Constructs a DHCPv6 relay option with DHCPv6 option.- Parameters:
dhcp6Option
- the DHCPv6 option
-
-
Method Detail
-
getCode
public short getCode()
Description copied from class:Dhcp6Option
Gets the code of this option.- Overrides:
getCode
in classDhcp6Option
- Returns:
- the code
-
getLength
public short getLength()
Description copied from class:Dhcp6Option
Gets the length of this option.- Overrides:
getLength
in classDhcp6Option
- Returns:
- the length of this option
-
getData
public byte[] getData()
Description copied from class:Dhcp6Option
Gets the data of this option.- Overrides:
getData
in classDhcp6Option
- Returns:
- the data of this option
-
setMacAddress
public void setMacAddress(MacAddress macAddress)
Sets MacAddress address.- Parameters:
macAddress
- the client peer MacAddress
-
getMacAddress
public MacAddress getMacAddress()
Gets Mac address.- Returns:
- the client peer mac address
-
setInPort
public void setInPort(byte[] port)
Sets inPort string.- Parameters:
port
- the port from which client packet is received
-
getInPort
public byte[] getInPort()
Gets inPort string.- Returns:
- the port from which client packet is received
-
setVlanId
public void setVlanId(short vlanId)
Sets the vlan id of interface id.- Parameters:
vlanId
- the vlanid of client packet
-
getVlanId
public short getVlanId()
Gets the vlan id of interface id.- Returns:
- the vlan id
-
deserializer
public static Deserializer<Dhcp6Option> deserializer()
Gets deserializer for DHCPv6 relay option.- Returns:
- the deserializer
-
toString
public String toString()
- Overrides:
toString
in classDhcp6Option
-
-