summaryrefslogtreecommitdiff
path: root/include/servers
diff options
context:
space:
mode:
Diffstat (limited to 'include/servers')
-rw-r--r--include/servers/machid.defs550
-rw-r--r--include/servers/machid_debug.defs127
-rw-r--r--include/servers/machid_dpager.defs56
-rw-r--r--include/servers/machid_lib.h172
-rw-r--r--include/servers/machid_types.defs73
-rw-r--r--include/servers/machid_types.h110
-rw-r--r--include/servers/netname.defs63
-rw-r--r--include/servers/netname_defs.h50
8 files changed, 1201 insertions, 0 deletions
diff --git a/include/servers/machid.defs b/include/servers/machid.defs
new file mode 100644
index 0000000..185f251
--- /dev/null
+++ b/include/servers/machid.defs
@@ -0,0 +1,550 @@
+/*
+ * Mach Operating System
+ * Copyright (c) 1991,1990 Carnegie Mellon University
+ * All Rights Reserved.
+ *
+ * Permission to use, copy, modify and distribute this software and its
+ * documentation is hereby granted, provided that both the copyright
+ * notice and this permission notice appear in all copies of the
+ * software, derivative works or modified versions, and any portions
+ * thereof, and that both notices appear in supporting documentation.
+ *
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
+ * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
+ * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
+ *
+ * Carnegie Mellon requests users of this software to return to
+ *
+ * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
+ * School of Computer Science
+ * Carnegie Mellon University
+ * Pittsburgh PA 15213-3890
+ *
+ * any improvements or extensions that they make and grant Carnegie the
+ * rights to redistribute these changes.
+ */
+
+subsystem machid 9829283;
+
+userprefix machid_;
+serverprefix do_;
+
+#include <mach/std_types.defs>
+#include <mach/mach_types.defs>
+#include <servers/machid_types.defs>
+
+routine mach_type(
+ server : mach_port_t;
+ auth : mach_port_t;
+ id : mach_id_t;
+ out mtype : mach_type_t);
+
+routine mach_register(
+ server : mach_port_t;
+ auth : mach_port_t;
+ port : mach_port_t;
+ mtype : mach_type_t;
+ out id : mach_id_t);
+
+routine mach_lookup(
+ server : mach_port_t;
+ auth : mach_port_t;
+ name : mach_id_t;
+ atype : mach_type_t;
+ out aname : mach_id_t);
+
+routine mach_port(
+ server : mach_port_t;
+ auth : mach_port_t;
+ name : mach_id_t;
+ out port : mach_port_move_send_t);
+
+routine host_ports(
+ server : mach_port_t;
+ auth : mach_port_t;
+ out host : mhost_t;
+ out phost : mhost_priv_t);
+
+routine host_processor_sets(
+ server : mach_port_t;
+ auth : mach_port_t;
+ host : mhost_priv_t;
+ out sets : mprocessor_set_array_t,
+ CountInOut, Dealloc);
+
+routine host_tasks(
+ server : mach_port_t;
+ auth : mach_port_t;
+ host : mhost_priv_t;
+ out tasks : mtask_array_t,
+ CountInOut, Dealloc);
+
+routine host_threads(
+ server : mach_port_t;
+ auth : mach_port_t;
+ host : mhost_priv_t;
+ out threads : mthread_array_t,
+ CountInOut, Dealloc);
+
+routine host_processors(
+ server : mach_port_t;
+ auth : mach_port_t;
+ host : mhost_priv_t;
+ out procs : mprocessor_array_t,
+ CountInOut, Dealloc);
+
+routine processor_set_threads(
+ server : mach_port_t;
+ auth : mach_port_t;
+ pset : mprocessor_set_t;
+ out threads : mthread_array_t,
+ CountInOut, Dealloc);
+
+routine processor_set_tasks(
+ server : mach_port_t;
+ auth : mach_port_t;
+ pset : mprocessor_set_t;
+ out tasks : mtask_array_t,
+ CountInOut, Dealloc);
+
+routine task_threads(
+ server : mach_port_t;
+ auth : mach_port_t;
+ task : mtask_t;
+ out threads : mthread_array_t,
+ CountInOut, Dealloc);
+
+routine host_basic_info(
+ server : mach_port_t;
+ auth : mach_port_t;
+ host : mhost_t;
+ out info : host_basic_info_data_t);
+
+routine host_sched_info(
+ server : mach_port_t;
+ auth : mach_port_t;
+ host : mhost_t;
+ out info : host_sched_info_data_t);
+
+routine host_load_info(
+ server : mach_port_t;
+ auth : mach_port_t;
+ host : mhost_t;
+ out info : host_load_info_data_t);
+
+routine processor_set_default(
+ server : mach_port_t;
+ auth : mach_port_t;
+ host : mhost_t;
+ out pset : mprocessor_set_name_t);
+
+routine host_kernel_version(
+ server : mach_port_t;
+ auth : mach_port_t;
+ host : mhost_t;
+ out kernel_version : kernel_version_t);
+
+routine processor_basic_info(
+ server : mach_port_t;
+ auth : mach_port_t;
+ proc : mprocessor_t;
+ out host : mhost_t;
+ out info : processor_basic_info_data_t);
+
+routine processor_set_basic_info(
+ server : mach_port_t;
+ auth : mach_port_t;
+ pset : mprocessor_set_name_t;
+ out host : mhost_t;
+ out info : processor_set_basic_info_data_t);
+
+routine processor_set_sched_info(
+ server : mach_port_t;
+ auth : mach_port_t;
+ pset : mprocessor_set_name_t;
+ out host : mhost_t;
+ out info : processor_set_sched_info_data_t);
+
+routine task_unix_info(
+ server : mach_port_t;
+ auth : mach_port_t;
+ task : mtask_t;
+ out pid : unix_pid_t;
+ out comm : unix_command_t);
+
+routine task_basic_info(
+ server : mach_port_t;
+ auth : mach_port_t;
+ task : mtask_t;
+ out info : task_basic_info_data_t);
+
+routine task_thread_times_info(
+ server : mach_port_t;
+ auth : mach_port_t;
+ task : mtask_t;
+ out times : task_thread_times_info_data_t);
+
+routine thread_basic_info(
+ server : mach_port_t;
+ auth : mach_port_t;
+ thread : mthread_t;
+ out info : thread_basic_info_data_t);
+
+routine thread_sched_info(
+ server : mach_port_t;
+ auth : mach_port_t;
+ thread : mthread_t;
+ out info : thread_sched_info_data_t);
+
+#ifdef mips
+routine mips_thread_state(
+ server : mach_port_t;
+ auth : mach_port_t;
+ thread : mthread_t;
+ out state : mips_thread_state_t);
+#else
+skip;
+#endif
+
+#ifdef sun3
+routine sun3_thread_state(
+ server : mach_port_t;
+ auth : mach_port_t;
+ thread : mthread_t;
+ out state : sun3_thread_state_t);
+#else
+skip;
+#endif
+
+#ifdef vax
+routine vax_thread_state(
+ server : mach_port_t;
+ auth : mach_port_t;
+ thread : mthread_t;
+ out state : vax_thread_state_t);
+#else
+skip;
+#endif
+
+#ifdef i386
+routine i386_thread_state(
+ server : mach_port_t;
+ auth : mach_port_t;
+ thread : mthread_t;
+ out state : i386_thread_state_t);
+#else
+skip;
+#endif
+
+routine task_terminate(
+ server : mach_port_t;
+ auth : mach_port_t;
+ task : mtask_t);
+
+routine task_suspend(
+ server : mach_port_t;
+ auth : mach_port_t;
+ task : mtask_t);
+
+routine task_resume(
+ server : mach_port_t;
+ auth : mach_port_t;
+ task : mtask_t);
+
+routine thread_terminate(
+ server : mach_port_t;
+ auth : mach_port_t;
+ thread : mthread_t);
+
+routine thread_suspend(
+ server : mach_port_t;
+ auth : mach_port_t;
+ thread : mthread_t);
+
+routine thread_resume(
+ server : mach_port_t;
+ auth : mach_port_t;
+ thread : mthread_t);
+
+routine thread_abort(
+ server : mach_port_t;
+ auth : mach_port_t;
+ thread : mthread_t);
+
+skip; /* was thread_depress_abort */
+
+routine processor_set_destroy(
+ server : mach_port_t;
+ auth : mach_port_t;
+ pset : mprocessor_set_t);
+
+routine processor_start(
+ server : mach_port_t;
+ auth : mach_port_t;
+ processor : mprocessor_t);
+
+routine processor_exit(
+ server : mach_port_t;
+ auth : mach_port_t;
+ processor : mprocessor_t);
+
+routine vm_region(
+ server : mach_port_t;
+ auth : mach_port_t;
+ task : mtask_t;
+ addr : vm_offset_t;
+ out info : vm_region_t);
+
+routine vm_read(
+ server : mach_port_t;
+ auth : mach_port_t;
+ task : mtask_t;
+ addr : vm_offset_t;
+ size : vm_size_t;
+ out data : pointer_t, Dealloc);
+
+routine thread_priority(
+ server : mach_port_t;
+ auth : mach_port_t;
+ thread : mthread_t;
+ priority : int;
+ set_max : boolean_t);
+
+routine thread_max_priority(
+ server : mach_port_t;
+ auth : mach_port_t;
+ thread : mthread_t;
+ pset : mprocessor_set_t;
+ max_pri : int);
+
+routine task_priority(
+ server : mach_port_t;
+ auth : mach_port_t;
+ task : mtask_t;
+ priority : int;
+ change_threads : boolean_t);
+
+routine processor_set_max_priority(
+ server : mach_port_t;
+ auth : mach_port_t;
+ pset : mprocessor_set_t;
+ max_pri : int;
+ change_threads : boolean_t);
+
+routine port_names(
+ server : mach_port_t;
+ auth : mach_port_t;
+ task : mtask_t;
+ out names : mach_port_name_array_t,
+ CountInOut, Dealloc;
+ out types : mach_port_type_array_t,
+ CountInOut, Dealloc);
+
+routine port_type(
+ server : mach_port_t;
+ auth : mach_port_t;
+ task : mtask_t;
+ name : mach_port_name_t;
+ out ptype : mach_port_type_t);
+
+routine port_get_refs(
+ server : mach_port_t;
+ auth : mach_port_t;
+ task : mtask_t;
+ name : mach_port_name_t;
+ right : mach_port_right_t;
+ out refs : mach_port_urefs_t);
+
+routine port_get_receive_status(
+ server : mach_port_t;
+ auth : mach_port_t;
+ task : mtask_t;
+ name : mach_port_name_t;
+ out status : mach_port_status_t);
+
+routine port_get_set_status(
+ server : mach_port_t;
+ auth : mach_port_t;
+ task : mtask_t;
+ name : mach_port_name_t;
+ out members : mach_port_name_array_t,
+ CountInOut, Dealloc);
+
+routine processor_get_assignment(
+ server : mach_port_t;
+ auth : mach_port_t;
+ proc : mprocessor_t;
+ out pset : mprocessor_set_name_t);
+
+routine thread_get_assignment(
+ server : mach_port_t;
+ auth : mach_port_t;
+ thread : mthread_t;
+ out pset : mprocessor_set_name_t);
+
+routine task_get_assignment(
+ server : mach_port_t;
+ auth : mach_port_t;
+ task : mtask_t;
+ out pset : mprocessor_set_name_t);
+
+routine host_processor_set_priv(
+ server : mach_port_t;
+ auth : mach_port_t;
+ host : mhost_priv_t;
+ psetn : mprocessor_set_name_t;
+ out pset : mprocessor_set_t);
+
+routine host_processor_set_names(
+ server : mach_port_t;
+ auth : mach_port_t;
+ host : mhost_t;
+ out sets : mprocessor_set_name_array_t,
+ CountInOut, Dealloc);
+
+routine processor_set_create(
+ server : mach_port_t;
+ auth : mach_port_t;
+ host : mhost_t;
+ out pset : mprocessor_set_t;
+ out psetn : mprocessor_set_name_t);
+
+routine task_create(
+ server : mach_port_t;
+ auth : mach_port_t;
+ parent : mtask_t;
+ inherit : boolean_t;
+ out task : mtask_t);
+
+routine thread_create(
+ server : mach_port_t;
+ auth : mach_port_t;
+ task : mtask_t;
+ out thread : mthread_t);
+
+routine processor_assign(
+ server : mach_port_t;
+ auth : mach_port_t;
+ processor : mprocessor_t;
+ pset : mprocessor_set_t;
+ wait : boolean_t);
+
+routine thread_assign(
+ server : mach_port_t;
+ auth : mach_port_t;
+ thread : mthread_t;
+ pset : mprocessor_set_t);
+
+routine thread_assign_default(
+ server : mach_port_t;
+ auth : mach_port_t;
+ thread : mthread_t);
+
+routine task_assign(
+ server : mach_port_t;
+ auth : mach_port_t;
+ task : mtask_t;
+ pset : mprocessor_set_t;
+ assign_threads : boolean_t);
+
+routine task_assign_default(
+ server : mach_port_t;
+ auth : mach_port_t;
+ task : mtask_t;
+ assign_threads : boolean_t);
+
+routine thread_policy(
+ server : mach_port_t;
+ auth : mach_port_t;
+ thread : mthread_t;
+ policy : int;
+ data : int);
+
+routine processor_set_policy_enable(
+ server : mach_port_t;
+ auth : mach_port_t;
+ processor_set : mprocessor_set_t;
+ policy : int);
+
+routine processor_set_policy_disable(
+ server : mach_port_t;
+ auth : mach_port_t;
+ processor_set : mprocessor_set_t;
+ policy : int;
+ change_threads : boolean_t);
+
+routine host_default_pager(
+ server : mach_port_t;
+ auth : mach_port_t;
+ host : mhost_priv_t;
+ out default_pager : mdefault_pager_t);
+
+skip; /* was default_pager_info */
+
+routine vm_statistics(
+ server : mach_port_t;
+ auth : mach_port_t;
+ task : mtask_t;
+ out data : vm_statistics_data_t);
+
+routine host_kernel_task(
+ server : mach_port_t;
+ auth : mach_port_t;
+ host : mhost_priv_t;
+ out kernel_task : mtask_t);
+
+routine task_host(
+ server : mach_port_t;
+ auth : mach_port_t;
+ task : mtask_t;
+ out host : mhost_t);
+
+routine thread_host(
+ server : mach_port_t;
+ auth : mach_port_t;
+ thread : mthread_t;
+ out host : mhost_t);
+
+routine processor_host(
+ server : mach_port_t;
+ auth : mach_port_t;
+ proc : mprocessor_t;
+ out host : mhost_t);
+
+
+#ifdef sun4
+routine sparc_thread_state(
+ server : mach_port_t;
+ auth : mach_port_t;
+ thread : mthread_t;
+ out state : sparc_thread_state_t);
+#else sun4
+skip;
+#endif sun4
+
+#ifdef alpha
+routine alpha_thread_state(
+ server : mach_port_t;
+ auth : mach_port_t;
+ thread : mthread_t;
+ out state : alpha_thread_state_t);
+#else
+skip;
+#endif
+
+#ifdef parisc
+routine parisc_thread_state(
+ server : mach_port_t;
+ auth : mach_port_t;
+ thread : mthread_t;
+ out state : parisc_thread_state_t);
+#else
+skip;
+#endif
+
+routine task_set_unix_info(
+ server : mach_port_t;
+ auth : mach_port_t;
+ task : mtask_t;
+ pid : unix_pid_t;
+ comm : unix_command_t);
diff --git a/include/servers/machid_debug.defs b/include/servers/machid_debug.defs
new file mode 100644
index 0000000..63bae71
--- /dev/null
+++ b/include/servers/machid_debug.defs
@@ -0,0 +1,127 @@
+/*
+ * Mach Operating System
+ * Copyright (c) 1991,1990 Carnegie Mellon University
+ * All Rights Reserved.
+ *
+ * Permission to use, copy, modify and distribute this software and its
+ * documentation is hereby granted, provided that both the copyright
+ * notice and this permission notice appear in all copies of the
+ * software, derivative works or modified versions, and any portions
+ * thereof, and that both notices appear in supporting documentation.
+ *
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
+ * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
+ * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
+ *
+ * Carnegie Mellon requests users of this software to return to
+ *
+ * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
+ * School of Computer Science
+ * Carnegie Mellon University
+ * Pittsburgh PA 15213-3890
+ *
+ * any improvements or extensions that they make and grant Carnegie the
+ * rights to redistribute these changes.
+ */
+
+subsystem machid_debug 2398925;
+
+userprefix machid_;
+serverprefix do_;
+
+#include <mach/std_types.defs>
+#include <mach/mach_types.defs>
+#include <mach_debug/mach_debug_types.defs>
+#include <servers/machid_types.defs>
+
+routine port_get_srights(
+ server : mach_port_t;
+ auth : mach_port_t;
+ task : mtask_t;
+ name : mach_port_name_t;
+ out srights : mach_port_rights_t);
+
+routine port_space_info(
+ server : mach_port_t;
+ auth : mach_port_t;
+ task : mtask_t;
+ out info : ipc_info_space_t;
+ out table_info : ipc_info_name_array_t,
+ CountInOut, Dealloc;
+ out tree_info : ipc_info_tree_name_array_t,
+ CountInOut, Dealloc);
+
+routine port_dnrequest_info(
+ server : mach_port_t;
+ auth : mach_port_t;
+ task : mtask_t;
+ name : mach_port_name_t;
+ out total : unsigned;
+ out used : unsigned);
+
+skip; /* vm_region_info */
+
+routine host_stack_usage(
+ server : mach_port_t;
+ auth : mach_port_t;
+ host : mhost_t;
+ out reserved : vm_size_t;
+ out total : unsigned;
+ out space : vm_size_t;
+ out resident : vm_size_t;
+ out maxusage : vm_size_t;
+ out maxstack : vm_offset_t);
+
+routine processor_set_stack_usage(
+ server : mach_port_t;
+ auth : mach_port_t;
+ pset : mprocessor_set_t;
+ out total : unsigned;
+ out space : vm_size_t;
+ out resident : vm_size_t;
+ out maxusage : vm_size_t;
+ out maxstack : vm_offset_t);
+
+routine host_zone_info(
+ server : mach_port_t;
+ auth : mach_port_t;
+ host : mhost_t;
+ out names : zone_name_array_t,
+ CountInOut, Dealloc;
+ out info : zone_info_array_t,
+ CountInOut, Dealloc);
+
+routine port_kernel_object(
+ server : mach_port_t;
+ auth : mach_port_t;
+ task : mtask_t;
+ name : mach_port_name_t;
+ out object_type : unsigned;
+ out object_addr : vm_offset_t);
+
+routine mach_kernel_object(
+ server : mach_port_t;
+ auth : mach_port_t;
+ id : mach_id_t;
+ out object_type : mach_type_t;
+ out object_addr : vm_offset_t);
+
+routine vm_region_info(
+ server : mach_port_t;
+ auth : mach_port_t;
+ task : mtask_t;
+ addr : vm_offset_t;
+ out region : vm_region_info_t);
+
+routine vm_object_info(
+ server : mach_port_t;
+ auth : mach_port_t;
+ object : mobject_name_t;
+ out info : vm_object_info_t);
+
+routine vm_object_pages(
+ server : mach_port_t;
+ auth : mach_port_t;
+ object : mobject_name_t;
+ out pages : vm_page_info_array_t,
+ CountInOut, Dealloc);
diff --git a/include/servers/machid_dpager.defs b/include/servers/machid_dpager.defs
new file mode 100644
index 0000000..00fa09c
--- /dev/null
+++ b/include/servers/machid_dpager.defs
@@ -0,0 +1,56 @@
+/*
+ * Mach Operating System
+ * Copyright (c) 1991,1990 Carnegie Mellon University
+ * All Rights Reserved.
+ *
+ * Permission to use, copy, modify and distribute this software and its
+ * documentation is hereby granted, provided that both the copyright
+ * notice and this permission notice appear in all copies of the
+ * software, derivative works or modified versions, and any portions
+ * thereof, and that both notices appear in supporting documentation.
+ *
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
+ * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
+ * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
+ *
+ * Carnegie Mellon requests users of this software to return to
+ *
+ * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
+ * School of Computer Science
+ * Carnegie Mellon University
+ * Pittsburgh PA 15213-3890
+ *
+ * any improvements or extensions that they make and grant Carnegie the
+ * rights to redistribute these changes.
+ */
+
+subsystem machid_dpager 6357721;
+
+userprefix machid_;
+serverprefix do_;
+
+#include <mach/std_types.defs>
+#include <mach/mach_types.defs>
+#include <mach/default_pager_types.defs>
+#include <servers/machid_types.defs>
+
+routine default_pager_info(
+ server : mach_port_t;
+ auth : mach_port_t;
+ default_pager : mdefault_pager_t;
+ out info : default_pager_info_t);
+
+routine default_pager_objects(
+ server : mach_port_t;
+ auth : mach_port_t;
+ default_pager : mdefault_pager_t;
+ out objects : default_pager_object_array_t,
+ CountInOut, Dealloc);
+
+routine default_pager_object_pages(
+ server : mach_port_t;
+ auth : mach_port_t;
+ default_pager : mdefault_pager_t;
+ object : mobject_name_t;
+ out pages : default_pager_page_array_t,
+ CountInOut, Dealloc);
diff --git a/include/servers/machid_lib.h b/include/servers/machid_lib.h
new file mode 100644
index 0000000..035195f
--- /dev/null
+++ b/include/servers/machid_lib.h
@@ -0,0 +1,172 @@
+/*
+ * Mach Operating System
+ * Copyright (c) 1992 Carnegie Mellon University
+ * All Rights Reserved.
+ *
+ * Permission to use, copy, modify and distribute this software and its
+ * documentation is hereby granted, provided that both the copyright
+ * notice and this permission notice appear in all copies of the
+ * software, derivative works or modified versions, and any portions
+ * thereof, and that both notices appear in supporting documentation.
+ *
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
+ * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
+ * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
+ *
+ * Carnegie Mellon requests users of this software to return to
+ *
+ * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
+ * School of Computer Science
+ * Carnegie Mellon University
+ * Pittsburgh PA 15213-3890
+ *
+ * any improvements or extensions that they make and grant Carnegie Mellon
+ * the rights to redistribute these changes.
+ */
+
+#ifndef _MACHID_LIB_H_
+#define _MACHID_LIB_H_
+
+#include <mach/machine/vm_types.h>
+#include <mach/default_pager_types.h>
+#include <mach_debug/vm_info.h>
+#include <servers/machid_types.h>
+
+/* values for mach_type_t */
+
+#define MACH_TYPE_NONE 0
+#define MACH_TYPE_TASK 1
+#define MACH_TYPE_THREAD 2
+#define MACH_TYPE_PROCESSOR_SET 3
+#define MACH_TYPE_PROCESSOR_SET_NAME 4
+#define MACH_TYPE_PROCESSOR 5
+#define MACH_TYPE_HOST 6
+#define MACH_TYPE_HOST_PRIV 7
+#define MACH_TYPE_OBJECT 8
+#define MACH_TYPE_OBJECT_CONTROL 9
+#define MACH_TYPE_OBJECT_NAME 10
+#define MACH_TYPE_MASTER_DEVICE 11
+#define MACH_TYPE_DEFAULT_PAGER 12
+
+/* convert a mach_type_t to a string */
+
+extern char *mach_type_string(/* mach_type_t */);
+
+/* at the moment, mach/kern_return.h doesn't define these,
+ but maybe it will define some of them someday */
+
+#ifndef KERN_INVALID_THREAD
+#define KERN_INVALID_THREAD KERN_INVALID_ARGUMENT
+#endif /* KERN_INVALID_THREAD */
+
+#ifndef KERN_INVALID_PROCESSOR_SET
+#define KERN_INVALID_PROCESSOR_SET KERN_INVALID_ARGUMENT
+#endif /* KERN_INVALID_PROCESSOR_SET */
+
+#ifndef KERN_INVALID_PROCESSOR_SET_NAME
+#define KERN_INVALID_PROCESSOR_SET_NAME KERN_INVALID_ARGUMENT
+#endif /* KERN_INVALID_PROCESSOR_SET_NAME */
+
+#ifndef KERN_INVALID_HOST_PRIV
+#define KERN_INVALID_HOST_PRIV KERN_INVALID_HOST
+#endif /* KERN_INVALID_HOST_PRIV */
+
+#ifndef KERN_INVALID_PROCESSOR
+#define KERN_INVALID_PROCESSOR KERN_INVALID_ARGUMENT
+#endif /* KERN_INVALID_PROCESSOR */
+
+#ifndef KERN_INVALID_DEFAULT_PAGER
+#define KERN_INVALID_DEFAULT_PAGER KERN_INVALID_ARGUMENT
+#endif /* KERN_INVALID_DEFAULT_PAGER */
+
+#ifndef KERN_INVALID_MEMORY_OBJECT
+#define KERN_INVALID_MEMORY_OBJECT KERN_INVALID_ARGUMENT
+#endif /* KERN_INVALID_MEMORY_OBJECT */
+
+/*
+ * Some machid library functions access the machid server
+ * using these two ports.
+ */
+
+extern mach_port_t machid_server_port; /* machid server */
+extern mach_port_t machid_auth_port; /* machid authentication port */
+
+/*
+ * The kernel and default pager provide several functions
+ * for accessing the internal VM data structures.
+ * The machid server provides access to these functions.
+ * However, they are inconvenient to use directly.
+ * These library functions present this capability
+ * in an easier-to-use form.
+ */
+
+typedef struct object {
+ struct object *o_link; /* hash table link */
+
+ vm_object_info_t o_info; /* object name and attributes */
+ /* vpi_offset fields are biased by voi_paging_offset */
+ vm_page_info_t *o_pages; /* object pages */
+ unsigned int o_num_pages; /* number of pages */
+ vm_page_info_t *o_hint; /* hint pointer into o_pages */
+ mdefault_pager_t o_dpager; /* default pager for the object */
+ default_pager_object_t o_dpager_info; /* default pager info */
+ struct object *o_shadow; /* pointer to shadow object */
+
+ unsigned int o_flag;
+} object_t;
+
+/* get object chain, optionally getting default-pager and resident-page info */
+
+extern object_t *get_object(/* mobject_name_t object,
+ boolean_t dpager, pages */);
+
+/* convert object to privileged host */
+
+extern mhost_priv_t get_object_host(/* mobject_name_t object */);
+
+/* convert privileged host to default pager */
+
+extern mdefault_pager_t get_host_dpager(/* mhost_priv_t host */);
+
+/* convert object to default pager */
+
+extern mdefault_pager_t get_object_dpager(/* mobject_name_t object */);
+
+/* get object/size info from the default pager */
+
+extern void get_dpager_objects(/* mdefault_pager_t dpager,
+ default_pager_object_t **objectsp,
+ unsigned int *numobjectsp */);
+
+/* find a particular object in array from get_dpager_objects */
+
+extern default_pager_object_t *
+find_dpager_object(/* mobject_name_t object,
+ default_pager_object_t *objects,
+ unsigned int count */);
+
+/* the object offset is already biased by voi_paging_offset */
+
+extern vm_page_info_t *
+lookup_page_object_prim(/* object_t *object, vm_offset_t offset */);
+
+/* the object offset is already biased by voi_paging_offset */
+
+extern void
+lookup_page_object(/* object_t *chain, vm_offset_t offset,
+ object_t **objectp, vm_page_info_t **infop */);
+
+/* the object offset is not biased; follows shadow pointers */
+
+extern void
+lookup_page_chain(/* object_t *chain, vm_offset_t offset,
+ object_t **objectp, vm_page_info_t **infop */);
+
+/* returns range (inclusive/exclusive) for pages in the object,
+ biased by voi_paging_offset */
+
+extern void
+get_object_bounds(/* object_t *object,
+ vm_offset_t *startp, vm_offset_t *endp */);
+
+#endif /* _MACHID_LIB_H_ */
diff --git a/include/servers/machid_types.defs b/include/servers/machid_types.defs
new file mode 100644
index 0000000..b744ffc
--- /dev/null
+++ b/include/servers/machid_types.defs
@@ -0,0 +1,73 @@
+/*
+ * Mach Operating System
+ * Copyright (c) 1991,1990 Carnegie Mellon University
+ * All Rights Reserved.
+ *
+ * Permission to use, copy, modify and distribute this software and its
+ * documentation is hereby granted, provided that both the copyright
+ * notice and this permission notice appear in all copies of the
+ * software, derivative works or modified versions, and any portions
+ * thereof, and that both notices appear in supporting documentation.
+ *
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
+ * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
+ * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
+ *
+ * Carnegie Mellon requests users of this software to return to
+ *
+ * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
+ * School of Computer Science
+ * Carnegie Mellon University
+ * Pittsburgh PA 15213-3890
+ *
+ * any improvements or extensions that they make and grant Carnegie the
+ * rights to redistribute these changes.
+ */
+
+#ifndef _MACHID_TYPES_DEFS_
+#define _MACHID_TYPES_DEFS_
+
+#include <mach/mach_types.defs>
+
+type mach_id_t = unsigned;
+type mach_type_t = unsigned;
+
+type mhost_t = mach_id_t;
+type mhost_priv_t = mach_id_t;
+
+type mdefault_pager_t = mach_id_t;
+
+type mprocessor_t = mach_id_t;
+type mprocessor_array_t = array[] of mprocessor_t;
+
+type mprocessor_set_t = mach_id_t;
+type mprocessor_set_array_t = array[] of mprocessor_set_t;
+type mprocessor_set_name_t = mach_id_t;
+type mprocessor_set_name_array_t = array[] of mprocessor_set_name_t;
+
+type mtask_t = mach_id_t;
+type mtask_array_t = array[] of mtask_t;
+
+type mthread_t = mach_id_t;
+type mthread_array_t = array[] of mthread_t;
+
+type mobject_t = mach_id_t;
+type mobject_control_t = mach_id_t;
+type mobject_name_t = mach_id_t;
+
+type mips_thread_state_t = struct[34] of unsigned;
+type sun3_thread_state_t = struct[47] of unsigned;
+type sparc_thread_state_t = struct[73] of unsigned;
+type vax_thread_state_t = struct[17] of unsigned;
+type i386_thread_state_t = struct[17] of unsigned;
+type alpha_thread_state_t = struct[32] of natural_t;
+type parisc_thread_state_t = struct[128] of natural_t;
+
+type vm_region_t = struct[8] of natural_t;
+
+type unix_pid_t = int;
+type unix_command_t = array[*:1024] of char;
+
+import <servers/machid_types.h>;
+
+#endif _MACHID_TYPES_DEFS_
diff --git a/include/servers/machid_types.h b/include/servers/machid_types.h
new file mode 100644
index 0000000..e118754
--- /dev/null
+++ b/include/servers/machid_types.h
@@ -0,0 +1,110 @@
+/*
+ * Mach Operating System
+ * Copyright (c) 1991,1990 Carnegie Mellon University
+ * All Rights Reserved.
+ *
+ * Permission to use, copy, modify and distribute this software and its
+ * documentation is hereby granted, provided that both the copyright
+ * notice and this permission notice appear in all copies of the
+ * software, derivative works or modified versions, and any portions
+ * thereof, and that both notices appear in supporting documentation.
+ *
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
+ * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
+ * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
+ *
+ * Carnegie Mellon requests users of this software to return to
+ *
+ * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
+ * School of Computer Science
+ * Carnegie Mellon University
+ * Pittsburgh PA 15213-3890
+ *
+ * any improvements or extensions that they make and grant Carnegie the
+ * rights to redistribute these changes.
+ */
+
+#ifndef _MACHID_TYPES_H_
+#define _MACHID_TYPES_H_
+
+#include <mach/boolean.h>
+#include <mach/kern_return.h>
+#include <mach/port.h>
+#include <mach/task_info.h>
+#include <mach/machine/vm_types.h>
+#include <mach/vm_prot.h>
+#include <mach/vm_inherit.h>
+
+/* define types for machid_types.defs */
+
+typedef unsigned int mach_id_t;
+typedef unsigned int mach_type_t;
+
+typedef mach_id_t mhost_t;
+typedef mach_id_t mhost_priv_t;
+
+typedef mach_id_t mdefault_pager_t;
+
+typedef mach_id_t mprocessor_t;
+typedef mprocessor_t *mprocessor_array_t;
+
+typedef mach_id_t mprocessor_set_t;
+typedef mprocessor_set_t *mprocessor_set_array_t;
+typedef mach_id_t mprocessor_set_name_t;
+typedef mprocessor_set_name_t *mprocessor_set_name_array_t;
+
+typedef mach_id_t mtask_t;
+typedef mtask_t *mtask_array_t;
+
+typedef mach_id_t mthread_t;
+typedef mthread_t *mthread_array_t;
+
+typedef mach_id_t mobject_t;
+typedef mach_id_t mobject_control_t;
+typedef mach_id_t mobject_name_t;
+
+typedef struct vm_region {
+ vm_offset_t vr_address;
+ vm_size_t vr_size;
+/*vm_prot_t*/integer_t vr_prot;
+/*vm_prot_t*/integer_t vr_max_prot;
+/*vm_inherit_t*/integer_t vr_inherit;
+/*boolean_t*/integer_t vr_shared;
+/*mobject_name_t*/integer_t vr_name;
+ vm_offset_t vr_offset;
+} vm_region_t;
+
+#include <mach/machine/thread_status.h>
+
+#ifdef mips
+typedef struct mips_thread_state mips_thread_state_t;
+#endif /* mips */
+
+#ifdef sun3
+typedef struct sun_thread_state sun3_thread_state_t;
+#endif /* sun3 */
+
+#ifdef sun4
+typedef struct sparc_thread_state sparc_thread_state_t;
+#endif /* sun4 */
+
+#ifdef vax
+typedef struct vax_thread_state vax_thread_state_t;
+#endif /* vax */
+
+#ifdef i386
+typedef struct i386_thread_state i386_thread_state_t;
+#endif /* i386 */
+
+#ifdef alpha
+typedef struct alpha_thread_state alpha_thread_state_t;
+#endif /* alpha */
+
+#ifdef parisc
+typedef struct parisc_thread_state parisc_thread_state_t;
+#endif /* parisc */
+
+typedef int unix_pid_t;
+typedef char *unix_command_t;
+
+#endif /* _MACHID_TYPES_H_ */
diff --git a/include/servers/netname.defs b/include/servers/netname.defs
new file mode 100644
index 0000000..2f7c2c8
--- /dev/null
+++ b/include/servers/netname.defs
@@ -0,0 +1,63 @@
+/*
+ * Mach Operating System
+ * Copyright (c) 1991,1990,1989 Carnegie Mellon University
+ * All Rights Reserved.
+ *
+ * Permission to use, copy, modify and distribute this software and its
+ * documentation is hereby granted, provided that both the copyright
+ * notice and this permission notice appear in all copies of the
+ * software, derivative works or modified versions, and any portions
+ * thereof, and that both notices appear in supporting documentation.
+ *
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
+ * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
+ * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
+ *
+ * Carnegie Mellon requests users of this software to return to
+ *
+ * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
+ * School of Computer Science
+ * Carnegie Mellon University
+ * Pittsburgh PA 15213-3890
+ *
+ * any improvements or extensions that they make and grant Carnegie the
+ * rights to redistribute these changes.
+ */
+/*
+ * File: netname.defs
+ * Author: Dan Julin, Carnegie Mellon University
+ * Date: May 1989
+ *
+ * Mig definitions for Network Name Service.
+ */
+
+subsystem netname 1040;
+
+serverprefix do_;
+
+#include <mach/std_types.defs>
+
+type netname_name_t = (MACH_MSG_TYPE_STRING,8*80);
+
+import <servers/netname_defs.h>;
+
+routine netname_check_in(
+ server_port : mach_port_t;
+ port_name : netname_name_t;
+ signature : mach_port_copy_send_t;
+ port_id : mach_port_make_send_t);
+
+routine netname_look_up(
+ server_port : mach_port_t;
+ host_name : netname_name_t;
+ port_name : netname_name_t;
+ out port_id : mach_port_move_send_t);
+
+routine netname_check_out(
+ server_port : mach_port_t;
+ port_name : netname_name_t;
+ signature : mach_port_copy_send_t);
+
+routine netname_version(
+ server_port : mach_port_t;
+ out version : netname_name_t);
diff --git a/include/servers/netname_defs.h b/include/servers/netname_defs.h
new file mode 100644
index 0000000..a065f3a
--- /dev/null
+++ b/include/servers/netname_defs.h
@@ -0,0 +1,50 @@
+/*
+ * Mach Operating System
+ * Copyright (c) 1991,1990,1989 Carnegie Mellon University
+ * All Rights Reserved.
+ *
+ * Permission to use, copy, modify and distribute this software and its
+ * documentation is hereby granted, provided that both the copyright
+ * notice and this permission notice appear in all copies of the
+ * software, derivative works or modified versions, and any portions
+ * thereof, and that both notices appear in supporting documentation.
+ *
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
+ * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
+ * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
+ *
+ * Carnegie Mellon requests users of this software to return to
+ *
+ * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
+ * School of Computer Science
+ * Carnegie Mellon University
+ * Pittsburgh PA 15213-3890
+ *
+ * any improvements or extensions that they make and grant Carnegie the
+ * rights to redistribute these changes.
+ */
+
+/*
+ * File: netname_defs.h
+ * Author: Dan Julin, Carnegie Mellon University
+ * Date: Dec. 1986
+ *
+ * Definitions for the mig interface to the network name service.
+ */
+
+#ifndef _NETNAME_DEFS_
+#define _NETNAME_DEFS_
+
+#define NETNAME_SUCCESS (0)
+#define NETNAME_PENDING (-1)
+#define NETNAME_NOT_YOURS (1000)
+#define NAME_NOT_YOURS (1000)
+#define NETNAME_NOT_CHECKED_IN (1001)
+#define NAME_NOT_CHECKED_IN (1001)
+#define NETNAME_NO_SUCH_HOST (1002)
+#define NETNAME_HOST_NOT_FOUND (1003)
+#define NETNAME_INVALID_PORT (1004)
+
+typedef char netname_name_t[80];
+
+#endif /* _NETNAME_DEFS_ */