1 | /* |
2 | * IDENTIFICATION: |
3 | * stub generated Tue Apr 9 11:33:41 2019 |
4 | * with a MiG generated by bootstrap_cmds-96.20.2.200.4 |
5 | * OPTIONS: |
6 | * KernelServer |
7 | */ |
8 | |
9 | /* Module mach_port */ |
10 | |
11 | #define __MIG_check__Request__mach_port_subsystem__ 1 |
12 | |
13 | #include "mach_port_server.h" |
14 | |
15 | #ifndef mig_internal |
16 | #define mig_internal static __inline__ |
17 | #endif /* mig_internal */ |
18 | |
19 | #ifndef mig_external |
20 | #define mig_external |
21 | #endif /* mig_external */ |
22 | |
23 | #if !defined(__MigTypeCheck) && defined(TypeCheck) |
24 | #define __MigTypeCheck TypeCheck /* Legacy setting */ |
25 | #endif /* !defined(__MigTypeCheck) */ |
26 | |
27 | #if !defined(__MigKernelSpecificCode) && defined(_MIG_KERNEL_SPECIFIC_CODE_) |
28 | #define __MigKernelSpecificCode _MIG_KERNEL_SPECIFIC_CODE_ /* Legacy setting */ |
29 | #endif /* !defined(__MigKernelSpecificCode) */ |
30 | |
31 | #ifndef LimitCheck |
32 | #define LimitCheck 0 |
33 | #endif /* LimitCheck */ |
34 | |
35 | #ifndef min |
36 | #define min(a,b) ( ((a) < (b))? (a): (b) ) |
37 | #endif /* min */ |
38 | |
39 | #if !defined(_WALIGN_) |
40 | #define _WALIGN_(x) (((x) + 3) & ~3) |
41 | #endif /* !defined(_WALIGN_) */ |
42 | |
43 | #if !defined(_WALIGNSZ_) |
44 | #define _WALIGNSZ_(x) _WALIGN_(sizeof(x)) |
45 | #endif /* !defined(_WALIGNSZ_) */ |
46 | |
47 | #ifndef UseStaticTemplates |
48 | #define UseStaticTemplates 0 |
49 | #endif /* UseStaticTemplates */ |
50 | |
51 | #ifndef __DeclareRcvRpc |
52 | #define __DeclareRcvRpc(_NUM_, _NAME_) |
53 | #endif /* __DeclareRcvRpc */ |
54 | |
55 | #ifndef __BeforeRcvRpc |
56 | #define __BeforeRcvRpc(_NUM_, _NAME_) |
57 | #endif /* __BeforeRcvRpc */ |
58 | |
59 | #ifndef __AfterRcvRpc |
60 | #define __AfterRcvRpc(_NUM_, _NAME_) |
61 | #endif /* __AfterRcvRpc */ |
62 | |
63 | #ifndef __DeclareRcvSimple |
64 | #define __DeclareRcvSimple(_NUM_, _NAME_) |
65 | #endif /* __DeclareRcvSimple */ |
66 | |
67 | #ifndef __BeforeRcvSimple |
68 | #define __BeforeRcvSimple(_NUM_, _NAME_) |
69 | #endif /* __BeforeRcvSimple */ |
70 | |
71 | #ifndef __AfterRcvSimple |
72 | #define __AfterRcvSimple(_NUM_, _NAME_) |
73 | #endif /* __AfterRcvSimple */ |
74 | |
75 | #define novalue void |
76 | |
77 | #if __MigKernelSpecificCode |
78 | #define msgh_request_port msgh_remote_port |
79 | #define MACH_MSGH_BITS_REQUEST(bits) MACH_MSGH_BITS_REMOTE(bits) |
80 | #define msgh_reply_port msgh_local_port |
81 | #define MACH_MSGH_BITS_REPLY(bits) MACH_MSGH_BITS_LOCAL(bits) |
82 | #else |
83 | #define msgh_request_port msgh_local_port |
84 | #define MACH_MSGH_BITS_REQUEST(bits) MACH_MSGH_BITS_LOCAL(bits) |
85 | #define msgh_reply_port msgh_remote_port |
86 | #define MACH_MSGH_BITS_REPLY(bits) MACH_MSGH_BITS_REMOTE(bits) |
87 | #endif /* __MigKernelSpecificCode */ |
88 | |
89 | #define MIG_RETURN_ERROR(X, code) {\ |
90 | ((mig_reply_error_t *)X)->RetCode = code;\ |
91 | ((mig_reply_error_t *)X)->NDR = NDR_record;\ |
92 | return;\ |
93 | } |
94 | |
95 | /* Forward Declarations */ |
96 | |
97 | |
98 | mig_internal novalue _Xmach_port_names |
99 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
100 | |
101 | mig_internal novalue _Xmach_port_type |
102 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
103 | |
104 | mig_internal novalue _Xmach_port_rename |
105 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
106 | |
107 | mig_internal novalue _Xmach_port_allocate_name |
108 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
109 | |
110 | mig_internal novalue _Xmach_port_allocate |
111 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
112 | |
113 | mig_internal novalue _Xmach_port_destroy |
114 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
115 | |
116 | mig_internal novalue _Xmach_port_deallocate |
117 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
118 | |
119 | mig_internal novalue _Xmach_port_get_refs |
120 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
121 | |
122 | mig_internal novalue _Xmach_port_mod_refs |
123 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
124 | |
125 | mig_internal novalue _Xmach_port_peek |
126 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
127 | |
128 | mig_internal novalue _Xmach_port_set_mscount |
129 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
130 | |
131 | mig_internal novalue _Xmach_port_get_set_status |
132 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
133 | |
134 | mig_internal novalue _Xmach_port_move_member |
135 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
136 | |
137 | mig_internal novalue _Xmach_port_request_notification |
138 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
139 | |
140 | mig_internal novalue _Xmach_port_insert_right |
141 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
142 | |
143 | mig_internal novalue _Xmach_port_extract_right |
144 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
145 | |
146 | mig_internal novalue _Xmach_port_set_seqno |
147 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
148 | |
149 | mig_internal novalue _Xmach_port_get_attributes |
150 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
151 | |
152 | mig_internal novalue _Xmach_port_set_attributes |
153 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
154 | |
155 | mig_internal novalue _Xmach_port_allocate_qos |
156 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
157 | |
158 | mig_internal novalue _Xmach_port_allocate_full |
159 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
160 | |
161 | mig_internal novalue _Xtask_set_port_space |
162 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
163 | |
164 | mig_internal novalue _Xmach_port_get_srights |
165 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
166 | |
167 | mig_internal novalue _Xmach_port_space_info |
168 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
169 | |
170 | mig_internal novalue _Xmach_port_dnrequest_info |
171 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
172 | |
173 | mig_internal novalue _Xmach_port_kernel_object |
174 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
175 | |
176 | mig_internal novalue _Xmach_port_insert_member |
177 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
178 | |
179 | mig_internal novalue _Xmach_port_extract_member |
180 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
181 | |
182 | mig_internal novalue _Xmach_port_get_context |
183 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
184 | |
185 | mig_internal novalue _Xmach_port_set_context |
186 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
187 | |
188 | mig_internal novalue _Xmach_port_kobject |
189 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
190 | |
191 | mig_internal novalue _Xmach_port_construct |
192 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
193 | |
194 | mig_internal novalue _Xmach_port_destruct |
195 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
196 | |
197 | mig_internal novalue _Xmach_port_guard |
198 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
199 | |
200 | mig_internal novalue _Xmach_port_unguard |
201 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
202 | |
203 | mig_internal novalue _Xmach_port_space_basic_info |
204 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
205 | |
206 | mig_internal novalue _Xmach_port_special_reply_port_reset_link |
207 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
208 | |
209 | |
210 | #if ( __MigTypeCheck ) |
211 | #if __MIG_check__Request__mach_port_subsystem__ |
212 | #if !defined(__MIG_check__Request__mach_port_names_t__defined) |
213 | #define __MIG_check__Request__mach_port_names_t__defined |
214 | |
215 | mig_internal kern_return_t __MIG_check__Request__mach_port_names_t(__attribute__((__unused__)) __Request__mach_port_names_t *In0P) |
216 | { |
217 | |
218 | typedef __Request__mach_port_names_t __Request; |
219 | #if __MigTypeCheck |
220 | if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
221 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
222 | return MIG_BAD_ARGUMENTS; |
223 | #endif /* __MigTypeCheck */ |
224 | |
225 | return MACH_MSG_SUCCESS; |
226 | } |
227 | #endif /* !defined(__MIG_check__Request__mach_port_names_t__defined) */ |
228 | #endif /* __MIG_check__Request__mach_port_subsystem__ */ |
229 | #endif /* ( __MigTypeCheck ) */ |
230 | |
231 | |
232 | /* Routine mach_port_names */ |
233 | mig_internal novalue _Xmach_port_names |
234 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
235 | { |
236 | |
237 | #ifdef __MigPackStructs |
238 | #pragma pack(4) |
239 | #endif |
240 | typedef struct { |
241 | mach_msg_header_t Head; |
242 | mach_msg_trailer_t trailer; |
243 | } Request __attribute__((unused)); |
244 | #ifdef __MigPackStructs |
245 | #pragma pack() |
246 | #endif |
247 | typedef __Request__mach_port_names_t __Request; |
248 | typedef __Reply__mach_port_names_t Reply __attribute__((unused)); |
249 | |
250 | /* |
251 | * typedef struct { |
252 | * mach_msg_header_t Head; |
253 | * NDR_record_t NDR; |
254 | * kern_return_t RetCode; |
255 | * } mig_reply_error_t; |
256 | */ |
257 | |
258 | Request *In0P = (Request *) InHeadP; |
259 | Reply *OutP = (Reply *) OutHeadP; |
260 | #ifdef __MIG_check__Request__mach_port_names_t__defined |
261 | kern_return_t check_result; |
262 | #endif /* __MIG_check__Request__mach_port_names_t__defined */ |
263 | |
264 | #if __MigKernelSpecificCode |
265 | #if UseStaticTemplates |
266 | const static mach_msg_ool_descriptor_t namesTemplate = { |
267 | /* addr = */ (void *)0, |
268 | /* size = */ 0, |
269 | /* deal = */ FALSE, |
270 | /* copy = */ MACH_MSG_VIRTUAL_COPY, |
271 | /* pad2 = */ 0, |
272 | /* type = */ MACH_MSG_OOL_DESCRIPTOR, |
273 | }; |
274 | #endif /* UseStaticTemplates */ |
275 | |
276 | #if UseStaticTemplates |
277 | const static mach_msg_ool_descriptor_t typesTemplate = { |
278 | /* addr = */ (void *)0, |
279 | /* size = */ 0, |
280 | /* deal = */ FALSE, |
281 | /* copy = */ MACH_MSG_VIRTUAL_COPY, |
282 | /* pad2 = */ 0, |
283 | /* type = */ MACH_MSG_OOL_DESCRIPTOR, |
284 | }; |
285 | #endif /* UseStaticTemplates */ |
286 | |
287 | #else |
288 | #if UseStaticTemplates |
289 | const static mach_msg_ool_descriptor_t namesTemplate = { |
290 | /* addr = */ (void *)0, |
291 | /* size = */ 0, |
292 | /* deal = */ FALSE, |
293 | /* copy = */ MACH_MSG_VIRTUAL_COPY, |
294 | /* pad2 = */ 0, |
295 | /* type = */ MACH_MSG_OOL_DESCRIPTOR, |
296 | }; |
297 | #endif /* UseStaticTemplates */ |
298 | |
299 | #if UseStaticTemplates |
300 | const static mach_msg_ool_descriptor_t typesTemplate = { |
301 | /* addr = */ (void *)0, |
302 | /* size = */ 0, |
303 | /* deal = */ FALSE, |
304 | /* copy = */ MACH_MSG_VIRTUAL_COPY, |
305 | /* pad2 = */ 0, |
306 | /* type = */ MACH_MSG_OOL_DESCRIPTOR, |
307 | }; |
308 | #endif /* UseStaticTemplates */ |
309 | |
310 | #endif /* __MigKernelSpecificCode */ |
311 | kern_return_t RetCode; |
312 | ipc_space_t task; |
313 | |
314 | __DeclareRcvRpc(3200, "mach_port_names" ) |
315 | __BeforeRcvRpc(3200, "mach_port_names" ) |
316 | |
317 | #if defined(__MIG_check__Request__mach_port_names_t__defined) |
318 | check_result = __MIG_check__Request__mach_port_names_t((__Request *)In0P); |
319 | if (check_result != MACH_MSG_SUCCESS) |
320 | { MIG_RETURN_ERROR(OutP, check_result); } |
321 | #endif /* defined(__MIG_check__Request__mach_port_names_t__defined) */ |
322 | |
323 | #if UseStaticTemplates |
324 | OutP->names = namesTemplate; |
325 | #else /* UseStaticTemplates */ |
326 | OutP->names.deallocate = FALSE; |
327 | OutP->names.copy = MACH_MSG_VIRTUAL_COPY; |
328 | OutP->names.pad1 = 0; |
329 | OutP->names.type = MACH_MSG_OOL_DESCRIPTOR; |
330 | #if defined(KERNEL) && !defined(__LP64__) |
331 | OutP->names.pad_end = 0; |
332 | #endif |
333 | #endif /* UseStaticTemplates */ |
334 | |
335 | |
336 | #if UseStaticTemplates |
337 | OutP->types = typesTemplate; |
338 | #else /* UseStaticTemplates */ |
339 | OutP->types.deallocate = FALSE; |
340 | OutP->types.copy = MACH_MSG_VIRTUAL_COPY; |
341 | OutP->types.pad1 = 0; |
342 | OutP->types.type = MACH_MSG_OOL_DESCRIPTOR; |
343 | #if defined(KERNEL) && !defined(__LP64__) |
344 | OutP->types.pad_end = 0; |
345 | #endif |
346 | #endif /* UseStaticTemplates */ |
347 | |
348 | |
349 | task = convert_port_to_space(In0P->Head.msgh_request_port); |
350 | |
351 | OutP->namesCnt = 0; |
352 | |
353 | OutP->typesCnt = 0; |
354 | |
355 | RetCode = mach_port_names(task, (mach_port_name_array_t *)&(OutP->names.address), &OutP->namesCnt, (mach_port_type_array_t *)&(OutP->types.address), &OutP->typesCnt); |
356 | space_deallocate(task); |
357 | if (RetCode != KERN_SUCCESS) { |
358 | MIG_RETURN_ERROR(OutP, RetCode); |
359 | } |
360 | #if __MigKernelSpecificCode |
361 | #endif /* __MigKernelSpecificCode */ |
362 | OutP->names.size = OutP->namesCnt * 4; |
363 | |
364 | OutP->types.size = OutP->typesCnt * 4; |
365 | |
366 | |
367 | OutP->NDR = NDR_record; |
368 | |
369 | |
370 | OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX; |
371 | OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply)); |
372 | OutP->msgh_body.msgh_descriptor_count = 2; |
373 | __AfterRcvRpc(3200, "mach_port_names" ) |
374 | } |
375 | |
376 | #if ( __MigTypeCheck ) |
377 | #if __MIG_check__Request__mach_port_subsystem__ |
378 | #if !defined(__MIG_check__Request__mach_port_type_t__defined) |
379 | #define __MIG_check__Request__mach_port_type_t__defined |
380 | |
381 | mig_internal kern_return_t __MIG_check__Request__mach_port_type_t(__attribute__((__unused__)) __Request__mach_port_type_t *In0P) |
382 | { |
383 | |
384 | typedef __Request__mach_port_type_t __Request; |
385 | #if __MigTypeCheck |
386 | if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
387 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
388 | return MIG_BAD_ARGUMENTS; |
389 | #endif /* __MigTypeCheck */ |
390 | |
391 | return MACH_MSG_SUCCESS; |
392 | } |
393 | #endif /* !defined(__MIG_check__Request__mach_port_type_t__defined) */ |
394 | #endif /* __MIG_check__Request__mach_port_subsystem__ */ |
395 | #endif /* ( __MigTypeCheck ) */ |
396 | |
397 | |
398 | /* Routine mach_port_type */ |
399 | mig_internal novalue _Xmach_port_type |
400 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
401 | { |
402 | |
403 | #ifdef __MigPackStructs |
404 | #pragma pack(4) |
405 | #endif |
406 | typedef struct { |
407 | mach_msg_header_t Head; |
408 | NDR_record_t NDR; |
409 | mach_port_name_t name; |
410 | mach_msg_trailer_t trailer; |
411 | } Request __attribute__((unused)); |
412 | #ifdef __MigPackStructs |
413 | #pragma pack() |
414 | #endif |
415 | typedef __Request__mach_port_type_t __Request; |
416 | typedef __Reply__mach_port_type_t Reply __attribute__((unused)); |
417 | |
418 | /* |
419 | * typedef struct { |
420 | * mach_msg_header_t Head; |
421 | * NDR_record_t NDR; |
422 | * kern_return_t RetCode; |
423 | * } mig_reply_error_t; |
424 | */ |
425 | |
426 | Request *In0P = (Request *) InHeadP; |
427 | Reply *OutP = (Reply *) OutHeadP; |
428 | #ifdef __MIG_check__Request__mach_port_type_t__defined |
429 | kern_return_t check_result; |
430 | #endif /* __MIG_check__Request__mach_port_type_t__defined */ |
431 | |
432 | #if __MigKernelSpecificCode |
433 | #else |
434 | #endif /* __MigKernelSpecificCode */ |
435 | ipc_space_t task; |
436 | |
437 | __DeclareRcvRpc(3201, "mach_port_type" ) |
438 | __BeforeRcvRpc(3201, "mach_port_type" ) |
439 | |
440 | #if defined(__MIG_check__Request__mach_port_type_t__defined) |
441 | check_result = __MIG_check__Request__mach_port_type_t((__Request *)In0P); |
442 | if (check_result != MACH_MSG_SUCCESS) |
443 | { MIG_RETURN_ERROR(OutP, check_result); } |
444 | #endif /* defined(__MIG_check__Request__mach_port_type_t__defined) */ |
445 | |
446 | task = convert_port_to_space(In0P->Head.msgh_request_port); |
447 | |
448 | OutP->RetCode = mach_port_type(task, In0P->name, &OutP->ptype); |
449 | space_deallocate(task); |
450 | if (OutP->RetCode != KERN_SUCCESS) { |
451 | MIG_RETURN_ERROR(OutP, OutP->RetCode); |
452 | } |
453 | #if __MigKernelSpecificCode |
454 | #endif /* __MigKernelSpecificCode */ |
455 | |
456 | OutP->NDR = NDR_record; |
457 | |
458 | |
459 | OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply)); |
460 | __AfterRcvRpc(3201, "mach_port_type" ) |
461 | } |
462 | |
463 | #if ( __MigTypeCheck ) |
464 | #if __MIG_check__Request__mach_port_subsystem__ |
465 | #if !defined(__MIG_check__Request__mach_port_rename_t__defined) |
466 | #define __MIG_check__Request__mach_port_rename_t__defined |
467 | |
468 | mig_internal kern_return_t __MIG_check__Request__mach_port_rename_t(__attribute__((__unused__)) __Request__mach_port_rename_t *In0P) |
469 | { |
470 | |
471 | typedef __Request__mach_port_rename_t __Request; |
472 | #if __MigTypeCheck |
473 | if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
474 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
475 | return MIG_BAD_ARGUMENTS; |
476 | #endif /* __MigTypeCheck */ |
477 | |
478 | return MACH_MSG_SUCCESS; |
479 | } |
480 | #endif /* !defined(__MIG_check__Request__mach_port_rename_t__defined) */ |
481 | #endif /* __MIG_check__Request__mach_port_subsystem__ */ |
482 | #endif /* ( __MigTypeCheck ) */ |
483 | |
484 | |
485 | /* Routine mach_port_rename */ |
486 | mig_internal novalue _Xmach_port_rename |
487 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
488 | { |
489 | |
490 | #ifdef __MigPackStructs |
491 | #pragma pack(4) |
492 | #endif |
493 | typedef struct { |
494 | mach_msg_header_t Head; |
495 | NDR_record_t NDR; |
496 | mach_port_name_t old_name; |
497 | mach_port_name_t new_name; |
498 | mach_msg_trailer_t trailer; |
499 | } Request __attribute__((unused)); |
500 | #ifdef __MigPackStructs |
501 | #pragma pack() |
502 | #endif |
503 | typedef __Request__mach_port_rename_t __Request; |
504 | typedef __Reply__mach_port_rename_t Reply __attribute__((unused)); |
505 | |
506 | /* |
507 | * typedef struct { |
508 | * mach_msg_header_t Head; |
509 | * NDR_record_t NDR; |
510 | * kern_return_t RetCode; |
511 | * } mig_reply_error_t; |
512 | */ |
513 | |
514 | Request *In0P = (Request *) InHeadP; |
515 | Reply *OutP = (Reply *) OutHeadP; |
516 | #ifdef __MIG_check__Request__mach_port_rename_t__defined |
517 | kern_return_t check_result; |
518 | #endif /* __MIG_check__Request__mach_port_rename_t__defined */ |
519 | |
520 | #if __MigKernelSpecificCode |
521 | #else |
522 | #endif /* __MigKernelSpecificCode */ |
523 | ipc_space_t task; |
524 | |
525 | __DeclareRcvRpc(3202, "mach_port_rename" ) |
526 | __BeforeRcvRpc(3202, "mach_port_rename" ) |
527 | |
528 | #if defined(__MIG_check__Request__mach_port_rename_t__defined) |
529 | check_result = __MIG_check__Request__mach_port_rename_t((__Request *)In0P); |
530 | if (check_result != MACH_MSG_SUCCESS) |
531 | { MIG_RETURN_ERROR(OutP, check_result); } |
532 | #endif /* defined(__MIG_check__Request__mach_port_rename_t__defined) */ |
533 | |
534 | task = convert_port_to_space(In0P->Head.msgh_request_port); |
535 | |
536 | OutP->RetCode = mach_port_rename(task, In0P->old_name, In0P->new_name); |
537 | space_deallocate(task); |
538 | #if __MigKernelSpecificCode |
539 | #endif /* __MigKernelSpecificCode */ |
540 | |
541 | OutP->NDR = NDR_record; |
542 | |
543 | |
544 | __AfterRcvRpc(3202, "mach_port_rename" ) |
545 | } |
546 | |
547 | #if ( __MigTypeCheck ) |
548 | #if __MIG_check__Request__mach_port_subsystem__ |
549 | #if !defined(__MIG_check__Request__mach_port_allocate_name_t__defined) |
550 | #define __MIG_check__Request__mach_port_allocate_name_t__defined |
551 | |
552 | mig_internal kern_return_t __MIG_check__Request__mach_port_allocate_name_t(__attribute__((__unused__)) __Request__mach_port_allocate_name_t *In0P) |
553 | { |
554 | |
555 | typedef __Request__mach_port_allocate_name_t __Request; |
556 | #if __MigTypeCheck |
557 | if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
558 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
559 | return MIG_BAD_ARGUMENTS; |
560 | #endif /* __MigTypeCheck */ |
561 | |
562 | return MACH_MSG_SUCCESS; |
563 | } |
564 | #endif /* !defined(__MIG_check__Request__mach_port_allocate_name_t__defined) */ |
565 | #endif /* __MIG_check__Request__mach_port_subsystem__ */ |
566 | #endif /* ( __MigTypeCheck ) */ |
567 | |
568 | |
569 | /* Routine mach_port_allocate_name */ |
570 | mig_internal novalue _Xmach_port_allocate_name |
571 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
572 | { |
573 | |
574 | #ifdef __MigPackStructs |
575 | #pragma pack(4) |
576 | #endif |
577 | typedef struct { |
578 | mach_msg_header_t Head; |
579 | NDR_record_t NDR; |
580 | mach_port_right_t right; |
581 | mach_port_name_t name; |
582 | mach_msg_trailer_t trailer; |
583 | } Request __attribute__((unused)); |
584 | #ifdef __MigPackStructs |
585 | #pragma pack() |
586 | #endif |
587 | typedef __Request__mach_port_allocate_name_t __Request; |
588 | typedef __Reply__mach_port_allocate_name_t Reply __attribute__((unused)); |
589 | |
590 | /* |
591 | * typedef struct { |
592 | * mach_msg_header_t Head; |
593 | * NDR_record_t NDR; |
594 | * kern_return_t RetCode; |
595 | * } mig_reply_error_t; |
596 | */ |
597 | |
598 | Request *In0P = (Request *) InHeadP; |
599 | Reply *OutP = (Reply *) OutHeadP; |
600 | #ifdef __MIG_check__Request__mach_port_allocate_name_t__defined |
601 | kern_return_t check_result; |
602 | #endif /* __MIG_check__Request__mach_port_allocate_name_t__defined */ |
603 | |
604 | #if __MigKernelSpecificCode |
605 | #else |
606 | #endif /* __MigKernelSpecificCode */ |
607 | ipc_space_t task; |
608 | |
609 | __DeclareRcvRpc(3203, "mach_port_allocate_name" ) |
610 | __BeforeRcvRpc(3203, "mach_port_allocate_name" ) |
611 | |
612 | #if defined(__MIG_check__Request__mach_port_allocate_name_t__defined) |
613 | check_result = __MIG_check__Request__mach_port_allocate_name_t((__Request *)In0P); |
614 | if (check_result != MACH_MSG_SUCCESS) |
615 | { MIG_RETURN_ERROR(OutP, check_result); } |
616 | #endif /* defined(__MIG_check__Request__mach_port_allocate_name_t__defined) */ |
617 | |
618 | task = convert_port_to_space(In0P->Head.msgh_request_port); |
619 | |
620 | OutP->RetCode = mach_port_allocate_name(task, In0P->right, In0P->name); |
621 | space_deallocate(task); |
622 | #if __MigKernelSpecificCode |
623 | #endif /* __MigKernelSpecificCode */ |
624 | |
625 | OutP->NDR = NDR_record; |
626 | |
627 | |
628 | __AfterRcvRpc(3203, "mach_port_allocate_name" ) |
629 | } |
630 | |
631 | #if ( __MigTypeCheck ) |
632 | #if __MIG_check__Request__mach_port_subsystem__ |
633 | #if !defined(__MIG_check__Request__mach_port_allocate_t__defined) |
634 | #define __MIG_check__Request__mach_port_allocate_t__defined |
635 | |
636 | mig_internal kern_return_t __MIG_check__Request__mach_port_allocate_t(__attribute__((__unused__)) __Request__mach_port_allocate_t *In0P) |
637 | { |
638 | |
639 | typedef __Request__mach_port_allocate_t __Request; |
640 | #if __MigTypeCheck |
641 | if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
642 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
643 | return MIG_BAD_ARGUMENTS; |
644 | #endif /* __MigTypeCheck */ |
645 | |
646 | return MACH_MSG_SUCCESS; |
647 | } |
648 | #endif /* !defined(__MIG_check__Request__mach_port_allocate_t__defined) */ |
649 | #endif /* __MIG_check__Request__mach_port_subsystem__ */ |
650 | #endif /* ( __MigTypeCheck ) */ |
651 | |
652 | |
653 | /* Routine mach_port_allocate */ |
654 | mig_internal novalue _Xmach_port_allocate |
655 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
656 | { |
657 | |
658 | #ifdef __MigPackStructs |
659 | #pragma pack(4) |
660 | #endif |
661 | typedef struct { |
662 | mach_msg_header_t Head; |
663 | NDR_record_t NDR; |
664 | mach_port_right_t right; |
665 | mach_msg_trailer_t trailer; |
666 | } Request __attribute__((unused)); |
667 | #ifdef __MigPackStructs |
668 | #pragma pack() |
669 | #endif |
670 | typedef __Request__mach_port_allocate_t __Request; |
671 | typedef __Reply__mach_port_allocate_t Reply __attribute__((unused)); |
672 | |
673 | /* |
674 | * typedef struct { |
675 | * mach_msg_header_t Head; |
676 | * NDR_record_t NDR; |
677 | * kern_return_t RetCode; |
678 | * } mig_reply_error_t; |
679 | */ |
680 | |
681 | Request *In0P = (Request *) InHeadP; |
682 | Reply *OutP = (Reply *) OutHeadP; |
683 | #ifdef __MIG_check__Request__mach_port_allocate_t__defined |
684 | kern_return_t check_result; |
685 | #endif /* __MIG_check__Request__mach_port_allocate_t__defined */ |
686 | |
687 | #if __MigKernelSpecificCode |
688 | #else |
689 | #endif /* __MigKernelSpecificCode */ |
690 | ipc_space_t task; |
691 | |
692 | __DeclareRcvRpc(3204, "mach_port_allocate" ) |
693 | __BeforeRcvRpc(3204, "mach_port_allocate" ) |
694 | |
695 | #if defined(__MIG_check__Request__mach_port_allocate_t__defined) |
696 | check_result = __MIG_check__Request__mach_port_allocate_t((__Request *)In0P); |
697 | if (check_result != MACH_MSG_SUCCESS) |
698 | { MIG_RETURN_ERROR(OutP, check_result); } |
699 | #endif /* defined(__MIG_check__Request__mach_port_allocate_t__defined) */ |
700 | |
701 | task = convert_port_to_space(In0P->Head.msgh_request_port); |
702 | |
703 | OutP->RetCode = mach_port_allocate(task, In0P->right, &OutP->name); |
704 | space_deallocate(task); |
705 | if (OutP->RetCode != KERN_SUCCESS) { |
706 | MIG_RETURN_ERROR(OutP, OutP->RetCode); |
707 | } |
708 | #if __MigKernelSpecificCode |
709 | #endif /* __MigKernelSpecificCode */ |
710 | |
711 | OutP->NDR = NDR_record; |
712 | |
713 | |
714 | OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply)); |
715 | __AfterRcvRpc(3204, "mach_port_allocate" ) |
716 | } |
717 | |
718 | #if ( __MigTypeCheck ) |
719 | #if __MIG_check__Request__mach_port_subsystem__ |
720 | #if !defined(__MIG_check__Request__mach_port_destroy_t__defined) |
721 | #define __MIG_check__Request__mach_port_destroy_t__defined |
722 | |
723 | mig_internal kern_return_t __MIG_check__Request__mach_port_destroy_t(__attribute__((__unused__)) __Request__mach_port_destroy_t *In0P) |
724 | { |
725 | |
726 | typedef __Request__mach_port_destroy_t __Request; |
727 | #if __MigTypeCheck |
728 | if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
729 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
730 | return MIG_BAD_ARGUMENTS; |
731 | #endif /* __MigTypeCheck */ |
732 | |
733 | return MACH_MSG_SUCCESS; |
734 | } |
735 | #endif /* !defined(__MIG_check__Request__mach_port_destroy_t__defined) */ |
736 | #endif /* __MIG_check__Request__mach_port_subsystem__ */ |
737 | #endif /* ( __MigTypeCheck ) */ |
738 | |
739 | |
740 | /* Routine mach_port_destroy */ |
741 | mig_internal novalue _Xmach_port_destroy |
742 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
743 | { |
744 | |
745 | #ifdef __MigPackStructs |
746 | #pragma pack(4) |
747 | #endif |
748 | typedef struct { |
749 | mach_msg_header_t Head; |
750 | NDR_record_t NDR; |
751 | mach_port_name_t name; |
752 | mach_msg_trailer_t trailer; |
753 | } Request __attribute__((unused)); |
754 | #ifdef __MigPackStructs |
755 | #pragma pack() |
756 | #endif |
757 | typedef __Request__mach_port_destroy_t __Request; |
758 | typedef __Reply__mach_port_destroy_t Reply __attribute__((unused)); |
759 | |
760 | /* |
761 | * typedef struct { |
762 | * mach_msg_header_t Head; |
763 | * NDR_record_t NDR; |
764 | * kern_return_t RetCode; |
765 | * } mig_reply_error_t; |
766 | */ |
767 | |
768 | Request *In0P = (Request *) InHeadP; |
769 | Reply *OutP = (Reply *) OutHeadP; |
770 | #ifdef __MIG_check__Request__mach_port_destroy_t__defined |
771 | kern_return_t check_result; |
772 | #endif /* __MIG_check__Request__mach_port_destroy_t__defined */ |
773 | |
774 | #if __MigKernelSpecificCode |
775 | #else |
776 | #endif /* __MigKernelSpecificCode */ |
777 | ipc_space_t task; |
778 | |
779 | __DeclareRcvRpc(3205, "mach_port_destroy" ) |
780 | __BeforeRcvRpc(3205, "mach_port_destroy" ) |
781 | |
782 | #if defined(__MIG_check__Request__mach_port_destroy_t__defined) |
783 | check_result = __MIG_check__Request__mach_port_destroy_t((__Request *)In0P); |
784 | if (check_result != MACH_MSG_SUCCESS) |
785 | { MIG_RETURN_ERROR(OutP, check_result); } |
786 | #endif /* defined(__MIG_check__Request__mach_port_destroy_t__defined) */ |
787 | |
788 | task = convert_port_to_space(In0P->Head.msgh_request_port); |
789 | |
790 | OutP->RetCode = mach_port_destroy(task, In0P->name); |
791 | space_deallocate(task); |
792 | #if __MigKernelSpecificCode |
793 | #endif /* __MigKernelSpecificCode */ |
794 | |
795 | OutP->NDR = NDR_record; |
796 | |
797 | |
798 | __AfterRcvRpc(3205, "mach_port_destroy" ) |
799 | } |
800 | |
801 | #if ( __MigTypeCheck ) |
802 | #if __MIG_check__Request__mach_port_subsystem__ |
803 | #if !defined(__MIG_check__Request__mach_port_deallocate_t__defined) |
804 | #define __MIG_check__Request__mach_port_deallocate_t__defined |
805 | |
806 | mig_internal kern_return_t __MIG_check__Request__mach_port_deallocate_t(__attribute__((__unused__)) __Request__mach_port_deallocate_t *In0P) |
807 | { |
808 | |
809 | typedef __Request__mach_port_deallocate_t __Request; |
810 | #if __MigTypeCheck |
811 | if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
812 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
813 | return MIG_BAD_ARGUMENTS; |
814 | #endif /* __MigTypeCheck */ |
815 | |
816 | return MACH_MSG_SUCCESS; |
817 | } |
818 | #endif /* !defined(__MIG_check__Request__mach_port_deallocate_t__defined) */ |
819 | #endif /* __MIG_check__Request__mach_port_subsystem__ */ |
820 | #endif /* ( __MigTypeCheck ) */ |
821 | |
822 | |
823 | /* Routine mach_port_deallocate */ |
824 | mig_internal novalue _Xmach_port_deallocate |
825 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
826 | { |
827 | |
828 | #ifdef __MigPackStructs |
829 | #pragma pack(4) |
830 | #endif |
831 | typedef struct { |
832 | mach_msg_header_t Head; |
833 | NDR_record_t NDR; |
834 | mach_port_name_t name; |
835 | mach_msg_trailer_t trailer; |
836 | } Request __attribute__((unused)); |
837 | #ifdef __MigPackStructs |
838 | #pragma pack() |
839 | #endif |
840 | typedef __Request__mach_port_deallocate_t __Request; |
841 | typedef __Reply__mach_port_deallocate_t Reply __attribute__((unused)); |
842 | |
843 | /* |
844 | * typedef struct { |
845 | * mach_msg_header_t Head; |
846 | * NDR_record_t NDR; |
847 | * kern_return_t RetCode; |
848 | * } mig_reply_error_t; |
849 | */ |
850 | |
851 | Request *In0P = (Request *) InHeadP; |
852 | Reply *OutP = (Reply *) OutHeadP; |
853 | #ifdef __MIG_check__Request__mach_port_deallocate_t__defined |
854 | kern_return_t check_result; |
855 | #endif /* __MIG_check__Request__mach_port_deallocate_t__defined */ |
856 | |
857 | #if __MigKernelSpecificCode |
858 | #else |
859 | #endif /* __MigKernelSpecificCode */ |
860 | ipc_space_t task; |
861 | |
862 | __DeclareRcvRpc(3206, "mach_port_deallocate" ) |
863 | __BeforeRcvRpc(3206, "mach_port_deallocate" ) |
864 | |
865 | #if defined(__MIG_check__Request__mach_port_deallocate_t__defined) |
866 | check_result = __MIG_check__Request__mach_port_deallocate_t((__Request *)In0P); |
867 | if (check_result != MACH_MSG_SUCCESS) |
868 | { MIG_RETURN_ERROR(OutP, check_result); } |
869 | #endif /* defined(__MIG_check__Request__mach_port_deallocate_t__defined) */ |
870 | |
871 | task = convert_port_to_space(In0P->Head.msgh_request_port); |
872 | |
873 | OutP->RetCode = mach_port_deallocate(task, In0P->name); |
874 | space_deallocate(task); |
875 | #if __MigKernelSpecificCode |
876 | #endif /* __MigKernelSpecificCode */ |
877 | |
878 | OutP->NDR = NDR_record; |
879 | |
880 | |
881 | __AfterRcvRpc(3206, "mach_port_deallocate" ) |
882 | } |
883 | |
884 | #if ( __MigTypeCheck ) |
885 | #if __MIG_check__Request__mach_port_subsystem__ |
886 | #if !defined(__MIG_check__Request__mach_port_get_refs_t__defined) |
887 | #define __MIG_check__Request__mach_port_get_refs_t__defined |
888 | |
889 | mig_internal kern_return_t __MIG_check__Request__mach_port_get_refs_t(__attribute__((__unused__)) __Request__mach_port_get_refs_t *In0P) |
890 | { |
891 | |
892 | typedef __Request__mach_port_get_refs_t __Request; |
893 | #if __MigTypeCheck |
894 | if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
895 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
896 | return MIG_BAD_ARGUMENTS; |
897 | #endif /* __MigTypeCheck */ |
898 | |
899 | return MACH_MSG_SUCCESS; |
900 | } |
901 | #endif /* !defined(__MIG_check__Request__mach_port_get_refs_t__defined) */ |
902 | #endif /* __MIG_check__Request__mach_port_subsystem__ */ |
903 | #endif /* ( __MigTypeCheck ) */ |
904 | |
905 | |
906 | /* Routine mach_port_get_refs */ |
907 | mig_internal novalue _Xmach_port_get_refs |
908 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
909 | { |
910 | |
911 | #ifdef __MigPackStructs |
912 | #pragma pack(4) |
913 | #endif |
914 | typedef struct { |
915 | mach_msg_header_t Head; |
916 | NDR_record_t NDR; |
917 | mach_port_name_t name; |
918 | mach_port_right_t right; |
919 | mach_msg_trailer_t trailer; |
920 | } Request __attribute__((unused)); |
921 | #ifdef __MigPackStructs |
922 | #pragma pack() |
923 | #endif |
924 | typedef __Request__mach_port_get_refs_t __Request; |
925 | typedef __Reply__mach_port_get_refs_t Reply __attribute__((unused)); |
926 | |
927 | /* |
928 | * typedef struct { |
929 | * mach_msg_header_t Head; |
930 | * NDR_record_t NDR; |
931 | * kern_return_t RetCode; |
932 | * } mig_reply_error_t; |
933 | */ |
934 | |
935 | Request *In0P = (Request *) InHeadP; |
936 | Reply *OutP = (Reply *) OutHeadP; |
937 | #ifdef __MIG_check__Request__mach_port_get_refs_t__defined |
938 | kern_return_t check_result; |
939 | #endif /* __MIG_check__Request__mach_port_get_refs_t__defined */ |
940 | |
941 | #if __MigKernelSpecificCode |
942 | #else |
943 | #endif /* __MigKernelSpecificCode */ |
944 | ipc_space_t task; |
945 | |
946 | __DeclareRcvRpc(3207, "mach_port_get_refs" ) |
947 | __BeforeRcvRpc(3207, "mach_port_get_refs" ) |
948 | |
949 | #if defined(__MIG_check__Request__mach_port_get_refs_t__defined) |
950 | check_result = __MIG_check__Request__mach_port_get_refs_t((__Request *)In0P); |
951 | if (check_result != MACH_MSG_SUCCESS) |
952 | { MIG_RETURN_ERROR(OutP, check_result); } |
953 | #endif /* defined(__MIG_check__Request__mach_port_get_refs_t__defined) */ |
954 | |
955 | task = convert_port_to_space(In0P->Head.msgh_request_port); |
956 | |
957 | OutP->RetCode = mach_port_get_refs(task, In0P->name, In0P->right, &OutP->refs); |
958 | space_deallocate(task); |
959 | if (OutP->RetCode != KERN_SUCCESS) { |
960 | MIG_RETURN_ERROR(OutP, OutP->RetCode); |
961 | } |
962 | #if __MigKernelSpecificCode |
963 | #endif /* __MigKernelSpecificCode */ |
964 | |
965 | OutP->NDR = NDR_record; |
966 | |
967 | |
968 | OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply)); |
969 | __AfterRcvRpc(3207, "mach_port_get_refs" ) |
970 | } |
971 | |
972 | #if ( __MigTypeCheck ) |
973 | #if __MIG_check__Request__mach_port_subsystem__ |
974 | #if !defined(__MIG_check__Request__mach_port_mod_refs_t__defined) |
975 | #define __MIG_check__Request__mach_port_mod_refs_t__defined |
976 | |
977 | mig_internal kern_return_t __MIG_check__Request__mach_port_mod_refs_t(__attribute__((__unused__)) __Request__mach_port_mod_refs_t *In0P) |
978 | { |
979 | |
980 | typedef __Request__mach_port_mod_refs_t __Request; |
981 | #if __MigTypeCheck |
982 | if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
983 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
984 | return MIG_BAD_ARGUMENTS; |
985 | #endif /* __MigTypeCheck */ |
986 | |
987 | return MACH_MSG_SUCCESS; |
988 | } |
989 | #endif /* !defined(__MIG_check__Request__mach_port_mod_refs_t__defined) */ |
990 | #endif /* __MIG_check__Request__mach_port_subsystem__ */ |
991 | #endif /* ( __MigTypeCheck ) */ |
992 | |
993 | |
994 | /* Routine mach_port_mod_refs */ |
995 | mig_internal novalue _Xmach_port_mod_refs |
996 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
997 | { |
998 | |
999 | #ifdef __MigPackStructs |
1000 | #pragma pack(4) |
1001 | #endif |
1002 | typedef struct { |
1003 | mach_msg_header_t Head; |
1004 | NDR_record_t NDR; |
1005 | mach_port_name_t name; |
1006 | mach_port_right_t right; |
1007 | mach_port_delta_t delta; |
1008 | mach_msg_trailer_t trailer; |
1009 | } Request __attribute__((unused)); |
1010 | #ifdef __MigPackStructs |
1011 | #pragma pack() |
1012 | #endif |
1013 | typedef __Request__mach_port_mod_refs_t __Request; |
1014 | typedef __Reply__mach_port_mod_refs_t Reply __attribute__((unused)); |
1015 | |
1016 | /* |
1017 | * typedef struct { |
1018 | * mach_msg_header_t Head; |
1019 | * NDR_record_t NDR; |
1020 | * kern_return_t RetCode; |
1021 | * } mig_reply_error_t; |
1022 | */ |
1023 | |
1024 | Request *In0P = (Request *) InHeadP; |
1025 | Reply *OutP = (Reply *) OutHeadP; |
1026 | #ifdef __MIG_check__Request__mach_port_mod_refs_t__defined |
1027 | kern_return_t check_result; |
1028 | #endif /* __MIG_check__Request__mach_port_mod_refs_t__defined */ |
1029 | |
1030 | #if __MigKernelSpecificCode |
1031 | #else |
1032 | #endif /* __MigKernelSpecificCode */ |
1033 | ipc_space_t task; |
1034 | |
1035 | __DeclareRcvRpc(3208, "mach_port_mod_refs" ) |
1036 | __BeforeRcvRpc(3208, "mach_port_mod_refs" ) |
1037 | |
1038 | #if defined(__MIG_check__Request__mach_port_mod_refs_t__defined) |
1039 | check_result = __MIG_check__Request__mach_port_mod_refs_t((__Request *)In0P); |
1040 | if (check_result != MACH_MSG_SUCCESS) |
1041 | { MIG_RETURN_ERROR(OutP, check_result); } |
1042 | #endif /* defined(__MIG_check__Request__mach_port_mod_refs_t__defined) */ |
1043 | |
1044 | task = convert_port_to_space(In0P->Head.msgh_request_port); |
1045 | |
1046 | OutP->RetCode = mach_port_mod_refs(task, In0P->name, In0P->right, In0P->delta); |
1047 | space_deallocate(task); |
1048 | #if __MigKernelSpecificCode |
1049 | #endif /* __MigKernelSpecificCode */ |
1050 | |
1051 | OutP->NDR = NDR_record; |
1052 | |
1053 | |
1054 | __AfterRcvRpc(3208, "mach_port_mod_refs" ) |
1055 | } |
1056 | |
1057 | #if ( __MigTypeCheck ) |
1058 | #if __MIG_check__Request__mach_port_subsystem__ |
1059 | #if !defined(__MIG_check__Request__mach_port_peek_t__defined) |
1060 | #define __MIG_check__Request__mach_port_peek_t__defined |
1061 | |
1062 | mig_internal kern_return_t __MIG_check__Request__mach_port_peek_t(__attribute__((__unused__)) __Request__mach_port_peek_t *In0P) |
1063 | { |
1064 | |
1065 | typedef __Request__mach_port_peek_t __Request; |
1066 | #if __MigTypeCheck |
1067 | if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
1068 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
1069 | return MIG_BAD_ARGUMENTS; |
1070 | #endif /* __MigTypeCheck */ |
1071 | |
1072 | return MACH_MSG_SUCCESS; |
1073 | } |
1074 | #endif /* !defined(__MIG_check__Request__mach_port_peek_t__defined) */ |
1075 | #endif /* __MIG_check__Request__mach_port_subsystem__ */ |
1076 | #endif /* ( __MigTypeCheck ) */ |
1077 | |
1078 | |
1079 | /* Routine mach_port_peek */ |
1080 | mig_internal novalue _Xmach_port_peek |
1081 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
1082 | { |
1083 | |
1084 | #ifdef __MigPackStructs |
1085 | #pragma pack(4) |
1086 | #endif |
1087 | typedef struct { |
1088 | mach_msg_header_t Head; |
1089 | NDR_record_t NDR; |
1090 | mach_port_name_t name; |
1091 | mach_msg_trailer_type_t trailer_type; |
1092 | mach_port_seqno_t request_seqnop; |
1093 | mach_msg_type_number_t trailer_infopCnt; |
1094 | mach_msg_trailer_t trailer; |
1095 | } Request __attribute__((unused)); |
1096 | #ifdef __MigPackStructs |
1097 | #pragma pack() |
1098 | #endif |
1099 | typedef __Request__mach_port_peek_t __Request; |
1100 | typedef __Reply__mach_port_peek_t Reply __attribute__((unused)); |
1101 | |
1102 | /* |
1103 | * typedef struct { |
1104 | * mach_msg_header_t Head; |
1105 | * NDR_record_t NDR; |
1106 | * kern_return_t RetCode; |
1107 | * } mig_reply_error_t; |
1108 | */ |
1109 | |
1110 | Request *In0P = (Request *) InHeadP; |
1111 | Reply *OutP = (Reply *) OutHeadP; |
1112 | #ifdef __MIG_check__Request__mach_port_peek_t__defined |
1113 | kern_return_t check_result; |
1114 | #endif /* __MIG_check__Request__mach_port_peek_t__defined */ |
1115 | |
1116 | #if __MigKernelSpecificCode |
1117 | #else |
1118 | #endif /* __MigKernelSpecificCode */ |
1119 | ipc_space_t task; |
1120 | |
1121 | __DeclareRcvRpc(3209, "mach_port_peek" ) |
1122 | __BeforeRcvRpc(3209, "mach_port_peek" ) |
1123 | |
1124 | #if defined(__MIG_check__Request__mach_port_peek_t__defined) |
1125 | check_result = __MIG_check__Request__mach_port_peek_t((__Request *)In0P); |
1126 | if (check_result != MACH_MSG_SUCCESS) |
1127 | { MIG_RETURN_ERROR(OutP, check_result); } |
1128 | #endif /* defined(__MIG_check__Request__mach_port_peek_t__defined) */ |
1129 | |
1130 | task = convert_port_to_space(In0P->Head.msgh_request_port); |
1131 | |
1132 | OutP->trailer_infopCnt = 68; |
1133 | if (In0P->trailer_infopCnt < OutP->trailer_infopCnt) |
1134 | OutP->trailer_infopCnt = In0P->trailer_infopCnt; |
1135 | |
1136 | OutP->RetCode = mach_port_peek(task, In0P->name, In0P->trailer_type, &In0P->request_seqnop, &OutP->msg_sizep, &OutP->msg_idp, OutP->trailer_infop, &OutP->trailer_infopCnt); |
1137 | space_deallocate(task); |
1138 | if (OutP->RetCode != KERN_SUCCESS) { |
1139 | MIG_RETURN_ERROR(OutP, OutP->RetCode); |
1140 | } |
1141 | #if __MigKernelSpecificCode |
1142 | #endif /* __MigKernelSpecificCode */ |
1143 | |
1144 | OutP->NDR = NDR_record; |
1145 | |
1146 | |
1147 | OutP->request_seqnop = In0P->request_seqnop; |
1148 | OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply) - 68) + (_WALIGN_((OutP->trailer_infopCnt + 3) & ~3)); |
1149 | |
1150 | __AfterRcvRpc(3209, "mach_port_peek" ) |
1151 | } |
1152 | |
1153 | #if ( __MigTypeCheck ) |
1154 | #if __MIG_check__Request__mach_port_subsystem__ |
1155 | #if !defined(__MIG_check__Request__mach_port_set_mscount_t__defined) |
1156 | #define __MIG_check__Request__mach_port_set_mscount_t__defined |
1157 | |
1158 | mig_internal kern_return_t __MIG_check__Request__mach_port_set_mscount_t(__attribute__((__unused__)) __Request__mach_port_set_mscount_t *In0P) |
1159 | { |
1160 | |
1161 | typedef __Request__mach_port_set_mscount_t __Request; |
1162 | #if __MigTypeCheck |
1163 | if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
1164 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
1165 | return MIG_BAD_ARGUMENTS; |
1166 | #endif /* __MigTypeCheck */ |
1167 | |
1168 | return MACH_MSG_SUCCESS; |
1169 | } |
1170 | #endif /* !defined(__MIG_check__Request__mach_port_set_mscount_t__defined) */ |
1171 | #endif /* __MIG_check__Request__mach_port_subsystem__ */ |
1172 | #endif /* ( __MigTypeCheck ) */ |
1173 | |
1174 | |
1175 | /* Routine mach_port_set_mscount */ |
1176 | mig_internal novalue _Xmach_port_set_mscount |
1177 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
1178 | { |
1179 | |
1180 | #ifdef __MigPackStructs |
1181 | #pragma pack(4) |
1182 | #endif |
1183 | typedef struct { |
1184 | mach_msg_header_t Head; |
1185 | NDR_record_t NDR; |
1186 | mach_port_name_t name; |
1187 | mach_port_mscount_t mscount; |
1188 | mach_msg_trailer_t trailer; |
1189 | } Request __attribute__((unused)); |
1190 | #ifdef __MigPackStructs |
1191 | #pragma pack() |
1192 | #endif |
1193 | typedef __Request__mach_port_set_mscount_t __Request; |
1194 | typedef __Reply__mach_port_set_mscount_t Reply __attribute__((unused)); |
1195 | |
1196 | /* |
1197 | * typedef struct { |
1198 | * mach_msg_header_t Head; |
1199 | * NDR_record_t NDR; |
1200 | * kern_return_t RetCode; |
1201 | * } mig_reply_error_t; |
1202 | */ |
1203 | |
1204 | Request *In0P = (Request *) InHeadP; |
1205 | Reply *OutP = (Reply *) OutHeadP; |
1206 | #ifdef __MIG_check__Request__mach_port_set_mscount_t__defined |
1207 | kern_return_t check_result; |
1208 | #endif /* __MIG_check__Request__mach_port_set_mscount_t__defined */ |
1209 | |
1210 | #if __MigKernelSpecificCode |
1211 | #else |
1212 | #endif /* __MigKernelSpecificCode */ |
1213 | ipc_space_t task; |
1214 | |
1215 | __DeclareRcvRpc(3210, "mach_port_set_mscount" ) |
1216 | __BeforeRcvRpc(3210, "mach_port_set_mscount" ) |
1217 | |
1218 | #if defined(__MIG_check__Request__mach_port_set_mscount_t__defined) |
1219 | check_result = __MIG_check__Request__mach_port_set_mscount_t((__Request *)In0P); |
1220 | if (check_result != MACH_MSG_SUCCESS) |
1221 | { MIG_RETURN_ERROR(OutP, check_result); } |
1222 | #endif /* defined(__MIG_check__Request__mach_port_set_mscount_t__defined) */ |
1223 | |
1224 | task = convert_port_to_space(In0P->Head.msgh_request_port); |
1225 | |
1226 | OutP->RetCode = mach_port_set_mscount(task, In0P->name, In0P->mscount); |
1227 | space_deallocate(task); |
1228 | #if __MigKernelSpecificCode |
1229 | #endif /* __MigKernelSpecificCode */ |
1230 | |
1231 | OutP->NDR = NDR_record; |
1232 | |
1233 | |
1234 | __AfterRcvRpc(3210, "mach_port_set_mscount" ) |
1235 | } |
1236 | |
1237 | #if ( __MigTypeCheck ) |
1238 | #if __MIG_check__Request__mach_port_subsystem__ |
1239 | #if !defined(__MIG_check__Request__mach_port_get_set_status_t__defined) |
1240 | #define __MIG_check__Request__mach_port_get_set_status_t__defined |
1241 | |
1242 | mig_internal kern_return_t __MIG_check__Request__mach_port_get_set_status_t(__attribute__((__unused__)) __Request__mach_port_get_set_status_t *In0P) |
1243 | { |
1244 | |
1245 | typedef __Request__mach_port_get_set_status_t __Request; |
1246 | #if __MigTypeCheck |
1247 | if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
1248 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
1249 | return MIG_BAD_ARGUMENTS; |
1250 | #endif /* __MigTypeCheck */ |
1251 | |
1252 | return MACH_MSG_SUCCESS; |
1253 | } |
1254 | #endif /* !defined(__MIG_check__Request__mach_port_get_set_status_t__defined) */ |
1255 | #endif /* __MIG_check__Request__mach_port_subsystem__ */ |
1256 | #endif /* ( __MigTypeCheck ) */ |
1257 | |
1258 | |
1259 | /* Routine mach_port_get_set_status */ |
1260 | mig_internal novalue _Xmach_port_get_set_status |
1261 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
1262 | { |
1263 | |
1264 | #ifdef __MigPackStructs |
1265 | #pragma pack(4) |
1266 | #endif |
1267 | typedef struct { |
1268 | mach_msg_header_t Head; |
1269 | NDR_record_t NDR; |
1270 | mach_port_name_t name; |
1271 | mach_msg_trailer_t trailer; |
1272 | } Request __attribute__((unused)); |
1273 | #ifdef __MigPackStructs |
1274 | #pragma pack() |
1275 | #endif |
1276 | typedef __Request__mach_port_get_set_status_t __Request; |
1277 | typedef __Reply__mach_port_get_set_status_t Reply __attribute__((unused)); |
1278 | |
1279 | /* |
1280 | * typedef struct { |
1281 | * mach_msg_header_t Head; |
1282 | * NDR_record_t NDR; |
1283 | * kern_return_t RetCode; |
1284 | * } mig_reply_error_t; |
1285 | */ |
1286 | |
1287 | Request *In0P = (Request *) InHeadP; |
1288 | Reply *OutP = (Reply *) OutHeadP; |
1289 | #ifdef __MIG_check__Request__mach_port_get_set_status_t__defined |
1290 | kern_return_t check_result; |
1291 | #endif /* __MIG_check__Request__mach_port_get_set_status_t__defined */ |
1292 | |
1293 | #if __MigKernelSpecificCode |
1294 | #if UseStaticTemplates |
1295 | const static mach_msg_ool_descriptor_t membersTemplate = { |
1296 | /* addr = */ (void *)0, |
1297 | /* size = */ 0, |
1298 | /* deal = */ FALSE, |
1299 | /* copy = */ MACH_MSG_VIRTUAL_COPY, |
1300 | /* pad2 = */ 0, |
1301 | /* type = */ MACH_MSG_OOL_DESCRIPTOR, |
1302 | }; |
1303 | #endif /* UseStaticTemplates */ |
1304 | |
1305 | #else |
1306 | #if UseStaticTemplates |
1307 | const static mach_msg_ool_descriptor_t membersTemplate = { |
1308 | /* addr = */ (void *)0, |
1309 | /* size = */ 0, |
1310 | /* deal = */ FALSE, |
1311 | /* copy = */ MACH_MSG_VIRTUAL_COPY, |
1312 | /* pad2 = */ 0, |
1313 | /* type = */ MACH_MSG_OOL_DESCRIPTOR, |
1314 | }; |
1315 | #endif /* UseStaticTemplates */ |
1316 | |
1317 | #endif /* __MigKernelSpecificCode */ |
1318 | kern_return_t RetCode; |
1319 | ipc_space_inspect_t task; |
1320 | |
1321 | __DeclareRcvRpc(3211, "mach_port_get_set_status" ) |
1322 | __BeforeRcvRpc(3211, "mach_port_get_set_status" ) |
1323 | |
1324 | #if defined(__MIG_check__Request__mach_port_get_set_status_t__defined) |
1325 | check_result = __MIG_check__Request__mach_port_get_set_status_t((__Request *)In0P); |
1326 | if (check_result != MACH_MSG_SUCCESS) |
1327 | { MIG_RETURN_ERROR(OutP, check_result); } |
1328 | #endif /* defined(__MIG_check__Request__mach_port_get_set_status_t__defined) */ |
1329 | |
1330 | #if UseStaticTemplates |
1331 | OutP->members = membersTemplate; |
1332 | #else /* UseStaticTemplates */ |
1333 | OutP->members.deallocate = FALSE; |
1334 | OutP->members.copy = MACH_MSG_VIRTUAL_COPY; |
1335 | OutP->members.pad1 = 0; |
1336 | OutP->members.type = MACH_MSG_OOL_DESCRIPTOR; |
1337 | #if defined(KERNEL) && !defined(__LP64__) |
1338 | OutP->members.pad_end = 0; |
1339 | #endif |
1340 | #endif /* UseStaticTemplates */ |
1341 | |
1342 | |
1343 | task = convert_port_to_space_inspect(In0P->Head.msgh_request_port); |
1344 | |
1345 | OutP->membersCnt = 0; |
1346 | |
1347 | RetCode = mach_port_get_set_status(task, In0P->name, (mach_port_name_array_t *)&(OutP->members.address), &OutP->membersCnt); |
1348 | space_inspect_deallocate(task); |
1349 | if (RetCode != KERN_SUCCESS) { |
1350 | MIG_RETURN_ERROR(OutP, RetCode); |
1351 | } |
1352 | #if __MigKernelSpecificCode |
1353 | #endif /* __MigKernelSpecificCode */ |
1354 | OutP->members.size = OutP->membersCnt * 4; |
1355 | |
1356 | |
1357 | OutP->NDR = NDR_record; |
1358 | |
1359 | |
1360 | OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX; |
1361 | OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply)); |
1362 | OutP->msgh_body.msgh_descriptor_count = 1; |
1363 | __AfterRcvRpc(3211, "mach_port_get_set_status" ) |
1364 | } |
1365 | |
1366 | #if ( __MigTypeCheck ) |
1367 | #if __MIG_check__Request__mach_port_subsystem__ |
1368 | #if !defined(__MIG_check__Request__mach_port_move_member_t__defined) |
1369 | #define __MIG_check__Request__mach_port_move_member_t__defined |
1370 | |
1371 | mig_internal kern_return_t __MIG_check__Request__mach_port_move_member_t(__attribute__((__unused__)) __Request__mach_port_move_member_t *In0P) |
1372 | { |
1373 | |
1374 | typedef __Request__mach_port_move_member_t __Request; |
1375 | #if __MigTypeCheck |
1376 | if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
1377 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
1378 | return MIG_BAD_ARGUMENTS; |
1379 | #endif /* __MigTypeCheck */ |
1380 | |
1381 | return MACH_MSG_SUCCESS; |
1382 | } |
1383 | #endif /* !defined(__MIG_check__Request__mach_port_move_member_t__defined) */ |
1384 | #endif /* __MIG_check__Request__mach_port_subsystem__ */ |
1385 | #endif /* ( __MigTypeCheck ) */ |
1386 | |
1387 | |
1388 | /* Routine mach_port_move_member */ |
1389 | mig_internal novalue _Xmach_port_move_member |
1390 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
1391 | { |
1392 | |
1393 | #ifdef __MigPackStructs |
1394 | #pragma pack(4) |
1395 | #endif |
1396 | typedef struct { |
1397 | mach_msg_header_t Head; |
1398 | NDR_record_t NDR; |
1399 | mach_port_name_t member; |
1400 | mach_port_name_t after; |
1401 | mach_msg_trailer_t trailer; |
1402 | } Request __attribute__((unused)); |
1403 | #ifdef __MigPackStructs |
1404 | #pragma pack() |
1405 | #endif |
1406 | typedef __Request__mach_port_move_member_t __Request; |
1407 | typedef __Reply__mach_port_move_member_t Reply __attribute__((unused)); |
1408 | |
1409 | /* |
1410 | * typedef struct { |
1411 | * mach_msg_header_t Head; |
1412 | * NDR_record_t NDR; |
1413 | * kern_return_t RetCode; |
1414 | * } mig_reply_error_t; |
1415 | */ |
1416 | |
1417 | Request *In0P = (Request *) InHeadP; |
1418 | Reply *OutP = (Reply *) OutHeadP; |
1419 | #ifdef __MIG_check__Request__mach_port_move_member_t__defined |
1420 | kern_return_t check_result; |
1421 | #endif /* __MIG_check__Request__mach_port_move_member_t__defined */ |
1422 | |
1423 | #if __MigKernelSpecificCode |
1424 | #else |
1425 | #endif /* __MigKernelSpecificCode */ |
1426 | ipc_space_t task; |
1427 | |
1428 | __DeclareRcvRpc(3212, "mach_port_move_member" ) |
1429 | __BeforeRcvRpc(3212, "mach_port_move_member" ) |
1430 | |
1431 | #if defined(__MIG_check__Request__mach_port_move_member_t__defined) |
1432 | check_result = __MIG_check__Request__mach_port_move_member_t((__Request *)In0P); |
1433 | if (check_result != MACH_MSG_SUCCESS) |
1434 | { MIG_RETURN_ERROR(OutP, check_result); } |
1435 | #endif /* defined(__MIG_check__Request__mach_port_move_member_t__defined) */ |
1436 | |
1437 | task = convert_port_to_space(In0P->Head.msgh_request_port); |
1438 | |
1439 | OutP->RetCode = mach_port_move_member(task, In0P->member, In0P->after); |
1440 | space_deallocate(task); |
1441 | #if __MigKernelSpecificCode |
1442 | #endif /* __MigKernelSpecificCode */ |
1443 | |
1444 | OutP->NDR = NDR_record; |
1445 | |
1446 | |
1447 | __AfterRcvRpc(3212, "mach_port_move_member" ) |
1448 | } |
1449 | |
1450 | #if ( __MigTypeCheck ) |
1451 | #if __MIG_check__Request__mach_port_subsystem__ |
1452 | #if !defined(__MIG_check__Request__mach_port_request_notification_t__defined) |
1453 | #define __MIG_check__Request__mach_port_request_notification_t__defined |
1454 | |
1455 | mig_internal kern_return_t __MIG_check__Request__mach_port_request_notification_t(__attribute__((__unused__)) __Request__mach_port_request_notification_t *In0P) |
1456 | { |
1457 | |
1458 | typedef __Request__mach_port_request_notification_t __Request; |
1459 | #if __MigTypeCheck |
1460 | if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
1461 | (In0P->msgh_body.msgh_descriptor_count != 1) || |
1462 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
1463 | return MIG_BAD_ARGUMENTS; |
1464 | #endif /* __MigTypeCheck */ |
1465 | |
1466 | #if __MigTypeCheck |
1467 | if (In0P->notify.type != MACH_MSG_PORT_DESCRIPTOR || ( |
1468 | In0P->notify.disposition != MACH_MSG_TYPE_MOVE_SEND_ONCE && |
1469 | In0P->notify.disposition != MACH_MSG_TYPE_MAKE_SEND_ONCE)) |
1470 | return MIG_TYPE_ERROR; |
1471 | #endif /* __MigTypeCheck */ |
1472 | |
1473 | return MACH_MSG_SUCCESS; |
1474 | } |
1475 | #endif /* !defined(__MIG_check__Request__mach_port_request_notification_t__defined) */ |
1476 | #endif /* __MIG_check__Request__mach_port_subsystem__ */ |
1477 | #endif /* ( __MigTypeCheck ) */ |
1478 | |
1479 | |
1480 | /* Routine mach_port_request_notification */ |
1481 | mig_internal novalue _Xmach_port_request_notification |
1482 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
1483 | { |
1484 | |
1485 | #ifdef __MigPackStructs |
1486 | #pragma pack(4) |
1487 | #endif |
1488 | typedef struct { |
1489 | mach_msg_header_t Head; |
1490 | /* start of the kernel processed data */ |
1491 | mach_msg_body_t msgh_body; |
1492 | mach_msg_port_descriptor_t notify; |
1493 | /* end of the kernel processed data */ |
1494 | NDR_record_t NDR; |
1495 | mach_port_name_t name; |
1496 | mach_msg_id_t msgid; |
1497 | mach_port_mscount_t sync; |
1498 | mach_msg_trailer_t trailer; |
1499 | } Request __attribute__((unused)); |
1500 | #ifdef __MigPackStructs |
1501 | #pragma pack() |
1502 | #endif |
1503 | typedef __Request__mach_port_request_notification_t __Request; |
1504 | typedef __Reply__mach_port_request_notification_t Reply __attribute__((unused)); |
1505 | |
1506 | /* |
1507 | * typedef struct { |
1508 | * mach_msg_header_t Head; |
1509 | * NDR_record_t NDR; |
1510 | * kern_return_t RetCode; |
1511 | * } mig_reply_error_t; |
1512 | */ |
1513 | |
1514 | Request *In0P = (Request *) InHeadP; |
1515 | Reply *OutP = (Reply *) OutHeadP; |
1516 | #ifdef __MIG_check__Request__mach_port_request_notification_t__defined |
1517 | kern_return_t check_result; |
1518 | #endif /* __MIG_check__Request__mach_port_request_notification_t__defined */ |
1519 | |
1520 | #if __MigKernelSpecificCode |
1521 | #if UseStaticTemplates |
1522 | const static mach_msg_port_descriptor_t previousTemplate = { |
1523 | /* name = */ MACH_PORT_NULL, |
1524 | /* pad1 = */ 0, |
1525 | /* pad2 = */ 0, |
1526 | /* disp = */ 18, |
1527 | /* type = */ MACH_MSG_PORT_DESCRIPTOR, |
1528 | }; |
1529 | #endif /* UseStaticTemplates */ |
1530 | |
1531 | #else |
1532 | #if UseStaticTemplates |
1533 | const static mach_msg_port_descriptor_t previousTemplate = { |
1534 | /* name = */ MACH_PORT_NULL, |
1535 | /* pad1 = */ 0, |
1536 | /* pad2 = */ 0, |
1537 | /* disp = */ 18, |
1538 | /* type = */ MACH_MSG_PORT_DESCRIPTOR, |
1539 | }; |
1540 | #endif /* UseStaticTemplates */ |
1541 | |
1542 | #endif /* __MigKernelSpecificCode */ |
1543 | kern_return_t RetCode; |
1544 | ipc_space_t task; |
1545 | |
1546 | __DeclareRcvRpc(3213, "mach_port_request_notification" ) |
1547 | __BeforeRcvRpc(3213, "mach_port_request_notification" ) |
1548 | |
1549 | #if defined(__MIG_check__Request__mach_port_request_notification_t__defined) |
1550 | check_result = __MIG_check__Request__mach_port_request_notification_t((__Request *)In0P); |
1551 | if (check_result != MACH_MSG_SUCCESS) |
1552 | { MIG_RETURN_ERROR(OutP, check_result); } |
1553 | #endif /* defined(__MIG_check__Request__mach_port_request_notification_t__defined) */ |
1554 | |
1555 | #if UseStaticTemplates |
1556 | OutP->previous = previousTemplate; |
1557 | #else /* UseStaticTemplates */ |
1558 | #if __MigKernelSpecificCode |
1559 | OutP->previous.disposition = 18; |
1560 | #else |
1561 | OutP->previous.disposition = 18; |
1562 | #endif /* __MigKernelSpecificCode */ |
1563 | #if !(defined(KERNEL) && defined(__LP64__)) |
1564 | OutP->previous.pad1 = 0; |
1565 | #endif |
1566 | OutP->previous.pad2 = 0; |
1567 | OutP->previous.type = MACH_MSG_PORT_DESCRIPTOR; |
1568 | #if defined(KERNEL) |
1569 | OutP->previous.pad_end = 0; |
1570 | #endif |
1571 | #endif /* UseStaticTemplates */ |
1572 | |
1573 | |
1574 | task = convert_port_to_space(In0P->Head.msgh_request_port); |
1575 | |
1576 | RetCode = mach_port_request_notification(task, In0P->name, In0P->msgid, In0P->sync, In0P->notify.name, &OutP->previous.name); |
1577 | space_deallocate(task); |
1578 | if (RetCode != KERN_SUCCESS) { |
1579 | MIG_RETURN_ERROR(OutP, RetCode); |
1580 | } |
1581 | #if __MigKernelSpecificCode |
1582 | #endif /* __MigKernelSpecificCode */ |
1583 | |
1584 | OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX; |
1585 | OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply)); |
1586 | OutP->msgh_body.msgh_descriptor_count = 1; |
1587 | __AfterRcvRpc(3213, "mach_port_request_notification" ) |
1588 | } |
1589 | |
1590 | #if ( __MigTypeCheck ) |
1591 | #if __MIG_check__Request__mach_port_subsystem__ |
1592 | #if !defined(__MIG_check__Request__mach_port_insert_right_t__defined) |
1593 | #define __MIG_check__Request__mach_port_insert_right_t__defined |
1594 | |
1595 | mig_internal kern_return_t __MIG_check__Request__mach_port_insert_right_t(__attribute__((__unused__)) __Request__mach_port_insert_right_t *In0P) |
1596 | { |
1597 | |
1598 | typedef __Request__mach_port_insert_right_t __Request; |
1599 | #if __MigTypeCheck |
1600 | if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
1601 | (In0P->msgh_body.msgh_descriptor_count != 1) || |
1602 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
1603 | return MIG_BAD_ARGUMENTS; |
1604 | #endif /* __MigTypeCheck */ |
1605 | |
1606 | #if __MigTypeCheck |
1607 | if (In0P->poly.type != MACH_MSG_PORT_DESCRIPTOR) |
1608 | return MIG_TYPE_ERROR; |
1609 | #endif /* __MigTypeCheck */ |
1610 | |
1611 | return MACH_MSG_SUCCESS; |
1612 | } |
1613 | #endif /* !defined(__MIG_check__Request__mach_port_insert_right_t__defined) */ |
1614 | #endif /* __MIG_check__Request__mach_port_subsystem__ */ |
1615 | #endif /* ( __MigTypeCheck ) */ |
1616 | |
1617 | |
1618 | /* Routine mach_port_insert_right */ |
1619 | mig_internal novalue _Xmach_port_insert_right |
1620 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
1621 | { |
1622 | |
1623 | #ifdef __MigPackStructs |
1624 | #pragma pack(4) |
1625 | #endif |
1626 | typedef struct { |
1627 | mach_msg_header_t Head; |
1628 | /* start of the kernel processed data */ |
1629 | mach_msg_body_t msgh_body; |
1630 | mach_msg_port_descriptor_t poly; |
1631 | /* end of the kernel processed data */ |
1632 | NDR_record_t NDR; |
1633 | mach_port_name_t name; |
1634 | mach_msg_trailer_t trailer; |
1635 | } Request __attribute__((unused)); |
1636 | #ifdef __MigPackStructs |
1637 | #pragma pack() |
1638 | #endif |
1639 | typedef __Request__mach_port_insert_right_t __Request; |
1640 | typedef __Reply__mach_port_insert_right_t Reply __attribute__((unused)); |
1641 | |
1642 | /* |
1643 | * typedef struct { |
1644 | * mach_msg_header_t Head; |
1645 | * NDR_record_t NDR; |
1646 | * kern_return_t RetCode; |
1647 | * } mig_reply_error_t; |
1648 | */ |
1649 | |
1650 | Request *In0P = (Request *) InHeadP; |
1651 | Reply *OutP = (Reply *) OutHeadP; |
1652 | #ifdef __MIG_check__Request__mach_port_insert_right_t__defined |
1653 | kern_return_t check_result; |
1654 | #endif /* __MIG_check__Request__mach_port_insert_right_t__defined */ |
1655 | |
1656 | #if __MigKernelSpecificCode |
1657 | #else |
1658 | #endif /* __MigKernelSpecificCode */ |
1659 | ipc_space_t task; |
1660 | |
1661 | __DeclareRcvRpc(3214, "mach_port_insert_right" ) |
1662 | __BeforeRcvRpc(3214, "mach_port_insert_right" ) |
1663 | |
1664 | #if defined(__MIG_check__Request__mach_port_insert_right_t__defined) |
1665 | check_result = __MIG_check__Request__mach_port_insert_right_t((__Request *)In0P); |
1666 | if (check_result != MACH_MSG_SUCCESS) |
1667 | { MIG_RETURN_ERROR(OutP, check_result); } |
1668 | #endif /* defined(__MIG_check__Request__mach_port_insert_right_t__defined) */ |
1669 | |
1670 | task = convert_port_to_space(In0P->Head.msgh_request_port); |
1671 | |
1672 | OutP->RetCode = mach_port_insert_right(task, In0P->name, In0P->poly.name, In0P->poly.disposition); |
1673 | space_deallocate(task); |
1674 | #if __MigKernelSpecificCode |
1675 | #endif /* __MigKernelSpecificCode */ |
1676 | |
1677 | OutP->NDR = NDR_record; |
1678 | |
1679 | |
1680 | __AfterRcvRpc(3214, "mach_port_insert_right" ) |
1681 | } |
1682 | |
1683 | #if ( __MigTypeCheck ) |
1684 | #if __MIG_check__Request__mach_port_subsystem__ |
1685 | #if !defined(__MIG_check__Request__mach_port_extract_right_t__defined) |
1686 | #define |
1687 | |
1688 | mig_internal kern_return_t (__attribute__((__unused__)) __Request__mach_port_extract_right_t *In0P) |
1689 | { |
1690 | |
1691 | typedef __Request__mach_port_extract_right_t __Request; |
1692 | #if __MigTypeCheck |
1693 | if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
1694 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
1695 | return MIG_BAD_ARGUMENTS; |
1696 | #endif /* __MigTypeCheck */ |
1697 | |
1698 | return MACH_MSG_SUCCESS; |
1699 | } |
1700 | #endif /* !defined(__MIG_check__Request__mach_port_extract_right_t__defined) */ |
1701 | #endif /* __MIG_check__Request__mach_port_subsystem__ */ |
1702 | #endif /* ( __MigTypeCheck ) */ |
1703 | |
1704 | |
1705 | /* Routine mach_port_extract_right */ |
1706 | mig_internal novalue |
1707 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
1708 | { |
1709 | |
1710 | #ifdef __MigPackStructs |
1711 | #pragma pack(4) |
1712 | #endif |
1713 | typedef struct { |
1714 | mach_msg_header_t Head; |
1715 | NDR_record_t NDR; |
1716 | mach_port_name_t name; |
1717 | mach_msg_type_name_t msgt_name; |
1718 | mach_msg_trailer_t trailer; |
1719 | } Request __attribute__((unused)); |
1720 | #ifdef __MigPackStructs |
1721 | #pragma pack() |
1722 | #endif |
1723 | typedef __Request__mach_port_extract_right_t __Request; |
1724 | typedef __Reply__mach_port_extract_right_t Reply __attribute__((unused)); |
1725 | |
1726 | /* |
1727 | * typedef struct { |
1728 | * mach_msg_header_t Head; |
1729 | * NDR_record_t NDR; |
1730 | * kern_return_t RetCode; |
1731 | * } mig_reply_error_t; |
1732 | */ |
1733 | |
1734 | Request *In0P = (Request *) InHeadP; |
1735 | Reply *OutP = (Reply *) OutHeadP; |
1736 | #ifdef __MIG_check__Request__mach_port_extract_right_t__defined |
1737 | kern_return_t check_result; |
1738 | #endif /* __MIG_check__Request__mach_port_extract_right_t__defined */ |
1739 | |
1740 | #if __MigKernelSpecificCode |
1741 | #if UseStaticTemplates |
1742 | const static mach_msg_port_descriptor_t polyTemplate = { |
1743 | /* name = */ MACH_PORT_NULL, |
1744 | /* pad1 = */ 0, |
1745 | /* pad2 = */ 0, |
1746 | /* disp = */ ((mach_msg_type_name_t) -1), |
1747 | /* type = */ MACH_MSG_PORT_DESCRIPTOR, |
1748 | }; |
1749 | #endif /* UseStaticTemplates */ |
1750 | |
1751 | #else |
1752 | #if UseStaticTemplates |
1753 | const static mach_msg_port_descriptor_t polyTemplate = { |
1754 | /* name = */ MACH_PORT_NULL, |
1755 | /* pad1 = */ 0, |
1756 | /* pad2 = */ 0, |
1757 | /* disp = */ ((mach_msg_type_name_t) -1), |
1758 | /* type = */ MACH_MSG_PORT_DESCRIPTOR, |
1759 | }; |
1760 | #endif /* UseStaticTemplates */ |
1761 | |
1762 | #endif /* __MigKernelSpecificCode */ |
1763 | kern_return_t RetCode; |
1764 | ipc_space_t task; |
1765 | mach_msg_type_name_t polyPoly; |
1766 | |
1767 | __DeclareRcvRpc(3215, "mach_port_extract_right" ) |
1768 | __BeforeRcvRpc(3215, "mach_port_extract_right" ) |
1769 | |
1770 | #if defined(__MIG_check__Request__mach_port_extract_right_t__defined) |
1771 | check_result = __MIG_check__Request__mach_port_extract_right_t((__Request *)In0P); |
1772 | if (check_result != MACH_MSG_SUCCESS) |
1773 | { MIG_RETURN_ERROR(OutP, check_result); } |
1774 | #endif /* defined(__MIG_check__Request__mach_port_extract_right_t__defined) */ |
1775 | |
1776 | #if UseStaticTemplates |
1777 | OutP->poly = polyTemplate; |
1778 | #else /* UseStaticTemplates */ |
1779 | #if !(defined(KERNEL) && defined(__LP64__)) |
1780 | OutP->poly.pad1 = 0; |
1781 | #endif |
1782 | OutP->poly.pad2 = 0; |
1783 | OutP->poly.type = MACH_MSG_PORT_DESCRIPTOR; |
1784 | #if defined(KERNEL) |
1785 | OutP->poly.pad_end = 0; |
1786 | #endif |
1787 | #endif /* UseStaticTemplates */ |
1788 | |
1789 | |
1790 | task = convert_port_to_space(In0P->Head.msgh_request_port); |
1791 | |
1792 | RetCode = mach_port_extract_right(task, In0P->name, In0P->msgt_name, &OutP->poly.name, &polyPoly); |
1793 | space_deallocate(task); |
1794 | if (RetCode != KERN_SUCCESS) { |
1795 | MIG_RETURN_ERROR(OutP, RetCode); |
1796 | } |
1797 | #if __MigKernelSpecificCode |
1798 | #endif /* __MigKernelSpecificCode */ |
1799 | OutP->poly.disposition = polyPoly; |
1800 | |
1801 | #if __MigKernelSpecificCode |
1802 | if (polyPoly == MACH_MSG_TYPE_PORT_RECEIVE) |
1803 | if (IP_VALID((ipc_port_t) In0P->Head.msgh_reply_port) && |
1804 | IP_VALID((ipc_port_t) OutP->poly.name) && |
1805 | ipc_port_check_circularity((ipc_port_t) OutP->poly.name, (ipc_port_t) In0P->Head.msgh_reply_port)) |
1806 | OutP->Head.msgh_bits |= MACH_MSGH_BITS_CIRCULAR; |
1807 | #endif /* __MigKernelSpecificCode */ |
1808 | |
1809 | OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX; |
1810 | OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply)); |
1811 | OutP->msgh_body.msgh_descriptor_count = 1; |
1812 | __AfterRcvRpc(3215, "mach_port_extract_right" ) |
1813 | } |
1814 | |
1815 | #if ( __MigTypeCheck ) |
1816 | #if __MIG_check__Request__mach_port_subsystem__ |
1817 | #if !defined(__MIG_check__Request__mach_port_set_seqno_t__defined) |
1818 | #define __MIG_check__Request__mach_port_set_seqno_t__defined |
1819 | |
1820 | mig_internal kern_return_t __MIG_check__Request__mach_port_set_seqno_t(__attribute__((__unused__)) __Request__mach_port_set_seqno_t *In0P) |
1821 | { |
1822 | |
1823 | typedef __Request__mach_port_set_seqno_t __Request; |
1824 | #if __MigTypeCheck |
1825 | if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
1826 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
1827 | return MIG_BAD_ARGUMENTS; |
1828 | #endif /* __MigTypeCheck */ |
1829 | |
1830 | return MACH_MSG_SUCCESS; |
1831 | } |
1832 | #endif /* !defined(__MIG_check__Request__mach_port_set_seqno_t__defined) */ |
1833 | #endif /* __MIG_check__Request__mach_port_subsystem__ */ |
1834 | #endif /* ( __MigTypeCheck ) */ |
1835 | |
1836 | |
1837 | /* Routine mach_port_set_seqno */ |
1838 | mig_internal novalue _Xmach_port_set_seqno |
1839 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
1840 | { |
1841 | |
1842 | #ifdef __MigPackStructs |
1843 | #pragma pack(4) |
1844 | #endif |
1845 | typedef struct { |
1846 | mach_msg_header_t Head; |
1847 | NDR_record_t NDR; |
1848 | mach_port_name_t name; |
1849 | mach_port_seqno_t seqno; |
1850 | mach_msg_trailer_t trailer; |
1851 | } Request __attribute__((unused)); |
1852 | #ifdef __MigPackStructs |
1853 | #pragma pack() |
1854 | #endif |
1855 | typedef __Request__mach_port_set_seqno_t __Request; |
1856 | typedef __Reply__mach_port_set_seqno_t Reply __attribute__((unused)); |
1857 | |
1858 | /* |
1859 | * typedef struct { |
1860 | * mach_msg_header_t Head; |
1861 | * NDR_record_t NDR; |
1862 | * kern_return_t RetCode; |
1863 | * } mig_reply_error_t; |
1864 | */ |
1865 | |
1866 | Request *In0P = (Request *) InHeadP; |
1867 | Reply *OutP = (Reply *) OutHeadP; |
1868 | #ifdef __MIG_check__Request__mach_port_set_seqno_t__defined |
1869 | kern_return_t check_result; |
1870 | #endif /* __MIG_check__Request__mach_port_set_seqno_t__defined */ |
1871 | |
1872 | #if __MigKernelSpecificCode |
1873 | #else |
1874 | #endif /* __MigKernelSpecificCode */ |
1875 | ipc_space_t task; |
1876 | |
1877 | __DeclareRcvRpc(3216, "mach_port_set_seqno" ) |
1878 | __BeforeRcvRpc(3216, "mach_port_set_seqno" ) |
1879 | |
1880 | #if defined(__MIG_check__Request__mach_port_set_seqno_t__defined) |
1881 | check_result = __MIG_check__Request__mach_port_set_seqno_t((__Request *)In0P); |
1882 | if (check_result != MACH_MSG_SUCCESS) |
1883 | { MIG_RETURN_ERROR(OutP, check_result); } |
1884 | #endif /* defined(__MIG_check__Request__mach_port_set_seqno_t__defined) */ |
1885 | |
1886 | task = convert_port_to_space(In0P->Head.msgh_request_port); |
1887 | |
1888 | OutP->RetCode = mach_port_set_seqno(task, In0P->name, In0P->seqno); |
1889 | space_deallocate(task); |
1890 | #if __MigKernelSpecificCode |
1891 | #endif /* __MigKernelSpecificCode */ |
1892 | |
1893 | OutP->NDR = NDR_record; |
1894 | |
1895 | |
1896 | __AfterRcvRpc(3216, "mach_port_set_seqno" ) |
1897 | } |
1898 | |
1899 | #if ( __MigTypeCheck ) |
1900 | #if __MIG_check__Request__mach_port_subsystem__ |
1901 | #if !defined(__MIG_check__Request__mach_port_get_attributes_t__defined) |
1902 | #define __MIG_check__Request__mach_port_get_attributes_t__defined |
1903 | |
1904 | mig_internal kern_return_t __MIG_check__Request__mach_port_get_attributes_t(__attribute__((__unused__)) __Request__mach_port_get_attributes_t *In0P) |
1905 | { |
1906 | |
1907 | typedef __Request__mach_port_get_attributes_t __Request; |
1908 | #if __MigTypeCheck |
1909 | if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
1910 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
1911 | return MIG_BAD_ARGUMENTS; |
1912 | #endif /* __MigTypeCheck */ |
1913 | |
1914 | return MACH_MSG_SUCCESS; |
1915 | } |
1916 | #endif /* !defined(__MIG_check__Request__mach_port_get_attributes_t__defined) */ |
1917 | #endif /* __MIG_check__Request__mach_port_subsystem__ */ |
1918 | #endif /* ( __MigTypeCheck ) */ |
1919 | |
1920 | |
1921 | /* Routine mach_port_get_attributes */ |
1922 | mig_internal novalue _Xmach_port_get_attributes |
1923 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
1924 | { |
1925 | |
1926 | #ifdef __MigPackStructs |
1927 | #pragma pack(4) |
1928 | #endif |
1929 | typedef struct { |
1930 | mach_msg_header_t Head; |
1931 | NDR_record_t NDR; |
1932 | mach_port_name_t name; |
1933 | mach_port_flavor_t flavor; |
1934 | mach_msg_type_number_t port_info_outCnt; |
1935 | mach_msg_trailer_t trailer; |
1936 | } Request __attribute__((unused)); |
1937 | #ifdef __MigPackStructs |
1938 | #pragma pack() |
1939 | #endif |
1940 | typedef __Request__mach_port_get_attributes_t __Request; |
1941 | typedef __Reply__mach_port_get_attributes_t Reply __attribute__((unused)); |
1942 | |
1943 | /* |
1944 | * typedef struct { |
1945 | * mach_msg_header_t Head; |
1946 | * NDR_record_t NDR; |
1947 | * kern_return_t RetCode; |
1948 | * } mig_reply_error_t; |
1949 | */ |
1950 | |
1951 | Request *In0P = (Request *) InHeadP; |
1952 | Reply *OutP = (Reply *) OutHeadP; |
1953 | #ifdef __MIG_check__Request__mach_port_get_attributes_t__defined |
1954 | kern_return_t check_result; |
1955 | #endif /* __MIG_check__Request__mach_port_get_attributes_t__defined */ |
1956 | |
1957 | #if __MigKernelSpecificCode |
1958 | #else |
1959 | #endif /* __MigKernelSpecificCode */ |
1960 | ipc_space_inspect_t task; |
1961 | |
1962 | __DeclareRcvRpc(3217, "mach_port_get_attributes" ) |
1963 | __BeforeRcvRpc(3217, "mach_port_get_attributes" ) |
1964 | |
1965 | #if defined(__MIG_check__Request__mach_port_get_attributes_t__defined) |
1966 | check_result = __MIG_check__Request__mach_port_get_attributes_t((__Request *)In0P); |
1967 | if (check_result != MACH_MSG_SUCCESS) |
1968 | { MIG_RETURN_ERROR(OutP, check_result); } |
1969 | #endif /* defined(__MIG_check__Request__mach_port_get_attributes_t__defined) */ |
1970 | |
1971 | task = convert_port_to_space_inspect(In0P->Head.msgh_request_port); |
1972 | |
1973 | OutP->port_info_outCnt = 17; |
1974 | if (In0P->port_info_outCnt < OutP->port_info_outCnt) |
1975 | OutP->port_info_outCnt = In0P->port_info_outCnt; |
1976 | |
1977 | OutP->RetCode = mach_port_get_attributes(task, In0P->name, In0P->flavor, OutP->port_info_out, &OutP->port_info_outCnt); |
1978 | space_inspect_deallocate(task); |
1979 | if (OutP->RetCode != KERN_SUCCESS) { |
1980 | MIG_RETURN_ERROR(OutP, OutP->RetCode); |
1981 | } |
1982 | #if __MigKernelSpecificCode |
1983 | #endif /* __MigKernelSpecificCode */ |
1984 | |
1985 | OutP->NDR = NDR_record; |
1986 | |
1987 | OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply) - 68) + (((4 * OutP->port_info_outCnt))); |
1988 | |
1989 | __AfterRcvRpc(3217, "mach_port_get_attributes" ) |
1990 | } |
1991 | |
1992 | #if ( __MigTypeCheck ) |
1993 | #if __MIG_check__Request__mach_port_subsystem__ |
1994 | #if !defined(__MIG_check__Request__mach_port_set_attributes_t__defined) |
1995 | #define __MIG_check__Request__mach_port_set_attributes_t__defined |
1996 | |
1997 | mig_internal kern_return_t __MIG_check__Request__mach_port_set_attributes_t(__attribute__((__unused__)) __Request__mach_port_set_attributes_t *In0P) |
1998 | { |
1999 | |
2000 | typedef __Request__mach_port_set_attributes_t __Request; |
2001 | #if __MigTypeCheck |
2002 | unsigned int msgh_size; |
2003 | #endif /* __MigTypeCheck */ |
2004 | |
2005 | #if __MigTypeCheck |
2006 | msgh_size = In0P->Head.msgh_size; |
2007 | if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
2008 | (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 68)) || (msgh_size > (mach_msg_size_t)sizeof(__Request))) |
2009 | return MIG_BAD_ARGUMENTS; |
2010 | #endif /* __MigTypeCheck */ |
2011 | |
2012 | #if defined(__NDR_convert__int_rep__Request__mach_port_set_attributes_t__port_infoCnt__defined) |
2013 | if (In0P->NDR.int_rep != NDR_record.int_rep) |
2014 | __NDR_convert__int_rep__Request__mach_port_set_attributes_t__port_infoCnt(&In0P->port_infoCnt, In0P->NDR.int_rep); |
2015 | #endif /* __NDR_convert__int_rep__Request__mach_port_set_attributes_t__port_infoCnt__defined */ |
2016 | #if __MigTypeCheck |
2017 | if ( In0P->port_infoCnt > 17 ) |
2018 | return MIG_BAD_ARGUMENTS; |
2019 | if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 68)) / 4 < In0P->port_infoCnt) || |
2020 | (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 68) + (4 * In0P->port_infoCnt))) |
2021 | return MIG_BAD_ARGUMENTS; |
2022 | #endif /* __MigTypeCheck */ |
2023 | |
2024 | return MACH_MSG_SUCCESS; |
2025 | } |
2026 | #endif /* !defined(__MIG_check__Request__mach_port_set_attributes_t__defined) */ |
2027 | #endif /* __MIG_check__Request__mach_port_subsystem__ */ |
2028 | #endif /* ( __MigTypeCheck ) */ |
2029 | |
2030 | |
2031 | /* Routine mach_port_set_attributes */ |
2032 | mig_internal novalue _Xmach_port_set_attributes |
2033 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
2034 | { |
2035 | |
2036 | #ifdef __MigPackStructs |
2037 | #pragma pack(4) |
2038 | #endif |
2039 | typedef struct { |
2040 | mach_msg_header_t Head; |
2041 | NDR_record_t NDR; |
2042 | mach_port_name_t name; |
2043 | mach_port_flavor_t flavor; |
2044 | mach_msg_type_number_t port_infoCnt; |
2045 | integer_t port_info[17]; |
2046 | mach_msg_trailer_t trailer; |
2047 | } Request __attribute__((unused)); |
2048 | #ifdef __MigPackStructs |
2049 | #pragma pack() |
2050 | #endif |
2051 | typedef __Request__mach_port_set_attributes_t __Request; |
2052 | typedef __Reply__mach_port_set_attributes_t Reply __attribute__((unused)); |
2053 | |
2054 | /* |
2055 | * typedef struct { |
2056 | * mach_msg_header_t Head; |
2057 | * NDR_record_t NDR; |
2058 | * kern_return_t RetCode; |
2059 | * } mig_reply_error_t; |
2060 | */ |
2061 | |
2062 | Request *In0P = (Request *) InHeadP; |
2063 | Reply *OutP = (Reply *) OutHeadP; |
2064 | #ifdef __MIG_check__Request__mach_port_set_attributes_t__defined |
2065 | kern_return_t check_result; |
2066 | #endif /* __MIG_check__Request__mach_port_set_attributes_t__defined */ |
2067 | |
2068 | #if __MigKernelSpecificCode |
2069 | #else |
2070 | #endif /* __MigKernelSpecificCode */ |
2071 | ipc_space_t task; |
2072 | |
2073 | __DeclareRcvRpc(3218, "mach_port_set_attributes" ) |
2074 | __BeforeRcvRpc(3218, "mach_port_set_attributes" ) |
2075 | |
2076 | #if defined(__MIG_check__Request__mach_port_set_attributes_t__defined) |
2077 | check_result = __MIG_check__Request__mach_port_set_attributes_t((__Request *)In0P); |
2078 | if (check_result != MACH_MSG_SUCCESS) |
2079 | { MIG_RETURN_ERROR(OutP, check_result); } |
2080 | #endif /* defined(__MIG_check__Request__mach_port_set_attributes_t__defined) */ |
2081 | |
2082 | task = convert_port_to_space(In0P->Head.msgh_request_port); |
2083 | |
2084 | OutP->RetCode = mach_port_set_attributes(task, In0P->name, In0P->flavor, In0P->port_info, In0P->port_infoCnt); |
2085 | space_deallocate(task); |
2086 | #if __MigKernelSpecificCode |
2087 | #endif /* __MigKernelSpecificCode */ |
2088 | |
2089 | OutP->NDR = NDR_record; |
2090 | |
2091 | |
2092 | __AfterRcvRpc(3218, "mach_port_set_attributes" ) |
2093 | } |
2094 | |
2095 | #if ( __MigTypeCheck ) |
2096 | #if __MIG_check__Request__mach_port_subsystem__ |
2097 | #if !defined(__MIG_check__Request__mach_port_allocate_qos_t__defined) |
2098 | #define __MIG_check__Request__mach_port_allocate_qos_t__defined |
2099 | |
2100 | mig_internal kern_return_t __MIG_check__Request__mach_port_allocate_qos_t(__attribute__((__unused__)) __Request__mach_port_allocate_qos_t *In0P) |
2101 | { |
2102 | |
2103 | typedef __Request__mach_port_allocate_qos_t __Request; |
2104 | #if __MigTypeCheck |
2105 | if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
2106 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
2107 | return MIG_BAD_ARGUMENTS; |
2108 | #endif /* __MigTypeCheck */ |
2109 | |
2110 | return MACH_MSG_SUCCESS; |
2111 | } |
2112 | #endif /* !defined(__MIG_check__Request__mach_port_allocate_qos_t__defined) */ |
2113 | #endif /* __MIG_check__Request__mach_port_subsystem__ */ |
2114 | #endif /* ( __MigTypeCheck ) */ |
2115 | |
2116 | |
2117 | /* Routine mach_port_allocate_qos */ |
2118 | mig_internal novalue _Xmach_port_allocate_qos |
2119 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
2120 | { |
2121 | |
2122 | #ifdef __MigPackStructs |
2123 | #pragma pack(4) |
2124 | #endif |
2125 | typedef struct { |
2126 | mach_msg_header_t Head; |
2127 | NDR_record_t NDR; |
2128 | mach_port_right_t right; |
2129 | mach_port_qos_t qos; |
2130 | mach_msg_trailer_t trailer; |
2131 | } Request __attribute__((unused)); |
2132 | #ifdef __MigPackStructs |
2133 | #pragma pack() |
2134 | #endif |
2135 | typedef __Request__mach_port_allocate_qos_t __Request; |
2136 | typedef __Reply__mach_port_allocate_qos_t Reply __attribute__((unused)); |
2137 | |
2138 | /* |
2139 | * typedef struct { |
2140 | * mach_msg_header_t Head; |
2141 | * NDR_record_t NDR; |
2142 | * kern_return_t RetCode; |
2143 | * } mig_reply_error_t; |
2144 | */ |
2145 | |
2146 | Request *In0P = (Request *) InHeadP; |
2147 | Reply *OutP = (Reply *) OutHeadP; |
2148 | #ifdef __MIG_check__Request__mach_port_allocate_qos_t__defined |
2149 | kern_return_t check_result; |
2150 | #endif /* __MIG_check__Request__mach_port_allocate_qos_t__defined */ |
2151 | |
2152 | #if __MigKernelSpecificCode |
2153 | #else |
2154 | #endif /* __MigKernelSpecificCode */ |
2155 | ipc_space_t task; |
2156 | |
2157 | __DeclareRcvRpc(3219, "mach_port_allocate_qos" ) |
2158 | __BeforeRcvRpc(3219, "mach_port_allocate_qos" ) |
2159 | |
2160 | #if defined(__MIG_check__Request__mach_port_allocate_qos_t__defined) |
2161 | check_result = __MIG_check__Request__mach_port_allocate_qos_t((__Request *)In0P); |
2162 | if (check_result != MACH_MSG_SUCCESS) |
2163 | { MIG_RETURN_ERROR(OutP, check_result); } |
2164 | #endif /* defined(__MIG_check__Request__mach_port_allocate_qos_t__defined) */ |
2165 | |
2166 | task = convert_port_to_space(In0P->Head.msgh_request_port); |
2167 | |
2168 | OutP->RetCode = mach_port_allocate_qos(task, In0P->right, &In0P->qos, &OutP->name); |
2169 | space_deallocate(task); |
2170 | if (OutP->RetCode != KERN_SUCCESS) { |
2171 | MIG_RETURN_ERROR(OutP, OutP->RetCode); |
2172 | } |
2173 | #if __MigKernelSpecificCode |
2174 | #endif /* __MigKernelSpecificCode */ |
2175 | |
2176 | OutP->NDR = NDR_record; |
2177 | |
2178 | |
2179 | OutP->qos = In0P->qos; |
2180 | |
2181 | OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply)); |
2182 | __AfterRcvRpc(3219, "mach_port_allocate_qos" ) |
2183 | } |
2184 | |
2185 | #if ( __MigTypeCheck ) |
2186 | #if __MIG_check__Request__mach_port_subsystem__ |
2187 | #if !defined(__MIG_check__Request__mach_port_allocate_full_t__defined) |
2188 | #define __MIG_check__Request__mach_port_allocate_full_t__defined |
2189 | |
2190 | mig_internal kern_return_t __MIG_check__Request__mach_port_allocate_full_t(__attribute__((__unused__)) __Request__mach_port_allocate_full_t *In0P) |
2191 | { |
2192 | |
2193 | typedef __Request__mach_port_allocate_full_t __Request; |
2194 | #if __MigTypeCheck |
2195 | if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
2196 | (In0P->msgh_body.msgh_descriptor_count != 1) || |
2197 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
2198 | return MIG_BAD_ARGUMENTS; |
2199 | #endif /* __MigTypeCheck */ |
2200 | |
2201 | #if __MigTypeCheck |
2202 | if (In0P->proto.type != MACH_MSG_PORT_DESCRIPTOR || |
2203 | In0P->proto.disposition != 17) |
2204 | return MIG_TYPE_ERROR; |
2205 | #endif /* __MigTypeCheck */ |
2206 | |
2207 | return MACH_MSG_SUCCESS; |
2208 | } |
2209 | #endif /* !defined(__MIG_check__Request__mach_port_allocate_full_t__defined) */ |
2210 | #endif /* __MIG_check__Request__mach_port_subsystem__ */ |
2211 | #endif /* ( __MigTypeCheck ) */ |
2212 | |
2213 | |
2214 | /* Routine mach_port_allocate_full */ |
2215 | mig_internal novalue _Xmach_port_allocate_full |
2216 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
2217 | { |
2218 | |
2219 | #ifdef __MigPackStructs |
2220 | #pragma pack(4) |
2221 | #endif |
2222 | typedef struct { |
2223 | mach_msg_header_t Head; |
2224 | /* start of the kernel processed data */ |
2225 | mach_msg_body_t msgh_body; |
2226 | mach_msg_port_descriptor_t proto; |
2227 | /* end of the kernel processed data */ |
2228 | NDR_record_t NDR; |
2229 | mach_port_right_t right; |
2230 | mach_port_qos_t qos; |
2231 | mach_port_name_t name; |
2232 | mach_msg_trailer_t trailer; |
2233 | } Request __attribute__((unused)); |
2234 | #ifdef __MigPackStructs |
2235 | #pragma pack() |
2236 | #endif |
2237 | typedef __Request__mach_port_allocate_full_t __Request; |
2238 | typedef __Reply__mach_port_allocate_full_t Reply __attribute__((unused)); |
2239 | |
2240 | /* |
2241 | * typedef struct { |
2242 | * mach_msg_header_t Head; |
2243 | * NDR_record_t NDR; |
2244 | * kern_return_t RetCode; |
2245 | * } mig_reply_error_t; |
2246 | */ |
2247 | |
2248 | Request *In0P = (Request *) InHeadP; |
2249 | Reply *OutP = (Reply *) OutHeadP; |
2250 | #ifdef __MIG_check__Request__mach_port_allocate_full_t__defined |
2251 | kern_return_t check_result; |
2252 | #endif /* __MIG_check__Request__mach_port_allocate_full_t__defined */ |
2253 | |
2254 | #if __MigKernelSpecificCode |
2255 | #else |
2256 | #endif /* __MigKernelSpecificCode */ |
2257 | ipc_space_t task; |
2258 | |
2259 | __DeclareRcvRpc(3220, "mach_port_allocate_full" ) |
2260 | __BeforeRcvRpc(3220, "mach_port_allocate_full" ) |
2261 | |
2262 | #if defined(__MIG_check__Request__mach_port_allocate_full_t__defined) |
2263 | check_result = __MIG_check__Request__mach_port_allocate_full_t((__Request *)In0P); |
2264 | if (check_result != MACH_MSG_SUCCESS) |
2265 | { MIG_RETURN_ERROR(OutP, check_result); } |
2266 | #endif /* defined(__MIG_check__Request__mach_port_allocate_full_t__defined) */ |
2267 | |
2268 | task = convert_port_to_space(In0P->Head.msgh_request_port); |
2269 | |
2270 | OutP->RetCode = mach_port_allocate_full(task, In0P->right, In0P->proto.name, &In0P->qos, &In0P->name); |
2271 | space_deallocate(task); |
2272 | if (OutP->RetCode != KERN_SUCCESS) { |
2273 | MIG_RETURN_ERROR(OutP, OutP->RetCode); |
2274 | } |
2275 | #if __MigKernelSpecificCode |
2276 | #endif /* __MigKernelSpecificCode */ |
2277 | |
2278 | OutP->NDR = NDR_record; |
2279 | |
2280 | |
2281 | OutP->qos = In0P->qos; |
2282 | |
2283 | OutP->name = In0P->name; |
2284 | |
2285 | OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply)); |
2286 | __AfterRcvRpc(3220, "mach_port_allocate_full" ) |
2287 | } |
2288 | |
2289 | #if ( __MigTypeCheck ) |
2290 | #if __MIG_check__Request__mach_port_subsystem__ |
2291 | #if !defined(__MIG_check__Request__task_set_port_space_t__defined) |
2292 | #define __MIG_check__Request__task_set_port_space_t__defined |
2293 | |
2294 | mig_internal kern_return_t __MIG_check__Request__task_set_port_space_t(__attribute__((__unused__)) __Request__task_set_port_space_t *In0P) |
2295 | { |
2296 | |
2297 | typedef __Request__task_set_port_space_t __Request; |
2298 | #if __MigTypeCheck |
2299 | if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
2300 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
2301 | return MIG_BAD_ARGUMENTS; |
2302 | #endif /* __MigTypeCheck */ |
2303 | |
2304 | return MACH_MSG_SUCCESS; |
2305 | } |
2306 | #endif /* !defined(__MIG_check__Request__task_set_port_space_t__defined) */ |
2307 | #endif /* __MIG_check__Request__mach_port_subsystem__ */ |
2308 | #endif /* ( __MigTypeCheck ) */ |
2309 | |
2310 | |
2311 | /* Routine task_set_port_space */ |
2312 | mig_internal novalue _Xtask_set_port_space |
2313 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
2314 | { |
2315 | |
2316 | #ifdef __MigPackStructs |
2317 | #pragma pack(4) |
2318 | #endif |
2319 | typedef struct { |
2320 | mach_msg_header_t Head; |
2321 | NDR_record_t NDR; |
2322 | int table_entries; |
2323 | mach_msg_trailer_t trailer; |
2324 | } Request __attribute__((unused)); |
2325 | #ifdef __MigPackStructs |
2326 | #pragma pack() |
2327 | #endif |
2328 | typedef __Request__task_set_port_space_t __Request; |
2329 | typedef __Reply__task_set_port_space_t Reply __attribute__((unused)); |
2330 | |
2331 | /* |
2332 | * typedef struct { |
2333 | * mach_msg_header_t Head; |
2334 | * NDR_record_t NDR; |
2335 | * kern_return_t RetCode; |
2336 | * } mig_reply_error_t; |
2337 | */ |
2338 | |
2339 | Request *In0P = (Request *) InHeadP; |
2340 | Reply *OutP = (Reply *) OutHeadP; |
2341 | #ifdef __MIG_check__Request__task_set_port_space_t__defined |
2342 | kern_return_t check_result; |
2343 | #endif /* __MIG_check__Request__task_set_port_space_t__defined */ |
2344 | |
2345 | #if __MigKernelSpecificCode |
2346 | #else |
2347 | #endif /* __MigKernelSpecificCode */ |
2348 | ipc_space_t task; |
2349 | |
2350 | __DeclareRcvRpc(3221, "task_set_port_space" ) |
2351 | __BeforeRcvRpc(3221, "task_set_port_space" ) |
2352 | |
2353 | #if defined(__MIG_check__Request__task_set_port_space_t__defined) |
2354 | check_result = __MIG_check__Request__task_set_port_space_t((__Request *)In0P); |
2355 | if (check_result != MACH_MSG_SUCCESS) |
2356 | { MIG_RETURN_ERROR(OutP, check_result); } |
2357 | #endif /* defined(__MIG_check__Request__task_set_port_space_t__defined) */ |
2358 | |
2359 | task = convert_port_to_space(In0P->Head.msgh_request_port); |
2360 | |
2361 | OutP->RetCode = task_set_port_space(task, In0P->table_entries); |
2362 | space_deallocate(task); |
2363 | #if __MigKernelSpecificCode |
2364 | #endif /* __MigKernelSpecificCode */ |
2365 | |
2366 | OutP->NDR = NDR_record; |
2367 | |
2368 | |
2369 | __AfterRcvRpc(3221, "task_set_port_space" ) |
2370 | } |
2371 | |
2372 | #if ( __MigTypeCheck ) |
2373 | #if __MIG_check__Request__mach_port_subsystem__ |
2374 | #if !defined(__MIG_check__Request__mach_port_get_srights_t__defined) |
2375 | #define __MIG_check__Request__mach_port_get_srights_t__defined |
2376 | |
2377 | mig_internal kern_return_t __MIG_check__Request__mach_port_get_srights_t(__attribute__((__unused__)) __Request__mach_port_get_srights_t *In0P) |
2378 | { |
2379 | |
2380 | typedef __Request__mach_port_get_srights_t __Request; |
2381 | #if __MigTypeCheck |
2382 | if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
2383 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
2384 | return MIG_BAD_ARGUMENTS; |
2385 | #endif /* __MigTypeCheck */ |
2386 | |
2387 | return MACH_MSG_SUCCESS; |
2388 | } |
2389 | #endif /* !defined(__MIG_check__Request__mach_port_get_srights_t__defined) */ |
2390 | #endif /* __MIG_check__Request__mach_port_subsystem__ */ |
2391 | #endif /* ( __MigTypeCheck ) */ |
2392 | |
2393 | |
2394 | /* Routine mach_port_get_srights */ |
2395 | mig_internal novalue _Xmach_port_get_srights |
2396 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
2397 | { |
2398 | |
2399 | #ifdef __MigPackStructs |
2400 | #pragma pack(4) |
2401 | #endif |
2402 | typedef struct { |
2403 | mach_msg_header_t Head; |
2404 | NDR_record_t NDR; |
2405 | mach_port_name_t name; |
2406 | mach_msg_trailer_t trailer; |
2407 | } Request __attribute__((unused)); |
2408 | #ifdef __MigPackStructs |
2409 | #pragma pack() |
2410 | #endif |
2411 | typedef __Request__mach_port_get_srights_t __Request; |
2412 | typedef __Reply__mach_port_get_srights_t Reply __attribute__((unused)); |
2413 | |
2414 | /* |
2415 | * typedef struct { |
2416 | * mach_msg_header_t Head; |
2417 | * NDR_record_t NDR; |
2418 | * kern_return_t RetCode; |
2419 | * } mig_reply_error_t; |
2420 | */ |
2421 | |
2422 | Request *In0P = (Request *) InHeadP; |
2423 | Reply *OutP = (Reply *) OutHeadP; |
2424 | #ifdef __MIG_check__Request__mach_port_get_srights_t__defined |
2425 | kern_return_t check_result; |
2426 | #endif /* __MIG_check__Request__mach_port_get_srights_t__defined */ |
2427 | |
2428 | #if __MigKernelSpecificCode |
2429 | #else |
2430 | #endif /* __MigKernelSpecificCode */ |
2431 | ipc_space_t task; |
2432 | |
2433 | __DeclareRcvRpc(3222, "mach_port_get_srights" ) |
2434 | __BeforeRcvRpc(3222, "mach_port_get_srights" ) |
2435 | |
2436 | #if defined(__MIG_check__Request__mach_port_get_srights_t__defined) |
2437 | check_result = __MIG_check__Request__mach_port_get_srights_t((__Request *)In0P); |
2438 | if (check_result != MACH_MSG_SUCCESS) |
2439 | { MIG_RETURN_ERROR(OutP, check_result); } |
2440 | #endif /* defined(__MIG_check__Request__mach_port_get_srights_t__defined) */ |
2441 | |
2442 | task = convert_port_to_space(In0P->Head.msgh_request_port); |
2443 | |
2444 | OutP->RetCode = mach_port_get_srights(task, In0P->name, &OutP->srights); |
2445 | space_deallocate(task); |
2446 | if (OutP->RetCode != KERN_SUCCESS) { |
2447 | MIG_RETURN_ERROR(OutP, OutP->RetCode); |
2448 | } |
2449 | #if __MigKernelSpecificCode |
2450 | #endif /* __MigKernelSpecificCode */ |
2451 | |
2452 | OutP->NDR = NDR_record; |
2453 | |
2454 | |
2455 | OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply)); |
2456 | __AfterRcvRpc(3222, "mach_port_get_srights" ) |
2457 | } |
2458 | |
2459 | #if ( __MigTypeCheck ) |
2460 | #if __MIG_check__Request__mach_port_subsystem__ |
2461 | #if !defined(__MIG_check__Request__mach_port_space_info_t__defined) |
2462 | #define __MIG_check__Request__mach_port_space_info_t__defined |
2463 | |
2464 | mig_internal kern_return_t __MIG_check__Request__mach_port_space_info_t(__attribute__((__unused__)) __Request__mach_port_space_info_t *In0P) |
2465 | { |
2466 | |
2467 | typedef __Request__mach_port_space_info_t __Request; |
2468 | #if __MigTypeCheck |
2469 | if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
2470 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
2471 | return MIG_BAD_ARGUMENTS; |
2472 | #endif /* __MigTypeCheck */ |
2473 | |
2474 | return MACH_MSG_SUCCESS; |
2475 | } |
2476 | #endif /* !defined(__MIG_check__Request__mach_port_space_info_t__defined) */ |
2477 | #endif /* __MIG_check__Request__mach_port_subsystem__ */ |
2478 | #endif /* ( __MigTypeCheck ) */ |
2479 | |
2480 | |
2481 | /* Routine mach_port_space_info */ |
2482 | mig_internal novalue _Xmach_port_space_info |
2483 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
2484 | { |
2485 | |
2486 | #ifdef __MigPackStructs |
2487 | #pragma pack(4) |
2488 | #endif |
2489 | typedef struct { |
2490 | mach_msg_header_t Head; |
2491 | mach_msg_trailer_t trailer; |
2492 | } Request __attribute__((unused)); |
2493 | #ifdef __MigPackStructs |
2494 | #pragma pack() |
2495 | #endif |
2496 | typedef __Request__mach_port_space_info_t __Request; |
2497 | typedef __Reply__mach_port_space_info_t Reply __attribute__((unused)); |
2498 | |
2499 | /* |
2500 | * typedef struct { |
2501 | * mach_msg_header_t Head; |
2502 | * NDR_record_t NDR; |
2503 | * kern_return_t RetCode; |
2504 | * } mig_reply_error_t; |
2505 | */ |
2506 | |
2507 | Request *In0P = (Request *) InHeadP; |
2508 | Reply *OutP = (Reply *) OutHeadP; |
2509 | #ifdef __MIG_check__Request__mach_port_space_info_t__defined |
2510 | kern_return_t check_result; |
2511 | #endif /* __MIG_check__Request__mach_port_space_info_t__defined */ |
2512 | |
2513 | #if __MigKernelSpecificCode |
2514 | #if UseStaticTemplates |
2515 | const static mach_msg_ool_descriptor_t table_infoTemplate = { |
2516 | /* addr = */ (void *)0, |
2517 | /* size = */ 0, |
2518 | /* deal = */ FALSE, |
2519 | /* copy = */ MACH_MSG_VIRTUAL_COPY, |
2520 | /* pad2 = */ 0, |
2521 | /* type = */ MACH_MSG_OOL_DESCRIPTOR, |
2522 | }; |
2523 | #endif /* UseStaticTemplates */ |
2524 | |
2525 | #if UseStaticTemplates |
2526 | const static mach_msg_ool_descriptor_t tree_infoTemplate = { |
2527 | /* addr = */ (void *)0, |
2528 | /* size = */ 0, |
2529 | /* deal = */ FALSE, |
2530 | /* copy = */ MACH_MSG_VIRTUAL_COPY, |
2531 | /* pad2 = */ 0, |
2532 | /* type = */ MACH_MSG_OOL_DESCRIPTOR, |
2533 | }; |
2534 | #endif /* UseStaticTemplates */ |
2535 | |
2536 | #else |
2537 | #if UseStaticTemplates |
2538 | const static mach_msg_ool_descriptor_t table_infoTemplate = { |
2539 | /* addr = */ (void *)0, |
2540 | /* size = */ 0, |
2541 | /* deal = */ FALSE, |
2542 | /* copy = */ MACH_MSG_VIRTUAL_COPY, |
2543 | /* pad2 = */ 0, |
2544 | /* type = */ MACH_MSG_OOL_DESCRIPTOR, |
2545 | }; |
2546 | #endif /* UseStaticTemplates */ |
2547 | |
2548 | #if UseStaticTemplates |
2549 | const static mach_msg_ool_descriptor_t tree_infoTemplate = { |
2550 | /* addr = */ (void *)0, |
2551 | /* size = */ 0, |
2552 | /* deal = */ FALSE, |
2553 | /* copy = */ MACH_MSG_VIRTUAL_COPY, |
2554 | /* pad2 = */ 0, |
2555 | /* type = */ MACH_MSG_OOL_DESCRIPTOR, |
2556 | }; |
2557 | #endif /* UseStaticTemplates */ |
2558 | |
2559 | #endif /* __MigKernelSpecificCode */ |
2560 | kern_return_t RetCode; |
2561 | ipc_space_inspect_t task; |
2562 | |
2563 | __DeclareRcvRpc(3223, "mach_port_space_info" ) |
2564 | __BeforeRcvRpc(3223, "mach_port_space_info" ) |
2565 | |
2566 | #if defined(__MIG_check__Request__mach_port_space_info_t__defined) |
2567 | check_result = __MIG_check__Request__mach_port_space_info_t((__Request *)In0P); |
2568 | if (check_result != MACH_MSG_SUCCESS) |
2569 | { MIG_RETURN_ERROR(OutP, check_result); } |
2570 | #endif /* defined(__MIG_check__Request__mach_port_space_info_t__defined) */ |
2571 | |
2572 | #if UseStaticTemplates |
2573 | OutP->table_info = table_infoTemplate; |
2574 | #else /* UseStaticTemplates */ |
2575 | OutP->table_info.deallocate = FALSE; |
2576 | OutP->table_info.copy = MACH_MSG_VIRTUAL_COPY; |
2577 | OutP->table_info.pad1 = 0; |
2578 | OutP->table_info.type = MACH_MSG_OOL_DESCRIPTOR; |
2579 | #if defined(KERNEL) && !defined(__LP64__) |
2580 | OutP->table_info.pad_end = 0; |
2581 | #endif |
2582 | #endif /* UseStaticTemplates */ |
2583 | |
2584 | |
2585 | #if UseStaticTemplates |
2586 | OutP->tree_info = tree_infoTemplate; |
2587 | #else /* UseStaticTemplates */ |
2588 | OutP->tree_info.deallocate = FALSE; |
2589 | OutP->tree_info.copy = MACH_MSG_VIRTUAL_COPY; |
2590 | OutP->tree_info.pad1 = 0; |
2591 | OutP->tree_info.type = MACH_MSG_OOL_DESCRIPTOR; |
2592 | #if defined(KERNEL) && !defined(__LP64__) |
2593 | OutP->tree_info.pad_end = 0; |
2594 | #endif |
2595 | #endif /* UseStaticTemplates */ |
2596 | |
2597 | |
2598 | task = convert_port_to_space_inspect(In0P->Head.msgh_request_port); |
2599 | |
2600 | OutP->table_infoCnt = 0; |
2601 | |
2602 | OutP->tree_infoCnt = 0; |
2603 | |
2604 | RetCode = mach_port_space_info(task, &OutP->space_info, (ipc_info_name_array_t *)&(OutP->table_info.address), &OutP->table_infoCnt, (ipc_info_tree_name_array_t *)&(OutP->tree_info.address), &OutP->tree_infoCnt); |
2605 | space_inspect_deallocate(task); |
2606 | if (RetCode != KERN_SUCCESS) { |
2607 | MIG_RETURN_ERROR(OutP, RetCode); |
2608 | } |
2609 | #if __MigKernelSpecificCode |
2610 | #endif /* __MigKernelSpecificCode */ |
2611 | OutP->table_info.size = OutP->table_infoCnt * 28; |
2612 | |
2613 | OutP->tree_info.size = OutP->tree_infoCnt * 36; |
2614 | |
2615 | |
2616 | OutP->NDR = NDR_record; |
2617 | |
2618 | |
2619 | OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX; |
2620 | OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply)); |
2621 | OutP->msgh_body.msgh_descriptor_count = 2; |
2622 | __AfterRcvRpc(3223, "mach_port_space_info" ) |
2623 | } |
2624 | |
2625 | #if ( __MigTypeCheck ) |
2626 | #if __MIG_check__Request__mach_port_subsystem__ |
2627 | #if !defined(__MIG_check__Request__mach_port_dnrequest_info_t__defined) |
2628 | #define __MIG_check__Request__mach_port_dnrequest_info_t__defined |
2629 | |
2630 | mig_internal kern_return_t __MIG_check__Request__mach_port_dnrequest_info_t(__attribute__((__unused__)) __Request__mach_port_dnrequest_info_t *In0P) |
2631 | { |
2632 | |
2633 | typedef __Request__mach_port_dnrequest_info_t __Request; |
2634 | #if __MigTypeCheck |
2635 | if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
2636 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
2637 | return MIG_BAD_ARGUMENTS; |
2638 | #endif /* __MigTypeCheck */ |
2639 | |
2640 | return MACH_MSG_SUCCESS; |
2641 | } |
2642 | #endif /* !defined(__MIG_check__Request__mach_port_dnrequest_info_t__defined) */ |
2643 | #endif /* __MIG_check__Request__mach_port_subsystem__ */ |
2644 | #endif /* ( __MigTypeCheck ) */ |
2645 | |
2646 | |
2647 | /* Routine mach_port_dnrequest_info */ |
2648 | mig_internal novalue _Xmach_port_dnrequest_info |
2649 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
2650 | { |
2651 | |
2652 | #ifdef __MigPackStructs |
2653 | #pragma pack(4) |
2654 | #endif |
2655 | typedef struct { |
2656 | mach_msg_header_t Head; |
2657 | NDR_record_t NDR; |
2658 | mach_port_name_t name; |
2659 | mach_msg_trailer_t trailer; |
2660 | } Request __attribute__((unused)); |
2661 | #ifdef __MigPackStructs |
2662 | #pragma pack() |
2663 | #endif |
2664 | typedef __Request__mach_port_dnrequest_info_t __Request; |
2665 | typedef __Reply__mach_port_dnrequest_info_t Reply __attribute__((unused)); |
2666 | |
2667 | /* |
2668 | * typedef struct { |
2669 | * mach_msg_header_t Head; |
2670 | * NDR_record_t NDR; |
2671 | * kern_return_t RetCode; |
2672 | * } mig_reply_error_t; |
2673 | */ |
2674 | |
2675 | Request *In0P = (Request *) InHeadP; |
2676 | Reply *OutP = (Reply *) OutHeadP; |
2677 | #ifdef __MIG_check__Request__mach_port_dnrequest_info_t__defined |
2678 | kern_return_t check_result; |
2679 | #endif /* __MIG_check__Request__mach_port_dnrequest_info_t__defined */ |
2680 | |
2681 | #if __MigKernelSpecificCode |
2682 | #else |
2683 | #endif /* __MigKernelSpecificCode */ |
2684 | ipc_space_t task; |
2685 | |
2686 | __DeclareRcvRpc(3224, "mach_port_dnrequest_info" ) |
2687 | __BeforeRcvRpc(3224, "mach_port_dnrequest_info" ) |
2688 | |
2689 | #if defined(__MIG_check__Request__mach_port_dnrequest_info_t__defined) |
2690 | check_result = __MIG_check__Request__mach_port_dnrequest_info_t((__Request *)In0P); |
2691 | if (check_result != MACH_MSG_SUCCESS) |
2692 | { MIG_RETURN_ERROR(OutP, check_result); } |
2693 | #endif /* defined(__MIG_check__Request__mach_port_dnrequest_info_t__defined) */ |
2694 | |
2695 | task = convert_port_to_space(In0P->Head.msgh_request_port); |
2696 | |
2697 | OutP->RetCode = mach_port_dnrequest_info(task, In0P->name, &OutP->dnr_total, &OutP->dnr_used); |
2698 | space_deallocate(task); |
2699 | if (OutP->RetCode != KERN_SUCCESS) { |
2700 | MIG_RETURN_ERROR(OutP, OutP->RetCode); |
2701 | } |
2702 | #if __MigKernelSpecificCode |
2703 | #endif /* __MigKernelSpecificCode */ |
2704 | |
2705 | OutP->NDR = NDR_record; |
2706 | |
2707 | |
2708 | OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply)); |
2709 | __AfterRcvRpc(3224, "mach_port_dnrequest_info" ) |
2710 | } |
2711 | |
2712 | #if ( __MigTypeCheck ) |
2713 | #if __MIG_check__Request__mach_port_subsystem__ |
2714 | #if !defined(__MIG_check__Request__mach_port_kernel_object_t__defined) |
2715 | #define __MIG_check__Request__mach_port_kernel_object_t__defined |
2716 | |
2717 | mig_internal kern_return_t __MIG_check__Request__mach_port_kernel_object_t(__attribute__((__unused__)) __Request__mach_port_kernel_object_t *In0P) |
2718 | { |
2719 | |
2720 | typedef __Request__mach_port_kernel_object_t __Request; |
2721 | #if __MigTypeCheck |
2722 | if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
2723 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
2724 | return MIG_BAD_ARGUMENTS; |
2725 | #endif /* __MigTypeCheck */ |
2726 | |
2727 | return MACH_MSG_SUCCESS; |
2728 | } |
2729 | #endif /* !defined(__MIG_check__Request__mach_port_kernel_object_t__defined) */ |
2730 | #endif /* __MIG_check__Request__mach_port_subsystem__ */ |
2731 | #endif /* ( __MigTypeCheck ) */ |
2732 | |
2733 | |
2734 | /* Routine mach_port_kernel_object */ |
2735 | mig_internal novalue _Xmach_port_kernel_object |
2736 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
2737 | { |
2738 | |
2739 | #ifdef __MigPackStructs |
2740 | #pragma pack(4) |
2741 | #endif |
2742 | typedef struct { |
2743 | mach_msg_header_t Head; |
2744 | NDR_record_t NDR; |
2745 | mach_port_name_t name; |
2746 | mach_msg_trailer_t trailer; |
2747 | } Request __attribute__((unused)); |
2748 | #ifdef __MigPackStructs |
2749 | #pragma pack() |
2750 | #endif |
2751 | typedef __Request__mach_port_kernel_object_t __Request; |
2752 | typedef __Reply__mach_port_kernel_object_t Reply __attribute__((unused)); |
2753 | |
2754 | /* |
2755 | * typedef struct { |
2756 | * mach_msg_header_t Head; |
2757 | * NDR_record_t NDR; |
2758 | * kern_return_t RetCode; |
2759 | * } mig_reply_error_t; |
2760 | */ |
2761 | |
2762 | Request *In0P = (Request *) InHeadP; |
2763 | Reply *OutP = (Reply *) OutHeadP; |
2764 | #ifdef __MIG_check__Request__mach_port_kernel_object_t__defined |
2765 | kern_return_t check_result; |
2766 | #endif /* __MIG_check__Request__mach_port_kernel_object_t__defined */ |
2767 | |
2768 | #if __MigKernelSpecificCode |
2769 | #else |
2770 | #endif /* __MigKernelSpecificCode */ |
2771 | ipc_space_inspect_t task; |
2772 | |
2773 | __DeclareRcvRpc(3225, "mach_port_kernel_object" ) |
2774 | __BeforeRcvRpc(3225, "mach_port_kernel_object" ) |
2775 | |
2776 | #if defined(__MIG_check__Request__mach_port_kernel_object_t__defined) |
2777 | check_result = __MIG_check__Request__mach_port_kernel_object_t((__Request *)In0P); |
2778 | if (check_result != MACH_MSG_SUCCESS) |
2779 | { MIG_RETURN_ERROR(OutP, check_result); } |
2780 | #endif /* defined(__MIG_check__Request__mach_port_kernel_object_t__defined) */ |
2781 | |
2782 | task = convert_port_to_space_inspect(In0P->Head.msgh_request_port); |
2783 | |
2784 | OutP->RetCode = mach_port_kernel_object(task, In0P->name, &OutP->object_type, &OutP->object_addr); |
2785 | space_inspect_deallocate(task); |
2786 | if (OutP->RetCode != KERN_SUCCESS) { |
2787 | MIG_RETURN_ERROR(OutP, OutP->RetCode); |
2788 | } |
2789 | #if __MigKernelSpecificCode |
2790 | #endif /* __MigKernelSpecificCode */ |
2791 | |
2792 | OutP->NDR = NDR_record; |
2793 | |
2794 | |
2795 | OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply)); |
2796 | __AfterRcvRpc(3225, "mach_port_kernel_object" ) |
2797 | } |
2798 | |
2799 | #if ( __MigTypeCheck ) |
2800 | #if __MIG_check__Request__mach_port_subsystem__ |
2801 | #if !defined(__MIG_check__Request__mach_port_insert_member_t__defined) |
2802 | #define __MIG_check__Request__mach_port_insert_member_t__defined |
2803 | |
2804 | mig_internal kern_return_t __MIG_check__Request__mach_port_insert_member_t(__attribute__((__unused__)) __Request__mach_port_insert_member_t *In0P) |
2805 | { |
2806 | |
2807 | typedef __Request__mach_port_insert_member_t __Request; |
2808 | #if __MigTypeCheck |
2809 | if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
2810 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
2811 | return MIG_BAD_ARGUMENTS; |
2812 | #endif /* __MigTypeCheck */ |
2813 | |
2814 | return MACH_MSG_SUCCESS; |
2815 | } |
2816 | #endif /* !defined(__MIG_check__Request__mach_port_insert_member_t__defined) */ |
2817 | #endif /* __MIG_check__Request__mach_port_subsystem__ */ |
2818 | #endif /* ( __MigTypeCheck ) */ |
2819 | |
2820 | |
2821 | /* Routine mach_port_insert_member */ |
2822 | mig_internal novalue _Xmach_port_insert_member |
2823 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
2824 | { |
2825 | |
2826 | #ifdef __MigPackStructs |
2827 | #pragma pack(4) |
2828 | #endif |
2829 | typedef struct { |
2830 | mach_msg_header_t Head; |
2831 | NDR_record_t NDR; |
2832 | mach_port_name_t name; |
2833 | mach_port_name_t pset; |
2834 | mach_msg_trailer_t trailer; |
2835 | } Request __attribute__((unused)); |
2836 | #ifdef __MigPackStructs |
2837 | #pragma pack() |
2838 | #endif |
2839 | typedef __Request__mach_port_insert_member_t __Request; |
2840 | typedef __Reply__mach_port_insert_member_t Reply __attribute__((unused)); |
2841 | |
2842 | /* |
2843 | * typedef struct { |
2844 | * mach_msg_header_t Head; |
2845 | * NDR_record_t NDR; |
2846 | * kern_return_t RetCode; |
2847 | * } mig_reply_error_t; |
2848 | */ |
2849 | |
2850 | Request *In0P = (Request *) InHeadP; |
2851 | Reply *OutP = (Reply *) OutHeadP; |
2852 | #ifdef __MIG_check__Request__mach_port_insert_member_t__defined |
2853 | kern_return_t check_result; |
2854 | #endif /* __MIG_check__Request__mach_port_insert_member_t__defined */ |
2855 | |
2856 | #if __MigKernelSpecificCode |
2857 | #else |
2858 | #endif /* __MigKernelSpecificCode */ |
2859 | ipc_space_t task; |
2860 | |
2861 | __DeclareRcvRpc(3226, "mach_port_insert_member" ) |
2862 | __BeforeRcvRpc(3226, "mach_port_insert_member" ) |
2863 | |
2864 | #if defined(__MIG_check__Request__mach_port_insert_member_t__defined) |
2865 | check_result = __MIG_check__Request__mach_port_insert_member_t((__Request *)In0P); |
2866 | if (check_result != MACH_MSG_SUCCESS) |
2867 | { MIG_RETURN_ERROR(OutP, check_result); } |
2868 | #endif /* defined(__MIG_check__Request__mach_port_insert_member_t__defined) */ |
2869 | |
2870 | task = convert_port_to_space(In0P->Head.msgh_request_port); |
2871 | |
2872 | OutP->RetCode = mach_port_insert_member(task, In0P->name, In0P->pset); |
2873 | space_deallocate(task); |
2874 | #if __MigKernelSpecificCode |
2875 | #endif /* __MigKernelSpecificCode */ |
2876 | |
2877 | OutP->NDR = NDR_record; |
2878 | |
2879 | |
2880 | __AfterRcvRpc(3226, "mach_port_insert_member" ) |
2881 | } |
2882 | |
2883 | #if ( __MigTypeCheck ) |
2884 | #if __MIG_check__Request__mach_port_subsystem__ |
2885 | #if !defined(__MIG_check__Request__mach_port_extract_member_t__defined) |
2886 | #define |
2887 | |
2888 | mig_internal kern_return_t (__attribute__((__unused__)) __Request__mach_port_extract_member_t *In0P) |
2889 | { |
2890 | |
2891 | typedef __Request__mach_port_extract_member_t __Request; |
2892 | #if __MigTypeCheck |
2893 | if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
2894 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
2895 | return MIG_BAD_ARGUMENTS; |
2896 | #endif /* __MigTypeCheck */ |
2897 | |
2898 | return MACH_MSG_SUCCESS; |
2899 | } |
2900 | #endif /* !defined(__MIG_check__Request__mach_port_extract_member_t__defined) */ |
2901 | #endif /* __MIG_check__Request__mach_port_subsystem__ */ |
2902 | #endif /* ( __MigTypeCheck ) */ |
2903 | |
2904 | |
2905 | /* Routine mach_port_extract_member */ |
2906 | mig_internal novalue |
2907 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
2908 | { |
2909 | |
2910 | #ifdef __MigPackStructs |
2911 | #pragma pack(4) |
2912 | #endif |
2913 | typedef struct { |
2914 | mach_msg_header_t Head; |
2915 | NDR_record_t NDR; |
2916 | mach_port_name_t name; |
2917 | mach_port_name_t pset; |
2918 | mach_msg_trailer_t trailer; |
2919 | } Request __attribute__((unused)); |
2920 | #ifdef __MigPackStructs |
2921 | #pragma pack() |
2922 | #endif |
2923 | typedef __Request__mach_port_extract_member_t __Request; |
2924 | typedef __Reply__mach_port_extract_member_t Reply __attribute__((unused)); |
2925 | |
2926 | /* |
2927 | * typedef struct { |
2928 | * mach_msg_header_t Head; |
2929 | * NDR_record_t NDR; |
2930 | * kern_return_t RetCode; |
2931 | * } mig_reply_error_t; |
2932 | */ |
2933 | |
2934 | Request *In0P = (Request *) InHeadP; |
2935 | Reply *OutP = (Reply *) OutHeadP; |
2936 | #ifdef __MIG_check__Request__mach_port_extract_member_t__defined |
2937 | kern_return_t check_result; |
2938 | #endif /* __MIG_check__Request__mach_port_extract_member_t__defined */ |
2939 | |
2940 | #if __MigKernelSpecificCode |
2941 | #else |
2942 | #endif /* __MigKernelSpecificCode */ |
2943 | ipc_space_t task; |
2944 | |
2945 | __DeclareRcvRpc(3227, "mach_port_extract_member" ) |
2946 | __BeforeRcvRpc(3227, "mach_port_extract_member" ) |
2947 | |
2948 | #if defined(__MIG_check__Request__mach_port_extract_member_t__defined) |
2949 | check_result = __MIG_check__Request__mach_port_extract_member_t((__Request *)In0P); |
2950 | if (check_result != MACH_MSG_SUCCESS) |
2951 | { MIG_RETURN_ERROR(OutP, check_result); } |
2952 | #endif /* defined(__MIG_check__Request__mach_port_extract_member_t__defined) */ |
2953 | |
2954 | task = convert_port_to_space(In0P->Head.msgh_request_port); |
2955 | |
2956 | OutP->RetCode = mach_port_extract_member(task, In0P->name, In0P->pset); |
2957 | space_deallocate(task); |
2958 | #if __MigKernelSpecificCode |
2959 | #endif /* __MigKernelSpecificCode */ |
2960 | |
2961 | OutP->NDR = NDR_record; |
2962 | |
2963 | |
2964 | __AfterRcvRpc(3227, "mach_port_extract_member" ) |
2965 | } |
2966 | |
2967 | #if ( __MigTypeCheck ) |
2968 | #if __MIG_check__Request__mach_port_subsystem__ |
2969 | #if !defined(__MIG_check__Request__mach_port_get_context_t__defined) |
2970 | #define __MIG_check__Request__mach_port_get_context_t__defined |
2971 | |
2972 | mig_internal kern_return_t __MIG_check__Request__mach_port_get_context_t(__attribute__((__unused__)) __Request__mach_port_get_context_t *In0P) |
2973 | { |
2974 | |
2975 | typedef __Request__mach_port_get_context_t __Request; |
2976 | #if __MigTypeCheck |
2977 | if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
2978 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
2979 | return MIG_BAD_ARGUMENTS; |
2980 | #endif /* __MigTypeCheck */ |
2981 | |
2982 | return MACH_MSG_SUCCESS; |
2983 | } |
2984 | #endif /* !defined(__MIG_check__Request__mach_port_get_context_t__defined) */ |
2985 | #endif /* __MIG_check__Request__mach_port_subsystem__ */ |
2986 | #endif /* ( __MigTypeCheck ) */ |
2987 | |
2988 | |
2989 | /* Routine mach_port_get_context */ |
2990 | mig_internal novalue _Xmach_port_get_context |
2991 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
2992 | { |
2993 | |
2994 | #ifdef __MigPackStructs |
2995 | #pragma pack(4) |
2996 | #endif |
2997 | typedef struct { |
2998 | mach_msg_header_t Head; |
2999 | NDR_record_t NDR; |
3000 | mach_port_name_t name; |
3001 | mach_msg_trailer_t trailer; |
3002 | } Request __attribute__((unused)); |
3003 | #ifdef __MigPackStructs |
3004 | #pragma pack() |
3005 | #endif |
3006 | typedef __Request__mach_port_get_context_t __Request; |
3007 | typedef __Reply__mach_port_get_context_t Reply __attribute__((unused)); |
3008 | |
3009 | /* |
3010 | * typedef struct { |
3011 | * mach_msg_header_t Head; |
3012 | * NDR_record_t NDR; |
3013 | * kern_return_t RetCode; |
3014 | * } mig_reply_error_t; |
3015 | */ |
3016 | |
3017 | Request *In0P = (Request *) InHeadP; |
3018 | Reply *OutP = (Reply *) OutHeadP; |
3019 | #ifdef __MIG_check__Request__mach_port_get_context_t__defined |
3020 | kern_return_t check_result; |
3021 | #endif /* __MIG_check__Request__mach_port_get_context_t__defined */ |
3022 | |
3023 | #if __MigKernelSpecificCode |
3024 | #else |
3025 | #endif /* __MigKernelSpecificCode */ |
3026 | ipc_space_inspect_t task; |
3027 | |
3028 | __DeclareRcvRpc(3228, "mach_port_get_context" ) |
3029 | __BeforeRcvRpc(3228, "mach_port_get_context" ) |
3030 | |
3031 | #if defined(__MIG_check__Request__mach_port_get_context_t__defined) |
3032 | check_result = __MIG_check__Request__mach_port_get_context_t((__Request *)In0P); |
3033 | if (check_result != MACH_MSG_SUCCESS) |
3034 | { MIG_RETURN_ERROR(OutP, check_result); } |
3035 | #endif /* defined(__MIG_check__Request__mach_port_get_context_t__defined) */ |
3036 | |
3037 | task = convert_port_to_space_inspect(In0P->Head.msgh_request_port); |
3038 | |
3039 | OutP->RetCode = mach_port_get_context(task, In0P->name, &OutP->context); |
3040 | space_inspect_deallocate(task); |
3041 | if (OutP->RetCode != KERN_SUCCESS) { |
3042 | MIG_RETURN_ERROR(OutP, OutP->RetCode); |
3043 | } |
3044 | #if __MigKernelSpecificCode |
3045 | #endif /* __MigKernelSpecificCode */ |
3046 | |
3047 | OutP->NDR = NDR_record; |
3048 | |
3049 | |
3050 | OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply)); |
3051 | __AfterRcvRpc(3228, "mach_port_get_context" ) |
3052 | } |
3053 | |
3054 | #if ( __MigTypeCheck ) |
3055 | #if __MIG_check__Request__mach_port_subsystem__ |
3056 | #if !defined(__MIG_check__Request__mach_port_set_context_t__defined) |
3057 | #define __MIG_check__Request__mach_port_set_context_t__defined |
3058 | |
3059 | mig_internal kern_return_t __MIG_check__Request__mach_port_set_context_t(__attribute__((__unused__)) __Request__mach_port_set_context_t *In0P) |
3060 | { |
3061 | |
3062 | typedef __Request__mach_port_set_context_t __Request; |
3063 | #if __MigTypeCheck |
3064 | if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
3065 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
3066 | return MIG_BAD_ARGUMENTS; |
3067 | #endif /* __MigTypeCheck */ |
3068 | |
3069 | return MACH_MSG_SUCCESS; |
3070 | } |
3071 | #endif /* !defined(__MIG_check__Request__mach_port_set_context_t__defined) */ |
3072 | #endif /* __MIG_check__Request__mach_port_subsystem__ */ |
3073 | #endif /* ( __MigTypeCheck ) */ |
3074 | |
3075 | |
3076 | /* Routine mach_port_set_context */ |
3077 | mig_internal novalue _Xmach_port_set_context |
3078 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
3079 | { |
3080 | |
3081 | #ifdef __MigPackStructs |
3082 | #pragma pack(4) |
3083 | #endif |
3084 | typedef struct { |
3085 | mach_msg_header_t Head; |
3086 | NDR_record_t NDR; |
3087 | mach_port_name_t name; |
3088 | mach_vm_address_t context; |
3089 | mach_msg_trailer_t trailer; |
3090 | } Request __attribute__((unused)); |
3091 | #ifdef __MigPackStructs |
3092 | #pragma pack() |
3093 | #endif |
3094 | typedef __Request__mach_port_set_context_t __Request; |
3095 | typedef __Reply__mach_port_set_context_t Reply __attribute__((unused)); |
3096 | |
3097 | /* |
3098 | * typedef struct { |
3099 | * mach_msg_header_t Head; |
3100 | * NDR_record_t NDR; |
3101 | * kern_return_t RetCode; |
3102 | * } mig_reply_error_t; |
3103 | */ |
3104 | |
3105 | Request *In0P = (Request *) InHeadP; |
3106 | Reply *OutP = (Reply *) OutHeadP; |
3107 | #ifdef __MIG_check__Request__mach_port_set_context_t__defined |
3108 | kern_return_t check_result; |
3109 | #endif /* __MIG_check__Request__mach_port_set_context_t__defined */ |
3110 | |
3111 | #if __MigKernelSpecificCode |
3112 | #else |
3113 | #endif /* __MigKernelSpecificCode */ |
3114 | ipc_space_t task; |
3115 | |
3116 | __DeclareRcvRpc(3229, "mach_port_set_context" ) |
3117 | __BeforeRcvRpc(3229, "mach_port_set_context" ) |
3118 | |
3119 | #if defined(__MIG_check__Request__mach_port_set_context_t__defined) |
3120 | check_result = __MIG_check__Request__mach_port_set_context_t((__Request *)In0P); |
3121 | if (check_result != MACH_MSG_SUCCESS) |
3122 | { MIG_RETURN_ERROR(OutP, check_result); } |
3123 | #endif /* defined(__MIG_check__Request__mach_port_set_context_t__defined) */ |
3124 | |
3125 | task = convert_port_to_space(In0P->Head.msgh_request_port); |
3126 | |
3127 | OutP->RetCode = mach_port_set_context(task, In0P->name, In0P->context); |
3128 | space_deallocate(task); |
3129 | #if __MigKernelSpecificCode |
3130 | #endif /* __MigKernelSpecificCode */ |
3131 | |
3132 | OutP->NDR = NDR_record; |
3133 | |
3134 | |
3135 | __AfterRcvRpc(3229, "mach_port_set_context" ) |
3136 | } |
3137 | |
3138 | #if ( __MigTypeCheck ) |
3139 | #if __MIG_check__Request__mach_port_subsystem__ |
3140 | #if !defined(__MIG_check__Request__mach_port_kobject_t__defined) |
3141 | #define __MIG_check__Request__mach_port_kobject_t__defined |
3142 | |
3143 | mig_internal kern_return_t __MIG_check__Request__mach_port_kobject_t(__attribute__((__unused__)) __Request__mach_port_kobject_t *In0P) |
3144 | { |
3145 | |
3146 | typedef __Request__mach_port_kobject_t __Request; |
3147 | #if __MigTypeCheck |
3148 | if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
3149 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
3150 | return MIG_BAD_ARGUMENTS; |
3151 | #endif /* __MigTypeCheck */ |
3152 | |
3153 | return MACH_MSG_SUCCESS; |
3154 | } |
3155 | #endif /* !defined(__MIG_check__Request__mach_port_kobject_t__defined) */ |
3156 | #endif /* __MIG_check__Request__mach_port_subsystem__ */ |
3157 | #endif /* ( __MigTypeCheck ) */ |
3158 | |
3159 | |
3160 | /* Routine mach_port_kobject */ |
3161 | mig_internal novalue _Xmach_port_kobject |
3162 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
3163 | { |
3164 | |
3165 | #ifdef __MigPackStructs |
3166 | #pragma pack(4) |
3167 | #endif |
3168 | typedef struct { |
3169 | mach_msg_header_t Head; |
3170 | NDR_record_t NDR; |
3171 | mach_port_name_t name; |
3172 | mach_msg_trailer_t trailer; |
3173 | } Request __attribute__((unused)); |
3174 | #ifdef __MigPackStructs |
3175 | #pragma pack() |
3176 | #endif |
3177 | typedef __Request__mach_port_kobject_t __Request; |
3178 | typedef __Reply__mach_port_kobject_t Reply __attribute__((unused)); |
3179 | |
3180 | /* |
3181 | * typedef struct { |
3182 | * mach_msg_header_t Head; |
3183 | * NDR_record_t NDR; |
3184 | * kern_return_t RetCode; |
3185 | * } mig_reply_error_t; |
3186 | */ |
3187 | |
3188 | Request *In0P = (Request *) InHeadP; |
3189 | Reply *OutP = (Reply *) OutHeadP; |
3190 | #ifdef __MIG_check__Request__mach_port_kobject_t__defined |
3191 | kern_return_t check_result; |
3192 | #endif /* __MIG_check__Request__mach_port_kobject_t__defined */ |
3193 | |
3194 | #if __MigKernelSpecificCode |
3195 | #else |
3196 | #endif /* __MigKernelSpecificCode */ |
3197 | ipc_space_inspect_t task; |
3198 | |
3199 | __DeclareRcvRpc(3230, "mach_port_kobject" ) |
3200 | __BeforeRcvRpc(3230, "mach_port_kobject" ) |
3201 | |
3202 | #if defined(__MIG_check__Request__mach_port_kobject_t__defined) |
3203 | check_result = __MIG_check__Request__mach_port_kobject_t((__Request *)In0P); |
3204 | if (check_result != MACH_MSG_SUCCESS) |
3205 | { MIG_RETURN_ERROR(OutP, check_result); } |
3206 | #endif /* defined(__MIG_check__Request__mach_port_kobject_t__defined) */ |
3207 | |
3208 | task = convert_port_to_space_inspect(In0P->Head.msgh_request_port); |
3209 | |
3210 | OutP->RetCode = mach_port_kobject(task, In0P->name, &OutP->object_type, &OutP->object_addr); |
3211 | space_inspect_deallocate(task); |
3212 | if (OutP->RetCode != KERN_SUCCESS) { |
3213 | MIG_RETURN_ERROR(OutP, OutP->RetCode); |
3214 | } |
3215 | #if __MigKernelSpecificCode |
3216 | #endif /* __MigKernelSpecificCode */ |
3217 | |
3218 | OutP->NDR = NDR_record; |
3219 | |
3220 | |
3221 | OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply)); |
3222 | __AfterRcvRpc(3230, "mach_port_kobject" ) |
3223 | } |
3224 | |
3225 | #if ( __MigTypeCheck ) |
3226 | #if __MIG_check__Request__mach_port_subsystem__ |
3227 | #if !defined(__MIG_check__Request__mach_port_construct_t__defined) |
3228 | #define __MIG_check__Request__mach_port_construct_t__defined |
3229 | |
3230 | mig_internal kern_return_t __MIG_check__Request__mach_port_construct_t(__attribute__((__unused__)) __Request__mach_port_construct_t *In0P) |
3231 | { |
3232 | |
3233 | typedef __Request__mach_port_construct_t __Request; |
3234 | #if __MigTypeCheck |
3235 | if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
3236 | (In0P->msgh_body.msgh_descriptor_count != 1) || |
3237 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
3238 | return MIG_BAD_ARGUMENTS; |
3239 | #endif /* __MigTypeCheck */ |
3240 | |
3241 | #if __MigTypeCheck |
3242 | if (In0P->options.type != MACH_MSG_OOL_DESCRIPTOR || |
3243 | In0P->options.size != 24) |
3244 | return MIG_TYPE_ERROR; |
3245 | #endif /* __MigTypeCheck */ |
3246 | |
3247 | #if __MigTypeCheck |
3248 | #endif /* __MigTypeCheck */ |
3249 | |
3250 | return MACH_MSG_SUCCESS; |
3251 | } |
3252 | #endif /* !defined(__MIG_check__Request__mach_port_construct_t__defined) */ |
3253 | #endif /* __MIG_check__Request__mach_port_subsystem__ */ |
3254 | #endif /* ( __MigTypeCheck ) */ |
3255 | |
3256 | |
3257 | /* Routine mach_port_construct */ |
3258 | mig_internal novalue _Xmach_port_construct |
3259 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
3260 | { |
3261 | |
3262 | #ifdef __MigPackStructs |
3263 | #pragma pack(4) |
3264 | #endif |
3265 | typedef struct { |
3266 | mach_msg_header_t Head; |
3267 | /* start of the kernel processed data */ |
3268 | mach_msg_body_t msgh_body; |
3269 | mach_msg_ool_descriptor_t options; |
3270 | /* end of the kernel processed data */ |
3271 | NDR_record_t NDR; |
3272 | uint64_t context; |
3273 | mach_msg_trailer_t trailer; |
3274 | } Request __attribute__((unused)); |
3275 | #ifdef __MigPackStructs |
3276 | #pragma pack() |
3277 | #endif |
3278 | typedef __Request__mach_port_construct_t __Request; |
3279 | typedef __Reply__mach_port_construct_t Reply __attribute__((unused)); |
3280 | |
3281 | /* |
3282 | * typedef struct { |
3283 | * mach_msg_header_t Head; |
3284 | * NDR_record_t NDR; |
3285 | * kern_return_t RetCode; |
3286 | * } mig_reply_error_t; |
3287 | */ |
3288 | |
3289 | Request *In0P = (Request *) InHeadP; |
3290 | Reply *OutP = (Reply *) OutHeadP; |
3291 | #ifdef __MIG_check__Request__mach_port_construct_t__defined |
3292 | kern_return_t check_result; |
3293 | #endif /* __MIG_check__Request__mach_port_construct_t__defined */ |
3294 | |
3295 | #if __MigKernelSpecificCode |
3296 | #else |
3297 | #endif /* __MigKernelSpecificCode */ |
3298 | ipc_space_t task; |
3299 | |
3300 | __DeclareRcvRpc(3231, "mach_port_construct" ) |
3301 | __BeforeRcvRpc(3231, "mach_port_construct" ) |
3302 | |
3303 | #if defined(__MIG_check__Request__mach_port_construct_t__defined) |
3304 | check_result = __MIG_check__Request__mach_port_construct_t((__Request *)In0P); |
3305 | if (check_result != MACH_MSG_SUCCESS) |
3306 | { MIG_RETURN_ERROR(OutP, check_result); } |
3307 | #endif /* defined(__MIG_check__Request__mach_port_construct_t__defined) */ |
3308 | |
3309 | task = convert_port_to_space(In0P->Head.msgh_request_port); |
3310 | |
3311 | OutP->RetCode = mach_port_construct(task, (mach_port_options_ptr_t)(In0P->options.address), In0P->context, &OutP->name); |
3312 | space_deallocate(task); |
3313 | if (OutP->RetCode != KERN_SUCCESS) { |
3314 | MIG_RETURN_ERROR(OutP, OutP->RetCode); |
3315 | } |
3316 | #if __MigKernelSpecificCode |
3317 | #endif /* __MigKernelSpecificCode */ |
3318 | |
3319 | OutP->NDR = NDR_record; |
3320 | |
3321 | |
3322 | OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply)); |
3323 | __AfterRcvRpc(3231, "mach_port_construct" ) |
3324 | } |
3325 | |
3326 | #if ( __MigTypeCheck ) |
3327 | #if __MIG_check__Request__mach_port_subsystem__ |
3328 | #if !defined(__MIG_check__Request__mach_port_destruct_t__defined) |
3329 | #define __MIG_check__Request__mach_port_destruct_t__defined |
3330 | |
3331 | mig_internal kern_return_t __MIG_check__Request__mach_port_destruct_t(__attribute__((__unused__)) __Request__mach_port_destruct_t *In0P) |
3332 | { |
3333 | |
3334 | typedef __Request__mach_port_destruct_t __Request; |
3335 | #if __MigTypeCheck |
3336 | if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
3337 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
3338 | return MIG_BAD_ARGUMENTS; |
3339 | #endif /* __MigTypeCheck */ |
3340 | |
3341 | return MACH_MSG_SUCCESS; |
3342 | } |
3343 | #endif /* !defined(__MIG_check__Request__mach_port_destruct_t__defined) */ |
3344 | #endif /* __MIG_check__Request__mach_port_subsystem__ */ |
3345 | #endif /* ( __MigTypeCheck ) */ |
3346 | |
3347 | |
3348 | /* Routine mach_port_destruct */ |
3349 | mig_internal novalue _Xmach_port_destruct |
3350 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
3351 | { |
3352 | |
3353 | #ifdef __MigPackStructs |
3354 | #pragma pack(4) |
3355 | #endif |
3356 | typedef struct { |
3357 | mach_msg_header_t Head; |
3358 | NDR_record_t NDR; |
3359 | mach_port_name_t name; |
3360 | mach_port_delta_t srdelta; |
3361 | uint64_t guard; |
3362 | mach_msg_trailer_t trailer; |
3363 | } Request __attribute__((unused)); |
3364 | #ifdef __MigPackStructs |
3365 | #pragma pack() |
3366 | #endif |
3367 | typedef __Request__mach_port_destruct_t __Request; |
3368 | typedef __Reply__mach_port_destruct_t Reply __attribute__((unused)); |
3369 | |
3370 | /* |
3371 | * typedef struct { |
3372 | * mach_msg_header_t Head; |
3373 | * NDR_record_t NDR; |
3374 | * kern_return_t RetCode; |
3375 | * } mig_reply_error_t; |
3376 | */ |
3377 | |
3378 | Request *In0P = (Request *) InHeadP; |
3379 | Reply *OutP = (Reply *) OutHeadP; |
3380 | #ifdef __MIG_check__Request__mach_port_destruct_t__defined |
3381 | kern_return_t check_result; |
3382 | #endif /* __MIG_check__Request__mach_port_destruct_t__defined */ |
3383 | |
3384 | #if __MigKernelSpecificCode |
3385 | #else |
3386 | #endif /* __MigKernelSpecificCode */ |
3387 | ipc_space_t task; |
3388 | |
3389 | __DeclareRcvRpc(3232, "mach_port_destruct" ) |
3390 | __BeforeRcvRpc(3232, "mach_port_destruct" ) |
3391 | |
3392 | #if defined(__MIG_check__Request__mach_port_destruct_t__defined) |
3393 | check_result = __MIG_check__Request__mach_port_destruct_t((__Request *)In0P); |
3394 | if (check_result != MACH_MSG_SUCCESS) |
3395 | { MIG_RETURN_ERROR(OutP, check_result); } |
3396 | #endif /* defined(__MIG_check__Request__mach_port_destruct_t__defined) */ |
3397 | |
3398 | task = convert_port_to_space(In0P->Head.msgh_request_port); |
3399 | |
3400 | OutP->RetCode = mach_port_destruct(task, In0P->name, In0P->srdelta, In0P->guard); |
3401 | space_deallocate(task); |
3402 | #if __MigKernelSpecificCode |
3403 | #endif /* __MigKernelSpecificCode */ |
3404 | |
3405 | OutP->NDR = NDR_record; |
3406 | |
3407 | |
3408 | __AfterRcvRpc(3232, "mach_port_destruct" ) |
3409 | } |
3410 | |
3411 | #if ( __MigTypeCheck ) |
3412 | #if __MIG_check__Request__mach_port_subsystem__ |
3413 | #if !defined(__MIG_check__Request__mach_port_guard_t__defined) |
3414 | #define __MIG_check__Request__mach_port_guard_t__defined |
3415 | |
3416 | mig_internal kern_return_t __MIG_check__Request__mach_port_guard_t(__attribute__((__unused__)) __Request__mach_port_guard_t *In0P) |
3417 | { |
3418 | |
3419 | typedef __Request__mach_port_guard_t __Request; |
3420 | #if __MigTypeCheck |
3421 | if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
3422 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
3423 | return MIG_BAD_ARGUMENTS; |
3424 | #endif /* __MigTypeCheck */ |
3425 | |
3426 | return MACH_MSG_SUCCESS; |
3427 | } |
3428 | #endif /* !defined(__MIG_check__Request__mach_port_guard_t__defined) */ |
3429 | #endif /* __MIG_check__Request__mach_port_subsystem__ */ |
3430 | #endif /* ( __MigTypeCheck ) */ |
3431 | |
3432 | |
3433 | /* Routine mach_port_guard */ |
3434 | mig_internal novalue _Xmach_port_guard |
3435 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
3436 | { |
3437 | |
3438 | #ifdef __MigPackStructs |
3439 | #pragma pack(4) |
3440 | #endif |
3441 | typedef struct { |
3442 | mach_msg_header_t Head; |
3443 | NDR_record_t NDR; |
3444 | mach_port_name_t name; |
3445 | uint64_t guard; |
3446 | boolean_t strict; |
3447 | mach_msg_trailer_t trailer; |
3448 | } Request __attribute__((unused)); |
3449 | #ifdef __MigPackStructs |
3450 | #pragma pack() |
3451 | #endif |
3452 | typedef __Request__mach_port_guard_t __Request; |
3453 | typedef __Reply__mach_port_guard_t Reply __attribute__((unused)); |
3454 | |
3455 | /* |
3456 | * typedef struct { |
3457 | * mach_msg_header_t Head; |
3458 | * NDR_record_t NDR; |
3459 | * kern_return_t RetCode; |
3460 | * } mig_reply_error_t; |
3461 | */ |
3462 | |
3463 | Request *In0P = (Request *) InHeadP; |
3464 | Reply *OutP = (Reply *) OutHeadP; |
3465 | #ifdef __MIG_check__Request__mach_port_guard_t__defined |
3466 | kern_return_t check_result; |
3467 | #endif /* __MIG_check__Request__mach_port_guard_t__defined */ |
3468 | |
3469 | #if __MigKernelSpecificCode |
3470 | #else |
3471 | #endif /* __MigKernelSpecificCode */ |
3472 | ipc_space_t task; |
3473 | |
3474 | __DeclareRcvRpc(3233, "mach_port_guard" ) |
3475 | __BeforeRcvRpc(3233, "mach_port_guard" ) |
3476 | |
3477 | #if defined(__MIG_check__Request__mach_port_guard_t__defined) |
3478 | check_result = __MIG_check__Request__mach_port_guard_t((__Request *)In0P); |
3479 | if (check_result != MACH_MSG_SUCCESS) |
3480 | { MIG_RETURN_ERROR(OutP, check_result); } |
3481 | #endif /* defined(__MIG_check__Request__mach_port_guard_t__defined) */ |
3482 | |
3483 | task = convert_port_to_space(In0P->Head.msgh_request_port); |
3484 | |
3485 | OutP->RetCode = mach_port_guard(task, In0P->name, In0P->guard, In0P->strict); |
3486 | space_deallocate(task); |
3487 | #if __MigKernelSpecificCode |
3488 | #endif /* __MigKernelSpecificCode */ |
3489 | |
3490 | OutP->NDR = NDR_record; |
3491 | |
3492 | |
3493 | __AfterRcvRpc(3233, "mach_port_guard" ) |
3494 | } |
3495 | |
3496 | #if ( __MigTypeCheck ) |
3497 | #if __MIG_check__Request__mach_port_subsystem__ |
3498 | #if !defined(__MIG_check__Request__mach_port_unguard_t__defined) |
3499 | #define __MIG_check__Request__mach_port_unguard_t__defined |
3500 | |
3501 | mig_internal kern_return_t __MIG_check__Request__mach_port_unguard_t(__attribute__((__unused__)) __Request__mach_port_unguard_t *In0P) |
3502 | { |
3503 | |
3504 | typedef __Request__mach_port_unguard_t __Request; |
3505 | #if __MigTypeCheck |
3506 | if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
3507 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
3508 | return MIG_BAD_ARGUMENTS; |
3509 | #endif /* __MigTypeCheck */ |
3510 | |
3511 | return MACH_MSG_SUCCESS; |
3512 | } |
3513 | #endif /* !defined(__MIG_check__Request__mach_port_unguard_t__defined) */ |
3514 | #endif /* __MIG_check__Request__mach_port_subsystem__ */ |
3515 | #endif /* ( __MigTypeCheck ) */ |
3516 | |
3517 | |
3518 | /* Routine mach_port_unguard */ |
3519 | mig_internal novalue _Xmach_port_unguard |
3520 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
3521 | { |
3522 | |
3523 | #ifdef __MigPackStructs |
3524 | #pragma pack(4) |
3525 | #endif |
3526 | typedef struct { |
3527 | mach_msg_header_t Head; |
3528 | NDR_record_t NDR; |
3529 | mach_port_name_t name; |
3530 | uint64_t guard; |
3531 | mach_msg_trailer_t trailer; |
3532 | } Request __attribute__((unused)); |
3533 | #ifdef __MigPackStructs |
3534 | #pragma pack() |
3535 | #endif |
3536 | typedef __Request__mach_port_unguard_t __Request; |
3537 | typedef __Reply__mach_port_unguard_t Reply __attribute__((unused)); |
3538 | |
3539 | /* |
3540 | * typedef struct { |
3541 | * mach_msg_header_t Head; |
3542 | * NDR_record_t NDR; |
3543 | * kern_return_t RetCode; |
3544 | * } mig_reply_error_t; |
3545 | */ |
3546 | |
3547 | Request *In0P = (Request *) InHeadP; |
3548 | Reply *OutP = (Reply *) OutHeadP; |
3549 | #ifdef __MIG_check__Request__mach_port_unguard_t__defined |
3550 | kern_return_t check_result; |
3551 | #endif /* __MIG_check__Request__mach_port_unguard_t__defined */ |
3552 | |
3553 | #if __MigKernelSpecificCode |
3554 | #else |
3555 | #endif /* __MigKernelSpecificCode */ |
3556 | ipc_space_t task; |
3557 | |
3558 | __DeclareRcvRpc(3234, "mach_port_unguard" ) |
3559 | __BeforeRcvRpc(3234, "mach_port_unguard" ) |
3560 | |
3561 | #if defined(__MIG_check__Request__mach_port_unguard_t__defined) |
3562 | check_result = __MIG_check__Request__mach_port_unguard_t((__Request *)In0P); |
3563 | if (check_result != MACH_MSG_SUCCESS) |
3564 | { MIG_RETURN_ERROR(OutP, check_result); } |
3565 | #endif /* defined(__MIG_check__Request__mach_port_unguard_t__defined) */ |
3566 | |
3567 | task = convert_port_to_space(In0P->Head.msgh_request_port); |
3568 | |
3569 | OutP->RetCode = mach_port_unguard(task, In0P->name, In0P->guard); |
3570 | space_deallocate(task); |
3571 | #if __MigKernelSpecificCode |
3572 | #endif /* __MigKernelSpecificCode */ |
3573 | |
3574 | OutP->NDR = NDR_record; |
3575 | |
3576 | |
3577 | __AfterRcvRpc(3234, "mach_port_unguard" ) |
3578 | } |
3579 | |
3580 | #if ( __MigTypeCheck ) |
3581 | #if __MIG_check__Request__mach_port_subsystem__ |
3582 | #if !defined(__MIG_check__Request__mach_port_space_basic_info_t__defined) |
3583 | #define __MIG_check__Request__mach_port_space_basic_info_t__defined |
3584 | |
3585 | mig_internal kern_return_t __MIG_check__Request__mach_port_space_basic_info_t(__attribute__((__unused__)) __Request__mach_port_space_basic_info_t *In0P) |
3586 | { |
3587 | |
3588 | typedef __Request__mach_port_space_basic_info_t __Request; |
3589 | #if __MigTypeCheck |
3590 | if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
3591 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
3592 | return MIG_BAD_ARGUMENTS; |
3593 | #endif /* __MigTypeCheck */ |
3594 | |
3595 | return MACH_MSG_SUCCESS; |
3596 | } |
3597 | #endif /* !defined(__MIG_check__Request__mach_port_space_basic_info_t__defined) */ |
3598 | #endif /* __MIG_check__Request__mach_port_subsystem__ */ |
3599 | #endif /* ( __MigTypeCheck ) */ |
3600 | |
3601 | |
3602 | /* Routine mach_port_space_basic_info */ |
3603 | mig_internal novalue _Xmach_port_space_basic_info |
3604 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
3605 | { |
3606 | |
3607 | #ifdef __MigPackStructs |
3608 | #pragma pack(4) |
3609 | #endif |
3610 | typedef struct { |
3611 | mach_msg_header_t Head; |
3612 | mach_msg_trailer_t trailer; |
3613 | } Request __attribute__((unused)); |
3614 | #ifdef __MigPackStructs |
3615 | #pragma pack() |
3616 | #endif |
3617 | typedef __Request__mach_port_space_basic_info_t __Request; |
3618 | typedef __Reply__mach_port_space_basic_info_t Reply __attribute__((unused)); |
3619 | |
3620 | /* |
3621 | * typedef struct { |
3622 | * mach_msg_header_t Head; |
3623 | * NDR_record_t NDR; |
3624 | * kern_return_t RetCode; |
3625 | * } mig_reply_error_t; |
3626 | */ |
3627 | |
3628 | Request *In0P = (Request *) InHeadP; |
3629 | Reply *OutP = (Reply *) OutHeadP; |
3630 | #ifdef __MIG_check__Request__mach_port_space_basic_info_t__defined |
3631 | kern_return_t check_result; |
3632 | #endif /* __MIG_check__Request__mach_port_space_basic_info_t__defined */ |
3633 | |
3634 | #if __MigKernelSpecificCode |
3635 | #else |
3636 | #endif /* __MigKernelSpecificCode */ |
3637 | ipc_space_inspect_t task; |
3638 | |
3639 | __DeclareRcvRpc(3235, "mach_port_space_basic_info" ) |
3640 | __BeforeRcvRpc(3235, "mach_port_space_basic_info" ) |
3641 | |
3642 | #if defined(__MIG_check__Request__mach_port_space_basic_info_t__defined) |
3643 | check_result = __MIG_check__Request__mach_port_space_basic_info_t((__Request *)In0P); |
3644 | if (check_result != MACH_MSG_SUCCESS) |
3645 | { MIG_RETURN_ERROR(OutP, check_result); } |
3646 | #endif /* defined(__MIG_check__Request__mach_port_space_basic_info_t__defined) */ |
3647 | |
3648 | task = convert_port_to_space_inspect(In0P->Head.msgh_request_port); |
3649 | |
3650 | OutP->RetCode = mach_port_space_basic_info(task, &OutP->basic_info); |
3651 | space_inspect_deallocate(task); |
3652 | if (OutP->RetCode != KERN_SUCCESS) { |
3653 | MIG_RETURN_ERROR(OutP, OutP->RetCode); |
3654 | } |
3655 | #if __MigKernelSpecificCode |
3656 | #endif /* __MigKernelSpecificCode */ |
3657 | |
3658 | OutP->NDR = NDR_record; |
3659 | |
3660 | |
3661 | OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply)); |
3662 | __AfterRcvRpc(3235, "mach_port_space_basic_info" ) |
3663 | } |
3664 | |
3665 | #if ( __MigTypeCheck ) |
3666 | #if __MIG_check__Request__mach_port_subsystem__ |
3667 | #if !defined(__MIG_check__Request__mach_port_special_reply_port_reset_link_t__defined) |
3668 | #define __MIG_check__Request__mach_port_special_reply_port_reset_link_t__defined |
3669 | |
3670 | mig_internal kern_return_t __MIG_check__Request__mach_port_special_reply_port_reset_link_t(__attribute__((__unused__)) __Request__mach_port_special_reply_port_reset_link_t *In0P) |
3671 | { |
3672 | |
3673 | typedef __Request__mach_port_special_reply_port_reset_link_t __Request; |
3674 | #if __MigTypeCheck |
3675 | if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
3676 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
3677 | return MIG_BAD_ARGUMENTS; |
3678 | #endif /* __MigTypeCheck */ |
3679 | |
3680 | return MACH_MSG_SUCCESS; |
3681 | } |
3682 | #endif /* !defined(__MIG_check__Request__mach_port_special_reply_port_reset_link_t__defined) */ |
3683 | #endif /* __MIG_check__Request__mach_port_subsystem__ */ |
3684 | #endif /* ( __MigTypeCheck ) */ |
3685 | |
3686 | |
3687 | /* Routine mach_port_special_reply_port_reset_link */ |
3688 | mig_internal novalue _Xmach_port_special_reply_port_reset_link |
3689 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
3690 | { |
3691 | |
3692 | #ifdef __MigPackStructs |
3693 | #pragma pack(4) |
3694 | #endif |
3695 | typedef struct { |
3696 | mach_msg_header_t Head; |
3697 | NDR_record_t NDR; |
3698 | mach_port_name_t name; |
3699 | mach_msg_trailer_t trailer; |
3700 | } Request __attribute__((unused)); |
3701 | #ifdef __MigPackStructs |
3702 | #pragma pack() |
3703 | #endif |
3704 | typedef __Request__mach_port_special_reply_port_reset_link_t __Request; |
3705 | typedef __Reply__mach_port_special_reply_port_reset_link_t Reply __attribute__((unused)); |
3706 | |
3707 | /* |
3708 | * typedef struct { |
3709 | * mach_msg_header_t Head; |
3710 | * NDR_record_t NDR; |
3711 | * kern_return_t RetCode; |
3712 | * } mig_reply_error_t; |
3713 | */ |
3714 | |
3715 | Request *In0P = (Request *) InHeadP; |
3716 | Reply *OutP = (Reply *) OutHeadP; |
3717 | #ifdef __MIG_check__Request__mach_port_special_reply_port_reset_link_t__defined |
3718 | kern_return_t check_result; |
3719 | #endif /* __MIG_check__Request__mach_port_special_reply_port_reset_link_t__defined */ |
3720 | |
3721 | #if __MigKernelSpecificCode |
3722 | #else |
3723 | #endif /* __MigKernelSpecificCode */ |
3724 | ipc_space_t task; |
3725 | |
3726 | __DeclareRcvRpc(3236, "mach_port_special_reply_port_reset_link" ) |
3727 | __BeforeRcvRpc(3236, "mach_port_special_reply_port_reset_link" ) |
3728 | |
3729 | #if defined(__MIG_check__Request__mach_port_special_reply_port_reset_link_t__defined) |
3730 | check_result = __MIG_check__Request__mach_port_special_reply_port_reset_link_t((__Request *)In0P); |
3731 | if (check_result != MACH_MSG_SUCCESS) |
3732 | { MIG_RETURN_ERROR(OutP, check_result); } |
3733 | #endif /* defined(__MIG_check__Request__mach_port_special_reply_port_reset_link_t__defined) */ |
3734 | |
3735 | task = convert_port_to_space(In0P->Head.msgh_request_port); |
3736 | |
3737 | OutP->RetCode = mach_port_special_reply_port_reset_link(task, In0P->name, &OutP->srp_lost_link); |
3738 | space_deallocate(task); |
3739 | if (OutP->RetCode != KERN_SUCCESS) { |
3740 | MIG_RETURN_ERROR(OutP, OutP->RetCode); |
3741 | } |
3742 | #if __MigKernelSpecificCode |
3743 | #endif /* __MigKernelSpecificCode */ |
3744 | |
3745 | OutP->NDR = NDR_record; |
3746 | |
3747 | |
3748 | OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply)); |
3749 | __AfterRcvRpc(3236, "mach_port_special_reply_port_reset_link" ) |
3750 | } |
3751 | |
3752 | |
3753 | |
3754 | /* Description of this subsystem, for use in direct RPC */ |
3755 | const struct mach_port_subsystem mach_port_subsystem = { |
3756 | mach_port_server_routine, |
3757 | 3200, |
3758 | 3237, |
3759 | (mach_msg_size_t)sizeof(union __ReplyUnion__mach_port_subsystem), |
3760 | (vm_address_t)0, |
3761 | { |
3762 | { (mig_impl_routine_t) 0, |
3763 | (mig_stub_routine_t) _Xmach_port_names, 5, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_port_names_t)}, |
3764 | { (mig_impl_routine_t) 0, |
3765 | (mig_stub_routine_t) _Xmach_port_type, 3, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_port_type_t)}, |
3766 | { (mig_impl_routine_t) 0, |
3767 | (mig_stub_routine_t) _Xmach_port_rename, 3, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_port_rename_t)}, |
3768 | { (mig_impl_routine_t) 0, |
3769 | (mig_stub_routine_t) _Xmach_port_allocate_name, 3, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_port_allocate_name_t)}, |
3770 | { (mig_impl_routine_t) 0, |
3771 | (mig_stub_routine_t) _Xmach_port_allocate, 3, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_port_allocate_t)}, |
3772 | { (mig_impl_routine_t) 0, |
3773 | (mig_stub_routine_t) _Xmach_port_destroy, 2, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_port_destroy_t)}, |
3774 | { (mig_impl_routine_t) 0, |
3775 | (mig_stub_routine_t) _Xmach_port_deallocate, 2, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_port_deallocate_t)}, |
3776 | { (mig_impl_routine_t) 0, |
3777 | (mig_stub_routine_t) _Xmach_port_get_refs, 4, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_port_get_refs_t)}, |
3778 | { (mig_impl_routine_t) 0, |
3779 | (mig_stub_routine_t) _Xmach_port_mod_refs, 4, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_port_mod_refs_t)}, |
3780 | { (mig_impl_routine_t) 0, |
3781 | (mig_stub_routine_t) _Xmach_port_peek, 8, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_port_peek_t)}, |
3782 | { (mig_impl_routine_t) 0, |
3783 | (mig_stub_routine_t) _Xmach_port_set_mscount, 3, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_port_set_mscount_t)}, |
3784 | { (mig_impl_routine_t) 0, |
3785 | (mig_stub_routine_t) _Xmach_port_get_set_status, 4, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_port_get_set_status_t)}, |
3786 | { (mig_impl_routine_t) 0, |
3787 | (mig_stub_routine_t) _Xmach_port_move_member, 3, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_port_move_member_t)}, |
3788 | { (mig_impl_routine_t) 0, |
3789 | (mig_stub_routine_t) _Xmach_port_request_notification, 6, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_port_request_notification_t)}, |
3790 | { (mig_impl_routine_t) 0, |
3791 | (mig_stub_routine_t) _Xmach_port_insert_right, 4, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_port_insert_right_t)}, |
3792 | { (mig_impl_routine_t) 0, |
3793 | (mig_stub_routine_t) _Xmach_port_extract_right, 5, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_port_extract_right_t)}, |
3794 | { (mig_impl_routine_t) 0, |
3795 | (mig_stub_routine_t) _Xmach_port_set_seqno, 3, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_port_set_seqno_t)}, |
3796 | { (mig_impl_routine_t) 0, |
3797 | (mig_stub_routine_t) _Xmach_port_get_attributes, 5, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_port_get_attributes_t)}, |
3798 | { (mig_impl_routine_t) 0, |
3799 | (mig_stub_routine_t) _Xmach_port_set_attributes, 5, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_port_set_attributes_t)}, |
3800 | { (mig_impl_routine_t) 0, |
3801 | (mig_stub_routine_t) _Xmach_port_allocate_qos, 4, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_port_allocate_qos_t)}, |
3802 | { (mig_impl_routine_t) 0, |
3803 | (mig_stub_routine_t) _Xmach_port_allocate_full, 5, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_port_allocate_full_t)}, |
3804 | { (mig_impl_routine_t) 0, |
3805 | (mig_stub_routine_t) _Xtask_set_port_space, 2, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__task_set_port_space_t)}, |
3806 | { (mig_impl_routine_t) 0, |
3807 | (mig_stub_routine_t) _Xmach_port_get_srights, 3, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_port_get_srights_t)}, |
3808 | { (mig_impl_routine_t) 0, |
3809 | (mig_stub_routine_t) _Xmach_port_space_info, 6, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_port_space_info_t)}, |
3810 | { (mig_impl_routine_t) 0, |
3811 | (mig_stub_routine_t) _Xmach_port_dnrequest_info, 4, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_port_dnrequest_info_t)}, |
3812 | { (mig_impl_routine_t) 0, |
3813 | (mig_stub_routine_t) _Xmach_port_kernel_object, 4, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_port_kernel_object_t)}, |
3814 | { (mig_impl_routine_t) 0, |
3815 | (mig_stub_routine_t) _Xmach_port_insert_member, 3, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_port_insert_member_t)}, |
3816 | { (mig_impl_routine_t) 0, |
3817 | (mig_stub_routine_t) _Xmach_port_extract_member, 3, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_port_extract_member_t)}, |
3818 | { (mig_impl_routine_t) 0, |
3819 | (mig_stub_routine_t) _Xmach_port_get_context, 3, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_port_get_context_t)}, |
3820 | { (mig_impl_routine_t) 0, |
3821 | (mig_stub_routine_t) _Xmach_port_set_context, 4, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_port_set_context_t)}, |
3822 | { (mig_impl_routine_t) 0, |
3823 | (mig_stub_routine_t) _Xmach_port_kobject, 4, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_port_kobject_t)}, |
3824 | { (mig_impl_routine_t) 0, |
3825 | (mig_stub_routine_t) _Xmach_port_construct, 5, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_port_construct_t)}, |
3826 | { (mig_impl_routine_t) 0, |
3827 | (mig_stub_routine_t) _Xmach_port_destruct, 5, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_port_destruct_t)}, |
3828 | { (mig_impl_routine_t) 0, |
3829 | (mig_stub_routine_t) _Xmach_port_guard, 5, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_port_guard_t)}, |
3830 | { (mig_impl_routine_t) 0, |
3831 | (mig_stub_routine_t) _Xmach_port_unguard, 4, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_port_unguard_t)}, |
3832 | { (mig_impl_routine_t) 0, |
3833 | (mig_stub_routine_t) _Xmach_port_space_basic_info, 2, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_port_space_basic_info_t)}, |
3834 | { (mig_impl_routine_t) 0, |
3835 | (mig_stub_routine_t) _Xmach_port_special_reply_port_reset_link, 3, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_port_special_reply_port_reset_link_t)}, |
3836 | } |
3837 | }; |
3838 | |
3839 | mig_external boolean_t mach_port_server |
3840 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
3841 | { |
3842 | /* |
3843 | * typedef struct { |
3844 | * mach_msg_header_t Head; |
3845 | * NDR_record_t NDR; |
3846 | * kern_return_t RetCode; |
3847 | * } mig_reply_error_t; |
3848 | */ |
3849 | |
3850 | register mig_routine_t routine; |
3851 | |
3852 | OutHeadP->msgh_bits = MACH_MSGH_BITS(MACH_MSGH_BITS_REPLY(InHeadP->msgh_bits), 0); |
3853 | OutHeadP->msgh_remote_port = InHeadP->msgh_reply_port; |
3854 | /* Minimal size: routine() will update it if different */ |
3855 | OutHeadP->msgh_size = (mach_msg_size_t)sizeof(mig_reply_error_t); |
3856 | OutHeadP->msgh_local_port = MACH_PORT_NULL; |
3857 | OutHeadP->msgh_id = InHeadP->msgh_id + 100; |
3858 | OutHeadP->msgh_reserved = 0; |
3859 | |
3860 | if ((InHeadP->msgh_id > 3236) || (InHeadP->msgh_id < 3200) || |
3861 | ((routine = mach_port_subsystem.routine[InHeadP->msgh_id - 3200].stub_routine) == 0)) { |
3862 | ((mig_reply_error_t *)OutHeadP)->NDR = NDR_record; |
3863 | ((mig_reply_error_t *)OutHeadP)->RetCode = MIG_BAD_ID; |
3864 | return FALSE; |
3865 | } |
3866 | (*routine) (InHeadP, OutHeadP); |
3867 | return TRUE; |
3868 | } |
3869 | |
3870 | mig_external mig_routine_t mach_port_server_routine |
3871 | (mach_msg_header_t *InHeadP) |
3872 | { |
3873 | register int msgh_id; |
3874 | |
3875 | msgh_id = InHeadP->msgh_id - 3200; |
3876 | |
3877 | if ((msgh_id > 36) || (msgh_id < 0)) |
3878 | return 0; |
3879 | |
3880 | return mach_port_subsystem.routine[msgh_id].stub_routine; |
3881 | } |
3882 | |