1#ifndef _mach_vm_user_
2#define _mach_vm_user_
3
4/* Module mach_vm */
5
6#include <string.h>
7#include <mach/ndr.h>
8#include <mach/boolean.h>
9#include <mach/kern_return.h>
10#include <mach/notify.h>
11#include <mach/mach_types.h>
12#include <mach/message.h>
13#include <mach/mig_errors.h>
14#include <mach/port.h>
15
16/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
17
18#if defined(__has_include)
19#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
20#ifndef USING_MIG_STRNCPY_ZEROFILL
21#define USING_MIG_STRNCPY_ZEROFILL
22#endif
23#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
24#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
25#ifdef __cplusplus
26extern "C" {
27#endif
28 extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
29#ifdef __cplusplus
30}
31#endif
32#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
33#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
34#endif /* __has_include */
35
36/* END MIG_STRNCPY_ZEROFILL CODE */
37
38
39#ifdef AUTOTEST
40#ifndef FUNCTION_PTR_T
41#define FUNCTION_PTR_T
42typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
43typedef struct {
44 char *name;
45 function_ptr_t function;
46} function_table_entry;
47typedef function_table_entry *function_table_t;
48#endif /* FUNCTION_PTR_T */
49#endif /* AUTOTEST */
50
51#ifndef mach_vm_MSG_COUNT
52#define mach_vm_MSG_COUNT 21
53#endif /* mach_vm_MSG_COUNT */
54
55#include <mach/std_types.h>
56#include <mach/mig.h>
57#include <mach/mig.h>
58#include <mach/mach_types.h>
59#include <mach_debug/mach_debug_types.h>
60
61#ifdef __BeforeMigUserHeader
62__BeforeMigUserHeader
63#endif /* __BeforeMigUserHeader */
64
65#include <sys/cdefs.h>
66__BEGIN_DECLS
67
68
69/* Routine mach_vm_allocate */
70#ifdef mig_external
71mig_external
72#else
73extern
74#endif /* mig_external */
75kern_return_t mach_vm_allocate
76(
77 vm_map_t target,
78 mach_vm_address_t *address,
79 mach_vm_size_t size,
80 int flags
81);
82
83/* Routine mach_vm_deallocate */
84#ifdef mig_external
85mig_external
86#else
87extern
88#endif /* mig_external */
89kern_return_t mach_vm_deallocate
90(
91 vm_map_t target,
92 mach_vm_address_t address,
93 mach_vm_size_t size
94);
95
96/* Routine mach_vm_protect */
97#ifdef mig_external
98mig_external
99#else
100extern
101#endif /* mig_external */
102kern_return_t mach_vm_protect
103(
104 vm_map_t target_task,
105 mach_vm_address_t address,
106 mach_vm_size_t size,
107 boolean_t set_maximum,
108 vm_prot_t new_protection
109);
110
111/* Routine mach_vm_inherit */
112#ifdef mig_external
113mig_external
114#else
115extern
116#endif /* mig_external */
117kern_return_t mach_vm_inherit
118(
119 vm_map_t target_task,
120 mach_vm_address_t address,
121 mach_vm_size_t size,
122 vm_inherit_t new_inheritance
123);
124
125/* Routine mach_vm_read */
126#ifdef mig_external
127mig_external
128#else
129extern
130#endif /* mig_external */
131kern_return_t mach_vm_read
132(
133 vm_map_t target_task,
134 mach_vm_address_t address,
135 mach_vm_size_t size,
136 vm_offset_t *data,
137 mach_msg_type_number_t *dataCnt
138);
139
140/* Routine mach_vm_read_list */
141#ifdef mig_external
142mig_external
143#else
144extern
145#endif /* mig_external */
146kern_return_t mach_vm_read_list
147(
148 vm_map_t target_task,
149 mach_vm_read_entry_t data_list,
150 natural_t count
151);
152
153/* Routine mach_vm_write */
154#ifdef mig_external
155mig_external
156#else
157extern
158#endif /* mig_external */
159kern_return_t mach_vm_write
160(
161 vm_map_t target_task,
162 mach_vm_address_t address,
163 vm_offset_t data,
164 mach_msg_type_number_t dataCnt
165);
166
167/* Routine mach_vm_copy */
168#ifdef mig_external
169mig_external
170#else
171extern
172#endif /* mig_external */
173kern_return_t mach_vm_copy
174(
175 vm_map_t target_task,
176 mach_vm_address_t source_address,
177 mach_vm_size_t size,
178 mach_vm_address_t dest_address
179);
180
181/* Routine mach_vm_read_overwrite */
182#ifdef mig_external
183mig_external
184#else
185extern
186#endif /* mig_external */
187kern_return_t mach_vm_read_overwrite
188(
189 vm_map_t target_task,
190 mach_vm_address_t address,
191 mach_vm_size_t size,
192 mach_vm_address_t data,
193 mach_vm_size_t *outsize
194);
195
196/* Routine mach_vm_msync */
197#ifdef mig_external
198mig_external
199#else
200extern
201#endif /* mig_external */
202kern_return_t mach_vm_msync
203(
204 vm_map_t target_task,
205 mach_vm_address_t address,
206 mach_vm_size_t size,
207 vm_sync_t sync_flags
208);
209
210/* Routine mach_vm_behavior_set */
211#ifdef mig_external
212mig_external
213#else
214extern
215#endif /* mig_external */
216kern_return_t mach_vm_behavior_set
217(
218 vm_map_t target_task,
219 mach_vm_address_t address,
220 mach_vm_size_t size,
221 vm_behavior_t new_behavior
222);
223
224/* Routine mach_vm_map */
225#ifdef mig_external
226mig_external
227#else
228extern
229#endif /* mig_external */
230kern_return_t mach_vm_map
231(
232 vm_map_t target_task,
233 mach_vm_address_t *address,
234 mach_vm_size_t size,
235 mach_vm_offset_t mask,
236 int flags,
237 mem_entry_name_port_t object,
238 memory_object_offset_t offset,
239 boolean_t copy,
240 vm_prot_t cur_protection,
241 vm_prot_t max_protection,
242 vm_inherit_t inheritance
243);
244
245/* Routine mach_vm_machine_attribute */
246#ifdef mig_external
247mig_external
248#else
249extern
250#endif /* mig_external */
251kern_return_t mach_vm_machine_attribute
252(
253 vm_map_t target_task,
254 mach_vm_address_t address,
255 mach_vm_size_t size,
256 vm_machine_attribute_t attribute,
257 vm_machine_attribute_val_t *value
258);
259
260/* Routine mach_vm_remap */
261#ifdef mig_external
262mig_external
263#else
264extern
265#endif /* mig_external */
266kern_return_t mach_vm_remap
267(
268 vm_map_t target_task,
269 mach_vm_address_t *target_address,
270 mach_vm_size_t size,
271 mach_vm_offset_t mask,
272 int flags,
273 vm_map_t src_task,
274 mach_vm_address_t src_address,
275 boolean_t copy,
276 vm_prot_t *cur_protection,
277 vm_prot_t *max_protection,
278 vm_inherit_t inheritance
279);
280
281/* Routine mach_vm_page_query */
282#ifdef mig_external
283mig_external
284#else
285extern
286#endif /* mig_external */
287kern_return_t mach_vm_page_query
288(
289 vm_map_t target_map,
290 mach_vm_offset_t offset,
291 integer_t *disposition,
292 integer_t *ref_count
293);
294
295/* Routine mach_vm_region_recurse */
296#ifdef mig_external
297mig_external
298#else
299extern
300#endif /* mig_external */
301kern_return_t mach_vm_region_recurse
302(
303 vm_map_t target_task,
304 mach_vm_address_t *address,
305 mach_vm_size_t *size,
306 natural_t *nesting_depth,
307 vm_region_recurse_info_t info,
308 mach_msg_type_number_t *infoCnt
309);
310
311/* Routine mach_vm_region */
312#ifdef mig_external
313mig_external
314#else
315extern
316#endif /* mig_external */
317kern_return_t mach_vm_region
318(
319 vm_map_t target_task,
320 mach_vm_address_t *address,
321 mach_vm_size_t *size,
322 vm_region_flavor_t flavor,
323 vm_region_info_t info,
324 mach_msg_type_number_t *infoCnt,
325 mach_port_t *object_name
326);
327
328/* Routine _mach_make_memory_entry */
329#ifdef mig_external
330mig_external
331#else
332extern
333#endif /* mig_external */
334kern_return_t _mach_make_memory_entry
335(
336 vm_map_t target_task,
337 memory_object_size_t *size,
338 memory_object_offset_t offset,
339 vm_prot_t permission,
340 mem_entry_name_port_t *object_handle,
341 mem_entry_name_port_t parent_handle
342);
343
344/* Routine mach_vm_purgable_control */
345#ifdef mig_external
346mig_external
347#else
348extern
349#endif /* mig_external */
350kern_return_t mach_vm_purgable_control
351(
352 vm_map_t target_task,
353 mach_vm_address_t address,
354 vm_purgable_t control,
355 int *state
356);
357
358/* Routine mach_vm_page_info */
359#ifdef mig_external
360mig_external
361#else
362extern
363#endif /* mig_external */
364kern_return_t mach_vm_page_info
365(
366 vm_map_t target_task,
367 mach_vm_address_t address,
368 vm_page_info_flavor_t flavor,
369 vm_page_info_t info,
370 mach_msg_type_number_t *infoCnt
371);
372
373/* Routine mach_vm_page_range_query */
374#ifdef mig_external
375mig_external
376#else
377extern
378#endif /* mig_external */
379kern_return_t mach_vm_page_range_query
380(
381 vm_map_t target_map,
382 mach_vm_offset_t address,
383 mach_vm_size_t size,
384 mach_vm_address_t dispositions,
385 mach_vm_size_t *dispositions_count
386);
387
388__END_DECLS
389
390/********************** Caution **************************/
391/* The following data types should be used to calculate */
392/* maximum message sizes only. The actual message may be */
393/* smaller, and the position of the arguments within the */
394/* message layout may vary from what is presented here. */
395/* For example, if any of the arguments are variable- */
396/* sized, and less than the maximum is sent, the data */
397/* will be packed tight in the actual message to reduce */
398/* the presence of holes. */
399/********************** Caution **************************/
400
401/* typedefs for all requests */
402
403#ifndef __Request__mach_vm_subsystem__defined
404#define __Request__mach_vm_subsystem__defined
405
406#ifdef __MigPackStructs
407#pragma pack(4)
408#endif
409 typedef struct {
410 mach_msg_header_t Head;
411 NDR_record_t NDR;
412 mach_vm_address_t address;
413 mach_vm_size_t size;
414 int flags;
415 } __Request__mach_vm_allocate_t __attribute__((unused));
416#ifdef __MigPackStructs
417#pragma pack()
418#endif
419
420#ifdef __MigPackStructs
421#pragma pack(4)
422#endif
423 typedef struct {
424 mach_msg_header_t Head;
425 NDR_record_t NDR;
426 mach_vm_address_t address;
427 mach_vm_size_t size;
428 } __Request__mach_vm_deallocate_t __attribute__((unused));
429#ifdef __MigPackStructs
430#pragma pack()
431#endif
432
433#ifdef __MigPackStructs
434#pragma pack(4)
435#endif
436 typedef struct {
437 mach_msg_header_t Head;
438 NDR_record_t NDR;
439 mach_vm_address_t address;
440 mach_vm_size_t size;
441 boolean_t set_maximum;
442 vm_prot_t new_protection;
443 } __Request__mach_vm_protect_t __attribute__((unused));
444#ifdef __MigPackStructs
445#pragma pack()
446#endif
447
448#ifdef __MigPackStructs
449#pragma pack(4)
450#endif
451 typedef struct {
452 mach_msg_header_t Head;
453 NDR_record_t NDR;
454 mach_vm_address_t address;
455 mach_vm_size_t size;
456 vm_inherit_t new_inheritance;
457 } __Request__mach_vm_inherit_t __attribute__((unused));
458#ifdef __MigPackStructs
459#pragma pack()
460#endif
461
462#ifdef __MigPackStructs
463#pragma pack(4)
464#endif
465 typedef struct {
466 mach_msg_header_t Head;
467 NDR_record_t NDR;
468 mach_vm_address_t address;
469 mach_vm_size_t size;
470 } __Request__mach_vm_read_t __attribute__((unused));
471#ifdef __MigPackStructs
472#pragma pack()
473#endif
474
475#ifdef __MigPackStructs
476#pragma pack(4)
477#endif
478 typedef struct {
479 mach_msg_header_t Head;
480 NDR_record_t NDR;
481 mach_vm_read_entry_t data_list;
482 natural_t count;
483 } __Request__mach_vm_read_list_t __attribute__((unused));
484#ifdef __MigPackStructs
485#pragma pack()
486#endif
487
488#ifdef __MigPackStructs
489#pragma pack(4)
490#endif
491 typedef struct {
492 mach_msg_header_t Head;
493 /* start of the kernel processed data */
494 mach_msg_body_t msgh_body;
495 mach_msg_ool_descriptor_t data;
496 /* end of the kernel processed data */
497 NDR_record_t NDR;
498 mach_vm_address_t address;
499 mach_msg_type_number_t dataCnt;
500 } __Request__mach_vm_write_t __attribute__((unused));
501#ifdef __MigPackStructs
502#pragma pack()
503#endif
504
505#ifdef __MigPackStructs
506#pragma pack(4)
507#endif
508 typedef struct {
509 mach_msg_header_t Head;
510 NDR_record_t NDR;
511 mach_vm_address_t source_address;
512 mach_vm_size_t size;
513 mach_vm_address_t dest_address;
514 } __Request__mach_vm_copy_t __attribute__((unused));
515#ifdef __MigPackStructs
516#pragma pack()
517#endif
518
519#ifdef __MigPackStructs
520#pragma pack(4)
521#endif
522 typedef struct {
523 mach_msg_header_t Head;
524 NDR_record_t NDR;
525 mach_vm_address_t address;
526 mach_vm_size_t size;
527 mach_vm_address_t data;
528 } __Request__mach_vm_read_overwrite_t __attribute__((unused));
529#ifdef __MigPackStructs
530#pragma pack()
531#endif
532
533#ifdef __MigPackStructs
534#pragma pack(4)
535#endif
536 typedef struct {
537 mach_msg_header_t Head;
538 NDR_record_t NDR;
539 mach_vm_address_t address;
540 mach_vm_size_t size;
541 vm_sync_t sync_flags;
542 } __Request__mach_vm_msync_t __attribute__((unused));
543#ifdef __MigPackStructs
544#pragma pack()
545#endif
546
547#ifdef __MigPackStructs
548#pragma pack(4)
549#endif
550 typedef struct {
551 mach_msg_header_t Head;
552 NDR_record_t NDR;
553 mach_vm_address_t address;
554 mach_vm_size_t size;
555 vm_behavior_t new_behavior;
556 } __Request__mach_vm_behavior_set_t __attribute__((unused));
557#ifdef __MigPackStructs
558#pragma pack()
559#endif
560
561#ifdef __MigPackStructs
562#pragma pack(4)
563#endif
564 typedef struct {
565 mach_msg_header_t Head;
566 /* start of the kernel processed data */
567 mach_msg_body_t msgh_body;
568 mach_msg_port_descriptor_t object;
569 /* end of the kernel processed data */
570 NDR_record_t NDR;
571 mach_vm_address_t address;
572 mach_vm_size_t size;
573 mach_vm_offset_t mask;
574 int flags;
575 memory_object_offset_t offset;
576 boolean_t copy;
577 vm_prot_t cur_protection;
578 vm_prot_t max_protection;
579 vm_inherit_t inheritance;
580 } __Request__mach_vm_map_t __attribute__((unused));
581#ifdef __MigPackStructs
582#pragma pack()
583#endif
584
585#ifdef __MigPackStructs
586#pragma pack(4)
587#endif
588 typedef struct {
589 mach_msg_header_t Head;
590 NDR_record_t NDR;
591 mach_vm_address_t address;
592 mach_vm_size_t size;
593 vm_machine_attribute_t attribute;
594 vm_machine_attribute_val_t value;
595 } __Request__mach_vm_machine_attribute_t __attribute__((unused));
596#ifdef __MigPackStructs
597#pragma pack()
598#endif
599
600#ifdef __MigPackStructs
601#pragma pack(4)
602#endif
603 typedef struct {
604 mach_msg_header_t Head;
605 /* start of the kernel processed data */
606 mach_msg_body_t msgh_body;
607 mach_msg_port_descriptor_t src_task;
608 /* end of the kernel processed data */
609 NDR_record_t NDR;
610 mach_vm_address_t target_address;
611 mach_vm_size_t size;
612 mach_vm_offset_t mask;
613 int flags;
614 mach_vm_address_t src_address;
615 boolean_t copy;
616 vm_inherit_t inheritance;
617 } __Request__mach_vm_remap_t __attribute__((unused));
618#ifdef __MigPackStructs
619#pragma pack()
620#endif
621
622#ifdef __MigPackStructs
623#pragma pack(4)
624#endif
625 typedef struct {
626 mach_msg_header_t Head;
627 NDR_record_t NDR;
628 mach_vm_offset_t offset;
629 } __Request__mach_vm_page_query_t __attribute__((unused));
630#ifdef __MigPackStructs
631#pragma pack()
632#endif
633
634#ifdef __MigPackStructs
635#pragma pack(4)
636#endif
637 typedef struct {
638 mach_msg_header_t Head;
639 NDR_record_t NDR;
640 mach_vm_address_t address;
641 natural_t nesting_depth;
642 mach_msg_type_number_t infoCnt;
643 } __Request__mach_vm_region_recurse_t __attribute__((unused));
644#ifdef __MigPackStructs
645#pragma pack()
646#endif
647
648#ifdef __MigPackStructs
649#pragma pack(4)
650#endif
651 typedef struct {
652 mach_msg_header_t Head;
653 NDR_record_t NDR;
654 mach_vm_address_t address;
655 vm_region_flavor_t flavor;
656 mach_msg_type_number_t infoCnt;
657 } __Request__mach_vm_region_t __attribute__((unused));
658#ifdef __MigPackStructs
659#pragma pack()
660#endif
661
662#ifdef __MigPackStructs
663#pragma pack(4)
664#endif
665 typedef struct {
666 mach_msg_header_t Head;
667 /* start of the kernel processed data */
668 mach_msg_body_t msgh_body;
669 mach_msg_port_descriptor_t parent_handle;
670 /* end of the kernel processed data */
671 NDR_record_t NDR;
672 memory_object_size_t size;
673 memory_object_offset_t offset;
674 vm_prot_t permission;
675 } __Request___mach_make_memory_entry_t __attribute__((unused));
676#ifdef __MigPackStructs
677#pragma pack()
678#endif
679
680#ifdef __MigPackStructs
681#pragma pack(4)
682#endif
683 typedef struct {
684 mach_msg_header_t Head;
685 NDR_record_t NDR;
686 mach_vm_address_t address;
687 vm_purgable_t control;
688 int state;
689 } __Request__mach_vm_purgable_control_t __attribute__((unused));
690#ifdef __MigPackStructs
691#pragma pack()
692#endif
693
694#ifdef __MigPackStructs
695#pragma pack(4)
696#endif
697 typedef struct {
698 mach_msg_header_t Head;
699 NDR_record_t NDR;
700 mach_vm_address_t address;
701 vm_page_info_flavor_t flavor;
702 mach_msg_type_number_t infoCnt;
703 } __Request__mach_vm_page_info_t __attribute__((unused));
704#ifdef __MigPackStructs
705#pragma pack()
706#endif
707
708#ifdef __MigPackStructs
709#pragma pack(4)
710#endif
711 typedef struct {
712 mach_msg_header_t Head;
713 NDR_record_t NDR;
714 mach_vm_offset_t address;
715 mach_vm_size_t size;
716 mach_vm_address_t dispositions;
717 mach_vm_size_t dispositions_count;
718 } __Request__mach_vm_page_range_query_t __attribute__((unused));
719#ifdef __MigPackStructs
720#pragma pack()
721#endif
722#endif /* !__Request__mach_vm_subsystem__defined */
723
724/* union of all requests */
725
726#ifndef __RequestUnion__mach_vm_subsystem__defined
727#define __RequestUnion__mach_vm_subsystem__defined
728union __RequestUnion__mach_vm_subsystem {
729 __Request__mach_vm_allocate_t Request_mach_vm_allocate;
730 __Request__mach_vm_deallocate_t Request_mach_vm_deallocate;
731 __Request__mach_vm_protect_t Request_mach_vm_protect;
732 __Request__mach_vm_inherit_t Request_mach_vm_inherit;
733 __Request__mach_vm_read_t Request_mach_vm_read;
734 __Request__mach_vm_read_list_t Request_mach_vm_read_list;
735 __Request__mach_vm_write_t Request_mach_vm_write;
736 __Request__mach_vm_copy_t Request_mach_vm_copy;
737 __Request__mach_vm_read_overwrite_t Request_mach_vm_read_overwrite;
738 __Request__mach_vm_msync_t Request_mach_vm_msync;
739 __Request__mach_vm_behavior_set_t Request_mach_vm_behavior_set;
740 __Request__mach_vm_map_t Request_mach_vm_map;
741 __Request__mach_vm_machine_attribute_t Request_mach_vm_machine_attribute;
742 __Request__mach_vm_remap_t Request_mach_vm_remap;
743 __Request__mach_vm_page_query_t Request_mach_vm_page_query;
744 __Request__mach_vm_region_recurse_t Request_mach_vm_region_recurse;
745 __Request__mach_vm_region_t Request_mach_vm_region;
746 __Request___mach_make_memory_entry_t Request__mach_make_memory_entry;
747 __Request__mach_vm_purgable_control_t Request_mach_vm_purgable_control;
748 __Request__mach_vm_page_info_t Request_mach_vm_page_info;
749 __Request__mach_vm_page_range_query_t Request_mach_vm_page_range_query;
750};
751#endif /* !__RequestUnion__mach_vm_subsystem__defined */
752/* typedefs for all replies */
753
754#ifndef __Reply__mach_vm_subsystem__defined
755#define __Reply__mach_vm_subsystem__defined
756
757#ifdef __MigPackStructs
758#pragma pack(4)
759#endif
760 typedef struct {
761 mach_msg_header_t Head;
762 NDR_record_t NDR;
763 kern_return_t RetCode;
764 mach_vm_address_t address;
765 } __Reply__mach_vm_allocate_t __attribute__((unused));
766#ifdef __MigPackStructs
767#pragma pack()
768#endif
769
770#ifdef __MigPackStructs
771#pragma pack(4)
772#endif
773 typedef struct {
774 mach_msg_header_t Head;
775 NDR_record_t NDR;
776 kern_return_t RetCode;
777 } __Reply__mach_vm_deallocate_t __attribute__((unused));
778#ifdef __MigPackStructs
779#pragma pack()
780#endif
781
782#ifdef __MigPackStructs
783#pragma pack(4)
784#endif
785 typedef struct {
786 mach_msg_header_t Head;
787 NDR_record_t NDR;
788 kern_return_t RetCode;
789 } __Reply__mach_vm_protect_t __attribute__((unused));
790#ifdef __MigPackStructs
791#pragma pack()
792#endif
793
794#ifdef __MigPackStructs
795#pragma pack(4)
796#endif
797 typedef struct {
798 mach_msg_header_t Head;
799 NDR_record_t NDR;
800 kern_return_t RetCode;
801 } __Reply__mach_vm_inherit_t __attribute__((unused));
802#ifdef __MigPackStructs
803#pragma pack()
804#endif
805
806#ifdef __MigPackStructs
807#pragma pack(4)
808#endif
809 typedef struct {
810 mach_msg_header_t Head;
811 /* start of the kernel processed data */
812 mach_msg_body_t msgh_body;
813 mach_msg_ool_descriptor_t data;
814 /* end of the kernel processed data */
815 NDR_record_t NDR;
816 mach_msg_type_number_t dataCnt;
817 } __Reply__mach_vm_read_t __attribute__((unused));
818#ifdef __MigPackStructs
819#pragma pack()
820#endif
821
822#ifdef __MigPackStructs
823#pragma pack(4)
824#endif
825 typedef struct {
826 mach_msg_header_t Head;
827 NDR_record_t NDR;
828 kern_return_t RetCode;
829 mach_vm_read_entry_t data_list;
830 } __Reply__mach_vm_read_list_t __attribute__((unused));
831#ifdef __MigPackStructs
832#pragma pack()
833#endif
834
835#ifdef __MigPackStructs
836#pragma pack(4)
837#endif
838 typedef struct {
839 mach_msg_header_t Head;
840 NDR_record_t NDR;
841 kern_return_t RetCode;
842 } __Reply__mach_vm_write_t __attribute__((unused));
843#ifdef __MigPackStructs
844#pragma pack()
845#endif
846
847#ifdef __MigPackStructs
848#pragma pack(4)
849#endif
850 typedef struct {
851 mach_msg_header_t Head;
852 NDR_record_t NDR;
853 kern_return_t RetCode;
854 } __Reply__mach_vm_copy_t __attribute__((unused));
855#ifdef __MigPackStructs
856#pragma pack()
857#endif
858
859#ifdef __MigPackStructs
860#pragma pack(4)
861#endif
862 typedef struct {
863 mach_msg_header_t Head;
864 NDR_record_t NDR;
865 kern_return_t RetCode;
866 mach_vm_size_t outsize;
867 } __Reply__mach_vm_read_overwrite_t __attribute__((unused));
868#ifdef __MigPackStructs
869#pragma pack()
870#endif
871
872#ifdef __MigPackStructs
873#pragma pack(4)
874#endif
875 typedef struct {
876 mach_msg_header_t Head;
877 NDR_record_t NDR;
878 kern_return_t RetCode;
879 } __Reply__mach_vm_msync_t __attribute__((unused));
880#ifdef __MigPackStructs
881#pragma pack()
882#endif
883
884#ifdef __MigPackStructs
885#pragma pack(4)
886#endif
887 typedef struct {
888 mach_msg_header_t Head;
889 NDR_record_t NDR;
890 kern_return_t RetCode;
891 } __Reply__mach_vm_behavior_set_t __attribute__((unused));
892#ifdef __MigPackStructs
893#pragma pack()
894#endif
895
896#ifdef __MigPackStructs
897#pragma pack(4)
898#endif
899 typedef struct {
900 mach_msg_header_t Head;
901 NDR_record_t NDR;
902 kern_return_t RetCode;
903 mach_vm_address_t address;
904 } __Reply__mach_vm_map_t __attribute__((unused));
905#ifdef __MigPackStructs
906#pragma pack()
907#endif
908
909#ifdef __MigPackStructs
910#pragma pack(4)
911#endif
912 typedef struct {
913 mach_msg_header_t Head;
914 NDR_record_t NDR;
915 kern_return_t RetCode;
916 vm_machine_attribute_val_t value;
917 } __Reply__mach_vm_machine_attribute_t __attribute__((unused));
918#ifdef __MigPackStructs
919#pragma pack()
920#endif
921
922#ifdef __MigPackStructs
923#pragma pack(4)
924#endif
925 typedef struct {
926 mach_msg_header_t Head;
927 NDR_record_t NDR;
928 kern_return_t RetCode;
929 mach_vm_address_t target_address;
930 vm_prot_t cur_protection;
931 vm_prot_t max_protection;
932 } __Reply__mach_vm_remap_t __attribute__((unused));
933#ifdef __MigPackStructs
934#pragma pack()
935#endif
936
937#ifdef __MigPackStructs
938#pragma pack(4)
939#endif
940 typedef struct {
941 mach_msg_header_t Head;
942 NDR_record_t NDR;
943 kern_return_t RetCode;
944 integer_t disposition;
945 integer_t ref_count;
946 } __Reply__mach_vm_page_query_t __attribute__((unused));
947#ifdef __MigPackStructs
948#pragma pack()
949#endif
950
951#ifdef __MigPackStructs
952#pragma pack(4)
953#endif
954 typedef struct {
955 mach_msg_header_t Head;
956 NDR_record_t NDR;
957 kern_return_t RetCode;
958 mach_vm_address_t address;
959 mach_vm_size_t size;
960 natural_t nesting_depth;
961 mach_msg_type_number_t infoCnt;
962 int info[19];
963 } __Reply__mach_vm_region_recurse_t __attribute__((unused));
964#ifdef __MigPackStructs
965#pragma pack()
966#endif
967
968#ifdef __MigPackStructs
969#pragma pack(4)
970#endif
971 typedef struct {
972 mach_msg_header_t Head;
973 /* start of the kernel processed data */
974 mach_msg_body_t msgh_body;
975 mach_msg_port_descriptor_t object_name;
976 /* end of the kernel processed data */
977 NDR_record_t NDR;
978 mach_vm_address_t address;
979 mach_vm_size_t size;
980 mach_msg_type_number_t infoCnt;
981 int info[10];
982 } __Reply__mach_vm_region_t __attribute__((unused));
983#ifdef __MigPackStructs
984#pragma pack()
985#endif
986
987#ifdef __MigPackStructs
988#pragma pack(4)
989#endif
990 typedef struct {
991 mach_msg_header_t Head;
992 /* start of the kernel processed data */
993 mach_msg_body_t msgh_body;
994 mach_msg_port_descriptor_t object_handle;
995 /* end of the kernel processed data */
996 NDR_record_t NDR;
997 memory_object_size_t size;
998 } __Reply___mach_make_memory_entry_t __attribute__((unused));
999#ifdef __MigPackStructs
1000#pragma pack()
1001#endif
1002
1003#ifdef __MigPackStructs
1004#pragma pack(4)
1005#endif
1006 typedef struct {
1007 mach_msg_header_t Head;
1008 NDR_record_t NDR;
1009 kern_return_t RetCode;
1010 int state;
1011 } __Reply__mach_vm_purgable_control_t __attribute__((unused));
1012#ifdef __MigPackStructs
1013#pragma pack()
1014#endif
1015
1016#ifdef __MigPackStructs
1017#pragma pack(4)
1018#endif
1019 typedef struct {
1020 mach_msg_header_t Head;
1021 NDR_record_t NDR;
1022 kern_return_t RetCode;
1023 mach_msg_type_number_t infoCnt;
1024 int info[32];
1025 } __Reply__mach_vm_page_info_t __attribute__((unused));
1026#ifdef __MigPackStructs
1027#pragma pack()
1028#endif
1029
1030#ifdef __MigPackStructs
1031#pragma pack(4)
1032#endif
1033 typedef struct {
1034 mach_msg_header_t Head;
1035 NDR_record_t NDR;
1036 kern_return_t RetCode;
1037 mach_vm_size_t dispositions_count;
1038 } __Reply__mach_vm_page_range_query_t __attribute__((unused));
1039#ifdef __MigPackStructs
1040#pragma pack()
1041#endif
1042#endif /* !__Reply__mach_vm_subsystem__defined */
1043
1044/* union of all replies */
1045
1046#ifndef __ReplyUnion__mach_vm_subsystem__defined
1047#define __ReplyUnion__mach_vm_subsystem__defined
1048union __ReplyUnion__mach_vm_subsystem {
1049 __Reply__mach_vm_allocate_t Reply_mach_vm_allocate;
1050 __Reply__mach_vm_deallocate_t Reply_mach_vm_deallocate;
1051 __Reply__mach_vm_protect_t Reply_mach_vm_protect;
1052 __Reply__mach_vm_inherit_t Reply_mach_vm_inherit;
1053 __Reply__mach_vm_read_t Reply_mach_vm_read;
1054 __Reply__mach_vm_read_list_t Reply_mach_vm_read_list;
1055 __Reply__mach_vm_write_t Reply_mach_vm_write;
1056 __Reply__mach_vm_copy_t Reply_mach_vm_copy;
1057 __Reply__mach_vm_read_overwrite_t Reply_mach_vm_read_overwrite;
1058 __Reply__mach_vm_msync_t Reply_mach_vm_msync;
1059 __Reply__mach_vm_behavior_set_t Reply_mach_vm_behavior_set;
1060 __Reply__mach_vm_map_t Reply_mach_vm_map;
1061 __Reply__mach_vm_machine_attribute_t Reply_mach_vm_machine_attribute;
1062 __Reply__mach_vm_remap_t Reply_mach_vm_remap;
1063 __Reply__mach_vm_page_query_t Reply_mach_vm_page_query;
1064 __Reply__mach_vm_region_recurse_t Reply_mach_vm_region_recurse;
1065 __Reply__mach_vm_region_t Reply_mach_vm_region;
1066 __Reply___mach_make_memory_entry_t Reply__mach_make_memory_entry;
1067 __Reply__mach_vm_purgable_control_t Reply_mach_vm_purgable_control;
1068 __Reply__mach_vm_page_info_t Reply_mach_vm_page_info;
1069 __Reply__mach_vm_page_range_query_t Reply_mach_vm_page_range_query;
1070};
1071#endif /* !__RequestUnion__mach_vm_subsystem__defined */
1072
1073#ifndef subsystem_to_name_map_mach_vm
1074#define subsystem_to_name_map_mach_vm \
1075 { "mach_vm_allocate", 4800 },\
1076 { "mach_vm_deallocate", 4801 },\
1077 { "mach_vm_protect", 4802 },\
1078 { "mach_vm_inherit", 4803 },\
1079 { "mach_vm_read", 4804 },\
1080 { "mach_vm_read_list", 4805 },\
1081 { "mach_vm_write", 4806 },\
1082 { "mach_vm_copy", 4807 },\
1083 { "mach_vm_read_overwrite", 4808 },\
1084 { "mach_vm_msync", 4809 },\
1085 { "mach_vm_behavior_set", 4810 },\
1086 { "mach_vm_map", 4811 },\
1087 { "mach_vm_machine_attribute", 4812 },\
1088 { "mach_vm_remap", 4813 },\
1089 { "mach_vm_page_query", 4814 },\
1090 { "mach_vm_region_recurse", 4815 },\
1091 { "mach_vm_region", 4816 },\
1092 { "_mach_make_memory_entry", 4817 },\
1093 { "mach_vm_purgable_control", 4818 },\
1094 { "mach_vm_page_info", 4819 },\
1095 { "mach_vm_page_range_query", 4820 }
1096#endif
1097
1098#ifdef __AfterMigUserHeader
1099__AfterMigUserHeader
1100#endif /* __AfterMigUserHeader */
1101
1102#endif /* _mach_vm_user_ */
1103