1Fsdb::Support::IPv6(3)User Contributed Perl DocumentationFsdb::Support::IPv6(3)
2
3
4

NAME

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

SYNOPSIS

9           use Fsdb::Support::IPv6;
10
11   ipv6_zeroize
12           $ipv6_zeroized = Fsdb::Support::IPv6::ipv6_zeroize('1:0002:3:4::');
13           # result is 1:2:3:4:0:0:0:0
14
15       Normalize an IPv6 address so it has all hextets present, with no
16       leading zeros.
17
18       Also treats strings of hex digits without colons as IPv6 prefixes.
19
20   ipv6_fullhex
21           $ipv6_fullhex = Fsdb::Support::IPv6::ipv6_full('1:0002:3:4::');
22           # result is 0001000200030004000000000000000
23
24       Rewrite an IPv6 address as a full, 128-bit, base-16 number.
25
26   ipv6_normalize
27           $ipv6_normal = Fsdb::Support::IPv6::ipv6_normalize('1:0002::7:0:00:8');
28           # result is 1:2::7:0:0:8
29
30       Convert an IPv6 address to IETF normal form.  The input maybe has some
31       fields 0 or leading zero, or :: in a non-standard place.  Normalize it
32       to remove leading zeros and replace the leftmost, longest run of zeros
33       with ::.
34
35       Also treats strings of hex digits without colons as IPv6 prefixes.
36
37   ip_fullhex_to_normal
38           $ip_normal = Fsdb::Support::IPv6::ip_fullhex_to_normal('20010db8000300040005000600070008');
39           # result is 2001:db8:3:4:5:6:7:8
40
41           $ip_normal = Fsdb::Support::IPv6::ip_fullhex_to_normal('c0000201');
42           # result is 192.0.2.1
43
44       Convert an IPv6 address to IETF normal form.  The input maybe has some
45       fields 0 or leading zero, or :: in a non-standard place.  Normalize it
46       to remove leading zeros and replace the leftmost, longest run of zeros
47       with ::.
48
49       Also treats strings of hex digits without colons as IPv6 prefixes.
50
51   _test_zero_fill
52       Internal testing.
53
54   _test_zero_remove
55       Internal testing.
56
57   _test_fullhex
58       Internal testing.
59
60   _test_fullhex_to_normal
61       Internal testing.
62
63   _test_both
64       Internal testing.
65
66   _test_ipv6
67       Internal testing.
68
69
70
71perl v5.38.0                      2023-07-20            Fsdb::Support::IPv6(3)
Impressum