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%#endif /* not lint */ 11114629Sobrien%#include <sys/cdefs.h> 12114629Sobrien%__FBSDID("$FreeBSD: releng/11.0/include/rpcsvc/rquota.x 114629 2003-05-04 02:51:42Z obrien $"); 131832Swollman#endif 141832Swollman 151832Swollmanconst RQ_PATHLEN = 1024; 161832Swollman 171832Swollmanstruct getquota_args { 181832Swollman string gqa_pathp<RQ_PATHLEN>; /* path to filesystem of interest */ 191832Swollman int gqa_uid; /* inquire about quota for uid */ 201832Swollman}; 211832Swollman 221832Swollman/* 231832Swollman * remote quota structure 241832Swollman */ 251832Swollmanstruct rquota { 261832Swollman int rq_bsize; /* block size for block counts */ 271832Swollman bool rq_active; /* indicates whether quota is active */ 281832Swollman unsigned int rq_bhardlimit; /* absolute limit on disk blks alloc */ 291832Swollman unsigned int rq_bsoftlimit; /* preferred limit on disk blks */ 301832Swollman unsigned int rq_curblocks; /* current block count */ 311832Swollman unsigned int rq_fhardlimit; /* absolute limit on allocated files */ 321832Swollman unsigned int rq_fsoftlimit; /* preferred file limit */ 331832Swollman unsigned int rq_curfiles; /* current # allocated files */ 341832Swollman unsigned int rq_btimeleft; /* time left for excessive disk use */ 351832Swollman unsigned int rq_ftimeleft; /* time left for excessive files */ 361832Swollman}; 371832Swollman 381832Swollmanenum gqr_status { 391832Swollman Q_OK = 1, /* quota returned */ 401832Swollman Q_NOQUOTA = 2, /* noquota for uid */ 411832Swollman Q_EPERM = 3 /* no permission to access quota */ 421832Swollman}; 431832Swollman 441832Swollmanunion getquota_rslt switch (gqr_status status) { 451832Swollmancase Q_OK: 461832Swollman rquota gqr_rquota; /* valid if status == Q_OK */ 471832Swollmancase Q_NOQUOTA: 481832Swollman void; 491832Swollmancase Q_EPERM: 501832Swollman void; 511832Swollman}; 521832Swollman 531832Swollmanprogram RQUOTAPROG { 541832Swollman version RQUOTAVERS { 551832Swollman /* 561832Swollman * Get all quotas 571832Swollman */ 581832Swollman getquota_rslt 591832Swollman RQUOTAPROC_GETQUOTA(getquota_args) = 1; 601832Swollman 611832Swollman /* 621832Swollman * Get active quotas only 631832Swollman */ 641832Swollman getquota_rslt 651832Swollman RQUOTAPROC_GETACTIVEQUOTA(getquota_args) = 2; 661832Swollman } = 1; 671832Swollman} = 100011; 68