Class DHCP6

  • All Implemented Interfaces:
    IPacket

    public class DHCP6
    extends BasePacket
    Representation of an DHCPv6 Packet. Base on RFC-3315.
    • Field Detail

      • RELAY_MSG_TYPES

        public static final Set<Byte> RELAY_MSG_TYPES
      • LEASEQUERY_MSG_TYPES

        public static final Set<Byte> LEASEQUERY_MSG_TYPES
    • Constructor Detail

      • DHCP6

        public DHCP6()
        Creates new DHCPv6 object.
    • 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