line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::TacacsPlus::Packet::AuthenContinueBody; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=head1 NAME |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
Net::TacacsPlus::Packet::AuthenContinueBody - Tacacs+ authentication continue body |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 DESCRIPTION |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
8. The authentication CONTINUE packet body |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
This packet is sent from the NAS to the daemon following the receipt |
12
|
|
|
|
|
|
|
of a REPLY packet. |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
+----------------+----------------+----------------+----------------+ |
18
|
|
|
|
|
|
|
| user_msg len | data len | |
19
|
|
|
|
|
|
|
+----------------+----------------+----------------+----------------+ |
20
|
|
|
|
|
|
|
| flags | user_msg ... |
21
|
|
|
|
|
|
|
+----------------+----------------+----------------+----------------+ |
22
|
|
|
|
|
|
|
| data ... |
23
|
|
|
|
|
|
|
+----------------+ |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=cut |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
our $VERSION = '1.10_01'; |
29
|
|
|
|
|
|
|
|
30
|
10
|
|
|
10
|
|
42
|
use strict; |
|
10
|
|
|
|
|
13
|
|
|
10
|
|
|
|
|
334
|
|
31
|
10
|
|
|
10
|
|
46
|
use warnings; |
|
10
|
|
|
|
|
13
|
|
|
10
|
|
|
|
|
247
|
|
32
|
|
|
|
|
|
|
|
33
|
10
|
|
|
10
|
|
151
|
use 5.006; |
|
10
|
|
|
|
|
24
|
|
|
10
|
|
|
|
|
357
|
|
34
|
10
|
|
|
10
|
|
43
|
use Net::TacacsPlus::Constants 1.03; |
|
10
|
|
|
|
|
160
|
|
|
10
|
|
|
|
|
50
|
|
35
|
10
|
|
|
10
|
|
53
|
use Carp::Clan; |
|
10
|
|
|
|
|
16
|
|
|
10
|
|
|
|
|
63
|
|
36
|
|
|
|
|
|
|
|
37
|
10
|
|
|
10
|
|
1430
|
use base qw{ Class::Accessor::Fast }; |
|
10
|
|
|
|
|
17
|
|
|
10
|
|
|
|
|
3099
|
|
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
__PACKAGE__->mk_accessors(qw{ |
40
|
|
|
|
|
|
|
continue_flags |
41
|
|
|
|
|
|
|
user_msg |
42
|
|
|
|
|
|
|
data |
43
|
|
|
|
|
|
|
}); |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 METHODS |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=over 4 |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=item new( somekey => somevalue) |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
Construct tacacs+ authentication CONTINUE packet body object |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
Parameters: |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
'continue_flags' : TAC_PLUS_CONTINUE_FLAG_ABORT - default none |
56
|
|
|
|
|
|
|
'user_msg' : user message requested by server |
57
|
|
|
|
|
|
|
'data' : data requested by server |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=cut |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
sub new() { |
62
|
2
|
|
|
2
|
1
|
543
|
my $class = shift; |
63
|
2
|
|
|
|
|
9
|
my %params = @_; |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
#let the class accessor contruct the object |
66
|
2
|
|
|
|
|
22
|
my $self = $class->SUPER::new(\%params); |
67
|
|
|
|
|
|
|
|
68
|
2
|
100
|
|
|
|
32
|
if ($params{'raw_body'}) { |
69
|
1
|
|
|
|
|
6
|
$self->decode($params{'raw_body'}); |
70
|
1
|
|
|
|
|
4
|
delete $self->{'raw_body'}; |
71
|
1
|
|
|
|
|
6
|
return $self; |
72
|
|
|
|
|
|
|
} |
73
|
|
|
|
|
|
|
|
74
|
1
|
50
|
|
|
|
8
|
$self->continue_flags(0) if not defined $self->continue_flags; |
75
|
|
|
|
|
|
|
|
76
|
1
|
|
|
|
|
20
|
return $self; |
77
|
|
|
|
|
|
|
} |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=item decode($raw_body) |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
Construct body object from raw data. |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=cut |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
sub decode { |
87
|
1
|
|
|
1
|
1
|
3
|
my ($self, $raw_body) = @_; |
88
|
|
|
|
|
|
|
|
89
|
1
|
|
|
|
|
2
|
my $user_msg_length; |
90
|
|
|
|
|
|
|
my $data_length; |
91
|
0
|
|
|
|
|
0
|
my $payload; |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
( |
94
|
1
|
|
|
|
|
11
|
$user_msg_length, |
95
|
|
|
|
|
|
|
$data_length, |
96
|
|
|
|
|
|
|
$self->{'continue_flags'}, |
97
|
|
|
|
|
|
|
$payload, |
98
|
|
|
|
|
|
|
) = unpack('nnCa*', $raw_body); |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
( |
101
|
1
|
|
|
|
|
9
|
$self->{'user_msg'}, |
102
|
|
|
|
|
|
|
$self->{'data'}, |
103
|
|
|
|
|
|
|
) = unpack('a'.$user_msg_length.'a'.$data_length, $payload); |
104
|
|
|
|
|
|
|
} |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=item raw() |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
Return binary data of packet body. |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=cut |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
sub raw { |
114
|
1
|
|
|
1
|
1
|
1466
|
my $self = shift; |
115
|
|
|
|
|
|
|
|
116
|
1
|
|
|
|
|
20
|
my $body = pack("nnC", |
117
|
|
|
|
|
|
|
length($self->{'user_msg'}), |
118
|
|
|
|
|
|
|
length($self->{'data'}), |
119
|
|
|
|
|
|
|
$self->{'continue_flags'}, |
120
|
|
|
|
|
|
|
).$self->{'user_msg'}.$self->{'data'}; |
121
|
|
|
|
|
|
|
|
122
|
1
|
|
|
|
|
5
|
return $body; |
123
|
|
|
|
|
|
|
} |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
1; |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
=back |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
=cut |