+
+#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;
+};
+
+/*!
+ * @function VNOP_MAKENAMEDSTREAM
+ * @abstract Create a named stream associated with a file.
+ * @discussion If this call succeeds, 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 flags Currently unused.
+ * @param ctx Context to authenticate creating named stream.
+ * @return 0 for success, else an error code.
+ */
+#ifdef XNU_KERNEL_PRIVATE
+extern errno_t VNOP_MAKENAMEDSTREAM(vnode_t, vnode_t *, const char *, int flags, vfs_context_t);
+#endif /* XNU_KERNEL_PRIVATE */
+
+struct vnop_removenamedstream_args {
+ struct vnodeop_desc *a_desc;
+ vnode_t a_vp;
+ vnode_t a_svp;
+ const char *a_name;
+ int a_flags;
+ vfs_context_t a_context;
+};
+
+/*!
+ * @function VNOP_REMOVENAMEDSTREAM
+ * @abstract Delete a named stream associated with a file.
+ * @discussion VFS provides a facility for simulating named streams when interacting with filesystems
+ * which do not support them.
+ * @param vp The vnode to which the named stream belongs.
+ * @param svp The named stream's vnode.
+ * @param name The name of the named stream, e.g. "com.apple.ResourceFork".
+ * @param flags Currently unused.
+ * @param ctx Context to authenticate deleting named stream.
+ * @return 0 for success, else an error code.
+ */
+#ifdef XNU_KERNEL_PRIVATE
+extern errno_t VNOP_REMOVENAMEDSTREAM(vnode_t, vnode_t, const char *, int flags, vfs_context_t);
+#endif /* XNU_KERNEL_PRIVATE */
+
+#endif // NAMEDSTREAMS
+
+#endif // defined(__APPLE_API_UNSTABLE)