summaryrefslogtreecommitdiffstats
path: root/contrib/macfuse/fuse_ioctl.h
diff options
context:
space:
mode:
authorCsaba Henk <csaba@gluster.com>2010-05-17 07:06:58 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-05-21 00:31:41 -0700
commit18d982e6d0d330af8ccd2b12252ae29fe0932023 (patch)
treef13c3ac28b549d5bf343715de32d16b28d93ab3c /contrib/macfuse/fuse_ioctl.h
parent86ee9d3e144d2371e5ae7edf663916b8da6d2616 (diff)
OS X: basic additions for OS X client support
Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 361 (GlusterFS 3.0 should work on Mac OS/X) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=361
Diffstat (limited to 'contrib/macfuse/fuse_ioctl.h')
-rw-r--r--contrib/macfuse/fuse_ioctl.h64
1 files changed, 64 insertions, 0 deletions
diff --git a/contrib/macfuse/fuse_ioctl.h b/contrib/macfuse/fuse_ioctl.h
new file mode 100644
index 00000000000..054968cb13e
--- /dev/null
+++ b/contrib/macfuse/fuse_ioctl.h
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2006-2008 Google. All Rights Reserved.
+ * Amit Singh <singh@>
+ */
+
+#ifndef _FUSE_IOCTL_H_
+#define _FUSE_IOCTL_H_
+
+#include <stdint.h>
+#include <sys/ioctl.h>
+
+/* FUSEDEVIOCxxx */
+
+/* Get mounter's pid. */
+#define FUSEDEVGETMOUNTERPID _IOR('F', 1, u_int32_t)
+
+/* Check if FUSE_INIT kernel-user handshake is complete. */
+#define FUSEDEVIOCGETHANDSHAKECOMPLETE _IOR('F', 2, u_int32_t)
+
+/* Mark the daemon as dead. */
+#define FUSEDEVIOCSETDAEMONDEAD _IOW('F', 3, u_int32_t)
+
+/* Tell the kernel which operations the daemon implements. */
+#define FUSEDEVIOCSETIMPLEMENTEDBITS _IOW('F', 4, u_int64_t)
+
+/* Get device's random "secret". */
+#define FUSEDEVIOCGETRANDOM _IOR('F', 5, u_int32_t)
+
+/*
+ * The 'AVFI' (alter-vnode-for-inode) ioctls all require an inode number
+ * as an argument. In the user-space library, you can get the inode number
+ * from a path by using fuse_lookup_inode_by_path_np() [lib/fuse.c].
+ *
+ * To see an example of using this, see the implementation of
+ * fuse_purge_path_np() in lib/fuse_darwin.c.
+ */
+
+struct fuse_avfi_ioctl {
+ uint64_t inode;
+ uint64_t cmd;
+ uint32_t ubc_flags;
+ uint32_t note;
+ off_t size;
+};
+
+/* Alter the vnode (if any) specified by the given inode. */
+#define FUSEDEVIOCALTERVNODEFORINODE _IOW('F', 6, struct fuse_avfi_ioctl)
+#define FSCTLALTERVNODEFORINODE IOCBASECMD(FUSEDEVIOCALTERVNODEFORINODE)
+
+/*
+ * Possible cmd values for AVFI.
+ */
+
+#define FUSE_AVFI_MARKGONE 0x00000001 /* no ubc_flags */
+#define FUSE_AVFI_PURGEATTRCACHE 0x00000002 /* no ubc_flags */
+#define FUSE_AVFI_PURGEVNCACHE 0x00000004 /* no ubc_flags */
+#define FUSE_AVFI_UBC 0x00000008 /* uses ubc_flags */
+#define FUSE_AVFI_UBC_SETSIZE 0x00000010 /* uses ubc_flags, size */
+#define FUSE_AVFI_KNOTE 0x00000020 /* uses note */
+
+#define FUSE_SETACLSTATE _IOW('h', 10, int32_t)
+#define FSCTLSETACLSTATE IOCBASECMD(FUSE_SETACLSTATE)
+
+#endif /* _FUSE_IOCTL_H_ */