nlm_prot.h
001:
002:
003:
004:
005:
006: #ifndef _NLM_PROT_H_RPCGEN
007: #define _NLM_PROT_H_RPCGEN
008:
009: #include <rpc/rpc.h>
010:
011:
012: #ifdef __cplusplus
013: extern "C" {
014: #endif
015:
016: #define LM_MAXSTRLEN 1024
017: #define MAXNAMELEN LM_MAXSTRLEN+1
018:
019: enum nlm_stats {
020: nlm_granted = 0,
021: nlm_denied = 1,
022: nlm_denied_nolocks = 2,
023: nlm_blocked = 3,
024: nlm_denied_grace_period = 4,
025: };
026: typedef enum nlm_stats nlm_stats;
027:
028: struct nlm_holder {
029: bool_t exclusive;
030: int svid;
031: netobj oh;
032: u_int l_offset;
033: u_int l_len;
034: };
035: typedef struct nlm_holder nlm_holder;
036:
037: struct nlm_testrply {
038: nlm_stats stat;
039: union {
040: struct nlm_holder holder;
041: } nlm_testrply_u;
042: };
043: typedef struct nlm_testrply nlm_testrply;
044:
045: struct nlm_stat {
046: nlm_stats stat;
047: };
048: typedef struct nlm_stat nlm_stat;
049:
050: struct nlm_res {
051: netobj cookie;
052: nlm_stat stat;
053: };
054: typedef struct nlm_res nlm_res;
055:
056: struct nlm_testres {
057: netobj cookie;
058: nlm_testrply stat;
059: };
060: typedef struct nlm_testres nlm_testres;
061:
062: struct nlm_lock {
063: char *caller_name;
064: netobj fh;
065: netobj oh;
066: int svid;
067: u_int l_offset;
068: u_int l_len;
069: };
070: typedef struct nlm_lock nlm_lock;
071:
072: struct nlm_lockargs {
073: netobj cookie;
074: bool_t block;
075: bool_t exclusive;
076: struct nlm_lock alock;
077: bool_t reclaim;
078: int state;
079: };
080: typedef struct nlm_lockargs nlm_lockargs;
081:
082: struct nlm_cancargs {
083: netobj cookie;
084: bool_t block;
085: bool_t exclusive;
086: struct nlm_lock alock;
087: };
088: typedef struct nlm_cancargs nlm_cancargs;
089:
090: struct nlm_testargs {
091: netobj cookie;
092: bool_t exclusive;
093: struct nlm_lock alock;
094: };
095: typedef struct nlm_testargs nlm_testargs;
096:
097: struct nlm_unlockargs {
098: netobj cookie;
099: struct nlm_lock alock;
100: };
101: typedef struct nlm_unlockargs nlm_unlockargs;
102:
103:
104:
105:
106:
107: enum fsh_mode {
108: fsm_DN = 0,
109: fsm_DR = 1,
110: fsm_DW = 2,
111: fsm_DRW = 3,
112: };
113: typedef enum fsh_mode fsh_mode;
114:
115: enum fsh_access {
116: fsa_NONE = 0,
117: fsa_R = 1,
118: fsa_W = 2,
119: fsa_RW = 3,
120: };
121: typedef enum fsh_access fsh_access;
122:
123: struct nlm_share {
124: char *caller_name;
125: netobj fh;
126: netobj oh;
127: fsh_mode mode;
128: fsh_access access;
129: };
130: typedef struct nlm_share nlm_share;
131:
132: struct nlm_shareargs {
133: netobj cookie;
134: nlm_share share;
135: bool_t reclaim;
136: };
137: typedef struct nlm_shareargs nlm_shareargs;
138:
139: struct nlm_shareres {
140: netobj cookie;
141: nlm_stats stat;
142: int sequence;
143: };
144: typedef struct nlm_shareres nlm_shareres;
145:
146: struct nlm_notify {
147: char *name;
148: long state;
149: };
150: typedef struct nlm_notify nlm_notify;
151:
152: #define NLM_PROG 100021
153: #define NLM_VERS 1
154:
155: #if defined(__STDC__) || defined(__cplusplus)
156: #define NLM_TEST 1
157: extern nlm_testres * nlm_test_1(struct nlm_testargs *, CLIENT *);
158: extern nlm_testres * nlm_test_1_svc(struct nlm_testargs *, struct svc_req *);
159: #define NLM_LOCK 2
160: extern nlm_res * nlm_lock_1(struct nlm_lockargs *, CLIENT *);
161: extern nlm_res * nlm_lock_1_svc(struct nlm_lockargs *, struct svc_req *);
162: #define NLM_CANCEL 3
163: extern nlm_res * nlm_cancel_1(struct nlm_cancargs *, CLIENT *);
164: extern nlm_res * nlm_cancel_1_svc(struct nlm_cancargs *, struct svc_req *);
165: #define NLM_UNLOCK 4
166: extern nlm_res * nlm_unlock_1(struct nlm_unlockargs *, CLIENT *);
167: extern nlm_res * nlm_unlock_1_svc(struct nlm_unlockargs *, struct svc_req *);
168: #define NLM_GRANTED 5
169: extern nlm_res * nlm_granted_1(struct nlm_testargs *, CLIENT *);
170: extern nlm_res * nlm_granted_1_svc(struct nlm_testargs *, struct svc_req *);
171: #define NLM_TEST_MSG 6
172: extern void * nlm_test_msg_1(struct nlm_testargs *, CLIENT *);
173: extern void * nlm_test_msg_1_svc(struct nlm_testargs *, struct svc_req *);
174: #define NLM_LOCK_MSG 7
175: extern void * nlm_lock_msg_1(struct nlm_lockargs *, CLIENT *);
176: extern void * nlm_lock_msg_1_svc(struct nlm_lockargs *, struct svc_req *);
177: #define NLM_CANCEL_MSG 8
178: extern void * nlm_cancel_msg_1(struct nlm_cancargs *, CLIENT *);
179: extern void * nlm_cancel_msg_1_svc(struct nlm_cancargs *, struct svc_req *);
180: #define NLM_UNLOCK_MSG 9
181: extern void * nlm_unlock_msg_1(struct nlm_unlockargs *, CLIENT *);
182: extern void * nlm_unlock_msg_1_svc(struct nlm_unlockargs *, struct svc_req *);
183: #define NLM_GRANTED_MSG 10
184: extern void * nlm_granted_msg_1(struct nlm_testargs *, CLIENT *);
185: extern void * nlm_granted_msg_1_svc(struct nlm_testargs *, struct svc_req *);
186: #define NLM_TEST_RES 11
187: extern void * nlm_test_res_1(nlm_testres *, CLIENT *);
188: extern void * nlm_test_res_1_svc(nlm_testres *, struct svc_req *);
189: #define NLM_LOCK_RES 12
190: extern void * nlm_lock_res_1(nlm_res *, CLIENT *);
191: extern void * nlm_lock_res_1_svc(nlm_res *, struct svc_req *);
192: #define NLM_CANCEL_RES 13
193: extern void * nlm_cancel_res_1(nlm_res *, CLIENT *);
194: extern void * nlm_cancel_res_1_svc(nlm_res *, struct svc_req *);
195: #define NLM_UNLOCK_RES 14
196: extern void * nlm_unlock_res_1(nlm_res *, CLIENT *);
197: extern void * nlm_unlock_res_1_svc(nlm_res *, struct svc_req *);
198: #define NLM_GRANTED_RES 15
199: extern void * nlm_granted_res_1(nlm_res *, CLIENT *);
200: extern void * nlm_granted_res_1_svc(nlm_res *, struct svc_req *);
201: extern int nlm_prog_1_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
202:
203: #else
204: #define NLM_TEST 1
205: extern nlm_testres * nlm_test_1();
206: extern nlm_testres * nlm_test_1_svc();
207: #define NLM_LOCK 2
208: extern nlm_res * nlm_lock_1();
209: extern nlm_res * nlm_lock_1_svc();
210: #define NLM_CANCEL 3
211: extern nlm_res * nlm_cancel_1();
212: extern nlm_res * nlm_cancel_1_svc();
213: #define NLM_UNLOCK 4
214: extern nlm_res * nlm_unlock_1();
215: extern nlm_res * nlm_unlock_1_svc();
216: #define NLM_GRANTED 5
217: extern nlm_res * nlm_granted_1();
218: extern nlm_res * nlm_granted_1_svc();
219: #define NLM_TEST_MSG 6
220: extern void * nlm_test_msg_1();
221: extern void * nlm_test_msg_1_svc();
222: #define NLM_LOCK_MSG 7
223: extern void * nlm_lock_msg_1();
224: extern void * nlm_lock_msg_1_svc();
225: #define NLM_CANCEL_MSG 8
226: extern void * nlm_cancel_msg_1();
227: extern void * nlm_cancel_msg_1_svc();
228: #define NLM_UNLOCK_MSG 9
229: extern void * nlm_unlock_msg_1();
230: extern void * nlm_unlock_msg_1_svc();
231: #define NLM_GRANTED_MSG 10
232: extern void * nlm_granted_msg_1();
233: extern void * nlm_granted_msg_1_svc();
234: #define NLM_TEST_RES 11
235: extern void * nlm_test_res_1();
236: extern void * nlm_test_res_1_svc();
237: #define NLM_LOCK_RES 12
238: extern void * nlm_lock_res_1();
239: extern void * nlm_lock_res_1_svc();
240: #define NLM_CANCEL_RES 13
241: extern void * nlm_cancel_res_1();
242: extern void * nlm_cancel_res_1_svc();
243: #define NLM_UNLOCK_RES 14
244: extern void * nlm_unlock_res_1();
245: extern void * nlm_unlock_res_1_svc();
246: #define NLM_GRANTED_RES 15
247: extern void * nlm_granted_res_1();
248: extern void * nlm_granted_res_1_svc();
249: extern int nlm_prog_1_freeresult ();
250: #endif
251: #define NLM_VERSX 3
252:
253: #if defined(__STDC__) || defined(__cplusplus)
254: #define NLM_SHARE 20
255: extern nlm_shareres * nlm_share_3(nlm_shareargs *, CLIENT *);
256: extern nlm_shareres * nlm_share_3_svc(nlm_shareargs *, struct svc_req *);
257: #define NLM_UNSHARE 21
258: extern nlm_shareres * nlm_unshare_3(nlm_shareargs *, CLIENT *);
259: extern nlm_shareres * nlm_unshare_3_svc(nlm_shareargs *, struct svc_req *);
260: #define NLM_NM_LOCK 22
261: extern nlm_res * nlm_nm_lock_3(nlm_lockargs *, CLIENT *);
262: extern nlm_res * nlm_nm_lock_3_svc(nlm_lockargs *, struct svc_req *);
263: #define NLM_FREE_ALL 23
264: extern void * nlm_free_all_3(nlm_notify *, CLIENT *);
265: extern void * nlm_free_all_3_svc(nlm_notify *, struct svc_req *);
266: extern int nlm_prog_3_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
267:
268: #else
269: #define NLM_SHARE 20
270: extern nlm_shareres * nlm_share_3();
271: extern nlm_shareres * nlm_share_3_svc();
272: #define NLM_UNSHARE 21
273: extern nlm_shareres * nlm_unshare_3();
274: extern nlm_shareres * nlm_unshare_3_svc();
275: #define NLM_NM_LOCK 22
276: extern nlm_res * nlm_nm_lock_3();
277: extern nlm_res * nlm_nm_lock_3_svc();
278: #define NLM_FREE_ALL 23
279: extern void * nlm_free_all_3();
280: extern void * nlm_free_all_3_svc();
281: extern int nlm_prog_3_freeresult ();
282: #endif
283:
284:
285:
286: #if defined(__STDC__) || defined(__cplusplus)
287: extern bool_t xdr_nlm_stats (XDR *, nlm_stats*);
288: extern bool_t xdr_nlm_holder (XDR *, nlm_holder*);
289: extern bool_t xdr_nlm_testrply (XDR *, nlm_testrply*);
290: extern bool_t xdr_nlm_stat (XDR *, nlm_stat*);
291: extern bool_t xdr_nlm_res (XDR *, nlm_res*);
292: extern bool_t xdr_nlm_testres (XDR *, nlm_testres*);
293: extern bool_t xdr_nlm_lock (XDR *, nlm_lock*);
294: extern bool_t xdr_nlm_lockargs (XDR *, nlm_lockargs*);
295: extern bool_t xdr_nlm_cancargs (XDR *, nlm_cancargs*);
296: extern bool_t xdr_nlm_testargs (XDR *, nlm_testargs*);
297: extern bool_t xdr_nlm_unlockargs (XDR *, nlm_unlockargs*);
298: extern bool_t xdr_fsh_mode (XDR *, fsh_mode*);
299: extern bool_t xdr_fsh_access (XDR *, fsh_access*);
300: extern bool_t xdr_nlm_share (XDR *, nlm_share*);
301: extern bool_t xdr_nlm_shareargs (XDR *, nlm_shareargs*);
302: extern bool_t xdr_nlm_shareres (XDR *, nlm_shareres*);
303: extern bool_t xdr_nlm_notify (XDR *, nlm_notify*);
304:
305: #else
306: extern bool_t xdr_nlm_stats ();
307: extern bool_t xdr_nlm_holder ();
308: extern bool_t xdr_nlm_testrply ();
309: extern bool_t xdr_nlm_stat ();
310: extern bool_t xdr_nlm_res ();
311: extern bool_t xdr_nlm_testres ();
312: extern bool_t xdr_nlm_lock ();
313: extern bool_t xdr_nlm_lockargs ();
314: extern bool_t xdr_nlm_cancargs ();
315: extern bool_t xdr_nlm_testargs ();
316: extern bool_t xdr_nlm_unlockargs ();
317: extern bool_t xdr_fsh_mode ();
318: extern bool_t xdr_fsh_access ();
319: extern bool_t xdr_nlm_share ();
320: extern bool_t xdr_nlm_shareargs ();
321: extern bool_t xdr_nlm_shareres ();
322: extern bool_t xdr_nlm_notify ();
323:
324: #endif
325:
326: #ifdef __cplusplus
327: }
328: #endif
329:
330: #endif
331:
© Andrew Scott 2006 -
2025,
All Rights Reserved