FreeBSD/Linux Kernel Cross Reference
sys/sys/vnode_if.h
1 /* $NetBSD: vnode_if.h,v 1.72 2008/01/25 14:32:46 ad Exp $ */
2
3 /*
4 * Warning: DO NOT EDIT! This file is automatically generated!
5 * (Modifications made here may easily be lost!)
6 *
7 * Created from the file:
8 * NetBSD: vnode_if.src,v 1.57 2008/01/25 14:32:15 ad Exp
9 * by the script:
10 * NetBSD: vnode_if.sh,v 1.48 2008/01/02 11:48:57 ad Exp
11 */
12
13 /*
14 * Copyright (c) 1992, 1993, 1994, 1995
15 * The Regents of the University of California. All rights reserved.
16 *
17 * Redistribution and use in source and binary forms, with or without
18 * modification, are permitted provided that the following conditions
19 * are met:
20 * 1. Redistributions of source code must retain the above copyright
21 * notice, this list of conditions and the following disclaimer.
22 * 2. Redistributions in binary form must reproduce the above copyright
23 * notice, this list of conditions and the following disclaimer in the
24 * documentation and/or other materials provided with the distribution.
25 * 3. Neither the name of the University nor the names of its contributors
26 * may be used to endorse or promote products derived from this software
27 * without specific prior written permission.
28 *
29 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
30 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
31 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
32 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
33 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
34 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
35 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
36 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
37 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
38 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
39 * SUCH DAMAGE.
40 */
41
42 #ifndef _SYS_VNODE_IF_H_
43 #define _SYS_VNODE_IF_H_
44
45 #ifdef _KERNEL_OPT
46 #include "opt_vnode_lockdebug.h"
47 #endif /* _KERNEL_OPT */
48
49 extern const struct vnodeop_desc vop_default_desc;
50
51
52 /* Special cases: */
53 #include <sys/buf.h>
54 #ifndef _KERNEL
55 #include <stdbool.h>
56 #endif
57
58
59 #define VOP_BWRITE_DESCOFFSET 1
60 struct vop_bwrite_args {
61 const struct vnodeop_desc *a_desc;
62 struct buf *a_bp;
63 };
64 extern const struct vnodeop_desc vop_bwrite_desc;
65 int VOP_BWRITE(struct buf *);
66 /* End of special cases */
67
68 #define VOP_LOOKUP_DESCOFFSET 2
69 struct vop_lookup_args {
70 const struct vnodeop_desc *a_desc;
71 struct vnode *a_dvp;
72 struct vnode **a_vpp;
73 struct componentname *a_cnp;
74 };
75 extern const struct vnodeop_desc vop_lookup_desc;
76 int VOP_LOOKUP(struct vnode *, struct vnode **, struct componentname *);
77
78 #define VOP_CREATE_DESCOFFSET 3
79 struct vop_create_args {
80 const struct vnodeop_desc *a_desc;
81 struct vnode *a_dvp;
82 struct vnode **a_vpp;
83 struct componentname *a_cnp;
84 struct vattr *a_vap;
85 };
86 extern const struct vnodeop_desc vop_create_desc;
87 int VOP_CREATE(struct vnode *, struct vnode **, struct componentname *,
88 struct vattr *);
89
90 #define VOP_MKNOD_DESCOFFSET 4
91 struct vop_mknod_args {
92 const struct vnodeop_desc *a_desc;
93 struct vnode *a_dvp;
94 struct vnode **a_vpp;
95 struct componentname *a_cnp;
96 struct vattr *a_vap;
97 };
98 extern const struct vnodeop_desc vop_mknod_desc;
99 int VOP_MKNOD(struct vnode *, struct vnode **, struct componentname *,
100 struct vattr *);
101
102 #define VOP_OPEN_DESCOFFSET 5
103 struct vop_open_args {
104 const struct vnodeop_desc *a_desc;
105 struct vnode *a_vp;
106 int a_mode;
107 kauth_cred_t a_cred;
108 };
109 extern const struct vnodeop_desc vop_open_desc;
110 int VOP_OPEN(struct vnode *, int, kauth_cred_t);
111
112 #define VOP_CLOSE_DESCOFFSET 6
113 struct vop_close_args {
114 const struct vnodeop_desc *a_desc;
115 struct vnode *a_vp;
116 int a_fflag;
117 kauth_cred_t a_cred;
118 };
119 extern const struct vnodeop_desc vop_close_desc;
120 int VOP_CLOSE(struct vnode *, int, kauth_cred_t);
121
122 #define VOP_ACCESS_DESCOFFSET 7
123 struct vop_access_args {
124 const struct vnodeop_desc *a_desc;
125 struct vnode *a_vp;
126 int a_mode;
127 kauth_cred_t a_cred;
128 };
129 extern const struct vnodeop_desc vop_access_desc;
130 int VOP_ACCESS(struct vnode *, int, kauth_cred_t);
131
132 #define VOP_GETATTR_DESCOFFSET 8
133 struct vop_getattr_args {
134 const struct vnodeop_desc *a_desc;
135 struct vnode *a_vp;
136 struct vattr *a_vap;
137 kauth_cred_t a_cred;
138 };
139 extern const struct vnodeop_desc vop_getattr_desc;
140 int VOP_GETATTR(struct vnode *, struct vattr *, kauth_cred_t);
141
142 #define VOP_SETATTR_DESCOFFSET 9
143 struct vop_setattr_args {
144 const struct vnodeop_desc *a_desc;
145 struct vnode *a_vp;
146 struct vattr *a_vap;
147 kauth_cred_t a_cred;
148 };
149 extern const struct vnodeop_desc vop_setattr_desc;
150 int VOP_SETATTR(struct vnode *, struct vattr *, kauth_cred_t);
151
152 #define VOP_READ_DESCOFFSET 10
153 struct vop_read_args {
154 const struct vnodeop_desc *a_desc;
155 struct vnode *a_vp;
156 struct uio *a_uio;
157 int a_ioflag;
158 kauth_cred_t a_cred;
159 };
160 extern const struct vnodeop_desc vop_read_desc;
161 int VOP_READ(struct vnode *, struct uio *, int, kauth_cred_t);
162
163 #define VOP_WRITE_DESCOFFSET 11
164 struct vop_write_args {
165 const struct vnodeop_desc *a_desc;
166 struct vnode *a_vp;
167 struct uio *a_uio;
168 int a_ioflag;
169 kauth_cred_t a_cred;
170 };
171 extern const struct vnodeop_desc vop_write_desc;
172 int VOP_WRITE(struct vnode *, struct uio *, int, kauth_cred_t);
173
174 #define VOP_IOCTL_DESCOFFSET 12
175 struct vop_ioctl_args {
176 const struct vnodeop_desc *a_desc;
177 struct vnode *a_vp;
178 u_long a_command;
179 void *a_data;
180 int a_fflag;
181 kauth_cred_t a_cred;
182 };
183 extern const struct vnodeop_desc vop_ioctl_desc;
184 int VOP_IOCTL(struct vnode *, u_long, void *, int, kauth_cred_t);
185
186 #define VOP_FCNTL_DESCOFFSET 13
187 struct vop_fcntl_args {
188 const struct vnodeop_desc *a_desc;
189 struct vnode *a_vp;
190 u_int a_command;
191 void *a_data;
192 int a_fflag;
193 kauth_cred_t a_cred;
194 };
195 extern const struct vnodeop_desc vop_fcntl_desc;
196 int VOP_FCNTL(struct vnode *, u_int, void *, int, kauth_cred_t);
197
198 #define VOP_POLL_DESCOFFSET 14
199 struct vop_poll_args {
200 const struct vnodeop_desc *a_desc;
201 struct vnode *a_vp;
202 int a_events;
203 };
204 extern const struct vnodeop_desc vop_poll_desc;
205 int VOP_POLL(struct vnode *, int);
206
207 #define VOP_KQFILTER_DESCOFFSET 15
208 struct vop_kqfilter_args {
209 const struct vnodeop_desc *a_desc;
210 struct vnode *a_vp;
211 struct knote *a_kn;
212 };
213 extern const struct vnodeop_desc vop_kqfilter_desc;
214 int VOP_KQFILTER(struct vnode *, struct knote *);
215
216 #define VOP_REVOKE_DESCOFFSET 16
217 struct vop_revoke_args {
218 const struct vnodeop_desc *a_desc;
219 struct vnode *a_vp;
220 int a_flags;
221 };
222 extern const struct vnodeop_desc vop_revoke_desc;
223 int VOP_REVOKE(struct vnode *, int);
224
225 #define VOP_MMAP_DESCOFFSET 17
226 struct vop_mmap_args {
227 const struct vnodeop_desc *a_desc;
228 struct vnode *a_vp;
229 vm_prot_t a_prot;
230 kauth_cred_t a_cred;
231 };
232 extern const struct vnodeop_desc vop_mmap_desc;
233 int VOP_MMAP(struct vnode *, vm_prot_t, kauth_cred_t);
234
235 #define VOP_FSYNC_DESCOFFSET 18
236 struct vop_fsync_args {
237 const struct vnodeop_desc *a_desc;
238 struct vnode *a_vp;
239 kauth_cred_t a_cred;
240 int a_flags;
241 off_t a_offlo;
242 off_t a_offhi;
243 };
244 extern const struct vnodeop_desc vop_fsync_desc;
245 int VOP_FSYNC(struct vnode *, kauth_cred_t, int, off_t, off_t);
246
247 #define VOP_SEEK_DESCOFFSET 19
248 struct vop_seek_args {
249 const struct vnodeop_desc *a_desc;
250 struct vnode *a_vp;
251 off_t a_oldoff;
252 off_t a_newoff;
253 kauth_cred_t a_cred;
254 };
255 extern const struct vnodeop_desc vop_seek_desc;
256 int VOP_SEEK(struct vnode *, off_t, off_t, kauth_cred_t);
257
258 #define VOP_REMOVE_DESCOFFSET 20
259 struct vop_remove_args {
260 const struct vnodeop_desc *a_desc;
261 struct vnode *a_dvp;
262 struct vnode *a_vp;
263 struct componentname *a_cnp;
264 };
265 extern const struct vnodeop_desc vop_remove_desc;
266 int VOP_REMOVE(struct vnode *, struct vnode *, struct componentname *);
267
268 #define VOP_LINK_DESCOFFSET 21
269 struct vop_link_args {
270 const struct vnodeop_desc *a_desc;
271 struct vnode *a_dvp;
272 struct vnode *a_vp;
273 struct componentname *a_cnp;
274 };
275 extern const struct vnodeop_desc vop_link_desc;
276 int VOP_LINK(struct vnode *, struct vnode *, struct componentname *);
277
278 #define VOP_RENAME_DESCOFFSET 22
279 struct vop_rename_args {
280 const struct vnodeop_desc *a_desc;
281 struct vnode *a_fdvp;
282 struct vnode *a_fvp;
283 struct componentname *a_fcnp;
284 struct vnode *a_tdvp;
285 struct vnode *a_tvp;
286 struct componentname *a_tcnp;
287 };
288 extern const struct vnodeop_desc vop_rename_desc;
289 int VOP_RENAME(struct vnode *, struct vnode *, struct componentname *,
290 struct vnode *, struct vnode *, struct componentname *);
291
292 #define VOP_MKDIR_DESCOFFSET 23
293 struct vop_mkdir_args {
294 const struct vnodeop_desc *a_desc;
295 struct vnode *a_dvp;
296 struct vnode **a_vpp;
297 struct componentname *a_cnp;
298 struct vattr *a_vap;
299 };
300 extern const struct vnodeop_desc vop_mkdir_desc;
301 int VOP_MKDIR(struct vnode *, struct vnode **, struct componentname *,
302 struct vattr *);
303
304 #define VOP_RMDIR_DESCOFFSET 24
305 struct vop_rmdir_args {
306 const struct vnodeop_desc *a_desc;
307 struct vnode *a_dvp;
308 struct vnode *a_vp;
309 struct componentname *a_cnp;
310 };
311 extern const struct vnodeop_desc vop_rmdir_desc;
312 int VOP_RMDIR(struct vnode *, struct vnode *, struct componentname *);
313
314 #define VOP_SYMLINK_DESCOFFSET 25
315 struct vop_symlink_args {
316 const struct vnodeop_desc *a_desc;
317 struct vnode *a_dvp;
318 struct vnode **a_vpp;
319 struct componentname *a_cnp;
320 struct vattr *a_vap;
321 char *a_target;
322 };
323 extern const struct vnodeop_desc vop_symlink_desc;
324 int VOP_SYMLINK(struct vnode *, struct vnode **, struct componentname *,
325 struct vattr *, char *);
326
327 #define VOP_READDIR_DESCOFFSET 26
328 struct vop_readdir_args {
329 const struct vnodeop_desc *a_desc;
330 struct vnode *a_vp;
331 struct uio *a_uio;
332 kauth_cred_t a_cred;
333 int *a_eofflag;
334 off_t **a_cookies;
335 int *a_ncookies;
336 };
337 extern const struct vnodeop_desc vop_readdir_desc;
338 int VOP_READDIR(struct vnode *, struct uio *, kauth_cred_t, int *, off_t **,
339 int *);
340
341 #define VOP_READLINK_DESCOFFSET 27
342 struct vop_readlink_args {
343 const struct vnodeop_desc *a_desc;
344 struct vnode *a_vp;
345 struct uio *a_uio;
346 kauth_cred_t a_cred;
347 };
348 extern const struct vnodeop_desc vop_readlink_desc;
349 int VOP_READLINK(struct vnode *, struct uio *, kauth_cred_t);
350
351 #define VOP_ABORTOP_DESCOFFSET 28
352 struct vop_abortop_args {
353 const struct vnodeop_desc *a_desc;
354 struct vnode *a_dvp;
355 struct componentname *a_cnp;
356 };
357 extern const struct vnodeop_desc vop_abortop_desc;
358 int VOP_ABORTOP(struct vnode *, struct componentname *);
359
360 #define VOP_INACTIVE_DESCOFFSET 29
361 struct vop_inactive_args {
362 const struct vnodeop_desc *a_desc;
363 struct vnode *a_vp;
364 bool *a_recycle;
365 };
366 extern const struct vnodeop_desc vop_inactive_desc;
367 int VOP_INACTIVE(struct vnode *, bool *);
368
369 #define VOP_RECLAIM_DESCOFFSET 30
370 struct vop_reclaim_args {
371 const struct vnodeop_desc *a_desc;
372 struct vnode *a_vp;
373 };
374 extern const struct vnodeop_desc vop_reclaim_desc;
375 int VOP_RECLAIM(struct vnode *);
376
377 #define VOP_LOCK_DESCOFFSET 31
378 struct vop_lock_args {
379 const struct vnodeop_desc *a_desc;
380 struct vnode *a_vp;
381 int a_flags;
382 };
383 extern const struct vnodeop_desc vop_lock_desc;
384 int VOP_LOCK(struct vnode *, int);
385
386 #define VOP_UNLOCK_DESCOFFSET 32
387 struct vop_unlock_args {
388 const struct vnodeop_desc *a_desc;
389 struct vnode *a_vp;
390 int a_flags;
391 };
392 extern const struct vnodeop_desc vop_unlock_desc;
393 int VOP_UNLOCK(struct vnode *, int);
394
395 #define VOP_BMAP_DESCOFFSET 33
396 struct vop_bmap_args {
397 const struct vnodeop_desc *a_desc;
398 struct vnode *a_vp;
399 daddr_t a_bn;
400 struct vnode **a_vpp;
401 daddr_t *a_bnp;
402 int *a_runp;
403 };
404 extern const struct vnodeop_desc vop_bmap_desc;
405 int VOP_BMAP(struct vnode *, daddr_t, struct vnode **, daddr_t *, int *);
406
407 #define VOP_STRATEGY_DESCOFFSET 34
408 struct vop_strategy_args {
409 const struct vnodeop_desc *a_desc;
410 struct vnode *a_vp;
411 struct buf *a_bp;
412 };
413 extern const struct vnodeop_desc vop_strategy_desc;
414 int VOP_STRATEGY(struct vnode *, struct buf *);
415
416 #define VOP_PRINT_DESCOFFSET 35
417 struct vop_print_args {
418 const struct vnodeop_desc *a_desc;
419 struct vnode *a_vp;
420 };
421 extern const struct vnodeop_desc vop_print_desc;
422 int VOP_PRINT(struct vnode *);
423
424 #define VOP_ISLOCKED_DESCOFFSET 36
425 struct vop_islocked_args {
426 const struct vnodeop_desc *a_desc;
427 struct vnode *a_vp;
428 };
429 extern const struct vnodeop_desc vop_islocked_desc;
430 int VOP_ISLOCKED(struct vnode *);
431
432 #define VOP_PATHCONF_DESCOFFSET 37
433 struct vop_pathconf_args {
434 const struct vnodeop_desc *a_desc;
435 struct vnode *a_vp;
436 int a_name;
437 register_t *a_retval;
438 };
439 extern const struct vnodeop_desc vop_pathconf_desc;
440 int VOP_PATHCONF(struct vnode *, int, register_t *);
441
442 #define VOP_ADVLOCK_DESCOFFSET 38
443 struct vop_advlock_args {
444 const struct vnodeop_desc *a_desc;
445 struct vnode *a_vp;
446 void *a_id;
447 int a_op;
448 struct flock *a_fl;
449 int a_flags;
450 };
451 extern const struct vnodeop_desc vop_advlock_desc;
452 int VOP_ADVLOCK(struct vnode *, void *, int, struct flock *, int);
453
454 #define VOP_WHITEOUT_DESCOFFSET 39
455 struct vop_whiteout_args {
456 const struct vnodeop_desc *a_desc;
457 struct vnode *a_dvp;
458 struct componentname *a_cnp;
459 int a_flags;
460 };
461 extern const struct vnodeop_desc vop_whiteout_desc;
462 int VOP_WHITEOUT(struct vnode *, struct componentname *, int);
463
464 #define VOP_GETPAGES_DESCOFFSET 40
465 struct vop_getpages_args {
466 const struct vnodeop_desc *a_desc;
467 struct vnode *a_vp;
468 voff_t a_offset;
469 struct vm_page **a_m;
470 int *a_count;
471 int a_centeridx;
472 vm_prot_t a_access_type;
473 int a_advice;
474 int a_flags;
475 };
476 extern const struct vnodeop_desc vop_getpages_desc;
477 int VOP_GETPAGES(struct vnode *, voff_t, struct vm_page **, int *, int,
478 vm_prot_t, int, int);
479
480 #define VOP_PUTPAGES_DESCOFFSET 41
481 struct vop_putpages_args {
482 const struct vnodeop_desc *a_desc;
483 struct vnode *a_vp;
484 voff_t a_offlo;
485 voff_t a_offhi;
486 int a_flags;
487 };
488 extern const struct vnodeop_desc vop_putpages_desc;
489 int VOP_PUTPAGES(struct vnode *, voff_t, voff_t, int);
490
491 #define VOP_CLOSEEXTATTR_DESCOFFSET 42
492 struct vop_closeextattr_args {
493 const struct vnodeop_desc *a_desc;
494 struct vnode *a_vp;
495 int a_commit;
496 kauth_cred_t a_cred;
497 };
498 extern const struct vnodeop_desc vop_closeextattr_desc;
499 int VOP_CLOSEEXTATTR(struct vnode *, int, kauth_cred_t);
500
501 #define VOP_GETEXTATTR_DESCOFFSET 43
502 struct vop_getextattr_args {
503 const struct vnodeop_desc *a_desc;
504 struct vnode *a_vp;
505 int a_attrnamespace;
506 const char *a_name;
507 struct uio *a_uio;
508 size_t *a_size;
509 kauth_cred_t a_cred;
510 };
511 extern const struct vnodeop_desc vop_getextattr_desc;
512 int VOP_GETEXTATTR(struct vnode *, int, const char *, struct uio *,
513 size_t *, kauth_cred_t);
514
515 #define VOP_LISTEXTATTR_DESCOFFSET 44
516 struct vop_listextattr_args {
517 const struct vnodeop_desc *a_desc;
518 struct vnode *a_vp;
519 int a_attrnamespace;
520 struct uio *a_uio;
521 size_t *a_size;
522 kauth_cred_t a_cred;
523 };
524 extern const struct vnodeop_desc vop_listextattr_desc;
525 int VOP_LISTEXTATTR(struct vnode *, int, struct uio *, size_t *, kauth_cred_t);
526
527 #define VOP_OPENEXTATTR_DESCOFFSET 45
528 struct vop_openextattr_args {
529 const struct vnodeop_desc *a_desc;
530 struct vnode *a_vp;
531 kauth_cred_t a_cred;
532 };
533 extern const struct vnodeop_desc vop_openextattr_desc;
534 int VOP_OPENEXTATTR(struct vnode *, kauth_cred_t);
535
536 #define VOP_DELETEEXTATTR_DESCOFFSET 46
537 struct vop_deleteextattr_args {
538 const struct vnodeop_desc *a_desc;
539 struct vnode *a_vp;
540 int a_attrnamespace;
541 const char *a_name;
542 kauth_cred_t a_cred;
543 };
544 extern const struct vnodeop_desc vop_deleteextattr_desc;
545 int VOP_DELETEEXTATTR(struct vnode *, int, const char *, kauth_cred_t);
546
547 #define VOP_SETEXTATTR_DESCOFFSET 47
548 struct vop_setextattr_args {
549 const struct vnodeop_desc *a_desc;
550 struct vnode *a_vp;
551 int a_attrnamespace;
552 const char *a_name;
553 struct uio *a_uio;
554 kauth_cred_t a_cred;
555 };
556 extern const struct vnodeop_desc vop_setextattr_desc;
557 int VOP_SETEXTATTR(struct vnode *, int, const char *, struct uio *,
558 kauth_cred_t);
559
560 #define VNODE_OPS_COUNT 48
561
562 /* End of special cases. */
563
564 #endif /* !_SYS_VNODE_IF_H_ */
Cache object: e59703dadfb6d0e06bd304a3e96cd2ba
|