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