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