line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# $Id: LinkStateAck.pm,v 1.3 2007/03/13 18:18:09 gomor Exp $ |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
package Net::Frame::Layer::OSPF::LinkStateAck; |
5
|
14
|
|
|
14
|
|
7476
|
use strict; |
|
14
|
|
|
|
|
30
|
|
|
14
|
|
|
|
|
610
|
|
6
|
14
|
|
|
14
|
|
82
|
use warnings; |
|
14
|
|
|
|
|
25
|
|
|
14
|
|
|
|
|
468
|
|
7
|
|
|
|
|
|
|
|
8
|
14
|
|
|
14
|
|
1012
|
use Net::Frame::Layer qw(:consts :subs); |
|
14
|
|
|
|
|
87792
|
|
|
14
|
|
|
|
|
5161
|
|
9
|
|
|
|
|
|
|
our @ISA = qw(Net::Frame::Layer); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our @AA = qw( |
12
|
|
|
|
|
|
|
lsaList |
13
|
|
|
|
|
|
|
); |
14
|
|
|
|
|
|
|
__PACKAGE__->cgBuildIndices; |
15
|
|
|
|
|
|
|
__PACKAGE__->cgBuildAccessorsArray(\@AA); |
16
|
|
|
|
|
|
|
|
17
|
14
|
|
|
14
|
|
838
|
use Net::Frame::Layer::OSPF qw(:consts); |
|
14
|
|
|
|
|
31
|
|
|
14
|
|
|
|
|
10765
|
|
18
|
|
|
|
|
|
|
require Net::Frame::Layer::OSPF::Lsa; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub new { |
21
|
|
|
|
|
|
|
shift->SUPER::new( |
22
|
1
|
|
|
1
|
1
|
30
|
lsaList => [], |
23
|
|
|
|
|
|
|
@_, |
24
|
|
|
|
|
|
|
); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub pack { |
28
|
1
|
|
|
1
|
1
|
267
|
my $self = shift; |
29
|
|
|
|
|
|
|
|
30
|
1
|
|
|
|
|
3
|
my $raw = ''; |
31
|
1
|
|
|
|
|
9
|
for ($self->lsaList) { |
32
|
0
|
0
|
|
|
|
0
|
$raw .= $_->pack or return undef; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
1
|
|
|
|
|
41
|
$self->raw($raw); |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub unpack { |
39
|
1
|
|
|
1
|
1
|
41
|
my $self = shift; |
40
|
|
|
|
|
|
|
|
41
|
1
|
|
|
|
|
8
|
my $payload = $self->raw; |
42
|
|
|
|
|
|
|
|
43
|
1
|
|
|
|
|
15
|
my @lsaList = (); |
44
|
1
|
|
|
|
|
7
|
while ($payload) { |
45
|
0
|
|
|
|
|
0
|
my $lsa = Net::Frame::Layer::OSPF::Lsa->new(raw => $payload, full => 0); |
46
|
0
|
|
|
|
|
0
|
$lsa->unpack; |
47
|
0
|
|
|
|
|
0
|
push @lsaList, $lsa; |
48
|
0
|
|
|
|
|
0
|
$payload = $lsa->payload; |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
1
|
|
|
|
|
6
|
$self->lsaList(\@lsaList); |
52
|
1
|
|
|
|
|
23
|
$self->payload($payload); |
53
|
|
|
|
|
|
|
|
54
|
1
|
|
|
|
|
14
|
$self; |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub print { |
58
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
59
|
|
|
|
|
|
|
|
60
|
0
|
|
|
|
|
|
my $buf = ''; |
61
|
0
|
|
|
|
|
|
my $first = 1; |
62
|
0
|
|
|
|
|
|
for ($self->lsaList) { |
63
|
0
|
0
|
|
|
|
|
$buf .= "\n" unless $first; |
64
|
0
|
|
|
|
|
|
$first = 0; |
65
|
0
|
|
|
|
|
|
$buf .= $_->print; |
66
|
|
|
|
|
|
|
} |
67
|
|
|
|
|
|
|
|
68
|
0
|
|
|
|
|
|
$buf; |
69
|
|
|
|
|
|
|
} |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
1; |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
__END__ |