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