master
1#ifndef _vm_map_user_
2#define _vm_map_user_
3
4/* Module vm_map */
5
6#include <string.h>
7#include <mach/ndr.h>
8#include <mach/boolean.h>
9#include <mach/kern_return.h>
10#include <mach/notify.h>
11#include <mach/mach_types.h>
12#include <mach/message.h>
13#include <mach/mig_errors.h>
14#include <mach/port.h>
15
16/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
17
18#if defined(__has_include)
19#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
20#ifndef USING_MIG_STRNCPY_ZEROFILL
21#define USING_MIG_STRNCPY_ZEROFILL
22#endif
23#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
24#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
25#ifdef __cplusplus
26extern "C" {
27#endif
28#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS_CSTRING_ATTR
29#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS_CSTRING_COUNTEDBY_ATTR(C) __unsafe_indexable
30#endif
31 extern int mig_strncpy_zerofill(char * dest, const char * src, int len) __attribute__((weak_import));
32#ifdef __cplusplus
33}
34#endif
35#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
36#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
37#endif /* __has_include */
38
39/* END MIG_STRNCPY_ZEROFILL CODE */
40
41
42#ifdef AUTOTEST
43#ifndef FUNCTION_PTR_T
44#define FUNCTION_PTR_T
45typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
46typedef struct {
47 char * name;
48 function_ptr_t function;
49} function_table_entry;
50typedef function_table_entry *function_table_t;
51#endif /* FUNCTION_PTR_T */
52#endif /* AUTOTEST */
53
54#ifndef vm_map_MSG_COUNT
55#define vm_map_MSG_COUNT 33
56#endif /* vm_map_MSG_COUNT */
57
58#include <Availability.h>
59#include <mach/std_types.h>
60#include <mach/mig.h>
61#include <mach/mig.h>
62#include <mach/mach_types.h>
63#include <mach_debug/mach_debug_types.h>
64
65#ifdef __BeforeMigUserHeader
66__BeforeMigUserHeader
67#endif /* __BeforeMigUserHeader */
68
69#include <sys/cdefs.h>
70__BEGIN_DECLS
71
72
73/* Routine vm_region */
74#ifdef mig_external
75mig_external
76#else
77extern
78#endif /* mig_external */
79kern_return_t vm_region
80(
81 vm_map_read_t target_task,
82 vm_address_t *address,
83 vm_size_t *size,
84 vm_region_flavor_t flavor,
85 vm_region_info_t info,
86 mach_msg_type_number_t *infoCnt,
87 mach_port_t *object_name
88);
89
90/* Routine vm_allocate */
91#ifdef mig_external
92mig_external
93#else
94extern
95#endif /* mig_external */
96kern_return_t vm_allocate
97(
98 vm_map_t target_task,
99 vm_address_t *address,
100 vm_size_t size,
101 int flags
102);
103
104/* Routine vm_deallocate */
105#ifdef mig_external
106mig_external
107#else
108extern
109#endif /* mig_external */
110kern_return_t vm_deallocate
111(
112 vm_map_t target_task,
113 vm_address_t address,
114 vm_size_t size
115);
116
117/* Routine vm_protect */
118#ifdef mig_external
119mig_external
120#else
121extern
122#endif /* mig_external */
123kern_return_t vm_protect
124(
125 vm_map_t target_task,
126 vm_address_t address,
127 vm_size_t size,
128 boolean_t set_maximum,
129 vm_prot_t new_protection
130);
131
132/* Routine vm_inherit */
133#ifdef mig_external
134mig_external
135#else
136extern
137#endif /* mig_external */
138kern_return_t vm_inherit
139(
140 vm_map_t target_task,
141 vm_address_t address,
142 vm_size_t size,
143 vm_inherit_t new_inheritance
144);
145
146/* Routine vm_read */
147#ifdef mig_external
148mig_external
149#else
150extern
151#endif /* mig_external */
152kern_return_t vm_read
153(
154 vm_map_read_t target_task,
155 vm_address_t address,
156 vm_size_t size,
157 vm_offset_t *data,
158 mach_msg_type_number_t *dataCnt
159);
160
161/* Routine vm_read_list */
162#ifdef mig_external
163mig_external
164#else
165extern
166#endif /* mig_external */
167kern_return_t vm_read_list
168(
169 vm_map_read_t target_task,
170 vm_read_entry_t data_list,
171 natural_t count
172);
173
174/* Routine vm_write */
175#ifdef mig_external
176mig_external
177#else
178extern
179#endif /* mig_external */
180kern_return_t vm_write
181(
182 vm_map_t target_task,
183 vm_address_t address,
184 vm_offset_t data,
185 mach_msg_type_number_t dataCnt
186);
187
188/* Routine vm_copy */
189#ifdef mig_external
190mig_external
191#else
192extern
193#endif /* mig_external */
194kern_return_t vm_copy
195(
196 vm_map_t target_task,
197 vm_address_t source_address,
198 vm_size_t size,
199 vm_address_t dest_address
200);
201
202/* Routine vm_read_overwrite */
203#ifdef mig_external
204mig_external
205#else
206extern
207#endif /* mig_external */
208kern_return_t vm_read_overwrite
209(
210 vm_map_read_t target_task,
211 vm_address_t address,
212 vm_size_t size,
213 vm_address_t data,
214 vm_size_t *outsize
215);
216
217/* Routine vm_msync */
218#ifdef mig_external
219mig_external
220#else
221extern
222#endif /* mig_external */
223kern_return_t vm_msync
224(
225 vm_map_t target_task,
226 vm_address_t address,
227 vm_size_t size,
228 vm_sync_t sync_flags
229);
230
231/* Routine vm_behavior_set */
232#ifdef mig_external
233mig_external
234#else
235extern
236#endif /* mig_external */
237kern_return_t vm_behavior_set
238(
239 vm_map_t target_task,
240 vm_address_t address,
241 vm_size_t size,
242 vm_behavior_t new_behavior
243);
244
245/* Routine vm_map */
246#ifdef mig_external
247mig_external
248#else
249extern
250#endif /* mig_external */
251kern_return_t vm_map
252(
253 vm_map_t target_task,
254 vm_address_t *address,
255 vm_size_t size,
256 vm_address_t mask,
257 int flags,
258 mem_entry_name_port_t object,
259 vm_offset_t offset,
260 boolean_t copy,
261 vm_prot_t cur_protection,
262 vm_prot_t max_protection,
263 vm_inherit_t inheritance
264);
265
266/* Routine vm_machine_attribute */
267#ifdef mig_external
268mig_external
269#else
270extern
271#endif /* mig_external */
272kern_return_t vm_machine_attribute
273(
274 vm_map_t target_task,
275 vm_address_t address,
276 vm_size_t size,
277 vm_machine_attribute_t attribute,
278 vm_machine_attribute_val_t *value
279);
280
281/* Routine vm_remap */
282#ifdef mig_external
283mig_external
284#else
285extern
286#endif /* mig_external */
287kern_return_t vm_remap
288(
289 vm_map_t target_task,
290 vm_address_t *target_address,
291 vm_size_t size,
292 vm_address_t mask,
293 int flags,
294 vm_map_t src_task,
295 vm_address_t src_address,
296 boolean_t copy,
297 vm_prot_t *cur_protection,
298 vm_prot_t *max_protection,
299 vm_inherit_t inheritance
300);
301
302/* Routine task_wire */
303#ifdef mig_external
304mig_external
305#else
306extern
307#endif /* mig_external */
308__TVOS_PROHIBITED __WATCHOS_PROHIBITED
309kern_return_t task_wire
310(
311 vm_map_t target_task,
312 boolean_t must_wire
313);
314
315/* Routine mach_make_memory_entry */
316#ifdef mig_external
317mig_external
318#else
319extern
320#endif /* mig_external */
321kern_return_t mach_make_memory_entry
322(
323 vm_map_t target_task,
324 vm_size_t *size,
325 vm_offset_t offset,
326 vm_prot_t permission,
327 mem_entry_name_port_t *object_handle,
328 mem_entry_name_port_t parent_entry
329);
330
331/* Routine vm_map_page_query */
332#ifdef mig_external
333mig_external
334#else
335extern
336#endif /* mig_external */
337kern_return_t vm_map_page_query
338(
339 vm_map_read_t target_map,
340 vm_offset_t offset,
341 integer_t *disposition,
342 integer_t *ref_count
343);
344
345/* Routine mach_vm_region_info */
346#ifdef mig_external
347mig_external
348#else
349extern
350#endif /* mig_external */
351kern_return_t mach_vm_region_info
352(
353 vm_map_read_t task,
354 vm_address_t address,
355 vm_info_region_t *region,
356 vm_info_object_array_t *objects,
357 mach_msg_type_number_t *objectsCnt
358);
359
360/* Routine vm_mapped_pages_info */
361#ifdef mig_external
362mig_external
363#else
364extern
365#endif /* mig_external */
366kern_return_t vm_mapped_pages_info
367(
368 vm_map_read_t task,
369 page_address_array_t *pages,
370 mach_msg_type_number_t *pagesCnt
371);
372
373/* Routine vm_region_recurse */
374#ifdef mig_external
375mig_external
376#else
377extern
378#endif /* mig_external */
379kern_return_t vm_region_recurse
380(
381 vm_map_read_t target_task,
382 vm_address_t *address,
383 vm_size_t *size,
384 natural_t *nesting_depth,
385 vm_region_recurse_info_t info,
386 mach_msg_type_number_t *infoCnt
387);
388
389/* Routine vm_region_recurse_64 */
390#ifdef mig_external
391mig_external
392#else
393extern
394#endif /* mig_external */
395kern_return_t vm_region_recurse_64
396(
397 vm_map_read_t target_task,
398 vm_address_t *address,
399 vm_size_t *size,
400 natural_t *nesting_depth,
401 vm_region_recurse_info_t info,
402 mach_msg_type_number_t *infoCnt
403);
404
405/* Routine mach_vm_region_info_64 */
406#ifdef mig_external
407mig_external
408#else
409extern
410#endif /* mig_external */
411kern_return_t mach_vm_region_info_64
412(
413 vm_map_read_t task,
414 vm_address_t address,
415 vm_info_region_64_t *region,
416 vm_info_object_array_t *objects,
417 mach_msg_type_number_t *objectsCnt
418);
419
420/* Routine vm_region_64 */
421#ifdef mig_external
422mig_external
423#else
424extern
425#endif /* mig_external */
426kern_return_t vm_region_64
427(
428 vm_map_read_t target_task,
429 vm_address_t *address,
430 vm_size_t *size,
431 vm_region_flavor_t flavor,
432 vm_region_info_t info,
433 mach_msg_type_number_t *infoCnt,
434 mach_port_t *object_name
435);
436
437/* Routine mach_make_memory_entry_64 */
438#ifdef mig_external
439mig_external
440#else
441extern
442#endif /* mig_external */
443kern_return_t mach_make_memory_entry_64
444(
445 vm_map_t target_task,
446 memory_object_size_t *size,
447 memory_object_offset_t offset,
448 vm_prot_t permission,
449 mach_port_t *object_handle,
450 mem_entry_name_port_t parent_entry
451);
452
453/* Routine vm_map_64 */
454#ifdef mig_external
455mig_external
456#else
457extern
458#endif /* mig_external */
459kern_return_t vm_map_64
460(
461 vm_map_t target_task,
462 vm_address_t *address,
463 vm_size_t size,
464 vm_address_t mask,
465 int flags,
466 mem_entry_name_port_t object,
467 memory_object_offset_t offset,
468 boolean_t copy,
469 vm_prot_t cur_protection,
470 vm_prot_t max_protection,
471 vm_inherit_t inheritance
472);
473
474/* Routine vm_purgable_control */
475#ifdef mig_external
476mig_external
477#else
478extern
479#endif /* mig_external */
480kern_return_t vm_purgable_control
481(
482 vm_map_t target_task,
483 vm_address_t address,
484 vm_purgable_t control,
485 int *state
486);
487
488/* Routine vm_map_exec_lockdown */
489#ifdef mig_external
490mig_external
491#else
492extern
493#endif /* mig_external */
494kern_return_t vm_map_exec_lockdown
495(
496 vm_map_t target_task
497);
498
499/* Routine vm_remap_new */
500#ifdef mig_external
501mig_external
502#else
503extern
504#endif /* mig_external */
505kern_return_t vm_remap_new
506(
507 vm_map_t target_task,
508 vm_address_t *target_address,
509 vm_size_t size,
510 vm_address_t mask,
511 int flags,
512 vm_map_read_t src_task,
513 vm_address_t src_address,
514 boolean_t copy,
515 vm_prot_t *cur_protection,
516 vm_prot_t *max_protection,
517 vm_inherit_t inheritance
518);
519
520__END_DECLS
521
522/********************** Caution **************************/
523/* The following data types should be used to calculate */
524/* maximum message sizes only. The actual message may be */
525/* smaller, and the position of the arguments within the */
526/* message layout may vary from what is presented here. */
527/* For example, if any of the arguments are variable- */
528/* sized, and less than the maximum is sent, the data */
529/* will be packed tight in the actual message to reduce */
530/* the presence of holes. */
531/********************** Caution **************************/
532
533/* typedefs for all requests */
534
535#ifndef __Request__vm_map_subsystem__defined
536#define __Request__vm_map_subsystem__defined
537
538#ifdef __MigPackStructs
539#pragma pack(push, 4)
540#endif
541 typedef struct {
542 mach_msg_header_t Head;
543 NDR_record_t NDR;
544 vm_address_t address;
545 vm_region_flavor_t flavor;
546 mach_msg_type_number_t infoCnt;
547 } __Request__vm_region_t __attribute__((unused));
548#ifdef __MigPackStructs
549#pragma pack(pop)
550#endif
551
552#ifdef __MigPackStructs
553#pragma pack(push, 4)
554#endif
555 typedef struct {
556 mach_msg_header_t Head;
557 NDR_record_t NDR;
558 vm_address_t address;
559 vm_size_t size;
560 int flags;
561 } __Request__vm_allocate_t __attribute__((unused));
562#ifdef __MigPackStructs
563#pragma pack(pop)
564#endif
565
566#ifdef __MigPackStructs
567#pragma pack(push, 4)
568#endif
569 typedef struct {
570 mach_msg_header_t Head;
571 NDR_record_t NDR;
572 vm_address_t address;
573 vm_size_t size;
574 } __Request__vm_deallocate_t __attribute__((unused));
575#ifdef __MigPackStructs
576#pragma pack(pop)
577#endif
578
579#ifdef __MigPackStructs
580#pragma pack(push, 4)
581#endif
582 typedef struct {
583 mach_msg_header_t Head;
584 NDR_record_t NDR;
585 vm_address_t address;
586 vm_size_t size;
587 boolean_t set_maximum;
588 vm_prot_t new_protection;
589 } __Request__vm_protect_t __attribute__((unused));
590#ifdef __MigPackStructs
591#pragma pack(pop)
592#endif
593
594#ifdef __MigPackStructs
595#pragma pack(push, 4)
596#endif
597 typedef struct {
598 mach_msg_header_t Head;
599 NDR_record_t NDR;
600 vm_address_t address;
601 vm_size_t size;
602 vm_inherit_t new_inheritance;
603 } __Request__vm_inherit_t __attribute__((unused));
604#ifdef __MigPackStructs
605#pragma pack(pop)
606#endif
607
608#ifdef __MigPackStructs
609#pragma pack(push, 4)
610#endif
611 typedef struct {
612 mach_msg_header_t Head;
613 NDR_record_t NDR;
614 vm_address_t address;
615 vm_size_t size;
616 } __Request__vm_read_t __attribute__((unused));
617#ifdef __MigPackStructs
618#pragma pack(pop)
619#endif
620
621#ifdef __MigPackStructs
622#pragma pack(push, 4)
623#endif
624 typedef struct {
625 mach_msg_header_t Head;
626 NDR_record_t NDR;
627 vm_read_entry_t data_list;
628 natural_t count;
629 } __Request__vm_read_list_t __attribute__((unused));
630#ifdef __MigPackStructs
631#pragma pack(pop)
632#endif
633
634#ifdef __MigPackStructs
635#pragma pack(push, 4)
636#endif
637 typedef struct {
638 mach_msg_header_t Head;
639 /* start of the kernel processed data */
640 mach_msg_body_t msgh_body;
641 mach_msg_ool_descriptor_t data;
642 /* end of the kernel processed data */
643 NDR_record_t NDR;
644 vm_address_t address;
645 mach_msg_type_number_t dataCnt;
646 } __Request__vm_write_t __attribute__((unused));
647#ifdef __MigPackStructs
648#pragma pack(pop)
649#endif
650
651#ifdef __MigPackStructs
652#pragma pack(push, 4)
653#endif
654 typedef struct {
655 mach_msg_header_t Head;
656 NDR_record_t NDR;
657 vm_address_t source_address;
658 vm_size_t size;
659 vm_address_t dest_address;
660 } __Request__vm_copy_t __attribute__((unused));
661#ifdef __MigPackStructs
662#pragma pack(pop)
663#endif
664
665#ifdef __MigPackStructs
666#pragma pack(push, 4)
667#endif
668 typedef struct {
669 mach_msg_header_t Head;
670 NDR_record_t NDR;
671 vm_address_t address;
672 vm_size_t size;
673 vm_address_t data;
674 } __Request__vm_read_overwrite_t __attribute__((unused));
675#ifdef __MigPackStructs
676#pragma pack(pop)
677#endif
678
679#ifdef __MigPackStructs
680#pragma pack(push, 4)
681#endif
682 typedef struct {
683 mach_msg_header_t Head;
684 NDR_record_t NDR;
685 vm_address_t address;
686 vm_size_t size;
687 vm_sync_t sync_flags;
688 } __Request__vm_msync_t __attribute__((unused));
689#ifdef __MigPackStructs
690#pragma pack(pop)
691#endif
692
693#ifdef __MigPackStructs
694#pragma pack(push, 4)
695#endif
696 typedef struct {
697 mach_msg_header_t Head;
698 NDR_record_t NDR;
699 vm_address_t address;
700 vm_size_t size;
701 vm_behavior_t new_behavior;
702 } __Request__vm_behavior_set_t __attribute__((unused));
703#ifdef __MigPackStructs
704#pragma pack(pop)
705#endif
706
707#ifdef __MigPackStructs
708#pragma pack(push, 4)
709#endif
710 typedef struct {
711 mach_msg_header_t Head;
712 /* start of the kernel processed data */
713 mach_msg_body_t msgh_body;
714 mach_msg_port_descriptor_t object;
715 /* end of the kernel processed data */
716 NDR_record_t NDR;
717 vm_address_t address;
718 vm_size_t size;
719 vm_address_t mask;
720 int flags;
721 vm_offset_t offset;
722 boolean_t copy;
723 vm_prot_t cur_protection;
724 vm_prot_t max_protection;
725 vm_inherit_t inheritance;
726 } __Request__vm_map_t __attribute__((unused));
727#ifdef __MigPackStructs
728#pragma pack(pop)
729#endif
730
731#ifdef __MigPackStructs
732#pragma pack(push, 4)
733#endif
734 typedef struct {
735 mach_msg_header_t Head;
736 NDR_record_t NDR;
737 vm_address_t address;
738 vm_size_t size;
739 vm_machine_attribute_t attribute;
740 vm_machine_attribute_val_t value;
741 } __Request__vm_machine_attribute_t __attribute__((unused));
742#ifdef __MigPackStructs
743#pragma pack(pop)
744#endif
745
746#ifdef __MigPackStructs
747#pragma pack(push, 4)
748#endif
749 typedef struct {
750 mach_msg_header_t Head;
751 /* start of the kernel processed data */
752 mach_msg_body_t msgh_body;
753 mach_msg_port_descriptor_t src_task;
754 /* end of the kernel processed data */
755 NDR_record_t NDR;
756 vm_address_t target_address;
757 vm_size_t size;
758 vm_address_t mask;
759 int flags;
760 vm_address_t src_address;
761 boolean_t copy;
762 vm_inherit_t inheritance;
763 } __Request__vm_remap_t __attribute__((unused));
764#ifdef __MigPackStructs
765#pragma pack(pop)
766#endif
767
768#ifdef __MigPackStructs
769#pragma pack(push, 4)
770#endif
771 typedef struct {
772 mach_msg_header_t Head;
773 NDR_record_t NDR;
774 boolean_t must_wire;
775 } __Request__task_wire_t __attribute__((unused));
776#ifdef __MigPackStructs
777#pragma pack(pop)
778#endif
779
780#ifdef __MigPackStructs
781#pragma pack(push, 4)
782#endif
783 typedef struct {
784 mach_msg_header_t Head;
785 /* start of the kernel processed data */
786 mach_msg_body_t msgh_body;
787 mach_msg_port_descriptor_t parent_entry;
788 /* end of the kernel processed data */
789 NDR_record_t NDR;
790 vm_size_t size;
791 vm_offset_t offset;
792 vm_prot_t permission;
793 } __Request__mach_make_memory_entry_t __attribute__((unused));
794#ifdef __MigPackStructs
795#pragma pack(pop)
796#endif
797
798#ifdef __MigPackStructs
799#pragma pack(push, 4)
800#endif
801 typedef struct {
802 mach_msg_header_t Head;
803 NDR_record_t NDR;
804 vm_offset_t offset;
805 } __Request__vm_map_page_query_t __attribute__((unused));
806#ifdef __MigPackStructs
807#pragma pack(pop)
808#endif
809
810#ifdef __MigPackStructs
811#pragma pack(push, 4)
812#endif
813 typedef struct {
814 mach_msg_header_t Head;
815 NDR_record_t NDR;
816 vm_address_t address;
817 } __Request__mach_vm_region_info_t __attribute__((unused));
818#ifdef __MigPackStructs
819#pragma pack(pop)
820#endif
821
822#ifdef __MigPackStructs
823#pragma pack(push, 4)
824#endif
825 typedef struct {
826 mach_msg_header_t Head;
827 } __Request__vm_mapped_pages_info_t __attribute__((unused));
828#ifdef __MigPackStructs
829#pragma pack(pop)
830#endif
831
832#ifdef __MigPackStructs
833#pragma pack(push, 4)
834#endif
835 typedef struct {
836 mach_msg_header_t Head;
837 NDR_record_t NDR;
838 vm_address_t address;
839 natural_t nesting_depth;
840 mach_msg_type_number_t infoCnt;
841 } __Request__vm_region_recurse_t __attribute__((unused));
842#ifdef __MigPackStructs
843#pragma pack(pop)
844#endif
845
846#ifdef __MigPackStructs
847#pragma pack(push, 4)
848#endif
849 typedef struct {
850 mach_msg_header_t Head;
851 NDR_record_t NDR;
852 vm_address_t address;
853 natural_t nesting_depth;
854 mach_msg_type_number_t infoCnt;
855 } __Request__vm_region_recurse_64_t __attribute__((unused));
856#ifdef __MigPackStructs
857#pragma pack(pop)
858#endif
859
860#ifdef __MigPackStructs
861#pragma pack(push, 4)
862#endif
863 typedef struct {
864 mach_msg_header_t Head;
865 NDR_record_t NDR;
866 vm_address_t address;
867 } __Request__mach_vm_region_info_64_t __attribute__((unused));
868#ifdef __MigPackStructs
869#pragma pack(pop)
870#endif
871
872#ifdef __MigPackStructs
873#pragma pack(push, 4)
874#endif
875 typedef struct {
876 mach_msg_header_t Head;
877 NDR_record_t NDR;
878 vm_address_t address;
879 vm_region_flavor_t flavor;
880 mach_msg_type_number_t infoCnt;
881 } __Request__vm_region_64_t __attribute__((unused));
882#ifdef __MigPackStructs
883#pragma pack(pop)
884#endif
885
886#ifdef __MigPackStructs
887#pragma pack(push, 4)
888#endif
889 typedef struct {
890 mach_msg_header_t Head;
891 /* start of the kernel processed data */
892 mach_msg_body_t msgh_body;
893 mach_msg_port_descriptor_t parent_entry;
894 /* end of the kernel processed data */
895 NDR_record_t NDR;
896 memory_object_size_t size;
897 memory_object_offset_t offset;
898 vm_prot_t permission;
899 } __Request__mach_make_memory_entry_64_t __attribute__((unused));
900#ifdef __MigPackStructs
901#pragma pack(pop)
902#endif
903
904#ifdef __MigPackStructs
905#pragma pack(push, 4)
906#endif
907 typedef struct {
908 mach_msg_header_t Head;
909 /* start of the kernel processed data */
910 mach_msg_body_t msgh_body;
911 mach_msg_port_descriptor_t object;
912 /* end of the kernel processed data */
913 NDR_record_t NDR;
914 vm_address_t address;
915 vm_size_t size;
916 vm_address_t mask;
917 int flags;
918 memory_object_offset_t offset;
919 boolean_t copy;
920 vm_prot_t cur_protection;
921 vm_prot_t max_protection;
922 vm_inherit_t inheritance;
923 } __Request__vm_map_64_t __attribute__((unused));
924#ifdef __MigPackStructs
925#pragma pack(pop)
926#endif
927
928#ifdef __MigPackStructs
929#pragma pack(push, 4)
930#endif
931 typedef struct {
932 mach_msg_header_t Head;
933 NDR_record_t NDR;
934 vm_address_t address;
935 vm_purgable_t control;
936 int state;
937 } __Request__vm_purgable_control_t __attribute__((unused));
938#ifdef __MigPackStructs
939#pragma pack(pop)
940#endif
941
942#ifdef __MigPackStructs
943#pragma pack(push, 4)
944#endif
945 typedef struct {
946 mach_msg_header_t Head;
947 } __Request__vm_map_exec_lockdown_t __attribute__((unused));
948#ifdef __MigPackStructs
949#pragma pack(pop)
950#endif
951
952#ifdef __MigPackStructs
953#pragma pack(push, 4)
954#endif
955 typedef struct {
956 mach_msg_header_t Head;
957 /* start of the kernel processed data */
958 mach_msg_body_t msgh_body;
959 mach_msg_port_descriptor_t src_task;
960 /* end of the kernel processed data */
961 NDR_record_t NDR;
962 vm_address_t target_address;
963 vm_size_t size;
964 vm_address_t mask;
965 int flags;
966 vm_address_t src_address;
967 boolean_t copy;
968 vm_prot_t cur_protection;
969 vm_prot_t max_protection;
970 vm_inherit_t inheritance;
971 } __Request__vm_remap_new_t __attribute__((unused));
972#ifdef __MigPackStructs
973#pragma pack(pop)
974#endif
975#endif /* !__Request__vm_map_subsystem__defined */
976
977/* union of all requests */
978
979#ifndef __RequestUnion__vm_map_subsystem__defined
980#define __RequestUnion__vm_map_subsystem__defined
981union __RequestUnion__vm_map_subsystem {
982 __Request__vm_region_t Request_vm_region;
983 __Request__vm_allocate_t Request_vm_allocate;
984 __Request__vm_deallocate_t Request_vm_deallocate;
985 __Request__vm_protect_t Request_vm_protect;
986 __Request__vm_inherit_t Request_vm_inherit;
987 __Request__vm_read_t Request_vm_read;
988 __Request__vm_read_list_t Request_vm_read_list;
989 __Request__vm_write_t Request_vm_write;
990 __Request__vm_copy_t Request_vm_copy;
991 __Request__vm_read_overwrite_t Request_vm_read_overwrite;
992 __Request__vm_msync_t Request_vm_msync;
993 __Request__vm_behavior_set_t Request_vm_behavior_set;
994 __Request__vm_map_t Request_vm_map;
995 __Request__vm_machine_attribute_t Request_vm_machine_attribute;
996 __Request__vm_remap_t Request_vm_remap;
997 __Request__task_wire_t Request_task_wire;
998 __Request__mach_make_memory_entry_t Request_mach_make_memory_entry;
999 __Request__vm_map_page_query_t Request_vm_map_page_query;
1000 __Request__mach_vm_region_info_t Request_mach_vm_region_info;
1001 __Request__vm_mapped_pages_info_t Request_vm_mapped_pages_info;
1002 __Request__vm_region_recurse_t Request_vm_region_recurse;
1003 __Request__vm_region_recurse_64_t Request_vm_region_recurse_64;
1004 __Request__mach_vm_region_info_64_t Request_mach_vm_region_info_64;
1005 __Request__vm_region_64_t Request_vm_region_64;
1006 __Request__mach_make_memory_entry_64_t Request_mach_make_memory_entry_64;
1007 __Request__vm_map_64_t Request_vm_map_64;
1008 __Request__vm_purgable_control_t Request_vm_purgable_control;
1009 __Request__vm_map_exec_lockdown_t Request_vm_map_exec_lockdown;
1010 __Request__vm_remap_new_t Request_vm_remap_new;
1011};
1012#endif /* !__RequestUnion__vm_map_subsystem__defined */
1013/* typedefs for all replies */
1014
1015#ifndef __Reply__vm_map_subsystem__defined
1016#define __Reply__vm_map_subsystem__defined
1017
1018#ifdef __MigPackStructs
1019#pragma pack(push, 4)
1020#endif
1021 typedef struct {
1022 mach_msg_header_t Head;
1023 /* start of the kernel processed data */
1024 mach_msg_body_t msgh_body;
1025 mach_msg_port_descriptor_t object_name;
1026 /* end of the kernel processed data */
1027 NDR_record_t NDR;
1028 vm_address_t address;
1029 vm_size_t size;
1030 mach_msg_type_number_t infoCnt;
1031 int info[10];
1032 } __Reply__vm_region_t __attribute__((unused));
1033#ifdef __MigPackStructs
1034#pragma pack(pop)
1035#endif
1036
1037#ifdef __MigPackStructs
1038#pragma pack(push, 4)
1039#endif
1040 typedef struct {
1041 mach_msg_header_t Head;
1042 NDR_record_t NDR;
1043 kern_return_t RetCode;
1044 vm_address_t address;
1045 } __Reply__vm_allocate_t __attribute__((unused));
1046#ifdef __MigPackStructs
1047#pragma pack(pop)
1048#endif
1049
1050#ifdef __MigPackStructs
1051#pragma pack(push, 4)
1052#endif
1053 typedef struct {
1054 mach_msg_header_t Head;
1055 NDR_record_t NDR;
1056 kern_return_t RetCode;
1057 } __Reply__vm_deallocate_t __attribute__((unused));
1058#ifdef __MigPackStructs
1059#pragma pack(pop)
1060#endif
1061
1062#ifdef __MigPackStructs
1063#pragma pack(push, 4)
1064#endif
1065 typedef struct {
1066 mach_msg_header_t Head;
1067 NDR_record_t NDR;
1068 kern_return_t RetCode;
1069 } __Reply__vm_protect_t __attribute__((unused));
1070#ifdef __MigPackStructs
1071#pragma pack(pop)
1072#endif
1073
1074#ifdef __MigPackStructs
1075#pragma pack(push, 4)
1076#endif
1077 typedef struct {
1078 mach_msg_header_t Head;
1079 NDR_record_t NDR;
1080 kern_return_t RetCode;
1081 } __Reply__vm_inherit_t __attribute__((unused));
1082#ifdef __MigPackStructs
1083#pragma pack(pop)
1084#endif
1085
1086#ifdef __MigPackStructs
1087#pragma pack(push, 4)
1088#endif
1089 typedef struct {
1090 mach_msg_header_t Head;
1091 /* start of the kernel processed data */
1092 mach_msg_body_t msgh_body;
1093 mach_msg_ool_descriptor_t data;
1094 /* end of the kernel processed data */
1095 NDR_record_t NDR;
1096 mach_msg_type_number_t dataCnt;
1097 } __Reply__vm_read_t __attribute__((unused));
1098#ifdef __MigPackStructs
1099#pragma pack(pop)
1100#endif
1101
1102#ifdef __MigPackStructs
1103#pragma pack(push, 4)
1104#endif
1105 typedef struct {
1106 mach_msg_header_t Head;
1107 NDR_record_t NDR;
1108 kern_return_t RetCode;
1109 vm_read_entry_t data_list;
1110 } __Reply__vm_read_list_t __attribute__((unused));
1111#ifdef __MigPackStructs
1112#pragma pack(pop)
1113#endif
1114
1115#ifdef __MigPackStructs
1116#pragma pack(push, 4)
1117#endif
1118 typedef struct {
1119 mach_msg_header_t Head;
1120 NDR_record_t NDR;
1121 kern_return_t RetCode;
1122 } __Reply__vm_write_t __attribute__((unused));
1123#ifdef __MigPackStructs
1124#pragma pack(pop)
1125#endif
1126
1127#ifdef __MigPackStructs
1128#pragma pack(push, 4)
1129#endif
1130 typedef struct {
1131 mach_msg_header_t Head;
1132 NDR_record_t NDR;
1133 kern_return_t RetCode;
1134 } __Reply__vm_copy_t __attribute__((unused));
1135#ifdef __MigPackStructs
1136#pragma pack(pop)
1137#endif
1138
1139#ifdef __MigPackStructs
1140#pragma pack(push, 4)
1141#endif
1142 typedef struct {
1143 mach_msg_header_t Head;
1144 NDR_record_t NDR;
1145 kern_return_t RetCode;
1146 vm_size_t outsize;
1147 } __Reply__vm_read_overwrite_t __attribute__((unused));
1148#ifdef __MigPackStructs
1149#pragma pack(pop)
1150#endif
1151
1152#ifdef __MigPackStructs
1153#pragma pack(push, 4)
1154#endif
1155 typedef struct {
1156 mach_msg_header_t Head;
1157 NDR_record_t NDR;
1158 kern_return_t RetCode;
1159 } __Reply__vm_msync_t __attribute__((unused));
1160#ifdef __MigPackStructs
1161#pragma pack(pop)
1162#endif
1163
1164#ifdef __MigPackStructs
1165#pragma pack(push, 4)
1166#endif
1167 typedef struct {
1168 mach_msg_header_t Head;
1169 NDR_record_t NDR;
1170 kern_return_t RetCode;
1171 } __Reply__vm_behavior_set_t __attribute__((unused));
1172#ifdef __MigPackStructs
1173#pragma pack(pop)
1174#endif
1175
1176#ifdef __MigPackStructs
1177#pragma pack(push, 4)
1178#endif
1179 typedef struct {
1180 mach_msg_header_t Head;
1181 NDR_record_t NDR;
1182 kern_return_t RetCode;
1183 vm_address_t address;
1184 } __Reply__vm_map_t __attribute__((unused));
1185#ifdef __MigPackStructs
1186#pragma pack(pop)
1187#endif
1188
1189#ifdef __MigPackStructs
1190#pragma pack(push, 4)
1191#endif
1192 typedef struct {
1193 mach_msg_header_t Head;
1194 NDR_record_t NDR;
1195 kern_return_t RetCode;
1196 vm_machine_attribute_val_t value;
1197 } __Reply__vm_machine_attribute_t __attribute__((unused));
1198#ifdef __MigPackStructs
1199#pragma pack(pop)
1200#endif
1201
1202#ifdef __MigPackStructs
1203#pragma pack(push, 4)
1204#endif
1205 typedef struct {
1206 mach_msg_header_t Head;
1207 NDR_record_t NDR;
1208 kern_return_t RetCode;
1209 vm_address_t target_address;
1210 vm_prot_t cur_protection;
1211 vm_prot_t max_protection;
1212 } __Reply__vm_remap_t __attribute__((unused));
1213#ifdef __MigPackStructs
1214#pragma pack(pop)
1215#endif
1216
1217#ifdef __MigPackStructs
1218#pragma pack(push, 4)
1219#endif
1220 typedef struct {
1221 mach_msg_header_t Head;
1222 NDR_record_t NDR;
1223 kern_return_t RetCode;
1224 } __Reply__task_wire_t __attribute__((unused));
1225#ifdef __MigPackStructs
1226#pragma pack(pop)
1227#endif
1228
1229#ifdef __MigPackStructs
1230#pragma pack(push, 4)
1231#endif
1232 typedef struct {
1233 mach_msg_header_t Head;
1234 /* start of the kernel processed data */
1235 mach_msg_body_t msgh_body;
1236 mach_msg_port_descriptor_t object_handle;
1237 /* end of the kernel processed data */
1238 NDR_record_t NDR;
1239 vm_size_t size;
1240 } __Reply__mach_make_memory_entry_t __attribute__((unused));
1241#ifdef __MigPackStructs
1242#pragma pack(pop)
1243#endif
1244
1245#ifdef __MigPackStructs
1246#pragma pack(push, 4)
1247#endif
1248 typedef struct {
1249 mach_msg_header_t Head;
1250 NDR_record_t NDR;
1251 kern_return_t RetCode;
1252 integer_t disposition;
1253 integer_t ref_count;
1254 } __Reply__vm_map_page_query_t __attribute__((unused));
1255#ifdef __MigPackStructs
1256#pragma pack(pop)
1257#endif
1258
1259#ifdef __MigPackStructs
1260#pragma pack(push, 4)
1261#endif
1262 typedef struct {
1263 mach_msg_header_t Head;
1264 /* start of the kernel processed data */
1265 mach_msg_body_t msgh_body;
1266 mach_msg_ool_descriptor_t objects;
1267 /* end of the kernel processed data */
1268 NDR_record_t NDR;
1269 vm_info_region_t region;
1270 mach_msg_type_number_t objectsCnt;
1271 } __Reply__mach_vm_region_info_t __attribute__((unused));
1272#ifdef __MigPackStructs
1273#pragma pack(pop)
1274#endif
1275
1276#ifdef __MigPackStructs
1277#pragma pack(push, 4)
1278#endif
1279 typedef struct {
1280 mach_msg_header_t Head;
1281 /* start of the kernel processed data */
1282 mach_msg_body_t msgh_body;
1283 mach_msg_ool_descriptor_t pages;
1284 /* end of the kernel processed data */
1285 NDR_record_t NDR;
1286 mach_msg_type_number_t pagesCnt;
1287 } __Reply__vm_mapped_pages_info_t __attribute__((unused));
1288#ifdef __MigPackStructs
1289#pragma pack(pop)
1290#endif
1291
1292#ifdef __MigPackStructs
1293#pragma pack(push, 4)
1294#endif
1295 typedef struct {
1296 mach_msg_header_t Head;
1297 NDR_record_t NDR;
1298 kern_return_t RetCode;
1299 vm_address_t address;
1300 vm_size_t size;
1301 natural_t nesting_depth;
1302 mach_msg_type_number_t infoCnt;
1303 int info[19];
1304 } __Reply__vm_region_recurse_t __attribute__((unused));
1305#ifdef __MigPackStructs
1306#pragma pack(pop)
1307#endif
1308
1309#ifdef __MigPackStructs
1310#pragma pack(push, 4)
1311#endif
1312 typedef struct {
1313 mach_msg_header_t Head;
1314 NDR_record_t NDR;
1315 kern_return_t RetCode;
1316 vm_address_t address;
1317 vm_size_t size;
1318 natural_t nesting_depth;
1319 mach_msg_type_number_t infoCnt;
1320 int info[19];
1321 } __Reply__vm_region_recurse_64_t __attribute__((unused));
1322#ifdef __MigPackStructs
1323#pragma pack(pop)
1324#endif
1325
1326#ifdef __MigPackStructs
1327#pragma pack(push, 4)
1328#endif
1329 typedef struct {
1330 mach_msg_header_t Head;
1331 /* start of the kernel processed data */
1332 mach_msg_body_t msgh_body;
1333 mach_msg_ool_descriptor_t objects;
1334 /* end of the kernel processed data */
1335 NDR_record_t NDR;
1336 vm_info_region_64_t region;
1337 mach_msg_type_number_t objectsCnt;
1338 } __Reply__mach_vm_region_info_64_t __attribute__((unused));
1339#ifdef __MigPackStructs
1340#pragma pack(pop)
1341#endif
1342
1343#ifdef __MigPackStructs
1344#pragma pack(push, 4)
1345#endif
1346 typedef struct {
1347 mach_msg_header_t Head;
1348 /* start of the kernel processed data */
1349 mach_msg_body_t msgh_body;
1350 mach_msg_port_descriptor_t object_name;
1351 /* end of the kernel processed data */
1352 NDR_record_t NDR;
1353 vm_address_t address;
1354 vm_size_t size;
1355 mach_msg_type_number_t infoCnt;
1356 int info[10];
1357 } __Reply__vm_region_64_t __attribute__((unused));
1358#ifdef __MigPackStructs
1359#pragma pack(pop)
1360#endif
1361
1362#ifdef __MigPackStructs
1363#pragma pack(push, 4)
1364#endif
1365 typedef struct {
1366 mach_msg_header_t Head;
1367 /* start of the kernel processed data */
1368 mach_msg_body_t msgh_body;
1369 mach_msg_port_descriptor_t object_handle;
1370 /* end of the kernel processed data */
1371 NDR_record_t NDR;
1372 memory_object_size_t size;
1373 } __Reply__mach_make_memory_entry_64_t __attribute__((unused));
1374#ifdef __MigPackStructs
1375#pragma pack(pop)
1376#endif
1377
1378#ifdef __MigPackStructs
1379#pragma pack(push, 4)
1380#endif
1381 typedef struct {
1382 mach_msg_header_t Head;
1383 NDR_record_t NDR;
1384 kern_return_t RetCode;
1385 vm_address_t address;
1386 } __Reply__vm_map_64_t __attribute__((unused));
1387#ifdef __MigPackStructs
1388#pragma pack(pop)
1389#endif
1390
1391#ifdef __MigPackStructs
1392#pragma pack(push, 4)
1393#endif
1394 typedef struct {
1395 mach_msg_header_t Head;
1396 NDR_record_t NDR;
1397 kern_return_t RetCode;
1398 int state;
1399 } __Reply__vm_purgable_control_t __attribute__((unused));
1400#ifdef __MigPackStructs
1401#pragma pack(pop)
1402#endif
1403
1404#ifdef __MigPackStructs
1405#pragma pack(push, 4)
1406#endif
1407 typedef struct {
1408 mach_msg_header_t Head;
1409 NDR_record_t NDR;
1410 kern_return_t RetCode;
1411 } __Reply__vm_map_exec_lockdown_t __attribute__((unused));
1412#ifdef __MigPackStructs
1413#pragma pack(pop)
1414#endif
1415
1416#ifdef __MigPackStructs
1417#pragma pack(push, 4)
1418#endif
1419 typedef struct {
1420 mach_msg_header_t Head;
1421 NDR_record_t NDR;
1422 kern_return_t RetCode;
1423 vm_address_t target_address;
1424 vm_prot_t cur_protection;
1425 vm_prot_t max_protection;
1426 } __Reply__vm_remap_new_t __attribute__((unused));
1427#ifdef __MigPackStructs
1428#pragma pack(pop)
1429#endif
1430#endif /* !__Reply__vm_map_subsystem__defined */
1431
1432/* union of all replies */
1433
1434#ifndef __ReplyUnion__vm_map_subsystem__defined
1435#define __ReplyUnion__vm_map_subsystem__defined
1436union __ReplyUnion__vm_map_subsystem {
1437 __Reply__vm_region_t Reply_vm_region;
1438 __Reply__vm_allocate_t Reply_vm_allocate;
1439 __Reply__vm_deallocate_t Reply_vm_deallocate;
1440 __Reply__vm_protect_t Reply_vm_protect;
1441 __Reply__vm_inherit_t Reply_vm_inherit;
1442 __Reply__vm_read_t Reply_vm_read;
1443 __Reply__vm_read_list_t Reply_vm_read_list;
1444 __Reply__vm_write_t Reply_vm_write;
1445 __Reply__vm_copy_t Reply_vm_copy;
1446 __Reply__vm_read_overwrite_t Reply_vm_read_overwrite;
1447 __Reply__vm_msync_t Reply_vm_msync;
1448 __Reply__vm_behavior_set_t Reply_vm_behavior_set;
1449 __Reply__vm_map_t Reply_vm_map;
1450 __Reply__vm_machine_attribute_t Reply_vm_machine_attribute;
1451 __Reply__vm_remap_t Reply_vm_remap;
1452 __Reply__task_wire_t Reply_task_wire;
1453 __Reply__mach_make_memory_entry_t Reply_mach_make_memory_entry;
1454 __Reply__vm_map_page_query_t Reply_vm_map_page_query;
1455 __Reply__mach_vm_region_info_t Reply_mach_vm_region_info;
1456 __Reply__vm_mapped_pages_info_t Reply_vm_mapped_pages_info;
1457 __Reply__vm_region_recurse_t Reply_vm_region_recurse;
1458 __Reply__vm_region_recurse_64_t Reply_vm_region_recurse_64;
1459 __Reply__mach_vm_region_info_64_t Reply_mach_vm_region_info_64;
1460 __Reply__vm_region_64_t Reply_vm_region_64;
1461 __Reply__mach_make_memory_entry_64_t Reply_mach_make_memory_entry_64;
1462 __Reply__vm_map_64_t Reply_vm_map_64;
1463 __Reply__vm_purgable_control_t Reply_vm_purgable_control;
1464 __Reply__vm_map_exec_lockdown_t Reply_vm_map_exec_lockdown;
1465 __Reply__vm_remap_new_t Reply_vm_remap_new;
1466};
1467#endif /* !__RequestUnion__vm_map_subsystem__defined */
1468
1469#ifndef subsystem_to_name_map_vm_map
1470#define subsystem_to_name_map_vm_map \
1471 { "vm_region", 3800 },\
1472 { "vm_allocate", 3801 },\
1473 { "vm_deallocate", 3802 },\
1474 { "vm_protect", 3803 },\
1475 { "vm_inherit", 3804 },\
1476 { "vm_read", 3805 },\
1477 { "vm_read_list", 3806 },\
1478 { "vm_write", 3807 },\
1479 { "vm_copy", 3808 },\
1480 { "vm_read_overwrite", 3809 },\
1481 { "vm_msync", 3810 },\
1482 { "vm_behavior_set", 3811 },\
1483 { "vm_map", 3812 },\
1484 { "vm_machine_attribute", 3813 },\
1485 { "vm_remap", 3814 },\
1486 { "task_wire", 3815 },\
1487 { "mach_make_memory_entry", 3816 },\
1488 { "vm_map_page_query", 3817 },\
1489 { "mach_vm_region_info", 3818 },\
1490 { "vm_mapped_pages_info", 3819 },\
1491 { "vm_region_recurse", 3821 },\
1492 { "vm_region_recurse_64", 3822 },\
1493 { "mach_vm_region_info_64", 3823 },\
1494 { "vm_region_64", 3824 },\
1495 { "mach_make_memory_entry_64", 3825 },\
1496 { "vm_map_64", 3826 },\
1497 { "vm_purgable_control", 3830 },\
1498 { "vm_map_exec_lockdown", 3831 },\
1499 { "vm_remap_new", 3832 }
1500#endif
1501
1502#ifdef __AfterMigUserHeader
1503__AfterMigUserHeader
1504#endif /* __AfterMigUserHeader */
1505
1506#endif /* _vm_map_user_ */