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