Add myself for packaging copyright and some minor tweaks
[deb_libnfs.git] / rquota / libnfs-raw-rquota.h
1 /*
2 Copyright (c) 2014, Ronnie Sahlberg
3 All rights reserved.
4
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions are met:
7
8 1. Redistributions of source code must retain the above copyright notice, this
9 list of conditions and the following disclaimer.
10 2. Redistributions in binary form must reproduce the above copyright notice,
11 this list of conditions and the following disclaimer in the documentation
12 and/or other materials provided with the distribution.
13
14 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
15 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
18 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
21 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
23 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24
25 The views and conclusions contained in the software and documentation are those
26 of the authors and should not be interpreted as representing official policies,
27 either expressed or implied, of the FreeBSD Project.
28 */
29
30 /*
31 * Please do not edit this file.
32 * It was generated using rpcgen.
33 */
34
35 #ifndef _RQUOTA_H_RPCGEN
36 #define _RQUOTA_H_RPCGEN
37
38
39
40
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44
45 #define RQUOTAPATHLEN 1024
46
47 enum rquotastat {
48 RQUOTA_OK = 1,
49 RQUOTA_NOQUOTA = 2,
50 RQUOTA_EPERM = 3,
51 };
52 typedef enum rquotastat rquotastat;
53
54 typedef char *exportpath;
55
56 struct GETQUOTA1args {
57 exportpath export;
58 int uid;
59 };
60 typedef struct GETQUOTA1args GETQUOTA1args;
61
62 enum quotatype {
63 RQUOTA_TYPE_UID = 0,
64 RQUOTA_TYPE_GID = 1,
65 };
66 typedef enum quotatype quotatype;
67
68 struct GETQUOTA2args {
69 exportpath export;
70 quotatype type;
71 int uid;
72 };
73 typedef struct GETQUOTA2args GETQUOTA2args;
74
75 struct GETQUOTA1res_ok {
76 int bsize;
77 int active;
78 int bhardlimit;
79 int bsoftlimit;
80 int curblocks;
81 int fhardlimit;
82 int fsoftlimit;
83 int curfiles;
84 int btimeleft;
85 int ftimeleft;
86 };
87 typedef struct GETQUOTA1res_ok GETQUOTA1res_ok;
88
89 struct GETQUOTA1res {
90 rquotastat status;
91 union {
92 GETQUOTA1res_ok quota;
93 } GETQUOTA1res_u;
94 };
95 typedef struct GETQUOTA1res GETQUOTA1res;
96
97 #define RQUOTA_PROGRAM 100011
98 #define RQUOTA_V1 1
99
100 #if defined(__STDC__) || defined(__cplusplus)
101 #define RQUOTA1_NULL 0
102 extern void * rquota1_null_1(void *, CLIENT *);
103 extern void * rquota1_null_1_svc(void *, struct svc_req *);
104 #define RQUOTA1_GETQUOTA 1
105 extern GETQUOTA1res * rquota1_getquota_1(GETQUOTA1args *, CLIENT *);
106 extern GETQUOTA1res * rquota1_getquota_1_svc(GETQUOTA1args *, struct svc_req *);
107 #define RQUOTA1_GETACTIVEQUOTA 2
108 extern GETQUOTA1res * rquota1_getactivequota_1(GETQUOTA1args *, CLIENT *);
109 extern GETQUOTA1res * rquota1_getactivequota_1_svc(GETQUOTA1args *, struct svc_req *);
110 extern int rquota_program_1_freeresult (SVCXPRT *, zdrproc_t, caddr_t);
111
112 #else /* K&R C */
113 #define RQUOTA1_NULL 0
114 extern void * rquota1_null_1();
115 extern void * rquota1_null_1_svc();
116 #define RQUOTA1_GETQUOTA 1
117 extern GETQUOTA1res * rquota1_getquota_1();
118 extern GETQUOTA1res * rquota1_getquota_1_svc();
119 #define RQUOTA1_GETACTIVEQUOTA 2
120 extern GETQUOTA1res * rquota1_getactivequota_1();
121 extern GETQUOTA1res * rquota1_getactivequota_1_svc();
122 extern int rquota_program_1_freeresult ();
123 #endif /* K&R C */
124 #define RQUOTA_V2 2
125
126 #if defined(__STDC__) || defined(__cplusplus)
127 #define RQUOTA2_NULL 0
128 extern void * rquota2_null_2(void *, CLIENT *);
129 extern void * rquota2_null_2_svc(void *, struct svc_req *);
130 #define RQUOTA2_GETQUOTA 1
131 extern GETQUOTA1res * rquota2_getquota_2(GETQUOTA2args *, CLIENT *);
132 extern GETQUOTA1res * rquota2_getquota_2_svc(GETQUOTA2args *, struct svc_req *);
133 #define RQUOTA2_GETACTIVEQUOTA 2
134 extern GETQUOTA1res * rquota2_getactivequota_2(GETQUOTA2args *, CLIENT *);
135 extern GETQUOTA1res * rquota2_getactivequota_2_svc(GETQUOTA2args *, struct svc_req *);
136 extern int rquota_program_2_freeresult (SVCXPRT *, zdrproc_t, caddr_t);
137
138 #else /* K&R C */
139 #define RQUOTA2_NULL 0
140 extern void * rquota2_null_2();
141 extern void * rquota2_null_2_svc();
142 #define RQUOTA2_GETQUOTA 1
143 extern GETQUOTA1res * rquota2_getquota_2();
144 extern GETQUOTA1res * rquota2_getquota_2_svc();
145 #define RQUOTA2_GETACTIVEQUOTA 2
146 extern GETQUOTA1res * rquota2_getactivequota_2();
147 extern GETQUOTA1res * rquota2_getactivequota_2_svc();
148 extern int rquota_program_2_freeresult ();
149 #endif /* K&R C */
150
151 /* the zdr functions */
152
153 #if defined(__STDC__) || defined(__cplusplus)
154 extern bool_t zdr_rquotastat (ZDR *, rquotastat*);
155 extern bool_t zdr_exportpath (ZDR *, exportpath*);
156 extern bool_t zdr_GETQUOTA1args (ZDR *, GETQUOTA1args*);
157 extern bool_t zdr_quotatype (ZDR *, quotatype*);
158 extern bool_t zdr_GETQUOTA2args (ZDR *, GETQUOTA2args*);
159 extern bool_t zdr_GETQUOTA1res_ok (ZDR *, GETQUOTA1res_ok*);
160 extern bool_t zdr_GETQUOTA1res (ZDR *, GETQUOTA1res*);
161
162 #else /* K&R C */
163 extern bool_t zdr_rquotastat ();
164 extern bool_t zdr_exportpath ();
165 extern bool_t zdr_GETQUOTA1args ();
166 extern bool_t zdr_quotatype ();
167 extern bool_t zdr_GETQUOTA2args ();
168 extern bool_t zdr_GETQUOTA1res_ok ();
169 extern bool_t zdr_GETQUOTA1res ();
170
171 #endif /* K&R C */
172
173 #ifdef __cplusplus
174 }
175 #endif
176
177 #endif /* !_RQUOTA_H_RPCGEN */