Package org.onlab.packet
Class DHCP6
- java.lang.Object
-
- org.onlab.packet.BasePacket
-
- org.onlab.packet.DHCP6
-
- All Implemented Interfaces:
IPacket
public class DHCP6 extends BasePacket
Representation of an DHCPv6 Packet. Base on RFC-3315.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DHCP6.MsgType
DHCPv6 message type.static class
DHCP6.OptionCode
DHCPv6 option code.
-
Field Summary
Fields Modifier and Type Field Description static Set<Byte>
LEASEQUERY_MSG_TYPES
static Set<Byte>
RELAY_MSG_TYPES
-
Fields inherited from class org.onlab.packet.BasePacket
parent, payload
-
-
Constructor Summary
Constructors Constructor Description DHCP6()
Creates new DHCPv6 object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Deserializer<DHCP6>
deserializer()
Returns a deserializer for DHCPv6.byte
getHopCount()
Gets the hop count of this DHCPv6 relay message.Ip6Address
getIp6LinkAddress()
Gets IPv6 link address.Ip6Address
getIp6PeerAddress()
Gets IPv6 peer address.byte[]
getLinkAddress()
Gets the link address of this DHCPv6 relay message.byte
getMsgType()
Gets the message type of this DHCPv6 packet.List<Dhcp6Option>
getOptions()
Gets options from this DHCPv6 packet.byte[]
getPeerAddress()
Gets the peer address of this DHCPv6 relay message.int
getTransactionId()
Gets the transaction ID of this DHCPv6 packet.byte[]
serialize()
Sets all payloads parent packet if applicable, then serializes this packet and all payloads.void
setHopCount(byte hopCount)
Sets hop count.void
setLinkAddress(byte[] linkAddress)
Sets link address.void
setMsgType(byte msgType)
Sets message type.void
setOptions(List<Dhcp6Option> options)
Sets options.void
setPeerAddress(byte[] peerAddress)
Sets peer address.void
setTransactionId(int transactionId)
Sets transaction id.String
toString()
-
Methods inherited from class org.onlab.packet.BasePacket
clone, equals, getParent, getPayload, hashCode, resetChecksum, setParent, setPayload
-
-
-
-
Method Detail
-
serialize
public byte[] serialize()
Description copied from interface:IPacket
Sets all payloads parent packet if applicable, then serializes this packet and all payloads.- Returns:
- a byte[] containing this packet and payloads
-
deserializer
public static Deserializer<DHCP6> deserializer()
Returns a deserializer for DHCPv6.- Returns:
- the deserializer for DHCPv6
-
getMsgType
public byte getMsgType()
Gets the message type of this DHCPv6 packet.- Returns:
- the message type
-
getOptions
public List<Dhcp6Option> getOptions()
Gets options from this DHCPv6 packet.- Returns:
- DHCPv6 options
-
getTransactionId
public int getTransactionId()
Gets the transaction ID of this DHCPv6 packet.- Returns:
- the transaction ID
-
getHopCount
public byte getHopCount()
Gets the hop count of this DHCPv6 relay message.- Returns:
- the hop count
-
getLinkAddress
public byte[] getLinkAddress()
Gets the link address of this DHCPv6 relay message.- Returns:
- the link address
-
getIp6LinkAddress
public Ip6Address getIp6LinkAddress()
Gets IPv6 link address.- Returns:
- the IPv6 link address
-
getPeerAddress
public byte[] getPeerAddress()
Gets the peer address of this DHCPv6 relay message.- Returns:
- the link address
-
getIp6PeerAddress
public Ip6Address getIp6PeerAddress()
Gets IPv6 peer address.- Returns:
- the IPv6 peer address
-
setMsgType
public void setMsgType(byte msgType)
Sets message type.- Parameters:
msgType
- the message type
-
setOptions
public void setOptions(List<Dhcp6Option> options)
Sets options.- Parameters:
options
- the options
-
setTransactionId
public void setTransactionId(int transactionId)
Sets transaction id.- Parameters:
transactionId
- the transaction id
-
setHopCount
public void setHopCount(byte hopCount)
Sets hop count.- Parameters:
hopCount
- the hop count
-
setLinkAddress
public void setLinkAddress(byte[] linkAddress)
Sets link address.- Parameters:
linkAddress
- the link address
-
setPeerAddress
public void setPeerAddress(byte[] peerAddress)
Sets peer address.- Parameters:
peerAddress
- the peer address
-
-