+ buf_t a_bp;
+};
+
+/*!
+ @function VNOP_BWRITE
+ @abstract Write a buffer to backing store.
+ @discussion VNOP_BWRITE() is called by buf_bawrite() (asynchronous write) and potentially by buf_bdwrite() (delayed write)
+ but not by buf_bwrite(). A filesystem may choose to perform some kind of manipulation of the buffer in this routine; it
+ generally will end up calling VFS's default implementation, vn_bwrite() (which calls buf_bwrite() without further ado).
+ @param bp The buffer to write.
+ @return 0 for success, else an error code.
+ */
+extern errno_t VNOP_BWRITE(buf_t bp);
+
+struct vnop_kqfilt_add_args {
+ struct vnodeop_desc *a_desc;
+ struct vnode *a_vp;
+ struct knote *a_kn;
+ vfs_context_t a_context;
+};
+extern struct vnodeop_desc vnop_kqfilt_add_desc;
+
+#ifdef XNU_KERNEL_PRIVATE
+extern errno_t VNOP_KQFILT_ADD(vnode_t , struct knote *, vfs_context_t);
+#endif /* XNU_KERNEL_PRIVATE */
+
+struct vnop_kqfilt_remove_args {
+ struct vnodeop_desc *a_desc;
+ struct vnode *a_vp;
+ uintptr_t a_ident;
+ vfs_context_t a_context;
+};
+extern struct vnodeop_desc vnop_kqfilt_remove_desc;
+
+#ifdef XNU_KERNEL_PRIVATE
+errno_t VNOP_KQFILT_REMOVE(vnode_t , uintptr_t , vfs_context_t);
+#endif /* XNU_KERNEL_PRIVATE */
+
+
+#ifdef KERNEL_PRIVATE
+#define VNODE_MONITOR_BEGIN 0x01
+#define VNODE_MONITOR_END 0x02
+#define VNODE_MONITOR_UPDATE 0x04
+struct vnop_monitor_args {
+ struct vnodeop_desc *a_desc;
+ vnode_t a_vp;
+ uint32_t a_events;
+ uint32_t a_flags;
+ void *a_handle;
+ vfs_context_t a_context;
+};
+extern struct vnodeop_desc vnop_monitor_desc;
+#endif /* KERNEL_PRIVATE */
+
+#ifdef XNU_KERNEL_PRIVATE
+/*!
+ @function VNOP_MONITOR
+ @abstract Indicate to a filesystem that the number of watchers of a file has changed.
+ @param vp The vnode whose watch state has changed.
+ @param events Unused. Filesystems can ignore this parameter.
+ @param flags Type of change to the watch state. VNODE_MONITOR_BEGIN is passed when the kernel
+ begins tracking a new watcher of a file. VNODE_MONITOR_END is passed when a watcher stops watching a file.
+ VNODE_MONITOR_UPDATE is currently unused. A filesystem is guaranteed that each VNODE_MONITOR_BEGIN
+ will be matched by a VNODE_MONITOR_END with the same "handle" argument.
+ @param handle Unique identifier for a given watcher. A VNODE_MONITOR_BEGIN for a given handle will be matched with a
+ VNODE_MONITOR_END for the same handle; a filesystem need not consider this parameter unless
+ it for some reason wants be able to match specific VNOP_MONITOR calls rather than just keeping
+ a count.
+ @param ctx The context which is starting to monitor a file or ending a watch on a file. A matching
+ pair of VNODE_MONITOR_BEGIN and VNODE_MONITOR_END need not have the same context.
+ @discussion VNOP_MONITOR() is intended to let networked filesystems know when they should bother
+ listening for changes to files which occur remotely, so that they can post notifications using
+ vnode_notify(). Local filesystems should not implement a monitor vnop.
+ It is called when there is a new watcher for a file or when a watcher for a file goes away.
+ Each BEGIN will be matched with an END with the same handle. Note that vnode_ismonitored() can
+ be used to see if there are currently watchers for a file.
+ */
+errno_t VNOP_MONITOR(vnode_t vp, uint32_t events, uint32_t flags, void *handle, vfs_context_t ctx);
+#endif /* XNU_KERNEL_PRIVATE */
+
+struct label;
+struct vnop_setlabel_args {
+ struct vnodeop_desc *a_desc;
+ struct vnode *a_vp;
+ struct label *a_vl;
+ vfs_context_t a_context;
+};
+extern struct vnodeop_desc vnop_setlabel_desc;
+
+/*!
+ @function VNOP_SETLABEL
+ @abstract Associate a MACF label with a file.
+ @param vp The vnode to label.
+ @param label The desired label.
+ @param ctx Context to authenticate for label change.
+ @return 0 for success, else an error code.
+ */
+#ifdef XNU_KERNEL_PRIVATE
+errno_t VNOP_SETLABEL(vnode_t, struct label *, vfs_context_t);
+#endif /* XNU_KERNEL_PRIVATE */
+
+#ifdef __APPLE_API_UNSTABLE
+
+#if NAMEDSTREAMS
+
+enum nsoperation { NS_OPEN, NS_CREATE, NS_DELETE };
+
+/* a_flags for vnop_getnamedstream_args: */
+#define NS_GETRAWENCRYPTED 0x00000001
+
+struct vnop_getnamedstream_args {
+ struct vnodeop_desc *a_desc;
+ vnode_t a_vp;
+ vnode_t *a_svpp;
+ const char *a_name;
+ enum nsoperation a_operation;
+ int a_flags;
+ vfs_context_t a_context;
+};
+
+/*!
+ @function VNOP_GETNAMEDSTREAM
+ @abstract Get a named stream associated with a file.
+ @discussion If this call sucecss, svpp should be returned with an iocount which the caller
+ will drop. VFS provides a facility for simulating named streams when interacting with filesystems
+ which do not support them.
+ @param vp The vnode for which to get a named stream.
+ @param svpp Destination for pointer to named stream's vnode.
+ @param name The name of the named stream, e.g. "com.apple.ResourceFork".
+ @param operation Operation to perform. In HFS and AFP, this parameter is only considered as follows:
+ if the resource fork has not been opened and the operation is not NS_OPEN, fail with ENOATTR. Currently
+ only passed as NS_OPEN by VFS.
+ @param flags Flags used to control getnamedstream behavior. Currently only used for raw-encrypted-requests.
+ @param ctx Context to authenticate for getting named stream.
+ @return 0 for success, else an error code.
+ */
+#ifdef XNU_KERNEL_PRIVATE
+extern errno_t VNOP_GETNAMEDSTREAM(vnode_t, vnode_t *, const char *, enum nsoperation, int flags, vfs_context_t);
+#endif /* XNU_KERNEL_PRIVATE */
+
+struct vnop_makenamedstream_args {
+ struct vnodeop_desc *a_desc;
+ vnode_t *a_svpp;
+ vnode_t a_vp;
+ const char *a_name;
+ int a_flags;
+ vfs_context_t a_context;