line |
true |
false |
branch |
44
|
1 |
1 |
if ($HAS_SOCKET) { } |
65
|
7 |
7 |
if ref $_[0] |
68
|
0 |
14 |
unless defined $value |
69
|
10 |
4 |
$value =~ /:/ ? : |
73
|
14 |
32 |
if ref $_[0] |
76
|
23 |
23 |
unless _fast_is_ipv4_packed($value) |
86
|
0 |
796 |
unless defined $value |
87
|
18 |
778 |
if $value =~ /\0/ |
92
|
7 |
7 |
if ref $_[0] |
99
|
14 |
792 |
if ref $_[0] |
102
|
0 |
806 |
unless defined $value |
105
|
319 |
487 |
unless @octets == 4 |
107
|
18 |
1786 |
if $_ < 0 or $_ > 255 |
108
|
36 |
1750 |
if $_ =~ /^0\d{1,2}$/ |
115
|
28 |
38 |
if ref $_[0] |
118
|
30 |
36 |
unless _fast_is_ipv6_packed($value) |
128
|
0 |
1538 |
unless defined $value |
129
|
28 |
1510 |
if $value =~ /\0/ |
130
|
26 |
1484 |
if $value =~ /0[[:xdigit:]]{4}/ |
141
|
28 |
1512 |
if ref $_[0] |
144
|
0 |
1540 |
unless defined $value |
146
|
26 |
1514 |
if $value eq "::" |
147
|
392 |
1122 |
unless $value =~ /^$ipv6_re$/ |
162
|
0 |
28 |
if ref $_[0] |
166
|
0 |
28 |
unless defined $value |
169
|
2 |
26 |
unless defined $ip |
173
|
10 |
16 |
if ($network eq 'default' or $network =~ /^$ip_re$/ or $network =~ m[^$ip_re/\d\d?$]) { } |
|
16 |
0 |
elsif (not &blessed($network) && $network->isa('NetAddr::IP')) { } |
177
|
0 |
10 |
unless $network = "NetAddr::IP"->new($network) |
181
|
4 |
12 |
if ($network =~ /^($ip_re)[:\-]($ip_re)$/) { } |
|
2 |
10 |
elsif ($network =~ /^($ip_re)\#($ip_re)$/) { } |
|
4 |
6 |
elsif ($network =~ m[^($partial_ip_re)/(\d\d?)$]) { } |
|
6 |
0 |
elsif ($network =~ /^$partial_ip_re$/) { } |
184
|
0 |
4 |
unless my $bits = _netmask_to_bits($netmask) |
192
|
0 |
2 |
unless my $bits = _hostmask_to_bits($hostmask) |
214
|
6 |
0 |
if ($octets < 4) |
220
|
16 |
0 |
if ($orig ne $network) |
226
|
0 |
16 |
unless $network = "NetAddr::IP"->new($network) |
229
|
0 |
26 |
unless my $netaddr_ip = "NetAddr::IP"->new($ip) |
231
|
24 |
2 |
if $network->contains($netaddr_ip) |
329
|
14 |
2 |
if $warned_at{$warning}{$caller_info}++ |
413
|
1 |
1 |
$ip_number == 4 ? : |
414
|
1 |
1 |
$ip_number == 4 ? : |
424
|
3 |
15 |
ref $networks->{$type}{'networks'} ? : |
429
|
16 |
2 |
unless ($networks->{$type}{'subnet_of'}) |
436
|
77 |
77 |
if ref $_[0] |
|
0 |
154 |
unless defined $value |
|
40 |
114 |
unless defined $ip |
|
16 |
98 |
if $net->contains($netaddr_ip) |
|
49 |
49 |
if ref $_[0] |
|
0 |
98 |
unless defined $value |
|
24 |
74 |
unless defined $ip |
|
6 |
68 |
if $net->contains($netaddr_ip) |
|
30 |
30 |
if ref $_[0] |
|
0 |
60 |
unless defined $value |
|
20 |
40 |
unless defined $ip |
|
6 |
108 |
if $net->contains($netaddr_ip) |
|
75 |
75 |
if ref $_[0] |
|
0 |
150 |
unless defined $value |
|
36 |
114 |
unless defined $ip |
|
16 |
98 |
if $net->contains($netaddr_ip) |
|
30 |
30 |
if ref $_[0] |
|
0 |
60 |
unless defined $value |
|
20 |
40 |
unless defined $ip |
|
14 |
166 |
if $net->contains($netaddr_ip) |
|
51 |
51 |
if ref $_[0] |
|
0 |
102 |
unless defined $value |
|
24 |
78 |
unless defined $ip |
|
4 |
74 |
if $net->contains($netaddr_ip) |
|
51 |
51 |
if ref $_[0] |
|
0 |
102 |
unless defined $value |
|
24 |
78 |
unless defined $ip |
|
8 |
70 |
if $net->contains($netaddr_ip) |
|
77 |
77 |
if ref $_[0] |
|
0 |
154 |
unless defined $value |
|
40 |
114 |
unless defined $ip |
|
4 |
110 |
if $net->contains($netaddr_ip) |
|
51 |
51 |
if ref $_[0] |
|
0 |
102 |
unless defined $value |
|
24 |
78 |
unless defined $ip |
|
18 |
60 |
if $net->contains($netaddr_ip) |
|
51 |
51 |
if ref $_[0] |
|
0 |
102 |
unless defined $value |
|
24 |
78 |
unless defined $ip |
|
6 |
72 |
if $net->contains($netaddr_ip) |
|
57 |
57 |
if ref $_[0] |
|
0 |
114 |
unless defined $value |
|
56 |
58 |
unless defined $ip |
|
4 |
54 |
if $net->contains($netaddr_ip) |
|
51 |
51 |
if ref $_[0] |
|
0 |
102 |
unless defined $value |
|
24 |
78 |
unless defined $ip |
|
6 |
72 |
if $net->contains($netaddr_ip) |
|
77 |
77 |
if ref $_[0] |
|
0 |
154 |
unless defined $value |
|
40 |
114 |
unless defined $ip |
|
12 |
102 |
if $net->contains($netaddr_ip) |
|
57 |
57 |
if ref $_[0] |
|
0 |
114 |
unless defined $value |
|
56 |
58 |
unless defined $ip |
|
4 |
54 |
if $net->contains($netaddr_ip) |
|
51 |
51 |
if ref $_[0] |
|
0 |
102 |
unless defined $value |
|
24 |
78 |
unless defined $ip |
|
6 |
72 |
if $net->contains($netaddr_ip) |
|
30 |
30 |
if ref $_[0] |
|
0 |
60 |
unless defined $value |
|
20 |
40 |
unless defined $ip |
|
2 |
38 |
if $net->contains($netaddr_ip) |
|
57 |
57 |
if ref $_[0] |
|
0 |
114 |
unless defined $value |
|
56 |
58 |
unless defined $ip |
|
4 |
54 |
if $net->contains($netaddr_ip) |
|
57 |
57 |
if ref $_[0] |
|
0 |
114 |
unless defined $value |
|
56 |
58 |
unless defined $ip |
|
12 |
150 |
if $net->contains($netaddr_ip) |
453
|
0 |
18 |
if $@ |
463
|
75 |
75 |
if ref $_[0] |
|
0 |
150 |
unless defined $value |
|
36 |
114 |
unless defined $ip |
|
90 |
630 |
if $net->contains($netaddr_ip) |
|
57 |
57 |
if ref $_[0] |
|
0 |
114 |
unless defined $value |
|
56 |
58 |
unless defined $ip |
|
46 |
514 |
if $net->contains($netaddr_ip) |
481
|
0 |
2 |
if $@ |
495
|
1 |
1 |
$ip_number == 4 ? : |
505
|
3 |
15 |
ref $networks->{$type}{'networks'} ? : |
510
|
16 |
2 |
unless ($networks->{$type}{'subnet_of'}) |
517
|
51 |
51 |
if ref $_[0] |
|
24 |
78 |
unless defined $ip |
|
6 |
72 |
if (($net->[1] & $ip) eq $net->[0]) |
|
57 |
57 |
if ref $_[0] |
|
56 |
58 |
unless defined $ip |
|
12 |
150 |
if (($net->[1] & $ip) eq $net->[0]) |
|
51 |
51 |
if ref $_[0] |
|
24 |
78 |
unless defined $ip |
|
6 |
72 |
if (($net->[1] & $ip) eq $net->[0]) |
|
30 |
30 |
if ref $_[0] |
|
20 |
40 |
unless defined $ip |
|
2 |
38 |
if (($net->[1] & $ip) eq $net->[0]) |
|
51 |
51 |
if ref $_[0] |
|
24 |
78 |
unless defined $ip |
|
6 |
72 |
if (($net->[1] & $ip) eq $net->[0]) |
|
57 |
57 |
if ref $_[0] |
|
56 |
58 |
unless defined $ip |
|
4 |
54 |
if (($net->[1] & $ip) eq $net->[0]) |
|
30 |
30 |
if ref $_[0] |
|
20 |
40 |
unless defined $ip |
|
14 |
166 |
if (($net->[1] & $ip) eq $net->[0]) |
|
49 |
49 |
if ref $_[0] |
|
24 |
74 |
unless defined $ip |
|
6 |
68 |
if (($net->[1] & $ip) eq $net->[0]) |
|
77 |
77 |
if ref $_[0] |
|
40 |
114 |
unless defined $ip |
|
16 |
98 |
if (($net->[1] & $ip) eq $net->[0]) |
|
77 |
77 |
if ref $_[0] |
|
40 |
114 |
unless defined $ip |
|
4 |
110 |
if (($net->[1] & $ip) eq $net->[0]) |
|
51 |
51 |
if ref $_[0] |
|
24 |
78 |
unless defined $ip |
|
18 |
60 |
if (($net->[1] & $ip) eq $net->[0]) |
|
77 |
77 |
if ref $_[0] |
|
40 |
114 |
unless defined $ip |
|
12 |
102 |
if (($net->[1] & $ip) eq $net->[0]) |
|
51 |
51 |
if ref $_[0] |
|
24 |
78 |
unless defined $ip |
|
4 |
74 |
if (($net->[1] & $ip) eq $net->[0]) |
|
57 |
57 |
if ref $_[0] |
|
56 |
58 |
unless defined $ip |
|
4 |
54 |
if (($net->[1] & $ip) eq $net->[0]) |
|
57 |
57 |
if ref $_[0] |
|
56 |
58 |
unless defined $ip |
|
4 |
54 |
if (($net->[1] & $ip) eq $net->[0]) |
|
51 |
51 |
if ref $_[0] |
|
24 |
78 |
unless defined $ip |
|
8 |
70 |
if (($net->[1] & $ip) eq $net->[0]) |
|
75 |
75 |
if ref $_[0] |
|
36 |
114 |
unless defined $ip |
|
16 |
98 |
if (($net->[1] & $ip) eq $net->[0]) |
|
30 |
30 |
if ref $_[0] |
|
20 |
40 |
unless defined $ip |
|
6 |
108 |
if (($net->[1] & $ip) eq $net->[0]) |
535
|
0 |
18 |
if $@ |
545
|
75 |
75 |
if ref $_[0] |
|
36 |
114 |
unless defined $ip |
|
90 |
560 |
if ($net->[1] & $ip) eq $net->[0] |
|
57 |
57 |
if ref $_[0] |
|
56 |
58 |
unless defined $ip |
|
46 |
506 |
if ($net->[1] & $ip) eq $net->[0] |
562
|
0 |
2 |
if $@ |
588
|
15 |
11 |
$family == 2 ? : |
600
|
96 |
12 |
unless is_private_ipv4(@_) |
|
104 |
4 |
unless is_loopback_ipv4(@_) |
|
104 |
4 |
unless is_linklocal_ipv4(@_) |
|
96 |
12 |
unless is_public_ipv4(@_) |
|
104 |
4 |
unless is_multicast_ipv4(@_) |