line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# $Id: Opaque.pm,v 1.1 2007/01/21 20:59:24 gomor Exp $ |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
package Net::Frame::Layer::OSPF::Lsa::Opaque; |
5
|
2
|
|
|
2
|
|
6
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
43
|
|
6
|
2
|
|
|
2
|
|
6
|
use warnings; |
|
2
|
|
|
|
|
1
|
|
|
2
|
|
|
|
|
42
|
|
7
|
|
|
|
|
|
|
|
8
|
2
|
|
|
2
|
|
5
|
use Net::Frame::Layer qw(:consts :subs); |
|
2
|
|
|
|
|
1
|
|
|
2
|
|
|
|
|
331
|
|
9
|
|
|
|
|
|
|
our @ISA = qw(Net::Frame::Layer); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our @AS = qw( |
12
|
|
|
|
|
|
|
data |
13
|
|
|
|
|
|
|
); |
14
|
|
|
|
|
|
|
__PACKAGE__->cgBuildIndices; |
15
|
|
|
|
|
|
|
__PACKAGE__->cgBuildAccessorsScalar(\@AS); |
16
|
|
|
|
|
|
|
|
17
|
2
|
|
|
2
|
|
7
|
use Net::Frame::Layer::OSPF qw(:consts); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
584
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub new { |
20
|
|
|
|
|
|
|
shift->SUPER::new( |
21
|
0
|
|
|
0
|
1
|
|
data => '', |
22
|
|
|
|
|
|
|
@_, |
23
|
|
|
|
|
|
|
); |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
0
|
|
|
0
|
1
|
|
sub getLength { length(shift()->data) } |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub pack { |
29
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
30
|
|
|
|
|
|
|
|
31
|
0
|
0
|
|
|
|
|
$self->raw($self->SUPER::pack('a*', |
32
|
|
|
|
|
|
|
$self->data, |
33
|
|
|
|
|
|
|
)) or return undef; |
34
|
|
|
|
|
|
|
|
35
|
0
|
|
|
|
|
|
$self->raw; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub unpack { |
39
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
40
|
|
|
|
|
|
|
|
41
|
0
|
0
|
|
|
|
|
my ($data) = $self->SUPER::unpack('a*', $self->raw) |
42
|
|
|
|
|
|
|
or return undef; |
43
|
|
|
|
|
|
|
|
44
|
0
|
|
|
|
|
|
$self->data($data); |
45
|
|
|
|
|
|
|
|
46
|
0
|
|
|
|
|
|
$self; |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub print { |
50
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
51
|
|
|
|
|
|
|
|
52
|
0
|
|
|
|
|
|
my $l = $self->layer; |
53
|
0
|
|
|
|
|
|
sprintf |
54
|
|
|
|
|
|
|
"$l: data:%s", |
55
|
|
|
|
|
|
|
CORE::unpack('H*', $self->data), |
56
|
|
|
|
|
|
|
; |
57
|
|
|
|
|
|
|
} |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
1; |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
__END__ |