1 /*
2  * Please do not edit this file.
3  * It was generated using rpcgen.
4  */
5 
6 #ifndef _NFS_ACL_H_RPCGEN
7 #define	_NFS_ACL_H_RPCGEN
8 
9 #include <rpc/rpc.h>
10 
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14 
15 #define	NFS_ACL_MAX_ENTRIES 1024
16 
17 typedef int uid;
18 
19 typedef u_short o_mode;
20 
21 struct aclent {
22 	int type;
23 	uid id;
24 	o_mode perm;
25 };
26 typedef struct aclent aclent;
27 #define	NA_USER_OBJ 0x1
28 #define	NA_USER 0x2
29 #define	NA_GROUP_OBJ 0x4
30 #define	NA_GROUP 0x8
31 #define	NA_CLASS_OBJ 0x10
32 #define	NA_OTHER_OBJ 0x20
33 #define	NA_ACL_DEFAULT 0x1000
34 #define	NA_READ 0x4
35 #define	NA_WRITE 0x2
36 #define	NA_EXEC 0x1
37 
38 struct secattr {
39 	u_int mask;
40 	int aclcnt;
41 	struct {
42 		u_int aclent_len;
43 		aclent *aclent_val;
44 	} aclent;
45 	int dfaclcnt;
46 	struct {
47 		u_int dfaclent_len;
48 		aclent *dfaclent_val;
49 	} dfaclent;
50 };
51 typedef struct secattr secattr;
52 #define	NA_ACL 0x1
53 #define	NA_ACLCNT 0x2
54 #define	NA_DFACL 0x4
55 #define	NA_DFACLCNT 0x8
56 
57 struct GETACL2args {
58 	fhandle_t fh;
59 	u_int mask;
60 };
61 typedef struct GETACL2args GETACL2args;
62 
63 struct GETACL2resok {
64 	struct nfsfattr attr;
65 	secattr acl;
66 };
67 typedef struct GETACL2resok GETACL2resok;
68 
69 struct GETACL2res {
70 	nfsstat status;
71 	union {
72 		GETACL2resok resok;
73 	} GETACL2res_u;
74 };
75 typedef struct GETACL2res GETACL2res;
76 
77 struct SETACL2args {
78 	fhandle_t fh;
79 	secattr acl;
80 };
81 typedef struct SETACL2args SETACL2args;
82 
83 struct SETACL2resok {
84 	struct nfsfattr attr;
85 };
86 typedef struct SETACL2resok SETACL2resok;
87 
88 struct SETACL2res {
89 	nfsstat status;
90 	union {
91 		SETACL2resok resok;
92 	} SETACL2res_u;
93 };
94 typedef struct SETACL2res SETACL2res;
95 
96 struct GETATTR2args {
97 	fhandle_t fh;
98 };
99 typedef struct GETATTR2args GETATTR2args;
100 
101 struct GETATTR2resok {
102 	struct nfsfattr attr;
103 };
104 typedef struct GETATTR2resok GETATTR2resok;
105 
106 struct GETATTR2res {
107 	nfsstat status;
108 	union {
109 		GETATTR2resok resok;
110 	} GETATTR2res_u;
111 };
112 typedef struct GETATTR2res GETATTR2res;
113 
114 struct ACCESS2args {
115 	fhandle_t fh;
116 	uint32 access;
117 };
118 typedef struct ACCESS2args ACCESS2args;
119 #define	ACCESS2_READ 0x1
120 #define	ACCESS2_LOOKUP 0x2
121 #define	ACCESS2_MODIFY 0x4
122 #define	ACCESS2_EXTEND 0x8
123 #define	ACCESS2_DELETE 0x10
124 #define	ACCESS2_EXECUTE 0x20
125 
126 struct ACCESS2resok {
127 	struct nfsfattr attr;
128 	uint32 access;
129 };
130 typedef struct ACCESS2resok ACCESS2resok;
131 
132 struct ACCESS2res {
133 	nfsstat status;
134 	union {
135 		ACCESS2resok resok;
136 	} ACCESS2res_u;
137 };
138 typedef struct ACCESS2res ACCESS2res;
139 
140 struct GETXATTRDIR2args {
141 	fhandle_t fh;
142 	bool_t create;
143 };
144 typedef struct GETXATTRDIR2args GETXATTRDIR2args;
145 
146 struct GETXATTRDIR2resok {
147 	fhandle_t fh;
148 	struct nfsfattr attr;
149 };
150 typedef struct GETXATTRDIR2resok GETXATTRDIR2resok;
151 
152 struct GETXATTRDIR2res {
153 	nfsstat status;
154 	union {
155 		GETXATTRDIR2resok resok;
156 	} GETXATTRDIR2res_u;
157 };
158 typedef struct GETXATTRDIR2res GETXATTRDIR2res;
159 
160 struct GETACL3args {
161 	nfs_fh3 fh;
162 	u_int mask;
163 };
164 typedef struct GETACL3args GETACL3args;
165 
166 struct GETACL3resok {
167 	post_op_attr attr;
168 	secattr acl;
169 };
170 typedef struct GETACL3resok GETACL3resok;
171 
172 struct GETACL3resfail {
173 	post_op_attr attr;
174 };
175 typedef struct GETACL3resfail GETACL3resfail;
176 
177 struct GETACL3res {
178 	nfsstat3 status;
179 	union {
180 		GETACL3resok resok;
181 		GETACL3resfail resfail;
182 	} GETACL3res_u;
183 };
184 typedef struct GETACL3res GETACL3res;
185 
186 struct SETACL3args {
187 	nfs_fh3 fh;
188 	secattr acl;
189 };
190 typedef struct SETACL3args SETACL3args;
191 
192 struct SETACL3resok {
193 	post_op_attr attr;
194 };
195 typedef struct SETACL3resok SETACL3resok;
196 
197 struct SETACL3resfail {
198 	post_op_attr attr;
199 };
200 typedef struct SETACL3resfail SETACL3resfail;
201 
202 struct SETACL3res {
203 	nfsstat3 status;
204 	union {
205 		SETACL3resok resok;
206 		SETACL3resfail resfail;
207 	} SETACL3res_u;
208 };
209 typedef struct SETACL3res SETACL3res;
210 
211 struct GETXATTRDIR3args {
212 	nfs_fh3 fh;
213 	bool_t create;
214 };
215 typedef struct GETXATTRDIR3args GETXATTRDIR3args;
216 
217 struct GETXATTRDIR3resok {
218 	nfs_fh3 fh;
219 	post_op_attr attr;
220 };
221 typedef struct GETXATTRDIR3resok GETXATTRDIR3resok;
222 
223 struct GETXATTRDIR3res {
224 	nfsstat3 status;
225 	union {
226 		GETXATTRDIR3resok resok;
227 	} GETXATTRDIR3res_u;
228 };
229 typedef struct GETXATTRDIR3res GETXATTRDIR3res;
230 
231 struct GETACL4args {
232 	nfs_fh4 fh;
233 	u_int mask;
234 };
235 typedef struct GETACL4args GETACL4args;
236 
237 struct GETACL4resok {
238 	post_op_attr attr;
239 	secattr acl;
240 };
241 typedef struct GETACL4resok GETACL4resok;
242 
243 struct GETACL4resfail {
244 	post_op_attr attr;
245 };
246 typedef struct GETACL4resfail GETACL4resfail;
247 
248 struct GETACL4res {
249 	nfsstat3 status;
250 	union {
251 		GETACL4resok resok;
252 		GETACL4resfail resfail;
253 	} GETACL4res_u;
254 };
255 typedef struct GETACL4res GETACL4res;
256 
257 struct SETACL4args {
258 	nfs_fh4 fh;
259 	secattr acl;
260 };
261 typedef struct SETACL4args SETACL4args;
262 
263 struct SETACL4resok {
264 	post_op_attr attr;
265 };
266 typedef struct SETACL4resok SETACL4resok;
267 
268 struct SETACL4resfail {
269 	post_op_attr attr;
270 };
271 typedef struct SETACL4resfail SETACL4resfail;
272 
273 struct SETACL4res {
274 	nfsstat3 status;
275 	union {
276 		SETACL4resok resok;
277 		SETACL4resfail resfail;
278 	} SETACL4res_u;
279 };
280 typedef struct SETACL4res SETACL4res;
281 #define	NFS_ACL_PORT 2049
282 
283 #define	NFS_ACL_PROGRAM	100227
284 #define	NFS_ACL_V2	2
285 
286 #if defined(__STDC__) || defined(__cplusplus)
287 #define	ACLPROC2_NULL	0
288 extern  void * aclproc2_null_2(void *, CLIENT *);
289 extern  void * aclproc2_null_2_svc(void *, struct svc_req *);
290 #define	ACLPROC2_GETACL	1
291 extern  GETACL2res * aclproc2_getacl_2(GETACL2args *, CLIENT *);
292 extern  GETACL2res * aclproc2_getacl_2_svc(GETACL2args *, struct svc_req *);
293 #define	ACLPROC2_SETACL	2
294 extern  SETACL2res * aclproc2_setacl_2(SETACL2args *, CLIENT *);
295 extern  SETACL2res * aclproc2_setacl_2_svc(SETACL2args *, struct svc_req *);
296 #define	ACLPROC2_GETATTR	3
297 extern  GETATTR2res * aclproc2_getattr_2(GETATTR2args *, CLIENT *);
298 extern  GETATTR2res * aclproc2_getattr_2_svc(GETATTR2args *, struct svc_req *);
299 #define	ACLPROC2_ACCESS	4
300 extern  ACCESS2res * aclproc2_access_2(ACCESS2args *, CLIENT *);
301 extern  ACCESS2res * aclproc2_access_2_svc(ACCESS2args *, struct svc_req *);
302 #define	ACLPROC2_GETXATTRDIR	5
303 extern  GETXATTRDIR2res * aclproc2_getxattrdir_2(GETXATTRDIR2args *, CLIENT *);
304 extern  GETXATTRDIR2res * aclproc2_getxattrdir_2_svc(GETXATTRDIR2args *, struct svc_req *);
305 extern int nfs_acl_program_2_freeresult(SVCXPRT *, xdrproc_t, caddr_t);
306 
307 #else /* K&R C */
308 #define	ACLPROC2_NULL	0
309 extern  void * aclproc2_null_2();
310 extern  void * aclproc2_null_2_svc();
311 #define	ACLPROC2_GETACL	1
312 extern  GETACL2res * aclproc2_getacl_2();
313 extern  GETACL2res * aclproc2_getacl_2_svc();
314 #define	ACLPROC2_SETACL	2
315 extern  SETACL2res * aclproc2_setacl_2();
316 extern  SETACL2res * aclproc2_setacl_2_svc();
317 #define	ACLPROC2_GETATTR	3
318 extern  GETATTR2res * aclproc2_getattr_2();
319 extern  GETATTR2res * aclproc2_getattr_2_svc();
320 #define	ACLPROC2_ACCESS	4
321 extern  ACCESS2res * aclproc2_access_2();
322 extern  ACCESS2res * aclproc2_access_2_svc();
323 #define	ACLPROC2_GETXATTRDIR	5
324 extern  GETXATTRDIR2res * aclproc2_getxattrdir_2();
325 extern  GETXATTRDIR2res * aclproc2_getxattrdir_2_svc();
326 extern int nfs_acl_program_2_freeresult();
327 #endif /* K&R C */
328 #define	NFS_ACL_V3	3
329 
330 #if defined(__STDC__) || defined(__cplusplus)
331 #define	ACLPROC3_NULL	0
332 extern  void * aclproc3_null_3(void *, CLIENT *);
333 extern  void * aclproc3_null_3_svc(void *, struct svc_req *);
334 #define	ACLPROC3_GETACL	1
335 extern  GETACL3res * aclproc3_getacl_3(GETACL3args *, CLIENT *);
336 extern  GETACL3res * aclproc3_getacl_3_svc(GETACL3args *, struct svc_req *);
337 #define	ACLPROC3_SETACL	2
338 extern  SETACL3res * aclproc3_setacl_3(SETACL3args *, CLIENT *);
339 extern  SETACL3res * aclproc3_setacl_3_svc(SETACL3args *, struct svc_req *);
340 #define	ACLPROC3_GETXATTRDIR	3
341 extern  GETXATTRDIR3res * aclproc3_getxattrdir_3(GETXATTRDIR3args *, CLIENT *);
342 extern  GETXATTRDIR3res * aclproc3_getxattrdir_3_svc(GETXATTRDIR3args *, struct svc_req *);
343 extern int nfs_acl_program_3_freeresult(SVCXPRT *, xdrproc_t, caddr_t);
344 
345 #else /* K&R C */
346 #define	ACLPROC3_NULL	0
347 extern  void * aclproc3_null_3();
348 extern  void * aclproc3_null_3_svc();
349 #define	ACLPROC3_GETACL	1
350 extern  GETACL3res * aclproc3_getacl_3();
351 extern  GETACL3res * aclproc3_getacl_3_svc();
352 #define	ACLPROC3_SETACL	2
353 extern  SETACL3res * aclproc3_setacl_3();
354 extern  SETACL3res * aclproc3_setacl_3_svc();
355 #define	ACLPROC3_GETXATTRDIR	3
356 extern  GETXATTRDIR3res * aclproc3_getxattrdir_3();
357 extern  GETXATTRDIR3res * aclproc3_getxattrdir_3_svc();
358 extern int nfs_acl_program_3_freeresult();
359 #endif /* K&R C */
360 #define	NFS_ACL_V4	4
361 
362 #if defined(__STDC__) || defined(__cplusplus)
363 #define	ACLPROC4_NULL	0
364 extern  void * aclproc4_null_4(void *, CLIENT *);
365 extern  void * aclproc4_null_4_svc(void *, struct svc_req *);
366 #define	ACLPROC4_GETACL	1
367 extern  GETACL4res * aclproc4_getacl_4(GETACL4args *, CLIENT *);
368 extern  GETACL4res * aclproc4_getacl_4_svc(GETACL4args *, struct svc_req *);
369 #define	ACLPROC4_SETACL	2
370 extern  SETACL4res * aclproc4_setacl_4(SETACL4args *, CLIENT *);
371 extern  SETACL4res * aclproc4_setacl_4_svc(SETACL4args *, struct svc_req *);
372 extern int nfs_acl_program_4_freeresult(SVCXPRT *, xdrproc_t, caddr_t);
373 
374 #else /* K&R C */
375 #define	ACLPROC4_NULL	0
376 extern  void * aclproc4_null_4();
377 extern  void * aclproc4_null_4_svc();
378 #define	ACLPROC4_GETACL	1
379 extern  GETACL4res * aclproc4_getacl_4();
380 extern  GETACL4res * aclproc4_getacl_4_svc();
381 #define	ACLPROC4_SETACL	2
382 extern  SETACL4res * aclproc4_setacl_4();
383 extern  SETACL4res * aclproc4_setacl_4_svc();
384 extern int nfs_acl_program_4_freeresult();
385 #endif /* K&R C */
386 
387 /* the xdr functions */
388 
389 #if defined(__STDC__) || defined(__cplusplus)
390 extern  bool_t xdr_uid(XDR *, uid*);
391 extern  bool_t xdr_o_mode(XDR *, o_mode*);
392 extern  bool_t xdr_aclent(XDR *, aclent*);
393 extern  bool_t xdr_secattr(XDR *, secattr*);
394 extern  bool_t xdr_GETACL2args(XDR *, GETACL2args*);
395 extern  bool_t xdr_GETACL2resok(XDR *, GETACL2resok*);
396 extern  bool_t xdr_GETACL2res(XDR *, GETACL2res*);
397 extern  bool_t xdr_SETACL2args(XDR *, SETACL2args*);
398 extern  bool_t xdr_SETACL2resok(XDR *, SETACL2resok*);
399 extern  bool_t xdr_SETACL2res(XDR *, SETACL2res*);
400 extern  bool_t xdr_GETATTR2args(XDR *, GETATTR2args*);
401 extern  bool_t xdr_GETATTR2resok(XDR *, GETATTR2resok*);
402 extern  bool_t xdr_GETATTR2res(XDR *, GETATTR2res*);
403 extern  bool_t xdr_ACCESS2args(XDR *, ACCESS2args*);
404 extern  bool_t xdr_ACCESS2resok(XDR *, ACCESS2resok*);
405 extern  bool_t xdr_ACCESS2res(XDR *, ACCESS2res*);
406 extern  bool_t xdr_GETXATTRDIR2args(XDR *, GETXATTRDIR2args*);
407 extern  bool_t xdr_GETXATTRDIR2resok(XDR *, GETXATTRDIR2resok*);
408 extern  bool_t xdr_GETXATTRDIR2res(XDR *, GETXATTRDIR2res*);
409 extern  bool_t xdr_GETACL3args(XDR *, GETACL3args*);
410 extern  bool_t xdr_GETACL3resok(XDR *, GETACL3resok*);
411 extern  bool_t xdr_GETACL3resfail(XDR *, GETACL3resfail*);
412 extern  bool_t xdr_GETACL3res(XDR *, GETACL3res*);
413 extern  bool_t xdr_SETACL3args(XDR *, SETACL3args*);
414 extern  bool_t xdr_SETACL3resok(XDR *, SETACL3resok*);
415 extern  bool_t xdr_SETACL3resfail(XDR *, SETACL3resfail*);
416 extern  bool_t xdr_SETACL3res(XDR *, SETACL3res*);
417 extern  bool_t xdr_GETXATTRDIR3args(XDR *, GETXATTRDIR3args*);
418 extern  bool_t xdr_GETXATTRDIR3resok(XDR *, GETXATTRDIR3resok*);
419 extern  bool_t xdr_GETXATTRDIR3res(XDR *, GETXATTRDIR3res*);
420 extern  bool_t xdr_GETACL4args(XDR *, GETACL4args*);
421 extern  bool_t xdr_GETACL4resok(XDR *, GETACL4resok*);
422 extern  bool_t xdr_GETACL4resfail(XDR *, GETACL4resfail*);
423 extern  bool_t xdr_GETACL4res(XDR *, GETACL4res*);
424 extern  bool_t xdr_SETACL4args(XDR *, SETACL4args*);
425 extern  bool_t xdr_SETACL4resok(XDR *, SETACL4resok*);
426 extern  bool_t xdr_SETACL4resfail(XDR *, SETACL4resfail*);
427 extern  bool_t xdr_SETACL4res(XDR *, SETACL4res*);
428 
429 #else /* K&R C */
430 extern bool_t xdr_uid();
431 extern bool_t xdr_o_mode();
432 extern bool_t xdr_aclent();
433 extern bool_t xdr_secattr();
434 extern bool_t xdr_GETACL2args();
435 extern bool_t xdr_GETACL2resok();
436 extern bool_t xdr_GETACL2res();
437 extern bool_t xdr_SETACL2args();
438 extern bool_t xdr_SETACL2resok();
439 extern bool_t xdr_SETACL2res();
440 extern bool_t xdr_GETATTR2args();
441 extern bool_t xdr_GETATTR2resok();
442 extern bool_t xdr_GETATTR2res();
443 extern bool_t xdr_ACCESS2args();
444 extern bool_t xdr_ACCESS2resok();
445 extern bool_t xdr_ACCESS2res();
446 extern bool_t xdr_GETXATTRDIR2args();
447 extern bool_t xdr_GETXATTRDIR2resok();
448 extern bool_t xdr_GETXATTRDIR2res();
449 extern bool_t xdr_GETACL3args();
450 extern bool_t xdr_GETACL3resok();
451 extern bool_t xdr_GETACL3resfail();
452 extern bool_t xdr_GETACL3res();
453 extern bool_t xdr_SETACL3args();
454 extern bool_t xdr_SETACL3resok();
455 extern bool_t xdr_SETACL3resfail();
456 extern bool_t xdr_SETACL3res();
457 extern bool_t xdr_GETXATTRDIR3args();
458 extern bool_t xdr_GETXATTRDIR3resok();
459 extern bool_t xdr_GETXATTRDIR3res();
460 extern bool_t xdr_GETACL4args();
461 extern bool_t xdr_GETACL4resok();
462 extern bool_t xdr_GETACL4resfail();
463 extern bool_t xdr_GETACL4res();
464 extern bool_t xdr_SETACL4args();
465 extern bool_t xdr_SETACL4resok();
466 extern bool_t xdr_SETACL4resfail();
467 extern bool_t xdr_SETACL4res();
468 
469 #endif /* K&R C */
470 
471 #ifdef __cplusplus
472 }
473 #endif
474 
475 #endif /* !_NFS_ACL_H_RPCGEN */
476