The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Fsdb::Support::IPv6 - ipv6-parsing helpers

SYNOPSIS

use Fsdb::Support::IPv6;

ipv6_zeroize

$ipv6_zeroied = Fsdb::Support::IPv6::ipv6_zeroize('1:0002:3:4::');
# result is 1:2:3:4:0:0:0:0

Normalize an IPv6 address so it has all hextets present, with no leading zeros.

ipv6_normalize

$ipv6_normal = Fsdb::Support::IPv6::ipv6_normalize('1:0002::7:0:00:8');
# result is 1:2:0:0:7:0:0:8

Given an IPv6 address, maybe with some fields 0 or leading zero, normalize it to remove leading zeros and with the leftmost, longest run of zeros replaced with ::.

_test_zero_fill

Internal testing.

_test_zero_remove

Internal testing.

_test_both

Internal testing.

_test_ipv6

Internal testing.