NAME
Net::DHCPv6::Option::Unicast - UNICAST option (code 12) -- server IPv6 address
VERSION
version 0.003
SYNOPSIS
use Socket qw(inet_pton AF_INET6);
# Text form (auto-resolved to wire bytes)
my $opt = Net::DHCPv6::Option::Unicast->new(address => '2001:db8::1');
print $opt->address; # '2001:db8::1'
print $opt->address_raw; # 16-byte wire-format bytes
# Raw bytes from text
my $opt2 = Net::DHCPv6::Option::Unicast->new(
address_raw => inet_pton(AF_INET6, '2001:db8::1'),
);
DESCRIPTION
Carries the IPv6 address of a server to which the client should send messages unicast. See RFC 8415 §21.12.
ALPHA STATUS
ALPHA SOFTWARE. This is an early release. The interface is experimental and subject to change without notice.
METHODS
new
Constructor. Requires either address (text) or address_raw (bytes).
address
Returns the IPv6 address as a text string.
address_raw
Returns the 16-byte wire-format address.
SEE ALSO
Net::DHCPv6::Option, Net::DHCPv6::OptionList
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