rquota.x 1.5 KB

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