line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::DNS::ToolKit; |
2
|
|
|
|
|
|
|
|
3
|
54
|
|
|
54
|
|
274820
|
use strict; |
|
54
|
|
|
|
|
108
|
|
|
54
|
|
|
|
|
2518
|
|
4
|
|
|
|
|
|
|
#use warnings; |
5
|
|
|
|
|
|
|
#use Carp; |
6
|
|
|
|
|
|
|
|
7
|
54
|
|
|
54
|
|
33458
|
use Net::DNS::Codes 0.06 qw(:RRs :constants); |
|
54
|
|
|
|
|
78112
|
|
|
54
|
|
|
|
|
69304
|
|
8
|
54
|
|
|
54
|
|
621
|
use vars qw(@ISA $VERSION @EXPORT_OK %timeX); |
|
54
|
|
|
|
|
673
|
|
|
54
|
|
|
|
|
4679
|
|
9
|
|
|
|
|
|
|
|
10
|
54
|
|
|
54
|
|
61257
|
use NetAddr::IP::Util qw(:inet); |
|
54
|
|
|
|
|
1117896
|
|
|
54
|
|
|
|
|
328
|
|
11
|
|
|
|
|
|
|
require Exporter; |
12
|
|
|
|
|
|
|
require DynaLoader; |
13
|
54
|
|
|
54
|
|
26621
|
use AutoLoader qw(AUTOLOAD); |
|
54
|
|
|
|
|
1357
|
|
|
54
|
|
|
|
|
396
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
@ISA = qw(Exporter DynaLoader); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
$VERSION = do { my @r = (q$Revision: 0.48 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
@EXPORT_OK = qw( |
20
|
|
|
|
|
|
|
get1char |
21
|
|
|
|
|
|
|
get16 |
22
|
|
|
|
|
|
|
get32 |
23
|
|
|
|
|
|
|
put1char |
24
|
|
|
|
|
|
|
put16 |
25
|
|
|
|
|
|
|
put32 |
26
|
|
|
|
|
|
|
getIPv4 |
27
|
|
|
|
|
|
|
putIPv4 |
28
|
|
|
|
|
|
|
getIPv6 |
29
|
|
|
|
|
|
|
putIPv6 |
30
|
|
|
|
|
|
|
getstring |
31
|
|
|
|
|
|
|
putstring |
32
|
|
|
|
|
|
|
dn_comp |
33
|
|
|
|
|
|
|
dn_expand |
34
|
|
|
|
|
|
|
parse_char |
35
|
|
|
|
|
|
|
gethead |
36
|
|
|
|
|
|
|
newhead |
37
|
|
|
|
|
|
|
getflags |
38
|
|
|
|
|
|
|
putflags |
39
|
|
|
|
|
|
|
get_qdcount |
40
|
|
|
|
|
|
|
get_ancount |
41
|
|
|
|
|
|
|
get_nscount |
42
|
|
|
|
|
|
|
get_arcount |
43
|
|
|
|
|
|
|
put_qdcount |
44
|
|
|
|
|
|
|
put_ancount |
45
|
|
|
|
|
|
|
put_nscount |
46
|
|
|
|
|
|
|
put_arcount |
47
|
|
|
|
|
|
|
inet_aton |
48
|
|
|
|
|
|
|
inet_ntoa |
49
|
|
|
|
|
|
|
ipv6_aton |
50
|
|
|
|
|
|
|
ipv6_n2x |
51
|
|
|
|
|
|
|
ipv6_n2d |
52
|
|
|
|
|
|
|
sec2time |
53
|
|
|
|
|
|
|
ttlAlpha2Num |
54
|
|
|
|
|
|
|
collapse |
55
|
|
|
|
|
|
|
strip |
56
|
|
|
|
|
|
|
get_ns |
57
|
|
|
|
|
|
|
gettimeofday |
58
|
|
|
|
|
|
|
); |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
## stuff for sec2time, ttlAlpha2Num |
61
|
|
|
|
|
|
|
%timeX = ( # multipliers |
62
|
|
|
|
|
|
|
's' => 1, # seconds |
63
|
|
|
|
|
|
|
'm' => 60, # minutes |
64
|
|
|
|
|
|
|
'h' => 60 * 60, # hours |
65
|
|
|
|
|
|
|
'd' => 24 * 60 * 60, # days |
66
|
|
|
|
|
|
|
'w' => 7 * 24 * 60 * 60, # weeks |
67
|
|
|
|
|
|
|
); |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
#sub AUTOLOAD { |
70
|
|
|
|
|
|
|
# # This AUTOLOAD is used to 'autoload' constants from the constant() |
71
|
|
|
|
|
|
|
# # XS function. If a constant is not found then control is passed |
72
|
|
|
|
|
|
|
# # to the AUTOLOAD in AutoLoader. |
73
|
|
|
|
|
|
|
# |
74
|
|
|
|
|
|
|
# my $constname; |
75
|
|
|
|
|
|
|
# our $AUTOLOAD; |
76
|
|
|
|
|
|
|
# ($constname = $AUTOLOAD) =~ s/.*:://; |
77
|
|
|
|
|
|
|
# croak "& not defined" if $constname eq 'constant'; |
78
|
|
|
|
|
|
|
# my $val = constant($constname, @_ ? $_[0] : 0); |
79
|
|
|
|
|
|
|
# if ($! != 0) { |
80
|
|
|
|
|
|
|
# if ($! =~ /Invalid/ || $!{EINVAL}) { |
81
|
|
|
|
|
|
|
# $AutoLoader::AUTOLOAD = $AUTOLOAD; |
82
|
|
|
|
|
|
|
# goto &AutoLoader::AUTOLOAD; |
83
|
|
|
|
|
|
|
# } |
84
|
|
|
|
|
|
|
# else { |
85
|
|
|
|
|
|
|
# croak "Your vendor has not defined CTest macro $constname"; |
86
|
|
|
|
|
|
|
# } |
87
|
|
|
|
|
|
|
# } |
88
|
|
|
|
|
|
|
# { |
89
|
|
|
|
|
|
|
# no strict 'refs'; |
90
|
|
|
|
|
|
|
# # Fixed between 5.005_53 and 5.005_61 |
91
|
|
|
|
|
|
|
# if ($] >= 5.00561) { |
92
|
|
|
|
|
|
|
# *$AUTOLOAD = sub () { $val }; |
93
|
|
|
|
|
|
|
# } |
94
|
|
|
|
|
|
|
# else { |
95
|
|
|
|
|
|
|
# *$AUTOLOAD = sub { $val }; |
96
|
|
|
|
|
|
|
# } |
97
|
|
|
|
|
|
|
# } |
98
|
|
|
|
|
|
|
# goto &$AUTOLOAD; |
99
|
|
|
|
|
|
|
#} |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
bootstrap Net::DNS::ToolKit $VERSION; |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
# Preloaded methods go here. |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
# Autoload methods go after =cut, and are processed by the autosplit program. |
106
|
|
|
|
|
|
|
|
107
|
0
|
|
|
0
|
|
0
|
sub DESTROY {} |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
1; |
110
|
|
|
|
|
|
|
__END__ |