summaryrefslogtreecommitdiff
path: root/hurd/hurd_types.h
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1994-06-16 05:04:12 +0000
committerRoland McGrath <roland@gnu.org>1994-06-16 05:04:12 +0000
commitf26e1f749f7402bd58d93d8bcc598ebcffef3d08 (patch)
treedf7e91ed0e8320080b5c6d28467f06b8572fcb16 /hurd/hurd_types.h
parentb7faefbafc600613fc8d4e5df59512a1a23c8181 (diff)
Formerly hurd_types.h.~92~
Diffstat (limited to 'hurd/hurd_types.h')
-rw-r--r--hurd/hurd_types.h226
1 files changed, 129 insertions, 97 deletions
diff --git a/hurd/hurd_types.h b/hurd/hurd_types.h
index 89bf84a5..71ae6698 100644
--- a/hurd/hurd_types.h
+++ b/hurd/hurd_types.h
@@ -30,6 +30,10 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
without changing the release number. */
#define HURD_RELEASE "0.0 pre-alpha"
+
+/* Simple type declarations */
+
+/* These types identify certain kinds of ports used by the Hurd. */
typedef mach_port_t file_t;
typedef mach_port_t fsys_t;
typedef mach_port_t io_t;
@@ -40,11 +44,7 @@ typedef mach_port_t addr_port_t;
typedef mach_port_t startup_t;
typedef mach_port_t proccoll_t;
-/* XXX temp hack --roland */
-#include <errno.h>
-#ifndef errno
-typedef kern_return_t error_t;
-#endif
+#include <errno.h> /* Defines `error_t'. */
/* These names exist only because of MiG deficiencies.
You should not use them in C source; use the normal C types instead. */
@@ -58,93 +58,86 @@ typedef uid_t *idarray_t;
typedef struct rusage rusage_t;
typedef struct flock flock_t;
typedef struct utsname utsname_t;
-
typedef struct stat io_statbuf_t;
-/* stb_fstype is one of: */
-#define FSTYPE_UFS 0x00000000 /* 4.x BSD Fast File System */
-#define FSTYPE_NFS 0x00000001 /* Network File System ala Sun */
-#define FSTYPE_GFS 0x00000002 /* GNU file system */
-#define FSTYPE_LFS 0x00000003 /* Logging File System ala Sprite */
-#define FSTYPE_SYSV 0x00000004 /* Old U*x filesystem ala System V */
-#define FSTYPE_FTP 0x00000005 /* Transparent FTP */
-#define FSTYPE_TAR 0x00000006 /* Transparent TAR */
-#define FSTYPE_AR 0x00000007 /* Transparent AR */
-#define FSTYPE_CPIO 0x00000008 /* Transparent CPIO */
-#define FSTYPE_MSLOSS 0x00000009 /* MS-DOS */
-#define FSTYPE_CPM 0x0000000a /* CP/M */
-#define FSTYPE_HFS 0x0000000b /* Don't ask */
-#define FSTYPE_DTFS 0x0000000c /* used by desktop to provide more info */
-#define FSTYPE_GRFS 0x0000000d /* GNU Remote File System */
-#define FSTYPE_TERM 0x0000000e /* GNU Terminal driver */
-#define FSTYPE_DEV 0x0000000f /* GNU Special file server */
-#define FSTYPE_PROC 0x00000010 /* /proc filesystem ala Version 9 */
-#define FSTYPE_IFSOCK 0x00000011 /* PF_LOCAL socket naming point */
-#define FSTYPE_AFS 0x00000012 /* Andrew File System 3.xx */
-#define FSTYPE_DFS 0x00000013 /* Distributed File Sys (OSF) == AFS 4.xx */
-#define FSTYPE_PROC9 0x00000014 /* /proc filesystem ala Plan 9 */
+
+/* Parameters and flags in RPC calls */
-/* Bits for flags in file_exec and exec_* calls are as follows: */
-#define EXEC_NEWTASK 0x00000001 /* create new task; kill old one */
-#define EXEC_SECURE 0x00000002 /* use secure values of portarray, etc. */
-#define EXEC_DEFAULTS 0x00000004 /* Use defaults for unspecified ports */
-
-/* Standard port assignments for file_exec and exec_* */
-enum
- {
- INIT_PORT_CWDIR,
- INIT_PORT_CRDIR,
- INIT_PORT_AUTH,
- INIT_PORT_PROC,
- INIT_PORT_LOGINCOLL,
- INIT_PORT_CTTYID,
- /* If MACH_PORT_NULL is given for the bootstrap port,
- the bootstrap port of the old task is used. */
- INIT_PORT_BOOTSTRAP,
- INIT_PORT_MAX
- };
+/* Many such parameters and flags are also defined in various libc
+ headers. */
-/* Standard ints for file_exec and exec_* */
-enum
- {
- INIT_UMASK,
- INIT_SIGMASK,
- INIT_SIGIGN,
- INIT_SIGPENDING,
- INIT_INT_MAX,
- };
+/* Bits for flags in fs.defs:file_exec and exec.defs:exec_* calls: */
+#define EXEC_NEWTASK 0x00000001 /* Create new task; kill old one. */
+#define EXEC_SECURE 0x00000002 /* Use secure values of portarray, etc. */
+#define EXEC_DEFAULTS 0x00000004 /* Use defaults for unspecified ports. */
-/* Bits for flags in file_set_translator call are as follows: */
-#define FS_TRANS_FORCE 0x00000001 /* must use translator(no sht circuit) */
-#define FS_TRANS_EXCL 0x00000002 /* don't do it if already translated */
+/* Bits for flags in fs.defs:file_set_translator call: */
+#define FS_TRANS_FORCE 0x00000001 /* Must use translator(no sht circuit) */
+#define FS_TRANS_EXCL 0x00000002 /* Don't do it if already translated. */
-/* Values for retry field in dir_pathtrans */
+/* Values for retry field in fs.defs:dir_pathtrans call: */
enum retry_type
{
- FS_RETRY_NONE, /* no retry necessary */
- FS_RETRY_NORMAL, /* retry normally */
- FS_RETRY_REAUTH, /* retry after reauthenticating retry port */
- FS_RETRY_MAGICAL, /* retry string is magical */
+ FS_RETRY_NONE, /* No retry necessary. */
+ FS_RETRY_NORMAL, /* Retry normally. */
+ FS_RETRY_REAUTH, /* Retry after reauthenticating retry port. */
+ FS_RETRY_MAGICAL, /* Retry string is magical. */
/* "tty" means controlling tty;
- "fd%u" means file descriptor N;
+ "fd/%u" means file descriptor N;
*/
};
typedef enum retry_type retry_type;
-/* Select types for io_select */
+/* Types for msg.defs:dir_changed call: */
+enum dir_changed_type
+{
+ DIR_CHANGED_NULL, /* Always sent first for sync. */
+ DIR_CHANGED_NEW, /* Specified name has been added. */
+ DIR_CHANGED_UNLINK, /* Specified name has been removed. */
+ DIR_CHANGED_RENUMBER, /* Name has been the target of rename. */
+};
+typedef enum dir_changed_type dir_changed_type_t;
+
+/* Types for msg.defs:file_changed call: */
+enum file_changed_type
+{
+ FILE_CHANGED_NULL, /* Always sent first for sync. */
+ FILE_CHANGED_WRITE, /* File data has been written. */
+ FILE_CHANGED_EXTEND, /* File has grown. */
+ FILE_CHANGED_TRUNCATE, /* File has been truncated. */
+ FILE_CHANGED_META, /* Stat information has changed, and none
+ of the previous three apply. Not sent
+ for changes in node times. */
+};
+typedef enum file_changed_type file_changed_type_t;
+
+/* Select types for io.defs:io_select call: */
#define SELECT_READ 0x00000001
#define SELECT_WRITE 0x00000002
#define SELECT_URG 0x00000004
-/* Flags for fsys_goaway. Also, these flags are sent as the oldtrans_flags
- in file_set_translator to describe how to terminate the old translator. */
-#define FSYS_GOAWAY_NOWAIT 0x00000001 /* Return immediately */
-#define FSYS_GOAWAY_NOSYNC 0x00000002 /* Don't update physical media */
-#define FSYS_GOAWAY_FORCE 0x00000004 /* Go away despite current users */
-#define FSYS_GOAWAY_UNLINK 0x00000008 /* Go away only if non-dir */
-#define FSYS_GOAWAY_RECURSE 0x00000010 /* Shutdown children too */
+/* Flags for fsys.defs:fsys_goaway. Also, these flags are sent as the
+ oldtrans_flags in fs.defs:file_set_translator to describe how to
+ terminate the old translator. */
+#define FSYS_GOAWAY_NOWAIT 0x00000001 /* Return immediately. */
+#define FSYS_GOAWAY_NOSYNC 0x00000002 /* Don't update physical media. */
+#define FSYS_GOAWAY_FORCE 0x00000004 /* Go away despite current users. */
+#define FSYS_GOAWAY_UNLINK 0x00000008 /* Go away only if non-directory. */
+#define FSYS_GOAWAY_RECURSE 0x00000010 /* Shutdown children too. */
+
+/* Types of ports the terminal driver can run on top of;
+ used in term.defs:term_get_bottom_type. */
+enum term_bottom_type
+{
+ TERM_ON_MACHDEV,
+ TERM_ON_HURDIO,
+ TERM_ON_MASTERPTY,
+};
+
+
+/* Data types */
-/* This structure is known to be 19 ints long in hurd_types.defs */
+/* This structure is known to be 19 ints long in hurd_types.defs. */
struct fsys_statfsbuf
{
long fsys_stb_type;
@@ -160,15 +153,6 @@ struct fsys_statfsbuf
};
typedef struct fsys_statfsbuf fsys_statfsbuf_t;
-/* Possible types of version info for proc_version. */
-enum verstype
-{
- SYSNAME,
- RELEASE,
- VERSION,
- MACHINE,
-};
-
#include <mach/task_info.h>
#include <mach/thread_info.h>
@@ -191,19 +175,67 @@ struct procinfo
};
typedef int *procinfo_t;
-/* Bits in state: */
-#define PI_STOPPED 0x00000001 /* Proc server thinks is stopped */
-#define PI_EXECED 0x00000002 /* Has called proc_exec */
-#define PI_ORPHAN 0x00000008 /* Process group is orphaned */
-#define PI_NOMSG 0x00000010 /* Process has no message port */
-#define PI_SESSLD 0x00000020 /* Session leader */
-#define PI_NOTOWNED 0x0000040 /* Process has no owner */
-#define PI_NOPARENT 0x0000080 /* Hasn't identified a parent */
-#define PI_ZOMBIE 0x00000100 /* Has no associated task */
-
-/* Types of ports the terminal driver can run on top of. */
-#define TERM_ON_MACHDEV 1
-#define TERM_ON_HURDIO 2
-#define TERM_ON_MASTERPTY 3
+/* Bits in struct procinfo state: */
+#define PI_STOPPED 0x00000001 /* Proc server thinks is stopped. */
+#define PI_EXECED 0x00000002 /* Has called proc_exec. */
+#define PI_ORPHAN 0x00000008 /* Process group is orphaned. */
+#define PI_NOMSG 0x00000010 /* Process has no message port. */
+#define PI_SESSLD 0x00000020 /* Session leader. */
+#define PI_NOTOWNED 0x0000040 /* Process has no owner. */
+#define PI_NOPARENT 0x0000080 /* Hasn't identified a parent. */
+#define PI_ZOMBIE 0x00000100 /* Has no associated task. */
+
+
+/* Conventions */
+
+
+/* st_fstype in struct stat and fsys_stb_type in fsys_statfsbuf is one of: */
+#define FSTYPE_UFS 0x00000000 /* 4.x BSD Fast File System */
+#define FSTYPE_NFS 0x00000001 /* Network File System ala Sun */
+#define FSTYPE_GFS 0x00000002 /* GNU file system */
+#define FSTYPE_LFS 0x00000003 /* Logging File System ala Sprite */
+#define FSTYPE_SYSV 0x00000004 /* Old U*x filesystem ala System V */
+#define FSTYPE_FTP 0x00000005 /* Transparent FTP */
+#define FSTYPE_TAR 0x00000006 /* Transparent TAR */
+#define FSTYPE_AR 0x00000007 /* Transparent AR */
+#define FSTYPE_CPIO 0x00000008 /* Transparent CPIO */
+#define FSTYPE_MSLOSS 0x00000009 /* MS-DOS */
+#define FSTYPE_CPM 0x0000000a /* CP/M */
+#define FSTYPE_HFS 0x0000000b /* Don't ask */
+#define FSTYPE_DTFS 0x0000000c /* used by desktop to provide more info */
+#define FSTYPE_GRFS 0x0000000d /* GNU Remote File System */
+#define FSTYPE_TERM 0x0000000e /* GNU Terminal driver */
+#define FSTYPE_DEV 0x0000000f /* GNU Special file server */
+#define FSTYPE_PROC 0x00000010 /* /proc filesystem ala Version 9 */
+#define FSTYPE_IFSOCK 0x00000011 /* PF_LOCAL socket naming point */
+#define FSTYPE_AFS 0x00000012 /* Andrew File System 3.xx */
+#define FSTYPE_DFS 0x00000013 /* Distributed File Sys (OSF) == AFS 4.xx */
+#define FSTYPE_PROC9 0x00000014 /* /proc filesystem ala Plan 9 */
+#define FSTYPE_SOCKET 0x00000015 /* Naming point for socket server */
+#define FSTYPE_MISC 0x00000016 /* generic trivfs server */
+
+/* Standard port assignments for file_exec and exec_* */
+enum
+ {
+ INIT_PORT_CWDIR,
+ INIT_PORT_CRDIR,
+ INIT_PORT_AUTH,
+ INIT_PORT_PROC,
+ INIT_PORT_CTTYID,
+ /* If MACH_PORT_NULL is given for the bootstrap port,
+ the bootstrap port of the old task is used. */
+ INIT_PORT_BOOTSTRAP,
+ INIT_PORT_MAX
+ };
+
+/* Standard ints for file_exec and exec_* */
+enum
+ {
+ INIT_UMASK,
+ INIT_SIGMASK,
+ INIT_SIGIGN,
+ INIT_SIGPENDING,
+ INIT_INT_MAX,
+ };
#endif