NAME
Net::DHCPv6::Packet::Relay - Base class for DHCPv6 relay messages (RelayForw/RelayReply)
VERSION
version 0.001
SYNOPSIS
my $relay = Net::DHCPv6::Packet::Relay->new(
msg_type => $RELAY_FORW,
hop_count => 0,
link_address => "\xfe\x80" . "\x00" x 14,
peer_address => "\xfe\x80" . "\x00" x 14,
);
print $relay->hop_count; # 0
print $relay->link_address; # 16 bytes
print $relay->peer_address; # 16 bytes
DESCRIPTION
Base class for RELAY-FORW and RELAY-REPLY messages (RFC 8415 §14), which have a different wire format than standard DHCPv6 messages: a 1-byte hop count, 16-byte link address, 16-byte peer address, then options. No transaction_id field.
ALPHA STATUS
ALPHA SOFTWARE. This is an early release. The interface is experimental and subject to change without notice.
CONSTRUCTORS
- new(%args)
-
Constructs a relay message. Required:
hop_count,link_address,peer_address. Optional:options(OptionList). - from_bytes($bytes)
-
Class method. Parses relay wire format: msg_type(1) + hop_count(1) + link_address(16) + peer_address(16) + options.
METHODS
- hop_count
- link_address
- peer_address
- as_bytes
-
Serializes to wire format.
ACCESSORS (inherited)
SEE ALSO
Net::DHCPv6::Packet, Net::DHCPv6::Message::RelayForw, Net::DHCPv6::Message::RelayReply
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