2.9
[glibc/nacl-glibc.git] / sunrpc / rpcsvc / rquota.x
blob62888f612a787679eceedc69794e3118f2fadd9e
1 /* @(#)rquota.x 2.1 88/08/01 4.0 RPCSRC */
2 /* @(#)rquota.x 1.2 87/09/20 Copyr 1987 Sun Micro */
4 /*
5  * Remote quota protocol
6  * Requires unix authentication
7  */
9 const RQ_PATHLEN = 1024;
11 struct getquota_args {
12         string gqa_pathp<RQ_PATHLEN>;   /* path to filesystem of interest */
13         int gqa_uid;                    /* inquire about quota for uid */
17  * remote quota structure
18  */
19 struct rquota {
20         int rq_bsize;                   /* block size for block counts */
21         bool rq_active;                 /* indicates whether quota is active */
22         unsigned int rq_bhardlimit;     /* absolute limit on disk blks alloc */
23         unsigned int rq_bsoftlimit;     /* preferred limit on disk blks */
24         unsigned int rq_curblocks;      /* current block count */
25         unsigned int rq_fhardlimit;     /* absolute limit on allocated files */
26         unsigned int rq_fsoftlimit;     /* preferred file limit */
27         unsigned int rq_curfiles;       /* current # allocated files */
28         unsigned int rq_btimeleft;      /* time left for excessive disk use */
29         unsigned int rq_ftimeleft;      /* time left for excessive files */
30 };      
32 enum gqr_status {
33         Q_OK = 1,               /* quota returned */
34         Q_NOQUOTA = 2,          /* noquota for uid */
35         Q_EPERM = 3             /* no permission to access quota */
38 union getquota_rslt switch (gqr_status status) {
39 case Q_OK:
40         rquota gqr_rquota;      /* valid if status == Q_OK */
41 case Q_NOQUOTA:
42         void;
43 case Q_EPERM:
44         void;
47 program RQUOTAPROG {
48         version RQUOTAVERS {
49                 /*
50                  * Get all quotas
51                  */
52                 getquota_rslt
53                 RQUOTAPROC_GETQUOTA(getquota_args) = 1;
55                 /*
56                  * Get active quotas only
57                  */
58                 getquota_rslt
59                 RQUOTAPROC_GETACTIVEQUOTA(getquota_args) = 2;
60         } = 1;
61 } = 100011;