NAME

Net::DHCPv6::Option::IAPrefix - IA Prefix option (code 26) — prefix delegation sub-option

VERSION

version 0.001

SYNOPSIS

my $prefix = "\x20\x01\x0d\xb8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00";
my $iaprefix = Net::DHCPv6::Option::IAPrefix->new(
    address            => $prefix,
    preferred_lifetime => 7200,
    valid_lifetime     => 86400,
    prefix_length      => 64,
);

DESCRIPTION

Implements the IAPREFIX option (OPTION_IAPREFIX, code 26) per RFC 8415 §21.23. A sub-option of IA_PD containing an IPv6 prefix, preferred lifetime, valid lifetime, prefix length, and sub-options.

ALPHA STATUS

ALPHA SOFTWARE. This is an early release. The interface is experimental and subject to change without notice.

METHODS

new(address => $bytes16, preferred_lifetime => $num, valid_lifetime => $num, prefix_length => $num, options => $optionlist)

Constructor. address is required. prefix_length is the number of significant bits in the prefix.

address

Returns the 16-byte IPv6 prefix address.

preferred_lifetime

Returns preferred lifetime in seconds.

valid_lifetime

Returns valid lifetime in seconds.

prefix_length

Returns the prefix length in bits.

options

Returns the internal Net::DHCPv6::OptionList of sub-options.

add_option($option)

Add a sub-option.

get_option($code)

Retrieve the first sub-option with the given code.

SEE ALSO

Net::DHCPv6::Option, Net::DHCPv6::Option::IAPD

AUTHOR

Dean Hamstead <dean@fragfest.com.au>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2026 by Dean Hamstead.

This is free software, licensed under:

The MIT (X11) License