line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# $Id: Buffer.pm,v 1.12 2005/01/16 21:36:56 dbrobins Exp $ |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
package Net::SFTP::Buffer; |
4
|
2
|
|
|
2
|
|
12
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
45
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
818
|
use Net::SSH::Perl::Buffer; |
|
2
|
|
|
|
|
2404
|
|
|
2
|
|
|
|
|
48
|
|
7
|
2
|
|
|
2
|
|
11
|
use base qw( Net::SSH::Perl::Buffer ); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
166
|
|
8
|
|
|
|
|
|
|
|
9
|
2
|
|
|
2
|
|
797
|
use Math::Int64 qw( :native_if_available net_to_int64 int64_to_net ); |
|
2
|
|
|
|
|
7331
|
|
|
2
|
|
|
|
|
8
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub new { |
12
|
0
|
|
|
0
|
1
|
|
return shift->SUPER::new(@_); |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub get_int64 { |
16
|
0
|
|
|
0
|
1
|
|
my $buf = shift; |
17
|
0
|
0
|
|
|
|
|
my $off = defined $_[0] ? shift : $buf->{offset}; |
18
|
0
|
|
|
|
|
|
$buf->{offset} += 8; |
19
|
0
|
|
|
|
|
|
net_to_int64( $buf->bytes($off, 8) ); |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub put_int64 { |
23
|
0
|
|
|
0
|
1
|
|
my $buf = shift; |
24
|
0
|
|
|
|
|
|
$buf->{buf} .= int64_to_net($_[0]); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub get_attributes { |
28
|
0
|
|
|
0
|
1
|
|
my $buf = shift; |
29
|
0
|
|
|
|
|
|
Net::SFTP::Attributes->new(Buffer => $buf); |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub put_attributes { |
33
|
0
|
|
|
0
|
1
|
|
my $buf = shift; |
34
|
0
|
|
|
|
|
|
$buf->{buf} .= $_[0]->as_buffer->bytes; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
1; |
38
|
|
|
|
|
|
|
__END__ |