line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::DNS::RR::CSYNC; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
30
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
45
|
|
5
|
|
|
|
|
|
|
our $VERSION = (qw$Id: CSYNC.pm 1910 2023-03-30 19:16:30Z willem $)[2]; |
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
5
|
use base qw(Net::DNS::RR); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
79
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 NAME |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
Net::DNS::RR::CSYNC - DNS CSYNC resource record |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=cut |
15
|
|
|
|
|
|
|
|
16
|
1
|
|
|
1
|
|
6
|
use integer; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
14
|
|
17
|
|
|
|
|
|
|
|
18
|
1
|
|
|
1
|
|
513
|
use Net::DNS::RR::NSEC; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
499
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub _decode_rdata { ## decode rdata from wire-format octet string |
22
|
1
|
|
|
1
|
|
2
|
my ( $self, $data, $offset ) = @_; |
23
|
|
|
|
|
|
|
|
24
|
1
|
|
|
|
|
2
|
my $limit = $offset + $self->{rdlength}; |
25
|
1
|
|
|
|
|
3
|
@{$self}{qw(soaserial flags)} = unpack "\@$offset Nn", $$data; |
|
1
|
|
|
|
|
4
|
|
26
|
1
|
|
|
|
|
1
|
$offset += 6; |
27
|
1
|
|
|
|
|
3
|
$self->{typebm} = substr $$data, $offset, $limit - $offset; |
28
|
1
|
|
|
|
|
3
|
return; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub _encode_rdata { ## encode rdata as wire-format octet string |
33
|
5
|
|
|
5
|
|
8
|
my $self = shift; |
34
|
|
|
|
|
|
|
|
35
|
5
|
|
|
|
|
8
|
return pack 'N n a*', $self->soaserial, $self->flags, $self->{typebm}; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
sub _format_rdata { ## format rdata portion of RR string. |
40
|
3
|
|
|
3
|
|
3
|
my $self = shift; |
41
|
|
|
|
|
|
|
|
42
|
3
|
|
|
|
|
6
|
my @rdata = ( $self->soaserial, $self->flags, $self->typelist ); |
43
|
3
|
|
|
|
|
20
|
return @rdata; |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
sub _parse_rdata { ## populate RR from rdata in argument list |
48
|
2
|
|
|
2
|
|
5
|
my ( $self, @argument ) = @_; |
49
|
|
|
|
|
|
|
|
50
|
2
|
|
|
|
|
6
|
$self->soaserial( shift @argument ); |
51
|
2
|
|
|
|
|
5
|
$self->flags( shift @argument ); |
52
|
2
|
|
|
|
|
7
|
$self->typelist(@argument); |
53
|
2
|
|
|
|
|
5
|
return; |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub soaserial { |
58
|
13
|
|
|
13
|
1
|
42
|
my ( $self, @value ) = @_; |
59
|
13
|
|
|
|
|
25
|
for (@value) { $self->{soaserial} = 0 + $_ } |
|
3
|
|
|
|
|
9
|
|
60
|
13
|
|
100
|
|
|
53
|
return $self->{soaserial} || 0; |
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
sub flags { |
65
|
13
|
|
|
13
|
1
|
1073
|
my ( $self, @value ) = @_; |
66
|
13
|
|
|
|
|
23
|
for (@value) { $self->{flags} = 0 + $_ } |
|
3
|
|
|
|
|
11
|
|
67
|
13
|
|
100
|
|
|
54
|
return $self->{flags} || 0; |
68
|
|
|
|
|
|
|
} |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
sub immediate { |
72
|
4
|
|
|
4
|
1
|
1039
|
my ( $self, @value ) = @_; |
73
|
4
|
|
|
|
|
9
|
for ( $self->{flags} |= 0 ) { |
74
|
4
|
100
|
|
|
|
12
|
if ( scalar @value ) { |
75
|
2
|
|
|
|
|
3
|
$_ |= 0x0001; |
76
|
2
|
100
|
|
|
|
7
|
$_ ^= 0x0001 unless shift @value; |
77
|
|
|
|
|
|
|
} |
78
|
|
|
|
|
|
|
} |
79
|
4
|
|
|
|
|
16
|
return $self->{flags} & 0x0001; |
80
|
|
|
|
|
|
|
} |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
sub soaminimum { |
84
|
4
|
|
|
4
|
1
|
635
|
my ( $self, @value ) = @_; |
85
|
4
|
|
|
|
|
9
|
for ( $self->{flags} |= 0 ) { |
86
|
4
|
100
|
|
|
|
11
|
if ( scalar @value ) { |
87
|
2
|
|
|
|
|
3
|
$_ |= 0x0002; |
88
|
2
|
100
|
|
|
|
7
|
$_ ^= 0x0002 unless shift @value; |
89
|
|
|
|
|
|
|
} |
90
|
|
|
|
|
|
|
} |
91
|
4
|
|
|
|
|
16
|
return $self->{flags} & 0x0002; |
92
|
|
|
|
|
|
|
} |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
sub typelist { |
96
|
8
|
|
|
8
|
1
|
1078
|
return &Net::DNS::RR::NSEC::typelist; |
97
|
|
|
|
|
|
|
} |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
1; |
101
|
|
|
|
|
|
|
__END__ |