| 1 | package MooseFS::Exports; | ||||||||||
| 2 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 1 | ▶ | use IO::Socket::INET; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 1 | ▶ | use Moo; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | 1 | extends 'MooseFS'; | |||||||||
| 8 | |||||||||||
| 9 | has list => ( | ||||||||||
| 10 | is => 'rw', | ||||||||||
| 11 | 0 | ▶ | default => sub { [] } | ||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||
| 12 | 1 | ); | |||||||||
| 13 | |||||||||||
| 14 | 0 | ▶ | sub BUILD { | ||||||||
|
Subroutine
BUILD: not called CC=5 SCAR=34.0
Pod
undocumented
| |||||||||||
| 15 | 0 | my $self = shift; | |||||||||
| 16 | 0 | my $s = $self->sock; | |||||||||
| 17 | 0 | print $s pack('(LL)>', 520, 0); | |||||||||
| 18 | 0 | my $header = $self->myrecv($s, 8); | |||||||||
| 19 | 0 | my ($cmd, $length) = unpack('(LL)>', $header); | |||||||||
| 20 | 0 | ▶ | if ( $cmd == 521 ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 21 | 0 | my $data = $self->myrecv($s, $length); | |||||||||
| 22 | 0 | my $pos = 0; | |||||||||
| 23 | 0 | ▶ | while ( $pos < $length ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 24 | 0 | my ($fip1, $fip2, $fip3, $fip4, $tip1, $tip2, $tip3, $tip4, $pleng) = unpack("(CCCCCCCCL)>", substr($data, $pos, 12)); | |||||||||
| 25 | 0 | $pos += 12; | |||||||||
| 26 | 0 | my $path = substr($data, $pos, $pleng); | |||||||||
| 27 | 0 | $pos += $pleng; | |||||||||
| 28 | 0 | my ($v1, $v2, $v3, $exportflags, $sesflags, $rootuid, $rootgid, $mapalluid, $mapallgid) = unpack("(SCCCCLLLL)>", substr($data, $pos, 22)); | |||||||||
| 29 | 0 | $pos += 22; | |||||||||
| 30 | |||||||||||
| 31 | 0 | ▶ | if ( ($sesflags & 16) == 0) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 32 | 0 | $mapalluid = undef; | |||||||||
| 33 | 0 | $mapallgid = undef; | |||||||||
| 34 | }; | ||||||||||
| 35 | |||||||||||
| 36 | 0 | ▶ | push @{$self->list}, { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 37 | ip_range_from => "$fip1.$fip2.$fip3.$fip4", | ||||||||||
| 38 | ip_range_to => "$tip1.$tip2.$tip3.$tip4", | ||||||||||
| 39 | path => $path, | ||||||||||
| 40 | meta => $path eq '.' ? 1 : 0, | ||||||||||
| 41 | version => "$v1.$v2.$v3", | ||||||||||
| 42 | export_flags => $exportflags, | ||||||||||
| 43 | ses_flags => $sesflags, | ||||||||||
| 44 | root_uid => $rootuid, | ||||||||||
| 45 | root_gid => $rootgid, | ||||||||||
| 46 | all_users_uid => $mapalluid, | ||||||||||
| 47 | all_users_gid => $mapallgid, | ||||||||||
| 48 | }; | ||||||||||
| 49 | } | ||||||||||
| 50 | } | ||||||||||
| 51 | } | ||||||||||
| 52 | |||||||||||
| 53 | 1 | 1; | |||||||||