2 * Remote quota protocol
3 * Requires unix authentication
6 const RQ_PATHLEN = 1024;
9 unsigned int rq_bhardlimit; /* absolute limit on disk blks alloc */
10 unsigned int rq_bsoftlimit; /* preferred limit on disk blks */
11 unsigned int rq_curblocks; /* current block count */
12 unsigned int rq_fhardlimit; /* absolute limit on allocated files */
13 unsigned int rq_fsoftlimit; /* preferred file limit */
14 unsigned int rq_curfiles; /* current # allocated files */
15 unsigned int rq_btimeleft; /* time left for excessive disk use */
16 unsigned int rq_ftimeleft; /* time left for excessive files */
19 struct getquota_args {
20 string gqa_pathp<RQ_PATHLEN>; /* path to filesystem of interest */
21 int gqa_uid; /* Inquire about quota for uid */
24 struct setquota_args {
26 string sqa_pathp<RQ_PATHLEN>; /* path to filesystem of interest */
27 int sqa_id; /* Set quota for uid */
31 struct ext_getquota_args {
32 string gqa_pathp<RQ_PATHLEN>; /* path to filesystem of interest */
33 int gqa_type; /* Type of quota info is needed about */
34 int gqa_id; /* Inquire about quota for id */
37 struct ext_setquota_args {
39 string sqa_pathp<RQ_PATHLEN>; /* path to filesystem of interest */
40 int sqa_id; /* Set quota for id */
41 int sqa_type; /* Type of quota to set */
46 * remote quota structure
49 int rq_bsize; /* block size for block counts */
50 bool rq_active; /* indicates whether quota is active */
51 unsigned int rq_bhardlimit; /* absolute limit on disk blks alloc */
52 unsigned int rq_bsoftlimit; /* preferred limit on disk blks */
53 unsigned int rq_curblocks; /* current block count */
54 unsigned int rq_fhardlimit; /* absolute limit on allocated files */
55 unsigned int rq_fsoftlimit; /* preferred file limit */
56 unsigned int rq_curfiles; /* current # allocated files */
57 unsigned int rq_btimeleft; /* time left for excessive disk use */
58 unsigned int rq_ftimeleft; /* time left for excessive files */
62 Q_OK = 1, /* quota returned */
63 Q_NOQUOTA = 2, /* noquota for uid */
64 Q_EPERM = 3 /* no permission to access quota */
67 union getquota_rslt switch (gqr_status status) {
69 rquota gqr_rquota; /* valid if status == Q_OK */
76 union setquota_rslt switch (gqr_status status) {
78 rquota sqr_rquota; /* valid if status == Q_OK */
91 RQUOTAPROC_GETQUOTA(getquota_args) = 1;
94 * Get active quotas only
97 RQUOTAPROC_GETACTIVEQUOTA(getquota_args) = 2;
103 RQUOTAPROC_SETQUOTA(setquota_args) = 3;
106 * Get active quotas only
109 RQUOTAPROC_SETACTIVEQUOTA(setquota_args) = 4;
111 version EXT_RQUOTAVERS {
116 RQUOTAPROC_GETQUOTA(ext_getquota_args) = 1;
119 * Get active quotas only
122 RQUOTAPROC_GETACTIVEQUOTA(ext_getquota_args) = 2;
128 RQUOTAPROC_SETQUOTA(ext_setquota_args) = 3;
131 * Set active quotas only
134 RQUOTAPROC_SETACTIVEQUOTA(ext_setquota_args) = 4;