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