this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Work on integrating kernel servers

+5861 -18
+4 -1
lkm/Makefile
··· 3 3 -I$(src)/../libc/include \ 4 4 -DMACH_KERNEL_PRIVATE \ 5 5 -DDARLING_DEBUG \ 6 + -D__LITTLE_ENDIAN__ \ 6 7 -Wno-undef 7 8 8 9 # If KERNELRELEASE is defined, we've been invoked from the ··· 10 11 ifneq ($(KERNELRELEASE),) 11 12 obj-m := darling-mach.o 12 13 darling-mach-objs := linuxmach.o ipc_space.o \ 13 - ipc_port.o ipc_right.o ipc_server.o debug.o 14 + ipc_port.o ipc_right.o ipc_server.o debug.o \ 15 + mig/clockServer.o mig/mach_hostServer.o \ 16 + mig/duct.o 14 17 15 18 # Otherwise we were called directly from the command 16 19 # line; invoke the kernel build system.
+15 -1
lkm/api.h
··· 9 9 NR_mach_reply_port, 10 10 NR__kernelrpc_mach_port_mod_refs, 11 11 NR_task_self_trap, 12 - NR__kernelrpc_mach_port_allocate 12 + NR__kernelrpc_mach_port_allocate, 13 + NR_mach_msg_overwrite_trap 13 14 }; 14 15 15 16 struct mach_port_mod_refs_args ··· 25 26 unsigned int task_right_name; 26 27 int right_type; 27 28 unsigned int out_right_name; 29 + }; 30 + 31 + struct mach_msg_send_overwrite_args 32 + { 33 + void* msg; 34 + unsigned int option; 35 + unsigned int send_size; 36 + unsigned int recv_size; 37 + unsigned int rcv_name; 38 + unsigned int timeout; 39 + unsigned int notify; 40 + void* rcv_msg; 41 + unsigned int rcv_limit; 28 42 }; 29 43 30 44 #endif
+240
lkm/ipc_port.c
··· 4 4 #include <linux/list.h> 5 5 #include "debug.h" 6 6 #include "ipc_right.h" 7 + #include "linuxmach.h" 7 8 8 9 mach_msg_return_t ipc_port_new(darling_mach_port_t** port_out) 9 10 { ··· 69 70 if (PORT_IS_VALID(port)) 70 71 mutex_unlock(&port->mutex); 71 72 } 73 + 74 + static 75 + mach_msg_return_t ipc_process_right(mach_task_t* task, 76 + mach_msg_type_name_t type, 77 + struct mach_port_right* in_right, 78 + struct mach_port_right** out_right) 79 + { 80 + mach_msg_return_t ret = MACH_MSG_SUCCESS; 81 + 82 + *out_right = NULL; 83 + 84 + switch (type) 85 + { 86 + case MACH_MSG_TYPE_COPY_SEND: 87 + case MACH_MSG_TYPE_MOVE_SEND: 88 + // in_remote_right must be a send right 89 + if (in_right->type != MACH_PORT_RIGHT_SEND) 90 + { 91 + ret = MACH_SEND_INVALID_TYPE; 92 + goto err; 93 + } 94 + 95 + *out_right = ipc_right_new(in_right->port, MACH_PORT_RIGHT_SEND); 96 + if (!*out_right) 97 + { 98 + ret = KERN_RESOURCE_SHORTAGE; 99 + goto err; 100 + } 101 + 102 + break; 103 + 104 + case MACH_MSG_TYPE_MAKE_SEND: 105 + case MACH_MSG_TYPE_MAKE_SEND_ONCE: 106 + // in_remote_right must be a receive right 107 + if (in_right->type != MACH_PORT_RIGHT_RECEIVE) 108 + { 109 + ret = MACH_SEND_INVALID_TYPE; 110 + goto err; 111 + } 112 + 113 + *out_right = ipc_right_new(in_right->port, 114 + (type == MACH_MSG_TYPE_MAKE_SEND) ? MACH_PORT_RIGHT_SEND : MACH_PORT_RIGHT_SEND_ONCE); 115 + 116 + break; 117 + case MACH_MSG_TYPE_MOVE_SEND_ONCE: 118 + // in_remote_right must be a send-once right 119 + if (in_right->type != MACH_PORT_RIGHT_SEND_ONCE) 120 + { 121 + ret = MACH_SEND_INVALID_TYPE; 122 + goto err; 123 + } 124 + 125 + *out_right = ipc_right_new(in_right->port, MACH_PORT_RIGHT_SEND_ONCE); 126 + 127 + break; 128 + case MACH_MSG_TYPE_MOVE_RECEIVE: 129 + // TODO 130 + ret = MACH_SEND_INVALID_HEADER; 131 + goto err; 132 + default: 133 + ret = MACH_SEND_INVALID_HEADER; 134 + goto err; 135 + } 136 + 137 + return MACH_MSG_SUCCESS; 138 + 139 + err: 140 + if (*out_right != NULL) 141 + ipc_right_put(*out_right); 142 + return ret; 143 + } 144 + 145 + static 146 + mach_msg_return_t ipc_process_right_abort(mach_task_t* task, 147 + mach_msg_type_name_t type, 148 + struct mach_port_right* out_right) 149 + { 150 + switch (type) 151 + { 152 + default: 153 + if (out_right != NULL) 154 + ipc_right_put(out_right); 155 + } 156 + 157 + return MACH_MSG_SUCCESS; 158 + } 159 + 160 + static 161 + mach_msg_return_t ipc_process_right_end(mach_task_t* task, 162 + mach_msg_type_name_t type, 163 + mach_port_t in_right_name, 164 + struct mach_port_right* in_right) 165 + { 166 + mach_msg_return_t ret = MACH_MSG_SUCCESS; 167 + 168 + switch (type) 169 + { 170 + case MACH_MSG_TYPE_COPY_SEND: 171 + break; 172 + case MACH_MSG_TYPE_MOVE_SEND: 173 + 174 + // Decrement the ref count in sender 175 + ipc_right_mod_refs(in_right, MACH_PORT_RIGHT_SEND, -1); 176 + 177 + if (in_right->num_refs == 0) 178 + { 179 + ipc_right_put(in_right); 180 + ipc_space_name_put(&task->namespace, in_right_name); 181 + } 182 + 183 + break; 184 + 185 + case MACH_MSG_TYPE_MAKE_SEND: 186 + case MACH_MSG_TYPE_MAKE_SEND_ONCE: 187 + 188 + break; 189 + case MACH_MSG_TYPE_MOVE_SEND_ONCE: 190 + 191 + // Destroy the right name in caller 192 + ipc_right_put(in_right); 193 + ipc_space_name_put(&task->namespace, in_right_name); 194 + 195 + break; 196 + case MACH_MSG_TYPE_MOVE_RECEIVE: 197 + // TODO 198 + ret = MACH_SEND_INVALID_HEADER; 199 + break; 200 + default: 201 + ret = MACH_SEND_INVALID_HEADER; 202 + break; 203 + } 204 + 205 + return ret; 206 + } 207 + 208 + mach_msg_return_t ipc_msg_send(mach_task_t* task, mach_msg_header_t* msg, 209 + mach_msg_timeout_t timeout) 210 + { 211 + mach_msg_return_t ret = MACH_MSG_SUCCESS; 212 + mach_msg_type_name_t type, resp_type; 213 + 214 + // The right that we received from caller 215 + struct mach_port_right* in_remote_right = NULL; 216 + // The right which was created from in_remote_right 217 + struct mach_port_right* out_remote_right = NULL; 218 + 219 + struct mach_port_right* in_local_right = NULL; 220 + struct mach_port_right* out_local_right = NULL; 221 + 222 + type = MACH_MSGH_BITS_REMOTE(msg->msgh_bits); 223 + resp_type = MACH_MSGH_BITS_LOCAL(msg->msgh_bits); 224 + 225 + ipc_space_lock(&task->namespace); 226 + 227 + // Find the target right/port 228 + in_remote_right = ipc_space_lookup(&task->namespace, msg->msgh_remote_port); 229 + 230 + if (in_remote_right == NULL) 231 + { 232 + ret = MACH_SEND_INVALID_DEST; 233 + goto err; 234 + } 235 + 236 + // Find the reply right/port 237 + in_local_right = ipc_space_lookup(&task->namespace, msg->msgh_local_port); 238 + 239 + if (in_local_right == NULL) 240 + { 241 + ret = MACH_SEND_INVALID_REPLY; 242 + goto err; 243 + } 244 + 245 + // Perform operation specified in type on target right 246 + ret = ipc_process_right(task, type, 247 + in_remote_right, &out_remote_right); 248 + 249 + if (ret != MACH_MSG_SUCCESS) 250 + goto err; 251 + 252 + // Cannot send messages to dead ports 253 + if (!PORT_IS_VALID(out_remote_right->port)) 254 + { 255 + ret = MACH_SEND_INVALID_DEST; 256 + goto err; 257 + } 258 + 259 + // Perform operation specified in type on reply right 260 + ret = ipc_process_right(task, resp_type, 261 + in_local_right, &out_local_right); 262 + if (ret != MACH_MSG_SUCCESS) 263 + goto err; 264 + 265 + ret = ipc_msg_deliver(msg, out_remote_right, out_local_right, timeout); 266 + 267 + // Finish operation specified in type on target right 268 + ipc_process_right_end(task, type, msg->msgh_remote_port, out_remote_right); 269 + 270 + // Finish operation specified in type on reply right 271 + ipc_process_right_end(task, resp_type, msg->msgh_local_port, 272 + out_local_right); 273 + 274 + if (in_remote_right != NULL) 275 + ipc_port_unlock(in_remote_right->port); 276 + if (in_local_right != NULL) 277 + ipc_port_unlock(in_local_right->port); 278 + 279 + ipc_space_unlock(&task->namespace); 280 + return ret; 281 + 282 + err: 283 + // Abort operation specified in type on target right 284 + ipc_process_right_abort(task, type, out_remote_right); 285 + // Abort operation specified in type on reply right 286 + ipc_process_right_abort(task, resp_type, out_local_right); 287 + 288 + if (in_remote_right != NULL) 289 + ipc_port_unlock(in_remote_right->port); 290 + if (in_local_right != NULL) 291 + ipc_port_unlock(in_local_right->port); 292 + 293 + ipc_space_unlock(&task->namespace); 294 + return ret; 295 + } 296 + 297 + mach_msg_return_t ipc_msg_deliver(mach_msg_header_t* msg, 298 + struct mach_port_right* target, 299 + struct mach_port_right* reply, 300 + mach_msg_timeout_t timeout) 301 + { 302 + if (target->port->is_server_port) 303 + { 304 + 305 + } 306 + else 307 + { 308 + // TODO: Enqueue message and wait 309 + return KERN_NOT_SUPPORTED; 310 + } 311 + }
+24 -1
lkm/ipc_port.h
··· 4 4 #include <linux/mutex.h> 5 5 #include <linux/atomic.h> 6 6 7 + struct any_subsystem; 8 + 7 9 typedef struct server_port server_port_t; 8 10 struct server_port 9 11 { 10 12 /* E.g. IPC_SERVER_TYPE_TASK */ 11 13 int port_type; 12 14 13 - boolean_t (*cb_handler)(mach_msg_header_t* /* in */, mach_msg_header_t* /* out */); 15 + mig_subsystem_t subsystem; 14 16 void (*cb_free)(server_port_t*); 15 17 16 18 void* private_data; ··· 37 39 }; 38 40 }; 39 41 typedef struct darling_mach_port darling_mach_port_t; 42 + typedef struct mach_task mach_task_t; 43 + struct mach_port_right; 40 44 41 45 mach_msg_return_t ipc_port_new(darling_mach_port_t** port); 42 46 ··· 58 62 * Checks for null and dead ports. 59 63 */ 60 64 void ipc_port_unlock(darling_mach_port_t* port); 65 + 66 + mach_msg_return_t ipc_msg_send(mach_task_t* task, mach_msg_header_t* msg, mach_msg_timeout_t timeout); 67 + 68 + /** 69 + * Enqueues the given message for reception. 70 + * 71 + * For kernel server ports, the message will be processed immediately. 72 + * For userspace ports, the message will be enqueued and the call will block 73 + * until timeout expires. 74 + * 75 + * @param msg Message to be delivered. 76 + * @param target Target port/right where to deliver the message. 77 + * @param reply Reply port/right. 78 + * @param timeout Timeout (or MACH_MSG_TIMEOUT_NONE). 79 + */ 80 + mach_msg_return_t ipc_msg_deliver(mach_msg_header_t* msg, 81 + struct mach_port_right* target, 82 + struct mach_port_right* reply, 83 + mach_msg_timeout_t timeout); 61 84 62 85 #endif
+4 -14
lkm/ipc_server.c
··· 2 2 #include "ipc_server.h" 3 3 #include <linux/slab.h> 4 4 #include "debug.h" 5 - 6 - static boolean_t dummy_task_server_handler(mach_msg_header_t* in, mach_msg_header_t* out) 7 - { 8 - debug_msg("dummy_task_server_handler() invoked, msg=%p\n", in); 9 - return false; 10 - } 11 - 12 - static boolean_t dummy_host_server_handler(mach_msg_header_t* in, mach_msg_header_t* out) 13 - { 14 - debug_msg("dummy_host_server_handler() invoked, msg=%p\n", in); 15 - return false; 16 - } 5 + #include "mig_includes_pre.h" 6 + #include "mig/mach_hostServer.h" 17 7 18 8 static void task_free(server_port_t* kport) 19 9 { ··· 39 29 40 30 port->is_server_port = true; 41 31 port->server_port.port_type = IPC_SERVER_TYPE_TASK; 42 - port->server_port.cb_handler = dummy_task_server_handler; 32 + port->server_port.subsystem = MIG_SUBSYSTEM_NULL; // FIXME 43 33 port->server_port.private_data = task; 44 34 port->server_port.cb_free = task_free; 45 35 } ··· 58 48 { 59 49 port->is_server_port = true; 60 50 port->server_port.port_type = IPC_SERVER_TYPE_HOST; 61 - port->server_port.cb_handler = dummy_host_server_handler; 51 + port->server_port.subsystem = (mig_subsystem_t) &mach_host_subsystem; 62 52 port->server_port.cb_free = NULL; 63 53 }
+1
lkm/ipc_server.h
··· 1 1 #ifndef IPC_SERVER_H 2 2 #define IPC_SERVER_H 3 + #include "mach_includes.h" 3 4 #include "ipc_port.h" 4 5 #include "linuxmach.h" 5 6
+47 -1
lkm/linuxmach.c
··· 33 33 [sc(NR__kernelrpc_mach_port_mod_refs)] = (trap_handler) _kernelrpc_mach_port_mod_refs_trap, 34 34 [sc(NR_task_self_trap)] = (trap_handler) mach_task_self_trap, 35 35 [sc(NR__kernelrpc_mach_port_allocate)] = (trap_handler) _kernelrpc_mach_port_allocate_trap, 36 + [sc(NR_mach_msg_overwrite_trap)] = (trap_handler) mach_msg_overwrite_trap, 36 37 }; 37 38 #undef sc 38 39 ··· 77 78 int mach_dev_release(struct inode* ino, struct file* file) 78 79 { 79 80 darling_mach_port_t* task_port; 80 - mach_task_t* task; 81 81 82 82 task_port = (darling_mach_port_t*) file->private_data; 83 83 ipc_port_put(task_port); ··· 265 265 } 266 266 267 267 return KERN_SUCCESS; 268 + } 269 + 270 + kern_return_t mach_msg_overwrite_trap(mach_task_t* task, 271 + struct mach_msg_send_overwrite_args* in_args) 272 + { 273 + struct mach_msg_send_overwrite_args args; 274 + kern_return_t ret; 275 + 276 + if (copy_from_user(&args, in_args, sizeof(args))) 277 + return KERN_INVALID_ADDRESS; 278 + 279 + if (args.option & MACH_SEND_MSG) 280 + { 281 + mach_msg_header_t* msg; 282 + 283 + if (args.send_size > 10*4096) 284 + return MACH_SEND_NO_BUFFER; 285 + if (args.send_size < sizeof(mach_msg_header_t)) 286 + return MACH_SEND_MSG_TOO_SMALL; 287 + 288 + msg = (mach_msg_header_t*) kmalloc(args.send_size, GFP_KERNEL); 289 + if (msg == NULL) 290 + return MACH_SEND_NO_BUFFER; 291 + 292 + if (msg->msgh_size > args.send_size - sizeof(mach_msg_header_t)) 293 + { 294 + ret = MACH_SEND_MSG_TOO_SMALL; 295 + goto send_err; 296 + } 297 + 298 + ret = ipc_msg_send(task, msg, 299 + (args.option & MACH_SEND_TIMEOUT) ? args.timeout : MACH_MSG_TIMEOUT_NONE); 300 + 301 + if (ret != MACH_MSG_SUCCESS) 302 + { 303 + send_err: 304 + kfree(msg); 305 + return ret; 306 + } 307 + } 308 + 309 + if (args.option & MACH_RCV_MSG) 310 + { 311 + 312 + } 313 + return MACH_MSG_SUCCESS; 268 314 } 269 315 270 316 module_init(mach_init);
+2
lkm/linuxmach.h
··· 26 26 mach_port_name_t mach_task_self_trap(mach_task_t* task); 27 27 kern_return_t _kernelrpc_mach_port_allocate_trap(mach_task_t* task, 28 28 struct mach_port_allocate_args* args); 29 + kern_return_t mach_msg_overwrite_trap(mach_task_t* task, 30 + struct mach_msg_send_overwrite_args* args); 29 31 30 32 #endif
+5
lkm/mach_includes.h
··· 3 3 4 4 #include <mach/port.h> 5 5 #include <mach/message.h> 6 + #include <mach/mig.h> 6 7 7 8 /* Undef some names that conflict with Linux defines */ 8 9 #undef __used 9 10 #undef __deprecated 10 11 #undef __pure 11 12 #undef __unused 13 + #undef ntohs 12 14 #undef SIZE_MAX 13 15 #undef PAGE_SIZE 14 16 #undef PAGE_SHIFT 15 17 #undef PAGE_MASK 18 + #undef NSEC_PER_USEC 19 + #undef NSEC_PER_MSEC 20 + #undef NSEC_PER_SEC 16 21 17 22 #endif
+401
lkm/mig/clockServer.c
··· 1 + /* 2 + * IDENTIFICATION: 3 + * stub generated Tue Aug 4 16:44:55 2015 4 + * with a MiG generated by 1.0 5 + * OPTIONS: 6 + */ 7 + 8 + /* Module clock */ 9 + 10 + #define __MIG_check__Request__clock_subsystem__ 1 11 + 12 + #include "clockServer.h" 13 + 14 + #ifndef mig_internal 15 + #define mig_internal static __inline__ 16 + #endif /* mig_internal */ 17 + 18 + #ifndef mig_external 19 + #define mig_external 20 + #endif /* mig_external */ 21 + 22 + #if !defined(__MigTypeCheck) && defined(TypeCheck) 23 + #define __MigTypeCheck TypeCheck /* Legacy setting */ 24 + #endif /* !defined(__MigTypeCheck) */ 25 + 26 + #if !defined(__MigKernelSpecificCode) && defined(_MIG_KERNEL_SPECIFIC_CODE_) 27 + #define __MigKernelSpecificCode _MIG_KERNEL_SPECIFIC_CODE_ /* Legacy setting */ 28 + #endif /* !defined(__MigKernelSpecificCode) */ 29 + 30 + #ifndef LimitCheck 31 + #define LimitCheck 0 32 + #endif /* LimitCheck */ 33 + 34 + #ifndef min 35 + #define min(a,b) ( ((a) < (b))? (a): (b) ) 36 + #endif /* min */ 37 + 38 + #if !defined(_WALIGN_) 39 + #define _WALIGN_(x) (((x) + 7) & ~7) 40 + #endif /* !defined(_WALIGN_) */ 41 + 42 + #if !defined(_WALIGNSZ_) 43 + #define _WALIGNSZ_(x) _WALIGN_(sizeof(x)) 44 + #endif /* !defined(_WALIGNSZ_) */ 45 + 46 + #ifndef UseStaticTemplates 47 + #define UseStaticTemplates 0 48 + #endif /* UseStaticTemplates */ 49 + 50 + #ifndef __DeclareRcvRpc 51 + #define __DeclareRcvRpc(_NUM_, _NAME_) 52 + #endif /* __DeclareRcvRpc */ 53 + 54 + #ifndef __BeforeRcvRpc 55 + #define __BeforeRcvRpc(_NUM_, _NAME_) 56 + #endif /* __BeforeRcvRpc */ 57 + 58 + #ifndef __AfterRcvRpc 59 + #define __AfterRcvRpc(_NUM_, _NAME_) 60 + #endif /* __AfterRcvRpc */ 61 + 62 + #ifndef __DeclareRcvSimple 63 + #define __DeclareRcvSimple(_NUM_, _NAME_) 64 + #endif /* __DeclareRcvSimple */ 65 + 66 + #ifndef __BeforeRcvSimple 67 + #define __BeforeRcvSimple(_NUM_, _NAME_) 68 + #endif /* __BeforeRcvSimple */ 69 + 70 + #ifndef __AfterRcvSimple 71 + #define __AfterRcvSimple(_NUM_, _NAME_) 72 + #endif /* __AfterRcvSimple */ 73 + 74 + #define novalue void 75 + 76 + #define msgh_request_port msgh_local_port 77 + #define MACH_MSGH_BITS_REQUEST(bits) MACH_MSGH_BITS_LOCAL(bits) 78 + #define msgh_reply_port msgh_remote_port 79 + #define MACH_MSGH_BITS_REPLY(bits) MACH_MSGH_BITS_REMOTE(bits) 80 + 81 + #define MIG_RETURN_ERROR(X, code) {\ 82 + ((mig_reply_error_t *)X)->RetCode = code;\ 83 + ((mig_reply_error_t *)X)->NDR = NDR_record;\ 84 + return;\ 85 + } 86 + 87 + /* Forward Declarations */ 88 + 89 + 90 + mig_internal novalue _Xclock_get_time 91 + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); 92 + 93 + mig_internal novalue _Xclock_get_attributes 94 + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); 95 + 96 + mig_internal novalue _Xclock_alarm 97 + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); 98 + 99 + 100 + #if ( __MigTypeCheck ) 101 + #if __MIG_check__Request__clock_subsystem__ 102 + #if !defined(__MIG_check__Request__clock_get_time_t__defined) 103 + #define __MIG_check__Request__clock_get_time_t__defined 104 + 105 + mig_internal kern_return_t __MIG_check__Request__clock_get_time_t(__attribute__((__unused__)) __Request__clock_get_time_t *In0P) 106 + { 107 + 108 + typedef __Request__clock_get_time_t __Request; 109 + #if __MigTypeCheck 110 + if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || 111 + (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) 112 + return MIG_BAD_ARGUMENTS; 113 + #endif /* __MigTypeCheck */ 114 + 115 + return MACH_MSG_SUCCESS; 116 + } 117 + #endif /* !defined(__MIG_check__Request__clock_get_time_t__defined) */ 118 + #endif /* __MIG_check__Request__clock_subsystem__ */ 119 + #endif /* ( __MigTypeCheck ) */ 120 + 121 + 122 + /* Routine clock_get_time */ 123 + mig_internal novalue _Xclock_get_time 124 + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) 125 + { 126 + 127 + #ifdef __MigPackStructs 128 + #pragma pack(8) 129 + #endif 130 + typedef struct { 131 + mach_msg_header_t Head; 132 + mach_msg_trailer_t trailer; 133 + } Request; 134 + #ifdef __MigPackStructs 135 + #pragma pack() 136 + #endif 137 + typedef __Request__clock_get_time_t __Request; 138 + typedef __Reply__clock_get_time_t Reply; 139 + 140 + /* 141 + * typedef struct { 142 + * mach_msg_header_t Head; 143 + * NDR_record_t NDR; 144 + * kern_return_t RetCode; 145 + * } mig_reply_error_t; 146 + */ 147 + 148 + Request *In0P = (Request *) InHeadP; 149 + Reply *OutP = (Reply *) OutHeadP; 150 + #ifdef __MIG_check__Request__clock_get_time_t__defined 151 + kern_return_t check_result; 152 + #endif /* __MIG_check__Request__clock_get_time_t__defined */ 153 + 154 + __DeclareRcvRpc(1000, "clock_get_time") 155 + __BeforeRcvRpc(1000, "clock_get_time") 156 + 157 + #if defined(__MIG_check__Request__clock_get_time_t__defined) 158 + check_result = __MIG_check__Request__clock_get_time_t((__Request *)In0P); 159 + if (check_result != MACH_MSG_SUCCESS) 160 + { MIG_RETURN_ERROR(OutP, check_result); } 161 + #endif /* defined(__MIG_check__Request__clock_get_time_t__defined) */ 162 + 163 + OutP->RetCode = clock_get_time(In0P->Head.msgh_request_port, &OutP->cur_time); 164 + if (OutP->RetCode != KERN_SUCCESS) { 165 + MIG_RETURN_ERROR(OutP, OutP->RetCode); 166 + } 167 + 168 + OutP->NDR = NDR_record; 169 + 170 + 171 + OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply)); 172 + __AfterRcvRpc(1000, "clock_get_time") 173 + } 174 + 175 + #if ( __MigTypeCheck ) 176 + #if __MIG_check__Request__clock_subsystem__ 177 + #if !defined(__MIG_check__Request__clock_get_attributes_t__defined) 178 + #define __MIG_check__Request__clock_get_attributes_t__defined 179 + 180 + mig_internal kern_return_t __MIG_check__Request__clock_get_attributes_t(__attribute__((__unused__)) __Request__clock_get_attributes_t *In0P) 181 + { 182 + 183 + typedef __Request__clock_get_attributes_t __Request; 184 + #if __MigTypeCheck 185 + if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || 186 + (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) 187 + return MIG_BAD_ARGUMENTS; 188 + #endif /* __MigTypeCheck */ 189 + 190 + return MACH_MSG_SUCCESS; 191 + } 192 + #endif /* !defined(__MIG_check__Request__clock_get_attributes_t__defined) */ 193 + #endif /* __MIG_check__Request__clock_subsystem__ */ 194 + #endif /* ( __MigTypeCheck ) */ 195 + 196 + 197 + /* Routine clock_get_attributes */ 198 + mig_internal novalue _Xclock_get_attributes 199 + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) 200 + { 201 + 202 + #ifdef __MigPackStructs 203 + #pragma pack(8) 204 + #endif 205 + typedef struct { 206 + mach_msg_header_t Head; 207 + NDR_record_t NDR; 208 + clock_flavor_t flavor; 209 + mach_msg_type_number_t clock_attrCnt; 210 + mach_msg_trailer_t trailer; 211 + } Request; 212 + #ifdef __MigPackStructs 213 + #pragma pack() 214 + #endif 215 + typedef __Request__clock_get_attributes_t __Request; 216 + typedef __Reply__clock_get_attributes_t Reply; 217 + 218 + /* 219 + * typedef struct { 220 + * mach_msg_header_t Head; 221 + * NDR_record_t NDR; 222 + * kern_return_t RetCode; 223 + * } mig_reply_error_t; 224 + */ 225 + 226 + Request *In0P = (Request *) InHeadP; 227 + Reply *OutP = (Reply *) OutHeadP; 228 + #ifdef __MIG_check__Request__clock_get_attributes_t__defined 229 + kern_return_t check_result; 230 + #endif /* __MIG_check__Request__clock_get_attributes_t__defined */ 231 + 232 + __DeclareRcvRpc(1001, "clock_get_attributes") 233 + __BeforeRcvRpc(1001, "clock_get_attributes") 234 + 235 + #if defined(__MIG_check__Request__clock_get_attributes_t__defined) 236 + check_result = __MIG_check__Request__clock_get_attributes_t((__Request *)In0P); 237 + if (check_result != MACH_MSG_SUCCESS) 238 + { MIG_RETURN_ERROR(OutP, check_result); } 239 + #endif /* defined(__MIG_check__Request__clock_get_attributes_t__defined) */ 240 + 241 + OutP->clock_attrCnt = 1; 242 + if (In0P->clock_attrCnt < OutP->clock_attrCnt) 243 + OutP->clock_attrCnt = In0P->clock_attrCnt; 244 + 245 + OutP->RetCode = clock_get_attributes(In0P->Head.msgh_request_port, In0P->flavor, OutP->clock_attr, &OutP->clock_attrCnt); 246 + if (OutP->RetCode != KERN_SUCCESS) { 247 + MIG_RETURN_ERROR(OutP, OutP->RetCode); 248 + } 249 + 250 + OutP->NDR = NDR_record; 251 + 252 + OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply) - 4) + (_WALIGN_((4 * OutP->clock_attrCnt + 7) & ~7)); 253 + 254 + __AfterRcvRpc(1001, "clock_get_attributes") 255 + } 256 + 257 + #if ( __MigTypeCheck ) 258 + #if __MIG_check__Request__clock_subsystem__ 259 + #if !defined(__MIG_check__Request__clock_alarm_t__defined) 260 + #define __MIG_check__Request__clock_alarm_t__defined 261 + 262 + mig_internal kern_return_t __MIG_check__Request__clock_alarm_t(__attribute__((__unused__)) __Request__clock_alarm_t *In0P) 263 + { 264 + 265 + typedef __Request__clock_alarm_t __Request; 266 + #if __MigTypeCheck 267 + if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || 268 + (In0P->msgh_body.msgh_descriptor_count != 1) || 269 + (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) 270 + return MIG_BAD_ARGUMENTS; 271 + #endif /* __MigTypeCheck */ 272 + 273 + #if __MigTypeCheck 274 + if (In0P->alarm_port.type != MACH_MSG_PORT_DESCRIPTOR) 275 + return MIG_TYPE_ERROR; 276 + #endif /* __MigTypeCheck */ 277 + 278 + return MACH_MSG_SUCCESS; 279 + } 280 + #endif /* !defined(__MIG_check__Request__clock_alarm_t__defined) */ 281 + #endif /* __MIG_check__Request__clock_subsystem__ */ 282 + #endif /* ( __MigTypeCheck ) */ 283 + 284 + 285 + /* Routine clock_alarm */ 286 + mig_internal novalue _Xclock_alarm 287 + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) 288 + { 289 + 290 + #ifdef __MigPackStructs 291 + #pragma pack(8) 292 + #endif 293 + typedef struct { 294 + mach_msg_header_t Head; 295 + /* start of the kernel processed data */ 296 + mach_msg_body_t msgh_body; 297 + mach_msg_port_descriptor_t alarm_port; 298 + /* end of the kernel processed data */ 299 + NDR_record_t NDR; 300 + alarm_type_t alarm_type; 301 + mach_timespec_t alarm_time; 302 + mach_msg_trailer_t trailer; 303 + } Request; 304 + #ifdef __MigPackStructs 305 + #pragma pack() 306 + #endif 307 + typedef __Request__clock_alarm_t __Request; 308 + typedef __Reply__clock_alarm_t Reply; 309 + 310 + /* 311 + * typedef struct { 312 + * mach_msg_header_t Head; 313 + * NDR_record_t NDR; 314 + * kern_return_t RetCode; 315 + * } mig_reply_error_t; 316 + */ 317 + 318 + Request *In0P = (Request *) InHeadP; 319 + Reply *OutP = (Reply *) OutHeadP; 320 + #ifdef __MIG_check__Request__clock_alarm_t__defined 321 + kern_return_t check_result; 322 + #endif /* __MIG_check__Request__clock_alarm_t__defined */ 323 + 324 + __DeclareRcvRpc(1002, "clock_alarm") 325 + __BeforeRcvRpc(1002, "clock_alarm") 326 + 327 + #if defined(__MIG_check__Request__clock_alarm_t__defined) 328 + check_result = __MIG_check__Request__clock_alarm_t((__Request *)In0P); 329 + if (check_result != MACH_MSG_SUCCESS) 330 + { MIG_RETURN_ERROR(OutP, check_result); } 331 + #endif /* defined(__MIG_check__Request__clock_alarm_t__defined) */ 332 + 333 + OutP->RetCode = clock_alarm(In0P->Head.msgh_request_port, In0P->alarm_type, In0P->alarm_time, In0P->alarm_port.name, In0P->alarm_port.disposition); 334 + 335 + OutP->NDR = NDR_record; 336 + 337 + 338 + __AfterRcvRpc(1002, "clock_alarm") 339 + } 340 + 341 + 342 + 343 + /* Description of this subsystem, for use in direct RPC */ 344 + const struct clock_subsystem clock_subsystem = { 345 + clock_server_routine, 346 + 1000, 347 + 1003, 348 + (mach_msg_size_t)sizeof(union __ReplyUnion__clock_subsystem), 349 + (vm_address_t)0, 350 + { 351 + { (mig_impl_routine_t) 0, 352 + (mig_stub_routine_t) _Xclock_get_time, 2, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__clock_get_time_t)}, 353 + { (mig_impl_routine_t) 0, 354 + (mig_stub_routine_t) _Xclock_get_attributes, 5, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__clock_get_attributes_t)}, 355 + { (mig_impl_routine_t) 0, 356 + (mig_stub_routine_t) _Xclock_alarm, 7, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__clock_alarm_t)}, 357 + } 358 + }; 359 + 360 + mig_external boolean_t clock_server 361 + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) 362 + { 363 + /* 364 + * typedef struct { 365 + * mach_msg_header_t Head; 366 + * NDR_record_t NDR; 367 + * kern_return_t RetCode; 368 + * } mig_reply_error_t; 369 + */ 370 + 371 + register mig_routine_t routine; 372 + 373 + OutHeadP->msgh_bits = MACH_MSGH_BITS(MACH_MSGH_BITS_REPLY(InHeadP->msgh_bits), 0); 374 + OutHeadP->msgh_remote_port = InHeadP->msgh_reply_port; 375 + /* Minimal size: routine() will update it if different */ 376 + OutHeadP->msgh_size = (mach_msg_size_t)sizeof(mig_reply_error_t); 377 + OutHeadP->msgh_local_port = MACH_PORT_NULL; 378 + OutHeadP->msgh_id = InHeadP->msgh_id + 100; 379 + 380 + if ((InHeadP->msgh_id > 1002) || (InHeadP->msgh_id < 1000) || 381 + ((routine = clock_subsystem.routine[InHeadP->msgh_id - 1000].stub_routine) == 0)) { 382 + ((mig_reply_error_t *)OutHeadP)->NDR = NDR_record; 383 + ((mig_reply_error_t *)OutHeadP)->RetCode = MIG_BAD_ID; 384 + return FALSE; 385 + } 386 + (*routine) (InHeadP, OutHeadP); 387 + return TRUE; 388 + } 389 + 390 + mig_external mig_routine_t clock_server_routine 391 + (mach_msg_header_t *InHeadP) 392 + { 393 + register int msgh_id; 394 + 395 + msgh_id = InHeadP->msgh_id - 1000; 396 + 397 + if ((msgh_id > 2) || (msgh_id < 0)) 398 + return 0; 399 + 400 + return clock_subsystem.routine[msgh_id].stub_routine; 401 + }
+263
lkm/mig/clockServer.h
··· 1 + #ifndef _clock_server_ 2 + #define _clock_server_ 3 + 4 + /* Module clock */ 5 + 6 + #include <string.h> 7 + #include <mach/ndr.h> 8 + #include <mach/boolean.h> 9 + #include <mach/kern_return.h> 10 + #include <mach/notify.h> 11 + #include <mach/mach_types.h> 12 + #include <mach/message.h> 13 + #include <mach/mig_errors.h> 14 + #include <mach/port.h> 15 + 16 + /* BEGIN VOUCHER CODE */ 17 + 18 + #ifndef KERNEL 19 + #if defined(__has_include) 20 + #if __has_include(<mach/mig_voucher_support.h>) 21 + #ifndef USING_VOUCHERS 22 + #define USING_VOUCHERS 23 + #endif 24 + #ifndef __VOUCHER_FORWARD_TYPE_DECLS__ 25 + #define __VOUCHER_FORWARD_TYPE_DECLS__ 26 + #ifdef __cplusplus 27 + extern "C" { 28 + #endif 29 + extern boolean_t voucher_mach_msg_set(mach_msg_header_t *msg) __attribute__((weak_import)); 30 + #ifdef __cplusplus 31 + } 32 + #endif 33 + #endif // __VOUCHER_FORWARD_TYPE_DECLS__ 34 + #endif // __has_include(<mach/mach_voucher_types.h>) 35 + #endif // __has_include 36 + #endif // !KERNEL 37 + 38 + /* END VOUCHER CODE */ 39 + 40 + 41 + #ifdef AUTOTEST 42 + #ifndef FUNCTION_PTR_T 43 + #define FUNCTION_PTR_T 44 + typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); 45 + typedef struct { 46 + char *name; 47 + function_ptr_t function; 48 + } function_table_entry; 49 + typedef function_table_entry *function_table_t; 50 + #endif /* FUNCTION_PTR_T */ 51 + #endif /* AUTOTEST */ 52 + 53 + #ifndef clock_MSG_COUNT 54 + #define clock_MSG_COUNT 3 55 + #endif /* clock_MSG_COUNT */ 56 + 57 + #include <mach/std_types.h> 58 + #include <mach/mig.h> 59 + #include <mach/mig.h> 60 + #include <mach/mach_types.h> 61 + #include <mach/mach_types.h> 62 + 63 + #ifdef __BeforeMigServerHeader 64 + __BeforeMigServerHeader 65 + #endif /* __BeforeMigServerHeader */ 66 + 67 + 68 + /* Routine clock_get_time */ 69 + #ifdef mig_external 70 + mig_external 71 + #else 72 + extern 73 + #endif /* mig_external */ 74 + kern_return_t clock_get_time 75 + ( 76 + clock_serv_t clock_serv, 77 + mach_timespec_t *cur_time 78 + ); 79 + 80 + /* Routine clock_get_attributes */ 81 + #ifdef mig_external 82 + mig_external 83 + #else 84 + extern 85 + #endif /* mig_external */ 86 + kern_return_t clock_get_attributes 87 + ( 88 + clock_serv_t clock_serv, 89 + clock_flavor_t flavor, 90 + clock_attr_t clock_attr, 91 + mach_msg_type_number_t *clock_attrCnt 92 + ); 93 + 94 + /* Routine clock_alarm */ 95 + #ifdef mig_external 96 + mig_external 97 + #else 98 + extern 99 + #endif /* mig_external */ 100 + kern_return_t clock_alarm 101 + ( 102 + clock_serv_t clock_serv, 103 + alarm_type_t alarm_type, 104 + mach_timespec_t alarm_time, 105 + clock_reply_t alarm_port, 106 + mach_msg_type_name_t alarm_portPoly 107 + ); 108 + 109 + #ifdef mig_external 110 + mig_external 111 + #else 112 + extern 113 + #endif /* mig_external */ 114 + boolean_t clock_server( 115 + mach_msg_header_t *InHeadP, 116 + mach_msg_header_t *OutHeadP); 117 + 118 + #ifdef mig_external 119 + mig_external 120 + #else 121 + extern 122 + #endif /* mig_external */ 123 + mig_routine_t clock_server_routine( 124 + mach_msg_header_t *InHeadP); 125 + 126 + 127 + /* Description of this subsystem, for use in direct RPC */ 128 + extern const struct clock_subsystem { 129 + mig_server_routine_t server; /* Server routine */ 130 + mach_msg_id_t start; /* Min routine number */ 131 + mach_msg_id_t end; /* Max routine number + 1 */ 132 + unsigned int maxsize; /* Max msg size */ 133 + vm_address_t reserved; /* Reserved */ 134 + struct routine_descriptor /*Array of routine descriptors */ 135 + routine[3]; 136 + } clock_subsystem; 137 + 138 + /* typedefs for all requests */ 139 + 140 + #ifndef __Request__clock_subsystem__defined 141 + #define __Request__clock_subsystem__defined 142 + 143 + #ifdef __MigPackStructs 144 + #pragma pack(8) 145 + #endif 146 + typedef struct { 147 + mach_msg_header_t Head; 148 + } __Request__clock_get_time_t; 149 + #ifdef __MigPackStructs 150 + #pragma pack() 151 + #endif 152 + 153 + #ifdef __MigPackStructs 154 + #pragma pack(8) 155 + #endif 156 + typedef struct { 157 + mach_msg_header_t Head; 158 + NDR_record_t NDR; 159 + clock_flavor_t flavor; 160 + mach_msg_type_number_t clock_attrCnt; 161 + } __Request__clock_get_attributes_t; 162 + #ifdef __MigPackStructs 163 + #pragma pack() 164 + #endif 165 + 166 + #ifdef __MigPackStructs 167 + #pragma pack(8) 168 + #endif 169 + typedef struct { 170 + mach_msg_header_t Head; 171 + /* start of the kernel processed data */ 172 + mach_msg_body_t msgh_body; 173 + mach_msg_port_descriptor_t alarm_port; 174 + /* end of the kernel processed data */ 175 + NDR_record_t NDR; 176 + alarm_type_t alarm_type; 177 + mach_timespec_t alarm_time; 178 + } __Request__clock_alarm_t; 179 + #ifdef __MigPackStructs 180 + #pragma pack() 181 + #endif 182 + #endif /* !__Request__clock_subsystem__defined */ 183 + 184 + 185 + /* union of all requests */ 186 + 187 + #ifndef __RequestUnion__clock_subsystem__defined 188 + #define __RequestUnion__clock_subsystem__defined 189 + union __RequestUnion__clock_subsystem { 190 + __Request__clock_get_time_t Request_clock_get_time; 191 + __Request__clock_get_attributes_t Request_clock_get_attributes; 192 + __Request__clock_alarm_t Request_clock_alarm; 193 + }; 194 + #endif /* __RequestUnion__clock_subsystem__defined */ 195 + /* typedefs for all replies */ 196 + 197 + #ifndef __Reply__clock_subsystem__defined 198 + #define __Reply__clock_subsystem__defined 199 + 200 + #ifdef __MigPackStructs 201 + #pragma pack(8) 202 + #endif 203 + typedef struct { 204 + mach_msg_header_t Head; 205 + NDR_record_t NDR; 206 + kern_return_t RetCode; 207 + mach_timespec_t cur_time; 208 + } __Reply__clock_get_time_t; 209 + #ifdef __MigPackStructs 210 + #pragma pack() 211 + #endif 212 + 213 + #ifdef __MigPackStructs 214 + #pragma pack(8) 215 + #endif 216 + typedef struct { 217 + mach_msg_header_t Head; 218 + NDR_record_t NDR; 219 + kern_return_t RetCode; 220 + mach_msg_type_number_t clock_attrCnt; 221 + int clock_attr[1]; 222 + } __Reply__clock_get_attributes_t; 223 + #ifdef __MigPackStructs 224 + #pragma pack() 225 + #endif 226 + 227 + #ifdef __MigPackStructs 228 + #pragma pack(8) 229 + #endif 230 + typedef struct { 231 + mach_msg_header_t Head; 232 + NDR_record_t NDR; 233 + kern_return_t RetCode; 234 + } __Reply__clock_alarm_t; 235 + #ifdef __MigPackStructs 236 + #pragma pack() 237 + #endif 238 + #endif /* !__Reply__clock_subsystem__defined */ 239 + 240 + 241 + /* union of all replies */ 242 + 243 + #ifndef __ReplyUnion__clock_subsystem__defined 244 + #define __ReplyUnion__clock_subsystem__defined 245 + union __ReplyUnion__clock_subsystem { 246 + __Reply__clock_get_time_t Reply_clock_get_time; 247 + __Reply__clock_get_attributes_t Reply_clock_get_attributes; 248 + __Reply__clock_alarm_t Reply_clock_alarm; 249 + }; 250 + #endif /* __RequestUnion__clock_subsystem__defined */ 251 + 252 + #ifndef subsystem_to_name_map_clock 253 + #define subsystem_to_name_map_clock \ 254 + { "clock_get_time", 1000 },\ 255 + { "clock_get_attributes", 1001 },\ 256 + { "clock_alarm", 1002 } 257 + #endif 258 + 259 + #ifdef __AfterMigServerHeader 260 + __AfterMigServerHeader 261 + #endif /* __AfterMigServerHeader */ 262 + 263 + #endif /* _clock_server_ */
+247
lkm/mig/clock_internal.h
··· 1 + #ifndef _clock_user_ 2 + #define _clock_user_ 3 + 4 + /* Module clock */ 5 + 6 + #include <string.h> 7 + #include <mach/ndr.h> 8 + #include <mach/boolean.h> 9 + #include <mach/kern_return.h> 10 + #include <mach/notify.h> 11 + #include <mach/mach_types.h> 12 + #include <mach/message.h> 13 + #include <mach/mig_errors.h> 14 + #include <mach/port.h> 15 + 16 + /* BEGIN VOUCHER CODE */ 17 + 18 + #ifndef KERNEL 19 + #if defined(__has_include) 20 + #if __has_include(<mach/mig_voucher_support.h>) 21 + #ifndef USING_VOUCHERS 22 + #define USING_VOUCHERS 23 + #endif 24 + #ifndef __VOUCHER_FORWARD_TYPE_DECLS__ 25 + #define __VOUCHER_FORWARD_TYPE_DECLS__ 26 + #ifdef __cplusplus 27 + extern "C" { 28 + #endif 29 + extern boolean_t voucher_mach_msg_set(mach_msg_header_t *msg) __attribute__((weak_import)); 30 + #ifdef __cplusplus 31 + } 32 + #endif 33 + #endif // __VOUCHER_FORWARD_TYPE_DECLS__ 34 + #endif // __has_include(<mach/mach_voucher_types.h>) 35 + #endif // __has_include 36 + #endif // !KERNEL 37 + 38 + /* END VOUCHER CODE */ 39 + 40 + 41 + #ifdef AUTOTEST 42 + #ifndef FUNCTION_PTR_T 43 + #define FUNCTION_PTR_T 44 + typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); 45 + typedef struct { 46 + char *name; 47 + function_ptr_t function; 48 + } function_table_entry; 49 + typedef function_table_entry *function_table_t; 50 + #endif /* FUNCTION_PTR_T */ 51 + #endif /* AUTOTEST */ 52 + 53 + #ifndef clock_MSG_COUNT 54 + #define clock_MSG_COUNT 3 55 + #endif /* clock_MSG_COUNT */ 56 + 57 + #include <mach/std_types.h> 58 + #include <mach/mig.h> 59 + #include <mach/mig.h> 60 + #include <mach/mach_types.h> 61 + #include <mach/mach_types.h> 62 + 63 + #ifdef __BeforeMigUserHeader 64 + __BeforeMigUserHeader 65 + #endif /* __BeforeMigUserHeader */ 66 + 67 + #include <sys/cdefs.h> 68 + __BEGIN_DECLS 69 + 70 + 71 + /* Routine clock_get_time */ 72 + #ifdef mig_external 73 + mig_external 74 + #else 75 + extern 76 + #endif /* mig_external */ 77 + kern_return_t clock_get_time 78 + ( 79 + clock_serv_t clock_serv, 80 + mach_timespec_t *cur_time 81 + ); 82 + 83 + /* Routine clock_get_attributes */ 84 + #ifdef mig_external 85 + mig_external 86 + #else 87 + extern 88 + #endif /* mig_external */ 89 + kern_return_t clock_get_attributes 90 + ( 91 + clock_serv_t clock_serv, 92 + clock_flavor_t flavor, 93 + clock_attr_t clock_attr, 94 + mach_msg_type_number_t *clock_attrCnt 95 + ); 96 + 97 + /* Routine clock_alarm */ 98 + #ifdef mig_external 99 + mig_external 100 + #else 101 + extern 102 + #endif /* mig_external */ 103 + kern_return_t clock_alarm 104 + ( 105 + clock_serv_t clock_serv, 106 + alarm_type_t alarm_type, 107 + mach_timespec_t alarm_time, 108 + clock_reply_t alarm_port 109 + ); 110 + 111 + __END_DECLS 112 + 113 + /********************** Caution **************************/ 114 + /* The following data types should be used to calculate */ 115 + /* maximum message sizes only. The actual message may be */ 116 + /* smaller, and the position of the arguments within the */ 117 + /* message layout may vary from what is presented here. */ 118 + /* For example, if any of the arguments are variable- */ 119 + /* sized, and less than the maximum is sent, the data */ 120 + /* will be packed tight in the actual message to reduce */ 121 + /* the presence of holes. */ 122 + /********************** Caution **************************/ 123 + 124 + /* typedefs for all requests */ 125 + 126 + #ifndef __Request__clock_subsystem__defined 127 + #define __Request__clock_subsystem__defined 128 + 129 + #ifdef __MigPackStructs 130 + #pragma pack(8) 131 + #endif 132 + typedef struct { 133 + mach_msg_header_t Head; 134 + } __Request__clock_get_time_t; 135 + #ifdef __MigPackStructs 136 + #pragma pack() 137 + #endif 138 + 139 + #ifdef __MigPackStructs 140 + #pragma pack(8) 141 + #endif 142 + typedef struct { 143 + mach_msg_header_t Head; 144 + NDR_record_t NDR; 145 + clock_flavor_t flavor; 146 + mach_msg_type_number_t clock_attrCnt; 147 + } __Request__clock_get_attributes_t; 148 + #ifdef __MigPackStructs 149 + #pragma pack() 150 + #endif 151 + 152 + #ifdef __MigPackStructs 153 + #pragma pack(8) 154 + #endif 155 + typedef struct { 156 + mach_msg_header_t Head; 157 + /* start of the kernel processed data */ 158 + mach_msg_body_t msgh_body; 159 + mach_msg_port_descriptor_t alarm_port; 160 + /* end of the kernel processed data */ 161 + NDR_record_t NDR; 162 + alarm_type_t alarm_type; 163 + mach_timespec_t alarm_time; 164 + } __Request__clock_alarm_t; 165 + #ifdef __MigPackStructs 166 + #pragma pack() 167 + #endif 168 + #endif /* !__Request__clock_subsystem__defined */ 169 + 170 + /* union of all requests */ 171 + 172 + #ifndef __RequestUnion__clock_subsystem__defined 173 + #define __RequestUnion__clock_subsystem__defined 174 + union __RequestUnion__clock_subsystem { 175 + __Request__clock_get_time_t Request_clock_get_time; 176 + __Request__clock_get_attributes_t Request_clock_get_attributes; 177 + __Request__clock_alarm_t Request_clock_alarm; 178 + }; 179 + #endif /* !__RequestUnion__clock_subsystem__defined */ 180 + /* typedefs for all replies */ 181 + 182 + #ifndef __Reply__clock_subsystem__defined 183 + #define __Reply__clock_subsystem__defined 184 + 185 + #ifdef __MigPackStructs 186 + #pragma pack(8) 187 + #endif 188 + typedef struct { 189 + mach_msg_header_t Head; 190 + NDR_record_t NDR; 191 + kern_return_t RetCode; 192 + mach_timespec_t cur_time; 193 + } __Reply__clock_get_time_t; 194 + #ifdef __MigPackStructs 195 + #pragma pack() 196 + #endif 197 + 198 + #ifdef __MigPackStructs 199 + #pragma pack(8) 200 + #endif 201 + typedef struct { 202 + mach_msg_header_t Head; 203 + NDR_record_t NDR; 204 + kern_return_t RetCode; 205 + mach_msg_type_number_t clock_attrCnt; 206 + int clock_attr[1]; 207 + } __Reply__clock_get_attributes_t; 208 + #ifdef __MigPackStructs 209 + #pragma pack() 210 + #endif 211 + 212 + #ifdef __MigPackStructs 213 + #pragma pack(8) 214 + #endif 215 + typedef struct { 216 + mach_msg_header_t Head; 217 + NDR_record_t NDR; 218 + kern_return_t RetCode; 219 + } __Reply__clock_alarm_t; 220 + #ifdef __MigPackStructs 221 + #pragma pack() 222 + #endif 223 + #endif /* !__Reply__clock_subsystem__defined */ 224 + 225 + /* union of all replies */ 226 + 227 + #ifndef __ReplyUnion__clock_subsystem__defined 228 + #define __ReplyUnion__clock_subsystem__defined 229 + union __ReplyUnion__clock_subsystem { 230 + __Reply__clock_get_time_t Reply_clock_get_time; 231 + __Reply__clock_get_attributes_t Reply_clock_get_attributes; 232 + __Reply__clock_alarm_t Reply_clock_alarm; 233 + }; 234 + #endif /* !__RequestUnion__clock_subsystem__defined */ 235 + 236 + #ifndef subsystem_to_name_map_clock 237 + #define subsystem_to_name_map_clock \ 238 + { "clock_get_time", 1000 },\ 239 + { "clock_get_attributes", 1001 },\ 240 + { "clock_alarm", 1002 } 241 + #endif 242 + 243 + #ifdef __AfterMigUserHeader 244 + __AfterMigUserHeader 245 + #endif /* __AfterMigUserHeader */ 246 + 247 + #endif /* _clock_user_ */
+3
lkm/mig/duct.c
··· 1 + #include <mach/ndr.h> 2 + 3 + NDR_record_t NDR_record;
+2414
lkm/mig/mach_hostServer.c
··· 1 + /* 2 + * IDENTIFICATION: 3 + * stub generated Tue Aug 4 16:44:59 2015 4 + * with a MiG generated by 1.0 5 + * OPTIONS: 6 + */ 7 + 8 + /* Module mach_host */ 9 + 10 + #define __MIG_check__Request__mach_host_subsystem__ 1 11 + 12 + #include "mach_hostServer.h" 13 + 14 + #ifndef mig_internal 15 + #define mig_internal static __inline__ 16 + #endif /* mig_internal */ 17 + 18 + #ifndef mig_external 19 + #define mig_external 20 + #endif /* mig_external */ 21 + 22 + #if !defined(__MigTypeCheck) && defined(TypeCheck) 23 + #define __MigTypeCheck TypeCheck /* Legacy setting */ 24 + #endif /* !defined(__MigTypeCheck) */ 25 + 26 + #if !defined(__MigKernelSpecificCode) && defined(_MIG_KERNEL_SPECIFIC_CODE_) 27 + #define __MigKernelSpecificCode _MIG_KERNEL_SPECIFIC_CODE_ /* Legacy setting */ 28 + #endif /* !defined(__MigKernelSpecificCode) */ 29 + 30 + #ifndef LimitCheck 31 + #define LimitCheck 0 32 + #endif /* LimitCheck */ 33 + 34 + #ifndef min 35 + #define min(a,b) ( ((a) < (b))? (a): (b) ) 36 + #endif /* min */ 37 + 38 + #if !defined(_WALIGN_) 39 + #define _WALIGN_(x) (((x) + 7) & ~7) 40 + #endif /* !defined(_WALIGN_) */ 41 + 42 + #if !defined(_WALIGNSZ_) 43 + #define _WALIGNSZ_(x) _WALIGN_(sizeof(x)) 44 + #endif /* !defined(_WALIGNSZ_) */ 45 + 46 + #ifndef UseStaticTemplates 47 + #define UseStaticTemplates 0 48 + #endif /* UseStaticTemplates */ 49 + 50 + #ifndef __DeclareRcvRpc 51 + #define __DeclareRcvRpc(_NUM_, _NAME_) 52 + #endif /* __DeclareRcvRpc */ 53 + 54 + #ifndef __BeforeRcvRpc 55 + #define __BeforeRcvRpc(_NUM_, _NAME_) 56 + #endif /* __BeforeRcvRpc */ 57 + 58 + #ifndef __AfterRcvRpc 59 + #define __AfterRcvRpc(_NUM_, _NAME_) 60 + #endif /* __AfterRcvRpc */ 61 + 62 + #ifndef __DeclareRcvSimple 63 + #define __DeclareRcvSimple(_NUM_, _NAME_) 64 + #endif /* __DeclareRcvSimple */ 65 + 66 + #ifndef __BeforeRcvSimple 67 + #define __BeforeRcvSimple(_NUM_, _NAME_) 68 + #endif /* __BeforeRcvSimple */ 69 + 70 + #ifndef __AfterRcvSimple 71 + #define __AfterRcvSimple(_NUM_, _NAME_) 72 + #endif /* __AfterRcvSimple */ 73 + 74 + #define novalue void 75 + 76 + #define msgh_request_port msgh_local_port 77 + #define MACH_MSGH_BITS_REQUEST(bits) MACH_MSGH_BITS_LOCAL(bits) 78 + #define msgh_reply_port msgh_remote_port 79 + #define MACH_MSGH_BITS_REPLY(bits) MACH_MSGH_BITS_REMOTE(bits) 80 + 81 + #define MIG_RETURN_ERROR(X, code) {\ 82 + ((mig_reply_error_t *)X)->RetCode = code;\ 83 + ((mig_reply_error_t *)X)->NDR = NDR_record;\ 84 + return;\ 85 + } 86 + 87 + /* Forward Declarations */ 88 + 89 + 90 + mig_internal novalue _Xhost_info 91 + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); 92 + 93 + mig_internal novalue _Xhost_kernel_version 94 + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); 95 + 96 + mig_internal novalue _X_host_page_size 97 + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); 98 + 99 + mig_internal novalue _Xmach_memory_object_memory_entry 100 + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); 101 + 102 + mig_internal novalue _Xhost_processor_info 103 + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); 104 + 105 + mig_internal novalue _Xhost_get_io_master 106 + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); 107 + 108 + mig_internal novalue _Xhost_get_clock_service 109 + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); 110 + 111 + mig_internal novalue _Xkmod_get_info 112 + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); 113 + 114 + mig_internal novalue _Xhost_zone_info 115 + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); 116 + 117 + mig_internal novalue _Xhost_virtual_physical_table_info 118 + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); 119 + 120 + mig_internal novalue _Xprocessor_set_default 121 + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); 122 + 123 + mig_internal novalue _Xprocessor_set_create 124 + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); 125 + 126 + mig_internal novalue _Xmach_memory_object_memory_entry_64 127 + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); 128 + 129 + mig_internal novalue _Xhost_statistics 130 + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); 131 + 132 + mig_internal novalue _Xhost_request_notification 133 + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); 134 + 135 + mig_internal novalue _Xhost_lockgroup_info 136 + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); 137 + 138 + mig_internal novalue _Xhost_statistics64 139 + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); 140 + 141 + mig_internal novalue _Xmach_zone_info 142 + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); 143 + 144 + mig_internal novalue _Xmach_zone_force_gc 145 + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); 146 + 147 + mig_internal novalue _Xhost_create_mach_voucher 148 + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); 149 + 150 + mig_internal novalue _Xhost_register_mach_voucher_attr_manager 151 + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); 152 + 153 + mig_internal novalue _Xhost_register_well_known_mach_voucher_attr_manager 154 + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); 155 + 156 + 157 + #if ( __MigTypeCheck ) 158 + #if __MIG_check__Request__mach_host_subsystem__ 159 + #if !defined(__MIG_check__Request__host_info_t__defined) 160 + #define __MIG_check__Request__host_info_t__defined 161 + 162 + mig_internal kern_return_t __MIG_check__Request__host_info_t(__attribute__((__unused__)) __Request__host_info_t *In0P) 163 + { 164 + 165 + typedef __Request__host_info_t __Request; 166 + #if __MigTypeCheck 167 + if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || 168 + (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) 169 + return MIG_BAD_ARGUMENTS; 170 + #endif /* __MigTypeCheck */ 171 + 172 + return MACH_MSG_SUCCESS; 173 + } 174 + #endif /* !defined(__MIG_check__Request__host_info_t__defined) */ 175 + #endif /* __MIG_check__Request__mach_host_subsystem__ */ 176 + #endif /* ( __MigTypeCheck ) */ 177 + 178 + 179 + /* Routine host_info */ 180 + mig_internal novalue _Xhost_info 181 + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) 182 + { 183 + 184 + #ifdef __MigPackStructs 185 + #pragma pack(8) 186 + #endif 187 + typedef struct { 188 + mach_msg_header_t Head; 189 + NDR_record_t NDR; 190 + host_flavor_t flavor; 191 + mach_msg_type_number_t host_info_outCnt; 192 + mach_msg_trailer_t trailer; 193 + } Request; 194 + #ifdef __MigPackStructs 195 + #pragma pack() 196 + #endif 197 + typedef __Request__host_info_t __Request; 198 + typedef __Reply__host_info_t Reply; 199 + 200 + /* 201 + * typedef struct { 202 + * mach_msg_header_t Head; 203 + * NDR_record_t NDR; 204 + * kern_return_t RetCode; 205 + * } mig_reply_error_t; 206 + */ 207 + 208 + Request *In0P = (Request *) InHeadP; 209 + Reply *OutP = (Reply *) OutHeadP; 210 + #ifdef __MIG_check__Request__host_info_t__defined 211 + kern_return_t check_result; 212 + #endif /* __MIG_check__Request__host_info_t__defined */ 213 + 214 + __DeclareRcvRpc(200, "host_info") 215 + __BeforeRcvRpc(200, "host_info") 216 + 217 + #if defined(__MIG_check__Request__host_info_t__defined) 218 + check_result = __MIG_check__Request__host_info_t((__Request *)In0P); 219 + if (check_result != MACH_MSG_SUCCESS) 220 + { MIG_RETURN_ERROR(OutP, check_result); } 221 + #endif /* defined(__MIG_check__Request__host_info_t__defined) */ 222 + 223 + OutP->host_info_outCnt = 68; 224 + if (In0P->host_info_outCnt < OutP->host_info_outCnt) 225 + OutP->host_info_outCnt = In0P->host_info_outCnt; 226 + 227 + OutP->RetCode = host_info(In0P->Head.msgh_request_port, In0P->flavor, OutP->host_info_out, &OutP->host_info_outCnt); 228 + if (OutP->RetCode != KERN_SUCCESS) { 229 + MIG_RETURN_ERROR(OutP, OutP->RetCode); 230 + } 231 + 232 + OutP->NDR = NDR_record; 233 + 234 + OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply) - 272) + (_WALIGN_((4 * OutP->host_info_outCnt + 7) & ~7)); 235 + 236 + __AfterRcvRpc(200, "host_info") 237 + } 238 + 239 + #if ( __MigTypeCheck ) 240 + #if __MIG_check__Request__mach_host_subsystem__ 241 + #if !defined(__MIG_check__Request__host_kernel_version_t__defined) 242 + #define __MIG_check__Request__host_kernel_version_t__defined 243 + 244 + mig_internal kern_return_t __MIG_check__Request__host_kernel_version_t(__attribute__((__unused__)) __Request__host_kernel_version_t *In0P) 245 + { 246 + 247 + typedef __Request__host_kernel_version_t __Request; 248 + #if __MigTypeCheck 249 + if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || 250 + (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) 251 + return MIG_BAD_ARGUMENTS; 252 + #endif /* __MigTypeCheck */ 253 + 254 + return MACH_MSG_SUCCESS; 255 + } 256 + #endif /* !defined(__MIG_check__Request__host_kernel_version_t__defined) */ 257 + #endif /* __MIG_check__Request__mach_host_subsystem__ */ 258 + #endif /* ( __MigTypeCheck ) */ 259 + 260 + 261 + /* Routine host_kernel_version */ 262 + mig_internal novalue _Xhost_kernel_version 263 + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) 264 + { 265 + 266 + #ifdef __MigPackStructs 267 + #pragma pack(8) 268 + #endif 269 + typedef struct { 270 + mach_msg_header_t Head; 271 + mach_msg_trailer_t trailer; 272 + } Request; 273 + #ifdef __MigPackStructs 274 + #pragma pack() 275 + #endif 276 + typedef __Request__host_kernel_version_t __Request; 277 + typedef __Reply__host_kernel_version_t Reply; 278 + 279 + /* 280 + * typedef struct { 281 + * mach_msg_header_t Head; 282 + * NDR_record_t NDR; 283 + * kern_return_t RetCode; 284 + * } mig_reply_error_t; 285 + */ 286 + 287 + Request *In0P = (Request *) InHeadP; 288 + Reply *OutP = (Reply *) OutHeadP; 289 + #ifdef __MIG_check__Request__host_kernel_version_t__defined 290 + kern_return_t check_result; 291 + #endif /* __MIG_check__Request__host_kernel_version_t__defined */ 292 + 293 + __DeclareRcvRpc(201, "host_kernel_version") 294 + __BeforeRcvRpc(201, "host_kernel_version") 295 + 296 + #if defined(__MIG_check__Request__host_kernel_version_t__defined) 297 + check_result = __MIG_check__Request__host_kernel_version_t((__Request *)In0P); 298 + if (check_result != MACH_MSG_SUCCESS) 299 + { MIG_RETURN_ERROR(OutP, check_result); } 300 + #endif /* defined(__MIG_check__Request__host_kernel_version_t__defined) */ 301 + 302 + OutP->RetCode = host_kernel_version(In0P->Head.msgh_request_port, OutP->kernel_version); 303 + if (OutP->RetCode != KERN_SUCCESS) { 304 + MIG_RETURN_ERROR(OutP, OutP->RetCode); 305 + } 306 + 307 + OutP->NDR = NDR_record; 308 + 309 + #ifdef __LP64__ 310 + { 311 + size_t strLength = strlen(OutP->kernel_version) + 1; 312 + if (strLength > 0xffffffff) 313 + MIG_RETURN_ERROR(OutP, MIG_BAD_ARGUMENTS); 314 + OutP->kernel_versionCnt = (mach_msg_type_number_t) strLength; 315 + } 316 + #else 317 + OutP->kernel_versionCnt = (mach_msg_type_number_t) strlen(OutP->kernel_version) + 1; 318 + #endif /* __LP64__ */ 319 + OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply) - 512) + (_WALIGN_((OutP->kernel_versionCnt + 7) & ~7)); 320 + 321 + __AfterRcvRpc(201, "host_kernel_version") 322 + } 323 + 324 + #if ( __MigTypeCheck ) 325 + #if __MIG_check__Request__mach_host_subsystem__ 326 + #if !defined(__MIG_check__Request___host_page_size_t__defined) 327 + #define __MIG_check__Request___host_page_size_t__defined 328 + 329 + mig_internal kern_return_t __MIG_check__Request___host_page_size_t(__attribute__((__unused__)) __Request___host_page_size_t *In0P) 330 + { 331 + 332 + typedef __Request___host_page_size_t __Request; 333 + #if __MigTypeCheck 334 + if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || 335 + (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) 336 + return MIG_BAD_ARGUMENTS; 337 + #endif /* __MigTypeCheck */ 338 + 339 + return MACH_MSG_SUCCESS; 340 + } 341 + #endif /* !defined(__MIG_check__Request___host_page_size_t__defined) */ 342 + #endif /* __MIG_check__Request__mach_host_subsystem__ */ 343 + #endif /* ( __MigTypeCheck ) */ 344 + 345 + 346 + /* Routine _host_page_size */ 347 + mig_internal novalue _X_host_page_size 348 + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) 349 + { 350 + 351 + #ifdef __MigPackStructs 352 + #pragma pack(8) 353 + #endif 354 + typedef struct { 355 + mach_msg_header_t Head; 356 + mach_msg_trailer_t trailer; 357 + } Request; 358 + #ifdef __MigPackStructs 359 + #pragma pack() 360 + #endif 361 + typedef __Request___host_page_size_t __Request; 362 + typedef __Reply___host_page_size_t Reply; 363 + 364 + /* 365 + * typedef struct { 366 + * mach_msg_header_t Head; 367 + * NDR_record_t NDR; 368 + * kern_return_t RetCode; 369 + * } mig_reply_error_t; 370 + */ 371 + 372 + Request *In0P = (Request *) InHeadP; 373 + Reply *OutP = (Reply *) OutHeadP; 374 + #ifdef __MIG_check__Request___host_page_size_t__defined 375 + kern_return_t check_result; 376 + #endif /* __MIG_check__Request___host_page_size_t__defined */ 377 + 378 + __DeclareRcvRpc(202, "_host_page_size") 379 + __BeforeRcvRpc(202, "_host_page_size") 380 + 381 + #if defined(__MIG_check__Request___host_page_size_t__defined) 382 + check_result = __MIG_check__Request___host_page_size_t((__Request *)In0P); 383 + if (check_result != MACH_MSG_SUCCESS) 384 + { MIG_RETURN_ERROR(OutP, check_result); } 385 + #endif /* defined(__MIG_check__Request___host_page_size_t__defined) */ 386 + 387 + OutP->RetCode = _host_page_size(In0P->Head.msgh_request_port, &OutP->out_page_size); 388 + if (OutP->RetCode != KERN_SUCCESS) { 389 + MIG_RETURN_ERROR(OutP, OutP->RetCode); 390 + } 391 + 392 + OutP->NDR = NDR_record; 393 + 394 + 395 + OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply)); 396 + __AfterRcvRpc(202, "_host_page_size") 397 + } 398 + 399 + #if ( __MigTypeCheck ) 400 + #if __MIG_check__Request__mach_host_subsystem__ 401 + #if !defined(__MIG_check__Request__mach_memory_object_memory_entry_t__defined) 402 + #define __MIG_check__Request__mach_memory_object_memory_entry_t__defined 403 + 404 + mig_internal kern_return_t __MIG_check__Request__mach_memory_object_memory_entry_t(__attribute__((__unused__)) __Request__mach_memory_object_memory_entry_t *In0P) 405 + { 406 + 407 + typedef __Request__mach_memory_object_memory_entry_t __Request; 408 + #if __MigTypeCheck 409 + if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || 410 + (In0P->msgh_body.msgh_descriptor_count != 1) || 411 + (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) 412 + return MIG_BAD_ARGUMENTS; 413 + #endif /* __MigTypeCheck */ 414 + 415 + #if __MigTypeCheck 416 + if (In0P->pager.type != MACH_MSG_PORT_DESCRIPTOR || 417 + In0P->pager.disposition != 17) 418 + return MIG_TYPE_ERROR; 419 + #endif /* __MigTypeCheck */ 420 + 421 + return MACH_MSG_SUCCESS; 422 + } 423 + #endif /* !defined(__MIG_check__Request__mach_memory_object_memory_entry_t__defined) */ 424 + #endif /* __MIG_check__Request__mach_host_subsystem__ */ 425 + #endif /* ( __MigTypeCheck ) */ 426 + 427 + 428 + /* Routine mach_memory_object_memory_entry */ 429 + mig_internal novalue _Xmach_memory_object_memory_entry 430 + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) 431 + { 432 + 433 + #ifdef __MigPackStructs 434 + #pragma pack(8) 435 + #endif 436 + typedef struct { 437 + mach_msg_header_t Head; 438 + /* start of the kernel processed data */ 439 + mach_msg_body_t msgh_body; 440 + mach_msg_port_descriptor_t pager; 441 + /* end of the kernel processed data */ 442 + NDR_record_t NDR; 443 + boolean_t internal; 444 + vm_size_t size; 445 + vm_prot_t permission; 446 + mach_msg_trailer_t trailer; 447 + } Request; 448 + #ifdef __MigPackStructs 449 + #pragma pack() 450 + #endif 451 + typedef __Request__mach_memory_object_memory_entry_t __Request; 452 + typedef __Reply__mach_memory_object_memory_entry_t Reply; 453 + 454 + /* 455 + * typedef struct { 456 + * mach_msg_header_t Head; 457 + * NDR_record_t NDR; 458 + * kern_return_t RetCode; 459 + * } mig_reply_error_t; 460 + */ 461 + 462 + Request *In0P = (Request *) InHeadP; 463 + Reply *OutP = (Reply *) OutHeadP; 464 + #ifdef __MIG_check__Request__mach_memory_object_memory_entry_t__defined 465 + kern_return_t check_result; 466 + #endif /* __MIG_check__Request__mach_memory_object_memory_entry_t__defined */ 467 + 468 + #if UseStaticTemplates 469 + const static mach_msg_port_descriptor_t entry_handleTemplate = { 470 + /* name = */ MACH_PORT_NULL, 471 + /* pad1 = */ 0, 472 + /* pad2 = */ 0, 473 + /* disp = */ 17, 474 + /* type = */ MACH_MSG_PORT_DESCRIPTOR, 475 + }; 476 + #endif /* UseStaticTemplates */ 477 + 478 + kern_return_t RetCode; 479 + __DeclareRcvRpc(203, "mach_memory_object_memory_entry") 480 + __BeforeRcvRpc(203, "mach_memory_object_memory_entry") 481 + 482 + #if defined(__MIG_check__Request__mach_memory_object_memory_entry_t__defined) 483 + check_result = __MIG_check__Request__mach_memory_object_memory_entry_t((__Request *)In0P); 484 + if (check_result != MACH_MSG_SUCCESS) 485 + { MIG_RETURN_ERROR(OutP, check_result); } 486 + #endif /* defined(__MIG_check__Request__mach_memory_object_memory_entry_t__defined) */ 487 + 488 + #if UseStaticTemplates 489 + OutP->entry_handle = entry_handleTemplate; 490 + #else /* UseStaticTemplates */ 491 + OutP->entry_handle.disposition = 17; 492 + OutP->entry_handle.type = MACH_MSG_PORT_DESCRIPTOR; 493 + #endif /* UseStaticTemplates */ 494 + 495 + 496 + RetCode = mach_memory_object_memory_entry(In0P->Head.msgh_request_port, In0P->internal, In0P->size, In0P->permission, In0P->pager.name, &OutP->entry_handle.name); 497 + if (RetCode != KERN_SUCCESS) { 498 + MIG_RETURN_ERROR(OutP, RetCode); 499 + } 500 + 501 + OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX; 502 + OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply)); 503 + OutP->msgh_body.msgh_descriptor_count = 1; 504 + __AfterRcvRpc(203, "mach_memory_object_memory_entry") 505 + } 506 + 507 + #if ( __MigTypeCheck ) 508 + #if __MIG_check__Request__mach_host_subsystem__ 509 + #if !defined(__MIG_check__Request__host_processor_info_t__defined) 510 + #define __MIG_check__Request__host_processor_info_t__defined 511 + 512 + mig_internal kern_return_t __MIG_check__Request__host_processor_info_t(__attribute__((__unused__)) __Request__host_processor_info_t *In0P) 513 + { 514 + 515 + typedef __Request__host_processor_info_t __Request; 516 + #if __MigTypeCheck 517 + if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || 518 + (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) 519 + return MIG_BAD_ARGUMENTS; 520 + #endif /* __MigTypeCheck */ 521 + 522 + return MACH_MSG_SUCCESS; 523 + } 524 + #endif /* !defined(__MIG_check__Request__host_processor_info_t__defined) */ 525 + #endif /* __MIG_check__Request__mach_host_subsystem__ */ 526 + #endif /* ( __MigTypeCheck ) */ 527 + 528 + 529 + /* Routine host_processor_info */ 530 + mig_internal novalue _Xhost_processor_info 531 + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) 532 + { 533 + 534 + #ifdef __MigPackStructs 535 + #pragma pack(8) 536 + #endif 537 + typedef struct { 538 + mach_msg_header_t Head; 539 + NDR_record_t NDR; 540 + processor_flavor_t flavor; 541 + mach_msg_trailer_t trailer; 542 + } Request; 543 + #ifdef __MigPackStructs 544 + #pragma pack() 545 + #endif 546 + typedef __Request__host_processor_info_t __Request; 547 + typedef __Reply__host_processor_info_t Reply; 548 + 549 + /* 550 + * typedef struct { 551 + * mach_msg_header_t Head; 552 + * NDR_record_t NDR; 553 + * kern_return_t RetCode; 554 + * } mig_reply_error_t; 555 + */ 556 + 557 + Request *In0P = (Request *) InHeadP; 558 + Reply *OutP = (Reply *) OutHeadP; 559 + #ifdef __MIG_check__Request__host_processor_info_t__defined 560 + kern_return_t check_result; 561 + #endif /* __MIG_check__Request__host_processor_info_t__defined */ 562 + 563 + #if UseStaticTemplates 564 + const static mach_msg_ool_descriptor_t out_processor_infoTemplate = { 565 + /* addr = */ (void *)0, 566 + /* size = */ 0, 567 + /* deal = */ FALSE, 568 + /* copy = */ MACH_MSG_VIRTUAL_COPY, 569 + /* pad2 = */ 0, 570 + /* type = */ MACH_MSG_OOL_DESCRIPTOR, 571 + }; 572 + #endif /* UseStaticTemplates */ 573 + 574 + kern_return_t RetCode; 575 + __DeclareRcvRpc(204, "host_processor_info") 576 + __BeforeRcvRpc(204, "host_processor_info") 577 + 578 + #if defined(__MIG_check__Request__host_processor_info_t__defined) 579 + check_result = __MIG_check__Request__host_processor_info_t((__Request *)In0P); 580 + if (check_result != MACH_MSG_SUCCESS) 581 + { MIG_RETURN_ERROR(OutP, check_result); } 582 + #endif /* defined(__MIG_check__Request__host_processor_info_t__defined) */ 583 + 584 + #if UseStaticTemplates 585 + OutP->out_processor_info = out_processor_infoTemplate; 586 + #else /* UseStaticTemplates */ 587 + OutP->out_processor_info.deallocate = FALSE; 588 + OutP->out_processor_info.copy = MACH_MSG_VIRTUAL_COPY; 589 + OutP->out_processor_info.type = MACH_MSG_OOL_DESCRIPTOR; 590 + #endif /* UseStaticTemplates */ 591 + 592 + 593 + RetCode = host_processor_info(In0P->Head.msgh_request_port, In0P->flavor, &OutP->out_processor_count, (processor_info_array_t *)&(OutP->out_processor_info.address), &OutP->out_processor_infoCnt); 594 + if (RetCode != KERN_SUCCESS) { 595 + MIG_RETURN_ERROR(OutP, RetCode); 596 + } 597 + OutP->out_processor_info.size = OutP->out_processor_infoCnt * 4; 598 + 599 + 600 + OutP->NDR = NDR_record; 601 + 602 + 603 + OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX; 604 + OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply)); 605 + OutP->msgh_body.msgh_descriptor_count = 1; 606 + __AfterRcvRpc(204, "host_processor_info") 607 + } 608 + 609 + #if ( __MigTypeCheck ) 610 + #if __MIG_check__Request__mach_host_subsystem__ 611 + #if !defined(__MIG_check__Request__host_get_io_master_t__defined) 612 + #define __MIG_check__Request__host_get_io_master_t__defined 613 + 614 + mig_internal kern_return_t __MIG_check__Request__host_get_io_master_t(__attribute__((__unused__)) __Request__host_get_io_master_t *In0P) 615 + { 616 + 617 + typedef __Request__host_get_io_master_t __Request; 618 + #if __MigTypeCheck 619 + if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || 620 + (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) 621 + return MIG_BAD_ARGUMENTS; 622 + #endif /* __MigTypeCheck */ 623 + 624 + return MACH_MSG_SUCCESS; 625 + } 626 + #endif /* !defined(__MIG_check__Request__host_get_io_master_t__defined) */ 627 + #endif /* __MIG_check__Request__mach_host_subsystem__ */ 628 + #endif /* ( __MigTypeCheck ) */ 629 + 630 + 631 + /* Routine host_get_io_master */ 632 + mig_internal novalue _Xhost_get_io_master 633 + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) 634 + { 635 + 636 + #ifdef __MigPackStructs 637 + #pragma pack(8) 638 + #endif 639 + typedef struct { 640 + mach_msg_header_t Head; 641 + mach_msg_trailer_t trailer; 642 + } Request; 643 + #ifdef __MigPackStructs 644 + #pragma pack() 645 + #endif 646 + typedef __Request__host_get_io_master_t __Request; 647 + typedef __Reply__host_get_io_master_t Reply; 648 + 649 + /* 650 + * typedef struct { 651 + * mach_msg_header_t Head; 652 + * NDR_record_t NDR; 653 + * kern_return_t RetCode; 654 + * } mig_reply_error_t; 655 + */ 656 + 657 + Request *In0P = (Request *) InHeadP; 658 + Reply *OutP = (Reply *) OutHeadP; 659 + #ifdef __MIG_check__Request__host_get_io_master_t__defined 660 + kern_return_t check_result; 661 + #endif /* __MIG_check__Request__host_get_io_master_t__defined */ 662 + 663 + #if UseStaticTemplates 664 + const static mach_msg_port_descriptor_t io_masterTemplate = { 665 + /* name = */ MACH_PORT_NULL, 666 + /* pad1 = */ 0, 667 + /* pad2 = */ 0, 668 + /* disp = */ 19, 669 + /* type = */ MACH_MSG_PORT_DESCRIPTOR, 670 + }; 671 + #endif /* UseStaticTemplates */ 672 + 673 + kern_return_t RetCode; 674 + __DeclareRcvRpc(205, "host_get_io_master") 675 + __BeforeRcvRpc(205, "host_get_io_master") 676 + 677 + #if defined(__MIG_check__Request__host_get_io_master_t__defined) 678 + check_result = __MIG_check__Request__host_get_io_master_t((__Request *)In0P); 679 + if (check_result != MACH_MSG_SUCCESS) 680 + { MIG_RETURN_ERROR(OutP, check_result); } 681 + #endif /* defined(__MIG_check__Request__host_get_io_master_t__defined) */ 682 + 683 + #if UseStaticTemplates 684 + OutP->io_master = io_masterTemplate; 685 + #else /* UseStaticTemplates */ 686 + OutP->io_master.disposition = 19; 687 + OutP->io_master.type = MACH_MSG_PORT_DESCRIPTOR; 688 + #endif /* UseStaticTemplates */ 689 + 690 + 691 + RetCode = host_get_io_master(In0P->Head.msgh_request_port, &OutP->io_master.name); 692 + if (RetCode != KERN_SUCCESS) { 693 + MIG_RETURN_ERROR(OutP, RetCode); 694 + } 695 + 696 + OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX; 697 + OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply)); 698 + OutP->msgh_body.msgh_descriptor_count = 1; 699 + __AfterRcvRpc(205, "host_get_io_master") 700 + } 701 + 702 + #if ( __MigTypeCheck ) 703 + #if __MIG_check__Request__mach_host_subsystem__ 704 + #if !defined(__MIG_check__Request__host_get_clock_service_t__defined) 705 + #define __MIG_check__Request__host_get_clock_service_t__defined 706 + 707 + mig_internal kern_return_t __MIG_check__Request__host_get_clock_service_t(__attribute__((__unused__)) __Request__host_get_clock_service_t *In0P) 708 + { 709 + 710 + typedef __Request__host_get_clock_service_t __Request; 711 + #if __MigTypeCheck 712 + if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || 713 + (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) 714 + return MIG_BAD_ARGUMENTS; 715 + #endif /* __MigTypeCheck */ 716 + 717 + return MACH_MSG_SUCCESS; 718 + } 719 + #endif /* !defined(__MIG_check__Request__host_get_clock_service_t__defined) */ 720 + #endif /* __MIG_check__Request__mach_host_subsystem__ */ 721 + #endif /* ( __MigTypeCheck ) */ 722 + 723 + 724 + /* Routine host_get_clock_service */ 725 + mig_internal novalue _Xhost_get_clock_service 726 + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) 727 + { 728 + 729 + #ifdef __MigPackStructs 730 + #pragma pack(8) 731 + #endif 732 + typedef struct { 733 + mach_msg_header_t Head; 734 + NDR_record_t NDR; 735 + clock_id_t clock_id; 736 + mach_msg_trailer_t trailer; 737 + } Request; 738 + #ifdef __MigPackStructs 739 + #pragma pack() 740 + #endif 741 + typedef __Request__host_get_clock_service_t __Request; 742 + typedef __Reply__host_get_clock_service_t Reply; 743 + 744 + /* 745 + * typedef struct { 746 + * mach_msg_header_t Head; 747 + * NDR_record_t NDR; 748 + * kern_return_t RetCode; 749 + * } mig_reply_error_t; 750 + */ 751 + 752 + Request *In0P = (Request *) InHeadP; 753 + Reply *OutP = (Reply *) OutHeadP; 754 + #ifdef __MIG_check__Request__host_get_clock_service_t__defined 755 + kern_return_t check_result; 756 + #endif /* __MIG_check__Request__host_get_clock_service_t__defined */ 757 + 758 + #if UseStaticTemplates 759 + const static mach_msg_port_descriptor_t clock_servTemplate = { 760 + /* name = */ MACH_PORT_NULL, 761 + /* pad1 = */ 0, 762 + /* pad2 = */ 0, 763 + /* disp = */ 19, 764 + /* type = */ MACH_MSG_PORT_DESCRIPTOR, 765 + }; 766 + #endif /* UseStaticTemplates */ 767 + 768 + kern_return_t RetCode; 769 + __DeclareRcvRpc(206, "host_get_clock_service") 770 + __BeforeRcvRpc(206, "host_get_clock_service") 771 + 772 + #if defined(__MIG_check__Request__host_get_clock_service_t__defined) 773 + check_result = __MIG_check__Request__host_get_clock_service_t((__Request *)In0P); 774 + if (check_result != MACH_MSG_SUCCESS) 775 + { MIG_RETURN_ERROR(OutP, check_result); } 776 + #endif /* defined(__MIG_check__Request__host_get_clock_service_t__defined) */ 777 + 778 + #if UseStaticTemplates 779 + OutP->clock_serv = clock_servTemplate; 780 + #else /* UseStaticTemplates */ 781 + OutP->clock_serv.disposition = 19; 782 + OutP->clock_serv.type = MACH_MSG_PORT_DESCRIPTOR; 783 + #endif /* UseStaticTemplates */ 784 + 785 + 786 + RetCode = host_get_clock_service(In0P->Head.msgh_request_port, In0P->clock_id, &OutP->clock_serv.name); 787 + if (RetCode != KERN_SUCCESS) { 788 + MIG_RETURN_ERROR(OutP, RetCode); 789 + } 790 + 791 + OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX; 792 + OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply)); 793 + OutP->msgh_body.msgh_descriptor_count = 1; 794 + __AfterRcvRpc(206, "host_get_clock_service") 795 + } 796 + 797 + #if ( __MigTypeCheck ) 798 + #if __MIG_check__Request__mach_host_subsystem__ 799 + #if !defined(__MIG_check__Request__kmod_get_info_t__defined) 800 + #define __MIG_check__Request__kmod_get_info_t__defined 801 + 802 + mig_internal kern_return_t __MIG_check__Request__kmod_get_info_t(__attribute__((__unused__)) __Request__kmod_get_info_t *In0P) 803 + { 804 + 805 + typedef __Request__kmod_get_info_t __Request; 806 + #if __MigTypeCheck 807 + if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || 808 + (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) 809 + return MIG_BAD_ARGUMENTS; 810 + #endif /* __MigTypeCheck */ 811 + 812 + return MACH_MSG_SUCCESS; 813 + } 814 + #endif /* !defined(__MIG_check__Request__kmod_get_info_t__defined) */ 815 + #endif /* __MIG_check__Request__mach_host_subsystem__ */ 816 + #endif /* ( __MigTypeCheck ) */ 817 + 818 + 819 + /* Routine kmod_get_info */ 820 + mig_internal novalue _Xkmod_get_info 821 + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) 822 + { 823 + 824 + #ifdef __MigPackStructs 825 + #pragma pack(8) 826 + #endif 827 + typedef struct { 828 + mach_msg_header_t Head; 829 + mach_msg_trailer_t trailer; 830 + } Request; 831 + #ifdef __MigPackStructs 832 + #pragma pack() 833 + #endif 834 + typedef __Request__kmod_get_info_t __Request; 835 + typedef __Reply__kmod_get_info_t Reply; 836 + 837 + /* 838 + * typedef struct { 839 + * mach_msg_header_t Head; 840 + * NDR_record_t NDR; 841 + * kern_return_t RetCode; 842 + * } mig_reply_error_t; 843 + */ 844 + 845 + Request *In0P = (Request *) InHeadP; 846 + Reply *OutP = (Reply *) OutHeadP; 847 + #ifdef __MIG_check__Request__kmod_get_info_t__defined 848 + kern_return_t check_result; 849 + #endif /* __MIG_check__Request__kmod_get_info_t__defined */ 850 + 851 + #if UseStaticTemplates 852 + const static mach_msg_ool_descriptor_t modulesTemplate = { 853 + /* addr = */ (void *)0, 854 + /* size = */ 0, 855 + /* deal = */ FALSE, 856 + /* copy = */ MACH_MSG_VIRTUAL_COPY, 857 + /* pad2 = */ 0, 858 + /* type = */ MACH_MSG_OOL_DESCRIPTOR, 859 + }; 860 + #endif /* UseStaticTemplates */ 861 + 862 + kern_return_t RetCode; 863 + __DeclareRcvRpc(207, "kmod_get_info") 864 + __BeforeRcvRpc(207, "kmod_get_info") 865 + 866 + #if defined(__MIG_check__Request__kmod_get_info_t__defined) 867 + check_result = __MIG_check__Request__kmod_get_info_t((__Request *)In0P); 868 + if (check_result != MACH_MSG_SUCCESS) 869 + { MIG_RETURN_ERROR(OutP, check_result); } 870 + #endif /* defined(__MIG_check__Request__kmod_get_info_t__defined) */ 871 + 872 + #if UseStaticTemplates 873 + OutP->modules = modulesTemplate; 874 + #else /* UseStaticTemplates */ 875 + OutP->modules.deallocate = FALSE; 876 + OutP->modules.copy = MACH_MSG_VIRTUAL_COPY; 877 + OutP->modules.type = MACH_MSG_OOL_DESCRIPTOR; 878 + #endif /* UseStaticTemplates */ 879 + 880 + 881 + RetCode = kmod_get_info(In0P->Head.msgh_request_port, (kmod_args_t *)&(OutP->modules.address), &OutP->modulesCnt); 882 + if (RetCode != KERN_SUCCESS) { 883 + MIG_RETURN_ERROR(OutP, RetCode); 884 + } 885 + OutP->modules.size = OutP->modulesCnt; 886 + 887 + 888 + OutP->NDR = NDR_record; 889 + 890 + 891 + OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX; 892 + OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply)); 893 + OutP->msgh_body.msgh_descriptor_count = 1; 894 + __AfterRcvRpc(207, "kmod_get_info") 895 + } 896 + 897 + #if ( __MigTypeCheck ) 898 + #if __MIG_check__Request__mach_host_subsystem__ 899 + #if !defined(__MIG_check__Request__host_zone_info_t__defined) 900 + #define __MIG_check__Request__host_zone_info_t__defined 901 + 902 + mig_internal kern_return_t __MIG_check__Request__host_zone_info_t(__attribute__((__unused__)) __Request__host_zone_info_t *In0P) 903 + { 904 + 905 + typedef __Request__host_zone_info_t __Request; 906 + #if __MigTypeCheck 907 + if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || 908 + (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) 909 + return MIG_BAD_ARGUMENTS; 910 + #endif /* __MigTypeCheck */ 911 + 912 + return MACH_MSG_SUCCESS; 913 + } 914 + #endif /* !defined(__MIG_check__Request__host_zone_info_t__defined) */ 915 + #endif /* __MIG_check__Request__mach_host_subsystem__ */ 916 + #endif /* ( __MigTypeCheck ) */ 917 + 918 + 919 + /* Routine host_zone_info */ 920 + mig_internal novalue _Xhost_zone_info 921 + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) 922 + { 923 + 924 + #ifdef __MigPackStructs 925 + #pragma pack(8) 926 + #endif 927 + typedef struct { 928 + mach_msg_header_t Head; 929 + mach_msg_trailer_t trailer; 930 + } Request; 931 + #ifdef __MigPackStructs 932 + #pragma pack() 933 + #endif 934 + typedef __Request__host_zone_info_t __Request; 935 + typedef __Reply__host_zone_info_t Reply; 936 + 937 + /* 938 + * typedef struct { 939 + * mach_msg_header_t Head; 940 + * NDR_record_t NDR; 941 + * kern_return_t RetCode; 942 + * } mig_reply_error_t; 943 + */ 944 + 945 + Request *In0P = (Request *) InHeadP; 946 + Reply *OutP = (Reply *) OutHeadP; 947 + #ifdef __MIG_check__Request__host_zone_info_t__defined 948 + kern_return_t check_result; 949 + #endif /* __MIG_check__Request__host_zone_info_t__defined */ 950 + 951 + #if UseStaticTemplates 952 + const static mach_msg_ool_descriptor_t namesTemplate = { 953 + /* addr = */ (void *)0, 954 + /* size = */ 0, 955 + /* deal = */ TRUE, 956 + /* copy = */ MACH_MSG_VIRTUAL_COPY, 957 + /* pad2 = */ 0, 958 + /* type = */ MACH_MSG_OOL_DESCRIPTOR, 959 + }; 960 + #endif /* UseStaticTemplates */ 961 + 962 + #if UseStaticTemplates 963 + const static mach_msg_ool_descriptor_t infoTemplate = { 964 + /* addr = */ (void *)0, 965 + /* size = */ 0, 966 + /* deal = */ TRUE, 967 + /* copy = */ MACH_MSG_VIRTUAL_COPY, 968 + /* pad2 = */ 0, 969 + /* type = */ MACH_MSG_OOL_DESCRIPTOR, 970 + }; 971 + #endif /* UseStaticTemplates */ 972 + 973 + kern_return_t RetCode; 974 + __DeclareRcvRpc(208, "host_zone_info") 975 + __BeforeRcvRpc(208, "host_zone_info") 976 + 977 + #if defined(__MIG_check__Request__host_zone_info_t__defined) 978 + check_result = __MIG_check__Request__host_zone_info_t((__Request *)In0P); 979 + if (check_result != MACH_MSG_SUCCESS) 980 + { MIG_RETURN_ERROR(OutP, check_result); } 981 + #endif /* defined(__MIG_check__Request__host_zone_info_t__defined) */ 982 + 983 + #if UseStaticTemplates 984 + OutP->names = namesTemplate; 985 + #else /* UseStaticTemplates */ 986 + OutP->names.deallocate = TRUE; 987 + OutP->names.copy = MACH_MSG_VIRTUAL_COPY; 988 + OutP->names.type = MACH_MSG_OOL_DESCRIPTOR; 989 + #endif /* UseStaticTemplates */ 990 + 991 + 992 + #if UseStaticTemplates 993 + OutP->info = infoTemplate; 994 + #else /* UseStaticTemplates */ 995 + OutP->info.deallocate = TRUE; 996 + OutP->info.copy = MACH_MSG_VIRTUAL_COPY; 997 + OutP->info.type = MACH_MSG_OOL_DESCRIPTOR; 998 + #endif /* UseStaticTemplates */ 999 + 1000 + 1001 + OutP->namesCnt = 0; 1002 + 1003 + OutP->infoCnt = 0; 1004 + 1005 + RetCode = host_zone_info(In0P->Head.msgh_request_port, (zone_name_array_t *)&(OutP->names.address), &OutP->namesCnt, (zone_info_array_t *)&(OutP->info.address), &OutP->infoCnt); 1006 + if (RetCode != KERN_SUCCESS) { 1007 + MIG_RETURN_ERROR(OutP, RetCode); 1008 + } 1009 + OutP->names.size = OutP->namesCnt * 80; 1010 + 1011 + OutP->info.size = OutP->infoCnt * 36; 1012 + 1013 + 1014 + OutP->NDR = NDR_record; 1015 + 1016 + 1017 + OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX; 1018 + OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply)); 1019 + OutP->msgh_body.msgh_descriptor_count = 2; 1020 + __AfterRcvRpc(208, "host_zone_info") 1021 + } 1022 + 1023 + #if ( __MigTypeCheck ) 1024 + #if __MIG_check__Request__mach_host_subsystem__ 1025 + #if !defined(__MIG_check__Request__host_virtual_physical_table_info_t__defined) 1026 + #define __MIG_check__Request__host_virtual_physical_table_info_t__defined 1027 + 1028 + mig_internal kern_return_t __MIG_check__Request__host_virtual_physical_table_info_t(__attribute__((__unused__)) __Request__host_virtual_physical_table_info_t *In0P) 1029 + { 1030 + 1031 + typedef __Request__host_virtual_physical_table_info_t __Request; 1032 + #if __MigTypeCheck 1033 + if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || 1034 + (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) 1035 + return MIG_BAD_ARGUMENTS; 1036 + #endif /* __MigTypeCheck */ 1037 + 1038 + return MACH_MSG_SUCCESS; 1039 + } 1040 + #endif /* !defined(__MIG_check__Request__host_virtual_physical_table_info_t__defined) */ 1041 + #endif /* __MIG_check__Request__mach_host_subsystem__ */ 1042 + #endif /* ( __MigTypeCheck ) */ 1043 + 1044 + 1045 + /* Routine host_virtual_physical_table_info */ 1046 + mig_internal novalue _Xhost_virtual_physical_table_info 1047 + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) 1048 + { 1049 + 1050 + #ifdef __MigPackStructs 1051 + #pragma pack(8) 1052 + #endif 1053 + typedef struct { 1054 + mach_msg_header_t Head; 1055 + mach_msg_trailer_t trailer; 1056 + } Request; 1057 + #ifdef __MigPackStructs 1058 + #pragma pack() 1059 + #endif 1060 + typedef __Request__host_virtual_physical_table_info_t __Request; 1061 + typedef __Reply__host_virtual_physical_table_info_t Reply; 1062 + 1063 + /* 1064 + * typedef struct { 1065 + * mach_msg_header_t Head; 1066 + * NDR_record_t NDR; 1067 + * kern_return_t RetCode; 1068 + * } mig_reply_error_t; 1069 + */ 1070 + 1071 + Request *In0P = (Request *) InHeadP; 1072 + Reply *OutP = (Reply *) OutHeadP; 1073 + #ifdef __MIG_check__Request__host_virtual_physical_table_info_t__defined 1074 + kern_return_t check_result; 1075 + #endif /* __MIG_check__Request__host_virtual_physical_table_info_t__defined */ 1076 + 1077 + #if UseStaticTemplates 1078 + const static mach_msg_ool_descriptor_t infoTemplate = { 1079 + /* addr = */ (void *)0, 1080 + /* size = */ 0, 1081 + /* deal = */ TRUE, 1082 + /* copy = */ MACH_MSG_VIRTUAL_COPY, 1083 + /* pad2 = */ 0, 1084 + /* type = */ MACH_MSG_OOL_DESCRIPTOR, 1085 + }; 1086 + #endif /* UseStaticTemplates */ 1087 + 1088 + kern_return_t RetCode; 1089 + __DeclareRcvRpc(209, "host_virtual_physical_table_info") 1090 + __BeforeRcvRpc(209, "host_virtual_physical_table_info") 1091 + 1092 + #if defined(__MIG_check__Request__host_virtual_physical_table_info_t__defined) 1093 + check_result = __MIG_check__Request__host_virtual_physical_table_info_t((__Request *)In0P); 1094 + if (check_result != MACH_MSG_SUCCESS) 1095 + { MIG_RETURN_ERROR(OutP, check_result); } 1096 + #endif /* defined(__MIG_check__Request__host_virtual_physical_table_info_t__defined) */ 1097 + 1098 + #if UseStaticTemplates 1099 + OutP->info = infoTemplate; 1100 + #else /* UseStaticTemplates */ 1101 + OutP->info.deallocate = TRUE; 1102 + OutP->info.copy = MACH_MSG_VIRTUAL_COPY; 1103 + OutP->info.type = MACH_MSG_OOL_DESCRIPTOR; 1104 + #endif /* UseStaticTemplates */ 1105 + 1106 + 1107 + OutP->infoCnt = 0; 1108 + 1109 + RetCode = host_virtual_physical_table_info(In0P->Head.msgh_request_port, (hash_info_bucket_array_t *)&(OutP->info.address), &OutP->infoCnt); 1110 + if (RetCode != KERN_SUCCESS) { 1111 + MIG_RETURN_ERROR(OutP, RetCode); 1112 + } 1113 + OutP->info.size = OutP->infoCnt * 4; 1114 + 1115 + 1116 + OutP->NDR = NDR_record; 1117 + 1118 + 1119 + OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX; 1120 + OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply)); 1121 + OutP->msgh_body.msgh_descriptor_count = 1; 1122 + __AfterRcvRpc(209, "host_virtual_physical_table_info") 1123 + } 1124 + 1125 + #if ( __MigTypeCheck ) 1126 + #if __MIG_check__Request__mach_host_subsystem__ 1127 + #if !defined(__MIG_check__Request__processor_set_default_t__defined) 1128 + #define __MIG_check__Request__processor_set_default_t__defined 1129 + 1130 + mig_internal kern_return_t __MIG_check__Request__processor_set_default_t(__attribute__((__unused__)) __Request__processor_set_default_t *In0P) 1131 + { 1132 + 1133 + typedef __Request__processor_set_default_t __Request; 1134 + #if __MigTypeCheck 1135 + if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || 1136 + (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) 1137 + return MIG_BAD_ARGUMENTS; 1138 + #endif /* __MigTypeCheck */ 1139 + 1140 + return MACH_MSG_SUCCESS; 1141 + } 1142 + #endif /* !defined(__MIG_check__Request__processor_set_default_t__defined) */ 1143 + #endif /* __MIG_check__Request__mach_host_subsystem__ */ 1144 + #endif /* ( __MigTypeCheck ) */ 1145 + 1146 + 1147 + /* Routine processor_set_default */ 1148 + mig_internal novalue _Xprocessor_set_default 1149 + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) 1150 + { 1151 + 1152 + #ifdef __MigPackStructs 1153 + #pragma pack(8) 1154 + #endif 1155 + typedef struct { 1156 + mach_msg_header_t Head; 1157 + mach_msg_trailer_t trailer; 1158 + } Request; 1159 + #ifdef __MigPackStructs 1160 + #pragma pack() 1161 + #endif 1162 + typedef __Request__processor_set_default_t __Request; 1163 + typedef __Reply__processor_set_default_t Reply; 1164 + 1165 + /* 1166 + * typedef struct { 1167 + * mach_msg_header_t Head; 1168 + * NDR_record_t NDR; 1169 + * kern_return_t RetCode; 1170 + * } mig_reply_error_t; 1171 + */ 1172 + 1173 + Request *In0P = (Request *) InHeadP; 1174 + Reply *OutP = (Reply *) OutHeadP; 1175 + #ifdef __MIG_check__Request__processor_set_default_t__defined 1176 + kern_return_t check_result; 1177 + #endif /* __MIG_check__Request__processor_set_default_t__defined */ 1178 + 1179 + #if UseStaticTemplates 1180 + const static mach_msg_port_descriptor_t default_setTemplate = { 1181 + /* name = */ MACH_PORT_NULL, 1182 + /* pad1 = */ 0, 1183 + /* pad2 = */ 0, 1184 + /* disp = */ 19, 1185 + /* type = */ MACH_MSG_PORT_DESCRIPTOR, 1186 + }; 1187 + #endif /* UseStaticTemplates */ 1188 + 1189 + kern_return_t RetCode; 1190 + __DeclareRcvRpc(213, "processor_set_default") 1191 + __BeforeRcvRpc(213, "processor_set_default") 1192 + 1193 + #if defined(__MIG_check__Request__processor_set_default_t__defined) 1194 + check_result = __MIG_check__Request__processor_set_default_t((__Request *)In0P); 1195 + if (check_result != MACH_MSG_SUCCESS) 1196 + { MIG_RETURN_ERROR(OutP, check_result); } 1197 + #endif /* defined(__MIG_check__Request__processor_set_default_t__defined) */ 1198 + 1199 + #if UseStaticTemplates 1200 + OutP->default_set = default_setTemplate; 1201 + #else /* UseStaticTemplates */ 1202 + OutP->default_set.disposition = 19; 1203 + OutP->default_set.type = MACH_MSG_PORT_DESCRIPTOR; 1204 + #endif /* UseStaticTemplates */ 1205 + 1206 + 1207 + RetCode = processor_set_default(In0P->Head.msgh_request_port, &OutP->default_set.name); 1208 + if (RetCode != KERN_SUCCESS) { 1209 + MIG_RETURN_ERROR(OutP, RetCode); 1210 + } 1211 + 1212 + OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX; 1213 + OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply)); 1214 + OutP->msgh_body.msgh_descriptor_count = 1; 1215 + __AfterRcvRpc(213, "processor_set_default") 1216 + } 1217 + 1218 + #if ( __MigTypeCheck ) 1219 + #if __MIG_check__Request__mach_host_subsystem__ 1220 + #if !defined(__MIG_check__Request__processor_set_create_t__defined) 1221 + #define __MIG_check__Request__processor_set_create_t__defined 1222 + 1223 + mig_internal kern_return_t __MIG_check__Request__processor_set_create_t(__attribute__((__unused__)) __Request__processor_set_create_t *In0P) 1224 + { 1225 + 1226 + typedef __Request__processor_set_create_t __Request; 1227 + #if __MigTypeCheck 1228 + if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || 1229 + (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) 1230 + return MIG_BAD_ARGUMENTS; 1231 + #endif /* __MigTypeCheck */ 1232 + 1233 + return MACH_MSG_SUCCESS; 1234 + } 1235 + #endif /* !defined(__MIG_check__Request__processor_set_create_t__defined) */ 1236 + #endif /* __MIG_check__Request__mach_host_subsystem__ */ 1237 + #endif /* ( __MigTypeCheck ) */ 1238 + 1239 + 1240 + /* Routine processor_set_create */ 1241 + mig_internal novalue _Xprocessor_set_create 1242 + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) 1243 + { 1244 + 1245 + #ifdef __MigPackStructs 1246 + #pragma pack(8) 1247 + #endif 1248 + typedef struct { 1249 + mach_msg_header_t Head; 1250 + mach_msg_trailer_t trailer; 1251 + } Request; 1252 + #ifdef __MigPackStructs 1253 + #pragma pack() 1254 + #endif 1255 + typedef __Request__processor_set_create_t __Request; 1256 + typedef __Reply__processor_set_create_t Reply; 1257 + 1258 + /* 1259 + * typedef struct { 1260 + * mach_msg_header_t Head; 1261 + * NDR_record_t NDR; 1262 + * kern_return_t RetCode; 1263 + * } mig_reply_error_t; 1264 + */ 1265 + 1266 + Request *In0P = (Request *) InHeadP; 1267 + Reply *OutP = (Reply *) OutHeadP; 1268 + #ifdef __MIG_check__Request__processor_set_create_t__defined 1269 + kern_return_t check_result; 1270 + #endif /* __MIG_check__Request__processor_set_create_t__defined */ 1271 + 1272 + #if UseStaticTemplates 1273 + const static mach_msg_port_descriptor_t new_setTemplate = { 1274 + /* name = */ MACH_PORT_NULL, 1275 + /* pad1 = */ 0, 1276 + /* pad2 = */ 0, 1277 + /* disp = */ 19, 1278 + /* type = */ MACH_MSG_PORT_DESCRIPTOR, 1279 + }; 1280 + #endif /* UseStaticTemplates */ 1281 + 1282 + #if UseStaticTemplates 1283 + const static mach_msg_port_descriptor_t new_nameTemplate = { 1284 + /* name = */ MACH_PORT_NULL, 1285 + /* pad1 = */ 0, 1286 + /* pad2 = */ 0, 1287 + /* disp = */ 19, 1288 + /* type = */ MACH_MSG_PORT_DESCRIPTOR, 1289 + }; 1290 + #endif /* UseStaticTemplates */ 1291 + 1292 + kern_return_t RetCode; 1293 + __DeclareRcvRpc(214, "processor_set_create") 1294 + __BeforeRcvRpc(214, "processor_set_create") 1295 + 1296 + #if defined(__MIG_check__Request__processor_set_create_t__defined) 1297 + check_result = __MIG_check__Request__processor_set_create_t((__Request *)In0P); 1298 + if (check_result != MACH_MSG_SUCCESS) 1299 + { MIG_RETURN_ERROR(OutP, check_result); } 1300 + #endif /* defined(__MIG_check__Request__processor_set_create_t__defined) */ 1301 + 1302 + #if UseStaticTemplates 1303 + OutP->new_set = new_setTemplate; 1304 + #else /* UseStaticTemplates */ 1305 + OutP->new_set.disposition = 19; 1306 + OutP->new_set.type = MACH_MSG_PORT_DESCRIPTOR; 1307 + #endif /* UseStaticTemplates */ 1308 + 1309 + 1310 + #if UseStaticTemplates 1311 + OutP->new_name = new_nameTemplate; 1312 + #else /* UseStaticTemplates */ 1313 + OutP->new_name.disposition = 19; 1314 + OutP->new_name.type = MACH_MSG_PORT_DESCRIPTOR; 1315 + #endif /* UseStaticTemplates */ 1316 + 1317 + 1318 + RetCode = processor_set_create(In0P->Head.msgh_request_port, &OutP->new_set.name, &OutP->new_name.name); 1319 + if (RetCode != KERN_SUCCESS) { 1320 + MIG_RETURN_ERROR(OutP, RetCode); 1321 + } 1322 + 1323 + OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX; 1324 + OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply)); 1325 + OutP->msgh_body.msgh_descriptor_count = 2; 1326 + __AfterRcvRpc(214, "processor_set_create") 1327 + } 1328 + 1329 + #if ( __MigTypeCheck ) 1330 + #if __MIG_check__Request__mach_host_subsystem__ 1331 + #if !defined(__MIG_check__Request__mach_memory_object_memory_entry_64_t__defined) 1332 + #define __MIG_check__Request__mach_memory_object_memory_entry_64_t__defined 1333 + 1334 + mig_internal kern_return_t __MIG_check__Request__mach_memory_object_memory_entry_64_t(__attribute__((__unused__)) __Request__mach_memory_object_memory_entry_64_t *In0P) 1335 + { 1336 + 1337 + typedef __Request__mach_memory_object_memory_entry_64_t __Request; 1338 + #if __MigTypeCheck 1339 + if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || 1340 + (In0P->msgh_body.msgh_descriptor_count != 1) || 1341 + (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) 1342 + return MIG_BAD_ARGUMENTS; 1343 + #endif /* __MigTypeCheck */ 1344 + 1345 + #if __MigTypeCheck 1346 + if (In0P->pager.type != MACH_MSG_PORT_DESCRIPTOR || 1347 + In0P->pager.disposition != 17) 1348 + return MIG_TYPE_ERROR; 1349 + #endif /* __MigTypeCheck */ 1350 + 1351 + return MACH_MSG_SUCCESS; 1352 + } 1353 + #endif /* !defined(__MIG_check__Request__mach_memory_object_memory_entry_64_t__defined) */ 1354 + #endif /* __MIG_check__Request__mach_host_subsystem__ */ 1355 + #endif /* ( __MigTypeCheck ) */ 1356 + 1357 + 1358 + /* Routine mach_memory_object_memory_entry_64 */ 1359 + mig_internal novalue _Xmach_memory_object_memory_entry_64 1360 + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) 1361 + { 1362 + 1363 + #ifdef __MigPackStructs 1364 + #pragma pack(8) 1365 + #endif 1366 + typedef struct { 1367 + mach_msg_header_t Head; 1368 + /* start of the kernel processed data */ 1369 + mach_msg_body_t msgh_body; 1370 + mach_msg_port_descriptor_t pager; 1371 + /* end of the kernel processed data */ 1372 + NDR_record_t NDR; 1373 + boolean_t internal; 1374 + memory_object_size_t size; 1375 + vm_prot_t permission; 1376 + mach_msg_trailer_t trailer; 1377 + } Request; 1378 + #ifdef __MigPackStructs 1379 + #pragma pack() 1380 + #endif 1381 + typedef __Request__mach_memory_object_memory_entry_64_t __Request; 1382 + typedef __Reply__mach_memory_object_memory_entry_64_t Reply; 1383 + 1384 + /* 1385 + * typedef struct { 1386 + * mach_msg_header_t Head; 1387 + * NDR_record_t NDR; 1388 + * kern_return_t RetCode; 1389 + * } mig_reply_error_t; 1390 + */ 1391 + 1392 + Request *In0P = (Request *) InHeadP; 1393 + Reply *OutP = (Reply *) OutHeadP; 1394 + #ifdef __MIG_check__Request__mach_memory_object_memory_entry_64_t__defined 1395 + kern_return_t check_result; 1396 + #endif /* __MIG_check__Request__mach_memory_object_memory_entry_64_t__defined */ 1397 + 1398 + #if UseStaticTemplates 1399 + const static mach_msg_port_descriptor_t entry_handleTemplate = { 1400 + /* name = */ MACH_PORT_NULL, 1401 + /* pad1 = */ 0, 1402 + /* pad2 = */ 0, 1403 + /* disp = */ 17, 1404 + /* type = */ MACH_MSG_PORT_DESCRIPTOR, 1405 + }; 1406 + #endif /* UseStaticTemplates */ 1407 + 1408 + kern_return_t RetCode; 1409 + __DeclareRcvRpc(215, "mach_memory_object_memory_entry_64") 1410 + __BeforeRcvRpc(215, "mach_memory_object_memory_entry_64") 1411 + 1412 + #if defined(__MIG_check__Request__mach_memory_object_memory_entry_64_t__defined) 1413 + check_result = __MIG_check__Request__mach_memory_object_memory_entry_64_t((__Request *)In0P); 1414 + if (check_result != MACH_MSG_SUCCESS) 1415 + { MIG_RETURN_ERROR(OutP, check_result); } 1416 + #endif /* defined(__MIG_check__Request__mach_memory_object_memory_entry_64_t__defined) */ 1417 + 1418 + #if UseStaticTemplates 1419 + OutP->entry_handle = entry_handleTemplate; 1420 + #else /* UseStaticTemplates */ 1421 + OutP->entry_handle.disposition = 17; 1422 + OutP->entry_handle.type = MACH_MSG_PORT_DESCRIPTOR; 1423 + #endif /* UseStaticTemplates */ 1424 + 1425 + 1426 + RetCode = mach_memory_object_memory_entry_64(In0P->Head.msgh_request_port, In0P->internal, In0P->size, In0P->permission, In0P->pager.name, &OutP->entry_handle.name); 1427 + if (RetCode != KERN_SUCCESS) { 1428 + MIG_RETURN_ERROR(OutP, RetCode); 1429 + } 1430 + 1431 + OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX; 1432 + OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply)); 1433 + OutP->msgh_body.msgh_descriptor_count = 1; 1434 + __AfterRcvRpc(215, "mach_memory_object_memory_entry_64") 1435 + } 1436 + 1437 + #if ( __MigTypeCheck ) 1438 + #if __MIG_check__Request__mach_host_subsystem__ 1439 + #if !defined(__MIG_check__Request__host_statistics_t__defined) 1440 + #define __MIG_check__Request__host_statistics_t__defined 1441 + 1442 + mig_internal kern_return_t __MIG_check__Request__host_statistics_t(__attribute__((__unused__)) __Request__host_statistics_t *In0P) 1443 + { 1444 + 1445 + typedef __Request__host_statistics_t __Request; 1446 + #if __MigTypeCheck 1447 + if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || 1448 + (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) 1449 + return MIG_BAD_ARGUMENTS; 1450 + #endif /* __MigTypeCheck */ 1451 + 1452 + return MACH_MSG_SUCCESS; 1453 + } 1454 + #endif /* !defined(__MIG_check__Request__host_statistics_t__defined) */ 1455 + #endif /* __MIG_check__Request__mach_host_subsystem__ */ 1456 + #endif /* ( __MigTypeCheck ) */ 1457 + 1458 + 1459 + /* Routine host_statistics */ 1460 + mig_internal novalue _Xhost_statistics 1461 + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) 1462 + { 1463 + 1464 + #ifdef __MigPackStructs 1465 + #pragma pack(8) 1466 + #endif 1467 + typedef struct { 1468 + mach_msg_header_t Head; 1469 + NDR_record_t NDR; 1470 + host_flavor_t flavor; 1471 + mach_msg_type_number_t host_info_outCnt; 1472 + mach_msg_trailer_t trailer; 1473 + } Request; 1474 + #ifdef __MigPackStructs 1475 + #pragma pack() 1476 + #endif 1477 + typedef __Request__host_statistics_t __Request; 1478 + typedef __Reply__host_statistics_t Reply; 1479 + 1480 + /* 1481 + * typedef struct { 1482 + * mach_msg_header_t Head; 1483 + * NDR_record_t NDR; 1484 + * kern_return_t RetCode; 1485 + * } mig_reply_error_t; 1486 + */ 1487 + 1488 + Request *In0P = (Request *) InHeadP; 1489 + Reply *OutP = (Reply *) OutHeadP; 1490 + #ifdef __MIG_check__Request__host_statistics_t__defined 1491 + kern_return_t check_result; 1492 + #endif /* __MIG_check__Request__host_statistics_t__defined */ 1493 + 1494 + __DeclareRcvRpc(216, "host_statistics") 1495 + __BeforeRcvRpc(216, "host_statistics") 1496 + 1497 + #if defined(__MIG_check__Request__host_statistics_t__defined) 1498 + check_result = __MIG_check__Request__host_statistics_t((__Request *)In0P); 1499 + if (check_result != MACH_MSG_SUCCESS) 1500 + { MIG_RETURN_ERROR(OutP, check_result); } 1501 + #endif /* defined(__MIG_check__Request__host_statistics_t__defined) */ 1502 + 1503 + OutP->host_info_outCnt = 68; 1504 + if (In0P->host_info_outCnt < OutP->host_info_outCnt) 1505 + OutP->host_info_outCnt = In0P->host_info_outCnt; 1506 + 1507 + OutP->RetCode = host_statistics(In0P->Head.msgh_request_port, In0P->flavor, OutP->host_info_out, &OutP->host_info_outCnt); 1508 + if (OutP->RetCode != KERN_SUCCESS) { 1509 + MIG_RETURN_ERROR(OutP, OutP->RetCode); 1510 + } 1511 + 1512 + OutP->NDR = NDR_record; 1513 + 1514 + OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply) - 272) + (_WALIGN_((4 * OutP->host_info_outCnt + 7) & ~7)); 1515 + 1516 + __AfterRcvRpc(216, "host_statistics") 1517 + } 1518 + 1519 + #if ( __MigTypeCheck ) 1520 + #if __MIG_check__Request__mach_host_subsystem__ 1521 + #if !defined(__MIG_check__Request__host_request_notification_t__defined) 1522 + #define __MIG_check__Request__host_request_notification_t__defined 1523 + 1524 + mig_internal kern_return_t __MIG_check__Request__host_request_notification_t(__attribute__((__unused__)) __Request__host_request_notification_t *In0P) 1525 + { 1526 + 1527 + typedef __Request__host_request_notification_t __Request; 1528 + #if __MigTypeCheck 1529 + if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || 1530 + (In0P->msgh_body.msgh_descriptor_count != 1) || 1531 + (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) 1532 + return MIG_BAD_ARGUMENTS; 1533 + #endif /* __MigTypeCheck */ 1534 + 1535 + #if __MigTypeCheck 1536 + if (In0P->notify_port.type != MACH_MSG_PORT_DESCRIPTOR || 1537 + In0P->notify_port.disposition != 18) 1538 + return MIG_TYPE_ERROR; 1539 + #endif /* __MigTypeCheck */ 1540 + 1541 + return MACH_MSG_SUCCESS; 1542 + } 1543 + #endif /* !defined(__MIG_check__Request__host_request_notification_t__defined) */ 1544 + #endif /* __MIG_check__Request__mach_host_subsystem__ */ 1545 + #endif /* ( __MigTypeCheck ) */ 1546 + 1547 + 1548 + /* Routine host_request_notification */ 1549 + mig_internal novalue _Xhost_request_notification 1550 + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) 1551 + { 1552 + 1553 + #ifdef __MigPackStructs 1554 + #pragma pack(8) 1555 + #endif 1556 + typedef struct { 1557 + mach_msg_header_t Head; 1558 + /* start of the kernel processed data */ 1559 + mach_msg_body_t msgh_body; 1560 + mach_msg_port_descriptor_t notify_port; 1561 + /* end of the kernel processed data */ 1562 + NDR_record_t NDR; 1563 + host_flavor_t notify_type; 1564 + mach_msg_trailer_t trailer; 1565 + } Request; 1566 + #ifdef __MigPackStructs 1567 + #pragma pack() 1568 + #endif 1569 + typedef __Request__host_request_notification_t __Request; 1570 + typedef __Reply__host_request_notification_t Reply; 1571 + 1572 + /* 1573 + * typedef struct { 1574 + * mach_msg_header_t Head; 1575 + * NDR_record_t NDR; 1576 + * kern_return_t RetCode; 1577 + * } mig_reply_error_t; 1578 + */ 1579 + 1580 + Request *In0P = (Request *) InHeadP; 1581 + Reply *OutP = (Reply *) OutHeadP; 1582 + #ifdef __MIG_check__Request__host_request_notification_t__defined 1583 + kern_return_t check_result; 1584 + #endif /* __MIG_check__Request__host_request_notification_t__defined */ 1585 + 1586 + __DeclareRcvRpc(217, "host_request_notification") 1587 + __BeforeRcvRpc(217, "host_request_notification") 1588 + 1589 + #if defined(__MIG_check__Request__host_request_notification_t__defined) 1590 + check_result = __MIG_check__Request__host_request_notification_t((__Request *)In0P); 1591 + if (check_result != MACH_MSG_SUCCESS) 1592 + { MIG_RETURN_ERROR(OutP, check_result); } 1593 + #endif /* defined(__MIG_check__Request__host_request_notification_t__defined) */ 1594 + 1595 + OutP->RetCode = host_request_notification(In0P->Head.msgh_request_port, In0P->notify_type, In0P->notify_port.name); 1596 + 1597 + OutP->NDR = NDR_record; 1598 + 1599 + 1600 + __AfterRcvRpc(217, "host_request_notification") 1601 + } 1602 + 1603 + #if ( __MigTypeCheck ) 1604 + #if __MIG_check__Request__mach_host_subsystem__ 1605 + #if !defined(__MIG_check__Request__host_lockgroup_info_t__defined) 1606 + #define __MIG_check__Request__host_lockgroup_info_t__defined 1607 + 1608 + mig_internal kern_return_t __MIG_check__Request__host_lockgroup_info_t(__attribute__((__unused__)) __Request__host_lockgroup_info_t *In0P) 1609 + { 1610 + 1611 + typedef __Request__host_lockgroup_info_t __Request; 1612 + #if __MigTypeCheck 1613 + if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || 1614 + (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) 1615 + return MIG_BAD_ARGUMENTS; 1616 + #endif /* __MigTypeCheck */ 1617 + 1618 + return MACH_MSG_SUCCESS; 1619 + } 1620 + #endif /* !defined(__MIG_check__Request__host_lockgroup_info_t__defined) */ 1621 + #endif /* __MIG_check__Request__mach_host_subsystem__ */ 1622 + #endif /* ( __MigTypeCheck ) */ 1623 + 1624 + 1625 + /* Routine host_lockgroup_info */ 1626 + mig_internal novalue _Xhost_lockgroup_info 1627 + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) 1628 + { 1629 + 1630 + #ifdef __MigPackStructs 1631 + #pragma pack(8) 1632 + #endif 1633 + typedef struct { 1634 + mach_msg_header_t Head; 1635 + mach_msg_trailer_t trailer; 1636 + } Request; 1637 + #ifdef __MigPackStructs 1638 + #pragma pack() 1639 + #endif 1640 + typedef __Request__host_lockgroup_info_t __Request; 1641 + typedef __Reply__host_lockgroup_info_t Reply; 1642 + 1643 + /* 1644 + * typedef struct { 1645 + * mach_msg_header_t Head; 1646 + * NDR_record_t NDR; 1647 + * kern_return_t RetCode; 1648 + * } mig_reply_error_t; 1649 + */ 1650 + 1651 + Request *In0P = (Request *) InHeadP; 1652 + Reply *OutP = (Reply *) OutHeadP; 1653 + #ifdef __MIG_check__Request__host_lockgroup_info_t__defined 1654 + kern_return_t check_result; 1655 + #endif /* __MIG_check__Request__host_lockgroup_info_t__defined */ 1656 + 1657 + #if UseStaticTemplates 1658 + const static mach_msg_ool_descriptor_t lockgroup_infoTemplate = { 1659 + /* addr = */ (void *)0, 1660 + /* size = */ 0, 1661 + /* deal = */ TRUE, 1662 + /* copy = */ MACH_MSG_VIRTUAL_COPY, 1663 + /* pad2 = */ 0, 1664 + /* type = */ MACH_MSG_OOL_DESCRIPTOR, 1665 + }; 1666 + #endif /* UseStaticTemplates */ 1667 + 1668 + kern_return_t RetCode; 1669 + __DeclareRcvRpc(218, "host_lockgroup_info") 1670 + __BeforeRcvRpc(218, "host_lockgroup_info") 1671 + 1672 + #if defined(__MIG_check__Request__host_lockgroup_info_t__defined) 1673 + check_result = __MIG_check__Request__host_lockgroup_info_t((__Request *)In0P); 1674 + if (check_result != MACH_MSG_SUCCESS) 1675 + { MIG_RETURN_ERROR(OutP, check_result); } 1676 + #endif /* defined(__MIG_check__Request__host_lockgroup_info_t__defined) */ 1677 + 1678 + #if UseStaticTemplates 1679 + OutP->lockgroup_info = lockgroup_infoTemplate; 1680 + #else /* UseStaticTemplates */ 1681 + OutP->lockgroup_info.deallocate = TRUE; 1682 + OutP->lockgroup_info.copy = MACH_MSG_VIRTUAL_COPY; 1683 + OutP->lockgroup_info.type = MACH_MSG_OOL_DESCRIPTOR; 1684 + #endif /* UseStaticTemplates */ 1685 + 1686 + 1687 + OutP->lockgroup_infoCnt = 0; 1688 + 1689 + RetCode = host_lockgroup_info(In0P->Head.msgh_request_port, (lockgroup_info_array_t *)&(OutP->lockgroup_info.address), &OutP->lockgroup_infoCnt); 1690 + if (RetCode != KERN_SUCCESS) { 1691 + MIG_RETURN_ERROR(OutP, RetCode); 1692 + } 1693 + OutP->lockgroup_info.size = OutP->lockgroup_infoCnt * 252; 1694 + 1695 + 1696 + OutP->NDR = NDR_record; 1697 + 1698 + 1699 + OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX; 1700 + OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply)); 1701 + OutP->msgh_body.msgh_descriptor_count = 1; 1702 + __AfterRcvRpc(218, "host_lockgroup_info") 1703 + } 1704 + 1705 + #if ( __MigTypeCheck ) 1706 + #if __MIG_check__Request__mach_host_subsystem__ 1707 + #if !defined(__MIG_check__Request__host_statistics64_t__defined) 1708 + #define __MIG_check__Request__host_statistics64_t__defined 1709 + 1710 + mig_internal kern_return_t __MIG_check__Request__host_statistics64_t(__attribute__((__unused__)) __Request__host_statistics64_t *In0P) 1711 + { 1712 + 1713 + typedef __Request__host_statistics64_t __Request; 1714 + #if __MigTypeCheck 1715 + if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || 1716 + (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) 1717 + return MIG_BAD_ARGUMENTS; 1718 + #endif /* __MigTypeCheck */ 1719 + 1720 + return MACH_MSG_SUCCESS; 1721 + } 1722 + #endif /* !defined(__MIG_check__Request__host_statistics64_t__defined) */ 1723 + #endif /* __MIG_check__Request__mach_host_subsystem__ */ 1724 + #endif /* ( __MigTypeCheck ) */ 1725 + 1726 + 1727 + /* Routine host_statistics64 */ 1728 + mig_internal novalue _Xhost_statistics64 1729 + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) 1730 + { 1731 + 1732 + #ifdef __MigPackStructs 1733 + #pragma pack(8) 1734 + #endif 1735 + typedef struct { 1736 + mach_msg_header_t Head; 1737 + NDR_record_t NDR; 1738 + host_flavor_t flavor; 1739 + mach_msg_type_number_t host_info64_outCnt; 1740 + mach_msg_trailer_t trailer; 1741 + } Request; 1742 + #ifdef __MigPackStructs 1743 + #pragma pack() 1744 + #endif 1745 + typedef __Request__host_statistics64_t __Request; 1746 + typedef __Reply__host_statistics64_t Reply; 1747 + 1748 + /* 1749 + * typedef struct { 1750 + * mach_msg_header_t Head; 1751 + * NDR_record_t NDR; 1752 + * kern_return_t RetCode; 1753 + * } mig_reply_error_t; 1754 + */ 1755 + 1756 + Request *In0P = (Request *) InHeadP; 1757 + Reply *OutP = (Reply *) OutHeadP; 1758 + #ifdef __MIG_check__Request__host_statistics64_t__defined 1759 + kern_return_t check_result; 1760 + #endif /* __MIG_check__Request__host_statistics64_t__defined */ 1761 + 1762 + __DeclareRcvRpc(219, "host_statistics64") 1763 + __BeforeRcvRpc(219, "host_statistics64") 1764 + 1765 + #if defined(__MIG_check__Request__host_statistics64_t__defined) 1766 + check_result = __MIG_check__Request__host_statistics64_t((__Request *)In0P); 1767 + if (check_result != MACH_MSG_SUCCESS) 1768 + { MIG_RETURN_ERROR(OutP, check_result); } 1769 + #endif /* defined(__MIG_check__Request__host_statistics64_t__defined) */ 1770 + 1771 + OutP->host_info64_outCnt = 256; 1772 + if (In0P->host_info64_outCnt < OutP->host_info64_outCnt) 1773 + OutP->host_info64_outCnt = In0P->host_info64_outCnt; 1774 + 1775 + OutP->RetCode = host_statistics64(In0P->Head.msgh_request_port, In0P->flavor, OutP->host_info64_out, &OutP->host_info64_outCnt); 1776 + if (OutP->RetCode != KERN_SUCCESS) { 1777 + MIG_RETURN_ERROR(OutP, OutP->RetCode); 1778 + } 1779 + 1780 + OutP->NDR = NDR_record; 1781 + 1782 + OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply) - 1024) + (_WALIGN_((4 * OutP->host_info64_outCnt + 7) & ~7)); 1783 + 1784 + __AfterRcvRpc(219, "host_statistics64") 1785 + } 1786 + 1787 + #if ( __MigTypeCheck ) 1788 + #if __MIG_check__Request__mach_host_subsystem__ 1789 + #if !defined(__MIG_check__Request__mach_zone_info_t__defined) 1790 + #define __MIG_check__Request__mach_zone_info_t__defined 1791 + 1792 + mig_internal kern_return_t __MIG_check__Request__mach_zone_info_t(__attribute__((__unused__)) __Request__mach_zone_info_t *In0P) 1793 + { 1794 + 1795 + typedef __Request__mach_zone_info_t __Request; 1796 + #if __MigTypeCheck 1797 + if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || 1798 + (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) 1799 + return MIG_BAD_ARGUMENTS; 1800 + #endif /* __MigTypeCheck */ 1801 + 1802 + return MACH_MSG_SUCCESS; 1803 + } 1804 + #endif /* !defined(__MIG_check__Request__mach_zone_info_t__defined) */ 1805 + #endif /* __MIG_check__Request__mach_host_subsystem__ */ 1806 + #endif /* ( __MigTypeCheck ) */ 1807 + 1808 + 1809 + /* Routine mach_zone_info */ 1810 + mig_internal novalue _Xmach_zone_info 1811 + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) 1812 + { 1813 + 1814 + #ifdef __MigPackStructs 1815 + #pragma pack(8) 1816 + #endif 1817 + typedef struct { 1818 + mach_msg_header_t Head; 1819 + mach_msg_trailer_t trailer; 1820 + } Request; 1821 + #ifdef __MigPackStructs 1822 + #pragma pack() 1823 + #endif 1824 + typedef __Request__mach_zone_info_t __Request; 1825 + typedef __Reply__mach_zone_info_t Reply; 1826 + 1827 + /* 1828 + * typedef struct { 1829 + * mach_msg_header_t Head; 1830 + * NDR_record_t NDR; 1831 + * kern_return_t RetCode; 1832 + * } mig_reply_error_t; 1833 + */ 1834 + 1835 + Request *In0P = (Request *) InHeadP; 1836 + Reply *OutP = (Reply *) OutHeadP; 1837 + #ifdef __MIG_check__Request__mach_zone_info_t__defined 1838 + kern_return_t check_result; 1839 + #endif /* __MIG_check__Request__mach_zone_info_t__defined */ 1840 + 1841 + #if UseStaticTemplates 1842 + const static mach_msg_ool_descriptor_t namesTemplate = { 1843 + /* addr = */ (void *)0, 1844 + /* size = */ 0, 1845 + /* deal = */ TRUE, 1846 + /* copy = */ MACH_MSG_VIRTUAL_COPY, 1847 + /* pad2 = */ 0, 1848 + /* type = */ MACH_MSG_OOL_DESCRIPTOR, 1849 + }; 1850 + #endif /* UseStaticTemplates */ 1851 + 1852 + #if UseStaticTemplates 1853 + const static mach_msg_ool_descriptor_t infoTemplate = { 1854 + /* addr = */ (void *)0, 1855 + /* size = */ 0, 1856 + /* deal = */ TRUE, 1857 + /* copy = */ MACH_MSG_VIRTUAL_COPY, 1858 + /* pad2 = */ 0, 1859 + /* type = */ MACH_MSG_OOL_DESCRIPTOR, 1860 + }; 1861 + #endif /* UseStaticTemplates */ 1862 + 1863 + kern_return_t RetCode; 1864 + __DeclareRcvRpc(220, "mach_zone_info") 1865 + __BeforeRcvRpc(220, "mach_zone_info") 1866 + 1867 + #if defined(__MIG_check__Request__mach_zone_info_t__defined) 1868 + check_result = __MIG_check__Request__mach_zone_info_t((__Request *)In0P); 1869 + if (check_result != MACH_MSG_SUCCESS) 1870 + { MIG_RETURN_ERROR(OutP, check_result); } 1871 + #endif /* defined(__MIG_check__Request__mach_zone_info_t__defined) */ 1872 + 1873 + #if UseStaticTemplates 1874 + OutP->names = namesTemplate; 1875 + #else /* UseStaticTemplates */ 1876 + OutP->names.deallocate = TRUE; 1877 + OutP->names.copy = MACH_MSG_VIRTUAL_COPY; 1878 + OutP->names.type = MACH_MSG_OOL_DESCRIPTOR; 1879 + #endif /* UseStaticTemplates */ 1880 + 1881 + 1882 + #if UseStaticTemplates 1883 + OutP->info = infoTemplate; 1884 + #else /* UseStaticTemplates */ 1885 + OutP->info.deallocate = TRUE; 1886 + OutP->info.copy = MACH_MSG_VIRTUAL_COPY; 1887 + OutP->info.type = MACH_MSG_OOL_DESCRIPTOR; 1888 + #endif /* UseStaticTemplates */ 1889 + 1890 + 1891 + OutP->namesCnt = 0; 1892 + 1893 + OutP->infoCnt = 0; 1894 + 1895 + RetCode = mach_zone_info(In0P->Head.msgh_request_port, (mach_zone_name_array_t *)&(OutP->names.address), &OutP->namesCnt, (mach_zone_info_array_t *)&(OutP->info.address), &OutP->infoCnt); 1896 + if (RetCode != KERN_SUCCESS) { 1897 + MIG_RETURN_ERROR(OutP, RetCode); 1898 + } 1899 + OutP->names.size = OutP->namesCnt * 80; 1900 + 1901 + OutP->info.size = OutP->infoCnt * 64; 1902 + 1903 + 1904 + OutP->NDR = NDR_record; 1905 + 1906 + 1907 + OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX; 1908 + OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply)); 1909 + OutP->msgh_body.msgh_descriptor_count = 2; 1910 + __AfterRcvRpc(220, "mach_zone_info") 1911 + } 1912 + 1913 + #if ( __MigTypeCheck ) 1914 + #if __MIG_check__Request__mach_host_subsystem__ 1915 + #if !defined(__MIG_check__Request__mach_zone_force_gc_t__defined) 1916 + #define __MIG_check__Request__mach_zone_force_gc_t__defined 1917 + 1918 + mig_internal kern_return_t __MIG_check__Request__mach_zone_force_gc_t(__attribute__((__unused__)) __Request__mach_zone_force_gc_t *In0P) 1919 + { 1920 + 1921 + typedef __Request__mach_zone_force_gc_t __Request; 1922 + #if __MigTypeCheck 1923 + if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || 1924 + (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) 1925 + return MIG_BAD_ARGUMENTS; 1926 + #endif /* __MigTypeCheck */ 1927 + 1928 + return MACH_MSG_SUCCESS; 1929 + } 1930 + #endif /* !defined(__MIG_check__Request__mach_zone_force_gc_t__defined) */ 1931 + #endif /* __MIG_check__Request__mach_host_subsystem__ */ 1932 + #endif /* ( __MigTypeCheck ) */ 1933 + 1934 + 1935 + /* Routine mach_zone_force_gc */ 1936 + mig_internal novalue _Xmach_zone_force_gc 1937 + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) 1938 + { 1939 + 1940 + #ifdef __MigPackStructs 1941 + #pragma pack(8) 1942 + #endif 1943 + typedef struct { 1944 + mach_msg_header_t Head; 1945 + mach_msg_trailer_t trailer; 1946 + } Request; 1947 + #ifdef __MigPackStructs 1948 + #pragma pack() 1949 + #endif 1950 + typedef __Request__mach_zone_force_gc_t __Request; 1951 + typedef __Reply__mach_zone_force_gc_t Reply; 1952 + 1953 + /* 1954 + * typedef struct { 1955 + * mach_msg_header_t Head; 1956 + * NDR_record_t NDR; 1957 + * kern_return_t RetCode; 1958 + * } mig_reply_error_t; 1959 + */ 1960 + 1961 + Request *In0P = (Request *) InHeadP; 1962 + Reply *OutP = (Reply *) OutHeadP; 1963 + #ifdef __MIG_check__Request__mach_zone_force_gc_t__defined 1964 + kern_return_t check_result; 1965 + #endif /* __MIG_check__Request__mach_zone_force_gc_t__defined */ 1966 + 1967 + __DeclareRcvRpc(221, "mach_zone_force_gc") 1968 + __BeforeRcvRpc(221, "mach_zone_force_gc") 1969 + 1970 + #if defined(__MIG_check__Request__mach_zone_force_gc_t__defined) 1971 + check_result = __MIG_check__Request__mach_zone_force_gc_t((__Request *)In0P); 1972 + if (check_result != MACH_MSG_SUCCESS) 1973 + { MIG_RETURN_ERROR(OutP, check_result); } 1974 + #endif /* defined(__MIG_check__Request__mach_zone_force_gc_t__defined) */ 1975 + 1976 + OutP->RetCode = mach_zone_force_gc(In0P->Head.msgh_request_port); 1977 + 1978 + OutP->NDR = NDR_record; 1979 + 1980 + 1981 + __AfterRcvRpc(221, "mach_zone_force_gc") 1982 + } 1983 + 1984 + #if ( __MigTypeCheck ) 1985 + #if __MIG_check__Request__mach_host_subsystem__ 1986 + #if !defined(__MIG_check__Request__host_create_mach_voucher_t__defined) 1987 + #define __MIG_check__Request__host_create_mach_voucher_t__defined 1988 + 1989 + mig_internal kern_return_t __MIG_check__Request__host_create_mach_voucher_t(__attribute__((__unused__)) __Request__host_create_mach_voucher_t *In0P) 1990 + { 1991 + 1992 + typedef __Request__host_create_mach_voucher_t __Request; 1993 + #if __MigTypeCheck 1994 + unsigned int msgh_size; 1995 + #endif /* __MigTypeCheck */ 1996 + 1997 + #if __MigTypeCheck 1998 + msgh_size = In0P->Head.msgh_size; 1999 + if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || 2000 + (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 5120)) || (msgh_size > (mach_msg_size_t)sizeof(__Request))) 2001 + return MIG_BAD_ARGUMENTS; 2002 + #endif /* __MigTypeCheck */ 2003 + 2004 + #if defined(__NDR_convert__int_rep__Request__host_create_mach_voucher_t__recipesCnt__defined) 2005 + if (In0P->NDR.int_rep != NDR_record.int_rep) 2006 + __NDR_convert__int_rep__Request__host_create_mach_voucher_t__recipesCnt(&In0P->recipesCnt, In0P->NDR.int_rep); 2007 + #endif /* __NDR_convert__int_rep__Request__host_create_mach_voucher_t__recipesCnt__defined */ 2008 + #if __MigTypeCheck 2009 + if ( In0P->recipesCnt > 5120 ) 2010 + return MIG_BAD_ARGUMENTS; 2011 + if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 5120)) < In0P->recipesCnt) || 2012 + (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 5120) + _WALIGN_(In0P->recipesCnt))) 2013 + return MIG_BAD_ARGUMENTS; 2014 + #endif /* __MigTypeCheck */ 2015 + 2016 + return MACH_MSG_SUCCESS; 2017 + } 2018 + #endif /* !defined(__MIG_check__Request__host_create_mach_voucher_t__defined) */ 2019 + #endif /* __MIG_check__Request__mach_host_subsystem__ */ 2020 + #endif /* ( __MigTypeCheck ) */ 2021 + 2022 + 2023 + /* Routine host_create_mach_voucher */ 2024 + mig_internal novalue _Xhost_create_mach_voucher 2025 + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) 2026 + { 2027 + 2028 + #ifdef __MigPackStructs 2029 + #pragma pack(8) 2030 + #endif 2031 + typedef struct { 2032 + mach_msg_header_t Head; 2033 + NDR_record_t NDR; 2034 + mach_msg_type_number_t recipesCnt; 2035 + uint8_t recipes[5120]; 2036 + mach_msg_trailer_t trailer; 2037 + } Request; 2038 + #ifdef __MigPackStructs 2039 + #pragma pack() 2040 + #endif 2041 + typedef __Request__host_create_mach_voucher_t __Request; 2042 + typedef __Reply__host_create_mach_voucher_t Reply; 2043 + 2044 + /* 2045 + * typedef struct { 2046 + * mach_msg_header_t Head; 2047 + * NDR_record_t NDR; 2048 + * kern_return_t RetCode; 2049 + * } mig_reply_error_t; 2050 + */ 2051 + 2052 + Request *In0P = (Request *) InHeadP; 2053 + Reply *OutP = (Reply *) OutHeadP; 2054 + #ifdef __MIG_check__Request__host_create_mach_voucher_t__defined 2055 + kern_return_t check_result; 2056 + #endif /* __MIG_check__Request__host_create_mach_voucher_t__defined */ 2057 + 2058 + #if UseStaticTemplates 2059 + const static mach_msg_port_descriptor_t voucherTemplate = { 2060 + /* name = */ MACH_PORT_NULL, 2061 + /* pad1 = */ 0, 2062 + /* pad2 = */ 0, 2063 + /* disp = */ 19, 2064 + /* type = */ MACH_MSG_PORT_DESCRIPTOR, 2065 + }; 2066 + #endif /* UseStaticTemplates */ 2067 + 2068 + kern_return_t RetCode; 2069 + __DeclareRcvRpc(222, "host_create_mach_voucher") 2070 + __BeforeRcvRpc(222, "host_create_mach_voucher") 2071 + 2072 + #if defined(__MIG_check__Request__host_create_mach_voucher_t__defined) 2073 + check_result = __MIG_check__Request__host_create_mach_voucher_t((__Request *)In0P); 2074 + if (check_result != MACH_MSG_SUCCESS) 2075 + { MIG_RETURN_ERROR(OutP, check_result); } 2076 + #endif /* defined(__MIG_check__Request__host_create_mach_voucher_t__defined) */ 2077 + 2078 + #if UseStaticTemplates 2079 + OutP->voucher = voucherTemplate; 2080 + #else /* UseStaticTemplates */ 2081 + OutP->voucher.disposition = 19; 2082 + OutP->voucher.type = MACH_MSG_PORT_DESCRIPTOR; 2083 + #endif /* UseStaticTemplates */ 2084 + 2085 + 2086 + RetCode = host_create_mach_voucher(In0P->Head.msgh_request_port, In0P->recipes, In0P->recipesCnt, &OutP->voucher.name); 2087 + if (RetCode != KERN_SUCCESS) { 2088 + MIG_RETURN_ERROR(OutP, RetCode); 2089 + } 2090 + 2091 + OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX; 2092 + OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply)); 2093 + OutP->msgh_body.msgh_descriptor_count = 1; 2094 + __AfterRcvRpc(222, "host_create_mach_voucher") 2095 + } 2096 + 2097 + #if ( __MigTypeCheck ) 2098 + #if __MIG_check__Request__mach_host_subsystem__ 2099 + #if !defined(__MIG_check__Request__host_register_mach_voucher_attr_manager_t__defined) 2100 + #define __MIG_check__Request__host_register_mach_voucher_attr_manager_t__defined 2101 + 2102 + mig_internal kern_return_t __MIG_check__Request__host_register_mach_voucher_attr_manager_t(__attribute__((__unused__)) __Request__host_register_mach_voucher_attr_manager_t *In0P) 2103 + { 2104 + 2105 + typedef __Request__host_register_mach_voucher_attr_manager_t __Request; 2106 + #if __MigTypeCheck 2107 + if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || 2108 + (In0P->msgh_body.msgh_descriptor_count != 1) || 2109 + (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) 2110 + return MIG_BAD_ARGUMENTS; 2111 + #endif /* __MigTypeCheck */ 2112 + 2113 + #if __MigTypeCheck 2114 + if (In0P->attr_manager.type != MACH_MSG_PORT_DESCRIPTOR || 2115 + In0P->attr_manager.disposition != 17) 2116 + return MIG_TYPE_ERROR; 2117 + #endif /* __MigTypeCheck */ 2118 + 2119 + return MACH_MSG_SUCCESS; 2120 + } 2121 + #endif /* !defined(__MIG_check__Request__host_register_mach_voucher_attr_manager_t__defined) */ 2122 + #endif /* __MIG_check__Request__mach_host_subsystem__ */ 2123 + #endif /* ( __MigTypeCheck ) */ 2124 + 2125 + 2126 + /* Routine host_register_mach_voucher_attr_manager */ 2127 + mig_internal novalue _Xhost_register_mach_voucher_attr_manager 2128 + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) 2129 + { 2130 + 2131 + #ifdef __MigPackStructs 2132 + #pragma pack(8) 2133 + #endif 2134 + typedef struct { 2135 + mach_msg_header_t Head; 2136 + /* start of the kernel processed data */ 2137 + mach_msg_body_t msgh_body; 2138 + mach_msg_port_descriptor_t attr_manager; 2139 + /* end of the kernel processed data */ 2140 + NDR_record_t NDR; 2141 + mach_voucher_attr_value_handle_t default_value; 2142 + mach_msg_trailer_t trailer; 2143 + } Request; 2144 + #ifdef __MigPackStructs 2145 + #pragma pack() 2146 + #endif 2147 + typedef __Request__host_register_mach_voucher_attr_manager_t __Request; 2148 + typedef __Reply__host_register_mach_voucher_attr_manager_t Reply; 2149 + 2150 + /* 2151 + * typedef struct { 2152 + * mach_msg_header_t Head; 2153 + * NDR_record_t NDR; 2154 + * kern_return_t RetCode; 2155 + * } mig_reply_error_t; 2156 + */ 2157 + 2158 + Request *In0P = (Request *) InHeadP; 2159 + Reply *OutP = (Reply *) OutHeadP; 2160 + #ifdef __MIG_check__Request__host_register_mach_voucher_attr_manager_t__defined 2161 + kern_return_t check_result; 2162 + #endif /* __MIG_check__Request__host_register_mach_voucher_attr_manager_t__defined */ 2163 + 2164 + #if UseStaticTemplates 2165 + const static mach_msg_port_descriptor_t new_attr_controlTemplate = { 2166 + /* name = */ MACH_PORT_NULL, 2167 + /* pad1 = */ 0, 2168 + /* pad2 = */ 0, 2169 + /* disp = */ 19, 2170 + /* type = */ MACH_MSG_PORT_DESCRIPTOR, 2171 + }; 2172 + #endif /* UseStaticTemplates */ 2173 + 2174 + kern_return_t RetCode; 2175 + __DeclareRcvRpc(223, "host_register_mach_voucher_attr_manager") 2176 + __BeforeRcvRpc(223, "host_register_mach_voucher_attr_manager") 2177 + 2178 + #if defined(__MIG_check__Request__host_register_mach_voucher_attr_manager_t__defined) 2179 + check_result = __MIG_check__Request__host_register_mach_voucher_attr_manager_t((__Request *)In0P); 2180 + if (check_result != MACH_MSG_SUCCESS) 2181 + { MIG_RETURN_ERROR(OutP, check_result); } 2182 + #endif /* defined(__MIG_check__Request__host_register_mach_voucher_attr_manager_t__defined) */ 2183 + 2184 + #if UseStaticTemplates 2185 + OutP->new_attr_control = new_attr_controlTemplate; 2186 + #else /* UseStaticTemplates */ 2187 + OutP->new_attr_control.disposition = 19; 2188 + OutP->new_attr_control.type = MACH_MSG_PORT_DESCRIPTOR; 2189 + #endif /* UseStaticTemplates */ 2190 + 2191 + 2192 + RetCode = host_register_mach_voucher_attr_manager(In0P->Head.msgh_request_port, In0P->attr_manager.name, In0P->default_value, &OutP->new_key, &OutP->new_attr_control.name); 2193 + if (RetCode != KERN_SUCCESS) { 2194 + MIG_RETURN_ERROR(OutP, RetCode); 2195 + } 2196 + 2197 + OutP->NDR = NDR_record; 2198 + 2199 + 2200 + OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX; 2201 + OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply)); 2202 + OutP->msgh_body.msgh_descriptor_count = 1; 2203 + __AfterRcvRpc(223, "host_register_mach_voucher_attr_manager") 2204 + } 2205 + 2206 + #if ( __MigTypeCheck ) 2207 + #if __MIG_check__Request__mach_host_subsystem__ 2208 + #if !defined(__MIG_check__Request__host_register_well_known_mach_voucher_attr_manager_t__defined) 2209 + #define __MIG_check__Request__host_register_well_known_mach_voucher_attr_manager_t__defined 2210 + 2211 + mig_internal kern_return_t __MIG_check__Request__host_register_well_known_mach_voucher_attr_manager_t(__attribute__((__unused__)) __Request__host_register_well_known_mach_voucher_attr_manager_t *In0P) 2212 + { 2213 + 2214 + typedef __Request__host_register_well_known_mach_voucher_attr_manager_t __Request; 2215 + #if __MigTypeCheck 2216 + if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || 2217 + (In0P->msgh_body.msgh_descriptor_count != 1) || 2218 + (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) 2219 + return MIG_BAD_ARGUMENTS; 2220 + #endif /* __MigTypeCheck */ 2221 + 2222 + #if __MigTypeCheck 2223 + if (In0P->attr_manager.type != MACH_MSG_PORT_DESCRIPTOR || 2224 + In0P->attr_manager.disposition != 17) 2225 + return MIG_TYPE_ERROR; 2226 + #endif /* __MigTypeCheck */ 2227 + 2228 + return MACH_MSG_SUCCESS; 2229 + } 2230 + #endif /* !defined(__MIG_check__Request__host_register_well_known_mach_voucher_attr_manager_t__defined) */ 2231 + #endif /* __MIG_check__Request__mach_host_subsystem__ */ 2232 + #endif /* ( __MigTypeCheck ) */ 2233 + 2234 + 2235 + /* Routine host_register_well_known_mach_voucher_attr_manager */ 2236 + mig_internal novalue _Xhost_register_well_known_mach_voucher_attr_manager 2237 + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) 2238 + { 2239 + 2240 + #ifdef __MigPackStructs 2241 + #pragma pack(8) 2242 + #endif 2243 + typedef struct { 2244 + mach_msg_header_t Head; 2245 + /* start of the kernel processed data */ 2246 + mach_msg_body_t msgh_body; 2247 + mach_msg_port_descriptor_t attr_manager; 2248 + /* end of the kernel processed data */ 2249 + NDR_record_t NDR; 2250 + mach_voucher_attr_value_handle_t default_value; 2251 + mach_voucher_attr_key_t key; 2252 + mach_msg_trailer_t trailer; 2253 + } Request; 2254 + #ifdef __MigPackStructs 2255 + #pragma pack() 2256 + #endif 2257 + typedef __Request__host_register_well_known_mach_voucher_attr_manager_t __Request; 2258 + typedef __Reply__host_register_well_known_mach_voucher_attr_manager_t Reply; 2259 + 2260 + /* 2261 + * typedef struct { 2262 + * mach_msg_header_t Head; 2263 + * NDR_record_t NDR; 2264 + * kern_return_t RetCode; 2265 + * } mig_reply_error_t; 2266 + */ 2267 + 2268 + Request *In0P = (Request *) InHeadP; 2269 + Reply *OutP = (Reply *) OutHeadP; 2270 + #ifdef __MIG_check__Request__host_register_well_known_mach_voucher_attr_manager_t__defined 2271 + kern_return_t check_result; 2272 + #endif /* __MIG_check__Request__host_register_well_known_mach_voucher_attr_manager_t__defined */ 2273 + 2274 + #if UseStaticTemplates 2275 + const static mach_msg_port_descriptor_t new_attr_controlTemplate = { 2276 + /* name = */ MACH_PORT_NULL, 2277 + /* pad1 = */ 0, 2278 + /* pad2 = */ 0, 2279 + /* disp = */ 19, 2280 + /* type = */ MACH_MSG_PORT_DESCRIPTOR, 2281 + }; 2282 + #endif /* UseStaticTemplates */ 2283 + 2284 + kern_return_t RetCode; 2285 + __DeclareRcvRpc(224, "host_register_well_known_mach_voucher_attr_manager") 2286 + __BeforeRcvRpc(224, "host_register_well_known_mach_voucher_attr_manager") 2287 + 2288 + #if defined(__MIG_check__Request__host_register_well_known_mach_voucher_attr_manager_t__defined) 2289 + check_result = __MIG_check__Request__host_register_well_known_mach_voucher_attr_manager_t((__Request *)In0P); 2290 + if (check_result != MACH_MSG_SUCCESS) 2291 + { MIG_RETURN_ERROR(OutP, check_result); } 2292 + #endif /* defined(__MIG_check__Request__host_register_well_known_mach_voucher_attr_manager_t__defined) */ 2293 + 2294 + #if UseStaticTemplates 2295 + OutP->new_attr_control = new_attr_controlTemplate; 2296 + #else /* UseStaticTemplates */ 2297 + OutP->new_attr_control.disposition = 19; 2298 + OutP->new_attr_control.type = MACH_MSG_PORT_DESCRIPTOR; 2299 + #endif /* UseStaticTemplates */ 2300 + 2301 + 2302 + RetCode = host_register_well_known_mach_voucher_attr_manager(In0P->Head.msgh_request_port, In0P->attr_manager.name, In0P->default_value, In0P->key, &OutP->new_attr_control.name); 2303 + if (RetCode != KERN_SUCCESS) { 2304 + MIG_RETURN_ERROR(OutP, RetCode); 2305 + } 2306 + 2307 + OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX; 2308 + OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply)); 2309 + OutP->msgh_body.msgh_descriptor_count = 1; 2310 + __AfterRcvRpc(224, "host_register_well_known_mach_voucher_attr_manager") 2311 + } 2312 + 2313 + 2314 + 2315 + /* Description of this subsystem, for use in direct RPC */ 2316 + const struct mach_host_subsystem mach_host_subsystem = { 2317 + mach_host_server_routine, 2318 + 200, 2319 + 225, 2320 + (mach_msg_size_t)sizeof(union __ReplyUnion__mach_host_subsystem), 2321 + (vm_address_t)0, 2322 + { 2323 + { (mig_impl_routine_t) 0, 2324 + (mig_stub_routine_t) _Xhost_info, 5, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__host_info_t)}, 2325 + { (mig_impl_routine_t) 0, 2326 + (mig_stub_routine_t) _Xhost_kernel_version, 2, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__host_kernel_version_t)}, 2327 + { (mig_impl_routine_t) 0, 2328 + (mig_stub_routine_t) _X_host_page_size, 2, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply___host_page_size_t)}, 2329 + { (mig_impl_routine_t) 0, 2330 + (mig_stub_routine_t) _Xmach_memory_object_memory_entry, 7, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_memory_object_memory_entry_t)}, 2331 + { (mig_impl_routine_t) 0, 2332 + (mig_stub_routine_t) _Xhost_processor_info, 6, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__host_processor_info_t)}, 2333 + { (mig_impl_routine_t) 0, 2334 + (mig_stub_routine_t) _Xhost_get_io_master, 2, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__host_get_io_master_t)}, 2335 + { (mig_impl_routine_t) 0, 2336 + (mig_stub_routine_t) _Xhost_get_clock_service, 3, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__host_get_clock_service_t)}, 2337 + { (mig_impl_routine_t) 0, 2338 + (mig_stub_routine_t) _Xkmod_get_info, 4, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__kmod_get_info_t)}, 2339 + { (mig_impl_routine_t) 0, 2340 + (mig_stub_routine_t) _Xhost_zone_info, 7, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__host_zone_info_t)}, 2341 + { (mig_impl_routine_t) 0, 2342 + (mig_stub_routine_t) _Xhost_virtual_physical_table_info, 4, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__host_virtual_physical_table_info_t)}, 2343 + {0, 0, 0, 0, 0, 0}, 2344 + {0, 0, 0, 0, 0, 0}, 2345 + {0, 0, 0, 0, 0, 0}, 2346 + { (mig_impl_routine_t) 0, 2347 + (mig_stub_routine_t) _Xprocessor_set_default, 2, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__processor_set_default_t)}, 2348 + { (mig_impl_routine_t) 0, 2349 + (mig_stub_routine_t) _Xprocessor_set_create, 3, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__processor_set_create_t)}, 2350 + { (mig_impl_routine_t) 0, 2351 + (mig_stub_routine_t) _Xmach_memory_object_memory_entry_64, 7, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_memory_object_memory_entry_64_t)}, 2352 + { (mig_impl_routine_t) 0, 2353 + (mig_stub_routine_t) _Xhost_statistics, 5, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__host_statistics_t)}, 2354 + { (mig_impl_routine_t) 0, 2355 + (mig_stub_routine_t) _Xhost_request_notification, 3, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__host_request_notification_t)}, 2356 + { (mig_impl_routine_t) 0, 2357 + (mig_stub_routine_t) _Xhost_lockgroup_info, 4, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__host_lockgroup_info_t)}, 2358 + { (mig_impl_routine_t) 0, 2359 + (mig_stub_routine_t) _Xhost_statistics64, 5, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__host_statistics64_t)}, 2360 + { (mig_impl_routine_t) 0, 2361 + (mig_stub_routine_t) _Xmach_zone_info, 7, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_zone_info_t)}, 2362 + { (mig_impl_routine_t) 0, 2363 + (mig_stub_routine_t) _Xmach_zone_force_gc, 1, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_zone_force_gc_t)}, 2364 + { (mig_impl_routine_t) 0, 2365 + (mig_stub_routine_t) _Xhost_create_mach_voucher, 5, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__host_create_mach_voucher_t)}, 2366 + { (mig_impl_routine_t) 0, 2367 + (mig_stub_routine_t) _Xhost_register_mach_voucher_attr_manager, 6, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__host_register_mach_voucher_attr_manager_t)}, 2368 + { (mig_impl_routine_t) 0, 2369 + (mig_stub_routine_t) _Xhost_register_well_known_mach_voucher_attr_manager, 6, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__host_register_well_known_mach_voucher_attr_manager_t)}, 2370 + } 2371 + }; 2372 + 2373 + mig_external boolean_t mach_host_server 2374 + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) 2375 + { 2376 + /* 2377 + * typedef struct { 2378 + * mach_msg_header_t Head; 2379 + * NDR_record_t NDR; 2380 + * kern_return_t RetCode; 2381 + * } mig_reply_error_t; 2382 + */ 2383 + 2384 + register mig_routine_t routine; 2385 + 2386 + OutHeadP->msgh_bits = MACH_MSGH_BITS(MACH_MSGH_BITS_REPLY(InHeadP->msgh_bits), 0); 2387 + OutHeadP->msgh_remote_port = InHeadP->msgh_reply_port; 2388 + /* Minimal size: routine() will update it if different */ 2389 + OutHeadP->msgh_size = (mach_msg_size_t)sizeof(mig_reply_error_t); 2390 + OutHeadP->msgh_local_port = MACH_PORT_NULL; 2391 + OutHeadP->msgh_id = InHeadP->msgh_id + 100; 2392 + 2393 + if ((InHeadP->msgh_id > 224) || (InHeadP->msgh_id < 200) || 2394 + ((routine = mach_host_subsystem.routine[InHeadP->msgh_id - 200].stub_routine) == 0)) { 2395 + ((mig_reply_error_t *)OutHeadP)->NDR = NDR_record; 2396 + ((mig_reply_error_t *)OutHeadP)->RetCode = MIG_BAD_ID; 2397 + return FALSE; 2398 + } 2399 + (*routine) (InHeadP, OutHeadP); 2400 + return TRUE; 2401 + } 2402 + 2403 + mig_external mig_routine_t mach_host_server_routine 2404 + (mach_msg_header_t *InHeadP) 2405 + { 2406 + register int msgh_id; 2407 + 2408 + msgh_id = InHeadP->msgh_id - 200; 2409 + 2410 + if ((msgh_id > 24) || (msgh_id < 0)) 2411 + return 0; 2412 + 2413 + return mach_host_subsystem.routine[msgh_id].stub_routine; 2414 + }
+1097
lkm/mig/mach_hostServer.h
··· 1 + #ifndef _mach_host_server_ 2 + #define _mach_host_server_ 3 + 4 + /* Module mach_host */ 5 + 6 + #include <string.h> 7 + #include <mach/ndr.h> 8 + #include <mach/boolean.h> 9 + #include <mach/kern_return.h> 10 + #include <mach/notify.h> 11 + #include <mach/mach_types.h> 12 + #include <mach/message.h> 13 + #include <mach/mig_errors.h> 14 + #include <mach/port.h> 15 + 16 + /* BEGIN VOUCHER CODE */ 17 + 18 + #ifndef KERNEL 19 + #if defined(__has_include) 20 + #if __has_include(<mach/mig_voucher_support.h>) 21 + #ifndef USING_VOUCHERS 22 + #define USING_VOUCHERS 23 + #endif 24 + #ifndef __VOUCHER_FORWARD_TYPE_DECLS__ 25 + #define __VOUCHER_FORWARD_TYPE_DECLS__ 26 + #ifdef __cplusplus 27 + extern "C" { 28 + #endif 29 + extern boolean_t voucher_mach_msg_set(mach_msg_header_t *msg) __attribute__((weak_import)); 30 + #ifdef __cplusplus 31 + } 32 + #endif 33 + #endif // __VOUCHER_FORWARD_TYPE_DECLS__ 34 + #endif // __has_include(<mach/mach_voucher_types.h>) 35 + #endif // __has_include 36 + #endif // !KERNEL 37 + 38 + /* END VOUCHER CODE */ 39 + 40 + 41 + #ifdef AUTOTEST 42 + #ifndef FUNCTION_PTR_T 43 + #define FUNCTION_PTR_T 44 + typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); 45 + typedef struct { 46 + char *name; 47 + function_ptr_t function; 48 + } function_table_entry; 49 + typedef function_table_entry *function_table_t; 50 + #endif /* FUNCTION_PTR_T */ 51 + #endif /* AUTOTEST */ 52 + 53 + #ifndef mach_host_MSG_COUNT 54 + #define mach_host_MSG_COUNT 25 55 + #endif /* mach_host_MSG_COUNT */ 56 + 57 + #include <mach/std_types.h> 58 + #include <mach/mig.h> 59 + #include <mach/mig.h> 60 + #include <mach/mach_types.h> 61 + #include <mach/mach_types.h> 62 + #include <mach_debug/mach_debug_types.h> 63 + #include <mach/mach_init.h> 64 + 65 + #ifdef __BeforeMigServerHeader 66 + __BeforeMigServerHeader 67 + #endif /* __BeforeMigServerHeader */ 68 + 69 + 70 + /* Routine host_info */ 71 + #ifdef mig_external 72 + mig_external 73 + #else 74 + extern 75 + #endif /* mig_external */ 76 + kern_return_t host_info 77 + ( 78 + host_t host, 79 + host_flavor_t flavor, 80 + host_info_t host_info_out, 81 + mach_msg_type_number_t *host_info_outCnt 82 + ); 83 + 84 + /* Routine host_kernel_version */ 85 + #ifdef mig_external 86 + mig_external 87 + #else 88 + extern 89 + #endif /* mig_external */ 90 + kern_return_t host_kernel_version 91 + ( 92 + host_t host, 93 + kernel_version_t kernel_version 94 + ); 95 + 96 + /* Routine _host_page_size */ 97 + #ifdef mig_external 98 + mig_external 99 + #else 100 + extern 101 + #endif /* mig_external */ 102 + kern_return_t _host_page_size 103 + ( 104 + host_t host, 105 + vm_size_t *out_page_size 106 + ); 107 + 108 + /* Routine mach_memory_object_memory_entry */ 109 + #ifdef mig_external 110 + mig_external 111 + #else 112 + extern 113 + #endif /* mig_external */ 114 + kern_return_t mach_memory_object_memory_entry 115 + ( 116 + host_t host, 117 + boolean_t internal, 118 + vm_size_t size, 119 + vm_prot_t permission, 120 + memory_object_t pager, 121 + mach_port_t *entry_handle 122 + ); 123 + 124 + /* Routine host_processor_info */ 125 + #ifdef mig_external 126 + mig_external 127 + #else 128 + extern 129 + #endif /* mig_external */ 130 + kern_return_t host_processor_info 131 + ( 132 + host_t host, 133 + processor_flavor_t flavor, 134 + natural_t *out_processor_count, 135 + processor_info_array_t *out_processor_info, 136 + mach_msg_type_number_t *out_processor_infoCnt 137 + ); 138 + 139 + /* Routine host_get_io_master */ 140 + #ifdef mig_external 141 + mig_external 142 + #else 143 + extern 144 + #endif /* mig_external */ 145 + kern_return_t host_get_io_master 146 + ( 147 + host_t host, 148 + io_master_t *io_master 149 + ); 150 + 151 + /* Routine host_get_clock_service */ 152 + #ifdef mig_external 153 + mig_external 154 + #else 155 + extern 156 + #endif /* mig_external */ 157 + kern_return_t host_get_clock_service 158 + ( 159 + host_t host, 160 + clock_id_t clock_id, 161 + clock_serv_t *clock_serv 162 + ); 163 + 164 + /* Routine kmod_get_info */ 165 + #ifdef mig_external 166 + mig_external 167 + #else 168 + extern 169 + #endif /* mig_external */ 170 + kern_return_t kmod_get_info 171 + ( 172 + host_t host, 173 + kmod_args_t *modules, 174 + mach_msg_type_number_t *modulesCnt 175 + ); 176 + 177 + /* Routine host_zone_info */ 178 + #ifdef mig_external 179 + mig_external 180 + #else 181 + extern 182 + #endif /* mig_external */ 183 + kern_return_t host_zone_info 184 + ( 185 + host_priv_t host, 186 + zone_name_array_t *names, 187 + mach_msg_type_number_t *namesCnt, 188 + zone_info_array_t *info, 189 + mach_msg_type_number_t *infoCnt 190 + ); 191 + 192 + /* Routine host_virtual_physical_table_info */ 193 + #ifdef mig_external 194 + mig_external 195 + #else 196 + extern 197 + #endif /* mig_external */ 198 + kern_return_t host_virtual_physical_table_info 199 + ( 200 + host_t host, 201 + hash_info_bucket_array_t *info, 202 + mach_msg_type_number_t *infoCnt 203 + ); 204 + 205 + /* Routine processor_set_default */ 206 + #ifdef mig_external 207 + mig_external 208 + #else 209 + extern 210 + #endif /* mig_external */ 211 + kern_return_t processor_set_default 212 + ( 213 + host_t host, 214 + processor_set_name_t *default_set 215 + ); 216 + 217 + /* Routine processor_set_create */ 218 + #ifdef mig_external 219 + mig_external 220 + #else 221 + extern 222 + #endif /* mig_external */ 223 + kern_return_t processor_set_create 224 + ( 225 + host_t host, 226 + processor_set_t *new_set, 227 + processor_set_name_t *new_name 228 + ); 229 + 230 + /* Routine mach_memory_object_memory_entry_64 */ 231 + #ifdef mig_external 232 + mig_external 233 + #else 234 + extern 235 + #endif /* mig_external */ 236 + kern_return_t mach_memory_object_memory_entry_64 237 + ( 238 + host_t host, 239 + boolean_t internal, 240 + memory_object_size_t size, 241 + vm_prot_t permission, 242 + memory_object_t pager, 243 + mach_port_t *entry_handle 244 + ); 245 + 246 + /* Routine host_statistics */ 247 + #ifdef mig_external 248 + mig_external 249 + #else 250 + extern 251 + #endif /* mig_external */ 252 + kern_return_t host_statistics 253 + ( 254 + host_t host_priv, 255 + host_flavor_t flavor, 256 + host_info_t host_info_out, 257 + mach_msg_type_number_t *host_info_outCnt 258 + ); 259 + 260 + /* Routine host_request_notification */ 261 + #ifdef mig_external 262 + mig_external 263 + #else 264 + extern 265 + #endif /* mig_external */ 266 + kern_return_t host_request_notification 267 + ( 268 + host_t host, 269 + host_flavor_t notify_type, 270 + mach_port_t notify_port 271 + ); 272 + 273 + /* Routine host_lockgroup_info */ 274 + #ifdef mig_external 275 + mig_external 276 + #else 277 + extern 278 + #endif /* mig_external */ 279 + kern_return_t host_lockgroup_info 280 + ( 281 + host_t host, 282 + lockgroup_info_array_t *lockgroup_info, 283 + mach_msg_type_number_t *lockgroup_infoCnt 284 + ); 285 + 286 + /* Routine host_statistics64 */ 287 + #ifdef mig_external 288 + mig_external 289 + #else 290 + extern 291 + #endif /* mig_external */ 292 + kern_return_t host_statistics64 293 + ( 294 + host_t host_priv, 295 + host_flavor_t flavor, 296 + host_info64_t host_info64_out, 297 + mach_msg_type_number_t *host_info64_outCnt 298 + ); 299 + 300 + /* Routine mach_zone_info */ 301 + #ifdef mig_external 302 + mig_external 303 + #else 304 + extern 305 + #endif /* mig_external */ 306 + kern_return_t mach_zone_info 307 + ( 308 + host_priv_t host, 309 + mach_zone_name_array_t *names, 310 + mach_msg_type_number_t *namesCnt, 311 + mach_zone_info_array_t *info, 312 + mach_msg_type_number_t *infoCnt 313 + ); 314 + 315 + /* Routine mach_zone_force_gc */ 316 + #ifdef mig_external 317 + mig_external 318 + #else 319 + extern 320 + #endif /* mig_external */ 321 + kern_return_t mach_zone_force_gc 322 + ( 323 + host_t host 324 + ); 325 + 326 + /* Routine host_create_mach_voucher */ 327 + #ifdef mig_external 328 + mig_external 329 + #else 330 + extern 331 + #endif /* mig_external */ 332 + kern_return_t host_create_mach_voucher 333 + ( 334 + host_t host, 335 + mach_voucher_attr_raw_recipe_array_t recipes, 336 + mach_msg_type_number_t recipesCnt, 337 + ipc_voucher_t *voucher 338 + ); 339 + 340 + /* Routine host_register_mach_voucher_attr_manager */ 341 + #ifdef mig_external 342 + mig_external 343 + #else 344 + extern 345 + #endif /* mig_external */ 346 + kern_return_t host_register_mach_voucher_attr_manager 347 + ( 348 + host_t host, 349 + mach_voucher_attr_manager_t attr_manager, 350 + mach_voucher_attr_value_handle_t default_value, 351 + mach_voucher_attr_key_t *new_key, 352 + ipc_voucher_attr_control_t *new_attr_control 353 + ); 354 + 355 + /* Routine host_register_well_known_mach_voucher_attr_manager */ 356 + #ifdef mig_external 357 + mig_external 358 + #else 359 + extern 360 + #endif /* mig_external */ 361 + kern_return_t host_register_well_known_mach_voucher_attr_manager 362 + ( 363 + host_t host, 364 + mach_voucher_attr_manager_t attr_manager, 365 + mach_voucher_attr_value_handle_t default_value, 366 + mach_voucher_attr_key_t key, 367 + ipc_voucher_attr_control_t *new_attr_control 368 + ); 369 + 370 + #ifdef mig_external 371 + mig_external 372 + #else 373 + extern 374 + #endif /* mig_external */ 375 + boolean_t mach_host_server( 376 + mach_msg_header_t *InHeadP, 377 + mach_msg_header_t *OutHeadP); 378 + 379 + #ifdef mig_external 380 + mig_external 381 + #else 382 + extern 383 + #endif /* mig_external */ 384 + mig_routine_t mach_host_server_routine( 385 + mach_msg_header_t *InHeadP); 386 + 387 + 388 + /* Description of this subsystem, for use in direct RPC */ 389 + extern const struct mach_host_subsystem { 390 + mig_server_routine_t server; /* Server routine */ 391 + mach_msg_id_t start; /* Min routine number */ 392 + mach_msg_id_t end; /* Max routine number + 1 */ 393 + unsigned int maxsize; /* Max msg size */ 394 + vm_address_t reserved; /* Reserved */ 395 + struct routine_descriptor /*Array of routine descriptors */ 396 + routine[25]; 397 + } mach_host_subsystem; 398 + 399 + /* typedefs for all requests */ 400 + 401 + #ifndef __Request__mach_host_subsystem__defined 402 + #define __Request__mach_host_subsystem__defined 403 + 404 + #ifdef __MigPackStructs 405 + #pragma pack(8) 406 + #endif 407 + typedef struct { 408 + mach_msg_header_t Head; 409 + NDR_record_t NDR; 410 + host_flavor_t flavor; 411 + mach_msg_type_number_t host_info_outCnt; 412 + } __Request__host_info_t; 413 + #ifdef __MigPackStructs 414 + #pragma pack() 415 + #endif 416 + 417 + #ifdef __MigPackStructs 418 + #pragma pack(8) 419 + #endif 420 + typedef struct { 421 + mach_msg_header_t Head; 422 + } __Request__host_kernel_version_t; 423 + #ifdef __MigPackStructs 424 + #pragma pack() 425 + #endif 426 + 427 + #ifdef __MigPackStructs 428 + #pragma pack(8) 429 + #endif 430 + typedef struct { 431 + mach_msg_header_t Head; 432 + } __Request___host_page_size_t; 433 + #ifdef __MigPackStructs 434 + #pragma pack() 435 + #endif 436 + 437 + #ifdef __MigPackStructs 438 + #pragma pack(8) 439 + #endif 440 + typedef struct { 441 + mach_msg_header_t Head; 442 + /* start of the kernel processed data */ 443 + mach_msg_body_t msgh_body; 444 + mach_msg_port_descriptor_t pager; 445 + /* end of the kernel processed data */ 446 + NDR_record_t NDR; 447 + boolean_t internal; 448 + vm_size_t size; 449 + vm_prot_t permission; 450 + } __Request__mach_memory_object_memory_entry_t; 451 + #ifdef __MigPackStructs 452 + #pragma pack() 453 + #endif 454 + 455 + #ifdef __MigPackStructs 456 + #pragma pack(8) 457 + #endif 458 + typedef struct { 459 + mach_msg_header_t Head; 460 + NDR_record_t NDR; 461 + processor_flavor_t flavor; 462 + } __Request__host_processor_info_t; 463 + #ifdef __MigPackStructs 464 + #pragma pack() 465 + #endif 466 + 467 + #ifdef __MigPackStructs 468 + #pragma pack(8) 469 + #endif 470 + typedef struct { 471 + mach_msg_header_t Head; 472 + } __Request__host_get_io_master_t; 473 + #ifdef __MigPackStructs 474 + #pragma pack() 475 + #endif 476 + 477 + #ifdef __MigPackStructs 478 + #pragma pack(8) 479 + #endif 480 + typedef struct { 481 + mach_msg_header_t Head; 482 + NDR_record_t NDR; 483 + clock_id_t clock_id; 484 + } __Request__host_get_clock_service_t; 485 + #ifdef __MigPackStructs 486 + #pragma pack() 487 + #endif 488 + 489 + #ifdef __MigPackStructs 490 + #pragma pack(8) 491 + #endif 492 + typedef struct { 493 + mach_msg_header_t Head; 494 + } __Request__kmod_get_info_t; 495 + #ifdef __MigPackStructs 496 + #pragma pack() 497 + #endif 498 + 499 + #ifdef __MigPackStructs 500 + #pragma pack(8) 501 + #endif 502 + typedef struct { 503 + mach_msg_header_t Head; 504 + } __Request__host_zone_info_t; 505 + #ifdef __MigPackStructs 506 + #pragma pack() 507 + #endif 508 + 509 + #ifdef __MigPackStructs 510 + #pragma pack(8) 511 + #endif 512 + typedef struct { 513 + mach_msg_header_t Head; 514 + } __Request__host_virtual_physical_table_info_t; 515 + #ifdef __MigPackStructs 516 + #pragma pack() 517 + #endif 518 + 519 + #ifdef __MigPackStructs 520 + #pragma pack(8) 521 + #endif 522 + typedef struct { 523 + mach_msg_header_t Head; 524 + } __Request__processor_set_default_t; 525 + #ifdef __MigPackStructs 526 + #pragma pack() 527 + #endif 528 + 529 + #ifdef __MigPackStructs 530 + #pragma pack(8) 531 + #endif 532 + typedef struct { 533 + mach_msg_header_t Head; 534 + } __Request__processor_set_create_t; 535 + #ifdef __MigPackStructs 536 + #pragma pack() 537 + #endif 538 + 539 + #ifdef __MigPackStructs 540 + #pragma pack(8) 541 + #endif 542 + typedef struct { 543 + mach_msg_header_t Head; 544 + /* start of the kernel processed data */ 545 + mach_msg_body_t msgh_body; 546 + mach_msg_port_descriptor_t pager; 547 + /* end of the kernel processed data */ 548 + NDR_record_t NDR; 549 + boolean_t internal; 550 + memory_object_size_t size; 551 + vm_prot_t permission; 552 + } __Request__mach_memory_object_memory_entry_64_t; 553 + #ifdef __MigPackStructs 554 + #pragma pack() 555 + #endif 556 + 557 + #ifdef __MigPackStructs 558 + #pragma pack(8) 559 + #endif 560 + typedef struct { 561 + mach_msg_header_t Head; 562 + NDR_record_t NDR; 563 + host_flavor_t flavor; 564 + mach_msg_type_number_t host_info_outCnt; 565 + } __Request__host_statistics_t; 566 + #ifdef __MigPackStructs 567 + #pragma pack() 568 + #endif 569 + 570 + #ifdef __MigPackStructs 571 + #pragma pack(8) 572 + #endif 573 + typedef struct { 574 + mach_msg_header_t Head; 575 + /* start of the kernel processed data */ 576 + mach_msg_body_t msgh_body; 577 + mach_msg_port_descriptor_t notify_port; 578 + /* end of the kernel processed data */ 579 + NDR_record_t NDR; 580 + host_flavor_t notify_type; 581 + } __Request__host_request_notification_t; 582 + #ifdef __MigPackStructs 583 + #pragma pack() 584 + #endif 585 + 586 + #ifdef __MigPackStructs 587 + #pragma pack(8) 588 + #endif 589 + typedef struct { 590 + mach_msg_header_t Head; 591 + } __Request__host_lockgroup_info_t; 592 + #ifdef __MigPackStructs 593 + #pragma pack() 594 + #endif 595 + 596 + #ifdef __MigPackStructs 597 + #pragma pack(8) 598 + #endif 599 + typedef struct { 600 + mach_msg_header_t Head; 601 + NDR_record_t NDR; 602 + host_flavor_t flavor; 603 + mach_msg_type_number_t host_info64_outCnt; 604 + } __Request__host_statistics64_t; 605 + #ifdef __MigPackStructs 606 + #pragma pack() 607 + #endif 608 + 609 + #ifdef __MigPackStructs 610 + #pragma pack(8) 611 + #endif 612 + typedef struct { 613 + mach_msg_header_t Head; 614 + } __Request__mach_zone_info_t; 615 + #ifdef __MigPackStructs 616 + #pragma pack() 617 + #endif 618 + 619 + #ifdef __MigPackStructs 620 + #pragma pack(8) 621 + #endif 622 + typedef struct { 623 + mach_msg_header_t Head; 624 + } __Request__mach_zone_force_gc_t; 625 + #ifdef __MigPackStructs 626 + #pragma pack() 627 + #endif 628 + 629 + #ifdef __MigPackStructs 630 + #pragma pack(8) 631 + #endif 632 + typedef struct { 633 + mach_msg_header_t Head; 634 + NDR_record_t NDR; 635 + mach_msg_type_number_t recipesCnt; 636 + uint8_t recipes[5120]; 637 + } __Request__host_create_mach_voucher_t; 638 + #ifdef __MigPackStructs 639 + #pragma pack() 640 + #endif 641 + 642 + #ifdef __MigPackStructs 643 + #pragma pack(8) 644 + #endif 645 + typedef struct { 646 + mach_msg_header_t Head; 647 + /* start of the kernel processed data */ 648 + mach_msg_body_t msgh_body; 649 + mach_msg_port_descriptor_t attr_manager; 650 + /* end of the kernel processed data */ 651 + NDR_record_t NDR; 652 + mach_voucher_attr_value_handle_t default_value; 653 + } __Request__host_register_mach_voucher_attr_manager_t; 654 + #ifdef __MigPackStructs 655 + #pragma pack() 656 + #endif 657 + 658 + #ifdef __MigPackStructs 659 + #pragma pack(8) 660 + #endif 661 + typedef struct { 662 + mach_msg_header_t Head; 663 + /* start of the kernel processed data */ 664 + mach_msg_body_t msgh_body; 665 + mach_msg_port_descriptor_t attr_manager; 666 + /* end of the kernel processed data */ 667 + NDR_record_t NDR; 668 + mach_voucher_attr_value_handle_t default_value; 669 + mach_voucher_attr_key_t key; 670 + } __Request__host_register_well_known_mach_voucher_attr_manager_t; 671 + #ifdef __MigPackStructs 672 + #pragma pack() 673 + #endif 674 + #endif /* !__Request__mach_host_subsystem__defined */ 675 + 676 + 677 + /* union of all requests */ 678 + 679 + #ifndef __RequestUnion__mach_host_subsystem__defined 680 + #define __RequestUnion__mach_host_subsystem__defined 681 + union __RequestUnion__mach_host_subsystem { 682 + __Request__host_info_t Request_host_info; 683 + __Request__host_kernel_version_t Request_host_kernel_version; 684 + __Request___host_page_size_t Request__host_page_size; 685 + __Request__mach_memory_object_memory_entry_t Request_mach_memory_object_memory_entry; 686 + __Request__host_processor_info_t Request_host_processor_info; 687 + __Request__host_get_io_master_t Request_host_get_io_master; 688 + __Request__host_get_clock_service_t Request_host_get_clock_service; 689 + __Request__kmod_get_info_t Request_kmod_get_info; 690 + __Request__host_zone_info_t Request_host_zone_info; 691 + __Request__host_virtual_physical_table_info_t Request_host_virtual_physical_table_info; 692 + __Request__processor_set_default_t Request_processor_set_default; 693 + __Request__processor_set_create_t Request_processor_set_create; 694 + __Request__mach_memory_object_memory_entry_64_t Request_mach_memory_object_memory_entry_64; 695 + __Request__host_statistics_t Request_host_statistics; 696 + __Request__host_request_notification_t Request_host_request_notification; 697 + __Request__host_lockgroup_info_t Request_host_lockgroup_info; 698 + __Request__host_statistics64_t Request_host_statistics64; 699 + __Request__mach_zone_info_t Request_mach_zone_info; 700 + __Request__mach_zone_force_gc_t Request_mach_zone_force_gc; 701 + __Request__host_create_mach_voucher_t Request_host_create_mach_voucher; 702 + __Request__host_register_mach_voucher_attr_manager_t Request_host_register_mach_voucher_attr_manager; 703 + __Request__host_register_well_known_mach_voucher_attr_manager_t Request_host_register_well_known_mach_voucher_attr_manager; 704 + }; 705 + #endif /* __RequestUnion__mach_host_subsystem__defined */ 706 + /* typedefs for all replies */ 707 + 708 + #ifndef __Reply__mach_host_subsystem__defined 709 + #define __Reply__mach_host_subsystem__defined 710 + 711 + #ifdef __MigPackStructs 712 + #pragma pack(8) 713 + #endif 714 + typedef struct { 715 + mach_msg_header_t Head; 716 + NDR_record_t NDR; 717 + kern_return_t RetCode; 718 + mach_msg_type_number_t host_info_outCnt; 719 + integer_t host_info_out[68]; 720 + } __Reply__host_info_t; 721 + #ifdef __MigPackStructs 722 + #pragma pack() 723 + #endif 724 + 725 + #ifdef __MigPackStructs 726 + #pragma pack(8) 727 + #endif 728 + typedef struct { 729 + mach_msg_header_t Head; 730 + NDR_record_t NDR; 731 + kern_return_t RetCode; 732 + mach_msg_type_number_t kernel_versionOffset; /* MiG doesn't use it */ 733 + mach_msg_type_number_t kernel_versionCnt; 734 + char kernel_version[512]; 735 + } __Reply__host_kernel_version_t; 736 + #ifdef __MigPackStructs 737 + #pragma pack() 738 + #endif 739 + 740 + #ifdef __MigPackStructs 741 + #pragma pack(8) 742 + #endif 743 + typedef struct { 744 + mach_msg_header_t Head; 745 + NDR_record_t NDR; 746 + kern_return_t RetCode; 747 + vm_size_t out_page_size; 748 + } __Reply___host_page_size_t; 749 + #ifdef __MigPackStructs 750 + #pragma pack() 751 + #endif 752 + 753 + #ifdef __MigPackStructs 754 + #pragma pack(8) 755 + #endif 756 + typedef struct { 757 + mach_msg_header_t Head; 758 + /* start of the kernel processed data */ 759 + mach_msg_body_t msgh_body; 760 + mach_msg_port_descriptor_t entry_handle; 761 + /* end of the kernel processed data */ 762 + } __Reply__mach_memory_object_memory_entry_t; 763 + #ifdef __MigPackStructs 764 + #pragma pack() 765 + #endif 766 + 767 + #ifdef __MigPackStructs 768 + #pragma pack(8) 769 + #endif 770 + typedef struct { 771 + mach_msg_header_t Head; 772 + /* start of the kernel processed data */ 773 + mach_msg_body_t msgh_body; 774 + mach_msg_ool_descriptor_t out_processor_info; 775 + /* end of the kernel processed data */ 776 + NDR_record_t NDR; 777 + natural_t out_processor_count; 778 + mach_msg_type_number_t out_processor_infoCnt; 779 + } __Reply__host_processor_info_t; 780 + #ifdef __MigPackStructs 781 + #pragma pack() 782 + #endif 783 + 784 + #ifdef __MigPackStructs 785 + #pragma pack(8) 786 + #endif 787 + typedef struct { 788 + mach_msg_header_t Head; 789 + /* start of the kernel processed data */ 790 + mach_msg_body_t msgh_body; 791 + mach_msg_port_descriptor_t io_master; 792 + /* end of the kernel processed data */ 793 + } __Reply__host_get_io_master_t; 794 + #ifdef __MigPackStructs 795 + #pragma pack() 796 + #endif 797 + 798 + #ifdef __MigPackStructs 799 + #pragma pack(8) 800 + #endif 801 + typedef struct { 802 + mach_msg_header_t Head; 803 + /* start of the kernel processed data */ 804 + mach_msg_body_t msgh_body; 805 + mach_msg_port_descriptor_t clock_serv; 806 + /* end of the kernel processed data */ 807 + } __Reply__host_get_clock_service_t; 808 + #ifdef __MigPackStructs 809 + #pragma pack() 810 + #endif 811 + 812 + #ifdef __MigPackStructs 813 + #pragma pack(8) 814 + #endif 815 + typedef struct { 816 + mach_msg_header_t Head; 817 + /* start of the kernel processed data */ 818 + mach_msg_body_t msgh_body; 819 + mach_msg_ool_descriptor_t modules; 820 + /* end of the kernel processed data */ 821 + NDR_record_t NDR; 822 + mach_msg_type_number_t modulesCnt; 823 + } __Reply__kmod_get_info_t; 824 + #ifdef __MigPackStructs 825 + #pragma pack() 826 + #endif 827 + 828 + #ifdef __MigPackStructs 829 + #pragma pack(8) 830 + #endif 831 + typedef struct { 832 + mach_msg_header_t Head; 833 + /* start of the kernel processed data */ 834 + mach_msg_body_t msgh_body; 835 + mach_msg_ool_descriptor_t names; 836 + mach_msg_ool_descriptor_t info; 837 + /* end of the kernel processed data */ 838 + NDR_record_t NDR; 839 + mach_msg_type_number_t namesCnt; 840 + mach_msg_type_number_t infoCnt; 841 + } __Reply__host_zone_info_t; 842 + #ifdef __MigPackStructs 843 + #pragma pack() 844 + #endif 845 + 846 + #ifdef __MigPackStructs 847 + #pragma pack(8) 848 + #endif 849 + typedef struct { 850 + mach_msg_header_t Head; 851 + /* start of the kernel processed data */ 852 + mach_msg_body_t msgh_body; 853 + mach_msg_ool_descriptor_t info; 854 + /* end of the kernel processed data */ 855 + NDR_record_t NDR; 856 + mach_msg_type_number_t infoCnt; 857 + } __Reply__host_virtual_physical_table_info_t; 858 + #ifdef __MigPackStructs 859 + #pragma pack() 860 + #endif 861 + 862 + #ifdef __MigPackStructs 863 + #pragma pack(8) 864 + #endif 865 + typedef struct { 866 + mach_msg_header_t Head; 867 + /* start of the kernel processed data */ 868 + mach_msg_body_t msgh_body; 869 + mach_msg_port_descriptor_t default_set; 870 + /* end of the kernel processed data */ 871 + } __Reply__processor_set_default_t; 872 + #ifdef __MigPackStructs 873 + #pragma pack() 874 + #endif 875 + 876 + #ifdef __MigPackStructs 877 + #pragma pack(8) 878 + #endif 879 + typedef struct { 880 + mach_msg_header_t Head; 881 + /* start of the kernel processed data */ 882 + mach_msg_body_t msgh_body; 883 + mach_msg_port_descriptor_t new_set; 884 + mach_msg_port_descriptor_t new_name; 885 + /* end of the kernel processed data */ 886 + } __Reply__processor_set_create_t; 887 + #ifdef __MigPackStructs 888 + #pragma pack() 889 + #endif 890 + 891 + #ifdef __MigPackStructs 892 + #pragma pack(8) 893 + #endif 894 + typedef struct { 895 + mach_msg_header_t Head; 896 + /* start of the kernel processed data */ 897 + mach_msg_body_t msgh_body; 898 + mach_msg_port_descriptor_t entry_handle; 899 + /* end of the kernel processed data */ 900 + } __Reply__mach_memory_object_memory_entry_64_t; 901 + #ifdef __MigPackStructs 902 + #pragma pack() 903 + #endif 904 + 905 + #ifdef __MigPackStructs 906 + #pragma pack(8) 907 + #endif 908 + typedef struct { 909 + mach_msg_header_t Head; 910 + NDR_record_t NDR; 911 + kern_return_t RetCode; 912 + mach_msg_type_number_t host_info_outCnt; 913 + integer_t host_info_out[68]; 914 + } __Reply__host_statistics_t; 915 + #ifdef __MigPackStructs 916 + #pragma pack() 917 + #endif 918 + 919 + #ifdef __MigPackStructs 920 + #pragma pack(8) 921 + #endif 922 + typedef struct { 923 + mach_msg_header_t Head; 924 + NDR_record_t NDR; 925 + kern_return_t RetCode; 926 + } __Reply__host_request_notification_t; 927 + #ifdef __MigPackStructs 928 + #pragma pack() 929 + #endif 930 + 931 + #ifdef __MigPackStructs 932 + #pragma pack(8) 933 + #endif 934 + typedef struct { 935 + mach_msg_header_t Head; 936 + /* start of the kernel processed data */ 937 + mach_msg_body_t msgh_body; 938 + mach_msg_ool_descriptor_t lockgroup_info; 939 + /* end of the kernel processed data */ 940 + NDR_record_t NDR; 941 + mach_msg_type_number_t lockgroup_infoCnt; 942 + } __Reply__host_lockgroup_info_t; 943 + #ifdef __MigPackStructs 944 + #pragma pack() 945 + #endif 946 + 947 + #ifdef __MigPackStructs 948 + #pragma pack(8) 949 + #endif 950 + typedef struct { 951 + mach_msg_header_t Head; 952 + NDR_record_t NDR; 953 + kern_return_t RetCode; 954 + mach_msg_type_number_t host_info64_outCnt; 955 + integer_t host_info64_out[256]; 956 + } __Reply__host_statistics64_t; 957 + #ifdef __MigPackStructs 958 + #pragma pack() 959 + #endif 960 + 961 + #ifdef __MigPackStructs 962 + #pragma pack(8) 963 + #endif 964 + typedef struct { 965 + mach_msg_header_t Head; 966 + /* start of the kernel processed data */ 967 + mach_msg_body_t msgh_body; 968 + mach_msg_ool_descriptor_t names; 969 + mach_msg_ool_descriptor_t info; 970 + /* end of the kernel processed data */ 971 + NDR_record_t NDR; 972 + mach_msg_type_number_t namesCnt; 973 + mach_msg_type_number_t infoCnt; 974 + } __Reply__mach_zone_info_t; 975 + #ifdef __MigPackStructs 976 + #pragma pack() 977 + #endif 978 + 979 + #ifdef __MigPackStructs 980 + #pragma pack(8) 981 + #endif 982 + typedef struct { 983 + mach_msg_header_t Head; 984 + NDR_record_t NDR; 985 + kern_return_t RetCode; 986 + } __Reply__mach_zone_force_gc_t; 987 + #ifdef __MigPackStructs 988 + #pragma pack() 989 + #endif 990 + 991 + #ifdef __MigPackStructs 992 + #pragma pack(8) 993 + #endif 994 + typedef struct { 995 + mach_msg_header_t Head; 996 + /* start of the kernel processed data */ 997 + mach_msg_body_t msgh_body; 998 + mach_msg_port_descriptor_t voucher; 999 + /* end of the kernel processed data */ 1000 + } __Reply__host_create_mach_voucher_t; 1001 + #ifdef __MigPackStructs 1002 + #pragma pack() 1003 + #endif 1004 + 1005 + #ifdef __MigPackStructs 1006 + #pragma pack(8) 1007 + #endif 1008 + typedef struct { 1009 + mach_msg_header_t Head; 1010 + /* start of the kernel processed data */ 1011 + mach_msg_body_t msgh_body; 1012 + mach_msg_port_descriptor_t new_attr_control; 1013 + /* end of the kernel processed data */ 1014 + NDR_record_t NDR; 1015 + mach_voucher_attr_key_t new_key; 1016 + } __Reply__host_register_mach_voucher_attr_manager_t; 1017 + #ifdef __MigPackStructs 1018 + #pragma pack() 1019 + #endif 1020 + 1021 + #ifdef __MigPackStructs 1022 + #pragma pack(8) 1023 + #endif 1024 + typedef struct { 1025 + mach_msg_header_t Head; 1026 + /* start of the kernel processed data */ 1027 + mach_msg_body_t msgh_body; 1028 + mach_msg_port_descriptor_t new_attr_control; 1029 + /* end of the kernel processed data */ 1030 + } __Reply__host_register_well_known_mach_voucher_attr_manager_t; 1031 + #ifdef __MigPackStructs 1032 + #pragma pack() 1033 + #endif 1034 + #endif /* !__Reply__mach_host_subsystem__defined */ 1035 + 1036 + 1037 + /* union of all replies */ 1038 + 1039 + #ifndef __ReplyUnion__mach_host_subsystem__defined 1040 + #define __ReplyUnion__mach_host_subsystem__defined 1041 + union __ReplyUnion__mach_host_subsystem { 1042 + __Reply__host_info_t Reply_host_info; 1043 + __Reply__host_kernel_version_t Reply_host_kernel_version; 1044 + __Reply___host_page_size_t Reply__host_page_size; 1045 + __Reply__mach_memory_object_memory_entry_t Reply_mach_memory_object_memory_entry; 1046 + __Reply__host_processor_info_t Reply_host_processor_info; 1047 + __Reply__host_get_io_master_t Reply_host_get_io_master; 1048 + __Reply__host_get_clock_service_t Reply_host_get_clock_service; 1049 + __Reply__kmod_get_info_t Reply_kmod_get_info; 1050 + __Reply__host_zone_info_t Reply_host_zone_info; 1051 + __Reply__host_virtual_physical_table_info_t Reply_host_virtual_physical_table_info; 1052 + __Reply__processor_set_default_t Reply_processor_set_default; 1053 + __Reply__processor_set_create_t Reply_processor_set_create; 1054 + __Reply__mach_memory_object_memory_entry_64_t Reply_mach_memory_object_memory_entry_64; 1055 + __Reply__host_statistics_t Reply_host_statistics; 1056 + __Reply__host_request_notification_t Reply_host_request_notification; 1057 + __Reply__host_lockgroup_info_t Reply_host_lockgroup_info; 1058 + __Reply__host_statistics64_t Reply_host_statistics64; 1059 + __Reply__mach_zone_info_t Reply_mach_zone_info; 1060 + __Reply__mach_zone_force_gc_t Reply_mach_zone_force_gc; 1061 + __Reply__host_create_mach_voucher_t Reply_host_create_mach_voucher; 1062 + __Reply__host_register_mach_voucher_attr_manager_t Reply_host_register_mach_voucher_attr_manager; 1063 + __Reply__host_register_well_known_mach_voucher_attr_manager_t Reply_host_register_well_known_mach_voucher_attr_manager; 1064 + }; 1065 + #endif /* __RequestUnion__mach_host_subsystem__defined */ 1066 + 1067 + #ifndef subsystem_to_name_map_mach_host 1068 + #define subsystem_to_name_map_mach_host \ 1069 + { "host_info", 200 },\ 1070 + { "host_kernel_version", 201 },\ 1071 + { "_host_page_size", 202 },\ 1072 + { "mach_memory_object_memory_entry", 203 },\ 1073 + { "host_processor_info", 204 },\ 1074 + { "host_get_io_master", 205 },\ 1075 + { "host_get_clock_service", 206 },\ 1076 + { "kmod_get_info", 207 },\ 1077 + { "host_zone_info", 208 },\ 1078 + { "host_virtual_physical_table_info", 209 },\ 1079 + { "processor_set_default", 213 },\ 1080 + { "processor_set_create", 214 },\ 1081 + { "mach_memory_object_memory_entry_64", 215 },\ 1082 + { "host_statistics", 216 },\ 1083 + { "host_request_notification", 217 },\ 1084 + { "host_lockgroup_info", 218 },\ 1085 + { "host_statistics64", 219 },\ 1086 + { "mach_zone_info", 220 },\ 1087 + { "mach_zone_force_gc", 221 },\ 1088 + { "host_create_mach_voucher", 222 },\ 1089 + { "host_register_mach_voucher_attr_manager", 223 },\ 1090 + { "host_register_well_known_mach_voucher_attr_manager", 224 } 1091 + #endif 1092 + 1093 + #ifdef __AfterMigServerHeader 1094 + __AfterMigServerHeader 1095 + #endif /* __AfterMigServerHeader */ 1096 + 1097 + #endif /* _mach_host_server_ */
+1082
lkm/mig/mach_host_internal.h
··· 1 + #ifndef _mach_host_user_ 2 + #define _mach_host_user_ 3 + 4 + /* Module mach_host */ 5 + 6 + #include <string.h> 7 + #include <mach/ndr.h> 8 + #include <mach/boolean.h> 9 + #include <mach/kern_return.h> 10 + #include <mach/notify.h> 11 + #include <mach/mach_types.h> 12 + #include <mach/message.h> 13 + #include <mach/mig_errors.h> 14 + #include <mach/port.h> 15 + 16 + /* BEGIN VOUCHER CODE */ 17 + 18 + #ifndef KERNEL 19 + #if defined(__has_include) 20 + #if __has_include(<mach/mig_voucher_support.h>) 21 + #ifndef USING_VOUCHERS 22 + #define USING_VOUCHERS 23 + #endif 24 + #ifndef __VOUCHER_FORWARD_TYPE_DECLS__ 25 + #define __VOUCHER_FORWARD_TYPE_DECLS__ 26 + #ifdef __cplusplus 27 + extern "C" { 28 + #endif 29 + extern boolean_t voucher_mach_msg_set(mach_msg_header_t *msg) __attribute__((weak_import)); 30 + #ifdef __cplusplus 31 + } 32 + #endif 33 + #endif // __VOUCHER_FORWARD_TYPE_DECLS__ 34 + #endif // __has_include(<mach/mach_voucher_types.h>) 35 + #endif // __has_include 36 + #endif // !KERNEL 37 + 38 + /* END VOUCHER CODE */ 39 + 40 + 41 + #ifdef AUTOTEST 42 + #ifndef FUNCTION_PTR_T 43 + #define FUNCTION_PTR_T 44 + typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); 45 + typedef struct { 46 + char *name; 47 + function_ptr_t function; 48 + } function_table_entry; 49 + typedef function_table_entry *function_table_t; 50 + #endif /* FUNCTION_PTR_T */ 51 + #endif /* AUTOTEST */ 52 + 53 + #ifndef mach_host_MSG_COUNT 54 + #define mach_host_MSG_COUNT 25 55 + #endif /* mach_host_MSG_COUNT */ 56 + 57 + #include <mach/std_types.h> 58 + #include <mach/mig.h> 59 + #include <mach/mig.h> 60 + #include <mach/mach_types.h> 61 + #include <mach/mach_types.h> 62 + #include <mach_debug/mach_debug_types.h> 63 + #include <mach/mach_init.h> 64 + 65 + #ifdef __BeforeMigUserHeader 66 + __BeforeMigUserHeader 67 + #endif /* __BeforeMigUserHeader */ 68 + 69 + #include <sys/cdefs.h> 70 + __BEGIN_DECLS 71 + 72 + 73 + /* Routine host_info */ 74 + #ifdef mig_external 75 + mig_external 76 + #else 77 + extern 78 + #endif /* mig_external */ 79 + kern_return_t host_info 80 + ( 81 + host_t host, 82 + host_flavor_t flavor, 83 + host_info_t host_info_out, 84 + mach_msg_type_number_t *host_info_outCnt 85 + ); 86 + 87 + /* Routine host_kernel_version */ 88 + #ifdef mig_external 89 + mig_external 90 + #else 91 + extern 92 + #endif /* mig_external */ 93 + kern_return_t host_kernel_version 94 + ( 95 + host_t host, 96 + kernel_version_t kernel_version 97 + ); 98 + 99 + /* Routine _host_page_size */ 100 + #ifdef mig_external 101 + mig_external 102 + #else 103 + extern 104 + #endif /* mig_external */ 105 + kern_return_t _host_page_size 106 + ( 107 + host_t host, 108 + vm_size_t *out_page_size 109 + ); 110 + 111 + /* Routine mach_memory_object_memory_entry */ 112 + #ifdef mig_external 113 + mig_external 114 + #else 115 + extern 116 + #endif /* mig_external */ 117 + kern_return_t mach_memory_object_memory_entry 118 + ( 119 + host_t host, 120 + boolean_t internal, 121 + vm_size_t size, 122 + vm_prot_t permission, 123 + memory_object_t pager, 124 + mach_port_t *entry_handle 125 + ); 126 + 127 + /* Routine host_processor_info */ 128 + #ifdef mig_external 129 + mig_external 130 + #else 131 + extern 132 + #endif /* mig_external */ 133 + kern_return_t host_processor_info 134 + ( 135 + host_t host, 136 + processor_flavor_t flavor, 137 + natural_t *out_processor_count, 138 + processor_info_array_t *out_processor_info, 139 + mach_msg_type_number_t *out_processor_infoCnt 140 + ); 141 + 142 + /* Routine host_get_io_master */ 143 + #ifdef mig_external 144 + mig_external 145 + #else 146 + extern 147 + #endif /* mig_external */ 148 + kern_return_t host_get_io_master 149 + ( 150 + host_t host, 151 + io_master_t *io_master 152 + ); 153 + 154 + /* Routine host_get_clock_service */ 155 + #ifdef mig_external 156 + mig_external 157 + #else 158 + extern 159 + #endif /* mig_external */ 160 + kern_return_t host_get_clock_service 161 + ( 162 + host_t host, 163 + clock_id_t clock_id, 164 + clock_serv_t *clock_serv 165 + ); 166 + 167 + /* Routine kmod_get_info */ 168 + #ifdef mig_external 169 + mig_external 170 + #else 171 + extern 172 + #endif /* mig_external */ 173 + kern_return_t kmod_get_info 174 + ( 175 + host_t host, 176 + kmod_args_t *modules, 177 + mach_msg_type_number_t *modulesCnt 178 + ); 179 + 180 + /* Routine host_zone_info */ 181 + #ifdef mig_external 182 + mig_external 183 + #else 184 + extern 185 + #endif /* mig_external */ 186 + kern_return_t host_zone_info 187 + ( 188 + host_priv_t host, 189 + zone_name_array_t *names, 190 + mach_msg_type_number_t *namesCnt, 191 + zone_info_array_t *info, 192 + mach_msg_type_number_t *infoCnt 193 + ); 194 + 195 + /* Routine host_virtual_physical_table_info */ 196 + #ifdef mig_external 197 + mig_external 198 + #else 199 + extern 200 + #endif /* mig_external */ 201 + kern_return_t host_virtual_physical_table_info 202 + ( 203 + host_t host, 204 + hash_info_bucket_array_t *info, 205 + mach_msg_type_number_t *infoCnt 206 + ); 207 + 208 + /* Routine processor_set_default */ 209 + #ifdef mig_external 210 + mig_external 211 + #else 212 + extern 213 + #endif /* mig_external */ 214 + kern_return_t processor_set_default 215 + ( 216 + host_t host, 217 + processor_set_name_t *default_set 218 + ); 219 + 220 + /* Routine processor_set_create */ 221 + #ifdef mig_external 222 + mig_external 223 + #else 224 + extern 225 + #endif /* mig_external */ 226 + kern_return_t processor_set_create 227 + ( 228 + host_t host, 229 + processor_set_t *new_set, 230 + processor_set_name_t *new_name 231 + ); 232 + 233 + /* Routine mach_memory_object_memory_entry_64 */ 234 + #ifdef mig_external 235 + mig_external 236 + #else 237 + extern 238 + #endif /* mig_external */ 239 + kern_return_t mach_memory_object_memory_entry_64 240 + ( 241 + host_t host, 242 + boolean_t internal, 243 + memory_object_size_t size, 244 + vm_prot_t permission, 245 + memory_object_t pager, 246 + mach_port_t *entry_handle 247 + ); 248 + 249 + /* Routine host_statistics */ 250 + #ifdef mig_external 251 + mig_external 252 + #else 253 + extern 254 + #endif /* mig_external */ 255 + kern_return_t host_statistics 256 + ( 257 + host_t host_priv, 258 + host_flavor_t flavor, 259 + host_info_t host_info_out, 260 + mach_msg_type_number_t *host_info_outCnt 261 + ); 262 + 263 + /* Routine host_request_notification */ 264 + #ifdef mig_external 265 + mig_external 266 + #else 267 + extern 268 + #endif /* mig_external */ 269 + kern_return_t host_request_notification 270 + ( 271 + host_t host, 272 + host_flavor_t notify_type, 273 + mach_port_t notify_port 274 + ); 275 + 276 + /* Routine host_lockgroup_info */ 277 + #ifdef mig_external 278 + mig_external 279 + #else 280 + extern 281 + #endif /* mig_external */ 282 + kern_return_t host_lockgroup_info 283 + ( 284 + host_t host, 285 + lockgroup_info_array_t *lockgroup_info, 286 + mach_msg_type_number_t *lockgroup_infoCnt 287 + ); 288 + 289 + /* Routine host_statistics64 */ 290 + #ifdef mig_external 291 + mig_external 292 + #else 293 + extern 294 + #endif /* mig_external */ 295 + kern_return_t host_statistics64 296 + ( 297 + host_t host_priv, 298 + host_flavor_t flavor, 299 + host_info64_t host_info64_out, 300 + mach_msg_type_number_t *host_info64_outCnt 301 + ); 302 + 303 + /* Routine mach_zone_info */ 304 + #ifdef mig_external 305 + mig_external 306 + #else 307 + extern 308 + #endif /* mig_external */ 309 + kern_return_t mach_zone_info 310 + ( 311 + host_priv_t host, 312 + mach_zone_name_array_t *names, 313 + mach_msg_type_number_t *namesCnt, 314 + mach_zone_info_array_t *info, 315 + mach_msg_type_number_t *infoCnt 316 + ); 317 + 318 + /* Routine mach_zone_force_gc */ 319 + #ifdef mig_external 320 + mig_external 321 + #else 322 + extern 323 + #endif /* mig_external */ 324 + kern_return_t mach_zone_force_gc 325 + ( 326 + host_t host 327 + ); 328 + 329 + /* Routine host_create_mach_voucher */ 330 + #ifdef mig_external 331 + mig_external 332 + #else 333 + extern 334 + #endif /* mig_external */ 335 + kern_return_t host_create_mach_voucher 336 + ( 337 + host_t host, 338 + mach_voucher_attr_raw_recipe_array_t recipes, 339 + mach_msg_type_number_t recipesCnt, 340 + ipc_voucher_t *voucher 341 + ); 342 + 343 + /* Routine host_register_mach_voucher_attr_manager */ 344 + #ifdef mig_external 345 + mig_external 346 + #else 347 + extern 348 + #endif /* mig_external */ 349 + kern_return_t host_register_mach_voucher_attr_manager 350 + ( 351 + host_t host, 352 + mach_voucher_attr_manager_t attr_manager, 353 + mach_voucher_attr_value_handle_t default_value, 354 + mach_voucher_attr_key_t *new_key, 355 + ipc_voucher_attr_control_t *new_attr_control 356 + ); 357 + 358 + /* Routine host_register_well_known_mach_voucher_attr_manager */ 359 + #ifdef mig_external 360 + mig_external 361 + #else 362 + extern 363 + #endif /* mig_external */ 364 + kern_return_t host_register_well_known_mach_voucher_attr_manager 365 + ( 366 + host_t host, 367 + mach_voucher_attr_manager_t attr_manager, 368 + mach_voucher_attr_value_handle_t default_value, 369 + mach_voucher_attr_key_t key, 370 + ipc_voucher_attr_control_t *new_attr_control 371 + ); 372 + 373 + __END_DECLS 374 + 375 + /********************** Caution **************************/ 376 + /* The following data types should be used to calculate */ 377 + /* maximum message sizes only. The actual message may be */ 378 + /* smaller, and the position of the arguments within the */ 379 + /* message layout may vary from what is presented here. */ 380 + /* For example, if any of the arguments are variable- */ 381 + /* sized, and less than the maximum is sent, the data */ 382 + /* will be packed tight in the actual message to reduce */ 383 + /* the presence of holes. */ 384 + /********************** Caution **************************/ 385 + 386 + /* typedefs for all requests */ 387 + 388 + #ifndef __Request__mach_host_subsystem__defined 389 + #define __Request__mach_host_subsystem__defined 390 + 391 + #ifdef __MigPackStructs 392 + #pragma pack(8) 393 + #endif 394 + typedef struct { 395 + mach_msg_header_t Head; 396 + NDR_record_t NDR; 397 + host_flavor_t flavor; 398 + mach_msg_type_number_t host_info_outCnt; 399 + } __Request__host_info_t; 400 + #ifdef __MigPackStructs 401 + #pragma pack() 402 + #endif 403 + 404 + #ifdef __MigPackStructs 405 + #pragma pack(8) 406 + #endif 407 + typedef struct { 408 + mach_msg_header_t Head; 409 + } __Request__host_kernel_version_t; 410 + #ifdef __MigPackStructs 411 + #pragma pack() 412 + #endif 413 + 414 + #ifdef __MigPackStructs 415 + #pragma pack(8) 416 + #endif 417 + typedef struct { 418 + mach_msg_header_t Head; 419 + } __Request___host_page_size_t; 420 + #ifdef __MigPackStructs 421 + #pragma pack() 422 + #endif 423 + 424 + #ifdef __MigPackStructs 425 + #pragma pack(8) 426 + #endif 427 + typedef struct { 428 + mach_msg_header_t Head; 429 + /* start of the kernel processed data */ 430 + mach_msg_body_t msgh_body; 431 + mach_msg_port_descriptor_t pager; 432 + /* end of the kernel processed data */ 433 + NDR_record_t NDR; 434 + boolean_t internal; 435 + vm_size_t size; 436 + vm_prot_t permission; 437 + } __Request__mach_memory_object_memory_entry_t; 438 + #ifdef __MigPackStructs 439 + #pragma pack() 440 + #endif 441 + 442 + #ifdef __MigPackStructs 443 + #pragma pack(8) 444 + #endif 445 + typedef struct { 446 + mach_msg_header_t Head; 447 + NDR_record_t NDR; 448 + processor_flavor_t flavor; 449 + } __Request__host_processor_info_t; 450 + #ifdef __MigPackStructs 451 + #pragma pack() 452 + #endif 453 + 454 + #ifdef __MigPackStructs 455 + #pragma pack(8) 456 + #endif 457 + typedef struct { 458 + mach_msg_header_t Head; 459 + } __Request__host_get_io_master_t; 460 + #ifdef __MigPackStructs 461 + #pragma pack() 462 + #endif 463 + 464 + #ifdef __MigPackStructs 465 + #pragma pack(8) 466 + #endif 467 + typedef struct { 468 + mach_msg_header_t Head; 469 + NDR_record_t NDR; 470 + clock_id_t clock_id; 471 + } __Request__host_get_clock_service_t; 472 + #ifdef __MigPackStructs 473 + #pragma pack() 474 + #endif 475 + 476 + #ifdef __MigPackStructs 477 + #pragma pack(8) 478 + #endif 479 + typedef struct { 480 + mach_msg_header_t Head; 481 + } __Request__kmod_get_info_t; 482 + #ifdef __MigPackStructs 483 + #pragma pack() 484 + #endif 485 + 486 + #ifdef __MigPackStructs 487 + #pragma pack(8) 488 + #endif 489 + typedef struct { 490 + mach_msg_header_t Head; 491 + } __Request__host_zone_info_t; 492 + #ifdef __MigPackStructs 493 + #pragma pack() 494 + #endif 495 + 496 + #ifdef __MigPackStructs 497 + #pragma pack(8) 498 + #endif 499 + typedef struct { 500 + mach_msg_header_t Head; 501 + } __Request__host_virtual_physical_table_info_t; 502 + #ifdef __MigPackStructs 503 + #pragma pack() 504 + #endif 505 + 506 + #ifdef __MigPackStructs 507 + #pragma pack(8) 508 + #endif 509 + typedef struct { 510 + mach_msg_header_t Head; 511 + } __Request__processor_set_default_t; 512 + #ifdef __MigPackStructs 513 + #pragma pack() 514 + #endif 515 + 516 + #ifdef __MigPackStructs 517 + #pragma pack(8) 518 + #endif 519 + typedef struct { 520 + mach_msg_header_t Head; 521 + } __Request__processor_set_create_t; 522 + #ifdef __MigPackStructs 523 + #pragma pack() 524 + #endif 525 + 526 + #ifdef __MigPackStructs 527 + #pragma pack(8) 528 + #endif 529 + typedef struct { 530 + mach_msg_header_t Head; 531 + /* start of the kernel processed data */ 532 + mach_msg_body_t msgh_body; 533 + mach_msg_port_descriptor_t pager; 534 + /* end of the kernel processed data */ 535 + NDR_record_t NDR; 536 + boolean_t internal; 537 + memory_object_size_t size; 538 + vm_prot_t permission; 539 + } __Request__mach_memory_object_memory_entry_64_t; 540 + #ifdef __MigPackStructs 541 + #pragma pack() 542 + #endif 543 + 544 + #ifdef __MigPackStructs 545 + #pragma pack(8) 546 + #endif 547 + typedef struct { 548 + mach_msg_header_t Head; 549 + NDR_record_t NDR; 550 + host_flavor_t flavor; 551 + mach_msg_type_number_t host_info_outCnt; 552 + } __Request__host_statistics_t; 553 + #ifdef __MigPackStructs 554 + #pragma pack() 555 + #endif 556 + 557 + #ifdef __MigPackStructs 558 + #pragma pack(8) 559 + #endif 560 + typedef struct { 561 + mach_msg_header_t Head; 562 + /* start of the kernel processed data */ 563 + mach_msg_body_t msgh_body; 564 + mach_msg_port_descriptor_t notify_port; 565 + /* end of the kernel processed data */ 566 + NDR_record_t NDR; 567 + host_flavor_t notify_type; 568 + } __Request__host_request_notification_t; 569 + #ifdef __MigPackStructs 570 + #pragma pack() 571 + #endif 572 + 573 + #ifdef __MigPackStructs 574 + #pragma pack(8) 575 + #endif 576 + typedef struct { 577 + mach_msg_header_t Head; 578 + } __Request__host_lockgroup_info_t; 579 + #ifdef __MigPackStructs 580 + #pragma pack() 581 + #endif 582 + 583 + #ifdef __MigPackStructs 584 + #pragma pack(8) 585 + #endif 586 + typedef struct { 587 + mach_msg_header_t Head; 588 + NDR_record_t NDR; 589 + host_flavor_t flavor; 590 + mach_msg_type_number_t host_info64_outCnt; 591 + } __Request__host_statistics64_t; 592 + #ifdef __MigPackStructs 593 + #pragma pack() 594 + #endif 595 + 596 + #ifdef __MigPackStructs 597 + #pragma pack(8) 598 + #endif 599 + typedef struct { 600 + mach_msg_header_t Head; 601 + } __Request__mach_zone_info_t; 602 + #ifdef __MigPackStructs 603 + #pragma pack() 604 + #endif 605 + 606 + #ifdef __MigPackStructs 607 + #pragma pack(8) 608 + #endif 609 + typedef struct { 610 + mach_msg_header_t Head; 611 + } __Request__mach_zone_force_gc_t; 612 + #ifdef __MigPackStructs 613 + #pragma pack() 614 + #endif 615 + 616 + #ifdef __MigPackStructs 617 + #pragma pack(8) 618 + #endif 619 + typedef struct { 620 + mach_msg_header_t Head; 621 + NDR_record_t NDR; 622 + mach_msg_type_number_t recipesCnt; 623 + uint8_t recipes[5120]; 624 + } __Request__host_create_mach_voucher_t; 625 + #ifdef __MigPackStructs 626 + #pragma pack() 627 + #endif 628 + 629 + #ifdef __MigPackStructs 630 + #pragma pack(8) 631 + #endif 632 + typedef struct { 633 + mach_msg_header_t Head; 634 + /* start of the kernel processed data */ 635 + mach_msg_body_t msgh_body; 636 + mach_msg_port_descriptor_t attr_manager; 637 + /* end of the kernel processed data */ 638 + NDR_record_t NDR; 639 + mach_voucher_attr_value_handle_t default_value; 640 + } __Request__host_register_mach_voucher_attr_manager_t; 641 + #ifdef __MigPackStructs 642 + #pragma pack() 643 + #endif 644 + 645 + #ifdef __MigPackStructs 646 + #pragma pack(8) 647 + #endif 648 + typedef struct { 649 + mach_msg_header_t Head; 650 + /* start of the kernel processed data */ 651 + mach_msg_body_t msgh_body; 652 + mach_msg_port_descriptor_t attr_manager; 653 + /* end of the kernel processed data */ 654 + NDR_record_t NDR; 655 + mach_voucher_attr_value_handle_t default_value; 656 + mach_voucher_attr_key_t key; 657 + } __Request__host_register_well_known_mach_voucher_attr_manager_t; 658 + #ifdef __MigPackStructs 659 + #pragma pack() 660 + #endif 661 + #endif /* !__Request__mach_host_subsystem__defined */ 662 + 663 + /* union of all requests */ 664 + 665 + #ifndef __RequestUnion__mach_host_subsystem__defined 666 + #define __RequestUnion__mach_host_subsystem__defined 667 + union __RequestUnion__mach_host_subsystem { 668 + __Request__host_info_t Request_host_info; 669 + __Request__host_kernel_version_t Request_host_kernel_version; 670 + __Request___host_page_size_t Request__host_page_size; 671 + __Request__mach_memory_object_memory_entry_t Request_mach_memory_object_memory_entry; 672 + __Request__host_processor_info_t Request_host_processor_info; 673 + __Request__host_get_io_master_t Request_host_get_io_master; 674 + __Request__host_get_clock_service_t Request_host_get_clock_service; 675 + __Request__kmod_get_info_t Request_kmod_get_info; 676 + __Request__host_zone_info_t Request_host_zone_info; 677 + __Request__host_virtual_physical_table_info_t Request_host_virtual_physical_table_info; 678 + __Request__processor_set_default_t Request_processor_set_default; 679 + __Request__processor_set_create_t Request_processor_set_create; 680 + __Request__mach_memory_object_memory_entry_64_t Request_mach_memory_object_memory_entry_64; 681 + __Request__host_statistics_t Request_host_statistics; 682 + __Request__host_request_notification_t Request_host_request_notification; 683 + __Request__host_lockgroup_info_t Request_host_lockgroup_info; 684 + __Request__host_statistics64_t Request_host_statistics64; 685 + __Request__mach_zone_info_t Request_mach_zone_info; 686 + __Request__mach_zone_force_gc_t Request_mach_zone_force_gc; 687 + __Request__host_create_mach_voucher_t Request_host_create_mach_voucher; 688 + __Request__host_register_mach_voucher_attr_manager_t Request_host_register_mach_voucher_attr_manager; 689 + __Request__host_register_well_known_mach_voucher_attr_manager_t Request_host_register_well_known_mach_voucher_attr_manager; 690 + }; 691 + #endif /* !__RequestUnion__mach_host_subsystem__defined */ 692 + /* typedefs for all replies */ 693 + 694 + #ifndef __Reply__mach_host_subsystem__defined 695 + #define __Reply__mach_host_subsystem__defined 696 + 697 + #ifdef __MigPackStructs 698 + #pragma pack(8) 699 + #endif 700 + typedef struct { 701 + mach_msg_header_t Head; 702 + NDR_record_t NDR; 703 + kern_return_t RetCode; 704 + mach_msg_type_number_t host_info_outCnt; 705 + integer_t host_info_out[68]; 706 + } __Reply__host_info_t; 707 + #ifdef __MigPackStructs 708 + #pragma pack() 709 + #endif 710 + 711 + #ifdef __MigPackStructs 712 + #pragma pack(8) 713 + #endif 714 + typedef struct { 715 + mach_msg_header_t Head; 716 + NDR_record_t NDR; 717 + kern_return_t RetCode; 718 + mach_msg_type_number_t kernel_versionOffset; /* MiG doesn't use it */ 719 + mach_msg_type_number_t kernel_versionCnt; 720 + char kernel_version[512]; 721 + } __Reply__host_kernel_version_t; 722 + #ifdef __MigPackStructs 723 + #pragma pack() 724 + #endif 725 + 726 + #ifdef __MigPackStructs 727 + #pragma pack(8) 728 + #endif 729 + typedef struct { 730 + mach_msg_header_t Head; 731 + NDR_record_t NDR; 732 + kern_return_t RetCode; 733 + vm_size_t out_page_size; 734 + } __Reply___host_page_size_t; 735 + #ifdef __MigPackStructs 736 + #pragma pack() 737 + #endif 738 + 739 + #ifdef __MigPackStructs 740 + #pragma pack(8) 741 + #endif 742 + typedef struct { 743 + mach_msg_header_t Head; 744 + /* start of the kernel processed data */ 745 + mach_msg_body_t msgh_body; 746 + mach_msg_port_descriptor_t entry_handle; 747 + /* end of the kernel processed data */ 748 + } __Reply__mach_memory_object_memory_entry_t; 749 + #ifdef __MigPackStructs 750 + #pragma pack() 751 + #endif 752 + 753 + #ifdef __MigPackStructs 754 + #pragma pack(8) 755 + #endif 756 + typedef struct { 757 + mach_msg_header_t Head; 758 + /* start of the kernel processed data */ 759 + mach_msg_body_t msgh_body; 760 + mach_msg_ool_descriptor_t out_processor_info; 761 + /* end of the kernel processed data */ 762 + NDR_record_t NDR; 763 + natural_t out_processor_count; 764 + mach_msg_type_number_t out_processor_infoCnt; 765 + } __Reply__host_processor_info_t; 766 + #ifdef __MigPackStructs 767 + #pragma pack() 768 + #endif 769 + 770 + #ifdef __MigPackStructs 771 + #pragma pack(8) 772 + #endif 773 + typedef struct { 774 + mach_msg_header_t Head; 775 + /* start of the kernel processed data */ 776 + mach_msg_body_t msgh_body; 777 + mach_msg_port_descriptor_t io_master; 778 + /* end of the kernel processed data */ 779 + } __Reply__host_get_io_master_t; 780 + #ifdef __MigPackStructs 781 + #pragma pack() 782 + #endif 783 + 784 + #ifdef __MigPackStructs 785 + #pragma pack(8) 786 + #endif 787 + typedef struct { 788 + mach_msg_header_t Head; 789 + /* start of the kernel processed data */ 790 + mach_msg_body_t msgh_body; 791 + mach_msg_port_descriptor_t clock_serv; 792 + /* end of the kernel processed data */ 793 + } __Reply__host_get_clock_service_t; 794 + #ifdef __MigPackStructs 795 + #pragma pack() 796 + #endif 797 + 798 + #ifdef __MigPackStructs 799 + #pragma pack(8) 800 + #endif 801 + typedef struct { 802 + mach_msg_header_t Head; 803 + /* start of the kernel processed data */ 804 + mach_msg_body_t msgh_body; 805 + mach_msg_ool_descriptor_t modules; 806 + /* end of the kernel processed data */ 807 + NDR_record_t NDR; 808 + mach_msg_type_number_t modulesCnt; 809 + } __Reply__kmod_get_info_t; 810 + #ifdef __MigPackStructs 811 + #pragma pack() 812 + #endif 813 + 814 + #ifdef __MigPackStructs 815 + #pragma pack(8) 816 + #endif 817 + typedef struct { 818 + mach_msg_header_t Head; 819 + /* start of the kernel processed data */ 820 + mach_msg_body_t msgh_body; 821 + mach_msg_ool_descriptor_t names; 822 + mach_msg_ool_descriptor_t info; 823 + /* end of the kernel processed data */ 824 + NDR_record_t NDR; 825 + mach_msg_type_number_t namesCnt; 826 + mach_msg_type_number_t infoCnt; 827 + } __Reply__host_zone_info_t; 828 + #ifdef __MigPackStructs 829 + #pragma pack() 830 + #endif 831 + 832 + #ifdef __MigPackStructs 833 + #pragma pack(8) 834 + #endif 835 + typedef struct { 836 + mach_msg_header_t Head; 837 + /* start of the kernel processed data */ 838 + mach_msg_body_t msgh_body; 839 + mach_msg_ool_descriptor_t info; 840 + /* end of the kernel processed data */ 841 + NDR_record_t NDR; 842 + mach_msg_type_number_t infoCnt; 843 + } __Reply__host_virtual_physical_table_info_t; 844 + #ifdef __MigPackStructs 845 + #pragma pack() 846 + #endif 847 + 848 + #ifdef __MigPackStructs 849 + #pragma pack(8) 850 + #endif 851 + typedef struct { 852 + mach_msg_header_t Head; 853 + /* start of the kernel processed data */ 854 + mach_msg_body_t msgh_body; 855 + mach_msg_port_descriptor_t default_set; 856 + /* end of the kernel processed data */ 857 + } __Reply__processor_set_default_t; 858 + #ifdef __MigPackStructs 859 + #pragma pack() 860 + #endif 861 + 862 + #ifdef __MigPackStructs 863 + #pragma pack(8) 864 + #endif 865 + typedef struct { 866 + mach_msg_header_t Head; 867 + /* start of the kernel processed data */ 868 + mach_msg_body_t msgh_body; 869 + mach_msg_port_descriptor_t new_set; 870 + mach_msg_port_descriptor_t new_name; 871 + /* end of the kernel processed data */ 872 + } __Reply__processor_set_create_t; 873 + #ifdef __MigPackStructs 874 + #pragma pack() 875 + #endif 876 + 877 + #ifdef __MigPackStructs 878 + #pragma pack(8) 879 + #endif 880 + typedef struct { 881 + mach_msg_header_t Head; 882 + /* start of the kernel processed data */ 883 + mach_msg_body_t msgh_body; 884 + mach_msg_port_descriptor_t entry_handle; 885 + /* end of the kernel processed data */ 886 + } __Reply__mach_memory_object_memory_entry_64_t; 887 + #ifdef __MigPackStructs 888 + #pragma pack() 889 + #endif 890 + 891 + #ifdef __MigPackStructs 892 + #pragma pack(8) 893 + #endif 894 + typedef struct { 895 + mach_msg_header_t Head; 896 + NDR_record_t NDR; 897 + kern_return_t RetCode; 898 + mach_msg_type_number_t host_info_outCnt; 899 + integer_t host_info_out[68]; 900 + } __Reply__host_statistics_t; 901 + #ifdef __MigPackStructs 902 + #pragma pack() 903 + #endif 904 + 905 + #ifdef __MigPackStructs 906 + #pragma pack(8) 907 + #endif 908 + typedef struct { 909 + mach_msg_header_t Head; 910 + NDR_record_t NDR; 911 + kern_return_t RetCode; 912 + } __Reply__host_request_notification_t; 913 + #ifdef __MigPackStructs 914 + #pragma pack() 915 + #endif 916 + 917 + #ifdef __MigPackStructs 918 + #pragma pack(8) 919 + #endif 920 + typedef struct { 921 + mach_msg_header_t Head; 922 + /* start of the kernel processed data */ 923 + mach_msg_body_t msgh_body; 924 + mach_msg_ool_descriptor_t lockgroup_info; 925 + /* end of the kernel processed data */ 926 + NDR_record_t NDR; 927 + mach_msg_type_number_t lockgroup_infoCnt; 928 + } __Reply__host_lockgroup_info_t; 929 + #ifdef __MigPackStructs 930 + #pragma pack() 931 + #endif 932 + 933 + #ifdef __MigPackStructs 934 + #pragma pack(8) 935 + #endif 936 + typedef struct { 937 + mach_msg_header_t Head; 938 + NDR_record_t NDR; 939 + kern_return_t RetCode; 940 + mach_msg_type_number_t host_info64_outCnt; 941 + integer_t host_info64_out[256]; 942 + } __Reply__host_statistics64_t; 943 + #ifdef __MigPackStructs 944 + #pragma pack() 945 + #endif 946 + 947 + #ifdef __MigPackStructs 948 + #pragma pack(8) 949 + #endif 950 + typedef struct { 951 + mach_msg_header_t Head; 952 + /* start of the kernel processed data */ 953 + mach_msg_body_t msgh_body; 954 + mach_msg_ool_descriptor_t names; 955 + mach_msg_ool_descriptor_t info; 956 + /* end of the kernel processed data */ 957 + NDR_record_t NDR; 958 + mach_msg_type_number_t namesCnt; 959 + mach_msg_type_number_t infoCnt; 960 + } __Reply__mach_zone_info_t; 961 + #ifdef __MigPackStructs 962 + #pragma pack() 963 + #endif 964 + 965 + #ifdef __MigPackStructs 966 + #pragma pack(8) 967 + #endif 968 + typedef struct { 969 + mach_msg_header_t Head; 970 + NDR_record_t NDR; 971 + kern_return_t RetCode; 972 + } __Reply__mach_zone_force_gc_t; 973 + #ifdef __MigPackStructs 974 + #pragma pack() 975 + #endif 976 + 977 + #ifdef __MigPackStructs 978 + #pragma pack(8) 979 + #endif 980 + typedef struct { 981 + mach_msg_header_t Head; 982 + /* start of the kernel processed data */ 983 + mach_msg_body_t msgh_body; 984 + mach_msg_port_descriptor_t voucher; 985 + /* end of the kernel processed data */ 986 + } __Reply__host_create_mach_voucher_t; 987 + #ifdef __MigPackStructs 988 + #pragma pack() 989 + #endif 990 + 991 + #ifdef __MigPackStructs 992 + #pragma pack(8) 993 + #endif 994 + typedef struct { 995 + mach_msg_header_t Head; 996 + /* start of the kernel processed data */ 997 + mach_msg_body_t msgh_body; 998 + mach_msg_port_descriptor_t new_attr_control; 999 + /* end of the kernel processed data */ 1000 + NDR_record_t NDR; 1001 + mach_voucher_attr_key_t new_key; 1002 + } __Reply__host_register_mach_voucher_attr_manager_t; 1003 + #ifdef __MigPackStructs 1004 + #pragma pack() 1005 + #endif 1006 + 1007 + #ifdef __MigPackStructs 1008 + #pragma pack(8) 1009 + #endif 1010 + typedef struct { 1011 + mach_msg_header_t Head; 1012 + /* start of the kernel processed data */ 1013 + mach_msg_body_t msgh_body; 1014 + mach_msg_port_descriptor_t new_attr_control; 1015 + /* end of the kernel processed data */ 1016 + } __Reply__host_register_well_known_mach_voucher_attr_manager_t; 1017 + #ifdef __MigPackStructs 1018 + #pragma pack() 1019 + #endif 1020 + #endif /* !__Reply__mach_host_subsystem__defined */ 1021 + 1022 + /* union of all replies */ 1023 + 1024 + #ifndef __ReplyUnion__mach_host_subsystem__defined 1025 + #define __ReplyUnion__mach_host_subsystem__defined 1026 + union __ReplyUnion__mach_host_subsystem { 1027 + __Reply__host_info_t Reply_host_info; 1028 + __Reply__host_kernel_version_t Reply_host_kernel_version; 1029 + __Reply___host_page_size_t Reply__host_page_size; 1030 + __Reply__mach_memory_object_memory_entry_t Reply_mach_memory_object_memory_entry; 1031 + __Reply__host_processor_info_t Reply_host_processor_info; 1032 + __Reply__host_get_io_master_t Reply_host_get_io_master; 1033 + __Reply__host_get_clock_service_t Reply_host_get_clock_service; 1034 + __Reply__kmod_get_info_t Reply_kmod_get_info; 1035 + __Reply__host_zone_info_t Reply_host_zone_info; 1036 + __Reply__host_virtual_physical_table_info_t Reply_host_virtual_physical_table_info; 1037 + __Reply__processor_set_default_t Reply_processor_set_default; 1038 + __Reply__processor_set_create_t Reply_processor_set_create; 1039 + __Reply__mach_memory_object_memory_entry_64_t Reply_mach_memory_object_memory_entry_64; 1040 + __Reply__host_statistics_t Reply_host_statistics; 1041 + __Reply__host_request_notification_t Reply_host_request_notification; 1042 + __Reply__host_lockgroup_info_t Reply_host_lockgroup_info; 1043 + __Reply__host_statistics64_t Reply_host_statistics64; 1044 + __Reply__mach_zone_info_t Reply_mach_zone_info; 1045 + __Reply__mach_zone_force_gc_t Reply_mach_zone_force_gc; 1046 + __Reply__host_create_mach_voucher_t Reply_host_create_mach_voucher; 1047 + __Reply__host_register_mach_voucher_attr_manager_t Reply_host_register_mach_voucher_attr_manager; 1048 + __Reply__host_register_well_known_mach_voucher_attr_manager_t Reply_host_register_well_known_mach_voucher_attr_manager; 1049 + }; 1050 + #endif /* !__RequestUnion__mach_host_subsystem__defined */ 1051 + 1052 + #ifndef subsystem_to_name_map_mach_host 1053 + #define subsystem_to_name_map_mach_host \ 1054 + { "host_info", 200 },\ 1055 + { "host_kernel_version", 201 },\ 1056 + { "_host_page_size", 202 },\ 1057 + { "mach_memory_object_memory_entry", 203 },\ 1058 + { "host_processor_info", 204 },\ 1059 + { "host_get_io_master", 205 },\ 1060 + { "host_get_clock_service", 206 },\ 1061 + { "kmod_get_info", 207 },\ 1062 + { "host_zone_info", 208 },\ 1063 + { "host_virtual_physical_table_info", 209 },\ 1064 + { "processor_set_default", 213 },\ 1065 + { "processor_set_create", 214 },\ 1066 + { "mach_memory_object_memory_entry_64", 215 },\ 1067 + { "host_statistics", 216 },\ 1068 + { "host_request_notification", 217 },\ 1069 + { "host_lockgroup_info", 218 },\ 1070 + { "host_statistics64", 219 },\ 1071 + { "mach_zone_info", 220 },\ 1072 + { "mach_zone_force_gc", 221 },\ 1073 + { "host_create_mach_voucher", 222 },\ 1074 + { "host_register_mach_voucher_attr_manager", 223 },\ 1075 + { "host_register_well_known_mach_voucher_attr_manager", 224 } 1076 + #endif 1077 + 1078 + #ifdef __AfterMigUserHeader 1079 + __AfterMigUserHeader 1080 + #endif /* __AfterMigUserHeader */ 1081 + 1082 + #endif /* _mach_host_user_ */
+12
lkm/mig_includes_pre.h
··· 1 + #ifndef MIG_INCLUDES_PRE_H 2 + #define MIG_INCLUDES_PRE_H 3 + #define _MACH_MACH_TRAPS_H_ 4 + 5 + #undef NSEC_PER_USEC 6 + #undef NSEC_PER_MSEC 7 + #undef NSEC_PER_SEC 8 + #undef USEC_PER_SEC 9 + #define __unused 10 + #define weak_import weak 11 + 12 + #endif