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