line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# $Id: MLD.pm 49 2009-05-31 13:15:34Z VinsWorldcom $ |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
package Net::Frame::Layer::ICMPv6::MLD; |
5
|
3
|
|
|
3
|
|
25474
|
use strict; use warnings; |
|
3
|
|
|
3
|
|
25
|
|
|
3
|
|
|
|
|
110
|
|
|
3
|
|
|
|
|
22
|
|
|
3
|
|
|
|
|
9
|
|
|
3
|
|
|
|
|
198
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '1.00'; |
8
|
|
|
|
|
|
|
|
9
|
3
|
|
|
3
|
|
1443
|
use Net::Frame::Layer qw(:consts :subs); |
|
3
|
|
|
|
|
342904
|
|
|
3
|
|
|
|
|
927
|
|
10
|
3
|
|
|
3
|
|
36
|
use Exporter; |
|
3
|
|
|
|
|
10
|
|
|
3
|
|
|
|
|
408
|
|
11
|
|
|
|
|
|
|
our @ISA = qw(Net::Frame::Layer Exporter); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
our %EXPORT_TAGS = ( |
14
|
|
|
|
|
|
|
consts => [qw( |
15
|
|
|
|
|
|
|
NF_MLD_ALLMLDRTRS |
16
|
|
|
|
|
|
|
NF_MLD_ALLMLDRTRS_MAC |
17
|
|
|
|
|
|
|
NF_MLD_TYPE_QUERY |
18
|
|
|
|
|
|
|
NF_MLD_TYPE_REPORTv1 |
19
|
|
|
|
|
|
|
NF_MLD_TYPE_DONE |
20
|
|
|
|
|
|
|
NF_MLD_TYPE_REPORTv2 |
21
|
|
|
|
|
|
|
)], |
22
|
|
|
|
|
|
|
); |
23
|
|
|
|
|
|
|
our @EXPORT_OK = ( |
24
|
|
|
|
|
|
|
@{$EXPORT_TAGS{consts}}, |
25
|
|
|
|
|
|
|
); |
26
|
|
|
|
|
|
|
|
27
|
3
|
|
|
3
|
|
28
|
use constant NF_MLD_ALLMLDRTRS => 'ff02::16'; |
|
3
|
|
|
|
|
9
|
|
|
3
|
|
|
|
|
233
|
|
28
|
3
|
|
|
3
|
|
26
|
use constant NF_MLD_ALLMLDRTRS_MAC => '33:33:00:00:00:16'; |
|
3
|
|
|
|
|
9
|
|
|
3
|
|
|
|
|
193
|
|
29
|
3
|
|
|
3
|
|
25
|
use constant NF_MLD_TYPE_QUERY => 130; |
|
3
|
|
|
|
|
9
|
|
|
3
|
|
|
|
|
191
|
|
30
|
3
|
|
|
3
|
|
24
|
use constant NF_MLD_TYPE_REPORTv1 => 131; |
|
3
|
|
|
|
|
14
|
|
|
3
|
|
|
|
|
177
|
|
31
|
3
|
|
|
3
|
|
23
|
use constant NF_MLD_TYPE_DONE => 132; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
214
|
|
32
|
3
|
|
|
3
|
|
33
|
use constant NF_MLD_TYPE_REPORTv2 => 143; |
|
3
|
|
|
|
|
19
|
|
|
3
|
|
|
|
|
323
|
|
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
our @AS = qw( |
35
|
|
|
|
|
|
|
maxResp |
36
|
|
|
|
|
|
|
reserved |
37
|
|
|
|
|
|
|
groupAddress |
38
|
|
|
|
|
|
|
); |
39
|
|
|
|
|
|
|
__PACKAGE__->cgBuildIndices; |
40
|
|
|
|
|
|
|
__PACKAGE__->cgBuildAccessorsScalar(\@AS); |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
#no strict 'vars'; |
43
|
3
|
|
|
3
|
|
1438
|
use Net::Frame::Layer::ICMPv6::MLD::Query; |
|
3
|
|
|
|
|
12
|
|
|
3
|
|
|
|
|
186
|
|
44
|
3
|
|
|
3
|
|
1250
|
use Net::Frame::Layer::ICMPv6::MLD::Report; |
|
3
|
|
|
|
|
13
|
|
|
3
|
|
|
|
|
187
|
|
45
|
3
|
|
|
3
|
|
1983
|
use Net::Frame::Layer::ICMPv6::MLD::Report::Record qw(:consts); |
|
3
|
|
|
|
|
15
|
|
|
3
|
|
|
|
|
1806
|
|
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
sub new { |
48
|
|
|
|
|
|
|
shift->SUPER::new( |
49
|
2
|
|
|
2
|
1
|
271
|
maxResp => 0, |
50
|
|
|
|
|
|
|
reserved => 0, |
51
|
|
|
|
|
|
|
groupAddress => '::', |
52
|
|
|
|
|
|
|
@_, |
53
|
|
|
|
|
|
|
); |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
0
|
|
|
0
|
1
|
0
|
sub getLength { 20 } |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
sub pack { |
59
|
1
|
|
|
1
|
1
|
417
|
my $self = shift; |
60
|
|
|
|
|
|
|
|
61
|
1
|
50
|
|
|
|
7
|
my $raw = $self->SUPER::pack('nna*', |
62
|
|
|
|
|
|
|
$self->maxResp, |
63
|
|
|
|
|
|
|
$self->reserved, |
64
|
|
|
|
|
|
|
inet6Aton($self->groupAddress) |
65
|
|
|
|
|
|
|
) or return; |
66
|
|
|
|
|
|
|
|
67
|
1
|
|
|
|
|
104
|
return $self->raw($raw); |
68
|
|
|
|
|
|
|
} |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
sub unpack { |
71
|
1
|
|
|
1
|
1
|
23
|
my $self = shift; |
72
|
|
|
|
|
|
|
|
73
|
1
|
50
|
|
|
|
5
|
my ($maxResp, $reserved, $group, $payload) = |
74
|
|
|
|
|
|
|
$self->SUPER::unpack('nna16 a*', $self->raw) |
75
|
|
|
|
|
|
|
or return; |
76
|
|
|
|
|
|
|
|
77
|
1
|
|
|
|
|
50
|
$self->maxResp($maxResp); |
78
|
1
|
|
|
|
|
19
|
$self->reserved($reserved); |
79
|
1
|
|
|
|
|
17
|
$self->groupAddress(inet6Ntoa($group)); |
80
|
|
|
|
|
|
|
|
81
|
1
|
|
|
|
|
32
|
$self->payload($payload); |
82
|
|
|
|
|
|
|
|
83
|
1
|
|
|
|
|
16
|
return $self; |
84
|
|
|
|
|
|
|
} |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
sub encapsulate { |
87
|
1
|
|
|
1
|
1
|
12
|
my $self = shift; |
88
|
|
|
|
|
|
|
|
89
|
1
|
50
|
|
|
|
11
|
return $self->nextLayer if $self->nextLayer; |
90
|
|
|
|
|
|
|
|
91
|
1
|
50
|
|
|
|
22
|
if ($self->payload) { |
92
|
0
|
|
|
|
|
0
|
return 'ICMPv6::MLD::Query'; |
93
|
|
|
|
|
|
|
} |
94
|
|
|
|
|
|
|
|
95
|
1
|
|
|
|
|
20
|
NF_LAYER_NONE; |
96
|
|
|
|
|
|
|
} |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
sub print { |
99
|
3
|
|
|
3
|
1
|
19
|
my $self = shift; |
100
|
|
|
|
|
|
|
|
101
|
3
|
|
|
|
|
27
|
my $l = $self->layer; |
102
|
3
|
|
|
|
|
61
|
my $buf .= sprintf |
103
|
|
|
|
|
|
|
"$l: maxResp:%d reserved:%d\n". |
104
|
|
|
|
|
|
|
"$l: groupAddress:%s", |
105
|
|
|
|
|
|
|
$self->maxResp, $self->reserved, |
106
|
|
|
|
|
|
|
$self->groupAddress; |
107
|
|
|
|
|
|
|
|
108
|
3
|
|
|
|
|
563
|
return $buf; |
109
|
|
|
|
|
|
|
} |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
1; |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
__END__ |