1 | #ifndef _host_priv_server_ |
2 | #define _host_priv_server_ |
3 | |
4 | /* Module host_priv */ |
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 MIG_STRNCPY_ZEROFILL CODE */ |
17 | |
18 | #if defined(__has_include) |
19 | #if __has_include(<mach/mig_strncpy_zerofill_support.h>) |
20 | #ifndef USING_MIG_STRNCPY_ZEROFILL |
21 | #define USING_MIG_STRNCPY_ZEROFILL |
22 | #endif |
23 | #ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ |
24 | #define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ |
25 | #ifdef __cplusplus |
26 | extern "C" { |
27 | #endif |
28 | extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import)); |
29 | #ifdef __cplusplus |
30 | } |
31 | #endif |
32 | #endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */ |
33 | #endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */ |
34 | #endif /* __has_include */ |
35 | |
36 | /* END MIG_STRNCPY_ZEROFILL CODE */ |
37 | |
38 | |
39 | #ifdef AUTOTEST |
40 | #ifndef FUNCTION_PTR_T |
41 | #define FUNCTION_PTR_T |
42 | typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); |
43 | typedef struct { |
44 | char *name; |
45 | function_ptr_t function; |
46 | } function_table_entry; |
47 | typedef function_table_entry *function_table_t; |
48 | #endif /* FUNCTION_PTR_T */ |
49 | #endif /* AUTOTEST */ |
50 | |
51 | #ifndef host_priv_MSG_COUNT |
52 | #define host_priv_MSG_COUNT 26 |
53 | #endif /* host_priv_MSG_COUNT */ |
54 | |
55 | #include <mach/std_types.h> |
56 | #include <mach/mig.h> |
57 | #include <ipc/ipc_voucher.h> |
58 | #include <kern/ipc_kobject.h> |
59 | #include <kern/ipc_tt.h> |
60 | #include <kern/ipc_host.h> |
61 | #include <kern/ipc_sync.h> |
62 | #include <kern/ledger.h> |
63 | #include <kern/processor.h> |
64 | #include <kern/sync_lock.h> |
65 | #include <kern/sync_sema.h> |
66 | #include <vm/memory_object.h> |
67 | #include <vm/vm_map.h> |
68 | #include <kern/ipc_mig.h> |
69 | #include <mach/mig.h> |
70 | #include <mach/mach_types.h> |
71 | #include <mach/mach_types.h> |
72 | #include <mach_debug/mach_debug_types.h> |
73 | |
74 | #ifdef __BeforeMigServerHeader |
75 | __BeforeMigServerHeader |
76 | #endif /* __BeforeMigServerHeader */ |
77 | |
78 | |
79 | /* Routine host_get_boot_info */ |
80 | #ifdef mig_external |
81 | mig_external |
82 | #else |
83 | extern |
84 | #endif /* mig_external */ |
85 | kern_return_t host_get_boot_info |
86 | ( |
87 | host_priv_t host_priv, |
88 | kernel_boot_info_t boot_info |
89 | ); |
90 | |
91 | /* Routine host_reboot */ |
92 | #ifdef mig_external |
93 | mig_external |
94 | #else |
95 | extern |
96 | #endif /* mig_external */ |
97 | kern_return_t host_reboot |
98 | ( |
99 | host_priv_t host_priv, |
100 | int options |
101 | ); |
102 | |
103 | /* Routine host_priv_statistics */ |
104 | #ifdef mig_external |
105 | mig_external |
106 | #else |
107 | extern |
108 | #endif /* mig_external */ |
109 | kern_return_t host_priv_statistics |
110 | ( |
111 | host_priv_t host_priv, |
112 | host_flavor_t flavor, |
113 | host_info_t host_info_out, |
114 | mach_msg_type_number_t *host_info_outCnt |
115 | ); |
116 | |
117 | /* Routine host_default_memory_manager */ |
118 | #ifdef mig_external |
119 | mig_external |
120 | #else |
121 | extern |
122 | #endif /* mig_external */ |
123 | kern_return_t host_default_memory_manager |
124 | ( |
125 | host_priv_t host_priv, |
126 | memory_object_default_t *default_manager, |
127 | memory_object_cluster_size_t cluster_size |
128 | ); |
129 | |
130 | /* Routine vm_wire */ |
131 | #ifdef mig_external |
132 | mig_external |
133 | #else |
134 | extern |
135 | #endif /* mig_external */ |
136 | kern_return_t vm_wire |
137 | ( |
138 | host_priv_t host_priv, |
139 | vm_map_t task, |
140 | vm_address_t address, |
141 | vm_size_t size, |
142 | vm_prot_t desired_access |
143 | ); |
144 | |
145 | /* Routine thread_wire */ |
146 | #ifdef mig_external |
147 | mig_external |
148 | #else |
149 | extern |
150 | #endif /* mig_external */ |
151 | kern_return_t thread_wire |
152 | ( |
153 | host_priv_t host_priv, |
154 | thread_act_t thread, |
155 | boolean_t wired |
156 | ); |
157 | |
158 | /* Routine vm_allocate_cpm */ |
159 | #ifdef mig_external |
160 | mig_external |
161 | #else |
162 | extern |
163 | #endif /* mig_external */ |
164 | kern_return_t vm_allocate_cpm |
165 | ( |
166 | host_priv_t host_priv, |
167 | vm_map_t task, |
168 | vm_address_t *address, |
169 | vm_size_t size, |
170 | int flags |
171 | ); |
172 | |
173 | /* Routine host_processors */ |
174 | #ifdef mig_external |
175 | mig_external |
176 | #else |
177 | extern |
178 | #endif /* mig_external */ |
179 | kern_return_t host_processors |
180 | ( |
181 | host_priv_t host_priv, |
182 | processor_array_t *out_processor_list, |
183 | mach_msg_type_number_t *out_processor_listCnt |
184 | ); |
185 | |
186 | /* Routine host_get_clock_control */ |
187 | #ifdef mig_external |
188 | mig_external |
189 | #else |
190 | extern |
191 | #endif /* mig_external */ |
192 | kern_return_t host_get_clock_control |
193 | ( |
194 | host_priv_t host_priv, |
195 | clock_id_t clock_id, |
196 | clock_ctrl_t *clock_ctrl |
197 | ); |
198 | |
199 | /* Routine kmod_create */ |
200 | #ifdef mig_external |
201 | mig_external |
202 | #else |
203 | extern |
204 | #endif /* mig_external */ |
205 | kern_return_t kmod_create |
206 | ( |
207 | host_priv_t host_priv, |
208 | vm_address_t info, |
209 | kmod_t *module |
210 | ); |
211 | |
212 | /* Routine kmod_destroy */ |
213 | #ifdef mig_external |
214 | mig_external |
215 | #else |
216 | extern |
217 | #endif /* mig_external */ |
218 | kern_return_t kmod_destroy |
219 | ( |
220 | host_priv_t host_priv, |
221 | kmod_t module |
222 | ); |
223 | |
224 | /* Routine kmod_control */ |
225 | #ifdef mig_external |
226 | mig_external |
227 | #else |
228 | extern |
229 | #endif /* mig_external */ |
230 | kern_return_t kmod_control |
231 | ( |
232 | host_priv_t host_priv, |
233 | kmod_t module, |
234 | kmod_control_flavor_t flavor, |
235 | kmod_args_t *data, |
236 | mach_msg_type_number_t *dataCnt |
237 | ); |
238 | |
239 | /* Routine host_get_special_port */ |
240 | #ifdef mig_external |
241 | mig_external |
242 | #else |
243 | extern |
244 | #endif /* mig_external */ |
245 | kern_return_t host_get_special_port |
246 | ( |
247 | host_priv_t host_priv, |
248 | int node, |
249 | int which, |
250 | mach_port_t *port |
251 | ); |
252 | |
253 | /* Routine host_set_special_port */ |
254 | #ifdef mig_external |
255 | mig_external |
256 | #else |
257 | extern |
258 | #endif /* mig_external */ |
259 | kern_return_t host_set_special_port |
260 | ( |
261 | host_priv_t host_priv, |
262 | int which, |
263 | mach_port_t port |
264 | ); |
265 | |
266 | /* Routine host_set_exception_ports */ |
267 | #ifdef mig_external |
268 | mig_external |
269 | #else |
270 | extern |
271 | #endif /* mig_external */ |
272 | kern_return_t host_set_exception_ports |
273 | ( |
274 | host_priv_t host_priv, |
275 | exception_mask_t exception_mask, |
276 | mach_port_t new_port, |
277 | exception_behavior_t behavior, |
278 | thread_state_flavor_t new_flavor |
279 | ); |
280 | |
281 | /* Routine host_get_exception_ports */ |
282 | #ifdef mig_external |
283 | mig_external |
284 | #else |
285 | extern |
286 | #endif /* mig_external */ |
287 | kern_return_t host_get_exception_ports |
288 | ( |
289 | host_priv_t host_priv, |
290 | exception_mask_t exception_mask, |
291 | exception_mask_array_t masks, |
292 | mach_msg_type_number_t *masksCnt, |
293 | exception_handler_array_t old_handlers, |
294 | exception_behavior_array_t old_behaviors, |
295 | exception_flavor_array_t old_flavors |
296 | ); |
297 | |
298 | /* Routine host_swap_exception_ports */ |
299 | #ifdef mig_external |
300 | mig_external |
301 | #else |
302 | extern |
303 | #endif /* mig_external */ |
304 | kern_return_t host_swap_exception_ports |
305 | ( |
306 | host_priv_t host_priv, |
307 | exception_mask_t exception_mask, |
308 | mach_port_t new_port, |
309 | exception_behavior_t behavior, |
310 | thread_state_flavor_t new_flavor, |
311 | exception_mask_array_t masks, |
312 | mach_msg_type_number_t *masksCnt, |
313 | exception_handler_array_t old_handlerss, |
314 | exception_behavior_array_t old_behaviors, |
315 | exception_flavor_array_t old_flavors |
316 | ); |
317 | |
318 | /* Routine mach_vm_wire_external */ |
319 | #ifdef mig_external |
320 | mig_external |
321 | #else |
322 | extern |
323 | #endif /* mig_external */ |
324 | kern_return_t mach_vm_wire_external |
325 | ( |
326 | host_priv_t host_priv, |
327 | vm_map_t task, |
328 | mach_vm_address_t address, |
329 | mach_vm_size_t size, |
330 | vm_prot_t desired_access |
331 | ); |
332 | |
333 | /* Routine host_processor_sets */ |
334 | #ifdef mig_external |
335 | mig_external |
336 | #else |
337 | extern |
338 | #endif /* mig_external */ |
339 | kern_return_t host_processor_sets |
340 | ( |
341 | host_priv_t host_priv, |
342 | processor_set_name_array_t *processor_sets, |
343 | mach_msg_type_number_t *processor_setsCnt |
344 | ); |
345 | |
346 | /* Routine host_processor_set_priv */ |
347 | #ifdef mig_external |
348 | mig_external |
349 | #else |
350 | extern |
351 | #endif /* mig_external */ |
352 | kern_return_t host_processor_set_priv |
353 | ( |
354 | host_priv_t host_priv, |
355 | processor_set_name_t set_name, |
356 | processor_set_t *set |
357 | ); |
358 | |
359 | /* Routine host_set_UNDServer */ |
360 | #ifdef mig_external |
361 | mig_external |
362 | #else |
363 | extern |
364 | #endif /* mig_external */ |
365 | kern_return_t host_set_UNDServer |
366 | ( |
367 | host_priv_t host, |
368 | UNDServerRef server |
369 | ); |
370 | |
371 | /* Routine host_get_UNDServer */ |
372 | #ifdef mig_external |
373 | mig_external |
374 | #else |
375 | extern |
376 | #endif /* mig_external */ |
377 | kern_return_t host_get_UNDServer |
378 | ( |
379 | host_priv_t host, |
380 | UNDServerRef *server |
381 | ); |
382 | |
383 | /* Routine kext_request */ |
384 | #ifdef mig_external |
385 | mig_external |
386 | #else |
387 | extern |
388 | #endif /* mig_external */ |
389 | kern_return_t kext_request |
390 | ( |
391 | host_priv_t host_priv, |
392 | uint32_t user_log_flags, |
393 | vm_offset_t request_data, |
394 | mach_msg_type_number_t request_dataCnt, |
395 | vm_offset_t *response_data, |
396 | mach_msg_type_number_t *response_dataCnt, |
397 | vm_offset_t *log_data, |
398 | mach_msg_type_number_t *log_dataCnt, |
399 | kern_return_t *op_result |
400 | ); |
401 | |
402 | #ifdef mig_external |
403 | mig_external |
404 | #else |
405 | extern |
406 | #endif /* mig_external */ |
407 | boolean_t host_priv_server( |
408 | mach_msg_header_t *InHeadP, |
409 | mach_msg_header_t *OutHeadP); |
410 | |
411 | #ifdef mig_external |
412 | mig_external |
413 | #else |
414 | extern |
415 | #endif /* mig_external */ |
416 | mig_routine_t host_priv_server_routine( |
417 | mach_msg_header_t *InHeadP); |
418 | |
419 | |
420 | /* Description of this subsystem, for use in direct RPC */ |
421 | extern const struct host_priv_subsystem { |
422 | mig_server_routine_t server; /* Server routine */ |
423 | mach_msg_id_t start; /* Min routine number */ |
424 | mach_msg_id_t end; /* Max routine number + 1 */ |
425 | unsigned int maxsize; /* Max msg size */ |
426 | vm_address_t reserved; /* Reserved */ |
427 | struct routine_descriptor /*Array of routine descriptors */ |
428 | routine[26]; |
429 | } host_priv_subsystem; |
430 | |
431 | /* typedefs for all requests */ |
432 | |
433 | #ifndef __Request__host_priv_subsystem__defined |
434 | #define __Request__host_priv_subsystem__defined |
435 | |
436 | #ifdef __MigPackStructs |
437 | #pragma pack(4) |
438 | #endif |
439 | typedef struct { |
440 | mach_msg_header_t Head; |
441 | } __Request__host_get_boot_info_t __attribute__((unused)); |
442 | #ifdef __MigPackStructs |
443 | #pragma pack() |
444 | #endif |
445 | |
446 | #ifdef __MigPackStructs |
447 | #pragma pack(4) |
448 | #endif |
449 | typedef struct { |
450 | mach_msg_header_t Head; |
451 | NDR_record_t NDR; |
452 | int options; |
453 | } __Request__host_reboot_t __attribute__((unused)); |
454 | #ifdef __MigPackStructs |
455 | #pragma pack() |
456 | #endif |
457 | |
458 | #ifdef __MigPackStructs |
459 | #pragma pack(4) |
460 | #endif |
461 | typedef struct { |
462 | mach_msg_header_t Head; |
463 | NDR_record_t NDR; |
464 | host_flavor_t flavor; |
465 | mach_msg_type_number_t host_info_outCnt; |
466 | } __Request__host_priv_statistics_t __attribute__((unused)); |
467 | #ifdef __MigPackStructs |
468 | #pragma pack() |
469 | #endif |
470 | |
471 | #ifdef __MigPackStructs |
472 | #pragma pack(4) |
473 | #endif |
474 | typedef struct { |
475 | mach_msg_header_t Head; |
476 | /* start of the kernel processed data */ |
477 | mach_msg_body_t msgh_body; |
478 | mach_msg_port_descriptor_t default_manager; |
479 | /* end of the kernel processed data */ |
480 | NDR_record_t NDR; |
481 | memory_object_cluster_size_t cluster_size; |
482 | } __Request__host_default_memory_manager_t __attribute__((unused)); |
483 | #ifdef __MigPackStructs |
484 | #pragma pack() |
485 | #endif |
486 | |
487 | #ifdef __MigPackStructs |
488 | #pragma pack(4) |
489 | #endif |
490 | typedef struct { |
491 | mach_msg_header_t Head; |
492 | /* start of the kernel processed data */ |
493 | mach_msg_body_t msgh_body; |
494 | mach_msg_port_descriptor_t task; |
495 | /* end of the kernel processed data */ |
496 | NDR_record_t NDR; |
497 | vm_address_t address; |
498 | vm_size_t size; |
499 | vm_prot_t desired_access; |
500 | } __Request__vm_wire_t __attribute__((unused)); |
501 | #ifdef __MigPackStructs |
502 | #pragma pack() |
503 | #endif |
504 | |
505 | #ifdef __MigPackStructs |
506 | #pragma pack(4) |
507 | #endif |
508 | typedef struct { |
509 | mach_msg_header_t Head; |
510 | /* start of the kernel processed data */ |
511 | mach_msg_body_t msgh_body; |
512 | mach_msg_port_descriptor_t thread; |
513 | /* end of the kernel processed data */ |
514 | NDR_record_t NDR; |
515 | boolean_t wired; |
516 | } __Request__thread_wire_t __attribute__((unused)); |
517 | #ifdef __MigPackStructs |
518 | #pragma pack() |
519 | #endif |
520 | |
521 | #ifdef __MigPackStructs |
522 | #pragma pack(4) |
523 | #endif |
524 | typedef struct { |
525 | mach_msg_header_t Head; |
526 | /* start of the kernel processed data */ |
527 | mach_msg_body_t msgh_body; |
528 | mach_msg_port_descriptor_t task; |
529 | /* end of the kernel processed data */ |
530 | NDR_record_t NDR; |
531 | vm_address_t address; |
532 | vm_size_t size; |
533 | int flags; |
534 | } __Request__vm_allocate_cpm_t __attribute__((unused)); |
535 | #ifdef __MigPackStructs |
536 | #pragma pack() |
537 | #endif |
538 | |
539 | #ifdef __MigPackStructs |
540 | #pragma pack(4) |
541 | #endif |
542 | typedef struct { |
543 | mach_msg_header_t Head; |
544 | } __Request__host_processors_t __attribute__((unused)); |
545 | #ifdef __MigPackStructs |
546 | #pragma pack() |
547 | #endif |
548 | |
549 | #ifdef __MigPackStructs |
550 | #pragma pack(4) |
551 | #endif |
552 | typedef struct { |
553 | mach_msg_header_t Head; |
554 | NDR_record_t NDR; |
555 | clock_id_t clock_id; |
556 | } __Request__host_get_clock_control_t __attribute__((unused)); |
557 | #ifdef __MigPackStructs |
558 | #pragma pack() |
559 | #endif |
560 | |
561 | #ifdef __MigPackStructs |
562 | #pragma pack(4) |
563 | #endif |
564 | typedef struct { |
565 | mach_msg_header_t Head; |
566 | NDR_record_t NDR; |
567 | vm_address_t info; |
568 | } __Request__kmod_create_t __attribute__((unused)); |
569 | #ifdef __MigPackStructs |
570 | #pragma pack() |
571 | #endif |
572 | |
573 | #ifdef __MigPackStructs |
574 | #pragma pack(4) |
575 | #endif |
576 | typedef struct { |
577 | mach_msg_header_t Head; |
578 | NDR_record_t NDR; |
579 | kmod_t module; |
580 | } __Request__kmod_destroy_t __attribute__((unused)); |
581 | #ifdef __MigPackStructs |
582 | #pragma pack() |
583 | #endif |
584 | |
585 | #ifdef __MigPackStructs |
586 | #pragma pack(4) |
587 | #endif |
588 | typedef struct { |
589 | mach_msg_header_t Head; |
590 | /* start of the kernel processed data */ |
591 | mach_msg_body_t msgh_body; |
592 | mach_msg_ool_descriptor_t data; |
593 | /* end of the kernel processed data */ |
594 | NDR_record_t NDR; |
595 | kmod_t module; |
596 | kmod_control_flavor_t flavor; |
597 | mach_msg_type_number_t dataCnt; |
598 | } __Request__kmod_control_t __attribute__((unused)); |
599 | #ifdef __MigPackStructs |
600 | #pragma pack() |
601 | #endif |
602 | |
603 | #ifdef __MigPackStructs |
604 | #pragma pack(4) |
605 | #endif |
606 | typedef struct { |
607 | mach_msg_header_t Head; |
608 | NDR_record_t NDR; |
609 | int node; |
610 | int which; |
611 | } __Request__host_get_special_port_t __attribute__((unused)); |
612 | #ifdef __MigPackStructs |
613 | #pragma pack() |
614 | #endif |
615 | |
616 | #ifdef __MigPackStructs |
617 | #pragma pack(4) |
618 | #endif |
619 | typedef struct { |
620 | mach_msg_header_t Head; |
621 | /* start of the kernel processed data */ |
622 | mach_msg_body_t msgh_body; |
623 | mach_msg_port_descriptor_t port; |
624 | /* end of the kernel processed data */ |
625 | NDR_record_t NDR; |
626 | int which; |
627 | } __Request__host_set_special_port_t __attribute__((unused)); |
628 | #ifdef __MigPackStructs |
629 | #pragma pack() |
630 | #endif |
631 | |
632 | #ifdef __MigPackStructs |
633 | #pragma pack(4) |
634 | #endif |
635 | typedef struct { |
636 | mach_msg_header_t Head; |
637 | /* start of the kernel processed data */ |
638 | mach_msg_body_t msgh_body; |
639 | mach_msg_port_descriptor_t new_port; |
640 | /* end of the kernel processed data */ |
641 | NDR_record_t NDR; |
642 | exception_mask_t exception_mask; |
643 | exception_behavior_t behavior; |
644 | thread_state_flavor_t new_flavor; |
645 | } __Request__host_set_exception_ports_t __attribute__((unused)); |
646 | #ifdef __MigPackStructs |
647 | #pragma pack() |
648 | #endif |
649 | |
650 | #ifdef __MigPackStructs |
651 | #pragma pack(4) |
652 | #endif |
653 | typedef struct { |
654 | mach_msg_header_t Head; |
655 | NDR_record_t NDR; |
656 | exception_mask_t exception_mask; |
657 | } __Request__host_get_exception_ports_t __attribute__((unused)); |
658 | #ifdef __MigPackStructs |
659 | #pragma pack() |
660 | #endif |
661 | |
662 | #ifdef __MigPackStructs |
663 | #pragma pack(4) |
664 | #endif |
665 | typedef struct { |
666 | mach_msg_header_t Head; |
667 | /* start of the kernel processed data */ |
668 | mach_msg_body_t msgh_body; |
669 | mach_msg_port_descriptor_t new_port; |
670 | /* end of the kernel processed data */ |
671 | NDR_record_t NDR; |
672 | exception_mask_t exception_mask; |
673 | exception_behavior_t behavior; |
674 | thread_state_flavor_t new_flavor; |
675 | } __Request__host_swap_exception_ports_t __attribute__((unused)); |
676 | #ifdef __MigPackStructs |
677 | #pragma pack() |
678 | #endif |
679 | |
680 | #ifdef __MigPackStructs |
681 | #pragma pack(4) |
682 | #endif |
683 | typedef struct { |
684 | mach_msg_header_t Head; |
685 | /* start of the kernel processed data */ |
686 | mach_msg_body_t msgh_body; |
687 | mach_msg_port_descriptor_t task; |
688 | /* end of the kernel processed data */ |
689 | NDR_record_t NDR; |
690 | mach_vm_address_t address; |
691 | mach_vm_size_t size; |
692 | vm_prot_t desired_access; |
693 | } __Request__mach_vm_wire_external_t __attribute__((unused)); |
694 | #ifdef __MigPackStructs |
695 | #pragma pack() |
696 | #endif |
697 | |
698 | #ifdef __MigPackStructs |
699 | #pragma pack(4) |
700 | #endif |
701 | typedef struct { |
702 | mach_msg_header_t Head; |
703 | } __Request__host_processor_sets_t __attribute__((unused)); |
704 | #ifdef __MigPackStructs |
705 | #pragma pack() |
706 | #endif |
707 | |
708 | #ifdef __MigPackStructs |
709 | #pragma pack(4) |
710 | #endif |
711 | typedef struct { |
712 | mach_msg_header_t Head; |
713 | /* start of the kernel processed data */ |
714 | mach_msg_body_t msgh_body; |
715 | mach_msg_port_descriptor_t set_name; |
716 | /* end of the kernel processed data */ |
717 | } __Request__host_processor_set_priv_t __attribute__((unused)); |
718 | #ifdef __MigPackStructs |
719 | #pragma pack() |
720 | #endif |
721 | |
722 | #ifdef __MigPackStructs |
723 | #pragma pack(4) |
724 | #endif |
725 | typedef struct { |
726 | mach_msg_header_t Head; |
727 | /* start of the kernel processed data */ |
728 | mach_msg_body_t msgh_body; |
729 | mach_msg_port_descriptor_t server; |
730 | /* end of the kernel processed data */ |
731 | } __Request__host_set_UNDServer_t __attribute__((unused)); |
732 | #ifdef __MigPackStructs |
733 | #pragma pack() |
734 | #endif |
735 | |
736 | #ifdef __MigPackStructs |
737 | #pragma pack(4) |
738 | #endif |
739 | typedef struct { |
740 | mach_msg_header_t Head; |
741 | } __Request__host_get_UNDServer_t __attribute__((unused)); |
742 | #ifdef __MigPackStructs |
743 | #pragma pack() |
744 | #endif |
745 | |
746 | #ifdef __MigPackStructs |
747 | #pragma pack(4) |
748 | #endif |
749 | typedef struct { |
750 | mach_msg_header_t Head; |
751 | /* start of the kernel processed data */ |
752 | mach_msg_body_t msgh_body; |
753 | mach_msg_ool_descriptor_t request_data; |
754 | /* end of the kernel processed data */ |
755 | NDR_record_t NDR; |
756 | uint32_t user_log_flags; |
757 | mach_msg_type_number_t request_dataCnt; |
758 | } __Request__kext_request_t __attribute__((unused)); |
759 | #ifdef __MigPackStructs |
760 | #pragma pack() |
761 | #endif |
762 | #endif /* !__Request__host_priv_subsystem__defined */ |
763 | |
764 | |
765 | /* union of all requests */ |
766 | |
767 | #ifndef __RequestUnion__host_priv_subsystem__defined |
768 | #define __RequestUnion__host_priv_subsystem__defined |
769 | union __RequestUnion__host_priv_subsystem { |
770 | __Request__host_get_boot_info_t Request_host_get_boot_info; |
771 | __Request__host_reboot_t Request_host_reboot; |
772 | __Request__host_priv_statistics_t Request_host_priv_statistics; |
773 | __Request__host_default_memory_manager_t Request_host_default_memory_manager; |
774 | __Request__vm_wire_t Request_vm_wire; |
775 | __Request__thread_wire_t Request_thread_wire; |
776 | __Request__vm_allocate_cpm_t Request_vm_allocate_cpm; |
777 | __Request__host_processors_t Request_host_processors; |
778 | __Request__host_get_clock_control_t Request_host_get_clock_control; |
779 | __Request__kmod_create_t Request_kmod_create; |
780 | __Request__kmod_destroy_t Request_kmod_destroy; |
781 | __Request__kmod_control_t Request_kmod_control; |
782 | __Request__host_get_special_port_t Request_host_get_special_port; |
783 | __Request__host_set_special_port_t Request_host_set_special_port; |
784 | __Request__host_set_exception_ports_t Request_host_set_exception_ports; |
785 | __Request__host_get_exception_ports_t Request_host_get_exception_ports; |
786 | __Request__host_swap_exception_ports_t Request_host_swap_exception_ports; |
787 | __Request__mach_vm_wire_external_t Request_mach_vm_wire_external; |
788 | __Request__host_processor_sets_t Request_host_processor_sets; |
789 | __Request__host_processor_set_priv_t Request_host_processor_set_priv; |
790 | __Request__host_set_UNDServer_t Request_host_set_UNDServer; |
791 | __Request__host_get_UNDServer_t Request_host_get_UNDServer; |
792 | __Request__kext_request_t Request_kext_request; |
793 | }; |
794 | #endif /* __RequestUnion__host_priv_subsystem__defined */ |
795 | /* typedefs for all replies */ |
796 | |
797 | #ifndef __Reply__host_priv_subsystem__defined |
798 | #define __Reply__host_priv_subsystem__defined |
799 | |
800 | #ifdef __MigPackStructs |
801 | #pragma pack(4) |
802 | #endif |
803 | typedef struct { |
804 | mach_msg_header_t Head; |
805 | NDR_record_t NDR; |
806 | kern_return_t RetCode; |
807 | mach_msg_type_number_t boot_infoOffset; /* MiG doesn't use it */ |
808 | mach_msg_type_number_t boot_infoCnt; |
809 | char boot_info[4096]; |
810 | } __Reply__host_get_boot_info_t __attribute__((unused)); |
811 | #ifdef __MigPackStructs |
812 | #pragma pack() |
813 | #endif |
814 | |
815 | #ifdef __MigPackStructs |
816 | #pragma pack(4) |
817 | #endif |
818 | typedef struct { |
819 | mach_msg_header_t Head; |
820 | NDR_record_t NDR; |
821 | kern_return_t RetCode; |
822 | } __Reply__host_reboot_t __attribute__((unused)); |
823 | #ifdef __MigPackStructs |
824 | #pragma pack() |
825 | #endif |
826 | |
827 | #ifdef __MigPackStructs |
828 | #pragma pack(4) |
829 | #endif |
830 | typedef struct { |
831 | mach_msg_header_t Head; |
832 | NDR_record_t NDR; |
833 | kern_return_t RetCode; |
834 | mach_msg_type_number_t host_info_outCnt; |
835 | integer_t host_info_out[68]; |
836 | } __Reply__host_priv_statistics_t __attribute__((unused)); |
837 | #ifdef __MigPackStructs |
838 | #pragma pack() |
839 | #endif |
840 | |
841 | #ifdef __MigPackStructs |
842 | #pragma pack(4) |
843 | #endif |
844 | typedef struct { |
845 | mach_msg_header_t Head; |
846 | /* start of the kernel processed data */ |
847 | mach_msg_body_t msgh_body; |
848 | mach_msg_port_descriptor_t default_manager; |
849 | /* end of the kernel processed data */ |
850 | } __Reply__host_default_memory_manager_t __attribute__((unused)); |
851 | #ifdef __MigPackStructs |
852 | #pragma pack() |
853 | #endif |
854 | |
855 | #ifdef __MigPackStructs |
856 | #pragma pack(4) |
857 | #endif |
858 | typedef struct { |
859 | mach_msg_header_t Head; |
860 | NDR_record_t NDR; |
861 | kern_return_t RetCode; |
862 | } __Reply__vm_wire_t __attribute__((unused)); |
863 | #ifdef __MigPackStructs |
864 | #pragma pack() |
865 | #endif |
866 | |
867 | #ifdef __MigPackStructs |
868 | #pragma pack(4) |
869 | #endif |
870 | typedef struct { |
871 | mach_msg_header_t Head; |
872 | NDR_record_t NDR; |
873 | kern_return_t RetCode; |
874 | } __Reply__thread_wire_t __attribute__((unused)); |
875 | #ifdef __MigPackStructs |
876 | #pragma pack() |
877 | #endif |
878 | |
879 | #ifdef __MigPackStructs |
880 | #pragma pack(4) |
881 | #endif |
882 | typedef struct { |
883 | mach_msg_header_t Head; |
884 | NDR_record_t NDR; |
885 | kern_return_t RetCode; |
886 | vm_address_t address; |
887 | } __Reply__vm_allocate_cpm_t __attribute__((unused)); |
888 | #ifdef __MigPackStructs |
889 | #pragma pack() |
890 | #endif |
891 | |
892 | #ifdef __MigPackStructs |
893 | #pragma pack(4) |
894 | #endif |
895 | typedef struct { |
896 | mach_msg_header_t Head; |
897 | /* start of the kernel processed data */ |
898 | mach_msg_body_t msgh_body; |
899 | mach_msg_ool_ports_descriptor_t out_processor_list; |
900 | /* end of the kernel processed data */ |
901 | NDR_record_t NDR; |
902 | mach_msg_type_number_t out_processor_listCnt; |
903 | } __Reply__host_processors_t __attribute__((unused)); |
904 | #ifdef __MigPackStructs |
905 | #pragma pack() |
906 | #endif |
907 | |
908 | #ifdef __MigPackStructs |
909 | #pragma pack(4) |
910 | #endif |
911 | typedef struct { |
912 | mach_msg_header_t Head; |
913 | /* start of the kernel processed data */ |
914 | mach_msg_body_t msgh_body; |
915 | mach_msg_port_descriptor_t clock_ctrl; |
916 | /* end of the kernel processed data */ |
917 | } __Reply__host_get_clock_control_t __attribute__((unused)); |
918 | #ifdef __MigPackStructs |
919 | #pragma pack() |
920 | #endif |
921 | |
922 | #ifdef __MigPackStructs |
923 | #pragma pack(4) |
924 | #endif |
925 | typedef struct { |
926 | mach_msg_header_t Head; |
927 | NDR_record_t NDR; |
928 | kern_return_t RetCode; |
929 | kmod_t module; |
930 | } __Reply__kmod_create_t __attribute__((unused)); |
931 | #ifdef __MigPackStructs |
932 | #pragma pack() |
933 | #endif |
934 | |
935 | #ifdef __MigPackStructs |
936 | #pragma pack(4) |
937 | #endif |
938 | typedef struct { |
939 | mach_msg_header_t Head; |
940 | NDR_record_t NDR; |
941 | kern_return_t RetCode; |
942 | } __Reply__kmod_destroy_t __attribute__((unused)); |
943 | #ifdef __MigPackStructs |
944 | #pragma pack() |
945 | #endif |
946 | |
947 | #ifdef __MigPackStructs |
948 | #pragma pack(4) |
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 data; |
955 | /* end of the kernel processed data */ |
956 | NDR_record_t NDR; |
957 | mach_msg_type_number_t dataCnt; |
958 | } __Reply__kmod_control_t __attribute__((unused)); |
959 | #ifdef __MigPackStructs |
960 | #pragma pack() |
961 | #endif |
962 | |
963 | #ifdef __MigPackStructs |
964 | #pragma pack(4) |
965 | #endif |
966 | typedef struct { |
967 | mach_msg_header_t Head; |
968 | /* start of the kernel processed data */ |
969 | mach_msg_body_t msgh_body; |
970 | mach_msg_port_descriptor_t port; |
971 | /* end of the kernel processed data */ |
972 | } __Reply__host_get_special_port_t __attribute__((unused)); |
973 | #ifdef __MigPackStructs |
974 | #pragma pack() |
975 | #endif |
976 | |
977 | #ifdef __MigPackStructs |
978 | #pragma pack(4) |
979 | #endif |
980 | typedef struct { |
981 | mach_msg_header_t Head; |
982 | NDR_record_t NDR; |
983 | kern_return_t RetCode; |
984 | } __Reply__host_set_special_port_t __attribute__((unused)); |
985 | #ifdef __MigPackStructs |
986 | #pragma pack() |
987 | #endif |
988 | |
989 | #ifdef __MigPackStructs |
990 | #pragma pack(4) |
991 | #endif |
992 | typedef struct { |
993 | mach_msg_header_t Head; |
994 | NDR_record_t NDR; |
995 | kern_return_t RetCode; |
996 | } __Reply__host_set_exception_ports_t __attribute__((unused)); |
997 | #ifdef __MigPackStructs |
998 | #pragma pack() |
999 | #endif |
1000 | |
1001 | #ifdef __MigPackStructs |
1002 | #pragma pack(4) |
1003 | #endif |
1004 | typedef struct { |
1005 | mach_msg_header_t Head; |
1006 | /* start of the kernel processed data */ |
1007 | mach_msg_body_t msgh_body; |
1008 | mach_msg_port_descriptor_t old_handlers[32]; |
1009 | /* end of the kernel processed data */ |
1010 | NDR_record_t NDR; |
1011 | mach_msg_type_number_t masksCnt; |
1012 | exception_mask_t masks[32]; |
1013 | exception_behavior_t old_behaviors[32]; |
1014 | thread_state_flavor_t old_flavors[32]; |
1015 | } __Reply__host_get_exception_ports_t __attribute__((unused)); |
1016 | #ifdef __MigPackStructs |
1017 | #pragma pack() |
1018 | #endif |
1019 | |
1020 | #ifdef __MigPackStructs |
1021 | #pragma pack(4) |
1022 | #endif |
1023 | typedef struct { |
1024 | mach_msg_header_t Head; |
1025 | /* start of the kernel processed data */ |
1026 | mach_msg_body_t msgh_body; |
1027 | mach_msg_port_descriptor_t old_handlerss[32]; |
1028 | /* end of the kernel processed data */ |
1029 | NDR_record_t NDR; |
1030 | mach_msg_type_number_t masksCnt; |
1031 | exception_mask_t masks[32]; |
1032 | exception_behavior_t old_behaviors[32]; |
1033 | thread_state_flavor_t old_flavors[32]; |
1034 | } __Reply__host_swap_exception_ports_t __attribute__((unused)); |
1035 | #ifdef __MigPackStructs |
1036 | #pragma pack() |
1037 | #endif |
1038 | |
1039 | #ifdef __MigPackStructs |
1040 | #pragma pack(4) |
1041 | #endif |
1042 | typedef struct { |
1043 | mach_msg_header_t Head; |
1044 | NDR_record_t NDR; |
1045 | kern_return_t RetCode; |
1046 | } __Reply__mach_vm_wire_external_t __attribute__((unused)); |
1047 | #ifdef __MigPackStructs |
1048 | #pragma pack() |
1049 | #endif |
1050 | |
1051 | #ifdef __MigPackStructs |
1052 | #pragma pack(4) |
1053 | #endif |
1054 | typedef struct { |
1055 | mach_msg_header_t Head; |
1056 | /* start of the kernel processed data */ |
1057 | mach_msg_body_t msgh_body; |
1058 | mach_msg_ool_ports_descriptor_t processor_sets; |
1059 | /* end of the kernel processed data */ |
1060 | NDR_record_t NDR; |
1061 | mach_msg_type_number_t processor_setsCnt; |
1062 | } __Reply__host_processor_sets_t __attribute__((unused)); |
1063 | #ifdef __MigPackStructs |
1064 | #pragma pack() |
1065 | #endif |
1066 | |
1067 | #ifdef __MigPackStructs |
1068 | #pragma pack(4) |
1069 | #endif |
1070 | typedef struct { |
1071 | mach_msg_header_t Head; |
1072 | /* start of the kernel processed data */ |
1073 | mach_msg_body_t msgh_body; |
1074 | mach_msg_port_descriptor_t set; |
1075 | /* end of the kernel processed data */ |
1076 | } __Reply__host_processor_set_priv_t __attribute__((unused)); |
1077 | #ifdef __MigPackStructs |
1078 | #pragma pack() |
1079 | #endif |
1080 | |
1081 | #ifdef __MigPackStructs |
1082 | #pragma pack(4) |
1083 | #endif |
1084 | typedef struct { |
1085 | mach_msg_header_t Head; |
1086 | NDR_record_t NDR; |
1087 | kern_return_t RetCode; |
1088 | } __Reply__host_set_UNDServer_t __attribute__((unused)); |
1089 | #ifdef __MigPackStructs |
1090 | #pragma pack() |
1091 | #endif |
1092 | |
1093 | #ifdef __MigPackStructs |
1094 | #pragma pack(4) |
1095 | #endif |
1096 | typedef struct { |
1097 | mach_msg_header_t Head; |
1098 | /* start of the kernel processed data */ |
1099 | mach_msg_body_t msgh_body; |
1100 | mach_msg_port_descriptor_t server; |
1101 | /* end of the kernel processed data */ |
1102 | } __Reply__host_get_UNDServer_t __attribute__((unused)); |
1103 | #ifdef __MigPackStructs |
1104 | #pragma pack() |
1105 | #endif |
1106 | |
1107 | #ifdef __MigPackStructs |
1108 | #pragma pack(4) |
1109 | #endif |
1110 | typedef struct { |
1111 | mach_msg_header_t Head; |
1112 | /* start of the kernel processed data */ |
1113 | mach_msg_body_t msgh_body; |
1114 | mach_msg_ool_descriptor_t response_data; |
1115 | mach_msg_ool_descriptor_t log_data; |
1116 | /* end of the kernel processed data */ |
1117 | NDR_record_t NDR; |
1118 | mach_msg_type_number_t response_dataCnt; |
1119 | mach_msg_type_number_t log_dataCnt; |
1120 | kern_return_t op_result; |
1121 | } __Reply__kext_request_t __attribute__((unused)); |
1122 | #ifdef __MigPackStructs |
1123 | #pragma pack() |
1124 | #endif |
1125 | #endif /* !__Reply__host_priv_subsystem__defined */ |
1126 | |
1127 | |
1128 | /* union of all replies */ |
1129 | |
1130 | #ifndef __ReplyUnion__host_priv_subsystem__defined |
1131 | #define __ReplyUnion__host_priv_subsystem__defined |
1132 | union __ReplyUnion__host_priv_subsystem { |
1133 | __Reply__host_get_boot_info_t Reply_host_get_boot_info; |
1134 | __Reply__host_reboot_t Reply_host_reboot; |
1135 | __Reply__host_priv_statistics_t Reply_host_priv_statistics; |
1136 | __Reply__host_default_memory_manager_t Reply_host_default_memory_manager; |
1137 | __Reply__vm_wire_t Reply_vm_wire; |
1138 | __Reply__thread_wire_t Reply_thread_wire; |
1139 | __Reply__vm_allocate_cpm_t Reply_vm_allocate_cpm; |
1140 | __Reply__host_processors_t Reply_host_processors; |
1141 | __Reply__host_get_clock_control_t Reply_host_get_clock_control; |
1142 | __Reply__kmod_create_t Reply_kmod_create; |
1143 | __Reply__kmod_destroy_t Reply_kmod_destroy; |
1144 | __Reply__kmod_control_t Reply_kmod_control; |
1145 | __Reply__host_get_special_port_t Reply_host_get_special_port; |
1146 | __Reply__host_set_special_port_t Reply_host_set_special_port; |
1147 | __Reply__host_set_exception_ports_t Reply_host_set_exception_ports; |
1148 | __Reply__host_get_exception_ports_t Reply_host_get_exception_ports; |
1149 | __Reply__host_swap_exception_ports_t Reply_host_swap_exception_ports; |
1150 | __Reply__mach_vm_wire_external_t Reply_mach_vm_wire_external; |
1151 | __Reply__host_processor_sets_t Reply_host_processor_sets; |
1152 | __Reply__host_processor_set_priv_t Reply_host_processor_set_priv; |
1153 | __Reply__host_set_UNDServer_t Reply_host_set_UNDServer; |
1154 | __Reply__host_get_UNDServer_t Reply_host_get_UNDServer; |
1155 | __Reply__kext_request_t Reply_kext_request; |
1156 | }; |
1157 | #endif /* __RequestUnion__host_priv_subsystem__defined */ |
1158 | |
1159 | #ifndef subsystem_to_name_map_host_priv |
1160 | #define subsystem_to_name_map_host_priv \ |
1161 | { "host_get_boot_info", 400 },\ |
1162 | { "host_reboot", 401 },\ |
1163 | { "host_priv_statistics", 402 },\ |
1164 | { "host_default_memory_manager", 403 },\ |
1165 | { "vm_wire", 404 },\ |
1166 | { "thread_wire", 405 },\ |
1167 | { "vm_allocate_cpm", 406 },\ |
1168 | { "host_processors", 407 },\ |
1169 | { "host_get_clock_control", 408 },\ |
1170 | { "kmod_create", 409 },\ |
1171 | { "kmod_destroy", 410 },\ |
1172 | { "kmod_control", 411 },\ |
1173 | { "host_get_special_port", 412 },\ |
1174 | { "host_set_special_port", 413 },\ |
1175 | { "host_set_exception_ports", 414 },\ |
1176 | { "host_get_exception_ports", 415 },\ |
1177 | { "host_swap_exception_ports", 416 },\ |
1178 | { "mach_vm_wire_external", 418 },\ |
1179 | { "host_processor_sets", 419 },\ |
1180 | { "host_processor_set_priv", 420 },\ |
1181 | { "host_set_UNDServer", 423 },\ |
1182 | { "host_get_UNDServer", 424 },\ |
1183 | { "kext_request", 425 } |
1184 | #endif |
1185 | |
1186 | #ifdef __AfterMigServerHeader |
1187 | __AfterMigServerHeader |
1188 | #endif /* __AfterMigServerHeader */ |
1189 | |
1190 | #endif /* _host_priv_server_ */ |
1191 | |