]> git.saurik.com Git - apple/xnu.git/blame_incremental - bsd/sys/vnode_if.h
xnu-1228.12.14.tar.gz
[apple/xnu.git] / bsd / sys / vnode_if.h
... / ...
CommitLineData
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 * NOTICE: This file was modified by SPARTA, Inc. in 2005 to introduce
64 * support for mandatory and extensible security protections. This notice
65 * is included in support of clause 2.2 (b) of the Apple Public License,
66 * Version 2.0.
67 */
68
69/*
70 * Warning: This file is generated automatically.
71 * (Modifications made here may easily be lost!)
72 *
73 * Created by the script:
74 * @(#)vnode_if.sh 8.7 (Berkeley) 5/11/95
75 */
76
77
78#ifndef _SYS_VNODE_IF_H_
79#define _SYS_VNODE_IF_H_
80
81#include <sys/appleapiopts.h>
82#include <sys/cdefs.h>
83#include <sys/kernel_types.h>
84#include <sys/buf.h>
85#ifdef BSD_KERNEL_PRIVATE
86#include <sys/vm.h>
87#endif
88#include <mach/memory_object_types.h>
89
90
91#ifdef KERNEL
92
93extern struct vnodeop_desc vnop_default_desc;
94extern struct vnodeop_desc vnop_lookup_desc;
95extern struct vnodeop_desc vnop_create_desc;
96extern struct vnodeop_desc vnop_whiteout_desc;
97extern struct vnodeop_desc vnop_mknod_desc;
98extern struct vnodeop_desc vnop_open_desc;
99extern struct vnodeop_desc vnop_close_desc;
100extern struct vnodeop_desc vnop_access_desc;
101extern struct vnodeop_desc vnop_getattr_desc;
102extern struct vnodeop_desc vnop_setattr_desc;
103extern struct vnodeop_desc vnop_read_desc;
104extern struct vnodeop_desc vnop_write_desc;
105extern struct vnodeop_desc vnop_ioctl_desc;
106extern struct vnodeop_desc vnop_select_desc;
107extern struct vnodeop_desc vnop_exchange_desc;
108extern struct vnodeop_desc vnop_revoke_desc;
109extern struct vnodeop_desc vnop_mmap_desc;
110extern struct vnodeop_desc vnop_mnomap_desc;
111extern struct vnodeop_desc vnop_fsync_desc;
112extern struct vnodeop_desc vnop_remove_desc;
113extern struct vnodeop_desc vnop_link_desc;
114extern struct vnodeop_desc vnop_rename_desc;
115extern struct vnodeop_desc vnop_mkdir_desc;
116extern struct vnodeop_desc vnop_rmdir_desc;
117extern struct vnodeop_desc vnop_symlink_desc;
118extern struct vnodeop_desc vnop_readdir_desc;
119extern struct vnodeop_desc vnop_readdirattr_desc;
120extern struct vnodeop_desc vnop_readlink_desc;
121extern struct vnodeop_desc vnop_inactive_desc;
122extern struct vnodeop_desc vnop_reclaim_desc;
123extern struct vnodeop_desc vnop_print_desc;
124extern struct vnodeop_desc vnop_pathconf_desc;
125extern struct vnodeop_desc vnop_advlock_desc;
126extern struct vnodeop_desc vnop_truncate_desc;
127extern struct vnodeop_desc vnop_allocate_desc;
128extern struct vnodeop_desc vnop_pagein_desc;
129extern struct vnodeop_desc vnop_pageout_desc;
130extern struct vnodeop_desc vnop_searchfs_desc;
131extern struct vnodeop_desc vnop_copyfile_desc;
132extern struct vnodeop_desc vnop_blktooff_desc;
133extern struct vnodeop_desc vnop_offtoblk_desc;
134extern struct vnodeop_desc vnop_blockmap_desc;
135extern struct vnodeop_desc vnop_strategy_desc;
136extern struct vnodeop_desc vnop_bwrite_desc;
137
138#ifdef __APPLE_API_UNSTABLE
139
140#if NAMEDSTREAMS
141extern struct vnodeop_desc vnop_getnamedstream_desc;
142extern struct vnodeop_desc vnop_makenamedstream_desc;
143extern struct vnodeop_desc vnop_removenamedstream_desc;
144#endif
145
146#endif
147
148__BEGIN_DECLS
149/*
150 *#
151 *#% lookup dvp L ? ?
152 *#% lookup vpp - L -
153 */
154struct vnop_lookup_args {
155 struct vnodeop_desc *a_desc;
156 vnode_t a_dvp;
157 vnode_t *a_vpp;
158 struct componentname *a_cnp;
159 vfs_context_t a_context;
160};
161extern errno_t VNOP_LOOKUP(vnode_t, vnode_t *, struct componentname *, vfs_context_t);
162
163
164/*
165 *#
166 *#% create dvp L L L
167 *#% create vpp - L -
168 *#
169 */
170
171struct vnop_create_args {
172 struct vnodeop_desc *a_desc;
173 vnode_t a_dvp;
174 vnode_t *a_vpp;
175 struct componentname *a_cnp;
176 struct vnode_attr *a_vap;
177 vfs_context_t a_context;
178};
179extern errno_t VNOP_CREATE(vnode_t, vnode_t *, struct componentname *, struct vnode_attr *, vfs_context_t);
180
181/*
182 *#
183 *#% whiteout dvp L L L
184 *#% whiteout cnp - - -
185 *#% whiteout flag - - -
186 *#
187 */
188struct vnop_whiteout_args {
189 struct vnodeop_desc *a_desc;
190 vnode_t a_dvp;
191 struct componentname *a_cnp;
192 int a_flags;
193 vfs_context_t a_context;
194};
195extern errno_t VNOP_WHITEOUT(vnode_t, struct componentname *, int, vfs_context_t);
196
197/*
198 *#
199 *#% mknod dvp L U U
200 *#% mknod vpp - X -
201 *#
202 */
203struct vnop_mknod_args {
204 struct vnodeop_desc *a_desc;
205 vnode_t a_dvp;
206 vnode_t *a_vpp;
207 struct componentname *a_cnp;
208 struct vnode_attr *a_vap;
209 vfs_context_t a_context;
210};
211extern errno_t VNOP_MKNOD(vnode_t, vnode_t *, struct componentname *, struct vnode_attr *, vfs_context_t);
212
213/*
214 *#
215 *#% open vp L L L
216 *#
217 */
218struct vnop_open_args {
219 struct vnodeop_desc *a_desc;
220 vnode_t a_vp;
221 int a_mode;
222 vfs_context_t a_context;
223};
224extern errno_t VNOP_OPEN(vnode_t, int, vfs_context_t);
225
226/*
227 *#
228 *#% close vp U U U
229 *#
230 */
231struct vnop_close_args {
232 struct vnodeop_desc *a_desc;
233 vnode_t a_vp;
234 int a_fflag;
235 vfs_context_t a_context;
236};
237extern errno_t VNOP_CLOSE(vnode_t, int, vfs_context_t);
238
239/*
240 *#
241 *#% access vp L L L
242 *#
243 */
244struct vnop_access_args {
245 struct vnodeop_desc *a_desc;
246 vnode_t a_vp;
247 int a_action;
248 vfs_context_t a_context;
249};
250extern errno_t VNOP_ACCESS(vnode_t, int, vfs_context_t);
251
252
253/*
254 *#
255 *#% getattr vp = = =
256 *#
257 */
258struct vnop_getattr_args {
259 struct vnodeop_desc *a_desc;
260 vnode_t a_vp;
261 struct vnode_attr *a_vap;
262 vfs_context_t a_context;
263};
264extern errno_t VNOP_GETATTR(vnode_t, struct vnode_attr *, vfs_context_t);
265
266/*
267 *#
268 *#% setattr vp L L L
269 *#
270 */
271struct vnop_setattr_args {
272 struct vnodeop_desc *a_desc;
273 vnode_t a_vp;
274 struct vnode_attr *a_vap;
275 vfs_context_t a_context;
276};
277extern errno_t VNOP_SETATTR(vnode_t, struct vnode_attr *, vfs_context_t);
278
279
280/*
281 *#
282 *#% read vp L L L
283 *#
284 */
285struct vnop_read_args {
286 struct vnodeop_desc *a_desc;
287 vnode_t a_vp;
288 struct uio *a_uio;
289 int a_ioflag;
290 vfs_context_t a_context;
291};
292extern errno_t VNOP_READ(vnode_t, struct uio *, int, vfs_context_t);
293
294
295/*
296 *#
297 *#% write vp L L L
298 *#
299 */
300struct vnop_write_args {
301 struct vnodeop_desc *a_desc;
302 vnode_t a_vp;
303 struct uio *a_uio;
304 int a_ioflag;
305 vfs_context_t a_context;
306};
307extern errno_t VNOP_WRITE(vnode_t, struct uio *, int, vfs_context_t);
308
309
310/*
311 *#
312 *#% ioctl vp U U U
313 *#
314 */
315struct vnop_ioctl_args {
316 struct vnodeop_desc *a_desc;
317 vnode_t a_vp;
318 u_long a_command;
319 caddr_t a_data;
320 int a_fflag;
321 vfs_context_t a_context;
322};
323extern errno_t VNOP_IOCTL(vnode_t, u_long, caddr_t, int, vfs_context_t);
324
325
326/*
327 *#
328 *#% select vp U U U
329 *#
330 */
331struct vnop_select_args {
332 struct vnodeop_desc *a_desc;
333 vnode_t a_vp;
334 int a_which;
335 int a_fflags;
336 void *a_wql;
337 vfs_context_t a_context;
338};
339extern errno_t VNOP_SELECT(vnode_t, int, int, void *, vfs_context_t);
340
341
342/*
343 *#
344 *#% exchange fvp L L L
345 *#% exchange tvp L L L
346 *#
347 */
348struct vnop_exchange_args {
349 struct vnodeop_desc *a_desc;
350 vnode_t a_fvp;
351 vnode_t a_tvp;
352 int a_options;
353 vfs_context_t a_context;
354};
355extern errno_t VNOP_EXCHANGE(vnode_t, vnode_t, int, vfs_context_t);
356
357
358/*
359 *#
360 *#% revoke vp U U U
361 *#
362 */
363struct vnop_revoke_args {
364 struct vnodeop_desc *a_desc;
365 vnode_t a_vp;
366 int a_flags;
367 vfs_context_t a_context;
368};
369extern errno_t VNOP_REVOKE(vnode_t, int, vfs_context_t);
370
371
372/*
373 *#
374 *# mmap - vp U U U
375 *#
376 */
377struct vnop_mmap_args {
378 struct vnodeop_desc *a_desc;
379 vnode_t a_vp;
380 int a_fflags;
381 vfs_context_t a_context;
382};
383extern errno_t VNOP_MMAP(vnode_t, int, vfs_context_t);
384
385/*
386 *#
387 *# mnomap - vp U U U
388 *#
389 */
390struct vnop_mnomap_args {
391 struct vnodeop_desc *a_desc;
392 vnode_t a_vp;
393 vfs_context_t a_context;
394};
395extern errno_t VNOP_MNOMAP(vnode_t, vfs_context_t);
396
397
398/*
399 *#
400 *#% fsync vp L L L
401 *#
402 */
403struct vnop_fsync_args {
404 struct vnodeop_desc *a_desc;
405 vnode_t a_vp;
406 int a_waitfor;
407 vfs_context_t a_context;
408};
409extern errno_t VNOP_FSYNC(vnode_t, int, vfs_context_t);
410
411
412/*
413 *#
414 *#% remove dvp L U U
415 *#% remove vp L U U
416 *#
417 */
418struct vnop_remove_args {
419 struct vnodeop_desc *a_desc;
420 vnode_t a_dvp;
421 vnode_t a_vp;
422 struct componentname *a_cnp;
423 int a_flags;
424 vfs_context_t a_context;
425};
426extern errno_t VNOP_REMOVE(vnode_t, vnode_t, struct componentname *, int, vfs_context_t);
427
428
429/*
430 *#
431 *#% link vp U U U
432 *#% link tdvp L U U
433 *#
434 */
435struct vnop_link_args {
436 struct vnodeop_desc *a_desc;
437 vnode_t a_vp;
438 vnode_t a_tdvp;
439 struct componentname *a_cnp;
440 vfs_context_t a_context;
441};
442extern errno_t VNOP_LINK(vnode_t, vnode_t, struct componentname *, vfs_context_t);
443
444
445/*
446 *#
447 *#% rename fdvp U U U
448 *#% rename fvp U U U
449 *#% rename tdvp L U U
450 *#% rename tvp X U U
451 *#
452 */
453struct vnop_rename_args {
454 struct vnodeop_desc *a_desc;
455 vnode_t a_fdvp;
456 vnode_t a_fvp;
457 struct componentname *a_fcnp;
458 vnode_t a_tdvp;
459 vnode_t a_tvp;
460 struct componentname *a_tcnp;
461 vfs_context_t a_context;
462};
463extern errno_t VNOP_RENAME(vnode_t, vnode_t, struct componentname *, vnode_t, vnode_t, struct componentname *, vfs_context_t);
464
465
466/*
467 *#
468 *#% mkdir dvp L U U
469 *#% mkdir vpp - L -
470 *#
471 */
472struct vnop_mkdir_args {
473 struct vnodeop_desc *a_desc;
474 vnode_t a_dvp;
475 vnode_t *a_vpp;
476 struct componentname *a_cnp;
477 struct vnode_attr *a_vap;
478 vfs_context_t a_context;
479 };
480extern errno_t VNOP_MKDIR(vnode_t, vnode_t *, struct componentname *, struct vnode_attr *, vfs_context_t);
481
482
483/*
484 *#
485 *#% rmdir dvp L U U
486 *#% rmdir vp L U U
487 *#
488 */
489struct vnop_rmdir_args {
490 struct vnodeop_desc *a_desc;
491 vnode_t a_dvp;
492 vnode_t a_vp;
493 struct componentname *a_cnp;
494 vfs_context_t a_context;
495};
496extern errno_t VNOP_RMDIR(vnode_t, vnode_t, struct componentname *, vfs_context_t);
497
498
499/*
500 *#
501 *#% symlink dvp L U U
502 *#% symlink vpp - U -
503 *#
504 */
505struct vnop_symlink_args {
506 struct vnodeop_desc *a_desc;
507 vnode_t a_dvp;
508 vnode_t *a_vpp;
509 struct componentname *a_cnp;
510 struct vnode_attr *a_vap;
511 char *a_target;
512 vfs_context_t a_context;
513};
514extern errno_t VNOP_SYMLINK(vnode_t, vnode_t *, struct componentname *, struct vnode_attr *, char *, vfs_context_t);
515
516
517/*
518 *#
519 *#% readdir vp L L L
520 *#
521 *
522 * When VNOP_READDIR is called from the NFS Server, the nfs_data
523 * argument is non-NULL.
524 *
525 * The value of nfs_eofflag should be set to TRUE if the end of
526 * the directory was reached while reading.
527 *
528 * The directory seek offset (cookies) are returned to the NFS client and
529 * may be used later to restart a directory read part way through
530 * the directory. There is one cookie returned for each directory
531 * entry returned and its size is determince from nfs_sizeofcookie.
532 * The value of the cookie should be the logical offset within the
533 * directory where the on-disc version of the appropriate directory
534 * entry starts. Memory for the cookies is allocated from M_TEMP
535 * and it is freed by the caller of VNOP_READDIR.
536 *
537 */
538
539struct vnop_readdir_args {
540 struct vnodeop_desc *a_desc;
541 vnode_t a_vp;
542 struct uio *a_uio;
543 int a_flags;
544 int *a_eofflag;
545 int *a_numdirent;
546 vfs_context_t a_context;
547};
548extern errno_t VNOP_READDIR(vnode_t, struct uio *, int, int *, int *, vfs_context_t);
549
550
551/*
552 *#
553 *#% readdirattr vp L L L
554 *#
555 */
556struct vnop_readdirattr_args {
557 struct vnodeop_desc *a_desc;
558 vnode_t a_vp;
559 struct attrlist *a_alist;
560 struct uio *a_uio;
561 u_long a_maxcount;
562 u_long a_options;
563 u_long *a_newstate;
564 int *a_eofflag;
565 u_long *a_actualcount;
566 vfs_context_t a_context;
567};
568extern errno_t VNOP_READDIRATTR(vnode_t, struct attrlist *, struct uio *, u_long, u_long, u_long *, int *, u_long *, vfs_context_t);
569
570
571/*
572 *#
573 *#% readlink vp L L L
574 *#
575 */
576struct vnop_readlink_args {
577 struct vnodeop_desc *a_desc;
578 vnode_t a_vp;
579 struct uio *a_uio;
580 vfs_context_t a_context;
581};
582extern errno_t VNOP_READLINK(vnode_t, struct uio *, vfs_context_t);
583
584
585/*
586 *#
587 *#% inactive vp L U U
588 *#
589 */
590struct vnop_inactive_args {
591 struct vnodeop_desc *a_desc;
592 vnode_t a_vp;
593 vfs_context_t a_context;
594};
595extern errno_t VNOP_INACTIVE(vnode_t, vfs_context_t);
596
597
598/*
599 *#
600 *#% reclaim vp U U U
601 *#
602 */
603struct vnop_reclaim_args {
604 struct vnodeop_desc *a_desc;
605 vnode_t a_vp;
606 vfs_context_t a_context;
607};
608extern errno_t VNOP_RECLAIM(vnode_t, vfs_context_t);
609
610
611/*
612 *#
613 *#% pathconf vp L L L
614 *#
615 */
616struct vnop_pathconf_args {
617 struct vnodeop_desc *a_desc;
618 vnode_t a_vp;
619 int a_name;
620 register_t *a_retval;
621 vfs_context_t a_context;
622};
623extern errno_t VNOP_PATHCONF(vnode_t, int, register_t *, vfs_context_t); /* register_t??????? */
624
625
626/*
627 *#
628 *#% advlock vp U U U
629 *#
630 */
631struct vnop_advlock_args {
632 struct vnodeop_desc *a_desc;
633 vnode_t a_vp;
634 caddr_t a_id;
635 int a_op;
636 struct flock *a_fl;
637 int a_flags;
638 vfs_context_t a_context;
639};
640extern errno_t VNOP_ADVLOCK(vnode_t, caddr_t, int, struct flock *, int, vfs_context_t);
641
642/*
643 *#
644 *#% allocate vp L L L
645 *#
646 */
647struct vnop_allocate_args {
648 struct vnodeop_desc *a_desc;
649 vnode_t a_vp;
650 off_t a_length;
651 u_int32_t a_flags;
652 off_t *a_bytesallocated;
653 off_t a_offset;
654 vfs_context_t a_context;
655};
656extern errno_t VNOP_ALLOCATE(vnode_t, off_t, u_int32_t, off_t *, off_t, vfs_context_t);
657
658/*
659 *#
660 *#% pagein vp = = =
661 *#
662 */
663struct vnop_pagein_args {
664 struct vnodeop_desc *a_desc;
665 vnode_t a_vp;
666 upl_t a_pl;
667 vm_offset_t a_pl_offset;
668 off_t a_f_offset;
669 size_t a_size;
670 int a_flags;
671 vfs_context_t a_context;
672};
673extern errno_t VNOP_PAGEIN(vnode_t, upl_t, vm_offset_t, off_t, size_t, int, vfs_context_t); /* vm_offset_t ? */
674
675
676/*
677 *#
678 *#% pageout vp = = =
679 *#
680 */
681struct vnop_pageout_args {
682 struct vnodeop_desc *a_desc;
683 vnode_t a_vp;
684 upl_t a_pl;
685 vm_offset_t a_pl_offset;
686 off_t a_f_offset;
687 size_t a_size;
688 int a_flags;
689 vfs_context_t a_context;
690};
691extern errno_t VNOP_PAGEOUT(vnode_t, upl_t, vm_offset_t, off_t, size_t, int, vfs_context_t);
692
693
694/*
695 *#
696 *#% searchfs vp L L L
697 *#
698 */
699struct vnop_searchfs_args {
700 struct vnodeop_desc *a_desc;
701 vnode_t a_vp;
702 void *a_searchparams1;
703 void *a_searchparams2;
704 struct attrlist *a_searchattrs;
705 u_long a_maxmatches;
706 struct timeval *a_timelimit;
707 struct attrlist *a_returnattrs;
708 u_long *a_nummatches;
709 u_long a_scriptcode;
710 u_long a_options;
711 struct uio *a_uio;
712 struct searchstate *a_searchstate;
713 vfs_context_t a_context;
714};
715extern 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);
716
717
718/*
719 *#
720 *#% copyfile fvp U U U
721 *#% copyfile tdvp L U U
722 *#% copyfile tvp X U U
723 *#
724 */
725struct vnop_copyfile_args {
726 struct vnodeop_desc *a_desc;
727 vnode_t a_fvp;
728 vnode_t a_tdvp;
729 vnode_t a_tvp;
730 struct componentname *a_tcnp;
731 int a_mode;
732 int a_flags;
733 vfs_context_t a_context;
734};
735extern errno_t VNOP_COPYFILE(vnode_t, vnode_t, vnode_t, struct componentname *, int, int, vfs_context_t);
736
737
738struct vnop_getxattr_args {
739 struct vnodeop_desc *a_desc;
740 vnode_t a_vp;
741 const char * a_name;
742 uio_t a_uio;
743 size_t *a_size;
744 int a_options;
745 vfs_context_t a_context;
746};
747extern struct vnodeop_desc vnop_getxattr_desc;
748extern errno_t VNOP_GETXATTR(vnode_t, const char *, uio_t, size_t *, int, vfs_context_t);
749
750struct vnop_setxattr_args {
751 struct vnodeop_desc *a_desc;
752 vnode_t a_vp;
753 const char * a_name;
754 uio_t a_uio;
755 int a_options;
756 vfs_context_t a_context;
757};
758extern struct vnodeop_desc vnop_setxattr_desc;
759extern errno_t VNOP_SETXATTR(vnode_t, const char *, uio_t, int, vfs_context_t);
760
761struct vnop_removexattr_args {
762 struct vnodeop_desc *a_desc;
763 vnode_t a_vp;
764 const char * a_name;
765 int a_options;
766 vfs_context_t a_context;
767};
768extern struct vnodeop_desc vnop_removexattr_desc;
769extern errno_t VNOP_REMOVEXATTR(vnode_t, const char *, int, vfs_context_t);
770
771struct vnop_listxattr_args {
772 struct vnodeop_desc *a_desc;
773 vnode_t a_vp;
774 uio_t a_uio;
775 size_t *a_size;
776 int a_options;
777 vfs_context_t a_context;
778};
779extern struct vnodeop_desc vnop_listxattr_desc;
780extern errno_t VNOP_LISTXATTR(vnode_t, uio_t, size_t *, int, vfs_context_t);
781
782
783/*
784 *#
785 *#% blktooff vp = = =
786 *#
787 */
788struct vnop_blktooff_args {
789 struct vnodeop_desc *a_desc;
790 vnode_t a_vp;
791 daddr64_t a_lblkno;
792 off_t *a_offset;
793};
794extern errno_t VNOP_BLKTOOFF(vnode_t, daddr64_t, off_t *);
795
796
797/*
798 *#
799 *#% offtoblk vp = = =
800 *#
801 */
802struct vnop_offtoblk_args {
803 struct vnodeop_desc *a_desc;
804 vnode_t a_vp;
805 off_t a_offset;
806 daddr64_t *a_lblkno;
807};
808extern errno_t VNOP_OFFTOBLK(vnode_t, off_t, daddr64_t *);
809
810
811/*
812 *#
813 *#% blockmap vp L L L
814 *#
815 */
816struct vnop_blockmap_args {
817 struct vnodeop_desc *a_desc;
818 vnode_t a_vp;
819 off_t a_foffset;
820 size_t a_size;
821 daddr64_t *a_bpn;
822 size_t *a_run;
823 void *a_poff;
824 int a_flags;
825 vfs_context_t a_context;
826};
827extern errno_t VNOP_BLOCKMAP(vnode_t, off_t, size_t, daddr64_t *, size_t *, void *,
828 int, vfs_context_t);
829
830struct vnop_strategy_args {
831 struct vnodeop_desc *a_desc;
832 struct buf *a_bp;
833};
834extern errno_t VNOP_STRATEGY(struct buf *bp);
835
836struct vnop_bwrite_args {
837 struct vnodeop_desc *a_desc;
838 buf_t a_bp;
839};
840extern errno_t VNOP_BWRITE(buf_t);
841
842
843struct vnop_kqfilt_add_args {
844 struct vnodeop_desc *a_desc;
845 struct vnode *a_vp;
846 struct knote *a_kn;
847 vfs_context_t a_context;
848};
849extern struct vnodeop_desc vnop_kqfilt_add_desc;
850extern errno_t VNOP_KQFILT_ADD(vnode_t , struct knote *, vfs_context_t);
851
852struct vnop_kqfilt_remove_args {
853 struct vnodeop_desc *a_desc;
854 struct vnode *a_vp;
855 uintptr_t a_ident;
856 vfs_context_t a_context;
857};
858extern struct vnodeop_desc vnop_kqfilt_remove_desc;
859errno_t VNOP_KQFILT_REMOVE(vnode_t , uintptr_t , vfs_context_t);
860
861struct label;
862struct vnop_setlabel_args {
863 struct vnodeop_desc *a_desc;
864 struct vnode *a_vp;
865 struct label *a_vl;
866 vfs_context_t a_context;
867};
868extern struct vnodeop_desc vnop_setlabel_desc;
869errno_t VNOP_SETLABEL(vnode_t, struct label *, vfs_context_t);
870
871#ifdef __APPLE_API_UNSTABLE
872
873#if NAMEDSTREAMS
874
875enum nsoperation { NS_OPEN, NS_CREATE, NS_DELETE };
876
877struct vnop_getnamedstream_args {
878 struct vnodeop_desc *a_desc;
879 vnode_t a_vp;
880 vnode_t *a_svpp;
881 const char *a_name;
882 enum nsoperation a_operation;
883 int a_flags;
884 vfs_context_t a_context;
885};
886extern errno_t VNOP_GETNAMEDSTREAM(vnode_t, vnode_t *, const char *, enum nsoperation, int flags, vfs_context_t);
887
888struct vnop_makenamedstream_args {
889 struct vnodeop_desc *a_desc;
890 vnode_t *a_svpp;
891 vnode_t a_vp;
892 const char *a_name;
893 int a_flags;
894 vfs_context_t a_context;
895};
896extern errno_t VNOP_MAKENAMEDSTREAM(vnode_t, vnode_t *, const char *, int flags, vfs_context_t);
897
898struct vnop_removenamedstream_args {
899 struct vnodeop_desc *a_desc;
900 vnode_t a_vp;
901 vnode_t a_svp;
902 const char *a_name;
903 int a_flags;
904 vfs_context_t a_context;
905};
906extern errno_t VNOP_REMOVENAMEDSTREAM(vnode_t, vnode_t, const char *, int flags, vfs_context_t);
907#endif
908
909#endif
910
911__END_DECLS
912
913#endif /* KERNEL */
914
915#endif /* !_SYS_VNODE_IF_H_ */