line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# $Id: SummaryIp.pm 73 2015-01-14 06:42:49Z gomor $ |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
package Net::Frame::Layer::OSPF::Lsa::SummaryIp; |
5
|
14
|
|
|
14
|
|
4903
|
use strict; use warnings; |
|
14
|
|
|
14
|
|
21
|
|
|
14
|
|
|
|
|
549
|
|
|
14
|
|
|
|
|
74
|
|
|
14
|
|
|
|
|
20
|
|
|
14
|
|
|
|
|
461
|
|
6
|
|
|
|
|
|
|
|
7
|
14
|
|
|
14
|
|
610
|
use Net::Frame::Layer qw(:consts :subs); |
|
14
|
|
|
|
|
59391
|
|
|
14
|
|
|
|
|
3514
|
|
8
|
|
|
|
|
|
|
our @ISA = qw(Net::Frame::Layer); |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our @AS = qw( |
11
|
|
|
|
|
|
|
networkMask |
12
|
|
|
|
|
|
|
metric |
13
|
|
|
|
|
|
|
); |
14
|
|
|
|
|
|
|
__PACKAGE__->cgBuildIndices; |
15
|
|
|
|
|
|
|
__PACKAGE__->cgBuildAccessorsScalar(\@AS); |
16
|
|
|
|
|
|
|
|
17
|
14
|
|
|
14
|
|
601
|
use Net::Frame::Layer::OSPF qw(:consts); |
|
14
|
|
|
|
|
27
|
|
|
14
|
|
|
|
|
6541
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub new { |
20
|
|
|
|
|
|
|
shift->SUPER::new( |
21
|
1
|
|
|
1
|
1
|
30
|
networkMask => '255.255.255.0', |
22
|
|
|
|
|
|
|
metric => 10, |
23
|
|
|
|
|
|
|
@_, |
24
|
|
|
|
|
|
|
); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub pack { |
28
|
1
|
|
|
1
|
1
|
212
|
my $self = shift; |
29
|
|
|
|
|
|
|
|
30
|
1
|
50
|
|
|
|
6
|
$self->raw($self->SUPER::pack('a4N', |
31
|
|
|
|
|
|
|
inetAton($self->networkMask), $self->metric, |
32
|
|
|
|
|
|
|
)) or return undef; |
33
|
|
|
|
|
|
|
|
34
|
1
|
|
|
|
|
80
|
$self->raw; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub unpack { |
38
|
1
|
|
|
1
|
1
|
9
|
my $self = shift; |
39
|
|
|
|
|
|
|
|
40
|
1
|
50
|
|
|
|
4
|
my ($networkMask, $metric, $payload) = |
41
|
|
|
|
|
|
|
$self->SUPER::unpack('a4N a*', $self->raw) |
42
|
|
|
|
|
|
|
or return undef; |
43
|
|
|
|
|
|
|
|
44
|
1
|
|
|
|
|
29
|
$self->networkMask(inetNtoa($networkMask)); |
45
|
1
|
|
|
|
|
15
|
$self->metric($metric); |
46
|
|
|
|
|
|
|
|
47
|
1
|
|
|
|
|
11
|
$self->payload($payload); |
48
|
|
|
|
|
|
|
|
49
|
1
|
|
|
|
|
8
|
$self; |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
sub print { |
53
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
54
|
|
|
|
|
|
|
|
55
|
0
|
|
|
|
|
|
my $l = $self->layer; |
56
|
0
|
|
|
|
|
|
sprintf |
57
|
|
|
|
|
|
|
"$l: networkMask:%s metric:%d", |
58
|
|
|
|
|
|
|
$self->networkMask, |
59
|
|
|
|
|
|
|
$self->metric, |
60
|
|
|
|
|
|
|
; |
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
1; |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
__END__ |