source: rtems/cpukit/librpc/include/rpcsvc/rquota.x @ f26145b

4.104.114.84.95
Last change on this file since f26145b was df49c60, checked in by Joel Sherrill <joel.sherrill@…>, on 06/12/00 at 15:00:15

Merged from 4.5.0-beta3a

  • Property mode set to 100644
File size: 1.8 KB
Line 
1/*
2 * Remote quota protocol
3 * Requires unix authentication
4 */
5
6#ifndef RPC_HDR
7%#ifndef lint
8%/*static char sccsid[] = "from: @(#)rquota.x 1.2 87/09/20 Copyr 1987 Sun Micro";*/
9%/*static char sccsid[] = "from: @(#)rquota.x   2.1 88/08/01 4.0 RPCSRC";*/
10%static const char rcsid[] =
11%  "$FreeBSD: src/include/rpcsvc/rquota.x,v 1.6 1999/08/27 23:45:10 peter Exp $";
12%#endif /* not lint */
13#endif
14
15const RQ_PATHLEN = 1024;
16
17struct getquota_args {
18        string gqa_pathp<RQ_PATHLEN>;   /* path to filesystem of interest */
19        int gqa_uid;                    /* inquire about quota for uid */
20};
21
22/*
23 * remote quota structure
24 */
25struct rquota {
26        int rq_bsize;                   /* block size for block counts */
27        bool rq_active;                 /* indicates whether quota is active */
28        unsigned int rq_bhardlimit;     /* absolute limit on disk blks alloc */
29        unsigned int rq_bsoftlimit;     /* preferred limit on disk blks */
30        unsigned int rq_curblocks;      /* current block count */
31        unsigned int rq_fhardlimit;     /* absolute limit on allocated files */
32        unsigned int rq_fsoftlimit;     /* preferred file limit */
33        unsigned int rq_curfiles;       /* current # allocated files */
34        unsigned int rq_btimeleft;      /* time left for excessive disk use */
35        unsigned int rq_ftimeleft;      /* time left for excessive files */
36};     
37
38enum gqr_status {
39        Q_OK = 1,               /* quota returned */
40        Q_NOQUOTA = 2,          /* noquota for uid */
41        Q_EPERM = 3             /* no permission to access quota */
42};
43
44union getquota_rslt switch (gqr_status status) {
45case Q_OK:
46        rquota gqr_rquota;      /* valid if status == Q_OK */
47case Q_NOQUOTA:
48        void;
49case Q_EPERM:
50        void;
51};
52
53program RQUOTAPROG {
54        version RQUOTAVERS {
55                /*
56                 * Get all quotas
57                 */
58                getquota_rslt
59                RQUOTAPROC_GETQUOTA(getquota_args) = 1;
60
61                /*
62                 * Get active quotas only
63                 */
64                getquota_rslt
65                RQUOTAPROC_GETACTIVEQUOTA(getquota_args) = 2;
66        } = 1;
67} = 100011;
Note: See TracBrowser for help on using the repository browser.