| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
# |
|
2
|
|
|
|
|
|
|
# $Id: EmiteeDesc.pm 12 2015-01-14 06:29:59Z gomor $ |
|
3
|
|
|
|
|
|
|
# |
|
4
|
|
|
|
|
|
|
package Net::Frame::Layer::LLTD::EmiteeDesc; |
|
5
|
9
|
|
|
9
|
|
42
|
use strict; use warnings; |
|
|
9
|
|
|
9
|
|
13
|
|
|
|
9
|
|
|
|
|
276
|
|
|
|
9
|
|
|
|
|
37
|
|
|
|
9
|
|
|
|
|
13
|
|
|
|
9
|
|
|
|
|
276
|
|
|
6
|
|
|
|
|
|
|
|
|
7
|
9
|
|
|
9
|
|
39
|
use Net::Frame::Layer qw(:consts :subs); |
|
|
9
|
|
|
|
|
14
|
|
|
|
9
|
|
|
|
|
4516
|
|
|
8
|
|
|
|
|
|
|
our @ISA = qw(Net::Frame::Layer); |
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our @AS = qw( |
|
11
|
|
|
|
|
|
|
type |
|
12
|
|
|
|
|
|
|
pause |
|
13
|
|
|
|
|
|
|
sourceAddress |
|
14
|
|
|
|
|
|
|
destinationAddress |
|
15
|
|
|
|
|
|
|
); |
|
16
|
|
|
|
|
|
|
__PACKAGE__->cgBuildIndices; |
|
17
|
|
|
|
|
|
|
__PACKAGE__->cgBuildAccessorsScalar(\@AS); |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub new { |
|
20
|
|
|
|
|
|
|
shift->SUPER::new( |
|
21
|
1
|
|
|
1
|
1
|
25
|
type => 0, |
|
22
|
|
|
|
|
|
|
pause => 0, |
|
23
|
|
|
|
|
|
|
sourceAddress => 'ff:ff:ff:ff:ff:ff', |
|
24
|
|
|
|
|
|
|
destinationAddress => 'ff:ff:ff:ff:ff:ff', |
|
25
|
|
|
|
|
|
|
@_, |
|
26
|
|
|
|
|
|
|
); |
|
27
|
|
|
|
|
|
|
} |
|
28
|
|
|
|
|
|
|
|
|
29
|
0
|
|
|
0
|
1
|
0
|
sub getLength { 14 } |
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub pack { |
|
32
|
1
|
|
|
1
|
1
|
211
|
my $self = shift; |
|
33
|
|
|
|
|
|
|
|
|
34
|
1
|
|
|
|
|
5
|
(my $sourceAddress = $self->sourceAddress) =~ s/://g; |
|
35
|
1
|
|
|
|
|
32
|
(my $destinationAddress = $self->destinationAddress) =~ s/://g; |
|
36
|
|
|
|
|
|
|
|
|
37
|
1
|
50
|
|
|
|
12
|
$self->raw($self->SUPER::pack('CCH12H12', |
|
38
|
|
|
|
|
|
|
$self->type, $self->pause, $sourceAddress, $destinationAddress, |
|
39
|
|
|
|
|
|
|
)) or return undef; |
|
40
|
|
|
|
|
|
|
|
|
41
|
1
|
|
|
|
|
43
|
$self->raw; |
|
42
|
|
|
|
|
|
|
} |
|
43
|
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub unpack { |
|
45
|
1
|
|
|
1
|
1
|
9
|
my $self = shift; |
|
46
|
|
|
|
|
|
|
|
|
47
|
1
|
50
|
|
|
|
5
|
my ($type, $pause, $src, $dst, $payload) = |
|
48
|
|
|
|
|
|
|
$self->SUPER::unpack('CCH12H12 a*', $self->raw) |
|
49
|
|
|
|
|
|
|
or return undef; |
|
50
|
|
|
|
|
|
|
|
|
51
|
1
|
|
|
|
|
25
|
$self->type($type); |
|
52
|
1
|
|
|
|
|
8
|
$self->pause($pause); |
|
53
|
1
|
|
|
|
|
9
|
$self->sourceAddress(convertMac($src)); |
|
54
|
1
|
|
|
|
|
21
|
$self->destinationAddress(convertMac($dst)); |
|
55
|
|
|
|
|
|
|
|
|
56
|
1
|
|
|
|
|
16
|
$self->payload($payload); |
|
57
|
|
|
|
|
|
|
|
|
58
|
1
|
|
|
|
|
7
|
$self; |
|
59
|
|
|
|
|
|
|
} |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
sub print { |
|
62
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
|
63
|
|
|
|
|
|
|
|
|
64
|
0
|
|
|
|
|
|
my $l = $self->layer; |
|
65
|
0
|
|
|
|
|
|
sprintf |
|
66
|
|
|
|
|
|
|
"$l: type:%02x pause:%02x\n". |
|
67
|
|
|
|
|
|
|
"$l: sourceAddress: %s\n". |
|
68
|
|
|
|
|
|
|
"$l: destinationAddress: %s", |
|
69
|
|
|
|
|
|
|
$self->type, |
|
70
|
|
|
|
|
|
|
$self->pause, |
|
71
|
|
|
|
|
|
|
$self->sourceAddress, |
|
72
|
|
|
|
|
|
|
$self->destinationAddress; |
|
73
|
|
|
|
|
|
|
} |
|
74
|
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
1; |
|
76
|
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
__END__ |