3 * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.
5 * @APPLE_LICENSE_HEADER_START@
7 * The contents of this file constitute Original Code as defined in and
8 * are subject to the Apple Public Source License Version 1.1 (the
9 * "License"). You may not use this file except in compliance with the
10 * License. Please obtain a copy of the License at
11 * http://www.apple.com/publicsource and read it before using this file.
13 * This Original Code and all software distributed under the License are
14 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
18 * License for the specific language governing rights and limitations
21 * @APPLE_LICENSE_HEADER_END@
24 * Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved
25 * Copyright (c) 1992, 1993, 1994, 1995
26 * The Regents of the University of California. All rights reserved.
28 * Redistribution and use in source and binary forms, with or without
29 * modification, are permitted provided that the following conditions
31 * 1. Redistributions of source code must retain the above copyright
32 * notice, this list of conditions and the following disclaimer.
33 * 2. Redistributions in binary form must reproduce the above copyright
34 * notice, this list of conditions and the following disclaimer in the
35 * documentation and/or other materials provided with the distribution.
36 * 3. All advertising materials mentioning features or use of this software
37 * must display the following acknowledgement:
38 * This product includes software developed by the University of
39 * California, Berkeley and its contributors.
40 * 4. Neither the name of the University nor the names of its contributors
41 * may be used to endorse or promote products derived from this software
42 * without specific prior written permission.
44 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS AND
45 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
46 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
47 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
48 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
49 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
50 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
51 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
52 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
53 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
59 * Warning: This file is generated automatically.
60 * (Modifications made here may easily be lost!)
62 * Created by the script:
63 * @(#)vnode_if.sh 8.7 (Berkeley) 5/11/95
67 #ifndef _SYS_VNODE_IF_H_
68 #define _SYS_VNODE_IF_H_
70 #include <sys/appleapiopts.h>
71 #include <sys/cdefs.h>
72 #include <sys/kernel_types.h>
74 #ifdef BSD_KERNEL_PRIVATE
77 #include <mach/memory_object_types.h>
82 extern struct vnodeop_desc vnop_default_desc
;
83 extern struct vnodeop_desc vnop_lookup_desc
;
84 extern struct vnodeop_desc vnop_create_desc
;
85 extern struct vnodeop_desc vnop_whiteout_desc
;
86 extern struct vnodeop_desc vnop_mknod_desc
;
87 extern struct vnodeop_desc vnop_open_desc
;
88 extern struct vnodeop_desc vnop_close_desc
;
89 extern struct vnodeop_desc vnop_access_desc
;
90 extern struct vnodeop_desc vnop_getattr_desc
;
91 extern struct vnodeop_desc vnop_setattr_desc
;
92 extern struct vnodeop_desc vnop_getattrlist_desc
;
93 extern struct vnodeop_desc vnop_setattrlist_desc
;
94 extern struct vnodeop_desc vnop_read_desc
;
95 extern struct vnodeop_desc vnop_write_desc
;
96 extern struct vnodeop_desc vnop_ioctl_desc
;
97 extern struct vnodeop_desc vnop_select_desc
;
98 extern struct vnodeop_desc vnop_exchange_desc
;
99 extern struct vnodeop_desc vnop_revoke_desc
;
100 extern struct vnodeop_desc vnop_mmap_desc
;
101 extern struct vnodeop_desc vnop_mnomap_desc
;
102 extern struct vnodeop_desc vnop_fsync_desc
;
103 extern struct vnodeop_desc vnop_remove_desc
;
104 extern struct vnodeop_desc vnop_link_desc
;
105 extern struct vnodeop_desc vnop_rename_desc
;
106 extern struct vnodeop_desc vnop_mkdir_desc
;
107 extern struct vnodeop_desc vnop_rmdir_desc
;
108 extern struct vnodeop_desc vnop_symlink_desc
;
109 extern struct vnodeop_desc vnop_readdir_desc
;
110 extern struct vnodeop_desc vnop_readdirattr_desc
;
111 extern struct vnodeop_desc vnop_readlink_desc
;
112 extern struct vnodeop_desc vnop_inactive_desc
;
113 extern struct vnodeop_desc vnop_reclaim_desc
;
114 extern struct vnodeop_desc vnop_print_desc
;
115 extern struct vnodeop_desc vnop_pathconf_desc
;
116 extern struct vnodeop_desc vnop_advlock_desc
;
117 extern struct vnodeop_desc vnop_truncate_desc
;
118 extern struct vnodeop_desc vnop_allocate_desc
;
119 extern struct vnodeop_desc vnop_pagein_desc
;
120 extern struct vnodeop_desc vnop_pageout_desc
;
121 extern struct vnodeop_desc vnop_devblocksize_desc
;
122 extern struct vnodeop_desc vnop_searchfs_desc
;
123 extern struct vnodeop_desc vnop_copyfile_desc
;
124 extern struct vnodeop_desc vnop_blktooff_desc
;
125 extern struct vnodeop_desc vnop_offtoblk_desc
;
126 extern struct vnodeop_desc vnop_blockmap_desc
;
127 extern struct vnodeop_desc vnop_strategy_desc
;
128 extern struct vnodeop_desc vnop_bwrite_desc
;
136 struct vnop_lookup_args
{
137 struct vnodeop_desc
*a_desc
;
140 struct componentname
*a_cnp
;
141 vfs_context_t a_context
;
143 extern errno_t
VNOP_LOOKUP(vnode_t
, vnode_t
*, struct componentname
*, vfs_context_t
);
153 struct vnop_create_args
{
154 struct vnodeop_desc
*a_desc
;
157 struct componentname
*a_cnp
;
158 struct vnode_attr
*a_vap
;
159 vfs_context_t a_context
;
161 extern errno_t
VNOP_CREATE(vnode_t
, vnode_t
*, struct componentname
*, struct vnode_attr
*, vfs_context_t
);
165 *#% whiteout dvp L L L
166 *#% whiteout cnp - - -
167 *#% whiteout flag - - -
170 struct vnop_whiteout_args
{
171 struct vnodeop_desc
*a_desc
;
173 struct componentname
*a_cnp
;
175 vfs_context_t a_context
;
177 extern errno_t
VNOP_WHITEOUT(vnode_t
, struct componentname
*, int, vfs_context_t
);
185 struct vnop_mknod_args
{
186 struct vnodeop_desc
*a_desc
;
189 struct componentname
*a_cnp
;
190 struct vnode_attr
*a_vap
;
191 vfs_context_t a_context
;
193 extern errno_t
VNOP_MKNOD(vnode_t
, vnode_t
*, struct componentname
*, struct vnode_attr
*, vfs_context_t
);
200 struct vnop_open_args
{
201 struct vnodeop_desc
*a_desc
;
204 vfs_context_t a_context
;
206 extern errno_t
VNOP_OPEN(vnode_t
, int, vfs_context_t
);
213 struct vnop_close_args
{
214 struct vnodeop_desc
*a_desc
;
217 vfs_context_t a_context
;
219 extern errno_t
VNOP_CLOSE(vnode_t
, int, vfs_context_t
);
226 struct vnop_access_args
{
227 struct vnodeop_desc
*a_desc
;
230 vfs_context_t a_context
;
232 extern errno_t
VNOP_ACCESS(vnode_t
, int, vfs_context_t
);
240 struct vnop_getattr_args
{
241 struct vnodeop_desc
*a_desc
;
243 struct vnode_attr
*a_vap
;
244 vfs_context_t a_context
;
246 extern errno_t
VNOP_GETATTR(vnode_t
, struct vnode_attr
*, vfs_context_t
);
253 struct vnop_setattr_args
{
254 struct vnodeop_desc
*a_desc
;
256 struct vnode_attr
*a_vap
;
257 vfs_context_t a_context
;
259 extern errno_t
VNOP_SETATTR(vnode_t
, struct vnode_attr
*, vfs_context_t
);
263 *#% getattrlist vp = = =
266 struct vnop_getattrlist_args
{
267 struct vnodeop_desc
*a_desc
;
269 struct attrlist
*a_alist
;
272 vfs_context_t a_context
;
274 extern errno_t
VNOP_GETATTRLIST(vnode_t
, struct attrlist
*, struct uio
*, int, vfs_context_t
);
279 *#% setattrlist vp L L L
282 struct vnop_setattrlist_args
{
283 struct vnodeop_desc
*a_desc
;
285 struct attrlist
*a_alist
;
288 vfs_context_t a_context
;
290 extern errno_t
VNOP_SETATTRLIST(vnode_t
, struct attrlist
*, struct uio
*, int, vfs_context_t
);
298 struct vnop_read_args
{
299 struct vnodeop_desc
*a_desc
;
303 vfs_context_t a_context
;
305 extern errno_t
VNOP_READ(vnode_t
, struct uio
*, int, vfs_context_t
);
313 struct vnop_write_args
{
314 struct vnodeop_desc
*a_desc
;
318 vfs_context_t a_context
;
320 extern errno_t
VNOP_WRITE(vnode_t
, struct uio
*, int, vfs_context_t
);
328 struct vnop_ioctl_args
{
329 struct vnodeop_desc
*a_desc
;
334 vfs_context_t a_context
;
336 extern errno_t
VNOP_IOCTL(vnode_t
, u_long
, caddr_t
, int, vfs_context_t
);
344 struct vnop_select_args
{
345 struct vnodeop_desc
*a_desc
;
350 vfs_context_t a_context
;
352 extern errno_t
VNOP_SELECT(vnode_t
, int, int, void *, vfs_context_t
);
357 *#% exchange fvp L L L
358 *#% exchange tvp L L L
361 struct vnop_exchange_args
{
362 struct vnodeop_desc
*a_desc
;
366 vfs_context_t a_context
;
368 extern errno_t
VNOP_EXCHANGE(vnode_t
, vnode_t
, int, vfs_context_t
);
376 struct vnop_revoke_args
{
377 struct vnodeop_desc
*a_desc
;
380 vfs_context_t a_context
;
382 extern errno_t
VNOP_REVOKE(vnode_t
, int, vfs_context_t
);
390 struct vnop_mmap_args
{
391 struct vnodeop_desc
*a_desc
;
394 vfs_context_t a_context
;
396 extern errno_t
VNOP_MMAP(vnode_t
, int, vfs_context_t
);
403 struct vnop_mnomap_args
{
404 struct vnodeop_desc
*a_desc
;
406 vfs_context_t a_context
;
408 extern errno_t
VNOP_MNOMAP(vnode_t
, vfs_context_t
);
416 struct vnop_fsync_args
{
417 struct vnodeop_desc
*a_desc
;
420 vfs_context_t a_context
;
422 extern errno_t
VNOP_FSYNC(vnode_t
, int, vfs_context_t
);
431 struct vnop_remove_args
{
432 struct vnodeop_desc
*a_desc
;
435 struct componentname
*a_cnp
;
437 vfs_context_t a_context
;
439 extern errno_t
VNOP_REMOVE(vnode_t
, vnode_t
, struct componentname
*, int, vfs_context_t
);
448 struct vnop_link_args
{
449 struct vnodeop_desc
*a_desc
;
452 struct componentname
*a_cnp
;
453 vfs_context_t a_context
;
455 extern errno_t
VNOP_LINK(vnode_t
, vnode_t
, struct componentname
*, vfs_context_t
);
460 *#% rename fdvp U U U
462 *#% rename tdvp L U U
466 struct vnop_rename_args
{
467 struct vnodeop_desc
*a_desc
;
470 struct componentname
*a_fcnp
;
473 struct componentname
*a_tcnp
;
474 vfs_context_t a_context
;
476 extern errno_t
VNOP_RENAME(vnode_t
, vnode_t
, struct componentname
*, vnode_t
, vnode_t
, struct componentname
*, vfs_context_t
);
485 struct vnop_mkdir_args
{
486 struct vnodeop_desc
*a_desc
;
489 struct componentname
*a_cnp
;
490 struct vnode_attr
*a_vap
;
491 vfs_context_t a_context
;
493 extern errno_t
VNOP_MKDIR(vnode_t
, vnode_t
*, struct componentname
*, struct vnode_attr
*, vfs_context_t
);
502 struct vnop_rmdir_args
{
503 struct vnodeop_desc
*a_desc
;
506 struct componentname
*a_cnp
;
507 vfs_context_t a_context
;
509 extern errno_t
VNOP_RMDIR(vnode_t
, vnode_t
, struct componentname
*, vfs_context_t
);
514 *#% symlink dvp L U U
515 *#% symlink vpp - U -
518 struct vnop_symlink_args
{
519 struct vnodeop_desc
*a_desc
;
522 struct componentname
*a_cnp
;
523 struct vnode_attr
*a_vap
;
525 vfs_context_t a_context
;
527 extern errno_t
VNOP_SYMLINK(vnode_t
, vnode_t
*, struct componentname
*, struct vnode_attr
*, char *, vfs_context_t
);
535 * When VNOP_READDIR is called from the NFS Server, the nfs_data
536 * argument is non-NULL.
538 * The value of nfs_eofflag should be set to TRUE if the end of
539 * the directory was reached while reading.
541 * The directory seek offset (cookies) are returned to the NFS client and
542 * may be used later to restart a directory read part way through
543 * the directory. There is one cookie returned for each directory
544 * entry returned and its size is determince from nfs_sizeofcookie.
545 * The value of the cookie should be the logical offset within the
546 * directory where the on-disc version of the appropriate directory
547 * entry starts. Memory for the cookies is allocated from M_TEMP
548 * and it is freed by the caller of VNOP_READDIR.
552 struct vnop_readdir_args
{
553 struct vnodeop_desc
*a_desc
;
559 vfs_context_t a_context
;
561 extern errno_t
VNOP_READDIR(vnode_t
, struct uio
*, int, int *, int *, vfs_context_t
);
566 *#% readdirattr vp L L L
569 struct vnop_readdirattr_args
{
570 struct vnodeop_desc
*a_desc
;
572 struct attrlist
*a_alist
;
578 u_long
*a_actualcount
;
579 vfs_context_t a_context
;
581 extern errno_t
VNOP_READDIRATTR(vnode_t
, struct attrlist
*, struct uio
*, u_long
, u_long
, u_long
*, int *, u_long
*, vfs_context_t
);
586 *#% readlink vp L L L
589 struct vnop_readlink_args
{
590 struct vnodeop_desc
*a_desc
;
593 vfs_context_t a_context
;
595 extern errno_t
VNOP_READLINK(vnode_t
, struct uio
*, vfs_context_t
);
600 *#% inactive vp L U U
603 struct vnop_inactive_args
{
604 struct vnodeop_desc
*a_desc
;
606 vfs_context_t a_context
;
608 extern errno_t
VNOP_INACTIVE(vnode_t
, vfs_context_t
);
616 struct vnop_reclaim_args
{
617 struct vnodeop_desc
*a_desc
;
619 vfs_context_t a_context
;
621 extern errno_t
VNOP_RECLAIM(vnode_t
, vfs_context_t
);
626 *#% pathconf vp L L L
629 struct vnop_pathconf_args
{
630 struct vnodeop_desc
*a_desc
;
633 register_t
*a_retval
;
634 vfs_context_t a_context
;
636 extern errno_t
VNOP_PATHCONF(vnode_t
, int, register_t
*, vfs_context_t
); /* register_t??????? */
644 struct vnop_advlock_args
{
645 struct vnodeop_desc
*a_desc
;
651 vfs_context_t a_context
;
653 extern errno_t
VNOP_ADVLOCK(vnode_t
, caddr_t
, int, struct flock
*, int, vfs_context_t
);
657 *#% allocate vp L L L
660 struct vnop_allocate_args
{
661 struct vnodeop_desc
*a_desc
;
665 off_t
*a_bytesallocated
;
667 vfs_context_t a_context
;
669 extern errno_t
VNOP_ALLOCATE(vnode_t
, off_t
, u_int32_t
, off_t
*, off_t
, vfs_context_t
);
676 struct vnop_pagein_args
{
677 struct vnodeop_desc
*a_desc
;
680 vm_offset_t a_pl_offset
;
684 vfs_context_t a_context
;
686 extern errno_t
VNOP_PAGEIN(vnode_t
, upl_t
, vm_offset_t
, off_t
, size_t, int, vfs_context_t
); /* vm_offset_t ? */
694 struct vnop_pageout_args
{
695 struct vnodeop_desc
*a_desc
;
698 vm_offset_t a_pl_offset
;
702 vfs_context_t a_context
;
704 extern errno_t
VNOP_PAGEOUT(vnode_t
, upl_t
, vm_offset_t
, off_t
, size_t, int, vfs_context_t
);
707 #ifdef BSD_KERNEL_PRIVATE
709 *#% devblocksize vp = = =
712 struct vnop_devblocksize_args
{
713 struct vnodeop_desc
*a_desc
;
715 register_t
*a_retval
;
717 #endif /* BSD_KERNEL_PRIVATE */
721 *#% searchfs vp L L L
724 struct vnop_searchfs_args
{
725 struct vnodeop_desc
*a_desc
;
727 void *a_searchparams1
;
728 void *a_searchparams2
;
729 struct attrlist
*a_searchattrs
;
731 struct timeval
*a_timelimit
;
732 struct attrlist
*a_returnattrs
;
733 u_long
*a_nummatches
;
737 struct searchstate
*a_searchstate
;
738 vfs_context_t a_context
;
740 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
);
745 *#% copyfile fvp U U U
746 *#% copyfile tdvp L U U
747 *#% copyfile tvp X U U
750 struct vnop_copyfile_args
{
751 struct vnodeop_desc
*a_desc
;
755 struct componentname
*a_tcnp
;
758 vfs_context_t a_context
;
760 extern errno_t
VNOP_COPYFILE(vnode_t
, vnode_t
, vnode_t
, struct componentname
*, int, int, vfs_context_t
);
763 struct vnop_getxattr_args
{
764 struct vnodeop_desc
*a_desc
;
770 vfs_context_t a_context
;
772 extern struct vnodeop_desc vnop_getxattr_desc
;
773 extern errno_t
VNOP_GETXATTR(vnode_t
, const char *, uio_t
, size_t *, int, vfs_context_t
);
775 struct vnop_setxattr_args
{
776 struct vnodeop_desc
*a_desc
;
781 vfs_context_t a_context
;
783 extern struct vnodeop_desc vnop_setxattr_desc
;
784 extern errno_t
VNOP_SETXATTR(vnode_t
, const char *, uio_t
, int, vfs_context_t
);
786 struct vnop_removexattr_args
{
787 struct vnodeop_desc
*a_desc
;
791 vfs_context_t a_context
;
793 extern struct vnodeop_desc vnop_removexattr_desc
;
794 extern errno_t
VNOP_REMOVEXATTR(vnode_t
, const char *, int, vfs_context_t
);
796 struct vnop_listxattr_args
{
797 struct vnodeop_desc
*a_desc
;
802 vfs_context_t a_context
;
804 extern struct vnodeop_desc vnop_listxattr_desc
;
805 extern errno_t
VNOP_LISTXATTR(vnode_t
, uio_t
, size_t *, int, vfs_context_t
);
810 *#% blktooff vp = = =
813 struct vnop_blktooff_args
{
814 struct vnodeop_desc
*a_desc
;
819 extern errno_t
VNOP_BLKTOOFF(vnode_t
, daddr64_t
, off_t
*);
824 *#% offtoblk vp = = =
827 struct vnop_offtoblk_args
{
828 struct vnodeop_desc
*a_desc
;
833 extern errno_t
VNOP_OFFTOBLK(vnode_t
, off_t
, daddr64_t
*);
838 *#% blockmap vp L L L
841 struct vnop_blockmap_args
{
842 struct vnodeop_desc
*a_desc
;
850 vfs_context_t a_context
;
852 extern errno_t
VNOP_BLOCKMAP(vnode_t
, off_t
, size_t, daddr64_t
*, size_t *, void *,
855 struct vnop_strategy_args
{
856 struct vnodeop_desc
*a_desc
;
859 extern errno_t
VNOP_STRATEGY(struct buf
*bp
);
861 struct vnop_bwrite_args
{
862 struct vnodeop_desc
*a_desc
;
865 extern errno_t
VNOP_BWRITE(buf_t
);
868 struct vnop_kqfilt_add_args
{
869 struct vnodeop_desc
*a_desc
;
872 vfs_context_t a_context
;
874 extern struct vnodeop_desc vnop_kqfilt_add_desc
;
875 extern errno_t
VNOP_KQFILT_ADD(vnode_t
, struct knote
*, vfs_context_t
);
877 struct vnop_kqfilt_remove_args
{
878 struct vnodeop_desc
*a_desc
;
881 vfs_context_t a_context
;
883 extern struct vnodeop_desc vnop_kqfilt_remove_desc
;
884 errno_t
VNOP_KQFILT_REMOVE(vnode_t
, uintptr_t , vfs_context_t
);
890 #endif /* !_SYS_VNODE_IF_H_ */