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