klm_prot.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. /*
  2. * Please do not edit this file.
  3. * It was generated using rpcgen.
  4. */
  5. #ifndef _KLM_PROT_H_RPCGEN
  6. #define _KLM_PROT_H_RPCGEN
  7. #include <rpc/rpc.h>
  8. #ifdef __cplusplus
  9. extern "C" {
  10. #endif
  11. #define LM_MAXSTRLEN 1024
  12. enum klm_stats {
  13. klm_granted = 0,
  14. klm_denied = 1,
  15. klm_denied_nolocks = 2,
  16. klm_working = 3,
  17. };
  18. typedef enum klm_stats klm_stats;
  19. struct klm_lock {
  20. char *server_name;
  21. netobj fh;
  22. int pid;
  23. u_int l_offset;
  24. u_int l_len;
  25. };
  26. typedef struct klm_lock klm_lock;
  27. struct klm_holder {
  28. bool_t exclusive;
  29. int svid;
  30. u_int l_offset;
  31. u_int l_len;
  32. };
  33. typedef struct klm_holder klm_holder;
  34. struct klm_stat {
  35. klm_stats stat;
  36. };
  37. typedef struct klm_stat klm_stat;
  38. struct klm_testrply {
  39. klm_stats stat;
  40. union {
  41. struct klm_holder holder;
  42. } klm_testrply_u;
  43. };
  44. typedef struct klm_testrply klm_testrply;
  45. struct klm_lockargs {
  46. bool_t block;
  47. bool_t exclusive;
  48. struct klm_lock alock;
  49. };
  50. typedef struct klm_lockargs klm_lockargs;
  51. struct klm_testargs {
  52. bool_t exclusive;
  53. struct klm_lock alock;
  54. };
  55. typedef struct klm_testargs klm_testargs;
  56. struct klm_unlockargs {
  57. struct klm_lock alock;
  58. };
  59. typedef struct klm_unlockargs klm_unlockargs;
  60. #define KLM_PROG 100020
  61. #define KLM_VERS 1
  62. #if defined(__STDC__) || defined(__cplusplus)
  63. #define KLM_TEST 1
  64. extern klm_testrply * klm_test_1(struct klm_testargs *, CLIENT *);
  65. extern klm_testrply * klm_test_1_svc(struct klm_testargs *, struct svc_req *);
  66. #define KLM_LOCK 2
  67. extern klm_stat * klm_lock_1(struct klm_lockargs *, CLIENT *);
  68. extern klm_stat * klm_lock_1_svc(struct klm_lockargs *, struct svc_req *);
  69. #define KLM_CANCEL 3
  70. extern klm_stat * klm_cancel_1(struct klm_lockargs *, CLIENT *);
  71. extern klm_stat * klm_cancel_1_svc(struct klm_lockargs *, struct svc_req *);
  72. #define KLM_UNLOCK 4
  73. extern klm_stat * klm_unlock_1(struct klm_unlockargs *, CLIENT *);
  74. extern klm_stat * klm_unlock_1_svc(struct klm_unlockargs *, struct svc_req *);
  75. extern int klm_prog_1_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
  76. #else /* K&R C */
  77. #define KLM_TEST 1
  78. extern klm_testrply * klm_test_1();
  79. extern klm_testrply * klm_test_1_svc();
  80. #define KLM_LOCK 2
  81. extern klm_stat * klm_lock_1();
  82. extern klm_stat * klm_lock_1_svc();
  83. #define KLM_CANCEL 3
  84. extern klm_stat * klm_cancel_1();
  85. extern klm_stat * klm_cancel_1_svc();
  86. #define KLM_UNLOCK 4
  87. extern klm_stat * klm_unlock_1();
  88. extern klm_stat * klm_unlock_1_svc();
  89. extern int klm_prog_1_freeresult ();
  90. #endif /* K&R C */
  91. /* the xdr functions */
  92. #if defined(__STDC__) || defined(__cplusplus)
  93. extern bool_t xdr_klm_stats (XDR *, klm_stats*);
  94. extern bool_t xdr_klm_lock (XDR *, klm_lock*);
  95. extern bool_t xdr_klm_holder (XDR *, klm_holder*);
  96. extern bool_t xdr_klm_stat (XDR *, klm_stat*);
  97. extern bool_t xdr_klm_testrply (XDR *, klm_testrply*);
  98. extern bool_t xdr_klm_lockargs (XDR *, klm_lockargs*);
  99. extern bool_t xdr_klm_testargs (XDR *, klm_testargs*);
  100. extern bool_t xdr_klm_unlockargs (XDR *, klm_unlockargs*);
  101. #else /* K&R C */
  102. extern bool_t xdr_klm_stats ();
  103. extern bool_t xdr_klm_lock ();
  104. extern bool_t xdr_klm_holder ();
  105. extern bool_t xdr_klm_stat ();
  106. extern bool_t xdr_klm_testrply ();
  107. extern bool_t xdr_klm_lockargs ();
  108. extern bool_t xdr_klm_testargs ();
  109. extern bool_t xdr_klm_unlockargs ();
  110. #endif /* K&R C */
  111. #ifdef __cplusplus
  112. }
  113. #endif
  114. #endif /* !_KLM_PROT_H_RPCGEN */