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