3 * Copyright (c) 2006 Apple Computer, Inc. All Rights Reserved.
5 * @APPLE_LICENSE_OSREFERENCE_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. 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
17 * Please obtain a copy of the License at
18 * http://www.opensource.apple.com/apsl/ and read it before using this
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.
29 * @APPLE_LICENSE_OSREFERENCE_HEADER_END@
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.
36 * Redistribution and use in source and binary forms, with or without
37 * modification, are permitted provided that the following conditions
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.
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
67 * Warning: This file is generated automatically.
68 * (Modifications made here may easily be lost!)
70 * Created by the script:
71 * @(#)vnode_if.sh 8.7 (Berkeley) 5/11/95
75 #ifndef _SYS_VNODE_IF_H_
76 #define _SYS_VNODE_IF_H_
78 #include <sys/appleapiopts.h>
79 #include <sys/cdefs.h>
80 #include <sys/kernel_types.h>
82 #ifdef BSD_KERNEL_PRIVATE
85 #include <mach/memory_object_types.h>
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
;
144 struct vnop_lookup_args
{
145 struct vnodeop_desc
*a_desc
;
148 struct componentname
*a_cnp
;
149 vfs_context_t a_context
;
151 extern errno_t
VNOP_LOOKUP(vnode_t
, vnode_t
*, struct componentname
*, vfs_context_t
);
161 struct vnop_create_args
{
162 struct vnodeop_desc
*a_desc
;
165 struct componentname
*a_cnp
;
166 struct vnode_attr
*a_vap
;
167 vfs_context_t a_context
;
169 extern errno_t
VNOP_CREATE(vnode_t
, vnode_t
*, struct componentname
*, struct vnode_attr
*, vfs_context_t
);
173 *#% whiteout dvp L L L
174 *#% whiteout cnp - - -
175 *#% whiteout flag - - -
178 struct vnop_whiteout_args
{
179 struct vnodeop_desc
*a_desc
;
181 struct componentname
*a_cnp
;
183 vfs_context_t a_context
;
185 extern errno_t
VNOP_WHITEOUT(vnode_t
, struct componentname
*, int, vfs_context_t
);
193 struct vnop_mknod_args
{
194 struct vnodeop_desc
*a_desc
;
197 struct componentname
*a_cnp
;
198 struct vnode_attr
*a_vap
;
199 vfs_context_t a_context
;
201 extern errno_t
VNOP_MKNOD(vnode_t
, vnode_t
*, struct componentname
*, struct vnode_attr
*, vfs_context_t
);
208 struct vnop_open_args
{
209 struct vnodeop_desc
*a_desc
;
212 vfs_context_t a_context
;
214 extern errno_t
VNOP_OPEN(vnode_t
, int, vfs_context_t
);
221 struct vnop_close_args
{
222 struct vnodeop_desc
*a_desc
;
225 vfs_context_t a_context
;
227 extern errno_t
VNOP_CLOSE(vnode_t
, int, vfs_context_t
);
234 struct vnop_access_args
{
235 struct vnodeop_desc
*a_desc
;
238 vfs_context_t a_context
;
240 extern errno_t
VNOP_ACCESS(vnode_t
, int, vfs_context_t
);
248 struct vnop_getattr_args
{
249 struct vnodeop_desc
*a_desc
;
251 struct vnode_attr
*a_vap
;
252 vfs_context_t a_context
;
254 extern errno_t
VNOP_GETATTR(vnode_t
, struct vnode_attr
*, vfs_context_t
);
261 struct vnop_setattr_args
{
262 struct vnodeop_desc
*a_desc
;
264 struct vnode_attr
*a_vap
;
265 vfs_context_t a_context
;
267 extern errno_t
VNOP_SETATTR(vnode_t
, struct vnode_attr
*, vfs_context_t
);
271 *#% getattrlist vp = = =
274 struct vnop_getattrlist_args
{
275 struct vnodeop_desc
*a_desc
;
277 struct attrlist
*a_alist
;
280 vfs_context_t a_context
;
282 extern errno_t
VNOP_GETATTRLIST(vnode_t
, struct attrlist
*, struct uio
*, int, vfs_context_t
);
287 *#% setattrlist vp L L L
290 struct vnop_setattrlist_args
{
291 struct vnodeop_desc
*a_desc
;
293 struct attrlist
*a_alist
;
296 vfs_context_t a_context
;
298 extern errno_t
VNOP_SETATTRLIST(vnode_t
, struct attrlist
*, struct uio
*, int, vfs_context_t
);
306 struct vnop_read_args
{
307 struct vnodeop_desc
*a_desc
;
311 vfs_context_t a_context
;
313 extern errno_t
VNOP_READ(vnode_t
, struct uio
*, int, vfs_context_t
);
321 struct vnop_write_args
{
322 struct vnodeop_desc
*a_desc
;
326 vfs_context_t a_context
;
328 extern errno_t
VNOP_WRITE(vnode_t
, struct uio
*, int, vfs_context_t
);
336 struct vnop_ioctl_args
{
337 struct vnodeop_desc
*a_desc
;
342 vfs_context_t a_context
;
344 extern errno_t
VNOP_IOCTL(vnode_t
, u_long
, caddr_t
, int, vfs_context_t
);
352 struct vnop_select_args
{
353 struct vnodeop_desc
*a_desc
;
358 vfs_context_t a_context
;
360 extern errno_t
VNOP_SELECT(vnode_t
, int, int, void *, vfs_context_t
);
365 *#% exchange fvp L L L
366 *#% exchange tvp L L L
369 struct vnop_exchange_args
{
370 struct vnodeop_desc
*a_desc
;
374 vfs_context_t a_context
;
376 extern errno_t
VNOP_EXCHANGE(vnode_t
, vnode_t
, int, vfs_context_t
);
384 struct vnop_revoke_args
{
385 struct vnodeop_desc
*a_desc
;
388 vfs_context_t a_context
;
390 extern errno_t
VNOP_REVOKE(vnode_t
, int, vfs_context_t
);
398 struct vnop_mmap_args
{
399 struct vnodeop_desc
*a_desc
;
402 vfs_context_t a_context
;
404 extern errno_t
VNOP_MMAP(vnode_t
, int, vfs_context_t
);
411 struct vnop_mnomap_args
{
412 struct vnodeop_desc
*a_desc
;
414 vfs_context_t a_context
;
416 extern errno_t
VNOP_MNOMAP(vnode_t
, vfs_context_t
);
424 struct vnop_fsync_args
{
425 struct vnodeop_desc
*a_desc
;
428 vfs_context_t a_context
;
430 extern errno_t
VNOP_FSYNC(vnode_t
, int, vfs_context_t
);
439 struct vnop_remove_args
{
440 struct vnodeop_desc
*a_desc
;
443 struct componentname
*a_cnp
;
445 vfs_context_t a_context
;
447 extern errno_t
VNOP_REMOVE(vnode_t
, vnode_t
, struct componentname
*, int, vfs_context_t
);
456 struct vnop_link_args
{
457 struct vnodeop_desc
*a_desc
;
460 struct componentname
*a_cnp
;
461 vfs_context_t a_context
;
463 extern errno_t
VNOP_LINK(vnode_t
, vnode_t
, struct componentname
*, vfs_context_t
);
468 *#% rename fdvp U U U
470 *#% rename tdvp L U U
474 struct vnop_rename_args
{
475 struct vnodeop_desc
*a_desc
;
478 struct componentname
*a_fcnp
;
481 struct componentname
*a_tcnp
;
482 vfs_context_t a_context
;
484 extern errno_t
VNOP_RENAME(vnode_t
, vnode_t
, struct componentname
*, vnode_t
, vnode_t
, struct componentname
*, vfs_context_t
);
493 struct vnop_mkdir_args
{
494 struct vnodeop_desc
*a_desc
;
497 struct componentname
*a_cnp
;
498 struct vnode_attr
*a_vap
;
499 vfs_context_t a_context
;
501 extern errno_t
VNOP_MKDIR(vnode_t
, vnode_t
*, struct componentname
*, struct vnode_attr
*, vfs_context_t
);
510 struct vnop_rmdir_args
{
511 struct vnodeop_desc
*a_desc
;
514 struct componentname
*a_cnp
;
515 vfs_context_t a_context
;
517 extern errno_t
VNOP_RMDIR(vnode_t
, vnode_t
, struct componentname
*, vfs_context_t
);
522 *#% symlink dvp L U U
523 *#% symlink vpp - U -
526 struct vnop_symlink_args
{
527 struct vnodeop_desc
*a_desc
;
530 struct componentname
*a_cnp
;
531 struct vnode_attr
*a_vap
;
533 vfs_context_t a_context
;
535 extern errno_t
VNOP_SYMLINK(vnode_t
, vnode_t
*, struct componentname
*, struct vnode_attr
*, char *, vfs_context_t
);
543 * When VNOP_READDIR is called from the NFS Server, the nfs_data
544 * argument is non-NULL.
546 * The value of nfs_eofflag should be set to TRUE if the end of
547 * the directory was reached while reading.
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.
560 struct vnop_readdir_args
{
561 struct vnodeop_desc
*a_desc
;
567 vfs_context_t a_context
;
569 extern errno_t
VNOP_READDIR(vnode_t
, struct uio
*, int, int *, int *, vfs_context_t
);
574 *#% readdirattr vp L L L
577 struct vnop_readdirattr_args
{
578 struct vnodeop_desc
*a_desc
;
580 struct attrlist
*a_alist
;
586 u_long
*a_actualcount
;
587 vfs_context_t a_context
;
589 extern errno_t
VNOP_READDIRATTR(vnode_t
, struct attrlist
*, struct uio
*, u_long
, u_long
, u_long
*, int *, u_long
*, vfs_context_t
);
594 *#% readlink vp L L L
597 struct vnop_readlink_args
{
598 struct vnodeop_desc
*a_desc
;
601 vfs_context_t a_context
;
603 extern errno_t
VNOP_READLINK(vnode_t
, struct uio
*, vfs_context_t
);
608 *#% inactive vp L U U
611 struct vnop_inactive_args
{
612 struct vnodeop_desc
*a_desc
;
614 vfs_context_t a_context
;
616 extern errno_t
VNOP_INACTIVE(vnode_t
, vfs_context_t
);
624 struct vnop_reclaim_args
{
625 struct vnodeop_desc
*a_desc
;
627 vfs_context_t a_context
;
629 extern errno_t
VNOP_RECLAIM(vnode_t
, vfs_context_t
);
634 *#% pathconf vp L L L
637 struct vnop_pathconf_args
{
638 struct vnodeop_desc
*a_desc
;
641 register_t
*a_retval
;
642 vfs_context_t a_context
;
644 extern errno_t
VNOP_PATHCONF(vnode_t
, int, register_t
*, vfs_context_t
); /* register_t??????? */
652 struct vnop_advlock_args
{
653 struct vnodeop_desc
*a_desc
;
659 vfs_context_t a_context
;
661 extern errno_t
VNOP_ADVLOCK(vnode_t
, caddr_t
, int, struct flock
*, int, vfs_context_t
);
665 *#% allocate vp L L L
668 struct vnop_allocate_args
{
669 struct vnodeop_desc
*a_desc
;
673 off_t
*a_bytesallocated
;
675 vfs_context_t a_context
;
677 extern errno_t
VNOP_ALLOCATE(vnode_t
, off_t
, u_int32_t
, off_t
*, off_t
, vfs_context_t
);
684 struct vnop_pagein_args
{
685 struct vnodeop_desc
*a_desc
;
688 vm_offset_t a_pl_offset
;
692 vfs_context_t a_context
;
694 extern errno_t
VNOP_PAGEIN(vnode_t
, upl_t
, vm_offset_t
, off_t
, size_t, int, vfs_context_t
); /* vm_offset_t ? */
702 struct vnop_pageout_args
{
703 struct vnodeop_desc
*a_desc
;
706 vm_offset_t a_pl_offset
;
710 vfs_context_t a_context
;
712 extern errno_t
VNOP_PAGEOUT(vnode_t
, upl_t
, vm_offset_t
, off_t
, size_t, int, vfs_context_t
);
715 #ifdef BSD_KERNEL_PRIVATE
717 *#% devblocksize vp = = =
720 struct vnop_devblocksize_args
{
721 struct vnodeop_desc
*a_desc
;
723 register_t
*a_retval
;
725 #endif /* BSD_KERNEL_PRIVATE */
729 *#% searchfs vp L L L
732 struct vnop_searchfs_args
{
733 struct vnodeop_desc
*a_desc
;
735 void *a_searchparams1
;
736 void *a_searchparams2
;
737 struct attrlist
*a_searchattrs
;
739 struct timeval
*a_timelimit
;
740 struct attrlist
*a_returnattrs
;
741 u_long
*a_nummatches
;
745 struct searchstate
*a_searchstate
;
746 vfs_context_t a_context
;
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
);
753 *#% copyfile fvp U U U
754 *#% copyfile tdvp L U U
755 *#% copyfile tvp X U U
758 struct vnop_copyfile_args
{
759 struct vnodeop_desc
*a_desc
;
763 struct componentname
*a_tcnp
;
766 vfs_context_t a_context
;
768 extern errno_t
VNOP_COPYFILE(vnode_t
, vnode_t
, vnode_t
, struct componentname
*, int, int, vfs_context_t
);
771 struct vnop_getxattr_args
{
772 struct vnodeop_desc
*a_desc
;
778 vfs_context_t a_context
;
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
);
783 struct vnop_setxattr_args
{
784 struct vnodeop_desc
*a_desc
;
789 vfs_context_t a_context
;
791 extern struct vnodeop_desc vnop_setxattr_desc
;
792 extern errno_t
VNOP_SETXATTR(vnode_t
, const char *, uio_t
, int, vfs_context_t
);
794 struct vnop_removexattr_args
{
795 struct vnodeop_desc
*a_desc
;
799 vfs_context_t a_context
;
801 extern struct vnodeop_desc vnop_removexattr_desc
;
802 extern errno_t
VNOP_REMOVEXATTR(vnode_t
, const char *, int, vfs_context_t
);
804 struct vnop_listxattr_args
{
805 struct vnodeop_desc
*a_desc
;
810 vfs_context_t a_context
;
812 extern struct vnodeop_desc vnop_listxattr_desc
;
813 extern errno_t
VNOP_LISTXATTR(vnode_t
, uio_t
, size_t *, int, vfs_context_t
);
818 *#% blktooff vp = = =
821 struct vnop_blktooff_args
{
822 struct vnodeop_desc
*a_desc
;
827 extern errno_t
VNOP_BLKTOOFF(vnode_t
, daddr64_t
, off_t
*);
832 *#% offtoblk vp = = =
835 struct vnop_offtoblk_args
{
836 struct vnodeop_desc
*a_desc
;
841 extern errno_t
VNOP_OFFTOBLK(vnode_t
, off_t
, daddr64_t
*);
846 *#% blockmap vp L L L
849 struct vnop_blockmap_args
{
850 struct vnodeop_desc
*a_desc
;
858 vfs_context_t a_context
;
860 extern errno_t
VNOP_BLOCKMAP(vnode_t
, off_t
, size_t, daddr64_t
*, size_t *, void *,
863 struct vnop_strategy_args
{
864 struct vnodeop_desc
*a_desc
;
867 extern errno_t
VNOP_STRATEGY(struct buf
*bp
);
869 struct vnop_bwrite_args
{
870 struct vnodeop_desc
*a_desc
;
873 extern errno_t
VNOP_BWRITE(buf_t
);
876 struct vnop_kqfilt_add_args
{
877 struct vnodeop_desc
*a_desc
;
880 vfs_context_t a_context
;
882 extern struct vnodeop_desc vnop_kqfilt_add_desc
;
883 extern errno_t
VNOP_KQFILT_ADD(vnode_t
, struct knote
*, vfs_context_t
);
885 struct vnop_kqfilt_remove_args
{
886 struct vnodeop_desc
*a_desc
;
889 vfs_context_t a_context
;
891 extern struct vnodeop_desc vnop_kqfilt_remove_desc
;
892 errno_t
VNOP_KQFILT_REMOVE(vnode_t
, uintptr_t , vfs_context_t
);
898 #endif /* !_SYS_VNODE_IF_H_ */