line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# $Id: Opaque.pm,v 1.2 2007/03/13 18:20:24 gomor Exp $ |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
package Net::Frame::Layer::OSPF::Lsa::Opaque; |
5
|
14
|
|
|
14
|
|
35960
|
use strict; |
|
14
|
|
|
|
|
34
|
|
|
14
|
|
|
|
|
634
|
|
6
|
14
|
|
|
14
|
|
82
|
use warnings; |
|
14
|
|
|
|
|
33
|
|
|
14
|
|
|
|
|
480
|
|
7
|
|
|
|
|
|
|
|
8
|
14
|
|
|
14
|
|
931
|
use Net::Frame::Layer qw(:consts :subs); |
|
14
|
|
|
|
|
98107
|
|
|
14
|
|
|
|
|
6428
|
|
9
|
|
|
|
|
|
|
our @ISA = qw(Net::Frame::Layer); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our @AS = qw( |
12
|
|
|
|
|
|
|
data |
13
|
|
|
|
|
|
|
); |
14
|
|
|
|
|
|
|
__PACKAGE__->cgBuildIndices; |
15
|
|
|
|
|
|
|
__PACKAGE__->cgBuildAccessorsScalar(\@AS); |
16
|
|
|
|
|
|
|
|
17
|
14
|
|
|
14
|
|
1160
|
use Net::Frame::Layer::OSPF qw(:consts); |
|
14
|
|
|
|
|
33
|
|
|
14
|
|
|
|
|
9392
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub new { |
20
|
|
|
|
|
|
|
shift->SUPER::new( |
21
|
1
|
|
|
1
|
1
|
29
|
data => '', |
22
|
|
|
|
|
|
|
@_, |
23
|
|
|
|
|
|
|
); |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
0
|
|
|
0
|
1
|
0
|
sub getLength { length(shift()->data) } |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub pack { |
29
|
1
|
|
|
1
|
1
|
254
|
my $self = shift; |
30
|
|
|
|
|
|
|
|
31
|
1
|
50
|
|
|
|
5
|
$self->raw($self->SUPER::pack('a*', |
32
|
|
|
|
|
|
|
$self->data, |
33
|
|
|
|
|
|
|
)) or return undef; |
34
|
|
|
|
|
|
|
|
35
|
0
|
|
|
|
|
0
|
$self->raw; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub unpack { |
39
|
1
|
|
|
1
|
1
|
59
|
my $self = shift; |
40
|
|
|
|
|
|
|
|
41
|
1
|
50
|
|
|
|
3
|
my ($data) = $self->SUPER::unpack('a*', $self->raw) |
42
|
|
|
|
|
|
|
or return undef; |
43
|
|
|
|
|
|
|
|
44
|
1
|
|
|
|
|
27
|
$self->data($data); |
45
|
|
|
|
|
|
|
|
46
|
1
|
|
|
|
|
9
|
$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__ |