+/*
+ * return values from callback
+ */
+#define VFS_RETURNED 0 /* done with vnode, reference can be dropped */
+#define VFS_RETURNED_DONE 1 /* done with vnode, reference can be dropped, terminate iteration */
+#define VFS_CLAIMED 2 /* don't drop reference */
+#define VFS_CLAIMED_DONE 3 /* don't drop reference, terminate iteration */
+
+
+__BEGIN_DECLS
+/*
+ * prototypes for exported VFS operations
+ */
+extern int VFS_MOUNT(mount_t, vnode_t, user_addr_t, vfs_context_t);
+extern int VFS_START(mount_t, int, vfs_context_t);
+extern int VFS_UNMOUNT(mount_t, int, vfs_context_t);
+extern int VFS_ROOT(mount_t, vnode_t *, vfs_context_t);
+extern int VFS_QUOTACTL(mount_t, int, uid_t, caddr_t, vfs_context_t);
+extern int VFS_SYNC(mount_t, int, vfs_context_t);
+extern int VFS_VGET(mount_t, ino64_t, vnode_t *, vfs_context_t);
+extern int VFS_FHTOVP(mount_t, int, unsigned char *, vnode_t *, vfs_context_t);
+extern int VFS_VPTOFH(vnode_t, int *, unsigned char *, vfs_context_t);
+
+/* The file system registrartion KPI */
+int vfs_fsadd(struct vfs_fsentry *, vfstable_t *);
+int vfs_fsremove(vfstable_t);
+int vfs_iterate(int, int (*)(struct mount *, void *), void *);
+
+uint64_t vfs_flags(mount_t);
+void vfs_setflags(mount_t, uint64_t);
+void vfs_clearflags(mount_t, uint64_t);
+
+int vfs_issynchronous(mount_t);
+int vfs_iswriteupgrade(mount_t);
+int vfs_isupdate(mount_t);
+int vfs_isreload(mount_t);
+int vfs_isforce(mount_t);
+int vfs_isrdonly(mount_t);
+int vfs_isrdwr(mount_t);
+int vfs_authopaque(mount_t);
+int vfs_authopaqueaccess(mount_t);
+void vfs_setauthopaque(mount_t);
+void vfs_setauthopaqueaccess(mount_t);
+void vfs_clearauthopaque(mount_t);
+void vfs_clearauthopaqueaccess(mount_t);
+int vfs_extendedsecurity(mount_t);
+void vfs_setextendedsecurity(mount_t);
+void vfs_clearextendedsecurity(mount_t);
+void vfs_setlocklocal(mount_t);
+
+
+
+uint32_t vfs_maxsymlen(mount_t);
+void vfs_setmaxsymlen(mount_t, uint32_t);
+void * vfs_fsprivate(mount_t);
+void vfs_setfsprivate(mount_t, void *mntdata);
+
+struct vfsstatfs * vfs_statfs(mount_t);
+int vfs_update_vfsstat(mount_t, vfs_context_t);
+int vfs_getattr(mount_t mp, struct vfs_attr *vfa, vfs_context_t ctx);
+int vfs_setattr(mount_t mp, struct vfs_attr *vfa, vfs_context_t ctx);
+
+int vfs_typenum(mount_t);
+void vfs_name(mount_t, char *);
+int vfs_devblocksize(mount_t);
+void vfs_ioattr(mount_t, struct vfsioattr *);
+void vfs_setioattr(mount_t, struct vfsioattr *);
+int vfs_64bitready(mount_t);
+
+
+int vfs_busy(mount_t, int);
+void vfs_unbusy(mount_t);
+
+void vfs_getnewfsid(struct mount *);
+mount_t vfs_getvfs(fsid_t *);
+mount_t vfs_getvfs_by_mntonname(u_char *);
+int vfs_mountedon(struct vnode *);
+
+void vfs_event_signal(fsid_t *, u_int32_t, intptr_t);
+void vfs_event_init(void);
+__END_DECLS
+
+#endif /* KERNEL */
+
+#ifndef KERNEL
+
+/*
+ * Generic file handle
+ */
+#define NFS_MAX_FH_SIZE 64
+#define NFSV2_MAX_FH_SIZE 32
+struct fhandle {
+ int fh_len; /* length of file handle */
+ unsigned char fh_data[NFS_MAX_FH_SIZE]; /* file handle value */
+};
+typedef struct fhandle fhandle_t;
+