nlm_prot.h 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330
  1. /*
  2. * Please do not edit this file.
  3. * It was generated using rpcgen.
  4. */
  5. #ifndef _NLM_PROT_H_RPCGEN
  6. #define _NLM_PROT_H_RPCGEN
  7. #include <rpc/rpc.h>
  8. #ifdef __cplusplus
  9. extern "C" {
  10. #endif
  11. #define LM_MAXSTRLEN 1024
  12. #define MAXNAMELEN LM_MAXSTRLEN+1
  13. enum nlm_stats {
  14. nlm_granted = 0,
  15. nlm_denied = 1,
  16. nlm_denied_nolocks = 2,
  17. nlm_blocked = 3,
  18. nlm_denied_grace_period = 4,
  19. };
  20. typedef enum nlm_stats nlm_stats;
  21. struct nlm_holder {
  22. bool_t exclusive;
  23. int svid;
  24. netobj oh;
  25. u_int l_offset;
  26. u_int l_len;
  27. };
  28. typedef struct nlm_holder nlm_holder;
  29. struct nlm_testrply {
  30. nlm_stats stat;
  31. union {
  32. struct nlm_holder holder;
  33. } nlm_testrply_u;
  34. };
  35. typedef struct nlm_testrply nlm_testrply;
  36. struct nlm_stat {
  37. nlm_stats stat;
  38. };
  39. typedef struct nlm_stat nlm_stat;
  40. struct nlm_res {
  41. netobj cookie;
  42. nlm_stat stat;
  43. };
  44. typedef struct nlm_res nlm_res;
  45. struct nlm_testres {
  46. netobj cookie;
  47. nlm_testrply stat;
  48. };
  49. typedef struct nlm_testres nlm_testres;
  50. struct nlm_lock {
  51. char *caller_name;
  52. netobj fh;
  53. netobj oh;
  54. int svid;
  55. u_int l_offset;
  56. u_int l_len;
  57. };
  58. typedef struct nlm_lock nlm_lock;
  59. struct nlm_lockargs {
  60. netobj cookie;
  61. bool_t block;
  62. bool_t exclusive;
  63. struct nlm_lock alock;
  64. bool_t reclaim;
  65. int state;
  66. };
  67. typedef struct nlm_lockargs nlm_lockargs;
  68. struct nlm_cancargs {
  69. netobj cookie;
  70. bool_t block;
  71. bool_t exclusive;
  72. struct nlm_lock alock;
  73. };
  74. typedef struct nlm_cancargs nlm_cancargs;
  75. struct nlm_testargs {
  76. netobj cookie;
  77. bool_t exclusive;
  78. struct nlm_lock alock;
  79. };
  80. typedef struct nlm_testargs nlm_testargs;
  81. struct nlm_unlockargs {
  82. netobj cookie;
  83. struct nlm_lock alock;
  84. };
  85. typedef struct nlm_unlockargs nlm_unlockargs;
  86. /*
  87. * The following enums are actually bit encoded for efficient
  88. * boolean algebra.... DON'T change them.....
  89. */
  90. enum fsh_mode {
  91. fsm_DN = 0,
  92. fsm_DR = 1,
  93. fsm_DW = 2,
  94. fsm_DRW = 3,
  95. };
  96. typedef enum fsh_mode fsh_mode;
  97. enum fsh_access {
  98. fsa_NONE = 0,
  99. fsa_R = 1,
  100. fsa_W = 2,
  101. fsa_RW = 3,
  102. };
  103. typedef enum fsh_access fsh_access;
  104. struct nlm_share {
  105. char *caller_name;
  106. netobj fh;
  107. netobj oh;
  108. fsh_mode mode;
  109. fsh_access access;
  110. };
  111. typedef struct nlm_share nlm_share;
  112. struct nlm_shareargs {
  113. netobj cookie;
  114. nlm_share share;
  115. bool_t reclaim;
  116. };
  117. typedef struct nlm_shareargs nlm_shareargs;
  118. struct nlm_shareres {
  119. netobj cookie;
  120. nlm_stats stat;
  121. int sequence;
  122. };
  123. typedef struct nlm_shareres nlm_shareres;
  124. struct nlm_notify {
  125. char *name;
  126. long state;
  127. };
  128. typedef struct nlm_notify nlm_notify;
  129. #define NLM_PROG 100021
  130. #define NLM_VERS 1
  131. #if defined(__STDC__) || defined(__cplusplus)
  132. #define NLM_TEST 1
  133. extern nlm_testres * nlm_test_1(struct nlm_testargs *, CLIENT *);
  134. extern nlm_testres * nlm_test_1_svc(struct nlm_testargs *, struct svc_req *);
  135. #define NLM_LOCK 2
  136. extern nlm_res * nlm_lock_1(struct nlm_lockargs *, CLIENT *);
  137. extern nlm_res * nlm_lock_1_svc(struct nlm_lockargs *, struct svc_req *);
  138. #define NLM_CANCEL 3
  139. extern nlm_res * nlm_cancel_1(struct nlm_cancargs *, CLIENT *);
  140. extern nlm_res * nlm_cancel_1_svc(struct nlm_cancargs *, struct svc_req *);
  141. #define NLM_UNLOCK 4
  142. extern nlm_res * nlm_unlock_1(struct nlm_unlockargs *, CLIENT *);
  143. extern nlm_res * nlm_unlock_1_svc(struct nlm_unlockargs *, struct svc_req *);
  144. #define NLM_GRANTED 5
  145. extern nlm_res * nlm_granted_1(struct nlm_testargs *, CLIENT *);
  146. extern nlm_res * nlm_granted_1_svc(struct nlm_testargs *, struct svc_req *);
  147. #define NLM_TEST_MSG 6
  148. extern void * nlm_test_msg_1(struct nlm_testargs *, CLIENT *);
  149. extern void * nlm_test_msg_1_svc(struct nlm_testargs *, struct svc_req *);
  150. #define NLM_LOCK_MSG 7
  151. extern void * nlm_lock_msg_1(struct nlm_lockargs *, CLIENT *);
  152. extern void * nlm_lock_msg_1_svc(struct nlm_lockargs *, struct svc_req *);
  153. #define NLM_CANCEL_MSG 8
  154. extern void * nlm_cancel_msg_1(struct nlm_cancargs *, CLIENT *);
  155. extern void * nlm_cancel_msg_1_svc(struct nlm_cancargs *, struct svc_req *);
  156. #define NLM_UNLOCK_MSG 9
  157. extern void * nlm_unlock_msg_1(struct nlm_unlockargs *, CLIENT *);
  158. extern void * nlm_unlock_msg_1_svc(struct nlm_unlockargs *, struct svc_req *);
  159. #define NLM_GRANTED_MSG 10
  160. extern void * nlm_granted_msg_1(struct nlm_testargs *, CLIENT *);
  161. extern void * nlm_granted_msg_1_svc(struct nlm_testargs *, struct svc_req *);
  162. #define NLM_TEST_RES 11
  163. extern void * nlm_test_res_1(nlm_testres *, CLIENT *);
  164. extern void * nlm_test_res_1_svc(nlm_testres *, struct svc_req *);
  165. #define NLM_LOCK_RES 12
  166. extern void * nlm_lock_res_1(nlm_res *, CLIENT *);
  167. extern void * nlm_lock_res_1_svc(nlm_res *, struct svc_req *);
  168. #define NLM_CANCEL_RES 13
  169. extern void * nlm_cancel_res_1(nlm_res *, CLIENT *);
  170. extern void * nlm_cancel_res_1_svc(nlm_res *, struct svc_req *);
  171. #define NLM_UNLOCK_RES 14
  172. extern void * nlm_unlock_res_1(nlm_res *, CLIENT *);
  173. extern void * nlm_unlock_res_1_svc(nlm_res *, struct svc_req *);
  174. #define NLM_GRANTED_RES 15
  175. extern void * nlm_granted_res_1(nlm_res *, CLIENT *);
  176. extern void * nlm_granted_res_1_svc(nlm_res *, struct svc_req *);
  177. extern int nlm_prog_1_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
  178. #else /* K&R C */
  179. #define NLM_TEST 1
  180. extern nlm_testres * nlm_test_1();
  181. extern nlm_testres * nlm_test_1_svc();
  182. #define NLM_LOCK 2
  183. extern nlm_res * nlm_lock_1();
  184. extern nlm_res * nlm_lock_1_svc();
  185. #define NLM_CANCEL 3
  186. extern nlm_res * nlm_cancel_1();
  187. extern nlm_res * nlm_cancel_1_svc();
  188. #define NLM_UNLOCK 4
  189. extern nlm_res * nlm_unlock_1();
  190. extern nlm_res * nlm_unlock_1_svc();
  191. #define NLM_GRANTED 5
  192. extern nlm_res * nlm_granted_1();
  193. extern nlm_res * nlm_granted_1_svc();
  194. #define NLM_TEST_MSG 6
  195. extern void * nlm_test_msg_1();
  196. extern void * nlm_test_msg_1_svc();
  197. #define NLM_LOCK_MSG 7
  198. extern void * nlm_lock_msg_1();
  199. extern void * nlm_lock_msg_1_svc();
  200. #define NLM_CANCEL_MSG 8
  201. extern void * nlm_cancel_msg_1();
  202. extern void * nlm_cancel_msg_1_svc();
  203. #define NLM_UNLOCK_MSG 9
  204. extern void * nlm_unlock_msg_1();
  205. extern void * nlm_unlock_msg_1_svc();
  206. #define NLM_GRANTED_MSG 10
  207. extern void * nlm_granted_msg_1();
  208. extern void * nlm_granted_msg_1_svc();
  209. #define NLM_TEST_RES 11
  210. extern void * nlm_test_res_1();
  211. extern void * nlm_test_res_1_svc();
  212. #define NLM_LOCK_RES 12
  213. extern void * nlm_lock_res_1();
  214. extern void * nlm_lock_res_1_svc();
  215. #define NLM_CANCEL_RES 13
  216. extern void * nlm_cancel_res_1();
  217. extern void * nlm_cancel_res_1_svc();
  218. #define NLM_UNLOCK_RES 14
  219. extern void * nlm_unlock_res_1();
  220. extern void * nlm_unlock_res_1_svc();
  221. #define NLM_GRANTED_RES 15
  222. extern void * nlm_granted_res_1();
  223. extern void * nlm_granted_res_1_svc();
  224. extern int nlm_prog_1_freeresult ();
  225. #endif /* K&R C */
  226. #define NLM_VERSX 3
  227. #if defined(__STDC__) || defined(__cplusplus)
  228. #define NLM_SHARE 20
  229. extern nlm_shareres * nlm_share_3(nlm_shareargs *, CLIENT *);
  230. extern nlm_shareres * nlm_share_3_svc(nlm_shareargs *, struct svc_req *);
  231. #define NLM_UNSHARE 21
  232. extern nlm_shareres * nlm_unshare_3(nlm_shareargs *, CLIENT *);
  233. extern nlm_shareres * nlm_unshare_3_svc(nlm_shareargs *, struct svc_req *);
  234. #define NLM_NM_LOCK 22
  235. extern nlm_res * nlm_nm_lock_3(nlm_lockargs *, CLIENT *);
  236. extern nlm_res * nlm_nm_lock_3_svc(nlm_lockargs *, struct svc_req *);
  237. #define NLM_FREE_ALL 23
  238. extern void * nlm_free_all_3(nlm_notify *, CLIENT *);
  239. extern void * nlm_free_all_3_svc(nlm_notify *, struct svc_req *);
  240. extern int nlm_prog_3_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
  241. #else /* K&R C */
  242. #define NLM_SHARE 20
  243. extern nlm_shareres * nlm_share_3();
  244. extern nlm_shareres * nlm_share_3_svc();
  245. #define NLM_UNSHARE 21
  246. extern nlm_shareres * nlm_unshare_3();
  247. extern nlm_shareres * nlm_unshare_3_svc();
  248. #define NLM_NM_LOCK 22
  249. extern nlm_res * nlm_nm_lock_3();
  250. extern nlm_res * nlm_nm_lock_3_svc();
  251. #define NLM_FREE_ALL 23
  252. extern void * nlm_free_all_3();
  253. extern void * nlm_free_all_3_svc();
  254. extern int nlm_prog_3_freeresult ();
  255. #endif /* K&R C */
  256. /* the xdr functions */
  257. #if defined(__STDC__) || defined(__cplusplus)
  258. extern bool_t xdr_nlm_stats (XDR *, nlm_stats*);
  259. extern bool_t xdr_nlm_holder (XDR *, nlm_holder*);
  260. extern bool_t xdr_nlm_testrply (XDR *, nlm_testrply*);
  261. extern bool_t xdr_nlm_stat (XDR *, nlm_stat*);
  262. extern bool_t xdr_nlm_res (XDR *, nlm_res*);
  263. extern bool_t xdr_nlm_testres (XDR *, nlm_testres*);
  264. extern bool_t xdr_nlm_lock (XDR *, nlm_lock*);
  265. extern bool_t xdr_nlm_lockargs (XDR *, nlm_lockargs*);
  266. extern bool_t xdr_nlm_cancargs (XDR *, nlm_cancargs*);
  267. extern bool_t xdr_nlm_testargs (XDR *, nlm_testargs*);
  268. extern bool_t xdr_nlm_unlockargs (XDR *, nlm_unlockargs*);
  269. extern bool_t xdr_fsh_mode (XDR *, fsh_mode*);
  270. extern bool_t xdr_fsh_access (XDR *, fsh_access*);
  271. extern bool_t xdr_nlm_share (XDR *, nlm_share*);
  272. extern bool_t xdr_nlm_shareargs (XDR *, nlm_shareargs*);
  273. extern bool_t xdr_nlm_shareres (XDR *, nlm_shareres*);
  274. extern bool_t xdr_nlm_notify (XDR *, nlm_notify*);
  275. #else /* K&R C */
  276. extern bool_t xdr_nlm_stats ();
  277. extern bool_t xdr_nlm_holder ();
  278. extern bool_t xdr_nlm_testrply ();
  279. extern bool_t xdr_nlm_stat ();
  280. extern bool_t xdr_nlm_res ();
  281. extern bool_t xdr_nlm_testres ();
  282. extern bool_t xdr_nlm_lock ();
  283. extern bool_t xdr_nlm_lockargs ();
  284. extern bool_t xdr_nlm_cancargs ();
  285. extern bool_t xdr_nlm_testargs ();
  286. extern bool_t xdr_nlm_unlockargs ();
  287. extern bool_t xdr_fsh_mode ();
  288. extern bool_t xdr_fsh_access ();
  289. extern bool_t xdr_nlm_share ();
  290. extern bool_t xdr_nlm_shareargs ();
  291. extern bool_t xdr_nlm_shareres ();
  292. extern bool_t xdr_nlm_notify ();
  293. #endif /* K&R C */
  294. #ifdef __cplusplus
  295. }
  296. #endif
  297. #endif /* !_NLM_PROT_H_RPCGEN */