]> git.decadent.org.uk Git - nfs-utils.git/blob - utils/rquotad/rquota.h
f81e732a71ffa67660cdc0cbe01df8c748d9e3f3
[nfs-utils.git] / utils / rquotad / rquota.h
1 #define RQ_PATHLEN 1024
2
3 struct getquota_args {
4         char *gqa_pathp;
5         int gqa_uid;
6 };
7 typedef struct getquota_args getquota_args;
8 bool_t xdr_getquota_args();
9
10
11 struct ext_getquota_args {
12         char *gqa_pathp;
13         int gqa_type;
14         int gqa_id;
15 };
16 typedef struct ext_getquota_args ext_getquota_args;
17 bool_t xdr_ext_getquota_args();
18
19
20 struct rquota {
21         int rq_bsize;
22         bool_t rq_active;
23         u_int rq_bhardlimit;
24         u_int rq_bsoftlimit;
25         u_int rq_curblocks;
26         u_int rq_fhardlimit;
27         u_int rq_fsoftlimit;
28         u_int rq_curfiles;
29         u_int rq_btimeleft;
30         u_int rq_ftimeleft;
31 };
32 typedef struct rquota rquota;
33 bool_t xdr_rquota();
34
35
36 enum gqr_status {
37         Q_OK = 1,
38         Q_NOQUOTA = 2,
39         Q_EPERM = 3,
40 };
41 typedef enum gqr_status gqr_status;
42 bool_t xdr_gqr_status();
43
44
45 struct getquota_rslt {
46         gqr_status status;
47         union {
48                 rquota gqr_rquota;
49         } getquota_rslt_u;
50 };
51 typedef struct getquota_rslt getquota_rslt;
52 bool_t xdr_getquota_rslt();
53
54
55 #define RQUOTAPROG ((u_long)100011)
56 #define RQUOTAVERS ((u_long)1)
57 #define RQUOTAPROC_GETQUOTA ((u_long)1)
58 extern getquota_rslt *rquotaproc_getquota_1();
59 #define RQUOTAPROC_GETACTIVEQUOTA ((u_long)2)
60 extern getquota_rslt *rquotaproc_getactivequota_1();
61 #define EXT_RQUOTAVERS ((u_long)2)
62 extern getquota_rslt *rquotaproc_getquota_2();
63 extern getquota_rslt *rquotaproc_getactivequota_2();
64