1 /*
2 * IDENTIFICATION:
3 * stub generated Thu Jun 11 18:17:44 2015
4 * with a MiG generated Thu Jun 11 16:16:11 PDT 2015 by kmacy@serenity
5 * OPTIONS:
6 * KernelServer
7 */
8
9 /* Module mach_host */
10
11 #define __MIG_check__Request__mach_host_subsystem__ 1
12
13 #include <sys/cdefs.h>
14 #include <sys/types.h>
15 #ifdef _KERNEL
16 #include <sys/mach/ndr.h>
17 #include <sys/mach/kern_return.h>
18 #include <sys/mach/notify.h>
19 #include <sys/mach/mach_types.h>
20 #include <sys/mach/message.h>
21 #include <sys/mach/mig_errors.h>
22 #else /* !_KERNEL */
23 #include <string.h>
24 #include <mach/ndr.h>
25 #include <mach/boolean.h>
26 #include <mach/kern_return.h>
27 #include <mach/notify.h>
28 #include <mach/mach_types.h>
29 #include <mach/message.h>
30 #include <mach/mig_errors.h>
31 #endif /*_KERNEL */
32
33 #include <sys/mach/std_types.h>
34 #include <sys/mach/mig.h>
35 #include <sys/mach/ipc_sync.h>
36 #include <sys/mach/ipc/ipc_voucher.h>
37 #include <sys/mach/ipc_host.h>
38 #include <sys/mach/ipc_tt.h>
39 #include <sys/mach/ipc_mig.h>
40 #include <sys/mach/mig.h>
41 #include <sys/mach/mach_types.h>
42 #include <sys/mach/mach_types.h>
43 #include <sys/mach_debug/mach_debug_types.h>
44
45 #ifndef mig_internal
46 #define mig_internal static __inline__
47 #endif /* mig_internal */
48
49 #ifndef mig_external
50 #define mig_external
51 #endif /* mig_external */
52
53 #if !defined(__MigTypeCheck) && defined(TypeCheck)
54 #define __MigTypeCheck TypeCheck /* Legacy setting */
55 #endif /* !defined(__MigTypeCheck) */
56
57 #if !defined(__MigKernelSpecificCode) && defined(_MIG_KERNEL_SPECIFIC_CODE_)
58 #define __MigKernelSpecificCode _MIG_KERNEL_SPECIFIC_CODE_ /* Legacy setting */
59 #endif /* !defined(__MigKernelSpecificCode) */
60
61 #ifndef LimitCheck
62 #define LimitCheck 0
63 #endif /* LimitCheck */
64
65 #ifndef min
66 #define min(a,b) ( ((a) < (b))? (a): (b) )
67 #endif /* min */
68
69 #if !defined(_WALIGN_)
70 #define _WALIGN_(x) (((x) + 7) & ~7)
71 #endif /* !defined(_WALIGN_) */
72
73 #if !defined(_WALIGNSZ_)
74 #define _WALIGNSZ_(x) _WALIGN_(sizeof(x))
75 #endif /* !defined(_WALIGNSZ_) */
76
77 #ifndef UseStaticTemplates
78 #define UseStaticTemplates 1
79 #endif /* UseStaticTemplates */
80
81 #define _WALIGN_(x) (((x) + 7) & ~7)
82 #define _WALIGNSZ_(x) _WALIGN_(sizeof(x))
83 #ifndef __DeclareRcvRpc
84 #define __DeclareRcvRpc(_NUM_, _NAME_)
85 #endif /* __DeclareRcvRpc */
86
87 #ifndef __BeforeRcvRpc
88 #define __BeforeRcvRpc(_NUM_, _NAME_)
89 #endif /* __BeforeRcvRpc */
90
91 #ifndef __AfterRcvRpc
92 #define __AfterRcvRpc(_NUM_, _NAME_)
93 #endif /* __AfterRcvRpc */
94
95 #ifndef __DeclareRcvSimple
96 #define __DeclareRcvSimple(_NUM_, _NAME_)
97 #endif /* __DeclareRcvSimple */
98
99 #ifndef __BeforeRcvSimple
100 #define __BeforeRcvSimple(_NUM_, _NAME_)
101 #endif /* __BeforeRcvSimple */
102
103 #ifndef __AfterRcvSimple
104 #define __AfterRcvSimple(_NUM_, _NAME_)
105 #endif /* __AfterRcvSimple */
106
107 #define novalue void
108 #if __MigKernelSpecificCode
109 #define msgh_request_port msgh_remote_port
110 #define MACH_MSGH_BITS_REQUEST(bits) MACH_MSGH_BITS_REMOTE(bits)
111 #define msgh_reply_port msgh_local_port
112 #define MACH_MSGH_BITS_REPLY(bits) MACH_MSGH_BITS_LOCAL(bits)
113 #else
114 #define msgh_request_port msgh_local_port
115 #define MACH_MSGH_BITS_REQUEST(bits) MACH_MSGH_BITS_LOCAL(bits)
116 #define msgh_reply_port msgh_remote_port
117 #define MACH_MSGH_BITS_REPLY(bits) MACH_MSGH_BITS_REMOTE(bits)
118 #endif /* __MigKernelSpecificCode */
119
120 #define MIG_RETURN_ERROR(X, code) {\
121 ((mig_reply_error_t *)X)->RetCode = code;\
122 ((mig_reply_error_t *)X)->NDR = NDR_record;\
123 return;\
124 }
125
126 /* typedefs for all requests */
127
128 #ifndef __Request__mach_host_subsystem__defined
129 #define __Request__mach_host_subsystem__defined
130
131 #ifdef __MigPackStructs
132 #pragma pack(4)
133 #endif
134 typedef struct {
135 mach_msg_header_t Head;
136 /* start of the kernel processed data */
137 mach_msg_body_t msgh_body;
138 /* end of the kernel processed data */
139 NDR_record_t NDR;
140 host_flavor_t flavor;
141 mach_msg_type_number_t host_info_outCnt;
142 } __Request__host_info_t;
143 #ifdef __MigPackStructs
144 #pragma pack()
145 #endif
146
147 #ifdef __MigPackStructs
148 #pragma pack(4)
149 #endif
150 typedef struct {
151 mach_msg_header_t Head;
152 /* start of the kernel processed data */
153 mach_msg_body_t msgh_body;
154 /* end of the kernel processed data */
155 } __Request__host_kernel_version_t;
156 #ifdef __MigPackStructs
157 #pragma pack()
158 #endif
159
160 #ifdef __MigPackStructs
161 #pragma pack(4)
162 #endif
163 typedef struct {
164 mach_msg_header_t Head;
165 /* start of the kernel processed data */
166 mach_msg_body_t msgh_body;
167 /* end of the kernel processed data */
168 } __Request__host_page_size_t;
169 #ifdef __MigPackStructs
170 #pragma pack()
171 #endif
172
173 #ifdef __MigPackStructs
174 #pragma pack(4)
175 #endif
176 typedef struct {
177 mach_msg_header_t Head;
178 /* start of the kernel processed data */
179 mach_msg_body_t msgh_body;
180 mach_msg_port_descriptor_t pager;
181 /* end of the kernel processed data */
182 NDR_record_t NDR;
183 boolean_t internal;
184 vm_size_t size;
185 vm_prot_t permission;
186 } __Request__mach_memory_object_memory_entry_t;
187 #ifdef __MigPackStructs
188 #pragma pack()
189 #endif
190
191 #ifdef __MigPackStructs
192 #pragma pack(4)
193 #endif
194 typedef struct {
195 mach_msg_header_t Head;
196 /* start of the kernel processed data */
197 mach_msg_body_t msgh_body;
198 /* end of the kernel processed data */
199 NDR_record_t NDR;
200 processor_flavor_t flavor;
201 } __Request__host_processor_info_t;
202 #ifdef __MigPackStructs
203 #pragma pack()
204 #endif
205
206 #ifdef __MigPackStructs
207 #pragma pack(4)
208 #endif
209 typedef struct {
210 mach_msg_header_t Head;
211 /* start of the kernel processed data */
212 mach_msg_body_t msgh_body;
213 /* end of the kernel processed data */
214 NDR_record_t NDR;
215 clock_id_t clock_id;
216 } __Request__host_get_clock_service_t;
217 #ifdef __MigPackStructs
218 #pragma pack()
219 #endif
220
221 #ifdef __MigPackStructs
222 #pragma pack(4)
223 #endif
224 typedef struct {
225 mach_msg_header_t Head;
226 /* start of the kernel processed data */
227 mach_msg_body_t msgh_body;
228 /* end of the kernel processed data */
229 } __Request__host_virtual_physical_table_info_t;
230 #ifdef __MigPackStructs
231 #pragma pack()
232 #endif
233
234 #ifdef __MigPackStructs
235 #pragma pack(4)
236 #endif
237 typedef struct {
238 mach_msg_header_t Head;
239 /* start of the kernel processed data */
240 mach_msg_body_t msgh_body;
241 /* end of the kernel processed data */
242 } __Request__processor_set_default_t;
243 #ifdef __MigPackStructs
244 #pragma pack()
245 #endif
246
247 #ifdef __MigPackStructs
248 #pragma pack(4)
249 #endif
250 typedef struct {
251 mach_msg_header_t Head;
252 /* start of the kernel processed data */
253 mach_msg_body_t msgh_body;
254 /* end of the kernel processed data */
255 } __Request__processor_set_create_t;
256 #ifdef __MigPackStructs
257 #pragma pack()
258 #endif
259
260 #ifdef __MigPackStructs
261 #pragma pack(4)
262 #endif
263 typedef struct {
264 mach_msg_header_t Head;
265 /* start of the kernel processed data */
266 mach_msg_body_t msgh_body;
267 mach_msg_port_descriptor_t pager;
268 /* end of the kernel processed data */
269 NDR_record_t NDR;
270 boolean_t internal;
271 memory_object_size_t size;
272 vm_prot_t permission;
273 } __Request__mach_memory_object_memory_entry_64_t;
274 #ifdef __MigPackStructs
275 #pragma pack()
276 #endif
277
278 #ifdef __MigPackStructs
279 #pragma pack(4)
280 #endif
281 typedef struct {
282 mach_msg_header_t Head;
283 /* start of the kernel processed data */
284 mach_msg_body_t msgh_body;
285 /* end of the kernel processed data */
286 NDR_record_t NDR;
287 host_flavor_t flavor;
288 mach_msg_type_number_t host_info_outCnt;
289 } __Request__host_statistics_t;
290 #ifdef __MigPackStructs
291 #pragma pack()
292 #endif
293
294 #ifdef __MigPackStructs
295 #pragma pack(4)
296 #endif
297 typedef struct {
298 mach_msg_header_t Head;
299 /* start of the kernel processed data */
300 mach_msg_body_t msgh_body;
301 mach_msg_port_descriptor_t notify_port;
302 /* end of the kernel processed data */
303 NDR_record_t NDR;
304 host_flavor_t notify_type;
305 } __Request__host_request_notification_t;
306 #ifdef __MigPackStructs
307 #pragma pack()
308 #endif
309
310 #ifdef __MigPackStructs
311 #pragma pack(4)
312 #endif
313 typedef struct {
314 mach_msg_header_t Head;
315 /* start of the kernel processed data */
316 mach_msg_body_t msgh_body;
317 /* end of the kernel processed data */
318 NDR_record_t NDR;
319 host_flavor_t flavor;
320 mach_msg_type_number_t host_info64_outCnt;
321 } __Request__host_statistics64_t;
322 #ifdef __MigPackStructs
323 #pragma pack()
324 #endif
325
326 #ifdef __MigPackStructs
327 #pragma pack(4)
328 #endif
329 typedef struct {
330 mach_msg_header_t Head;
331 /* start of the kernel processed data */
332 mach_msg_body_t msgh_body;
333 /* end of the kernel processed data */
334 } __Request__mach_zone_info_t;
335 #ifdef __MigPackStructs
336 #pragma pack()
337 #endif
338
339 #ifdef __MigPackStructs
340 #pragma pack(4)
341 #endif
342 typedef struct {
343 mach_msg_header_t Head;
344 /* start of the kernel processed data */
345 mach_msg_body_t msgh_body;
346 /* end of the kernel processed data */
347 NDR_record_t NDR;
348 mach_msg_type_number_t recipesCnt;
349 uint8_t recipes[5120];
350 } __Request__host_create_mach_voucher_t;
351 #ifdef __MigPackStructs
352 #pragma pack()
353 #endif
354
355 #ifdef __MigPackStructs
356 #pragma pack(4)
357 #endif
358 typedef struct {
359 mach_msg_header_t Head;
360 /* start of the kernel processed data */
361 mach_msg_body_t msgh_body;
362 mach_msg_port_descriptor_t attr_manager;
363 /* end of the kernel processed data */
364 NDR_record_t NDR;
365 mach_voucher_attr_value_handle_t default_value;
366 } __Request__host_register_mach_voucher_attr_manager_t;
367 #ifdef __MigPackStructs
368 #pragma pack()
369 #endif
370
371 #ifdef __MigPackStructs
372 #pragma pack(4)
373 #endif
374 typedef struct {
375 mach_msg_header_t Head;
376 /* start of the kernel processed data */
377 mach_msg_body_t msgh_body;
378 mach_msg_port_descriptor_t attr_manager;
379 /* end of the kernel processed data */
380 NDR_record_t NDR;
381 mach_voucher_attr_value_handle_t default_value;
382 mach_voucher_attr_key_t key;
383 } __Request__host_register_well_known_mach_voucher_attr_manager_t;
384 #ifdef __MigPackStructs
385 #pragma pack()
386 #endif
387 #endif /* !__Request__mach_host_subsystem__defined */
388
389 /* typedefs for all replies */
390
391 #ifndef __Reply__mach_host_subsystem__defined
392 #define __Reply__mach_host_subsystem__defined
393
394 #ifdef __MigPackStructs
395 #pragma pack(4)
396 #endif
397 typedef struct {
398 mach_msg_header_t Head;
399 NDR_record_t NDR;
400 kern_return_t RetCode;
401 mach_msg_type_number_t host_info_outCnt;
402 integer_t host_info_out[68];
403 } __Reply__host_info_t;
404 #ifdef __MigPackStructs
405 #pragma pack()
406 #endif
407
408 #ifdef __MigPackStructs
409 #pragma pack(4)
410 #endif
411 typedef struct {
412 mach_msg_header_t Head;
413 NDR_record_t NDR;
414 kern_return_t RetCode;
415 mach_msg_type_number_t kernel_versionOffset; /* MiG doesn't use it */
416 mach_msg_type_number_t kernel_versionCnt;
417 char kernel_version[512];
418 } __Reply__host_kernel_version_t;
419 #ifdef __MigPackStructs
420 #pragma pack()
421 #endif
422
423 #ifdef __MigPackStructs
424 #pragma pack(4)
425 #endif
426 typedef struct {
427 mach_msg_header_t Head;
428 NDR_record_t NDR;
429 kern_return_t RetCode;
430 vm_size_t out_page_size;
431 } __Reply__host_page_size_t;
432 #ifdef __MigPackStructs
433 #pragma pack()
434 #endif
435
436 #ifdef __MigPackStructs
437 #pragma pack(4)
438 #endif
439 typedef struct {
440 mach_msg_header_t Head;
441 /* start of the kernel processed data */
442 mach_msg_body_t msgh_body;
443 mach_msg_port_descriptor_t entry_handle;
444 /* end of the kernel processed data */
445 } __Reply__mach_memory_object_memory_entry_t;
446 #ifdef __MigPackStructs
447 #pragma pack()
448 #endif
449
450 #ifdef __MigPackStructs
451 #pragma pack(4)
452 #endif
453 typedef struct {
454 mach_msg_header_t Head;
455 /* start of the kernel processed data */
456 mach_msg_body_t msgh_body;
457 mach_msg_ool_descriptor_t out_processor_info;
458 /* end of the kernel processed data */
459 NDR_record_t NDR;
460 natural_t out_processor_count;
461 mach_msg_type_number_t out_processor_infoCnt;
462 } __Reply__host_processor_info_t;
463 #ifdef __MigPackStructs
464 #pragma pack()
465 #endif
466
467 #ifdef __MigPackStructs
468 #pragma pack(4)
469 #endif
470 typedef struct {
471 mach_msg_header_t Head;
472 /* start of the kernel processed data */
473 mach_msg_body_t msgh_body;
474 mach_msg_port_descriptor_t clock_serv;
475 /* end of the kernel processed data */
476 } __Reply__host_get_clock_service_t;
477 #ifdef __MigPackStructs
478 #pragma pack()
479 #endif
480
481 #ifdef __MigPackStructs
482 #pragma pack(4)
483 #endif
484 typedef struct {
485 mach_msg_header_t Head;
486 /* start of the kernel processed data */
487 mach_msg_body_t msgh_body;
488 mach_msg_ool_descriptor_t info;
489 /* end of the kernel processed data */
490 NDR_record_t NDR;
491 mach_msg_type_number_t infoCnt;
492 } __Reply__host_virtual_physical_table_info_t;
493 #ifdef __MigPackStructs
494 #pragma pack()
495 #endif
496
497 #ifdef __MigPackStructs
498 #pragma pack(4)
499 #endif
500 typedef struct {
501 mach_msg_header_t Head;
502 /* start of the kernel processed data */
503 mach_msg_body_t msgh_body;
504 mach_msg_port_descriptor_t default_set;
505 /* end of the kernel processed data */
506 } __Reply__processor_set_default_t;
507 #ifdef __MigPackStructs
508 #pragma pack()
509 #endif
510
511 #ifdef __MigPackStructs
512 #pragma pack(4)
513 #endif
514 typedef struct {
515 mach_msg_header_t Head;
516 /* start of the kernel processed data */
517 mach_msg_body_t msgh_body;
518 mach_msg_port_descriptor_t new_set;
519 mach_msg_port_descriptor_t new_name;
520 /* end of the kernel processed data */
521 } __Reply__processor_set_create_t;
522 #ifdef __MigPackStructs
523 #pragma pack()
524 #endif
525
526 #ifdef __MigPackStructs
527 #pragma pack(4)
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 entry_handle;
534 /* end of the kernel processed data */
535 } __Reply__mach_memory_object_memory_entry_64_t;
536 #ifdef __MigPackStructs
537 #pragma pack()
538 #endif
539
540 #ifdef __MigPackStructs
541 #pragma pack(4)
542 #endif
543 typedef struct {
544 mach_msg_header_t Head;
545 NDR_record_t NDR;
546 kern_return_t RetCode;
547 mach_msg_type_number_t host_info_outCnt;
548 integer_t host_info_out[68];
549 } __Reply__host_statistics_t;
550 #ifdef __MigPackStructs
551 #pragma pack()
552 #endif
553
554 #ifdef __MigPackStructs
555 #pragma pack(4)
556 #endif
557 typedef struct {
558 mach_msg_header_t Head;
559 NDR_record_t NDR;
560 kern_return_t RetCode;
561 } __Reply__host_request_notification_t;
562 #ifdef __MigPackStructs
563 #pragma pack()
564 #endif
565
566 #ifdef __MigPackStructs
567 #pragma pack(4)
568 #endif
569 typedef struct {
570 mach_msg_header_t Head;
571 NDR_record_t NDR;
572 kern_return_t RetCode;
573 mach_msg_type_number_t host_info64_outCnt;
574 integer_t host_info64_out[256];
575 } __Reply__host_statistics64_t;
576 #ifdef __MigPackStructs
577 #pragma pack()
578 #endif
579
580 #ifdef __MigPackStructs
581 #pragma pack(4)
582 #endif
583 typedef struct {
584 mach_msg_header_t Head;
585 /* start of the kernel processed data */
586 mach_msg_body_t msgh_body;
587 mach_msg_ool_descriptor_t names;
588 mach_msg_ool_descriptor_t info;
589 /* end of the kernel processed data */
590 NDR_record_t NDR;
591 mach_msg_type_number_t namesCnt;
592 mach_msg_type_number_t infoCnt;
593 } __Reply__mach_zone_info_t;
594 #ifdef __MigPackStructs
595 #pragma pack()
596 #endif
597
598 #ifdef __MigPackStructs
599 #pragma pack(4)
600 #endif
601 typedef struct {
602 mach_msg_header_t Head;
603 /* start of the kernel processed data */
604 mach_msg_body_t msgh_body;
605 mach_msg_port_descriptor_t voucher;
606 /* end of the kernel processed data */
607 } __Reply__host_create_mach_voucher_t;
608 #ifdef __MigPackStructs
609 #pragma pack()
610 #endif
611
612 #ifdef __MigPackStructs
613 #pragma pack(4)
614 #endif
615 typedef struct {
616 mach_msg_header_t Head;
617 /* start of the kernel processed data */
618 mach_msg_body_t msgh_body;
619 mach_msg_port_descriptor_t new_attr_control;
620 /* end of the kernel processed data */
621 NDR_record_t NDR;
622 mach_voucher_attr_key_t new_key;
623 } __Reply__host_register_mach_voucher_attr_manager_t;
624 #ifdef __MigPackStructs
625 #pragma pack()
626 #endif
627
628 #ifdef __MigPackStructs
629 #pragma pack(4)
630 #endif
631 typedef struct {
632 mach_msg_header_t Head;
633 /* start of the kernel processed data */
634 mach_msg_body_t msgh_body;
635 mach_msg_port_descriptor_t new_attr_control;
636 /* end of the kernel processed data */
637 } __Reply__host_register_well_known_mach_voucher_attr_manager_t;
638 #ifdef __MigPackStructs
639 #pragma pack()
640 #endif
641 #endif /* !__Reply__mach_host_subsystem__defined */
642
643
644 /* union of all replies */
645
646 #ifndef __ReplyUnion__mach_host_subsystem__defined
647 #define __ReplyUnion__mach_host_subsystem__defined
648 union __ReplyUnion__mach_host_subsystem {
649 __Reply__host_info_t Reply_host_info;
650 __Reply__host_kernel_version_t Reply_host_kernel_version;
651 __Reply__host_page_size_t Reply_host_page_size;
652 __Reply__mach_memory_object_memory_entry_t Reply_mach_memory_object_memory_entry;
653 __Reply__host_processor_info_t Reply_host_processor_info;
654 __Reply__host_get_clock_service_t Reply_host_get_clock_service;
655 __Reply__host_virtual_physical_table_info_t Reply_host_virtual_physical_table_info;
656 __Reply__processor_set_default_t Reply_processor_set_default;
657 __Reply__processor_set_create_t Reply_processor_set_create;
658 __Reply__mach_memory_object_memory_entry_64_t Reply_mach_memory_object_memory_entry_64;
659 __Reply__host_statistics_t Reply_host_statistics;
660 __Reply__host_request_notification_t Reply_host_request_notification;
661 __Reply__host_statistics64_t Reply_host_statistics64;
662 __Reply__mach_zone_info_t Reply_mach_zone_info;
663 __Reply__host_create_mach_voucher_t Reply_host_create_mach_voucher;
664 __Reply__host_register_mach_voucher_attr_manager_t Reply_host_register_mach_voucher_attr_manager;
665 __Reply__host_register_well_known_mach_voucher_attr_manager_t Reply_host_register_well_known_mach_voucher_attr_manager;
666 };
667 #endif /* __RequestUnion__mach_host_subsystem__defined */
668 /* Forward Declarations */
669
670
671 mig_internal novalue _Xhost_info
672 (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);
673
674 mig_internal novalue _Xhost_kernel_version
675 (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);
676
677 mig_internal novalue _Xhost_page_size
678 (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);
679
680 mig_internal novalue _Xmach_memory_object_memory_entry
681 (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);
682
683 mig_internal novalue _Xhost_processor_info
684 (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);
685
686 mig_internal novalue _Xhost_get_clock_service
687 (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);
688
689 mig_internal novalue _Xhost_virtual_physical_table_info
690 (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);
691
692 mig_internal novalue _Xprocessor_set_default
693 (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);
694
695 mig_internal novalue _Xprocessor_set_create
696 (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);
697
698 mig_internal novalue _Xmach_memory_object_memory_entry_64
699 (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);
700
701 mig_internal novalue _Xhost_statistics
702 (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);
703
704 mig_internal novalue _Xhost_request_notification
705 (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);
706
707 mig_internal novalue _Xhost_statistics64
708 (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);
709
710 mig_internal novalue _Xmach_zone_info
711 (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);
712
713 mig_internal novalue _Xhost_create_mach_voucher
714 (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);
715
716 mig_internal novalue _Xhost_register_mach_voucher_attr_manager
717 (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);
718
719 mig_internal novalue _Xhost_register_well_known_mach_voucher_attr_manager
720 (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);
721
722
723 #if ( __MigTypeCheck )
724 #if __MIG_check__Request__mach_host_subsystem__
725 #if !defined(__MIG_check__Request__host_info_t__defined)
726 #define __MIG_check__Request__host_info_t__defined
727
__MIG_check__Request__host_info_t(__Request__host_info_t * In0P)728 mig_internal kern_return_t __MIG_check__Request__host_info_t(__attribute__((__unused__)) __Request__host_info_t *In0P)
729 {
730
731 typedef __Request__host_info_t __Request;
732 #if __MigTypeCheck
733 if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
734 (In0P->msgh_body.msgh_descriptor_count != 0) ||
735 (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
736 return MIG_BAD_ARGUMENTS;
737 #endif /* __MigTypeCheck */
738
739 return MACH_MSG_SUCCESS;
740 }
741 #endif /* !defined(__MIG_check__Request__host_info_t__defined) */
742 #endif /* __MIG_check__Request__mach_host_subsystem__ */
743 #endif /* ( __MigTypeCheck ) */
744
745
746 /* Routine host_info */
747 #ifdef mig_external
748 mig_external
749 #else
750 extern
751 #endif /* mig_external */
host_info(host,flavor,host_info_out,host_info_outCnt)752 kern_return_t host_info
753 #if defined(LINTLIBRARY)
754 (host, flavor, host_info_out, host_info_outCnt)
755 host_t host;
756 host_flavor_t flavor;
757 host_info_t host_info_out;
758 mach_msg_type_number_t *host_info_outCnt;
759 { return host_info(host, flavor, host_info_out, host_info_outCnt); }
760 #else
761 (
762 host_t host,
763 host_flavor_t flavor,
764 host_info_t host_info_out,
765 mach_msg_type_number_t *host_info_outCnt
766 );
767 #endif /* defined(LINTLIBRARY) */
768
769 /* Routine host_info */
_Xhost_info(mach_msg_header_t * InHeadP,mach_msg_header_t * OutHeadP)770 mig_internal novalue _Xhost_info
771 (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
772 {
773
774 #ifdef __MigPackStructs
775 #pragma pack(4)
776 #endif
777 typedef struct {
778 mach_msg_header_t Head;
779 /* start of the kernel processed data */
780 mach_msg_body_t msgh_body;
781 /* end of the kernel processed data */
782 NDR_record_t NDR;
783 host_flavor_t flavor;
784 mach_msg_type_number_t host_info_outCnt;
785 mach_msg_trailer_t trailer;
786 } Request;
787 #ifdef __MigPackStructs
788 #pragma pack()
789 #endif
790 typedef __Request__host_info_t __Request;
791 typedef __Reply__host_info_t Reply;
792
793 /*
794 * typedef struct {
795 * mach_msg_header_t Head;
796 * NDR_record_t NDR;
797 * kern_return_t RetCode;
798 * } mig_reply_error_t;
799 */
800
801 Request *In0P = (Request *) InHeadP;
802 Reply *OutP = (Reply *) OutHeadP;
803 #ifdef __MIG_check__Request__host_info_t__defined
804 kern_return_t check_result;
805 #endif /* __MIG_check__Request__host_info_t__defined */
806
807 #if __MigKernelSpecificCode
808 #else
809 #endif /* __MigKernelSpecificCode */
810 __DeclareRcvRpc(200, "host_info")
811 __BeforeRcvRpc(200, "host_info")
812 /* RetCArg=0x0 rtSimpleRequest=0 */
813
814 #if defined(__MIG_check__Request__host_info_t__defined)
815 check_result = __MIG_check__Request__host_info_t((__Request *)In0P);
816 if (check_result != MACH_MSG_SUCCESS)
817 { MIG_RETURN_ERROR(OutP, check_result); }
818 #endif /* defined(__MIG_check__Request__host_info_t__defined) */
819
820 OutP->host_info_outCnt = 68;
821 if (In0P->host_info_outCnt < OutP->host_info_outCnt)
822 OutP->host_info_outCnt = In0P->host_info_outCnt;
823
824 OutP->RetCode = host_info(convert_port_to_host(In0P->Head.msgh_request_port), In0P->flavor, OutP->host_info_out, &OutP->host_info_outCnt);
825 if (OutP->RetCode != KERN_SUCCESS) {
826 MIG_RETURN_ERROR(OutP, OutP->RetCode);
827 }
828 #if __MigKernelSpecificCode
829 #endif /* __MigKernelSpecificCode */
830
831 OutP->NDR = NDR_record;
832
833 OutP->Head.msgh_size = (sizeof(Reply) - 272) + (_WALIGN_((4 * OutP->host_info_outCnt)));
834
835 __AfterRcvRpc(200, "host_info")
836 }
837
838 #if ( __MigTypeCheck )
839 #if __MIG_check__Request__mach_host_subsystem__
840 #if !defined(__MIG_check__Request__host_kernel_version_t__defined)
841 #define __MIG_check__Request__host_kernel_version_t__defined
842
__MIG_check__Request__host_kernel_version_t(__Request__host_kernel_version_t * In0P)843 mig_internal kern_return_t __MIG_check__Request__host_kernel_version_t(__attribute__((__unused__)) __Request__host_kernel_version_t *In0P)
844 {
845
846 typedef __Request__host_kernel_version_t __Request;
847 #if __MigTypeCheck
848 if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
849 (In0P->msgh_body.msgh_descriptor_count != 0) ||
850 (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
851 return MIG_BAD_ARGUMENTS;
852 #endif /* __MigTypeCheck */
853
854 return MACH_MSG_SUCCESS;
855 }
856 #endif /* !defined(__MIG_check__Request__host_kernel_version_t__defined) */
857 #endif /* __MIG_check__Request__mach_host_subsystem__ */
858 #endif /* ( __MigTypeCheck ) */
859
860
861 /* Routine host_kernel_version */
862 #ifdef mig_external
863 mig_external
864 #else
865 extern
866 #endif /* mig_external */
host_kernel_version(host,kernel_version)867 kern_return_t host_kernel_version
868 #if defined(LINTLIBRARY)
869 (host, kernel_version)
870 host_t host;
871 kernel_version_t kernel_version;
872 { return host_kernel_version(host, kernel_version); }
873 #else
874 (
875 host_t host,
876 kernel_version_t kernel_version
877 );
878 #endif /* defined(LINTLIBRARY) */
879
880 /* Routine host_kernel_version */
_Xhost_kernel_version(mach_msg_header_t * InHeadP,mach_msg_header_t * OutHeadP)881 mig_internal novalue _Xhost_kernel_version
882 (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
883 {
884
885 #ifdef __MigPackStructs
886 #pragma pack(4)
887 #endif
888 typedef struct {
889 mach_msg_header_t Head;
890 /* start of the kernel processed data */
891 mach_msg_body_t msgh_body;
892 /* end of the kernel processed data */
893 mach_msg_trailer_t trailer;
894 } Request;
895 #ifdef __MigPackStructs
896 #pragma pack()
897 #endif
898 typedef __Request__host_kernel_version_t __Request;
899 typedef __Reply__host_kernel_version_t Reply;
900
901 /*
902 * typedef struct {
903 * mach_msg_header_t Head;
904 * NDR_record_t NDR;
905 * kern_return_t RetCode;
906 * } mig_reply_error_t;
907 */
908
909 Request *In0P = (Request *) InHeadP;
910 Reply *OutP = (Reply *) OutHeadP;
911 #ifdef __MIG_check__Request__host_kernel_version_t__defined
912 kern_return_t check_result;
913 #endif /* __MIG_check__Request__host_kernel_version_t__defined */
914
915 #if __MigKernelSpecificCode
916 #else
917 #endif /* __MigKernelSpecificCode */
918 __DeclareRcvRpc(201, "host_kernel_version")
919 __BeforeRcvRpc(201, "host_kernel_version")
920 /* RetCArg=0x0 rtSimpleRequest=0 */
921
922 #if defined(__MIG_check__Request__host_kernel_version_t__defined)
923 check_result = __MIG_check__Request__host_kernel_version_t((__Request *)In0P);
924 if (check_result != MACH_MSG_SUCCESS)
925 { MIG_RETURN_ERROR(OutP, check_result); }
926 #endif /* defined(__MIG_check__Request__host_kernel_version_t__defined) */
927
928 OutP->RetCode = host_kernel_version(convert_port_to_host(In0P->Head.msgh_request_port), OutP->kernel_version);
929 if (OutP->RetCode != KERN_SUCCESS) {
930 MIG_RETURN_ERROR(OutP, OutP->RetCode);
931 }
932 #if __MigKernelSpecificCode
933 #endif /* __MigKernelSpecificCode */
934
935 OutP->NDR = NDR_record;
936
937 #ifdef __LP64__
938 {
939 size_t strLength = strlen(OutP->kernel_version) + 1;
940 if (strLength > 0xffffffff)
941 MIG_RETURN_ERROR(OutP, MIG_BAD_ARGUMENTS);
942 OutP->kernel_versionCnt = (mach_msg_type_number_t) strLength;
943 }
944 #else
945 OutP->kernel_versionCnt = (mach_msg_type_number_t) strlen(OutP->kernel_version) + 1;
946 #endif /* __LP64__ */
947 OutP->Head.msgh_size = (sizeof(Reply) - 512) + (_WALIGN_((OutP->kernel_versionCnt + 3) & ~3));
948
949 __AfterRcvRpc(201, "host_kernel_version")
950 }
951
952 #if ( __MigTypeCheck )
953 #if __MIG_check__Request__mach_host_subsystem__
954 #if !defined(__MIG_check__Request__host_page_size_t__defined)
955 #define __MIG_check__Request__host_page_size_t__defined
956
__MIG_check__Request__host_page_size_t(__Request__host_page_size_t * In0P)957 mig_internal kern_return_t __MIG_check__Request__host_page_size_t(__attribute__((__unused__)) __Request__host_page_size_t *In0P)
958 {
959
960 typedef __Request__host_page_size_t __Request;
961 #if __MigTypeCheck
962 if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
963 (In0P->msgh_body.msgh_descriptor_count != 0) ||
964 (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
965 return MIG_BAD_ARGUMENTS;
966 #endif /* __MigTypeCheck */
967
968 return MACH_MSG_SUCCESS;
969 }
970 #endif /* !defined(__MIG_check__Request__host_page_size_t__defined) */
971 #endif /* __MIG_check__Request__mach_host_subsystem__ */
972 #endif /* ( __MigTypeCheck ) */
973
974
975 /* Routine host_page_size */
976 #ifdef mig_external
977 mig_external
978 #else
979 extern
980 #endif /* mig_external */
host_page_size(host,out_page_size)981 kern_return_t host_page_size
982 #if defined(LINTLIBRARY)
983 (host, out_page_size)
984 host_t host;
985 vm_size_t *out_page_size;
986 { return host_page_size(host, out_page_size); }
987 #else
988 (
989 host_t host,
990 vm_size_t *out_page_size
991 );
992 #endif /* defined(LINTLIBRARY) */
993
994 /* Routine host_page_size */
_Xhost_page_size(mach_msg_header_t * InHeadP,mach_msg_header_t * OutHeadP)995 mig_internal novalue _Xhost_page_size
996 (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
997 {
998
999 #ifdef __MigPackStructs
1000 #pragma pack(4)
1001 #endif
1002 typedef struct {
1003 mach_msg_header_t Head;
1004 /* start of the kernel processed data */
1005 mach_msg_body_t msgh_body;
1006 /* end of the kernel processed data */
1007 mach_msg_trailer_t trailer;
1008 } Request;
1009 #ifdef __MigPackStructs
1010 #pragma pack()
1011 #endif
1012 typedef __Request__host_page_size_t __Request;
1013 typedef __Reply__host_page_size_t Reply;
1014
1015 /*
1016 * typedef struct {
1017 * mach_msg_header_t Head;
1018 * NDR_record_t NDR;
1019 * kern_return_t RetCode;
1020 * } mig_reply_error_t;
1021 */
1022
1023 Request *In0P = (Request *) InHeadP;
1024 Reply *OutP = (Reply *) OutHeadP;
1025 #ifdef __MIG_check__Request__host_page_size_t__defined
1026 kern_return_t check_result;
1027 #endif /* __MIG_check__Request__host_page_size_t__defined */
1028
1029 #if __MigKernelSpecificCode
1030 #else
1031 #endif /* __MigKernelSpecificCode */
1032 __DeclareRcvRpc(202, "host_page_size")
1033 __BeforeRcvRpc(202, "host_page_size")
1034 /* RetCArg=0x0 rtSimpleRequest=0 */
1035
1036 #if defined(__MIG_check__Request__host_page_size_t__defined)
1037 check_result = __MIG_check__Request__host_page_size_t((__Request *)In0P);
1038 if (check_result != MACH_MSG_SUCCESS)
1039 { MIG_RETURN_ERROR(OutP, check_result); }
1040 #endif /* defined(__MIG_check__Request__host_page_size_t__defined) */
1041
1042 OutP->RetCode = host_page_size(convert_port_to_host(In0P->Head.msgh_request_port), &OutP->out_page_size);
1043 if (OutP->RetCode != KERN_SUCCESS) {
1044 MIG_RETURN_ERROR(OutP, OutP->RetCode);
1045 }
1046 #if __MigKernelSpecificCode
1047 #endif /* __MigKernelSpecificCode */
1048
1049 OutP->NDR = NDR_record;
1050
1051
1052 OutP->Head.msgh_size = (sizeof(Reply));
1053 __AfterRcvRpc(202, "host_page_size")
1054 }
1055
1056 #if ( __MigTypeCheck )
1057 #if __MIG_check__Request__mach_host_subsystem__
1058 #if !defined(__MIG_check__Request__mach_memory_object_memory_entry_t__defined)
1059 #define __MIG_check__Request__mach_memory_object_memory_entry_t__defined
1060
__MIG_check__Request__mach_memory_object_memory_entry_t(__Request__mach_memory_object_memory_entry_t * In0P)1061 mig_internal kern_return_t __MIG_check__Request__mach_memory_object_memory_entry_t(__attribute__((__unused__)) __Request__mach_memory_object_memory_entry_t *In0P)
1062 {
1063
1064 typedef __Request__mach_memory_object_memory_entry_t __Request;
1065 #if __MigTypeCheck
1066 if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
1067 (In0P->msgh_body.msgh_descriptor_count != 1) ||
1068 (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
1069 return MIG_BAD_ARGUMENTS;
1070 #endif /* __MigTypeCheck */
1071
1072 #if __MigTypeCheck
1073 if (In0P->pager.type != MACH_MSG_PORT_DESCRIPTOR ||
1074 In0P->pager.disposition != 17)
1075 return MIG_TYPE_ERROR;
1076 #endif /* __MigTypeCheck */
1077
1078 return MACH_MSG_SUCCESS;
1079 }
1080 #endif /* !defined(__MIG_check__Request__mach_memory_object_memory_entry_t__defined) */
1081 #endif /* __MIG_check__Request__mach_host_subsystem__ */
1082 #endif /* ( __MigTypeCheck ) */
1083
1084
1085 /* Routine mach_memory_object_memory_entry */
1086 #ifdef mig_external
1087 mig_external
1088 #else
1089 extern
1090 #endif /* mig_external */
mach_memory_object_memory_entry(host,internal,size,permission,pager,entry_handle)1091 kern_return_t mach_memory_object_memory_entry
1092 #if defined(LINTLIBRARY)
1093 (host, internal, size, permission, pager, entry_handle)
1094 host_t host;
1095 boolean_t internal;
1096 vm_size_t size;
1097 vm_prot_t permission;
1098 memory_object_t pager;
1099 mach_port_t *entry_handle;
1100 { return mach_memory_object_memory_entry(host, internal, size, permission, pager, entry_handle); }
1101 #else
1102 (
1103 host_t host,
1104 boolean_t internal,
1105 vm_size_t size,
1106 vm_prot_t permission,
1107 memory_object_t pager,
1108 mach_port_t *entry_handle
1109 );
1110 #endif /* defined(LINTLIBRARY) */
1111
1112 /* Routine mach_memory_object_memory_entry */
_Xmach_memory_object_memory_entry(mach_msg_header_t * InHeadP,mach_msg_header_t * OutHeadP)1113 mig_internal novalue _Xmach_memory_object_memory_entry
1114 (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
1115 {
1116
1117 #ifdef __MigPackStructs
1118 #pragma pack(4)
1119 #endif
1120 typedef struct {
1121 mach_msg_header_t Head;
1122 /* start of the kernel processed data */
1123 mach_msg_body_t msgh_body;
1124 mach_msg_port_descriptor_t pager;
1125 /* end of the kernel processed data */
1126 NDR_record_t NDR;
1127 boolean_t internal;
1128 vm_size_t size;
1129 vm_prot_t permission;
1130 mach_msg_trailer_t trailer;
1131 } Request;
1132 #ifdef __MigPackStructs
1133 #pragma pack()
1134 #endif
1135 typedef __Request__mach_memory_object_memory_entry_t __Request;
1136 typedef __Reply__mach_memory_object_memory_entry_t Reply;
1137
1138 /*
1139 * typedef struct {
1140 * mach_msg_header_t Head;
1141 * NDR_record_t NDR;
1142 * kern_return_t RetCode;
1143 * } mig_reply_error_t;
1144 */
1145
1146 Request *In0P = (Request *) InHeadP;
1147 Reply *OutP = (Reply *) OutHeadP;
1148 #ifdef __MIG_check__Request__mach_memory_object_memory_entry_t__defined
1149 kern_return_t check_result;
1150 #endif /* __MIG_check__Request__mach_memory_object_memory_entry_t__defined */
1151
1152 #if __MigKernelSpecificCode
1153 #if UseStaticTemplates
1154 const static mach_msg_port_descriptor_t entry_handleTemplate = {
1155 .name = MACH_PORT_NULL,
1156 .disposition = 17,
1157 .type = MACH_MSG_PORT_DESCRIPTOR,
1158 };
1159 #endif /* UseStaticTemplates */
1160
1161 #else
1162 #if UseStaticTemplates
1163 const static mach_msg_port_descriptor_t entry_handleTemplate = {
1164 .name = MACH_PORT_NULL,
1165 .disposition = 17,
1166 .type = MACH_MSG_PORT_DESCRIPTOR,
1167 };
1168 #endif /* UseStaticTemplates */
1169
1170 #endif /* __MigKernelSpecificCode */
1171 kern_return_t RetCode;
1172 __DeclareRcvRpc(203, "mach_memory_object_memory_entry")
1173 __BeforeRcvRpc(203, "mach_memory_object_memory_entry")
1174 /* RetCArg=0x0 rtSimpleRequest=0 */
1175
1176 #if defined(__MIG_check__Request__mach_memory_object_memory_entry_t__defined)
1177 check_result = __MIG_check__Request__mach_memory_object_memory_entry_t((__Request *)In0P);
1178 if (check_result != MACH_MSG_SUCCESS)
1179 { MIG_RETURN_ERROR(OutP, check_result); }
1180 #endif /* defined(__MIG_check__Request__mach_memory_object_memory_entry_t__defined) */
1181
1182 #if UseStaticTemplates
1183 OutP->entry_handle = entry_handleTemplate;
1184 #else /* UseStaticTemplates */
1185 #if __MigKernelSpecificCode
1186 OutP->entry_handle.disposition = 17;
1187 #else
1188 OutP->entry_handle.disposition = 17;
1189 #endif /* __MigKernelSpecificCode */
1190 OutP->entry_handle.type = MACH_MSG_PORT_DESCRIPTOR;
1191 #endif /* UseStaticTemplates */
1192
1193
1194 RetCode = mach_memory_object_memory_entry(convert_port_to_host(In0P->Head.msgh_request_port), In0P->internal, In0P->size, In0P->permission, In0P->pager.name, &OutP->entry_handle.name);
1195 if (RetCode != KERN_SUCCESS) {
1196 MIG_RETURN_ERROR(OutP, RetCode);
1197 }
1198 #if __MigKernelSpecificCode
1199 #endif /* __MigKernelSpecificCode */
1200
1201 OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
1202 OutP->Head.msgh_size = (sizeof(Reply));
1203 OutP->msgh_body.msgh_descriptor_count = 1;
1204 __AfterRcvRpc(203, "mach_memory_object_memory_entry")
1205 }
1206
1207 #if ( __MigTypeCheck )
1208 #if __MIG_check__Request__mach_host_subsystem__
1209 #if !defined(__MIG_check__Request__host_processor_info_t__defined)
1210 #define __MIG_check__Request__host_processor_info_t__defined
1211
__MIG_check__Request__host_processor_info_t(__Request__host_processor_info_t * In0P)1212 mig_internal kern_return_t __MIG_check__Request__host_processor_info_t(__attribute__((__unused__)) __Request__host_processor_info_t *In0P)
1213 {
1214
1215 typedef __Request__host_processor_info_t __Request;
1216 #if __MigTypeCheck
1217 if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
1218 (In0P->msgh_body.msgh_descriptor_count != 0) ||
1219 (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
1220 return MIG_BAD_ARGUMENTS;
1221 #endif /* __MigTypeCheck */
1222
1223 return MACH_MSG_SUCCESS;
1224 }
1225 #endif /* !defined(__MIG_check__Request__host_processor_info_t__defined) */
1226 #endif /* __MIG_check__Request__mach_host_subsystem__ */
1227 #endif /* ( __MigTypeCheck ) */
1228
1229
1230 /* Routine host_processor_info */
1231 #ifdef mig_external
1232 mig_external
1233 #else
1234 extern
1235 #endif /* mig_external */
host_processor_info(host,flavor,out_processor_count,out_processor_info,out_processor_infoCnt)1236 kern_return_t host_processor_info
1237 #if defined(LINTLIBRARY)
1238 (host, flavor, out_processor_count, out_processor_info, out_processor_infoCnt)
1239 host_t host;
1240 processor_flavor_t flavor;
1241 natural_t *out_processor_count;
1242 processor_info_array_t *out_processor_info;
1243 mach_msg_type_number_t *out_processor_infoCnt;
1244 { return host_processor_info(host, flavor, out_processor_count, out_processor_info, out_processor_infoCnt); }
1245 #else
1246 (
1247 host_t host,
1248 processor_flavor_t flavor,
1249 natural_t *out_processor_count,
1250 processor_info_array_t *out_processor_info,
1251 mach_msg_type_number_t *out_processor_infoCnt
1252 );
1253 #endif /* defined(LINTLIBRARY) */
1254
1255 /* Routine host_processor_info */
_Xhost_processor_info(mach_msg_header_t * InHeadP,mach_msg_header_t * OutHeadP)1256 mig_internal novalue _Xhost_processor_info
1257 (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
1258 {
1259
1260 #ifdef __MigPackStructs
1261 #pragma pack(4)
1262 #endif
1263 typedef struct {
1264 mach_msg_header_t Head;
1265 /* start of the kernel processed data */
1266 mach_msg_body_t msgh_body;
1267 /* end of the kernel processed data */
1268 NDR_record_t NDR;
1269 processor_flavor_t flavor;
1270 mach_msg_trailer_t trailer;
1271 } Request;
1272 #ifdef __MigPackStructs
1273 #pragma pack()
1274 #endif
1275 typedef __Request__host_processor_info_t __Request;
1276 typedef __Reply__host_processor_info_t Reply;
1277
1278 /*
1279 * typedef struct {
1280 * mach_msg_header_t Head;
1281 * NDR_record_t NDR;
1282 * kern_return_t RetCode;
1283 * } mig_reply_error_t;
1284 */
1285
1286 Request *In0P = (Request *) InHeadP;
1287 Reply *OutP = (Reply *) OutHeadP;
1288 #ifdef __MIG_check__Request__host_processor_info_t__defined
1289 kern_return_t check_result;
1290 #endif /* __MIG_check__Request__host_processor_info_t__defined */
1291
1292 #if __MigKernelSpecificCode
1293 #if UseStaticTemplates
1294 const static mach_msg_ool_descriptor_t out_processor_infoTemplate = {
1295 .address = (void *)0,
1296 .size = 0,
1297 .deallocate = FALSE,
1298 .copy = MACH_MSG_VIRTUAL_COPY,
1299 .type = MACH_MSG_OOL_DESCRIPTOR,
1300 };
1301 #endif /* UseStaticTemplates */
1302
1303 #else
1304 #if UseStaticTemplates
1305 const static mach_msg_ool_descriptor_t out_processor_infoTemplate = {
1306 .address = (void *)0,
1307 .size = 0,
1308 .deallocate = FALSE,
1309 .copy = MACH_MSG_VIRTUAL_COPY,
1310 .type = MACH_MSG_OOL_DESCRIPTOR,
1311 };
1312 #endif /* UseStaticTemplates */
1313
1314 #endif /* __MigKernelSpecificCode */
1315 kern_return_t RetCode;
1316 __DeclareRcvRpc(204, "host_processor_info")
1317 __BeforeRcvRpc(204, "host_processor_info")
1318 /* RetCArg=0x0 rtSimpleRequest=0 */
1319
1320 #if defined(__MIG_check__Request__host_processor_info_t__defined)
1321 check_result = __MIG_check__Request__host_processor_info_t((__Request *)In0P);
1322 if (check_result != MACH_MSG_SUCCESS)
1323 { MIG_RETURN_ERROR(OutP, check_result); }
1324 #endif /* defined(__MIG_check__Request__host_processor_info_t__defined) */
1325
1326 #if UseStaticTemplates
1327 OutP->out_processor_info = out_processor_infoTemplate;
1328 #else /* UseStaticTemplates */
1329 OutP->out_processor_info.deallocate = FALSE;
1330 OutP->out_processor_info.copy = MACH_MSG_VIRTUAL_COPY;
1331 OutP->out_processor_info.type = MACH_MSG_OOL_DESCRIPTOR;
1332 #endif /* UseStaticTemplates */
1333
1334
1335 RetCode = host_processor_info(convert_port_to_host(In0P->Head.msgh_request_port), In0P->flavor, &OutP->out_processor_count, (processor_info_array_t *)&(OutP->out_processor_info.address), &OutP->out_processor_infoCnt);
1336 if (RetCode != KERN_SUCCESS) {
1337 MIG_RETURN_ERROR(OutP, RetCode);
1338 }
1339 #if __MigKernelSpecificCode
1340 #endif /* __MigKernelSpecificCode */
1341 OutP->out_processor_info.size = OutP->out_processor_infoCnt * 4;
1342
1343
1344 OutP->NDR = NDR_record;
1345
1346
1347 OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
1348 OutP->Head.msgh_size = (sizeof(Reply));
1349 OutP->msgh_body.msgh_descriptor_count = 1;
1350 __AfterRcvRpc(204, "host_processor_info")
1351 }
1352
1353 #if ( __MigTypeCheck )
1354 #if __MIG_check__Request__mach_host_subsystem__
1355 #if !defined(__MIG_check__Request__host_get_clock_service_t__defined)
1356 #define __MIG_check__Request__host_get_clock_service_t__defined
1357
__MIG_check__Request__host_get_clock_service_t(__Request__host_get_clock_service_t * In0P)1358 mig_internal kern_return_t __MIG_check__Request__host_get_clock_service_t(__attribute__((__unused__)) __Request__host_get_clock_service_t *In0P)
1359 {
1360
1361 typedef __Request__host_get_clock_service_t __Request;
1362 #if __MigTypeCheck
1363 if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
1364 (In0P->msgh_body.msgh_descriptor_count != 0) ||
1365 (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
1366 return MIG_BAD_ARGUMENTS;
1367 #endif /* __MigTypeCheck */
1368
1369 return MACH_MSG_SUCCESS;
1370 }
1371 #endif /* !defined(__MIG_check__Request__host_get_clock_service_t__defined) */
1372 #endif /* __MIG_check__Request__mach_host_subsystem__ */
1373 #endif /* ( __MigTypeCheck ) */
1374
1375
1376 /* Routine host_get_clock_service */
1377 #ifdef mig_external
1378 mig_external
1379 #else
1380 extern
1381 #endif /* mig_external */
host_get_clock_service(host,clock_id,clock_serv)1382 kern_return_t host_get_clock_service
1383 #if defined(LINTLIBRARY)
1384 (host, clock_id, clock_serv)
1385 host_t host;
1386 clock_id_t clock_id;
1387 clock_serv_t *clock_serv;
1388 { return host_get_clock_service(host, clock_id, clock_serv); }
1389 #else
1390 (
1391 host_t host,
1392 clock_id_t clock_id,
1393 clock_serv_t *clock_serv
1394 );
1395 #endif /* defined(LINTLIBRARY) */
1396
1397 /* Routine host_get_clock_service */
_Xhost_get_clock_service(mach_msg_header_t * InHeadP,mach_msg_header_t * OutHeadP)1398 mig_internal novalue _Xhost_get_clock_service
1399 (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
1400 {
1401
1402 #ifdef __MigPackStructs
1403 #pragma pack(4)
1404 #endif
1405 typedef struct {
1406 mach_msg_header_t Head;
1407 /* start of the kernel processed data */
1408 mach_msg_body_t msgh_body;
1409 /* end of the kernel processed data */
1410 NDR_record_t NDR;
1411 clock_id_t clock_id;
1412 mach_msg_trailer_t trailer;
1413 } Request;
1414 #ifdef __MigPackStructs
1415 #pragma pack()
1416 #endif
1417 typedef __Request__host_get_clock_service_t __Request;
1418 typedef __Reply__host_get_clock_service_t Reply;
1419
1420 /*
1421 * typedef struct {
1422 * mach_msg_header_t Head;
1423 * NDR_record_t NDR;
1424 * kern_return_t RetCode;
1425 * } mig_reply_error_t;
1426 */
1427
1428 Request *In0P = (Request *) InHeadP;
1429 Reply *OutP = (Reply *) OutHeadP;
1430 #ifdef __MIG_check__Request__host_get_clock_service_t__defined
1431 kern_return_t check_result;
1432 #endif /* __MIG_check__Request__host_get_clock_service_t__defined */
1433
1434 #if __MigKernelSpecificCode
1435 #if UseStaticTemplates
1436 const static mach_msg_port_descriptor_t clock_servTemplate = {
1437 .name = MACH_PORT_NULL,
1438 .disposition = 17,
1439 .type = MACH_MSG_PORT_DESCRIPTOR,
1440 };
1441 #endif /* UseStaticTemplates */
1442
1443 #else
1444 #if UseStaticTemplates
1445 const static mach_msg_port_descriptor_t clock_servTemplate = {
1446 .name = MACH_PORT_NULL,
1447 .disposition = 19,
1448 .type = MACH_MSG_PORT_DESCRIPTOR,
1449 };
1450 #endif /* UseStaticTemplates */
1451
1452 #endif /* __MigKernelSpecificCode */
1453 kern_return_t RetCode;
1454 clock_serv_t clock_serv;
1455
1456 __DeclareRcvRpc(206, "host_get_clock_service")
1457 __BeforeRcvRpc(206, "host_get_clock_service")
1458 /* RetCArg=0x0 rtSimpleRequest=0 */
1459
1460 #if defined(__MIG_check__Request__host_get_clock_service_t__defined)
1461 check_result = __MIG_check__Request__host_get_clock_service_t((__Request *)In0P);
1462 if (check_result != MACH_MSG_SUCCESS)
1463 { MIG_RETURN_ERROR(OutP, check_result); }
1464 #endif /* defined(__MIG_check__Request__host_get_clock_service_t__defined) */
1465
1466 #if UseStaticTemplates
1467 OutP->clock_serv = clock_servTemplate;
1468 #else /* UseStaticTemplates */
1469 #if __MigKernelSpecificCode
1470 OutP->clock_serv.disposition = 17;
1471 #else
1472 OutP->clock_serv.disposition = 19;
1473 #endif /* __MigKernelSpecificCode */
1474 OutP->clock_serv.type = MACH_MSG_PORT_DESCRIPTOR;
1475 #endif /* UseStaticTemplates */
1476
1477
1478 RetCode = host_get_clock_service(convert_port_to_host(In0P->Head.msgh_request_port), In0P->clock_id, &clock_serv);
1479 if (RetCode != KERN_SUCCESS) {
1480 MIG_RETURN_ERROR(OutP, RetCode);
1481 }
1482 #if __MigKernelSpecificCode
1483 #endif /* __MigKernelSpecificCode */
1484 OutP->clock_serv.name = (mach_port_t)convert_clock_to_port(clock_serv);
1485
1486
1487 OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
1488 OutP->Head.msgh_size = (sizeof(Reply));
1489 OutP->msgh_body.msgh_descriptor_count = 1;
1490 __AfterRcvRpc(206, "host_get_clock_service")
1491 }
1492
1493 #if ( __MigTypeCheck )
1494 #if __MIG_check__Request__mach_host_subsystem__
1495 #if !defined(__MIG_check__Request__host_virtual_physical_table_info_t__defined)
1496 #define __MIG_check__Request__host_virtual_physical_table_info_t__defined
1497
__MIG_check__Request__host_virtual_physical_table_info_t(__Request__host_virtual_physical_table_info_t * In0P)1498 mig_internal kern_return_t __MIG_check__Request__host_virtual_physical_table_info_t(__attribute__((__unused__)) __Request__host_virtual_physical_table_info_t *In0P)
1499 {
1500
1501 typedef __Request__host_virtual_physical_table_info_t __Request;
1502 #if __MigTypeCheck
1503 if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
1504 (In0P->msgh_body.msgh_descriptor_count != 0) ||
1505 (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
1506 return MIG_BAD_ARGUMENTS;
1507 #endif /* __MigTypeCheck */
1508
1509 return MACH_MSG_SUCCESS;
1510 }
1511 #endif /* !defined(__MIG_check__Request__host_virtual_physical_table_info_t__defined) */
1512 #endif /* __MIG_check__Request__mach_host_subsystem__ */
1513 #endif /* ( __MigTypeCheck ) */
1514
1515
1516 /* Routine host_virtual_physical_table_info */
1517 #ifdef mig_external
1518 mig_external
1519 #else
1520 extern
1521 #endif /* mig_external */
host_virtual_physical_table_info(host,info,infoCnt)1522 kern_return_t host_virtual_physical_table_info
1523 #if defined(LINTLIBRARY)
1524 (host, info, infoCnt)
1525 host_t host;
1526 hash_info_bucket_array_t *info;
1527 mach_msg_type_number_t *infoCnt;
1528 { return host_virtual_physical_table_info(host, info, infoCnt); }
1529 #else
1530 (
1531 host_t host,
1532 hash_info_bucket_array_t *info,
1533 mach_msg_type_number_t *infoCnt
1534 );
1535 #endif /* defined(LINTLIBRARY) */
1536
1537 /* Routine host_virtual_physical_table_info */
_Xhost_virtual_physical_table_info(mach_msg_header_t * InHeadP,mach_msg_header_t * OutHeadP)1538 mig_internal novalue _Xhost_virtual_physical_table_info
1539 (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
1540 {
1541
1542 #ifdef __MigPackStructs
1543 #pragma pack(4)
1544 #endif
1545 typedef struct {
1546 mach_msg_header_t Head;
1547 /* start of the kernel processed data */
1548 mach_msg_body_t msgh_body;
1549 /* end of the kernel processed data */
1550 mach_msg_trailer_t trailer;
1551 } Request;
1552 #ifdef __MigPackStructs
1553 #pragma pack()
1554 #endif
1555 typedef __Request__host_virtual_physical_table_info_t __Request;
1556 typedef __Reply__host_virtual_physical_table_info_t Reply;
1557
1558 /*
1559 * typedef struct {
1560 * mach_msg_header_t Head;
1561 * NDR_record_t NDR;
1562 * kern_return_t RetCode;
1563 * } mig_reply_error_t;
1564 */
1565
1566 Request *In0P = (Request *) InHeadP;
1567 Reply *OutP = (Reply *) OutHeadP;
1568 #ifdef __MIG_check__Request__host_virtual_physical_table_info_t__defined
1569 kern_return_t check_result;
1570 #endif /* __MIG_check__Request__host_virtual_physical_table_info_t__defined */
1571
1572 #if __MigKernelSpecificCode
1573 #if UseStaticTemplates
1574 const static mach_msg_ool_descriptor_t infoTemplate = {
1575 .address = (void *)0,
1576 .size = 0,
1577 .deallocate = TRUE,
1578 .copy = MACH_MSG_VIRTUAL_COPY,
1579 .type = MACH_MSG_OOL_DESCRIPTOR,
1580 };
1581 #endif /* UseStaticTemplates */
1582
1583 #else
1584 #if UseStaticTemplates
1585 const static mach_msg_ool_descriptor_t infoTemplate = {
1586 .address = (void *)0,
1587 .size = 0,
1588 .deallocate = TRUE,
1589 .copy = MACH_MSG_VIRTUAL_COPY,
1590 .type = MACH_MSG_OOL_DESCRIPTOR,
1591 };
1592 #endif /* UseStaticTemplates */
1593
1594 #endif /* __MigKernelSpecificCode */
1595 kern_return_t RetCode;
1596 __DeclareRcvRpc(209, "host_virtual_physical_table_info")
1597 __BeforeRcvRpc(209, "host_virtual_physical_table_info")
1598 /* RetCArg=0x0 rtSimpleRequest=0 */
1599
1600 #if defined(__MIG_check__Request__host_virtual_physical_table_info_t__defined)
1601 check_result = __MIG_check__Request__host_virtual_physical_table_info_t((__Request *)In0P);
1602 if (check_result != MACH_MSG_SUCCESS)
1603 { MIG_RETURN_ERROR(OutP, check_result); }
1604 #endif /* defined(__MIG_check__Request__host_virtual_physical_table_info_t__defined) */
1605
1606 #if UseStaticTemplates
1607 OutP->info = infoTemplate;
1608 #else /* UseStaticTemplates */
1609 OutP->info.deallocate = TRUE;
1610 OutP->info.copy = MACH_MSG_VIRTUAL_COPY;
1611 OutP->info.type = MACH_MSG_OOL_DESCRIPTOR;
1612 #endif /* UseStaticTemplates */
1613
1614
1615 OutP->infoCnt = 0;
1616
1617 RetCode = host_virtual_physical_table_info(convert_port_to_host(In0P->Head.msgh_request_port), (hash_info_bucket_array_t *)&(OutP->info.address), &OutP->infoCnt);
1618 if (RetCode != KERN_SUCCESS) {
1619 MIG_RETURN_ERROR(OutP, RetCode);
1620 }
1621 #if __MigKernelSpecificCode
1622 #endif /* __MigKernelSpecificCode */
1623 OutP->info.size = OutP->infoCnt * 4;
1624
1625
1626 OutP->NDR = NDR_record;
1627
1628
1629 OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
1630 OutP->Head.msgh_size = (sizeof(Reply));
1631 OutP->msgh_body.msgh_descriptor_count = 1;
1632 __AfterRcvRpc(209, "host_virtual_physical_table_info")
1633 }
1634
1635 #if ( __MigTypeCheck )
1636 #if __MIG_check__Request__mach_host_subsystem__
1637 #if !defined(__MIG_check__Request__processor_set_default_t__defined)
1638 #define __MIG_check__Request__processor_set_default_t__defined
1639
__MIG_check__Request__processor_set_default_t(__Request__processor_set_default_t * In0P)1640 mig_internal kern_return_t __MIG_check__Request__processor_set_default_t(__attribute__((__unused__)) __Request__processor_set_default_t *In0P)
1641 {
1642
1643 typedef __Request__processor_set_default_t __Request;
1644 #if __MigTypeCheck
1645 if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
1646 (In0P->msgh_body.msgh_descriptor_count != 0) ||
1647 (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
1648 return MIG_BAD_ARGUMENTS;
1649 #endif /* __MigTypeCheck */
1650
1651 return MACH_MSG_SUCCESS;
1652 }
1653 #endif /* !defined(__MIG_check__Request__processor_set_default_t__defined) */
1654 #endif /* __MIG_check__Request__mach_host_subsystem__ */
1655 #endif /* ( __MigTypeCheck ) */
1656
1657
1658 /* Routine processor_set_default */
1659 #ifdef mig_external
1660 mig_external
1661 #else
1662 extern
1663 #endif /* mig_external */
processor_set_default(host,default_set)1664 kern_return_t processor_set_default
1665 #if defined(LINTLIBRARY)
1666 (host, default_set)
1667 host_t host;
1668 processor_set_name_t *default_set;
1669 { return processor_set_default(host, default_set); }
1670 #else
1671 (
1672 host_t host,
1673 processor_set_name_t *default_set
1674 );
1675 #endif /* defined(LINTLIBRARY) */
1676
1677 /* Routine processor_set_default */
_Xprocessor_set_default(mach_msg_header_t * InHeadP,mach_msg_header_t * OutHeadP)1678 mig_internal novalue _Xprocessor_set_default
1679 (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
1680 {
1681
1682 #ifdef __MigPackStructs
1683 #pragma pack(4)
1684 #endif
1685 typedef struct {
1686 mach_msg_header_t Head;
1687 /* start of the kernel processed data */
1688 mach_msg_body_t msgh_body;
1689 /* end of the kernel processed data */
1690 mach_msg_trailer_t trailer;
1691 } Request;
1692 #ifdef __MigPackStructs
1693 #pragma pack()
1694 #endif
1695 typedef __Request__processor_set_default_t __Request;
1696 typedef __Reply__processor_set_default_t Reply;
1697
1698 /*
1699 * typedef struct {
1700 * mach_msg_header_t Head;
1701 * NDR_record_t NDR;
1702 * kern_return_t RetCode;
1703 * } mig_reply_error_t;
1704 */
1705
1706 Request *In0P = (Request *) InHeadP;
1707 Reply *OutP = (Reply *) OutHeadP;
1708 #ifdef __MIG_check__Request__processor_set_default_t__defined
1709 kern_return_t check_result;
1710 #endif /* __MIG_check__Request__processor_set_default_t__defined */
1711
1712 #if __MigKernelSpecificCode
1713 #if UseStaticTemplates
1714 const static mach_msg_port_descriptor_t default_setTemplate = {
1715 .name = MACH_PORT_NULL,
1716 .disposition = 17,
1717 .type = MACH_MSG_PORT_DESCRIPTOR,
1718 };
1719 #endif /* UseStaticTemplates */
1720
1721 #else
1722 #if UseStaticTemplates
1723 const static mach_msg_port_descriptor_t default_setTemplate = {
1724 .name = MACH_PORT_NULL,
1725 .disposition = 19,
1726 .type = MACH_MSG_PORT_DESCRIPTOR,
1727 };
1728 #endif /* UseStaticTemplates */
1729
1730 #endif /* __MigKernelSpecificCode */
1731 kern_return_t RetCode;
1732 processor_set_name_t default_set;
1733
1734 __DeclareRcvRpc(213, "processor_set_default")
1735 __BeforeRcvRpc(213, "processor_set_default")
1736 /* RetCArg=0x0 rtSimpleRequest=0 */
1737
1738 #if defined(__MIG_check__Request__processor_set_default_t__defined)
1739 check_result = __MIG_check__Request__processor_set_default_t((__Request *)In0P);
1740 if (check_result != MACH_MSG_SUCCESS)
1741 { MIG_RETURN_ERROR(OutP, check_result); }
1742 #endif /* defined(__MIG_check__Request__processor_set_default_t__defined) */
1743
1744 #if UseStaticTemplates
1745 OutP->default_set = default_setTemplate;
1746 #else /* UseStaticTemplates */
1747 #if __MigKernelSpecificCode
1748 OutP->default_set.disposition = 17;
1749 #else
1750 OutP->default_set.disposition = 19;
1751 #endif /* __MigKernelSpecificCode */
1752 OutP->default_set.type = MACH_MSG_PORT_DESCRIPTOR;
1753 #endif /* UseStaticTemplates */
1754
1755
1756 RetCode = processor_set_default(convert_port_to_host(In0P->Head.msgh_request_port), &default_set);
1757 if (RetCode != KERN_SUCCESS) {
1758 MIG_RETURN_ERROR(OutP, RetCode);
1759 }
1760 #if __MigKernelSpecificCode
1761 #endif /* __MigKernelSpecificCode */
1762 OutP->default_set.name = (mach_port_t)convert_pset_name_to_port(default_set);
1763
1764
1765 OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
1766 OutP->Head.msgh_size = (sizeof(Reply));
1767 OutP->msgh_body.msgh_descriptor_count = 1;
1768 __AfterRcvRpc(213, "processor_set_default")
1769 }
1770
1771 #if ( __MigTypeCheck )
1772 #if __MIG_check__Request__mach_host_subsystem__
1773 #if !defined(__MIG_check__Request__processor_set_create_t__defined)
1774 #define __MIG_check__Request__processor_set_create_t__defined
1775
__MIG_check__Request__processor_set_create_t(__Request__processor_set_create_t * In0P)1776 mig_internal kern_return_t __MIG_check__Request__processor_set_create_t(__attribute__((__unused__)) __Request__processor_set_create_t *In0P)
1777 {
1778
1779 typedef __Request__processor_set_create_t __Request;
1780 #if __MigTypeCheck
1781 if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
1782 (In0P->msgh_body.msgh_descriptor_count != 0) ||
1783 (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
1784 return MIG_BAD_ARGUMENTS;
1785 #endif /* __MigTypeCheck */
1786
1787 return MACH_MSG_SUCCESS;
1788 }
1789 #endif /* !defined(__MIG_check__Request__processor_set_create_t__defined) */
1790 #endif /* __MIG_check__Request__mach_host_subsystem__ */
1791 #endif /* ( __MigTypeCheck ) */
1792
1793
1794 /* Routine processor_set_create */
1795 #ifdef mig_external
1796 mig_external
1797 #else
1798 extern
1799 #endif /* mig_external */
processor_set_create(host,new_set,new_name)1800 kern_return_t processor_set_create
1801 #if defined(LINTLIBRARY)
1802 (host, new_set, new_name)
1803 host_t host;
1804 processor_set_t *new_set;
1805 processor_set_name_t *new_name;
1806 { return processor_set_create(host, new_set, new_name); }
1807 #else
1808 (
1809 host_t host,
1810 processor_set_t *new_set,
1811 processor_set_name_t *new_name
1812 );
1813 #endif /* defined(LINTLIBRARY) */
1814
1815 /* Routine processor_set_create */
_Xprocessor_set_create(mach_msg_header_t * InHeadP,mach_msg_header_t * OutHeadP)1816 mig_internal novalue _Xprocessor_set_create
1817 (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
1818 {
1819
1820 #ifdef __MigPackStructs
1821 #pragma pack(4)
1822 #endif
1823 typedef struct {
1824 mach_msg_header_t Head;
1825 /* start of the kernel processed data */
1826 mach_msg_body_t msgh_body;
1827 /* end of the kernel processed data */
1828 mach_msg_trailer_t trailer;
1829 } Request;
1830 #ifdef __MigPackStructs
1831 #pragma pack()
1832 #endif
1833 typedef __Request__processor_set_create_t __Request;
1834 typedef __Reply__processor_set_create_t Reply;
1835
1836 /*
1837 * typedef struct {
1838 * mach_msg_header_t Head;
1839 * NDR_record_t NDR;
1840 * kern_return_t RetCode;
1841 * } mig_reply_error_t;
1842 */
1843
1844 Request *In0P = (Request *) InHeadP;
1845 Reply *OutP = (Reply *) OutHeadP;
1846 #ifdef __MIG_check__Request__processor_set_create_t__defined
1847 kern_return_t check_result;
1848 #endif /* __MIG_check__Request__processor_set_create_t__defined */
1849
1850 #if __MigKernelSpecificCode
1851 #if UseStaticTemplates
1852 const static mach_msg_port_descriptor_t new_setTemplate = {
1853 .name = MACH_PORT_NULL,
1854 .disposition = 17,
1855 .type = MACH_MSG_PORT_DESCRIPTOR,
1856 };
1857 #endif /* UseStaticTemplates */
1858
1859 #if UseStaticTemplates
1860 const static mach_msg_port_descriptor_t new_nameTemplate = {
1861 .name = MACH_PORT_NULL,
1862 .disposition = 17,
1863 .type = MACH_MSG_PORT_DESCRIPTOR,
1864 };
1865 #endif /* UseStaticTemplates */
1866
1867 #else
1868 #if UseStaticTemplates
1869 const static mach_msg_port_descriptor_t new_setTemplate = {
1870 .name = MACH_PORT_NULL,
1871 .disposition = 19,
1872 .type = MACH_MSG_PORT_DESCRIPTOR,
1873 };
1874 #endif /* UseStaticTemplates */
1875
1876 #if UseStaticTemplates
1877 const static mach_msg_port_descriptor_t new_nameTemplate = {
1878 .name = MACH_PORT_NULL,
1879 .disposition = 19,
1880 .type = MACH_MSG_PORT_DESCRIPTOR,
1881 };
1882 #endif /* UseStaticTemplates */
1883
1884 #endif /* __MigKernelSpecificCode */
1885 kern_return_t RetCode;
1886 processor_set_t new_set;
1887 processor_set_name_t new_name;
1888
1889 __DeclareRcvRpc(214, "processor_set_create")
1890 __BeforeRcvRpc(214, "processor_set_create")
1891 /* RetCArg=0x0 rtSimpleRequest=0 */
1892
1893 #if defined(__MIG_check__Request__processor_set_create_t__defined)
1894 check_result = __MIG_check__Request__processor_set_create_t((__Request *)In0P);
1895 if (check_result != MACH_MSG_SUCCESS)
1896 { MIG_RETURN_ERROR(OutP, check_result); }
1897 #endif /* defined(__MIG_check__Request__processor_set_create_t__defined) */
1898
1899 #if UseStaticTemplates
1900 OutP->new_set = new_setTemplate;
1901 #else /* UseStaticTemplates */
1902 #if __MigKernelSpecificCode
1903 OutP->new_set.disposition = 17;
1904 #else
1905 OutP->new_set.disposition = 19;
1906 #endif /* __MigKernelSpecificCode */
1907 OutP->new_set.type = MACH_MSG_PORT_DESCRIPTOR;
1908 #endif /* UseStaticTemplates */
1909
1910
1911 #if UseStaticTemplates
1912 OutP->new_name = new_nameTemplate;
1913 #else /* UseStaticTemplates */
1914 #if __MigKernelSpecificCode
1915 OutP->new_name.disposition = 17;
1916 #else
1917 OutP->new_name.disposition = 19;
1918 #endif /* __MigKernelSpecificCode */
1919 OutP->new_name.type = MACH_MSG_PORT_DESCRIPTOR;
1920 #endif /* UseStaticTemplates */
1921
1922
1923 RetCode = processor_set_create(convert_port_to_host(In0P->Head.msgh_request_port), &new_set, &new_name);
1924 if (RetCode != KERN_SUCCESS) {
1925 MIG_RETURN_ERROR(OutP, RetCode);
1926 }
1927 #if __MigKernelSpecificCode
1928 #endif /* __MigKernelSpecificCode */
1929 OutP->new_set.name = (mach_port_t)convert_pset_to_port(new_set);
1930
1931 OutP->new_name.name = (mach_port_t)convert_pset_name_to_port(new_name);
1932
1933
1934 OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
1935 OutP->Head.msgh_size = (sizeof(Reply));
1936 OutP->msgh_body.msgh_descriptor_count = 2;
1937 __AfterRcvRpc(214, "processor_set_create")
1938 }
1939
1940 #if ( __MigTypeCheck )
1941 #if __MIG_check__Request__mach_host_subsystem__
1942 #if !defined(__MIG_check__Request__mach_memory_object_memory_entry_64_t__defined)
1943 #define __MIG_check__Request__mach_memory_object_memory_entry_64_t__defined
1944
__MIG_check__Request__mach_memory_object_memory_entry_64_t(__Request__mach_memory_object_memory_entry_64_t * In0P)1945 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)
1946 {
1947
1948 typedef __Request__mach_memory_object_memory_entry_64_t __Request;
1949 #if __MigTypeCheck
1950 if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
1951 (In0P->msgh_body.msgh_descriptor_count != 1) ||
1952 (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
1953 return MIG_BAD_ARGUMENTS;
1954 #endif /* __MigTypeCheck */
1955
1956 #if __MigTypeCheck
1957 if (In0P->pager.type != MACH_MSG_PORT_DESCRIPTOR ||
1958 In0P->pager.disposition != 17)
1959 return MIG_TYPE_ERROR;
1960 #endif /* __MigTypeCheck */
1961
1962 return MACH_MSG_SUCCESS;
1963 }
1964 #endif /* !defined(__MIG_check__Request__mach_memory_object_memory_entry_64_t__defined) */
1965 #endif /* __MIG_check__Request__mach_host_subsystem__ */
1966 #endif /* ( __MigTypeCheck ) */
1967
1968
1969 /* Routine mach_memory_object_memory_entry_64 */
1970 #ifdef mig_external
1971 mig_external
1972 #else
1973 extern
1974 #endif /* mig_external */
mach_memory_object_memory_entry_64(host,internal,size,permission,pager,entry_handle)1975 kern_return_t mach_memory_object_memory_entry_64
1976 #if defined(LINTLIBRARY)
1977 (host, internal, size, permission, pager, entry_handle)
1978 host_t host;
1979 boolean_t internal;
1980 memory_object_size_t size;
1981 vm_prot_t permission;
1982 memory_object_t pager;
1983 mach_port_t *entry_handle;
1984 { return mach_memory_object_memory_entry_64(host, internal, size, permission, pager, entry_handle); }
1985 #else
1986 (
1987 host_t host,
1988 boolean_t internal,
1989 memory_object_size_t size,
1990 vm_prot_t permission,
1991 memory_object_t pager,
1992 mach_port_t *entry_handle
1993 );
1994 #endif /* defined(LINTLIBRARY) */
1995
1996 /* Routine mach_memory_object_memory_entry_64 */
_Xmach_memory_object_memory_entry_64(mach_msg_header_t * InHeadP,mach_msg_header_t * OutHeadP)1997 mig_internal novalue _Xmach_memory_object_memory_entry_64
1998 (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
1999 {
2000
2001 #ifdef __MigPackStructs
2002 #pragma pack(4)
2003 #endif
2004 typedef struct {
2005 mach_msg_header_t Head;
2006 /* start of the kernel processed data */
2007 mach_msg_body_t msgh_body;
2008 mach_msg_port_descriptor_t pager;
2009 /* end of the kernel processed data */
2010 NDR_record_t NDR;
2011 boolean_t internal;
2012 memory_object_size_t size;
2013 vm_prot_t permission;
2014 mach_msg_trailer_t trailer;
2015 } Request;
2016 #ifdef __MigPackStructs
2017 #pragma pack()
2018 #endif
2019 typedef __Request__mach_memory_object_memory_entry_64_t __Request;
2020 typedef __Reply__mach_memory_object_memory_entry_64_t Reply;
2021
2022 /*
2023 * typedef struct {
2024 * mach_msg_header_t Head;
2025 * NDR_record_t NDR;
2026 * kern_return_t RetCode;
2027 * } mig_reply_error_t;
2028 */
2029
2030 Request *In0P = (Request *) InHeadP;
2031 Reply *OutP = (Reply *) OutHeadP;
2032 #ifdef __MIG_check__Request__mach_memory_object_memory_entry_64_t__defined
2033 kern_return_t check_result;
2034 #endif /* __MIG_check__Request__mach_memory_object_memory_entry_64_t__defined */
2035
2036 #if __MigKernelSpecificCode
2037 #if UseStaticTemplates
2038 const static mach_msg_port_descriptor_t entry_handleTemplate = {
2039 .name = MACH_PORT_NULL,
2040 .disposition = 17,
2041 .type = MACH_MSG_PORT_DESCRIPTOR,
2042 };
2043 #endif /* UseStaticTemplates */
2044
2045 #else
2046 #if UseStaticTemplates
2047 const static mach_msg_port_descriptor_t entry_handleTemplate = {
2048 .name = MACH_PORT_NULL,
2049 .disposition = 17,
2050 .type = MACH_MSG_PORT_DESCRIPTOR,
2051 };
2052 #endif /* UseStaticTemplates */
2053
2054 #endif /* __MigKernelSpecificCode */
2055 kern_return_t RetCode;
2056 __DeclareRcvRpc(215, "mach_memory_object_memory_entry_64")
2057 __BeforeRcvRpc(215, "mach_memory_object_memory_entry_64")
2058 /* RetCArg=0x0 rtSimpleRequest=0 */
2059
2060 #if defined(__MIG_check__Request__mach_memory_object_memory_entry_64_t__defined)
2061 check_result = __MIG_check__Request__mach_memory_object_memory_entry_64_t((__Request *)In0P);
2062 if (check_result != MACH_MSG_SUCCESS)
2063 { MIG_RETURN_ERROR(OutP, check_result); }
2064 #endif /* defined(__MIG_check__Request__mach_memory_object_memory_entry_64_t__defined) */
2065
2066 #if UseStaticTemplates
2067 OutP->entry_handle = entry_handleTemplate;
2068 #else /* UseStaticTemplates */
2069 #if __MigKernelSpecificCode
2070 OutP->entry_handle.disposition = 17;
2071 #else
2072 OutP->entry_handle.disposition = 17;
2073 #endif /* __MigKernelSpecificCode */
2074 OutP->entry_handle.type = MACH_MSG_PORT_DESCRIPTOR;
2075 #endif /* UseStaticTemplates */
2076
2077
2078 RetCode = mach_memory_object_memory_entry_64(convert_port_to_host(In0P->Head.msgh_request_port), In0P->internal, In0P->size, In0P->permission, In0P->pager.name, &OutP->entry_handle.name);
2079 if (RetCode != KERN_SUCCESS) {
2080 MIG_RETURN_ERROR(OutP, RetCode);
2081 }
2082 #if __MigKernelSpecificCode
2083 #endif /* __MigKernelSpecificCode */
2084
2085 OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
2086 OutP->Head.msgh_size = (sizeof(Reply));
2087 OutP->msgh_body.msgh_descriptor_count = 1;
2088 __AfterRcvRpc(215, "mach_memory_object_memory_entry_64")
2089 }
2090
2091 #if ( __MigTypeCheck )
2092 #if __MIG_check__Request__mach_host_subsystem__
2093 #if !defined(__MIG_check__Request__host_statistics_t__defined)
2094 #define __MIG_check__Request__host_statistics_t__defined
2095
__MIG_check__Request__host_statistics_t(__Request__host_statistics_t * In0P)2096 mig_internal kern_return_t __MIG_check__Request__host_statistics_t(__attribute__((__unused__)) __Request__host_statistics_t *In0P)
2097 {
2098
2099 typedef __Request__host_statistics_t __Request;
2100 #if __MigTypeCheck
2101 if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
2102 (In0P->msgh_body.msgh_descriptor_count != 0) ||
2103 (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
2104 return MIG_BAD_ARGUMENTS;
2105 #endif /* __MigTypeCheck */
2106
2107 return MACH_MSG_SUCCESS;
2108 }
2109 #endif /* !defined(__MIG_check__Request__host_statistics_t__defined) */
2110 #endif /* __MIG_check__Request__mach_host_subsystem__ */
2111 #endif /* ( __MigTypeCheck ) */
2112
2113
2114 /* Routine host_statistics */
2115 #ifdef mig_external
2116 mig_external
2117 #else
2118 extern
2119 #endif /* mig_external */
host_statistics(host_priv,flavor,host_info_out,host_info_outCnt)2120 kern_return_t host_statistics
2121 #if defined(LINTLIBRARY)
2122 (host_priv, flavor, host_info_out, host_info_outCnt)
2123 host_t host_priv;
2124 host_flavor_t flavor;
2125 host_info_t host_info_out;
2126 mach_msg_type_number_t *host_info_outCnt;
2127 { return host_statistics(host_priv, flavor, host_info_out, host_info_outCnt); }
2128 #else
2129 (
2130 host_t host_priv,
2131 host_flavor_t flavor,
2132 host_info_t host_info_out,
2133 mach_msg_type_number_t *host_info_outCnt
2134 );
2135 #endif /* defined(LINTLIBRARY) */
2136
2137 /* Routine host_statistics */
_Xhost_statistics(mach_msg_header_t * InHeadP,mach_msg_header_t * OutHeadP)2138 mig_internal novalue _Xhost_statistics
2139 (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
2140 {
2141
2142 #ifdef __MigPackStructs
2143 #pragma pack(4)
2144 #endif
2145 typedef struct {
2146 mach_msg_header_t Head;
2147 /* start of the kernel processed data */
2148 mach_msg_body_t msgh_body;
2149 /* end of the kernel processed data */
2150 NDR_record_t NDR;
2151 host_flavor_t flavor;
2152 mach_msg_type_number_t host_info_outCnt;
2153 mach_msg_trailer_t trailer;
2154 } Request;
2155 #ifdef __MigPackStructs
2156 #pragma pack()
2157 #endif
2158 typedef __Request__host_statistics_t __Request;
2159 typedef __Reply__host_statistics_t Reply;
2160
2161 /*
2162 * typedef struct {
2163 * mach_msg_header_t Head;
2164 * NDR_record_t NDR;
2165 * kern_return_t RetCode;
2166 * } mig_reply_error_t;
2167 */
2168
2169 Request *In0P = (Request *) InHeadP;
2170 Reply *OutP = (Reply *) OutHeadP;
2171 #ifdef __MIG_check__Request__host_statistics_t__defined
2172 kern_return_t check_result;
2173 #endif /* __MIG_check__Request__host_statistics_t__defined */
2174
2175 #if __MigKernelSpecificCode
2176 #else
2177 #endif /* __MigKernelSpecificCode */
2178 __DeclareRcvRpc(216, "host_statistics")
2179 __BeforeRcvRpc(216, "host_statistics")
2180 /* RetCArg=0x0 rtSimpleRequest=0 */
2181
2182 #if defined(__MIG_check__Request__host_statistics_t__defined)
2183 check_result = __MIG_check__Request__host_statistics_t((__Request *)In0P);
2184 if (check_result != MACH_MSG_SUCCESS)
2185 { MIG_RETURN_ERROR(OutP, check_result); }
2186 #endif /* defined(__MIG_check__Request__host_statistics_t__defined) */
2187
2188 OutP->host_info_outCnt = 68;
2189 if (In0P->host_info_outCnt < OutP->host_info_outCnt)
2190 OutP->host_info_outCnt = In0P->host_info_outCnt;
2191
2192 OutP->RetCode = host_statistics(convert_port_to_host(In0P->Head.msgh_request_port), In0P->flavor, OutP->host_info_out, &OutP->host_info_outCnt);
2193 if (OutP->RetCode != KERN_SUCCESS) {
2194 MIG_RETURN_ERROR(OutP, OutP->RetCode);
2195 }
2196 #if __MigKernelSpecificCode
2197 #endif /* __MigKernelSpecificCode */
2198
2199 OutP->NDR = NDR_record;
2200
2201 OutP->Head.msgh_size = (sizeof(Reply) - 272) + (_WALIGN_((4 * OutP->host_info_outCnt)));
2202
2203 __AfterRcvRpc(216, "host_statistics")
2204 }
2205
2206 #if ( __MigTypeCheck )
2207 #if __MIG_check__Request__mach_host_subsystem__
2208 #if !defined(__MIG_check__Request__host_request_notification_t__defined)
2209 #define __MIG_check__Request__host_request_notification_t__defined
2210
__MIG_check__Request__host_request_notification_t(__Request__host_request_notification_t * In0P)2211 mig_internal kern_return_t __MIG_check__Request__host_request_notification_t(__attribute__((__unused__)) __Request__host_request_notification_t *In0P)
2212 {
2213
2214 typedef __Request__host_request_notification_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->notify_port.type != MACH_MSG_PORT_DESCRIPTOR ||
2224 In0P->notify_port.disposition != 18)
2225 return MIG_TYPE_ERROR;
2226 #endif /* __MigTypeCheck */
2227
2228 return MACH_MSG_SUCCESS;
2229 }
2230 #endif /* !defined(__MIG_check__Request__host_request_notification_t__defined) */
2231 #endif /* __MIG_check__Request__mach_host_subsystem__ */
2232 #endif /* ( __MigTypeCheck ) */
2233
2234
2235 /* Routine host_request_notification */
2236 #ifdef mig_external
2237 mig_external
2238 #else
2239 extern
2240 #endif /* mig_external */
host_request_notification(host,notify_type,notify_port)2241 kern_return_t host_request_notification
2242 #if defined(LINTLIBRARY)
2243 (host, notify_type, notify_port)
2244 host_t host;
2245 host_flavor_t notify_type;
2246 mach_port_t notify_port;
2247 { return host_request_notification(host, notify_type, notify_port); }
2248 #else
2249 (
2250 host_t host,
2251 host_flavor_t notify_type,
2252 mach_port_t notify_port
2253 );
2254 #endif /* defined(LINTLIBRARY) */
2255
2256 /* Routine host_request_notification */
_Xhost_request_notification(mach_msg_header_t * InHeadP,mach_msg_header_t * OutHeadP)2257 mig_internal novalue _Xhost_request_notification
2258 (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
2259 {
2260
2261 #ifdef __MigPackStructs
2262 #pragma pack(4)
2263 #endif
2264 typedef struct {
2265 mach_msg_header_t Head;
2266 /* start of the kernel processed data */
2267 mach_msg_body_t msgh_body;
2268 mach_msg_port_descriptor_t notify_port;
2269 /* end of the kernel processed data */
2270 NDR_record_t NDR;
2271 host_flavor_t notify_type;
2272 mach_msg_trailer_t trailer;
2273 } Request;
2274 #ifdef __MigPackStructs
2275 #pragma pack()
2276 #endif
2277 typedef __Request__host_request_notification_t __Request;
2278 typedef __Reply__host_request_notification_t Reply;
2279
2280 /*
2281 * typedef struct {
2282 * mach_msg_header_t Head;
2283 * NDR_record_t NDR;
2284 * kern_return_t RetCode;
2285 * } mig_reply_error_t;
2286 */
2287
2288 Request *In0P = (Request *) InHeadP;
2289 Reply *OutP = (Reply *) OutHeadP;
2290 #ifdef __MIG_check__Request__host_request_notification_t__defined
2291 kern_return_t check_result;
2292 #endif /* __MIG_check__Request__host_request_notification_t__defined */
2293
2294 #if __MigKernelSpecificCode
2295 #else
2296 #endif /* __MigKernelSpecificCode */
2297 __DeclareRcvRpc(217, "host_request_notification")
2298 __BeforeRcvRpc(217, "host_request_notification")
2299 /* RetCArg=0x0 rtSimpleRequest=0 */
2300
2301 #if defined(__MIG_check__Request__host_request_notification_t__defined)
2302 check_result = __MIG_check__Request__host_request_notification_t((__Request *)In0P);
2303 if (check_result != MACH_MSG_SUCCESS)
2304 { MIG_RETURN_ERROR(OutP, check_result); }
2305 #endif /* defined(__MIG_check__Request__host_request_notification_t__defined) */
2306
2307 OutP->RetCode = host_request_notification(convert_port_to_host(In0P->Head.msgh_request_port), In0P->notify_type, In0P->notify_port.name);
2308 #if __MigKernelSpecificCode
2309 #endif /* __MigKernelSpecificCode */
2310
2311 OutP->NDR = NDR_record;
2312
2313
2314 __AfterRcvRpc(217, "host_request_notification")
2315 }
2316
2317 #if ( __MigTypeCheck )
2318 #if __MIG_check__Request__mach_host_subsystem__
2319 #if !defined(__MIG_check__Request__host_statistics64_t__defined)
2320 #define __MIG_check__Request__host_statistics64_t__defined
2321
__MIG_check__Request__host_statistics64_t(__Request__host_statistics64_t * In0P)2322 mig_internal kern_return_t __MIG_check__Request__host_statistics64_t(__attribute__((__unused__)) __Request__host_statistics64_t *In0P)
2323 {
2324
2325 typedef __Request__host_statistics64_t __Request;
2326 #if __MigTypeCheck
2327 if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
2328 (In0P->msgh_body.msgh_descriptor_count != 0) ||
2329 (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
2330 return MIG_BAD_ARGUMENTS;
2331 #endif /* __MigTypeCheck */
2332
2333 return MACH_MSG_SUCCESS;
2334 }
2335 #endif /* !defined(__MIG_check__Request__host_statistics64_t__defined) */
2336 #endif /* __MIG_check__Request__mach_host_subsystem__ */
2337 #endif /* ( __MigTypeCheck ) */
2338
2339
2340 /* Routine host_statistics64 */
2341 #ifdef mig_external
2342 mig_external
2343 #else
2344 extern
2345 #endif /* mig_external */
host_statistics64(host_priv,flavor,host_info64_out,host_info64_outCnt)2346 kern_return_t host_statistics64
2347 #if defined(LINTLIBRARY)
2348 (host_priv, flavor, host_info64_out, host_info64_outCnt)
2349 host_t host_priv;
2350 host_flavor_t flavor;
2351 host_info64_t host_info64_out;
2352 mach_msg_type_number_t *host_info64_outCnt;
2353 { return host_statistics64(host_priv, flavor, host_info64_out, host_info64_outCnt); }
2354 #else
2355 (
2356 host_t host_priv,
2357 host_flavor_t flavor,
2358 host_info64_t host_info64_out,
2359 mach_msg_type_number_t *host_info64_outCnt
2360 );
2361 #endif /* defined(LINTLIBRARY) */
2362
2363 /* Routine host_statistics64 */
_Xhost_statistics64(mach_msg_header_t * InHeadP,mach_msg_header_t * OutHeadP)2364 mig_internal novalue _Xhost_statistics64
2365 (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
2366 {
2367
2368 #ifdef __MigPackStructs
2369 #pragma pack(4)
2370 #endif
2371 typedef struct {
2372 mach_msg_header_t Head;
2373 /* start of the kernel processed data */
2374 mach_msg_body_t msgh_body;
2375 /* end of the kernel processed data */
2376 NDR_record_t NDR;
2377 host_flavor_t flavor;
2378 mach_msg_type_number_t host_info64_outCnt;
2379 mach_msg_trailer_t trailer;
2380 } Request;
2381 #ifdef __MigPackStructs
2382 #pragma pack()
2383 #endif
2384 typedef __Request__host_statistics64_t __Request;
2385 typedef __Reply__host_statistics64_t Reply;
2386
2387 /*
2388 * typedef struct {
2389 * mach_msg_header_t Head;
2390 * NDR_record_t NDR;
2391 * kern_return_t RetCode;
2392 * } mig_reply_error_t;
2393 */
2394
2395 Request *In0P = (Request *) InHeadP;
2396 Reply *OutP = (Reply *) OutHeadP;
2397 #ifdef __MIG_check__Request__host_statistics64_t__defined
2398 kern_return_t check_result;
2399 #endif /* __MIG_check__Request__host_statistics64_t__defined */
2400
2401 #if __MigKernelSpecificCode
2402 #else
2403 #endif /* __MigKernelSpecificCode */
2404 __DeclareRcvRpc(219, "host_statistics64")
2405 __BeforeRcvRpc(219, "host_statistics64")
2406 /* RetCArg=0x0 rtSimpleRequest=0 */
2407
2408 #if defined(__MIG_check__Request__host_statistics64_t__defined)
2409 check_result = __MIG_check__Request__host_statistics64_t((__Request *)In0P);
2410 if (check_result != MACH_MSG_SUCCESS)
2411 { MIG_RETURN_ERROR(OutP, check_result); }
2412 #endif /* defined(__MIG_check__Request__host_statistics64_t__defined) */
2413
2414 OutP->host_info64_outCnt = 256;
2415 if (In0P->host_info64_outCnt < OutP->host_info64_outCnt)
2416 OutP->host_info64_outCnt = In0P->host_info64_outCnt;
2417
2418 OutP->RetCode = host_statistics64(convert_port_to_host(In0P->Head.msgh_request_port), In0P->flavor, OutP->host_info64_out, &OutP->host_info64_outCnt);
2419 if (OutP->RetCode != KERN_SUCCESS) {
2420 MIG_RETURN_ERROR(OutP, OutP->RetCode);
2421 }
2422 #if __MigKernelSpecificCode
2423 #endif /* __MigKernelSpecificCode */
2424
2425 OutP->NDR = NDR_record;
2426
2427 OutP->Head.msgh_size = (sizeof(Reply) - 1024) + (_WALIGN_((4 * OutP->host_info64_outCnt)));
2428
2429 __AfterRcvRpc(219, "host_statistics64")
2430 }
2431
2432 #if ( __MigTypeCheck )
2433 #if __MIG_check__Request__mach_host_subsystem__
2434 #if !defined(__MIG_check__Request__mach_zone_info_t__defined)
2435 #define __MIG_check__Request__mach_zone_info_t__defined
2436
__MIG_check__Request__mach_zone_info_t(__Request__mach_zone_info_t * In0P)2437 mig_internal kern_return_t __MIG_check__Request__mach_zone_info_t(__attribute__((__unused__)) __Request__mach_zone_info_t *In0P)
2438 {
2439
2440 typedef __Request__mach_zone_info_t __Request;
2441 #if __MigTypeCheck
2442 if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
2443 (In0P->msgh_body.msgh_descriptor_count != 0) ||
2444 (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
2445 return MIG_BAD_ARGUMENTS;
2446 #endif /* __MigTypeCheck */
2447
2448 return MACH_MSG_SUCCESS;
2449 }
2450 #endif /* !defined(__MIG_check__Request__mach_zone_info_t__defined) */
2451 #endif /* __MIG_check__Request__mach_host_subsystem__ */
2452 #endif /* ( __MigTypeCheck ) */
2453
2454
2455 /* Routine mach_zone_info */
2456 #ifdef mig_external
2457 mig_external
2458 #else
2459 extern
2460 #endif /* mig_external */
mach_zone_info(host,names,namesCnt,info,infoCnt)2461 kern_return_t mach_zone_info
2462 #if defined(LINTLIBRARY)
2463 (host, names, namesCnt, info, infoCnt)
2464 host_priv_t host;
2465 mach_zone_name_array_t *names;
2466 mach_msg_type_number_t *namesCnt;
2467 mach_zone_info_array_t *info;
2468 mach_msg_type_number_t *infoCnt;
2469 { return mach_zone_info(host, names, namesCnt, info, infoCnt); }
2470 #else
2471 (
2472 host_priv_t host,
2473 mach_zone_name_array_t *names,
2474 mach_msg_type_number_t *namesCnt,
2475 mach_zone_info_array_t *info,
2476 mach_msg_type_number_t *infoCnt
2477 );
2478 #endif /* defined(LINTLIBRARY) */
2479
2480 /* Routine mach_zone_info */
_Xmach_zone_info(mach_msg_header_t * InHeadP,mach_msg_header_t * OutHeadP)2481 mig_internal novalue _Xmach_zone_info
2482 (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
2483 {
2484
2485 #ifdef __MigPackStructs
2486 #pragma pack(4)
2487 #endif
2488 typedef struct {
2489 mach_msg_header_t Head;
2490 /* start of the kernel processed data */
2491 mach_msg_body_t msgh_body;
2492 /* end of the kernel processed data */
2493 mach_msg_trailer_t trailer;
2494 } Request;
2495 #ifdef __MigPackStructs
2496 #pragma pack()
2497 #endif
2498 typedef __Request__mach_zone_info_t __Request;
2499 typedef __Reply__mach_zone_info_t Reply;
2500
2501 /*
2502 * typedef struct {
2503 * mach_msg_header_t Head;
2504 * NDR_record_t NDR;
2505 * kern_return_t RetCode;
2506 * } mig_reply_error_t;
2507 */
2508
2509 Request *In0P = (Request *) InHeadP;
2510 Reply *OutP = (Reply *) OutHeadP;
2511 #ifdef __MIG_check__Request__mach_zone_info_t__defined
2512 kern_return_t check_result;
2513 #endif /* __MIG_check__Request__mach_zone_info_t__defined */
2514
2515 #if __MigKernelSpecificCode
2516 #if UseStaticTemplates
2517 const static mach_msg_ool_descriptor_t namesTemplate = {
2518 .address = (void *)0,
2519 .size = 0,
2520 .deallocate = TRUE,
2521 .copy = MACH_MSG_VIRTUAL_COPY,
2522 .type = MACH_MSG_OOL_DESCRIPTOR,
2523 };
2524 #endif /* UseStaticTemplates */
2525
2526 #if UseStaticTemplates
2527 const static mach_msg_ool_descriptor_t infoTemplate = {
2528 .address = (void *)0,
2529 .size = 0,
2530 .deallocate = TRUE,
2531 .copy = MACH_MSG_VIRTUAL_COPY,
2532 .type = MACH_MSG_OOL_DESCRIPTOR,
2533 };
2534 #endif /* UseStaticTemplates */
2535
2536 #else
2537 #if UseStaticTemplates
2538 const static mach_msg_ool_descriptor_t namesTemplate = {
2539 .address = (void *)0,
2540 .size = 0,
2541 .deallocate = TRUE,
2542 .copy = MACH_MSG_VIRTUAL_COPY,
2543 .type = MACH_MSG_OOL_DESCRIPTOR,
2544 };
2545 #endif /* UseStaticTemplates */
2546
2547 #if UseStaticTemplates
2548 const static mach_msg_ool_descriptor_t infoTemplate = {
2549 .address = (void *)0,
2550 .size = 0,
2551 .deallocate = TRUE,
2552 .copy = MACH_MSG_VIRTUAL_COPY,
2553 .type = MACH_MSG_OOL_DESCRIPTOR,
2554 };
2555 #endif /* UseStaticTemplates */
2556
2557 #endif /* __MigKernelSpecificCode */
2558 kern_return_t RetCode;
2559 __DeclareRcvRpc(220, "mach_zone_info")
2560 __BeforeRcvRpc(220, "mach_zone_info")
2561 /* RetCArg=0x0 rtSimpleRequest=0 */
2562
2563 #if defined(__MIG_check__Request__mach_zone_info_t__defined)
2564 check_result = __MIG_check__Request__mach_zone_info_t((__Request *)In0P);
2565 if (check_result != MACH_MSG_SUCCESS)
2566 { MIG_RETURN_ERROR(OutP, check_result); }
2567 #endif /* defined(__MIG_check__Request__mach_zone_info_t__defined) */
2568
2569 #if UseStaticTemplates
2570 OutP->names = namesTemplate;
2571 #else /* UseStaticTemplates */
2572 OutP->names.deallocate = TRUE;
2573 OutP->names.copy = MACH_MSG_VIRTUAL_COPY;
2574 OutP->names.type = MACH_MSG_OOL_DESCRIPTOR;
2575 #endif /* UseStaticTemplates */
2576
2577
2578 #if UseStaticTemplates
2579 OutP->info = infoTemplate;
2580 #else /* UseStaticTemplates */
2581 OutP->info.deallocate = TRUE;
2582 OutP->info.copy = MACH_MSG_VIRTUAL_COPY;
2583 OutP->info.type = MACH_MSG_OOL_DESCRIPTOR;
2584 #endif /* UseStaticTemplates */
2585
2586
2587 OutP->namesCnt = 0;
2588
2589 OutP->infoCnt = 0;
2590
2591 RetCode = mach_zone_info(convert_port_to_host_priv(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);
2592 if (RetCode != KERN_SUCCESS) {
2593 MIG_RETURN_ERROR(OutP, RetCode);
2594 }
2595 #if __MigKernelSpecificCode
2596 #endif /* __MigKernelSpecificCode */
2597 OutP->names.size = OutP->namesCnt * 80;
2598
2599 OutP->info.size = OutP->infoCnt * 64;
2600
2601
2602 OutP->NDR = NDR_record;
2603
2604
2605 OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
2606 OutP->Head.msgh_size = (sizeof(Reply));
2607 OutP->msgh_body.msgh_descriptor_count = 2;
2608 __AfterRcvRpc(220, "mach_zone_info")
2609 }
2610
2611 #if ( __MigTypeCheck )
2612 #if __MIG_check__Request__mach_host_subsystem__
2613 #if !defined(__MIG_check__Request__host_create_mach_voucher_t__defined)
2614 #define __MIG_check__Request__host_create_mach_voucher_t__defined
2615
__MIG_check__Request__host_create_mach_voucher_t(__Request__host_create_mach_voucher_t * In0P)2616 mig_internal kern_return_t __MIG_check__Request__host_create_mach_voucher_t(__attribute__((__unused__)) __Request__host_create_mach_voucher_t *In0P)
2617 {
2618
2619 typedef __Request__host_create_mach_voucher_t __Request;
2620 #if __MigTypeCheck
2621 unsigned int msgh_size;
2622 #endif /* __MigTypeCheck */
2623
2624 #if __MigTypeCheck
2625 msgh_size = In0P->Head.msgh_size;
2626 if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
2627 (In0P->msgh_body.msgh_descriptor_count != 0) ||
2628 (msgh_size < (sizeof(__Request) - 5120)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)))
2629 return MIG_BAD_ARGUMENTS;
2630 #endif /* __MigTypeCheck */
2631
2632 #if defined(__NDR_convert__int_rep__Request__host_create_mach_voucher_t__recipesCnt__defined)
2633 if (In0P->NDR.int_rep != NDR_record.int_rep)
2634 __NDR_convert__int_rep__Request__host_create_mach_voucher_t__recipesCnt(&In0P->recipesCnt, In0P->NDR.int_rep);
2635 #endif /* __NDR_convert__int_rep__Request__host_create_mach_voucher_t__recipesCnt__defined */
2636 #if __MigTypeCheck
2637 if ( In0P->recipesCnt > 5120 )
2638 return MIG_BAD_ARGUMENTS;
2639 if (((msgh_size - (sizeof(__Request) - 5120)) < In0P->recipesCnt) ||
2640 (msgh_size != (sizeof(__Request) - 5120) + _WALIGN_(In0P->recipesCnt)))
2641 return MIG_BAD_ARGUMENTS;
2642 #endif /* __MigTypeCheck */
2643
2644 return MACH_MSG_SUCCESS;
2645 }
2646 #endif /* !defined(__MIG_check__Request__host_create_mach_voucher_t__defined) */
2647 #endif /* __MIG_check__Request__mach_host_subsystem__ */
2648 #endif /* ( __MigTypeCheck ) */
2649
2650
2651 /* Routine host_create_mach_voucher */
2652 #ifdef mig_external
2653 mig_external
2654 #else
2655 extern
2656 #endif /* mig_external */
host_create_mach_voucher(host,recipes,recipesCnt,voucher)2657 kern_return_t host_create_mach_voucher
2658 #if defined(LINTLIBRARY)
2659 (host, recipes, recipesCnt, voucher)
2660 host_t host;
2661 mach_voucher_attr_raw_recipe_array_t recipes;
2662 mach_msg_type_number_t recipesCnt;
2663 ipc_voucher_t *voucher;
2664 { return host_create_mach_voucher(host, recipes, recipesCnt, voucher); }
2665 #else
2666 (
2667 host_t host,
2668 mach_voucher_attr_raw_recipe_array_t recipes,
2669 mach_msg_type_number_t recipesCnt,
2670 ipc_voucher_t *voucher
2671 );
2672 #endif /* defined(LINTLIBRARY) */
2673
2674 /* Routine host_create_mach_voucher */
_Xhost_create_mach_voucher(mach_msg_header_t * InHeadP,mach_msg_header_t * OutHeadP)2675 mig_internal novalue _Xhost_create_mach_voucher
2676 (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
2677 {
2678
2679 #ifdef __MigPackStructs
2680 #pragma pack(4)
2681 #endif
2682 typedef struct {
2683 mach_msg_header_t Head;
2684 /* start of the kernel processed data */
2685 mach_msg_body_t msgh_body;
2686 /* end of the kernel processed data */
2687 NDR_record_t NDR;
2688 mach_msg_type_number_t recipesCnt;
2689 uint8_t recipes[5120];
2690 mach_msg_trailer_t trailer;
2691 } Request;
2692 #ifdef __MigPackStructs
2693 #pragma pack()
2694 #endif
2695 typedef __Request__host_create_mach_voucher_t __Request;
2696 typedef __Reply__host_create_mach_voucher_t Reply;
2697
2698 /*
2699 * typedef struct {
2700 * mach_msg_header_t Head;
2701 * NDR_record_t NDR;
2702 * kern_return_t RetCode;
2703 * } mig_reply_error_t;
2704 */
2705
2706 Request *In0P = (Request *) InHeadP;
2707 Reply *OutP = (Reply *) OutHeadP;
2708 #ifdef __MIG_check__Request__host_create_mach_voucher_t__defined
2709 kern_return_t check_result;
2710 #endif /* __MIG_check__Request__host_create_mach_voucher_t__defined */
2711
2712 #if __MigKernelSpecificCode
2713 #if UseStaticTemplates
2714 const static mach_msg_port_descriptor_t voucherTemplate = {
2715 .name = MACH_PORT_NULL,
2716 .disposition = 17,
2717 .type = MACH_MSG_PORT_DESCRIPTOR,
2718 };
2719 #endif /* UseStaticTemplates */
2720
2721 #else
2722 #if UseStaticTemplates
2723 const static mach_msg_port_descriptor_t voucherTemplate = {
2724 .name = MACH_PORT_NULL,
2725 .disposition = 19,
2726 .type = MACH_MSG_PORT_DESCRIPTOR,
2727 };
2728 #endif /* UseStaticTemplates */
2729
2730 #endif /* __MigKernelSpecificCode */
2731 kern_return_t RetCode;
2732 ipc_voucher_t voucher;
2733
2734 __DeclareRcvRpc(222, "host_create_mach_voucher")
2735 __BeforeRcvRpc(222, "host_create_mach_voucher")
2736 /* RetCArg=0x0 rtSimpleRequest=0 */
2737
2738 #if defined(__MIG_check__Request__host_create_mach_voucher_t__defined)
2739 check_result = __MIG_check__Request__host_create_mach_voucher_t((__Request *)In0P);
2740 if (check_result != MACH_MSG_SUCCESS)
2741 { MIG_RETURN_ERROR(OutP, check_result); }
2742 #endif /* defined(__MIG_check__Request__host_create_mach_voucher_t__defined) */
2743
2744 #if UseStaticTemplates
2745 OutP->voucher = voucherTemplate;
2746 #else /* UseStaticTemplates */
2747 #if __MigKernelSpecificCode
2748 OutP->voucher.disposition = 17;
2749 #else
2750 OutP->voucher.disposition = 19;
2751 #endif /* __MigKernelSpecificCode */
2752 OutP->voucher.type = MACH_MSG_PORT_DESCRIPTOR;
2753 #endif /* UseStaticTemplates */
2754
2755
2756 RetCode = host_create_mach_voucher(convert_port_to_host(In0P->Head.msgh_request_port), In0P->recipes, In0P->recipesCnt, &voucher);
2757 if (RetCode != KERN_SUCCESS) {
2758 MIG_RETURN_ERROR(OutP, RetCode);
2759 }
2760 #if __MigKernelSpecificCode
2761 #endif /* __MigKernelSpecificCode */
2762 OutP->voucher.name = (mach_port_t)convert_voucher_to_port(voucher);
2763
2764
2765 OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
2766 OutP->Head.msgh_size = (sizeof(Reply));
2767 OutP->msgh_body.msgh_descriptor_count = 1;
2768 __AfterRcvRpc(222, "host_create_mach_voucher")
2769 }
2770
2771 #if ( __MigTypeCheck )
2772 #if __MIG_check__Request__mach_host_subsystem__
2773 #if !defined(__MIG_check__Request__host_register_mach_voucher_attr_manager_t__defined)
2774 #define __MIG_check__Request__host_register_mach_voucher_attr_manager_t__defined
2775
__MIG_check__Request__host_register_mach_voucher_attr_manager_t(__Request__host_register_mach_voucher_attr_manager_t * In0P)2776 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)
2777 {
2778
2779 typedef __Request__host_register_mach_voucher_attr_manager_t __Request;
2780 #if __MigTypeCheck
2781 if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
2782 (In0P->msgh_body.msgh_descriptor_count != 1) ||
2783 (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
2784 return MIG_BAD_ARGUMENTS;
2785 #endif /* __MigTypeCheck */
2786
2787 #if __MigTypeCheck
2788 if (In0P->attr_manager.type != MACH_MSG_PORT_DESCRIPTOR ||
2789 In0P->attr_manager.disposition != 17)
2790 return MIG_TYPE_ERROR;
2791 #endif /* __MigTypeCheck */
2792
2793 return MACH_MSG_SUCCESS;
2794 }
2795 #endif /* !defined(__MIG_check__Request__host_register_mach_voucher_attr_manager_t__defined) */
2796 #endif /* __MIG_check__Request__mach_host_subsystem__ */
2797 #endif /* ( __MigTypeCheck ) */
2798
2799
2800 /* Routine host_register_mach_voucher_attr_manager */
2801 #ifdef mig_external
2802 mig_external
2803 #else
2804 extern
2805 #endif /* mig_external */
host_register_mach_voucher_attr_manager(host,attr_manager,default_value,new_key,new_attr_control)2806 kern_return_t host_register_mach_voucher_attr_manager
2807 #if defined(LINTLIBRARY)
2808 (host, attr_manager, default_value, new_key, new_attr_control)
2809 host_t host;
2810 mach_voucher_attr_manager_t attr_manager;
2811 mach_voucher_attr_value_handle_t default_value;
2812 mach_voucher_attr_key_t *new_key;
2813 ipc_voucher_attr_control_t *new_attr_control;
2814 { return host_register_mach_voucher_attr_manager(host, attr_manager, default_value, new_key, new_attr_control); }
2815 #else
2816 (
2817 host_t host,
2818 mach_voucher_attr_manager_t attr_manager,
2819 mach_voucher_attr_value_handle_t default_value,
2820 mach_voucher_attr_key_t *new_key,
2821 ipc_voucher_attr_control_t *new_attr_control
2822 );
2823 #endif /* defined(LINTLIBRARY) */
2824
2825 /* Routine host_register_mach_voucher_attr_manager */
_Xhost_register_mach_voucher_attr_manager(mach_msg_header_t * InHeadP,mach_msg_header_t * OutHeadP)2826 mig_internal novalue _Xhost_register_mach_voucher_attr_manager
2827 (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
2828 {
2829
2830 #ifdef __MigPackStructs
2831 #pragma pack(4)
2832 #endif
2833 typedef struct {
2834 mach_msg_header_t Head;
2835 /* start of the kernel processed data */
2836 mach_msg_body_t msgh_body;
2837 mach_msg_port_descriptor_t attr_manager;
2838 /* end of the kernel processed data */
2839 NDR_record_t NDR;
2840 mach_voucher_attr_value_handle_t default_value;
2841 mach_msg_trailer_t trailer;
2842 } Request;
2843 #ifdef __MigPackStructs
2844 #pragma pack()
2845 #endif
2846 typedef __Request__host_register_mach_voucher_attr_manager_t __Request;
2847 typedef __Reply__host_register_mach_voucher_attr_manager_t Reply;
2848
2849 /*
2850 * typedef struct {
2851 * mach_msg_header_t Head;
2852 * NDR_record_t NDR;
2853 * kern_return_t RetCode;
2854 * } mig_reply_error_t;
2855 */
2856
2857 Request *In0P = (Request *) InHeadP;
2858 Reply *OutP = (Reply *) OutHeadP;
2859 #ifdef __MIG_check__Request__host_register_mach_voucher_attr_manager_t__defined
2860 kern_return_t check_result;
2861 #endif /* __MIG_check__Request__host_register_mach_voucher_attr_manager_t__defined */
2862
2863 #if __MigKernelSpecificCode
2864 #if UseStaticTemplates
2865 const static mach_msg_port_descriptor_t new_attr_controlTemplate = {
2866 .name = MACH_PORT_NULL,
2867 .disposition = 17,
2868 .type = MACH_MSG_PORT_DESCRIPTOR,
2869 };
2870 #endif /* UseStaticTemplates */
2871
2872 #else
2873 #if UseStaticTemplates
2874 const static mach_msg_port_descriptor_t new_attr_controlTemplate = {
2875 .name = MACH_PORT_NULL,
2876 .disposition = 19,
2877 .type = MACH_MSG_PORT_DESCRIPTOR,
2878 };
2879 #endif /* UseStaticTemplates */
2880
2881 #endif /* __MigKernelSpecificCode */
2882 kern_return_t RetCode;
2883 ipc_voucher_attr_control_t new_attr_control;
2884
2885 __DeclareRcvRpc(223, "host_register_mach_voucher_attr_manager")
2886 __BeforeRcvRpc(223, "host_register_mach_voucher_attr_manager")
2887 /* RetCArg=0x0 rtSimpleRequest=0 */
2888
2889 #if defined(__MIG_check__Request__host_register_mach_voucher_attr_manager_t__defined)
2890 check_result = __MIG_check__Request__host_register_mach_voucher_attr_manager_t((__Request *)In0P);
2891 if (check_result != MACH_MSG_SUCCESS)
2892 { MIG_RETURN_ERROR(OutP, check_result); }
2893 #endif /* defined(__MIG_check__Request__host_register_mach_voucher_attr_manager_t__defined) */
2894
2895 #if UseStaticTemplates
2896 OutP->new_attr_control = new_attr_controlTemplate;
2897 #else /* UseStaticTemplates */
2898 #if __MigKernelSpecificCode
2899 OutP->new_attr_control.disposition = 17;
2900 #else
2901 OutP->new_attr_control.disposition = 19;
2902 #endif /* __MigKernelSpecificCode */
2903 OutP->new_attr_control.type = MACH_MSG_PORT_DESCRIPTOR;
2904 #endif /* UseStaticTemplates */
2905
2906
2907 RetCode = host_register_mach_voucher_attr_manager(convert_port_to_host(In0P->Head.msgh_request_port), In0P->attr_manager.name, In0P->default_value, &OutP->new_key, &new_attr_control);
2908 if (RetCode != KERN_SUCCESS) {
2909 MIG_RETURN_ERROR(OutP, RetCode);
2910 }
2911 #if __MigKernelSpecificCode
2912 #endif /* __MigKernelSpecificCode */
2913 OutP->new_attr_control.name = (mach_port_t)convert_voucher_attr_control_to_port(new_attr_control);
2914
2915
2916 OutP->NDR = NDR_record;
2917
2918
2919 OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
2920 OutP->Head.msgh_size = (sizeof(Reply));
2921 OutP->msgh_body.msgh_descriptor_count = 1;
2922 __AfterRcvRpc(223, "host_register_mach_voucher_attr_manager")
2923 }
2924
2925 #if ( __MigTypeCheck )
2926 #if __MIG_check__Request__mach_host_subsystem__
2927 #if !defined(__MIG_check__Request__host_register_well_known_mach_voucher_attr_manager_t__defined)
2928 #define __MIG_check__Request__host_register_well_known_mach_voucher_attr_manager_t__defined
2929
__MIG_check__Request__host_register_well_known_mach_voucher_attr_manager_t(__Request__host_register_well_known_mach_voucher_attr_manager_t * In0P)2930 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)
2931 {
2932
2933 typedef __Request__host_register_well_known_mach_voucher_attr_manager_t __Request;
2934 #if __MigTypeCheck
2935 if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
2936 (In0P->msgh_body.msgh_descriptor_count != 1) ||
2937 (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
2938 return MIG_BAD_ARGUMENTS;
2939 #endif /* __MigTypeCheck */
2940
2941 #if __MigTypeCheck
2942 if (In0P->attr_manager.type != MACH_MSG_PORT_DESCRIPTOR ||
2943 In0P->attr_manager.disposition != 17)
2944 return MIG_TYPE_ERROR;
2945 #endif /* __MigTypeCheck */
2946
2947 return MACH_MSG_SUCCESS;
2948 }
2949 #endif /* !defined(__MIG_check__Request__host_register_well_known_mach_voucher_attr_manager_t__defined) */
2950 #endif /* __MIG_check__Request__mach_host_subsystem__ */
2951 #endif /* ( __MigTypeCheck ) */
2952
2953
2954 /* Routine host_register_well_known_mach_voucher_attr_manager */
2955 #ifdef mig_external
2956 mig_external
2957 #else
2958 extern
2959 #endif /* mig_external */
host_register_well_known_mach_voucher_attr_manager(host,attr_manager,default_value,key,new_attr_control)2960 kern_return_t host_register_well_known_mach_voucher_attr_manager
2961 #if defined(LINTLIBRARY)
2962 (host, attr_manager, default_value, key, new_attr_control)
2963 host_t host;
2964 mach_voucher_attr_manager_t attr_manager;
2965 mach_voucher_attr_value_handle_t default_value;
2966 mach_voucher_attr_key_t key;
2967 ipc_voucher_attr_control_t *new_attr_control;
2968 { return host_register_well_known_mach_voucher_attr_manager(host, attr_manager, default_value, key, new_attr_control); }
2969 #else
2970 (
2971 host_t host,
2972 mach_voucher_attr_manager_t attr_manager,
2973 mach_voucher_attr_value_handle_t default_value,
2974 mach_voucher_attr_key_t key,
2975 ipc_voucher_attr_control_t *new_attr_control
2976 );
2977 #endif /* defined(LINTLIBRARY) */
2978
2979 /* Routine host_register_well_known_mach_voucher_attr_manager */
_Xhost_register_well_known_mach_voucher_attr_manager(mach_msg_header_t * InHeadP,mach_msg_header_t * OutHeadP)2980 mig_internal novalue _Xhost_register_well_known_mach_voucher_attr_manager
2981 (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
2982 {
2983
2984 #ifdef __MigPackStructs
2985 #pragma pack(4)
2986 #endif
2987 typedef struct {
2988 mach_msg_header_t Head;
2989 /* start of the kernel processed data */
2990 mach_msg_body_t msgh_body;
2991 mach_msg_port_descriptor_t attr_manager;
2992 /* end of the kernel processed data */
2993 NDR_record_t NDR;
2994 mach_voucher_attr_value_handle_t default_value;
2995 mach_voucher_attr_key_t key;
2996 mach_msg_trailer_t trailer;
2997 } Request;
2998 #ifdef __MigPackStructs
2999 #pragma pack()
3000 #endif
3001 typedef __Request__host_register_well_known_mach_voucher_attr_manager_t __Request;
3002 typedef __Reply__host_register_well_known_mach_voucher_attr_manager_t Reply;
3003
3004 /*
3005 * typedef struct {
3006 * mach_msg_header_t Head;
3007 * NDR_record_t NDR;
3008 * kern_return_t RetCode;
3009 * } mig_reply_error_t;
3010 */
3011
3012 Request *In0P = (Request *) InHeadP;
3013 Reply *OutP = (Reply *) OutHeadP;
3014 #ifdef __MIG_check__Request__host_register_well_known_mach_voucher_attr_manager_t__defined
3015 kern_return_t check_result;
3016 #endif /* __MIG_check__Request__host_register_well_known_mach_voucher_attr_manager_t__defined */
3017
3018 #if __MigKernelSpecificCode
3019 #if UseStaticTemplates
3020 const static mach_msg_port_descriptor_t new_attr_controlTemplate = {
3021 .name = MACH_PORT_NULL,
3022 .disposition = 17,
3023 .type = MACH_MSG_PORT_DESCRIPTOR,
3024 };
3025 #endif /* UseStaticTemplates */
3026
3027 #else
3028 #if UseStaticTemplates
3029 const static mach_msg_port_descriptor_t new_attr_controlTemplate = {
3030 .name = MACH_PORT_NULL,
3031 .disposition = 19,
3032 .type = MACH_MSG_PORT_DESCRIPTOR,
3033 };
3034 #endif /* UseStaticTemplates */
3035
3036 #endif /* __MigKernelSpecificCode */
3037 kern_return_t RetCode;
3038 ipc_voucher_attr_control_t new_attr_control;
3039
3040 __DeclareRcvRpc(224, "host_register_well_known_mach_voucher_attr_manager")
3041 __BeforeRcvRpc(224, "host_register_well_known_mach_voucher_attr_manager")
3042 /* RetCArg=0x0 rtSimpleRequest=0 */
3043
3044 #if defined(__MIG_check__Request__host_register_well_known_mach_voucher_attr_manager_t__defined)
3045 check_result = __MIG_check__Request__host_register_well_known_mach_voucher_attr_manager_t((__Request *)In0P);
3046 if (check_result != MACH_MSG_SUCCESS)
3047 { MIG_RETURN_ERROR(OutP, check_result); }
3048 #endif /* defined(__MIG_check__Request__host_register_well_known_mach_voucher_attr_manager_t__defined) */
3049
3050 #if UseStaticTemplates
3051 OutP->new_attr_control = new_attr_controlTemplate;
3052 #else /* UseStaticTemplates */
3053 #if __MigKernelSpecificCode
3054 OutP->new_attr_control.disposition = 17;
3055 #else
3056 OutP->new_attr_control.disposition = 19;
3057 #endif /* __MigKernelSpecificCode */
3058 OutP->new_attr_control.type = MACH_MSG_PORT_DESCRIPTOR;
3059 #endif /* UseStaticTemplates */
3060
3061
3062 RetCode = host_register_well_known_mach_voucher_attr_manager(convert_port_to_host(In0P->Head.msgh_request_port), In0P->attr_manager.name, In0P->default_value, In0P->key, &new_attr_control);
3063 if (RetCode != KERN_SUCCESS) {
3064 MIG_RETURN_ERROR(OutP, RetCode);
3065 }
3066 #if __MigKernelSpecificCode
3067 #endif /* __MigKernelSpecificCode */
3068 OutP->new_attr_control.name = (mach_port_t)convert_voucher_attr_control_to_port(new_attr_control);
3069
3070
3071 OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
3072 OutP->Head.msgh_size = (sizeof(Reply));
3073 OutP->msgh_body.msgh_descriptor_count = 1;
3074 __AfterRcvRpc(224, "host_register_well_known_mach_voucher_attr_manager")
3075 }
3076
3077
3078 #ifdef mig_external
3079 mig_external
3080 #else
3081 extern
3082 #endif /* mig_external */
3083 boolean_t mach_host_server(
3084 mach_msg_header_t *InHeadP,
3085 mach_msg_header_t *OutHeadP);
3086
3087 #ifdef mig_external
3088 mig_external
3089 #else
3090 extern
3091 #endif /* mig_external */
3092 mig_routine_t mach_host_server_routine(
3093 mach_msg_header_t *InHeadP);
3094
3095
3096 /* Description of this subsystem, for use in direct RPC */
3097 extern const struct mach_host_subsystem mach_host_subsystem;
3098 const struct mach_host_subsystem {
3099 mig_server_routine_t server; /* Server routine */
3100 mach_msg_id_t start; /* Min routine number */
3101 mach_msg_id_t end; /* Max routine number + 1 */
3102 unsigned int maxsize; /* Max msg size */
3103 vm_address_t reserved; /* Reserved */
3104 struct routine_descriptor /*Array of routine descriptors */
3105 routine[25];
3106 } mach_host_subsystem = {
3107 mach_host_server_routine,
3108 200,
3109 225,
3110 (mach_msg_size_t)sizeof(union __ReplyUnion__mach_host_subsystem),
3111 (vm_address_t)0,
3112 {
3113 { (mig_impl_routine_t) 0,
3114 (mig_stub_routine_t) _Xhost_info, 4, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__host_info_t) },
3115 { (mig_impl_routine_t) 0,
3116 (mig_stub_routine_t) _Xhost_kernel_version, 2, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__host_kernel_version_t) },
3117 { (mig_impl_routine_t) 0,
3118 (mig_stub_routine_t) _Xhost_page_size, 2, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__host_page_size_t) },
3119 { (mig_impl_routine_t) 0,
3120 (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) },
3121 { (mig_impl_routine_t) 0,
3122 (mig_stub_routine_t) _Xhost_processor_info, 5, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__host_processor_info_t) },
3123 {0, 0, 0, 0, 0, 0},
3124 { (mig_impl_routine_t) 0,
3125 (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) },
3126 {0, 0, 0, 0, 0, 0},
3127 {0, 0, 0, 0, 0, 0},
3128 { (mig_impl_routine_t) 0,
3129 (mig_stub_routine_t) _Xhost_virtual_physical_table_info, 3, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__host_virtual_physical_table_info_t) },
3130 {0, 0, 0, 0, 0, 0},
3131 {0, 0, 0, 0, 0, 0},
3132 {0, 0, 0, 0, 0, 0},
3133 { (mig_impl_routine_t) 0,
3134 (mig_stub_routine_t) _Xprocessor_set_default, 2, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__processor_set_default_t) },
3135 { (mig_impl_routine_t) 0,
3136 (mig_stub_routine_t) _Xprocessor_set_create, 3, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__processor_set_create_t) },
3137 { (mig_impl_routine_t) 0,
3138 (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) },
3139 { (mig_impl_routine_t) 0,
3140 (mig_stub_routine_t) _Xhost_statistics, 4, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__host_statistics_t) },
3141 { (mig_impl_routine_t) 0,
3142 (mig_stub_routine_t) _Xhost_request_notification, 3, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__host_request_notification_t) },
3143 {0, 0, 0, 0, 0, 0},
3144 { (mig_impl_routine_t) 0,
3145 (mig_stub_routine_t) _Xhost_statistics64, 4, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__host_statistics64_t) },
3146 { (mig_impl_routine_t) 0,
3147 (mig_stub_routine_t) _Xmach_zone_info, 5, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_zone_info_t) },
3148 {0, 0, 0, 0, 0, 0},
3149 { (mig_impl_routine_t) 0,
3150 (mig_stub_routine_t) _Xhost_create_mach_voucher, 4, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__host_create_mach_voucher_t) },
3151 { (mig_impl_routine_t) 0,
3152 (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) },
3153 { (mig_impl_routine_t) 0,
3154 (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) },
3155 }
3156 };
3157
mach_host_server(mach_msg_header_t * InHeadP,mach_msg_header_t * OutHeadP)3158 mig_external boolean_t mach_host_server
3159 (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
3160 {
3161 /*
3162 * typedef struct {
3163 * mach_msg_header_t Head;
3164 * NDR_record_t NDR;
3165 * kern_return_t RetCode;
3166 * } mig_reply_error_t;
3167 */
3168
3169 register mig_routine_t routine;
3170
3171 OutHeadP->msgh_bits = MACH_MSGH_BITS(MACH_MSGH_BITS_REPLY(InHeadP->msgh_bits), 0);
3172 OutHeadP->msgh_remote_port = InHeadP->msgh_reply_port;
3173 /* Minimal size: routine() will update it if different */
3174 OutHeadP->msgh_size = (mach_msg_size_t)sizeof(mig_reply_error_t);
3175 OutHeadP->msgh_local_port = MACH_PORT_NULL;
3176 OutHeadP->msgh_id = InHeadP->msgh_id + 100;
3177
3178 if ((InHeadP->msgh_id > 224) || (InHeadP->msgh_id < 200) ||
3179 ((routine = mach_host_subsystem.routine[InHeadP->msgh_id - 200].stub_routine) == 0)) {
3180 ((mig_reply_error_t *)OutHeadP)->NDR = NDR_record;
3181 ((mig_reply_error_t *)OutHeadP)->RetCode = MIG_BAD_ID;
3182 return FALSE;
3183 }
3184 (*routine) (InHeadP, OutHeadP);
3185 return TRUE;
3186 }
3187
mach_host_server_routine(mach_msg_header_t * InHeadP)3188 mig_external mig_routine_t mach_host_server_routine
3189 (mach_msg_header_t *InHeadP)
3190 {
3191 register int msgh_id;
3192
3193 msgh_id = InHeadP->msgh_id - 200;
3194
3195 if ((msgh_id > 24) || (msgh_id < 0))
3196 return 0;
3197
3198 return mach_host_subsystem.routine[msgh_id].stub_routine;
3199 }
3200