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 classDHCP6.MsgTypeDHCPv6 message type.static classDHCP6.OptionCodeDHCPv6 option code.
-
Field Summary
Fields Modifier and Type Field Description static java.util.Set<java.lang.Byte>LEASEQUERY_MSG_TYPESstatic java.util.Set<java.lang.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.bytegetHopCount()Gets the hop count of this DHCPv6 relay message.Ip6AddressgetIp6LinkAddress()Gets IPv6 link address.Ip6AddressgetIp6PeerAddress()Gets IPv6 peer address.byte[]getLinkAddress()Gets the link address of this DHCPv6 relay message.bytegetMsgType()Gets the message type of this DHCPv6 packet.java.util.List<Dhcp6Option>getOptions()Gets options from this DHCPv6 packet.byte[]getPeerAddress()Gets the peer address of this DHCPv6 relay message.intgetTransactionId()Gets the transaction ID of this DHCPv6 packet.byte[]serialize()Sets all payloads parent packet if applicable, then serializes this packet and all payloads.voidsetHopCount(byte hopCount)Sets hop count.voidsetLinkAddress(byte[] linkAddress)Sets link address.voidsetMsgType(byte msgType)Sets message type.voidsetOptions(java.util.List<Dhcp6Option> options)Sets options.voidsetPeerAddress(byte[] peerAddress)Sets peer address.voidsetTransactionId(int transactionId)Sets transaction id.java.lang.StringtoString()-
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:IPacketSets 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 java.util.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(java.util.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
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-