]> git.saurik.com Git - apple/xnu.git/blob - bsd/sys/vnode_if.h
xnu-792.6.56.tar.gz
[apple/xnu.git] / bsd / sys / vnode_if.h
1
2 /*
3 * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.
4 *
5 * @APPLE_LICENSE_HEADER_START@
6 *
7 * This file contains Original Code and/or Modifications of Original Code
8 * as defined in and that are subject to the Apple Public Source License
9 * Version 2.0 (the 'License'). You may not use this file except in
10 * compliance with the License. Please obtain a copy of the License at
11 * http://www.opensource.apple.com/apsl/ and read it before using this
12 * file.
13 *
14 * The Original Code and all software distributed under the License are
15 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
16 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
17 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
19 * Please see the License for the specific language governing rights and
20 * limitations under the License.
21 *
22 * @APPLE_LICENSE_HEADER_END@
23 */
24 /*
25 * Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved
26 * Copyright (c) 1992, 1993, 1994, 1995
27 * The Regents of the University of California. All rights reserved.
28 *
29 * Redistribution and use in source and binary forms, with or without
30 * modification, are permitted provided that the following conditions
31 * are met:
32 * 1. Redistributions of source code must retain the above copyright
33 * notice, this list of conditions and the following disclaimer.
34 * 2. Redistributions in binary form must reproduce the above copyright
35 * notice, this list of conditions and the following disclaimer in the
36 * documentation and/or other materials provided with the distribution.
37 * 3. All advertising materials mentioning features or use of this software
38 * must display the following acknowledgement:
39 * This product includes software developed by the University of
40 * California, Berkeley and its contributors.
41 * 4. Neither the name of the University nor the names of its contributors
42 * may be used to endorse or promote products derived from this software
43 * without specific prior written permission.
44 *
45 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS AND
46 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
47 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
48 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
49 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
50 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
51 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
52 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
53 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
54 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
55 * SUCH DAMAGE.
56 */
57
58
59 /*
60 * Warning: This file is generated automatically.
61 * (Modifications made here may easily be lost!)
62 *
63 * Created by the script:
64 * @(#)vnode_if.sh 8.7 (Berkeley) 5/11/95
65 */
66
67
68 #ifndef _SYS_VNODE_IF_H_
69 #define _SYS_VNODE_IF_H_
70
71 #include <sys/appleapiopts.h>
72 #include <sys/cdefs.h>
73 #include <sys/kernel_types.h>
74 #include <sys/buf.h>
75 #ifdef BSD_KERNEL_PRIVATE
76 #include <sys/vm.h>
77 #endif
78 #include <mach/memory_object_types.h>
79
80
81 #ifdef KERNEL
82
83 extern struct vnodeop_desc vnop_default_desc;
84 extern struct vnodeop_desc vnop_lookup_desc;
85 extern struct vnodeop_desc vnop_create_desc;
86 extern struct vnodeop_desc vnop_whiteout_desc;
87 extern struct vnodeop_desc vnop_mknod_desc;
88 extern struct vnodeop_desc vnop_open_desc;
89 extern struct vnodeop_desc vnop_close_desc;
90 extern struct vnodeop_desc vnop_access_desc;
91 extern struct vnodeop_desc vnop_getattr_desc;
92 extern struct vnodeop_desc vnop_setattr_desc;
93 extern struct vnodeop_desc vnop_getattrlist_desc;
94 extern struct vnodeop_desc vnop_setattrlist_desc;
95 extern struct vnodeop_desc vnop_read_desc;
96 extern struct vnodeop_desc vnop_write_desc;
97 extern struct vnodeop_desc vnop_ioctl_desc;
98 extern struct vnodeop_desc vnop_select_desc;
99 extern struct vnodeop_desc vnop_exchange_desc;
100 extern struct vnodeop_desc vnop_revoke_desc;
101 extern struct vnodeop_desc vnop_mmap_desc;
102 extern struct vnodeop_desc vnop_mnomap_desc;
103 extern struct vnodeop_desc vnop_fsync_desc;
104 extern struct vnodeop_desc vnop_remove_desc;
105 extern struct vnodeop_desc vnop_link_desc;
106 extern struct vnodeop_desc vnop_rename_desc;
107 extern struct vnodeop_desc vnop_mkdir_desc;
108 extern struct vnodeop_desc vnop_rmdir_desc;
109 extern struct vnodeop_desc vnop_symlink_desc;
110 extern struct vnodeop_desc vnop_readdir_desc;
111 extern struct vnodeop_desc vnop_readdirattr_desc;
112 extern struct vnodeop_desc vnop_readlink_desc;
113 extern struct vnodeop_desc vnop_inactive_desc;
114 extern struct vnodeop_desc vnop_reclaim_desc;
115 extern struct vnodeop_desc vnop_print_desc;
116 extern struct vnodeop_desc vnop_pathconf_desc;
117 extern struct vnodeop_desc vnop_advlock_desc;
118 extern struct vnodeop_desc vnop_truncate_desc;
119 extern struct vnodeop_desc vnop_allocate_desc;
120 extern struct vnodeop_desc vnop_pagein_desc;
121 extern struct vnodeop_desc vnop_pageout_desc;
122 extern struct vnodeop_desc vnop_devblocksize_desc;
123 extern struct vnodeop_desc vnop_searchfs_desc;
124 extern struct vnodeop_desc vnop_copyfile_desc;
125 extern struct vnodeop_desc vnop_blktooff_desc;
126 extern struct vnodeop_desc vnop_offtoblk_desc;
127 extern struct vnodeop_desc vnop_blockmap_desc;
128 extern struct vnodeop_desc vnop_strategy_desc;
129 extern struct vnodeop_desc vnop_bwrite_desc;
130
131 __BEGIN_DECLS
132 /*
133 *#
134 *#% lookup dvp L ? ?
135 *#% lookup vpp - L -
136 */
137 struct vnop_lookup_args {
138 struct vnodeop_desc *a_desc;
139 vnode_t a_dvp;
140 vnode_t *a_vpp;
141 struct componentname *a_cnp;
142 vfs_context_t a_context;
143 };
144 extern errno_t VNOP_LOOKUP(vnode_t, vnode_t *, struct componentname *, vfs_context_t);
145
146
147 /*
148 *#
149 *#% create dvp L L L
150 *#% create vpp - L -
151 *#
152 */
153
154 struct vnop_create_args {
155 struct vnodeop_desc *a_desc;
156 vnode_t a_dvp;
157 vnode_t *a_vpp;
158 struct componentname *a_cnp;
159 struct vnode_attr *a_vap;
160 vfs_context_t a_context;
161 };
162 extern errno_t VNOP_CREATE(vnode_t, vnode_t *, struct componentname *, struct vnode_attr *, vfs_context_t);
163
164 /*
165 *#
166 *#% whiteout dvp L L L
167 *#% whiteout cnp - - -
168 *#% whiteout flag - - -
169 *#
170 */
171 struct vnop_whiteout_args {
172 struct vnodeop_desc *a_desc;
173 vnode_t a_dvp;
174 struct componentname *a_cnp;
175 int a_flags;
176 vfs_context_t a_context;
177 };
178 extern errno_t VNOP_WHITEOUT(vnode_t, struct componentname *, int, vfs_context_t);
179
180 /*
181 *#
182 *#% mknod dvp L U U
183 *#% mknod vpp - X -
184 *#
185 */
186 struct vnop_mknod_args {
187 struct vnodeop_desc *a_desc;
188 vnode_t a_dvp;
189 vnode_t *a_vpp;
190 struct componentname *a_cnp;
191 struct vnode_attr *a_vap;
192 vfs_context_t a_context;
193 };
194 extern errno_t VNOP_MKNOD(vnode_t, vnode_t *, struct componentname *, struct vnode_attr *, vfs_context_t);
195
196 /*
197 *#
198 *#% open vp L L L
199 *#
200 */
201 struct vnop_open_args {
202 struct vnodeop_desc *a_desc;
203 vnode_t a_vp;
204 int a_mode;
205 vfs_context_t a_context;
206 };
207 extern errno_t VNOP_OPEN(vnode_t, int, vfs_context_t);
208
209 /*
210 *#
211 *#% close vp U U U
212 *#
213 */
214 struct vnop_close_args {
215 struct vnodeop_desc *a_desc;
216 vnode_t a_vp;
217 int a_fflag;
218 vfs_context_t a_context;
219 };
220 extern errno_t VNOP_CLOSE(vnode_t, int, vfs_context_t);
221
222 /*
223 *#
224 *#% access vp L L L
225 *#
226 */
227 struct vnop_access_args {
228 struct vnodeop_desc *a_desc;
229 vnode_t a_vp;
230 int a_action;
231 vfs_context_t a_context;
232 };
233 extern errno_t VNOP_ACCESS(vnode_t, int, vfs_context_t);
234
235
236 /*
237 *#
238 *#% getattr vp = = =
239 *#
240 */
241 struct vnop_getattr_args {
242 struct vnodeop_desc *a_desc;
243 vnode_t a_vp;
244 struct vnode_attr *a_vap;
245 vfs_context_t a_context;
246 };
247 extern errno_t VNOP_GETATTR(vnode_t, struct vnode_attr *, vfs_context_t);
248
249 /*
250 *#
251 *#% setattr vp L L L
252 *#
253 */
254 struct vnop_setattr_args {
255 struct vnodeop_desc *a_desc;
256 vnode_t a_vp;
257 struct vnode_attr *a_vap;
258 vfs_context_t a_context;
259 };
260 extern errno_t VNOP_SETATTR(vnode_t, struct vnode_attr *, vfs_context_t);
261
262 /*
263 *#
264 *#% getattrlist vp = = =
265 *#
266 */
267 struct vnop_getattrlist_args {
268 struct vnodeop_desc *a_desc;
269 vnode_t a_vp;
270 struct attrlist *a_alist;
271 struct uio *a_uio;
272 int a_options;
273 vfs_context_t a_context;
274 };
275 extern errno_t VNOP_GETATTRLIST(vnode_t, struct attrlist *, struct uio *, int, vfs_context_t);
276
277
278 /*
279 *#
280 *#% setattrlist vp L L L
281 *#
282 */
283 struct vnop_setattrlist_args {
284 struct vnodeop_desc *a_desc;
285 vnode_t a_vp;
286 struct attrlist *a_alist;
287 struct uio *a_uio;
288 int a_options;
289 vfs_context_t a_context;
290 };
291 extern errno_t VNOP_SETATTRLIST(vnode_t, struct attrlist *, struct uio *, int, vfs_context_t);
292
293
294 /*
295 *#
296 *#% read vp L L L
297 *#
298 */
299 struct vnop_read_args {
300 struct vnodeop_desc *a_desc;
301 vnode_t a_vp;
302 struct uio *a_uio;
303 int a_ioflag;
304 vfs_context_t a_context;
305 };
306 extern errno_t VNOP_READ(vnode_t, struct uio *, int, vfs_context_t);
307
308
309 /*
310 *#
311 *#% write vp L L L
312 *#
313 */
314 struct vnop_write_args {
315 struct vnodeop_desc *a_desc;
316 vnode_t a_vp;
317 struct uio *a_uio;
318 int a_ioflag;
319 vfs_context_t a_context;
320 };
321 extern errno_t VNOP_WRITE(vnode_t, struct uio *, int, vfs_context_t);
322
323
324 /*
325 *#
326 *#% ioctl vp U U U
327 *#
328 */
329 struct vnop_ioctl_args {
330 struct vnodeop_desc *a_desc;
331 vnode_t a_vp;
332 u_long a_command;
333 caddr_t a_data;
334 int a_fflag;
335 vfs_context_t a_context;
336 };
337 extern errno_t VNOP_IOCTL(vnode_t, u_long, caddr_t, int, vfs_context_t);
338
339
340 /*
341 *#
342 *#% select vp U U U
343 *#
344 */
345 struct vnop_select_args {
346 struct vnodeop_desc *a_desc;
347 vnode_t a_vp;
348 int a_which;
349 int a_fflags;
350 void *a_wql;
351 vfs_context_t a_context;
352 };
353 extern errno_t VNOP_SELECT(vnode_t, int, int, void *, vfs_context_t);
354
355
356 /*
357 *#
358 *#% exchange fvp L L L
359 *#% exchange tvp L L L
360 *#
361 */
362 struct vnop_exchange_args {
363 struct vnodeop_desc *a_desc;
364 vnode_t a_fvp;
365 vnode_t a_tvp;
366 int a_options;
367 vfs_context_t a_context;
368 };
369 extern errno_t VNOP_EXCHANGE(vnode_t, vnode_t, int, vfs_context_t);
370
371
372 /*
373 *#
374 *#% revoke vp U U U
375 *#
376 */
377 struct vnop_revoke_args {
378 struct vnodeop_desc *a_desc;
379 vnode_t a_vp;
380 int a_flags;
381 vfs_context_t a_context;
382 };
383 extern errno_t VNOP_REVOKE(vnode_t, int, vfs_context_t);
384
385
386 /*
387 *#
388 *# mmap - vp U U U
389 *#
390 */
391 struct vnop_mmap_args {
392 struct vnodeop_desc *a_desc;
393 vnode_t a_vp;
394 int a_fflags;
395 vfs_context_t a_context;
396 };
397 extern errno_t VNOP_MMAP(vnode_t, int, vfs_context_t);
398
399 /*
400 *#
401 *# mnomap - vp U U U
402 *#
403 */
404 struct vnop_mnomap_args {
405 struct vnodeop_desc *a_desc;
406 vnode_t a_vp;
407 vfs_context_t a_context;
408 };
409 extern errno_t VNOP_MNOMAP(vnode_t, vfs_context_t);
410
411
412 /*
413 *#
414 *#% fsync vp L L L
415 *#
416 */
417 struct vnop_fsync_args {
418 struct vnodeop_desc *a_desc;
419 vnode_t a_vp;
420 int a_waitfor;
421 vfs_context_t a_context;
422 };
423 extern errno_t VNOP_FSYNC(vnode_t, int, vfs_context_t);
424
425
426 /*
427 *#
428 *#% remove dvp L U U
429 *#% remove vp L U U
430 *#
431 */
432 struct vnop_remove_args {
433 struct vnodeop_desc *a_desc;
434 vnode_t a_dvp;
435 vnode_t a_vp;
436 struct componentname *a_cnp;
437 int a_flags;
438 vfs_context_t a_context;
439 };
440 extern errno_t VNOP_REMOVE(vnode_t, vnode_t, struct componentname *, int, vfs_context_t);
441
442
443 /*
444 *#
445 *#% link vp U U U
446 *#% link tdvp L U U
447 *#
448 */
449 struct vnop_link_args {
450 struct vnodeop_desc *a_desc;
451 vnode_t a_vp;
452 vnode_t a_tdvp;
453 struct componentname *a_cnp;
454 vfs_context_t a_context;
455 };
456 extern errno_t VNOP_LINK(vnode_t, vnode_t, struct componentname *, vfs_context_t);
457
458
459 /*
460 *#
461 *#% rename fdvp U U U
462 *#% rename fvp U U U
463 *#% rename tdvp L U U
464 *#% rename tvp X U U
465 *#
466 */
467 struct vnop_rename_args {
468 struct vnodeop_desc *a_desc;
469 vnode_t a_fdvp;
470 vnode_t a_fvp;
471 struct componentname *a_fcnp;
472 vnode_t a_tdvp;
473 vnode_t a_tvp;
474 struct componentname *a_tcnp;
475 vfs_context_t a_context;
476 };
477 extern errno_t VNOP_RENAME(vnode_t, vnode_t, struct componentname *, vnode_t, vnode_t, struct componentname *, vfs_context_t);
478
479
480 /*
481 *#
482 *#% mkdir dvp L U U
483 *#% mkdir vpp - L -
484 *#
485 */
486 struct vnop_mkdir_args {
487 struct vnodeop_desc *a_desc;
488 vnode_t a_dvp;
489 vnode_t *a_vpp;
490 struct componentname *a_cnp;
491 struct vnode_attr *a_vap;
492 vfs_context_t a_context;
493 };
494 extern errno_t VNOP_MKDIR(vnode_t, vnode_t *, struct componentname *, struct vnode_attr *, vfs_context_t);
495
496
497 /*
498 *#
499 *#% rmdir dvp L U U
500 *#% rmdir vp L U U
501 *#
502 */
503 struct vnop_rmdir_args {
504 struct vnodeop_desc *a_desc;
505 vnode_t a_dvp;
506 vnode_t a_vp;
507 struct componentname *a_cnp;
508 vfs_context_t a_context;
509 };
510 extern errno_t VNOP_RMDIR(vnode_t, vnode_t, struct componentname *, vfs_context_t);
511
512
513 /*
514 *#
515 *#% symlink dvp L U U
516 *#% symlink vpp - U -
517 *#
518 */
519 struct vnop_symlink_args {
520 struct vnodeop_desc *a_desc;
521 vnode_t a_dvp;
522 vnode_t *a_vpp;
523 struct componentname *a_cnp;
524 struct vnode_attr *a_vap;
525 char *a_target;
526 vfs_context_t a_context;
527 };
528 extern errno_t VNOP_SYMLINK(vnode_t, vnode_t *, struct componentname *, struct vnode_attr *, char *, vfs_context_t);
529
530
531 /*
532 *#
533 *#% readdir vp L L L
534 *#
535 *
536 * When VNOP_READDIR is called from the NFS Server, the nfs_data
537 * argument is non-NULL.
538 *
539 * The value of nfs_eofflag should be set to TRUE if the end of
540 * the directory was reached while reading.
541 *
542 * The directory seek offset (cookies) are returned to the NFS client and
543 * may be used later to restart a directory read part way through
544 * the directory. There is one cookie returned for each directory
545 * entry returned and its size is determince from nfs_sizeofcookie.
546 * The value of the cookie should be the logical offset within the
547 * directory where the on-disc version of the appropriate directory
548 * entry starts. Memory for the cookies is allocated from M_TEMP
549 * and it is freed by the caller of VNOP_READDIR.
550 *
551 */
552
553 struct vnop_readdir_args {
554 struct vnodeop_desc *a_desc;
555 vnode_t a_vp;
556 struct uio *a_uio;
557 int a_flags;
558 int *a_eofflag;
559 int *a_numdirent;
560 vfs_context_t a_context;
561 };
562 extern errno_t VNOP_READDIR(vnode_t, struct uio *, int, int *, int *, vfs_context_t);
563
564
565 /*
566 *#
567 *#% readdirattr vp L L L
568 *#
569 */
570 struct vnop_readdirattr_args {
571 struct vnodeop_desc *a_desc;
572 vnode_t a_vp;
573 struct attrlist *a_alist;
574 struct uio *a_uio;
575 u_long a_maxcount;
576 u_long a_options;
577 u_long *a_newstate;
578 int *a_eofflag;
579 u_long *a_actualcount;
580 vfs_context_t a_context;
581 };
582 extern errno_t VNOP_READDIRATTR(vnode_t, struct attrlist *, struct uio *, u_long, u_long, u_long *, int *, u_long *, vfs_context_t);
583
584
585 /*
586 *#
587 *#% readlink vp L L L
588 *#
589 */
590 struct vnop_readlink_args {
591 struct vnodeop_desc *a_desc;
592 vnode_t a_vp;
593 struct uio *a_uio;
594 vfs_context_t a_context;
595 };
596 extern errno_t VNOP_READLINK(vnode_t, struct uio *, vfs_context_t);
597
598
599 /*
600 *#
601 *#% inactive vp L U U
602 *#
603 */
604 struct vnop_inactive_args {
605 struct vnodeop_desc *a_desc;
606 vnode_t a_vp;
607 vfs_context_t a_context;
608 };
609 extern errno_t VNOP_INACTIVE(vnode_t, vfs_context_t);
610
611
612 /*
613 *#
614 *#% reclaim vp U U U
615 *#
616 */
617 struct vnop_reclaim_args {
618 struct vnodeop_desc *a_desc;
619 vnode_t a_vp;
620 vfs_context_t a_context;
621 };
622 extern errno_t VNOP_RECLAIM(vnode_t, vfs_context_t);
623
624
625 /*
626 *#
627 *#% pathconf vp L L L
628 *#
629 */
630 struct vnop_pathconf_args {
631 struct vnodeop_desc *a_desc;
632 vnode_t a_vp;
633 int a_name;
634 register_t *a_retval;
635 vfs_context_t a_context;
636 };
637 extern errno_t VNOP_PATHCONF(vnode_t, int, register_t *, vfs_context_t); /* register_t??????? */
638
639
640 /*
641 *#
642 *#% advlock vp U U U
643 *#
644 */
645 struct vnop_advlock_args {
646 struct vnodeop_desc *a_desc;
647 vnode_t a_vp;
648 caddr_t a_id;
649 int a_op;
650 struct flock *a_fl;
651 int a_flags;
652 vfs_context_t a_context;
653 };
654 extern errno_t VNOP_ADVLOCK(vnode_t, caddr_t, int, struct flock *, int, vfs_context_t);
655
656 /*
657 *#
658 *#% allocate vp L L L
659 *#
660 */
661 struct vnop_allocate_args {
662 struct vnodeop_desc *a_desc;
663 vnode_t a_vp;
664 off_t a_length;
665 u_int32_t a_flags;
666 off_t *a_bytesallocated;
667 off_t a_offset;
668 vfs_context_t a_context;
669 };
670 extern errno_t VNOP_ALLOCATE(vnode_t, off_t, u_int32_t, off_t *, off_t, vfs_context_t);
671
672 /*
673 *#
674 *#% pagein vp = = =
675 *#
676 */
677 struct vnop_pagein_args {
678 struct vnodeop_desc *a_desc;
679 vnode_t a_vp;
680 upl_t a_pl;
681 vm_offset_t a_pl_offset;
682 off_t a_f_offset;
683 size_t a_size;
684 int a_flags;
685 vfs_context_t a_context;
686 };
687 extern errno_t VNOP_PAGEIN(vnode_t, upl_t, vm_offset_t, off_t, size_t, int, vfs_context_t); /* vm_offset_t ? */
688
689
690 /*
691 *#
692 *#% pageout vp = = =
693 *#
694 */
695 struct vnop_pageout_args {
696 struct vnodeop_desc *a_desc;
697 vnode_t a_vp;
698 upl_t a_pl;
699 vm_offset_t a_pl_offset;
700 off_t a_f_offset;
701 size_t a_size;
702 int a_flags;
703 vfs_context_t a_context;
704 };
705 extern errno_t VNOP_PAGEOUT(vnode_t, upl_t, vm_offset_t, off_t, size_t, int, vfs_context_t);
706
707
708 #ifdef BSD_KERNEL_PRIVATE
709 /*
710 *#% devblocksize vp = = =
711 *#
712 */
713 struct vnop_devblocksize_args {
714 struct vnodeop_desc *a_desc;
715 vnode_t a_vp;
716 register_t *a_retval;
717 };
718 #endif /* BSD_KERNEL_PRIVATE */
719
720 /*
721 *#
722 *#% searchfs vp L L L
723 *#
724 */
725 struct vnop_searchfs_args {
726 struct vnodeop_desc *a_desc;
727 vnode_t a_vp;
728 void *a_searchparams1;
729 void *a_searchparams2;
730 struct attrlist *a_searchattrs;
731 u_long a_maxmatches;
732 struct timeval *a_timelimit;
733 struct attrlist *a_returnattrs;
734 u_long *a_nummatches;
735 u_long a_scriptcode;
736 u_long a_options;
737 struct uio *a_uio;
738 struct searchstate *a_searchstate;
739 vfs_context_t a_context;
740 };
741 extern errno_t VNOP_SEARCHFS(vnode_t, void *, void *, struct attrlist *, u_long, struct timeval *, struct attrlist *, u_long *, u_long, u_long, struct uio *, struct searchstate *, vfs_context_t);
742
743
744 /*
745 *#
746 *#% copyfile fvp U U U
747 *#% copyfile tdvp L U U
748 *#% copyfile tvp X U U
749 *#
750 */
751 struct vnop_copyfile_args {
752 struct vnodeop_desc *a_desc;
753 vnode_t a_fvp;
754 vnode_t a_tdvp;
755 vnode_t a_tvp;
756 struct componentname *a_tcnp;
757 int a_mode;
758 int a_flags;
759 vfs_context_t a_context;
760 };
761 extern errno_t VNOP_COPYFILE(vnode_t, vnode_t, vnode_t, struct componentname *, int, int, vfs_context_t);
762
763
764 struct vnop_getxattr_args {
765 struct vnodeop_desc *a_desc;
766 vnode_t a_vp;
767 char * a_name;
768 uio_t a_uio;
769 size_t *a_size;
770 int a_options;
771 vfs_context_t a_context;
772 };
773 extern struct vnodeop_desc vnop_getxattr_desc;
774 extern errno_t VNOP_GETXATTR(vnode_t, const char *, uio_t, size_t *, int, vfs_context_t);
775
776 struct vnop_setxattr_args {
777 struct vnodeop_desc *a_desc;
778 vnode_t a_vp;
779 char * a_name;
780 uio_t a_uio;
781 int a_options;
782 vfs_context_t a_context;
783 };
784 extern struct vnodeop_desc vnop_setxattr_desc;
785 extern errno_t VNOP_SETXATTR(vnode_t, const char *, uio_t, int, vfs_context_t);
786
787 struct vnop_removexattr_args {
788 struct vnodeop_desc *a_desc;
789 vnode_t a_vp;
790 char * a_name;
791 int a_options;
792 vfs_context_t a_context;
793 };
794 extern struct vnodeop_desc vnop_removexattr_desc;
795 extern errno_t VNOP_REMOVEXATTR(vnode_t, const char *, int, vfs_context_t);
796
797 struct vnop_listxattr_args {
798 struct vnodeop_desc *a_desc;
799 vnode_t a_vp;
800 uio_t a_uio;
801 size_t *a_size;
802 int a_options;
803 vfs_context_t a_context;
804 };
805 extern struct vnodeop_desc vnop_listxattr_desc;
806 extern errno_t VNOP_LISTXATTR(vnode_t, uio_t, size_t *, int, vfs_context_t);
807
808
809 /*
810 *#
811 *#% blktooff vp = = =
812 *#
813 */
814 struct vnop_blktooff_args {
815 struct vnodeop_desc *a_desc;
816 vnode_t a_vp;
817 daddr64_t a_lblkno;
818 off_t *a_offset;
819 };
820 extern errno_t VNOP_BLKTOOFF(vnode_t, daddr64_t, off_t *);
821
822
823 /*
824 *#
825 *#% offtoblk vp = = =
826 *#
827 */
828 struct vnop_offtoblk_args {
829 struct vnodeop_desc *a_desc;
830 vnode_t a_vp;
831 off_t a_offset;
832 daddr64_t *a_lblkno;
833 };
834 extern errno_t VNOP_OFFTOBLK(vnode_t, off_t, daddr64_t *);
835
836
837 /*
838 *#
839 *#% blockmap vp L L L
840 *#
841 */
842 struct vnop_blockmap_args {
843 struct vnodeop_desc *a_desc;
844 vnode_t a_vp;
845 off_t a_foffset;
846 size_t a_size;
847 daddr64_t *a_bpn;
848 size_t *a_run;
849 void *a_poff;
850 int a_flags;
851 vfs_context_t a_context;
852 };
853 extern errno_t VNOP_BLOCKMAP(vnode_t, off_t, size_t, daddr64_t *, size_t *, void *,
854 int, vfs_context_t);
855
856 struct vnop_strategy_args {
857 struct vnodeop_desc *a_desc;
858 struct buf *a_bp;
859 };
860 extern errno_t VNOP_STRATEGY(struct buf *bp);
861
862 struct vnop_bwrite_args {
863 struct vnodeop_desc *a_desc;
864 buf_t a_bp;
865 };
866 extern errno_t VNOP_BWRITE(buf_t);
867
868
869 struct vnop_kqfilt_add_args {
870 struct vnodeop_desc *a_desc;
871 struct vnode *a_vp;
872 struct knote *a_kn;
873 vfs_context_t a_context;
874 };
875 extern struct vnodeop_desc vnop_kqfilt_add_desc;
876 extern errno_t VNOP_KQFILT_ADD(vnode_t , struct knote *, vfs_context_t);
877
878 struct vnop_kqfilt_remove_args {
879 struct vnodeop_desc *a_desc;
880 struct vnode *a_vp;
881 uintptr_t a_ident;
882 vfs_context_t a_context;
883 };
884 extern struct vnodeop_desc vnop_kqfilt_remove_desc;
885 errno_t VNOP_KQFILT_REMOVE(vnode_t , uintptr_t , vfs_context_t);
886
887 __END_DECLS
888
889 #endif /* KERNEL */
890
891 #endif /* !_SYS_VNODE_IF_H_ */