3 * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.
5 * @APPLE_LICENSE_HEADER_START@
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
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.
22 * @APPLE_LICENSE_HEADER_END@
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.
29 * Redistribution and use in source and binary forms, with or without
30 * modification, are permitted provided that the following conditions
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.
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
60 * Warning: This file is generated automatically.
61 * (Modifications made here may easily be lost!)
63 * Created by the script:
64 * @(#)vnode_if.sh 8.7 (Berkeley) 5/11/95
68 #ifndef _SYS_VNODE_IF_H_
69 #define _SYS_VNODE_IF_H_
71 #include <sys/appleapiopts.h>
72 #include <sys/cdefs.h>
73 #include <sys/kernel_types.h>
75 #ifdef BSD_KERNEL_PRIVATE
78 #include <mach/memory_object_types.h>
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
;
137 struct vnop_lookup_args
{
138 struct vnodeop_desc
*a_desc
;
141 struct componentname
*a_cnp
;
142 vfs_context_t a_context
;
144 extern errno_t
VNOP_LOOKUP(vnode_t
, vnode_t
*, struct componentname
*, vfs_context_t
);
154 struct vnop_create_args
{
155 struct vnodeop_desc
*a_desc
;
158 struct componentname
*a_cnp
;
159 struct vnode_attr
*a_vap
;
160 vfs_context_t a_context
;
162 extern errno_t
VNOP_CREATE(vnode_t
, vnode_t
*, struct componentname
*, struct vnode_attr
*, vfs_context_t
);
166 *#% whiteout dvp L L L
167 *#% whiteout cnp - - -
168 *#% whiteout flag - - -
171 struct vnop_whiteout_args
{
172 struct vnodeop_desc
*a_desc
;
174 struct componentname
*a_cnp
;
176 vfs_context_t a_context
;
178 extern errno_t
VNOP_WHITEOUT(vnode_t
, struct componentname
*, int, vfs_context_t
);
186 struct vnop_mknod_args
{
187 struct vnodeop_desc
*a_desc
;
190 struct componentname
*a_cnp
;
191 struct vnode_attr
*a_vap
;
192 vfs_context_t a_context
;
194 extern errno_t
VNOP_MKNOD(vnode_t
, vnode_t
*, struct componentname
*, struct vnode_attr
*, vfs_context_t
);
201 struct vnop_open_args
{
202 struct vnodeop_desc
*a_desc
;
205 vfs_context_t a_context
;
207 extern errno_t
VNOP_OPEN(vnode_t
, int, vfs_context_t
);
214 struct vnop_close_args
{
215 struct vnodeop_desc
*a_desc
;
218 vfs_context_t a_context
;
220 extern errno_t
VNOP_CLOSE(vnode_t
, int, vfs_context_t
);
227 struct vnop_access_args
{
228 struct vnodeop_desc
*a_desc
;
231 vfs_context_t a_context
;
233 extern errno_t
VNOP_ACCESS(vnode_t
, int, vfs_context_t
);
241 struct vnop_getattr_args
{
242 struct vnodeop_desc
*a_desc
;
244 struct vnode_attr
*a_vap
;
245 vfs_context_t a_context
;
247 extern errno_t
VNOP_GETATTR(vnode_t
, struct vnode_attr
*, vfs_context_t
);
254 struct vnop_setattr_args
{
255 struct vnodeop_desc
*a_desc
;
257 struct vnode_attr
*a_vap
;
258 vfs_context_t a_context
;
260 extern errno_t
VNOP_SETATTR(vnode_t
, struct vnode_attr
*, vfs_context_t
);
264 *#% getattrlist vp = = =
267 struct vnop_getattrlist_args
{
268 struct vnodeop_desc
*a_desc
;
270 struct attrlist
*a_alist
;
273 vfs_context_t a_context
;
275 extern errno_t
VNOP_GETATTRLIST(vnode_t
, struct attrlist
*, struct uio
*, int, vfs_context_t
);
280 *#% setattrlist vp L L L
283 struct vnop_setattrlist_args
{
284 struct vnodeop_desc
*a_desc
;
286 struct attrlist
*a_alist
;
289 vfs_context_t a_context
;
291 extern errno_t
VNOP_SETATTRLIST(vnode_t
, struct attrlist
*, struct uio
*, int, vfs_context_t
);
299 struct vnop_read_args
{
300 struct vnodeop_desc
*a_desc
;
304 vfs_context_t a_context
;
306 extern errno_t
VNOP_READ(vnode_t
, struct uio
*, int, vfs_context_t
);
314 struct vnop_write_args
{
315 struct vnodeop_desc
*a_desc
;
319 vfs_context_t a_context
;
321 extern errno_t
VNOP_WRITE(vnode_t
, struct uio
*, int, vfs_context_t
);
329 struct vnop_ioctl_args
{
330 struct vnodeop_desc
*a_desc
;
335 vfs_context_t a_context
;
337 extern errno_t
VNOP_IOCTL(vnode_t
, u_long
, caddr_t
, int, vfs_context_t
);
345 struct vnop_select_args
{
346 struct vnodeop_desc
*a_desc
;
351 vfs_context_t a_context
;
353 extern errno_t
VNOP_SELECT(vnode_t
, int, int, void *, vfs_context_t
);
358 *#% exchange fvp L L L
359 *#% exchange tvp L L L
362 struct vnop_exchange_args
{
363 struct vnodeop_desc
*a_desc
;
367 vfs_context_t a_context
;
369 extern errno_t
VNOP_EXCHANGE(vnode_t
, vnode_t
, int, vfs_context_t
);
377 struct vnop_revoke_args
{
378 struct vnodeop_desc
*a_desc
;
381 vfs_context_t a_context
;
383 extern errno_t
VNOP_REVOKE(vnode_t
, int, vfs_context_t
);
391 struct vnop_mmap_args
{
392 struct vnodeop_desc
*a_desc
;
395 vfs_context_t a_context
;
397 extern errno_t
VNOP_MMAP(vnode_t
, int, vfs_context_t
);
404 struct vnop_mnomap_args
{
405 struct vnodeop_desc
*a_desc
;
407 vfs_context_t a_context
;
409 extern errno_t
VNOP_MNOMAP(vnode_t
, vfs_context_t
);
417 struct vnop_fsync_args
{
418 struct vnodeop_desc
*a_desc
;
421 vfs_context_t a_context
;
423 extern errno_t
VNOP_FSYNC(vnode_t
, int, vfs_context_t
);
432 struct vnop_remove_args
{
433 struct vnodeop_desc
*a_desc
;
436 struct componentname
*a_cnp
;
438 vfs_context_t a_context
;
440 extern errno_t
VNOP_REMOVE(vnode_t
, vnode_t
, struct componentname
*, int, vfs_context_t
);
449 struct vnop_link_args
{
450 struct vnodeop_desc
*a_desc
;
453 struct componentname
*a_cnp
;
454 vfs_context_t a_context
;
456 extern errno_t
VNOP_LINK(vnode_t
, vnode_t
, struct componentname
*, vfs_context_t
);
461 *#% rename fdvp U U U
463 *#% rename tdvp L U U
467 struct vnop_rename_args
{
468 struct vnodeop_desc
*a_desc
;
471 struct componentname
*a_fcnp
;
474 struct componentname
*a_tcnp
;
475 vfs_context_t a_context
;
477 extern errno_t
VNOP_RENAME(vnode_t
, vnode_t
, struct componentname
*, vnode_t
, vnode_t
, struct componentname
*, vfs_context_t
);
486 struct vnop_mkdir_args
{
487 struct vnodeop_desc
*a_desc
;
490 struct componentname
*a_cnp
;
491 struct vnode_attr
*a_vap
;
492 vfs_context_t a_context
;
494 extern errno_t
VNOP_MKDIR(vnode_t
, vnode_t
*, struct componentname
*, struct vnode_attr
*, vfs_context_t
);
503 struct vnop_rmdir_args
{
504 struct vnodeop_desc
*a_desc
;
507 struct componentname
*a_cnp
;
508 vfs_context_t a_context
;
510 extern errno_t
VNOP_RMDIR(vnode_t
, vnode_t
, struct componentname
*, vfs_context_t
);
515 *#% symlink dvp L U U
516 *#% symlink vpp - U -
519 struct vnop_symlink_args
{
520 struct vnodeop_desc
*a_desc
;
523 struct componentname
*a_cnp
;
524 struct vnode_attr
*a_vap
;
526 vfs_context_t a_context
;
528 extern errno_t
VNOP_SYMLINK(vnode_t
, vnode_t
*, struct componentname
*, struct vnode_attr
*, char *, vfs_context_t
);
536 * When VNOP_READDIR is called from the NFS Server, the nfs_data
537 * argument is non-NULL.
539 * The value of nfs_eofflag should be set to TRUE if the end of
540 * the directory was reached while reading.
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.
553 struct vnop_readdir_args
{
554 struct vnodeop_desc
*a_desc
;
560 vfs_context_t a_context
;
562 extern errno_t
VNOP_READDIR(vnode_t
, struct uio
*, int, int *, int *, vfs_context_t
);
567 *#% readdirattr vp L L L
570 struct vnop_readdirattr_args
{
571 struct vnodeop_desc
*a_desc
;
573 struct attrlist
*a_alist
;
579 u_long
*a_actualcount
;
580 vfs_context_t a_context
;
582 extern errno_t
VNOP_READDIRATTR(vnode_t
, struct attrlist
*, struct uio
*, u_long
, u_long
, u_long
*, int *, u_long
*, vfs_context_t
);
587 *#% readlink vp L L L
590 struct vnop_readlink_args
{
591 struct vnodeop_desc
*a_desc
;
594 vfs_context_t a_context
;
596 extern errno_t
VNOP_READLINK(vnode_t
, struct uio
*, vfs_context_t
);
601 *#% inactive vp L U U
604 struct vnop_inactive_args
{
605 struct vnodeop_desc
*a_desc
;
607 vfs_context_t a_context
;
609 extern errno_t
VNOP_INACTIVE(vnode_t
, vfs_context_t
);
617 struct vnop_reclaim_args
{
618 struct vnodeop_desc
*a_desc
;
620 vfs_context_t a_context
;
622 extern errno_t
VNOP_RECLAIM(vnode_t
, vfs_context_t
);
627 *#% pathconf vp L L L
630 struct vnop_pathconf_args
{
631 struct vnodeop_desc
*a_desc
;
634 register_t
*a_retval
;
635 vfs_context_t a_context
;
637 extern errno_t
VNOP_PATHCONF(vnode_t
, int, register_t
*, vfs_context_t
); /* register_t??????? */
645 struct vnop_advlock_args
{
646 struct vnodeop_desc
*a_desc
;
652 vfs_context_t a_context
;
654 extern errno_t
VNOP_ADVLOCK(vnode_t
, caddr_t
, int, struct flock
*, int, vfs_context_t
);
658 *#% allocate vp L L L
661 struct vnop_allocate_args
{
662 struct vnodeop_desc
*a_desc
;
666 off_t
*a_bytesallocated
;
668 vfs_context_t a_context
;
670 extern errno_t
VNOP_ALLOCATE(vnode_t
, off_t
, u_int32_t
, off_t
*, off_t
, vfs_context_t
);
677 struct vnop_pagein_args
{
678 struct vnodeop_desc
*a_desc
;
681 vm_offset_t a_pl_offset
;
685 vfs_context_t a_context
;
687 extern errno_t
VNOP_PAGEIN(vnode_t
, upl_t
, vm_offset_t
, off_t
, size_t, int, vfs_context_t
); /* vm_offset_t ? */
695 struct vnop_pageout_args
{
696 struct vnodeop_desc
*a_desc
;
699 vm_offset_t a_pl_offset
;
703 vfs_context_t a_context
;
705 extern errno_t
VNOP_PAGEOUT(vnode_t
, upl_t
, vm_offset_t
, off_t
, size_t, int, vfs_context_t
);
708 #ifdef BSD_KERNEL_PRIVATE
710 *#% devblocksize vp = = =
713 struct vnop_devblocksize_args
{
714 struct vnodeop_desc
*a_desc
;
716 register_t
*a_retval
;
718 #endif /* BSD_KERNEL_PRIVATE */
722 *#% searchfs vp L L L
725 struct vnop_searchfs_args
{
726 struct vnodeop_desc
*a_desc
;
728 void *a_searchparams1
;
729 void *a_searchparams2
;
730 struct attrlist
*a_searchattrs
;
732 struct timeval
*a_timelimit
;
733 struct attrlist
*a_returnattrs
;
734 u_long
*a_nummatches
;
738 struct searchstate
*a_searchstate
;
739 vfs_context_t a_context
;
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
);
746 *#% copyfile fvp U U U
747 *#% copyfile tdvp L U U
748 *#% copyfile tvp X U U
751 struct vnop_copyfile_args
{
752 struct vnodeop_desc
*a_desc
;
756 struct componentname
*a_tcnp
;
759 vfs_context_t a_context
;
761 extern errno_t
VNOP_COPYFILE(vnode_t
, vnode_t
, vnode_t
, struct componentname
*, int, int, vfs_context_t
);
764 struct vnop_getxattr_args
{
765 struct vnodeop_desc
*a_desc
;
771 vfs_context_t a_context
;
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
);
776 struct vnop_setxattr_args
{
777 struct vnodeop_desc
*a_desc
;
782 vfs_context_t a_context
;
784 extern struct vnodeop_desc vnop_setxattr_desc
;
785 extern errno_t
VNOP_SETXATTR(vnode_t
, const char *, uio_t
, int, vfs_context_t
);
787 struct vnop_removexattr_args
{
788 struct vnodeop_desc
*a_desc
;
792 vfs_context_t a_context
;
794 extern struct vnodeop_desc vnop_removexattr_desc
;
795 extern errno_t
VNOP_REMOVEXATTR(vnode_t
, const char *, int, vfs_context_t
);
797 struct vnop_listxattr_args
{
798 struct vnodeop_desc
*a_desc
;
803 vfs_context_t a_context
;
805 extern struct vnodeop_desc vnop_listxattr_desc
;
806 extern errno_t
VNOP_LISTXATTR(vnode_t
, uio_t
, size_t *, int, vfs_context_t
);
811 *#% blktooff vp = = =
814 struct vnop_blktooff_args
{
815 struct vnodeop_desc
*a_desc
;
820 extern errno_t
VNOP_BLKTOOFF(vnode_t
, daddr64_t
, off_t
*);
825 *#% offtoblk vp = = =
828 struct vnop_offtoblk_args
{
829 struct vnodeop_desc
*a_desc
;
834 extern errno_t
VNOP_OFFTOBLK(vnode_t
, off_t
, daddr64_t
*);
839 *#% blockmap vp L L L
842 struct vnop_blockmap_args
{
843 struct vnodeop_desc
*a_desc
;
851 vfs_context_t a_context
;
853 extern errno_t
VNOP_BLOCKMAP(vnode_t
, off_t
, size_t, daddr64_t
*, size_t *, void *,
856 struct vnop_strategy_args
{
857 struct vnodeop_desc
*a_desc
;
860 extern errno_t
VNOP_STRATEGY(struct buf
*bp
);
862 struct vnop_bwrite_args
{
863 struct vnodeop_desc
*a_desc
;
866 extern errno_t
VNOP_BWRITE(buf_t
);
869 struct vnop_kqfilt_add_args
{
870 struct vnodeop_desc
*a_desc
;
873 vfs_context_t a_context
;
875 extern struct vnodeop_desc vnop_kqfilt_add_desc
;
876 extern errno_t
VNOP_KQFILT_ADD(vnode_t
, struct knote
*, vfs_context_t
);
878 struct vnop_kqfilt_remove_args
{
879 struct vnodeop_desc
*a_desc
;
882 vfs_context_t a_context
;
884 extern struct vnodeop_desc vnop_kqfilt_remove_desc
;
885 errno_t
VNOP_KQFILT_REMOVE(vnode_t
, uintptr_t , vfs_context_t
);
891 #endif /* !_SYS_VNODE_IF_H_ */