line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# $Id: UntrustedCos.pm 1640 2013-03-28 17:58:27Z VinsWorldcom $ |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
package Net::Frame::Layer::CDP::UntrustedCos; |
5
|
19
|
|
|
19
|
|
14737
|
use strict; use warnings; |
|
19
|
|
|
19
|
|
39
|
|
|
19
|
|
|
|
|
594
|
|
|
19
|
|
|
|
|
93
|
|
|
19
|
|
|
|
|
31
|
|
|
19
|
|
|
|
|
621
|
|
6
|
|
|
|
|
|
|
|
7
|
19
|
|
|
19
|
|
986
|
use Net::Frame::Layer qw(:consts :subs); |
|
19
|
|
|
|
|
85776
|
|
|
19
|
|
|
|
|
4810
|
|
8
|
|
|
|
|
|
|
our @ISA = qw(Net::Frame::Layer); |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our @AS = qw( |
11
|
|
|
|
|
|
|
type |
12
|
|
|
|
|
|
|
length |
13
|
|
|
|
|
|
|
untrustedCos |
14
|
|
|
|
|
|
|
); |
15
|
|
|
|
|
|
|
__PACKAGE__->cgBuildIndices; |
16
|
|
|
|
|
|
|
__PACKAGE__->cgBuildAccessorsScalar(\@AS); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
#no strict 'vars'; |
19
|
|
|
|
|
|
|
|
20
|
19
|
|
|
19
|
|
789
|
use Net::Frame::Layer::CDP::Constants qw(:consts); |
|
19
|
|
|
|
|
32
|
|
|
19
|
|
|
|
|
10519
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub new { |
23
|
|
|
|
|
|
|
shift->SUPER::new( |
24
|
2
|
|
|
2
|
1
|
253
|
type => NF_CDP_TYPE_UNTRUSTED_COS, |
25
|
|
|
|
|
|
|
length => 5, |
26
|
|
|
|
|
|
|
untrustedCos => 0, |
27
|
|
|
|
|
|
|
@_, |
28
|
|
|
|
|
|
|
); |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
0
|
|
|
0
|
1
|
0
|
sub getLength { 5 } |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub pack { |
34
|
1
|
|
|
1
|
1
|
297
|
my $self = shift; |
35
|
|
|
|
|
|
|
|
36
|
1
|
50
|
|
|
|
7
|
my $raw = $self->SUPER::pack('nnC', |
37
|
|
|
|
|
|
|
$self->type, |
38
|
|
|
|
|
|
|
$self->length, |
39
|
|
|
|
|
|
|
$self->untrustedCos, |
40
|
|
|
|
|
|
|
) or return; |
41
|
|
|
|
|
|
|
|
42
|
1
|
|
|
|
|
83
|
return $self->raw($raw); |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub unpack { |
46
|
1
|
|
|
1
|
1
|
18
|
my $self = shift; |
47
|
|
|
|
|
|
|
|
48
|
1
|
50
|
|
|
|
5
|
my ($type, $length, $untrustedCos, $payload) = |
49
|
|
|
|
|
|
|
$self->SUPER::unpack('nnC a*', $self->raw) |
50
|
|
|
|
|
|
|
or return; |
51
|
|
|
|
|
|
|
|
52
|
1
|
|
|
|
|
43
|
$self->type($type); |
53
|
1
|
|
|
|
|
13
|
$self->length($length); |
54
|
1
|
|
|
|
|
14
|
$self->untrustedCos($untrustedCos); |
55
|
|
|
|
|
|
|
|
56
|
1
|
|
|
|
|
18
|
$self->payload($payload); |
57
|
|
|
|
|
|
|
|
58
|
1
|
|
|
|
|
11
|
return $self; |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
sub computeLengths { |
62
|
0
|
|
|
0
|
1
|
0
|
my $self = shift; |
63
|
|
|
|
|
|
|
|
64
|
0
|
|
|
|
|
0
|
$self->length(5); |
65
|
|
|
|
|
|
|
|
66
|
0
|
|
|
|
|
0
|
return 1; |
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
sub print { |
70
|
3
|
|
|
3
|
1
|
14
|
my $self = shift; |
71
|
|
|
|
|
|
|
|
72
|
3
|
|
|
|
|
15
|
my $l = $self->layer; |
73
|
3
|
|
|
|
|
37
|
my $buf = sprintf |
74
|
|
|
|
|
|
|
"$l: type:0x%04x length:%d untrustedCos:%d", |
75
|
|
|
|
|
|
|
$self->type, $self->length, $self->untrustedCos; |
76
|
|
|
|
|
|
|
|
77
|
3
|
|
|
|
|
647
|
return $buf; |
78
|
|
|
|
|
|
|
} |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
1; |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
__END__ |