rquota.x revision 1832
11832Swollman/*
21832Swollman * Remote quota protocol
31832Swollman * Requires unix authentication
41832Swollman */
51832Swollman
61832Swollman#ifndef RPC_HDR
71832Swollman%#ifndef lint
81832Swollman%/*static char sccsid[] = "from: @(#)rquota.x 1.2 87/09/20 Copyr 1987 Sun Micro";*/
91832Swollman%/*static char sccsid[] = "from: @(#)rquota.x	2.1 88/08/01 4.0 RPCSRC";*/
101832Swollman%static char rcsid[] = "$Id: rquota.x,v 1.1 1993/09/14 17:42:49 jtc Exp $";
111832Swollman%#endif /* not lint */
121832Swollman#endif
131832Swollman
141832Swollmanconst RQ_PATHLEN = 1024;
151832Swollman
161832Swollmanstruct getquota_args {
171832Swollman	string gqa_pathp<RQ_PATHLEN>;  	/* path to filesystem of interest */
181832Swollman	int gqa_uid;	        	/* inquire about quota for uid */
191832Swollman};
201832Swollman
211832Swollman/*
221832Swollman * remote quota structure
231832Swollman */
241832Swollmanstruct rquota {
251832Swollman	int rq_bsize;			/* block size for block counts */
261832Swollman	bool rq_active;  		/* indicates whether quota is active */
271832Swollman	unsigned int rq_bhardlimit;	/* absolute limit on disk blks alloc */
281832Swollman	unsigned int rq_bsoftlimit;	/* preferred limit on disk blks */
291832Swollman	unsigned int rq_curblocks;	/* current block count */
301832Swollman	unsigned int rq_fhardlimit;	/* absolute limit on allocated files */
311832Swollman	unsigned int rq_fsoftlimit;	/* preferred file limit */
321832Swollman	unsigned int rq_curfiles;	/* current # allocated files */
331832Swollman	unsigned int rq_btimeleft;	/* time left for excessive disk use */
341832Swollman	unsigned int rq_ftimeleft;	/* time left for excessive files */
351832Swollman};
361832Swollman
371832Swollmanenum gqr_status {
381832Swollman	Q_OK = 1,		/* quota returned */
391832Swollman	Q_NOQUOTA = 2,  	/* noquota for uid */
401832Swollman	Q_EPERM = 3		/* no permission to access quota */
411832Swollman};
421832Swollman
431832Swollmanunion getquota_rslt switch (gqr_status status) {
441832Swollmancase Q_OK:
451832Swollman	rquota gqr_rquota;	/* valid if status == Q_OK */
461832Swollmancase Q_NOQUOTA:
471832Swollman	void;
481832Swollmancase Q_EPERM:
491832Swollman	void;
501832Swollman};
511832Swollman
521832Swollmanprogram RQUOTAPROG {
531832Swollman	version RQUOTAVERS {
541832Swollman		/*
551832Swollman		 * Get all quotas
561832Swollman		 */
571832Swollman		getquota_rslt
581832Swollman		RQUOTAPROC_GETQUOTA(getquota_args) = 1;
591832Swollman
601832Swollman		/*
611832Swollman	 	 * Get active quotas only
621832Swollman		 */
631832Swollman		getquota_rslt
641832Swollman		RQUOTAPROC_GETACTIVEQUOTA(getquota_args) = 2;
651832Swollman	} = 1;
661832Swollman} = 100011;
67