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