XDR/RPC/Call.pm

filter: Statementstmt 100% 34 / 34 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 12 / 12 Podpod 0.0% 0 / 6 totaltotal 88.4% 46 / 52 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« XDR/Encode.pm ↑ Summary XDR.pm »
1 # Call.pm - SunRPC call packets
2 # Copyright (C) 2000 Mountain View Data, Inc.
3 # Written by Gordon Matzigkeit <gord@fig.org>, 2000-12-18
4 #
5 # This file is part of Perl XDR.
6 #
7 # Perl XDR is free software; you can redistribute it and/or modify it
8 # under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2 of the License, or
10 # (at your option) any later version.
11 #
12 # Perl XDR is distributed in the hope that it will be useful, but
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 # General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20 # USA
21  
22 package XDR::RPC::Call;
23 # [guilt]
24 # [maint
25 # File: Call.pm
26 # Summary: SunRPC call packets
27 # Package: Perl XDR
28 # Owner: Mountain View Data, Inc.
29 # Years: 2000
30 # Author: Gordon Matzigkeit
31 # Contact: <gord@fig.org>
32 # Date: 2000-12-18
33 # License: GPL]
34 # [clemency]
35  
36 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
37  
38 2 ▶use vars qw(@ISA);
Subroutine BEGIN: called CC=1 SCAR=0.0
39 2 @ISA = qw(XDR::RPC);
40  
41 2 ▶use XDR::Decode;
Subroutine BEGIN: called CC=1 SCAR=0.0
42 2 ▶use XDR::RPC;
Subroutine BEGIN: called CC=1 SCAR=0.0
43  
44  
45 sub finish_decode
46 7 ▶{
Subroutine finish_decode: called CC=1 SCAR=0.0
Pod undocumented
47 7 my ($type, $dec, $xid) = @_;
48  
49 7 my ($rpcvers, $prog, $vers, $proc, $cred, $verf) =
50 ($dec->unsigned,
51 $dec->unsigned,
52 $dec->unsigned,
53 $dec->unsigned,
54 $dec->opaque_auth,
55 $dec->opaque_auth);
56  
57 7 my ($args) = $dec->buffer (1);
58 7 return $type->new($xid, [$rpcvers, $prog, $vers, $proc], $args,
59 $cred, $verf);
60 }
61  
62  
63 sub rpcvers
64 5 ▶{
Subroutine rpcvers: called CC=1 SCAR=0.0
Pod undocumented
65 5 my ($self) = @_;
66 5 return $self->private->[0];
67 }
68  
69  
70 sub prog
71 5 ▶{
Subroutine prog: called CC=1 SCAR=0.0
Pod undocumented
72 5 my ($self) = @_;
73 5 return $self->private->[1];
74 }
75  
76  
77 sub vers
78 5 ▶{
Subroutine vers: called CC=1 SCAR=0.0
Pod undocumented
79 5 my ($self) = @_;
80 5 return $self->private->[2];
81 }
82  
83  
84 sub proc
85 5 ▶{
Subroutine proc: called CC=1 SCAR=0.0
Pod undocumented
86 5 my ($self) = @_;
87 5 return $self->private->[3];
88 }
89  
90  
91 # Simple support for replying to an RPC.
92 2 ▶use XDR::Encode qw(reply_packet);
Subroutine BEGIN: called CC=1 SCAR=0.0
93 2 ▶use XDR qw(MSG_ACCEPTED SUCCESS);
Subroutine BEGIN: called CC=1 SCAR=0.0
94 sub reply
95 3 ▶{
Subroutine reply: called CC=1 SCAR=0.0
Pod undocumented
96 3 my ($self, $result) = @_;
97 3 return reply_packet ($self->xid, MSG_ACCEPTED, SUCCESS, $result);
98 }
99  
100  
101 2 1;
« XDR/Encode.pm ↑ Summary XDR.pm »