line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::DNS::RR::ISDN; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
29
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
46
|
|
5
|
|
|
|
|
|
|
our $VERSION = (qw$Id: ISDN.pm 1896 2023-01-30 12:59:25Z willem $)[2]; |
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
13
|
use base qw(Net::DNS::RR); |
|
1
|
|
|
|
|
11
|
|
|
1
|
|
|
|
|
91
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 NAME |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
Net::DNS::RR::ISDN - DNS ISDN resource record |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=cut |
15
|
|
|
|
|
|
|
|
16
|
1
|
|
|
1
|
|
6
|
use integer; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
17
|
|
17
|
|
|
|
|
|
|
|
18
|
1
|
|
|
1
|
|
528
|
use Net::DNS::Text; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
483
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub _decode_rdata { ## decode rdata from wire-format octet string |
22
|
1
|
|
|
1
|
|
2
|
my ( $self, $data, $offset ) = @_; |
23
|
|
|
|
|
|
|
|
24
|
1
|
|
|
|
|
4
|
( $self->{address}, $offset ) = Net::DNS::Text->decode( $data, $offset ); |
25
|
1
|
|
|
|
|
4
|
( $self->{sa}, $offset ) = Net::DNS::Text->decode( $data, $offset ); |
26
|
1
|
|
|
|
|
3
|
return; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub _encode_rdata { ## encode rdata as wire-format octet string |
31
|
5
|
|
|
5
|
|
7
|
my $self = shift; |
32
|
|
|
|
|
|
|
|
33
|
5
|
|
|
|
|
8
|
my $address = $self->{address}; |
34
|
5
|
|
|
|
|
12
|
return join '', $address->encode, $self->{sa}->encode; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub _format_rdata { ## format rdata portion of RR string. |
39
|
2
|
|
|
2
|
|
4
|
my $self = shift; |
40
|
|
|
|
|
|
|
|
41
|
2
|
|
|
|
|
3
|
my $address = $self->{address}; |
42
|
2
|
|
|
|
|
5
|
return join ' ', $address->string, $self->{sa}->string; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
sub _parse_rdata { ## populate RR from rdata in argument list |
47
|
1
|
|
|
1
|
|
3
|
my ( $self, @argument ) = @_; |
48
|
|
|
|
|
|
|
|
49
|
1
|
|
|
|
|
3
|
$self->address( shift @argument ); |
50
|
1
|
|
|
|
|
3
|
$self->sa(@argument); |
51
|
1
|
|
|
|
|
3
|
return; |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
sub _defaults { ## specify RR attribute default values |
56
|
1
|
|
|
1
|
|
3
|
my $self = shift; |
57
|
|
|
|
|
|
|
|
58
|
1
|
|
|
|
|
2
|
$self->sa(''); |
59
|
1
|
|
|
|
|
2
|
return; |
60
|
|
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
sub address { |
64
|
6
|
|
|
6
|
1
|
17
|
my ( $self, @value ) = @_; |
65
|
6
|
|
|
|
|
10
|
for (@value) { $self->{address} = Net::DNS::Text->new($_) } |
|
2
|
|
|
|
|
4
|
|
66
|
6
|
100
|
|
|
|
23
|
return $self->{address} ? $self->{address}->value : undef; |
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
sub sa { |
71
|
5
|
|
|
5
|
1
|
909
|
my ( $self, @value ) = @_; |
72
|
5
|
|
|
|
|
8
|
for (@value) { $self->{sa} = Net::DNS::Text->new($_) } |
|
3
|
|
|
|
|
9
|
|
73
|
5
|
100
|
|
|
|
32
|
return $self->{sa} ? $self->{sa}->value : undef; |
74
|
|
|
|
|
|
|
} |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
|
77
|
2
|
|
|
2
|
1
|
539
|
sub ISDNaddress { return &address; } |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
1; |
81
|
|
|
|
|
|
|
__END__ |