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