Simplify the upgrade path handling from PPA.
[deb_libnfs.git] / libnfs-raw-nlm.h
... / ...
CommitLineData
1/*
2Copyright (c) 2014, Ronnie Sahlberg
3All rights reserved.
4
5Redistribution and use in source and binary forms, with or without
6modification, are permitted provided that the following conditions are met:
7
81. Redistributions of source code must retain the above copyright notice, this
9 list of conditions and the following disclaimer.
102. Redistributions in binary form must reproduce the above copyright notice,
11 this list of conditions and the following disclaimer in the documentation
12 and/or other materials provided with the distribution.
13
14THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
15ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
18ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
21ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
23SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24
25The views and conclusions contained in the software and documentation are those
26of the authors and should not be interpreted as representing official policies,
27either expressed or implied, of the FreeBSD Project.
28*/
29
30/*
31 * Please do not edit this file.
32 * It was generated using rpcgen.
33 */
34
35#ifndef _NLM_H_RPCGEN
36#define _NLM_H_RPCGEN
37
38#include <nfsc/libnfs-zdr.h>
39
40
41#ifdef __cplusplus
42extern "C" {
43#endif
44
45
46struct nlm_fh4 {
47 struct {
48 u_int data_len;
49 char *data_val;
50 } data;
51};
52typedef struct nlm_fh4 nlm_fh4;
53
54typedef char *nlm4_oh;
55
56struct nlm_cookie {
57 struct {
58 u_int data_len;
59 char *data_val;
60 } data;
61};
62typedef struct nlm_cookie nlm_cookie;
63
64enum nlmstat4 {
65 NLM4_GRANTED = 0,
66 NLM4_DENIED = 1,
67 NLM4_DENIED_NOLOCKS = 2,
68 NLM4_BLOCKED = 3,
69 NLM4_DENIED_GRACE_PERIOD = 4,
70 NLM4_DEADLCK = 5,
71 NLM4_ROFS = 6,
72 NLM4_STALE_FH = 7,
73 NLM4_FBIG = 8,
74 NLM4_FAILED = 9,
75};
76typedef enum nlmstat4 nlmstat4;
77
78struct nlm4_holder {
79 uint32_t exclusive;
80 u_int svid;
81 nlm4_oh oh;
82 u_quad_t l_offset;
83 u_quad_t l_len;
84};
85typedef struct nlm4_holder nlm4_holder;
86#define NLM_MAXNAME 256
87
88struct nlm4_lock {
89 char *caller_name;
90 struct nlm_fh4 fh;
91 nlm4_oh oh;
92 u_int svid;
93 u_quad_t l_offset;
94 u_quad_t l_len;
95};
96typedef struct nlm4_lock nlm4_lock;
97
98struct nlm4_share {
99 char *caller_name;
100 struct nlm_fh4 fh;
101 nlm4_oh oh;
102 u_int mode;
103 u_int access;
104};
105typedef struct nlm4_share nlm4_share;
106
107struct nlm4_testres_denied {
108 nlm4_holder holder;
109};
110typedef struct nlm4_testres_denied nlm4_testres_denied;
111
112struct nlm4_testreply {
113 nlmstat4 status;
114 union {
115 nlm4_testres_denied lock;
116 } nlm4_testreply_u;
117};
118typedef struct nlm4_testreply nlm4_testreply;
119
120struct NLM4_TESTres {
121 nlm_cookie cookie;
122 nlm4_testreply reply;
123};
124typedef struct NLM4_TESTres NLM4_TESTres;
125
126struct NLM4_TESTargs {
127 nlm_cookie cookie;
128 uint32_t exclusive;
129 nlm4_lock lock;
130};
131typedef struct NLM4_TESTargs NLM4_TESTargs;
132
133struct NLM4_CANCres {
134 nlm_cookie cookie;
135 nlmstat4 status;
136};
137typedef struct NLM4_CANCres NLM4_CANCres;
138
139struct NLM4_CANCargs {
140 nlm_cookie cookie;
141 uint32_t block;
142 uint32_t exclusive;
143 nlm4_lock lock;
144};
145typedef struct NLM4_CANCargs NLM4_CANCargs;
146
147struct NLM4_UNLOCKres {
148 nlm_cookie cookie;
149 nlmstat4 status;
150};
151typedef struct NLM4_UNLOCKres NLM4_UNLOCKres;
152
153struct NLM4_UNLOCKargs {
154 nlm_cookie cookie;
155 nlm4_lock lock;
156};
157typedef struct NLM4_UNLOCKargs NLM4_UNLOCKargs;
158
159struct NLM4_LOCKres {
160 nlm_cookie cookie;
161 nlmstat4 status;
162};
163typedef struct NLM4_LOCKres NLM4_LOCKres;
164
165struct NLM4_LOCKargs {
166 nlm_cookie cookie;
167 uint32_t block;
168 uint32_t exclusive;
169 nlm4_lock lock;
170 uint32_t reclaim;
171 int state;
172};
173typedef struct NLM4_LOCKargs NLM4_LOCKargs;
174
175struct NLM4_GRANTEDargs {
176 nlm_cookie cookie;
177 uint32_t exclusive;
178 nlm4_lock lock;
179};
180typedef struct NLM4_GRANTEDargs NLM4_GRANTEDargs;
181
182struct NLM4_GRANTEDres {
183 nlm_cookie cookie;
184 nlmstat4 status;
185};
186typedef struct NLM4_GRANTEDres NLM4_GRANTEDres;
187
188#define NLM_PROGRAM 100021
189#define NLM_V4 4
190
191#if defined(__STDC__) || defined(__cplusplus)
192#define NLM4_NULL 0
193extern void * nlm4_null_4(void *, void *);
194extern void * nlm4_null_4_svc(void *, struct svc_req *);
195#define NLM4_TEST 1
196extern NLM4_TESTres * nlm4_test_4(NLM4_TESTargs *, void *);
197extern NLM4_TESTres * nlm4_test_4_svc(NLM4_TESTargs *, struct svc_req *);
198#define NLM4_LOCK 2
199extern NLM4_LOCKres * nlm4_lock_4(NLM4_LOCKargs *, void *);
200extern NLM4_LOCKres * nlm4_lock_4_svc(NLM4_LOCKargs *, struct svc_req *);
201#define NLM4_CANCEL 3
202extern NLM4_CANCres * nlm4_cancel_4(NLM4_CANCargs *, void *);
203extern NLM4_CANCres * nlm4_cancel_4_svc(NLM4_CANCargs *, struct svc_req *);
204#define NLM4_UNLOCK 4
205extern NLM4_UNLOCKres * nlm4_unlock_4(NLM4_UNLOCKargs *, void *);
206extern NLM4_UNLOCKres * nlm4_unlock_4_svc(NLM4_UNLOCKargs *, struct svc_req *);
207#define NLM4_GRANT 5
208extern NLM4_GRANTEDres * nlm4_grant_4(NLM4_GRANTEDargs *, void *);
209extern NLM4_GRANTEDres * nlm4_grant_4_svc(NLM4_GRANTEDargs *, struct svc_req *);
210#define NLM4_TEST_MSG 6
211extern void * nlm4_test_msg_4(NLM4_TESTargs *, void *);
212extern void * nlm4_test_msg_4_svc(NLM4_TESTargs *, struct svc_req *);
213#define NLM4_LOCK_MSG 7
214extern void * nlm4_lock_msg_4(NLM4_LOCKargs *, void *);
215extern void * nlm4_lock_msg_4_svc(NLM4_LOCKargs *, struct svc_req *);
216#define NLM4_CANCEL_MSG 8
217extern void * nlm4_cancel_msg_4(NLM4_CANCargs *, void *);
218extern void * nlm4_cancel_msg_4_svc(NLM4_CANCargs *, struct svc_req *);
219#define NLM4_UNLOCK_MSG 9
220extern void * nlm4_unlock_msg_4(NLM4_UNLOCKargs *, void *);
221extern void * nlm4_unlock_msg_4_svc(NLM4_UNLOCKargs *, struct svc_req *);
222#define NLM4_GRANT_MSG 10
223extern void * nlm4_grant_msg_4(NLM4_GRANTEDargs *, void *);
224extern void * nlm4_grant_msg_4_svc(NLM4_GRANTEDargs *, struct svc_req *);
225#define NLM4_TEST_RES 11
226extern void * nlm4_test_res_4(NLM4_TESTres *, void *);
227extern void * nlm4_test_res_4_svc(NLM4_TESTres *, struct svc_req *);
228#define NLM4_LOCK_RES 12
229extern void * nlm4_lock_res_4(NLM4_LOCKres *, void *);
230extern void * nlm4_lock_res_4_svc(NLM4_LOCKres *, struct svc_req *);
231#define NLM4_CANCEL_RES 13
232extern void * nlm4_cancel_res_4(NLM4_CANCres *, void *);
233extern void * nlm4_cancel_res_4_svc(NLM4_CANCres *, struct svc_req *);
234#define NLM4_UNLOCK_RES 14
235extern void * nlm4_unlock_res_4(NLM4_UNLOCKres *, void *);
236extern void * nlm4_unlock_res_4_svc(NLM4_UNLOCKres *, struct svc_req *);
237#define NLM4_GRANT_RES 15
238extern void * nlm4_grant_res_4(NLM4_GRANTEDres *, void *);
239extern void * nlm4_grant_res_4_svc(NLM4_GRANTEDres *, struct svc_req *);
240extern int nlm_program_4_freeresult (void *, zdrproc_t, caddr_t);
241
242#else /* K&R C */
243#define NLM4_NULL 0
244extern void * nlm4_null_4();
245extern void * nlm4_null_4_svc();
246#define NLM4_TEST 1
247extern NLM4_TESTres * nlm4_test_4();
248extern NLM4_TESTres * nlm4_test_4_svc();
249#define NLM4_LOCK 2
250extern NLM4_LOCKres * nlm4_lock_4();
251extern NLM4_LOCKres * nlm4_lock_4_svc();
252#define NLM4_CANCEL 3
253extern NLM4_CANCres * nlm4_cancel_4();
254extern NLM4_CANCres * nlm4_cancel_4_svc();
255#define NLM4_UNLOCK 4
256extern NLM4_UNLOCKres * nlm4_unlock_4();
257extern NLM4_UNLOCKres * nlm4_unlock_4_svc();
258#define NLM4_GRANT 5
259extern NLM4_GRANTEDres * nlm4_grant_4();
260extern NLM4_GRANTEDres * nlm4_grant_4_svc();
261#define NLM4_TEST_MSG 6
262extern void * nlm4_test_msg_4();
263extern void * nlm4_test_msg_4_svc();
264#define NLM4_LOCK_MSG 7
265extern void * nlm4_lock_msg_4();
266extern void * nlm4_lock_msg_4_svc();
267#define NLM4_CANCEL_MSG 8
268extern void * nlm4_cancel_msg_4();
269extern void * nlm4_cancel_msg_4_svc();
270#define NLM4_UNLOCK_MSG 9
271extern void * nlm4_unlock_msg_4();
272extern void * nlm4_unlock_msg_4_svc();
273#define NLM4_GRANT_MSG 10
274extern void * nlm4_grant_msg_4();
275extern void * nlm4_grant_msg_4_svc();
276#define NLM4_TEST_RES 11
277extern void * nlm4_test_res_4();
278extern void * nlm4_test_res_4_svc();
279#define NLM4_LOCK_RES 12
280extern void * nlm4_lock_res_4();
281extern void * nlm4_lock_res_4_svc();
282#define NLM4_CANCEL_RES 13
283extern void * nlm4_cancel_res_4();
284extern void * nlm4_cancel_res_4_svc();
285#define NLM4_UNLOCK_RES 14
286extern void * nlm4_unlock_res_4();
287extern void * nlm4_unlock_res_4_svc();
288#define NLM4_GRANT_RES 15
289extern void * nlm4_grant_res_4();
290extern void * nlm4_grant_res_4_svc();
291extern int nlm_program_4_freeresult ();
292#endif /* K&R C */
293
294/* the zdr functions */
295
296#if defined(__STDC__) || defined(__cplusplus)
297extern uint32_t zdr_nlm_fh4 (ZDR *, nlm_fh4*);
298extern uint32_t zdr_nlm4_oh (ZDR *, nlm4_oh*);
299extern uint32_t zdr_nlm_cookie (ZDR *, nlm_cookie*);
300extern uint32_t zdr_nlmstat4 (ZDR *, nlmstat4*);
301extern uint32_t zdr_nlm4_holder (ZDR *, nlm4_holder*);
302extern uint32_t zdr_nlm4_lock (ZDR *, nlm4_lock*);
303extern uint32_t zdr_nlm4_share (ZDR *, nlm4_share*);
304extern uint32_t zdr_nlm4_testres_denied (ZDR *, nlm4_testres_denied*);
305extern uint32_t zdr_nlm4_testreply (ZDR *, nlm4_testreply*);
306extern uint32_t zdr_NLM4_TESTres (ZDR *, NLM4_TESTres*);
307extern uint32_t zdr_NLM4_TESTargs (ZDR *, NLM4_TESTargs*);
308extern uint32_t zdr_NLM4_CANCres (ZDR *, NLM4_CANCres*);
309extern uint32_t zdr_NLM4_CANCargs (ZDR *, NLM4_CANCargs*);
310extern uint32_t zdr_NLM4_UNLOCKres (ZDR *, NLM4_UNLOCKres*);
311extern uint32_t zdr_NLM4_UNLOCKargs (ZDR *, NLM4_UNLOCKargs*);
312extern uint32_t zdr_NLM4_LOCKres (ZDR *, NLM4_LOCKres*);
313extern uint32_t zdr_NLM4_LOCKargs (ZDR *, NLM4_LOCKargs*);
314extern uint32_t zdr_NLM4_GRANTEDargs (ZDR *, NLM4_GRANTEDargs*);
315extern uint32_t zdr_NLM4_GRANTEDres (ZDR *, NLM4_GRANTEDres*);
316
317#else /* K&R C */
318extern uint32_t zdr_nlm_fh4 ();
319extern uint32_t zdr_nlm4_oh ();
320extern uint32_t zdr_nlm_cookie ();
321extern uint32_t zdr_nlmstat4 ();
322extern uint32_t zdr_nlm4_holder ();
323extern uint32_t zdr_nlm4_lock ();
324extern uint32_t zdr_nlm4_share ();
325extern uint32_t zdr_nlm4_testres_denied ();
326extern uint32_t zdr_nlm4_testreply ();
327extern uint32_t zdr_NLM4_TESTres ();
328extern uint32_t zdr_NLM4_TESTargs ();
329extern uint32_t zdr_NLM4_CANCres ();
330extern uint32_t zdr_NLM4_CANCargs ();
331extern uint32_t zdr_NLM4_UNLOCKres ();
332extern uint32_t zdr_NLM4_UNLOCKargs ();
333extern uint32_t zdr_NLM4_LOCKres ();
334extern uint32_t zdr_NLM4_LOCKargs ();
335extern uint32_t zdr_NLM4_GRANTEDargs ();
336extern uint32_t zdr_NLM4_GRANTEDres ();
337
338#endif /* K&R C */
339
340#ifdef __cplusplus
341}
342#endif
343
344#endif /* !_NLM_H_RPCGEN */