Class Dhcp6IaPrefixOption

  • All Implemented Interfaces:
    IPacket

    public final class Dhcp6IaPrefixOption
    extends Dhcp6Option
    IA Address option for DHCPv6. Based on RFC-3633.
    • Constructor Detail

      • Dhcp6IaPrefixOption

        public Dhcp6IaPrefixOption()
    • Method Detail

      • getCode

        public short getCode()
        Description copied from class: Dhcp6Option
        Gets the code of this option.
        Overrides:
        getCode in class Dhcp6Option
        Returns:
        the code
      • getLength

        public short getLength()
        Description copied from class: Dhcp6Option
        Gets the length of this option.
        Overrides:
        getLength in class Dhcp6Option
        Returns:
        the length of this option
      • setIp6Prefix

        public void setIp6Prefix​(Ip6Address ip6Prefix)
        Sets IPv6 prefix.
        Parameters:
        ip6Prefix - the IPv6 prefix
      • setPrefixLength

        public void setPrefixLength​(byte prefixLength)
        Sets prefix length.
        Parameters:
        prefixLength - the prefix length
      • setPreferredLifetime

        public void setPreferredLifetime​(int preferredLifetime)
        Sets preferred lifetime.
        Parameters:
        preferredLifetime - the preferred lifetime
      • setValidLifetime

        public void setValidLifetime​(int validLifetime)
        Sets valid lifetime.
        Parameters:
        validLifetime - the valid lifetime
      • setOptions

        public void setOptions​(IPacket options)
        Sets options data.
        Parameters:
        options - the options data
      • getIp6Prefix

        public Ip6Address getIp6Prefix()
        Gets IPv6 address.
        Returns:
        the IPv6 address
      • getPrefixLength

        public byte getPrefixLength()
        Gets prefix length.
        Returns:
        the prefix length
      • getPreferredLifetime

        public int getPreferredLifetime()
        Gets preferred lifetime.
        Returns:
        the preferred lifetime
      • getValidLifetime

        public int getValidLifetime()
        Gets valid lifetime.
        Returns:
        the valid lifetime
      • getOptions

        public IPacket getOptions()
        Gets options of IA Address option.
        Returns:
        the options data
      • serialize

        public byte[] serialize()
        Description copied from interface: IPacket
        Sets all payloads parent packet if applicable, then serializes this packet and all payloads.
        Specified by:
        serialize in interface IPacket
        Overrides:
        serialize in class Dhcp6Option
        Returns:
        a byte[] containing this packet and payloads