line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::DNS::RR::CSYNC; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
4
|
1
|
|
|
1
|
|
4
|
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
|
|
|
|
|
85
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 NAME |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
Net::DNS::RR::CSYNC - DNS CSYNC resource record |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=cut |
15
|
|
|
|
|
|
|
|
16
|
1
|
|
|
1
|
|
5
|
use integer; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
17
|
|
17
|
|
|
|
|
|
|
|
18
|
1
|
|
|
1
|
|
585
|
use Net::DNS::RR::NSEC; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
563
|
|
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
|
|
|
|
|
3
|
|
26
|
1
|
|
|
|
|
2
|
$offset += 6; |
27
|
1
|
|
|
|
|
3
|
$self->{typebm} = substr $$data, $offset, $limit - $offset; |
28
|
1
|
|
|
|
|
2
|
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
|
|
|
|
|
10
|
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
|
|
4
|
my $self = shift; |
41
|
|
|
|
|
|
|
|
42
|
3
|
|
|
|
|
6
|
my @rdata = ( $self->soaserial, $self->flags, $self->typelist ); |
43
|
3
|
|
|
|
|
16
|
return @rdata; |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
sub _parse_rdata { ## populate RR from rdata in argument list |
48
|
2
|
|
|
2
|
|
7
|
my ( $self, @argument ) = @_; |
49
|
|
|
|
|
|
|
|
50
|
2
|
|
|
|
|
5
|
$self->soaserial( shift @argument ); |
51
|
2
|
|
|
|
|
6
|
$self->flags( shift @argument ); |
52
|
2
|
|
|
|
|
6
|
$self->typelist(@argument); |
53
|
2
|
|
|
|
|
4
|
return; |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub soaserial { |
58
|
13
|
|
|
13
|
1
|
25
|
my ( $self, @value ) = @_; |
59
|
13
|
|
|
|
|
25
|
for (@value) { $self->{soaserial} = 0 + $_ } |
|
3
|
|
|
|
|
9
|
|
60
|
13
|
|
100
|
|
|
52
|
return $self->{soaserial} || 0; |
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
sub flags { |
65
|
13
|
|
|
13
|
1
|
1086
|
my ( $self, @value ) = @_; |
66
|
13
|
|
|
|
|
18
|
for (@value) { $self->{flags} = 0 + $_ } |
|
3
|
|
|
|
|
6
|
|
67
|
13
|
|
100
|
|
|
58
|
return $self->{flags} || 0; |
68
|
|
|
|
|
|
|
} |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
sub immediate { |
72
|
4
|
|
|
4
|
1
|
1104
|
my ( $self, @value ) = @_; |
73
|
4
|
|
|
|
|
10
|
for ( $self->{flags} |= 0 ) { |
74
|
4
|
100
|
|
|
|
12
|
if ( scalar @value ) { |
75
|
2
|
|
|
|
|
2
|
$_ |= 0x0001; |
76
|
2
|
100
|
|
|
|
8
|
$_ ^= 0x0001 unless shift @value; |
77
|
|
|
|
|
|
|
} |
78
|
|
|
|
|
|
|
} |
79
|
4
|
|
|
|
|
21
|
return $self->{flags} & 0x0001; |
80
|
|
|
|
|
|
|
} |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
sub soaminimum { |
84
|
4
|
|
|
4
|
1
|
697
|
my ( $self, @value ) = @_; |
85
|
4
|
|
|
|
|
9
|
for ( $self->{flags} |= 0 ) { |
86
|
4
|
100
|
|
|
|
12
|
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
|
1034
|
return &Net::DNS::RR::NSEC::typelist; |
97
|
|
|
|
|
|
|
} |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
1; |
101
|
|
|
|
|
|
|
__END__ |