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>
13 const RQ_PATHLEN = 1024;
16 unsigned int rq_bhardlimit; /* absolute limit on disk blks alloc */
17 unsigned int rq_bsoftlimit; /* preferred limit on disk blks */
18 unsigned int rq_curblocks; /* current block count */
19 unsigned int rq_fhardlimit; /* absolute limit on allocated files */
20 unsigned int rq_fsoftlimit; /* preferred file limit */
21 unsigned int rq_curfiles; /* current # allocated files */
22 unsigned int rq_btimeleft; /* time left for excessive disk use */
23 unsigned int rq_ftimeleft; /* time left for excessive files */
26 struct getquota_args {
27 string gqa_pathp<RQ_PATHLEN>; /* path to filesystem of interest */
28 int gqa_uid; /* Inquire about quota for uid */
31 struct setquota_args {
33 string sqa_pathp<RQ_PATHLEN>; /* path to filesystem of interest */
34 int sqa_id; /* Set quota for uid */
38 struct ext_getquota_args {
39 string gqa_pathp<RQ_PATHLEN>; /* path to filesystem of interest */
40 int gqa_type; /* Type of quota info is needed about */
41 int gqa_id; /* Inquire about quota for id */
44 struct ext_setquota_args {
46 string sqa_pathp<RQ_PATHLEN>; /* path to filesystem of interest */
47 int sqa_id; /* Set quota for id */
48 int sqa_type; /* Type of quota to set */
53 * remote quota structure
56 int rq_bsize; /* block size for block counts */
57 bool rq_active; /* indicates whether quota is active */
58 unsigned int rq_bhardlimit; /* absolute limit on disk blks alloc */
59 unsigned int rq_bsoftlimit; /* preferred limit on disk blks */
60 unsigned int rq_curblocks; /* current block count */
61 unsigned int rq_fhardlimit; /* absolute limit on allocated files */
62 unsigned int rq_fsoftlimit; /* preferred file limit */
63 unsigned int rq_curfiles; /* current # allocated files */
64 unsigned int rq_btimeleft; /* time left for excessive disk use */
65 unsigned int rq_ftimeleft; /* time left for excessive files */
69 Q_OK = 1, /* quota returned */
70 Q_NOQUOTA = 2, /* noquota for uid */
71 Q_EPERM = 3 /* no permission to access quota */
74 union getquota_rslt switch (gqr_status status) {
76 rquota gqr_rquota; /* valid if status == Q_OK */
83 union setquota_rslt switch (gqr_status status) {
85 rquota sqr_rquota; /* valid if status == Q_OK */
98 RQUOTAPROC_GETQUOTA(getquota_args) = 1;
101 * Get active quotas only
104 RQUOTAPROC_GETACTIVEQUOTA(getquota_args) = 2;
110 RQUOTAPROC_SETQUOTA(setquota_args) = 3;
113 * Get active quotas only
116 RQUOTAPROC_SETACTIVEQUOTA(setquota_args) = 4;
118 version EXT_RQUOTAVERS {
123 RQUOTAPROC_GETQUOTA(ext_getquota_args) = 1;
126 * Get active quotas only
129 RQUOTAPROC_GETACTIVEQUOTA(ext_getquota_args) = 2;
135 RQUOTAPROC_SETQUOTA(ext_setquota_args) = 3;
138 * Set active quotas only
141 RQUOTAPROC_SETACTIVEQUOTA(ext_setquota_args) = 4;