1 #ifndef _mach_vm_server_
2 #define _mach_vm_server_
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/ipc_sync.h>
45 #include <sys/mach/ipc/ipc_voucher.h>
46 #include <sys/mach/ipc_host.h>
47 #include <sys/mach/ipc_tt.h>
48 #include <sys/mach/ipc_mig.h>
49 #include <sys/mach/mig.h>
50 #include <sys/mach/mach_types.h>
51 #include <sys/mach_debug/mach_debug_types.h>
52
53 #ifdef __BeforeMigServerHeader
54 __BeforeMigServerHeader
55 #endif /* __BeforeMigServerHeader */
56
57
58 /* Routine mach_vm_protect */
59 #ifdef mig_external
60 mig_external
61 #else
62 extern
63 #endif /* mig_external */
mach_vm_protect(target_task,address,size,set_maximum,new_protection)64 kern_return_t mach_vm_protect
65 #if defined(LINTLIBRARY)
66 (target_task, address, size, set_maximum, new_protection)
67 vm_map_t target_task;
68 mach_vm_address_t address;
69 mach_vm_size_t size;
70 boolean_t set_maximum;
71 vm_prot_t new_protection;
72 { return mach_vm_protect(target_task, address, size, set_maximum, new_protection); }
73 #else
74 (
75 vm_map_t target_task,
76 mach_vm_address_t address,
77 mach_vm_size_t size,
78 boolean_t set_maximum,
79 vm_prot_t new_protection
80 );
81 #endif /* defined(LINTLIBRARY) */
82
83 /* Routine mach_vm_inherit */
84 #ifdef mig_external
85 mig_external
86 #else
87 extern
88 #endif /* mig_external */
mach_vm_inherit(target_task,address,size,new_inheritance)89 kern_return_t mach_vm_inherit
90 #if defined(LINTLIBRARY)
91 (target_task, address, size, new_inheritance)
92 vm_map_t target_task;
93 mach_vm_address_t address;
94 mach_vm_size_t size;
95 vm_inherit_t new_inheritance;
96 { return mach_vm_inherit(target_task, address, size, new_inheritance); }
97 #else
98 (
99 vm_map_t target_task,
100 mach_vm_address_t address,
101 mach_vm_size_t size,
102 vm_inherit_t new_inheritance
103 );
104 #endif /* defined(LINTLIBRARY) */
105
106 /* Routine mach_vm_read */
107 #ifdef mig_external
108 mig_external
109 #else
110 extern
111 #endif /* mig_external */
mach_vm_read(target_task,address,size,data,dataCnt)112 kern_return_t mach_vm_read
113 #if defined(LINTLIBRARY)
114 (target_task, address, size, data, dataCnt)
115 vm_map_t target_task;
116 mach_vm_address_t address;
117 mach_vm_size_t size;
118 vm_offset_t *data;
119 mach_msg_type_number_t *dataCnt;
120 { return mach_vm_read(target_task, address, size, data, dataCnt); }
121 #else
122 (
123 vm_map_t target_task,
124 mach_vm_address_t address,
125 mach_vm_size_t size,
126 vm_offset_t *data,
127 mach_msg_type_number_t *dataCnt
128 );
129 #endif /* defined(LINTLIBRARY) */
130
131 /* Routine mach_vm_read_list */
132 #ifdef mig_external
133 mig_external
134 #else
135 extern
136 #endif /* mig_external */
mach_vm_read_list(target_task,data_list,count)137 kern_return_t mach_vm_read_list
138 #if defined(LINTLIBRARY)
139 (target_task, data_list, count)
140 vm_map_t target_task;
141 mach_vm_read_entry_t data_list;
142 natural_t count;
143 { return mach_vm_read_list(target_task, data_list, count); }
144 #else
145 (
146 vm_map_t target_task,
147 mach_vm_read_entry_t data_list,
148 natural_t count
149 );
150 #endif /* defined(LINTLIBRARY) */
151
152 /* Routine mach_vm_write */
153 #ifdef mig_external
154 mig_external
155 #else
156 extern
157 #endif /* mig_external */
mach_vm_write(target_task,address,data,dataCnt)158 kern_return_t mach_vm_write
159 #if defined(LINTLIBRARY)
160 (target_task, address, data, dataCnt)
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 { return mach_vm_write(target_task, address, data, dataCnt); }
166 #else
167 (
168 vm_map_t target_task,
169 mach_vm_address_t address,
170 vm_offset_t data,
171 mach_msg_type_number_t dataCnt
172 );
173 #endif /* defined(LINTLIBRARY) */
174
175 /* Routine mach_vm_copy */
176 #ifdef mig_external
177 mig_external
178 #else
179 extern
180 #endif /* mig_external */
mach_vm_copy(target_task,source_address,size,dest_address)181 kern_return_t mach_vm_copy
182 #if defined(LINTLIBRARY)
183 (target_task, source_address, size, dest_address)
184 vm_map_t target_task;
185 mach_vm_address_t source_address;
186 mach_vm_size_t size;
187 mach_vm_address_t dest_address;
188 { return mach_vm_copy(target_task, source_address, size, dest_address); }
189 #else
190 (
191 vm_map_t target_task,
192 mach_vm_address_t source_address,
193 mach_vm_size_t size,
194 mach_vm_address_t dest_address
195 );
196 #endif /* defined(LINTLIBRARY) */
197
198 /* Routine mach_vm_read_overwrite */
199 #ifdef mig_external
200 mig_external
201 #else
202 extern
203 #endif /* mig_external */
mach_vm_read_overwrite(target_task,address,size,data,outsize)204 kern_return_t mach_vm_read_overwrite
205 #if defined(LINTLIBRARY)
206 (target_task, address, size, data, outsize)
207 vm_map_t target_task;
208 mach_vm_address_t address;
209 mach_vm_size_t size;
210 mach_vm_address_t data;
211 mach_vm_size_t *outsize;
212 { return mach_vm_read_overwrite(target_task, address, size, data, outsize); }
213 #else
214 (
215 vm_map_t target_task,
216 mach_vm_address_t address,
217 mach_vm_size_t size,
218 mach_vm_address_t data,
219 mach_vm_size_t *outsize
220 );
221 #endif /* defined(LINTLIBRARY) */
222
223 /* Routine mach_vm_msync */
224 #ifdef mig_external
225 mig_external
226 #else
227 extern
228 #endif /* mig_external */
mach_vm_msync(target_task,address,size,sync_flags)229 kern_return_t mach_vm_msync
230 #if defined(LINTLIBRARY)
231 (target_task, address, size, sync_flags)
232 vm_map_t target_task;
233 mach_vm_address_t address;
234 mach_vm_size_t size;
235 vm_sync_t sync_flags;
236 { return mach_vm_msync(target_task, address, size, sync_flags); }
237 #else
238 (
239 vm_map_t target_task,
240 mach_vm_address_t address,
241 mach_vm_size_t size,
242 vm_sync_t sync_flags
243 );
244 #endif /* defined(LINTLIBRARY) */
245
246 /* Routine mach_vm_behavior_set */
247 #ifdef mig_external
248 mig_external
249 #else
250 extern
251 #endif /* mig_external */
mach_vm_behavior_set(target_task,address,size,new_behavior)252 kern_return_t mach_vm_behavior_set
253 #if defined(LINTLIBRARY)
254 (target_task, address, size, new_behavior)
255 vm_map_t target_task;
256 mach_vm_address_t address;
257 mach_vm_size_t size;
258 vm_behavior_t new_behavior;
259 { return mach_vm_behavior_set(target_task, address, size, new_behavior); }
260 #else
261 (
262 vm_map_t target_task,
263 mach_vm_address_t address,
264 mach_vm_size_t size,
265 vm_behavior_t new_behavior
266 );
267 #endif /* defined(LINTLIBRARY) */
268
269 /* Routine mach_vm_machine_attribute */
270 #ifdef mig_external
271 mig_external
272 #else
273 extern
274 #endif /* mig_external */
mach_vm_machine_attribute(target_task,address,size,attribute,value)275 kern_return_t mach_vm_machine_attribute
276 #if defined(LINTLIBRARY)
277 (target_task, address, size, attribute, value)
278 vm_map_t target_task;
279 mach_vm_address_t address;
280 mach_vm_size_t size;
281 vm_machine_attribute_t attribute;
282 vm_machine_attribute_val_t *value;
283 { return mach_vm_machine_attribute(target_task, address, size, attribute, value); }
284 #else
285 (
286 vm_map_t target_task,
287 mach_vm_address_t address,
288 mach_vm_size_t size,
289 vm_machine_attribute_t attribute,
290 vm_machine_attribute_val_t *value
291 );
292 #endif /* defined(LINTLIBRARY) */
293
294 /* Routine mach_vm_remap */
295 #ifdef mig_external
296 mig_external
297 #else
298 extern
299 #endif /* mig_external */
mach_vm_remap(target_task,target_address,size,mask,flags,src_task,src_address,copy,cur_protection,max_protection,inheritance)300 kern_return_t mach_vm_remap
301 #if defined(LINTLIBRARY)
302 (target_task, target_address, size, mask, flags, src_task, src_address, copy, cur_protection, max_protection, inheritance)
303 vm_map_t target_task;
304 mach_vm_address_t *target_address;
305 mach_vm_size_t size;
306 mach_vm_offset_t mask;
307 int flags;
308 vm_map_t src_task;
309 mach_vm_address_t src_address;
310 boolean_t copy;
311 vm_prot_t *cur_protection;
312 vm_prot_t *max_protection;
313 vm_inherit_t inheritance;
314 { return mach_vm_remap(target_task, target_address, size, mask, flags, src_task, src_address, copy, cur_protection, max_protection, inheritance); }
315 #else
316 (
317 vm_map_t target_task,
318 mach_vm_address_t *target_address,
319 mach_vm_size_t size,
320 mach_vm_offset_t mask,
321 int flags,
322 vm_map_t src_task,
323 mach_vm_address_t src_address,
324 boolean_t copy,
325 vm_prot_t *cur_protection,
326 vm_prot_t *max_protection,
327 vm_inherit_t inheritance
328 );
329 #endif /* defined(LINTLIBRARY) */
330
331 /* Routine mach_vm_page_query */
332 #ifdef mig_external
333 mig_external
334 #else
335 extern
336 #endif /* mig_external */
mach_vm_page_query(target_map,offset,disposition,ref_count)337 kern_return_t mach_vm_page_query
338 #if defined(LINTLIBRARY)
339 (target_map, offset, disposition, ref_count)
340 vm_map_t target_map;
341 mach_vm_offset_t offset;
342 integer_t *disposition;
343 integer_t *ref_count;
344 { return mach_vm_page_query(target_map, offset, disposition, ref_count); }
345 #else
346 (
347 vm_map_t target_map,
348 mach_vm_offset_t offset,
349 integer_t *disposition,
350 integer_t *ref_count
351 );
352 #endif /* defined(LINTLIBRARY) */
353
354 /* Routine mach_vm_region_recurse */
355 #ifdef mig_external
356 mig_external
357 #else
358 extern
359 #endif /* mig_external */
mach_vm_region_recurse(target_task,address,size,nesting_depth,info,infoCnt)360 kern_return_t mach_vm_region_recurse
361 #if defined(LINTLIBRARY)
362 (target_task, address, size, nesting_depth, info, infoCnt)
363 vm_map_t target_task;
364 mach_vm_address_t *address;
365 mach_vm_size_t *size;
366 natural_t *nesting_depth;
367 vm_region_recurse_info_t info;
368 mach_msg_type_number_t *infoCnt;
369 { return mach_vm_region_recurse(target_task, address, size, nesting_depth, info, infoCnt); }
370 #else
371 (
372 vm_map_t target_task,
373 mach_vm_address_t *address,
374 mach_vm_size_t *size,
375 natural_t *nesting_depth,
376 vm_region_recurse_info_t info,
377 mach_msg_type_number_t *infoCnt
378 );
379 #endif /* defined(LINTLIBRARY) */
380
381 /* Routine mach_vm_region */
382 #ifdef mig_external
383 mig_external
384 #else
385 extern
386 #endif /* mig_external */
mach_vm_region(target_task,address,size,flavor,info,infoCnt,object_name)387 kern_return_t mach_vm_region
388 #if defined(LINTLIBRARY)
389 (target_task, address, size, flavor, info, infoCnt, object_name)
390 vm_map_t target_task;
391 mach_vm_address_t *address;
392 mach_vm_size_t *size;
393 vm_region_flavor_t flavor;
394 vm_region_info_t info;
395 mach_msg_type_number_t *infoCnt;
396 mach_port_t *object_name;
397 { return mach_vm_region(target_task, address, size, flavor, info, infoCnt, object_name); }
398 #else
399 (
400 vm_map_t target_task,
401 mach_vm_address_t *address,
402 mach_vm_size_t *size,
403 vm_region_flavor_t flavor,
404 vm_region_info_t info,
405 mach_msg_type_number_t *infoCnt,
406 mach_port_t *object_name
407 );
408 #endif /* defined(LINTLIBRARY) */
409
410 /* Routine _mach_make_memory_entry */
411 #ifdef mig_external
412 mig_external
413 #else
414 extern
415 #endif /* mig_external */
_mach_make_memory_entry(target_task,size,offset,permission,object_handle,parent_handle)416 kern_return_t _mach_make_memory_entry
417 #if defined(LINTLIBRARY)
418 (target_task, size, offset, permission, object_handle, parent_handle)
419 vm_map_t target_task;
420 memory_object_size_t *size;
421 memory_object_offset_t offset;
422 vm_prot_t permission;
423 mem_entry_name_port_t *object_handle;
424 mem_entry_name_port_t parent_handle;
425 { return _mach_make_memory_entry(target_task, size, offset, permission, object_handle, parent_handle); }
426 #else
427 (
428 vm_map_t target_task,
429 memory_object_size_t *size,
430 memory_object_offset_t offset,
431 vm_prot_t permission,
432 mem_entry_name_port_t *object_handle,
433 mem_entry_name_port_t parent_handle
434 );
435 #endif /* defined(LINTLIBRARY) */
436
437 /* Routine mach_vm_purgable_control */
438 #ifdef mig_external
439 mig_external
440 #else
441 extern
442 #endif /* mig_external */
mach_vm_purgable_control(target_task,address,control,state)443 kern_return_t mach_vm_purgable_control
444 #if defined(LINTLIBRARY)
445 (target_task, address, control, state)
446 vm_map_t target_task;
447 mach_vm_address_t address;
448 vm_purgable_t control;
449 int *state;
450 { return mach_vm_purgable_control(target_task, address, control, state); }
451 #else
452 (
453 vm_map_t target_task,
454 mach_vm_address_t address,
455 vm_purgable_t control,
456 int *state
457 );
458 #endif /* defined(LINTLIBRARY) */
459
460 /* Routine mach_vm_page_info */
461 #ifdef mig_external
462 mig_external
463 #else
464 extern
465 #endif /* mig_external */
mach_vm_page_info(target_task,address,flavor,info,infoCnt)466 kern_return_t mach_vm_page_info
467 #if defined(LINTLIBRARY)
468 (target_task, address, flavor, info, infoCnt)
469 vm_map_t target_task;
470 mach_vm_address_t address;
471 vm_page_info_flavor_t flavor;
472 vm_page_info_t info;
473 mach_msg_type_number_t *infoCnt;
474 { return mach_vm_page_info(target_task, address, flavor, info, infoCnt); }
475 #else
476 (
477 vm_map_t target_task,
478 mach_vm_address_t address,
479 vm_page_info_flavor_t flavor,
480 vm_page_info_t info,
481 mach_msg_type_number_t *infoCnt
482 );
483 #endif /* defined(LINTLIBRARY) */
484
485 #ifdef mig_external
486 mig_external
487 #else
488 extern
489 #endif /* mig_external */
490 boolean_t mach_vm_server(
491 mach_msg_header_t *InHeadP,
492 mach_msg_header_t *OutHeadP);
493
494 #ifdef mig_external
495 mig_external
496 #else
497 extern
498 #endif /* mig_external */
499 mig_routine_t mach_vm_server_routine(
500 mach_msg_header_t *InHeadP);
501
502
503 /* Description of this subsystem, for use in direct RPC */
504 extern const struct mach_vm_subsystem {
505 mig_server_routine_t server; /* Server routine */
506 mach_msg_id_t start; /* Min routine number */
507 mach_msg_id_t end; /* Max routine number + 1 */
508 unsigned int maxsize; /* Max msg size */
509 vm_address_t reserved; /* Reserved */
510 struct routine_descriptor /*Array of routine descriptors */
511 routine[20];
512 } mach_vm_subsystem;
513
514 /* typedefs for all requests */
515
516 #ifndef __Request__mach_vm_subsystem__defined
517 #define __Request__mach_vm_subsystem__defined
518
519 #ifdef __MigPackStructs
520 #pragma pack(4)
521 #endif
522 typedef struct {
523 mach_msg_header_t Head;
524 /* start of the kernel processed data */
525 mach_msg_body_t msgh_body;
526 /* end of the kernel processed data */
527 NDR_record_t NDR;
528 mach_vm_address_t address;
529 mach_vm_size_t size;
530 boolean_t set_maximum;
531 vm_prot_t new_protection;
532 } __Request__mach_vm_protect_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 vm_inherit_t new_inheritance;
549 } __Request__mach_vm_inherit_t;
550 #ifdef __MigPackStructs
551 #pragma pack()
552 #endif
553
554 #ifdef __MigPackStructs
555 #pragma pack(4)
556 #endif
557 typedef struct {
558 mach_msg_header_t Head;
559 /* start of the kernel processed data */
560 mach_msg_body_t msgh_body;
561 /* end of the kernel processed data */
562 NDR_record_t NDR;
563 mach_vm_address_t address;
564 mach_vm_size_t size;
565 } __Request__mach_vm_read_t;
566 #ifdef __MigPackStructs
567 #pragma pack()
568 #endif
569
570 #ifdef __MigPackStructs
571 #pragma pack(4)
572 #endif
573 typedef struct {
574 mach_msg_header_t Head;
575 /* start of the kernel processed data */
576 mach_msg_body_t msgh_body;
577 /* end of the kernel processed data */
578 NDR_record_t NDR;
579 mach_vm_read_entry_t data_list;
580 natural_t count;
581 } __Request__mach_vm_read_list_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 mach_msg_ool_descriptor_t data;
594 /* end of the kernel processed data */
595 NDR_record_t NDR;
596 mach_vm_address_t address;
597 mach_msg_type_number_t dataCnt;
598 } __Request__mach_vm_write_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 source_address;
613 mach_vm_size_t size;
614 mach_vm_address_t dest_address;
615 } __Request__mach_vm_copy_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 mach_vm_address_t data;
632 } __Request__mach_vm_read_overwrite_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_sync_t sync_flags;
649 } __Request__mach_vm_msync_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_behavior_t new_behavior;
666 } __Request__mach_vm_behavior_set_t;
667 #ifdef __MigPackStructs
668 #pragma pack()
669 #endif
670
671 #ifdef __MigPackStructs
672 #pragma pack(4)
673 #endif
674 typedef struct {
675 mach_msg_header_t Head;
676 /* start of the kernel processed data */
677 mach_msg_body_t msgh_body;
678 /* end of the kernel processed data */
679 NDR_record_t NDR;
680 mach_vm_address_t address;
681 mach_vm_size_t size;
682 vm_machine_attribute_t attribute;
683 vm_machine_attribute_val_t value;
684 } __Request__mach_vm_machine_attribute_t;
685 #ifdef __MigPackStructs
686 #pragma pack()
687 #endif
688
689 #ifdef __MigPackStructs
690 #pragma pack(4)
691 #endif
692 typedef struct {
693 mach_msg_header_t Head;
694 /* start of the kernel processed data */
695 mach_msg_body_t msgh_body;
696 mach_msg_port_descriptor_t src_task;
697 /* end of the kernel processed data */
698 NDR_record_t NDR;
699 mach_vm_address_t target_address;
700 mach_vm_size_t size;
701 mach_vm_offset_t mask;
702 int flags;
703 mach_vm_address_t src_address;
704 boolean_t copy;
705 vm_inherit_t inheritance;
706 } __Request__mach_vm_remap_t;
707 #ifdef __MigPackStructs
708 #pragma pack()
709 #endif
710
711 #ifdef __MigPackStructs
712 #pragma pack(4)
713 #endif
714 typedef struct {
715 mach_msg_header_t Head;
716 /* start of the kernel processed data */
717 mach_msg_body_t msgh_body;
718 /* end of the kernel processed data */
719 NDR_record_t NDR;
720 mach_vm_offset_t offset;
721 } __Request__mach_vm_page_query_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 natural_t nesting_depth;
737 mach_msg_type_number_t infoCnt;
738 } __Request__mach_vm_region_recurse_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 /* end of the kernel processed data */
751 NDR_record_t NDR;
752 mach_vm_address_t address;
753 vm_region_flavor_t flavor;
754 mach_msg_type_number_t infoCnt;
755 } __Request__mach_vm_region_t;
756 #ifdef __MigPackStructs
757 #pragma pack()
758 #endif
759
760 #ifdef __MigPackStructs
761 #pragma pack(4)
762 #endif
763 typedef struct {
764 mach_msg_header_t Head;
765 /* start of the kernel processed data */
766 mach_msg_body_t msgh_body;
767 mach_msg_port_descriptor_t parent_handle;
768 /* end of the kernel processed data */
769 NDR_record_t NDR;
770 memory_object_size_t size;
771 memory_object_offset_t offset;
772 vm_prot_t permission;
773 } __Request___mach_make_memory_entry_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_purgable_t control;
789 int state;
790 } __Request__mach_vm_purgable_control_t;
791 #ifdef __MigPackStructs
792 #pragma pack()
793 #endif
794
795 #ifdef __MigPackStructs
796 #pragma pack(4)
797 #endif
798 typedef struct {
799 mach_msg_header_t Head;
800 /* start of the kernel processed data */
801 mach_msg_body_t msgh_body;
802 /* end of the kernel processed data */
803 NDR_record_t NDR;
804 mach_vm_address_t address;
805 vm_page_info_flavor_t flavor;
806 mach_msg_type_number_t infoCnt;
807 } __Request__mach_vm_page_info_t;
808 #ifdef __MigPackStructs
809 #pragma pack()
810 #endif
811 #endif /* !__Request__mach_vm_subsystem__defined */
812
813
814 /* union of all requests */
815
816 #ifndef __RequestUnion__mach_vm_subsystem__defined
817 #define __RequestUnion__mach_vm_subsystem__defined
818 union __RequestUnion__mach_vm_subsystem {
819 __Request__mach_vm_protect_t Request_mach_vm_protect;
820 __Request__mach_vm_inherit_t Request_mach_vm_inherit;
821 __Request__mach_vm_read_t Request_mach_vm_read;
822 __Request__mach_vm_read_list_t Request_mach_vm_read_list;
823 __Request__mach_vm_write_t Request_mach_vm_write;
824 __Request__mach_vm_copy_t Request_mach_vm_copy;
825 __Request__mach_vm_read_overwrite_t Request_mach_vm_read_overwrite;
826 __Request__mach_vm_msync_t Request_mach_vm_msync;
827 __Request__mach_vm_behavior_set_t Request_mach_vm_behavior_set;
828 __Request__mach_vm_machine_attribute_t Request_mach_vm_machine_attribute;
829 __Request__mach_vm_remap_t Request_mach_vm_remap;
830 __Request__mach_vm_page_query_t Request_mach_vm_page_query;
831 __Request__mach_vm_region_recurse_t Request_mach_vm_region_recurse;
832 __Request__mach_vm_region_t Request_mach_vm_region;
833 __Request___mach_make_memory_entry_t Request__mach_make_memory_entry;
834 __Request__mach_vm_purgable_control_t Request_mach_vm_purgable_control;
835 __Request__mach_vm_page_info_t Request_mach_vm_page_info;
836 };
837 #endif /* __RequestUnion__mach_vm_subsystem__defined */
838 /* typedefs for all replies */
839
840 #ifndef __Reply__mach_vm_subsystem__defined
841 #define __Reply__mach_vm_subsystem__defined
842
843 #ifdef __MigPackStructs
844 #pragma pack(4)
845 #endif
846 typedef struct {
847 mach_msg_header_t Head;
848 NDR_record_t NDR;
849 kern_return_t RetCode;
850 } __Reply__mach_vm_protect_t;
851 #ifdef __MigPackStructs
852 #pragma pack()
853 #endif
854
855 #ifdef __MigPackStructs
856 #pragma pack(4)
857 #endif
858 typedef struct {
859 mach_msg_header_t Head;
860 NDR_record_t NDR;
861 kern_return_t RetCode;
862 } __Reply__mach_vm_inherit_t;
863 #ifdef __MigPackStructs
864 #pragma pack()
865 #endif
866
867 #ifdef __MigPackStructs
868 #pragma pack(4)
869 #endif
870 typedef struct {
871 mach_msg_header_t Head;
872 /* start of the kernel processed data */
873 mach_msg_body_t msgh_body;
874 mach_msg_ool_descriptor_t data;
875 /* end of the kernel processed data */
876 NDR_record_t NDR;
877 mach_msg_type_number_t dataCnt;
878 } __Reply__mach_vm_read_t;
879 #ifdef __MigPackStructs
880 #pragma pack()
881 #endif
882
883 #ifdef __MigPackStructs
884 #pragma pack(4)
885 #endif
886 typedef struct {
887 mach_msg_header_t Head;
888 NDR_record_t NDR;
889 kern_return_t RetCode;
890 mach_vm_read_entry_t data_list;
891 } __Reply__mach_vm_read_list_t;
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 } __Reply__mach_vm_write_t;
904 #ifdef __MigPackStructs
905 #pragma pack()
906 #endif
907
908 #ifdef __MigPackStructs
909 #pragma pack(4)
910 #endif
911 typedef struct {
912 mach_msg_header_t Head;
913 NDR_record_t NDR;
914 kern_return_t RetCode;
915 } __Reply__mach_vm_copy_t;
916 #ifdef __MigPackStructs
917 #pragma pack()
918 #endif
919
920 #ifdef __MigPackStructs
921 #pragma pack(4)
922 #endif
923 typedef struct {
924 mach_msg_header_t Head;
925 NDR_record_t NDR;
926 kern_return_t RetCode;
927 mach_vm_size_t outsize;
928 } __Reply__mach_vm_read_overwrite_t;
929 #ifdef __MigPackStructs
930 #pragma pack()
931 #endif
932
933 #ifdef __MigPackStructs
934 #pragma pack(4)
935 #endif
936 typedef struct {
937 mach_msg_header_t Head;
938 NDR_record_t NDR;
939 kern_return_t RetCode;
940 } __Reply__mach_vm_msync_t;
941 #ifdef __MigPackStructs
942 #pragma pack()
943 #endif
944
945 #ifdef __MigPackStructs
946 #pragma pack(4)
947 #endif
948 typedef struct {
949 mach_msg_header_t Head;
950 NDR_record_t NDR;
951 kern_return_t RetCode;
952 } __Reply__mach_vm_behavior_set_t;
953 #ifdef __MigPackStructs
954 #pragma pack()
955 #endif
956
957 #ifdef __MigPackStructs
958 #pragma pack(4)
959 #endif
960 typedef struct {
961 mach_msg_header_t Head;
962 NDR_record_t NDR;
963 kern_return_t RetCode;
964 vm_machine_attribute_val_t value;
965 } __Reply__mach_vm_machine_attribute_t;
966 #ifdef __MigPackStructs
967 #pragma pack()
968 #endif
969
970 #ifdef __MigPackStructs
971 #pragma pack(4)
972 #endif
973 typedef struct {
974 mach_msg_header_t Head;
975 NDR_record_t NDR;
976 kern_return_t RetCode;
977 mach_vm_address_t target_address;
978 vm_prot_t cur_protection;
979 vm_prot_t max_protection;
980 } __Reply__mach_vm_remap_t;
981 #ifdef __MigPackStructs
982 #pragma pack()
983 #endif
984
985 #ifdef __MigPackStructs
986 #pragma pack(4)
987 #endif
988 typedef struct {
989 mach_msg_header_t Head;
990 NDR_record_t NDR;
991 kern_return_t RetCode;
992 integer_t disposition;
993 integer_t ref_count;
994 } __Reply__mach_vm_page_query_t;
995 #ifdef __MigPackStructs
996 #pragma pack()
997 #endif
998
999 #ifdef __MigPackStructs
1000 #pragma pack(4)
1001 #endif
1002 typedef struct {
1003 mach_msg_header_t Head;
1004 NDR_record_t NDR;
1005 kern_return_t RetCode;
1006 mach_vm_address_t address;
1007 mach_vm_size_t size;
1008 natural_t nesting_depth;
1009 mach_msg_type_number_t infoCnt;
1010 int info[19];
1011 } __Reply__mach_vm_region_recurse_t;
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 /* start of the kernel processed data */
1022 mach_msg_body_t msgh_body;
1023 mach_msg_port_descriptor_t object_name;
1024 /* end of the kernel processed data */
1025 NDR_record_t NDR;
1026 mach_vm_address_t address;
1027 mach_vm_size_t size;
1028 mach_msg_type_number_t infoCnt;
1029 int info[10];
1030 } __Reply__mach_vm_region_t;
1031 #ifdef __MigPackStructs
1032 #pragma pack()
1033 #endif
1034
1035 #ifdef __MigPackStructs
1036 #pragma pack(4)
1037 #endif
1038 typedef struct {
1039 mach_msg_header_t Head;
1040 /* start of the kernel processed data */
1041 mach_msg_body_t msgh_body;
1042 mach_msg_port_descriptor_t object_handle;
1043 /* end of the kernel processed data */
1044 NDR_record_t NDR;
1045 memory_object_size_t size;
1046 } __Reply___mach_make_memory_entry_t;
1047 #ifdef __MigPackStructs
1048 #pragma pack()
1049 #endif
1050
1051 #ifdef __MigPackStructs
1052 #pragma pack(4)
1053 #endif
1054 typedef struct {
1055 mach_msg_header_t Head;
1056 NDR_record_t NDR;
1057 kern_return_t RetCode;
1058 int state;
1059 } __Reply__mach_vm_purgable_control_t;
1060 #ifdef __MigPackStructs
1061 #pragma pack()
1062 #endif
1063
1064 #ifdef __MigPackStructs
1065 #pragma pack(4)
1066 #endif
1067 typedef struct {
1068 mach_msg_header_t Head;
1069 NDR_record_t NDR;
1070 kern_return_t RetCode;
1071 mach_msg_type_number_t infoCnt;
1072 int info[32];
1073 } __Reply__mach_vm_page_info_t;
1074 #ifdef __MigPackStructs
1075 #pragma pack()
1076 #endif
1077 #endif /* !__Reply__mach_vm_subsystem__defined */
1078
1079
1080 /* union of all replies */
1081
1082 #ifndef __ReplyUnion__mach_vm_subsystem__defined
1083 #define __ReplyUnion__mach_vm_subsystem__defined
1084 union __ReplyUnion__mach_vm_subsystem {
1085 __Reply__mach_vm_protect_t Reply_mach_vm_protect;
1086 __Reply__mach_vm_inherit_t Reply_mach_vm_inherit;
1087 __Reply__mach_vm_read_t Reply_mach_vm_read;
1088 __Reply__mach_vm_read_list_t Reply_mach_vm_read_list;
1089 __Reply__mach_vm_write_t Reply_mach_vm_write;
1090 __Reply__mach_vm_copy_t Reply_mach_vm_copy;
1091 __Reply__mach_vm_read_overwrite_t Reply_mach_vm_read_overwrite;
1092 __Reply__mach_vm_msync_t Reply_mach_vm_msync;
1093 __Reply__mach_vm_behavior_set_t Reply_mach_vm_behavior_set;
1094 __Reply__mach_vm_machine_attribute_t Reply_mach_vm_machine_attribute;
1095 __Reply__mach_vm_remap_t Reply_mach_vm_remap;
1096 __Reply__mach_vm_page_query_t Reply_mach_vm_page_query;
1097 __Reply__mach_vm_region_recurse_t Reply_mach_vm_region_recurse;
1098 __Reply__mach_vm_region_t Reply_mach_vm_region;
1099 __Reply___mach_make_memory_entry_t Reply__mach_make_memory_entry;
1100 __Reply__mach_vm_purgable_control_t Reply_mach_vm_purgable_control;
1101 __Reply__mach_vm_page_info_t Reply_mach_vm_page_info;
1102 };
1103 #endif /* __RequestUnion__mach_vm_subsystem__defined */
1104
1105 #ifndef subsystem_to_name_map_mach_vm
1106 #define subsystem_to_name_map_mach_vm \
1107 { "mach_vm_protect", 4802 },\
1108 { "mach_vm_inherit", 4803 },\
1109 { "mach_vm_read", 4804 },\
1110 { "mach_vm_read_list", 4805 },\
1111 { "mach_vm_write", 4806 },\
1112 { "mach_vm_copy", 4807 },\
1113 { "mach_vm_read_overwrite", 4808 },\
1114 { "mach_vm_msync", 4809 },\
1115 { "mach_vm_behavior_set", 4810 },\
1116 { "mach_vm_machine_attribute", 4812 },\
1117 { "mach_vm_remap", 4813 },\
1118 { "mach_vm_page_query", 4814 },\
1119 { "mach_vm_region_recurse", 4815 },\
1120 { "mach_vm_region", 4816 },\
1121 { "_mach_make_memory_entry", 4817 },\
1122 { "mach_vm_purgable_control", 4818 },\
1123 { "mach_vm_page_info", 4819 }
1124 #endif
1125
1126 #ifdef __AfterMigServerHeader
1127 __AfterMigServerHeader
1128 #endif /* __AfterMigServerHeader */
1129
1130 #endif /* _mach_vm_server_ */
1131