+enum GNUNET_DISK_MapType
+{
+ /**
+ * Read-only memory map.
+ */
+ GNUNET_DISK_MAP_TYPE_READ = 1,
+
+ /**
+ * Write-able memory map.
+ */
+ GNUNET_DISK_MAP_TYPE_WRITE = 2,
+
+ /**
+ * Read-write memory map.
+ */
+ GNUNET_DISK_MAP_TYPE_READWRITE = 3
+};
+
+
+/**
+ * File access permissions, UNIX-style.
+ */
+enum GNUNET_DISK_AccessPermissions
+{
+ /**
+ * Nobody is allowed to do anything to the file.
+ */
+ GNUNET_DISK_PERM_NONE = 0,
+
+ /**
+ * Owner can read.
+ */
+ GNUNET_DISK_PERM_USER_READ = 1,
+
+ /**
+ * Owner can write.
+ */
+ GNUNET_DISK_PERM_USER_WRITE = 2,
+
+ /**
+ * Owner can execute.
+ */
+ GNUNET_DISK_PERM_USER_EXEC = 4,
+
+ /**
+ * Group can read.
+ */
+ GNUNET_DISK_PERM_GROUP_READ = 8,
+
+ /**
+ * Group can write.
+ */
+ GNUNET_DISK_PERM_GROUP_WRITE = 16,
+
+ /**
+ * Group can execute.
+ */
+ GNUNET_DISK_PERM_GROUP_EXEC = 32,
+
+ /**
+ * Everybody can read.
+ */
+ GNUNET_DISK_PERM_OTHER_READ = 64,
+
+ /**
+ * Everybody can write.
+ */
+ GNUNET_DISK_PERM_OTHER_WRITE = 128,
+
+ /**
+ * Everybody can execute.
+ */
+ GNUNET_DISK_PERM_OTHER_EXEC = 256
+};
+
+
+/**
+ * Constants for specifying how to seek. Do not change values or order,
+ * some of the code depends on the specific numeric values!
+ */
+enum GNUNET_DISK_Seek
+{
+ /**
+ * Seek an absolute position (from the start of the file).
+ */
+ GNUNET_DISK_SEEK_SET = 0,
+
+ /**
+ * Seek a relative position (from the current offset).
+ */
+ GNUNET_DISK_SEEK_CUR = 1,
+
+ /**
+ * Seek an absolute position from the end of the file.
+ */
+ GNUNET_DISK_SEEK_END = 2
+};
+
+
+/**
+ * Enumeration identifying the two ends of a pipe.
+ */
+enum GNUNET_DISK_PipeEnd
+{
+ /**
+ * The reading-end of a pipe.
+ */
+ GNUNET_DISK_PIPE_END_READ = 0,
+
+ /**
+ * The writing-end of a pipe.
+ */
+ GNUNET_DISK_PIPE_END_WRITE = 1
+};