File Coverage

blib/lib/XDR.pm
Criterion Covered Total %
statement 30 30 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod n/a
total 35 35 100.0


line stmt bran cond sub pod time code
1             # XDR.pm - XDR constants
2             # Copyright (C) 2000 Mountain View Data, Inc.
3             # Written by Gordon Matzigkeit , 2000-12-14
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;
23             # [guilt]
24             # [maint
25             # File: XDR.pm
26             # Summary: XDR constants
27             # Package: Perl XDR
28             # Owner: Mountain View Data, Inc.
29             # Years: 2000
30             # Author: Gordon Matzigkeit
31             # Contact:
32             # Date: 2000-12-14
33             # License: GPL]
34             # [clemency]
35              
36 4     4   917 use strict;
  4         7  
  4         156  
37              
38 4     4   19 use vars qw(@ISA);
  4         6  
  4         200  
39              
40             BEGIN
41             {
42 4     4   20 use Exporter ();
  4         12  
  4         81  
43 4     4   17 use vars qw(@EXPORT_OK %EXPORT_TAGS @ISA $VERSION);
  4         5  
  4         1981  
44 4     4   9 $VERSION = '0.03';
45 4         68 @ISA = qw(Exporter);
46 4         14 $EXPORT_TAGS{vers} = [qw(&RPCVERS)];
47 4         12 $EXPORT_TAGS{auth_flavor} = [qw(&AUTH_NULL &AUTH_UNIX &AUTH_SHORT
48             &AUTH_DES)];
49 4         11 $EXPORT_TAGS{msg_type} = [qw(&CALL &REPLY)];
50 4         11 $EXPORT_TAGS{reply_stat} = [qw(&MSG_ACCEPTED &MSG_DENIED)];
51 4         16 $EXPORT_TAGS{accept_stat} = [qw(&SUCCESS &PROG_UNAVAIL
52             &PROG_MISMATCH &PROC_UNAVAIL
53             &GARBAGE_ARGS &SYSTEM_ERR)];
54 4         235 $EXPORT_TAGS{reject_stat} = [qw(&RPC_MISMATCH &AUTH_ERROR)];
55 4         281 $EXPORT_TAGS{auth_stat} = [qw(&AUTH_BADCRED &AUTH_REJECTEDCRED
56             &AUTH_BADVERF &AUTH_REJECTEDVERF
57             &AUTH_TOOWEAK)];
58 4         18 $EXPORT_TAGS{all} =
59 4         9 [@{$EXPORT_TAGS{vers}}, @{$EXPORT_TAGS{auth_flavor}},
  4         8  
60 4         9 @{$EXPORT_TAGS{msg_type}},
61 4         7 @{$EXPORT_TAGS{reply_stat}}, @{$EXPORT_TAGS{accept_stat}},
  4         15  
62 4         10 @{$EXPORT_TAGS{reject_stat}}, @{$EXPORT_TAGS{auth_stat}}];
  4         35  
63 4         1887 Exporter::export_ok_tags ('all');
64             }
65              
66              
67             # vers
68             sub RPCVERS () {2}
69              
70             # auth_flavor
71             sub AUTH_NULL () {0}
72             sub AUTH_UNIX () {1}
73             sub AUTH_SHORT () {2}
74             sub AUTH_DES () {3}
75              
76             # auth_stat
77             sub AUTH_BADCRED () {1}
78             sub AUTH_REJECTEDCRED () {2}
79             sub AUTH_BADVERF () {3}
80             sub AUTH_REJECTEDVERF () {4}
81             sub AUTH_TOOWEAK () {5}
82              
83             # msg_type
84             sub CALL () {0}
85             sub REPLY () {1}
86              
87             # reply_stat
88             sub MSG_ACCEPTED () {0}
89             sub MSG_DENIED () {1}
90              
91             # accept_stat
92             sub SUCCESS () {0}
93             sub PROG_UNAVAIL () {1}
94             sub PROG_MISMATCH () {2}
95             sub PROC_UNAVAIL () {3}
96             sub GARBAGE_ARGS () {4}
97             sub SYSTEM_ERR () {5}
98              
99             # reject_stat
100             sub RPC_MISMATCH () {0}
101             sub AUTH_ERROR () {1}
102              
103             1;