line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::DNS::RR::EUI48; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
28
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
44
|
|
5
|
|
|
|
|
|
|
our $VERSION = (qw$Id: EUI48.pm 1896 2023-01-30 12:59:25Z willem $)[2]; |
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
5
|
use base qw(Net::DNS::RR); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
99
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 NAME |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
Net::DNS::RR::EUI48 - DNS EUI48 resource record |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=cut |
15
|
|
|
|
|
|
|
|
16
|
1
|
|
|
1
|
|
7
|
use integer; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub _decode_rdata { ## decode rdata from wire-format octet string |
20
|
1
|
|
|
1
|
|
2
|
my ( $self, $data, $offset ) = @_; |
21
|
|
|
|
|
|
|
|
22
|
1
|
|
|
|
|
5
|
$self->{address} = unpack "\@$offset a6", $$data; |
23
|
1
|
|
|
|
|
2
|
return; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub _encode_rdata { ## encode rdata as wire-format octet string |
28
|
5
|
|
|
5
|
|
7
|
my $self = shift; |
29
|
|
|
|
|
|
|
|
30
|
5
|
|
|
|
|
20
|
return pack 'a6', $self->{address}; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub _format_rdata { ## format rdata portion of RR string. |
35
|
2
|
|
|
2
|
|
3
|
my $self = shift; |
36
|
|
|
|
|
|
|
|
37
|
2
|
|
|
|
|
4
|
return $self->address; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub _parse_rdata { ## populate RR from rdata in argument list |
42
|
1
|
|
|
1
|
|
2
|
my ( $self, @argument ) = @_; |
43
|
|
|
|
|
|
|
|
44
|
1
|
|
|
|
|
3
|
$self->address(@argument); |
45
|
1
|
|
|
|
|
2
|
return; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub address { |
50
|
5
|
|
|
5
|
1
|
10
|
my ( $self, $address ) = @_; |
51
|
5
|
100
|
|
|
|
21
|
$self->{address} = pack 'C6', map { hex($_) } split /[:-]/, $address if $address; |
|
12
|
|
|
|
|
29
|
|
52
|
5
|
100
|
|
|
|
35
|
return defined(wantarray) ? join( '-', unpack 'H2H2H2H2H2H2', $self->{address} ) : undef; |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
1; |
57
|
|
|
|
|
|
|
__END__ |