1 /* @(#)rquota.x 2.1 88/08/01 4.0 RPCSRC */
2 /* @(#)rquota.x 1.2 87/09/20 Copyr 1987 Sun Micro */
5 * Remote quota protocol
6 * Requires unix authentication
10 %#include <sys/cdefs.h>
11 %__FBSDID("$FreeBSD$");
14 const RQ_PATHLEN = 1024;
17 unsigned int rq_bhardlimit; /* absolute limit on disk blks alloc */
18 unsigned int rq_bsoftlimit; /* preferred limit on disk blks */
19 unsigned int rq_curblocks; /* current block count */
20 unsigned int rq_fhardlimit; /* absolute limit on allocated files */
21 unsigned int rq_fsoftlimit; /* preferred file limit */
22 unsigned int rq_curfiles; /* current # allocated files */
23 unsigned int rq_btimeleft; /* time left for excessive disk use */
24 unsigned int rq_ftimeleft; /* time left for excessive files */
27 struct getquota_args {
28 string gqa_pathp<RQ_PATHLEN>; /* path to filesystem of interest */
29 int gqa_uid; /* Inquire about quota for uid */
32 struct setquota_args {
34 string sqa_pathp<RQ_PATHLEN>; /* path to filesystem of interest */
35 int sqa_id; /* Set quota for uid */
39 struct ext_getquota_args {
40 string gqa_pathp<RQ_PATHLEN>; /* path to filesystem of interest */
41 int gqa_type; /* Type of quota info is needed about */
42 int gqa_id; /* Inquire about quota for id */
45 struct ext_setquota_args {
47 string sqa_pathp<RQ_PATHLEN>; /* path to filesystem of interest */
48 int sqa_id; /* Set quota for id */
49 int sqa_type; /* Type of quota to set */
54 * remote quota structure
57 int rq_bsize; /* block size for block counts */
58 bool rq_active; /* indicates whether quota is active */
59 unsigned int rq_bhardlimit; /* absolute limit on disk blks alloc */
60 unsigned int rq_bsoftlimit; /* preferred limit on disk blks */
61 unsigned int rq_curblocks; /* current block count */
62 unsigned int rq_fhardlimit; /* absolute limit on allocated files */
63 unsigned int rq_fsoftlimit; /* preferred file limit */
64 unsigned int rq_curfiles; /* current # allocated files */
65 unsigned int rq_btimeleft; /* time left for excessive disk use */
66 unsigned int rq_ftimeleft; /* time left for excessive files */
70 Q_OK = 1, /* quota returned */
71 Q_NOQUOTA = 2, /* noquota for uid */
72 Q_EPERM = 3 /* no permission to access quota */
75 union getquota_rslt switch (gqr_status status) {
77 rquota gqr_rquota; /* valid if status == Q_OK */
84 union setquota_rslt switch (gqr_status status) {
86 rquota sqr_rquota; /* valid if status == Q_OK */
99 RQUOTAPROC_GETQUOTA(getquota_args) = 1;
102 * Get active quotas only
105 RQUOTAPROC_GETACTIVEQUOTA(getquota_args) = 2;
111 RQUOTAPROC_SETQUOTA(setquota_args) = 3;
114 * Get active quotas only
117 RQUOTAPROC_SETACTIVEQUOTA(setquota_args) = 4;
119 version EXT_RQUOTAVERS {
124 RQUOTAPROC_GETQUOTA(ext_getquota_args) = 1;
127 * Get active quotas only
130 RQUOTAPROC_GETACTIVEQUOTA(ext_getquota_args) = 2;
136 RQUOTAPROC_SETQUOTA(ext_setquota_args) = 3;
139 * Set active quotas only
142 RQUOTAPROC_SETACTIVEQUOTA(ext_setquota_args) = 4;