Simplify the upgrade path handling from PPA.
[deb_libnfs.git] / rquota / libnfs-raw-rquota.h
CommitLineData
f1f22dbf
RRS
1/*
2Copyright (c) 2014, Ronnie Sahlberg
3All rights reserved.
4
5Redistribution and use in source and binary forms, with or without
6modification, are permitted provided that the following conditions are met:
7
81. Redistributions of source code must retain the above copyright notice, this
9 list of conditions and the following disclaimer.
102. 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
14THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
15ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
18ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
21ON 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
23SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24
25The views and conclusions contained in the software and documentation are those
26of the authors and should not be interpreted as representing official policies,
27either expressed or implied, of the FreeBSD Project.
28*/
29
ee872606
RRS
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
c76fd719 38#include <nfsc/libnfs-zdr.h>
f1f22dbf 39
ee872606
RRS
40
41#ifdef __cplusplus
42extern "C" {
43#endif
44
45#define RQUOTAPATHLEN 1024
46
47enum rquotastat {
48 RQUOTA_OK = 1,
49 RQUOTA_NOQUOTA = 2,
50 RQUOTA_EPERM = 3,
51};
52typedef enum rquotastat rquotastat;
53
54typedef char *exportpath;
55
56struct GETQUOTA1args {
57 exportpath export;
58 int uid;
59};
60typedef struct GETQUOTA1args GETQUOTA1args;
61
62enum quotatype {
63 RQUOTA_TYPE_UID = 0,
64 RQUOTA_TYPE_GID = 1,
65};
66typedef enum quotatype quotatype;
67
68struct GETQUOTA2args {
69 exportpath export;
70 quotatype type;
71 int uid;
72};
73typedef struct GETQUOTA2args GETQUOTA2args;
74
75struct 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};
87typedef struct GETQUOTA1res_ok GETQUOTA1res_ok;
88
89struct GETQUOTA1res {
90 rquotastat status;
91 union {
92 GETQUOTA1res_ok quota;
93 } GETQUOTA1res_u;
94};
95typedef 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
c76fd719 102extern void * rquota1_null_1(void *, void *);
ee872606
RRS
103extern void * rquota1_null_1_svc(void *, struct svc_req *);
104#define RQUOTA1_GETQUOTA 1
c76fd719 105extern GETQUOTA1res * rquota1_getquota_1(GETQUOTA1args *, void *);
ee872606
RRS
106extern GETQUOTA1res * rquota1_getquota_1_svc(GETQUOTA1args *, struct svc_req *);
107#define RQUOTA1_GETACTIVEQUOTA 2
c76fd719 108extern GETQUOTA1res * rquota1_getactivequota_1(GETQUOTA1args *, void *);
ee872606 109extern GETQUOTA1res * rquota1_getactivequota_1_svc(GETQUOTA1args *, struct svc_req *);
c76fd719 110extern int rquota_program_1_freeresult (void *, zdrproc_t, caddr_t);
ee872606
RRS
111
112#else /* K&R C */
113#define RQUOTA1_NULL 0
114extern void * rquota1_null_1();
115extern void * rquota1_null_1_svc();
116#define RQUOTA1_GETQUOTA 1
117extern GETQUOTA1res * rquota1_getquota_1();
118extern GETQUOTA1res * rquota1_getquota_1_svc();
119#define RQUOTA1_GETACTIVEQUOTA 2
120extern GETQUOTA1res * rquota1_getactivequota_1();
121extern GETQUOTA1res * rquota1_getactivequota_1_svc();
122extern 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
c76fd719 128extern void * rquota2_null_2(void *, void *);
ee872606
RRS
129extern void * rquota2_null_2_svc(void *, struct svc_req *);
130#define RQUOTA2_GETQUOTA 1
c76fd719 131extern GETQUOTA1res * rquota2_getquota_2(GETQUOTA2args *, void *);
ee872606
RRS
132extern GETQUOTA1res * rquota2_getquota_2_svc(GETQUOTA2args *, struct svc_req *);
133#define RQUOTA2_GETACTIVEQUOTA 2
c76fd719 134extern GETQUOTA1res * rquota2_getactivequota_2(GETQUOTA2args *, void *);
ee872606 135extern GETQUOTA1res * rquota2_getactivequota_2_svc(GETQUOTA2args *, struct svc_req *);
c76fd719 136extern int rquota_program_2_freeresult (void *, zdrproc_t, caddr_t);
ee872606
RRS
137
138#else /* K&R C */
139#define RQUOTA2_NULL 0
140extern void * rquota2_null_2();
141extern void * rquota2_null_2_svc();
142#define RQUOTA2_GETQUOTA 1
143extern GETQUOTA1res * rquota2_getquota_2();
144extern GETQUOTA1res * rquota2_getquota_2_svc();
145#define RQUOTA2_GETACTIVEQUOTA 2
146extern GETQUOTA1res * rquota2_getactivequota_2();
147extern GETQUOTA1res * rquota2_getactivequota_2_svc();
148extern int rquota_program_2_freeresult ();
149#endif /* K&R C */
150
151/* the zdr functions */
152
153#if defined(__STDC__) || defined(__cplusplus)
c76fd719
BR
154extern uint32_t zdr_rquotastat (ZDR *, rquotastat*);
155extern uint32_t zdr_exportpath (ZDR *, exportpath*);
156extern uint32_t zdr_GETQUOTA1args (ZDR *, GETQUOTA1args*);
157extern uint32_t zdr_quotatype (ZDR *, quotatype*);
158extern uint32_t zdr_GETQUOTA2args (ZDR *, GETQUOTA2args*);
159extern uint32_t zdr_GETQUOTA1res_ok (ZDR *, GETQUOTA1res_ok*);
160extern uint32_t zdr_GETQUOTA1res (ZDR *, GETQUOTA1res*);
ee872606
RRS
161
162#else /* K&R C */
c76fd719
BR
163extern uint32_t zdr_rquotastat ();
164extern uint32_t zdr_exportpath ();
165extern uint32_t zdr_GETQUOTA1args ();
166extern uint32_t zdr_quotatype ();
167extern uint32_t zdr_GETQUOTA2args ();
168extern uint32_t zdr_GETQUOTA1res_ok ();
169extern uint32_t zdr_GETQUOTA1res ();
ee872606
RRS
170
171#endif /* K&R C */
172
173#ifdef __cplusplus
174}
175#endif
176
177#endif /* !_RQUOTA_H_RPCGEN */