2 * Remote quota protocol
3 * Requires unix authentication
7 %#include <sys/cdefs.h>
9 %/*static char sccsid[] = "from: @(#)rquota.x 1.2 87/09/20 Copyr 1987 Sun Micro";*/
10 %/*static char sccsid[] = "from: @(#)rquota.x 2.1 88/08/01 4.0 RPCSRC";*/
11 %__RCSID("$NetBSD: rquota.x,v 1.5 2003/02/14 14:55:58 bouyer Exp $");
12 %#endif /* not __lint__ */
15 const RQ_PATHLEN = 1024;
17 struct getquota_args {
18 string gqa_pathp<RQ_PATHLEN>; /* path to filesystem of interest */
19 int gqa_uid; /* inquire about quota for uid */
22 const RQUOTA_MAXQUOTAS = 0x02;
23 const RQUOTA_USRQUOTA = 0x00;
24 const RQUOTA_GRPQUOTA = 0x01;
26 struct ext_getquota_args {
27 string gqa_pathp<RQ_PATHLEN>; /* path to filesystem of interest */
28 int gqa_type; /* type of quota */
29 int gqa_id; /* inquire about quota for uid/gid */
33 * remote quota structure
36 int rq_bsize; /* block size for block counts */
37 bool rq_active; /* indicates whether quota is active */
38 unsigned int rq_bhardlimit; /* absolute limit on disk blks alloc */
39 unsigned int rq_bsoftlimit; /* preferred limit on disk blks */
40 unsigned int rq_curblocks; /* current block count */
41 unsigned int rq_fhardlimit; /* absolute limit on allocated files */
42 unsigned int rq_fsoftlimit; /* preferred file limit */
43 unsigned int rq_curfiles; /* current # allocated files */
44 unsigned int rq_btimeleft; /* time left for excessive disk use */
45 unsigned int rq_ftimeleft; /* time left for excessive files */
49 Q_OK = 1, /* quota returned */
50 Q_NOQUOTA = 2, /* noquota for uid */
51 Q_EPERM = 3 /* no permission to access quota */
54 union getquota_rslt switch (gqr_status status) {
56 rquota gqr_rquota; /* valid if status == Q_OK */
69 RQUOTAPROC_GETQUOTA(getquota_args) = 1;
72 * Get active quotas only
75 RQUOTAPROC_GETACTIVEQUOTA(getquota_args) = 2;
77 version EXT_RQUOTAVERS {
82 RQUOTAPROC_GETQUOTA(ext_getquota_args) = 1;
85 * Get active quotas only
88 RQUOTAPROC_GETACTIVEQUOTA(ext_getquota_args) = 2;