Chameleon

Chameleon Svn Source Tree

Root/branches/xZenu/src/include/mach/mach_host.h

Source at commit 1270 created 12 years 9 months ago.
By meklort, Add arm headers. update makefiles
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#ifdef AUTOTEST
17#ifndef FUNCTION_PTR_T
18#define FUNCTION_PTR_T
19typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
20typedef struct {
21 char *name;
22 function_ptr_t function;
23} function_table_entry;
24typedef function_table_entry *function_table_t;
25#endif /* FUNCTION_PTR_T */
26#endif /* AUTOTEST */
27
28#ifndefmach_host_MSG_COUNT
29#definemach_host_MSG_COUNT20
30#endif/* mach_host_MSG_COUNT */
31
32#include <mach/std_types.h>
33#include <mach/mig.h>
34#include <mach/mach_types.h>
35#include <mach/mach_types.h>
36#include <mach/mach_init.h>
37
38#ifdef __BeforeMigUserHeader
39__BeforeMigUserHeader
40#endif /* __BeforeMigUserHeader */
41
42#include <sys/cdefs.h>
43__BEGIN_DECLS
44
45
46/* Routine host_info */
47#ifdefmig_external
48mig_external
49#else
50extern
51#endif/* mig_external */
52kern_return_t host_info
53(
54host_t host,
55host_flavor_t flavor,
56host_info_t host_info_out,
57mach_msg_type_number_t *host_info_outCnt
58);
59
60/* Routine host_kernel_version */
61#ifdefmig_external
62mig_external
63#else
64extern
65#endif/* mig_external */
66kern_return_t host_kernel_version
67(
68host_t host,
69kernel_version_t kernel_version
70);
71
72/* Routine _host_page_size */
73#ifdefmig_external
74mig_external
75#else
76extern
77#endif/* mig_external */
78kern_return_t _host_page_size
79(
80host_t host,
81vm_size_t *out_page_size
82);
83
84/* Routine mach_memory_object_memory_entry */
85#ifdefmig_external
86mig_external
87#else
88extern
89#endif/* mig_external */
90kern_return_t mach_memory_object_memory_entry
91(
92host_t host,
93boolean_t internal,
94vm_size_t size,
95vm_prot_t permission,
96memory_object_t pager,
97mach_port_t *entry_handle
98);
99
100/* Routine host_processor_info */
101#ifdefmig_external
102mig_external
103#else
104extern
105#endif/* mig_external */
106kern_return_t host_processor_info
107(
108host_t host,
109processor_flavor_t flavor,
110natural_t *out_processor_count,
111processor_info_array_t *out_processor_info,
112mach_msg_type_number_t *out_processor_infoCnt
113);
114
115/* Routine host_get_io_master */
116#ifdefmig_external
117mig_external
118#else
119extern
120#endif/* mig_external */
121kern_return_t host_get_io_master
122(
123host_t host,
124io_master_t *io_master
125);
126
127/* Routine host_get_clock_service */
128#ifdefmig_external
129mig_external
130#else
131extern
132#endif/* mig_external */
133kern_return_t host_get_clock_service
134(
135host_t host,
136clock_id_t clock_id,
137clock_serv_t *clock_serv
138);
139
140/* Routine kmod_get_info */
141#ifdefmig_external
142mig_external
143#else
144extern
145#endif/* mig_external */
146kern_return_t kmod_get_info
147(
148host_t host,
149kmod_args_t *modules,
150mach_msg_type_number_t *modulesCnt
151);
152
153/* Routine processor_set_default */
154#ifdefmig_external
155mig_external
156#else
157extern
158#endif/* mig_external */
159kern_return_t processor_set_default
160(
161host_t host,
162processor_set_name_t *default_set
163);
164
165/* Routine processor_set_create */
166#ifdefmig_external
167mig_external
168#else
169extern
170#endif/* mig_external */
171kern_return_t processor_set_create
172(
173host_t host,
174processor_set_t *new_set,
175processor_set_name_t *new_name
176);
177
178/* Routine mach_memory_object_memory_entry_64 */
179#ifdefmig_external
180mig_external
181#else
182extern
183#endif/* mig_external */
184kern_return_t mach_memory_object_memory_entry_64
185(
186host_t host,
187boolean_t internal,
188memory_object_size_t size,
189vm_prot_t permission,
190memory_object_t pager,
191mach_port_t *entry_handle
192);
193
194/* Routine host_statistics */
195#ifdefmig_external
196mig_external
197#else
198extern
199#endif/* mig_external */
200kern_return_t host_statistics
201(
202host_t host_priv,
203host_flavor_t flavor,
204host_info_t host_info_out,
205mach_msg_type_number_t *host_info_outCnt
206);
207
208/* Routine host_request_notification */
209#ifdefmig_external
210mig_external
211#else
212extern
213#endif/* mig_external */
214kern_return_t host_request_notification
215(
216host_t host,
217host_flavor_t notify_type,
218mach_port_t notify_port
219);
220
221
222/* Routine host_statistics64 */
223#ifdefmig_external
224mig_external
225#else
226extern
227#endif/* mig_external */
228kern_return_t host_statistics64
229(
230host_t host_priv,
231host_flavor_t flavor,
232host_info64_t host_info64_out,
233mach_msg_type_number_t *host_info64_outCnt
234);
235
236__END_DECLS
237
238/********************** Caution **************************/
239/* The following data types should be used to calculate */
240/* maximum message sizes only. The actual message may be */
241/* smaller, and the position of the arguments within the */
242/* message layout may vary from what is presented here. */
243/* For example, if any of the arguments are variable- */
244/* sized, and less than the maximum is sent, the data */
245/* will be packed tight in the actual message to reduce */
246/* the presence of holes. */
247/********************** Caution **************************/
248
249/* typedefs for all requests */
250
251#ifndef __Request__mach_host_subsystem__defined
252#define __Request__mach_host_subsystem__defined
253
254#ifdef __MigPackStructs
255#pragma pack(4)
256#endif
257typedef struct {
258mach_msg_header_t Head;
259NDR_record_t NDR;
260host_flavor_t flavor;
261mach_msg_type_number_t host_info_outCnt;
262} __Request__host_info_t;
263#ifdef __MigPackStructs
264#pragma pack()
265#endif
266
267#ifdef __MigPackStructs
268#pragma pack(4)
269#endif
270typedef struct {
271mach_msg_header_t Head;
272} __Request__host_kernel_version_t;
273#ifdef __MigPackStructs
274#pragma pack()
275#endif
276
277#ifdef __MigPackStructs
278#pragma pack(4)
279#endif
280typedef struct {
281mach_msg_header_t Head;
282} __Request___host_page_size_t;
283#ifdef __MigPackStructs
284#pragma pack()
285#endif
286
287#ifdef __MigPackStructs
288#pragma pack(4)
289#endif
290typedef struct {
291mach_msg_header_t Head;
292/* start of the kernel processed data */
293mach_msg_body_t msgh_body;
294mach_msg_port_descriptor_t pager;
295/* end of the kernel processed data */
296NDR_record_t NDR;
297boolean_t internal;
298vm_size_t size;
299vm_prot_t permission;
300} __Request__mach_memory_object_memory_entry_t;
301#ifdef __MigPackStructs
302#pragma pack()
303#endif
304
305#ifdef __MigPackStructs
306#pragma pack(4)
307#endif
308typedef struct {
309mach_msg_header_t Head;
310NDR_record_t NDR;
311processor_flavor_t flavor;
312} __Request__host_processor_info_t;
313#ifdef __MigPackStructs
314#pragma pack()
315#endif
316
317#ifdef __MigPackStructs
318#pragma pack(4)
319#endif
320typedef struct {
321mach_msg_header_t Head;
322} __Request__host_get_io_master_t;
323#ifdef __MigPackStructs
324#pragma pack()
325#endif
326
327#ifdef __MigPackStructs
328#pragma pack(4)
329#endif
330typedef struct {
331mach_msg_header_t Head;
332NDR_record_t NDR;
333clock_id_t clock_id;
334} __Request__host_get_clock_service_t;
335#ifdef __MigPackStructs
336#pragma pack()
337#endif
338
339#ifdef __MigPackStructs
340#pragma pack(4)
341#endif
342typedef struct {
343mach_msg_header_t Head;
344} __Request__kmod_get_info_t;
345#ifdef __MigPackStructs
346#pragma pack()
347#endif
348
349#ifdef __MigPackStructs
350#pragma pack(4)
351#endif
352typedef struct {
353mach_msg_header_t Head;
354} __Request__host_zone_info_t;
355#ifdef __MigPackStructs
356#pragma pack()
357#endif
358
359#ifdef __MigPackStructs
360#pragma pack(4)
361#endif
362typedef struct {
363mach_msg_header_t Head;
364} __Request__host_virtual_physical_table_info_t;
365#ifdef __MigPackStructs
366#pragma pack()
367#endif
368
369#ifdef __MigPackStructs
370#pragma pack(4)
371#endif
372typedef struct {
373mach_msg_header_t Head;
374} __Request__host_ipc_hash_info_t;
375#ifdef __MigPackStructs
376#pragma pack()
377#endif
378
379#ifdef __MigPackStructs
380#pragma pack(4)
381#endif
382typedef struct {
383mach_msg_header_t Head;
384} __Request__processor_set_default_t;
385#ifdef __MigPackStructs
386#pragma pack()
387#endif
388
389#ifdef __MigPackStructs
390#pragma pack(4)
391#endif
392typedef struct {
393mach_msg_header_t Head;
394} __Request__processor_set_create_t;
395#ifdef __MigPackStructs
396#pragma pack()
397#endif
398
399#ifdef __MigPackStructs
400#pragma pack(4)
401#endif
402typedef struct {
403mach_msg_header_t Head;
404/* start of the kernel processed data */
405mach_msg_body_t msgh_body;
406mach_msg_port_descriptor_t pager;
407/* end of the kernel processed data */
408NDR_record_t NDR;
409boolean_t internal;
410memory_object_size_t size;
411vm_prot_t permission;
412} __Request__mach_memory_object_memory_entry_64_t;
413#ifdef __MigPackStructs
414#pragma pack()
415#endif
416
417#ifdef __MigPackStructs
418#pragma pack(4)
419#endif
420typedef struct {
421mach_msg_header_t Head;
422NDR_record_t NDR;
423host_flavor_t flavor;
424mach_msg_type_number_t host_info_outCnt;
425} __Request__host_statistics_t;
426#ifdef __MigPackStructs
427#pragma pack()
428#endif
429
430#ifdef __MigPackStructs
431#pragma pack(4)
432#endif
433typedef struct {
434mach_msg_header_t Head;
435/* start of the kernel processed data */
436mach_msg_body_t msgh_body;
437mach_msg_port_descriptor_t notify_port;
438/* end of the kernel processed data */
439NDR_record_t NDR;
440host_flavor_t notify_type;
441} __Request__host_request_notification_t;
442#ifdef __MigPackStructs
443#pragma pack()
444#endif
445
446#ifdef __MigPackStructs
447#pragma pack(4)
448#endif
449typedef struct {
450mach_msg_header_t Head;
451} __Request__host_lockgroup_info_t;
452#ifdef __MigPackStructs
453#pragma pack()
454#endif
455
456#ifdef __MigPackStructs
457#pragma pack(4)
458#endif
459typedef struct {
460mach_msg_header_t Head;
461NDR_record_t NDR;
462host_flavor_t flavor;
463mach_msg_type_number_t host_info64_outCnt;
464} __Request__host_statistics64_t;
465#ifdef __MigPackStructs
466#pragma pack()
467#endif
468#endif /* !__Request__mach_host_subsystem__defined */
469
470/* union of all requests */
471
472#ifndef __RequestUnion__mach_host_subsystem__defined
473#define __RequestUnion__mach_host_subsystem__defined
474union __RequestUnion__mach_host_subsystem {
475__Request__host_info_t Request_host_info;
476__Request__host_kernel_version_t Request_host_kernel_version;
477__Request___host_page_size_t Request__host_page_size;
478__Request__mach_memory_object_memory_entry_t Request_mach_memory_object_memory_entry;
479__Request__host_processor_info_t Request_host_processor_info;
480__Request__host_get_io_master_t Request_host_get_io_master;
481__Request__host_get_clock_service_t Request_host_get_clock_service;
482__Request__kmod_get_info_t Request_kmod_get_info;
483__Request__host_zone_info_t Request_host_zone_info;
484__Request__host_virtual_physical_table_info_t Request_host_virtual_physical_table_info;
485__Request__host_ipc_hash_info_t Request_host_ipc_hash_info;
486__Request__processor_set_default_t Request_processor_set_default;
487__Request__processor_set_create_t Request_processor_set_create;
488__Request__mach_memory_object_memory_entry_64_t Request_mach_memory_object_memory_entry_64;
489__Request__host_statistics_t Request_host_statistics;
490__Request__host_request_notification_t Request_host_request_notification;
491__Request__host_lockgroup_info_t Request_host_lockgroup_info;
492__Request__host_statistics64_t Request_host_statistics64;
493};
494#endif /* !__RequestUnion__mach_host_subsystem__defined */
495/* typedefs for all replies */
496
497#ifndef __Reply__mach_host_subsystem__defined
498#define __Reply__mach_host_subsystem__defined
499
500#ifdef __MigPackStructs
501#pragma pack(4)
502#endif
503typedef struct {
504mach_msg_header_t Head;
505NDR_record_t NDR;
506kern_return_t RetCode;
507mach_msg_type_number_t host_info_outCnt;
508integer_t host_info_out[15];
509} __Reply__host_info_t;
510#ifdef __MigPackStructs
511#pragma pack()
512#endif
513
514#ifdef __MigPackStructs
515#pragma pack(4)
516#endif
517typedef struct {
518mach_msg_header_t Head;
519NDR_record_t NDR;
520kern_return_t RetCode;
521mach_msg_type_number_t kernel_versionOffset; /* MiG doesn't use it */
522mach_msg_type_number_t kernel_versionCnt;
523char kernel_version[512];
524} __Reply__host_kernel_version_t;
525#ifdef __MigPackStructs
526#pragma pack()
527#endif
528
529#ifdef __MigPackStructs
530#pragma pack(4)
531#endif
532typedef struct {
533mach_msg_header_t Head;
534NDR_record_t NDR;
535kern_return_t RetCode;
536vm_size_t out_page_size;
537} __Reply___host_page_size_t;
538#ifdef __MigPackStructs
539#pragma pack()
540#endif
541
542#ifdef __MigPackStructs
543#pragma pack(4)
544#endif
545typedef struct {
546mach_msg_header_t Head;
547/* start of the kernel processed data */
548mach_msg_body_t msgh_body;
549mach_msg_port_descriptor_t entry_handle;
550/* end of the kernel processed data */
551} __Reply__mach_memory_object_memory_entry_t;
552#ifdef __MigPackStructs
553#pragma pack()
554#endif
555
556#ifdef __MigPackStructs
557#pragma pack(4)
558#endif
559typedef struct {
560mach_msg_header_t Head;
561/* start of the kernel processed data */
562mach_msg_body_t msgh_body;
563mach_msg_ool_descriptor_t out_processor_info;
564/* end of the kernel processed data */
565NDR_record_t NDR;
566natural_t out_processor_count;
567mach_msg_type_number_t out_processor_infoCnt;
568} __Reply__host_processor_info_t;
569#ifdef __MigPackStructs
570#pragma pack()
571#endif
572
573#ifdef __MigPackStructs
574#pragma pack(4)
575#endif
576typedef struct {
577mach_msg_header_t Head;
578/* start of the kernel processed data */
579mach_msg_body_t msgh_body;
580mach_msg_port_descriptor_t io_master;
581/* end of the kernel processed data */
582} __Reply__host_get_io_master_t;
583#ifdef __MigPackStructs
584#pragma pack()
585#endif
586
587#ifdef __MigPackStructs
588#pragma pack(4)
589#endif
590typedef struct {
591mach_msg_header_t Head;
592/* start of the kernel processed data */
593mach_msg_body_t msgh_body;
594mach_msg_port_descriptor_t clock_serv;
595/* end of the kernel processed data */
596} __Reply__host_get_clock_service_t;
597#ifdef __MigPackStructs
598#pragma pack()
599#endif
600
601#ifdef __MigPackStructs
602#pragma pack(4)
603#endif
604typedef struct {
605mach_msg_header_t Head;
606/* start of the kernel processed data */
607mach_msg_body_t msgh_body;
608mach_msg_ool_descriptor_t modules;
609/* end of the kernel processed data */
610NDR_record_t NDR;
611mach_msg_type_number_t modulesCnt;
612} __Reply__kmod_get_info_t;
613#ifdef __MigPackStructs
614#pragma pack()
615#endif
616
617#ifdef __MigPackStructs
618#pragma pack(4)
619#endif
620typedef struct {
621mach_msg_header_t Head;
622/* start of the kernel processed data */
623mach_msg_body_t msgh_body;
624mach_msg_ool_descriptor_t names;
625mach_msg_ool_descriptor_t info;
626/* end of the kernel processed data */
627NDR_record_t NDR;
628mach_msg_type_number_t namesCnt;
629mach_msg_type_number_t infoCnt;
630} __Reply__host_zone_info_t;
631#ifdef __MigPackStructs
632#pragma pack()
633#endif
634
635#ifdef __MigPackStructs
636#pragma pack(4)
637#endif
638typedef struct {
639mach_msg_header_t Head;
640/* start of the kernel processed data */
641mach_msg_body_t msgh_body;
642mach_msg_ool_descriptor_t info;
643/* end of the kernel processed data */
644NDR_record_t NDR;
645mach_msg_type_number_t infoCnt;
646} __Reply__host_virtual_physical_table_info_t;
647#ifdef __MigPackStructs
648#pragma pack()
649#endif
650
651#ifdef __MigPackStructs
652#pragma pack(4)
653#endif
654typedef struct {
655mach_msg_header_t Head;
656/* start of the kernel processed data */
657mach_msg_body_t msgh_body;
658mach_msg_ool_descriptor_t info;
659/* end of the kernel processed data */
660NDR_record_t NDR;
661mach_msg_type_number_t infoCnt;
662} __Reply__host_ipc_hash_info_t;
663#ifdef __MigPackStructs
664#pragma pack()
665#endif
666
667#ifdef __MigPackStructs
668#pragma pack(4)
669#endif
670typedef struct {
671mach_msg_header_t Head;
672/* start of the kernel processed data */
673mach_msg_body_t msgh_body;
674mach_msg_port_descriptor_t default_set;
675/* end of the kernel processed data */
676} __Reply__processor_set_default_t;
677#ifdef __MigPackStructs
678#pragma pack()
679#endif
680
681#ifdef __MigPackStructs
682#pragma pack(4)
683#endif
684typedef struct {
685mach_msg_header_t Head;
686/* start of the kernel processed data */
687mach_msg_body_t msgh_body;
688mach_msg_port_descriptor_t new_set;
689mach_msg_port_descriptor_t new_name;
690/* end of the kernel processed data */
691} __Reply__processor_set_create_t;
692#ifdef __MigPackStructs
693#pragma pack()
694#endif
695
696#ifdef __MigPackStructs
697#pragma pack(4)
698#endif
699typedef struct {
700mach_msg_header_t Head;
701/* start of the kernel processed data */
702mach_msg_body_t msgh_body;
703mach_msg_port_descriptor_t entry_handle;
704/* end of the kernel processed data */
705} __Reply__mach_memory_object_memory_entry_64_t;
706#ifdef __MigPackStructs
707#pragma pack()
708#endif
709
710#ifdef __MigPackStructs
711#pragma pack(4)
712#endif
713typedef struct {
714mach_msg_header_t Head;
715NDR_record_t NDR;
716kern_return_t RetCode;
717mach_msg_type_number_t host_info_outCnt;
718integer_t host_info_out[15];
719} __Reply__host_statistics_t;
720#ifdef __MigPackStructs
721#pragma pack()
722#endif
723
724#ifdef __MigPackStructs
725#pragma pack(4)
726#endif
727typedef struct {
728mach_msg_header_t Head;
729NDR_record_t NDR;
730kern_return_t RetCode;
731} __Reply__host_request_notification_t;
732#ifdef __MigPackStructs
733#pragma pack()
734#endif
735
736#ifdef __MigPackStructs
737#pragma pack(4)
738#endif
739typedef struct {
740mach_msg_header_t Head;
741/* start of the kernel processed data */
742mach_msg_body_t msgh_body;
743mach_msg_ool_descriptor_t lockgroup_info;
744/* end of the kernel processed data */
745NDR_record_t NDR;
746mach_msg_type_number_t lockgroup_infoCnt;
747} __Reply__host_lockgroup_info_t;
748#ifdef __MigPackStructs
749#pragma pack()
750#endif
751
752#ifdef __MigPackStructs
753#pragma pack(4)
754#endif
755typedef struct {
756mach_msg_header_t Head;
757NDR_record_t NDR;
758kern_return_t RetCode;
759mach_msg_type_number_t host_info64_outCnt;
760integer_t host_info64_out[256];
761} __Reply__host_statistics64_t;
762#ifdef __MigPackStructs
763#pragma pack()
764#endif
765#endif /* !__Reply__mach_host_subsystem__defined */
766
767/* union of all replies */
768
769#ifndef __ReplyUnion__mach_host_subsystem__defined
770#define __ReplyUnion__mach_host_subsystem__defined
771union __ReplyUnion__mach_host_subsystem {
772__Reply__host_info_t Reply_host_info;
773__Reply__host_kernel_version_t Reply_host_kernel_version;
774__Reply___host_page_size_t Reply__host_page_size;
775__Reply__mach_memory_object_memory_entry_t Reply_mach_memory_object_memory_entry;
776__Reply__host_processor_info_t Reply_host_processor_info;
777__Reply__host_get_io_master_t Reply_host_get_io_master;
778__Reply__host_get_clock_service_t Reply_host_get_clock_service;
779__Reply__kmod_get_info_t Reply_kmod_get_info;
780__Reply__host_zone_info_t Reply_host_zone_info;
781__Reply__host_virtual_physical_table_info_t Reply_host_virtual_physical_table_info;
782__Reply__host_ipc_hash_info_t Reply_host_ipc_hash_info;
783__Reply__processor_set_default_t Reply_processor_set_default;
784__Reply__processor_set_create_t Reply_processor_set_create;
785__Reply__mach_memory_object_memory_entry_64_t Reply_mach_memory_object_memory_entry_64;
786__Reply__host_statistics_t Reply_host_statistics;
787__Reply__host_request_notification_t Reply_host_request_notification;
788__Reply__host_lockgroup_info_t Reply_host_lockgroup_info;
789__Reply__host_statistics64_t Reply_host_statistics64;
790};
791#endif /* !__RequestUnion__mach_host_subsystem__defined */
792
793#ifndef subsystem_to_name_map_mach_host
794#define subsystem_to_name_map_mach_host \
795 { "host_info", 200 },\
796 { "host_kernel_version", 201 },\
797 { "_host_page_size", 202 },\
798 { "mach_memory_object_memory_entry", 203 },\
799 { "host_processor_info", 204 },\
800 { "host_get_io_master", 205 },\
801 { "host_get_clock_service", 206 },\
802 { "kmod_get_info", 207 },\
803 { "host_zone_info", 208 },\
804 { "host_virtual_physical_table_info", 209 },\
805 { "host_ipc_hash_info", 210 },\
806 { "processor_set_default", 213 },\
807 { "processor_set_create", 214 },\
808 { "mach_memory_object_memory_entry_64", 215 },\
809 { "host_statistics", 216 },\
810 { "host_request_notification", 217 },\
811 { "host_lockgroup_info", 218 },\
812 { "host_statistics64", 219 }
813#endif
814
815#ifdef __AfterMigUserHeader
816__AfterMigUserHeader
817#endif /* __AfterMigUserHeader */
818
819#endif /* _mach_host_user_ */
820

Archive Download this file

Revision: 1270