summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--boot-proxy-exc/bootstrapServer.c154
-rw-r--r--boot-proxy-exc/device_replyUser.c374
-rw-r--r--boot-proxy-exc/excServer.c205
-rw-r--r--boot-proxy-exc/ioServer.c1873
-rw-r--r--boot-proxy-exc/io_replyUser.c1600
-rw-r--r--boot-proxy-exc/notifyServer.c353
-rw-r--r--boot-proxy-exc/ourdeviceServer.c1179
-rw-r--r--boot-proxy-exc/ourmachServer.c4186
-rw-r--r--boot-proxy-exc/ourmach_hostServer.c2596
-rw-r--r--boot-proxy-exc/ourmach_portServer.c1413
-rw-r--r--boot-proxy-exc/termServer.c701
-rw-r--r--boot.backup1/bootstrapServer.c154
-rw-r--r--boot.backup1/device_replyUser.c374
-rw-r--r--boot.backup1/excServer.c205
-rw-r--r--boot.backup1/ioServer.c1873
-rw-r--r--boot.backup1/io_replyUser.c1600
-rw-r--r--boot.backup1/notifyServer.c353
-rw-r--r--boot.backup1/ourdeviceServer.c1179
-rw-r--r--boot.backup1/ourmachServer.c4197
-rw-r--r--boot.backup1/ourmach_hostServer.c2596
-rw-r--r--boot.backup1/ourmach_portServer.c1413
-rw-r--r--boot.backup1/termServer.c701
-rw-r--r--eth-filter.multi-thread/device_replyUser.c374
-rw-r--r--eth-filter.multi-thread/notifyServer.c353
-rw-r--r--eth-filter.multi-thread/ourdeviceServer.c1179
-rw-r--r--pfinet.old/iioctlServer.c1672
-rw-r--r--pfinet.old/ioServer.c2021
-rw-r--r--pfinet.old/pfinetServer.c189
-rw-r--r--pfinet.old/socketServer.c1533
-rw-r--r--pfinet.old/startup_notifyServer.c129
30 files changed, 0 insertions, 36729 deletions
diff --git a/boot-proxy-exc/bootstrapServer.c b/boot-proxy-exc/bootstrapServer.c
deleted file mode 100644
index 2aa817be..00000000
--- a/boot-proxy-exc/bootstrapServer.c
+++ /dev/null
@@ -1,154 +0,0 @@
-/* Module bootstrap */
-
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE 1
-#endif
-
-#define EXPORT_BOOLEAN
-#include <mach/boolean.h>
-#include <mach/kern_return.h>
-#include <mach/message.h>
-#include <mach/mig_errors.h>
-#include <mach/mig_support.h>
-
-#ifndef mig_internal
-#define mig_internal static
-#endif
-
-#ifndef mig_external
-#define mig_external
-#endif
-
-#ifndef TypeCheck
-#define TypeCheck 1
-#endif
-
-#ifndef UseExternRCSId
-#define UseExternRCSId 1
-#endif
-
-#define BAD_TYPECHECK(type, check) ({\
- union { mach_msg_type_t t; unsigned32_t w; } _t, _c;\
- _t.t = *(type); _c.t = *(check); _t.w != _c.w; })
-#define msgh_request_port msgh_local_port
-#define MACH_MSGH_BITS_REQUEST(bits) MACH_MSGH_BITS_LOCAL(bits)
-#define msgh_reply_port msgh_remote_port
-#define MACH_MSGH_BITS_REPLY(bits) MACH_MSGH_BITS_REMOTE(bits)
-
-#include <mach/std_types.h>
-
-/* Routine bootstrap_privileged_ports */
-mig_internal void _Xbootstrap_privileged_ports
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t priv_hostType;
- mach_port_t priv_host;
- mach_msg_type_t priv_deviceType;
- mach_port_t priv_device;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t do_bootstrap_privileged_ports
- (mach_port_t bootstrap, mach_port_t *priv_host, mach_port_t *priv_device);
-
- auto const mach_msg_type_t priv_hostType = {
- /* msgt_name = */ 19,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t priv_deviceType = {
- /* msgt_name = */ 19,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = do_bootstrap_privileged_ports(In0P->Head.msgh_request_port, &OutP->priv_host, &OutP->priv_device);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
- OutP->Head.msgh_size = 48;
-
- OutP->priv_hostType = priv_hostType;
-
- OutP->priv_deviceType = priv_deviceType;
-}
-
-static mig_routine_t bootstrap_server_routines[] = {
- 0,
- _Xbootstrap_privileged_ports,
-};
-
-mig_external boolean_t bootstrap_server
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- register mach_msg_header_t *InP = InHeadP;
- register mig_reply_header_t *OutP = (mig_reply_header_t *) OutHeadP;
-
- auto const mach_msg_type_t RetCodeType = {
- /* msgt_name = */ MACH_MSG_TYPE_INTEGER_32,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- register mig_routine_t routine;
-
- OutP->Head.msgh_bits = MACH_MSGH_BITS(MACH_MSGH_BITS_REPLY(InP->msgh_bits), 0);
- OutP->Head.msgh_size = sizeof *OutP;
- OutP->Head.msgh_remote_port = InP->msgh_reply_port;
- OutP->Head.msgh_local_port = MACH_PORT_NULL;
- OutP->Head.msgh_seqno = 0;
- OutP->Head.msgh_id = InP->msgh_id + 100;
-
- OutP->RetCodeType = RetCodeType;
-
- if ((InP->msgh_id > 1000000) || (InP->msgh_id < 999999) ||
- ((routine = bootstrap_server_routines[InP->msgh_id - 999999]) == 0)) {
- OutP->RetCode = MIG_BAD_ID;
- return FALSE;
- }
- (*routine) (InP, &OutP->Head);
- return TRUE;
-}
-
-mig_external mig_routine_t bootstrap_server_routine
- (const mach_msg_header_t *InHeadP)
-{
- register int msgh_id;
-
- msgh_id = InHeadP->msgh_id - 999999;
-
- if ((msgh_id > 1) || (msgh_id < 0))
- return 0;
-
- return bootstrap_server_routines[msgh_id];
-}
-
diff --git a/boot-proxy-exc/device_replyUser.c b/boot-proxy-exc/device_replyUser.c
deleted file mode 100644
index 5735b1be..00000000
--- a/boot-proxy-exc/device_replyUser.c
+++ /dev/null
@@ -1,374 +0,0 @@
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE 1
-#endif
-
-#include "device_reply_U.h"
-#define EXPORT_BOOLEAN
-#include <mach/boolean.h>
-#include <mach/kern_return.h>
-#include <mach/message.h>
-#include <mach/notify.h>
-#include <mach/mach_types.h>
-#include <mach/mig_errors.h>
-#include <mach/mig_support.h>
-#include <mach/msg_type.h>
-/* LINTLIBRARY */
-
-#ifndef mig_internal
-#define mig_internal static
-#endif
-
-#ifndef mig_external
-#define mig_external
-#endif
-
-#ifndef TypeCheck
-#define TypeCheck 1
-#endif
-
-#ifndef UseExternRCSId
-#define UseExternRCSId 1
-#endif
-
-#define BAD_TYPECHECK(type, check) ({\
- union { mach_msg_type_t t; unsigned32_t w; } _t, _c;\
- _t.t = *(type); _c.t = *(check); _t.w != _c.w; })
-#define msgh_request_port msgh_remote_port
-#define msgh_reply_port msgh_local_port
-
-#include <mach/std_types.h>
-#include <device/device_types.h>
-#include <device/net_status.h>
-
-/* SimpleRoutine device_open_reply */
-mig_external kern_return_t ds_device_open_reply
-(
- mach_port_t reply_port,
- mach_msg_type_name_t reply_portPoly,
- kern_return_t return_code,
- mach_port_t device_port
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- mach_msg_type_t device_portType;
- mach_port_t device_port;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t device_portType = {
- /* msgt_name = */ 20,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->device_portType = device_portType;
-
- InP->device_port = device_port;
-
- InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX|
- MACH_MSGH_BITS(reply_portPoly, 0);
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply_port;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 2900;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 40, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine device_write_reply */
-mig_external kern_return_t ds_device_write_reply
-(
- mach_port_t reply_port,
- mach_msg_type_name_t reply_portPoly,
- kern_return_t return_code,
- int bytes_written
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- mach_msg_type_t bytes_writtenType;
- int bytes_written;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t bytes_writtenType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->bytes_writtenType = bytes_writtenType;
-
- InP->bytes_written = bytes_written;
-
- InP->Head.msgh_bits =
- MACH_MSGH_BITS(reply_portPoly, 0);
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply_port;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 2902;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 40, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine device_write_reply_inband */
-mig_external kern_return_t ds_device_write_reply_inband
-(
- mach_port_t reply_port,
- mach_msg_type_name_t reply_portPoly,
- kern_return_t return_code,
- int bytes_written
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- mach_msg_type_t bytes_writtenType;
- int bytes_written;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t bytes_writtenType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->bytes_writtenType = bytes_writtenType;
-
- InP->bytes_written = bytes_written;
-
- InP->Head.msgh_bits =
- MACH_MSGH_BITS(reply_portPoly, 0);
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply_port;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 2903;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 40, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine device_read_reply */
-mig_external kern_return_t ds_device_read_reply
-(
- mach_port_t reply_port,
- mach_msg_type_name_t reply_portPoly,
- kern_return_t return_code,
- io_buf_ptr_t data,
- mach_msg_type_number_t dataCnt
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- mach_msg_type_long_t dataType;
- io_buf_ptr_t data;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_long_t dataType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ FALSE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ TRUE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 9,
- /* msgtl_size = */ 8,
- /* msgtl_number = */ 0,
- };
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->dataType = dataType;
-
- InP->data = data;
-
- InP->dataType.msgtl_number = dataCnt;
-
- InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX|
- MACH_MSGH_BITS(reply_portPoly, 0);
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply_port;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 2904;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 48, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine device_read_reply_inband */
-mig_external kern_return_t ds_device_read_reply_inband
-(
- mach_port_t reply_port,
- mach_msg_type_name_t reply_portPoly,
- kern_return_t return_code,
- io_buf_ptr_inband_t data,
- mach_msg_type_number_t dataCnt
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- mach_msg_type_t dataType;
- char data[128];
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
- unsigned int msgh_size;
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t dataType = {
- /* msgt_name = */ 8,
- /* msgt_size = */ 8,
- /* msgt_number = */ 128,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->dataType = dataType;
-
- if (dataCnt > 128) {
- return MIG_ARRAY_TOO_LARGE;
- }
- else {
- memcpy(InP->data, data, dataCnt);
- }
-
- InP->dataType.msgt_number = dataCnt;
-
- msgh_size = 36 + ((dataCnt + 3) & ~3);
- InP->Head.msgh_bits =
- MACH_MSGH_BITS(reply_portPoly, 0);
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply_port;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 2905;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, msgh_size, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
diff --git a/boot-proxy-exc/excServer.c b/boot-proxy-exc/excServer.c
deleted file mode 100644
index 9c3191dd..00000000
--- a/boot-proxy-exc/excServer.c
+++ /dev/null
@@ -1,205 +0,0 @@
-/* Module exc */
-
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE 1
-#endif
-
-#define EXPORT_BOOLEAN
-#include <mach/boolean.h>
-#include <mach/kern_return.h>
-#include <mach/message.h>
-#include <mach/mig_errors.h>
-#include <mach/mig_support.h>
-
-#ifndef mig_internal
-#define mig_internal static
-#endif
-
-#ifndef mig_external
-#define mig_external
-#endif
-
-#ifndef TypeCheck
-#define TypeCheck 1
-#endif
-
-#ifndef UseExternRCSId
-#define UseExternRCSId 1
-#endif
-
-#define BAD_TYPECHECK(type, check) ({\
- union { mach_msg_type_t t; unsigned32_t w; } _t, _c;\
- _t.t = *(type); _c.t = *(check); _t.w != _c.w; })
-#define msgh_request_port msgh_local_port
-#define MACH_MSGH_BITS_REQUEST(bits) MACH_MSGH_BITS_LOCAL(bits)
-#define msgh_reply_port msgh_remote_port
-#define MACH_MSGH_BITS_REPLY(bits) MACH_MSGH_BITS_REMOTE(bits)
-
-#include <mach/std_types.h>
-
-/* Routine exception_raise */
-mig_internal void _Xexception_raise
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t threadType;
- mach_port_t thread;
- mach_msg_type_t taskType;
- mach_port_t task;
- mach_msg_type_t exceptionType;
- integer_t exception;
- mach_msg_type_t codeType;
- integer_t code;
- mach_msg_type_t subcodeType;
- integer_t subcode;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t catch_exception_raise
- (mach_port_t exception_port, mach_port_t thread, mach_port_t task, integer_t exception, integer_t code, integer_t subcode);
-
- auto const mach_msg_type_t threadCheck = {
- /* msgt_name = */ 17,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t taskCheck = {
- /* msgt_name = */ 17,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t exceptionCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t codeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t subcodeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 64) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->threadType, &threadCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->taskType, &taskCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->exceptionType, &exceptionCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->codeType, &codeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->subcodeType, &subcodeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = catch_exception_raise(In0P->Head.msgh_request_port, In0P->thread, In0P->task, In0P->exception, In0P->code, In0P->subcode);
-}
-
-static mig_routine_t exc_server_routines[] = {
- _Xexception_raise,
-};
-
-mig_external boolean_t exc_server
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- register mach_msg_header_t *InP = InHeadP;
- register mig_reply_header_t *OutP = (mig_reply_header_t *) OutHeadP;
-
- auto const mach_msg_type_t RetCodeType = {
- /* msgt_name = */ MACH_MSG_TYPE_INTEGER_32,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- register mig_routine_t routine;
-
- OutP->Head.msgh_bits = MACH_MSGH_BITS(MACH_MSGH_BITS_REPLY(InP->msgh_bits), 0);
- OutP->Head.msgh_size = sizeof *OutP;
- OutP->Head.msgh_remote_port = InP->msgh_reply_port;
- OutP->Head.msgh_local_port = MACH_PORT_NULL;
- OutP->Head.msgh_seqno = 0;
- OutP->Head.msgh_id = InP->msgh_id + 100;
-
- OutP->RetCodeType = RetCodeType;
-
- if ((InP->msgh_id > 2400) || (InP->msgh_id < 2400) ||
- ((routine = exc_server_routines[InP->msgh_id - 2400]) == 0)) {
- OutP->RetCode = MIG_BAD_ID;
- return FALSE;
- }
- (*routine) (InP, &OutP->Head);
- return TRUE;
-}
-
-mig_external mig_routine_t exc_server_routine
- (const mach_msg_header_t *InHeadP)
-{
- register int msgh_id;
-
- msgh_id = InHeadP->msgh_id - 2400;
-
- if ((msgh_id > 0) || (msgh_id < 0))
- return 0;
-
- return exc_server_routines[msgh_id];
-}
-
diff --git a/boot-proxy-exc/ioServer.c b/boot-proxy-exc/ioServer.c
deleted file mode 100644
index 627acbdf..00000000
--- a/boot-proxy-exc/ioServer.c
+++ /dev/null
@@ -1,1873 +0,0 @@
-/* Module io */
-
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE 1
-#endif
-
-#define EXPORT_BOOLEAN
-#include <mach/boolean.h>
-#include <mach/kern_return.h>
-#include <mach/message.h>
-#include <mach/mig_errors.h>
-#include <mach/mig_support.h>
-
-#ifndef mig_internal
-#define mig_internal static
-#endif
-
-#ifndef mig_external
-#define mig_external
-#endif
-
-#ifndef TypeCheck
-#define TypeCheck 1
-#endif
-
-#ifndef UseExternRCSId
-#define UseExternRCSId 1
-#endif
-
-#define BAD_TYPECHECK(type, check) ({\
- union { mach_msg_type_t t; unsigned32_t w; } _t, _c;\
- _t.t = *(type); _c.t = *(check); _t.w != _c.w; })
-#define msgh_request_port msgh_local_port
-#define MACH_MSGH_BITS_REQUEST(bits) MACH_MSGH_BITS_LOCAL(bits)
-#define msgh_reply_port msgh_remote_port
-#define MACH_MSGH_BITS_REPLY(bits) MACH_MSGH_BITS_REMOTE(bits)
-
-#include <mach/std_types.h>
-#include <mach/mach_types.h>
-#include <device/device_types.h>
-#include <device/net_status.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/statfs.h>
-#include <sys/resource.h>
-#include <sys/utsname.h>
-#include <hurd/hurd_types.h>
-
-/* Routine io_write */
-mig_internal void _Xio_write
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_long_t dataType;
- char data[2048];
- mach_msg_type_t offsetType;
- loff_t offset;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t amountType;
- vm_size_t amount;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Request *In1P;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_write
- (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, data_t data, mach_msg_type_number_t dataCnt, loff_t offset, vm_size_t *amount);
-
-#if TypeCheck
- boolean_t msgh_simple;
-#endif /* TypeCheck */
-
- unsigned int msgh_size;
- unsigned int msgh_size_delta;
-
- auto const mach_msg_type_t offsetCheck = {
- /* msgt_name = */ 11,
- /* msgt_size = */ 64,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t amountType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- msgh_size = In0P->Head.msgh_size;
- msgh_simple = !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX);
- if ((msgh_size < 48))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->dataType.msgtl_header.msgt_longform != TRUE) ||
- (In0P->dataType.msgtl_name != 8) ||
- (In0P->dataType.msgtl_size != 8))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- msgh_size_delta = (In0P->dataType.msgtl_header.msgt_inline) ? (In0P->dataType.msgtl_number + 3) & ~3 : sizeof(char *);
-#if TypeCheck
- if (msgh_size != 48 + msgh_size_delta)
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- In1P = (Request *) ((char *) In0P + msgh_size_delta - 2048);
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In1P->offsetType, &offsetCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_write(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), (In0P->dataType.msgtl_header.msgt_inline) ? In0P->data : *((char **)In0P->data), In0P->dataType.msgtl_number, In1P->offset, &OutP->amount);
- if (OutP->RetCode == KERN_SUCCESS)
- if (!In0P->dataType.msgtl_header.msgt_inline)
- __mig_deallocate(* (vm_offset_t *) In0P->data, In0P->dataType.msgtl_number);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 40;
-
- OutP->amountType = amountType;
-}
-
-/* Routine io_read */
-mig_internal void _Xio_read
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t offsetType;
- loff_t offset;
- mach_msg_type_t amountType;
- vm_size_t amount;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_long_t dataType;
- char data[2048];
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_read
- (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, data_t *data, mach_msg_type_number_t *dataCnt, loff_t offset, vm_size_t amount);
-
- boolean_t msgh_simple;
- auto const mach_msg_type_t offsetCheck = {
- /* msgt_name = */ 11,
- /* msgt_size = */ 64,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t amountCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_long_t dataType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 8,
- /* msgtl_size = */ 8,
- /* msgtl_number = */ 2048,
- };
-
- mach_msg_type_number_t dataCnt;
-
- char *dataP;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 44) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->offsetType, &offsetCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->amountType, &amountCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- dataP = OutP->data;
- dataCnt = 2048;
-
- OutP->RetCode = S_io_read(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), &dataP, &dataCnt, In0P->offset, In0P->amount);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- msgh_simple = TRUE;
-
- OutP->dataType = dataType;
- if (dataP != OutP->data) {
- OutP->dataType.msgtl_header.msgt_inline = FALSE;
- OutP->dataType.msgtl_header.msgt_deallocate = TRUE;
- *((char **)OutP->data) = dataP;
- msgh_simple = FALSE;
- }
-
- OutP->dataType.msgtl_number = dataCnt;
- OutP->Head.msgh_size = 44 + ((OutP->dataType.msgtl_header.msgt_inline) ? (dataCnt + 3) & ~3 : sizeof(char *));
-
- if (!msgh_simple)
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-}
-
-/* Routine io_seek */
-mig_internal void _Xio_seek
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t offsetType;
- loff_t offset;
- mach_msg_type_t whenceType;
- int whence;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t newpType;
- loff_t newp;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_seek
- (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, loff_t offset, int whence, loff_t *newp);
-
- auto const mach_msg_type_t offsetCheck = {
- /* msgt_name = */ 11,
- /* msgt_size = */ 64,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t whenceCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t newpType = {
- /* msgt_name = */ 11,
- /* msgt_size = */ 64,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 44) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->offsetType, &offsetCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->whenceType, &whenceCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_seek(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->offset, In0P->whence, &OutP->newp);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 44;
-
- OutP->newpType = newpType;
-}
-
-/* Routine io_readable */
-mig_internal void _Xio_readable
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t amountType;
- vm_size_t amount;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_readable
- (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, vm_size_t *amount);
-
- auto const mach_msg_type_t amountType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_readable(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), &OutP->amount);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 40;
-
- OutP->amountType = amountType;
-}
-
-/* Routine io_set_all_openmodes */
-mig_internal void _Xio_set_all_openmodes
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t newbitsType;
- int newbits;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_set_all_openmodes
- (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, int newbits);
-
- auto const mach_msg_type_t newbitsCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->newbitsType, &newbitsCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_set_all_openmodes(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->newbits);
-}
-
-/* Routine io_get_openmodes */
-mig_internal void _Xio_get_openmodes
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t bitsType;
- int bits;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_get_openmodes
- (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, int *bits);
-
- auto const mach_msg_type_t bitsType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_get_openmodes(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), &OutP->bits);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 40;
-
- OutP->bitsType = bitsType;
-}
-
-/* Routine io_set_some_openmodes */
-mig_internal void _Xio_set_some_openmodes
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t bits_to_setType;
- int bits_to_set;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_set_some_openmodes
- (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, int bits_to_set);
-
- auto const mach_msg_type_t bits_to_setCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->bits_to_setType, &bits_to_setCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_set_some_openmodes(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->bits_to_set);
-}
-
-/* Routine io_clear_some_openmodes */
-mig_internal void _Xio_clear_some_openmodes
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t bits_to_clearType;
- int bits_to_clear;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_clear_some_openmodes
- (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, int bits_to_clear);
-
- auto const mach_msg_type_t bits_to_clearCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->bits_to_clearType, &bits_to_clearCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_clear_some_openmodes(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->bits_to_clear);
-}
-
-/* Routine io_async */
-mig_internal void _Xio_async
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t notify_portType;
- mach_port_t notify_port;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t async_id_portType;
- mach_port_t async_id_port;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_async
- (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, mach_port_t notify_port, mach_port_t *async_id_port, mach_msg_type_name_t *async_id_portPoly);
-
- boolean_t msgh_simple;
- auto const mach_msg_type_t notify_portCheck = {
- /* msgt_name = */ 17,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t async_id_portType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- mach_msg_type_name_t async_id_portPoly;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->notify_portType, &notify_portCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_async(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->notify_port, &OutP->async_id_port, &async_id_portPoly);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- msgh_simple = TRUE;
- OutP->Head.msgh_size = 40;
-
- OutP->async_id_portType = async_id_portType;
-
- if (MACH_MSG_TYPE_PORT_ANY(async_id_portPoly))
- msgh_simple = FALSE;
-
- OutP->async_id_portType.msgt_name = async_id_portPoly;
-
- if (!msgh_simple)
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-}
-
-/* Routine io_mod_owner */
-mig_internal void _Xio_mod_owner
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t ownerType;
- pid_t owner;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_mod_owner
- (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, pid_t owner);
-
- auto const mach_msg_type_t ownerCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->ownerType, &ownerCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_mod_owner(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->owner);
-}
-
-/* Routine io_get_owner */
-mig_internal void _Xio_get_owner
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t ownerType;
- pid_t owner;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_get_owner
- (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, pid_t *owner);
-
- auto const mach_msg_type_t ownerType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_get_owner(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), &OutP->owner);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 40;
-
- OutP->ownerType = ownerType;
-}
-
-/* Routine io_get_icky_async_id */
-mig_internal void _Xio_get_icky_async_id
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t icky_async_id_portType;
- mach_port_t icky_async_id_port;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_get_icky_async_id
- (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, mach_port_t *icky_async_id_port, mach_msg_type_name_t *icky_async_id_portPoly);
-
- boolean_t msgh_simple;
- auto const mach_msg_type_t icky_async_id_portType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- mach_msg_type_name_t icky_async_id_portPoly;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_get_icky_async_id(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), &OutP->icky_async_id_port, &icky_async_id_portPoly);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- msgh_simple = TRUE;
- OutP->Head.msgh_size = 40;
-
- OutP->icky_async_id_portType = icky_async_id_portType;
-
- if (MACH_MSG_TYPE_PORT_ANY(icky_async_id_portPoly))
- msgh_simple = FALSE;
-
- OutP->icky_async_id_portType.msgt_name = icky_async_id_portPoly;
-
- if (!msgh_simple)
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-}
-
-/* Routine io_select */
-mig_internal void _Xio_select
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t select_typeType;
- int select_type;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t select_typeType;
- int select_type;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_select
- (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, int *select_type);
-
- auto const mach_msg_type_t select_typeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t select_typeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->select_typeType, &select_typeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_select(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), &In0P->select_type);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 40;
-
- OutP->select_typeType = select_typeType;
-
- OutP->select_type = In0P->select_type;
-}
-
-/* Routine io_stat */
-mig_internal void _Xio_stat
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t stat_infoType;
- io_statbuf_t stat_info;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_stat
- (io_t stat_object, mach_port_t reply, mach_msg_type_name_t replyPoly, io_statbuf_t *stat_info);
-
- auto const mach_msg_type_t stat_infoType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 32,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_stat(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), &OutP->stat_info);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 164;
-
- OutP->stat_infoType = stat_infoType;
-}
-
-/* SimpleRoutine io_reauthenticate */
-mig_internal void _Xio_reauthenticate
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t rendezvous2Type;
- mach_port_t rendezvous2;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_reauthenticate
- (io_t auth_object, mach_port_t reply, mach_msg_type_name_t replyPoly, mach_port_t rendezvous2);
-
- auto const mach_msg_type_t rendezvous2Check = {
- /* msgt_name = */ 17,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->rendezvous2Type, &rendezvous2Check))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_reauthenticate(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->rendezvous2);
-}
-
-/* Routine io_restrict_auth */
-mig_internal void _Xio_restrict_auth
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_long_t uidsType;
- uid_t uids[512];
- mach_msg_type_long_t gidsType;
- uid_t gids[512];
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t new_objectType;
- mach_port_t new_object;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Request *In1P;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_restrict_auth
- (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, mach_port_t *new_object, mach_msg_type_name_t *new_objectPoly, idarray_t uids, mach_msg_type_number_t uidsCnt, idarray_t gids, mach_msg_type_number_t gidsCnt);
-
- boolean_t msgh_simple;
- unsigned int msgh_size;
- unsigned int msgh_size_delta;
-
- auto const mach_msg_type_t new_objectType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- mach_msg_type_name_t new_objectPoly;
-
-#if TypeCheck
- msgh_size = In0P->Head.msgh_size;
- msgh_simple = !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX);
- if ((msgh_size < 48))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->uidsType.msgtl_header.msgt_longform != TRUE) ||
- (In0P->uidsType.msgtl_name != 2) ||
- (In0P->uidsType.msgtl_size != 32))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- msgh_size_delta = (In0P->uidsType.msgtl_header.msgt_inline) ? 4 * In0P->uidsType.msgtl_number : sizeof(uid_t *);
-#if TypeCheck
- if (msgh_size < 48 + msgh_size_delta)
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
- msgh_size -= msgh_size_delta;
-#endif /* TypeCheck */
-
- In1P = (Request *) ((char *) In0P + msgh_size_delta - 2048);
-
-#if TypeCheck
- if ((In1P->gidsType.msgtl_header.msgt_longform != TRUE) ||
- (In1P->gidsType.msgtl_name != 2) ||
- (In1P->gidsType.msgtl_size != 32))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (msgh_size != 48 + ((In1P->gidsType.msgtl_header.msgt_inline) ? 4 * In1P->gidsType.msgtl_number : sizeof(uid_t *)))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_restrict_auth(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), &OutP->new_object, &new_objectPoly, (In0P->uidsType.msgtl_header.msgt_inline) ? In0P->uids : *((uid_t **)In0P->uids), In0P->uidsType.msgtl_number, (In1P->gidsType.msgtl_header.msgt_inline) ? In1P->gids : *((uid_t **)In1P->gids), In1P->gidsType.msgtl_number);
- if (OutP->RetCode == KERN_SUCCESS)
- if (!In1P->gidsType.msgtl_header.msgt_inline)
- __mig_deallocate(* (vm_offset_t *) In1P->gids, 4 * In1P->gidsType.msgtl_number);
- if (OutP->RetCode == KERN_SUCCESS)
- if (!In0P->uidsType.msgtl_header.msgt_inline)
- __mig_deallocate(* (vm_offset_t *) In0P->uids, 4 * In0P->uidsType.msgtl_number);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- msgh_simple = TRUE;
- OutP->Head.msgh_size = 40;
-
- OutP->new_objectType = new_objectType;
-
- if (MACH_MSG_TYPE_PORT_ANY(new_objectPoly))
- msgh_simple = FALSE;
-
- OutP->new_objectType.msgt_name = new_objectPoly;
-
- if (!msgh_simple)
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-}
-
-/* Routine io_duplicate */
-mig_internal void _Xio_duplicate
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t newportType;
- mach_port_t newport;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_duplicate
- (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, mach_port_t *newport, mach_msg_type_name_t *newportPoly);
-
- boolean_t msgh_simple;
- auto const mach_msg_type_t newportType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- mach_msg_type_name_t newportPoly;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_duplicate(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), &OutP->newport, &newportPoly);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- msgh_simple = TRUE;
- OutP->Head.msgh_size = 40;
-
- OutP->newportType = newportType;
-
- if (MACH_MSG_TYPE_PORT_ANY(newportPoly))
- msgh_simple = FALSE;
-
- OutP->newportType.msgt_name = newportPoly;
-
- if (!msgh_simple)
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-}
-
-/* Routine io_server_version */
-mig_internal void _Xio_server_version
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t server_nameType;
- string_t server_name;
- mach_msg_type_t server_major_versionType;
- int server_major_version;
- mach_msg_type_t server_minor_versionType;
- int server_minor_version;
- mach_msg_type_t server_edit_levelType;
- int server_edit_level;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_server_version
- (io_t vers_object, mach_port_t reply, mach_msg_type_name_t replyPoly, string_t server_name, int *server_major_version, int *server_minor_version, int *server_edit_level);
-
- auto const mach_msg_type_t server_nameType = {
- /* msgt_name = */ MACH_MSG_TYPE_STRING_C,
- /* msgt_size = */ 8,
- /* msgt_number = */ 1024,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t server_major_versionType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t server_minor_versionType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t server_edit_levelType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_server_version(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), OutP->server_name, &OutP->server_major_version, &OutP->server_minor_version, &OutP->server_edit_level);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 1084;
-
- OutP->server_nameType = server_nameType;
-
- OutP->server_major_versionType = server_major_versionType;
-
- OutP->server_minor_versionType = server_minor_versionType;
-
- OutP->server_edit_levelType = server_edit_levelType;
-}
-
-/* Routine io_map */
-mig_internal void _Xio_map
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t memobjrdType;
- mach_port_t memobjrd;
- mach_msg_type_t memobjwtType;
- mach_port_t memobjwt;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_map
- (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, mach_port_t *memobjrd, mach_msg_type_name_t *memobjrdPoly, mach_port_t *memobjwt, mach_msg_type_name_t *memobjwtPoly);
-
- boolean_t msgh_simple;
- auto const mach_msg_type_t memobjrdType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t memobjwtType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- mach_msg_type_name_t memobjrdPoly;
- mach_msg_type_name_t memobjwtPoly;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_map(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), &OutP->memobjrd, &memobjrdPoly, &OutP->memobjwt, &memobjwtPoly);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- msgh_simple = TRUE;
- OutP->Head.msgh_size = 48;
-
- OutP->memobjrdType = memobjrdType;
-
- if (MACH_MSG_TYPE_PORT_ANY(memobjrdPoly))
- msgh_simple = FALSE;
-
- OutP->memobjrdType.msgt_name = memobjrdPoly;
-
- OutP->memobjwtType = memobjwtType;
-
- if (MACH_MSG_TYPE_PORT_ANY(memobjwtPoly))
- msgh_simple = FALSE;
-
- OutP->memobjwtType.msgt_name = memobjwtPoly;
-
- if (!msgh_simple)
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-}
-
-/* Routine io_map_cntl */
-mig_internal void _Xio_map_cntl
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t memobjType;
- mach_port_t memobj;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_map_cntl
- (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, mach_port_t *memobj, mach_msg_type_name_t *memobjPoly);
-
- boolean_t msgh_simple;
- auto const mach_msg_type_t memobjType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- mach_msg_type_name_t memobjPoly;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_map_cntl(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), &OutP->memobj, &memobjPoly);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- msgh_simple = TRUE;
- OutP->Head.msgh_size = 40;
-
- OutP->memobjType = memobjType;
-
- if (MACH_MSG_TYPE_PORT_ANY(memobjPoly))
- msgh_simple = FALSE;
-
- OutP->memobjType.msgt_name = memobjPoly;
-
- if (!msgh_simple)
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-}
-
-/* Routine io_get_conch */
-mig_internal void _Xio_get_conch
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_get_conch
- (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly);
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_get_conch(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits));
-}
-
-/* Routine io_release_conch */
-mig_internal void _Xio_release_conch
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_release_conch
- (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly);
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_release_conch(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits));
-}
-
-/* Routine io_eofnotify */
-mig_internal void _Xio_eofnotify
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_eofnotify
- (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly);
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_eofnotify(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits));
-}
-
-/* Routine io_prenotify */
-mig_internal void _Xio_prenotify
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t write_startType;
- vm_offset_t write_start;
- mach_msg_type_t write_endType;
- vm_offset_t write_end;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_prenotify
- (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, vm_offset_t write_start, vm_offset_t write_end);
-
- auto const mach_msg_type_t write_startCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t write_endCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->write_startType, &write_startCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->write_endType, &write_endCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_prenotify(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->write_start, In0P->write_end);
-}
-
-/* Routine io_postnotify */
-mig_internal void _Xio_postnotify
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t write_startType;
- vm_offset_t write_start;
- mach_msg_type_t write_endType;
- vm_offset_t write_end;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_postnotify
- (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, vm_offset_t write_start, vm_offset_t write_end);
-
- auto const mach_msg_type_t write_startCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t write_endCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->write_startType, &write_startCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->write_endType, &write_endCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_postnotify(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->write_start, In0P->write_end);
-}
-
-/* Routine io_readnotify */
-mig_internal void _Xio_readnotify
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_readnotify
- (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly);
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_readnotify(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits));
-}
-
-/* Routine io_readsleep */
-mig_internal void _Xio_readsleep
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_readsleep
- (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly);
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_readsleep(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits));
-}
-
-/* Routine io_sigio */
-mig_internal void _Xio_sigio
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_sigio
- (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly);
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_sigio(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits));
-}
-
-/* Routine io_pathconf */
-mig_internal void _Xio_pathconf
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t nameType;
- int name;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t valueType;
- int value;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_pathconf
- (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, int name, int *value);
-
- auto const mach_msg_type_t nameCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t valueType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->nameType, &nameCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_pathconf(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->name, &OutP->value);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 40;
-
- OutP->valueType = valueType;
-}
-
-/* Routine io_identity */
-mig_internal void _Xio_identity
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t idportType;
- mach_port_t idport;
- mach_msg_type_t fsidportType;
- mach_port_t fsidport;
- mach_msg_type_t filenoType;
- ino64_t fileno;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_identity
- (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, mach_port_t *idport, mach_msg_type_name_t *idportPoly, mach_port_t *fsidport, mach_msg_type_name_t *fsidportPoly, ino64_t *fileno);
-
- boolean_t msgh_simple;
- auto const mach_msg_type_t idportType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t fsidportType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t filenoType = {
- /* msgt_name = */ 11,
- /* msgt_size = */ 64,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- mach_msg_type_name_t idportPoly;
- mach_msg_type_name_t fsidportPoly;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_identity(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), &OutP->idport, &idportPoly, &OutP->fsidport, &fsidportPoly, &OutP->fileno);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- msgh_simple = TRUE;
- OutP->Head.msgh_size = 60;
-
- OutP->idportType = idportType;
-
- if (MACH_MSG_TYPE_PORT_ANY(idportPoly))
- msgh_simple = FALSE;
-
- OutP->idportType.msgt_name = idportPoly;
-
- OutP->fsidportType = fsidportType;
-
- if (MACH_MSG_TYPE_PORT_ANY(fsidportPoly))
- msgh_simple = FALSE;
-
- OutP->fsidportType.msgt_name = fsidportPoly;
-
- OutP->filenoType = filenoType;
-
- if (!msgh_simple)
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-}
-
-/* Routine io_revoke */
-mig_internal void _Xio_revoke
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_revoke
- (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly);
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_revoke(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits));
-}
-
-static mig_routine_t io_server_routines[] = {
- _Xio_write,
- _Xio_read,
- _Xio_seek,
- _Xio_readable,
- _Xio_set_all_openmodes,
- _Xio_get_openmodes,
- _Xio_set_some_openmodes,
- _Xio_clear_some_openmodes,
- _Xio_async,
- _Xio_mod_owner,
- _Xio_get_owner,
- _Xio_get_icky_async_id,
- _Xio_select,
- _Xio_stat,
- _Xio_reauthenticate,
- _Xio_restrict_auth,
- _Xio_duplicate,
- _Xio_server_version,
- _Xio_map,
- _Xio_map_cntl,
- _Xio_get_conch,
- _Xio_release_conch,
- _Xio_eofnotify,
- _Xio_prenotify,
- _Xio_postnotify,
- _Xio_readnotify,
- _Xio_readsleep,
- _Xio_sigio,
- _Xio_pathconf,
- _Xio_identity,
- _Xio_revoke,
-};
-
-mig_external boolean_t io_server
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- register mach_msg_header_t *InP = InHeadP;
- register mig_reply_header_t *OutP = (mig_reply_header_t *) OutHeadP;
-
- auto const mach_msg_type_t RetCodeType = {
- /* msgt_name = */ MACH_MSG_TYPE_INTEGER_32,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- register mig_routine_t routine;
-
- OutP->Head.msgh_bits = MACH_MSGH_BITS(MACH_MSGH_BITS_REPLY(InP->msgh_bits), 0);
- OutP->Head.msgh_size = sizeof *OutP;
- OutP->Head.msgh_remote_port = InP->msgh_reply_port;
- OutP->Head.msgh_local_port = MACH_PORT_NULL;
- OutP->Head.msgh_seqno = 0;
- OutP->Head.msgh_id = InP->msgh_id + 100;
-
- OutP->RetCodeType = RetCodeType;
-
- if ((InP->msgh_id > 21030) || (InP->msgh_id < 21000) ||
- ((routine = io_server_routines[InP->msgh_id - 21000]) == 0)) {
- OutP->RetCode = MIG_BAD_ID;
- return FALSE;
- }
- (*routine) (InP, &OutP->Head);
- return TRUE;
-}
-
-mig_external mig_routine_t io_server_routine
- (const mach_msg_header_t *InHeadP)
-{
- register int msgh_id;
-
- msgh_id = InHeadP->msgh_id - 21000;
-
- if ((msgh_id > 30) || (msgh_id < 0))
- return 0;
-
- return io_server_routines[msgh_id];
-}
-
diff --git a/boot-proxy-exc/io_replyUser.c b/boot-proxy-exc/io_replyUser.c
deleted file mode 100644
index 046033fa..00000000
--- a/boot-proxy-exc/io_replyUser.c
+++ /dev/null
@@ -1,1600 +0,0 @@
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE 1
-#endif
-
-#include "io_reply_U.h"
-#define EXPORT_BOOLEAN
-#include <mach/boolean.h>
-#include <mach/kern_return.h>
-#include <mach/message.h>
-#include <mach/notify.h>
-#include <mach/mach_types.h>
-#include <mach/mig_errors.h>
-#include <mach/mig_support.h>
-#include <mach/msg_type.h>
-/* LINTLIBRARY */
-
-#ifndef mig_internal
-#define mig_internal static
-#endif
-
-#ifndef mig_external
-#define mig_external
-#endif
-
-#ifndef TypeCheck
-#define TypeCheck 1
-#endif
-
-#ifndef UseExternRCSId
-#define UseExternRCSId 1
-#endif
-
-#define BAD_TYPECHECK(type, check) ({\
- union { mach_msg_type_t t; unsigned32_t w; } _t, _c;\
- _t.t = *(type); _c.t = *(check); _t.w != _c.w; })
-#define msgh_request_port msgh_remote_port
-#define msgh_reply_port msgh_local_port
-
-#include <mach/std_types.h>
-#include <mach/mach_types.h>
-#include <device/device_types.h>
-#include <device/net_status.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/statfs.h>
-#include <sys/resource.h>
-#include <sys/utsname.h>
-#include <hurd/hurd_types.h>
-
-/* SimpleRoutine io_write_reply */
-mig_external kern_return_t io_write_reply
-(
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- kern_return_t return_code,
- vm_size_t amount
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- mach_msg_type_t amountType;
- vm_size_t amount;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t amountType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->amountType = amountType;
-
- InP->amount = amount;
-
- InP->Head.msgh_bits =
- MACH_MSGH_BITS(replyPoly, 0);
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 21100;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 40, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine io_read_reply */
-mig_external kern_return_t io_read_reply
-(
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- kern_return_t return_code,
- data_t data,
- mach_msg_type_number_t dataCnt
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- mach_msg_type_long_t dataType;
- char data[2048];
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
- boolean_t msgh_simple = TRUE;
- unsigned int msgh_size;
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_long_t dataType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 8,
- /* msgtl_size = */ 8,
- /* msgtl_number = */ 2048,
- };
-
- if (MACH_MSG_TYPE_PORT_ANY(replyPoly))
- msgh_simple = FALSE;
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->dataType = dataType;
-
- if (dataCnt > 2048) {
- InP->dataType.msgtl_header.msgt_inline = FALSE;
- *((char **)InP->data) = data;
- msgh_simple = FALSE;
- }
- else {
- memcpy(InP->data, data, dataCnt);
- }
-
- InP->dataType.msgtl_number = dataCnt;
-
- msgh_size = 44 + ((InP->dataType.msgtl_header.msgt_inline) ? (dataCnt + 3) & ~3 : sizeof(char *));
- InP->Head.msgh_bits = msgh_simple ?
- MACH_MSGH_BITS(replyPoly, 0) :
- (MACH_MSGH_BITS_COMPLEX|
- MACH_MSGH_BITS(replyPoly, 0));
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 21101;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, msgh_size, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine io_seek_reply */
-mig_external kern_return_t io_seek_reply
-(
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- kern_return_t return_code,
- loff_t newp
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- mach_msg_type_t newpType;
- loff_t newp;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t newpType = {
- /* msgt_name = */ 11,
- /* msgt_size = */ 64,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->newpType = newpType;
-
- InP->newp = newp;
-
- InP->Head.msgh_bits =
- MACH_MSGH_BITS(replyPoly, 0);
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 21102;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 44, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine io_readable_reply */
-mig_external kern_return_t io_readable_reply
-(
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- kern_return_t return_code,
- vm_size_t amount
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- mach_msg_type_t amountType;
- vm_size_t amount;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t amountType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->amountType = amountType;
-
- InP->amount = amount;
-
- InP->Head.msgh_bits =
- MACH_MSGH_BITS(replyPoly, 0);
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 21103;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 40, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine io_set_all_openmodes_reply */
-mig_external kern_return_t io_set_all_openmodes_reply
-(
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- kern_return_t return_code
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->Head.msgh_bits =
- MACH_MSGH_BITS(replyPoly, 0);
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 21104;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 32, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine io_get_openmodes_reply */
-mig_external kern_return_t io_get_openmodes_reply
-(
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- kern_return_t return_code,
- int bits
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- mach_msg_type_t bitsType;
- int bits;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t bitsType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->bitsType = bitsType;
-
- InP->bits = bits;
-
- InP->Head.msgh_bits =
- MACH_MSGH_BITS(replyPoly, 0);
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 21105;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 40, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine io_set_some_openmodes_reply */
-mig_external kern_return_t io_set_some_openmodes_reply
-(
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- kern_return_t return_code
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->Head.msgh_bits =
- MACH_MSGH_BITS(replyPoly, 0);
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 21106;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 32, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine io_clear_some_openmodes_reply */
-mig_external kern_return_t io_clear_some_openmodes_reply
-(
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- kern_return_t return_code
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->Head.msgh_bits =
- MACH_MSGH_BITS(replyPoly, 0);
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 21107;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 32, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine io_async_reply */
-mig_external kern_return_t io_async_reply
-(
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- kern_return_t return_code,
- mach_port_t async_id_port,
- mach_msg_type_name_t async_id_portPoly
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- mach_msg_type_t async_id_portType;
- mach_port_t async_id_port;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
- boolean_t msgh_simple = TRUE;
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t async_id_portType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- if (MACH_MSG_TYPE_PORT_ANY(replyPoly))
- msgh_simple = FALSE;
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->async_id_portType = async_id_portType;
-
- InP->async_id_port = async_id_port;
-
- if (MACH_MSG_TYPE_PORT_ANY(async_id_portPoly))
- msgh_simple = FALSE;
-
- InP->async_id_portType.msgt_name = async_id_portPoly;
-
- InP->Head.msgh_bits = msgh_simple ?
- MACH_MSGH_BITS(replyPoly, 0) :
- (MACH_MSGH_BITS_COMPLEX|
- MACH_MSGH_BITS(replyPoly, 0));
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 21108;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 40, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine io_mod_owner_reply */
-mig_external kern_return_t io_mod_owner_reply
-(
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- kern_return_t return_code
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->Head.msgh_bits =
- MACH_MSGH_BITS(replyPoly, 0);
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 21109;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 32, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine io_get_owner_reply */
-mig_external kern_return_t io_get_owner_reply
-(
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- kern_return_t return_code,
- pid_t owner
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- mach_msg_type_t ownerType;
- pid_t owner;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t ownerType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->ownerType = ownerType;
-
- InP->owner = owner;
-
- InP->Head.msgh_bits =
- MACH_MSGH_BITS(replyPoly, 0);
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 21110;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 40, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine io_get_icky_async_id_reply */
-mig_external kern_return_t io_get_icky_async_id_reply
-(
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- kern_return_t return_code,
- mach_port_t id_port,
- mach_msg_type_name_t id_portPoly
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- mach_msg_type_t id_portType;
- mach_port_t id_port;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
- boolean_t msgh_simple = TRUE;
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t id_portType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- if (MACH_MSG_TYPE_PORT_ANY(replyPoly))
- msgh_simple = FALSE;
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->id_portType = id_portType;
-
- InP->id_port = id_port;
-
- if (MACH_MSG_TYPE_PORT_ANY(id_portPoly))
- msgh_simple = FALSE;
-
- InP->id_portType.msgt_name = id_portPoly;
-
- InP->Head.msgh_bits = msgh_simple ?
- MACH_MSGH_BITS(replyPoly, 0) :
- (MACH_MSGH_BITS_COMPLEX|
- MACH_MSGH_BITS(replyPoly, 0));
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 21111;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 40, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine io_select_reply */
-mig_external kern_return_t io_select_reply
-(
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- kern_return_t return_code,
- int select_result
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- mach_msg_type_t select_resultType;
- int select_result;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t select_resultType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->select_resultType = select_resultType;
-
- InP->select_result = select_result;
-
- InP->Head.msgh_bits =
- MACH_MSGH_BITS(replyPoly, 0);
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 21112;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 40, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine io_stat_reply */
-mig_external kern_return_t io_stat_reply
-(
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- kern_return_t return_code,
- io_statbuf_t stat_info
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- mach_msg_type_t stat_infoType;
- io_statbuf_t stat_info;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t stat_infoType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 32,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->stat_infoType = stat_infoType;
-
- InP->stat_info = stat_info;
-
- InP->Head.msgh_bits =
- MACH_MSGH_BITS(replyPoly, 0);
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 21113;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 164, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine io_restrict_auth_reply */
-mig_external kern_return_t io_restrict_auth_reply
-(
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- kern_return_t return_code,
- mach_port_t new_object,
- mach_msg_type_name_t new_objectPoly
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- mach_msg_type_t new_objectType;
- mach_port_t new_object;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
- boolean_t msgh_simple = TRUE;
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t new_objectType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- if (MACH_MSG_TYPE_PORT_ANY(replyPoly))
- msgh_simple = FALSE;
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->new_objectType = new_objectType;
-
- InP->new_object = new_object;
-
- if (MACH_MSG_TYPE_PORT_ANY(new_objectPoly))
- msgh_simple = FALSE;
-
- InP->new_objectType.msgt_name = new_objectPoly;
-
- InP->Head.msgh_bits = msgh_simple ?
- MACH_MSGH_BITS(replyPoly, 0) :
- (MACH_MSGH_BITS_COMPLEX|
- MACH_MSGH_BITS(replyPoly, 0));
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 21115;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 40, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine io_duplicate_reply */
-mig_external kern_return_t io_duplicate_reply
-(
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- kern_return_t return_code,
- mach_port_t newport,
- mach_msg_type_name_t newportPoly
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- mach_msg_type_t newportType;
- mach_port_t newport;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
- boolean_t msgh_simple = TRUE;
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t newportType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- if (MACH_MSG_TYPE_PORT_ANY(replyPoly))
- msgh_simple = FALSE;
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->newportType = newportType;
-
- InP->newport = newport;
-
- if (MACH_MSG_TYPE_PORT_ANY(newportPoly))
- msgh_simple = FALSE;
-
- InP->newportType.msgt_name = newportPoly;
-
- InP->Head.msgh_bits = msgh_simple ?
- MACH_MSGH_BITS(replyPoly, 0) :
- (MACH_MSGH_BITS_COMPLEX|
- MACH_MSGH_BITS(replyPoly, 0));
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 21116;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 40, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine io_map_reply */
-mig_external kern_return_t io_map_reply
-(
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- kern_return_t return_code,
- mach_port_t rdobject,
- mach_msg_type_name_t rdobjectPoly,
- mach_port_t wrobject,
- mach_msg_type_name_t wrobjectPoly
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- mach_msg_type_t rdobjectType;
- mach_port_t rdobject;
- mach_msg_type_t wrobjectType;
- mach_port_t wrobject;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
- boolean_t msgh_simple = TRUE;
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t rdobjectType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t wrobjectType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- if (MACH_MSG_TYPE_PORT_ANY(replyPoly))
- msgh_simple = FALSE;
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->rdobjectType = rdobjectType;
-
- InP->rdobject = rdobject;
-
- if (MACH_MSG_TYPE_PORT_ANY(rdobjectPoly))
- msgh_simple = FALSE;
-
- InP->rdobjectType.msgt_name = rdobjectPoly;
-
- InP->wrobjectType = wrobjectType;
-
- InP->wrobject = wrobject;
-
- if (MACH_MSG_TYPE_PORT_ANY(wrobjectPoly))
- msgh_simple = FALSE;
-
- InP->wrobjectType.msgt_name = wrobjectPoly;
-
- InP->Head.msgh_bits = msgh_simple ?
- MACH_MSGH_BITS(replyPoly, 0) :
- (MACH_MSGH_BITS_COMPLEX|
- MACH_MSGH_BITS(replyPoly, 0));
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 21117;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 48, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine io_map_cntl_reply */
-mig_external kern_return_t io_map_cntl_reply
-(
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- kern_return_t return_code,
- mach_port_t memobj,
- mach_msg_type_name_t memobjPoly
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- mach_msg_type_t memobjType;
- mach_port_t memobj;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
- boolean_t msgh_simple = TRUE;
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t memobjType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- if (MACH_MSG_TYPE_PORT_ANY(replyPoly))
- msgh_simple = FALSE;
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->memobjType = memobjType;
-
- InP->memobj = memobj;
-
- if (MACH_MSG_TYPE_PORT_ANY(memobjPoly))
- msgh_simple = FALSE;
-
- InP->memobjType.msgt_name = memobjPoly;
-
- InP->Head.msgh_bits = msgh_simple ?
- MACH_MSGH_BITS(replyPoly, 0) :
- (MACH_MSGH_BITS_COMPLEX|
- MACH_MSGH_BITS(replyPoly, 0));
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 21118;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 40, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine io_get_conch_reply */
-mig_external kern_return_t io_get_conch_reply
-(
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- kern_return_t return_code
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->Head.msgh_bits =
- MACH_MSGH_BITS(replyPoly, 0);
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 21119;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 32, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine io_release_conch_reply */
-mig_external kern_return_t io_release_conch_reply
-(
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- kern_return_t return_code
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->Head.msgh_bits =
- MACH_MSGH_BITS(replyPoly, 0);
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 21120;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 32, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine io_eofnotify_reply */
-mig_external kern_return_t io_eofnotify_reply
-(
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- kern_return_t return_code
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->Head.msgh_bits =
- MACH_MSGH_BITS(replyPoly, 0);
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 21121;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 32, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine io_prenotify_reply */
-mig_external kern_return_t io_prenotify_reply
-(
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- kern_return_t return_code
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->Head.msgh_bits =
- MACH_MSGH_BITS(replyPoly, 0);
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 21122;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 32, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine io_postnotify_reply */
-mig_external kern_return_t io_postnotify_reply
-(
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- kern_return_t return_code
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->Head.msgh_bits =
- MACH_MSGH_BITS(replyPoly, 0);
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 21123;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 32, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine io_readnotify_reply */
-mig_external kern_return_t io_readnotify_reply
-(
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- kern_return_t return_code
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->Head.msgh_bits =
- MACH_MSGH_BITS(replyPoly, 0);
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 21124;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 32, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine io_readsleep_reply */
-mig_external kern_return_t io_readsleep_reply
-(
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- kern_return_t return_code
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->Head.msgh_bits =
- MACH_MSGH_BITS(replyPoly, 0);
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 21125;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 32, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine io_sigio_reply */
-mig_external kern_return_t io_sigio_reply
-(
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- kern_return_t return_code
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->Head.msgh_bits =
- MACH_MSGH_BITS(replyPoly, 0);
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 21126;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 32, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
diff --git a/boot-proxy-exc/notifyServer.c b/boot-proxy-exc/notifyServer.c
deleted file mode 100644
index 7965461a..00000000
--- a/boot-proxy-exc/notifyServer.c
+++ /dev/null
@@ -1,353 +0,0 @@
-/* Module notify */
-
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE 1
-#endif
-
-#define EXPORT_BOOLEAN
-#include <mach/boolean.h>
-#include <mach/kern_return.h>
-#include <mach/message.h>
-#include <mach/mig_errors.h>
-#include <mach/mig_support.h>
-
-#ifndef mig_internal
-#define mig_internal static
-#endif
-
-#ifndef mig_external
-#define mig_external
-#endif
-
-#ifndef TypeCheck
-#define TypeCheck 1
-#endif
-
-#ifndef UseExternRCSId
-#define UseExternRCSId 1
-#endif
-
-#define BAD_TYPECHECK(type, check) ({\
- union { mach_msg_type_t t; unsigned32_t w; } _t, _c;\
- _t.t = *(type); _c.t = *(check); _t.w != _c.w; })
-#define msgh_request_port msgh_local_port
-#define MACH_MSGH_BITS_REQUEST(bits) MACH_MSGH_BITS_LOCAL(bits)
-#define msgh_reply_port msgh_remote_port
-#define MACH_MSGH_BITS_REPLY(bits) MACH_MSGH_BITS_REMOTE(bits)
-
-#include <mach/std_types.h>
-
-/* SimpleRoutine mach_notify_port_deleted */
-mig_internal void _Xmach_notify_port_deleted
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t nameType;
- mach_port_t name;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t do_mach_notify_port_deleted
- (mach_port_t notify, mach_port_t name);
-
- auto const mach_msg_type_t nameCheck = {
- /* msgt_name = */ 15,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->nameType, &nameCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = do_mach_notify_port_deleted(In0P->Head.msgh_request_port, In0P->name);
-}
-
-/* SimpleRoutine mach_notify_msg_accepted */
-mig_internal void _Xmach_notify_msg_accepted
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t nameType;
- mach_port_t name;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t do_mach_notify_msg_accepted
- (mach_port_t notify, mach_port_t name);
-
- auto const mach_msg_type_t nameCheck = {
- /* msgt_name = */ 15,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->nameType, &nameCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = do_mach_notify_msg_accepted(In0P->Head.msgh_request_port, In0P->name);
-}
-
-/* SimpleRoutine mach_notify_port_destroyed */
-mig_internal void _Xmach_notify_port_destroyed
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t rightsType;
- mach_port_t rights;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t do_mach_notify_port_destroyed
- (mach_port_t notify, mach_port_t rights);
-
- auto const mach_msg_type_t rightsCheck = {
- /* msgt_name = */ 16,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->rightsType, &rightsCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = do_mach_notify_port_destroyed(In0P->Head.msgh_request_port, In0P->rights);
-}
-
-/* SimpleRoutine mach_notify_no_senders */
-mig_internal void _Xmach_notify_no_senders
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t mscountType;
- mach_port_mscount_t mscount;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t do_mach_notify_no_senders
- (mach_port_t notify, mach_port_mscount_t mscount);
-
- auto const mach_msg_type_t mscountCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->mscountType, &mscountCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = do_mach_notify_no_senders(In0P->Head.msgh_request_port, In0P->mscount);
-}
-
-/* SimpleRoutine mach_notify_send_once */
-mig_internal void _Xmach_notify_send_once
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t do_mach_notify_send_once
- (mach_port_t notify);
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = do_mach_notify_send_once(In0P->Head.msgh_request_port);
-}
-
-/* SimpleRoutine mach_notify_dead_name */
-mig_internal void _Xmach_notify_dead_name
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t nameType;
- mach_port_t name;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t do_mach_notify_dead_name
- (mach_port_t notify, mach_port_t name);
-
- auto const mach_msg_type_t nameCheck = {
- /* msgt_name = */ 15,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->nameType, &nameCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = do_mach_notify_dead_name(In0P->Head.msgh_request_port, In0P->name);
-}
-
-static mig_routine_t notify_server_routines[] = {
- 0,
- _Xmach_notify_port_deleted,
- _Xmach_notify_msg_accepted,
- 0,
- 0,
- _Xmach_notify_port_destroyed,
- _Xmach_notify_no_senders,
- _Xmach_notify_send_once,
- _Xmach_notify_dead_name,
-};
-
-mig_external boolean_t notify_server
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- register mach_msg_header_t *InP = InHeadP;
- register mig_reply_header_t *OutP = (mig_reply_header_t *) OutHeadP;
-
- auto const mach_msg_type_t RetCodeType = {
- /* msgt_name = */ MACH_MSG_TYPE_INTEGER_32,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- register mig_routine_t routine;
-
- OutP->Head.msgh_bits = MACH_MSGH_BITS(MACH_MSGH_BITS_REPLY(InP->msgh_bits), 0);
- OutP->Head.msgh_size = sizeof *OutP;
- OutP->Head.msgh_remote_port = InP->msgh_reply_port;
- OutP->Head.msgh_local_port = MACH_PORT_NULL;
- OutP->Head.msgh_seqno = 0;
- OutP->Head.msgh_id = InP->msgh_id + 100;
-
- OutP->RetCodeType = RetCodeType;
-
- if ((InP->msgh_id > 72) || (InP->msgh_id < 64) ||
- ((routine = notify_server_routines[InP->msgh_id - 64]) == 0)) {
- OutP->RetCode = MIG_BAD_ID;
- return FALSE;
- }
- (*routine) (InP, &OutP->Head);
- return TRUE;
-}
-
-mig_external mig_routine_t notify_server_routine
- (const mach_msg_header_t *InHeadP)
-{
- register int msgh_id;
-
- msgh_id = InHeadP->msgh_id - 64;
-
- if ((msgh_id > 8) || (msgh_id < 0))
- return 0;
-
- return notify_server_routines[msgh_id];
-}
-
diff --git a/boot-proxy-exc/ourdeviceServer.c b/boot-proxy-exc/ourdeviceServer.c
deleted file mode 100644
index 3db5fd8d..00000000
--- a/boot-proxy-exc/ourdeviceServer.c
+++ /dev/null
@@ -1,1179 +0,0 @@
-/* Module device */
-
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE 1
-#endif
-
-#define EXPORT_BOOLEAN
-#include <mach/boolean.h>
-#include <mach/kern_return.h>
-#include <mach/message.h>
-#include <mach/mig_errors.h>
-#include <mach/mig_support.h>
-
-#ifndef mig_internal
-#define mig_internal static
-#endif
-
-#ifndef mig_external
-#define mig_external
-#endif
-
-#ifndef TypeCheck
-#define TypeCheck 1
-#endif
-
-#ifndef UseExternRCSId
-#define UseExternRCSId 1
-#endif
-
-#define BAD_TYPECHECK(type, check) ({\
- union { mach_msg_type_t t; unsigned32_t w; } _t, _c;\
- _t.t = *(type); _c.t = *(check); _t.w != _c.w; })
-#define msgh_request_port msgh_local_port
-#define MACH_MSGH_BITS_REQUEST(bits) MACH_MSGH_BITS_LOCAL(bits)
-#define msgh_reply_port msgh_remote_port
-#define MACH_MSGH_BITS_REPLY(bits) MACH_MSGH_BITS_REMOTE(bits)
-
-#include <mach/std_types.h>
-#include <mach/mach_types.h>
-#include <device/device_types.h>
-#include <device/net_status.h>
-
-/* Routine device_open */
-mig_internal void _Xdevice_open
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t modeType;
- dev_mode_t mode;
- mach_msg_type_long_t nameType;
- dev_name_t name;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t deviceType;
- mach_port_t device;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t ds_device_open
- (mach_port_t master_port, mach_port_t reply_port, mach_msg_type_name_t reply_portPoly, dev_mode_t mode, dev_name_t name, mach_port_t *device, mach_msg_type_name_t *devicePoly);
-
- boolean_t msgh_simple;
- auto const mach_msg_type_t modeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t deviceType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- mach_msg_type_name_t devicePoly;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 172) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->modeType, &modeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->nameType.msgtl_header.msgt_inline != TRUE) ||
- (In0P->nameType.msgtl_header.msgt_longform != TRUE) ||
- (In0P->nameType.msgtl_name != 12) ||
- (In0P->nameType.msgtl_number != 1) ||
- (In0P->nameType.msgtl_size != 1024))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = ds_device_open(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->mode, In0P->name, &OutP->device, &devicePoly);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- msgh_simple = TRUE;
- OutP->Head.msgh_size = 40;
-
- OutP->deviceType = deviceType;
-
- if (MACH_MSG_TYPE_PORT_ANY(devicePoly))
- msgh_simple = FALSE;
-
- OutP->deviceType.msgt_name = devicePoly;
-
- if (!msgh_simple)
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-}
-
-/* Routine device_close */
-mig_internal void _Xdevice_close
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t ds_device_close
- (mach_port_t device);
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = ds_device_close(In0P->Head.msgh_request_port);
-}
-
-/* Routine device_write */
-mig_internal void _Xdevice_write
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t modeType;
- dev_mode_t mode;
- mach_msg_type_t recnumType;
- recnum_t recnum;
- mach_msg_type_long_t dataType;
- io_buf_ptr_t data;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t bytes_writtenType;
- int bytes_written;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t ds_device_write
- (mach_port_t device, mach_port_t reply_port, mach_msg_type_name_t reply_portPoly, dev_mode_t mode, recnum_t recnum, io_buf_ptr_t data, mach_msg_type_number_t dataCnt, int *bytes_written);
-
- auto const mach_msg_type_t modeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t recnumCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t bytes_writtenType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 56) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->modeType, &modeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->recnumType, &recnumCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->dataType.msgtl_header.msgt_inline != FALSE) ||
- (In0P->dataType.msgtl_header.msgt_longform != TRUE) ||
- (In0P->dataType.msgtl_name != 9) ||
- (In0P->dataType.msgtl_size != 8))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = ds_device_write(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->mode, In0P->recnum, In0P->data, In0P->dataType.msgtl_number, &OutP->bytes_written);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 40;
-
- OutP->bytes_writtenType = bytes_writtenType;
-}
-
-/* Routine device_write_inband */
-mig_internal void _Xdevice_write_inband
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t modeType;
- dev_mode_t mode;
- mach_msg_type_t recnumType;
- recnum_t recnum;
- mach_msg_type_t dataType;
- char data[128];
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t bytes_writtenType;
- int bytes_written;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t ds_device_write_inband
- (mach_port_t device, mach_port_t reply_port, mach_msg_type_name_t reply_portPoly, dev_mode_t mode, recnum_t recnum, io_buf_ptr_inband_t data, mach_msg_type_number_t dataCnt, int *bytes_written);
-
- unsigned int msgh_size;
-
- auto const mach_msg_type_t modeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t recnumCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t bytes_writtenType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- msgh_size = In0P->Head.msgh_size;
- if ((msgh_size < 44) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->modeType, &modeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->recnumType, &recnumCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->dataType.msgt_inline != TRUE) ||
- (In0P->dataType.msgt_longform != FALSE) ||
- (In0P->dataType.msgt_name != 8) ||
- (In0P->dataType.msgt_size != 8))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (msgh_size != 44 + ((In0P->dataType.msgt_number + 3) & ~3))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = ds_device_write_inband(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->mode, In0P->recnum, In0P->data, In0P->dataType.msgt_number, &OutP->bytes_written);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 40;
-
- OutP->bytes_writtenType = bytes_writtenType;
-}
-
-/* Routine device_read */
-mig_internal void _Xdevice_read
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t modeType;
- dev_mode_t mode;
- mach_msg_type_t recnumType;
- recnum_t recnum;
- mach_msg_type_t bytes_wantedType;
- int bytes_wanted;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_long_t dataType;
- io_buf_ptr_t data;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t ds_device_read
- (mach_port_t device, mach_port_t reply_port, mach_msg_type_name_t reply_portPoly, dev_mode_t mode, recnum_t recnum, int bytes_wanted, io_buf_ptr_t *data, mach_msg_type_number_t *dataCnt);
-
- auto const mach_msg_type_t modeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t recnumCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t bytes_wantedCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_long_t dataType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ FALSE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 9,
- /* msgtl_size = */ 8,
- /* msgtl_number = */ 0,
- };
-
- mach_msg_type_number_t dataCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 48) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->modeType, &modeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->recnumType, &recnumCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->bytes_wantedType, &bytes_wantedCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = ds_device_read(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->mode, In0P->recnum, In0P->bytes_wanted, &OutP->data, &dataCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
- OutP->Head.msgh_size = 48;
-
- OutP->dataType = dataType;
-
- OutP->dataType.msgtl_number = dataCnt;
-}
-
-/* Routine device_read_inband */
-mig_internal void _Xdevice_read_inband
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t modeType;
- dev_mode_t mode;
- mach_msg_type_t recnumType;
- recnum_t recnum;
- mach_msg_type_t bytes_wantedType;
- int bytes_wanted;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t dataType;
- char data[128];
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t ds_device_read_inband
- (mach_port_t device, mach_port_t reply_port, mach_msg_type_name_t reply_portPoly, dev_mode_t mode, recnum_t recnum, int bytes_wanted, io_buf_ptr_inband_t data, mach_msg_type_number_t *dataCnt);
-
- auto const mach_msg_type_t modeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t recnumCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t bytes_wantedCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t dataType = {
- /* msgt_name = */ 8,
- /* msgt_size = */ 8,
- /* msgt_number = */ 128,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- mach_msg_type_number_t dataCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 48) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->modeType, &modeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->recnumType, &recnumCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->bytes_wantedType, &bytes_wantedCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- dataCnt = 128;
-
- OutP->RetCode = ds_device_read_inband(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->mode, In0P->recnum, In0P->bytes_wanted, OutP->data, &dataCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->dataType = dataType;
-
- OutP->dataType.msgt_number = dataCnt;
- OutP->Head.msgh_size = 36 + ((dataCnt + 3) & ~3);
-}
-
-/* Routine xxx_device_set_status */
-mig_internal void _Xxxx_device_set_status
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t flavorType;
- dev_flavor_t flavor;
- mach_msg_type_long_t statusType;
- int status[1024];
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t ds_xxx_device_set_status
- (mach_port_t device, dev_flavor_t flavor, dev_status_t status, mach_msg_type_number_t statusCnt);
-
- unsigned int msgh_size;
-
- auto const mach_msg_type_t flavorCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- msgh_size = In0P->Head.msgh_size;
- if ((msgh_size < 44) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->flavorType, &flavorCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->statusType.msgtl_header.msgt_inline != TRUE) ||
- (In0P->statusType.msgtl_header.msgt_longform != TRUE) ||
- (In0P->statusType.msgtl_name != 2) ||
- (In0P->statusType.msgtl_size != 32))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (msgh_size != 44 + (4 * In0P->statusType.msgtl_number))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = ds_xxx_device_set_status(In0P->Head.msgh_request_port, In0P->flavor, In0P->status, In0P->statusType.msgtl_number);
-}
-
-/* Routine xxx_device_get_status */
-mig_internal void _Xxxx_device_get_status
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t flavorType;
- dev_flavor_t flavor;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_long_t statusType;
- int status[1024];
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t ds_xxx_device_get_status
- (mach_port_t device, dev_flavor_t flavor, dev_status_t status, mach_msg_type_number_t *statusCnt);
-
- auto const mach_msg_type_t flavorCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_long_t statusType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 2,
- /* msgtl_size = */ 32,
- /* msgtl_number = */ 1024,
- };
-
- mach_msg_type_number_t statusCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->flavorType, &flavorCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- statusCnt = 1024;
-
- OutP->RetCode = ds_xxx_device_get_status(In0P->Head.msgh_request_port, In0P->flavor, OutP->status, &statusCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->statusType = statusType;
-
- OutP->statusType.msgtl_number = statusCnt;
- OutP->Head.msgh_size = 44 + (4 * statusCnt);
-}
-
-/* Routine xxx_device_set_filter */
-mig_internal void _Xxxx_device_set_filter
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t receive_portType;
- mach_port_t receive_port;
- mach_msg_type_t priorityType;
- int priority;
- mach_msg_type_long_t filterType;
- filter_t filter[128];
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t ds_xxx_device_set_filter
- (mach_port_t device, mach_port_t receive_port, int priority, filter_array_t filter, mach_msg_type_number_t filterCnt);
-
- unsigned int msgh_size;
-
- auto const mach_msg_type_t receive_portCheck = {
- /* msgt_name = */ 17,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t priorityCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- msgh_size = In0P->Head.msgh_size;
- if ((msgh_size < 52) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->receive_portType, &receive_portCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->priorityType, &priorityCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->filterType.msgtl_header.msgt_inline != TRUE) ||
- (In0P->filterType.msgtl_header.msgt_longform != TRUE) ||
- (In0P->filterType.msgtl_name != 1) ||
- (In0P->filterType.msgtl_size != 16))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (msgh_size != 52 + ((2 * In0P->filterType.msgtl_number + 3) & ~3))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = ds_xxx_device_set_filter(In0P->Head.msgh_request_port, In0P->receive_port, In0P->priority, In0P->filter, In0P->filterType.msgtl_number);
-}
-
-/* Routine device_map */
-mig_internal void _Xdevice_map
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t protType;
- vm_prot_t prot;
- mach_msg_type_t offsetType;
- vm_offset_t offset;
- mach_msg_type_t sizeType;
- vm_size_t size;
- mach_msg_type_t unmapType;
- int unmap;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t pagerType;
- mach_port_t pager;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t ds_device_map
- (mach_port_t device, vm_prot_t prot, vm_offset_t offset, vm_size_t size, mach_port_t *pager, int unmap);
-
- auto const mach_msg_type_t protCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t offsetCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t sizeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t unmapCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t pagerType = {
- /* msgt_name = */ 19,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 56) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->protType, &protCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->offsetType, &offsetCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->sizeType, &sizeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->unmapType, &unmapCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = ds_device_map(In0P->Head.msgh_request_port, In0P->prot, In0P->offset, In0P->size, &OutP->pager, In0P->unmap);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
- OutP->Head.msgh_size = 40;
-
- OutP->pagerType = pagerType;
-}
-
-/* Routine device_set_status */
-mig_internal void _Xdevice_set_status
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t flavorType;
- dev_flavor_t flavor;
- mach_msg_type_t statusType;
- int status[1024];
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t ds_device_set_status
- (mach_port_t device, dev_flavor_t flavor, dev_status_t status, mach_msg_type_number_t statusCnt);
-
- unsigned int msgh_size;
-
- auto const mach_msg_type_t flavorCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- msgh_size = In0P->Head.msgh_size;
- if ((msgh_size < 36) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->flavorType, &flavorCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->statusType.msgt_inline != TRUE) ||
- (In0P->statusType.msgt_longform != FALSE) ||
- (In0P->statusType.msgt_name != 2) ||
- (In0P->statusType.msgt_size != 32))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (msgh_size != 36 + (4 * In0P->statusType.msgt_number))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = ds_device_set_status(In0P->Head.msgh_request_port, In0P->flavor, In0P->status, In0P->statusType.msgt_number);
-}
-
-/* Routine device_get_status */
-mig_internal void _Xdevice_get_status
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t flavorType;
- dev_flavor_t flavor;
- mach_msg_type_t statusCntType;
- mach_msg_type_number_t statusCnt;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t statusType;
- int status[1024];
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t ds_device_get_status
- (mach_port_t device, dev_flavor_t flavor, dev_status_t status, mach_msg_type_number_t *statusCnt);
-
- auto const mach_msg_type_t flavorCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t statusCntCheck = {
- /* msgt_name = */ MACH_MSG_TYPE_INTEGER_32,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t statusType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1024,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- mach_msg_type_number_t statusCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->flavorType, &flavorCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->statusCntType, &statusCntCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- statusCnt = 1024;
- if (In0P->statusCnt < statusCnt)
- statusCnt = In0P->statusCnt;
-
- OutP->RetCode = ds_device_get_status(In0P->Head.msgh_request_port, In0P->flavor, OutP->status, &statusCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->statusType = statusType;
-
- OutP->statusType.msgt_number = statusCnt;
- OutP->Head.msgh_size = 36 + (4 * statusCnt);
-}
-
-/* Routine device_set_filter */
-mig_internal void _Xdevice_set_filter
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t receive_portType;
- mach_port_t receive_port;
- mach_msg_type_t priorityType;
- int priority;
- mach_msg_type_t filterType;
- filter_t filter[128];
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t ds_device_set_filter
- (mach_port_t device, mach_port_t receive_port, int priority, filter_array_t filter, mach_msg_type_number_t filterCnt);
-
- unsigned int msgh_size;
-
- auto const mach_msg_type_t receive_portCheck = {
- /* msgt_name = */ 17,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t priorityCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- msgh_size = In0P->Head.msgh_size;
- if ((msgh_size < 44) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->receive_portType, &receive_portCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->priorityType, &priorityCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->filterType.msgt_inline != TRUE) ||
- (In0P->filterType.msgt_longform != FALSE) ||
- (In0P->filterType.msgt_name != 1) ||
- (In0P->filterType.msgt_size != 16))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (msgh_size != 44 + ((2 * In0P->filterType.msgt_number + 3) & ~3))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = ds_device_set_filter(In0P->Head.msgh_request_port, In0P->receive_port, In0P->priority, In0P->filter, In0P->filterType.msgt_number);
-}
-
-static mig_routine_t device_server_routines[] = {
- _Xdevice_open,
- _Xdevice_close,
- _Xdevice_write,
- _Xdevice_write_inband,
- _Xdevice_read,
- _Xdevice_read_inband,
- _Xxxx_device_set_status,
- _Xxxx_device_get_status,
- _Xxxx_device_set_filter,
- _Xdevice_map,
- _Xdevice_set_status,
- _Xdevice_get_status,
- _Xdevice_set_filter,
-};
-
-mig_external boolean_t device_server
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- register mach_msg_header_t *InP = InHeadP;
- register mig_reply_header_t *OutP = (mig_reply_header_t *) OutHeadP;
-
- auto const mach_msg_type_t RetCodeType = {
- /* msgt_name = */ MACH_MSG_TYPE_INTEGER_32,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- register mig_routine_t routine;
-
- OutP->Head.msgh_bits = MACH_MSGH_BITS(MACH_MSGH_BITS_REPLY(InP->msgh_bits), 0);
- OutP->Head.msgh_size = sizeof *OutP;
- OutP->Head.msgh_remote_port = InP->msgh_reply_port;
- OutP->Head.msgh_local_port = MACH_PORT_NULL;
- OutP->Head.msgh_seqno = 0;
- OutP->Head.msgh_id = InP->msgh_id + 100;
-
- OutP->RetCodeType = RetCodeType;
-
- if ((InP->msgh_id > 2812) || (InP->msgh_id < 2800) ||
- ((routine = device_server_routines[InP->msgh_id - 2800]) == 0)) {
- OutP->RetCode = MIG_BAD_ID;
- return FALSE;
- }
- (*routine) (InP, &OutP->Head);
- return TRUE;
-}
-
-mig_external mig_routine_t device_server_routine
- (const mach_msg_header_t *InHeadP)
-{
- register int msgh_id;
-
- msgh_id = InHeadP->msgh_id - 2800;
-
- if ((msgh_id > 12) || (msgh_id < 0))
- return 0;
-
- return device_server_routines[msgh_id];
-}
-
diff --git a/boot-proxy-exc/ourmachServer.c b/boot-proxy-exc/ourmachServer.c
deleted file mode 100644
index eb14a139..00000000
--- a/boot-proxy-exc/ourmachServer.c
+++ /dev/null
@@ -1,4186 +0,0 @@
-/* Module mach */
-
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE 1
-#endif
-
-#define EXPORT_BOOLEAN
-#include <mach/boolean.h>
-#include <mach/kern_return.h>
-#include <mach/message.h>
-#include <mach/mig_errors.h>
-#include <mach/mig_support.h>
-
-#ifndef mig_internal
-#define mig_internal static
-#endif
-
-#ifndef mig_external
-#define mig_external
-#endif
-
-#ifndef TypeCheck
-#define TypeCheck 1
-#endif
-
-#ifndef UseExternRCSId
-#define UseExternRCSId 1
-#endif
-
-#define BAD_TYPECHECK(type, check) ({\
- union { mach_msg_type_t t; unsigned32_t w; } _t, _c;\
- _t.t = *(type); _c.t = *(check); _t.w != _c.w; })
-#define msgh_request_port msgh_local_port
-#define MACH_MSGH_BITS_REQUEST(bits) MACH_MSGH_BITS_LOCAL(bits)
-#define msgh_reply_port msgh_remote_port
-#define MACH_MSGH_BITS_REPLY(bits) MACH_MSGH_BITS_REMOTE(bits)
-
-#include <mach/std_types.h>
-#include <mach/mach_types.h>
-
-/* Routine task_create */
-mig_internal void _Xtask_create
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t inherit_memoryType;
- boolean_t inherit_memory;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t child_taskType;
- mach_port_t child_task;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_task_create
- (mach_port_t target_task, boolean_t inherit_memory, mach_port_t *child_task, mach_msg_type_name_t *child_taskPoly);
-
- boolean_t msgh_simple;
- auto const mach_msg_type_t inherit_memoryCheck = {
- /* msgt_name = */ 0,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t child_taskType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- mach_msg_type_name_t child_taskPoly;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->inherit_memoryType, &inherit_memoryCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_task_create(In0P->Head.msgh_request_port, In0P->inherit_memory, &OutP->child_task, &child_taskPoly);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- msgh_simple = TRUE;
- OutP->Head.msgh_size = 40;
-
- OutP->child_taskType = child_taskType;
-
- if (MACH_MSG_TYPE_PORT_ANY(child_taskPoly))
- msgh_simple = FALSE;
-
- OutP->child_taskType.msgt_name = child_taskPoly;
-
- if (!msgh_simple)
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-}
-
-/* Routine task_terminate */
-mig_internal void _Xtask_terminate
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_task_terminate
- (mach_port_t target_task);
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_task_terminate(In0P->Head.msgh_request_port);
-}
-
-/* Routine task_get_emulation_vector */
-mig_internal void _Xtask_get_emulation_vector
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t vector_startType;
- int vector_start;
- mach_msg_type_long_t emulation_vectorType;
- emulation_vector_t emulation_vector;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_task_get_emulation_vector
- (mach_port_t task, int *vector_start, emulation_vector_t *emulation_vector, mach_msg_type_number_t *emulation_vectorCnt);
-
- auto const mach_msg_type_t vector_startType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_long_t emulation_vectorType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ FALSE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 2,
- /* msgtl_size = */ 32,
- /* msgtl_number = */ 0,
- };
-
- mach_msg_type_number_t emulation_vectorCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_task_get_emulation_vector(In0P->Head.msgh_request_port, &OutP->vector_start, &OutP->emulation_vector, &emulation_vectorCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
- OutP->Head.msgh_size = 56;
-
- OutP->vector_startType = vector_startType;
-
- OutP->emulation_vectorType = emulation_vectorType;
-
- OutP->emulation_vectorType.msgtl_number = emulation_vectorCnt;
-}
-
-/* Routine task_set_emulation_vector */
-mig_internal void _Xtask_set_emulation_vector
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t vector_startType;
- int vector_start;
- mach_msg_type_long_t emulation_vectorType;
- emulation_vector_t emulation_vector;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_task_set_emulation_vector
- (mach_port_t task, int vector_start, emulation_vector_t emulation_vector, mach_msg_type_number_t emulation_vectorCnt);
-
- auto const mach_msg_type_t vector_startCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 48) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->vector_startType, &vector_startCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->emulation_vectorType.msgtl_header.msgt_inline != FALSE) ||
- (In0P->emulation_vectorType.msgtl_header.msgt_longform != TRUE) ||
- (In0P->emulation_vectorType.msgtl_name != 2) ||
- (In0P->emulation_vectorType.msgtl_size != 32))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_task_set_emulation_vector(In0P->Head.msgh_request_port, In0P->vector_start, In0P->emulation_vector, In0P->emulation_vectorType.msgtl_number);
-}
-
-/* Routine task_threads */
-mig_internal void _Xtask_threads
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_long_t thread_listType;
- thread_array_t thread_list;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_task_threads
- (mach_port_t target_task, thread_array_t *thread_list, mach_msg_type_number_t *thread_listCnt);
-
- auto const mach_msg_type_long_t thread_listType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ FALSE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ TRUE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 17,
- /* msgtl_size = */ 32,
- /* msgtl_number = */ 0,
- };
-
- mach_msg_type_number_t thread_listCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_task_threads(In0P->Head.msgh_request_port, &OutP->thread_list, &thread_listCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
- OutP->Head.msgh_size = 48;
-
- OutP->thread_listType = thread_listType;
-
- OutP->thread_listType.msgtl_number = thread_listCnt;
-}
-
-/* Routine task_info */
-mig_internal void _Xtask_info
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t flavorType;
- int flavor;
- mach_msg_type_t task_info_outCntType;
- mach_msg_type_number_t task_info_outCnt;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t task_info_outType;
- natural_t task_info_out[1024];
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_task_info
- (mach_port_t target_task, int flavor, task_info_t task_info_out, mach_msg_type_number_t *task_info_outCnt);
-
- auto const mach_msg_type_t flavorCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t task_info_outCntCheck = {
- /* msgt_name = */ MACH_MSG_TYPE_INTEGER_32,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t task_info_outType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1024,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- mach_msg_type_number_t task_info_outCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->flavorType, &flavorCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->task_info_outCntType, &task_info_outCntCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- task_info_outCnt = 1024;
- if (In0P->task_info_outCnt < task_info_outCnt)
- task_info_outCnt = In0P->task_info_outCnt;
-
- OutP->RetCode = S_task_info(In0P->Head.msgh_request_port, In0P->flavor, OutP->task_info_out, &task_info_outCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->task_info_outType = task_info_outType;
-
- OutP->task_info_outType.msgt_number = task_info_outCnt;
- OutP->Head.msgh_size = 36 + (4 * task_info_outCnt);
-}
-
-/* Routine thread_terminate */
-mig_internal void _Xthread_terminate
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_thread_terminate
- (mach_port_t target_thread);
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_thread_terminate(In0P->Head.msgh_request_port);
-}
-
-/* Routine thread_get_state */
-mig_internal void _Xthread_get_state
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t flavorType;
- int flavor;
- mach_msg_type_t old_stateCntType;
- mach_msg_type_number_t old_stateCnt;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t old_stateType;
- natural_t old_state[1024];
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_thread_get_state
- (mach_port_t target_thread, int flavor, thread_state_t old_state, mach_msg_type_number_t *old_stateCnt);
-
- auto const mach_msg_type_t flavorCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t old_stateCntCheck = {
- /* msgt_name = */ MACH_MSG_TYPE_INTEGER_32,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t old_stateType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1024,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- mach_msg_type_number_t old_stateCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->flavorType, &flavorCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->old_stateCntType, &old_stateCntCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- old_stateCnt = 1024;
- if (In0P->old_stateCnt < old_stateCnt)
- old_stateCnt = In0P->old_stateCnt;
-
- OutP->RetCode = S_thread_get_state(In0P->Head.msgh_request_port, In0P->flavor, OutP->old_state, &old_stateCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->old_stateType = old_stateType;
-
- OutP->old_stateType.msgt_number = old_stateCnt;
- OutP->Head.msgh_size = 36 + (4 * old_stateCnt);
-}
-
-/* Routine thread_set_state */
-mig_internal void _Xthread_set_state
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t flavorType;
- int flavor;
- mach_msg_type_t new_stateType;
- natural_t new_state[1024];
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_thread_set_state
- (mach_port_t target_thread, int flavor, thread_state_t new_state, mach_msg_type_number_t new_stateCnt);
-
- unsigned int msgh_size;
-
- auto const mach_msg_type_t flavorCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- msgh_size = In0P->Head.msgh_size;
- if ((msgh_size < 36) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->flavorType, &flavorCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->new_stateType.msgt_inline != TRUE) ||
- (In0P->new_stateType.msgt_longform != FALSE) ||
- (In0P->new_stateType.msgt_name != 2) ||
- (In0P->new_stateType.msgt_size != 32))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (msgh_size != 36 + (4 * In0P->new_stateType.msgt_number))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_thread_set_state(In0P->Head.msgh_request_port, In0P->flavor, In0P->new_state, In0P->new_stateType.msgt_number);
-}
-
-/* Routine thread_info */
-mig_internal void _Xthread_info
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t flavorType;
- int flavor;
- mach_msg_type_t thread_info_outCntType;
- mach_msg_type_number_t thread_info_outCnt;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t thread_info_outType;
- natural_t thread_info_out[1024];
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_thread_info
- (mach_port_t target_thread, int flavor, thread_info_t thread_info_out, mach_msg_type_number_t *thread_info_outCnt);
-
- auto const mach_msg_type_t flavorCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t thread_info_outCntCheck = {
- /* msgt_name = */ MACH_MSG_TYPE_INTEGER_32,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t thread_info_outType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1024,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- mach_msg_type_number_t thread_info_outCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->flavorType, &flavorCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->thread_info_outCntType, &thread_info_outCntCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- thread_info_outCnt = 1024;
- if (In0P->thread_info_outCnt < thread_info_outCnt)
- thread_info_outCnt = In0P->thread_info_outCnt;
-
- OutP->RetCode = S_thread_info(In0P->Head.msgh_request_port, In0P->flavor, OutP->thread_info_out, &thread_info_outCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->thread_info_outType = thread_info_outType;
-
- OutP->thread_info_outType.msgt_number = thread_info_outCnt;
- OutP->Head.msgh_size = 36 + (4 * thread_info_outCnt);
-}
-
-/* Routine vm_allocate */
-mig_internal void _Xvm_allocate
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t addressType;
- vm_address_t address;
- mach_msg_type_t sizeType;
- vm_size_t size;
- mach_msg_type_t anywhereType;
- boolean_t anywhere;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t addressType;
- vm_address_t address;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_vm_allocate
- (mach_port_t target_task, vm_address_t *address, vm_size_t size, boolean_t anywhere);
-
- auto const mach_msg_type_t addressCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t sizeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t anywhereCheck = {
- /* msgt_name = */ 0,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t addressType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 48) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->addressType, &addressCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->sizeType, &sizeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->anywhereType, &anywhereCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_vm_allocate(In0P->Head.msgh_request_port, &In0P->address, In0P->size, In0P->anywhere);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 40;
-
- OutP->addressType = addressType;
-
- OutP->address = In0P->address;
-}
-
-/* Routine vm_deallocate */
-mig_internal void _Xvm_deallocate
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t addressType;
- vm_address_t address;
- mach_msg_type_t sizeType;
- vm_size_t size;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_vm_deallocate
- (mach_port_t target_task, vm_address_t address, vm_size_t size);
-
- auto const mach_msg_type_t addressCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t sizeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->addressType, &addressCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->sizeType, &sizeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_vm_deallocate(In0P->Head.msgh_request_port, In0P->address, In0P->size);
-}
-
-/* Routine vm_protect */
-mig_internal void _Xvm_protect
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t addressType;
- vm_address_t address;
- mach_msg_type_t sizeType;
- vm_size_t size;
- mach_msg_type_t set_maximumType;
- boolean_t set_maximum;
- mach_msg_type_t new_protectionType;
- vm_prot_t new_protection;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_vm_protect
- (mach_port_t target_task, vm_address_t address, vm_size_t size, boolean_t set_maximum, vm_prot_t new_protection);
-
- auto const mach_msg_type_t addressCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t sizeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t set_maximumCheck = {
- /* msgt_name = */ 0,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t new_protectionCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 56) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->addressType, &addressCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->sizeType, &sizeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->set_maximumType, &set_maximumCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->new_protectionType, &new_protectionCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_vm_protect(In0P->Head.msgh_request_port, In0P->address, In0P->size, In0P->set_maximum, In0P->new_protection);
-}
-
-/* Routine vm_inherit */
-mig_internal void _Xvm_inherit
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t addressType;
- vm_address_t address;
- mach_msg_type_t sizeType;
- vm_size_t size;
- mach_msg_type_t new_inheritanceType;
- vm_inherit_t new_inheritance;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_vm_inherit
- (mach_port_t target_task, vm_address_t address, vm_size_t size, vm_inherit_t new_inheritance);
-
- auto const mach_msg_type_t addressCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t sizeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t new_inheritanceCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 48) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->addressType, &addressCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->sizeType, &sizeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->new_inheritanceType, &new_inheritanceCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_vm_inherit(In0P->Head.msgh_request_port, In0P->address, In0P->size, In0P->new_inheritance);
-}
-
-/* Routine vm_read */
-mig_internal void _Xvm_read
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t addressType;
- vm_address_t address;
- mach_msg_type_t sizeType;
- vm_size_t size;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_long_t dataType;
- vm_offset_t data;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_vm_read
- (mach_port_t target_task, vm_address_t address, vm_size_t size, vm_offset_t *data, mach_msg_type_number_t *dataCnt);
-
- auto const mach_msg_type_t addressCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t sizeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_long_t dataType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ FALSE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ TRUE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 9,
- /* msgtl_size = */ 8,
- /* msgtl_number = */ 0,
- };
-
- mach_msg_type_number_t dataCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->addressType, &addressCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->sizeType, &sizeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_vm_read(In0P->Head.msgh_request_port, In0P->address, In0P->size, &OutP->data, &dataCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
- OutP->Head.msgh_size = 48;
-
- OutP->dataType = dataType;
-
- OutP->dataType.msgtl_number = dataCnt;
-}
-
-/* Routine vm_write */
-mig_internal void _Xvm_write
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t addressType;
- vm_address_t address;
- mach_msg_type_long_t dataType;
- vm_offset_t data;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_vm_write
- (mach_port_t target_task, vm_address_t address, vm_offset_t data, mach_msg_type_number_t dataCnt);
-
- auto const mach_msg_type_t addressCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 48) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->addressType, &addressCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->dataType.msgtl_header.msgt_inline != FALSE) ||
- (In0P->dataType.msgtl_header.msgt_longform != TRUE) ||
- (In0P->dataType.msgtl_name != 9) ||
- (In0P->dataType.msgtl_size != 8))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_vm_write(In0P->Head.msgh_request_port, In0P->address, In0P->data, In0P->dataType.msgtl_number);
-}
-
-/* Routine vm_copy */
-mig_internal void _Xvm_copy
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t source_addressType;
- vm_address_t source_address;
- mach_msg_type_t sizeType;
- vm_size_t size;
- mach_msg_type_t dest_addressType;
- vm_address_t dest_address;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_vm_copy
- (mach_port_t target_task, vm_address_t source_address, vm_size_t size, vm_address_t dest_address);
-
- auto const mach_msg_type_t source_addressCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t sizeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t dest_addressCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 48) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->source_addressType, &source_addressCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->sizeType, &sizeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->dest_addressType, &dest_addressCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_vm_copy(In0P->Head.msgh_request_port, In0P->source_address, In0P->size, In0P->dest_address);
-}
-
-/* Routine vm_region */
-mig_internal void _Xvm_region
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t addressType;
- vm_address_t address;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t addressType;
- vm_address_t address;
- mach_msg_type_t sizeType;
- vm_size_t size;
- mach_msg_type_t protectionType;
- vm_prot_t protection;
- mach_msg_type_t max_protectionType;
- vm_prot_t max_protection;
- mach_msg_type_t inheritanceType;
- vm_inherit_t inheritance;
- mach_msg_type_t is_sharedType;
- boolean_t is_shared;
- mach_msg_type_t object_nameType;
- mach_port_t object_name;
- mach_msg_type_t offsetType;
- vm_offset_t offset;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_vm_region
- (mach_port_t target_task, vm_address_t *address, vm_size_t *size, vm_prot_t *protection, vm_prot_t *max_protection, vm_inherit_t *inheritance, boolean_t *is_shared, mach_port_t *object_name, vm_offset_t *offset);
-
- auto const mach_msg_type_t addressCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t addressType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t sizeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t protectionType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t max_protectionType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t inheritanceType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t is_sharedType = {
- /* msgt_name = */ 0,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t object_nameType = {
- /* msgt_name = */ 19,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t offsetType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->addressType, &addressCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_vm_region(In0P->Head.msgh_request_port, &In0P->address, &OutP->size, &OutP->protection, &OutP->max_protection, &OutP->inheritance, &OutP->is_shared, &OutP->object_name, &OutP->offset);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
- OutP->Head.msgh_size = 96;
-
- OutP->addressType = addressType;
-
- OutP->address = In0P->address;
-
- OutP->sizeType = sizeType;
-
- OutP->protectionType = protectionType;
-
- OutP->max_protectionType = max_protectionType;
-
- OutP->inheritanceType = inheritanceType;
-
- OutP->is_sharedType = is_sharedType;
-
- OutP->object_nameType = object_nameType;
-
- OutP->offsetType = offsetType;
-}
-
-/* Routine vm_statistics */
-mig_internal void _Xvm_statistics
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t vm_statsType;
- vm_statistics_data_t vm_stats;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_vm_statistics
- (mach_port_t target_task, vm_statistics_data_t *vm_stats);
-
- auto const mach_msg_type_t vm_statsType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 13,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_vm_statistics(In0P->Head.msgh_request_port, &OutP->vm_stats);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 88;
-
- OutP->vm_statsType = vm_statsType;
-}
-
-/* Routine mach_ports_register */
-mig_internal void _Xmach_ports_register
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_long_t init_port_setType;
- mach_port_array_t init_port_set;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_mach_ports_register
- (mach_port_t target_task, mach_port_array_t init_port_set, mach_msg_type_number_t init_port_setCnt);
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->init_port_setType.msgtl_header.msgt_inline != FALSE) ||
- (In0P->init_port_setType.msgtl_header.msgt_longform != TRUE) ||
- (In0P->init_port_setType.msgtl_name != 17) ||
- (In0P->init_port_setType.msgtl_size != 32))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_mach_ports_register(In0P->Head.msgh_request_port, In0P->init_port_set, In0P->init_port_setType.msgtl_number);
-}
-
-/* Routine mach_ports_lookup */
-mig_internal void _Xmach_ports_lookup
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_long_t init_port_setType;
- mach_port_array_t init_port_set;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_mach_ports_lookup
- (mach_port_t target_task, mach_port_array_t *init_port_set, mach_msg_type_number_t *init_port_setCnt);
-
- auto const mach_msg_type_long_t init_port_setType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ FALSE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 19,
- /* msgtl_size = */ 32,
- /* msgtl_number = */ 0,
- };
-
- mach_msg_type_number_t init_port_setCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_mach_ports_lookup(In0P->Head.msgh_request_port, &OutP->init_port_set, &init_port_setCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
- OutP->Head.msgh_size = 48;
-
- OutP->init_port_setType = init_port_setType;
-
- OutP->init_port_setType.msgtl_number = init_port_setCnt;
-}
-
-/* SimpleRoutine memory_object_data_provided */
-mig_internal void _Xmemory_object_data_provided
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t offsetType;
- vm_offset_t offset;
- mach_msg_type_long_t dataType;
- vm_offset_t data;
- mach_msg_type_t lock_valueType;
- vm_prot_t lock_value;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_memory_object_data_provided
- (mach_port_t memory_control, vm_offset_t offset, vm_offset_t data, mach_msg_type_number_t dataCnt, vm_prot_t lock_value);
-
- auto const mach_msg_type_t offsetCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t lock_valueCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 56) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->offsetType, &offsetCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->dataType.msgtl_header.msgt_inline != FALSE) ||
- (In0P->dataType.msgtl_header.msgt_longform != TRUE) ||
- (In0P->dataType.msgtl_name != 9) ||
- (In0P->dataType.msgtl_size != 8))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->lock_valueType, &lock_valueCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_memory_object_data_provided(In0P->Head.msgh_request_port, In0P->offset, In0P->data, In0P->dataType.msgtl_number, In0P->lock_value);
-}
-
-/* SimpleRoutine memory_object_data_unavailable */
-mig_internal void _Xmemory_object_data_unavailable
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t offsetType;
- vm_offset_t offset;
- mach_msg_type_t sizeType;
- vm_size_t size;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_memory_object_data_unavailable
- (mach_port_t memory_control, vm_offset_t offset, vm_size_t size);
-
- auto const mach_msg_type_t offsetCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t sizeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->offsetType, &offsetCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->sizeType, &sizeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_memory_object_data_unavailable(In0P->Head.msgh_request_port, In0P->offset, In0P->size);
-}
-
-/* Routine memory_object_get_attributes */
-mig_internal void _Xmemory_object_get_attributes
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t object_readyType;
- boolean_t object_ready;
- mach_msg_type_t may_cacheType;
- boolean_t may_cache;
- mach_msg_type_t copy_strategyType;
- memory_object_copy_strategy_t copy_strategy;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_memory_object_get_attributes
- (mach_port_t memory_control, boolean_t *object_ready, boolean_t *may_cache, memory_object_copy_strategy_t *copy_strategy);
-
- auto const mach_msg_type_t object_readyType = {
- /* msgt_name = */ 0,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t may_cacheType = {
- /* msgt_name = */ 0,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t copy_strategyType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_memory_object_get_attributes(In0P->Head.msgh_request_port, &OutP->object_ready, &OutP->may_cache, &OutP->copy_strategy);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 56;
-
- OutP->object_readyType = object_readyType;
-
- OutP->may_cacheType = may_cacheType;
-
- OutP->copy_strategyType = copy_strategyType;
-}
-
-/* Routine vm_set_default_memory_manager */
-mig_internal void _Xvm_set_default_memory_manager
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t default_managerType;
- mach_port_t default_manager;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t default_managerType;
- mach_port_t default_manager;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_vm_set_default_memory_manager
- (mach_port_t host_priv, mach_port_t *default_manager);
-
- auto const mach_msg_type_t default_managerCheck = {
- /* msgt_name = */ 17,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t default_managerType = {
- /* msgt_name = */ 19,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->default_managerType, &default_managerCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_vm_set_default_memory_manager(In0P->Head.msgh_request_port, &In0P->default_manager);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
- OutP->Head.msgh_size = 40;
-
- OutP->default_managerType = default_managerType;
-
- OutP->default_manager = In0P->default_manager;
-}
-
-/* SimpleRoutine xxx_memory_object_lock_request */
-mig_internal void _Xxxx_memory_object_lock_request
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t offsetType;
- vm_offset_t offset;
- mach_msg_type_t sizeType;
- vm_size_t size;
- mach_msg_type_t should_cleanType;
- boolean_t should_clean;
- mach_msg_type_t should_flushType;
- boolean_t should_flush;
- mach_msg_type_t lock_valueType;
- vm_prot_t lock_value;
- mach_msg_type_t reply_toType;
- mach_port_t reply_to;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_xxx_memory_object_lock_request
- (mach_port_t memory_control, vm_offset_t offset, vm_size_t size, boolean_t should_clean, boolean_t should_flush, vm_prot_t lock_value, mach_port_t reply_to, mach_msg_type_name_t reply_toPoly);
-
-#if TypeCheck
- boolean_t msgh_simple;
-#endif /* TypeCheck */
-
- auto const mach_msg_type_t offsetCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t sizeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t should_cleanCheck = {
- /* msgt_name = */ 0,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t should_flushCheck = {
- /* msgt_name = */ 0,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t lock_valueCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- msgh_simple = !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX);
- if ((In0P->Head.msgh_size != 72))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->offsetType, &offsetCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->sizeType, &sizeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->should_cleanType, &should_cleanCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->should_flushType, &should_flushCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->lock_valueType, &lock_valueCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->reply_toType.msgt_inline != TRUE) ||
- (In0P->reply_toType.msgt_longform != FALSE) ||
- (MACH_MSG_TYPE_PORT_ANY(In0P->reply_toType.msgt_name) && msgh_simple) ||
- (In0P->reply_toType.msgt_number != 1) ||
- (In0P->reply_toType.msgt_size != 32))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_xxx_memory_object_lock_request(In0P->Head.msgh_request_port, In0P->offset, In0P->size, In0P->should_clean, In0P->should_flush, In0P->lock_value, In0P->reply_to, In0P->reply_toType.msgt_name);
-}
-
-/* SimpleRoutine memory_object_lock_request */
-mig_internal void _Xmemory_object_lock_request
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t offsetType;
- vm_offset_t offset;
- mach_msg_type_t sizeType;
- vm_size_t size;
- mach_msg_type_t should_returnType;
- memory_object_return_t should_return;
- mach_msg_type_t should_flushType;
- boolean_t should_flush;
- mach_msg_type_t lock_valueType;
- vm_prot_t lock_value;
- mach_msg_type_t reply_toType;
- mach_port_t reply_to;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_memory_object_lock_request
- (mach_port_t memory_control, vm_offset_t offset, vm_size_t size, memory_object_return_t should_return, boolean_t should_flush, vm_prot_t lock_value, mach_port_t reply_to, mach_msg_type_name_t reply_toPoly);
-
-#if TypeCheck
- boolean_t msgh_simple;
-#endif /* TypeCheck */
-
- auto const mach_msg_type_t offsetCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t sizeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t should_returnCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t should_flushCheck = {
- /* msgt_name = */ 0,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t lock_valueCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- msgh_simple = !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX);
- if ((In0P->Head.msgh_size != 72))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->offsetType, &offsetCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->sizeType, &sizeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->should_returnType, &should_returnCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->should_flushType, &should_flushCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->lock_valueType, &lock_valueCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->reply_toType.msgt_inline != TRUE) ||
- (In0P->reply_toType.msgt_longform != FALSE) ||
- (MACH_MSG_TYPE_PORT_ANY(In0P->reply_toType.msgt_name) && msgh_simple) ||
- (In0P->reply_toType.msgt_number != 1) ||
- (In0P->reply_toType.msgt_size != 32))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_memory_object_lock_request(In0P->Head.msgh_request_port, In0P->offset, In0P->size, In0P->should_return, In0P->should_flush, In0P->lock_value, In0P->reply_to, In0P->reply_toType.msgt_name);
-}
-
-/* Routine xxx_task_get_emulation_vector */
-mig_internal void _Xxxx_task_get_emulation_vector
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t vector_startType;
- int vector_start;
- mach_msg_type_long_t emulation_vectorType;
- vm_offset_t emulation_vector[1024];
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_xxx_task_get_emulation_vector
- (mach_port_t task, int *vector_start, emulation_vector_t emulation_vector, mach_msg_type_number_t *emulation_vectorCnt);
-
- auto const mach_msg_type_t vector_startType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_long_t emulation_vectorType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 2,
- /* msgtl_size = */ 32,
- /* msgtl_number = */ 1024,
- };
-
- mach_msg_type_number_t emulation_vectorCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- emulation_vectorCnt = 1024;
-
- OutP->RetCode = S_xxx_task_get_emulation_vector(In0P->Head.msgh_request_port, &OutP->vector_start, OutP->emulation_vector, &emulation_vectorCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->vector_startType = vector_startType;
-
- OutP->emulation_vectorType = emulation_vectorType;
-
- OutP->emulation_vectorType.msgtl_number = emulation_vectorCnt;
- OutP->Head.msgh_size = 52 + (4 * emulation_vectorCnt);
-}
-
-/* Routine xxx_task_set_emulation_vector */
-mig_internal void _Xxxx_task_set_emulation_vector
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t vector_startType;
- int vector_start;
- mach_msg_type_long_t emulation_vectorType;
- vm_offset_t emulation_vector[1024];
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_xxx_task_set_emulation_vector
- (mach_port_t task, int vector_start, emulation_vector_t emulation_vector, mach_msg_type_number_t emulation_vectorCnt);
-
- unsigned int msgh_size;
-
- auto const mach_msg_type_t vector_startCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- msgh_size = In0P->Head.msgh_size;
- if ((msgh_size < 44) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->vector_startType, &vector_startCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->emulation_vectorType.msgtl_header.msgt_inline != TRUE) ||
- (In0P->emulation_vectorType.msgtl_header.msgt_longform != TRUE) ||
- (In0P->emulation_vectorType.msgtl_name != 2) ||
- (In0P->emulation_vectorType.msgtl_size != 32))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (msgh_size != 44 + (4 * In0P->emulation_vectorType.msgtl_number))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_xxx_task_set_emulation_vector(In0P->Head.msgh_request_port, In0P->vector_start, In0P->emulation_vector, In0P->emulation_vectorType.msgtl_number);
-}
-
-/* Routine xxx_host_info */
-mig_internal void _Xxxx_host_info
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t infoType;
- machine_info_data_t info;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_xxx_host_info
- (mach_port_t target_task, machine_info_data_t *info);
-
- auto const mach_msg_type_t infoType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 5,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_xxx_host_info(In0P->Head.msgh_request_port, &OutP->info);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 56;
-
- OutP->infoType = infoType;
-}
-
-/* Routine xxx_slot_info */
-mig_internal void _Xxxx_slot_info
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t slotType;
- int slot;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t infoType;
- machine_slot_data_t info;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_xxx_slot_info
- (mach_port_t target_task, int slot, machine_slot_data_t *info);
-
- auto const mach_msg_type_t slotCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t infoType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 8,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->slotType, &slotCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_xxx_slot_info(In0P->Head.msgh_request_port, In0P->slot, &OutP->info);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 68;
-
- OutP->infoType = infoType;
-}
-
-/* Routine xxx_cpu_control */
-mig_internal void _Xxxx_cpu_control
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t cpuType;
- int cpu;
- mach_msg_type_t runningType;
- boolean_t running;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_xxx_cpu_control
- (mach_port_t target_task, int cpu, boolean_t running);
-
- auto const mach_msg_type_t cpuCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t runningCheck = {
- /* msgt_name = */ 0,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->cpuType, &cpuCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->runningType, &runningCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_xxx_cpu_control(In0P->Head.msgh_request_port, In0P->cpu, In0P->running);
-}
-
-/* Routine task_suspend */
-mig_internal void _Xtask_suspend
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_task_suspend
- (mach_port_t target_task);
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_task_suspend(In0P->Head.msgh_request_port);
-}
-
-/* Routine task_resume */
-mig_internal void _Xtask_resume
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_task_resume
- (mach_port_t target_task);
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_task_resume(In0P->Head.msgh_request_port);
-}
-
-/* Routine task_get_special_port */
-mig_internal void _Xtask_get_special_port
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t which_portType;
- int which_port;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t special_portType;
- mach_port_t special_port;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_task_get_special_port
- (mach_port_t task, int which_port, mach_port_t *special_port, mach_msg_type_name_t *special_portPoly);
-
- boolean_t msgh_simple;
- auto const mach_msg_type_t which_portCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t special_portType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- mach_msg_type_name_t special_portPoly;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->which_portType, &which_portCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_task_get_special_port(In0P->Head.msgh_request_port, In0P->which_port, &OutP->special_port, &special_portPoly);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- msgh_simple = TRUE;
- OutP->Head.msgh_size = 40;
-
- OutP->special_portType = special_portType;
-
- if (MACH_MSG_TYPE_PORT_ANY(special_portPoly))
- msgh_simple = FALSE;
-
- OutP->special_portType.msgt_name = special_portPoly;
-
- if (!msgh_simple)
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-}
-
-/* Routine task_set_special_port */
-mig_internal void _Xtask_set_special_port
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t which_portType;
- int which_port;
- mach_msg_type_t special_portType;
- mach_port_t special_port;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_task_set_special_port
- (mach_port_t task, int which_port, mach_port_t special_port);
-
- auto const mach_msg_type_t which_portCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t special_portCheck = {
- /* msgt_name = */ 17,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->which_portType, &which_portCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->special_portType, &special_portCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_task_set_special_port(In0P->Head.msgh_request_port, In0P->which_port, In0P->special_port);
-}
-
-/* Routine xxx_task_info */
-mig_internal void _Xxxx_task_info
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t flavorType;
- int flavor;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_long_t task_info_outType;
- natural_t task_info_out[1024];
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_xxx_task_info
- (mach_port_t target_task, int flavor, task_info_t task_info_out, mach_msg_type_number_t *task_info_outCnt);
-
- auto const mach_msg_type_t flavorCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_long_t task_info_outType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 2,
- /* msgtl_size = */ 32,
- /* msgtl_number = */ 1024,
- };
-
- mach_msg_type_number_t task_info_outCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->flavorType, &flavorCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- task_info_outCnt = 1024;
-
- OutP->RetCode = S_xxx_task_info(In0P->Head.msgh_request_port, In0P->flavor, OutP->task_info_out, &task_info_outCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->task_info_outType = task_info_outType;
-
- OutP->task_info_outType.msgtl_number = task_info_outCnt;
- OutP->Head.msgh_size = 44 + (4 * task_info_outCnt);
-}
-
-/* Routine thread_create */
-mig_internal void _Xthread_create
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t child_threadType;
- mach_port_t child_thread;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_thread_create
- (mach_port_t parent_task, mach_port_t *child_thread, mach_msg_type_name_t *child_threadPoly);
-
- boolean_t msgh_simple;
- auto const mach_msg_type_t child_threadType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- mach_msg_type_name_t child_threadPoly;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_thread_create(In0P->Head.msgh_request_port, &OutP->child_thread, &child_threadPoly);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- msgh_simple = TRUE;
- OutP->Head.msgh_size = 40;
-
- OutP->child_threadType = child_threadType;
-
- if (MACH_MSG_TYPE_PORT_ANY(child_threadPoly))
- msgh_simple = FALSE;
-
- OutP->child_threadType.msgt_name = child_threadPoly;
-
- if (!msgh_simple)
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-}
-
-/* Routine thread_suspend */
-mig_internal void _Xthread_suspend
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_thread_suspend
- (mach_port_t target_thread);
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_thread_suspend(In0P->Head.msgh_request_port);
-}
-
-/* Routine thread_resume */
-mig_internal void _Xthread_resume
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_thread_resume
- (mach_port_t target_thread);
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_thread_resume(In0P->Head.msgh_request_port);
-}
-
-/* Routine thread_abort */
-mig_internal void _Xthread_abort
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_thread_abort
- (mach_port_t target_thread);
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_thread_abort(In0P->Head.msgh_request_port);
-}
-
-/* Routine xxx_thread_get_state */
-mig_internal void _Xxxx_thread_get_state
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t flavorType;
- int flavor;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_long_t old_stateType;
- natural_t old_state[1024];
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_xxx_thread_get_state
- (mach_port_t target_thread, int flavor, thread_state_t old_state, mach_msg_type_number_t *old_stateCnt);
-
- auto const mach_msg_type_t flavorCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_long_t old_stateType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 2,
- /* msgtl_size = */ 32,
- /* msgtl_number = */ 1024,
- };
-
- mach_msg_type_number_t old_stateCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->flavorType, &flavorCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- old_stateCnt = 1024;
-
- OutP->RetCode = S_xxx_thread_get_state(In0P->Head.msgh_request_port, In0P->flavor, OutP->old_state, &old_stateCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->old_stateType = old_stateType;
-
- OutP->old_stateType.msgtl_number = old_stateCnt;
- OutP->Head.msgh_size = 44 + (4 * old_stateCnt);
-}
-
-/* Routine xxx_thread_set_state */
-mig_internal void _Xxxx_thread_set_state
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t flavorType;
- int flavor;
- mach_msg_type_long_t new_stateType;
- natural_t new_state[1024];
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_xxx_thread_set_state
- (mach_port_t target_thread, int flavor, thread_state_t new_state, mach_msg_type_number_t new_stateCnt);
-
- unsigned int msgh_size;
-
- auto const mach_msg_type_t flavorCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- msgh_size = In0P->Head.msgh_size;
- if ((msgh_size < 44) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->flavorType, &flavorCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->new_stateType.msgtl_header.msgt_inline != TRUE) ||
- (In0P->new_stateType.msgtl_header.msgt_longform != TRUE) ||
- (In0P->new_stateType.msgtl_name != 2) ||
- (In0P->new_stateType.msgtl_size != 32))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (msgh_size != 44 + (4 * In0P->new_stateType.msgtl_number))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_xxx_thread_set_state(In0P->Head.msgh_request_port, In0P->flavor, In0P->new_state, In0P->new_stateType.msgtl_number);
-}
-
-/* Routine thread_get_special_port */
-mig_internal void _Xthread_get_special_port
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t which_portType;
- int which_port;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t special_portType;
- mach_port_t special_port;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_thread_get_special_port
- (mach_port_t thread, int which_port, mach_port_t *special_port);
-
- auto const mach_msg_type_t which_portCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t special_portType = {
- /* msgt_name = */ 19,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->which_portType, &which_portCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_thread_get_special_port(In0P->Head.msgh_request_port, In0P->which_port, &OutP->special_port);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
- OutP->Head.msgh_size = 40;
-
- OutP->special_portType = special_portType;
-}
-
-/* Routine thread_set_special_port */
-mig_internal void _Xthread_set_special_port
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t which_portType;
- int which_port;
- mach_msg_type_t special_portType;
- mach_port_t special_port;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_thread_set_special_port
- (mach_port_t thread, int which_port, mach_port_t special_port);
-
- auto const mach_msg_type_t which_portCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t special_portCheck = {
- /* msgt_name = */ 17,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->which_portType, &which_portCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->special_portType, &special_portCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_thread_set_special_port(In0P->Head.msgh_request_port, In0P->which_port, In0P->special_port);
-}
-
-/* Routine xxx_thread_info */
-mig_internal void _Xxxx_thread_info
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t flavorType;
- int flavor;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_long_t thread_info_outType;
- natural_t thread_info_out[1024];
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_xxx_thread_info
- (mach_port_t target_thread, int flavor, thread_info_t thread_info_out, mach_msg_type_number_t *thread_info_outCnt);
-
- auto const mach_msg_type_t flavorCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_long_t thread_info_outType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 2,
- /* msgtl_size = */ 32,
- /* msgtl_number = */ 1024,
- };
-
- mach_msg_type_number_t thread_info_outCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->flavorType, &flavorCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- thread_info_outCnt = 1024;
-
- OutP->RetCode = S_xxx_thread_info(In0P->Head.msgh_request_port, In0P->flavor, OutP->thread_info_out, &thread_info_outCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->thread_info_outType = thread_info_outType;
-
- OutP->thread_info_outType.msgtl_number = thread_info_outCnt;
- OutP->Head.msgh_size = 44 + (4 * thread_info_outCnt);
-}
-
-/* Routine task_set_emulation */
-mig_internal void _Xtask_set_emulation
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t routine_entry_ptType;
- vm_address_t routine_entry_pt;
- mach_msg_type_t routine_numberType;
- int routine_number;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_task_set_emulation
- (mach_port_t target_port, vm_address_t routine_entry_pt, int routine_number);
-
- auto const mach_msg_type_t routine_entry_ptCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t routine_numberCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->routine_entry_ptType, &routine_entry_ptCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->routine_numberType, &routine_numberCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_task_set_emulation(In0P->Head.msgh_request_port, In0P->routine_entry_pt, In0P->routine_number);
-}
-
-/* Routine task_ras_control */
-mig_internal void _Xtask_ras_control
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t basepcType;
- vm_address_t basepc;
- mach_msg_type_t boundspcType;
- vm_address_t boundspc;
- mach_msg_type_t flavorType;
- int flavor;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_task_ras_control
- (mach_port_t target_task, vm_address_t basepc, vm_address_t boundspc, int flavor);
-
- auto const mach_msg_type_t basepcCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t boundspcCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t flavorCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 48) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->basepcType, &basepcCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->boundspcType, &boundspcCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->flavorType, &flavorCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_task_ras_control(In0P->Head.msgh_request_port, In0P->basepc, In0P->boundspc, In0P->flavor);
-}
-
-/* Routine vm_map */
-mig_internal void _Xvm_map
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t addressType;
- vm_address_t address;
- mach_msg_type_t sizeType;
- vm_size_t size;
- mach_msg_type_t maskType;
- vm_address_t mask;
- mach_msg_type_t anywhereType;
- boolean_t anywhere;
- mach_msg_type_t memory_objectType;
- mach_port_t memory_object;
- mach_msg_type_t offsetType;
- vm_offset_t offset;
- mach_msg_type_t copyType;
- boolean_t copy;
- mach_msg_type_t cur_protectionType;
- vm_prot_t cur_protection;
- mach_msg_type_t max_protectionType;
- vm_prot_t max_protection;
- mach_msg_type_t inheritanceType;
- vm_inherit_t inheritance;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t addressType;
- vm_address_t address;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_vm_map
- (mach_port_t target_task, vm_address_t *address, vm_size_t size, vm_address_t mask, boolean_t anywhere, mach_port_t memory_object, vm_offset_t offset, boolean_t copy, vm_prot_t cur_protection, vm_prot_t max_protection, vm_inherit_t inheritance);
-
- auto const mach_msg_type_t addressCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t sizeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t maskCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t anywhereCheck = {
- /* msgt_name = */ 0,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t memory_objectCheck = {
- /* msgt_name = */ 17,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t offsetCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t copyCheck = {
- /* msgt_name = */ 0,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t cur_protectionCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t max_protectionCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t inheritanceCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t addressType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 104) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->addressType, &addressCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->sizeType, &sizeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->maskType, &maskCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->anywhereType, &anywhereCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->memory_objectType, &memory_objectCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->offsetType, &offsetCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->copyType, &copyCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->cur_protectionType, &cur_protectionCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->max_protectionType, &max_protectionCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->inheritanceType, &inheritanceCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_vm_map(In0P->Head.msgh_request_port, &In0P->address, In0P->size, In0P->mask, In0P->anywhere, In0P->memory_object, In0P->offset, In0P->copy, In0P->cur_protection, In0P->max_protection, In0P->inheritance);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 40;
-
- OutP->addressType = addressType;
-
- OutP->address = In0P->address;
-}
-
-/* SimpleRoutine memory_object_data_error */
-mig_internal void _Xmemory_object_data_error
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t offsetType;
- vm_offset_t offset;
- mach_msg_type_t sizeType;
- vm_size_t size;
- mach_msg_type_t error_valueType;
- kern_return_t error_value;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_memory_object_data_error
- (mach_port_t memory_control, vm_offset_t offset, vm_size_t size, kern_return_t error_value);
-
- auto const mach_msg_type_t offsetCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t sizeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t error_valueCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 48) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->offsetType, &offsetCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->sizeType, &sizeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->error_valueType, &error_valueCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_memory_object_data_error(In0P->Head.msgh_request_port, In0P->offset, In0P->size, In0P->error_value);
-}
-
-/* SimpleRoutine memory_object_set_attributes */
-mig_internal void _Xmemory_object_set_attributes
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t object_readyType;
- boolean_t object_ready;
- mach_msg_type_t may_cacheType;
- boolean_t may_cache;
- mach_msg_type_t copy_strategyType;
- memory_object_copy_strategy_t copy_strategy;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_memory_object_set_attributes
- (mach_port_t memory_control, boolean_t object_ready, boolean_t may_cache, memory_object_copy_strategy_t copy_strategy);
-
- auto const mach_msg_type_t object_readyCheck = {
- /* msgt_name = */ 0,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t may_cacheCheck = {
- /* msgt_name = */ 0,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t copy_strategyCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 48) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->object_readyType, &object_readyCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->may_cacheType, &may_cacheCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->copy_strategyType, &copy_strategyCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_memory_object_set_attributes(In0P->Head.msgh_request_port, In0P->object_ready, In0P->may_cache, In0P->copy_strategy);
-}
-
-/* SimpleRoutine memory_object_destroy */
-mig_internal void _Xmemory_object_destroy
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t reasonType;
- kern_return_t reason;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_memory_object_destroy
- (mach_port_t memory_control, kern_return_t reason);
-
- auto const mach_msg_type_t reasonCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->reasonType, &reasonCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_memory_object_destroy(In0P->Head.msgh_request_port, In0P->reason);
-}
-
-/* SimpleRoutine memory_object_data_supply */
-mig_internal void _Xmemory_object_data_supply
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t offsetType;
- vm_offset_t offset;
- mach_msg_type_long_t dataType;
- vm_offset_t data;
- mach_msg_type_t lock_valueType;
- vm_prot_t lock_value;
- mach_msg_type_t preciousType;
- boolean_t precious;
- mach_msg_type_t reply_toType;
- mach_port_t reply_to;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_memory_object_data_supply
- (mach_port_t memory_control, vm_offset_t offset, vm_offset_t data, mach_msg_type_number_t dataCnt, vm_prot_t lock_value, boolean_t precious, mach_port_t reply_to, mach_msg_type_name_t reply_toPoly);
-
- auto const mach_msg_type_t offsetCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t lock_valueCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t preciousCheck = {
- /* msgt_name = */ 0,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 72) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->offsetType, &offsetCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->dataType.msgtl_header.msgt_inline != FALSE) ||
- (In0P->dataType.msgtl_header.msgt_longform != TRUE) ||
- (In0P->dataType.msgtl_name != 9) ||
- (In0P->dataType.msgtl_size != 8))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->lock_valueType, &lock_valueCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->preciousType, &preciousCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->reply_toType.msgt_inline != TRUE) ||
- (In0P->reply_toType.msgt_longform != FALSE) ||
- (In0P->reply_toType.msgt_number != 1) ||
- (In0P->reply_toType.msgt_size != 32))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_memory_object_data_supply(In0P->Head.msgh_request_port, In0P->offset, In0P->data, In0P->dataType.msgtl_number, In0P->lock_value, In0P->precious, In0P->reply_to, In0P->reply_toType.msgt_name);
-}
-
-/* SimpleRoutine memory_object_ready */
-mig_internal void _Xmemory_object_ready
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t may_cacheType;
- boolean_t may_cache;
- mach_msg_type_t copy_strategyType;
- memory_object_copy_strategy_t copy_strategy;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_memory_object_ready
- (mach_port_t memory_control, boolean_t may_cache, memory_object_copy_strategy_t copy_strategy);
-
- auto const mach_msg_type_t may_cacheCheck = {
- /* msgt_name = */ 0,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t copy_strategyCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->may_cacheType, &may_cacheCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->copy_strategyType, &copy_strategyCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_memory_object_ready(In0P->Head.msgh_request_port, In0P->may_cache, In0P->copy_strategy);
-}
-
-/* SimpleRoutine memory_object_change_attributes */
-mig_internal void _Xmemory_object_change_attributes
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t may_cacheType;
- boolean_t may_cache;
- mach_msg_type_t copy_strategyType;
- memory_object_copy_strategy_t copy_strategy;
- mach_msg_type_t reply_toType;
- mach_port_t reply_to;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_memory_object_change_attributes
- (mach_port_t memory_control, boolean_t may_cache, memory_object_copy_strategy_t copy_strategy, mach_port_t reply_to, mach_msg_type_name_t reply_toPoly);
-
-#if TypeCheck
- boolean_t msgh_simple;
-#endif /* TypeCheck */
-
- auto const mach_msg_type_t may_cacheCheck = {
- /* msgt_name = */ 0,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t copy_strategyCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- msgh_simple = !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX);
- if ((In0P->Head.msgh_size != 48))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->may_cacheType, &may_cacheCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->copy_strategyType, &copy_strategyCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->reply_toType.msgt_inline != TRUE) ||
- (In0P->reply_toType.msgt_longform != FALSE) ||
- (MACH_MSG_TYPE_PORT_ANY(In0P->reply_toType.msgt_name) && msgh_simple) ||
- (In0P->reply_toType.msgt_number != 1) ||
- (In0P->reply_toType.msgt_size != 32))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_memory_object_change_attributes(In0P->Head.msgh_request_port, In0P->may_cache, In0P->copy_strategy, In0P->reply_to, In0P->reply_toType.msgt_name);
-}
-
-/* Routine vm_machine_attribute */
-mig_internal void _Xvm_machine_attribute
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t addressType;
- vm_address_t address;
- mach_msg_type_t sizeType;
- vm_size_t size;
- mach_msg_type_t attributeType;
- vm_machine_attribute_t attribute;
- mach_msg_type_t valueType;
- vm_machine_attribute_val_t value;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t valueType;
- vm_machine_attribute_val_t value;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_vm_machine_attribute
- (mach_port_t target_task, vm_address_t address, vm_size_t size, vm_machine_attribute_t attribute, vm_machine_attribute_val_t *value);
-
- auto const mach_msg_type_t addressCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t sizeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t attributeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t valueCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t valueType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 56) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->addressType, &addressCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->sizeType, &sizeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->attributeType, &attributeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->valueType, &valueCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_vm_machine_attribute(In0P->Head.msgh_request_port, In0P->address, In0P->size, In0P->attribute, &In0P->value);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 40;
-
- OutP->valueType = valueType;
-
- OutP->value = In0P->value;
-}
-
-static mig_routine_t mach_server_routines[] = {
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- _Xtask_create,
- _Xtask_terminate,
- _Xtask_get_emulation_vector,
- _Xtask_set_emulation_vector,
- _Xtask_threads,
- _Xtask_info,
- 0,
- 0,
- 0,
- _Xthread_terminate,
- _Xthread_get_state,
- _Xthread_set_state,
- _Xthread_info,
- 0,
- _Xvm_allocate,
- 0,
- _Xvm_deallocate,
- _Xvm_protect,
- _Xvm_inherit,
- _Xvm_read,
- _Xvm_write,
- _Xvm_copy,
- _Xvm_region,
- _Xvm_statistics,
- 0,
- 0,
- _Xmach_ports_register,
- _Xmach_ports_lookup,
- 0,
- 0,
- 0,
- _Xmemory_object_data_provided,
- _Xmemory_object_data_unavailable,
- _Xmemory_object_get_attributes,
- _Xvm_set_default_memory_manager,
- 0,
- _Xxxx_memory_object_lock_request,
- _Xmemory_object_lock_request,
- _Xxxx_task_get_emulation_vector,
- _Xxxx_task_set_emulation_vector,
- _Xxxx_host_info,
- _Xxxx_slot_info,
- _Xxxx_cpu_control,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- _Xtask_suspend,
- _Xtask_resume,
- _Xtask_get_special_port,
- _Xtask_set_special_port,
- _Xxxx_task_info,
- _Xthread_create,
- _Xthread_suspend,
- _Xthread_resume,
- _Xthread_abort,
- _Xxxx_thread_get_state,
- _Xxxx_thread_set_state,
- _Xthread_get_special_port,
- _Xthread_set_special_port,
- _Xxxx_thread_info,
- _Xtask_set_emulation,
- _Xtask_ras_control,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- _Xvm_map,
- _Xmemory_object_data_error,
- _Xmemory_object_set_attributes,
- _Xmemory_object_destroy,
- _Xmemory_object_data_supply,
- _Xmemory_object_ready,
- _Xmemory_object_change_attributes,
- 0,
- 0,
- 0,
- _Xvm_machine_attribute,
- 0,
-};
-
-mig_external boolean_t mach_server
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- register mach_msg_header_t *InP = InHeadP;
- register mig_reply_header_t *OutP = (mig_reply_header_t *) OutHeadP;
-
- auto const mach_msg_type_t RetCodeType = {
- /* msgt_name = */ MACH_MSG_TYPE_INTEGER_32,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- register mig_routine_t routine;
-
- OutP->Head.msgh_bits = MACH_MSGH_BITS(MACH_MSGH_BITS_REPLY(InP->msgh_bits), 0);
- OutP->Head.msgh_size = sizeof *OutP;
- OutP->Head.msgh_remote_port = InP->msgh_reply_port;
- OutP->Head.msgh_local_port = MACH_PORT_NULL;
- OutP->Head.msgh_seqno = 0;
- OutP->Head.msgh_id = InP->msgh_id + 100;
-
- OutP->RetCodeType = RetCodeType;
-
- if ((InP->msgh_id > 2100) || (InP->msgh_id < 2000) ||
- ((routine = mach_server_routines[InP->msgh_id - 2000]) == 0)) {
- OutP->RetCode = MIG_BAD_ID;
- return FALSE;
- }
- (*routine) (InP, &OutP->Head);
- return TRUE;
-}
-
-mig_external mig_routine_t mach_server_routine
- (const mach_msg_header_t *InHeadP)
-{
- register int msgh_id;
-
- msgh_id = InHeadP->msgh_id - 2000;
-
- if ((msgh_id > 100) || (msgh_id < 0))
- return 0;
-
- return mach_server_routines[msgh_id];
-}
-
diff --git a/boot-proxy-exc/ourmach_hostServer.c b/boot-proxy-exc/ourmach_hostServer.c
deleted file mode 100644
index 4ede0429..00000000
--- a/boot-proxy-exc/ourmach_hostServer.c
+++ /dev/null
@@ -1,2596 +0,0 @@
-/* Module mach_host */
-
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE 1
-#endif
-
-#define EXPORT_BOOLEAN
-#include <mach/boolean.h>
-#include <mach/kern_return.h>
-#include <mach/message.h>
-#include <mach/mig_errors.h>
-#include <mach/mig_support.h>
-
-#ifndef mig_internal
-#define mig_internal static
-#endif
-
-#ifndef mig_external
-#define mig_external
-#endif
-
-#ifndef TypeCheck
-#define TypeCheck 1
-#endif
-
-#ifndef UseExternRCSId
-#define UseExternRCSId 1
-#endif
-
-#define BAD_TYPECHECK(type, check) ({\
- union { mach_msg_type_t t; unsigned32_t w; } _t, _c;\
- _t.t = *(type); _c.t = *(check); _t.w != _c.w; })
-#define msgh_request_port msgh_local_port
-#define MACH_MSGH_BITS_REQUEST(bits) MACH_MSGH_BITS_LOCAL(bits)
-#define msgh_reply_port msgh_remote_port
-#define MACH_MSGH_BITS_REPLY(bits) MACH_MSGH_BITS_REMOTE(bits)
-
-#include <mach/std_types.h>
-#include <mach/mach_types.h>
-
-/* Routine host_processors */
-mig_internal void _Xhost_processors
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_long_t processor_listType;
- processor_array_t processor_list;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_host_processors
- (mach_port_t host_priv, processor_array_t *processor_list, mach_msg_type_number_t *processor_listCnt);
-
- auto const mach_msg_type_long_t processor_listType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ FALSE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 19,
- /* msgtl_size = */ 32,
- /* msgtl_number = */ 0,
- };
-
- mach_msg_type_number_t processor_listCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_host_processors(In0P->Head.msgh_request_port, &OutP->processor_list, &processor_listCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
- OutP->Head.msgh_size = 48;
-
- OutP->processor_listType = processor_listType;
-
- OutP->processor_listType.msgtl_number = processor_listCnt;
-}
-
-/* Routine yyy_host_info */
-mig_internal void _Xyyy_host_info
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t flavorType;
- int flavor;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_long_t host_info_outType;
- natural_t host_info_out[1024];
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_yyy_host_info
- (mach_port_t host, int flavor, host_info_t host_info_out, mach_msg_type_number_t *host_info_outCnt);
-
- auto const mach_msg_type_t flavorCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_long_t host_info_outType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 2,
- /* msgtl_size = */ 32,
- /* msgtl_number = */ 1024,
- };
-
- mach_msg_type_number_t host_info_outCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->flavorType, &flavorCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- host_info_outCnt = 1024;
-
- OutP->RetCode = S_yyy_host_info(In0P->Head.msgh_request_port, In0P->flavor, OutP->host_info_out, &host_info_outCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->host_info_outType = host_info_outType;
-
- OutP->host_info_outType.msgtl_number = host_info_outCnt;
- OutP->Head.msgh_size = 44 + (4 * host_info_outCnt);
-}
-
-/* Routine yyy_processor_info */
-mig_internal void _Xyyy_processor_info
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t flavorType;
- int flavor;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t hostType;
- mach_port_t host;
- mach_msg_type_long_t processor_info_outType;
- natural_t processor_info_out[1024];
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_yyy_processor_info
- (mach_port_t processor, int flavor, mach_port_t *host, processor_info_t processor_info_out, mach_msg_type_number_t *processor_info_outCnt);
-
- auto const mach_msg_type_t flavorCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t hostType = {
- /* msgt_name = */ 19,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_long_t processor_info_outType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 2,
- /* msgtl_size = */ 32,
- /* msgtl_number = */ 1024,
- };
-
- mach_msg_type_number_t processor_info_outCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->flavorType, &flavorCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- processor_info_outCnt = 1024;
-
- OutP->RetCode = S_yyy_processor_info(In0P->Head.msgh_request_port, In0P->flavor, &OutP->host, OutP->processor_info_out, &processor_info_outCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-
- OutP->hostType = hostType;
-
- OutP->processor_info_outType = processor_info_outType;
-
- OutP->processor_info_outType.msgtl_number = processor_info_outCnt;
- OutP->Head.msgh_size = 52 + (4 * processor_info_outCnt);
-}
-
-/* Routine processor_start */
-mig_internal void _Xprocessor_start
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_processor_start
- (mach_port_t processor);
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_processor_start(In0P->Head.msgh_request_port);
-}
-
-/* Routine processor_exit */
-mig_internal void _Xprocessor_exit
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_processor_exit
- (mach_port_t processor);
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_processor_exit(In0P->Head.msgh_request_port);
-}
-
-/* Routine yyy_processor_control */
-mig_internal void _Xyyy_processor_control
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_long_t processor_cmdType;
- natural_t processor_cmd[1024];
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_yyy_processor_control
- (mach_port_t processor, processor_info_t processor_cmd, mach_msg_type_number_t processor_cmdCnt);
-
- unsigned int msgh_size;
-
-#if TypeCheck
- msgh_size = In0P->Head.msgh_size;
- if ((msgh_size < 36) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->processor_cmdType.msgtl_header.msgt_inline != TRUE) ||
- (In0P->processor_cmdType.msgtl_header.msgt_longform != TRUE) ||
- (In0P->processor_cmdType.msgtl_name != 2) ||
- (In0P->processor_cmdType.msgtl_size != 32))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (msgh_size != 36 + (4 * In0P->processor_cmdType.msgtl_number))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_yyy_processor_control(In0P->Head.msgh_request_port, In0P->processor_cmd, In0P->processor_cmdType.msgtl_number);
-}
-
-/* Routine processor_set_default */
-mig_internal void _Xprocessor_set_default
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t default_setType;
- mach_port_t default_set;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_processor_set_default
- (mach_port_t host, mach_port_t *default_set);
-
- auto const mach_msg_type_t default_setType = {
- /* msgt_name = */ 19,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_processor_set_default(In0P->Head.msgh_request_port, &OutP->default_set);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
- OutP->Head.msgh_size = 40;
-
- OutP->default_setType = default_setType;
-}
-
-/* Routine xxx_processor_set_default_priv */
-mig_internal void _Xxxx_processor_set_default_priv
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t default_setType;
- mach_port_t default_set;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_xxx_processor_set_default_priv
- (mach_port_t host, mach_port_t *default_set);
-
- auto const mach_msg_type_t default_setType = {
- /* msgt_name = */ 19,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_xxx_processor_set_default_priv(In0P->Head.msgh_request_port, &OutP->default_set);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
- OutP->Head.msgh_size = 40;
-
- OutP->default_setType = default_setType;
-}
-
-/* Routine processor_set_create */
-mig_internal void _Xprocessor_set_create
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t new_setType;
- mach_port_t new_set;
- mach_msg_type_t new_nameType;
- mach_port_t new_name;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_processor_set_create
- (mach_port_t host, mach_port_t *new_set, mach_port_t *new_name);
-
- auto const mach_msg_type_t new_setType = {
- /* msgt_name = */ 19,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t new_nameType = {
- /* msgt_name = */ 19,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_processor_set_create(In0P->Head.msgh_request_port, &OutP->new_set, &OutP->new_name);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
- OutP->Head.msgh_size = 48;
-
- OutP->new_setType = new_setType;
-
- OutP->new_nameType = new_nameType;
-}
-
-/* Routine processor_set_destroy */
-mig_internal void _Xprocessor_set_destroy
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_processor_set_destroy
- (mach_port_t set);
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_processor_set_destroy(In0P->Head.msgh_request_port);
-}
-
-/* Routine yyy_processor_set_info */
-mig_internal void _Xyyy_processor_set_info
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t flavorType;
- int flavor;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t hostType;
- mach_port_t host;
- mach_msg_type_long_t info_outType;
- natural_t info_out[1024];
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_yyy_processor_set_info
- (mach_port_t set_name, int flavor, mach_port_t *host, processor_set_info_t info_out, mach_msg_type_number_t *info_outCnt);
-
- auto const mach_msg_type_t flavorCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t hostType = {
- /* msgt_name = */ 19,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_long_t info_outType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 2,
- /* msgtl_size = */ 32,
- /* msgtl_number = */ 1024,
- };
-
- mach_msg_type_number_t info_outCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->flavorType, &flavorCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- info_outCnt = 1024;
-
- OutP->RetCode = S_yyy_processor_set_info(In0P->Head.msgh_request_port, In0P->flavor, &OutP->host, OutP->info_out, &info_outCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-
- OutP->hostType = hostType;
-
- OutP->info_outType = info_outType;
-
- OutP->info_outType.msgtl_number = info_outCnt;
- OutP->Head.msgh_size = 52 + (4 * info_outCnt);
-}
-
-/* Routine processor_assign */
-mig_internal void _Xprocessor_assign
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t new_setType;
- mach_port_t new_set;
- mach_msg_type_t waitType;
- boolean_t wait;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_processor_assign
- (mach_port_t processor, mach_port_t new_set, boolean_t wait);
-
- auto const mach_msg_type_t new_setCheck = {
- /* msgt_name = */ 17,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t waitCheck = {
- /* msgt_name = */ 0,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->new_setType, &new_setCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->waitType, &waitCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_processor_assign(In0P->Head.msgh_request_port, In0P->new_set, In0P->wait);
-}
-
-/* Routine processor_get_assignment */
-mig_internal void _Xprocessor_get_assignment
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t assigned_setType;
- mach_port_t assigned_set;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_processor_get_assignment
- (mach_port_t processor, mach_port_t *assigned_set);
-
- auto const mach_msg_type_t assigned_setType = {
- /* msgt_name = */ 19,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_processor_get_assignment(In0P->Head.msgh_request_port, &OutP->assigned_set);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
- OutP->Head.msgh_size = 40;
-
- OutP->assigned_setType = assigned_setType;
-}
-
-/* Routine thread_assign */
-mig_internal void _Xthread_assign
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t new_setType;
- mach_port_t new_set;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_thread_assign
- (mach_port_t thread, mach_port_t new_set);
-
- auto const mach_msg_type_t new_setCheck = {
- /* msgt_name = */ 17,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->new_setType, &new_setCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_thread_assign(In0P->Head.msgh_request_port, In0P->new_set);
-}
-
-/* Routine thread_assign_default */
-mig_internal void _Xthread_assign_default
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_thread_assign_default
- (mach_port_t thread);
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_thread_assign_default(In0P->Head.msgh_request_port);
-}
-
-/* Routine thread_get_assignment */
-mig_internal void _Xthread_get_assignment
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t assigned_setType;
- mach_port_t assigned_set;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_thread_get_assignment
- (mach_port_t thread, mach_port_t *assigned_set);
-
- auto const mach_msg_type_t assigned_setType = {
- /* msgt_name = */ 19,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_thread_get_assignment(In0P->Head.msgh_request_port, &OutP->assigned_set);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
- OutP->Head.msgh_size = 40;
-
- OutP->assigned_setType = assigned_setType;
-}
-
-/* Routine task_assign */
-mig_internal void _Xtask_assign
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t new_setType;
- mach_port_t new_set;
- mach_msg_type_t assign_threadsType;
- boolean_t assign_threads;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_task_assign
- (mach_port_t task, mach_port_t new_set, boolean_t assign_threads);
-
- auto const mach_msg_type_t new_setCheck = {
- /* msgt_name = */ 17,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t assign_threadsCheck = {
- /* msgt_name = */ 0,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->new_setType, &new_setCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->assign_threadsType, &assign_threadsCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_task_assign(In0P->Head.msgh_request_port, In0P->new_set, In0P->assign_threads);
-}
-
-/* Routine task_assign_default */
-mig_internal void _Xtask_assign_default
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t assign_threadsType;
- boolean_t assign_threads;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_task_assign_default
- (mach_port_t task, boolean_t assign_threads);
-
- auto const mach_msg_type_t assign_threadsCheck = {
- /* msgt_name = */ 0,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->assign_threadsType, &assign_threadsCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_task_assign_default(In0P->Head.msgh_request_port, In0P->assign_threads);
-}
-
-/* Routine task_get_assignment */
-mig_internal void _Xtask_get_assignment
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t assigned_setType;
- mach_port_t assigned_set;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_task_get_assignment
- (mach_port_t task, mach_port_t *assigned_set);
-
- auto const mach_msg_type_t assigned_setType = {
- /* msgt_name = */ 19,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_task_get_assignment(In0P->Head.msgh_request_port, &OutP->assigned_set);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
- OutP->Head.msgh_size = 40;
-
- OutP->assigned_setType = assigned_setType;
-}
-
-/* Routine host_kernel_version */
-mig_internal void _Xhost_kernel_version
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_long_t kernel_versionType;
- kernel_version_t kernel_version;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_host_kernel_version
- (mach_port_t host, kernel_version_t kernel_version);
-
- auto const mach_msg_type_long_t kernel_versionType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 12,
- /* msgtl_size = */ 4096,
- /* msgtl_number = */ 1,
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_host_kernel_version(In0P->Head.msgh_request_port, OutP->kernel_version);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 556;
-
- OutP->kernel_versionType = kernel_versionType;
-}
-
-/* Routine thread_priority */
-mig_internal void _Xthread_priority
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t priorityType;
- int priority;
- mach_msg_type_t set_maxType;
- boolean_t set_max;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_thread_priority
- (mach_port_t thread, int priority, boolean_t set_max);
-
- auto const mach_msg_type_t priorityCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t set_maxCheck = {
- /* msgt_name = */ 0,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->priorityType, &priorityCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->set_maxType, &set_maxCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_thread_priority(In0P->Head.msgh_request_port, In0P->priority, In0P->set_max);
-}
-
-/* Routine thread_max_priority */
-mig_internal void _Xthread_max_priority
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t processor_setType;
- mach_port_t processor_set;
- mach_msg_type_t max_priorityType;
- int max_priority;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_thread_max_priority
- (mach_port_t thread, mach_port_t processor_set, int max_priority);
-
- auto const mach_msg_type_t processor_setCheck = {
- /* msgt_name = */ 17,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t max_priorityCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->processor_setType, &processor_setCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->max_priorityType, &max_priorityCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_thread_max_priority(In0P->Head.msgh_request_port, In0P->processor_set, In0P->max_priority);
-}
-
-/* Routine task_priority */
-mig_internal void _Xtask_priority
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t priorityType;
- int priority;
- mach_msg_type_t change_threadsType;
- boolean_t change_threads;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_task_priority
- (mach_port_t task, int priority, boolean_t change_threads);
-
- auto const mach_msg_type_t priorityCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t change_threadsCheck = {
- /* msgt_name = */ 0,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->priorityType, &priorityCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->change_threadsType, &change_threadsCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_task_priority(In0P->Head.msgh_request_port, In0P->priority, In0P->change_threads);
-}
-
-/* Routine processor_set_max_priority */
-mig_internal void _Xprocessor_set_max_priority
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t max_priorityType;
- int max_priority;
- mach_msg_type_t change_threadsType;
- boolean_t change_threads;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_processor_set_max_priority
- (mach_port_t processor_set, int max_priority, boolean_t change_threads);
-
- auto const mach_msg_type_t max_priorityCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t change_threadsCheck = {
- /* msgt_name = */ 0,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->max_priorityType, &max_priorityCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->change_threadsType, &change_threadsCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_processor_set_max_priority(In0P->Head.msgh_request_port, In0P->max_priority, In0P->change_threads);
-}
-
-/* Routine thread_policy */
-mig_internal void _Xthread_policy
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t policyType;
- int policy;
- mach_msg_type_t dataType;
- int data;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_thread_policy
- (mach_port_t thread, int policy, int data);
-
- auto const mach_msg_type_t policyCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t dataCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->policyType, &policyCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->dataType, &dataCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_thread_policy(In0P->Head.msgh_request_port, In0P->policy, In0P->data);
-}
-
-/* Routine processor_set_policy_enable */
-mig_internal void _Xprocessor_set_policy_enable
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t policyType;
- int policy;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_processor_set_policy_enable
- (mach_port_t processor_set, int policy);
-
- auto const mach_msg_type_t policyCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->policyType, &policyCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_processor_set_policy_enable(In0P->Head.msgh_request_port, In0P->policy);
-}
-
-/* Routine processor_set_policy_disable */
-mig_internal void _Xprocessor_set_policy_disable
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t policyType;
- int policy;
- mach_msg_type_t change_threadsType;
- boolean_t change_threads;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_processor_set_policy_disable
- (mach_port_t processor_set, int policy, boolean_t change_threads);
-
- auto const mach_msg_type_t policyCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t change_threadsCheck = {
- /* msgt_name = */ 0,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->policyType, &policyCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->change_threadsType, &change_threadsCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_processor_set_policy_disable(In0P->Head.msgh_request_port, In0P->policy, In0P->change_threads);
-}
-
-/* Routine processor_set_tasks */
-mig_internal void _Xprocessor_set_tasks
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_long_t task_listType;
- task_array_t task_list;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_processor_set_tasks
- (mach_port_t processor_set, task_array_t *task_list, mach_msg_type_number_t *task_listCnt);
-
- auto const mach_msg_type_long_t task_listType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ FALSE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ TRUE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 19,
- /* msgtl_size = */ 32,
- /* msgtl_number = */ 0,
- };
-
- mach_msg_type_number_t task_listCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_processor_set_tasks(In0P->Head.msgh_request_port, &OutP->task_list, &task_listCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
- OutP->Head.msgh_size = 48;
-
- OutP->task_listType = task_listType;
-
- OutP->task_listType.msgtl_number = task_listCnt;
-}
-
-/* Routine processor_set_threads */
-mig_internal void _Xprocessor_set_threads
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_long_t thread_listType;
- thread_array_t thread_list;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_processor_set_threads
- (mach_port_t processor_set, thread_array_t *thread_list, mach_msg_type_number_t *thread_listCnt);
-
- auto const mach_msg_type_long_t thread_listType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ FALSE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 19,
- /* msgtl_size = */ 32,
- /* msgtl_number = */ 0,
- };
-
- mach_msg_type_number_t thread_listCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_processor_set_threads(In0P->Head.msgh_request_port, &OutP->thread_list, &thread_listCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
- OutP->Head.msgh_size = 48;
-
- OutP->thread_listType = thread_listType;
-
- OutP->thread_listType.msgtl_number = thread_listCnt;
-}
-
-/* Routine host_processor_sets */
-mig_internal void _Xhost_processor_sets
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_long_t processor_setsType;
- processor_set_name_array_t processor_sets;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_host_processor_sets
- (mach_port_t host, processor_set_name_array_t *processor_sets, mach_msg_type_number_t *processor_setsCnt);
-
- auto const mach_msg_type_long_t processor_setsType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ FALSE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 19,
- /* msgtl_size = */ 32,
- /* msgtl_number = */ 0,
- };
-
- mach_msg_type_number_t processor_setsCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_host_processor_sets(In0P->Head.msgh_request_port, &OutP->processor_sets, &processor_setsCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
- OutP->Head.msgh_size = 48;
-
- OutP->processor_setsType = processor_setsType;
-
- OutP->processor_setsType.msgtl_number = processor_setsCnt;
-}
-
-/* Routine host_processor_set_priv */
-mig_internal void _Xhost_processor_set_priv
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t set_nameType;
- mach_port_t set_name;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t setType;
- mach_port_t set;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_host_processor_set_priv
- (mach_port_t host_priv, mach_port_t set_name, mach_port_t *set, mach_msg_type_name_t *setPoly);
-
- boolean_t msgh_simple;
- auto const mach_msg_type_t set_nameCheck = {
- /* msgt_name = */ 17,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t setType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- mach_msg_type_name_t setPoly;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->set_nameType, &set_nameCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_host_processor_set_priv(In0P->Head.msgh_request_port, In0P->set_name, &OutP->set, &setPoly);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- msgh_simple = TRUE;
- OutP->Head.msgh_size = 40;
-
- OutP->setType = setType;
-
- if (MACH_MSG_TYPE_PORT_ANY(setPoly))
- msgh_simple = FALSE;
-
- OutP->setType.msgt_name = setPoly;
-
- if (!msgh_simple)
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-}
-
-/* Routine thread_depress_abort */
-mig_internal void _Xthread_depress_abort
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_thread_depress_abort
- (mach_port_t thread);
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_thread_depress_abort(In0P->Head.msgh_request_port);
-}
-
-/* Routine host_set_time */
-mig_internal void _Xhost_set_time
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t new_timeType;
- time_value_t new_time;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_host_set_time
- (mach_port_t host_priv, time_value_t new_time);
-
- auto const mach_msg_type_t new_timeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 2,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 36) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->new_timeType, &new_timeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_host_set_time(In0P->Head.msgh_request_port, In0P->new_time);
-}
-
-/* Routine host_adjust_time */
-mig_internal void _Xhost_adjust_time
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t new_adjustmentType;
- time_value_t new_adjustment;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t old_adjustmentType;
- time_value_t old_adjustment;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_host_adjust_time
- (mach_port_t host_priv, time_value_t new_adjustment, time_value_t *old_adjustment);
-
- auto const mach_msg_type_t new_adjustmentCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 2,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t old_adjustmentType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 2,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 36) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->new_adjustmentType, &new_adjustmentCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_host_adjust_time(In0P->Head.msgh_request_port, In0P->new_adjustment, &OutP->old_adjustment);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 44;
-
- OutP->old_adjustmentType = old_adjustmentType;
-}
-
-/* Routine host_get_time */
-mig_internal void _Xhost_get_time
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t current_timeType;
- time_value_t current_time;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_host_get_time
- (mach_port_t host, time_value_t *current_time);
-
- auto const mach_msg_type_t current_timeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 2,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_host_get_time(In0P->Head.msgh_request_port, &OutP->current_time);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 44;
-
- OutP->current_timeType = current_timeType;
-}
-
-/* Routine host_reboot */
-mig_internal void _Xhost_reboot
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t optionsType;
- int options;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_host_reboot
- (mach_port_t host_priv, int options);
-
- auto const mach_msg_type_t optionsCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->optionsType, &optionsCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_host_reboot(In0P->Head.msgh_request_port, In0P->options);
-}
-
-/* Routine vm_wire */
-mig_internal void _Xvm_wire
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t taskType;
- mach_port_t task;
- mach_msg_type_t addressType;
- vm_address_t address;
- mach_msg_type_t sizeType;
- vm_size_t size;
- mach_msg_type_t accessType;
- vm_prot_t access;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_vm_wire
- (mach_port_t host_priv, mach_port_t task, vm_address_t address, vm_size_t size, vm_prot_t access);
-
- auto const mach_msg_type_t taskCheck = {
- /* msgt_name = */ 17,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t addressCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t sizeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t accessCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 56) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->taskType, &taskCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->addressType, &addressCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->sizeType, &sizeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->accessType, &accessCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_vm_wire(In0P->Head.msgh_request_port, In0P->task, In0P->address, In0P->size, In0P->access);
-}
-
-/* Routine thread_wire */
-mig_internal void _Xthread_wire
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t threadType;
- mach_port_t thread;
- mach_msg_type_t wiredType;
- boolean_t wired;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_thread_wire
- (mach_port_t host_priv, mach_port_t thread, boolean_t wired);
-
- auto const mach_msg_type_t threadCheck = {
- /* msgt_name = */ 17,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t wiredCheck = {
- /* msgt_name = */ 0,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->threadType, &threadCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->wiredType, &wiredCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_thread_wire(In0P->Head.msgh_request_port, In0P->thread, In0P->wired);
-}
-
-/* Routine host_info */
-mig_internal void _Xhost_info
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t flavorType;
- int flavor;
- mach_msg_type_t host_info_outCntType;
- mach_msg_type_number_t host_info_outCnt;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t host_info_outType;
- natural_t host_info_out[1024];
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_host_info
- (mach_port_t host, int flavor, host_info_t host_info_out, mach_msg_type_number_t *host_info_outCnt);
-
- auto const mach_msg_type_t flavorCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t host_info_outCntCheck = {
- /* msgt_name = */ MACH_MSG_TYPE_INTEGER_32,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t host_info_outType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1024,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- mach_msg_type_number_t host_info_outCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->flavorType, &flavorCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->host_info_outCntType, &host_info_outCntCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- host_info_outCnt = 1024;
- if (In0P->host_info_outCnt < host_info_outCnt)
- host_info_outCnt = In0P->host_info_outCnt;
-
- OutP->RetCode = S_host_info(In0P->Head.msgh_request_port, In0P->flavor, OutP->host_info_out, &host_info_outCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->host_info_outType = host_info_outType;
-
- OutP->host_info_outType.msgt_number = host_info_outCnt;
- OutP->Head.msgh_size = 36 + (4 * host_info_outCnt);
-}
-
-/* Routine processor_info */
-mig_internal void _Xprocessor_info
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t flavorType;
- int flavor;
- mach_msg_type_t processor_info_outCntType;
- mach_msg_type_number_t processor_info_outCnt;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t hostType;
- mach_port_t host;
- mach_msg_type_t processor_info_outType;
- natural_t processor_info_out[1024];
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_processor_info
- (mach_port_t processor, int flavor, mach_port_t *host, processor_info_t processor_info_out, mach_msg_type_number_t *processor_info_outCnt);
-
- auto const mach_msg_type_t flavorCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t processor_info_outCntCheck = {
- /* msgt_name = */ MACH_MSG_TYPE_INTEGER_32,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t hostType = {
- /* msgt_name = */ 19,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t processor_info_outType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1024,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- mach_msg_type_number_t processor_info_outCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->flavorType, &flavorCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->processor_info_outCntType, &processor_info_outCntCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- processor_info_outCnt = 1024;
- if (In0P->processor_info_outCnt < processor_info_outCnt)
- processor_info_outCnt = In0P->processor_info_outCnt;
-
- OutP->RetCode = S_processor_info(In0P->Head.msgh_request_port, In0P->flavor, &OutP->host, OutP->processor_info_out, &processor_info_outCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-
- OutP->hostType = hostType;
-
- OutP->processor_info_outType = processor_info_outType;
-
- OutP->processor_info_outType.msgt_number = processor_info_outCnt;
- OutP->Head.msgh_size = 44 + (4 * processor_info_outCnt);
-}
-
-/* Routine processor_set_info */
-mig_internal void _Xprocessor_set_info
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t flavorType;
- int flavor;
- mach_msg_type_t info_outCntType;
- mach_msg_type_number_t info_outCnt;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t hostType;
- mach_port_t host;
- mach_msg_type_t info_outType;
- natural_t info_out[1024];
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_processor_set_info
- (mach_port_t set_name, int flavor, mach_port_t *host, processor_set_info_t info_out, mach_msg_type_number_t *info_outCnt);
-
- auto const mach_msg_type_t flavorCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t info_outCntCheck = {
- /* msgt_name = */ MACH_MSG_TYPE_INTEGER_32,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t hostType = {
- /* msgt_name = */ 19,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t info_outType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1024,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- mach_msg_type_number_t info_outCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->flavorType, &flavorCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->info_outCntType, &info_outCntCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- info_outCnt = 1024;
- if (In0P->info_outCnt < info_outCnt)
- info_outCnt = In0P->info_outCnt;
-
- OutP->RetCode = S_processor_set_info(In0P->Head.msgh_request_port, In0P->flavor, &OutP->host, OutP->info_out, &info_outCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-
- OutP->hostType = hostType;
-
- OutP->info_outType = info_outType;
-
- OutP->info_outType.msgt_number = info_outCnt;
- OutP->Head.msgh_size = 44 + (4 * info_outCnt);
-}
-
-/* Routine processor_control */
-mig_internal void _Xprocessor_control
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t processor_cmdType;
- natural_t processor_cmd[1024];
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_processor_control
- (mach_port_t processor, processor_info_t processor_cmd, mach_msg_type_number_t processor_cmdCnt);
-
- unsigned int msgh_size;
-
-#if TypeCheck
- msgh_size = In0P->Head.msgh_size;
- if ((msgh_size < 28) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->processor_cmdType.msgt_inline != TRUE) ||
- (In0P->processor_cmdType.msgt_longform != FALSE) ||
- (In0P->processor_cmdType.msgt_name != 2) ||
- (In0P->processor_cmdType.msgt_size != 32))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (msgh_size != 28 + (4 * In0P->processor_cmdType.msgt_number))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_processor_control(In0P->Head.msgh_request_port, In0P->processor_cmd, In0P->processor_cmdType.msgt_number);
-}
-
-/* Routine host_get_boot_info */
-mig_internal void _Xhost_get_boot_info
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_long_t boot_infoType;
- kernel_boot_info_t boot_info;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_host_get_boot_info
- (mach_port_t host_priv, kernel_boot_info_t boot_info);
-
- auto const mach_msg_type_long_t boot_infoType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 12,
- /* msgtl_size = */ 32768,
- /* msgtl_number = */ 1,
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_host_get_boot_info(In0P->Head.msgh_request_port, OutP->boot_info);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 4140;
-
- OutP->boot_infoType = boot_infoType;
-}
-
-static mig_routine_t mach_host_server_routines[] = {
- _Xhost_processors,
- _Xyyy_host_info,
- _Xyyy_processor_info,
- _Xprocessor_start,
- _Xprocessor_exit,
- _Xyyy_processor_control,
- _Xprocessor_set_default,
- _Xxxx_processor_set_default_priv,
- _Xprocessor_set_create,
- _Xprocessor_set_destroy,
- _Xyyy_processor_set_info,
- _Xprocessor_assign,
- _Xprocessor_get_assignment,
- _Xthread_assign,
- _Xthread_assign_default,
- _Xthread_get_assignment,
- _Xtask_assign,
- _Xtask_assign_default,
- _Xtask_get_assignment,
- _Xhost_kernel_version,
- _Xthread_priority,
- _Xthread_max_priority,
- _Xtask_priority,
- _Xprocessor_set_max_priority,
- _Xthread_policy,
- _Xprocessor_set_policy_enable,
- _Xprocessor_set_policy_disable,
- _Xprocessor_set_tasks,
- _Xprocessor_set_threads,
- _Xhost_processor_sets,
- _Xhost_processor_set_priv,
- _Xthread_depress_abort,
- _Xhost_set_time,
- _Xhost_adjust_time,
- _Xhost_get_time,
- _Xhost_reboot,
- _Xvm_wire,
- _Xthread_wire,
- _Xhost_info,
- _Xprocessor_info,
- _Xprocessor_set_info,
- _Xprocessor_control,
- _Xhost_get_boot_info,
-};
-
-mig_external boolean_t mach_host_server
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- register mach_msg_header_t *InP = InHeadP;
- register mig_reply_header_t *OutP = (mig_reply_header_t *) OutHeadP;
-
- auto const mach_msg_type_t RetCodeType = {
- /* msgt_name = */ MACH_MSG_TYPE_INTEGER_32,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- register mig_routine_t routine;
-
- OutP->Head.msgh_bits = MACH_MSGH_BITS(MACH_MSGH_BITS_REPLY(InP->msgh_bits), 0);
- OutP->Head.msgh_size = sizeof *OutP;
- OutP->Head.msgh_remote_port = InP->msgh_reply_port;
- OutP->Head.msgh_local_port = MACH_PORT_NULL;
- OutP->Head.msgh_seqno = 0;
- OutP->Head.msgh_id = InP->msgh_id + 100;
-
- OutP->RetCodeType = RetCodeType;
-
- if ((InP->msgh_id > 2642) || (InP->msgh_id < 2600) ||
- ((routine = mach_host_server_routines[InP->msgh_id - 2600]) == 0)) {
- OutP->RetCode = MIG_BAD_ID;
- return FALSE;
- }
- (*routine) (InP, &OutP->Head);
- return TRUE;
-}
-
-mig_external mig_routine_t mach_host_server_routine
- (const mach_msg_header_t *InHeadP)
-{
- register int msgh_id;
-
- msgh_id = InHeadP->msgh_id - 2600;
-
- if ((msgh_id > 42) || (msgh_id < 0))
- return 0;
-
- return mach_host_server_routines[msgh_id];
-}
-
diff --git a/boot-proxy-exc/ourmach_portServer.c b/boot-proxy-exc/ourmach_portServer.c
deleted file mode 100644
index 202f2511..00000000
--- a/boot-proxy-exc/ourmach_portServer.c
+++ /dev/null
@@ -1,1413 +0,0 @@
-/* Module mach_port */
-
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE 1
-#endif
-
-#define EXPORT_BOOLEAN
-#include <mach/boolean.h>
-#include <mach/kern_return.h>
-#include <mach/message.h>
-#include <mach/mig_errors.h>
-#include <mach/mig_support.h>
-
-#ifndef mig_internal
-#define mig_internal static
-#endif
-
-#ifndef mig_external
-#define mig_external
-#endif
-
-#ifndef TypeCheck
-#define TypeCheck 1
-#endif
-
-#ifndef UseExternRCSId
-#define UseExternRCSId 1
-#endif
-
-#define BAD_TYPECHECK(type, check) ({\
- union { mach_msg_type_t t; unsigned32_t w; } _t, _c;\
- _t.t = *(type); _c.t = *(check); _t.w != _c.w; })
-#define msgh_request_port msgh_local_port
-#define MACH_MSGH_BITS_REQUEST(bits) MACH_MSGH_BITS_LOCAL(bits)
-#define msgh_reply_port msgh_remote_port
-#define MACH_MSGH_BITS_REPLY(bits) MACH_MSGH_BITS_REMOTE(bits)
-
-#include <mach/std_types.h>
-#include <mach/mach_types.h>
-
-/* Routine mach_port_names */
-mig_internal void _Xmach_port_names
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_long_t namesType;
- mach_port_array_t names;
- mach_msg_type_long_t typesType;
- mach_port_type_array_t types;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_mach_port_names
- (mach_port_t task, mach_port_array_t *names, mach_msg_type_number_t *namesCnt, mach_port_type_array_t *types, mach_msg_type_number_t *typesCnt);
-
- auto const mach_msg_type_long_t namesType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ FALSE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ TRUE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 15,
- /* msgtl_size = */ 32,
- /* msgtl_number = */ 0,
- };
-
- auto const mach_msg_type_long_t typesType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ FALSE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ TRUE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 2,
- /* msgtl_size = */ 32,
- /* msgtl_number = */ 0,
- };
-
- mach_msg_type_number_t namesCnt;
- mach_msg_type_number_t typesCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_mach_port_names(In0P->Head.msgh_request_port, &OutP->names, &namesCnt, &OutP->types, &typesCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
- OutP->Head.msgh_size = 64;
-
- OutP->namesType = namesType;
-
- OutP->namesType.msgtl_number = namesCnt;
-
- OutP->typesType = typesType;
-
- OutP->typesType.msgtl_number = typesCnt;
-}
-
-/* Routine mach_port_type */
-mig_internal void _Xmach_port_type
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t nameType;
- mach_port_t name;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t ptypeType;
- mach_port_type_t ptype;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_mach_port_type
- (mach_port_t task, mach_port_t name, mach_port_type_t *ptype);
-
- auto const mach_msg_type_t nameCheck = {
- /* msgt_name = */ 15,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t ptypeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->nameType, &nameCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_mach_port_type(In0P->Head.msgh_request_port, In0P->name, &OutP->ptype);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 40;
-
- OutP->ptypeType = ptypeType;
-}
-
-/* Routine mach_port_rename */
-mig_internal void _Xmach_port_rename
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t old_nameType;
- mach_port_t old_name;
- mach_msg_type_t new_nameType;
- mach_port_t new_name;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_mach_port_rename
- (mach_port_t task, mach_port_t old_name, mach_port_t new_name);
-
- auto const mach_msg_type_t old_nameCheck = {
- /* msgt_name = */ 15,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t new_nameCheck = {
- /* msgt_name = */ 15,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->old_nameType, &old_nameCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->new_nameType, &new_nameCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_mach_port_rename(In0P->Head.msgh_request_port, In0P->old_name, In0P->new_name);
-}
-
-/* Routine mach_port_allocate_name */
-mig_internal void _Xmach_port_allocate_name
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t rightType;
- mach_port_right_t right;
- mach_msg_type_t nameType;
- mach_port_t name;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_mach_port_allocate_name
- (mach_port_t task, mach_port_right_t right, mach_port_t name);
-
- auto const mach_msg_type_t rightCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t nameCheck = {
- /* msgt_name = */ 15,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->rightType, &rightCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->nameType, &nameCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_mach_port_allocate_name(In0P->Head.msgh_request_port, In0P->right, In0P->name);
-}
-
-/* Routine mach_port_allocate */
-mig_internal void _Xmach_port_allocate
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t rightType;
- mach_port_right_t right;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t nameType;
- mach_port_t name;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_mach_port_allocate
- (mach_port_t task, mach_port_right_t right, mach_port_t *name);
-
- auto const mach_msg_type_t rightCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t nameType = {
- /* msgt_name = */ 15,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->rightType, &rightCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_mach_port_allocate(In0P->Head.msgh_request_port, In0P->right, &OutP->name);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 40;
-
- OutP->nameType = nameType;
-}
-
-/* Routine mach_port_destroy */
-mig_internal void _Xmach_port_destroy
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t nameType;
- mach_port_t name;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_mach_port_destroy
- (mach_port_t task, mach_port_t name);
-
- auto const mach_msg_type_t nameCheck = {
- /* msgt_name = */ 15,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->nameType, &nameCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_mach_port_destroy(In0P->Head.msgh_request_port, In0P->name);
-}
-
-/* Routine mach_port_deallocate */
-mig_internal void _Xmach_port_deallocate
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t nameType;
- mach_port_t name;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_mach_port_deallocate
- (mach_port_t task, mach_port_t name);
-
- auto const mach_msg_type_t nameCheck = {
- /* msgt_name = */ 15,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->nameType, &nameCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_mach_port_deallocate(In0P->Head.msgh_request_port, In0P->name);
-}
-
-/* Routine mach_port_get_refs */
-mig_internal void _Xmach_port_get_refs
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t nameType;
- mach_port_t name;
- mach_msg_type_t rightType;
- mach_port_right_t right;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t refsType;
- mach_port_urefs_t refs;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_mach_port_get_refs
- (mach_port_t task, mach_port_t name, mach_port_right_t right, mach_port_urefs_t *refs);
-
- auto const mach_msg_type_t nameCheck = {
- /* msgt_name = */ 15,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t rightCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t refsType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->nameType, &nameCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->rightType, &rightCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_mach_port_get_refs(In0P->Head.msgh_request_port, In0P->name, In0P->right, &OutP->refs);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 40;
-
- OutP->refsType = refsType;
-}
-
-/* Routine mach_port_mod_refs */
-mig_internal void _Xmach_port_mod_refs
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t nameType;
- mach_port_t name;
- mach_msg_type_t rightType;
- mach_port_right_t right;
- mach_msg_type_t deltaType;
- mach_port_delta_t delta;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_mach_port_mod_refs
- (mach_port_t task, mach_port_t name, mach_port_right_t right, mach_port_delta_t delta);
-
- auto const mach_msg_type_t nameCheck = {
- /* msgt_name = */ 15,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t rightCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t deltaCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 48) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->nameType, &nameCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->rightType, &rightCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->deltaType, &deltaCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_mach_port_mod_refs(In0P->Head.msgh_request_port, In0P->name, In0P->right, In0P->delta);
-}
-
-/* Routine old_mach_port_get_receive_status */
-mig_internal void _Xold_mach_port_get_receive_status
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t nameType;
- mach_port_t name;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t statusType;
- old_mach_port_status_t status;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_old_mach_port_get_receive_status
- (mach_port_t task, mach_port_t name, old_mach_port_status_t *status);
-
- auto const mach_msg_type_t nameCheck = {
- /* msgt_name = */ 15,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t statusType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 8,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->nameType, &nameCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_old_mach_port_get_receive_status(In0P->Head.msgh_request_port, In0P->name, &OutP->status);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 68;
-
- OutP->statusType = statusType;
-}
-
-/* Routine mach_port_set_qlimit */
-mig_internal void _Xmach_port_set_qlimit
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t nameType;
- mach_port_t name;
- mach_msg_type_t qlimitType;
- mach_port_msgcount_t qlimit;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_mach_port_set_qlimit
- (mach_port_t task, mach_port_t name, mach_port_msgcount_t qlimit);
-
- auto const mach_msg_type_t nameCheck = {
- /* msgt_name = */ 15,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t qlimitCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->nameType, &nameCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->qlimitType, &qlimitCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_mach_port_set_qlimit(In0P->Head.msgh_request_port, In0P->name, In0P->qlimit);
-}
-
-/* Routine mach_port_set_mscount */
-mig_internal void _Xmach_port_set_mscount
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t nameType;
- mach_port_t name;
- mach_msg_type_t mscountType;
- mach_port_mscount_t mscount;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_mach_port_set_mscount
- (mach_port_t task, mach_port_t name, mach_port_mscount_t mscount);
-
- auto const mach_msg_type_t nameCheck = {
- /* msgt_name = */ 15,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t mscountCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->nameType, &nameCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->mscountType, &mscountCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_mach_port_set_mscount(In0P->Head.msgh_request_port, In0P->name, In0P->mscount);
-}
-
-/* Routine mach_port_get_set_status */
-mig_internal void _Xmach_port_get_set_status
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t nameType;
- mach_port_t name;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_long_t membersType;
- mach_port_array_t members;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_mach_port_get_set_status
- (mach_port_t task, mach_port_t name, mach_port_array_t *members, mach_msg_type_number_t *membersCnt);
-
- auto const mach_msg_type_t nameCheck = {
- /* msgt_name = */ 15,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_long_t membersType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ FALSE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ TRUE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 15,
- /* msgtl_size = */ 32,
- /* msgtl_number = */ 0,
- };
-
- mach_msg_type_number_t membersCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->nameType, &nameCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_mach_port_get_set_status(In0P->Head.msgh_request_port, In0P->name, &OutP->members, &membersCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
- OutP->Head.msgh_size = 48;
-
- OutP->membersType = membersType;
-
- OutP->membersType.msgtl_number = membersCnt;
-}
-
-/* Routine mach_port_move_member */
-mig_internal void _Xmach_port_move_member
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t memberType;
- mach_port_t member;
- mach_msg_type_t afterType;
- mach_port_t after;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_mach_port_move_member
- (mach_port_t task, mach_port_t member, mach_port_t after);
-
- auto const mach_msg_type_t memberCheck = {
- /* msgt_name = */ 15,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t afterCheck = {
- /* msgt_name = */ 15,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->memberType, &memberCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->afterType, &afterCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_mach_port_move_member(In0P->Head.msgh_request_port, In0P->member, In0P->after);
-}
-
-/* Routine mach_port_request_notification */
-mig_internal void _Xmach_port_request_notification
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t nameType;
- mach_port_t name;
- mach_msg_type_t idType;
- mach_msg_id_t id;
- mach_msg_type_t syncType;
- mach_port_mscount_t sync;
- mach_msg_type_t notifyType;
- mach_port_t notify;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t previousType;
- mach_port_t previous;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_mach_port_request_notification
- (mach_port_t task, mach_port_t name, mach_msg_id_t id, mach_port_mscount_t sync, mach_port_t notify, mach_port_t *previous, mach_msg_type_name_t *previousPoly);
-
- boolean_t msgh_simple;
- auto const mach_msg_type_t nameCheck = {
- /* msgt_name = */ 15,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t idCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t syncCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t notifyCheck = {
- /* msgt_name = */ 18,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t previousType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- mach_msg_type_name_t previousPoly;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 56) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->nameType, &nameCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->idType, &idCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->syncType, &syncCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->notifyType, &notifyCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_mach_port_request_notification(In0P->Head.msgh_request_port, In0P->name, In0P->id, In0P->sync, In0P->notify, &OutP->previous, &previousPoly);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- msgh_simple = TRUE;
- OutP->Head.msgh_size = 40;
-
- OutP->previousType = previousType;
-
- if (MACH_MSG_TYPE_PORT_ANY(previousPoly))
- msgh_simple = FALSE;
-
- OutP->previousType.msgt_name = previousPoly;
-
- if (!msgh_simple)
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-}
-
-/* Routine mach_port_insert_right */
-mig_internal void _Xmach_port_insert_right
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t nameType;
- mach_port_t name;
- mach_msg_type_t polyType;
- mach_port_t poly;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_mach_port_insert_right
- (mach_port_t task, mach_port_t name, mach_port_t poly, mach_msg_type_name_t polyPoly);
-
-#if TypeCheck
- boolean_t msgh_simple;
-#endif /* TypeCheck */
-
- auto const mach_msg_type_t nameCheck = {
- /* msgt_name = */ 15,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- msgh_simple = !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX);
- if ((In0P->Head.msgh_size != 40))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->nameType, &nameCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->polyType.msgt_inline != TRUE) ||
- (In0P->polyType.msgt_longform != FALSE) ||
- (MACH_MSG_TYPE_PORT_ANY(In0P->polyType.msgt_name) && msgh_simple) ||
- (In0P->polyType.msgt_number != 1) ||
- (In0P->polyType.msgt_size != 32))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_mach_port_insert_right(In0P->Head.msgh_request_port, In0P->name, In0P->poly, In0P->polyType.msgt_name);
-}
-
-/* Routine mach_port_extract_right */
-mig_internal void _Xmach_port_extract_right
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t nameType;
- mach_port_t name;
- mach_msg_type_t msgt_nameType;
- mach_msg_type_name_t msgt_name;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t polyType;
- mach_port_t poly;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_mach_port_extract_right
- (mach_port_t task, mach_port_t name, mach_msg_type_name_t msgt_name, mach_port_t *poly, mach_msg_type_name_t *polyPoly);
-
- boolean_t msgh_simple;
- auto const mach_msg_type_t nameCheck = {
- /* msgt_name = */ 15,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t msgt_nameCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t polyType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- mach_msg_type_name_t polyPoly;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->nameType, &nameCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->msgt_nameType, &msgt_nameCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_mach_port_extract_right(In0P->Head.msgh_request_port, In0P->name, In0P->msgt_name, &OutP->poly, &polyPoly);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- msgh_simple = TRUE;
- OutP->Head.msgh_size = 40;
-
- OutP->polyType = polyType;
-
- if (MACH_MSG_TYPE_PORT_ANY(polyPoly))
- msgh_simple = FALSE;
-
- OutP->polyType.msgt_name = polyPoly;
-
- if (!msgh_simple)
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-}
-
-/* Routine mach_port_get_receive_status */
-mig_internal void _Xmach_port_get_receive_status
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t nameType;
- mach_port_t name;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t statusType;
- mach_port_status_t status;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_mach_port_get_receive_status
- (mach_port_t task, mach_port_t name, mach_port_status_t *status);
-
- auto const mach_msg_type_t nameCheck = {
- /* msgt_name = */ 15,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t statusType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 9,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->nameType, &nameCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_mach_port_get_receive_status(In0P->Head.msgh_request_port, In0P->name, &OutP->status);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 72;
-
- OutP->statusType = statusType;
-}
-
-/* Routine mach_port_set_seqno */
-mig_internal void _Xmach_port_set_seqno
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t nameType;
- mach_port_t name;
- mach_msg_type_t seqnoType;
- mach_port_seqno_t seqno;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_mach_port_set_seqno
- (mach_port_t task, mach_port_t name, mach_port_seqno_t seqno);
-
- auto const mach_msg_type_t nameCheck = {
- /* msgt_name = */ 15,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t seqnoCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->nameType, &nameCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->seqnoType, &seqnoCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_mach_port_set_seqno(In0P->Head.msgh_request_port, In0P->name, In0P->seqno);
-}
-
-static mig_routine_t mach_port_server_routines[] = {
- _Xmach_port_names,
- _Xmach_port_type,
- _Xmach_port_rename,
- _Xmach_port_allocate_name,
- _Xmach_port_allocate,
- _Xmach_port_destroy,
- _Xmach_port_deallocate,
- _Xmach_port_get_refs,
- _Xmach_port_mod_refs,
- _Xold_mach_port_get_receive_status,
- _Xmach_port_set_qlimit,
- _Xmach_port_set_mscount,
- _Xmach_port_get_set_status,
- _Xmach_port_move_member,
- _Xmach_port_request_notification,
- _Xmach_port_insert_right,
- _Xmach_port_extract_right,
- _Xmach_port_get_receive_status,
- _Xmach_port_set_seqno,
-};
-
-mig_external boolean_t mach_port_server
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- register mach_msg_header_t *InP = InHeadP;
- register mig_reply_header_t *OutP = (mig_reply_header_t *) OutHeadP;
-
- auto const mach_msg_type_t RetCodeType = {
- /* msgt_name = */ MACH_MSG_TYPE_INTEGER_32,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- register mig_routine_t routine;
-
- OutP->Head.msgh_bits = MACH_MSGH_BITS(MACH_MSGH_BITS_REPLY(InP->msgh_bits), 0);
- OutP->Head.msgh_size = sizeof *OutP;
- OutP->Head.msgh_remote_port = InP->msgh_reply_port;
- OutP->Head.msgh_local_port = MACH_PORT_NULL;
- OutP->Head.msgh_seqno = 0;
- OutP->Head.msgh_id = InP->msgh_id + 100;
-
- OutP->RetCodeType = RetCodeType;
-
- if ((InP->msgh_id > 3218) || (InP->msgh_id < 3200) ||
- ((routine = mach_port_server_routines[InP->msgh_id - 3200]) == 0)) {
- OutP->RetCode = MIG_BAD_ID;
- return FALSE;
- }
- (*routine) (InP, &OutP->Head);
- return TRUE;
-}
-
-mig_external mig_routine_t mach_port_server_routine
- (const mach_msg_header_t *InHeadP)
-{
- register int msgh_id;
-
- msgh_id = InHeadP->msgh_id - 3200;
-
- if ((msgh_id > 18) || (msgh_id < 0))
- return 0;
-
- return mach_port_server_routines[msgh_id];
-}
-
diff --git a/boot-proxy-exc/termServer.c b/boot-proxy-exc/termServer.c
deleted file mode 100644
index b24b3157..00000000
--- a/boot-proxy-exc/termServer.c
+++ /dev/null
@@ -1,701 +0,0 @@
-/* Module term */
-
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE 1
-#endif
-
-#define EXPORT_BOOLEAN
-#include <mach/boolean.h>
-#include <mach/kern_return.h>
-#include <mach/message.h>
-#include <mach/mig_errors.h>
-#include <mach/mig_support.h>
-
-#ifndef mig_internal
-#define mig_internal static
-#endif
-
-#ifndef mig_external
-#define mig_external
-#endif
-
-#ifndef TypeCheck
-#define TypeCheck 1
-#endif
-
-#ifndef UseExternRCSId
-#define UseExternRCSId 1
-#endif
-
-#define BAD_TYPECHECK(type, check) ({\
- union { mach_msg_type_t t; unsigned32_t w; } _t, _c;\
- _t.t = *(type); _c.t = *(check); _t.w != _c.w; })
-#define msgh_request_port msgh_local_port
-#define MACH_MSGH_BITS_REQUEST(bits) MACH_MSGH_BITS_LOCAL(bits)
-#define msgh_reply_port msgh_remote_port
-#define MACH_MSGH_BITS_REPLY(bits) MACH_MSGH_BITS_REMOTE(bits)
-
-#include <mach/std_types.h>
-#include <mach/mach_types.h>
-#include <device/device_types.h>
-#include <device/net_status.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/statfs.h>
-#include <sys/resource.h>
-#include <sys/utsname.h>
-#include <hurd/hurd_types.h>
-
-/* Routine term_getctty */
-mig_internal void _Xterm_getctty
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t cttyType;
- mach_port_t ctty;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_term_getctty
- (io_t terminal, mach_port_t *ctty, mach_msg_type_name_t *cttyPoly);
-
- boolean_t msgh_simple;
- auto const mach_msg_type_t cttyType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- mach_msg_type_name_t cttyPoly;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_term_getctty(In0P->Head.msgh_request_port, &OutP->ctty, &cttyPoly);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- msgh_simple = TRUE;
- OutP->Head.msgh_size = 40;
-
- OutP->cttyType = cttyType;
-
- if (MACH_MSG_TYPE_PORT_ANY(cttyPoly))
- msgh_simple = FALSE;
-
- OutP->cttyType.msgt_name = cttyPoly;
-
- if (!msgh_simple)
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-}
-
-/* Routine term_open_ctty */
-mig_internal void _Xterm_open_ctty
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t pidType;
- pid_t pid;
- mach_msg_type_t pgrpType;
- pid_t pgrp;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t newttyType;
- mach_port_t newtty;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_term_open_ctty
- (io_t terminal, pid_t pid, pid_t pgrp, mach_port_t *newtty, mach_msg_type_name_t *newttyPoly);
-
- boolean_t msgh_simple;
- auto const mach_msg_type_t pidCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t pgrpCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t newttyType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- mach_msg_type_name_t newttyPoly;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->pidType, &pidCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->pgrpType, &pgrpCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_term_open_ctty(In0P->Head.msgh_request_port, In0P->pid, In0P->pgrp, &OutP->newtty, &newttyPoly);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- msgh_simple = TRUE;
- OutP->Head.msgh_size = 40;
-
- OutP->newttyType = newttyType;
-
- if (MACH_MSG_TYPE_PORT_ANY(newttyPoly))
- msgh_simple = FALSE;
-
- OutP->newttyType.msgt_name = newttyPoly;
-
- if (!msgh_simple)
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-}
-
-/* Routine term_set_nodename */
-mig_internal void _Xterm_set_nodename
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t nameType;
- string_t name;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_term_set_nodename
- (io_t terminal, string_t name);
-
- auto const mach_msg_type_t nameCheck = {
- /* msgt_name = */ MACH_MSG_TYPE_STRING_C,
- /* msgt_size = */ 8,
- /* msgt_number = */ 1024,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 1052) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->nameType, &nameCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_term_set_nodename(In0P->Head.msgh_request_port, In0P->name);
-}
-
-/* Routine term_get_nodename */
-mig_internal void _Xterm_get_nodename
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t nameType;
- string_t name;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_term_get_nodename
- (io_t terminal, string_t name);
-
- auto const mach_msg_type_t nameType = {
- /* msgt_name = */ MACH_MSG_TYPE_STRING_C,
- /* msgt_size = */ 8,
- /* msgt_number = */ 1024,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_term_get_nodename(In0P->Head.msgh_request_port, OutP->name);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 1060;
-
- OutP->nameType = nameType;
-}
-
-/* Routine term_set_filenode */
-mig_internal void _Xterm_set_filenode
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t filenodeType;
- file_t filenode;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_term_set_filenode
- (io_t terminal, file_t filenode);
-
- auto const mach_msg_type_t filenodeCheck = {
- /* msgt_name = */ 17,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->filenodeType, &filenodeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_term_set_filenode(In0P->Head.msgh_request_port, In0P->filenode);
-}
-
-/* Routine term_get_bottom_type */
-mig_internal void _Xterm_get_bottom_type
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t ttypeType;
- int ttype;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_term_get_bottom_type
- (io_t terminal, int *ttype);
-
- auto const mach_msg_type_t ttypeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_term_get_bottom_type(In0P->Head.msgh_request_port, &OutP->ttype);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 40;
-
- OutP->ttypeType = ttypeType;
-}
-
-/* Routine term_on_machdev */
-mig_internal void _Xterm_on_machdev
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t machdevType;
- mach_port_t machdev;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_term_on_machdev
- (io_t terminal, mach_port_t machdev);
-
- auto const mach_msg_type_t machdevCheck = {
- /* msgt_name = */ 17,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->machdevType, &machdevCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_term_on_machdev(In0P->Head.msgh_request_port, In0P->machdev);
-}
-
-/* Routine term_on_hurddev */
-mig_internal void _Xterm_on_hurddev
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t hurddevType;
- io_t hurddev;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_term_on_hurddev
- (io_t terminal, io_t hurddev);
-
- auto const mach_msg_type_t hurddevCheck = {
- /* msgt_name = */ 17,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->hurddevType, &hurddevCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_term_on_hurddev(In0P->Head.msgh_request_port, In0P->hurddev);
-}
-
-/* Routine term_on_pty */
-mig_internal void _Xterm_on_pty
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t ptymasterType;
- io_t ptymaster;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_term_on_pty
- (io_t terminal, io_t *ptymaster);
-
- auto const mach_msg_type_t ptymasterType = {
- /* msgt_name = */ 19,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_term_on_pty(In0P->Head.msgh_request_port, &OutP->ptymaster);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
- OutP->Head.msgh_size = 40;
-
- OutP->ptymasterType = ptymasterType;
-}
-
-/* Routine termctty_open_terminal */
-mig_internal void _Xtermctty_open_terminal
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t flagsType;
- int flags;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t terminalType;
- mach_port_t terminal;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_termctty_open_terminal
- (mach_port_t ctty, int flags, mach_port_t *terminal, mach_msg_type_name_t *terminalPoly);
-
- boolean_t msgh_simple;
- auto const mach_msg_type_t flagsCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t terminalType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- mach_msg_type_name_t terminalPoly;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->flagsType, &flagsCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_termctty_open_terminal(In0P->Head.msgh_request_port, In0P->flags, &OutP->terminal, &terminalPoly);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- msgh_simple = TRUE;
- OutP->Head.msgh_size = 40;
-
- OutP->terminalType = terminalType;
-
- if (MACH_MSG_TYPE_PORT_ANY(terminalPoly))
- msgh_simple = FALSE;
-
- OutP->terminalType.msgt_name = terminalPoly;
-
- if (!msgh_simple)
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-}
-
-/* Routine term_get_peername */
-mig_internal void _Xterm_get_peername
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t nameType;
- string_t name;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_term_get_peername
- (io_t terminal, string_t name);
-
- auto const mach_msg_type_t nameType = {
- /* msgt_name = */ MACH_MSG_TYPE_STRING_C,
- /* msgt_size = */ 8,
- /* msgt_number = */ 1024,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_term_get_peername(In0P->Head.msgh_request_port, OutP->name);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 1060;
-
- OutP->nameType = nameType;
-}
-
-static mig_routine_t term_server_routines[] = {
- _Xterm_getctty,
- _Xterm_open_ctty,
- _Xterm_set_nodename,
- _Xterm_get_nodename,
- _Xterm_set_filenode,
- _Xterm_get_bottom_type,
- _Xterm_on_machdev,
- _Xterm_on_hurddev,
- _Xterm_on_pty,
- _Xtermctty_open_terminal,
- _Xterm_get_peername,
-};
-
-mig_external boolean_t term_server
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- register mach_msg_header_t *InP = InHeadP;
- register mig_reply_header_t *OutP = (mig_reply_header_t *) OutHeadP;
-
- auto const mach_msg_type_t RetCodeType = {
- /* msgt_name = */ MACH_MSG_TYPE_INTEGER_32,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- register mig_routine_t routine;
-
- OutP->Head.msgh_bits = MACH_MSGH_BITS(MACH_MSGH_BITS_REPLY(InP->msgh_bits), 0);
- OutP->Head.msgh_size = sizeof *OutP;
- OutP->Head.msgh_remote_port = InP->msgh_reply_port;
- OutP->Head.msgh_local_port = MACH_PORT_NULL;
- OutP->Head.msgh_seqno = 0;
- OutP->Head.msgh_id = InP->msgh_id + 100;
-
- OutP->RetCodeType = RetCodeType;
-
- if ((InP->msgh_id > 28010) || (InP->msgh_id < 28000) ||
- ((routine = term_server_routines[InP->msgh_id - 28000]) == 0)) {
- OutP->RetCode = MIG_BAD_ID;
- return FALSE;
- }
- (*routine) (InP, &OutP->Head);
- return TRUE;
-}
-
-mig_external mig_routine_t term_server_routine
- (const mach_msg_header_t *InHeadP)
-{
- register int msgh_id;
-
- msgh_id = InHeadP->msgh_id - 28000;
-
- if ((msgh_id > 10) || (msgh_id < 0))
- return 0;
-
- return term_server_routines[msgh_id];
-}
-
diff --git a/boot.backup1/bootstrapServer.c b/boot.backup1/bootstrapServer.c
deleted file mode 100644
index 2aa817be..00000000
--- a/boot.backup1/bootstrapServer.c
+++ /dev/null
@@ -1,154 +0,0 @@
-/* Module bootstrap */
-
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE 1
-#endif
-
-#define EXPORT_BOOLEAN
-#include <mach/boolean.h>
-#include <mach/kern_return.h>
-#include <mach/message.h>
-#include <mach/mig_errors.h>
-#include <mach/mig_support.h>
-
-#ifndef mig_internal
-#define mig_internal static
-#endif
-
-#ifndef mig_external
-#define mig_external
-#endif
-
-#ifndef TypeCheck
-#define TypeCheck 1
-#endif
-
-#ifndef UseExternRCSId
-#define UseExternRCSId 1
-#endif
-
-#define BAD_TYPECHECK(type, check) ({\
- union { mach_msg_type_t t; unsigned32_t w; } _t, _c;\
- _t.t = *(type); _c.t = *(check); _t.w != _c.w; })
-#define msgh_request_port msgh_local_port
-#define MACH_MSGH_BITS_REQUEST(bits) MACH_MSGH_BITS_LOCAL(bits)
-#define msgh_reply_port msgh_remote_port
-#define MACH_MSGH_BITS_REPLY(bits) MACH_MSGH_BITS_REMOTE(bits)
-
-#include <mach/std_types.h>
-
-/* Routine bootstrap_privileged_ports */
-mig_internal void _Xbootstrap_privileged_ports
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t priv_hostType;
- mach_port_t priv_host;
- mach_msg_type_t priv_deviceType;
- mach_port_t priv_device;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t do_bootstrap_privileged_ports
- (mach_port_t bootstrap, mach_port_t *priv_host, mach_port_t *priv_device);
-
- auto const mach_msg_type_t priv_hostType = {
- /* msgt_name = */ 19,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t priv_deviceType = {
- /* msgt_name = */ 19,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = do_bootstrap_privileged_ports(In0P->Head.msgh_request_port, &OutP->priv_host, &OutP->priv_device);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
- OutP->Head.msgh_size = 48;
-
- OutP->priv_hostType = priv_hostType;
-
- OutP->priv_deviceType = priv_deviceType;
-}
-
-static mig_routine_t bootstrap_server_routines[] = {
- 0,
- _Xbootstrap_privileged_ports,
-};
-
-mig_external boolean_t bootstrap_server
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- register mach_msg_header_t *InP = InHeadP;
- register mig_reply_header_t *OutP = (mig_reply_header_t *) OutHeadP;
-
- auto const mach_msg_type_t RetCodeType = {
- /* msgt_name = */ MACH_MSG_TYPE_INTEGER_32,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- register mig_routine_t routine;
-
- OutP->Head.msgh_bits = MACH_MSGH_BITS(MACH_MSGH_BITS_REPLY(InP->msgh_bits), 0);
- OutP->Head.msgh_size = sizeof *OutP;
- OutP->Head.msgh_remote_port = InP->msgh_reply_port;
- OutP->Head.msgh_local_port = MACH_PORT_NULL;
- OutP->Head.msgh_seqno = 0;
- OutP->Head.msgh_id = InP->msgh_id + 100;
-
- OutP->RetCodeType = RetCodeType;
-
- if ((InP->msgh_id > 1000000) || (InP->msgh_id < 999999) ||
- ((routine = bootstrap_server_routines[InP->msgh_id - 999999]) == 0)) {
- OutP->RetCode = MIG_BAD_ID;
- return FALSE;
- }
- (*routine) (InP, &OutP->Head);
- return TRUE;
-}
-
-mig_external mig_routine_t bootstrap_server_routine
- (const mach_msg_header_t *InHeadP)
-{
- register int msgh_id;
-
- msgh_id = InHeadP->msgh_id - 999999;
-
- if ((msgh_id > 1) || (msgh_id < 0))
- return 0;
-
- return bootstrap_server_routines[msgh_id];
-}
-
diff --git a/boot.backup1/device_replyUser.c b/boot.backup1/device_replyUser.c
deleted file mode 100644
index 5735b1be..00000000
--- a/boot.backup1/device_replyUser.c
+++ /dev/null
@@ -1,374 +0,0 @@
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE 1
-#endif
-
-#include "device_reply_U.h"
-#define EXPORT_BOOLEAN
-#include <mach/boolean.h>
-#include <mach/kern_return.h>
-#include <mach/message.h>
-#include <mach/notify.h>
-#include <mach/mach_types.h>
-#include <mach/mig_errors.h>
-#include <mach/mig_support.h>
-#include <mach/msg_type.h>
-/* LINTLIBRARY */
-
-#ifndef mig_internal
-#define mig_internal static
-#endif
-
-#ifndef mig_external
-#define mig_external
-#endif
-
-#ifndef TypeCheck
-#define TypeCheck 1
-#endif
-
-#ifndef UseExternRCSId
-#define UseExternRCSId 1
-#endif
-
-#define BAD_TYPECHECK(type, check) ({\
- union { mach_msg_type_t t; unsigned32_t w; } _t, _c;\
- _t.t = *(type); _c.t = *(check); _t.w != _c.w; })
-#define msgh_request_port msgh_remote_port
-#define msgh_reply_port msgh_local_port
-
-#include <mach/std_types.h>
-#include <device/device_types.h>
-#include <device/net_status.h>
-
-/* SimpleRoutine device_open_reply */
-mig_external kern_return_t ds_device_open_reply
-(
- mach_port_t reply_port,
- mach_msg_type_name_t reply_portPoly,
- kern_return_t return_code,
- mach_port_t device_port
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- mach_msg_type_t device_portType;
- mach_port_t device_port;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t device_portType = {
- /* msgt_name = */ 20,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->device_portType = device_portType;
-
- InP->device_port = device_port;
-
- InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX|
- MACH_MSGH_BITS(reply_portPoly, 0);
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply_port;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 2900;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 40, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine device_write_reply */
-mig_external kern_return_t ds_device_write_reply
-(
- mach_port_t reply_port,
- mach_msg_type_name_t reply_portPoly,
- kern_return_t return_code,
- int bytes_written
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- mach_msg_type_t bytes_writtenType;
- int bytes_written;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t bytes_writtenType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->bytes_writtenType = bytes_writtenType;
-
- InP->bytes_written = bytes_written;
-
- InP->Head.msgh_bits =
- MACH_MSGH_BITS(reply_portPoly, 0);
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply_port;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 2902;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 40, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine device_write_reply_inband */
-mig_external kern_return_t ds_device_write_reply_inband
-(
- mach_port_t reply_port,
- mach_msg_type_name_t reply_portPoly,
- kern_return_t return_code,
- int bytes_written
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- mach_msg_type_t bytes_writtenType;
- int bytes_written;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t bytes_writtenType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->bytes_writtenType = bytes_writtenType;
-
- InP->bytes_written = bytes_written;
-
- InP->Head.msgh_bits =
- MACH_MSGH_BITS(reply_portPoly, 0);
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply_port;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 2903;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 40, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine device_read_reply */
-mig_external kern_return_t ds_device_read_reply
-(
- mach_port_t reply_port,
- mach_msg_type_name_t reply_portPoly,
- kern_return_t return_code,
- io_buf_ptr_t data,
- mach_msg_type_number_t dataCnt
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- mach_msg_type_long_t dataType;
- io_buf_ptr_t data;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_long_t dataType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ FALSE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ TRUE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 9,
- /* msgtl_size = */ 8,
- /* msgtl_number = */ 0,
- };
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->dataType = dataType;
-
- InP->data = data;
-
- InP->dataType.msgtl_number = dataCnt;
-
- InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX|
- MACH_MSGH_BITS(reply_portPoly, 0);
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply_port;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 2904;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 48, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine device_read_reply_inband */
-mig_external kern_return_t ds_device_read_reply_inband
-(
- mach_port_t reply_port,
- mach_msg_type_name_t reply_portPoly,
- kern_return_t return_code,
- io_buf_ptr_inband_t data,
- mach_msg_type_number_t dataCnt
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- mach_msg_type_t dataType;
- char data[128];
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
- unsigned int msgh_size;
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t dataType = {
- /* msgt_name = */ 8,
- /* msgt_size = */ 8,
- /* msgt_number = */ 128,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->dataType = dataType;
-
- if (dataCnt > 128) {
- return MIG_ARRAY_TOO_LARGE;
- }
- else {
- memcpy(InP->data, data, dataCnt);
- }
-
- InP->dataType.msgt_number = dataCnt;
-
- msgh_size = 36 + ((dataCnt + 3) & ~3);
- InP->Head.msgh_bits =
- MACH_MSGH_BITS(reply_portPoly, 0);
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply_port;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 2905;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, msgh_size, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
diff --git a/boot.backup1/excServer.c b/boot.backup1/excServer.c
deleted file mode 100644
index 9c3191dd..00000000
--- a/boot.backup1/excServer.c
+++ /dev/null
@@ -1,205 +0,0 @@
-/* Module exc */
-
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE 1
-#endif
-
-#define EXPORT_BOOLEAN
-#include <mach/boolean.h>
-#include <mach/kern_return.h>
-#include <mach/message.h>
-#include <mach/mig_errors.h>
-#include <mach/mig_support.h>
-
-#ifndef mig_internal
-#define mig_internal static
-#endif
-
-#ifndef mig_external
-#define mig_external
-#endif
-
-#ifndef TypeCheck
-#define TypeCheck 1
-#endif
-
-#ifndef UseExternRCSId
-#define UseExternRCSId 1
-#endif
-
-#define BAD_TYPECHECK(type, check) ({\
- union { mach_msg_type_t t; unsigned32_t w; } _t, _c;\
- _t.t = *(type); _c.t = *(check); _t.w != _c.w; })
-#define msgh_request_port msgh_local_port
-#define MACH_MSGH_BITS_REQUEST(bits) MACH_MSGH_BITS_LOCAL(bits)
-#define msgh_reply_port msgh_remote_port
-#define MACH_MSGH_BITS_REPLY(bits) MACH_MSGH_BITS_REMOTE(bits)
-
-#include <mach/std_types.h>
-
-/* Routine exception_raise */
-mig_internal void _Xexception_raise
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t threadType;
- mach_port_t thread;
- mach_msg_type_t taskType;
- mach_port_t task;
- mach_msg_type_t exceptionType;
- integer_t exception;
- mach_msg_type_t codeType;
- integer_t code;
- mach_msg_type_t subcodeType;
- integer_t subcode;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t catch_exception_raise
- (mach_port_t exception_port, mach_port_t thread, mach_port_t task, integer_t exception, integer_t code, integer_t subcode);
-
- auto const mach_msg_type_t threadCheck = {
- /* msgt_name = */ 17,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t taskCheck = {
- /* msgt_name = */ 17,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t exceptionCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t codeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t subcodeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 64) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->threadType, &threadCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->taskType, &taskCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->exceptionType, &exceptionCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->codeType, &codeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->subcodeType, &subcodeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = catch_exception_raise(In0P->Head.msgh_request_port, In0P->thread, In0P->task, In0P->exception, In0P->code, In0P->subcode);
-}
-
-static mig_routine_t exc_server_routines[] = {
- _Xexception_raise,
-};
-
-mig_external boolean_t exc_server
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- register mach_msg_header_t *InP = InHeadP;
- register mig_reply_header_t *OutP = (mig_reply_header_t *) OutHeadP;
-
- auto const mach_msg_type_t RetCodeType = {
- /* msgt_name = */ MACH_MSG_TYPE_INTEGER_32,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- register mig_routine_t routine;
-
- OutP->Head.msgh_bits = MACH_MSGH_BITS(MACH_MSGH_BITS_REPLY(InP->msgh_bits), 0);
- OutP->Head.msgh_size = sizeof *OutP;
- OutP->Head.msgh_remote_port = InP->msgh_reply_port;
- OutP->Head.msgh_local_port = MACH_PORT_NULL;
- OutP->Head.msgh_seqno = 0;
- OutP->Head.msgh_id = InP->msgh_id + 100;
-
- OutP->RetCodeType = RetCodeType;
-
- if ((InP->msgh_id > 2400) || (InP->msgh_id < 2400) ||
- ((routine = exc_server_routines[InP->msgh_id - 2400]) == 0)) {
- OutP->RetCode = MIG_BAD_ID;
- return FALSE;
- }
- (*routine) (InP, &OutP->Head);
- return TRUE;
-}
-
-mig_external mig_routine_t exc_server_routine
- (const mach_msg_header_t *InHeadP)
-{
- register int msgh_id;
-
- msgh_id = InHeadP->msgh_id - 2400;
-
- if ((msgh_id > 0) || (msgh_id < 0))
- return 0;
-
- return exc_server_routines[msgh_id];
-}
-
diff --git a/boot.backup1/ioServer.c b/boot.backup1/ioServer.c
deleted file mode 100644
index 627acbdf..00000000
--- a/boot.backup1/ioServer.c
+++ /dev/null
@@ -1,1873 +0,0 @@
-/* Module io */
-
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE 1
-#endif
-
-#define EXPORT_BOOLEAN
-#include <mach/boolean.h>
-#include <mach/kern_return.h>
-#include <mach/message.h>
-#include <mach/mig_errors.h>
-#include <mach/mig_support.h>
-
-#ifndef mig_internal
-#define mig_internal static
-#endif
-
-#ifndef mig_external
-#define mig_external
-#endif
-
-#ifndef TypeCheck
-#define TypeCheck 1
-#endif
-
-#ifndef UseExternRCSId
-#define UseExternRCSId 1
-#endif
-
-#define BAD_TYPECHECK(type, check) ({\
- union { mach_msg_type_t t; unsigned32_t w; } _t, _c;\
- _t.t = *(type); _c.t = *(check); _t.w != _c.w; })
-#define msgh_request_port msgh_local_port
-#define MACH_MSGH_BITS_REQUEST(bits) MACH_MSGH_BITS_LOCAL(bits)
-#define msgh_reply_port msgh_remote_port
-#define MACH_MSGH_BITS_REPLY(bits) MACH_MSGH_BITS_REMOTE(bits)
-
-#include <mach/std_types.h>
-#include <mach/mach_types.h>
-#include <device/device_types.h>
-#include <device/net_status.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/statfs.h>
-#include <sys/resource.h>
-#include <sys/utsname.h>
-#include <hurd/hurd_types.h>
-
-/* Routine io_write */
-mig_internal void _Xio_write
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_long_t dataType;
- char data[2048];
- mach_msg_type_t offsetType;
- loff_t offset;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t amountType;
- vm_size_t amount;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Request *In1P;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_write
- (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, data_t data, mach_msg_type_number_t dataCnt, loff_t offset, vm_size_t *amount);
-
-#if TypeCheck
- boolean_t msgh_simple;
-#endif /* TypeCheck */
-
- unsigned int msgh_size;
- unsigned int msgh_size_delta;
-
- auto const mach_msg_type_t offsetCheck = {
- /* msgt_name = */ 11,
- /* msgt_size = */ 64,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t amountType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- msgh_size = In0P->Head.msgh_size;
- msgh_simple = !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX);
- if ((msgh_size < 48))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->dataType.msgtl_header.msgt_longform != TRUE) ||
- (In0P->dataType.msgtl_name != 8) ||
- (In0P->dataType.msgtl_size != 8))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- msgh_size_delta = (In0P->dataType.msgtl_header.msgt_inline) ? (In0P->dataType.msgtl_number + 3) & ~3 : sizeof(char *);
-#if TypeCheck
- if (msgh_size != 48 + msgh_size_delta)
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- In1P = (Request *) ((char *) In0P + msgh_size_delta - 2048);
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In1P->offsetType, &offsetCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_write(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), (In0P->dataType.msgtl_header.msgt_inline) ? In0P->data : *((char **)In0P->data), In0P->dataType.msgtl_number, In1P->offset, &OutP->amount);
- if (OutP->RetCode == KERN_SUCCESS)
- if (!In0P->dataType.msgtl_header.msgt_inline)
- __mig_deallocate(* (vm_offset_t *) In0P->data, In0P->dataType.msgtl_number);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 40;
-
- OutP->amountType = amountType;
-}
-
-/* Routine io_read */
-mig_internal void _Xio_read
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t offsetType;
- loff_t offset;
- mach_msg_type_t amountType;
- vm_size_t amount;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_long_t dataType;
- char data[2048];
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_read
- (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, data_t *data, mach_msg_type_number_t *dataCnt, loff_t offset, vm_size_t amount);
-
- boolean_t msgh_simple;
- auto const mach_msg_type_t offsetCheck = {
- /* msgt_name = */ 11,
- /* msgt_size = */ 64,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t amountCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_long_t dataType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 8,
- /* msgtl_size = */ 8,
- /* msgtl_number = */ 2048,
- };
-
- mach_msg_type_number_t dataCnt;
-
- char *dataP;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 44) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->offsetType, &offsetCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->amountType, &amountCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- dataP = OutP->data;
- dataCnt = 2048;
-
- OutP->RetCode = S_io_read(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), &dataP, &dataCnt, In0P->offset, In0P->amount);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- msgh_simple = TRUE;
-
- OutP->dataType = dataType;
- if (dataP != OutP->data) {
- OutP->dataType.msgtl_header.msgt_inline = FALSE;
- OutP->dataType.msgtl_header.msgt_deallocate = TRUE;
- *((char **)OutP->data) = dataP;
- msgh_simple = FALSE;
- }
-
- OutP->dataType.msgtl_number = dataCnt;
- OutP->Head.msgh_size = 44 + ((OutP->dataType.msgtl_header.msgt_inline) ? (dataCnt + 3) & ~3 : sizeof(char *));
-
- if (!msgh_simple)
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-}
-
-/* Routine io_seek */
-mig_internal void _Xio_seek
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t offsetType;
- loff_t offset;
- mach_msg_type_t whenceType;
- int whence;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t newpType;
- loff_t newp;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_seek
- (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, loff_t offset, int whence, loff_t *newp);
-
- auto const mach_msg_type_t offsetCheck = {
- /* msgt_name = */ 11,
- /* msgt_size = */ 64,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t whenceCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t newpType = {
- /* msgt_name = */ 11,
- /* msgt_size = */ 64,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 44) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->offsetType, &offsetCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->whenceType, &whenceCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_seek(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->offset, In0P->whence, &OutP->newp);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 44;
-
- OutP->newpType = newpType;
-}
-
-/* Routine io_readable */
-mig_internal void _Xio_readable
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t amountType;
- vm_size_t amount;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_readable
- (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, vm_size_t *amount);
-
- auto const mach_msg_type_t amountType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_readable(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), &OutP->amount);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 40;
-
- OutP->amountType = amountType;
-}
-
-/* Routine io_set_all_openmodes */
-mig_internal void _Xio_set_all_openmodes
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t newbitsType;
- int newbits;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_set_all_openmodes
- (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, int newbits);
-
- auto const mach_msg_type_t newbitsCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->newbitsType, &newbitsCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_set_all_openmodes(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->newbits);
-}
-
-/* Routine io_get_openmodes */
-mig_internal void _Xio_get_openmodes
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t bitsType;
- int bits;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_get_openmodes
- (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, int *bits);
-
- auto const mach_msg_type_t bitsType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_get_openmodes(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), &OutP->bits);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 40;
-
- OutP->bitsType = bitsType;
-}
-
-/* Routine io_set_some_openmodes */
-mig_internal void _Xio_set_some_openmodes
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t bits_to_setType;
- int bits_to_set;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_set_some_openmodes
- (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, int bits_to_set);
-
- auto const mach_msg_type_t bits_to_setCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->bits_to_setType, &bits_to_setCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_set_some_openmodes(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->bits_to_set);
-}
-
-/* Routine io_clear_some_openmodes */
-mig_internal void _Xio_clear_some_openmodes
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t bits_to_clearType;
- int bits_to_clear;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_clear_some_openmodes
- (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, int bits_to_clear);
-
- auto const mach_msg_type_t bits_to_clearCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->bits_to_clearType, &bits_to_clearCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_clear_some_openmodes(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->bits_to_clear);
-}
-
-/* Routine io_async */
-mig_internal void _Xio_async
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t notify_portType;
- mach_port_t notify_port;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t async_id_portType;
- mach_port_t async_id_port;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_async
- (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, mach_port_t notify_port, mach_port_t *async_id_port, mach_msg_type_name_t *async_id_portPoly);
-
- boolean_t msgh_simple;
- auto const mach_msg_type_t notify_portCheck = {
- /* msgt_name = */ 17,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t async_id_portType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- mach_msg_type_name_t async_id_portPoly;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->notify_portType, &notify_portCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_async(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->notify_port, &OutP->async_id_port, &async_id_portPoly);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- msgh_simple = TRUE;
- OutP->Head.msgh_size = 40;
-
- OutP->async_id_portType = async_id_portType;
-
- if (MACH_MSG_TYPE_PORT_ANY(async_id_portPoly))
- msgh_simple = FALSE;
-
- OutP->async_id_portType.msgt_name = async_id_portPoly;
-
- if (!msgh_simple)
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-}
-
-/* Routine io_mod_owner */
-mig_internal void _Xio_mod_owner
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t ownerType;
- pid_t owner;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_mod_owner
- (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, pid_t owner);
-
- auto const mach_msg_type_t ownerCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->ownerType, &ownerCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_mod_owner(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->owner);
-}
-
-/* Routine io_get_owner */
-mig_internal void _Xio_get_owner
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t ownerType;
- pid_t owner;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_get_owner
- (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, pid_t *owner);
-
- auto const mach_msg_type_t ownerType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_get_owner(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), &OutP->owner);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 40;
-
- OutP->ownerType = ownerType;
-}
-
-/* Routine io_get_icky_async_id */
-mig_internal void _Xio_get_icky_async_id
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t icky_async_id_portType;
- mach_port_t icky_async_id_port;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_get_icky_async_id
- (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, mach_port_t *icky_async_id_port, mach_msg_type_name_t *icky_async_id_portPoly);
-
- boolean_t msgh_simple;
- auto const mach_msg_type_t icky_async_id_portType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- mach_msg_type_name_t icky_async_id_portPoly;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_get_icky_async_id(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), &OutP->icky_async_id_port, &icky_async_id_portPoly);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- msgh_simple = TRUE;
- OutP->Head.msgh_size = 40;
-
- OutP->icky_async_id_portType = icky_async_id_portType;
-
- if (MACH_MSG_TYPE_PORT_ANY(icky_async_id_portPoly))
- msgh_simple = FALSE;
-
- OutP->icky_async_id_portType.msgt_name = icky_async_id_portPoly;
-
- if (!msgh_simple)
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-}
-
-/* Routine io_select */
-mig_internal void _Xio_select
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t select_typeType;
- int select_type;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t select_typeType;
- int select_type;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_select
- (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, int *select_type);
-
- auto const mach_msg_type_t select_typeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t select_typeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->select_typeType, &select_typeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_select(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), &In0P->select_type);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 40;
-
- OutP->select_typeType = select_typeType;
-
- OutP->select_type = In0P->select_type;
-}
-
-/* Routine io_stat */
-mig_internal void _Xio_stat
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t stat_infoType;
- io_statbuf_t stat_info;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_stat
- (io_t stat_object, mach_port_t reply, mach_msg_type_name_t replyPoly, io_statbuf_t *stat_info);
-
- auto const mach_msg_type_t stat_infoType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 32,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_stat(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), &OutP->stat_info);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 164;
-
- OutP->stat_infoType = stat_infoType;
-}
-
-/* SimpleRoutine io_reauthenticate */
-mig_internal void _Xio_reauthenticate
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t rendezvous2Type;
- mach_port_t rendezvous2;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_reauthenticate
- (io_t auth_object, mach_port_t reply, mach_msg_type_name_t replyPoly, mach_port_t rendezvous2);
-
- auto const mach_msg_type_t rendezvous2Check = {
- /* msgt_name = */ 17,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->rendezvous2Type, &rendezvous2Check))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_reauthenticate(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->rendezvous2);
-}
-
-/* Routine io_restrict_auth */
-mig_internal void _Xio_restrict_auth
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_long_t uidsType;
- uid_t uids[512];
- mach_msg_type_long_t gidsType;
- uid_t gids[512];
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t new_objectType;
- mach_port_t new_object;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Request *In1P;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_restrict_auth
- (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, mach_port_t *new_object, mach_msg_type_name_t *new_objectPoly, idarray_t uids, mach_msg_type_number_t uidsCnt, idarray_t gids, mach_msg_type_number_t gidsCnt);
-
- boolean_t msgh_simple;
- unsigned int msgh_size;
- unsigned int msgh_size_delta;
-
- auto const mach_msg_type_t new_objectType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- mach_msg_type_name_t new_objectPoly;
-
-#if TypeCheck
- msgh_size = In0P->Head.msgh_size;
- msgh_simple = !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX);
- if ((msgh_size < 48))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->uidsType.msgtl_header.msgt_longform != TRUE) ||
- (In0P->uidsType.msgtl_name != 2) ||
- (In0P->uidsType.msgtl_size != 32))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- msgh_size_delta = (In0P->uidsType.msgtl_header.msgt_inline) ? 4 * In0P->uidsType.msgtl_number : sizeof(uid_t *);
-#if TypeCheck
- if (msgh_size < 48 + msgh_size_delta)
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
- msgh_size -= msgh_size_delta;
-#endif /* TypeCheck */
-
- In1P = (Request *) ((char *) In0P + msgh_size_delta - 2048);
-
-#if TypeCheck
- if ((In1P->gidsType.msgtl_header.msgt_longform != TRUE) ||
- (In1P->gidsType.msgtl_name != 2) ||
- (In1P->gidsType.msgtl_size != 32))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (msgh_size != 48 + ((In1P->gidsType.msgtl_header.msgt_inline) ? 4 * In1P->gidsType.msgtl_number : sizeof(uid_t *)))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_restrict_auth(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), &OutP->new_object, &new_objectPoly, (In0P->uidsType.msgtl_header.msgt_inline) ? In0P->uids : *((uid_t **)In0P->uids), In0P->uidsType.msgtl_number, (In1P->gidsType.msgtl_header.msgt_inline) ? In1P->gids : *((uid_t **)In1P->gids), In1P->gidsType.msgtl_number);
- if (OutP->RetCode == KERN_SUCCESS)
- if (!In1P->gidsType.msgtl_header.msgt_inline)
- __mig_deallocate(* (vm_offset_t *) In1P->gids, 4 * In1P->gidsType.msgtl_number);
- if (OutP->RetCode == KERN_SUCCESS)
- if (!In0P->uidsType.msgtl_header.msgt_inline)
- __mig_deallocate(* (vm_offset_t *) In0P->uids, 4 * In0P->uidsType.msgtl_number);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- msgh_simple = TRUE;
- OutP->Head.msgh_size = 40;
-
- OutP->new_objectType = new_objectType;
-
- if (MACH_MSG_TYPE_PORT_ANY(new_objectPoly))
- msgh_simple = FALSE;
-
- OutP->new_objectType.msgt_name = new_objectPoly;
-
- if (!msgh_simple)
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-}
-
-/* Routine io_duplicate */
-mig_internal void _Xio_duplicate
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t newportType;
- mach_port_t newport;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_duplicate
- (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, mach_port_t *newport, mach_msg_type_name_t *newportPoly);
-
- boolean_t msgh_simple;
- auto const mach_msg_type_t newportType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- mach_msg_type_name_t newportPoly;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_duplicate(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), &OutP->newport, &newportPoly);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- msgh_simple = TRUE;
- OutP->Head.msgh_size = 40;
-
- OutP->newportType = newportType;
-
- if (MACH_MSG_TYPE_PORT_ANY(newportPoly))
- msgh_simple = FALSE;
-
- OutP->newportType.msgt_name = newportPoly;
-
- if (!msgh_simple)
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-}
-
-/* Routine io_server_version */
-mig_internal void _Xio_server_version
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t server_nameType;
- string_t server_name;
- mach_msg_type_t server_major_versionType;
- int server_major_version;
- mach_msg_type_t server_minor_versionType;
- int server_minor_version;
- mach_msg_type_t server_edit_levelType;
- int server_edit_level;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_server_version
- (io_t vers_object, mach_port_t reply, mach_msg_type_name_t replyPoly, string_t server_name, int *server_major_version, int *server_minor_version, int *server_edit_level);
-
- auto const mach_msg_type_t server_nameType = {
- /* msgt_name = */ MACH_MSG_TYPE_STRING_C,
- /* msgt_size = */ 8,
- /* msgt_number = */ 1024,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t server_major_versionType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t server_minor_versionType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t server_edit_levelType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_server_version(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), OutP->server_name, &OutP->server_major_version, &OutP->server_minor_version, &OutP->server_edit_level);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 1084;
-
- OutP->server_nameType = server_nameType;
-
- OutP->server_major_versionType = server_major_versionType;
-
- OutP->server_minor_versionType = server_minor_versionType;
-
- OutP->server_edit_levelType = server_edit_levelType;
-}
-
-/* Routine io_map */
-mig_internal void _Xio_map
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t memobjrdType;
- mach_port_t memobjrd;
- mach_msg_type_t memobjwtType;
- mach_port_t memobjwt;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_map
- (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, mach_port_t *memobjrd, mach_msg_type_name_t *memobjrdPoly, mach_port_t *memobjwt, mach_msg_type_name_t *memobjwtPoly);
-
- boolean_t msgh_simple;
- auto const mach_msg_type_t memobjrdType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t memobjwtType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- mach_msg_type_name_t memobjrdPoly;
- mach_msg_type_name_t memobjwtPoly;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_map(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), &OutP->memobjrd, &memobjrdPoly, &OutP->memobjwt, &memobjwtPoly);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- msgh_simple = TRUE;
- OutP->Head.msgh_size = 48;
-
- OutP->memobjrdType = memobjrdType;
-
- if (MACH_MSG_TYPE_PORT_ANY(memobjrdPoly))
- msgh_simple = FALSE;
-
- OutP->memobjrdType.msgt_name = memobjrdPoly;
-
- OutP->memobjwtType = memobjwtType;
-
- if (MACH_MSG_TYPE_PORT_ANY(memobjwtPoly))
- msgh_simple = FALSE;
-
- OutP->memobjwtType.msgt_name = memobjwtPoly;
-
- if (!msgh_simple)
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-}
-
-/* Routine io_map_cntl */
-mig_internal void _Xio_map_cntl
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t memobjType;
- mach_port_t memobj;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_map_cntl
- (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, mach_port_t *memobj, mach_msg_type_name_t *memobjPoly);
-
- boolean_t msgh_simple;
- auto const mach_msg_type_t memobjType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- mach_msg_type_name_t memobjPoly;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_map_cntl(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), &OutP->memobj, &memobjPoly);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- msgh_simple = TRUE;
- OutP->Head.msgh_size = 40;
-
- OutP->memobjType = memobjType;
-
- if (MACH_MSG_TYPE_PORT_ANY(memobjPoly))
- msgh_simple = FALSE;
-
- OutP->memobjType.msgt_name = memobjPoly;
-
- if (!msgh_simple)
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-}
-
-/* Routine io_get_conch */
-mig_internal void _Xio_get_conch
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_get_conch
- (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly);
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_get_conch(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits));
-}
-
-/* Routine io_release_conch */
-mig_internal void _Xio_release_conch
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_release_conch
- (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly);
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_release_conch(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits));
-}
-
-/* Routine io_eofnotify */
-mig_internal void _Xio_eofnotify
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_eofnotify
- (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly);
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_eofnotify(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits));
-}
-
-/* Routine io_prenotify */
-mig_internal void _Xio_prenotify
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t write_startType;
- vm_offset_t write_start;
- mach_msg_type_t write_endType;
- vm_offset_t write_end;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_prenotify
- (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, vm_offset_t write_start, vm_offset_t write_end);
-
- auto const mach_msg_type_t write_startCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t write_endCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->write_startType, &write_startCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->write_endType, &write_endCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_prenotify(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->write_start, In0P->write_end);
-}
-
-/* Routine io_postnotify */
-mig_internal void _Xio_postnotify
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t write_startType;
- vm_offset_t write_start;
- mach_msg_type_t write_endType;
- vm_offset_t write_end;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_postnotify
- (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, vm_offset_t write_start, vm_offset_t write_end);
-
- auto const mach_msg_type_t write_startCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t write_endCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->write_startType, &write_startCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->write_endType, &write_endCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_postnotify(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->write_start, In0P->write_end);
-}
-
-/* Routine io_readnotify */
-mig_internal void _Xio_readnotify
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_readnotify
- (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly);
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_readnotify(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits));
-}
-
-/* Routine io_readsleep */
-mig_internal void _Xio_readsleep
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_readsleep
- (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly);
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_readsleep(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits));
-}
-
-/* Routine io_sigio */
-mig_internal void _Xio_sigio
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_sigio
- (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly);
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_sigio(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits));
-}
-
-/* Routine io_pathconf */
-mig_internal void _Xio_pathconf
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t nameType;
- int name;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t valueType;
- int value;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_pathconf
- (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, int name, int *value);
-
- auto const mach_msg_type_t nameCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t valueType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->nameType, &nameCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_pathconf(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->name, &OutP->value);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 40;
-
- OutP->valueType = valueType;
-}
-
-/* Routine io_identity */
-mig_internal void _Xio_identity
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t idportType;
- mach_port_t idport;
- mach_msg_type_t fsidportType;
- mach_port_t fsidport;
- mach_msg_type_t filenoType;
- ino64_t fileno;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_identity
- (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, mach_port_t *idport, mach_msg_type_name_t *idportPoly, mach_port_t *fsidport, mach_msg_type_name_t *fsidportPoly, ino64_t *fileno);
-
- boolean_t msgh_simple;
- auto const mach_msg_type_t idportType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t fsidportType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t filenoType = {
- /* msgt_name = */ 11,
- /* msgt_size = */ 64,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- mach_msg_type_name_t idportPoly;
- mach_msg_type_name_t fsidportPoly;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_identity(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), &OutP->idport, &idportPoly, &OutP->fsidport, &fsidportPoly, &OutP->fileno);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- msgh_simple = TRUE;
- OutP->Head.msgh_size = 60;
-
- OutP->idportType = idportType;
-
- if (MACH_MSG_TYPE_PORT_ANY(idportPoly))
- msgh_simple = FALSE;
-
- OutP->idportType.msgt_name = idportPoly;
-
- OutP->fsidportType = fsidportType;
-
- if (MACH_MSG_TYPE_PORT_ANY(fsidportPoly))
- msgh_simple = FALSE;
-
- OutP->fsidportType.msgt_name = fsidportPoly;
-
- OutP->filenoType = filenoType;
-
- if (!msgh_simple)
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-}
-
-/* Routine io_revoke */
-mig_internal void _Xio_revoke
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_revoke
- (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly);
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_io_revoke(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits));
-}
-
-static mig_routine_t io_server_routines[] = {
- _Xio_write,
- _Xio_read,
- _Xio_seek,
- _Xio_readable,
- _Xio_set_all_openmodes,
- _Xio_get_openmodes,
- _Xio_set_some_openmodes,
- _Xio_clear_some_openmodes,
- _Xio_async,
- _Xio_mod_owner,
- _Xio_get_owner,
- _Xio_get_icky_async_id,
- _Xio_select,
- _Xio_stat,
- _Xio_reauthenticate,
- _Xio_restrict_auth,
- _Xio_duplicate,
- _Xio_server_version,
- _Xio_map,
- _Xio_map_cntl,
- _Xio_get_conch,
- _Xio_release_conch,
- _Xio_eofnotify,
- _Xio_prenotify,
- _Xio_postnotify,
- _Xio_readnotify,
- _Xio_readsleep,
- _Xio_sigio,
- _Xio_pathconf,
- _Xio_identity,
- _Xio_revoke,
-};
-
-mig_external boolean_t io_server
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- register mach_msg_header_t *InP = InHeadP;
- register mig_reply_header_t *OutP = (mig_reply_header_t *) OutHeadP;
-
- auto const mach_msg_type_t RetCodeType = {
- /* msgt_name = */ MACH_MSG_TYPE_INTEGER_32,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- register mig_routine_t routine;
-
- OutP->Head.msgh_bits = MACH_MSGH_BITS(MACH_MSGH_BITS_REPLY(InP->msgh_bits), 0);
- OutP->Head.msgh_size = sizeof *OutP;
- OutP->Head.msgh_remote_port = InP->msgh_reply_port;
- OutP->Head.msgh_local_port = MACH_PORT_NULL;
- OutP->Head.msgh_seqno = 0;
- OutP->Head.msgh_id = InP->msgh_id + 100;
-
- OutP->RetCodeType = RetCodeType;
-
- if ((InP->msgh_id > 21030) || (InP->msgh_id < 21000) ||
- ((routine = io_server_routines[InP->msgh_id - 21000]) == 0)) {
- OutP->RetCode = MIG_BAD_ID;
- return FALSE;
- }
- (*routine) (InP, &OutP->Head);
- return TRUE;
-}
-
-mig_external mig_routine_t io_server_routine
- (const mach_msg_header_t *InHeadP)
-{
- register int msgh_id;
-
- msgh_id = InHeadP->msgh_id - 21000;
-
- if ((msgh_id > 30) || (msgh_id < 0))
- return 0;
-
- return io_server_routines[msgh_id];
-}
-
diff --git a/boot.backup1/io_replyUser.c b/boot.backup1/io_replyUser.c
deleted file mode 100644
index 046033fa..00000000
--- a/boot.backup1/io_replyUser.c
+++ /dev/null
@@ -1,1600 +0,0 @@
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE 1
-#endif
-
-#include "io_reply_U.h"
-#define EXPORT_BOOLEAN
-#include <mach/boolean.h>
-#include <mach/kern_return.h>
-#include <mach/message.h>
-#include <mach/notify.h>
-#include <mach/mach_types.h>
-#include <mach/mig_errors.h>
-#include <mach/mig_support.h>
-#include <mach/msg_type.h>
-/* LINTLIBRARY */
-
-#ifndef mig_internal
-#define mig_internal static
-#endif
-
-#ifndef mig_external
-#define mig_external
-#endif
-
-#ifndef TypeCheck
-#define TypeCheck 1
-#endif
-
-#ifndef UseExternRCSId
-#define UseExternRCSId 1
-#endif
-
-#define BAD_TYPECHECK(type, check) ({\
- union { mach_msg_type_t t; unsigned32_t w; } _t, _c;\
- _t.t = *(type); _c.t = *(check); _t.w != _c.w; })
-#define msgh_request_port msgh_remote_port
-#define msgh_reply_port msgh_local_port
-
-#include <mach/std_types.h>
-#include <mach/mach_types.h>
-#include <device/device_types.h>
-#include <device/net_status.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/statfs.h>
-#include <sys/resource.h>
-#include <sys/utsname.h>
-#include <hurd/hurd_types.h>
-
-/* SimpleRoutine io_write_reply */
-mig_external kern_return_t io_write_reply
-(
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- kern_return_t return_code,
- vm_size_t amount
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- mach_msg_type_t amountType;
- vm_size_t amount;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t amountType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->amountType = amountType;
-
- InP->amount = amount;
-
- InP->Head.msgh_bits =
- MACH_MSGH_BITS(replyPoly, 0);
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 21100;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 40, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine io_read_reply */
-mig_external kern_return_t io_read_reply
-(
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- kern_return_t return_code,
- data_t data,
- mach_msg_type_number_t dataCnt
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- mach_msg_type_long_t dataType;
- char data[2048];
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
- boolean_t msgh_simple = TRUE;
- unsigned int msgh_size;
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_long_t dataType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 8,
- /* msgtl_size = */ 8,
- /* msgtl_number = */ 2048,
- };
-
- if (MACH_MSG_TYPE_PORT_ANY(replyPoly))
- msgh_simple = FALSE;
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->dataType = dataType;
-
- if (dataCnt > 2048) {
- InP->dataType.msgtl_header.msgt_inline = FALSE;
- *((char **)InP->data) = data;
- msgh_simple = FALSE;
- }
- else {
- memcpy(InP->data, data, dataCnt);
- }
-
- InP->dataType.msgtl_number = dataCnt;
-
- msgh_size = 44 + ((InP->dataType.msgtl_header.msgt_inline) ? (dataCnt + 3) & ~3 : sizeof(char *));
- InP->Head.msgh_bits = msgh_simple ?
- MACH_MSGH_BITS(replyPoly, 0) :
- (MACH_MSGH_BITS_COMPLEX|
- MACH_MSGH_BITS(replyPoly, 0));
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 21101;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, msgh_size, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine io_seek_reply */
-mig_external kern_return_t io_seek_reply
-(
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- kern_return_t return_code,
- loff_t newp
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- mach_msg_type_t newpType;
- loff_t newp;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t newpType = {
- /* msgt_name = */ 11,
- /* msgt_size = */ 64,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->newpType = newpType;
-
- InP->newp = newp;
-
- InP->Head.msgh_bits =
- MACH_MSGH_BITS(replyPoly, 0);
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 21102;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 44, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine io_readable_reply */
-mig_external kern_return_t io_readable_reply
-(
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- kern_return_t return_code,
- vm_size_t amount
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- mach_msg_type_t amountType;
- vm_size_t amount;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t amountType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->amountType = amountType;
-
- InP->amount = amount;
-
- InP->Head.msgh_bits =
- MACH_MSGH_BITS(replyPoly, 0);
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 21103;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 40, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine io_set_all_openmodes_reply */
-mig_external kern_return_t io_set_all_openmodes_reply
-(
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- kern_return_t return_code
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->Head.msgh_bits =
- MACH_MSGH_BITS(replyPoly, 0);
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 21104;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 32, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine io_get_openmodes_reply */
-mig_external kern_return_t io_get_openmodes_reply
-(
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- kern_return_t return_code,
- int bits
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- mach_msg_type_t bitsType;
- int bits;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t bitsType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->bitsType = bitsType;
-
- InP->bits = bits;
-
- InP->Head.msgh_bits =
- MACH_MSGH_BITS(replyPoly, 0);
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 21105;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 40, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine io_set_some_openmodes_reply */
-mig_external kern_return_t io_set_some_openmodes_reply
-(
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- kern_return_t return_code
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->Head.msgh_bits =
- MACH_MSGH_BITS(replyPoly, 0);
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 21106;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 32, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine io_clear_some_openmodes_reply */
-mig_external kern_return_t io_clear_some_openmodes_reply
-(
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- kern_return_t return_code
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->Head.msgh_bits =
- MACH_MSGH_BITS(replyPoly, 0);
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 21107;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 32, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine io_async_reply */
-mig_external kern_return_t io_async_reply
-(
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- kern_return_t return_code,
- mach_port_t async_id_port,
- mach_msg_type_name_t async_id_portPoly
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- mach_msg_type_t async_id_portType;
- mach_port_t async_id_port;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
- boolean_t msgh_simple = TRUE;
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t async_id_portType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- if (MACH_MSG_TYPE_PORT_ANY(replyPoly))
- msgh_simple = FALSE;
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->async_id_portType = async_id_portType;
-
- InP->async_id_port = async_id_port;
-
- if (MACH_MSG_TYPE_PORT_ANY(async_id_portPoly))
- msgh_simple = FALSE;
-
- InP->async_id_portType.msgt_name = async_id_portPoly;
-
- InP->Head.msgh_bits = msgh_simple ?
- MACH_MSGH_BITS(replyPoly, 0) :
- (MACH_MSGH_BITS_COMPLEX|
- MACH_MSGH_BITS(replyPoly, 0));
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 21108;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 40, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine io_mod_owner_reply */
-mig_external kern_return_t io_mod_owner_reply
-(
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- kern_return_t return_code
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->Head.msgh_bits =
- MACH_MSGH_BITS(replyPoly, 0);
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 21109;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 32, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine io_get_owner_reply */
-mig_external kern_return_t io_get_owner_reply
-(
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- kern_return_t return_code,
- pid_t owner
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- mach_msg_type_t ownerType;
- pid_t owner;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t ownerType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->ownerType = ownerType;
-
- InP->owner = owner;
-
- InP->Head.msgh_bits =
- MACH_MSGH_BITS(replyPoly, 0);
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 21110;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 40, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine io_get_icky_async_id_reply */
-mig_external kern_return_t io_get_icky_async_id_reply
-(
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- kern_return_t return_code,
- mach_port_t id_port,
- mach_msg_type_name_t id_portPoly
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- mach_msg_type_t id_portType;
- mach_port_t id_port;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
- boolean_t msgh_simple = TRUE;
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t id_portType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- if (MACH_MSG_TYPE_PORT_ANY(replyPoly))
- msgh_simple = FALSE;
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->id_portType = id_portType;
-
- InP->id_port = id_port;
-
- if (MACH_MSG_TYPE_PORT_ANY(id_portPoly))
- msgh_simple = FALSE;
-
- InP->id_portType.msgt_name = id_portPoly;
-
- InP->Head.msgh_bits = msgh_simple ?
- MACH_MSGH_BITS(replyPoly, 0) :
- (MACH_MSGH_BITS_COMPLEX|
- MACH_MSGH_BITS(replyPoly, 0));
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 21111;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 40, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine io_select_reply */
-mig_external kern_return_t io_select_reply
-(
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- kern_return_t return_code,
- int select_result
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- mach_msg_type_t select_resultType;
- int select_result;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t select_resultType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->select_resultType = select_resultType;
-
- InP->select_result = select_result;
-
- InP->Head.msgh_bits =
- MACH_MSGH_BITS(replyPoly, 0);
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 21112;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 40, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine io_stat_reply */
-mig_external kern_return_t io_stat_reply
-(
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- kern_return_t return_code,
- io_statbuf_t stat_info
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- mach_msg_type_t stat_infoType;
- io_statbuf_t stat_info;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t stat_infoType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 32,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->stat_infoType = stat_infoType;
-
- InP->stat_info = stat_info;
-
- InP->Head.msgh_bits =
- MACH_MSGH_BITS(replyPoly, 0);
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 21113;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 164, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine io_restrict_auth_reply */
-mig_external kern_return_t io_restrict_auth_reply
-(
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- kern_return_t return_code,
- mach_port_t new_object,
- mach_msg_type_name_t new_objectPoly
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- mach_msg_type_t new_objectType;
- mach_port_t new_object;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
- boolean_t msgh_simple = TRUE;
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t new_objectType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- if (MACH_MSG_TYPE_PORT_ANY(replyPoly))
- msgh_simple = FALSE;
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->new_objectType = new_objectType;
-
- InP->new_object = new_object;
-
- if (MACH_MSG_TYPE_PORT_ANY(new_objectPoly))
- msgh_simple = FALSE;
-
- InP->new_objectType.msgt_name = new_objectPoly;
-
- InP->Head.msgh_bits = msgh_simple ?
- MACH_MSGH_BITS(replyPoly, 0) :
- (MACH_MSGH_BITS_COMPLEX|
- MACH_MSGH_BITS(replyPoly, 0));
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 21115;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 40, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine io_duplicate_reply */
-mig_external kern_return_t io_duplicate_reply
-(
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- kern_return_t return_code,
- mach_port_t newport,
- mach_msg_type_name_t newportPoly
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- mach_msg_type_t newportType;
- mach_port_t newport;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
- boolean_t msgh_simple = TRUE;
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t newportType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- if (MACH_MSG_TYPE_PORT_ANY(replyPoly))
- msgh_simple = FALSE;
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->newportType = newportType;
-
- InP->newport = newport;
-
- if (MACH_MSG_TYPE_PORT_ANY(newportPoly))
- msgh_simple = FALSE;
-
- InP->newportType.msgt_name = newportPoly;
-
- InP->Head.msgh_bits = msgh_simple ?
- MACH_MSGH_BITS(replyPoly, 0) :
- (MACH_MSGH_BITS_COMPLEX|
- MACH_MSGH_BITS(replyPoly, 0));
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 21116;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 40, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine io_map_reply */
-mig_external kern_return_t io_map_reply
-(
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- kern_return_t return_code,
- mach_port_t rdobject,
- mach_msg_type_name_t rdobjectPoly,
- mach_port_t wrobject,
- mach_msg_type_name_t wrobjectPoly
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- mach_msg_type_t rdobjectType;
- mach_port_t rdobject;
- mach_msg_type_t wrobjectType;
- mach_port_t wrobject;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
- boolean_t msgh_simple = TRUE;
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t rdobjectType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t wrobjectType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- if (MACH_MSG_TYPE_PORT_ANY(replyPoly))
- msgh_simple = FALSE;
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->rdobjectType = rdobjectType;
-
- InP->rdobject = rdobject;
-
- if (MACH_MSG_TYPE_PORT_ANY(rdobjectPoly))
- msgh_simple = FALSE;
-
- InP->rdobjectType.msgt_name = rdobjectPoly;
-
- InP->wrobjectType = wrobjectType;
-
- InP->wrobject = wrobject;
-
- if (MACH_MSG_TYPE_PORT_ANY(wrobjectPoly))
- msgh_simple = FALSE;
-
- InP->wrobjectType.msgt_name = wrobjectPoly;
-
- InP->Head.msgh_bits = msgh_simple ?
- MACH_MSGH_BITS(replyPoly, 0) :
- (MACH_MSGH_BITS_COMPLEX|
- MACH_MSGH_BITS(replyPoly, 0));
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 21117;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 48, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine io_map_cntl_reply */
-mig_external kern_return_t io_map_cntl_reply
-(
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- kern_return_t return_code,
- mach_port_t memobj,
- mach_msg_type_name_t memobjPoly
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- mach_msg_type_t memobjType;
- mach_port_t memobj;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
- boolean_t msgh_simple = TRUE;
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t memobjType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- if (MACH_MSG_TYPE_PORT_ANY(replyPoly))
- msgh_simple = FALSE;
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->memobjType = memobjType;
-
- InP->memobj = memobj;
-
- if (MACH_MSG_TYPE_PORT_ANY(memobjPoly))
- msgh_simple = FALSE;
-
- InP->memobjType.msgt_name = memobjPoly;
-
- InP->Head.msgh_bits = msgh_simple ?
- MACH_MSGH_BITS(replyPoly, 0) :
- (MACH_MSGH_BITS_COMPLEX|
- MACH_MSGH_BITS(replyPoly, 0));
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 21118;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 40, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine io_get_conch_reply */
-mig_external kern_return_t io_get_conch_reply
-(
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- kern_return_t return_code
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->Head.msgh_bits =
- MACH_MSGH_BITS(replyPoly, 0);
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 21119;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 32, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine io_release_conch_reply */
-mig_external kern_return_t io_release_conch_reply
-(
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- kern_return_t return_code
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->Head.msgh_bits =
- MACH_MSGH_BITS(replyPoly, 0);
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 21120;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 32, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine io_eofnotify_reply */
-mig_external kern_return_t io_eofnotify_reply
-(
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- kern_return_t return_code
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->Head.msgh_bits =
- MACH_MSGH_BITS(replyPoly, 0);
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 21121;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 32, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine io_prenotify_reply */
-mig_external kern_return_t io_prenotify_reply
-(
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- kern_return_t return_code
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->Head.msgh_bits =
- MACH_MSGH_BITS(replyPoly, 0);
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 21122;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 32, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine io_postnotify_reply */
-mig_external kern_return_t io_postnotify_reply
-(
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- kern_return_t return_code
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->Head.msgh_bits =
- MACH_MSGH_BITS(replyPoly, 0);
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 21123;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 32, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine io_readnotify_reply */
-mig_external kern_return_t io_readnotify_reply
-(
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- kern_return_t return_code
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->Head.msgh_bits =
- MACH_MSGH_BITS(replyPoly, 0);
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 21124;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 32, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine io_readsleep_reply */
-mig_external kern_return_t io_readsleep_reply
-(
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- kern_return_t return_code
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->Head.msgh_bits =
- MACH_MSGH_BITS(replyPoly, 0);
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 21125;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 32, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine io_sigio_reply */
-mig_external kern_return_t io_sigio_reply
-(
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- kern_return_t return_code
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->Head.msgh_bits =
- MACH_MSGH_BITS(replyPoly, 0);
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 21126;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 32, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
diff --git a/boot.backup1/notifyServer.c b/boot.backup1/notifyServer.c
deleted file mode 100644
index 7965461a..00000000
--- a/boot.backup1/notifyServer.c
+++ /dev/null
@@ -1,353 +0,0 @@
-/* Module notify */
-
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE 1
-#endif
-
-#define EXPORT_BOOLEAN
-#include <mach/boolean.h>
-#include <mach/kern_return.h>
-#include <mach/message.h>
-#include <mach/mig_errors.h>
-#include <mach/mig_support.h>
-
-#ifndef mig_internal
-#define mig_internal static
-#endif
-
-#ifndef mig_external
-#define mig_external
-#endif
-
-#ifndef TypeCheck
-#define TypeCheck 1
-#endif
-
-#ifndef UseExternRCSId
-#define UseExternRCSId 1
-#endif
-
-#define BAD_TYPECHECK(type, check) ({\
- union { mach_msg_type_t t; unsigned32_t w; } _t, _c;\
- _t.t = *(type); _c.t = *(check); _t.w != _c.w; })
-#define msgh_request_port msgh_local_port
-#define MACH_MSGH_BITS_REQUEST(bits) MACH_MSGH_BITS_LOCAL(bits)
-#define msgh_reply_port msgh_remote_port
-#define MACH_MSGH_BITS_REPLY(bits) MACH_MSGH_BITS_REMOTE(bits)
-
-#include <mach/std_types.h>
-
-/* SimpleRoutine mach_notify_port_deleted */
-mig_internal void _Xmach_notify_port_deleted
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t nameType;
- mach_port_t name;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t do_mach_notify_port_deleted
- (mach_port_t notify, mach_port_t name);
-
- auto const mach_msg_type_t nameCheck = {
- /* msgt_name = */ 15,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->nameType, &nameCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = do_mach_notify_port_deleted(In0P->Head.msgh_request_port, In0P->name);
-}
-
-/* SimpleRoutine mach_notify_msg_accepted */
-mig_internal void _Xmach_notify_msg_accepted
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t nameType;
- mach_port_t name;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t do_mach_notify_msg_accepted
- (mach_port_t notify, mach_port_t name);
-
- auto const mach_msg_type_t nameCheck = {
- /* msgt_name = */ 15,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->nameType, &nameCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = do_mach_notify_msg_accepted(In0P->Head.msgh_request_port, In0P->name);
-}
-
-/* SimpleRoutine mach_notify_port_destroyed */
-mig_internal void _Xmach_notify_port_destroyed
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t rightsType;
- mach_port_t rights;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t do_mach_notify_port_destroyed
- (mach_port_t notify, mach_port_t rights);
-
- auto const mach_msg_type_t rightsCheck = {
- /* msgt_name = */ 16,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->rightsType, &rightsCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = do_mach_notify_port_destroyed(In0P->Head.msgh_request_port, In0P->rights);
-}
-
-/* SimpleRoutine mach_notify_no_senders */
-mig_internal void _Xmach_notify_no_senders
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t mscountType;
- mach_port_mscount_t mscount;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t do_mach_notify_no_senders
- (mach_port_t notify, mach_port_mscount_t mscount);
-
- auto const mach_msg_type_t mscountCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->mscountType, &mscountCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = do_mach_notify_no_senders(In0P->Head.msgh_request_port, In0P->mscount);
-}
-
-/* SimpleRoutine mach_notify_send_once */
-mig_internal void _Xmach_notify_send_once
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t do_mach_notify_send_once
- (mach_port_t notify);
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = do_mach_notify_send_once(In0P->Head.msgh_request_port);
-}
-
-/* SimpleRoutine mach_notify_dead_name */
-mig_internal void _Xmach_notify_dead_name
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t nameType;
- mach_port_t name;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t do_mach_notify_dead_name
- (mach_port_t notify, mach_port_t name);
-
- auto const mach_msg_type_t nameCheck = {
- /* msgt_name = */ 15,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->nameType, &nameCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = do_mach_notify_dead_name(In0P->Head.msgh_request_port, In0P->name);
-}
-
-static mig_routine_t notify_server_routines[] = {
- 0,
- _Xmach_notify_port_deleted,
- _Xmach_notify_msg_accepted,
- 0,
- 0,
- _Xmach_notify_port_destroyed,
- _Xmach_notify_no_senders,
- _Xmach_notify_send_once,
- _Xmach_notify_dead_name,
-};
-
-mig_external boolean_t notify_server
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- register mach_msg_header_t *InP = InHeadP;
- register mig_reply_header_t *OutP = (mig_reply_header_t *) OutHeadP;
-
- auto const mach_msg_type_t RetCodeType = {
- /* msgt_name = */ MACH_MSG_TYPE_INTEGER_32,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- register mig_routine_t routine;
-
- OutP->Head.msgh_bits = MACH_MSGH_BITS(MACH_MSGH_BITS_REPLY(InP->msgh_bits), 0);
- OutP->Head.msgh_size = sizeof *OutP;
- OutP->Head.msgh_remote_port = InP->msgh_reply_port;
- OutP->Head.msgh_local_port = MACH_PORT_NULL;
- OutP->Head.msgh_seqno = 0;
- OutP->Head.msgh_id = InP->msgh_id + 100;
-
- OutP->RetCodeType = RetCodeType;
-
- if ((InP->msgh_id > 72) || (InP->msgh_id < 64) ||
- ((routine = notify_server_routines[InP->msgh_id - 64]) == 0)) {
- OutP->RetCode = MIG_BAD_ID;
- return FALSE;
- }
- (*routine) (InP, &OutP->Head);
- return TRUE;
-}
-
-mig_external mig_routine_t notify_server_routine
- (const mach_msg_header_t *InHeadP)
-{
- register int msgh_id;
-
- msgh_id = InHeadP->msgh_id - 64;
-
- if ((msgh_id > 8) || (msgh_id < 0))
- return 0;
-
- return notify_server_routines[msgh_id];
-}
-
diff --git a/boot.backup1/ourdeviceServer.c b/boot.backup1/ourdeviceServer.c
deleted file mode 100644
index 3db5fd8d..00000000
--- a/boot.backup1/ourdeviceServer.c
+++ /dev/null
@@ -1,1179 +0,0 @@
-/* Module device */
-
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE 1
-#endif
-
-#define EXPORT_BOOLEAN
-#include <mach/boolean.h>
-#include <mach/kern_return.h>
-#include <mach/message.h>
-#include <mach/mig_errors.h>
-#include <mach/mig_support.h>
-
-#ifndef mig_internal
-#define mig_internal static
-#endif
-
-#ifndef mig_external
-#define mig_external
-#endif
-
-#ifndef TypeCheck
-#define TypeCheck 1
-#endif
-
-#ifndef UseExternRCSId
-#define UseExternRCSId 1
-#endif
-
-#define BAD_TYPECHECK(type, check) ({\
- union { mach_msg_type_t t; unsigned32_t w; } _t, _c;\
- _t.t = *(type); _c.t = *(check); _t.w != _c.w; })
-#define msgh_request_port msgh_local_port
-#define MACH_MSGH_BITS_REQUEST(bits) MACH_MSGH_BITS_LOCAL(bits)
-#define msgh_reply_port msgh_remote_port
-#define MACH_MSGH_BITS_REPLY(bits) MACH_MSGH_BITS_REMOTE(bits)
-
-#include <mach/std_types.h>
-#include <mach/mach_types.h>
-#include <device/device_types.h>
-#include <device/net_status.h>
-
-/* Routine device_open */
-mig_internal void _Xdevice_open
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t modeType;
- dev_mode_t mode;
- mach_msg_type_long_t nameType;
- dev_name_t name;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t deviceType;
- mach_port_t device;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t ds_device_open
- (mach_port_t master_port, mach_port_t reply_port, mach_msg_type_name_t reply_portPoly, dev_mode_t mode, dev_name_t name, mach_port_t *device, mach_msg_type_name_t *devicePoly);
-
- boolean_t msgh_simple;
- auto const mach_msg_type_t modeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t deviceType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- mach_msg_type_name_t devicePoly;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 172) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->modeType, &modeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->nameType.msgtl_header.msgt_inline != TRUE) ||
- (In0P->nameType.msgtl_header.msgt_longform != TRUE) ||
- (In0P->nameType.msgtl_name != 12) ||
- (In0P->nameType.msgtl_number != 1) ||
- (In0P->nameType.msgtl_size != 1024))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = ds_device_open(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->mode, In0P->name, &OutP->device, &devicePoly);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- msgh_simple = TRUE;
- OutP->Head.msgh_size = 40;
-
- OutP->deviceType = deviceType;
-
- if (MACH_MSG_TYPE_PORT_ANY(devicePoly))
- msgh_simple = FALSE;
-
- OutP->deviceType.msgt_name = devicePoly;
-
- if (!msgh_simple)
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-}
-
-/* Routine device_close */
-mig_internal void _Xdevice_close
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t ds_device_close
- (mach_port_t device);
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = ds_device_close(In0P->Head.msgh_request_port);
-}
-
-/* Routine device_write */
-mig_internal void _Xdevice_write
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t modeType;
- dev_mode_t mode;
- mach_msg_type_t recnumType;
- recnum_t recnum;
- mach_msg_type_long_t dataType;
- io_buf_ptr_t data;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t bytes_writtenType;
- int bytes_written;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t ds_device_write
- (mach_port_t device, mach_port_t reply_port, mach_msg_type_name_t reply_portPoly, dev_mode_t mode, recnum_t recnum, io_buf_ptr_t data, mach_msg_type_number_t dataCnt, int *bytes_written);
-
- auto const mach_msg_type_t modeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t recnumCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t bytes_writtenType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 56) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->modeType, &modeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->recnumType, &recnumCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->dataType.msgtl_header.msgt_inline != FALSE) ||
- (In0P->dataType.msgtl_header.msgt_longform != TRUE) ||
- (In0P->dataType.msgtl_name != 9) ||
- (In0P->dataType.msgtl_size != 8))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = ds_device_write(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->mode, In0P->recnum, In0P->data, In0P->dataType.msgtl_number, &OutP->bytes_written);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 40;
-
- OutP->bytes_writtenType = bytes_writtenType;
-}
-
-/* Routine device_write_inband */
-mig_internal void _Xdevice_write_inband
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t modeType;
- dev_mode_t mode;
- mach_msg_type_t recnumType;
- recnum_t recnum;
- mach_msg_type_t dataType;
- char data[128];
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t bytes_writtenType;
- int bytes_written;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t ds_device_write_inband
- (mach_port_t device, mach_port_t reply_port, mach_msg_type_name_t reply_portPoly, dev_mode_t mode, recnum_t recnum, io_buf_ptr_inband_t data, mach_msg_type_number_t dataCnt, int *bytes_written);
-
- unsigned int msgh_size;
-
- auto const mach_msg_type_t modeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t recnumCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t bytes_writtenType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- msgh_size = In0P->Head.msgh_size;
- if ((msgh_size < 44) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->modeType, &modeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->recnumType, &recnumCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->dataType.msgt_inline != TRUE) ||
- (In0P->dataType.msgt_longform != FALSE) ||
- (In0P->dataType.msgt_name != 8) ||
- (In0P->dataType.msgt_size != 8))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (msgh_size != 44 + ((In0P->dataType.msgt_number + 3) & ~3))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = ds_device_write_inband(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->mode, In0P->recnum, In0P->data, In0P->dataType.msgt_number, &OutP->bytes_written);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 40;
-
- OutP->bytes_writtenType = bytes_writtenType;
-}
-
-/* Routine device_read */
-mig_internal void _Xdevice_read
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t modeType;
- dev_mode_t mode;
- mach_msg_type_t recnumType;
- recnum_t recnum;
- mach_msg_type_t bytes_wantedType;
- int bytes_wanted;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_long_t dataType;
- io_buf_ptr_t data;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t ds_device_read
- (mach_port_t device, mach_port_t reply_port, mach_msg_type_name_t reply_portPoly, dev_mode_t mode, recnum_t recnum, int bytes_wanted, io_buf_ptr_t *data, mach_msg_type_number_t *dataCnt);
-
- auto const mach_msg_type_t modeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t recnumCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t bytes_wantedCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_long_t dataType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ FALSE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 9,
- /* msgtl_size = */ 8,
- /* msgtl_number = */ 0,
- };
-
- mach_msg_type_number_t dataCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 48) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->modeType, &modeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->recnumType, &recnumCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->bytes_wantedType, &bytes_wantedCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = ds_device_read(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->mode, In0P->recnum, In0P->bytes_wanted, &OutP->data, &dataCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
- OutP->Head.msgh_size = 48;
-
- OutP->dataType = dataType;
-
- OutP->dataType.msgtl_number = dataCnt;
-}
-
-/* Routine device_read_inband */
-mig_internal void _Xdevice_read_inband
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t modeType;
- dev_mode_t mode;
- mach_msg_type_t recnumType;
- recnum_t recnum;
- mach_msg_type_t bytes_wantedType;
- int bytes_wanted;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t dataType;
- char data[128];
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t ds_device_read_inband
- (mach_port_t device, mach_port_t reply_port, mach_msg_type_name_t reply_portPoly, dev_mode_t mode, recnum_t recnum, int bytes_wanted, io_buf_ptr_inband_t data, mach_msg_type_number_t *dataCnt);
-
- auto const mach_msg_type_t modeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t recnumCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t bytes_wantedCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t dataType = {
- /* msgt_name = */ 8,
- /* msgt_size = */ 8,
- /* msgt_number = */ 128,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- mach_msg_type_number_t dataCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 48) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->modeType, &modeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->recnumType, &recnumCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->bytes_wantedType, &bytes_wantedCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- dataCnt = 128;
-
- OutP->RetCode = ds_device_read_inband(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->mode, In0P->recnum, In0P->bytes_wanted, OutP->data, &dataCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->dataType = dataType;
-
- OutP->dataType.msgt_number = dataCnt;
- OutP->Head.msgh_size = 36 + ((dataCnt + 3) & ~3);
-}
-
-/* Routine xxx_device_set_status */
-mig_internal void _Xxxx_device_set_status
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t flavorType;
- dev_flavor_t flavor;
- mach_msg_type_long_t statusType;
- int status[1024];
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t ds_xxx_device_set_status
- (mach_port_t device, dev_flavor_t flavor, dev_status_t status, mach_msg_type_number_t statusCnt);
-
- unsigned int msgh_size;
-
- auto const mach_msg_type_t flavorCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- msgh_size = In0P->Head.msgh_size;
- if ((msgh_size < 44) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->flavorType, &flavorCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->statusType.msgtl_header.msgt_inline != TRUE) ||
- (In0P->statusType.msgtl_header.msgt_longform != TRUE) ||
- (In0P->statusType.msgtl_name != 2) ||
- (In0P->statusType.msgtl_size != 32))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (msgh_size != 44 + (4 * In0P->statusType.msgtl_number))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = ds_xxx_device_set_status(In0P->Head.msgh_request_port, In0P->flavor, In0P->status, In0P->statusType.msgtl_number);
-}
-
-/* Routine xxx_device_get_status */
-mig_internal void _Xxxx_device_get_status
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t flavorType;
- dev_flavor_t flavor;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_long_t statusType;
- int status[1024];
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t ds_xxx_device_get_status
- (mach_port_t device, dev_flavor_t flavor, dev_status_t status, mach_msg_type_number_t *statusCnt);
-
- auto const mach_msg_type_t flavorCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_long_t statusType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 2,
- /* msgtl_size = */ 32,
- /* msgtl_number = */ 1024,
- };
-
- mach_msg_type_number_t statusCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->flavorType, &flavorCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- statusCnt = 1024;
-
- OutP->RetCode = ds_xxx_device_get_status(In0P->Head.msgh_request_port, In0P->flavor, OutP->status, &statusCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->statusType = statusType;
-
- OutP->statusType.msgtl_number = statusCnt;
- OutP->Head.msgh_size = 44 + (4 * statusCnt);
-}
-
-/* Routine xxx_device_set_filter */
-mig_internal void _Xxxx_device_set_filter
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t receive_portType;
- mach_port_t receive_port;
- mach_msg_type_t priorityType;
- int priority;
- mach_msg_type_long_t filterType;
- filter_t filter[128];
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t ds_xxx_device_set_filter
- (mach_port_t device, mach_port_t receive_port, int priority, filter_array_t filter, mach_msg_type_number_t filterCnt);
-
- unsigned int msgh_size;
-
- auto const mach_msg_type_t receive_portCheck = {
- /* msgt_name = */ 17,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t priorityCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- msgh_size = In0P->Head.msgh_size;
- if ((msgh_size < 52) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->receive_portType, &receive_portCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->priorityType, &priorityCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->filterType.msgtl_header.msgt_inline != TRUE) ||
- (In0P->filterType.msgtl_header.msgt_longform != TRUE) ||
- (In0P->filterType.msgtl_name != 1) ||
- (In0P->filterType.msgtl_size != 16))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (msgh_size != 52 + ((2 * In0P->filterType.msgtl_number + 3) & ~3))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = ds_xxx_device_set_filter(In0P->Head.msgh_request_port, In0P->receive_port, In0P->priority, In0P->filter, In0P->filterType.msgtl_number);
-}
-
-/* Routine device_map */
-mig_internal void _Xdevice_map
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t protType;
- vm_prot_t prot;
- mach_msg_type_t offsetType;
- vm_offset_t offset;
- mach_msg_type_t sizeType;
- vm_size_t size;
- mach_msg_type_t unmapType;
- int unmap;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t pagerType;
- mach_port_t pager;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t ds_device_map
- (mach_port_t device, vm_prot_t prot, vm_offset_t offset, vm_size_t size, mach_port_t *pager, int unmap);
-
- auto const mach_msg_type_t protCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t offsetCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t sizeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t unmapCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t pagerType = {
- /* msgt_name = */ 19,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 56) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->protType, &protCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->offsetType, &offsetCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->sizeType, &sizeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->unmapType, &unmapCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = ds_device_map(In0P->Head.msgh_request_port, In0P->prot, In0P->offset, In0P->size, &OutP->pager, In0P->unmap);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
- OutP->Head.msgh_size = 40;
-
- OutP->pagerType = pagerType;
-}
-
-/* Routine device_set_status */
-mig_internal void _Xdevice_set_status
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t flavorType;
- dev_flavor_t flavor;
- mach_msg_type_t statusType;
- int status[1024];
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t ds_device_set_status
- (mach_port_t device, dev_flavor_t flavor, dev_status_t status, mach_msg_type_number_t statusCnt);
-
- unsigned int msgh_size;
-
- auto const mach_msg_type_t flavorCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- msgh_size = In0P->Head.msgh_size;
- if ((msgh_size < 36) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->flavorType, &flavorCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->statusType.msgt_inline != TRUE) ||
- (In0P->statusType.msgt_longform != FALSE) ||
- (In0P->statusType.msgt_name != 2) ||
- (In0P->statusType.msgt_size != 32))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (msgh_size != 36 + (4 * In0P->statusType.msgt_number))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = ds_device_set_status(In0P->Head.msgh_request_port, In0P->flavor, In0P->status, In0P->statusType.msgt_number);
-}
-
-/* Routine device_get_status */
-mig_internal void _Xdevice_get_status
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t flavorType;
- dev_flavor_t flavor;
- mach_msg_type_t statusCntType;
- mach_msg_type_number_t statusCnt;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t statusType;
- int status[1024];
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t ds_device_get_status
- (mach_port_t device, dev_flavor_t flavor, dev_status_t status, mach_msg_type_number_t *statusCnt);
-
- auto const mach_msg_type_t flavorCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t statusCntCheck = {
- /* msgt_name = */ MACH_MSG_TYPE_INTEGER_32,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t statusType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1024,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- mach_msg_type_number_t statusCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->flavorType, &flavorCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->statusCntType, &statusCntCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- statusCnt = 1024;
- if (In0P->statusCnt < statusCnt)
- statusCnt = In0P->statusCnt;
-
- OutP->RetCode = ds_device_get_status(In0P->Head.msgh_request_port, In0P->flavor, OutP->status, &statusCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->statusType = statusType;
-
- OutP->statusType.msgt_number = statusCnt;
- OutP->Head.msgh_size = 36 + (4 * statusCnt);
-}
-
-/* Routine device_set_filter */
-mig_internal void _Xdevice_set_filter
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t receive_portType;
- mach_port_t receive_port;
- mach_msg_type_t priorityType;
- int priority;
- mach_msg_type_t filterType;
- filter_t filter[128];
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t ds_device_set_filter
- (mach_port_t device, mach_port_t receive_port, int priority, filter_array_t filter, mach_msg_type_number_t filterCnt);
-
- unsigned int msgh_size;
-
- auto const mach_msg_type_t receive_portCheck = {
- /* msgt_name = */ 17,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t priorityCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- msgh_size = In0P->Head.msgh_size;
- if ((msgh_size < 44) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->receive_portType, &receive_portCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->priorityType, &priorityCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->filterType.msgt_inline != TRUE) ||
- (In0P->filterType.msgt_longform != FALSE) ||
- (In0P->filterType.msgt_name != 1) ||
- (In0P->filterType.msgt_size != 16))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (msgh_size != 44 + ((2 * In0P->filterType.msgt_number + 3) & ~3))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = ds_device_set_filter(In0P->Head.msgh_request_port, In0P->receive_port, In0P->priority, In0P->filter, In0P->filterType.msgt_number);
-}
-
-static mig_routine_t device_server_routines[] = {
- _Xdevice_open,
- _Xdevice_close,
- _Xdevice_write,
- _Xdevice_write_inband,
- _Xdevice_read,
- _Xdevice_read_inband,
- _Xxxx_device_set_status,
- _Xxxx_device_get_status,
- _Xxxx_device_set_filter,
- _Xdevice_map,
- _Xdevice_set_status,
- _Xdevice_get_status,
- _Xdevice_set_filter,
-};
-
-mig_external boolean_t device_server
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- register mach_msg_header_t *InP = InHeadP;
- register mig_reply_header_t *OutP = (mig_reply_header_t *) OutHeadP;
-
- auto const mach_msg_type_t RetCodeType = {
- /* msgt_name = */ MACH_MSG_TYPE_INTEGER_32,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- register mig_routine_t routine;
-
- OutP->Head.msgh_bits = MACH_MSGH_BITS(MACH_MSGH_BITS_REPLY(InP->msgh_bits), 0);
- OutP->Head.msgh_size = sizeof *OutP;
- OutP->Head.msgh_remote_port = InP->msgh_reply_port;
- OutP->Head.msgh_local_port = MACH_PORT_NULL;
- OutP->Head.msgh_seqno = 0;
- OutP->Head.msgh_id = InP->msgh_id + 100;
-
- OutP->RetCodeType = RetCodeType;
-
- if ((InP->msgh_id > 2812) || (InP->msgh_id < 2800) ||
- ((routine = device_server_routines[InP->msgh_id - 2800]) == 0)) {
- OutP->RetCode = MIG_BAD_ID;
- return FALSE;
- }
- (*routine) (InP, &OutP->Head);
- return TRUE;
-}
-
-mig_external mig_routine_t device_server_routine
- (const mach_msg_header_t *InHeadP)
-{
- register int msgh_id;
-
- msgh_id = InHeadP->msgh_id - 2800;
-
- if ((msgh_id > 12) || (msgh_id < 0))
- return 0;
-
- return device_server_routines[msgh_id];
-}
-
diff --git a/boot.backup1/ourmachServer.c b/boot.backup1/ourmachServer.c
deleted file mode 100644
index 6212e18e..00000000
--- a/boot.backup1/ourmachServer.c
+++ /dev/null
@@ -1,4197 +0,0 @@
-/* Module mach */
-
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE 1
-#endif
-
-#define EXPORT_BOOLEAN
-#include <mach/boolean.h>
-#include <mach/kern_return.h>
-#include <mach/message.h>
-#include <mach/mig_errors.h>
-#include <mach/mig_support.h>
-
-#ifndef mig_internal
-#define mig_internal static
-#endif
-
-#ifndef mig_external
-#define mig_external
-#endif
-
-#ifndef TypeCheck
-#define TypeCheck 1
-#endif
-
-#ifndef UseExternRCSId
-#define UseExternRCSId 1
-#endif
-
-#define BAD_TYPECHECK(type, check) ({\
- union { mach_msg_type_t t; unsigned32_t w; } _t, _c;\
- _t.t = *(type); _c.t = *(check); _t.w != _c.w; })
-#define msgh_request_port msgh_local_port
-#define MACH_MSGH_BITS_REQUEST(bits) MACH_MSGH_BITS_LOCAL(bits)
-#define msgh_reply_port msgh_remote_port
-#define MACH_MSGH_BITS_REPLY(bits) MACH_MSGH_BITS_REMOTE(bits)
-
-#include <mach/std_types.h>
-#include <mach/mach_types.h>
-
-/* Routine task_create */
-mig_internal void _Xtask_create
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t inherit_memoryType;
- boolean_t inherit_memory;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t child_taskType;
- mach_port_t child_task;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_task_create
- (mach_port_t target_task, boolean_t inherit_memory, mach_port_t *child_task, mach_msg_type_name_t *child_taskPoly);
-
- boolean_t msgh_simple;
- auto const mach_msg_type_t inherit_memoryCheck = {
- /* msgt_name = */ 0,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t child_taskType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- mach_msg_type_name_t child_taskPoly;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->inherit_memoryType, &inherit_memoryCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_task_create(In0P->Head.msgh_request_port, In0P->inherit_memory, &OutP->child_task, &child_taskPoly);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- msgh_simple = TRUE;
- OutP->Head.msgh_size = 40;
-
- OutP->child_taskType = child_taskType;
-
- if (MACH_MSG_TYPE_PORT_ANY(child_taskPoly))
- msgh_simple = FALSE;
-
- OutP->child_taskType.msgt_name = child_taskPoly;
-
- if (!msgh_simple)
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-}
-
-/* Routine task_terminate */
-mig_internal void _Xtask_terminate
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_task_terminate
- (mach_port_t target_task);
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_task_terminate(In0P->Head.msgh_request_port);
-}
-
-/* Routine task_get_emulation_vector */
-mig_internal void _Xtask_get_emulation_vector
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t vector_startType;
- int vector_start;
- mach_msg_type_long_t emulation_vectorType;
- emulation_vector_t emulation_vector;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_task_get_emulation_vector
- (mach_port_t task, int *vector_start, emulation_vector_t *emulation_vector, mach_msg_type_number_t *emulation_vectorCnt);
-
- auto const mach_msg_type_t vector_startType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_long_t emulation_vectorType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ FALSE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 2,
- /* msgtl_size = */ 32,
- /* msgtl_number = */ 0,
- };
-
- mach_msg_type_number_t emulation_vectorCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_task_get_emulation_vector(In0P->Head.msgh_request_port, &OutP->vector_start, &OutP->emulation_vector, &emulation_vectorCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
- OutP->Head.msgh_size = 56;
-
- OutP->vector_startType = vector_startType;
-
- OutP->emulation_vectorType = emulation_vectorType;
-
- OutP->emulation_vectorType.msgtl_number = emulation_vectorCnt;
-}
-
-/* Routine task_set_emulation_vector */
-mig_internal void _Xtask_set_emulation_vector
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t vector_startType;
- int vector_start;
- mach_msg_type_long_t emulation_vectorType;
- emulation_vector_t emulation_vector;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_task_set_emulation_vector
- (mach_port_t task, int vector_start, emulation_vector_t emulation_vector, mach_msg_type_number_t emulation_vectorCnt);
-
- auto const mach_msg_type_t vector_startCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 48) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->vector_startType, &vector_startCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->emulation_vectorType.msgtl_header.msgt_inline != FALSE) ||
- (In0P->emulation_vectorType.msgtl_header.msgt_longform != TRUE) ||
- (In0P->emulation_vectorType.msgtl_name != 2) ||
- (In0P->emulation_vectorType.msgtl_size != 32))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_task_set_emulation_vector(In0P->Head.msgh_request_port, In0P->vector_start, In0P->emulation_vector, In0P->emulation_vectorType.msgtl_number);
-}
-
-/* Routine task_threads */
-mig_internal void _Xtask_threads
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_long_t thread_listType;
- thread_array_t thread_list;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_task_threads
- (mach_port_t target_task, thread_array_t *thread_list, mach_msg_type_number_t *thread_listCnt);
-
- auto const mach_msg_type_long_t thread_listType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ FALSE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 19,
- /* msgtl_size = */ 32,
- /* msgtl_number = */ 0,
- };
-
- mach_msg_type_number_t thread_listCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_task_threads(In0P->Head.msgh_request_port, &OutP->thread_list, &thread_listCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
- OutP->Head.msgh_size = 48;
-
- OutP->thread_listType = thread_listType;
-
- OutP->thread_listType.msgtl_number = thread_listCnt;
-}
-
-/* Routine task_info */
-mig_internal void _Xtask_info
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t flavorType;
- int flavor;
- mach_msg_type_t task_info_outCntType;
- mach_msg_type_number_t task_info_outCnt;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t task_info_outType;
- natural_t task_info_out[1024];
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_task_info
- (mach_port_t target_task, int flavor, task_info_t task_info_out, mach_msg_type_number_t *task_info_outCnt);
-
- auto const mach_msg_type_t flavorCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t task_info_outCntCheck = {
- /* msgt_name = */ MACH_MSG_TYPE_INTEGER_32,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t task_info_outType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1024,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- mach_msg_type_number_t task_info_outCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->flavorType, &flavorCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->task_info_outCntType, &task_info_outCntCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- task_info_outCnt = 1024;
- if (In0P->task_info_outCnt < task_info_outCnt)
- task_info_outCnt = In0P->task_info_outCnt;
-
- OutP->RetCode = S_task_info(In0P->Head.msgh_request_port, In0P->flavor, OutP->task_info_out, &task_info_outCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->task_info_outType = task_info_outType;
-
- OutP->task_info_outType.msgt_number = task_info_outCnt;
- OutP->Head.msgh_size = 36 + (4 * task_info_outCnt);
-}
-
-/* Routine thread_terminate */
-mig_internal void _Xthread_terminate
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_thread_terminate
- (mach_port_t target_thread);
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_thread_terminate(In0P->Head.msgh_request_port);
-}
-
-/* Routine thread_get_state */
-mig_internal void _Xthread_get_state
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t flavorType;
- int flavor;
- mach_msg_type_t old_stateCntType;
- mach_msg_type_number_t old_stateCnt;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t old_stateType;
- natural_t old_state[1024];
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_thread_get_state
- (mach_port_t target_thread, int flavor, thread_state_t old_state, mach_msg_type_number_t *old_stateCnt);
-
- auto const mach_msg_type_t flavorCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t old_stateCntCheck = {
- /* msgt_name = */ MACH_MSG_TYPE_INTEGER_32,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t old_stateType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1024,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- mach_msg_type_number_t old_stateCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->flavorType, &flavorCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->old_stateCntType, &old_stateCntCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- old_stateCnt = 1024;
- if (In0P->old_stateCnt < old_stateCnt)
- old_stateCnt = In0P->old_stateCnt;
-
- OutP->RetCode = S_thread_get_state(In0P->Head.msgh_request_port, In0P->flavor, OutP->old_state, &old_stateCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->old_stateType = old_stateType;
-
- OutP->old_stateType.msgt_number = old_stateCnt;
- OutP->Head.msgh_size = 36 + (4 * old_stateCnt);
-}
-
-/* Routine thread_set_state */
-mig_internal void _Xthread_set_state
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t flavorType;
- int flavor;
- mach_msg_type_t new_stateType;
- natural_t new_state[1024];
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_thread_set_state
- (mach_port_t target_thread, int flavor, thread_state_t new_state, mach_msg_type_number_t new_stateCnt);
-
- unsigned int msgh_size;
-
- auto const mach_msg_type_t flavorCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- msgh_size = In0P->Head.msgh_size;
- if ((msgh_size < 36) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->flavorType, &flavorCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->new_stateType.msgt_inline != TRUE) ||
- (In0P->new_stateType.msgt_longform != FALSE) ||
- (In0P->new_stateType.msgt_name != 2) ||
- (In0P->new_stateType.msgt_size != 32))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (msgh_size != 36 + (4 * In0P->new_stateType.msgt_number))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_thread_set_state(In0P->Head.msgh_request_port, In0P->flavor, In0P->new_state, In0P->new_stateType.msgt_number);
-}
-
-/* Routine thread_info */
-mig_internal void _Xthread_info
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t flavorType;
- int flavor;
- mach_msg_type_t thread_info_outCntType;
- mach_msg_type_number_t thread_info_outCnt;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t thread_info_outType;
- natural_t thread_info_out[1024];
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_thread_info
- (mach_port_t target_thread, int flavor, thread_info_t thread_info_out, mach_msg_type_number_t *thread_info_outCnt);
-
- auto const mach_msg_type_t flavorCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t thread_info_outCntCheck = {
- /* msgt_name = */ MACH_MSG_TYPE_INTEGER_32,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t thread_info_outType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1024,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- mach_msg_type_number_t thread_info_outCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->flavorType, &flavorCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->thread_info_outCntType, &thread_info_outCntCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- thread_info_outCnt = 1024;
- if (In0P->thread_info_outCnt < thread_info_outCnt)
- thread_info_outCnt = In0P->thread_info_outCnt;
-
- OutP->RetCode = S_thread_info(In0P->Head.msgh_request_port, In0P->flavor, OutP->thread_info_out, &thread_info_outCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->thread_info_outType = thread_info_outType;
-
- OutP->thread_info_outType.msgt_number = thread_info_outCnt;
- OutP->Head.msgh_size = 36 + (4 * thread_info_outCnt);
-}
-
-/* Routine vm_allocate */
-mig_internal void _Xvm_allocate
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t addressType;
- vm_address_t address;
- mach_msg_type_t sizeType;
- vm_size_t size;
- mach_msg_type_t anywhereType;
- boolean_t anywhere;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t addressType;
- vm_address_t address;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_vm_allocate
- (mach_port_t target_task, vm_address_t *address, vm_size_t size, boolean_t anywhere);
-
- auto const mach_msg_type_t addressCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t sizeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t anywhereCheck = {
- /* msgt_name = */ 0,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t addressType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 48) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->addressType, &addressCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->sizeType, &sizeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->anywhereType, &anywhereCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_vm_allocate(In0P->Head.msgh_request_port, &In0P->address, In0P->size, In0P->anywhere);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 40;
-
- OutP->addressType = addressType;
-
- OutP->address = In0P->address;
-}
-
-/* Routine vm_deallocate */
-mig_internal void _Xvm_deallocate
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t addressType;
- vm_address_t address;
- mach_msg_type_t sizeType;
- vm_size_t size;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_vm_deallocate
- (mach_port_t target_task, vm_address_t address, vm_size_t size);
-
- auto const mach_msg_type_t addressCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t sizeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->addressType, &addressCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->sizeType, &sizeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_vm_deallocate(In0P->Head.msgh_request_port, In0P->address, In0P->size);
-}
-
-/* Routine vm_protect */
-mig_internal void _Xvm_protect
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t addressType;
- vm_address_t address;
- mach_msg_type_t sizeType;
- vm_size_t size;
- mach_msg_type_t set_maximumType;
- boolean_t set_maximum;
- mach_msg_type_t new_protectionType;
- vm_prot_t new_protection;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_vm_protect
- (mach_port_t target_task, vm_address_t address, vm_size_t size, boolean_t set_maximum, vm_prot_t new_protection);
-
- auto const mach_msg_type_t addressCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t sizeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t set_maximumCheck = {
- /* msgt_name = */ 0,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t new_protectionCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 56) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->addressType, &addressCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->sizeType, &sizeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->set_maximumType, &set_maximumCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->new_protectionType, &new_protectionCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_vm_protect(In0P->Head.msgh_request_port, In0P->address, In0P->size, In0P->set_maximum, In0P->new_protection);
-}
-
-/* Routine vm_inherit */
-mig_internal void _Xvm_inherit
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t addressType;
- vm_address_t address;
- mach_msg_type_t sizeType;
- vm_size_t size;
- mach_msg_type_t new_inheritanceType;
- vm_inherit_t new_inheritance;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_vm_inherit
- (mach_port_t target_task, vm_address_t address, vm_size_t size, vm_inherit_t new_inheritance);
-
- auto const mach_msg_type_t addressCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t sizeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t new_inheritanceCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 48) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->addressType, &addressCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->sizeType, &sizeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->new_inheritanceType, &new_inheritanceCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_vm_inherit(In0P->Head.msgh_request_port, In0P->address, In0P->size, In0P->new_inheritance);
-}
-
-/* Routine vm_read */
-mig_internal void _Xvm_read
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t addressType;
- vm_address_t address;
- mach_msg_type_t sizeType;
- vm_size_t size;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_long_t dataType;
- vm_offset_t data;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_vm_read
- (mach_port_t target_task, vm_address_t address, vm_size_t size, vm_offset_t *data, mach_msg_type_number_t *dataCnt);
-
- auto const mach_msg_type_t addressCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t sizeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_long_t dataType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ FALSE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 9,
- /* msgtl_size = */ 8,
- /* msgtl_number = */ 0,
- };
-
- mach_msg_type_number_t dataCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->addressType, &addressCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->sizeType, &sizeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_vm_read(In0P->Head.msgh_request_port, In0P->address, In0P->size, &OutP->data, &dataCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
- OutP->Head.msgh_size = 48;
-
- OutP->dataType = dataType;
-
- OutP->dataType.msgtl_number = dataCnt;
-}
-
-/* Routine vm_write */
-mig_internal void _Xvm_write
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t addressType;
- vm_address_t address;
- mach_msg_type_long_t dataType;
- vm_offset_t data;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_vm_write
- (mach_port_t target_task, vm_address_t address, vm_offset_t data, mach_msg_type_number_t dataCnt);
-
- auto const mach_msg_type_t addressCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 48) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->addressType, &addressCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->dataType.msgtl_header.msgt_inline != FALSE) ||
- (In0P->dataType.msgtl_header.msgt_longform != TRUE) ||
- (In0P->dataType.msgtl_name != 9) ||
- (In0P->dataType.msgtl_size != 8))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_vm_write(In0P->Head.msgh_request_port, In0P->address, In0P->data, In0P->dataType.msgtl_number);
-}
-
-/* Routine vm_copy */
-mig_internal void _Xvm_copy
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t source_addressType;
- vm_address_t source_address;
- mach_msg_type_t sizeType;
- vm_size_t size;
- mach_msg_type_t dest_addressType;
- vm_address_t dest_address;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_vm_copy
- (mach_port_t target_task, vm_address_t source_address, vm_size_t size, vm_address_t dest_address);
-
- auto const mach_msg_type_t source_addressCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t sizeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t dest_addressCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 48) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->source_addressType, &source_addressCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->sizeType, &sizeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->dest_addressType, &dest_addressCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_vm_copy(In0P->Head.msgh_request_port, In0P->source_address, In0P->size, In0P->dest_address);
-}
-
-/* Routine vm_region */
-mig_internal void _Xvm_region
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t addressType;
- vm_address_t address;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t addressType;
- vm_address_t address;
- mach_msg_type_t sizeType;
- vm_size_t size;
- mach_msg_type_t protectionType;
- vm_prot_t protection;
- mach_msg_type_t max_protectionType;
- vm_prot_t max_protection;
- mach_msg_type_t inheritanceType;
- vm_inherit_t inheritance;
- mach_msg_type_t is_sharedType;
- boolean_t is_shared;
- mach_msg_type_t object_nameType;
- mach_port_t object_name;
- mach_msg_type_t offsetType;
- vm_offset_t offset;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_vm_region
- (mach_port_t target_task, vm_address_t *address, vm_size_t *size, vm_prot_t *protection, vm_prot_t *max_protection, vm_inherit_t *inheritance, boolean_t *is_shared, mach_port_t *object_name, vm_offset_t *offset);
-
- auto const mach_msg_type_t addressCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t addressType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t sizeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t protectionType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t max_protectionType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t inheritanceType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t is_sharedType = {
- /* msgt_name = */ 0,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t object_nameType = {
- /* msgt_name = */ 17,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t offsetType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->addressType, &addressCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_vm_region(In0P->Head.msgh_request_port, &In0P->address, &OutP->size, &OutP->protection, &OutP->max_protection, &OutP->inheritance, &OutP->is_shared, &OutP->object_name, &OutP->offset);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
- OutP->Head.msgh_size = 96;
-
- OutP->addressType = addressType;
-
- OutP->address = In0P->address;
-
- OutP->sizeType = sizeType;
-
- OutP->protectionType = protectionType;
-
- OutP->max_protectionType = max_protectionType;
-
- OutP->inheritanceType = inheritanceType;
-
- OutP->is_sharedType = is_sharedType;
-
- OutP->object_nameType = object_nameType;
-
- OutP->offsetType = offsetType;
-}
-
-/* Routine vm_statistics */
-mig_internal void _Xvm_statistics
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t vm_statsType;
- vm_statistics_data_t vm_stats;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_vm_statistics
- (mach_port_t target_task, vm_statistics_data_t *vm_stats);
-
- auto const mach_msg_type_t vm_statsType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 13,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_vm_statistics(In0P->Head.msgh_request_port, &OutP->vm_stats);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 88;
-
- OutP->vm_statsType = vm_statsType;
-}
-
-/* Routine mach_ports_register */
-mig_internal void _Xmach_ports_register
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_long_t init_port_setType;
- mach_port_array_t init_port_set;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_mach_ports_register
- (mach_port_t target_task, mach_port_array_t init_port_set, mach_msg_type_number_t init_port_setCnt);
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->init_port_setType.msgtl_header.msgt_inline != FALSE) ||
- (In0P->init_port_setType.msgtl_header.msgt_longform != TRUE) ||
- (In0P->init_port_setType.msgtl_name != 17) ||
- (In0P->init_port_setType.msgtl_size != 32))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_mach_ports_register(In0P->Head.msgh_request_port, In0P->init_port_set, In0P->init_port_setType.msgtl_number);
-}
-
-/* Routine mach_ports_lookup */
-mig_internal void _Xmach_ports_lookup
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_long_t init_port_setType;
- mach_port_array_t init_port_set;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_mach_ports_lookup
- (mach_port_t target_task, mach_port_array_t *init_port_set, mach_msg_type_number_t *init_port_setCnt);
-
- auto const mach_msg_type_long_t init_port_setType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ FALSE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 19,
- /* msgtl_size = */ 32,
- /* msgtl_number = */ 0,
- };
-
- mach_msg_type_number_t init_port_setCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_mach_ports_lookup(In0P->Head.msgh_request_port, &OutP->init_port_set, &init_port_setCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
- OutP->Head.msgh_size = 48;
-
- OutP->init_port_setType = init_port_setType;
-
- OutP->init_port_setType.msgtl_number = init_port_setCnt;
-}
-
-/* SimpleRoutine memory_object_data_provided */
-mig_internal void _Xmemory_object_data_provided
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t offsetType;
- vm_offset_t offset;
- mach_msg_type_long_t dataType;
- vm_offset_t data;
- mach_msg_type_t lock_valueType;
- vm_prot_t lock_value;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_memory_object_data_provided
- (mach_port_t memory_control, vm_offset_t offset, vm_offset_t data, mach_msg_type_number_t dataCnt, vm_prot_t lock_value);
-
- auto const mach_msg_type_t offsetCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t lock_valueCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 56) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->offsetType, &offsetCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->dataType.msgtl_header.msgt_inline != FALSE) ||
- (In0P->dataType.msgtl_header.msgt_longform != TRUE) ||
- (In0P->dataType.msgtl_name != 9) ||
- (In0P->dataType.msgtl_size != 8))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->lock_valueType, &lock_valueCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_memory_object_data_provided(In0P->Head.msgh_request_port, In0P->offset, In0P->data, In0P->dataType.msgtl_number, In0P->lock_value);
-}
-
-/* SimpleRoutine memory_object_data_unavailable */
-mig_internal void _Xmemory_object_data_unavailable
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t offsetType;
- vm_offset_t offset;
- mach_msg_type_t sizeType;
- vm_size_t size;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_memory_object_data_unavailable
- (mach_port_t memory_control, vm_offset_t offset, vm_size_t size);
-
- auto const mach_msg_type_t offsetCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t sizeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->offsetType, &offsetCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->sizeType, &sizeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_memory_object_data_unavailable(In0P->Head.msgh_request_port, In0P->offset, In0P->size);
-}
-
-/* Routine memory_object_get_attributes */
-mig_internal void _Xmemory_object_get_attributes
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t object_readyType;
- boolean_t object_ready;
- mach_msg_type_t may_cacheType;
- boolean_t may_cache;
- mach_msg_type_t copy_strategyType;
- memory_object_copy_strategy_t copy_strategy;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_memory_object_get_attributes
- (mach_port_t memory_control, boolean_t *object_ready, boolean_t *may_cache, memory_object_copy_strategy_t *copy_strategy);
-
- auto const mach_msg_type_t object_readyType = {
- /* msgt_name = */ 0,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t may_cacheType = {
- /* msgt_name = */ 0,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t copy_strategyType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_memory_object_get_attributes(In0P->Head.msgh_request_port, &OutP->object_ready, &OutP->may_cache, &OutP->copy_strategy);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 56;
-
- OutP->object_readyType = object_readyType;
-
- OutP->may_cacheType = may_cacheType;
-
- OutP->copy_strategyType = copy_strategyType;
-}
-
-/* Routine vm_set_default_memory_manager */
-mig_internal void _Xvm_set_default_memory_manager
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t default_managerType;
- mach_port_t default_manager;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t default_managerType;
- mach_port_t default_manager;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_vm_set_default_memory_manager
- (mach_port_t host_priv, mach_port_t *default_manager);
-
- auto const mach_msg_type_t default_managerCheck = {
- /* msgt_name = */ 17,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t default_managerType = {
- /* msgt_name = */ 19,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->default_managerType, &default_managerCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_vm_set_default_memory_manager(In0P->Head.msgh_request_port, &In0P->default_manager);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
- OutP->Head.msgh_size = 40;
-
- OutP->default_managerType = default_managerType;
-
- OutP->default_manager = In0P->default_manager;
-}
-
-/* SimpleRoutine xxx_memory_object_lock_request */
-mig_internal void _Xxxx_memory_object_lock_request
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t offsetType;
- vm_offset_t offset;
- mach_msg_type_t sizeType;
- vm_size_t size;
- mach_msg_type_t should_cleanType;
- boolean_t should_clean;
- mach_msg_type_t should_flushType;
- boolean_t should_flush;
- mach_msg_type_t lock_valueType;
- vm_prot_t lock_value;
- mach_msg_type_t reply_toType;
- mach_port_t reply_to;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_xxx_memory_object_lock_request
- (mach_port_t memory_control, vm_offset_t offset, vm_size_t size, boolean_t should_clean, boolean_t should_flush, vm_prot_t lock_value, mach_port_t reply_to, mach_msg_type_name_t reply_toPoly);
-
-#if TypeCheck
- boolean_t msgh_simple;
-#endif /* TypeCheck */
-
- auto const mach_msg_type_t offsetCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t sizeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t should_cleanCheck = {
- /* msgt_name = */ 0,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t should_flushCheck = {
- /* msgt_name = */ 0,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t lock_valueCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- msgh_simple = !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX);
- if ((In0P->Head.msgh_size != 72))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->offsetType, &offsetCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->sizeType, &sizeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->should_cleanType, &should_cleanCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->should_flushType, &should_flushCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->lock_valueType, &lock_valueCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->reply_toType.msgt_inline != TRUE) ||
- (In0P->reply_toType.msgt_longform != FALSE) ||
- (MACH_MSG_TYPE_PORT_ANY(In0P->reply_toType.msgt_name) && msgh_simple) ||
- (In0P->reply_toType.msgt_number != 1) ||
- (In0P->reply_toType.msgt_size != 32))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_xxx_memory_object_lock_request(In0P->Head.msgh_request_port, In0P->offset, In0P->size, In0P->should_clean, In0P->should_flush, In0P->lock_value, In0P->reply_to, In0P->reply_toType.msgt_name);
-}
-
-/* SimpleRoutine memory_object_lock_request */
-mig_internal void _Xmemory_object_lock_request
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t offsetType;
- vm_offset_t offset;
- mach_msg_type_t sizeType;
- vm_size_t size;
- mach_msg_type_t should_returnType;
- memory_object_return_t should_return;
- mach_msg_type_t should_flushType;
- boolean_t should_flush;
- mach_msg_type_t lock_valueType;
- vm_prot_t lock_value;
- mach_msg_type_t reply_toType;
- mach_port_t reply_to;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_memory_object_lock_request
- (mach_port_t memory_control, vm_offset_t offset, vm_size_t size, memory_object_return_t should_return, boolean_t should_flush, vm_prot_t lock_value, mach_port_t reply_to, mach_msg_type_name_t reply_toPoly);
-
-#if TypeCheck
- boolean_t msgh_simple;
-#endif /* TypeCheck */
-
- auto const mach_msg_type_t offsetCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t sizeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t should_returnCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t should_flushCheck = {
- /* msgt_name = */ 0,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t lock_valueCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- msgh_simple = !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX);
- if ((In0P->Head.msgh_size != 72))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->offsetType, &offsetCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->sizeType, &sizeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->should_returnType, &should_returnCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->should_flushType, &should_flushCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->lock_valueType, &lock_valueCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->reply_toType.msgt_inline != TRUE) ||
- (In0P->reply_toType.msgt_longform != FALSE) ||
- (MACH_MSG_TYPE_PORT_ANY(In0P->reply_toType.msgt_name) && msgh_simple) ||
- (In0P->reply_toType.msgt_number != 1) ||
- (In0P->reply_toType.msgt_size != 32))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_memory_object_lock_request(In0P->Head.msgh_request_port, In0P->offset, In0P->size, In0P->should_return, In0P->should_flush, In0P->lock_value, In0P->reply_to, In0P->reply_toType.msgt_name);
-}
-
-/* Routine xxx_task_get_emulation_vector */
-mig_internal void _Xxxx_task_get_emulation_vector
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t vector_startType;
- int vector_start;
- mach_msg_type_long_t emulation_vectorType;
- vm_offset_t emulation_vector[1024];
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_xxx_task_get_emulation_vector
- (mach_port_t task, int *vector_start, emulation_vector_t emulation_vector, mach_msg_type_number_t *emulation_vectorCnt);
-
- auto const mach_msg_type_t vector_startType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_long_t emulation_vectorType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 2,
- /* msgtl_size = */ 32,
- /* msgtl_number = */ 1024,
- };
-
- mach_msg_type_number_t emulation_vectorCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- emulation_vectorCnt = 1024;
-
- OutP->RetCode = S_xxx_task_get_emulation_vector(In0P->Head.msgh_request_port, &OutP->vector_start, OutP->emulation_vector, &emulation_vectorCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->vector_startType = vector_startType;
-
- OutP->emulation_vectorType = emulation_vectorType;
-
- OutP->emulation_vectorType.msgtl_number = emulation_vectorCnt;
- OutP->Head.msgh_size = 52 + (4 * emulation_vectorCnt);
-}
-
-/* Routine xxx_task_set_emulation_vector */
-mig_internal void _Xxxx_task_set_emulation_vector
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t vector_startType;
- int vector_start;
- mach_msg_type_long_t emulation_vectorType;
- vm_offset_t emulation_vector[1024];
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_xxx_task_set_emulation_vector
- (mach_port_t task, int vector_start, emulation_vector_t emulation_vector, mach_msg_type_number_t emulation_vectorCnt);
-
- unsigned int msgh_size;
-
- auto const mach_msg_type_t vector_startCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- msgh_size = In0P->Head.msgh_size;
- if ((msgh_size < 44) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->vector_startType, &vector_startCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->emulation_vectorType.msgtl_header.msgt_inline != TRUE) ||
- (In0P->emulation_vectorType.msgtl_header.msgt_longform != TRUE) ||
- (In0P->emulation_vectorType.msgtl_name != 2) ||
- (In0P->emulation_vectorType.msgtl_size != 32))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (msgh_size != 44 + (4 * In0P->emulation_vectorType.msgtl_number))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_xxx_task_set_emulation_vector(In0P->Head.msgh_request_port, In0P->vector_start, In0P->emulation_vector, In0P->emulation_vectorType.msgtl_number);
-}
-
-/* Routine xxx_host_info */
-mig_internal void _Xxxx_host_info
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t infoType;
- machine_info_data_t info;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_xxx_host_info
- (mach_port_t target_task, machine_info_data_t *info);
-
- auto const mach_msg_type_t infoType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 5,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_xxx_host_info(In0P->Head.msgh_request_port, &OutP->info);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 56;
-
- OutP->infoType = infoType;
-}
-
-/* Routine xxx_slot_info */
-mig_internal void _Xxxx_slot_info
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t slotType;
- int slot;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t infoType;
- machine_slot_data_t info;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_xxx_slot_info
- (mach_port_t target_task, int slot, machine_slot_data_t *info);
-
- auto const mach_msg_type_t slotCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t infoType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 8,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->slotType, &slotCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_xxx_slot_info(In0P->Head.msgh_request_port, In0P->slot, &OutP->info);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 68;
-
- OutP->infoType = infoType;
-}
-
-/* Routine xxx_cpu_control */
-mig_internal void _Xxxx_cpu_control
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t cpuType;
- int cpu;
- mach_msg_type_t runningType;
- boolean_t running;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_xxx_cpu_control
- (mach_port_t target_task, int cpu, boolean_t running);
-
- auto const mach_msg_type_t cpuCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t runningCheck = {
- /* msgt_name = */ 0,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->cpuType, &cpuCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->runningType, &runningCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_xxx_cpu_control(In0P->Head.msgh_request_port, In0P->cpu, In0P->running);
-}
-
-/* Routine task_suspend */
-mig_internal void _Xtask_suspend
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_task_suspend
- (mach_port_t target_task);
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_task_suspend(In0P->Head.msgh_request_port);
-}
-
-/* Routine task_resume */
-mig_internal void _Xtask_resume
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_task_resume
- (mach_port_t target_task);
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_task_resume(In0P->Head.msgh_request_port);
-}
-
-/* Routine task_get_special_port */
-mig_internal void _Xtask_get_special_port
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t which_portType;
- int which_port;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t special_portType;
- mach_port_t special_port;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_task_get_special_port
- (mach_port_t task, int which_port, mach_port_t *special_port, mach_msg_type_name_t *special_portPoly);
-
- boolean_t msgh_simple;
- auto const mach_msg_type_t which_portCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t special_portType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- mach_msg_type_name_t special_portPoly;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->which_portType, &which_portCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_task_get_special_port(In0P->Head.msgh_request_port, In0P->which_port, &OutP->special_port, &special_portPoly);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- msgh_simple = TRUE;
- OutP->Head.msgh_size = 40;
-
- OutP->special_portType = special_portType;
-
- if (MACH_MSG_TYPE_PORT_ANY(special_portPoly))
- msgh_simple = FALSE;
-
- OutP->special_portType.msgt_name = special_portPoly;
-
- if (!msgh_simple)
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-}
-
-/* Routine task_set_special_port */
-mig_internal void _Xtask_set_special_port
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t which_portType;
- int which_port;
- mach_msg_type_t special_portType;
- mach_port_t special_port;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_task_set_special_port
- (mach_port_t task, int which_port, mach_port_t special_port);
-
- auto const mach_msg_type_t which_portCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t special_portCheck = {
- /* msgt_name = */ 17,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->which_portType, &which_portCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->special_portType, &special_portCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_task_set_special_port(In0P->Head.msgh_request_port, In0P->which_port, In0P->special_port);
-}
-
-/* Routine xxx_task_info */
-mig_internal void _Xxxx_task_info
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t flavorType;
- int flavor;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_long_t task_info_outType;
- natural_t task_info_out[1024];
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_xxx_task_info
- (mach_port_t target_task, int flavor, task_info_t task_info_out, mach_msg_type_number_t *task_info_outCnt);
-
- auto const mach_msg_type_t flavorCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_long_t task_info_outType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 2,
- /* msgtl_size = */ 32,
- /* msgtl_number = */ 1024,
- };
-
- mach_msg_type_number_t task_info_outCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->flavorType, &flavorCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- task_info_outCnt = 1024;
-
- OutP->RetCode = S_xxx_task_info(In0P->Head.msgh_request_port, In0P->flavor, OutP->task_info_out, &task_info_outCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->task_info_outType = task_info_outType;
-
- OutP->task_info_outType.msgtl_number = task_info_outCnt;
- OutP->Head.msgh_size = 44 + (4 * task_info_outCnt);
-}
-
-/* Routine thread_create */
-mig_internal void _Xthread_create
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t child_threadType;
- mach_port_t child_thread;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_thread_create
- (mach_port_t parent_task, mach_port_t *child_thread, mach_msg_type_name_t *child_threadPoly);
-
- boolean_t msgh_simple;
- auto const mach_msg_type_t child_threadType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- mach_msg_type_name_t child_threadPoly;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_thread_create(In0P->Head.msgh_request_port, &OutP->child_thread, &child_threadPoly);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- msgh_simple = TRUE;
- OutP->Head.msgh_size = 40;
-
- OutP->child_threadType = child_threadType;
-
- if (MACH_MSG_TYPE_PORT_ANY(child_threadPoly))
- msgh_simple = FALSE;
-
- OutP->child_threadType.msgt_name = child_threadPoly;
-
- if (!msgh_simple)
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-}
-
-/* Routine thread_suspend */
-mig_internal void _Xthread_suspend
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_thread_suspend
- (mach_port_t target_thread);
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_thread_suspend(In0P->Head.msgh_request_port);
-}
-
-/* Routine thread_resume */
-mig_internal void _Xthread_resume
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_thread_resume
- (mach_port_t target_thread);
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_thread_resume(In0P->Head.msgh_request_port);
-}
-
-/* Routine thread_abort */
-mig_internal void _Xthread_abort
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_thread_abort
- (mach_port_t target_thread);
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_thread_abort(In0P->Head.msgh_request_port);
-}
-
-/* Routine xxx_thread_get_state */
-mig_internal void _Xxxx_thread_get_state
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t flavorType;
- int flavor;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_long_t old_stateType;
- natural_t old_state[1024];
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_xxx_thread_get_state
- (mach_port_t target_thread, int flavor, thread_state_t old_state, mach_msg_type_number_t *old_stateCnt);
-
- auto const mach_msg_type_t flavorCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_long_t old_stateType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 2,
- /* msgtl_size = */ 32,
- /* msgtl_number = */ 1024,
- };
-
- mach_msg_type_number_t old_stateCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->flavorType, &flavorCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- old_stateCnt = 1024;
-
- OutP->RetCode = S_xxx_thread_get_state(In0P->Head.msgh_request_port, In0P->flavor, OutP->old_state, &old_stateCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->old_stateType = old_stateType;
-
- OutP->old_stateType.msgtl_number = old_stateCnt;
- OutP->Head.msgh_size = 44 + (4 * old_stateCnt);
-}
-
-/* Routine xxx_thread_set_state */
-mig_internal void _Xxxx_thread_set_state
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t flavorType;
- int flavor;
- mach_msg_type_long_t new_stateType;
- natural_t new_state[1024];
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_xxx_thread_set_state
- (mach_port_t target_thread, int flavor, thread_state_t new_state, mach_msg_type_number_t new_stateCnt);
-
- unsigned int msgh_size;
-
- auto const mach_msg_type_t flavorCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- msgh_size = In0P->Head.msgh_size;
- if ((msgh_size < 44) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->flavorType, &flavorCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->new_stateType.msgtl_header.msgt_inline != TRUE) ||
- (In0P->new_stateType.msgtl_header.msgt_longform != TRUE) ||
- (In0P->new_stateType.msgtl_name != 2) ||
- (In0P->new_stateType.msgtl_size != 32))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (msgh_size != 44 + (4 * In0P->new_stateType.msgtl_number))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_xxx_thread_set_state(In0P->Head.msgh_request_port, In0P->flavor, In0P->new_state, In0P->new_stateType.msgtl_number);
-}
-
-/* Routine thread_get_special_port */
-mig_internal void _Xthread_get_special_port
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t which_portType;
- int which_port;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t special_portType;
- mach_port_t special_port;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_thread_get_special_port
- (mach_port_t thread, int which_port, mach_port_t *special_port, mach_msg_type_name_t *special_portPoly);
-
- boolean_t msgh_simple;
- auto const mach_msg_type_t which_portCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t special_portType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- mach_msg_type_name_t special_portPoly;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->which_portType, &which_portCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_thread_get_special_port(In0P->Head.msgh_request_port, In0P->which_port, &OutP->special_port, &special_portPoly);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- msgh_simple = TRUE;
- OutP->Head.msgh_size = 40;
-
- OutP->special_portType = special_portType;
-
- if (MACH_MSG_TYPE_PORT_ANY(special_portPoly))
- msgh_simple = FALSE;
-
- OutP->special_portType.msgt_name = special_portPoly;
-
- if (!msgh_simple)
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-}
-
-/* Routine thread_set_special_port */
-mig_internal void _Xthread_set_special_port
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t which_portType;
- int which_port;
- mach_msg_type_t special_portType;
- mach_port_t special_port;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_thread_set_special_port
- (mach_port_t thread, int which_port, mach_port_t special_port);
-
- auto const mach_msg_type_t which_portCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t special_portCheck = {
- /* msgt_name = */ 17,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->which_portType, &which_portCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->special_portType, &special_portCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_thread_set_special_port(In0P->Head.msgh_request_port, In0P->which_port, In0P->special_port);
-}
-
-/* Routine xxx_thread_info */
-mig_internal void _Xxxx_thread_info
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t flavorType;
- int flavor;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_long_t thread_info_outType;
- natural_t thread_info_out[1024];
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_xxx_thread_info
- (mach_port_t target_thread, int flavor, thread_info_t thread_info_out, mach_msg_type_number_t *thread_info_outCnt);
-
- auto const mach_msg_type_t flavorCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_long_t thread_info_outType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 2,
- /* msgtl_size = */ 32,
- /* msgtl_number = */ 1024,
- };
-
- mach_msg_type_number_t thread_info_outCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->flavorType, &flavorCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- thread_info_outCnt = 1024;
-
- OutP->RetCode = S_xxx_thread_info(In0P->Head.msgh_request_port, In0P->flavor, OutP->thread_info_out, &thread_info_outCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->thread_info_outType = thread_info_outType;
-
- OutP->thread_info_outType.msgtl_number = thread_info_outCnt;
- OutP->Head.msgh_size = 44 + (4 * thread_info_outCnt);
-}
-
-/* Routine task_set_emulation */
-mig_internal void _Xtask_set_emulation
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t routine_entry_ptType;
- vm_address_t routine_entry_pt;
- mach_msg_type_t routine_numberType;
- int routine_number;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_task_set_emulation
- (mach_port_t target_port, vm_address_t routine_entry_pt, int routine_number);
-
- auto const mach_msg_type_t routine_entry_ptCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t routine_numberCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->routine_entry_ptType, &routine_entry_ptCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->routine_numberType, &routine_numberCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_task_set_emulation(In0P->Head.msgh_request_port, In0P->routine_entry_pt, In0P->routine_number);
-}
-
-/* Routine task_ras_control */
-mig_internal void _Xtask_ras_control
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t basepcType;
- vm_address_t basepc;
- mach_msg_type_t boundspcType;
- vm_address_t boundspc;
- mach_msg_type_t flavorType;
- int flavor;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_task_ras_control
- (mach_port_t target_task, vm_address_t basepc, vm_address_t boundspc, int flavor);
-
- auto const mach_msg_type_t basepcCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t boundspcCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t flavorCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 48) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->basepcType, &basepcCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->boundspcType, &boundspcCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->flavorType, &flavorCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_task_ras_control(In0P->Head.msgh_request_port, In0P->basepc, In0P->boundspc, In0P->flavor);
-}
-
-/* Routine vm_map */
-mig_internal void _Xvm_map
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t addressType;
- vm_address_t address;
- mach_msg_type_t sizeType;
- vm_size_t size;
- mach_msg_type_t maskType;
- vm_address_t mask;
- mach_msg_type_t anywhereType;
- boolean_t anywhere;
- mach_msg_type_t memory_objectType;
- mach_port_t memory_object;
- mach_msg_type_t offsetType;
- vm_offset_t offset;
- mach_msg_type_t copyType;
- boolean_t copy;
- mach_msg_type_t cur_protectionType;
- vm_prot_t cur_protection;
- mach_msg_type_t max_protectionType;
- vm_prot_t max_protection;
- mach_msg_type_t inheritanceType;
- vm_inherit_t inheritance;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t addressType;
- vm_address_t address;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_vm_map
- (mach_port_t target_task, vm_address_t *address, vm_size_t size, vm_address_t mask, boolean_t anywhere, mach_port_t memory_object, vm_offset_t offset, boolean_t copy, vm_prot_t cur_protection, vm_prot_t max_protection, vm_inherit_t inheritance);
-
- auto const mach_msg_type_t addressCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t sizeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t maskCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t anywhereCheck = {
- /* msgt_name = */ 0,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t memory_objectCheck = {
- /* msgt_name = */ 17,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t offsetCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t copyCheck = {
- /* msgt_name = */ 0,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t cur_protectionCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t max_protectionCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t inheritanceCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t addressType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 104) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->addressType, &addressCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->sizeType, &sizeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->maskType, &maskCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->anywhereType, &anywhereCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->memory_objectType, &memory_objectCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->offsetType, &offsetCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->copyType, &copyCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->cur_protectionType, &cur_protectionCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->max_protectionType, &max_protectionCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->inheritanceType, &inheritanceCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_vm_map(In0P->Head.msgh_request_port, &In0P->address, In0P->size, In0P->mask, In0P->anywhere, In0P->memory_object, In0P->offset, In0P->copy, In0P->cur_protection, In0P->max_protection, In0P->inheritance);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 40;
-
- OutP->addressType = addressType;
-
- OutP->address = In0P->address;
-}
-
-/* SimpleRoutine memory_object_data_error */
-mig_internal void _Xmemory_object_data_error
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t offsetType;
- vm_offset_t offset;
- mach_msg_type_t sizeType;
- vm_size_t size;
- mach_msg_type_t error_valueType;
- kern_return_t error_value;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_memory_object_data_error
- (mach_port_t memory_control, vm_offset_t offset, vm_size_t size, kern_return_t error_value);
-
- auto const mach_msg_type_t offsetCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t sizeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t error_valueCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 48) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->offsetType, &offsetCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->sizeType, &sizeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->error_valueType, &error_valueCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_memory_object_data_error(In0P->Head.msgh_request_port, In0P->offset, In0P->size, In0P->error_value);
-}
-
-/* SimpleRoutine memory_object_set_attributes */
-mig_internal void _Xmemory_object_set_attributes
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t object_readyType;
- boolean_t object_ready;
- mach_msg_type_t may_cacheType;
- boolean_t may_cache;
- mach_msg_type_t copy_strategyType;
- memory_object_copy_strategy_t copy_strategy;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_memory_object_set_attributes
- (mach_port_t memory_control, boolean_t object_ready, boolean_t may_cache, memory_object_copy_strategy_t copy_strategy);
-
- auto const mach_msg_type_t object_readyCheck = {
- /* msgt_name = */ 0,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t may_cacheCheck = {
- /* msgt_name = */ 0,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t copy_strategyCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 48) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->object_readyType, &object_readyCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->may_cacheType, &may_cacheCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->copy_strategyType, &copy_strategyCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_memory_object_set_attributes(In0P->Head.msgh_request_port, In0P->object_ready, In0P->may_cache, In0P->copy_strategy);
-}
-
-/* SimpleRoutine memory_object_destroy */
-mig_internal void _Xmemory_object_destroy
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t reasonType;
- kern_return_t reason;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_memory_object_destroy
- (mach_port_t memory_control, kern_return_t reason);
-
- auto const mach_msg_type_t reasonCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->reasonType, &reasonCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_memory_object_destroy(In0P->Head.msgh_request_port, In0P->reason);
-}
-
-/* SimpleRoutine memory_object_data_supply */
-mig_internal void _Xmemory_object_data_supply
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t offsetType;
- vm_offset_t offset;
- mach_msg_type_long_t dataType;
- vm_offset_t data;
- mach_msg_type_t lock_valueType;
- vm_prot_t lock_value;
- mach_msg_type_t preciousType;
- boolean_t precious;
- mach_msg_type_t reply_toType;
- mach_port_t reply_to;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_memory_object_data_supply
- (mach_port_t memory_control, vm_offset_t offset, vm_offset_t data, mach_msg_type_number_t dataCnt, vm_prot_t lock_value, boolean_t precious, mach_port_t reply_to, mach_msg_type_name_t reply_toPoly);
-
- auto const mach_msg_type_t offsetCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t lock_valueCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t preciousCheck = {
- /* msgt_name = */ 0,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 72) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->offsetType, &offsetCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->dataType.msgtl_header.msgt_inline != FALSE) ||
- (In0P->dataType.msgtl_header.msgt_longform != TRUE) ||
- (In0P->dataType.msgtl_name != 9) ||
- (In0P->dataType.msgtl_size != 8))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->lock_valueType, &lock_valueCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->preciousType, &preciousCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->reply_toType.msgt_inline != TRUE) ||
- (In0P->reply_toType.msgt_longform != FALSE) ||
- (In0P->reply_toType.msgt_number != 1) ||
- (In0P->reply_toType.msgt_size != 32))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_memory_object_data_supply(In0P->Head.msgh_request_port, In0P->offset, In0P->data, In0P->dataType.msgtl_number, In0P->lock_value, In0P->precious, In0P->reply_to, In0P->reply_toType.msgt_name);
-}
-
-/* SimpleRoutine memory_object_ready */
-mig_internal void _Xmemory_object_ready
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t may_cacheType;
- boolean_t may_cache;
- mach_msg_type_t copy_strategyType;
- memory_object_copy_strategy_t copy_strategy;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_memory_object_ready
- (mach_port_t memory_control, boolean_t may_cache, memory_object_copy_strategy_t copy_strategy);
-
- auto const mach_msg_type_t may_cacheCheck = {
- /* msgt_name = */ 0,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t copy_strategyCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->may_cacheType, &may_cacheCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->copy_strategyType, &copy_strategyCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_memory_object_ready(In0P->Head.msgh_request_port, In0P->may_cache, In0P->copy_strategy);
-}
-
-/* SimpleRoutine memory_object_change_attributes */
-mig_internal void _Xmemory_object_change_attributes
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t may_cacheType;
- boolean_t may_cache;
- mach_msg_type_t copy_strategyType;
- memory_object_copy_strategy_t copy_strategy;
- mach_msg_type_t reply_toType;
- mach_port_t reply_to;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_memory_object_change_attributes
- (mach_port_t memory_control, boolean_t may_cache, memory_object_copy_strategy_t copy_strategy, mach_port_t reply_to, mach_msg_type_name_t reply_toPoly);
-
-#if TypeCheck
- boolean_t msgh_simple;
-#endif /* TypeCheck */
-
- auto const mach_msg_type_t may_cacheCheck = {
- /* msgt_name = */ 0,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t copy_strategyCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- msgh_simple = !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX);
- if ((In0P->Head.msgh_size != 48))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->may_cacheType, &may_cacheCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->copy_strategyType, &copy_strategyCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->reply_toType.msgt_inline != TRUE) ||
- (In0P->reply_toType.msgt_longform != FALSE) ||
- (MACH_MSG_TYPE_PORT_ANY(In0P->reply_toType.msgt_name) && msgh_simple) ||
- (In0P->reply_toType.msgt_number != 1) ||
- (In0P->reply_toType.msgt_size != 32))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_memory_object_change_attributes(In0P->Head.msgh_request_port, In0P->may_cache, In0P->copy_strategy, In0P->reply_to, In0P->reply_toType.msgt_name);
-}
-
-/* Routine vm_machine_attribute */
-mig_internal void _Xvm_machine_attribute
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t addressType;
- vm_address_t address;
- mach_msg_type_t sizeType;
- vm_size_t size;
- mach_msg_type_t attributeType;
- vm_machine_attribute_t attribute;
- mach_msg_type_t valueType;
- vm_machine_attribute_val_t value;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t valueType;
- vm_machine_attribute_val_t value;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_vm_machine_attribute
- (mach_port_t target_task, vm_address_t address, vm_size_t size, vm_machine_attribute_t attribute, vm_machine_attribute_val_t *value);
-
- auto const mach_msg_type_t addressCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t sizeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t attributeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t valueCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t valueType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 56) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->addressType, &addressCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->sizeType, &sizeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->attributeType, &attributeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->valueType, &valueCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_vm_machine_attribute(In0P->Head.msgh_request_port, In0P->address, In0P->size, In0P->attribute, &In0P->value);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 40;
-
- OutP->valueType = valueType;
-
- OutP->value = In0P->value;
-}
-
-static mig_routine_t mach_server_routines[] = {
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- _Xtask_create,
- _Xtask_terminate,
- _Xtask_get_emulation_vector,
- _Xtask_set_emulation_vector,
- _Xtask_threads,
- _Xtask_info,
- 0,
- 0,
- 0,
- _Xthread_terminate,
- _Xthread_get_state,
- _Xthread_set_state,
- _Xthread_info,
- 0,
- _Xvm_allocate,
- 0,
- _Xvm_deallocate,
- _Xvm_protect,
- _Xvm_inherit,
- _Xvm_read,
- _Xvm_write,
- _Xvm_copy,
- _Xvm_region,
- _Xvm_statistics,
- 0,
- 0,
- _Xmach_ports_register,
- _Xmach_ports_lookup,
- 0,
- 0,
- 0,
- _Xmemory_object_data_provided,
- _Xmemory_object_data_unavailable,
- _Xmemory_object_get_attributes,
- _Xvm_set_default_memory_manager,
- 0,
- _Xxxx_memory_object_lock_request,
- _Xmemory_object_lock_request,
- _Xxxx_task_get_emulation_vector,
- _Xxxx_task_set_emulation_vector,
- _Xxxx_host_info,
- _Xxxx_slot_info,
- _Xxxx_cpu_control,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- _Xtask_suspend,
- _Xtask_resume,
- _Xtask_get_special_port,
- _Xtask_set_special_port,
- _Xxxx_task_info,
- _Xthread_create,
- _Xthread_suspend,
- _Xthread_resume,
- _Xthread_abort,
- _Xxxx_thread_get_state,
- _Xxxx_thread_set_state,
- _Xthread_get_special_port,
- _Xthread_set_special_port,
- _Xxxx_thread_info,
- _Xtask_set_emulation,
- _Xtask_ras_control,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- _Xvm_map,
- _Xmemory_object_data_error,
- _Xmemory_object_set_attributes,
- _Xmemory_object_destroy,
- _Xmemory_object_data_supply,
- _Xmemory_object_ready,
- _Xmemory_object_change_attributes,
- 0,
- 0,
- 0,
- _Xvm_machine_attribute,
- 0,
-};
-
-mig_external boolean_t mach_server
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- register mach_msg_header_t *InP = InHeadP;
- register mig_reply_header_t *OutP = (mig_reply_header_t *) OutHeadP;
-
- auto const mach_msg_type_t RetCodeType = {
- /* msgt_name = */ MACH_MSG_TYPE_INTEGER_32,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- register mig_routine_t routine;
-
- OutP->Head.msgh_bits = MACH_MSGH_BITS(MACH_MSGH_BITS_REPLY(InP->msgh_bits), 0);
- OutP->Head.msgh_size = sizeof *OutP;
- OutP->Head.msgh_remote_port = InP->msgh_reply_port;
- OutP->Head.msgh_local_port = MACH_PORT_NULL;
- OutP->Head.msgh_seqno = 0;
- OutP->Head.msgh_id = InP->msgh_id + 100;
-
- OutP->RetCodeType = RetCodeType;
-
- if ((InP->msgh_id > 2100) || (InP->msgh_id < 2000) ||
- ((routine = mach_server_routines[InP->msgh_id - 2000]) == 0)) {
- OutP->RetCode = MIG_BAD_ID;
- return FALSE;
- }
- (*routine) (InP, &OutP->Head);
- return TRUE;
-}
-
-mig_external mig_routine_t mach_server_routine
- (const mach_msg_header_t *InHeadP)
-{
- register int msgh_id;
-
- msgh_id = InHeadP->msgh_id - 2000;
-
- if ((msgh_id > 100) || (msgh_id < 0))
- return 0;
-
- return mach_server_routines[msgh_id];
-}
-
diff --git a/boot.backup1/ourmach_hostServer.c b/boot.backup1/ourmach_hostServer.c
deleted file mode 100644
index 4ede0429..00000000
--- a/boot.backup1/ourmach_hostServer.c
+++ /dev/null
@@ -1,2596 +0,0 @@
-/* Module mach_host */
-
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE 1
-#endif
-
-#define EXPORT_BOOLEAN
-#include <mach/boolean.h>
-#include <mach/kern_return.h>
-#include <mach/message.h>
-#include <mach/mig_errors.h>
-#include <mach/mig_support.h>
-
-#ifndef mig_internal
-#define mig_internal static
-#endif
-
-#ifndef mig_external
-#define mig_external
-#endif
-
-#ifndef TypeCheck
-#define TypeCheck 1
-#endif
-
-#ifndef UseExternRCSId
-#define UseExternRCSId 1
-#endif
-
-#define BAD_TYPECHECK(type, check) ({\
- union { mach_msg_type_t t; unsigned32_t w; } _t, _c;\
- _t.t = *(type); _c.t = *(check); _t.w != _c.w; })
-#define msgh_request_port msgh_local_port
-#define MACH_MSGH_BITS_REQUEST(bits) MACH_MSGH_BITS_LOCAL(bits)
-#define msgh_reply_port msgh_remote_port
-#define MACH_MSGH_BITS_REPLY(bits) MACH_MSGH_BITS_REMOTE(bits)
-
-#include <mach/std_types.h>
-#include <mach/mach_types.h>
-
-/* Routine host_processors */
-mig_internal void _Xhost_processors
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_long_t processor_listType;
- processor_array_t processor_list;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_host_processors
- (mach_port_t host_priv, processor_array_t *processor_list, mach_msg_type_number_t *processor_listCnt);
-
- auto const mach_msg_type_long_t processor_listType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ FALSE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 19,
- /* msgtl_size = */ 32,
- /* msgtl_number = */ 0,
- };
-
- mach_msg_type_number_t processor_listCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_host_processors(In0P->Head.msgh_request_port, &OutP->processor_list, &processor_listCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
- OutP->Head.msgh_size = 48;
-
- OutP->processor_listType = processor_listType;
-
- OutP->processor_listType.msgtl_number = processor_listCnt;
-}
-
-/* Routine yyy_host_info */
-mig_internal void _Xyyy_host_info
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t flavorType;
- int flavor;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_long_t host_info_outType;
- natural_t host_info_out[1024];
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_yyy_host_info
- (mach_port_t host, int flavor, host_info_t host_info_out, mach_msg_type_number_t *host_info_outCnt);
-
- auto const mach_msg_type_t flavorCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_long_t host_info_outType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 2,
- /* msgtl_size = */ 32,
- /* msgtl_number = */ 1024,
- };
-
- mach_msg_type_number_t host_info_outCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->flavorType, &flavorCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- host_info_outCnt = 1024;
-
- OutP->RetCode = S_yyy_host_info(In0P->Head.msgh_request_port, In0P->flavor, OutP->host_info_out, &host_info_outCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->host_info_outType = host_info_outType;
-
- OutP->host_info_outType.msgtl_number = host_info_outCnt;
- OutP->Head.msgh_size = 44 + (4 * host_info_outCnt);
-}
-
-/* Routine yyy_processor_info */
-mig_internal void _Xyyy_processor_info
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t flavorType;
- int flavor;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t hostType;
- mach_port_t host;
- mach_msg_type_long_t processor_info_outType;
- natural_t processor_info_out[1024];
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_yyy_processor_info
- (mach_port_t processor, int flavor, mach_port_t *host, processor_info_t processor_info_out, mach_msg_type_number_t *processor_info_outCnt);
-
- auto const mach_msg_type_t flavorCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t hostType = {
- /* msgt_name = */ 19,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_long_t processor_info_outType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 2,
- /* msgtl_size = */ 32,
- /* msgtl_number = */ 1024,
- };
-
- mach_msg_type_number_t processor_info_outCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->flavorType, &flavorCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- processor_info_outCnt = 1024;
-
- OutP->RetCode = S_yyy_processor_info(In0P->Head.msgh_request_port, In0P->flavor, &OutP->host, OutP->processor_info_out, &processor_info_outCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-
- OutP->hostType = hostType;
-
- OutP->processor_info_outType = processor_info_outType;
-
- OutP->processor_info_outType.msgtl_number = processor_info_outCnt;
- OutP->Head.msgh_size = 52 + (4 * processor_info_outCnt);
-}
-
-/* Routine processor_start */
-mig_internal void _Xprocessor_start
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_processor_start
- (mach_port_t processor);
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_processor_start(In0P->Head.msgh_request_port);
-}
-
-/* Routine processor_exit */
-mig_internal void _Xprocessor_exit
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_processor_exit
- (mach_port_t processor);
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_processor_exit(In0P->Head.msgh_request_port);
-}
-
-/* Routine yyy_processor_control */
-mig_internal void _Xyyy_processor_control
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_long_t processor_cmdType;
- natural_t processor_cmd[1024];
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_yyy_processor_control
- (mach_port_t processor, processor_info_t processor_cmd, mach_msg_type_number_t processor_cmdCnt);
-
- unsigned int msgh_size;
-
-#if TypeCheck
- msgh_size = In0P->Head.msgh_size;
- if ((msgh_size < 36) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->processor_cmdType.msgtl_header.msgt_inline != TRUE) ||
- (In0P->processor_cmdType.msgtl_header.msgt_longform != TRUE) ||
- (In0P->processor_cmdType.msgtl_name != 2) ||
- (In0P->processor_cmdType.msgtl_size != 32))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (msgh_size != 36 + (4 * In0P->processor_cmdType.msgtl_number))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_yyy_processor_control(In0P->Head.msgh_request_port, In0P->processor_cmd, In0P->processor_cmdType.msgtl_number);
-}
-
-/* Routine processor_set_default */
-mig_internal void _Xprocessor_set_default
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t default_setType;
- mach_port_t default_set;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_processor_set_default
- (mach_port_t host, mach_port_t *default_set);
-
- auto const mach_msg_type_t default_setType = {
- /* msgt_name = */ 19,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_processor_set_default(In0P->Head.msgh_request_port, &OutP->default_set);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
- OutP->Head.msgh_size = 40;
-
- OutP->default_setType = default_setType;
-}
-
-/* Routine xxx_processor_set_default_priv */
-mig_internal void _Xxxx_processor_set_default_priv
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t default_setType;
- mach_port_t default_set;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_xxx_processor_set_default_priv
- (mach_port_t host, mach_port_t *default_set);
-
- auto const mach_msg_type_t default_setType = {
- /* msgt_name = */ 19,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_xxx_processor_set_default_priv(In0P->Head.msgh_request_port, &OutP->default_set);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
- OutP->Head.msgh_size = 40;
-
- OutP->default_setType = default_setType;
-}
-
-/* Routine processor_set_create */
-mig_internal void _Xprocessor_set_create
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t new_setType;
- mach_port_t new_set;
- mach_msg_type_t new_nameType;
- mach_port_t new_name;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_processor_set_create
- (mach_port_t host, mach_port_t *new_set, mach_port_t *new_name);
-
- auto const mach_msg_type_t new_setType = {
- /* msgt_name = */ 19,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t new_nameType = {
- /* msgt_name = */ 19,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_processor_set_create(In0P->Head.msgh_request_port, &OutP->new_set, &OutP->new_name);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
- OutP->Head.msgh_size = 48;
-
- OutP->new_setType = new_setType;
-
- OutP->new_nameType = new_nameType;
-}
-
-/* Routine processor_set_destroy */
-mig_internal void _Xprocessor_set_destroy
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_processor_set_destroy
- (mach_port_t set);
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_processor_set_destroy(In0P->Head.msgh_request_port);
-}
-
-/* Routine yyy_processor_set_info */
-mig_internal void _Xyyy_processor_set_info
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t flavorType;
- int flavor;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t hostType;
- mach_port_t host;
- mach_msg_type_long_t info_outType;
- natural_t info_out[1024];
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_yyy_processor_set_info
- (mach_port_t set_name, int flavor, mach_port_t *host, processor_set_info_t info_out, mach_msg_type_number_t *info_outCnt);
-
- auto const mach_msg_type_t flavorCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t hostType = {
- /* msgt_name = */ 19,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_long_t info_outType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 2,
- /* msgtl_size = */ 32,
- /* msgtl_number = */ 1024,
- };
-
- mach_msg_type_number_t info_outCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->flavorType, &flavorCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- info_outCnt = 1024;
-
- OutP->RetCode = S_yyy_processor_set_info(In0P->Head.msgh_request_port, In0P->flavor, &OutP->host, OutP->info_out, &info_outCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-
- OutP->hostType = hostType;
-
- OutP->info_outType = info_outType;
-
- OutP->info_outType.msgtl_number = info_outCnt;
- OutP->Head.msgh_size = 52 + (4 * info_outCnt);
-}
-
-/* Routine processor_assign */
-mig_internal void _Xprocessor_assign
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t new_setType;
- mach_port_t new_set;
- mach_msg_type_t waitType;
- boolean_t wait;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_processor_assign
- (mach_port_t processor, mach_port_t new_set, boolean_t wait);
-
- auto const mach_msg_type_t new_setCheck = {
- /* msgt_name = */ 17,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t waitCheck = {
- /* msgt_name = */ 0,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->new_setType, &new_setCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->waitType, &waitCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_processor_assign(In0P->Head.msgh_request_port, In0P->new_set, In0P->wait);
-}
-
-/* Routine processor_get_assignment */
-mig_internal void _Xprocessor_get_assignment
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t assigned_setType;
- mach_port_t assigned_set;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_processor_get_assignment
- (mach_port_t processor, mach_port_t *assigned_set);
-
- auto const mach_msg_type_t assigned_setType = {
- /* msgt_name = */ 19,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_processor_get_assignment(In0P->Head.msgh_request_port, &OutP->assigned_set);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
- OutP->Head.msgh_size = 40;
-
- OutP->assigned_setType = assigned_setType;
-}
-
-/* Routine thread_assign */
-mig_internal void _Xthread_assign
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t new_setType;
- mach_port_t new_set;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_thread_assign
- (mach_port_t thread, mach_port_t new_set);
-
- auto const mach_msg_type_t new_setCheck = {
- /* msgt_name = */ 17,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->new_setType, &new_setCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_thread_assign(In0P->Head.msgh_request_port, In0P->new_set);
-}
-
-/* Routine thread_assign_default */
-mig_internal void _Xthread_assign_default
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_thread_assign_default
- (mach_port_t thread);
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_thread_assign_default(In0P->Head.msgh_request_port);
-}
-
-/* Routine thread_get_assignment */
-mig_internal void _Xthread_get_assignment
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t assigned_setType;
- mach_port_t assigned_set;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_thread_get_assignment
- (mach_port_t thread, mach_port_t *assigned_set);
-
- auto const mach_msg_type_t assigned_setType = {
- /* msgt_name = */ 19,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_thread_get_assignment(In0P->Head.msgh_request_port, &OutP->assigned_set);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
- OutP->Head.msgh_size = 40;
-
- OutP->assigned_setType = assigned_setType;
-}
-
-/* Routine task_assign */
-mig_internal void _Xtask_assign
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t new_setType;
- mach_port_t new_set;
- mach_msg_type_t assign_threadsType;
- boolean_t assign_threads;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_task_assign
- (mach_port_t task, mach_port_t new_set, boolean_t assign_threads);
-
- auto const mach_msg_type_t new_setCheck = {
- /* msgt_name = */ 17,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t assign_threadsCheck = {
- /* msgt_name = */ 0,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->new_setType, &new_setCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->assign_threadsType, &assign_threadsCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_task_assign(In0P->Head.msgh_request_port, In0P->new_set, In0P->assign_threads);
-}
-
-/* Routine task_assign_default */
-mig_internal void _Xtask_assign_default
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t assign_threadsType;
- boolean_t assign_threads;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_task_assign_default
- (mach_port_t task, boolean_t assign_threads);
-
- auto const mach_msg_type_t assign_threadsCheck = {
- /* msgt_name = */ 0,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->assign_threadsType, &assign_threadsCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_task_assign_default(In0P->Head.msgh_request_port, In0P->assign_threads);
-}
-
-/* Routine task_get_assignment */
-mig_internal void _Xtask_get_assignment
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t assigned_setType;
- mach_port_t assigned_set;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_task_get_assignment
- (mach_port_t task, mach_port_t *assigned_set);
-
- auto const mach_msg_type_t assigned_setType = {
- /* msgt_name = */ 19,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_task_get_assignment(In0P->Head.msgh_request_port, &OutP->assigned_set);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
- OutP->Head.msgh_size = 40;
-
- OutP->assigned_setType = assigned_setType;
-}
-
-/* Routine host_kernel_version */
-mig_internal void _Xhost_kernel_version
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_long_t kernel_versionType;
- kernel_version_t kernel_version;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_host_kernel_version
- (mach_port_t host, kernel_version_t kernel_version);
-
- auto const mach_msg_type_long_t kernel_versionType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 12,
- /* msgtl_size = */ 4096,
- /* msgtl_number = */ 1,
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_host_kernel_version(In0P->Head.msgh_request_port, OutP->kernel_version);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 556;
-
- OutP->kernel_versionType = kernel_versionType;
-}
-
-/* Routine thread_priority */
-mig_internal void _Xthread_priority
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t priorityType;
- int priority;
- mach_msg_type_t set_maxType;
- boolean_t set_max;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_thread_priority
- (mach_port_t thread, int priority, boolean_t set_max);
-
- auto const mach_msg_type_t priorityCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t set_maxCheck = {
- /* msgt_name = */ 0,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->priorityType, &priorityCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->set_maxType, &set_maxCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_thread_priority(In0P->Head.msgh_request_port, In0P->priority, In0P->set_max);
-}
-
-/* Routine thread_max_priority */
-mig_internal void _Xthread_max_priority
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t processor_setType;
- mach_port_t processor_set;
- mach_msg_type_t max_priorityType;
- int max_priority;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_thread_max_priority
- (mach_port_t thread, mach_port_t processor_set, int max_priority);
-
- auto const mach_msg_type_t processor_setCheck = {
- /* msgt_name = */ 17,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t max_priorityCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->processor_setType, &processor_setCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->max_priorityType, &max_priorityCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_thread_max_priority(In0P->Head.msgh_request_port, In0P->processor_set, In0P->max_priority);
-}
-
-/* Routine task_priority */
-mig_internal void _Xtask_priority
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t priorityType;
- int priority;
- mach_msg_type_t change_threadsType;
- boolean_t change_threads;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_task_priority
- (mach_port_t task, int priority, boolean_t change_threads);
-
- auto const mach_msg_type_t priorityCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t change_threadsCheck = {
- /* msgt_name = */ 0,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->priorityType, &priorityCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->change_threadsType, &change_threadsCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_task_priority(In0P->Head.msgh_request_port, In0P->priority, In0P->change_threads);
-}
-
-/* Routine processor_set_max_priority */
-mig_internal void _Xprocessor_set_max_priority
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t max_priorityType;
- int max_priority;
- mach_msg_type_t change_threadsType;
- boolean_t change_threads;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_processor_set_max_priority
- (mach_port_t processor_set, int max_priority, boolean_t change_threads);
-
- auto const mach_msg_type_t max_priorityCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t change_threadsCheck = {
- /* msgt_name = */ 0,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->max_priorityType, &max_priorityCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->change_threadsType, &change_threadsCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_processor_set_max_priority(In0P->Head.msgh_request_port, In0P->max_priority, In0P->change_threads);
-}
-
-/* Routine thread_policy */
-mig_internal void _Xthread_policy
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t policyType;
- int policy;
- mach_msg_type_t dataType;
- int data;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_thread_policy
- (mach_port_t thread, int policy, int data);
-
- auto const mach_msg_type_t policyCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t dataCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->policyType, &policyCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->dataType, &dataCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_thread_policy(In0P->Head.msgh_request_port, In0P->policy, In0P->data);
-}
-
-/* Routine processor_set_policy_enable */
-mig_internal void _Xprocessor_set_policy_enable
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t policyType;
- int policy;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_processor_set_policy_enable
- (mach_port_t processor_set, int policy);
-
- auto const mach_msg_type_t policyCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->policyType, &policyCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_processor_set_policy_enable(In0P->Head.msgh_request_port, In0P->policy);
-}
-
-/* Routine processor_set_policy_disable */
-mig_internal void _Xprocessor_set_policy_disable
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t policyType;
- int policy;
- mach_msg_type_t change_threadsType;
- boolean_t change_threads;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_processor_set_policy_disable
- (mach_port_t processor_set, int policy, boolean_t change_threads);
-
- auto const mach_msg_type_t policyCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t change_threadsCheck = {
- /* msgt_name = */ 0,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->policyType, &policyCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->change_threadsType, &change_threadsCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_processor_set_policy_disable(In0P->Head.msgh_request_port, In0P->policy, In0P->change_threads);
-}
-
-/* Routine processor_set_tasks */
-mig_internal void _Xprocessor_set_tasks
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_long_t task_listType;
- task_array_t task_list;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_processor_set_tasks
- (mach_port_t processor_set, task_array_t *task_list, mach_msg_type_number_t *task_listCnt);
-
- auto const mach_msg_type_long_t task_listType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ FALSE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ TRUE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 19,
- /* msgtl_size = */ 32,
- /* msgtl_number = */ 0,
- };
-
- mach_msg_type_number_t task_listCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_processor_set_tasks(In0P->Head.msgh_request_port, &OutP->task_list, &task_listCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
- OutP->Head.msgh_size = 48;
-
- OutP->task_listType = task_listType;
-
- OutP->task_listType.msgtl_number = task_listCnt;
-}
-
-/* Routine processor_set_threads */
-mig_internal void _Xprocessor_set_threads
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_long_t thread_listType;
- thread_array_t thread_list;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_processor_set_threads
- (mach_port_t processor_set, thread_array_t *thread_list, mach_msg_type_number_t *thread_listCnt);
-
- auto const mach_msg_type_long_t thread_listType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ FALSE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 19,
- /* msgtl_size = */ 32,
- /* msgtl_number = */ 0,
- };
-
- mach_msg_type_number_t thread_listCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_processor_set_threads(In0P->Head.msgh_request_port, &OutP->thread_list, &thread_listCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
- OutP->Head.msgh_size = 48;
-
- OutP->thread_listType = thread_listType;
-
- OutP->thread_listType.msgtl_number = thread_listCnt;
-}
-
-/* Routine host_processor_sets */
-mig_internal void _Xhost_processor_sets
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_long_t processor_setsType;
- processor_set_name_array_t processor_sets;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_host_processor_sets
- (mach_port_t host, processor_set_name_array_t *processor_sets, mach_msg_type_number_t *processor_setsCnt);
-
- auto const mach_msg_type_long_t processor_setsType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ FALSE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 19,
- /* msgtl_size = */ 32,
- /* msgtl_number = */ 0,
- };
-
- mach_msg_type_number_t processor_setsCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_host_processor_sets(In0P->Head.msgh_request_port, &OutP->processor_sets, &processor_setsCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
- OutP->Head.msgh_size = 48;
-
- OutP->processor_setsType = processor_setsType;
-
- OutP->processor_setsType.msgtl_number = processor_setsCnt;
-}
-
-/* Routine host_processor_set_priv */
-mig_internal void _Xhost_processor_set_priv
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t set_nameType;
- mach_port_t set_name;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t setType;
- mach_port_t set;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_host_processor_set_priv
- (mach_port_t host_priv, mach_port_t set_name, mach_port_t *set, mach_msg_type_name_t *setPoly);
-
- boolean_t msgh_simple;
- auto const mach_msg_type_t set_nameCheck = {
- /* msgt_name = */ 17,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t setType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- mach_msg_type_name_t setPoly;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->set_nameType, &set_nameCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_host_processor_set_priv(In0P->Head.msgh_request_port, In0P->set_name, &OutP->set, &setPoly);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- msgh_simple = TRUE;
- OutP->Head.msgh_size = 40;
-
- OutP->setType = setType;
-
- if (MACH_MSG_TYPE_PORT_ANY(setPoly))
- msgh_simple = FALSE;
-
- OutP->setType.msgt_name = setPoly;
-
- if (!msgh_simple)
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-}
-
-/* Routine thread_depress_abort */
-mig_internal void _Xthread_depress_abort
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_thread_depress_abort
- (mach_port_t thread);
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_thread_depress_abort(In0P->Head.msgh_request_port);
-}
-
-/* Routine host_set_time */
-mig_internal void _Xhost_set_time
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t new_timeType;
- time_value_t new_time;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_host_set_time
- (mach_port_t host_priv, time_value_t new_time);
-
- auto const mach_msg_type_t new_timeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 2,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 36) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->new_timeType, &new_timeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_host_set_time(In0P->Head.msgh_request_port, In0P->new_time);
-}
-
-/* Routine host_adjust_time */
-mig_internal void _Xhost_adjust_time
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t new_adjustmentType;
- time_value_t new_adjustment;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t old_adjustmentType;
- time_value_t old_adjustment;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_host_adjust_time
- (mach_port_t host_priv, time_value_t new_adjustment, time_value_t *old_adjustment);
-
- auto const mach_msg_type_t new_adjustmentCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 2,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t old_adjustmentType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 2,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 36) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->new_adjustmentType, &new_adjustmentCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_host_adjust_time(In0P->Head.msgh_request_port, In0P->new_adjustment, &OutP->old_adjustment);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 44;
-
- OutP->old_adjustmentType = old_adjustmentType;
-}
-
-/* Routine host_get_time */
-mig_internal void _Xhost_get_time
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t current_timeType;
- time_value_t current_time;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_host_get_time
- (mach_port_t host, time_value_t *current_time);
-
- auto const mach_msg_type_t current_timeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 2,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_host_get_time(In0P->Head.msgh_request_port, &OutP->current_time);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 44;
-
- OutP->current_timeType = current_timeType;
-}
-
-/* Routine host_reboot */
-mig_internal void _Xhost_reboot
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t optionsType;
- int options;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_host_reboot
- (mach_port_t host_priv, int options);
-
- auto const mach_msg_type_t optionsCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->optionsType, &optionsCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_host_reboot(In0P->Head.msgh_request_port, In0P->options);
-}
-
-/* Routine vm_wire */
-mig_internal void _Xvm_wire
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t taskType;
- mach_port_t task;
- mach_msg_type_t addressType;
- vm_address_t address;
- mach_msg_type_t sizeType;
- vm_size_t size;
- mach_msg_type_t accessType;
- vm_prot_t access;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_vm_wire
- (mach_port_t host_priv, mach_port_t task, vm_address_t address, vm_size_t size, vm_prot_t access);
-
- auto const mach_msg_type_t taskCheck = {
- /* msgt_name = */ 17,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t addressCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t sizeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t accessCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 56) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->taskType, &taskCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->addressType, &addressCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->sizeType, &sizeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->accessType, &accessCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_vm_wire(In0P->Head.msgh_request_port, In0P->task, In0P->address, In0P->size, In0P->access);
-}
-
-/* Routine thread_wire */
-mig_internal void _Xthread_wire
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t threadType;
- mach_port_t thread;
- mach_msg_type_t wiredType;
- boolean_t wired;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_thread_wire
- (mach_port_t host_priv, mach_port_t thread, boolean_t wired);
-
- auto const mach_msg_type_t threadCheck = {
- /* msgt_name = */ 17,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t wiredCheck = {
- /* msgt_name = */ 0,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->threadType, &threadCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->wiredType, &wiredCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_thread_wire(In0P->Head.msgh_request_port, In0P->thread, In0P->wired);
-}
-
-/* Routine host_info */
-mig_internal void _Xhost_info
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t flavorType;
- int flavor;
- mach_msg_type_t host_info_outCntType;
- mach_msg_type_number_t host_info_outCnt;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t host_info_outType;
- natural_t host_info_out[1024];
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_host_info
- (mach_port_t host, int flavor, host_info_t host_info_out, mach_msg_type_number_t *host_info_outCnt);
-
- auto const mach_msg_type_t flavorCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t host_info_outCntCheck = {
- /* msgt_name = */ MACH_MSG_TYPE_INTEGER_32,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t host_info_outType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1024,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- mach_msg_type_number_t host_info_outCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->flavorType, &flavorCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->host_info_outCntType, &host_info_outCntCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- host_info_outCnt = 1024;
- if (In0P->host_info_outCnt < host_info_outCnt)
- host_info_outCnt = In0P->host_info_outCnt;
-
- OutP->RetCode = S_host_info(In0P->Head.msgh_request_port, In0P->flavor, OutP->host_info_out, &host_info_outCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->host_info_outType = host_info_outType;
-
- OutP->host_info_outType.msgt_number = host_info_outCnt;
- OutP->Head.msgh_size = 36 + (4 * host_info_outCnt);
-}
-
-/* Routine processor_info */
-mig_internal void _Xprocessor_info
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t flavorType;
- int flavor;
- mach_msg_type_t processor_info_outCntType;
- mach_msg_type_number_t processor_info_outCnt;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t hostType;
- mach_port_t host;
- mach_msg_type_t processor_info_outType;
- natural_t processor_info_out[1024];
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_processor_info
- (mach_port_t processor, int flavor, mach_port_t *host, processor_info_t processor_info_out, mach_msg_type_number_t *processor_info_outCnt);
-
- auto const mach_msg_type_t flavorCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t processor_info_outCntCheck = {
- /* msgt_name = */ MACH_MSG_TYPE_INTEGER_32,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t hostType = {
- /* msgt_name = */ 19,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t processor_info_outType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1024,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- mach_msg_type_number_t processor_info_outCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->flavorType, &flavorCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->processor_info_outCntType, &processor_info_outCntCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- processor_info_outCnt = 1024;
- if (In0P->processor_info_outCnt < processor_info_outCnt)
- processor_info_outCnt = In0P->processor_info_outCnt;
-
- OutP->RetCode = S_processor_info(In0P->Head.msgh_request_port, In0P->flavor, &OutP->host, OutP->processor_info_out, &processor_info_outCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-
- OutP->hostType = hostType;
-
- OutP->processor_info_outType = processor_info_outType;
-
- OutP->processor_info_outType.msgt_number = processor_info_outCnt;
- OutP->Head.msgh_size = 44 + (4 * processor_info_outCnt);
-}
-
-/* Routine processor_set_info */
-mig_internal void _Xprocessor_set_info
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t flavorType;
- int flavor;
- mach_msg_type_t info_outCntType;
- mach_msg_type_number_t info_outCnt;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t hostType;
- mach_port_t host;
- mach_msg_type_t info_outType;
- natural_t info_out[1024];
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_processor_set_info
- (mach_port_t set_name, int flavor, mach_port_t *host, processor_set_info_t info_out, mach_msg_type_number_t *info_outCnt);
-
- auto const mach_msg_type_t flavorCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t info_outCntCheck = {
- /* msgt_name = */ MACH_MSG_TYPE_INTEGER_32,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t hostType = {
- /* msgt_name = */ 19,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t info_outType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1024,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- mach_msg_type_number_t info_outCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->flavorType, &flavorCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->info_outCntType, &info_outCntCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- info_outCnt = 1024;
- if (In0P->info_outCnt < info_outCnt)
- info_outCnt = In0P->info_outCnt;
-
- OutP->RetCode = S_processor_set_info(In0P->Head.msgh_request_port, In0P->flavor, &OutP->host, OutP->info_out, &info_outCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-
- OutP->hostType = hostType;
-
- OutP->info_outType = info_outType;
-
- OutP->info_outType.msgt_number = info_outCnt;
- OutP->Head.msgh_size = 44 + (4 * info_outCnt);
-}
-
-/* Routine processor_control */
-mig_internal void _Xprocessor_control
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t processor_cmdType;
- natural_t processor_cmd[1024];
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_processor_control
- (mach_port_t processor, processor_info_t processor_cmd, mach_msg_type_number_t processor_cmdCnt);
-
- unsigned int msgh_size;
-
-#if TypeCheck
- msgh_size = In0P->Head.msgh_size;
- if ((msgh_size < 28) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->processor_cmdType.msgt_inline != TRUE) ||
- (In0P->processor_cmdType.msgt_longform != FALSE) ||
- (In0P->processor_cmdType.msgt_name != 2) ||
- (In0P->processor_cmdType.msgt_size != 32))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (msgh_size != 28 + (4 * In0P->processor_cmdType.msgt_number))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_processor_control(In0P->Head.msgh_request_port, In0P->processor_cmd, In0P->processor_cmdType.msgt_number);
-}
-
-/* Routine host_get_boot_info */
-mig_internal void _Xhost_get_boot_info
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_long_t boot_infoType;
- kernel_boot_info_t boot_info;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_host_get_boot_info
- (mach_port_t host_priv, kernel_boot_info_t boot_info);
-
- auto const mach_msg_type_long_t boot_infoType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 12,
- /* msgtl_size = */ 32768,
- /* msgtl_number = */ 1,
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_host_get_boot_info(In0P->Head.msgh_request_port, OutP->boot_info);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 4140;
-
- OutP->boot_infoType = boot_infoType;
-}
-
-static mig_routine_t mach_host_server_routines[] = {
- _Xhost_processors,
- _Xyyy_host_info,
- _Xyyy_processor_info,
- _Xprocessor_start,
- _Xprocessor_exit,
- _Xyyy_processor_control,
- _Xprocessor_set_default,
- _Xxxx_processor_set_default_priv,
- _Xprocessor_set_create,
- _Xprocessor_set_destroy,
- _Xyyy_processor_set_info,
- _Xprocessor_assign,
- _Xprocessor_get_assignment,
- _Xthread_assign,
- _Xthread_assign_default,
- _Xthread_get_assignment,
- _Xtask_assign,
- _Xtask_assign_default,
- _Xtask_get_assignment,
- _Xhost_kernel_version,
- _Xthread_priority,
- _Xthread_max_priority,
- _Xtask_priority,
- _Xprocessor_set_max_priority,
- _Xthread_policy,
- _Xprocessor_set_policy_enable,
- _Xprocessor_set_policy_disable,
- _Xprocessor_set_tasks,
- _Xprocessor_set_threads,
- _Xhost_processor_sets,
- _Xhost_processor_set_priv,
- _Xthread_depress_abort,
- _Xhost_set_time,
- _Xhost_adjust_time,
- _Xhost_get_time,
- _Xhost_reboot,
- _Xvm_wire,
- _Xthread_wire,
- _Xhost_info,
- _Xprocessor_info,
- _Xprocessor_set_info,
- _Xprocessor_control,
- _Xhost_get_boot_info,
-};
-
-mig_external boolean_t mach_host_server
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- register mach_msg_header_t *InP = InHeadP;
- register mig_reply_header_t *OutP = (mig_reply_header_t *) OutHeadP;
-
- auto const mach_msg_type_t RetCodeType = {
- /* msgt_name = */ MACH_MSG_TYPE_INTEGER_32,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- register mig_routine_t routine;
-
- OutP->Head.msgh_bits = MACH_MSGH_BITS(MACH_MSGH_BITS_REPLY(InP->msgh_bits), 0);
- OutP->Head.msgh_size = sizeof *OutP;
- OutP->Head.msgh_remote_port = InP->msgh_reply_port;
- OutP->Head.msgh_local_port = MACH_PORT_NULL;
- OutP->Head.msgh_seqno = 0;
- OutP->Head.msgh_id = InP->msgh_id + 100;
-
- OutP->RetCodeType = RetCodeType;
-
- if ((InP->msgh_id > 2642) || (InP->msgh_id < 2600) ||
- ((routine = mach_host_server_routines[InP->msgh_id - 2600]) == 0)) {
- OutP->RetCode = MIG_BAD_ID;
- return FALSE;
- }
- (*routine) (InP, &OutP->Head);
- return TRUE;
-}
-
-mig_external mig_routine_t mach_host_server_routine
- (const mach_msg_header_t *InHeadP)
-{
- register int msgh_id;
-
- msgh_id = InHeadP->msgh_id - 2600;
-
- if ((msgh_id > 42) || (msgh_id < 0))
- return 0;
-
- return mach_host_server_routines[msgh_id];
-}
-
diff --git a/boot.backup1/ourmach_portServer.c b/boot.backup1/ourmach_portServer.c
deleted file mode 100644
index 202f2511..00000000
--- a/boot.backup1/ourmach_portServer.c
+++ /dev/null
@@ -1,1413 +0,0 @@
-/* Module mach_port */
-
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE 1
-#endif
-
-#define EXPORT_BOOLEAN
-#include <mach/boolean.h>
-#include <mach/kern_return.h>
-#include <mach/message.h>
-#include <mach/mig_errors.h>
-#include <mach/mig_support.h>
-
-#ifndef mig_internal
-#define mig_internal static
-#endif
-
-#ifndef mig_external
-#define mig_external
-#endif
-
-#ifndef TypeCheck
-#define TypeCheck 1
-#endif
-
-#ifndef UseExternRCSId
-#define UseExternRCSId 1
-#endif
-
-#define BAD_TYPECHECK(type, check) ({\
- union { mach_msg_type_t t; unsigned32_t w; } _t, _c;\
- _t.t = *(type); _c.t = *(check); _t.w != _c.w; })
-#define msgh_request_port msgh_local_port
-#define MACH_MSGH_BITS_REQUEST(bits) MACH_MSGH_BITS_LOCAL(bits)
-#define msgh_reply_port msgh_remote_port
-#define MACH_MSGH_BITS_REPLY(bits) MACH_MSGH_BITS_REMOTE(bits)
-
-#include <mach/std_types.h>
-#include <mach/mach_types.h>
-
-/* Routine mach_port_names */
-mig_internal void _Xmach_port_names
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_long_t namesType;
- mach_port_array_t names;
- mach_msg_type_long_t typesType;
- mach_port_type_array_t types;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_mach_port_names
- (mach_port_t task, mach_port_array_t *names, mach_msg_type_number_t *namesCnt, mach_port_type_array_t *types, mach_msg_type_number_t *typesCnt);
-
- auto const mach_msg_type_long_t namesType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ FALSE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ TRUE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 15,
- /* msgtl_size = */ 32,
- /* msgtl_number = */ 0,
- };
-
- auto const mach_msg_type_long_t typesType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ FALSE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ TRUE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 2,
- /* msgtl_size = */ 32,
- /* msgtl_number = */ 0,
- };
-
- mach_msg_type_number_t namesCnt;
- mach_msg_type_number_t typesCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_mach_port_names(In0P->Head.msgh_request_port, &OutP->names, &namesCnt, &OutP->types, &typesCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
- OutP->Head.msgh_size = 64;
-
- OutP->namesType = namesType;
-
- OutP->namesType.msgtl_number = namesCnt;
-
- OutP->typesType = typesType;
-
- OutP->typesType.msgtl_number = typesCnt;
-}
-
-/* Routine mach_port_type */
-mig_internal void _Xmach_port_type
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t nameType;
- mach_port_t name;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t ptypeType;
- mach_port_type_t ptype;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_mach_port_type
- (mach_port_t task, mach_port_t name, mach_port_type_t *ptype);
-
- auto const mach_msg_type_t nameCheck = {
- /* msgt_name = */ 15,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t ptypeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->nameType, &nameCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_mach_port_type(In0P->Head.msgh_request_port, In0P->name, &OutP->ptype);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 40;
-
- OutP->ptypeType = ptypeType;
-}
-
-/* Routine mach_port_rename */
-mig_internal void _Xmach_port_rename
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t old_nameType;
- mach_port_t old_name;
- mach_msg_type_t new_nameType;
- mach_port_t new_name;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_mach_port_rename
- (mach_port_t task, mach_port_t old_name, mach_port_t new_name);
-
- auto const mach_msg_type_t old_nameCheck = {
- /* msgt_name = */ 15,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t new_nameCheck = {
- /* msgt_name = */ 15,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->old_nameType, &old_nameCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->new_nameType, &new_nameCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_mach_port_rename(In0P->Head.msgh_request_port, In0P->old_name, In0P->new_name);
-}
-
-/* Routine mach_port_allocate_name */
-mig_internal void _Xmach_port_allocate_name
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t rightType;
- mach_port_right_t right;
- mach_msg_type_t nameType;
- mach_port_t name;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_mach_port_allocate_name
- (mach_port_t task, mach_port_right_t right, mach_port_t name);
-
- auto const mach_msg_type_t rightCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t nameCheck = {
- /* msgt_name = */ 15,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->rightType, &rightCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->nameType, &nameCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_mach_port_allocate_name(In0P->Head.msgh_request_port, In0P->right, In0P->name);
-}
-
-/* Routine mach_port_allocate */
-mig_internal void _Xmach_port_allocate
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t rightType;
- mach_port_right_t right;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t nameType;
- mach_port_t name;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_mach_port_allocate
- (mach_port_t task, mach_port_right_t right, mach_port_t *name);
-
- auto const mach_msg_type_t rightCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t nameType = {
- /* msgt_name = */ 15,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->rightType, &rightCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_mach_port_allocate(In0P->Head.msgh_request_port, In0P->right, &OutP->name);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 40;
-
- OutP->nameType = nameType;
-}
-
-/* Routine mach_port_destroy */
-mig_internal void _Xmach_port_destroy
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t nameType;
- mach_port_t name;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_mach_port_destroy
- (mach_port_t task, mach_port_t name);
-
- auto const mach_msg_type_t nameCheck = {
- /* msgt_name = */ 15,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->nameType, &nameCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_mach_port_destroy(In0P->Head.msgh_request_port, In0P->name);
-}
-
-/* Routine mach_port_deallocate */
-mig_internal void _Xmach_port_deallocate
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t nameType;
- mach_port_t name;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_mach_port_deallocate
- (mach_port_t task, mach_port_t name);
-
- auto const mach_msg_type_t nameCheck = {
- /* msgt_name = */ 15,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->nameType, &nameCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_mach_port_deallocate(In0P->Head.msgh_request_port, In0P->name);
-}
-
-/* Routine mach_port_get_refs */
-mig_internal void _Xmach_port_get_refs
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t nameType;
- mach_port_t name;
- mach_msg_type_t rightType;
- mach_port_right_t right;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t refsType;
- mach_port_urefs_t refs;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_mach_port_get_refs
- (mach_port_t task, mach_port_t name, mach_port_right_t right, mach_port_urefs_t *refs);
-
- auto const mach_msg_type_t nameCheck = {
- /* msgt_name = */ 15,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t rightCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t refsType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->nameType, &nameCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->rightType, &rightCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_mach_port_get_refs(In0P->Head.msgh_request_port, In0P->name, In0P->right, &OutP->refs);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 40;
-
- OutP->refsType = refsType;
-}
-
-/* Routine mach_port_mod_refs */
-mig_internal void _Xmach_port_mod_refs
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t nameType;
- mach_port_t name;
- mach_msg_type_t rightType;
- mach_port_right_t right;
- mach_msg_type_t deltaType;
- mach_port_delta_t delta;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_mach_port_mod_refs
- (mach_port_t task, mach_port_t name, mach_port_right_t right, mach_port_delta_t delta);
-
- auto const mach_msg_type_t nameCheck = {
- /* msgt_name = */ 15,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t rightCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t deltaCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 48) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->nameType, &nameCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->rightType, &rightCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->deltaType, &deltaCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_mach_port_mod_refs(In0P->Head.msgh_request_port, In0P->name, In0P->right, In0P->delta);
-}
-
-/* Routine old_mach_port_get_receive_status */
-mig_internal void _Xold_mach_port_get_receive_status
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t nameType;
- mach_port_t name;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t statusType;
- old_mach_port_status_t status;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_old_mach_port_get_receive_status
- (mach_port_t task, mach_port_t name, old_mach_port_status_t *status);
-
- auto const mach_msg_type_t nameCheck = {
- /* msgt_name = */ 15,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t statusType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 8,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->nameType, &nameCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_old_mach_port_get_receive_status(In0P->Head.msgh_request_port, In0P->name, &OutP->status);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 68;
-
- OutP->statusType = statusType;
-}
-
-/* Routine mach_port_set_qlimit */
-mig_internal void _Xmach_port_set_qlimit
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t nameType;
- mach_port_t name;
- mach_msg_type_t qlimitType;
- mach_port_msgcount_t qlimit;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_mach_port_set_qlimit
- (mach_port_t task, mach_port_t name, mach_port_msgcount_t qlimit);
-
- auto const mach_msg_type_t nameCheck = {
- /* msgt_name = */ 15,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t qlimitCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->nameType, &nameCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->qlimitType, &qlimitCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_mach_port_set_qlimit(In0P->Head.msgh_request_port, In0P->name, In0P->qlimit);
-}
-
-/* Routine mach_port_set_mscount */
-mig_internal void _Xmach_port_set_mscount
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t nameType;
- mach_port_t name;
- mach_msg_type_t mscountType;
- mach_port_mscount_t mscount;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_mach_port_set_mscount
- (mach_port_t task, mach_port_t name, mach_port_mscount_t mscount);
-
- auto const mach_msg_type_t nameCheck = {
- /* msgt_name = */ 15,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t mscountCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->nameType, &nameCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->mscountType, &mscountCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_mach_port_set_mscount(In0P->Head.msgh_request_port, In0P->name, In0P->mscount);
-}
-
-/* Routine mach_port_get_set_status */
-mig_internal void _Xmach_port_get_set_status
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t nameType;
- mach_port_t name;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_long_t membersType;
- mach_port_array_t members;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_mach_port_get_set_status
- (mach_port_t task, mach_port_t name, mach_port_array_t *members, mach_msg_type_number_t *membersCnt);
-
- auto const mach_msg_type_t nameCheck = {
- /* msgt_name = */ 15,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_long_t membersType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ FALSE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ TRUE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 15,
- /* msgtl_size = */ 32,
- /* msgtl_number = */ 0,
- };
-
- mach_msg_type_number_t membersCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->nameType, &nameCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_mach_port_get_set_status(In0P->Head.msgh_request_port, In0P->name, &OutP->members, &membersCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
- OutP->Head.msgh_size = 48;
-
- OutP->membersType = membersType;
-
- OutP->membersType.msgtl_number = membersCnt;
-}
-
-/* Routine mach_port_move_member */
-mig_internal void _Xmach_port_move_member
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t memberType;
- mach_port_t member;
- mach_msg_type_t afterType;
- mach_port_t after;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_mach_port_move_member
- (mach_port_t task, mach_port_t member, mach_port_t after);
-
- auto const mach_msg_type_t memberCheck = {
- /* msgt_name = */ 15,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t afterCheck = {
- /* msgt_name = */ 15,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->memberType, &memberCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->afterType, &afterCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_mach_port_move_member(In0P->Head.msgh_request_port, In0P->member, In0P->after);
-}
-
-/* Routine mach_port_request_notification */
-mig_internal void _Xmach_port_request_notification
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t nameType;
- mach_port_t name;
- mach_msg_type_t idType;
- mach_msg_id_t id;
- mach_msg_type_t syncType;
- mach_port_mscount_t sync;
- mach_msg_type_t notifyType;
- mach_port_t notify;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t previousType;
- mach_port_t previous;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_mach_port_request_notification
- (mach_port_t task, mach_port_t name, mach_msg_id_t id, mach_port_mscount_t sync, mach_port_t notify, mach_port_t *previous, mach_msg_type_name_t *previousPoly);
-
- boolean_t msgh_simple;
- auto const mach_msg_type_t nameCheck = {
- /* msgt_name = */ 15,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t idCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t syncCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t notifyCheck = {
- /* msgt_name = */ 18,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t previousType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- mach_msg_type_name_t previousPoly;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 56) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->nameType, &nameCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->idType, &idCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->syncType, &syncCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->notifyType, &notifyCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_mach_port_request_notification(In0P->Head.msgh_request_port, In0P->name, In0P->id, In0P->sync, In0P->notify, &OutP->previous, &previousPoly);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- msgh_simple = TRUE;
- OutP->Head.msgh_size = 40;
-
- OutP->previousType = previousType;
-
- if (MACH_MSG_TYPE_PORT_ANY(previousPoly))
- msgh_simple = FALSE;
-
- OutP->previousType.msgt_name = previousPoly;
-
- if (!msgh_simple)
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-}
-
-/* Routine mach_port_insert_right */
-mig_internal void _Xmach_port_insert_right
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t nameType;
- mach_port_t name;
- mach_msg_type_t polyType;
- mach_port_t poly;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_mach_port_insert_right
- (mach_port_t task, mach_port_t name, mach_port_t poly, mach_msg_type_name_t polyPoly);
-
-#if TypeCheck
- boolean_t msgh_simple;
-#endif /* TypeCheck */
-
- auto const mach_msg_type_t nameCheck = {
- /* msgt_name = */ 15,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- msgh_simple = !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX);
- if ((In0P->Head.msgh_size != 40))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->nameType, &nameCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->polyType.msgt_inline != TRUE) ||
- (In0P->polyType.msgt_longform != FALSE) ||
- (MACH_MSG_TYPE_PORT_ANY(In0P->polyType.msgt_name) && msgh_simple) ||
- (In0P->polyType.msgt_number != 1) ||
- (In0P->polyType.msgt_size != 32))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_mach_port_insert_right(In0P->Head.msgh_request_port, In0P->name, In0P->poly, In0P->polyType.msgt_name);
-}
-
-/* Routine mach_port_extract_right */
-mig_internal void _Xmach_port_extract_right
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t nameType;
- mach_port_t name;
- mach_msg_type_t msgt_nameType;
- mach_msg_type_name_t msgt_name;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t polyType;
- mach_port_t poly;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_mach_port_extract_right
- (mach_port_t task, mach_port_t name, mach_msg_type_name_t msgt_name, mach_port_t *poly, mach_msg_type_name_t *polyPoly);
-
- boolean_t msgh_simple;
- auto const mach_msg_type_t nameCheck = {
- /* msgt_name = */ 15,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t msgt_nameCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t polyType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- mach_msg_type_name_t polyPoly;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->nameType, &nameCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->msgt_nameType, &msgt_nameCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_mach_port_extract_right(In0P->Head.msgh_request_port, In0P->name, In0P->msgt_name, &OutP->poly, &polyPoly);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- msgh_simple = TRUE;
- OutP->Head.msgh_size = 40;
-
- OutP->polyType = polyType;
-
- if (MACH_MSG_TYPE_PORT_ANY(polyPoly))
- msgh_simple = FALSE;
-
- OutP->polyType.msgt_name = polyPoly;
-
- if (!msgh_simple)
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-}
-
-/* Routine mach_port_get_receive_status */
-mig_internal void _Xmach_port_get_receive_status
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t nameType;
- mach_port_t name;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t statusType;
- mach_port_status_t status;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_mach_port_get_receive_status
- (mach_port_t task, mach_port_t name, mach_port_status_t *status);
-
- auto const mach_msg_type_t nameCheck = {
- /* msgt_name = */ 15,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t statusType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 9,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->nameType, &nameCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_mach_port_get_receive_status(In0P->Head.msgh_request_port, In0P->name, &OutP->status);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 72;
-
- OutP->statusType = statusType;
-}
-
-/* Routine mach_port_set_seqno */
-mig_internal void _Xmach_port_set_seqno
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t nameType;
- mach_port_t name;
- mach_msg_type_t seqnoType;
- mach_port_seqno_t seqno;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_mach_port_set_seqno
- (mach_port_t task, mach_port_t name, mach_port_seqno_t seqno);
-
- auto const mach_msg_type_t nameCheck = {
- /* msgt_name = */ 15,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t seqnoCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->nameType, &nameCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->seqnoType, &seqnoCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_mach_port_set_seqno(In0P->Head.msgh_request_port, In0P->name, In0P->seqno);
-}
-
-static mig_routine_t mach_port_server_routines[] = {
- _Xmach_port_names,
- _Xmach_port_type,
- _Xmach_port_rename,
- _Xmach_port_allocate_name,
- _Xmach_port_allocate,
- _Xmach_port_destroy,
- _Xmach_port_deallocate,
- _Xmach_port_get_refs,
- _Xmach_port_mod_refs,
- _Xold_mach_port_get_receive_status,
- _Xmach_port_set_qlimit,
- _Xmach_port_set_mscount,
- _Xmach_port_get_set_status,
- _Xmach_port_move_member,
- _Xmach_port_request_notification,
- _Xmach_port_insert_right,
- _Xmach_port_extract_right,
- _Xmach_port_get_receive_status,
- _Xmach_port_set_seqno,
-};
-
-mig_external boolean_t mach_port_server
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- register mach_msg_header_t *InP = InHeadP;
- register mig_reply_header_t *OutP = (mig_reply_header_t *) OutHeadP;
-
- auto const mach_msg_type_t RetCodeType = {
- /* msgt_name = */ MACH_MSG_TYPE_INTEGER_32,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- register mig_routine_t routine;
-
- OutP->Head.msgh_bits = MACH_MSGH_BITS(MACH_MSGH_BITS_REPLY(InP->msgh_bits), 0);
- OutP->Head.msgh_size = sizeof *OutP;
- OutP->Head.msgh_remote_port = InP->msgh_reply_port;
- OutP->Head.msgh_local_port = MACH_PORT_NULL;
- OutP->Head.msgh_seqno = 0;
- OutP->Head.msgh_id = InP->msgh_id + 100;
-
- OutP->RetCodeType = RetCodeType;
-
- if ((InP->msgh_id > 3218) || (InP->msgh_id < 3200) ||
- ((routine = mach_port_server_routines[InP->msgh_id - 3200]) == 0)) {
- OutP->RetCode = MIG_BAD_ID;
- return FALSE;
- }
- (*routine) (InP, &OutP->Head);
- return TRUE;
-}
-
-mig_external mig_routine_t mach_port_server_routine
- (const mach_msg_header_t *InHeadP)
-{
- register int msgh_id;
-
- msgh_id = InHeadP->msgh_id - 3200;
-
- if ((msgh_id > 18) || (msgh_id < 0))
- return 0;
-
- return mach_port_server_routines[msgh_id];
-}
-
diff --git a/boot.backup1/termServer.c b/boot.backup1/termServer.c
deleted file mode 100644
index b24b3157..00000000
--- a/boot.backup1/termServer.c
+++ /dev/null
@@ -1,701 +0,0 @@
-/* Module term */
-
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE 1
-#endif
-
-#define EXPORT_BOOLEAN
-#include <mach/boolean.h>
-#include <mach/kern_return.h>
-#include <mach/message.h>
-#include <mach/mig_errors.h>
-#include <mach/mig_support.h>
-
-#ifndef mig_internal
-#define mig_internal static
-#endif
-
-#ifndef mig_external
-#define mig_external
-#endif
-
-#ifndef TypeCheck
-#define TypeCheck 1
-#endif
-
-#ifndef UseExternRCSId
-#define UseExternRCSId 1
-#endif
-
-#define BAD_TYPECHECK(type, check) ({\
- union { mach_msg_type_t t; unsigned32_t w; } _t, _c;\
- _t.t = *(type); _c.t = *(check); _t.w != _c.w; })
-#define msgh_request_port msgh_local_port
-#define MACH_MSGH_BITS_REQUEST(bits) MACH_MSGH_BITS_LOCAL(bits)
-#define msgh_reply_port msgh_remote_port
-#define MACH_MSGH_BITS_REPLY(bits) MACH_MSGH_BITS_REMOTE(bits)
-
-#include <mach/std_types.h>
-#include <mach/mach_types.h>
-#include <device/device_types.h>
-#include <device/net_status.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/statfs.h>
-#include <sys/resource.h>
-#include <sys/utsname.h>
-#include <hurd/hurd_types.h>
-
-/* Routine term_getctty */
-mig_internal void _Xterm_getctty
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t cttyType;
- mach_port_t ctty;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_term_getctty
- (io_t terminal, mach_port_t *ctty, mach_msg_type_name_t *cttyPoly);
-
- boolean_t msgh_simple;
- auto const mach_msg_type_t cttyType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- mach_msg_type_name_t cttyPoly;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_term_getctty(In0P->Head.msgh_request_port, &OutP->ctty, &cttyPoly);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- msgh_simple = TRUE;
- OutP->Head.msgh_size = 40;
-
- OutP->cttyType = cttyType;
-
- if (MACH_MSG_TYPE_PORT_ANY(cttyPoly))
- msgh_simple = FALSE;
-
- OutP->cttyType.msgt_name = cttyPoly;
-
- if (!msgh_simple)
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-}
-
-/* Routine term_open_ctty */
-mig_internal void _Xterm_open_ctty
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t pidType;
- pid_t pid;
- mach_msg_type_t pgrpType;
- pid_t pgrp;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t newttyType;
- mach_port_t newtty;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_term_open_ctty
- (io_t terminal, pid_t pid, pid_t pgrp, mach_port_t *newtty, mach_msg_type_name_t *newttyPoly);
-
- boolean_t msgh_simple;
- auto const mach_msg_type_t pidCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t pgrpCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t newttyType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- mach_msg_type_name_t newttyPoly;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->pidType, &pidCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->pgrpType, &pgrpCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_term_open_ctty(In0P->Head.msgh_request_port, In0P->pid, In0P->pgrp, &OutP->newtty, &newttyPoly);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- msgh_simple = TRUE;
- OutP->Head.msgh_size = 40;
-
- OutP->newttyType = newttyType;
-
- if (MACH_MSG_TYPE_PORT_ANY(newttyPoly))
- msgh_simple = FALSE;
-
- OutP->newttyType.msgt_name = newttyPoly;
-
- if (!msgh_simple)
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-}
-
-/* Routine term_set_nodename */
-mig_internal void _Xterm_set_nodename
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t nameType;
- string_t name;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_term_set_nodename
- (io_t terminal, string_t name);
-
- auto const mach_msg_type_t nameCheck = {
- /* msgt_name = */ MACH_MSG_TYPE_STRING_C,
- /* msgt_size = */ 8,
- /* msgt_number = */ 1024,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 1052) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->nameType, &nameCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_term_set_nodename(In0P->Head.msgh_request_port, In0P->name);
-}
-
-/* Routine term_get_nodename */
-mig_internal void _Xterm_get_nodename
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t nameType;
- string_t name;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_term_get_nodename
- (io_t terminal, string_t name);
-
- auto const mach_msg_type_t nameType = {
- /* msgt_name = */ MACH_MSG_TYPE_STRING_C,
- /* msgt_size = */ 8,
- /* msgt_number = */ 1024,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_term_get_nodename(In0P->Head.msgh_request_port, OutP->name);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 1060;
-
- OutP->nameType = nameType;
-}
-
-/* Routine term_set_filenode */
-mig_internal void _Xterm_set_filenode
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t filenodeType;
- file_t filenode;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_term_set_filenode
- (io_t terminal, file_t filenode);
-
- auto const mach_msg_type_t filenodeCheck = {
- /* msgt_name = */ 17,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->filenodeType, &filenodeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_term_set_filenode(In0P->Head.msgh_request_port, In0P->filenode);
-}
-
-/* Routine term_get_bottom_type */
-mig_internal void _Xterm_get_bottom_type
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t ttypeType;
- int ttype;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_term_get_bottom_type
- (io_t terminal, int *ttype);
-
- auto const mach_msg_type_t ttypeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_term_get_bottom_type(In0P->Head.msgh_request_port, &OutP->ttype);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 40;
-
- OutP->ttypeType = ttypeType;
-}
-
-/* Routine term_on_machdev */
-mig_internal void _Xterm_on_machdev
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t machdevType;
- mach_port_t machdev;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_term_on_machdev
- (io_t terminal, mach_port_t machdev);
-
- auto const mach_msg_type_t machdevCheck = {
- /* msgt_name = */ 17,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->machdevType, &machdevCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_term_on_machdev(In0P->Head.msgh_request_port, In0P->machdev);
-}
-
-/* Routine term_on_hurddev */
-mig_internal void _Xterm_on_hurddev
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t hurddevType;
- io_t hurddev;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_term_on_hurddev
- (io_t terminal, io_t hurddev);
-
- auto const mach_msg_type_t hurddevCheck = {
- /* msgt_name = */ 17,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->hurddevType, &hurddevCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_term_on_hurddev(In0P->Head.msgh_request_port, In0P->hurddev);
-}
-
-/* Routine term_on_pty */
-mig_internal void _Xterm_on_pty
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t ptymasterType;
- io_t ptymaster;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_term_on_pty
- (io_t terminal, io_t *ptymaster);
-
- auto const mach_msg_type_t ptymasterType = {
- /* msgt_name = */ 19,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_term_on_pty(In0P->Head.msgh_request_port, &OutP->ptymaster);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
- OutP->Head.msgh_size = 40;
-
- OutP->ptymasterType = ptymasterType;
-}
-
-/* Routine termctty_open_terminal */
-mig_internal void _Xtermctty_open_terminal
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t flagsType;
- int flags;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t terminalType;
- mach_port_t terminal;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_termctty_open_terminal
- (mach_port_t ctty, int flags, mach_port_t *terminal, mach_msg_type_name_t *terminalPoly);
-
- boolean_t msgh_simple;
- auto const mach_msg_type_t flagsCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t terminalType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- mach_msg_type_name_t terminalPoly;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->flagsType, &flagsCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_termctty_open_terminal(In0P->Head.msgh_request_port, In0P->flags, &OutP->terminal, &terminalPoly);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- msgh_simple = TRUE;
- OutP->Head.msgh_size = 40;
-
- OutP->terminalType = terminalType;
-
- if (MACH_MSG_TYPE_PORT_ANY(terminalPoly))
- msgh_simple = FALSE;
-
- OutP->terminalType.msgt_name = terminalPoly;
-
- if (!msgh_simple)
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-}
-
-/* Routine term_get_peername */
-mig_internal void _Xterm_get_peername
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t nameType;
- string_t name;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_term_get_peername
- (io_t terminal, string_t name);
-
- auto const mach_msg_type_t nameType = {
- /* msgt_name = */ MACH_MSG_TYPE_STRING_C,
- /* msgt_size = */ 8,
- /* msgt_number = */ 1024,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_term_get_peername(In0P->Head.msgh_request_port, OutP->name);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 1060;
-
- OutP->nameType = nameType;
-}
-
-static mig_routine_t term_server_routines[] = {
- _Xterm_getctty,
- _Xterm_open_ctty,
- _Xterm_set_nodename,
- _Xterm_get_nodename,
- _Xterm_set_filenode,
- _Xterm_get_bottom_type,
- _Xterm_on_machdev,
- _Xterm_on_hurddev,
- _Xterm_on_pty,
- _Xtermctty_open_terminal,
- _Xterm_get_peername,
-};
-
-mig_external boolean_t term_server
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- register mach_msg_header_t *InP = InHeadP;
- register mig_reply_header_t *OutP = (mig_reply_header_t *) OutHeadP;
-
- auto const mach_msg_type_t RetCodeType = {
- /* msgt_name = */ MACH_MSG_TYPE_INTEGER_32,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- register mig_routine_t routine;
-
- OutP->Head.msgh_bits = MACH_MSGH_BITS(MACH_MSGH_BITS_REPLY(InP->msgh_bits), 0);
- OutP->Head.msgh_size = sizeof *OutP;
- OutP->Head.msgh_remote_port = InP->msgh_reply_port;
- OutP->Head.msgh_local_port = MACH_PORT_NULL;
- OutP->Head.msgh_seqno = 0;
- OutP->Head.msgh_id = InP->msgh_id + 100;
-
- OutP->RetCodeType = RetCodeType;
-
- if ((InP->msgh_id > 28010) || (InP->msgh_id < 28000) ||
- ((routine = term_server_routines[InP->msgh_id - 28000]) == 0)) {
- OutP->RetCode = MIG_BAD_ID;
- return FALSE;
- }
- (*routine) (InP, &OutP->Head);
- return TRUE;
-}
-
-mig_external mig_routine_t term_server_routine
- (const mach_msg_header_t *InHeadP)
-{
- register int msgh_id;
-
- msgh_id = InHeadP->msgh_id - 28000;
-
- if ((msgh_id > 10) || (msgh_id < 0))
- return 0;
-
- return term_server_routines[msgh_id];
-}
-
diff --git a/eth-filter.multi-thread/device_replyUser.c b/eth-filter.multi-thread/device_replyUser.c
deleted file mode 100644
index 5735b1be..00000000
--- a/eth-filter.multi-thread/device_replyUser.c
+++ /dev/null
@@ -1,374 +0,0 @@
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE 1
-#endif
-
-#include "device_reply_U.h"
-#define EXPORT_BOOLEAN
-#include <mach/boolean.h>
-#include <mach/kern_return.h>
-#include <mach/message.h>
-#include <mach/notify.h>
-#include <mach/mach_types.h>
-#include <mach/mig_errors.h>
-#include <mach/mig_support.h>
-#include <mach/msg_type.h>
-/* LINTLIBRARY */
-
-#ifndef mig_internal
-#define mig_internal static
-#endif
-
-#ifndef mig_external
-#define mig_external
-#endif
-
-#ifndef TypeCheck
-#define TypeCheck 1
-#endif
-
-#ifndef UseExternRCSId
-#define UseExternRCSId 1
-#endif
-
-#define BAD_TYPECHECK(type, check) ({\
- union { mach_msg_type_t t; unsigned32_t w; } _t, _c;\
- _t.t = *(type); _c.t = *(check); _t.w != _c.w; })
-#define msgh_request_port msgh_remote_port
-#define msgh_reply_port msgh_local_port
-
-#include <mach/std_types.h>
-#include <device/device_types.h>
-#include <device/net_status.h>
-
-/* SimpleRoutine device_open_reply */
-mig_external kern_return_t ds_device_open_reply
-(
- mach_port_t reply_port,
- mach_msg_type_name_t reply_portPoly,
- kern_return_t return_code,
- mach_port_t device_port
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- mach_msg_type_t device_portType;
- mach_port_t device_port;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t device_portType = {
- /* msgt_name = */ 20,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->device_portType = device_portType;
-
- InP->device_port = device_port;
-
- InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX|
- MACH_MSGH_BITS(reply_portPoly, 0);
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply_port;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 2900;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 40, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine device_write_reply */
-mig_external kern_return_t ds_device_write_reply
-(
- mach_port_t reply_port,
- mach_msg_type_name_t reply_portPoly,
- kern_return_t return_code,
- int bytes_written
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- mach_msg_type_t bytes_writtenType;
- int bytes_written;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t bytes_writtenType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->bytes_writtenType = bytes_writtenType;
-
- InP->bytes_written = bytes_written;
-
- InP->Head.msgh_bits =
- MACH_MSGH_BITS(reply_portPoly, 0);
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply_port;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 2902;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 40, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine device_write_reply_inband */
-mig_external kern_return_t ds_device_write_reply_inband
-(
- mach_port_t reply_port,
- mach_msg_type_name_t reply_portPoly,
- kern_return_t return_code,
- int bytes_written
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- mach_msg_type_t bytes_writtenType;
- int bytes_written;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t bytes_writtenType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->bytes_writtenType = bytes_writtenType;
-
- InP->bytes_written = bytes_written;
-
- InP->Head.msgh_bits =
- MACH_MSGH_BITS(reply_portPoly, 0);
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply_port;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 2903;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 40, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine device_read_reply */
-mig_external kern_return_t ds_device_read_reply
-(
- mach_port_t reply_port,
- mach_msg_type_name_t reply_portPoly,
- kern_return_t return_code,
- io_buf_ptr_t data,
- mach_msg_type_number_t dataCnt
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- mach_msg_type_long_t dataType;
- io_buf_ptr_t data;
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_long_t dataType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ FALSE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ TRUE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 9,
- /* msgtl_size = */ 8,
- /* msgtl_number = */ 0,
- };
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->dataType = dataType;
-
- InP->data = data;
-
- InP->dataType.msgtl_number = dataCnt;
-
- InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX|
- MACH_MSGH_BITS(reply_portPoly, 0);
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply_port;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 2904;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, 48, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
-
-/* SimpleRoutine device_read_reply_inband */
-mig_external kern_return_t ds_device_read_reply_inband
-(
- mach_port_t reply_port,
- mach_msg_type_name_t reply_portPoly,
- kern_return_t return_code,
- io_buf_ptr_inband_t data,
- mach_msg_type_number_t dataCnt
-)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t return_codeType;
- kern_return_t return_code;
- mach_msg_type_t dataType;
- char data[128];
- } Request;
-
- union {
- Request In;
- } Mess;
-
- register Request *InP = &Mess.In;
-
- unsigned int msgh_size;
-
- auto const mach_msg_type_t return_codeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t dataType = {
- /* msgt_name = */ 8,
- /* msgt_size = */ 8,
- /* msgt_number = */ 128,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- InP->return_codeType = return_codeType;
-
- InP->return_code = return_code;
-
- InP->dataType = dataType;
-
- if (dataCnt > 128) {
- return MIG_ARRAY_TOO_LARGE;
- }
- else {
- memcpy(InP->data, data, dataCnt);
- }
-
- InP->dataType.msgt_number = dataCnt;
-
- msgh_size = 36 + ((dataCnt + 3) & ~3);
- InP->Head.msgh_bits =
- MACH_MSGH_BITS(reply_portPoly, 0);
- /* msgh_size passed as argument */
- InP->Head.msgh_request_port = reply_port;
- InP->Head.msgh_reply_port = MACH_PORT_NULL;
- InP->Head.msgh_seqno = 0;
- InP->Head.msgh_id = 2905;
-
- return __mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, msgh_size, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-}
diff --git a/eth-filter.multi-thread/notifyServer.c b/eth-filter.multi-thread/notifyServer.c
deleted file mode 100644
index 7965461a..00000000
--- a/eth-filter.multi-thread/notifyServer.c
+++ /dev/null
@@ -1,353 +0,0 @@
-/* Module notify */
-
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE 1
-#endif
-
-#define EXPORT_BOOLEAN
-#include <mach/boolean.h>
-#include <mach/kern_return.h>
-#include <mach/message.h>
-#include <mach/mig_errors.h>
-#include <mach/mig_support.h>
-
-#ifndef mig_internal
-#define mig_internal static
-#endif
-
-#ifndef mig_external
-#define mig_external
-#endif
-
-#ifndef TypeCheck
-#define TypeCheck 1
-#endif
-
-#ifndef UseExternRCSId
-#define UseExternRCSId 1
-#endif
-
-#define BAD_TYPECHECK(type, check) ({\
- union { mach_msg_type_t t; unsigned32_t w; } _t, _c;\
- _t.t = *(type); _c.t = *(check); _t.w != _c.w; })
-#define msgh_request_port msgh_local_port
-#define MACH_MSGH_BITS_REQUEST(bits) MACH_MSGH_BITS_LOCAL(bits)
-#define msgh_reply_port msgh_remote_port
-#define MACH_MSGH_BITS_REPLY(bits) MACH_MSGH_BITS_REMOTE(bits)
-
-#include <mach/std_types.h>
-
-/* SimpleRoutine mach_notify_port_deleted */
-mig_internal void _Xmach_notify_port_deleted
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t nameType;
- mach_port_t name;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t do_mach_notify_port_deleted
- (mach_port_t notify, mach_port_t name);
-
- auto const mach_msg_type_t nameCheck = {
- /* msgt_name = */ 15,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->nameType, &nameCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = do_mach_notify_port_deleted(In0P->Head.msgh_request_port, In0P->name);
-}
-
-/* SimpleRoutine mach_notify_msg_accepted */
-mig_internal void _Xmach_notify_msg_accepted
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t nameType;
- mach_port_t name;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t do_mach_notify_msg_accepted
- (mach_port_t notify, mach_port_t name);
-
- auto const mach_msg_type_t nameCheck = {
- /* msgt_name = */ 15,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->nameType, &nameCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = do_mach_notify_msg_accepted(In0P->Head.msgh_request_port, In0P->name);
-}
-
-/* SimpleRoutine mach_notify_port_destroyed */
-mig_internal void _Xmach_notify_port_destroyed
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t rightsType;
- mach_port_t rights;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t do_mach_notify_port_destroyed
- (mach_port_t notify, mach_port_t rights);
-
- auto const mach_msg_type_t rightsCheck = {
- /* msgt_name = */ 16,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->rightsType, &rightsCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = do_mach_notify_port_destroyed(In0P->Head.msgh_request_port, In0P->rights);
-}
-
-/* SimpleRoutine mach_notify_no_senders */
-mig_internal void _Xmach_notify_no_senders
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t mscountType;
- mach_port_mscount_t mscount;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t do_mach_notify_no_senders
- (mach_port_t notify, mach_port_mscount_t mscount);
-
- auto const mach_msg_type_t mscountCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->mscountType, &mscountCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = do_mach_notify_no_senders(In0P->Head.msgh_request_port, In0P->mscount);
-}
-
-/* SimpleRoutine mach_notify_send_once */
-mig_internal void _Xmach_notify_send_once
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t do_mach_notify_send_once
- (mach_port_t notify);
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = do_mach_notify_send_once(In0P->Head.msgh_request_port);
-}
-
-/* SimpleRoutine mach_notify_dead_name */
-mig_internal void _Xmach_notify_dead_name
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t nameType;
- mach_port_t name;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t do_mach_notify_dead_name
- (mach_port_t notify, mach_port_t name);
-
- auto const mach_msg_type_t nameCheck = {
- /* msgt_name = */ 15,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->nameType, &nameCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = do_mach_notify_dead_name(In0P->Head.msgh_request_port, In0P->name);
-}
-
-static mig_routine_t notify_server_routines[] = {
- 0,
- _Xmach_notify_port_deleted,
- _Xmach_notify_msg_accepted,
- 0,
- 0,
- _Xmach_notify_port_destroyed,
- _Xmach_notify_no_senders,
- _Xmach_notify_send_once,
- _Xmach_notify_dead_name,
-};
-
-mig_external boolean_t notify_server
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- register mach_msg_header_t *InP = InHeadP;
- register mig_reply_header_t *OutP = (mig_reply_header_t *) OutHeadP;
-
- auto const mach_msg_type_t RetCodeType = {
- /* msgt_name = */ MACH_MSG_TYPE_INTEGER_32,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- register mig_routine_t routine;
-
- OutP->Head.msgh_bits = MACH_MSGH_BITS(MACH_MSGH_BITS_REPLY(InP->msgh_bits), 0);
- OutP->Head.msgh_size = sizeof *OutP;
- OutP->Head.msgh_remote_port = InP->msgh_reply_port;
- OutP->Head.msgh_local_port = MACH_PORT_NULL;
- OutP->Head.msgh_seqno = 0;
- OutP->Head.msgh_id = InP->msgh_id + 100;
-
- OutP->RetCodeType = RetCodeType;
-
- if ((InP->msgh_id > 72) || (InP->msgh_id < 64) ||
- ((routine = notify_server_routines[InP->msgh_id - 64]) == 0)) {
- OutP->RetCode = MIG_BAD_ID;
- return FALSE;
- }
- (*routine) (InP, &OutP->Head);
- return TRUE;
-}
-
-mig_external mig_routine_t notify_server_routine
- (const mach_msg_header_t *InHeadP)
-{
- register int msgh_id;
-
- msgh_id = InHeadP->msgh_id - 64;
-
- if ((msgh_id > 8) || (msgh_id < 0))
- return 0;
-
- return notify_server_routines[msgh_id];
-}
-
diff --git a/eth-filter.multi-thread/ourdeviceServer.c b/eth-filter.multi-thread/ourdeviceServer.c
deleted file mode 100644
index 3db5fd8d..00000000
--- a/eth-filter.multi-thread/ourdeviceServer.c
+++ /dev/null
@@ -1,1179 +0,0 @@
-/* Module device */
-
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE 1
-#endif
-
-#define EXPORT_BOOLEAN
-#include <mach/boolean.h>
-#include <mach/kern_return.h>
-#include <mach/message.h>
-#include <mach/mig_errors.h>
-#include <mach/mig_support.h>
-
-#ifndef mig_internal
-#define mig_internal static
-#endif
-
-#ifndef mig_external
-#define mig_external
-#endif
-
-#ifndef TypeCheck
-#define TypeCheck 1
-#endif
-
-#ifndef UseExternRCSId
-#define UseExternRCSId 1
-#endif
-
-#define BAD_TYPECHECK(type, check) ({\
- union { mach_msg_type_t t; unsigned32_t w; } _t, _c;\
- _t.t = *(type); _c.t = *(check); _t.w != _c.w; })
-#define msgh_request_port msgh_local_port
-#define MACH_MSGH_BITS_REQUEST(bits) MACH_MSGH_BITS_LOCAL(bits)
-#define msgh_reply_port msgh_remote_port
-#define MACH_MSGH_BITS_REPLY(bits) MACH_MSGH_BITS_REMOTE(bits)
-
-#include <mach/std_types.h>
-#include <mach/mach_types.h>
-#include <device/device_types.h>
-#include <device/net_status.h>
-
-/* Routine device_open */
-mig_internal void _Xdevice_open
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t modeType;
- dev_mode_t mode;
- mach_msg_type_long_t nameType;
- dev_name_t name;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t deviceType;
- mach_port_t device;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t ds_device_open
- (mach_port_t master_port, mach_port_t reply_port, mach_msg_type_name_t reply_portPoly, dev_mode_t mode, dev_name_t name, mach_port_t *device, mach_msg_type_name_t *devicePoly);
-
- boolean_t msgh_simple;
- auto const mach_msg_type_t modeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t deviceType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- mach_msg_type_name_t devicePoly;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 172) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->modeType, &modeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->nameType.msgtl_header.msgt_inline != TRUE) ||
- (In0P->nameType.msgtl_header.msgt_longform != TRUE) ||
- (In0P->nameType.msgtl_name != 12) ||
- (In0P->nameType.msgtl_number != 1) ||
- (In0P->nameType.msgtl_size != 1024))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = ds_device_open(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->mode, In0P->name, &OutP->device, &devicePoly);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- msgh_simple = TRUE;
- OutP->Head.msgh_size = 40;
-
- OutP->deviceType = deviceType;
-
- if (MACH_MSG_TYPE_PORT_ANY(devicePoly))
- msgh_simple = FALSE;
-
- OutP->deviceType.msgt_name = devicePoly;
-
- if (!msgh_simple)
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-}
-
-/* Routine device_close */
-mig_internal void _Xdevice_close
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t ds_device_close
- (mach_port_t device);
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = ds_device_close(In0P->Head.msgh_request_port);
-}
-
-/* Routine device_write */
-mig_internal void _Xdevice_write
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t modeType;
- dev_mode_t mode;
- mach_msg_type_t recnumType;
- recnum_t recnum;
- mach_msg_type_long_t dataType;
- io_buf_ptr_t data;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t bytes_writtenType;
- int bytes_written;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t ds_device_write
- (mach_port_t device, mach_port_t reply_port, mach_msg_type_name_t reply_portPoly, dev_mode_t mode, recnum_t recnum, io_buf_ptr_t data, mach_msg_type_number_t dataCnt, int *bytes_written);
-
- auto const mach_msg_type_t modeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t recnumCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t bytes_writtenType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 56) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->modeType, &modeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->recnumType, &recnumCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->dataType.msgtl_header.msgt_inline != FALSE) ||
- (In0P->dataType.msgtl_header.msgt_longform != TRUE) ||
- (In0P->dataType.msgtl_name != 9) ||
- (In0P->dataType.msgtl_size != 8))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = ds_device_write(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->mode, In0P->recnum, In0P->data, In0P->dataType.msgtl_number, &OutP->bytes_written);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 40;
-
- OutP->bytes_writtenType = bytes_writtenType;
-}
-
-/* Routine device_write_inband */
-mig_internal void _Xdevice_write_inband
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t modeType;
- dev_mode_t mode;
- mach_msg_type_t recnumType;
- recnum_t recnum;
- mach_msg_type_t dataType;
- char data[128];
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t bytes_writtenType;
- int bytes_written;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t ds_device_write_inband
- (mach_port_t device, mach_port_t reply_port, mach_msg_type_name_t reply_portPoly, dev_mode_t mode, recnum_t recnum, io_buf_ptr_inband_t data, mach_msg_type_number_t dataCnt, int *bytes_written);
-
- unsigned int msgh_size;
-
- auto const mach_msg_type_t modeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t recnumCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t bytes_writtenType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- msgh_size = In0P->Head.msgh_size;
- if ((msgh_size < 44) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->modeType, &modeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->recnumType, &recnumCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->dataType.msgt_inline != TRUE) ||
- (In0P->dataType.msgt_longform != FALSE) ||
- (In0P->dataType.msgt_name != 8) ||
- (In0P->dataType.msgt_size != 8))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (msgh_size != 44 + ((In0P->dataType.msgt_number + 3) & ~3))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = ds_device_write_inband(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->mode, In0P->recnum, In0P->data, In0P->dataType.msgt_number, &OutP->bytes_written);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 40;
-
- OutP->bytes_writtenType = bytes_writtenType;
-}
-
-/* Routine device_read */
-mig_internal void _Xdevice_read
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t modeType;
- dev_mode_t mode;
- mach_msg_type_t recnumType;
- recnum_t recnum;
- mach_msg_type_t bytes_wantedType;
- int bytes_wanted;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_long_t dataType;
- io_buf_ptr_t data;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t ds_device_read
- (mach_port_t device, mach_port_t reply_port, mach_msg_type_name_t reply_portPoly, dev_mode_t mode, recnum_t recnum, int bytes_wanted, io_buf_ptr_t *data, mach_msg_type_number_t *dataCnt);
-
- auto const mach_msg_type_t modeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t recnumCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t bytes_wantedCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_long_t dataType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ FALSE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 9,
- /* msgtl_size = */ 8,
- /* msgtl_number = */ 0,
- };
-
- mach_msg_type_number_t dataCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 48) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->modeType, &modeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->recnumType, &recnumCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->bytes_wantedType, &bytes_wantedCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = ds_device_read(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->mode, In0P->recnum, In0P->bytes_wanted, &OutP->data, &dataCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
- OutP->Head.msgh_size = 48;
-
- OutP->dataType = dataType;
-
- OutP->dataType.msgtl_number = dataCnt;
-}
-
-/* Routine device_read_inband */
-mig_internal void _Xdevice_read_inband
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t modeType;
- dev_mode_t mode;
- mach_msg_type_t recnumType;
- recnum_t recnum;
- mach_msg_type_t bytes_wantedType;
- int bytes_wanted;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t dataType;
- char data[128];
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t ds_device_read_inband
- (mach_port_t device, mach_port_t reply_port, mach_msg_type_name_t reply_portPoly, dev_mode_t mode, recnum_t recnum, int bytes_wanted, io_buf_ptr_inband_t data, mach_msg_type_number_t *dataCnt);
-
- auto const mach_msg_type_t modeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t recnumCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t bytes_wantedCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t dataType = {
- /* msgt_name = */ 8,
- /* msgt_size = */ 8,
- /* msgt_number = */ 128,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- mach_msg_type_number_t dataCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 48) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->modeType, &modeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->recnumType, &recnumCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->bytes_wantedType, &bytes_wantedCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- dataCnt = 128;
-
- OutP->RetCode = ds_device_read_inband(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->mode, In0P->recnum, In0P->bytes_wanted, OutP->data, &dataCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->dataType = dataType;
-
- OutP->dataType.msgt_number = dataCnt;
- OutP->Head.msgh_size = 36 + ((dataCnt + 3) & ~3);
-}
-
-/* Routine xxx_device_set_status */
-mig_internal void _Xxxx_device_set_status
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t flavorType;
- dev_flavor_t flavor;
- mach_msg_type_long_t statusType;
- int status[1024];
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t ds_xxx_device_set_status
- (mach_port_t device, dev_flavor_t flavor, dev_status_t status, mach_msg_type_number_t statusCnt);
-
- unsigned int msgh_size;
-
- auto const mach_msg_type_t flavorCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- msgh_size = In0P->Head.msgh_size;
- if ((msgh_size < 44) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->flavorType, &flavorCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->statusType.msgtl_header.msgt_inline != TRUE) ||
- (In0P->statusType.msgtl_header.msgt_longform != TRUE) ||
- (In0P->statusType.msgtl_name != 2) ||
- (In0P->statusType.msgtl_size != 32))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (msgh_size != 44 + (4 * In0P->statusType.msgtl_number))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = ds_xxx_device_set_status(In0P->Head.msgh_request_port, In0P->flavor, In0P->status, In0P->statusType.msgtl_number);
-}
-
-/* Routine xxx_device_get_status */
-mig_internal void _Xxxx_device_get_status
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t flavorType;
- dev_flavor_t flavor;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_long_t statusType;
- int status[1024];
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t ds_xxx_device_get_status
- (mach_port_t device, dev_flavor_t flavor, dev_status_t status, mach_msg_type_number_t *statusCnt);
-
- auto const mach_msg_type_t flavorCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_long_t statusType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 2,
- /* msgtl_size = */ 32,
- /* msgtl_number = */ 1024,
- };
-
- mach_msg_type_number_t statusCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->flavorType, &flavorCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- statusCnt = 1024;
-
- OutP->RetCode = ds_xxx_device_get_status(In0P->Head.msgh_request_port, In0P->flavor, OutP->status, &statusCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->statusType = statusType;
-
- OutP->statusType.msgtl_number = statusCnt;
- OutP->Head.msgh_size = 44 + (4 * statusCnt);
-}
-
-/* Routine xxx_device_set_filter */
-mig_internal void _Xxxx_device_set_filter
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t receive_portType;
- mach_port_t receive_port;
- mach_msg_type_t priorityType;
- int priority;
- mach_msg_type_long_t filterType;
- filter_t filter[128];
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t ds_xxx_device_set_filter
- (mach_port_t device, mach_port_t receive_port, int priority, filter_array_t filter, mach_msg_type_number_t filterCnt);
-
- unsigned int msgh_size;
-
- auto const mach_msg_type_t receive_portCheck = {
- /* msgt_name = */ 17,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t priorityCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- msgh_size = In0P->Head.msgh_size;
- if ((msgh_size < 52) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->receive_portType, &receive_portCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->priorityType, &priorityCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->filterType.msgtl_header.msgt_inline != TRUE) ||
- (In0P->filterType.msgtl_header.msgt_longform != TRUE) ||
- (In0P->filterType.msgtl_name != 1) ||
- (In0P->filterType.msgtl_size != 16))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (msgh_size != 52 + ((2 * In0P->filterType.msgtl_number + 3) & ~3))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = ds_xxx_device_set_filter(In0P->Head.msgh_request_port, In0P->receive_port, In0P->priority, In0P->filter, In0P->filterType.msgtl_number);
-}
-
-/* Routine device_map */
-mig_internal void _Xdevice_map
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t protType;
- vm_prot_t prot;
- mach_msg_type_t offsetType;
- vm_offset_t offset;
- mach_msg_type_t sizeType;
- vm_size_t size;
- mach_msg_type_t unmapType;
- int unmap;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t pagerType;
- mach_port_t pager;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t ds_device_map
- (mach_port_t device, vm_prot_t prot, vm_offset_t offset, vm_size_t size, mach_port_t *pager, int unmap);
-
- auto const mach_msg_type_t protCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t offsetCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t sizeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t unmapCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t pagerType = {
- /* msgt_name = */ 19,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 56) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->protType, &protCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->offsetType, &offsetCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->sizeType, &sizeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->unmapType, &unmapCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = ds_device_map(In0P->Head.msgh_request_port, In0P->prot, In0P->offset, In0P->size, &OutP->pager, In0P->unmap);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
- OutP->Head.msgh_size = 40;
-
- OutP->pagerType = pagerType;
-}
-
-/* Routine device_set_status */
-mig_internal void _Xdevice_set_status
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t flavorType;
- dev_flavor_t flavor;
- mach_msg_type_t statusType;
- int status[1024];
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t ds_device_set_status
- (mach_port_t device, dev_flavor_t flavor, dev_status_t status, mach_msg_type_number_t statusCnt);
-
- unsigned int msgh_size;
-
- auto const mach_msg_type_t flavorCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- msgh_size = In0P->Head.msgh_size;
- if ((msgh_size < 36) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->flavorType, &flavorCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->statusType.msgt_inline != TRUE) ||
- (In0P->statusType.msgt_longform != FALSE) ||
- (In0P->statusType.msgt_name != 2) ||
- (In0P->statusType.msgt_size != 32))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (msgh_size != 36 + (4 * In0P->statusType.msgt_number))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = ds_device_set_status(In0P->Head.msgh_request_port, In0P->flavor, In0P->status, In0P->statusType.msgt_number);
-}
-
-/* Routine device_get_status */
-mig_internal void _Xdevice_get_status
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t flavorType;
- dev_flavor_t flavor;
- mach_msg_type_t statusCntType;
- mach_msg_type_number_t statusCnt;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t statusType;
- int status[1024];
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t ds_device_get_status
- (mach_port_t device, dev_flavor_t flavor, dev_status_t status, mach_msg_type_number_t *statusCnt);
-
- auto const mach_msg_type_t flavorCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t statusCntCheck = {
- /* msgt_name = */ MACH_MSG_TYPE_INTEGER_32,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t statusType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1024,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- mach_msg_type_number_t statusCnt;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->flavorType, &flavorCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->statusCntType, &statusCntCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- statusCnt = 1024;
- if (In0P->statusCnt < statusCnt)
- statusCnt = In0P->statusCnt;
-
- OutP->RetCode = ds_device_get_status(In0P->Head.msgh_request_port, In0P->flavor, OutP->status, &statusCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->statusType = statusType;
-
- OutP->statusType.msgt_number = statusCnt;
- OutP->Head.msgh_size = 36 + (4 * statusCnt);
-}
-
-/* Routine device_set_filter */
-mig_internal void _Xdevice_set_filter
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t receive_portType;
- mach_port_t receive_port;
- mach_msg_type_t priorityType;
- int priority;
- mach_msg_type_t filterType;
- filter_t filter[128];
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t ds_device_set_filter
- (mach_port_t device, mach_port_t receive_port, int priority, filter_array_t filter, mach_msg_type_number_t filterCnt);
-
- unsigned int msgh_size;
-
- auto const mach_msg_type_t receive_portCheck = {
- /* msgt_name = */ 17,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t priorityCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- msgh_size = In0P->Head.msgh_size;
- if ((msgh_size < 44) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->receive_portType, &receive_portCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->priorityType, &priorityCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->filterType.msgt_inline != TRUE) ||
- (In0P->filterType.msgt_longform != FALSE) ||
- (In0P->filterType.msgt_name != 1) ||
- (In0P->filterType.msgt_size != 16))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (msgh_size != 44 + ((2 * In0P->filterType.msgt_number + 3) & ~3))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = ds_device_set_filter(In0P->Head.msgh_request_port, In0P->receive_port, In0P->priority, In0P->filter, In0P->filterType.msgt_number);
-}
-
-static mig_routine_t device_server_routines[] = {
- _Xdevice_open,
- _Xdevice_close,
- _Xdevice_write,
- _Xdevice_write_inband,
- _Xdevice_read,
- _Xdevice_read_inband,
- _Xxxx_device_set_status,
- _Xxxx_device_get_status,
- _Xxxx_device_set_filter,
- _Xdevice_map,
- _Xdevice_set_status,
- _Xdevice_get_status,
- _Xdevice_set_filter,
-};
-
-mig_external boolean_t device_server
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- register mach_msg_header_t *InP = InHeadP;
- register mig_reply_header_t *OutP = (mig_reply_header_t *) OutHeadP;
-
- auto const mach_msg_type_t RetCodeType = {
- /* msgt_name = */ MACH_MSG_TYPE_INTEGER_32,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- register mig_routine_t routine;
-
- OutP->Head.msgh_bits = MACH_MSGH_BITS(MACH_MSGH_BITS_REPLY(InP->msgh_bits), 0);
- OutP->Head.msgh_size = sizeof *OutP;
- OutP->Head.msgh_remote_port = InP->msgh_reply_port;
- OutP->Head.msgh_local_port = MACH_PORT_NULL;
- OutP->Head.msgh_seqno = 0;
- OutP->Head.msgh_id = InP->msgh_id + 100;
-
- OutP->RetCodeType = RetCodeType;
-
- if ((InP->msgh_id > 2812) || (InP->msgh_id < 2800) ||
- ((routine = device_server_routines[InP->msgh_id - 2800]) == 0)) {
- OutP->RetCode = MIG_BAD_ID;
- return FALSE;
- }
- (*routine) (InP, &OutP->Head);
- return TRUE;
-}
-
-mig_external mig_routine_t device_server_routine
- (const mach_msg_header_t *InHeadP)
-{
- register int msgh_id;
-
- msgh_id = InHeadP->msgh_id - 2800;
-
- if ((msgh_id > 12) || (msgh_id < 0))
- return 0;
-
- return device_server_routines[msgh_id];
-}
-
diff --git a/pfinet.old/iioctlServer.c b/pfinet.old/iioctlServer.c
deleted file mode 100644
index 1c646f32..00000000
--- a/pfinet.old/iioctlServer.c
+++ /dev/null
@@ -1,1672 +0,0 @@
-/* Module iioctl */
-
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE 1
-#endif
-
-#define EXPORT_BOOLEAN
-#include <mach/boolean.h>
-#include <mach/kern_return.h>
-#include <mach/message.h>
-#include <mach/mig_errors.h>
-#include <mach/mig_support.h>
-
-#ifndef mig_internal
-#define mig_internal static
-#endif
-
-#ifndef mig_external
-#define mig_external
-#endif
-
-#ifndef TypeCheck
-#define TypeCheck 1
-#endif
-
-#ifndef UseExternRCSId
-#define UseExternRCSId 1
-#endif
-
-#define BAD_TYPECHECK(type, check) ({\
- union { mach_msg_type_t t; unsigned32_t w; } _t, _c;\
- _t.t = *(type); _c.t = *(check); _t.w != _c.w; })
-#define msgh_request_port msgh_local_port
-#define MACH_MSGH_BITS_REQUEST(bits) MACH_MSGH_BITS_LOCAL(bits)
-#define msgh_reply_port msgh_remote_port
-#define MACH_MSGH_BITS_REPLY(bits) MACH_MSGH_BITS_REMOTE(bits)
-
-#include <mach/std_types.h>
-#include <mach/mach_types.h>
-#include <device/device_types.h>
-#include <device/net_status.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/statfs.h>
-#include <sys/resource.h>
-#include <sys/utsname.h>
-#include <hurd/hurd_types.h>
-#include <hurd/ioctl_types.h>
-
-/* Routine iioctl_siocsifaddr */
-mig_internal void _Xiioctl_siocsifaddr
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t ifnamType;
- ifname_t ifnam;
- mach_msg_type_t addrType;
- sockaddr_t addr;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_iioctl_siocsifaddr
- (io_t reqport, ifname_t ifnam, sockaddr_t addr);
-
- auto const mach_msg_type_t ifnamCheck = {
- /* msgt_name = */ 8,
- /* msgt_size = */ 8,
- /* msgt_number = */ 16,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t addrCheck = {
- /* msgt_name = */ 8,
- /* msgt_size = */ 8,
- /* msgt_number = */ 16,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 64) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->ifnamType, &ifnamCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->addrType, &addrCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_iioctl_siocsifaddr(In0P->Head.msgh_request_port, In0P->ifnam, In0P->addr);
-}
-
-/* Routine iioctl_siocsifdstaddr */
-mig_internal void _Xiioctl_siocsifdstaddr
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t ifnamType;
- ifname_t ifnam;
- mach_msg_type_t dstaddrType;
- sockaddr_t dstaddr;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_iioctl_siocsifdstaddr
- (io_t reqport, ifname_t ifnam, sockaddr_t dstaddr);
-
- auto const mach_msg_type_t ifnamCheck = {
- /* msgt_name = */ 8,
- /* msgt_size = */ 8,
- /* msgt_number = */ 16,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t dstaddrCheck = {
- /* msgt_name = */ 8,
- /* msgt_size = */ 8,
- /* msgt_number = */ 16,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 64) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->ifnamType, &ifnamCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->dstaddrType, &dstaddrCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_iioctl_siocsifdstaddr(In0P->Head.msgh_request_port, In0P->ifnam, In0P->dstaddr);
-}
-
-/* Routine iioctl_siocsifflags */
-mig_internal void _Xiioctl_siocsifflags
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t ifnamType;
- ifname_t ifnam;
- mach_msg_type_t flagsType;
- short flags;
- char flagsPad[2];
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_iioctl_siocsifflags
- (io_t reqport, ifname_t ifnam, short flags);
-
- auto const mach_msg_type_t ifnamCheck = {
- /* msgt_name = */ 8,
- /* msgt_size = */ 8,
- /* msgt_number = */ 16,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t flagsCheck = {
- /* msgt_name = */ 1,
- /* msgt_size = */ 16,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 52) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->ifnamType, &ifnamCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->flagsType, &flagsCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_iioctl_siocsifflags(In0P->Head.msgh_request_port, In0P->ifnam, In0P->flags);
-}
-
-/* Routine iioctl_siocgifflags */
-mig_internal void _Xiioctl_siocgifflags
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t ifnamType;
- ifname_t ifnam;
- mach_msg_type_t flagsType;
- short flags;
- char flagsPad[2];
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t ifnamType;
- ifname_t ifnam;
- mach_msg_type_t flagsType;
- short flags;
- char flagsPad[2];
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_iioctl_siocgifflags
- (io_t reqport, ifname_t ifnam, short *flags);
-
- auto const mach_msg_type_t ifnamCheck = {
- /* msgt_name = */ 8,
- /* msgt_size = */ 8,
- /* msgt_number = */ 16,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t flagsCheck = {
- /* msgt_name = */ 1,
- /* msgt_size = */ 16,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t ifnamType = {
- /* msgt_name = */ 8,
- /* msgt_size = */ 8,
- /* msgt_number = */ 16,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t flagsType = {
- /* msgt_name = */ 1,
- /* msgt_size = */ 16,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 52) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->ifnamType, &ifnamCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->flagsType, &flagsCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_iioctl_siocgifflags(In0P->Head.msgh_request_port, In0P->ifnam, &In0P->flags);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 60;
-
- OutP->ifnamType = ifnamType;
-
- { typedef struct { char data[16]; } *sp; * (sp) OutP->ifnam = * (sp) In0P->ifnam; }
-
- OutP->flagsType = flagsType;
-
- OutP->flags = In0P->flags;
-}
-
-/* Routine iioctl_siocsifbrdaddr */
-mig_internal void _Xiioctl_siocsifbrdaddr
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t ifnamType;
- ifname_t ifnam;
- mach_msg_type_t brdaddrType;
- sockaddr_t brdaddr;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_iioctl_siocsifbrdaddr
- (io_t reqport, ifname_t ifnam, sockaddr_t brdaddr);
-
- auto const mach_msg_type_t ifnamCheck = {
- /* msgt_name = */ 8,
- /* msgt_size = */ 8,
- /* msgt_number = */ 16,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t brdaddrCheck = {
- /* msgt_name = */ 8,
- /* msgt_size = */ 8,
- /* msgt_number = */ 16,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 64) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->ifnamType, &ifnamCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->brdaddrType, &brdaddrCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_iioctl_siocsifbrdaddr(In0P->Head.msgh_request_port, In0P->ifnam, In0P->brdaddr);
-}
-
-/* Routine iioctl_siocsifnetmask */
-mig_internal void _Xiioctl_siocsifnetmask
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t ifnamType;
- ifname_t ifnam;
- mach_msg_type_t netmaskType;
- sockaddr_t netmask;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_iioctl_siocsifnetmask
- (io_t reqport, ifname_t ifnam, sockaddr_t netmask);
-
- auto const mach_msg_type_t ifnamCheck = {
- /* msgt_name = */ 8,
- /* msgt_size = */ 8,
- /* msgt_number = */ 16,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t netmaskCheck = {
- /* msgt_name = */ 8,
- /* msgt_size = */ 8,
- /* msgt_number = */ 16,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 64) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->ifnamType, &ifnamCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->netmaskType, &netmaskCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_iioctl_siocsifnetmask(In0P->Head.msgh_request_port, In0P->ifnam, In0P->netmask);
-}
-
-/* Routine iioctl_siocgifmetric */
-mig_internal void _Xiioctl_siocgifmetric
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t ifnamType;
- ifname_t ifnam;
- mach_msg_type_t metricType;
- int metric;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t ifnamType;
- ifname_t ifnam;
- mach_msg_type_t metricType;
- int metric;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_iioctl_siocgifmetric
- (io_t reqport, ifname_t ifnam, int *metric);
-
- auto const mach_msg_type_t ifnamCheck = {
- /* msgt_name = */ 8,
- /* msgt_size = */ 8,
- /* msgt_number = */ 16,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t metricCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t ifnamType = {
- /* msgt_name = */ 8,
- /* msgt_size = */ 8,
- /* msgt_number = */ 16,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t metricType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 52) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->ifnamType, &ifnamCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->metricType, &metricCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_iioctl_siocgifmetric(In0P->Head.msgh_request_port, In0P->ifnam, &In0P->metric);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 60;
-
- OutP->ifnamType = ifnamType;
-
- { typedef struct { char data[16]; } *sp; * (sp) OutP->ifnam = * (sp) In0P->ifnam; }
-
- OutP->metricType = metricType;
-
- OutP->metric = In0P->metric;
-}
-
-/* Routine iioctl_siocsifmetric */
-mig_internal void _Xiioctl_siocsifmetric
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t ifnamType;
- ifname_t ifnam;
- mach_msg_type_t metricType;
- int metric;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_iioctl_siocsifmetric
- (io_t reqport, ifname_t ifnam, int metric);
-
- auto const mach_msg_type_t ifnamCheck = {
- /* msgt_name = */ 8,
- /* msgt_size = */ 8,
- /* msgt_number = */ 16,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t metricCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 52) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->ifnamType, &ifnamCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->metricType, &metricCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_iioctl_siocsifmetric(In0P->Head.msgh_request_port, In0P->ifnam, In0P->metric);
-}
-
-/* Routine iioctl_siocdifaddr */
-mig_internal void _Xiioctl_siocdifaddr
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t ifnamType;
- ifname_t ifnam;
- mach_msg_type_t addrType;
- sockaddr_t addr;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_iioctl_siocdifaddr
- (io_t reqport, ifname_t ifnam, sockaddr_t addr);
-
- auto const mach_msg_type_t ifnamCheck = {
- /* msgt_name = */ 8,
- /* msgt_size = */ 8,
- /* msgt_number = */ 16,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t addrCheck = {
- /* msgt_name = */ 8,
- /* msgt_size = */ 8,
- /* msgt_number = */ 16,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 64) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->ifnamType, &ifnamCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->addrType, &addrCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_iioctl_siocdifaddr(In0P->Head.msgh_request_port, In0P->ifnam, In0P->addr);
-}
-
-/* Routine iioctl_siocgifaddr */
-mig_internal void _Xiioctl_siocgifaddr
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t ifnamType;
- ifname_t ifnam;
- mach_msg_type_t addrType;
- sockaddr_t addr;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t ifnamType;
- ifname_t ifnam;
- mach_msg_type_t addrType;
- sockaddr_t addr;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_iioctl_siocgifaddr
- (io_t reqport, ifname_t ifnam, sockaddr_t *addr);
-
- auto const mach_msg_type_t ifnamCheck = {
- /* msgt_name = */ 8,
- /* msgt_size = */ 8,
- /* msgt_number = */ 16,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t addrCheck = {
- /* msgt_name = */ 8,
- /* msgt_size = */ 8,
- /* msgt_number = */ 16,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t ifnamType = {
- /* msgt_name = */ 8,
- /* msgt_size = */ 8,
- /* msgt_number = */ 16,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t addrType = {
- /* msgt_name = */ 8,
- /* msgt_size = */ 8,
- /* msgt_number = */ 16,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 64) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->ifnamType, &ifnamCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->addrType, &addrCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_iioctl_siocgifaddr(In0P->Head.msgh_request_port, In0P->ifnam, &In0P->addr);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 72;
-
- OutP->ifnamType = ifnamType;
-
- { typedef struct { char data[16]; } *sp; * (sp) OutP->ifnam = * (sp) In0P->ifnam; }
-
- OutP->addrType = addrType;
-
- OutP->addr = In0P->addr;
-}
-
-/* Routine iioctl_siocgifdstaddr */
-mig_internal void _Xiioctl_siocgifdstaddr
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t ifnamType;
- ifname_t ifnam;
- mach_msg_type_t dstaddrType;
- sockaddr_t dstaddr;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t ifnamType;
- ifname_t ifnam;
- mach_msg_type_t dstaddrType;
- sockaddr_t dstaddr;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_iioctl_siocgifdstaddr
- (io_t reqport, ifname_t ifnam, sockaddr_t *dstaddr);
-
- auto const mach_msg_type_t ifnamCheck = {
- /* msgt_name = */ 8,
- /* msgt_size = */ 8,
- /* msgt_number = */ 16,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t dstaddrCheck = {
- /* msgt_name = */ 8,
- /* msgt_size = */ 8,
- /* msgt_number = */ 16,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t ifnamType = {
- /* msgt_name = */ 8,
- /* msgt_size = */ 8,
- /* msgt_number = */ 16,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t dstaddrType = {
- /* msgt_name = */ 8,
- /* msgt_size = */ 8,
- /* msgt_number = */ 16,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 64) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->ifnamType, &ifnamCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->dstaddrType, &dstaddrCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_iioctl_siocgifdstaddr(In0P->Head.msgh_request_port, In0P->ifnam, &In0P->dstaddr);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 72;
-
- OutP->ifnamType = ifnamType;
-
- { typedef struct { char data[16]; } *sp; * (sp) OutP->ifnam = * (sp) In0P->ifnam; }
-
- OutP->dstaddrType = dstaddrType;
-
- OutP->dstaddr = In0P->dstaddr;
-}
-
-/* Routine iioctl_siocgifbrdaddr */
-mig_internal void _Xiioctl_siocgifbrdaddr
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t ifnamType;
- ifname_t ifnam;
- mach_msg_type_t brdaddrType;
- sockaddr_t brdaddr;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t ifnamType;
- ifname_t ifnam;
- mach_msg_type_t brdaddrType;
- sockaddr_t brdaddr;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_iioctl_siocgifbrdaddr
- (io_t reqport, ifname_t ifnam, sockaddr_t *brdaddr);
-
- auto const mach_msg_type_t ifnamCheck = {
- /* msgt_name = */ 8,
- /* msgt_size = */ 8,
- /* msgt_number = */ 16,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t brdaddrCheck = {
- /* msgt_name = */ 8,
- /* msgt_size = */ 8,
- /* msgt_number = */ 16,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t ifnamType = {
- /* msgt_name = */ 8,
- /* msgt_size = */ 8,
- /* msgt_number = */ 16,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t brdaddrType = {
- /* msgt_name = */ 8,
- /* msgt_size = */ 8,
- /* msgt_number = */ 16,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 64) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->ifnamType, &ifnamCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->brdaddrType, &brdaddrCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_iioctl_siocgifbrdaddr(In0P->Head.msgh_request_port, In0P->ifnam, &In0P->brdaddr);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 72;
-
- OutP->ifnamType = ifnamType;
-
- { typedef struct { char data[16]; } *sp; * (sp) OutP->ifnam = * (sp) In0P->ifnam; }
-
- OutP->brdaddrType = brdaddrType;
-
- OutP->brdaddr = In0P->brdaddr;
-}
-
-/* Routine iioctl_siocgifnetmask */
-mig_internal void _Xiioctl_siocgifnetmask
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t ifnamType;
- ifname_t ifnam;
- mach_msg_type_t netmaskType;
- sockaddr_t netmask;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t ifnamType;
- ifname_t ifnam;
- mach_msg_type_t netmaskType;
- sockaddr_t netmask;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_iioctl_siocgifnetmask
- (io_t reqport, ifname_t ifnam, sockaddr_t *netmask);
-
- auto const mach_msg_type_t ifnamCheck = {
- /* msgt_name = */ 8,
- /* msgt_size = */ 8,
- /* msgt_number = */ 16,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t netmaskCheck = {
- /* msgt_name = */ 8,
- /* msgt_size = */ 8,
- /* msgt_number = */ 16,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t ifnamType = {
- /* msgt_name = */ 8,
- /* msgt_size = */ 8,
- /* msgt_number = */ 16,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t netmaskType = {
- /* msgt_name = */ 8,
- /* msgt_size = */ 8,
- /* msgt_number = */ 16,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 64) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->ifnamType, &ifnamCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->netmaskType, &netmaskCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_iioctl_siocgifnetmask(In0P->Head.msgh_request_port, In0P->ifnam, &In0P->netmask);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 72;
-
- OutP->ifnamType = ifnamType;
-
- { typedef struct { char data[16]; } *sp; * (sp) OutP->ifnam = * (sp) In0P->ifnam; }
-
- OutP->netmaskType = netmaskType;
-
- OutP->netmask = In0P->netmask;
-}
-
-/* Routine iioctl_siocgifhwaddr */
-mig_internal void _Xiioctl_siocgifhwaddr
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t ifnamType;
- ifname_t ifnam;
- mach_msg_type_t netmaskType;
- sockaddr_t netmask;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t ifnamType;
- ifname_t ifnam;
- mach_msg_type_t netmaskType;
- sockaddr_t netmask;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_iioctl_siocgifhwaddr
- (io_t reqport, ifname_t ifnam, sockaddr_t *netmask);
-
- auto const mach_msg_type_t ifnamCheck = {
- /* msgt_name = */ 8,
- /* msgt_size = */ 8,
- /* msgt_number = */ 16,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t netmaskCheck = {
- /* msgt_name = */ 8,
- /* msgt_size = */ 8,
- /* msgt_number = */ 16,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t ifnamType = {
- /* msgt_name = */ 8,
- /* msgt_size = */ 8,
- /* msgt_number = */ 16,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t netmaskType = {
- /* msgt_name = */ 8,
- /* msgt_size = */ 8,
- /* msgt_number = */ 16,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 64) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->ifnamType, &ifnamCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->netmaskType, &netmaskCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_iioctl_siocgifhwaddr(In0P->Head.msgh_request_port, In0P->ifnam, &In0P->netmask);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 72;
-
- OutP->ifnamType = ifnamType;
-
- { typedef struct { char data[16]; } *sp; * (sp) OutP->ifnam = * (sp) In0P->ifnam; }
-
- OutP->netmaskType = netmaskType;
-
- OutP->netmask = In0P->netmask;
-}
-
-/* Routine iioctl_siocgifmtu */
-mig_internal void _Xiioctl_siocgifmtu
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t ifnamType;
- ifname_t ifnam;
- mach_msg_type_t mtuType;
- int mtu;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t ifnamType;
- ifname_t ifnam;
- mach_msg_type_t mtuType;
- int mtu;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_iioctl_siocgifmtu
- (io_t reqport, ifname_t ifnam, int *mtu);
-
- auto const mach_msg_type_t ifnamCheck = {
- /* msgt_name = */ 8,
- /* msgt_size = */ 8,
- /* msgt_number = */ 16,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t mtuCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t ifnamType = {
- /* msgt_name = */ 8,
- /* msgt_size = */ 8,
- /* msgt_number = */ 16,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t mtuType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 52) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->ifnamType, &ifnamCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->mtuType, &mtuCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_iioctl_siocgifmtu(In0P->Head.msgh_request_port, In0P->ifnam, &In0P->mtu);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 60;
-
- OutP->ifnamType = ifnamType;
-
- { typedef struct { char data[16]; } *sp; * (sp) OutP->ifnam = * (sp) In0P->ifnam; }
-
- OutP->mtuType = mtuType;
-
- OutP->mtu = In0P->mtu;
-}
-
-/* Routine iioctl_siocsifmtu */
-mig_internal void _Xiioctl_siocsifmtu
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t ifnamType;
- ifname_t ifnam;
- mach_msg_type_t mtuType;
- int mtu;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_iioctl_siocsifmtu
- (io_t reqport, ifname_t ifnam, int mtu);
-
- auto const mach_msg_type_t ifnamCheck = {
- /* msgt_name = */ 8,
- /* msgt_size = */ 8,
- /* msgt_number = */ 16,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t mtuCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 52) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->ifnamType, &ifnamCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->mtuType, &mtuCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_iioctl_siocsifmtu(In0P->Head.msgh_request_port, In0P->ifnam, In0P->mtu);
-}
-
-/* Routine iioctl_siocgifindex */
-mig_internal void _Xiioctl_siocgifindex
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t ifnamType;
- ifname_t ifnam;
- mach_msg_type_t indexType;
- int index;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t ifnamType;
- ifname_t ifnam;
- mach_msg_type_t indexType;
- int index;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_iioctl_siocgifindex
- (io_t reqport, ifname_t ifnam, int *index);
-
- auto const mach_msg_type_t ifnamCheck = {
- /* msgt_name = */ 8,
- /* msgt_size = */ 8,
- /* msgt_number = */ 16,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t indexCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t ifnamType = {
- /* msgt_name = */ 8,
- /* msgt_size = */ 8,
- /* msgt_number = */ 16,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t indexType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 52) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->ifnamType, &ifnamCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->indexType, &indexCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_iioctl_siocgifindex(In0P->Head.msgh_request_port, In0P->ifnam, &In0P->index);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 60;
-
- OutP->ifnamType = ifnamType;
-
- { typedef struct { char data[16]; } *sp; * (sp) OutP->ifnam = * (sp) In0P->ifnam; }
-
- OutP->indexType = indexType;
-
- OutP->index = In0P->index;
-}
-
-/* Routine iioctl_siocgifname */
-mig_internal void _Xiioctl_siocgifname
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t ifnamType;
- ifname_t ifnam;
- mach_msg_type_t indexType;
- int index;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t ifnamType;
- ifname_t ifnam;
- mach_msg_type_t indexType;
- int index;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_iioctl_siocgifname
- (io_t reqport, ifname_t ifnam, int *index);
-
- auto const mach_msg_type_t ifnamCheck = {
- /* msgt_name = */ 8,
- /* msgt_size = */ 8,
- /* msgt_number = */ 16,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t indexCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t ifnamType = {
- /* msgt_name = */ 8,
- /* msgt_size = */ 8,
- /* msgt_number = */ 16,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t indexType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 52) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->ifnamType, &ifnamCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->indexType, &indexCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_iioctl_siocgifname(In0P->Head.msgh_request_port, In0P->ifnam, &In0P->index);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 60;
-
- OutP->ifnamType = ifnamType;
-
- { typedef struct { char data[16]; } *sp; * (sp) OutP->ifnam = * (sp) In0P->ifnam; }
-
- OutP->indexType = indexType;
-
- OutP->index = In0P->index;
-}
-
-static mig_routine_t iioctl_server_routines[] = {
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- _Xiioctl_siocsifaddr,
- 0,
- _Xiioctl_siocsifdstaddr,
- 0,
- _Xiioctl_siocsifflags,
- _Xiioctl_siocgifflags,
- 0,
- _Xiioctl_siocsifbrdaddr,
- 0,
- 0,
- _Xiioctl_siocsifnetmask,
- _Xiioctl_siocgifmetric,
- _Xiioctl_siocsifmetric,
- _Xiioctl_siocdifaddr,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- _Xiioctl_siocgifaddr,
- _Xiioctl_siocgifdstaddr,
- _Xiioctl_siocgifbrdaddr,
- 0,
- _Xiioctl_siocgifnetmask,
- 0,
- _Xiioctl_siocgifhwaddr,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- _Xiioctl_siocgifmtu,
- _Xiioctl_siocsifmtu,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- _Xiioctl_siocgifindex,
- _Xiioctl_siocgifname,
-};
-
-mig_external boolean_t iioctl_server
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- register mach_msg_header_t *InP = InHeadP;
- register mig_reply_header_t *OutP = (mig_reply_header_t *) OutHeadP;
-
- auto const mach_msg_type_t RetCodeType = {
- /* msgt_name = */ MACH_MSG_TYPE_INTEGER_32,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- register mig_routine_t routine;
-
- OutP->Head.msgh_bits = MACH_MSGH_BITS(MACH_MSGH_BITS_REPLY(InP->msgh_bits), 0);
- OutP->Head.msgh_size = sizeof *OutP;
- OutP->Head.msgh_remote_port = InP->msgh_reply_port;
- OutP->Head.msgh_local_port = MACH_PORT_NULL;
- OutP->Head.msgh_seqno = 0;
- OutP->Head.msgh_id = InP->msgh_id + 100;
-
- OutP->RetCodeType = RetCodeType;
-
- if ((InP->msgh_id > 112091) || (InP->msgh_id < 112000) ||
- ((routine = iioctl_server_routines[InP->msgh_id - 112000]) == 0)) {
- OutP->RetCode = MIG_BAD_ID;
- return FALSE;
- }
- (*routine) (InP, &OutP->Head);
- return TRUE;
-}
-
-mig_external mig_routine_t iioctl_server_routine
- (const mach_msg_header_t *InHeadP)
-{
- register int msgh_id;
-
- msgh_id = InHeadP->msgh_id - 112000;
-
- if ((msgh_id > 91) || (msgh_id < 0))
- return 0;
-
- return iioctl_server_routines[msgh_id];
-}
-
diff --git a/pfinet.old/ioServer.c b/pfinet.old/ioServer.c
deleted file mode 100644
index 979ce37d..00000000
--- a/pfinet.old/ioServer.c
+++ /dev/null
@@ -1,2021 +0,0 @@
-/* Module io */
-
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE 1
-#endif
-
-#define EXPORT_BOOLEAN
-#include <mach/boolean.h>
-#include <mach/kern_return.h>
-#include <mach/message.h>
-#include <mach/mig_errors.h>
-#include <mach/mig_support.h>
-
-#ifndef mig_internal
-#define mig_internal static
-#endif
-
-#ifndef mig_external
-#define mig_external
-#endif
-
-#ifndef TypeCheck
-#define TypeCheck 1
-#endif
-
-#ifndef UseExternRCSId
-#define UseExternRCSId 1
-#endif
-
-#define BAD_TYPECHECK(type, check) ({\
- union { mach_msg_type_t t; unsigned32_t w; } _t, _c;\
- _t.t = *(type); _c.t = *(check); _t.w != _c.w; })
-#define msgh_request_port msgh_local_port
-#define MACH_MSGH_BITS_REQUEST(bits) MACH_MSGH_BITS_LOCAL(bits)
-#define msgh_reply_port msgh_remote_port
-#define MACH_MSGH_BITS_REPLY(bits) MACH_MSGH_BITS_REMOTE(bits)
-
-#include <mach/std_types.h>
-#include <mach/mach_types.h>
-#include <device/device_types.h>
-#include <device/net_status.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/statfs.h>
-#include <sys/resource.h>
-#include <sys/utsname.h>
-#include <hurd/hurd_types.h>
-#include "pfinet.h"
-
-/* Routine io_write */
-mig_internal void _Xio_write
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_long_t dataType;
- char data[2048];
- mach_msg_type_t offsetType;
- loff_t offset;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t amountType;
- vm_size_t amount;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Request *In1P;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_write
- (sock_user_t io_object, data_t data, mach_msg_type_number_t dataCnt, loff_t offset, vm_size_t *amount);
-
-#if TypeCheck
- boolean_t msgh_simple;
-#endif /* TypeCheck */
-
- unsigned int msgh_size;
- unsigned int msgh_size_delta;
-
- auto const mach_msg_type_t offsetCheck = {
- /* msgt_name = */ 11,
- /* msgt_size = */ 64,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t amountType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- sock_user_t io_object;
-
-#if TypeCheck
- msgh_size = In0P->Head.msgh_size;
- msgh_simple = !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX);
- if ((msgh_size < 48))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->dataType.msgtl_header.msgt_longform != TRUE) ||
- (In0P->dataType.msgtl_name != 8) ||
- (In0P->dataType.msgtl_size != 8))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- msgh_size_delta = (In0P->dataType.msgtl_header.msgt_inline) ? (In0P->dataType.msgtl_number + 3) & ~3 : sizeof(char *);
-#if TypeCheck
- if (msgh_size != 48 + msgh_size_delta)
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- In1P = (Request *) ((char *) In0P + msgh_size_delta - 2048);
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In1P->offsetType, &offsetCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- io_object = begin_using_socket_port(In0P->Head.msgh_request_port);
-
- OutP->RetCode = S_io_write(io_object, (In0P->dataType.msgtl_header.msgt_inline) ? In0P->data : *((char **)In0P->data), In0P->dataType.msgtl_number, In1P->offset, &OutP->amount);
- if (OutP->RetCode == KERN_SUCCESS)
- if (!In0P->dataType.msgtl_header.msgt_inline)
- __mig_deallocate(* (vm_offset_t *) In0P->data, In0P->dataType.msgtl_number);
- end_using_socket_port(io_object);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 40;
-
- OutP->amountType = amountType;
-}
-
-/* Routine io_read */
-mig_internal void _Xio_read
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t offsetType;
- loff_t offset;
- mach_msg_type_t amountType;
- vm_size_t amount;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_long_t dataType;
- char data[2048];
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_read
- (sock_user_t io_object, data_t *data, mach_msg_type_number_t *dataCnt, loff_t offset, vm_size_t amount);
-
- boolean_t msgh_simple;
- auto const mach_msg_type_t offsetCheck = {
- /* msgt_name = */ 11,
- /* msgt_size = */ 64,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t amountCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_long_t dataType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 8,
- /* msgtl_size = */ 8,
- /* msgtl_number = */ 2048,
- };
-
- sock_user_t io_object;
- mach_msg_type_number_t dataCnt;
-
- char *dataP;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 44) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->offsetType, &offsetCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->amountType, &amountCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- io_object = begin_using_socket_port(In0P->Head.msgh_request_port);
-
- dataP = OutP->data;
- dataCnt = 2048;
-
- OutP->RetCode = S_io_read(io_object, &dataP, &dataCnt, In0P->offset, In0P->amount);
- end_using_socket_port(io_object);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- msgh_simple = TRUE;
-
- OutP->dataType = dataType;
- if (dataP != OutP->data) {
- OutP->dataType.msgtl_header.msgt_inline = FALSE;
- OutP->dataType.msgtl_header.msgt_deallocate = TRUE;
- *((char **)OutP->data) = dataP;
- msgh_simple = FALSE;
- }
-
- OutP->dataType.msgtl_number = dataCnt;
- OutP->Head.msgh_size = 44 + ((OutP->dataType.msgtl_header.msgt_inline) ? (dataCnt + 3) & ~3 : sizeof(char *));
-
- if (!msgh_simple)
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-}
-
-/* Routine io_seek */
-mig_internal void _Xio_seek
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t offsetType;
- loff_t offset;
- mach_msg_type_t whenceType;
- int whence;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t newpType;
- loff_t newp;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_seek
- (sock_user_t io_object, loff_t offset, int whence, loff_t *newp);
-
- auto const mach_msg_type_t offsetCheck = {
- /* msgt_name = */ 11,
- /* msgt_size = */ 64,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t whenceCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t newpType = {
- /* msgt_name = */ 11,
- /* msgt_size = */ 64,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- sock_user_t io_object;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 44) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->offsetType, &offsetCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->whenceType, &whenceCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- io_object = begin_using_socket_port(In0P->Head.msgh_request_port);
-
- OutP->RetCode = S_io_seek(io_object, In0P->offset, In0P->whence, &OutP->newp);
- end_using_socket_port(io_object);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 44;
-
- OutP->newpType = newpType;
-}
-
-/* Routine io_readable */
-mig_internal void _Xio_readable
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t amountType;
- vm_size_t amount;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_readable
- (sock_user_t io_object, vm_size_t *amount);
-
- auto const mach_msg_type_t amountType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- sock_user_t io_object;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- io_object = begin_using_socket_port(In0P->Head.msgh_request_port);
-
- OutP->RetCode = S_io_readable(io_object, &OutP->amount);
- end_using_socket_port(io_object);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 40;
-
- OutP->amountType = amountType;
-}
-
-/* Routine io_set_all_openmodes */
-mig_internal void _Xio_set_all_openmodes
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t newbitsType;
- int newbits;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_set_all_openmodes
- (sock_user_t io_object, int newbits);
-
- auto const mach_msg_type_t newbitsCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- sock_user_t io_object;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->newbitsType, &newbitsCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- io_object = begin_using_socket_port(In0P->Head.msgh_request_port);
-
- OutP->RetCode = S_io_set_all_openmodes(io_object, In0P->newbits);
- end_using_socket_port(io_object);
-}
-
-/* Routine io_get_openmodes */
-mig_internal void _Xio_get_openmodes
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t bitsType;
- int bits;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_get_openmodes
- (sock_user_t io_object, int *bits);
-
- auto const mach_msg_type_t bitsType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- sock_user_t io_object;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- io_object = begin_using_socket_port(In0P->Head.msgh_request_port);
-
- OutP->RetCode = S_io_get_openmodes(io_object, &OutP->bits);
- end_using_socket_port(io_object);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 40;
-
- OutP->bitsType = bitsType;
-}
-
-/* Routine io_set_some_openmodes */
-mig_internal void _Xio_set_some_openmodes
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t bits_to_setType;
- int bits_to_set;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_set_some_openmodes
- (sock_user_t io_object, int bits_to_set);
-
- auto const mach_msg_type_t bits_to_setCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- sock_user_t io_object;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->bits_to_setType, &bits_to_setCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- io_object = begin_using_socket_port(In0P->Head.msgh_request_port);
-
- OutP->RetCode = S_io_set_some_openmodes(io_object, In0P->bits_to_set);
- end_using_socket_port(io_object);
-}
-
-/* Routine io_clear_some_openmodes */
-mig_internal void _Xio_clear_some_openmodes
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t bits_to_clearType;
- int bits_to_clear;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_clear_some_openmodes
- (sock_user_t io_object, int bits_to_clear);
-
- auto const mach_msg_type_t bits_to_clearCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- sock_user_t io_object;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->bits_to_clearType, &bits_to_clearCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- io_object = begin_using_socket_port(In0P->Head.msgh_request_port);
-
- OutP->RetCode = S_io_clear_some_openmodes(io_object, In0P->bits_to_clear);
- end_using_socket_port(io_object);
-}
-
-/* Routine io_async */
-mig_internal void _Xio_async
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t notify_portType;
- mach_port_t notify_port;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t async_id_portType;
- mach_port_t async_id_port;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_async
- (sock_user_t io_object, mach_port_t notify_port, mach_port_t *async_id_port, mach_msg_type_name_t *async_id_portPoly);
-
- boolean_t msgh_simple;
- auto const mach_msg_type_t notify_portCheck = {
- /* msgt_name = */ 17,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t async_id_portType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- sock_user_t io_object;
- mach_msg_type_name_t async_id_portPoly;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->notify_portType, &notify_portCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- io_object = begin_using_socket_port(In0P->Head.msgh_request_port);
-
- OutP->RetCode = S_io_async(io_object, In0P->notify_port, &OutP->async_id_port, &async_id_portPoly);
- end_using_socket_port(io_object);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- msgh_simple = TRUE;
- OutP->Head.msgh_size = 40;
-
- OutP->async_id_portType = async_id_portType;
-
- if (MACH_MSG_TYPE_PORT_ANY(async_id_portPoly))
- msgh_simple = FALSE;
-
- OutP->async_id_portType.msgt_name = async_id_portPoly;
-
- if (!msgh_simple)
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-}
-
-/* Routine io_mod_owner */
-mig_internal void _Xio_mod_owner
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t ownerType;
- pid_t owner;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_mod_owner
- (sock_user_t io_object, pid_t owner);
-
- auto const mach_msg_type_t ownerCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- sock_user_t io_object;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->ownerType, &ownerCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- io_object = begin_using_socket_port(In0P->Head.msgh_request_port);
-
- OutP->RetCode = S_io_mod_owner(io_object, In0P->owner);
- end_using_socket_port(io_object);
-}
-
-/* Routine io_get_owner */
-mig_internal void _Xio_get_owner
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t ownerType;
- pid_t owner;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_get_owner
- (sock_user_t io_object, pid_t *owner);
-
- auto const mach_msg_type_t ownerType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- sock_user_t io_object;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- io_object = begin_using_socket_port(In0P->Head.msgh_request_port);
-
- OutP->RetCode = S_io_get_owner(io_object, &OutP->owner);
- end_using_socket_port(io_object);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 40;
-
- OutP->ownerType = ownerType;
-}
-
-/* Routine io_get_icky_async_id */
-mig_internal void _Xio_get_icky_async_id
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t icky_async_id_portType;
- mach_port_t icky_async_id_port;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_get_icky_async_id
- (sock_user_t io_object, mach_port_t *icky_async_id_port, mach_msg_type_name_t *icky_async_id_portPoly);
-
- boolean_t msgh_simple;
- auto const mach_msg_type_t icky_async_id_portType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- sock_user_t io_object;
- mach_msg_type_name_t icky_async_id_portPoly;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- io_object = begin_using_socket_port(In0P->Head.msgh_request_port);
-
- OutP->RetCode = S_io_get_icky_async_id(io_object, &OutP->icky_async_id_port, &icky_async_id_portPoly);
- end_using_socket_port(io_object);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- msgh_simple = TRUE;
- OutP->Head.msgh_size = 40;
-
- OutP->icky_async_id_portType = icky_async_id_portType;
-
- if (MACH_MSG_TYPE_PORT_ANY(icky_async_id_portPoly))
- msgh_simple = FALSE;
-
- OutP->icky_async_id_portType.msgt_name = icky_async_id_portPoly;
-
- if (!msgh_simple)
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-}
-
-/* Routine io_select */
-mig_internal void _Xio_select
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t select_typeType;
- int select_type;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t select_typeType;
- int select_type;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_select
- (sock_user_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, int *select_type);
-
- auto const mach_msg_type_t select_typeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t select_typeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- sock_user_t io_object;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->select_typeType, &select_typeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- io_object = begin_using_socket_port(In0P->Head.msgh_request_port);
-
- OutP->RetCode = S_io_select(io_object, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), &In0P->select_type);
- end_using_socket_port(io_object);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 40;
-
- OutP->select_typeType = select_typeType;
-
- OutP->select_type = In0P->select_type;
-}
-
-/* Routine io_stat */
-mig_internal void _Xio_stat
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t stat_infoType;
- io_statbuf_t stat_info;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_stat
- (sock_user_t stat_object, io_statbuf_t *stat_info);
-
- auto const mach_msg_type_t stat_infoType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 32,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- sock_user_t stat_object;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- stat_object = begin_using_socket_port(In0P->Head.msgh_request_port);
-
- OutP->RetCode = S_io_stat(stat_object, &OutP->stat_info);
- end_using_socket_port(stat_object);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 164;
-
- OutP->stat_infoType = stat_infoType;
-}
-
-/* SimpleRoutine io_reauthenticate */
-mig_internal void _Xio_reauthenticate
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t rendezvous2Type;
- mach_port_t rendezvous2;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_reauthenticate
- (sock_user_t auth_object, mach_port_t rendezvous2);
-
- auto const mach_msg_type_t rendezvous2Check = {
- /* msgt_name = */ 17,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- sock_user_t auth_object;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->rendezvous2Type, &rendezvous2Check))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- auth_object = begin_using_socket_port(In0P->Head.msgh_request_port);
-
- OutP->RetCode = S_io_reauthenticate(auth_object, In0P->rendezvous2);
- end_using_socket_port(auth_object);
-}
-
-/* Routine io_restrict_auth */
-mig_internal void _Xio_restrict_auth
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_long_t uidsType;
- uid_t uids[512];
- mach_msg_type_long_t gidsType;
- uid_t gids[512];
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t new_objectType;
- mach_port_t new_object;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Request *In1P;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_restrict_auth
- (sock_user_t io_object, mach_port_t *new_object, mach_msg_type_name_t *new_objectPoly, idarray_t uids, mach_msg_type_number_t uidsCnt, idarray_t gids, mach_msg_type_number_t gidsCnt);
-
- boolean_t msgh_simple;
- unsigned int msgh_size;
- unsigned int msgh_size_delta;
-
- auto const mach_msg_type_t new_objectType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- sock_user_t io_object;
- mach_msg_type_name_t new_objectPoly;
-
-#if TypeCheck
- msgh_size = In0P->Head.msgh_size;
- msgh_simple = !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX);
- if ((msgh_size < 48))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->uidsType.msgtl_header.msgt_longform != TRUE) ||
- (In0P->uidsType.msgtl_name != 2) ||
- (In0P->uidsType.msgtl_size != 32))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- msgh_size_delta = (In0P->uidsType.msgtl_header.msgt_inline) ? 4 * In0P->uidsType.msgtl_number : sizeof(uid_t *);
-#if TypeCheck
- if (msgh_size < 48 + msgh_size_delta)
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
- msgh_size -= msgh_size_delta;
-#endif /* TypeCheck */
-
- In1P = (Request *) ((char *) In0P + msgh_size_delta - 2048);
-
-#if TypeCheck
- if ((In1P->gidsType.msgtl_header.msgt_longform != TRUE) ||
- (In1P->gidsType.msgtl_name != 2) ||
- (In1P->gidsType.msgtl_size != 32))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (msgh_size != 48 + ((In1P->gidsType.msgtl_header.msgt_inline) ? 4 * In1P->gidsType.msgtl_number : sizeof(uid_t *)))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- io_object = begin_using_socket_port(In0P->Head.msgh_request_port);
-
- OutP->RetCode = S_io_restrict_auth(io_object, &OutP->new_object, &new_objectPoly, (In0P->uidsType.msgtl_header.msgt_inline) ? In0P->uids : *((uid_t **)In0P->uids), In0P->uidsType.msgtl_number, (In1P->gidsType.msgtl_header.msgt_inline) ? In1P->gids : *((uid_t **)In1P->gids), In1P->gidsType.msgtl_number);
- if (OutP->RetCode == KERN_SUCCESS)
- if (!In1P->gidsType.msgtl_header.msgt_inline)
- __mig_deallocate(* (vm_offset_t *) In1P->gids, 4 * In1P->gidsType.msgtl_number);
- if (OutP->RetCode == KERN_SUCCESS)
- if (!In0P->uidsType.msgtl_header.msgt_inline)
- __mig_deallocate(* (vm_offset_t *) In0P->uids, 4 * In0P->uidsType.msgtl_number);
- end_using_socket_port(io_object);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- msgh_simple = TRUE;
- OutP->Head.msgh_size = 40;
-
- OutP->new_objectType = new_objectType;
-
- if (MACH_MSG_TYPE_PORT_ANY(new_objectPoly))
- msgh_simple = FALSE;
-
- OutP->new_objectType.msgt_name = new_objectPoly;
-
- if (!msgh_simple)
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-}
-
-/* Routine io_duplicate */
-mig_internal void _Xio_duplicate
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t newportType;
- mach_port_t newport;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_duplicate
- (sock_user_t io_object, mach_port_t *newport, mach_msg_type_name_t *newportPoly);
-
- boolean_t msgh_simple;
- auto const mach_msg_type_t newportType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- sock_user_t io_object;
- mach_msg_type_name_t newportPoly;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- io_object = begin_using_socket_port(In0P->Head.msgh_request_port);
-
- OutP->RetCode = S_io_duplicate(io_object, &OutP->newport, &newportPoly);
- end_using_socket_port(io_object);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- msgh_simple = TRUE;
- OutP->Head.msgh_size = 40;
-
- OutP->newportType = newportType;
-
- if (MACH_MSG_TYPE_PORT_ANY(newportPoly))
- msgh_simple = FALSE;
-
- OutP->newportType.msgt_name = newportPoly;
-
- if (!msgh_simple)
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-}
-
-/* Routine io_server_version */
-mig_internal void _Xio_server_version
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t server_nameType;
- string_t server_name;
- mach_msg_type_t server_major_versionType;
- int server_major_version;
- mach_msg_type_t server_minor_versionType;
- int server_minor_version;
- mach_msg_type_t server_edit_levelType;
- int server_edit_level;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_server_version
- (sock_user_t vers_object, string_t server_name, int *server_major_version, int *server_minor_version, int *server_edit_level);
-
- auto const mach_msg_type_t server_nameType = {
- /* msgt_name = */ MACH_MSG_TYPE_STRING_C,
- /* msgt_size = */ 8,
- /* msgt_number = */ 1024,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t server_major_versionType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t server_minor_versionType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t server_edit_levelType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- sock_user_t vers_object;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- vers_object = begin_using_socket_port(In0P->Head.msgh_request_port);
-
- OutP->RetCode = S_io_server_version(vers_object, OutP->server_name, &OutP->server_major_version, &OutP->server_minor_version, &OutP->server_edit_level);
- end_using_socket_port(vers_object);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 1084;
-
- OutP->server_nameType = server_nameType;
-
- OutP->server_major_versionType = server_major_versionType;
-
- OutP->server_minor_versionType = server_minor_versionType;
-
- OutP->server_edit_levelType = server_edit_levelType;
-}
-
-/* Routine io_map */
-mig_internal void _Xio_map
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t memobjrdType;
- mach_port_t memobjrd;
- mach_msg_type_t memobjwtType;
- mach_port_t memobjwt;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_map
- (sock_user_t io_object, mach_port_t *memobjrd, mach_msg_type_name_t *memobjrdPoly, mach_port_t *memobjwt, mach_msg_type_name_t *memobjwtPoly);
-
- boolean_t msgh_simple;
- auto const mach_msg_type_t memobjrdType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t memobjwtType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- sock_user_t io_object;
- mach_msg_type_name_t memobjrdPoly;
- mach_msg_type_name_t memobjwtPoly;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- io_object = begin_using_socket_port(In0P->Head.msgh_request_port);
-
- OutP->RetCode = S_io_map(io_object, &OutP->memobjrd, &memobjrdPoly, &OutP->memobjwt, &memobjwtPoly);
- end_using_socket_port(io_object);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- msgh_simple = TRUE;
- OutP->Head.msgh_size = 48;
-
- OutP->memobjrdType = memobjrdType;
-
- if (MACH_MSG_TYPE_PORT_ANY(memobjrdPoly))
- msgh_simple = FALSE;
-
- OutP->memobjrdType.msgt_name = memobjrdPoly;
-
- OutP->memobjwtType = memobjwtType;
-
- if (MACH_MSG_TYPE_PORT_ANY(memobjwtPoly))
- msgh_simple = FALSE;
-
- OutP->memobjwtType.msgt_name = memobjwtPoly;
-
- if (!msgh_simple)
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-}
-
-/* Routine io_map_cntl */
-mig_internal void _Xio_map_cntl
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t memobjType;
- mach_port_t memobj;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_map_cntl
- (sock_user_t io_object, mach_port_t *memobj, mach_msg_type_name_t *memobjPoly);
-
- boolean_t msgh_simple;
- auto const mach_msg_type_t memobjType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- sock_user_t io_object;
- mach_msg_type_name_t memobjPoly;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- io_object = begin_using_socket_port(In0P->Head.msgh_request_port);
-
- OutP->RetCode = S_io_map_cntl(io_object, &OutP->memobj, &memobjPoly);
- end_using_socket_port(io_object);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- msgh_simple = TRUE;
- OutP->Head.msgh_size = 40;
-
- OutP->memobjType = memobjType;
-
- if (MACH_MSG_TYPE_PORT_ANY(memobjPoly))
- msgh_simple = FALSE;
-
- OutP->memobjType.msgt_name = memobjPoly;
-
- if (!msgh_simple)
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-}
-
-/* Routine io_get_conch */
-mig_internal void _Xio_get_conch
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_get_conch
- (sock_user_t io_object);
-
- sock_user_t io_object;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- io_object = begin_using_socket_port(In0P->Head.msgh_request_port);
-
- OutP->RetCode = S_io_get_conch(io_object);
- end_using_socket_port(io_object);
-}
-
-/* Routine io_release_conch */
-mig_internal void _Xio_release_conch
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_release_conch
- (sock_user_t io_object);
-
- sock_user_t io_object;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- io_object = begin_using_socket_port(In0P->Head.msgh_request_port);
-
- OutP->RetCode = S_io_release_conch(io_object);
- end_using_socket_port(io_object);
-}
-
-/* Routine io_eofnotify */
-mig_internal void _Xio_eofnotify
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_eofnotify
- (sock_user_t io_object);
-
- sock_user_t io_object;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- io_object = begin_using_socket_port(In0P->Head.msgh_request_port);
-
- OutP->RetCode = S_io_eofnotify(io_object);
- end_using_socket_port(io_object);
-}
-
-/* Routine io_prenotify */
-mig_internal void _Xio_prenotify
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t write_startType;
- vm_offset_t write_start;
- mach_msg_type_t write_endType;
- vm_offset_t write_end;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_prenotify
- (sock_user_t io_object, vm_offset_t write_start, vm_offset_t write_end);
-
- auto const mach_msg_type_t write_startCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t write_endCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- sock_user_t io_object;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->write_startType, &write_startCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->write_endType, &write_endCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- io_object = begin_using_socket_port(In0P->Head.msgh_request_port);
-
- OutP->RetCode = S_io_prenotify(io_object, In0P->write_start, In0P->write_end);
- end_using_socket_port(io_object);
-}
-
-/* Routine io_postnotify */
-mig_internal void _Xio_postnotify
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t write_startType;
- vm_offset_t write_start;
- mach_msg_type_t write_endType;
- vm_offset_t write_end;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_postnotify
- (sock_user_t io_object, vm_offset_t write_start, vm_offset_t write_end);
-
- auto const mach_msg_type_t write_startCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t write_endCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- sock_user_t io_object;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->write_startType, &write_startCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->write_endType, &write_endCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- io_object = begin_using_socket_port(In0P->Head.msgh_request_port);
-
- OutP->RetCode = S_io_postnotify(io_object, In0P->write_start, In0P->write_end);
- end_using_socket_port(io_object);
-}
-
-/* Routine io_readnotify */
-mig_internal void _Xio_readnotify
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_readnotify
- (sock_user_t io_object);
-
- sock_user_t io_object;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- io_object = begin_using_socket_port(In0P->Head.msgh_request_port);
-
- OutP->RetCode = S_io_readnotify(io_object);
- end_using_socket_port(io_object);
-}
-
-/* Routine io_readsleep */
-mig_internal void _Xio_readsleep
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_readsleep
- (sock_user_t io_object);
-
- sock_user_t io_object;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- io_object = begin_using_socket_port(In0P->Head.msgh_request_port);
-
- OutP->RetCode = S_io_readsleep(io_object);
- end_using_socket_port(io_object);
-}
-
-/* Routine io_sigio */
-mig_internal void _Xio_sigio
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_sigio
- (sock_user_t io_object);
-
- sock_user_t io_object;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- io_object = begin_using_socket_port(In0P->Head.msgh_request_port);
-
- OutP->RetCode = S_io_sigio(io_object);
- end_using_socket_port(io_object);
-}
-
-/* Routine io_pathconf */
-mig_internal void _Xio_pathconf
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t nameType;
- int name;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t valueType;
- int value;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_pathconf
- (sock_user_t io_object, int name, int *value);
-
- auto const mach_msg_type_t nameCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t valueType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- sock_user_t io_object;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->nameType, &nameCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- io_object = begin_using_socket_port(In0P->Head.msgh_request_port);
-
- OutP->RetCode = S_io_pathconf(io_object, In0P->name, &OutP->value);
- end_using_socket_port(io_object);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 40;
-
- OutP->valueType = valueType;
-}
-
-/* Routine io_identity */
-mig_internal void _Xio_identity
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t idportType;
- mach_port_t idport;
- mach_msg_type_t fsidportType;
- mach_port_t fsidport;
- mach_msg_type_t filenoType;
- ino64_t fileno;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_identity
- (sock_user_t io_object, mach_port_t *idport, mach_msg_type_name_t *idportPoly, mach_port_t *fsidport, mach_msg_type_name_t *fsidportPoly, ino64_t *fileno);
-
- boolean_t msgh_simple;
- auto const mach_msg_type_t idportType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t fsidportType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t filenoType = {
- /* msgt_name = */ 11,
- /* msgt_size = */ 64,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- sock_user_t io_object;
- mach_msg_type_name_t idportPoly;
- mach_msg_type_name_t fsidportPoly;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- io_object = begin_using_socket_port(In0P->Head.msgh_request_port);
-
- OutP->RetCode = S_io_identity(io_object, &OutP->idport, &idportPoly, &OutP->fsidport, &fsidportPoly, &OutP->fileno);
- end_using_socket_port(io_object);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- msgh_simple = TRUE;
- OutP->Head.msgh_size = 60;
-
- OutP->idportType = idportType;
-
- if (MACH_MSG_TYPE_PORT_ANY(idportPoly))
- msgh_simple = FALSE;
-
- OutP->idportType.msgt_name = idportPoly;
-
- OutP->fsidportType = fsidportType;
-
- if (MACH_MSG_TYPE_PORT_ANY(fsidportPoly))
- msgh_simple = FALSE;
-
- OutP->fsidportType.msgt_name = fsidportPoly;
-
- OutP->filenoType = filenoType;
-
- if (!msgh_simple)
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-}
-
-/* Routine io_revoke */
-mig_internal void _Xio_revoke
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_io_revoke
- (sock_user_t io_object);
-
- sock_user_t io_object;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- io_object = begin_using_socket_port(In0P->Head.msgh_request_port);
-
- OutP->RetCode = S_io_revoke(io_object);
- end_using_socket_port(io_object);
-}
-
-static mig_routine_t io_server_routines[] = {
- _Xio_write,
- _Xio_read,
- _Xio_seek,
- _Xio_readable,
- _Xio_set_all_openmodes,
- _Xio_get_openmodes,
- _Xio_set_some_openmodes,
- _Xio_clear_some_openmodes,
- _Xio_async,
- _Xio_mod_owner,
- _Xio_get_owner,
- _Xio_get_icky_async_id,
- _Xio_select,
- _Xio_stat,
- _Xio_reauthenticate,
- _Xio_restrict_auth,
- _Xio_duplicate,
- _Xio_server_version,
- _Xio_map,
- _Xio_map_cntl,
- _Xio_get_conch,
- _Xio_release_conch,
- _Xio_eofnotify,
- _Xio_prenotify,
- _Xio_postnotify,
- _Xio_readnotify,
- _Xio_readsleep,
- _Xio_sigio,
- _Xio_pathconf,
- _Xio_identity,
- _Xio_revoke,
-};
-
-mig_external boolean_t io_server
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- register mach_msg_header_t *InP = InHeadP;
- register mig_reply_header_t *OutP = (mig_reply_header_t *) OutHeadP;
-
- auto const mach_msg_type_t RetCodeType = {
- /* msgt_name = */ MACH_MSG_TYPE_INTEGER_32,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- register mig_routine_t routine;
-
- OutP->Head.msgh_bits = MACH_MSGH_BITS(MACH_MSGH_BITS_REPLY(InP->msgh_bits), 0);
- OutP->Head.msgh_size = sizeof *OutP;
- OutP->Head.msgh_remote_port = InP->msgh_reply_port;
- OutP->Head.msgh_local_port = MACH_PORT_NULL;
- OutP->Head.msgh_seqno = 0;
- OutP->Head.msgh_id = InP->msgh_id + 100;
-
- OutP->RetCodeType = RetCodeType;
-
- if ((InP->msgh_id > 21030) || (InP->msgh_id < 21000) ||
- ((routine = io_server_routines[InP->msgh_id - 21000]) == 0)) {
- OutP->RetCode = MIG_BAD_ID;
- return FALSE;
- }
- (*routine) (InP, &OutP->Head);
- return TRUE;
-}
-
-mig_external mig_routine_t io_server_routine
- (const mach_msg_header_t *InHeadP)
-{
- register int msgh_id;
-
- msgh_id = InHeadP->msgh_id - 21000;
-
- if ((msgh_id > 30) || (msgh_id < 0))
- return 0;
-
- return io_server_routines[msgh_id];
-}
-
diff --git a/pfinet.old/pfinetServer.c b/pfinet.old/pfinetServer.c
deleted file mode 100644
index 14408d21..00000000
--- a/pfinet.old/pfinetServer.c
+++ /dev/null
@@ -1,189 +0,0 @@
-/* Module pfinet */
-
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE 1
-#endif
-
-#define EXPORT_BOOLEAN
-#include <mach/boolean.h>
-#include <mach/kern_return.h>
-#include <mach/message.h>
-#include <mach/mig_errors.h>
-#include <mach/mig_support.h>
-
-#ifndef mig_internal
-#define mig_internal static
-#endif
-
-#ifndef mig_external
-#define mig_external
-#endif
-
-#ifndef TypeCheck
-#define TypeCheck 1
-#endif
-
-#ifndef UseExternRCSId
-#define UseExternRCSId 1
-#endif
-
-#define BAD_TYPECHECK(type, check) ({\
- union { mach_msg_type_t t; unsigned32_t w; } _t, _c;\
- _t.t = *(type); _c.t = *(check); _t.w != _c.w; })
-#define msgh_request_port msgh_local_port
-#define MACH_MSGH_BITS_REQUEST(bits) MACH_MSGH_BITS_LOCAL(bits)
-#define msgh_reply_port msgh_remote_port
-#define MACH_MSGH_BITS_REPLY(bits) MACH_MSGH_BITS_REMOTE(bits)
-
-#include <mach/std_types.h>
-#include <mach/mach_types.h>
-#include <device/device_types.h>
-#include <device/net_status.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/statfs.h>
-#include <sys/resource.h>
-#include <sys/utsname.h>
-#include <hurd/hurd_types.h>
-
-/* Routine pfinet_siocgifconf */
-mig_internal void _Xpfinet_siocgifconf
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t amountType;
- vm_size_t amount;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_long_t bufType;
- char buf[2048];
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_pfinet_siocgifconf
- (io_t port, vm_size_t amount, data_t *buf, mach_msg_type_number_t *bufCnt);
-
- boolean_t msgh_simple;
- auto const mach_msg_type_t amountCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_long_t bufType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 8,
- /* msgtl_size = */ 8,
- /* msgtl_number = */ 2048,
- };
-
- mach_msg_type_number_t bufCnt;
-
- char *bufP;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->amountType, &amountCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- bufP = OutP->buf;
- bufCnt = 2048;
-
- OutP->RetCode = S_pfinet_siocgifconf(In0P->Head.msgh_request_port, In0P->amount, &bufP, &bufCnt);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- msgh_simple = TRUE;
-
- OutP->bufType = bufType;
- if (bufP != OutP->buf) {
- OutP->bufType.msgtl_header.msgt_inline = FALSE;
- OutP->bufType.msgtl_header.msgt_deallocate = TRUE;
- *((char **)OutP->buf) = bufP;
- msgh_simple = FALSE;
- }
-
- OutP->bufType.msgtl_number = bufCnt;
- OutP->Head.msgh_size = 44 + ((OutP->bufType.msgtl_header.msgt_inline) ? (bufCnt + 3) & ~3 : sizeof(char *));
-
- if (!msgh_simple)
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-}
-
-static mig_routine_t pfinet_server_routines[] = {
- _Xpfinet_siocgifconf,
-};
-
-mig_external boolean_t pfinet_server
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- register mach_msg_header_t *InP = InHeadP;
- register mig_reply_header_t *OutP = (mig_reply_header_t *) OutHeadP;
-
- auto const mach_msg_type_t RetCodeType = {
- /* msgt_name = */ MACH_MSG_TYPE_INTEGER_32,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- register mig_routine_t routine;
-
- OutP->Head.msgh_bits = MACH_MSGH_BITS(MACH_MSGH_BITS_REPLY(InP->msgh_bits), 0);
- OutP->Head.msgh_size = sizeof *OutP;
- OutP->Head.msgh_remote_port = InP->msgh_reply_port;
- OutP->Head.msgh_local_port = MACH_PORT_NULL;
- OutP->Head.msgh_seqno = 0;
- OutP->Head.msgh_id = InP->msgh_id + 100;
-
- OutP->RetCodeType = RetCodeType;
-
- if ((InP->msgh_id > 37000) || (InP->msgh_id < 37000) ||
- ((routine = pfinet_server_routines[InP->msgh_id - 37000]) == 0)) {
- OutP->RetCode = MIG_BAD_ID;
- return FALSE;
- }
- (*routine) (InP, &OutP->Head);
- return TRUE;
-}
-
-mig_external mig_routine_t pfinet_server_routine
- (const mach_msg_header_t *InHeadP)
-{
- register int msgh_id;
-
- msgh_id = InHeadP->msgh_id - 37000;
-
- if ((msgh_id > 0) || (msgh_id < 0))
- return 0;
-
- return pfinet_server_routines[msgh_id];
-}
-
diff --git a/pfinet.old/socketServer.c b/pfinet.old/socketServer.c
deleted file mode 100644
index baacef9d..00000000
--- a/pfinet.old/socketServer.c
+++ /dev/null
@@ -1,1533 +0,0 @@
-/* Module socket */
-
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE 1
-#endif
-
-#define EXPORT_BOOLEAN
-#include <mach/boolean.h>
-#include <mach/kern_return.h>
-#include <mach/message.h>
-#include <mach/mig_errors.h>
-#include <mach/mig_support.h>
-
-#ifndef mig_internal
-#define mig_internal static
-#endif
-
-#ifndef mig_external
-#define mig_external
-#endif
-
-#ifndef TypeCheck
-#define TypeCheck 1
-#endif
-
-#ifndef UseExternRCSId
-#define UseExternRCSId 1
-#endif
-
-#define BAD_TYPECHECK(type, check) ({\
- union { mach_msg_type_t t; unsigned32_t w; } _t, _c;\
- _t.t = *(type); _c.t = *(check); _t.w != _c.w; })
-#define msgh_request_port msgh_local_port
-#define MACH_MSGH_BITS_REQUEST(bits) MACH_MSGH_BITS_LOCAL(bits)
-#define msgh_reply_port msgh_remote_port
-#define MACH_MSGH_BITS_REPLY(bits) MACH_MSGH_BITS_REMOTE(bits)
-
-#include <mach/std_types.h>
-#include <mach/mach_types.h>
-#include <device/device_types.h>
-#include <device/net_status.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/statfs.h>
-#include <sys/resource.h>
-#include <sys/utsname.h>
-#include <hurd/hurd_types.h>
-#include "pfinet.h"
-
-/* Routine socket_create */
-mig_internal void _Xsocket_create
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t sock_typeType;
- int sock_type;
- mach_msg_type_t protocolType;
- int protocol;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t sockType;
- mach_port_t sock;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_socket_create
- (trivfs_protid_t server, int sock_type, int protocol, mach_port_t *sock, mach_msg_type_name_t *sockPoly);
-
- boolean_t msgh_simple;
- auto const mach_msg_type_t sock_typeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t protocolCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t sockType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- trivfs_protid_t server;
- mach_msg_type_name_t sockPoly;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->sock_typeType, &sock_typeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->protocolType, &protocolCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- server = trivfs_begin_using_protid(In0P->Head.msgh_request_port);
-
- OutP->RetCode = S_socket_create(server, In0P->sock_type, In0P->protocol, &OutP->sock, &sockPoly);
- trivfs_end_using_protid(server);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- msgh_simple = TRUE;
- OutP->Head.msgh_size = 40;
-
- OutP->sockType = sockType;
-
- if (MACH_MSG_TYPE_PORT_ANY(sockPoly))
- msgh_simple = FALSE;
-
- OutP->sockType.msgt_name = sockPoly;
-
- if (!msgh_simple)
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-}
-
-/* Routine socket_listen */
-mig_internal void _Xsocket_listen
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t queue_limitType;
- int queue_limit;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_socket_listen
- (sock_user_t sock, int queue_limit);
-
- auto const mach_msg_type_t queue_limitCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- sock_user_t sock;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->queue_limitType, &queue_limitCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- sock = begin_using_socket_port(In0P->Head.msgh_request_port);
-
- OutP->RetCode = S_socket_listen(sock, In0P->queue_limit);
- end_using_socket_port(sock);
-}
-
-/* Routine socket_accept */
-mig_internal void _Xsocket_accept
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t conn_sockType;
- mach_port_t conn_sock;
- mach_msg_type_t peer_addrType;
- mach_port_t peer_addr;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_socket_accept
- (sock_user_t sock, mach_port_t *conn_sock, mach_msg_type_name_t *conn_sockPoly, mach_port_t *peer_addr, mach_msg_type_name_t *peer_addrPoly);
-
- boolean_t msgh_simple;
- auto const mach_msg_type_t conn_sockType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t peer_addrType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- sock_user_t sock;
- mach_msg_type_name_t conn_sockPoly;
- mach_msg_type_name_t peer_addrPoly;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- sock = begin_using_socket_port(In0P->Head.msgh_request_port);
-
- OutP->RetCode = S_socket_accept(sock, &OutP->conn_sock, &conn_sockPoly, &OutP->peer_addr, &peer_addrPoly);
- end_using_socket_port(sock);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- msgh_simple = TRUE;
- OutP->Head.msgh_size = 48;
-
- OutP->conn_sockType = conn_sockType;
-
- if (MACH_MSG_TYPE_PORT_ANY(conn_sockPoly))
- msgh_simple = FALSE;
-
- OutP->conn_sockType.msgt_name = conn_sockPoly;
-
- OutP->peer_addrType = peer_addrType;
-
- if (MACH_MSG_TYPE_PORT_ANY(peer_addrPoly))
- msgh_simple = FALSE;
-
- OutP->peer_addrType.msgt_name = peer_addrPoly;
-
- if (!msgh_simple)
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-}
-
-/* Routine socket_connect */
-mig_internal void _Xsocket_connect
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t addrType;
- addr_port_t addr;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_socket_connect
- (sock_user_t sock, sock_addr_t addr);
-
- auto const mach_msg_type_t addrCheck = {
- /* msgt_name = */ 17,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- sock_user_t sock;
- sock_addr_t addr;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->addrType, &addrCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- sock = begin_using_socket_port(In0P->Head.msgh_request_port);
-
- addr = begin_using_sockaddr_port(In0P->addr);
-
- OutP->RetCode = S_socket_connect(sock, addr);
- end_using_sockaddr_port(addr);
- end_using_socket_port(sock);
-}
-
-/* Routine socket_bind */
-mig_internal void _Xsocket_bind
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t addrType;
- addr_port_t addr;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_socket_bind
- (sock_user_t sock, sock_addr_t addr);
-
- auto const mach_msg_type_t addrCheck = {
- /* msgt_name = */ 17,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- sock_user_t sock;
- sock_addr_t addr;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->addrType, &addrCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- sock = begin_using_socket_port(In0P->Head.msgh_request_port);
-
- addr = begin_using_sockaddr_port(In0P->addr);
-
- OutP->RetCode = S_socket_bind(sock, addr);
- end_using_sockaddr_port(addr);
- end_using_socket_port(sock);
-}
-
-/* Routine socket_name */
-mig_internal void _Xsocket_name
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t addrType;
- mach_port_t addr;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_socket_name
- (sock_user_t sock, mach_port_t *addr, mach_msg_type_name_t *addrPoly);
-
- boolean_t msgh_simple;
- auto const mach_msg_type_t addrType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- sock_user_t sock;
- mach_msg_type_name_t addrPoly;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- sock = begin_using_socket_port(In0P->Head.msgh_request_port);
-
- OutP->RetCode = S_socket_name(sock, &OutP->addr, &addrPoly);
- end_using_socket_port(sock);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- msgh_simple = TRUE;
- OutP->Head.msgh_size = 40;
-
- OutP->addrType = addrType;
-
- if (MACH_MSG_TYPE_PORT_ANY(addrPoly))
- msgh_simple = FALSE;
-
- OutP->addrType.msgt_name = addrPoly;
-
- if (!msgh_simple)
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-}
-
-/* Routine socket_peername */
-mig_internal void _Xsocket_peername
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t addrType;
- mach_port_t addr;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_socket_peername
- (sock_user_t sock, mach_port_t *addr, mach_msg_type_name_t *addrPoly);
-
- boolean_t msgh_simple;
- auto const mach_msg_type_t addrType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- sock_user_t sock;
- mach_msg_type_name_t addrPoly;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- sock = begin_using_socket_port(In0P->Head.msgh_request_port);
-
- OutP->RetCode = S_socket_peername(sock, &OutP->addr, &addrPoly);
- end_using_socket_port(sock);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- msgh_simple = TRUE;
- OutP->Head.msgh_size = 40;
-
- OutP->addrType = addrType;
-
- if (MACH_MSG_TYPE_PORT_ANY(addrPoly))
- msgh_simple = FALSE;
-
- OutP->addrType.msgt_name = addrPoly;
-
- if (!msgh_simple)
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-}
-
-/* Routine socket_connect2 */
-mig_internal void _Xsocket_connect2
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t sock2Type;
- socket_t sock2;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_socket_connect2
- (sock_user_t sock1, sock_user_t sock2);
-
- auto const mach_msg_type_t sock2Check = {
- /* msgt_name = */ 17,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- sock_user_t sock1;
- sock_user_t sock2;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->sock2Type, &sock2Check))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- sock1 = begin_using_socket_port(In0P->Head.msgh_request_port);
-
- sock2 = begin_using_socket_port(In0P->sock2);
-
- OutP->RetCode = S_socket_connect2(sock1, sock2);
- end_using_socket_port(sock2);
- end_using_socket_port(sock1);
-}
-
-/* Routine socket_create_address */
-mig_internal void _Xsocket_create_address
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t sockaddr_typeType;
- int sockaddr_type;
- mach_msg_type_long_t sockaddrType;
- char sockaddr[2048];
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t addrType;
- mach_port_t addr;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_socket_create_address
- (mach_port_t server, int sockaddr_type, data_t sockaddr, mach_msg_type_number_t sockaddrCnt, mach_port_t *addr, mach_msg_type_name_t *addrPoly);
-
- boolean_t msgh_simple;
- unsigned int msgh_size;
-
- auto const mach_msg_type_t sockaddr_typeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t addrType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- mach_msg_type_name_t addrPoly;
-
-#if TypeCheck
- msgh_size = In0P->Head.msgh_size;
- msgh_simple = !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX);
- if ((msgh_size < 44))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->sockaddr_typeType, &sockaddr_typeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->sockaddrType.msgtl_header.msgt_longform != TRUE) ||
- (In0P->sockaddrType.msgtl_name != 8) ||
- (In0P->sockaddrType.msgtl_size != 8))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (msgh_size != 44 + ((In0P->sockaddrType.msgtl_header.msgt_inline) ? (In0P->sockaddrType.msgtl_number + 3) & ~3 : sizeof(char *)))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_socket_create_address(In0P->Head.msgh_request_port, In0P->sockaddr_type, (In0P->sockaddrType.msgtl_header.msgt_inline) ? In0P->sockaddr : *((char **)In0P->sockaddr), In0P->sockaddrType.msgtl_number, &OutP->addr, &addrPoly);
- if (OutP->RetCode == KERN_SUCCESS)
- if (!In0P->sockaddrType.msgtl_header.msgt_inline)
- __mig_deallocate(* (vm_offset_t *) In0P->sockaddr, In0P->sockaddrType.msgtl_number);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- msgh_simple = TRUE;
- OutP->Head.msgh_size = 40;
-
- OutP->addrType = addrType;
-
- if (MACH_MSG_TYPE_PORT_ANY(addrPoly))
- msgh_simple = FALSE;
-
- OutP->addrType.msgt_name = addrPoly;
-
- if (!msgh_simple)
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-}
-
-/* Routine socket_fabricate_address */
-mig_internal void _Xsocket_fabricate_address
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t sockaddr_typeType;
- int sockaddr_type;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t addrType;
- mach_port_t addr;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_socket_fabricate_address
- (mach_port_t server, int sockaddr_type, mach_port_t *addr, mach_msg_type_name_t *addrPoly);
-
- boolean_t msgh_simple;
- auto const mach_msg_type_t sockaddr_typeCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t addrType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- mach_msg_type_name_t addrPoly;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->sockaddr_typeType, &sockaddr_typeCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_socket_fabricate_address(In0P->Head.msgh_request_port, In0P->sockaddr_type, &OutP->addr, &addrPoly);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- msgh_simple = TRUE;
- OutP->Head.msgh_size = 40;
-
- OutP->addrType = addrType;
-
- if (MACH_MSG_TYPE_PORT_ANY(addrPoly))
- msgh_simple = FALSE;
-
- OutP->addrType.msgt_name = addrPoly;
-
- if (!msgh_simple)
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-}
-
-/* Routine socket_whatis_address */
-mig_internal void _Xsocket_whatis_address
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t sockaddr_typeType;
- int sockaddr_type;
- mach_msg_type_long_t sockaddrType;
- char sockaddr[2048];
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_socket_whatis_address
- (sock_addr_t addr, int *sockaddr_type, data_t *sockaddr, mach_msg_type_number_t *sockaddrCnt);
-
- boolean_t msgh_simple;
- auto const mach_msg_type_t sockaddr_typeType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_long_t sockaddrType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 8,
- /* msgtl_size = */ 8,
- /* msgtl_number = */ 2048,
- };
-
- sock_addr_t addr;
- mach_msg_type_number_t sockaddrCnt;
-
- char *sockaddrP;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- addr = begin_using_sockaddr_port(In0P->Head.msgh_request_port);
-
- sockaddrP = OutP->sockaddr;
- sockaddrCnt = 2048;
-
- OutP->RetCode = S_socket_whatis_address(addr, &OutP->sockaddr_type, &sockaddrP, &sockaddrCnt);
- end_using_sockaddr_port(addr);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- msgh_simple = TRUE;
-
- OutP->sockaddr_typeType = sockaddr_typeType;
-
- OutP->sockaddrType = sockaddrType;
- if (sockaddrP != OutP->sockaddr) {
- OutP->sockaddrType.msgtl_header.msgt_inline = FALSE;
- OutP->sockaddrType.msgtl_header.msgt_deallocate = TRUE;
- *((char **)OutP->sockaddr) = sockaddrP;
- msgh_simple = FALSE;
- }
-
- OutP->sockaddrType.msgtl_number = sockaddrCnt;
- OutP->Head.msgh_size = 52 + ((OutP->sockaddrType.msgtl_header.msgt_inline) ? (sockaddrCnt + 3) & ~3 : sizeof(char *));
-
- if (!msgh_simple)
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-}
-
-/* Routine socket_shutdown */
-mig_internal void _Xsocket_shutdown
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t directionType;
- int direction;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_socket_shutdown
- (sock_user_t sock, int direction);
-
- auto const mach_msg_type_t directionCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- sock_user_t sock;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 32) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->directionType, &directionCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- sock = begin_using_socket_port(In0P->Head.msgh_request_port);
-
- OutP->RetCode = S_socket_shutdown(sock, In0P->direction);
- end_using_socket_port(sock);
-}
-
-/* Routine socket_getopt */
-mig_internal void _Xsocket_getopt
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t levelType;
- int level;
- mach_msg_type_t optionType;
- int option;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_long_t optvalType;
- char optval[2048];
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_socket_getopt
- (sock_user_t sock, int level, int option, data_t *optval, mach_msg_type_number_t *optvalCnt);
-
- boolean_t msgh_simple;
- auto const mach_msg_type_t levelCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t optionCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_long_t optvalType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 8,
- /* msgtl_size = */ 8,
- /* msgtl_number = */ 2048,
- };
-
- sock_user_t sock;
- mach_msg_type_number_t optvalCnt;
-
- char *optvalP;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->levelType, &levelCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->optionType, &optionCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- sock = begin_using_socket_port(In0P->Head.msgh_request_port);
-
- optvalP = OutP->optval;
- optvalCnt = 2048;
-
- OutP->RetCode = S_socket_getopt(sock, In0P->level, In0P->option, &optvalP, &optvalCnt);
- end_using_socket_port(sock);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- msgh_simple = TRUE;
-
- OutP->optvalType = optvalType;
- if (optvalP != OutP->optval) {
- OutP->optvalType.msgtl_header.msgt_inline = FALSE;
- OutP->optvalType.msgtl_header.msgt_deallocate = TRUE;
- *((char **)OutP->optval) = optvalP;
- msgh_simple = FALSE;
- }
-
- OutP->optvalType.msgtl_number = optvalCnt;
- OutP->Head.msgh_size = 44 + ((OutP->optvalType.msgtl_header.msgt_inline) ? (optvalCnt + 3) & ~3 : sizeof(char *));
-
- if (!msgh_simple)
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
-}
-
-/* Routine socket_setopt */
-mig_internal void _Xsocket_setopt
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t levelType;
- int level;
- mach_msg_type_t optionType;
- int option;
- mach_msg_type_long_t optvalType;
- char optval[2048];
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_socket_setopt
- (sock_user_t sock, int level, int option, data_t optval, mach_msg_type_number_t optvalCnt);
-
-#if TypeCheck
- boolean_t msgh_simple;
-#endif /* TypeCheck */
-
- unsigned int msgh_size;
-
- auto const mach_msg_type_t levelCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t optionCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- sock_user_t sock;
-
-#if TypeCheck
- msgh_size = In0P->Head.msgh_size;
- msgh_simple = !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX);
- if ((msgh_size < 52))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->levelType, &levelCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->optionType, &optionCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->optvalType.msgtl_header.msgt_longform != TRUE) ||
- (In0P->optvalType.msgtl_name != 8) ||
- (In0P->optvalType.msgtl_size != 8))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (msgh_size != 52 + ((In0P->optvalType.msgtl_header.msgt_inline) ? (In0P->optvalType.msgtl_number + 3) & ~3 : sizeof(char *)))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- sock = begin_using_socket_port(In0P->Head.msgh_request_port);
-
- OutP->RetCode = S_socket_setopt(sock, In0P->level, In0P->option, (In0P->optvalType.msgtl_header.msgt_inline) ? In0P->optval : *((char **)In0P->optval), In0P->optvalType.msgtl_number);
- if (OutP->RetCode == KERN_SUCCESS)
- if (!In0P->optvalType.msgtl_header.msgt_inline)
- __mig_deallocate(* (vm_offset_t *) In0P->optval, In0P->optvalType.msgtl_number);
- end_using_socket_port(sock);
-}
-
-/* Routine socket_send */
-mig_internal void _Xsocket_send
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t addrType;
- addr_port_t addr;
- mach_msg_type_t flagsType;
- int flags;
- mach_msg_type_long_t dataType;
- char data[2048];
- mach_msg_type_long_t portsType;
- mach_port_t ports[512];
- mach_msg_type_long_t controlType;
- char control[2048];
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t amountType;
- vm_size_t amount;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Request *In1P;
- register Request *In2P;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_socket_send
- (sock_user_t sock, sock_addr_t addr, int flags, data_t data, mach_msg_type_number_t dataCnt, portarray_t ports, mach_msg_type_number_t portsCnt, data_t control, mach_msg_type_number_t controlCnt, vm_size_t *amount);
-
- unsigned int msgh_size;
- unsigned int msgh_size_delta;
-
- auto const mach_msg_type_t addrCheck = {
- /* msgt_name = */ 17,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t flagsCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t amountType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- sock_user_t sock;
- sock_addr_t addr;
-
-#if TypeCheck
- msgh_size = In0P->Head.msgh_size;
- if ((msgh_size < 76) ||
- !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->addrType, &addrCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->flagsType, &flagsCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if ((In0P->dataType.msgtl_header.msgt_longform != TRUE) ||
- (In0P->dataType.msgtl_name != 8) ||
- (In0P->dataType.msgtl_size != 8))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- msgh_size_delta = (In0P->dataType.msgtl_header.msgt_inline) ? (In0P->dataType.msgtl_number + 3) & ~3 : sizeof(char *);
-#if TypeCheck
- if (msgh_size < 76 + msgh_size_delta)
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
- msgh_size -= msgh_size_delta;
-#endif /* TypeCheck */
-
- In1P = (Request *) ((char *) In0P + msgh_size_delta - 2048);
-
-#if TypeCheck
- if ((In1P->portsType.msgtl_header.msgt_longform != TRUE) ||
- (In1P->portsType.msgtl_name != 17) ||
- (In1P->portsType.msgtl_size != 32))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- msgh_size_delta = (In1P->portsType.msgtl_header.msgt_inline) ? 4 * In1P->portsType.msgtl_number : sizeof(mach_port_t *);
-#if TypeCheck
- if (msgh_size < 76 + msgh_size_delta)
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
- msgh_size -= msgh_size_delta;
-#endif /* TypeCheck */
-
- In2P = (Request *) ((char *) In1P + msgh_size_delta - 2048);
-
-#if TypeCheck
- if ((In2P->controlType.msgtl_header.msgt_longform != TRUE) ||
- (In2P->controlType.msgtl_name != 8) ||
- (In2P->controlType.msgtl_size != 8))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (msgh_size != 76 + ((In2P->controlType.msgtl_header.msgt_inline) ? (In2P->controlType.msgtl_number + 3) & ~3 : sizeof(char *)))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- sock = begin_using_socket_port(In0P->Head.msgh_request_port);
-
- addr = begin_using_sockaddr_port(In0P->addr);
-
- OutP->RetCode = S_socket_send(sock, addr, In0P->flags, (In0P->dataType.msgtl_header.msgt_inline) ? In0P->data : *((char **)In0P->data), In0P->dataType.msgtl_number, (In1P->portsType.msgtl_header.msgt_inline) ? In1P->ports : *((mach_port_t **)In1P->ports), In1P->portsType.msgtl_number, (In2P->controlType.msgtl_header.msgt_inline) ? In2P->control : *((char **)In2P->control), In2P->controlType.msgtl_number, &OutP->amount);
- if (OutP->RetCode == KERN_SUCCESS)
- if (!In2P->controlType.msgtl_header.msgt_inline)
- __mig_deallocate(* (vm_offset_t *) In2P->control, In2P->controlType.msgtl_number);
- if (OutP->RetCode == KERN_SUCCESS)
- if (!In1P->portsType.msgtl_header.msgt_inline)
- __mig_deallocate(* (vm_offset_t *) In1P->ports, 4 * In1P->portsType.msgtl_number);
- if (OutP->RetCode == KERN_SUCCESS)
- if (!In0P->dataType.msgtl_header.msgt_inline)
- __mig_deallocate(* (vm_offset_t *) In0P->data, In0P->dataType.msgtl_number);
- end_using_sockaddr_port(addr);
- end_using_socket_port(sock);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- OutP->Head.msgh_size = 40;
-
- OutP->amountType = amountType;
-}
-
-/* Routine socket_recv */
-mig_internal void _Xsocket_recv
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t flagsType;
- int flags;
- mach_msg_type_t amountType;
- vm_size_t amount;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- mach_msg_type_t addrType;
- mach_port_t addr;
- mach_msg_type_long_t dataType;
- char data[2048];
- mach_msg_type_long_t portsType;
- mach_port_t ports[512];
- mach_msg_type_long_t controlType;
- char control[2048];
- mach_msg_type_t outflagsType;
- int outflags;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_socket_recv
- (sock_user_t sock, mach_port_t *addr, mach_msg_type_name_t *addrPoly, int flags, data_t *data, mach_msg_type_number_t *dataCnt, portarray_t *ports, mach_msg_type_name_t *portsPoly, mach_msg_type_number_t *portsCnt, data_t *control, mach_msg_type_number_t *controlCnt, int *outflags, vm_size_t amount);
-
- boolean_t msgh_simple;
- unsigned int msgh_size;
- unsigned int msgh_size_delta;
-
- auto const mach_msg_type_t flagsCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t amountCheck = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_t addrType = {
- /* msgt_name = */ -1,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- auto const mach_msg_type_long_t dataType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 8,
- /* msgtl_size = */ 8,
- /* msgtl_number = */ 2048,
- };
-
- auto const mach_msg_type_long_t portsType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ -1,
- /* msgtl_size = */ 32,
- /* msgtl_number = */ 512,
- };
-
- auto const mach_msg_type_long_t controlType = {
- {
- /* msgt_name = */ 0,
- /* msgt_size = */ 0,
- /* msgt_number = */ 0,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ TRUE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- },
- /* msgtl_name = */ 8,
- /* msgtl_size = */ 8,
- /* msgtl_number = */ 2048,
- };
-
- auto const mach_msg_type_t outflagsType = {
- /* msgt_name = */ 2,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- sock_user_t sock;
- mach_msg_type_name_t addrPoly;
- mach_msg_type_number_t dataCnt;
- mach_port_t ports[512];
- mach_msg_type_name_t portsPoly;
- mach_msg_type_number_t portsCnt;
- char control[2048];
- mach_msg_type_number_t controlCnt;
- int outflags;
-
- char *dataP;
- mach_port_t *portsP;
- char *controlP;
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 40) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->flagsType, &flagsCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
-#if TypeCheck
- if (BAD_TYPECHECK(&In0P->amountType, &amountCheck))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- sock = begin_using_socket_port(In0P->Head.msgh_request_port);
-
- dataP = OutP->data;
- dataCnt = 2048;
-
- portsP = ports;
- portsCnt = 512;
-
- controlP = control;
- controlCnt = 2048;
-
- OutP->RetCode = S_socket_recv(sock, &OutP->addr, &addrPoly, In0P->flags, &dataP, &dataCnt, &portsP, &portsPoly, &portsCnt, &controlP, &controlCnt, &outflags, In0P->amount);
- end_using_socket_port(sock);
- if (OutP->RetCode != KERN_SUCCESS)
- return;
-
- msgh_simple = TRUE;
-
- OutP->addrType = addrType;
-
- if (MACH_MSG_TYPE_PORT_ANY(addrPoly))
- msgh_simple = FALSE;
-
- OutP->addrType.msgt_name = addrPoly;
-
- OutP->dataType = dataType;
- if (dataP != OutP->data) {
- OutP->dataType.msgtl_header.msgt_inline = FALSE;
- OutP->dataType.msgtl_header.msgt_deallocate = TRUE;
- *((char **)OutP->data) = dataP;
- msgh_simple = FALSE;
- }
-
- OutP->dataType.msgtl_number = dataCnt;
- msgh_size_delta = (OutP->dataType.msgtl_header.msgt_inline) ? (dataCnt + 3) & ~3 : sizeof(char *);
- msgh_size = 84 + msgh_size_delta;
- OutP = (Reply *) ((char *) OutP + msgh_size_delta - 2048);
-
- OutP->portsType = portsType;
-
- if (portsP != ports) {
- OutP->portsType.msgtl_header.msgt_inline = FALSE;
- OutP->portsType.msgtl_header.msgt_deallocate = TRUE;
- *((mach_port_t **)OutP->ports) = portsP;
- msgh_simple = FALSE;
- }
- else {
- memcpy(OutP->ports, ports, 4 * portsCnt);
- }
-
- if (MACH_MSG_TYPE_PORT_ANY(portsPoly))
- msgh_simple = FALSE;
-
- OutP->portsType.msgtl_name = portsPoly;
-
- OutP->portsType.msgtl_number = portsCnt;
- msgh_size_delta = (OutP->portsType.msgtl_header.msgt_inline) ? 4 * portsCnt : sizeof(mach_port_t *);
- msgh_size += msgh_size_delta;
- OutP = (Reply *) ((char *) OutP + msgh_size_delta - 2048);
-
- OutP->controlType = controlType;
-
- if (controlP != control) {
- OutP->controlType.msgtl_header.msgt_inline = FALSE;
- OutP->controlType.msgtl_header.msgt_deallocate = TRUE;
- *((char **)OutP->control) = controlP;
- msgh_simple = FALSE;
- }
- else {
- memcpy(OutP->control, control, controlCnt);
- }
-
- OutP->controlType.msgtl_number = controlCnt;
- msgh_size_delta = (OutP->controlType.msgtl_header.msgt_inline) ? (controlCnt + 3) & ~3 : sizeof(char *);
- msgh_size += msgh_size_delta;
- OutP = (Reply *) ((char *) OutP + msgh_size_delta - 2048);
-
- OutP->outflagsType = outflagsType;
-
- OutP->outflags = outflags;
-
- OutP = (Reply *) OutHeadP;
- if (!msgh_simple)
- OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
- OutP->Head.msgh_size = msgh_size;
-}
-
-static mig_routine_t socket_server_routines[] = {
- _Xsocket_create,
- _Xsocket_listen,
- _Xsocket_accept,
- _Xsocket_connect,
- _Xsocket_bind,
- _Xsocket_name,
- _Xsocket_peername,
- _Xsocket_connect2,
- _Xsocket_create_address,
- _Xsocket_fabricate_address,
- _Xsocket_whatis_address,
- _Xsocket_shutdown,
- _Xsocket_getopt,
- _Xsocket_setopt,
- _Xsocket_send,
- _Xsocket_recv,
-};
-
-mig_external boolean_t socket_server
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- register mach_msg_header_t *InP = InHeadP;
- register mig_reply_header_t *OutP = (mig_reply_header_t *) OutHeadP;
-
- auto const mach_msg_type_t RetCodeType = {
- /* msgt_name = */ MACH_MSG_TYPE_INTEGER_32,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- register mig_routine_t routine;
-
- OutP->Head.msgh_bits = MACH_MSGH_BITS(MACH_MSGH_BITS_REPLY(InP->msgh_bits), 0);
- OutP->Head.msgh_size = sizeof *OutP;
- OutP->Head.msgh_remote_port = InP->msgh_reply_port;
- OutP->Head.msgh_local_port = MACH_PORT_NULL;
- OutP->Head.msgh_seqno = 0;
- OutP->Head.msgh_id = InP->msgh_id + 100;
-
- OutP->RetCodeType = RetCodeType;
-
- if ((InP->msgh_id > 26015) || (InP->msgh_id < 26000) ||
- ((routine = socket_server_routines[InP->msgh_id - 26000]) == 0)) {
- OutP->RetCode = MIG_BAD_ID;
- return FALSE;
- }
- (*routine) (InP, &OutP->Head);
- return TRUE;
-}
-
-mig_external mig_routine_t socket_server_routine
- (const mach_msg_header_t *InHeadP)
-{
- register int msgh_id;
-
- msgh_id = InHeadP->msgh_id - 26000;
-
- if ((msgh_id > 15) || (msgh_id < 0))
- return 0;
-
- return socket_server_routines[msgh_id];
-}
-
diff --git a/pfinet.old/startup_notifyServer.c b/pfinet.old/startup_notifyServer.c
deleted file mode 100644
index 45710e4e..00000000
--- a/pfinet.old/startup_notifyServer.c
+++ /dev/null
@@ -1,129 +0,0 @@
-/* Module startup_notify */
-
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE 1
-#endif
-
-#define EXPORT_BOOLEAN
-#include <mach/boolean.h>
-#include <mach/kern_return.h>
-#include <mach/message.h>
-#include <mach/mig_errors.h>
-#include <mach/mig_support.h>
-
-#ifndef mig_internal
-#define mig_internal static
-#endif
-
-#ifndef mig_external
-#define mig_external
-#endif
-
-#ifndef TypeCheck
-#define TypeCheck 1
-#endif
-
-#ifndef UseExternRCSId
-#define UseExternRCSId 1
-#endif
-
-#define BAD_TYPECHECK(type, check) ({\
- union { mach_msg_type_t t; unsigned32_t w; } _t, _c;\
- _t.t = *(type); _c.t = *(check); _t.w != _c.w; })
-#define msgh_request_port msgh_local_port
-#define MACH_MSGH_BITS_REQUEST(bits) MACH_MSGH_BITS_LOCAL(bits)
-#define msgh_reply_port msgh_remote_port
-#define MACH_MSGH_BITS_REPLY(bits) MACH_MSGH_BITS_REMOTE(bits)
-
-#include <mach/std_types.h>
-#include <mach/mach_types.h>
-#include <device/device_types.h>
-#include <device/net_status.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/statfs.h>
-#include <sys/resource.h>
-#include <sys/utsname.h>
-#include <hurd/hurd_types.h>
-
-/* Routine startup_dosync */
-mig_internal void _Xstartup_dosync
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- typedef struct {
- mach_msg_header_t Head;
- } Request;
-
- typedef struct {
- mach_msg_header_t Head;
- mach_msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- register Request *In0P = (Request *) InHeadP;
- register Reply *OutP = (Reply *) OutHeadP;
- mig_external kern_return_t S_startup_dosync
- (mach_port_t notify_port);
-
-#if TypeCheck
- if ((In0P->Head.msgh_size != 24) ||
- (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX))
- { OutP->RetCode = MIG_BAD_ARGUMENTS; return; }
-#endif /* TypeCheck */
-
- OutP->RetCode = S_startup_dosync(In0P->Head.msgh_request_port);
-}
-
-static mig_routine_t startup_notify_server_routines[] = {
- _Xstartup_dosync,
-};
-
-mig_external boolean_t startup_notify_server
- (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
-{
- register mach_msg_header_t *InP = InHeadP;
- register mig_reply_header_t *OutP = (mig_reply_header_t *) OutHeadP;
-
- auto const mach_msg_type_t RetCodeType = {
- /* msgt_name = */ MACH_MSG_TYPE_INTEGER_32,
- /* msgt_size = */ 32,
- /* msgt_number = */ 1,
- /* msgt_inline = */ TRUE,
- /* msgt_longform = */ FALSE,
- /* msgt_deallocate = */ FALSE,
- /* msgt_unused = */ 0
- };
-
- register mig_routine_t routine;
-
- OutP->Head.msgh_bits = MACH_MSGH_BITS(MACH_MSGH_BITS_REPLY(InP->msgh_bits), 0);
- OutP->Head.msgh_size = sizeof *OutP;
- OutP->Head.msgh_remote_port = InP->msgh_reply_port;
- OutP->Head.msgh_local_port = MACH_PORT_NULL;
- OutP->Head.msgh_seqno = 0;
- OutP->Head.msgh_id = InP->msgh_id + 100;
-
- OutP->RetCodeType = RetCodeType;
-
- if ((InP->msgh_id > 29500) || (InP->msgh_id < 29500) ||
- ((routine = startup_notify_server_routines[InP->msgh_id - 29500]) == 0)) {
- OutP->RetCode = MIG_BAD_ID;
- return FALSE;
- }
- (*routine) (InP, &OutP->Head);
- return TRUE;
-}
-
-mig_external mig_routine_t startup_notify_server_routine
- (const mach_msg_header_t *InHeadP)
-{
- register int msgh_id;
-
- msgh_id = InHeadP->msgh_id - 29500;
-
- if ((msgh_id > 0) || (msgh_id < 0))
- return 0;
-
- return startup_notify_server_routines[msgh_id];
-}
-