1/*
2 * IDENTIFICATION:
3 * stub generated by bootstrap_cmds-133
4 * OPTIONS:
5 * KernelServer
6 */
7
8/* Module mach_port */
9
10#define __MIG_check__Request__mach_port_subsystem__ 1
11
12#include "mach_port_server.h"
13
14#ifndef mig_internal
15#define mig_internal static __inline__
16#endif /* mig_internal */
17
18#ifndef mig_external
19#define mig_external
20#endif /* mig_external */
21
22#if !defined(__MigTypeCheck) && defined(TypeCheck)
23#define __MigTypeCheck TypeCheck /* Legacy setting */
24#endif /* !defined(__MigTypeCheck) */
25
26#if !defined(__MigKernelSpecificCode) && defined(_MIG_KERNEL_SPECIFIC_CODE_)
27#define __MigKernelSpecificCode _MIG_KERNEL_SPECIFIC_CODE_ /* Legacy setting */
28#endif /* !defined(__MigKernelSpecificCode) */
29
30#ifndef LimitCheck
31#define LimitCheck 0
32#endif /* LimitCheck */
33
34#ifndef min
35#define min(a,b) ( ((a) < (b))? (a): (b) )
36#endif /* min */
37
38#if !defined(_WALIGN_)
39#define _WALIGN_(x) (((x) + 3) & ~3)
40#endif /* !defined(_WALIGN_) */
41
42#if !defined(_WALIGNSZ_)
43#define _WALIGNSZ_(x) _WALIGN_(sizeof(x))
44#endif /* !defined(_WALIGNSZ_) */
45
46#ifndef UseStaticTemplates
47#define UseStaticTemplates 0
48#endif /* UseStaticTemplates */
49
50#ifndef MIG_SERVER_ROUTINE
51#define MIG_SERVER_ROUTINE
52#endif
53
54#ifndef __DeclareRcvRpc
55#define __DeclareRcvRpc(_NUM_, _NAME_)
56#endif /* __DeclareRcvRpc */
57
58#ifndef __BeforeRcvRpc
59#define __BeforeRcvRpc(_NUM_, _NAME_)
60#endif /* __BeforeRcvRpc */
61
62#ifndef __AfterRcvRpc
63#define __AfterRcvRpc(_NUM_, _NAME_)
64#endif /* __AfterRcvRpc */
65
66#ifndef __DeclareRcvSimple
67#define __DeclareRcvSimple(_NUM_, _NAME_)
68#endif /* __DeclareRcvSimple */
69
70#ifndef __BeforeRcvSimple
71#define __BeforeRcvSimple(_NUM_, _NAME_)
72#endif /* __BeforeRcvSimple */
73
74#ifndef __AfterRcvSimple
75#define __AfterRcvSimple(_NUM_, _NAME_)
76#endif /* __AfterRcvSimple */
77
78#define novalue void
79
80#if __MigKernelSpecificCode
81#define msgh_request_port msgh_remote_port
82#define MACH_MSGH_BITS_REQUEST(bits) MACH_MSGH_BITS_REMOTE(bits)
83#define msgh_reply_port msgh_local_port
84#define MACH_MSGH_BITS_REPLY(bits) MACH_MSGH_BITS_LOCAL(bits)
85#else
86#define msgh_request_port msgh_local_port
87#define MACH_MSGH_BITS_REQUEST(bits) MACH_MSGH_BITS_LOCAL(bits)
88#define msgh_reply_port msgh_remote_port
89#define MACH_MSGH_BITS_REPLY(bits) MACH_MSGH_BITS_REMOTE(bits)
90#endif /* __MigKernelSpecificCode */
91
92#define MIG_RETURN_ERROR(X, code) {\
93 ((mig_reply_error_t *)X)->RetCode = code;\
94 ((mig_reply_error_t *)X)->NDR = NDR_record;\
95 return;\
96 }
97
98/* Forward Declarations */
99
100
101mig_internal novalue _Xmach_port_names
102 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
103
104mig_internal novalue _Xmach_port_type
105 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
106
107mig_internal novalue _Xmach_port_allocate_name
108 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
109
110mig_internal novalue _Xmach_port_allocate
111 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
112
113mig_internal novalue _Xmach_port_destroy
114 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
115
116mig_internal novalue _Xmach_port_deallocate
117 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
118
119mig_internal novalue _Xmach_port_get_refs
120 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
121
122mig_internal novalue _Xmach_port_mod_refs
123 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
124
125mig_internal novalue _Xmach_port_peek
126 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
127
128mig_internal novalue _Xmach_port_set_mscount
129 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
130
131mig_internal novalue _Xmach_port_get_set_status_from_user
132 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
133
134mig_internal novalue _Xmach_port_move_member
135 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
136
137mig_internal novalue _Xmach_port_request_notification
138 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
139
140mig_internal novalue _Xmach_port_insert_right
141 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
142
143mig_internal novalue _Xmach_port_extract_right
144 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
145
146mig_internal novalue _Xmach_port_set_seqno
147 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
148
149mig_internal novalue _Xmach_port_get_attributes_from_user
150 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
151
152mig_internal novalue _Xmach_port_set_attributes
153 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
154
155mig_internal novalue _Xmach_port_allocate_qos
156 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
157
158mig_internal novalue _Xmach_port_allocate_full
159 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
160
161mig_internal novalue _Xtask_set_port_space
162 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
163
164mig_internal novalue _Xmach_port_get_srights
165 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
166
167mig_internal novalue _Xmach_port_space_info_from_user
168 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
169
170mig_internal novalue _Xmach_port_dnrequest_info
171 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
172
173mig_internal novalue _Xmach_port_insert_member
174 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
175
176mig_internal novalue _Xmach_port_extract_member
177 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
178
179mig_internal novalue _Xmach_port_get_context_from_user
180 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
181
182mig_internal novalue _Xmach_port_set_context
183 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
184
185mig_internal novalue _Xmach_port_kobject_from_user
186 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
187
188mig_internal novalue _Xmach_port_construct
189 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
190
191mig_internal novalue _Xmach_port_destruct
192 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
193
194mig_internal novalue _Xmach_port_guard
195 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
196
197mig_internal novalue _Xmach_port_unguard
198 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
199
200mig_internal novalue _Xmach_port_space_basic_info
201 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
202
203mig_internal novalue _Xmach_port_special_reply_port_reset_link
204 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
205
206mig_internal novalue _Xmach_port_guard_with_flags
207 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
208
209mig_internal novalue _Xmach_port_swap_guard
210 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
211
212mig_internal novalue _Xmach_port_kobject_description_from_user
213 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
214
215mig_internal novalue _Xmach_port_is_connection_for_service
216 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
217
218mig_internal novalue _Xmach_port_get_service_port_info
219 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
220
221mig_internal novalue _Xmach_port_assert_attributes
222 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
223
224
225#if ( __MigTypeCheck )
226#if __MIG_check__Request__mach_port_subsystem__
227#if !defined(__MIG_check__Request__mach_port_names_t__defined)
228#define __MIG_check__Request__mach_port_names_t__defined
229
230mig_internal kern_return_t __MIG_check__Request__mach_port_names_t(
231 __attribute__((__unused__)) __RequestKData__mach_port_names_t *InKP,
232 __attribute__((__unused__)) __RequestUData__mach_port_names_t *In0UP,
233 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
234{
235
236 typedef __Request__mach_port_names_t __Request;
237 typedef __RequestUData__mach_port_names_t __RequestU __attribute__((unused));
238#if __MigTypeCheck
239 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
240 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
241 return MIG_BAD_ARGUMENTS;
242#endif /* __MigTypeCheck */
243
244 return MACH_MSG_SUCCESS;
245}
246#endif /* !defined(__MIG_check__Request__mach_port_names_t__defined) */
247#endif /* __MIG_check__Request__mach_port_subsystem__ */
248#endif /* ( __MigTypeCheck ) */
249
250
251/* Routine mach_port_names */
252mig_internal novalue _Xmach_port_names
253 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
254 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
255 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
256{
257
258#ifdef __MigPackStructs
259#pragma pack(push, 4)
260#endif
261 typedef struct {
262 mach_msg_trailer_t trailer;
263 char padding[0]; /* Avoid generating empty UData structs */
264 } RequestU __attribute__((unused));
265#ifdef __MigPackStructs
266#pragma pack(pop)
267#endif
268 typedef __RequestKData__mach_port_names_t RequestK;
269 typedef __RequestUData__mach_port_names_t __RequestU;
270 typedef __ReplyKData__mach_port_names_t ReplyK __attribute__((unused));
271 typedef __ReplyUData__mach_port_names_t ReplyU __attribute__((unused));
272 typedef __Reply__mach_port_names_t Reply __attribute__((unused));
273 typedef __Request__mach_port_names_t __Request __attribute__((unused));
274
275 /*
276 * typedef struct {
277 * mach_msg_header_t Head;
278 * NDR_record_t NDR;
279 * kern_return_t RetCode;
280 * } mig_reply_error_t;
281 */
282
283 RequestK *InKP = (RequestK *) InHeadP;
284 RequestU *In0UP = (RequestU *) InDataP;
285 ReplyK *OutKP = (ReplyK *) OutHeadP;
286 ReplyU *OutUP = (ReplyU *) OutDataP;
287 (void)OutUP;
288#ifdef __MIG_check__Request__mach_port_names_t__defined
289 kern_return_t check_result;
290#endif /* __MIG_check__Request__mach_port_names_t__defined */
291
292#if __MigKernelSpecificCode
293#if UseStaticTemplates
294 const static mach_msg_ool_descriptor_t namesTemplate = {
295 /* addr = */ (void *)0,
296 /* size = */ 0,
297 /* deal = */ FALSE,
298 /* copy = */ MACH_MSG_VIRTUAL_COPY,
299 /* pad2 = */ 0,
300 /* type = */ MACH_MSG_OOL_DESCRIPTOR,
301 };
302#endif /* UseStaticTemplates */
303
304#if UseStaticTemplates
305 const static mach_msg_ool_descriptor_t typesTemplate = {
306 /* addr = */ (void *)0,
307 /* size = */ 0,
308 /* deal = */ FALSE,
309 /* copy = */ MACH_MSG_VIRTUAL_COPY,
310 /* pad2 = */ 0,
311 /* type = */ MACH_MSG_OOL_DESCRIPTOR,
312 };
313#endif /* UseStaticTemplates */
314
315#else
316#if UseStaticTemplates
317 const static mach_msg_ool_descriptor_t namesTemplate = {
318 /* addr = */ (void *)0,
319 /* size = */ 0,
320 /* deal = */ FALSE,
321 /* copy = */ MACH_MSG_VIRTUAL_COPY,
322 /* pad2 = */ 0,
323 /* type = */ MACH_MSG_OOL_DESCRIPTOR,
324 };
325#endif /* UseStaticTemplates */
326
327#if UseStaticTemplates
328 const static mach_msg_ool_descriptor_t typesTemplate = {
329 /* addr = */ (void *)0,
330 /* size = */ 0,
331 /* deal = */ FALSE,
332 /* copy = */ MACH_MSG_VIRTUAL_COPY,
333 /* pad2 = */ 0,
334 /* type = */ MACH_MSG_OOL_DESCRIPTOR,
335 };
336#endif /* UseStaticTemplates */
337
338#endif /* __MigKernelSpecificCode */
339 kern_return_t RetCode;
340 ipc_space_t task;
341
342 __DeclareRcvRpc(3200, "mach_port_names")
343 __BeforeRcvRpc(3200, "mach_port_names")
344
345#if defined(__MIG_check__Request__mach_port_names_t__defined)
346 check_result = __MIG_check__Request__mach_port_names_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
347 if (check_result != MACH_MSG_SUCCESS)
348 { MIG_RETURN_ERROR(OutKP, check_result); }
349#endif /* defined(__MIG_check__Request__mach_port_names_t__defined) */
350
351#if UseStaticTemplates
352 OutKP->names = namesTemplate;
353#else /* UseStaticTemplates */
354 OutKP->names.deallocate = FALSE;
355 OutKP->names.copy = MACH_MSG_VIRTUAL_COPY;
356 OutKP->names.pad1 = 0;
357 OutKP->names.type = MACH_MSG_OOL_DESCRIPTOR;
358#if defined(KERNEL) && !defined(__LP64__)
359 OutKP->names.pad_end = 0;
360#endif
361#endif /* UseStaticTemplates */
362
363
364#if UseStaticTemplates
365 OutKP->types = typesTemplate;
366#else /* UseStaticTemplates */
367 OutKP->types.deallocate = FALSE;
368 OutKP->types.copy = MACH_MSG_VIRTUAL_COPY;
369 OutKP->types.pad1 = 0;
370 OutKP->types.type = MACH_MSG_OOL_DESCRIPTOR;
371#if defined(KERNEL) && !defined(__LP64__)
372 OutKP->types.pad_end = 0;
373#endif
374#endif /* UseStaticTemplates */
375
376
377 task = convert_port_to_space(port: InKP->Head.msgh_request_port);
378
379 OutUP->namesCnt = 0;
380
381 OutUP->typesCnt = 0;
382
383 RetCode = mach_port_names(task, names: (mach_port_name_array_t *)&(OutKP->names.address), namesCnt: &OutUP->namesCnt, types: (mach_port_type_array_t *)&(OutKP->types.address), typesCnt: &OutUP->typesCnt);
384 space_deallocate(space: task);
385 if (RetCode != KERN_SUCCESS) {
386 MIG_RETURN_ERROR(OutKP, RetCode);
387 }
388#if __MigKernelSpecificCode
389#endif /* __MigKernelSpecificCode */
390 OutKP->names.size = OutUP->namesCnt * 4;
391
392 OutKP->types.size = OutUP->typesCnt * 4;
393
394
395 OutUP->NDR = NDR_record;
396
397
398 OutKP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
399 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
400 OutKP->msgh_body.msgh_descriptor_count = 2;
401 __AfterRcvRpc(3200, "mach_port_names")
402}
403
404#if ( __MigTypeCheck )
405#if __MIG_check__Request__mach_port_subsystem__
406#if !defined(__MIG_check__Request__mach_port_type_t__defined)
407#define __MIG_check__Request__mach_port_type_t__defined
408
409mig_internal kern_return_t __MIG_check__Request__mach_port_type_t(
410 __attribute__((__unused__)) __RequestKData__mach_port_type_t *InKP,
411 __attribute__((__unused__)) __RequestUData__mach_port_type_t *In0UP,
412 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
413{
414
415 typedef __Request__mach_port_type_t __Request;
416 typedef __RequestUData__mach_port_type_t __RequestU __attribute__((unused));
417#if __MigTypeCheck
418 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
419 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
420 return MIG_BAD_ARGUMENTS;
421#endif /* __MigTypeCheck */
422
423 return MACH_MSG_SUCCESS;
424}
425#endif /* !defined(__MIG_check__Request__mach_port_type_t__defined) */
426#endif /* __MIG_check__Request__mach_port_subsystem__ */
427#endif /* ( __MigTypeCheck ) */
428
429
430/* Routine mach_port_type */
431mig_internal novalue _Xmach_port_type
432 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
433 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
434 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
435{
436
437#ifdef __MigPackStructs
438#pragma pack(push, 4)
439#endif
440 typedef struct {
441 NDR_record_t NDR;
442 mach_port_name_t name;
443 mach_msg_trailer_t trailer;
444 char padding[0]; /* Avoid generating empty UData structs */
445 } RequestU __attribute__((unused));
446#ifdef __MigPackStructs
447#pragma pack(pop)
448#endif
449 typedef __RequestKData__mach_port_type_t RequestK;
450 typedef __RequestUData__mach_port_type_t __RequestU;
451 typedef __ReplyKData__mach_port_type_t ReplyK __attribute__((unused));
452 typedef __ReplyUData__mach_port_type_t ReplyU __attribute__((unused));
453 typedef __Reply__mach_port_type_t Reply __attribute__((unused));
454 typedef __Request__mach_port_type_t __Request __attribute__((unused));
455
456 /*
457 * typedef struct {
458 * mach_msg_header_t Head;
459 * NDR_record_t NDR;
460 * kern_return_t RetCode;
461 * } mig_reply_error_t;
462 */
463
464 RequestK *InKP = (RequestK *) InHeadP;
465 RequestU *In0UP = (RequestU *) InDataP;
466 ReplyK *OutKP = (ReplyK *) OutHeadP;
467 ReplyU *OutUP = (ReplyU *) OutDataP;
468 (void)OutUP;
469#ifdef __MIG_check__Request__mach_port_type_t__defined
470 kern_return_t check_result;
471#endif /* __MIG_check__Request__mach_port_type_t__defined */
472
473#if __MigKernelSpecificCode
474#else
475#endif /* __MigKernelSpecificCode */
476 ipc_space_t task;
477
478 __DeclareRcvRpc(3201, "mach_port_type")
479 __BeforeRcvRpc(3201, "mach_port_type")
480
481#if defined(__MIG_check__Request__mach_port_type_t__defined)
482 check_result = __MIG_check__Request__mach_port_type_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
483 if (check_result != MACH_MSG_SUCCESS)
484 { MIG_RETURN_ERROR(OutKP, check_result); }
485#endif /* defined(__MIG_check__Request__mach_port_type_t__defined) */
486
487 task = convert_port_to_space(port: InKP->Head.msgh_request_port);
488
489 OutUP->RetCode = mach_port_type(task, name: In0UP->name, ptype: &OutUP->ptype);
490 space_deallocate(space: task);
491 if (OutUP->RetCode != KERN_SUCCESS) {
492 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
493 }
494#if __MigKernelSpecificCode
495#endif /* __MigKernelSpecificCode */
496
497 OutUP->NDR = NDR_record;
498
499
500 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
501 __AfterRcvRpc(3201, "mach_port_type")
502}
503
504#if ( __MigTypeCheck )
505#if __MIG_check__Request__mach_port_subsystem__
506#if !defined(__MIG_check__Request__mach_port_allocate_name_t__defined)
507#define __MIG_check__Request__mach_port_allocate_name_t__defined
508
509mig_internal kern_return_t __MIG_check__Request__mach_port_allocate_name_t(
510 __attribute__((__unused__)) __RequestKData__mach_port_allocate_name_t *InKP,
511 __attribute__((__unused__)) __RequestUData__mach_port_allocate_name_t *In0UP,
512 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
513{
514
515 typedef __Request__mach_port_allocate_name_t __Request;
516 typedef __RequestUData__mach_port_allocate_name_t __RequestU __attribute__((unused));
517#if __MigTypeCheck
518 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
519 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
520 return MIG_BAD_ARGUMENTS;
521#endif /* __MigTypeCheck */
522
523 return MACH_MSG_SUCCESS;
524}
525#endif /* !defined(__MIG_check__Request__mach_port_allocate_name_t__defined) */
526#endif /* __MIG_check__Request__mach_port_subsystem__ */
527#endif /* ( __MigTypeCheck ) */
528
529
530/* Routine mach_port_allocate_name */
531mig_internal novalue _Xmach_port_allocate_name
532 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
533 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
534 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
535{
536
537#ifdef __MigPackStructs
538#pragma pack(push, 4)
539#endif
540 typedef struct {
541 NDR_record_t NDR;
542 mach_port_right_t right;
543 mach_port_name_t name;
544 mach_msg_trailer_t trailer;
545 char padding[0]; /* Avoid generating empty UData structs */
546 } RequestU __attribute__((unused));
547#ifdef __MigPackStructs
548#pragma pack(pop)
549#endif
550 typedef __RequestKData__mach_port_allocate_name_t RequestK;
551 typedef __RequestUData__mach_port_allocate_name_t __RequestU;
552 typedef __ReplyKData__mach_port_allocate_name_t ReplyK __attribute__((unused));
553 typedef __ReplyUData__mach_port_allocate_name_t ReplyU __attribute__((unused));
554 typedef __Reply__mach_port_allocate_name_t Reply __attribute__((unused));
555 typedef __Request__mach_port_allocate_name_t __Request __attribute__((unused));
556
557 /*
558 * typedef struct {
559 * mach_msg_header_t Head;
560 * NDR_record_t NDR;
561 * kern_return_t RetCode;
562 * } mig_reply_error_t;
563 */
564
565 RequestK *InKP = (RequestK *) InHeadP;
566 RequestU *In0UP = (RequestU *) InDataP;
567 ReplyK *OutKP = (ReplyK *) OutHeadP;
568 ReplyU *OutUP = (ReplyU *) OutDataP;
569 (void)OutUP;
570#ifdef __MIG_check__Request__mach_port_allocate_name_t__defined
571 kern_return_t check_result;
572#endif /* __MIG_check__Request__mach_port_allocate_name_t__defined */
573
574#if __MigKernelSpecificCode
575#else
576#endif /* __MigKernelSpecificCode */
577 ipc_space_t task;
578
579 __DeclareRcvRpc(3203, "mach_port_allocate_name")
580 __BeforeRcvRpc(3203, "mach_port_allocate_name")
581
582#if defined(__MIG_check__Request__mach_port_allocate_name_t__defined)
583 check_result = __MIG_check__Request__mach_port_allocate_name_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
584 if (check_result != MACH_MSG_SUCCESS)
585 { MIG_RETURN_ERROR(OutKP, check_result); }
586#endif /* defined(__MIG_check__Request__mach_port_allocate_name_t__defined) */
587
588 task = convert_port_to_space(port: InKP->Head.msgh_request_port);
589
590 OutUP->RetCode = mach_port_allocate_name(task, right: In0UP->right, name: In0UP->name);
591 space_deallocate(space: task);
592#if __MigKernelSpecificCode
593#endif /* __MigKernelSpecificCode */
594
595 OutUP->NDR = NDR_record;
596
597
598 __AfterRcvRpc(3203, "mach_port_allocate_name")
599}
600
601#if ( __MigTypeCheck )
602#if __MIG_check__Request__mach_port_subsystem__
603#if !defined(__MIG_check__Request__mach_port_allocate_t__defined)
604#define __MIG_check__Request__mach_port_allocate_t__defined
605
606mig_internal kern_return_t __MIG_check__Request__mach_port_allocate_t(
607 __attribute__((__unused__)) __RequestKData__mach_port_allocate_t *InKP,
608 __attribute__((__unused__)) __RequestUData__mach_port_allocate_t *In0UP,
609 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
610{
611
612 typedef __Request__mach_port_allocate_t __Request;
613 typedef __RequestUData__mach_port_allocate_t __RequestU __attribute__((unused));
614#if __MigTypeCheck
615 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
616 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
617 return MIG_BAD_ARGUMENTS;
618#endif /* __MigTypeCheck */
619
620 return MACH_MSG_SUCCESS;
621}
622#endif /* !defined(__MIG_check__Request__mach_port_allocate_t__defined) */
623#endif /* __MIG_check__Request__mach_port_subsystem__ */
624#endif /* ( __MigTypeCheck ) */
625
626
627/* Routine mach_port_allocate */
628mig_internal novalue _Xmach_port_allocate
629 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
630 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
631 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
632{
633
634#ifdef __MigPackStructs
635#pragma pack(push, 4)
636#endif
637 typedef struct {
638 NDR_record_t NDR;
639 mach_port_right_t right;
640 mach_msg_trailer_t trailer;
641 char padding[0]; /* Avoid generating empty UData structs */
642 } RequestU __attribute__((unused));
643#ifdef __MigPackStructs
644#pragma pack(pop)
645#endif
646 typedef __RequestKData__mach_port_allocate_t RequestK;
647 typedef __RequestUData__mach_port_allocate_t __RequestU;
648 typedef __ReplyKData__mach_port_allocate_t ReplyK __attribute__((unused));
649 typedef __ReplyUData__mach_port_allocate_t ReplyU __attribute__((unused));
650 typedef __Reply__mach_port_allocate_t Reply __attribute__((unused));
651 typedef __Request__mach_port_allocate_t __Request __attribute__((unused));
652
653 /*
654 * typedef struct {
655 * mach_msg_header_t Head;
656 * NDR_record_t NDR;
657 * kern_return_t RetCode;
658 * } mig_reply_error_t;
659 */
660
661 RequestK *InKP = (RequestK *) InHeadP;
662 RequestU *In0UP = (RequestU *) InDataP;
663 ReplyK *OutKP = (ReplyK *) OutHeadP;
664 ReplyU *OutUP = (ReplyU *) OutDataP;
665 (void)OutUP;
666#ifdef __MIG_check__Request__mach_port_allocate_t__defined
667 kern_return_t check_result;
668#endif /* __MIG_check__Request__mach_port_allocate_t__defined */
669
670#if __MigKernelSpecificCode
671#else
672#endif /* __MigKernelSpecificCode */
673 ipc_space_t task;
674
675 __DeclareRcvRpc(3204, "mach_port_allocate")
676 __BeforeRcvRpc(3204, "mach_port_allocate")
677
678#if defined(__MIG_check__Request__mach_port_allocate_t__defined)
679 check_result = __MIG_check__Request__mach_port_allocate_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
680 if (check_result != MACH_MSG_SUCCESS)
681 { MIG_RETURN_ERROR(OutKP, check_result); }
682#endif /* defined(__MIG_check__Request__mach_port_allocate_t__defined) */
683
684 task = convert_port_to_space(port: InKP->Head.msgh_request_port);
685
686 OutUP->RetCode = mach_port_allocate(task, right: In0UP->right, name: &OutUP->name);
687 space_deallocate(space: task);
688 if (OutUP->RetCode != KERN_SUCCESS) {
689 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
690 }
691#if __MigKernelSpecificCode
692#endif /* __MigKernelSpecificCode */
693
694 OutUP->NDR = NDR_record;
695
696
697 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
698 __AfterRcvRpc(3204, "mach_port_allocate")
699}
700
701#if ( __MigTypeCheck )
702#if __MIG_check__Request__mach_port_subsystem__
703#if !defined(__MIG_check__Request__mach_port_destroy_t__defined)
704#define __MIG_check__Request__mach_port_destroy_t__defined
705
706mig_internal kern_return_t __MIG_check__Request__mach_port_destroy_t(
707 __attribute__((__unused__)) __RequestKData__mach_port_destroy_t *InKP,
708 __attribute__((__unused__)) __RequestUData__mach_port_destroy_t *In0UP,
709 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
710{
711
712 typedef __Request__mach_port_destroy_t __Request;
713 typedef __RequestUData__mach_port_destroy_t __RequestU __attribute__((unused));
714#if __MigTypeCheck
715 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
716 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
717 return MIG_BAD_ARGUMENTS;
718#endif /* __MigTypeCheck */
719
720 return MACH_MSG_SUCCESS;
721}
722#endif /* !defined(__MIG_check__Request__mach_port_destroy_t__defined) */
723#endif /* __MIG_check__Request__mach_port_subsystem__ */
724#endif /* ( __MigTypeCheck ) */
725
726
727/* Routine mach_port_destroy */
728mig_internal novalue _Xmach_port_destroy
729 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
730 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
731 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
732{
733
734#ifdef __MigPackStructs
735#pragma pack(push, 4)
736#endif
737 typedef struct {
738 NDR_record_t NDR;
739 mach_port_name_t name;
740 mach_msg_trailer_t trailer;
741 char padding[0]; /* Avoid generating empty UData structs */
742 } RequestU __attribute__((unused));
743#ifdef __MigPackStructs
744#pragma pack(pop)
745#endif
746 typedef __RequestKData__mach_port_destroy_t RequestK;
747 typedef __RequestUData__mach_port_destroy_t __RequestU;
748 typedef __ReplyKData__mach_port_destroy_t ReplyK __attribute__((unused));
749 typedef __ReplyUData__mach_port_destroy_t ReplyU __attribute__((unused));
750 typedef __Reply__mach_port_destroy_t Reply __attribute__((unused));
751 typedef __Request__mach_port_destroy_t __Request __attribute__((unused));
752
753 /*
754 * typedef struct {
755 * mach_msg_header_t Head;
756 * NDR_record_t NDR;
757 * kern_return_t RetCode;
758 * } mig_reply_error_t;
759 */
760
761 RequestK *InKP = (RequestK *) InHeadP;
762 RequestU *In0UP = (RequestU *) InDataP;
763 ReplyK *OutKP = (ReplyK *) OutHeadP;
764 ReplyU *OutUP = (ReplyU *) OutDataP;
765 (void)OutUP;
766#ifdef __MIG_check__Request__mach_port_destroy_t__defined
767 kern_return_t check_result;
768#endif /* __MIG_check__Request__mach_port_destroy_t__defined */
769
770#if __MigKernelSpecificCode
771#else
772#endif /* __MigKernelSpecificCode */
773 ipc_space_t task;
774
775 __DeclareRcvRpc(3205, "mach_port_destroy")
776 __BeforeRcvRpc(3205, "mach_port_destroy")
777
778#if defined(__MIG_check__Request__mach_port_destroy_t__defined)
779 check_result = __MIG_check__Request__mach_port_destroy_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
780 if (check_result != MACH_MSG_SUCCESS)
781 { MIG_RETURN_ERROR(OutKP, check_result); }
782#endif /* defined(__MIG_check__Request__mach_port_destroy_t__defined) */
783
784 task = convert_port_to_space(port: InKP->Head.msgh_request_port);
785
786 OutUP->RetCode = mach_port_destroy(task, name: In0UP->name);
787 space_deallocate(space: task);
788#if __MigKernelSpecificCode
789#endif /* __MigKernelSpecificCode */
790
791 OutUP->NDR = NDR_record;
792
793
794 __AfterRcvRpc(3205, "mach_port_destroy")
795}
796
797#if ( __MigTypeCheck )
798#if __MIG_check__Request__mach_port_subsystem__
799#if !defined(__MIG_check__Request__mach_port_deallocate_t__defined)
800#define __MIG_check__Request__mach_port_deallocate_t__defined
801
802mig_internal kern_return_t __MIG_check__Request__mach_port_deallocate_t(
803 __attribute__((__unused__)) __RequestKData__mach_port_deallocate_t *InKP,
804 __attribute__((__unused__)) __RequestUData__mach_port_deallocate_t *In0UP,
805 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
806{
807
808 typedef __Request__mach_port_deallocate_t __Request;
809 typedef __RequestUData__mach_port_deallocate_t __RequestU __attribute__((unused));
810#if __MigTypeCheck
811 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
812 (InKP->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 */
824mig_internal novalue _Xmach_port_deallocate
825 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
826 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
827 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
828{
829
830#ifdef __MigPackStructs
831#pragma pack(push, 4)
832#endif
833 typedef struct {
834 NDR_record_t NDR;
835 mach_port_name_t name;
836 mach_msg_trailer_t trailer;
837 char padding[0]; /* Avoid generating empty UData structs */
838 } RequestU __attribute__((unused));
839#ifdef __MigPackStructs
840#pragma pack(pop)
841#endif
842 typedef __RequestKData__mach_port_deallocate_t RequestK;
843 typedef __RequestUData__mach_port_deallocate_t __RequestU;
844 typedef __ReplyKData__mach_port_deallocate_t ReplyK __attribute__((unused));
845 typedef __ReplyUData__mach_port_deallocate_t ReplyU __attribute__((unused));
846 typedef __Reply__mach_port_deallocate_t Reply __attribute__((unused));
847 typedef __Request__mach_port_deallocate_t __Request __attribute__((unused));
848
849 /*
850 * typedef struct {
851 * mach_msg_header_t Head;
852 * NDR_record_t NDR;
853 * kern_return_t RetCode;
854 * } mig_reply_error_t;
855 */
856
857 RequestK *InKP = (RequestK *) InHeadP;
858 RequestU *In0UP = (RequestU *) InDataP;
859 ReplyK *OutKP = (ReplyK *) OutHeadP;
860 ReplyU *OutUP = (ReplyU *) OutDataP;
861 (void)OutUP;
862#ifdef __MIG_check__Request__mach_port_deallocate_t__defined
863 kern_return_t check_result;
864#endif /* __MIG_check__Request__mach_port_deallocate_t__defined */
865
866#if __MigKernelSpecificCode
867#else
868#endif /* __MigKernelSpecificCode */
869 ipc_space_t task;
870
871 __DeclareRcvRpc(3206, "mach_port_deallocate")
872 __BeforeRcvRpc(3206, "mach_port_deallocate")
873
874#if defined(__MIG_check__Request__mach_port_deallocate_t__defined)
875 check_result = __MIG_check__Request__mach_port_deallocate_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
876 if (check_result != MACH_MSG_SUCCESS)
877 { MIG_RETURN_ERROR(OutKP, check_result); }
878#endif /* defined(__MIG_check__Request__mach_port_deallocate_t__defined) */
879
880 task = convert_port_to_space(port: InKP->Head.msgh_request_port);
881
882 OutUP->RetCode = mach_port_deallocate(task, name: In0UP->name);
883 space_deallocate(space: task);
884#if __MigKernelSpecificCode
885#endif /* __MigKernelSpecificCode */
886
887 OutUP->NDR = NDR_record;
888
889
890 __AfterRcvRpc(3206, "mach_port_deallocate")
891}
892
893#if ( __MigTypeCheck )
894#if __MIG_check__Request__mach_port_subsystem__
895#if !defined(__MIG_check__Request__mach_port_get_refs_t__defined)
896#define __MIG_check__Request__mach_port_get_refs_t__defined
897
898mig_internal kern_return_t __MIG_check__Request__mach_port_get_refs_t(
899 __attribute__((__unused__)) __RequestKData__mach_port_get_refs_t *InKP,
900 __attribute__((__unused__)) __RequestUData__mach_port_get_refs_t *In0UP,
901 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
902{
903
904 typedef __Request__mach_port_get_refs_t __Request;
905 typedef __RequestUData__mach_port_get_refs_t __RequestU __attribute__((unused));
906#if __MigTypeCheck
907 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
908 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
909 return MIG_BAD_ARGUMENTS;
910#endif /* __MigTypeCheck */
911
912 return MACH_MSG_SUCCESS;
913}
914#endif /* !defined(__MIG_check__Request__mach_port_get_refs_t__defined) */
915#endif /* __MIG_check__Request__mach_port_subsystem__ */
916#endif /* ( __MigTypeCheck ) */
917
918
919/* Routine mach_port_get_refs */
920mig_internal novalue _Xmach_port_get_refs
921 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
922 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
923 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
924{
925
926#ifdef __MigPackStructs
927#pragma pack(push, 4)
928#endif
929 typedef struct {
930 NDR_record_t NDR;
931 mach_port_name_t name;
932 mach_port_right_t right;
933 mach_msg_trailer_t trailer;
934 char padding[0]; /* Avoid generating empty UData structs */
935 } RequestU __attribute__((unused));
936#ifdef __MigPackStructs
937#pragma pack(pop)
938#endif
939 typedef __RequestKData__mach_port_get_refs_t RequestK;
940 typedef __RequestUData__mach_port_get_refs_t __RequestU;
941 typedef __ReplyKData__mach_port_get_refs_t ReplyK __attribute__((unused));
942 typedef __ReplyUData__mach_port_get_refs_t ReplyU __attribute__((unused));
943 typedef __Reply__mach_port_get_refs_t Reply __attribute__((unused));
944 typedef __Request__mach_port_get_refs_t __Request __attribute__((unused));
945
946 /*
947 * typedef struct {
948 * mach_msg_header_t Head;
949 * NDR_record_t NDR;
950 * kern_return_t RetCode;
951 * } mig_reply_error_t;
952 */
953
954 RequestK *InKP = (RequestK *) InHeadP;
955 RequestU *In0UP = (RequestU *) InDataP;
956 ReplyK *OutKP = (ReplyK *) OutHeadP;
957 ReplyU *OutUP = (ReplyU *) OutDataP;
958 (void)OutUP;
959#ifdef __MIG_check__Request__mach_port_get_refs_t__defined
960 kern_return_t check_result;
961#endif /* __MIG_check__Request__mach_port_get_refs_t__defined */
962
963#if __MigKernelSpecificCode
964#else
965#endif /* __MigKernelSpecificCode */
966 ipc_space_t task;
967
968 __DeclareRcvRpc(3207, "mach_port_get_refs")
969 __BeforeRcvRpc(3207, "mach_port_get_refs")
970
971#if defined(__MIG_check__Request__mach_port_get_refs_t__defined)
972 check_result = __MIG_check__Request__mach_port_get_refs_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
973 if (check_result != MACH_MSG_SUCCESS)
974 { MIG_RETURN_ERROR(OutKP, check_result); }
975#endif /* defined(__MIG_check__Request__mach_port_get_refs_t__defined) */
976
977 task = convert_port_to_space(port: InKP->Head.msgh_request_port);
978
979 OutUP->RetCode = mach_port_get_refs(task, name: In0UP->name, right: In0UP->right, refs: &OutUP->refs);
980 space_deallocate(space: task);
981 if (OutUP->RetCode != KERN_SUCCESS) {
982 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
983 }
984#if __MigKernelSpecificCode
985#endif /* __MigKernelSpecificCode */
986
987 OutUP->NDR = NDR_record;
988
989
990 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
991 __AfterRcvRpc(3207, "mach_port_get_refs")
992}
993
994#if ( __MigTypeCheck )
995#if __MIG_check__Request__mach_port_subsystem__
996#if !defined(__MIG_check__Request__mach_port_mod_refs_t__defined)
997#define __MIG_check__Request__mach_port_mod_refs_t__defined
998
999mig_internal kern_return_t __MIG_check__Request__mach_port_mod_refs_t(
1000 __attribute__((__unused__)) __RequestKData__mach_port_mod_refs_t *InKP,
1001 __attribute__((__unused__)) __RequestUData__mach_port_mod_refs_t *In0UP,
1002 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
1003{
1004
1005 typedef __Request__mach_port_mod_refs_t __Request;
1006 typedef __RequestUData__mach_port_mod_refs_t __RequestU __attribute__((unused));
1007#if __MigTypeCheck
1008 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
1009 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
1010 return MIG_BAD_ARGUMENTS;
1011#endif /* __MigTypeCheck */
1012
1013 return MACH_MSG_SUCCESS;
1014}
1015#endif /* !defined(__MIG_check__Request__mach_port_mod_refs_t__defined) */
1016#endif /* __MIG_check__Request__mach_port_subsystem__ */
1017#endif /* ( __MigTypeCheck ) */
1018
1019
1020/* Routine mach_port_mod_refs */
1021mig_internal novalue _Xmach_port_mod_refs
1022 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
1023 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
1024 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
1025{
1026
1027#ifdef __MigPackStructs
1028#pragma pack(push, 4)
1029#endif
1030 typedef struct {
1031 NDR_record_t NDR;
1032 mach_port_name_t name;
1033 mach_port_right_t right;
1034 mach_port_delta_t delta;
1035 mach_msg_trailer_t trailer;
1036 char padding[0]; /* Avoid generating empty UData structs */
1037 } RequestU __attribute__((unused));
1038#ifdef __MigPackStructs
1039#pragma pack(pop)
1040#endif
1041 typedef __RequestKData__mach_port_mod_refs_t RequestK;
1042 typedef __RequestUData__mach_port_mod_refs_t __RequestU;
1043 typedef __ReplyKData__mach_port_mod_refs_t ReplyK __attribute__((unused));
1044 typedef __ReplyUData__mach_port_mod_refs_t ReplyU __attribute__((unused));
1045 typedef __Reply__mach_port_mod_refs_t Reply __attribute__((unused));
1046 typedef __Request__mach_port_mod_refs_t __Request __attribute__((unused));
1047
1048 /*
1049 * typedef struct {
1050 * mach_msg_header_t Head;
1051 * NDR_record_t NDR;
1052 * kern_return_t RetCode;
1053 * } mig_reply_error_t;
1054 */
1055
1056 RequestK *InKP = (RequestK *) InHeadP;
1057 RequestU *In0UP = (RequestU *) InDataP;
1058 ReplyK *OutKP = (ReplyK *) OutHeadP;
1059 ReplyU *OutUP = (ReplyU *) OutDataP;
1060 (void)OutUP;
1061#ifdef __MIG_check__Request__mach_port_mod_refs_t__defined
1062 kern_return_t check_result;
1063#endif /* __MIG_check__Request__mach_port_mod_refs_t__defined */
1064
1065#if __MigKernelSpecificCode
1066#else
1067#endif /* __MigKernelSpecificCode */
1068 ipc_space_t task;
1069
1070 __DeclareRcvRpc(3208, "mach_port_mod_refs")
1071 __BeforeRcvRpc(3208, "mach_port_mod_refs")
1072
1073#if defined(__MIG_check__Request__mach_port_mod_refs_t__defined)
1074 check_result = __MIG_check__Request__mach_port_mod_refs_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
1075 if (check_result != MACH_MSG_SUCCESS)
1076 { MIG_RETURN_ERROR(OutKP, check_result); }
1077#endif /* defined(__MIG_check__Request__mach_port_mod_refs_t__defined) */
1078
1079 task = convert_port_to_space(port: InKP->Head.msgh_request_port);
1080
1081 OutUP->RetCode = mach_port_mod_refs(task, name: In0UP->name, right: In0UP->right, delta: In0UP->delta);
1082 space_deallocate(space: task);
1083#if __MigKernelSpecificCode
1084#endif /* __MigKernelSpecificCode */
1085
1086 OutUP->NDR = NDR_record;
1087
1088
1089 __AfterRcvRpc(3208, "mach_port_mod_refs")
1090}
1091
1092#if ( __MigTypeCheck )
1093#if __MIG_check__Request__mach_port_subsystem__
1094#if !defined(__MIG_check__Request__mach_port_peek_t__defined)
1095#define __MIG_check__Request__mach_port_peek_t__defined
1096
1097mig_internal kern_return_t __MIG_check__Request__mach_port_peek_t(
1098 __attribute__((__unused__)) __RequestKData__mach_port_peek_t *InKP,
1099 __attribute__((__unused__)) __RequestUData__mach_port_peek_t *In0UP,
1100 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
1101{
1102
1103 typedef __Request__mach_port_peek_t __Request;
1104 typedef __RequestUData__mach_port_peek_t __RequestU __attribute__((unused));
1105#if __MigTypeCheck
1106 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
1107 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
1108 return MIG_BAD_ARGUMENTS;
1109#endif /* __MigTypeCheck */
1110
1111 return MACH_MSG_SUCCESS;
1112}
1113#endif /* !defined(__MIG_check__Request__mach_port_peek_t__defined) */
1114#endif /* __MIG_check__Request__mach_port_subsystem__ */
1115#endif /* ( __MigTypeCheck ) */
1116
1117
1118/* Routine mach_port_peek */
1119mig_internal novalue _Xmach_port_peek
1120 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
1121 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
1122 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
1123{
1124
1125#ifdef __MigPackStructs
1126#pragma pack(push, 4)
1127#endif
1128 typedef struct {
1129 NDR_record_t NDR;
1130 mach_port_name_t name;
1131 mach_msg_trailer_type_t trailer_type;
1132 mach_port_seqno_t request_seqnop;
1133 mach_msg_type_number_t trailer_infopCnt;
1134 mach_msg_trailer_t trailer;
1135 char padding[0]; /* Avoid generating empty UData structs */
1136 } RequestU __attribute__((unused));
1137#ifdef __MigPackStructs
1138#pragma pack(pop)
1139#endif
1140 typedef __RequestKData__mach_port_peek_t RequestK;
1141 typedef __RequestUData__mach_port_peek_t __RequestU;
1142 typedef __ReplyKData__mach_port_peek_t ReplyK __attribute__((unused));
1143 typedef __ReplyUData__mach_port_peek_t ReplyU __attribute__((unused));
1144 typedef __Reply__mach_port_peek_t Reply __attribute__((unused));
1145 typedef __Request__mach_port_peek_t __Request __attribute__((unused));
1146
1147 /*
1148 * typedef struct {
1149 * mach_msg_header_t Head;
1150 * NDR_record_t NDR;
1151 * kern_return_t RetCode;
1152 * } mig_reply_error_t;
1153 */
1154
1155 RequestK *InKP = (RequestK *) InHeadP;
1156 RequestU *In0UP = (RequestU *) InDataP;
1157 ReplyK *OutKP = (ReplyK *) OutHeadP;
1158 ReplyU *OutUP = (ReplyU *) OutDataP;
1159 (void)OutUP;
1160#ifdef __MIG_check__Request__mach_port_peek_t__defined
1161 kern_return_t check_result;
1162#endif /* __MIG_check__Request__mach_port_peek_t__defined */
1163
1164#if __MigKernelSpecificCode
1165#else
1166#endif /* __MigKernelSpecificCode */
1167 ipc_space_t task;
1168
1169 __DeclareRcvRpc(3209, "mach_port_peek")
1170 __BeforeRcvRpc(3209, "mach_port_peek")
1171
1172#if defined(__MIG_check__Request__mach_port_peek_t__defined)
1173 check_result = __MIG_check__Request__mach_port_peek_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
1174 if (check_result != MACH_MSG_SUCCESS)
1175 { MIG_RETURN_ERROR(OutKP, check_result); }
1176#endif /* defined(__MIG_check__Request__mach_port_peek_t__defined) */
1177
1178 task = convert_port_to_space(port: InKP->Head.msgh_request_port);
1179
1180 OutUP->trailer_infopCnt = 68;
1181 if (In0UP->trailer_infopCnt < OutUP->trailer_infopCnt)
1182 OutUP->trailer_infopCnt = In0UP->trailer_infopCnt;
1183
1184 OutUP->RetCode = mach_port_peek(task, name: In0UP->name, trailer_type: In0UP->trailer_type, request_seqnop: &In0UP->request_seqnop, msg_sizep: &OutUP->msg_sizep, msg_idp: &OutUP->msg_idp, trailer_infop: OutUP->trailer_infop, trailer_infopCnt: &OutUP->trailer_infopCnt);
1185 space_deallocate(space: task);
1186 if (OutUP->RetCode != KERN_SUCCESS) {
1187 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
1188 }
1189#if __MigKernelSpecificCode
1190#endif /* __MigKernelSpecificCode */
1191
1192 OutUP->NDR = NDR_record;
1193
1194
1195 OutUP->request_seqnop = In0UP->request_seqnop;
1196 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply) - 68) + (_WALIGN_((OutUP->trailer_infopCnt + 3) & ~3));
1197
1198 __AfterRcvRpc(3209, "mach_port_peek")
1199}
1200
1201#if ( __MigTypeCheck )
1202#if __MIG_check__Request__mach_port_subsystem__
1203#if !defined(__MIG_check__Request__mach_port_set_mscount_t__defined)
1204#define __MIG_check__Request__mach_port_set_mscount_t__defined
1205
1206mig_internal kern_return_t __MIG_check__Request__mach_port_set_mscount_t(
1207 __attribute__((__unused__)) __RequestKData__mach_port_set_mscount_t *InKP,
1208 __attribute__((__unused__)) __RequestUData__mach_port_set_mscount_t *In0UP,
1209 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
1210{
1211
1212 typedef __Request__mach_port_set_mscount_t __Request;
1213 typedef __RequestUData__mach_port_set_mscount_t __RequestU __attribute__((unused));
1214#if __MigTypeCheck
1215 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
1216 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
1217 return MIG_BAD_ARGUMENTS;
1218#endif /* __MigTypeCheck */
1219
1220 return MACH_MSG_SUCCESS;
1221}
1222#endif /* !defined(__MIG_check__Request__mach_port_set_mscount_t__defined) */
1223#endif /* __MIG_check__Request__mach_port_subsystem__ */
1224#endif /* ( __MigTypeCheck ) */
1225
1226
1227/* Routine mach_port_set_mscount */
1228mig_internal novalue _Xmach_port_set_mscount
1229 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
1230 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
1231 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
1232{
1233
1234#ifdef __MigPackStructs
1235#pragma pack(push, 4)
1236#endif
1237 typedef struct {
1238 NDR_record_t NDR;
1239 mach_port_name_t name;
1240 mach_port_mscount_t mscount;
1241 mach_msg_trailer_t trailer;
1242 char padding[0]; /* Avoid generating empty UData structs */
1243 } RequestU __attribute__((unused));
1244#ifdef __MigPackStructs
1245#pragma pack(pop)
1246#endif
1247 typedef __RequestKData__mach_port_set_mscount_t RequestK;
1248 typedef __RequestUData__mach_port_set_mscount_t __RequestU;
1249 typedef __ReplyKData__mach_port_set_mscount_t ReplyK __attribute__((unused));
1250 typedef __ReplyUData__mach_port_set_mscount_t ReplyU __attribute__((unused));
1251 typedef __Reply__mach_port_set_mscount_t Reply __attribute__((unused));
1252 typedef __Request__mach_port_set_mscount_t __Request __attribute__((unused));
1253
1254 /*
1255 * typedef struct {
1256 * mach_msg_header_t Head;
1257 * NDR_record_t NDR;
1258 * kern_return_t RetCode;
1259 * } mig_reply_error_t;
1260 */
1261
1262 RequestK *InKP = (RequestK *) InHeadP;
1263 RequestU *In0UP = (RequestU *) InDataP;
1264 ReplyK *OutKP = (ReplyK *) OutHeadP;
1265 ReplyU *OutUP = (ReplyU *) OutDataP;
1266 (void)OutUP;
1267#ifdef __MIG_check__Request__mach_port_set_mscount_t__defined
1268 kern_return_t check_result;
1269#endif /* __MIG_check__Request__mach_port_set_mscount_t__defined */
1270
1271#if __MigKernelSpecificCode
1272#else
1273#endif /* __MigKernelSpecificCode */
1274 ipc_space_t task;
1275
1276 __DeclareRcvRpc(3210, "mach_port_set_mscount")
1277 __BeforeRcvRpc(3210, "mach_port_set_mscount")
1278
1279#if defined(__MIG_check__Request__mach_port_set_mscount_t__defined)
1280 check_result = __MIG_check__Request__mach_port_set_mscount_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
1281 if (check_result != MACH_MSG_SUCCESS)
1282 { MIG_RETURN_ERROR(OutKP, check_result); }
1283#endif /* defined(__MIG_check__Request__mach_port_set_mscount_t__defined) */
1284
1285 task = convert_port_to_space(port: InKP->Head.msgh_request_port);
1286
1287 OutUP->RetCode = mach_port_set_mscount(task, name: In0UP->name, mscount: In0UP->mscount);
1288 space_deallocate(space: task);
1289#if __MigKernelSpecificCode
1290#endif /* __MigKernelSpecificCode */
1291
1292 OutUP->NDR = NDR_record;
1293
1294
1295 __AfterRcvRpc(3210, "mach_port_set_mscount")
1296}
1297
1298#if ( __MigTypeCheck )
1299#if __MIG_check__Request__mach_port_subsystem__
1300#if !defined(__MIG_check__Request__mach_port_get_set_status_from_user_t__defined)
1301#define __MIG_check__Request__mach_port_get_set_status_from_user_t__defined
1302
1303mig_internal kern_return_t __MIG_check__Request__mach_port_get_set_status_from_user_t(
1304 __attribute__((__unused__)) __RequestKData__mach_port_get_set_status_from_user_t *InKP,
1305 __attribute__((__unused__)) __RequestUData__mach_port_get_set_status_from_user_t *In0UP,
1306 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
1307{
1308
1309 typedef __Request__mach_port_get_set_status_from_user_t __Request;
1310 typedef __RequestUData__mach_port_get_set_status_from_user_t __RequestU __attribute__((unused));
1311#if __MigTypeCheck
1312 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
1313 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
1314 return MIG_BAD_ARGUMENTS;
1315#endif /* __MigTypeCheck */
1316
1317 return MACH_MSG_SUCCESS;
1318}
1319#endif /* !defined(__MIG_check__Request__mach_port_get_set_status_from_user_t__defined) */
1320#endif /* __MIG_check__Request__mach_port_subsystem__ */
1321#endif /* ( __MigTypeCheck ) */
1322
1323
1324/* Routine mach_port_get_set_status_from_user */
1325mig_internal novalue _Xmach_port_get_set_status_from_user
1326 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
1327 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
1328 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
1329{
1330
1331#ifdef __MigPackStructs
1332#pragma pack(push, 4)
1333#endif
1334 typedef struct {
1335 NDR_record_t NDR;
1336 mach_port_name_t name;
1337 mach_msg_trailer_t trailer;
1338 char padding[0]; /* Avoid generating empty UData structs */
1339 } RequestU __attribute__((unused));
1340#ifdef __MigPackStructs
1341#pragma pack(pop)
1342#endif
1343 typedef __RequestKData__mach_port_get_set_status_from_user_t RequestK;
1344 typedef __RequestUData__mach_port_get_set_status_from_user_t __RequestU;
1345 typedef __ReplyKData__mach_port_get_set_status_from_user_t ReplyK __attribute__((unused));
1346 typedef __ReplyUData__mach_port_get_set_status_from_user_t ReplyU __attribute__((unused));
1347 typedef __Reply__mach_port_get_set_status_from_user_t Reply __attribute__((unused));
1348 typedef __Request__mach_port_get_set_status_from_user_t __Request __attribute__((unused));
1349
1350 /*
1351 * typedef struct {
1352 * mach_msg_header_t Head;
1353 * NDR_record_t NDR;
1354 * kern_return_t RetCode;
1355 * } mig_reply_error_t;
1356 */
1357
1358 RequestK *InKP = (RequestK *) InHeadP;
1359 RequestU *In0UP = (RequestU *) InDataP;
1360 ReplyK *OutKP = (ReplyK *) OutHeadP;
1361 ReplyU *OutUP = (ReplyU *) OutDataP;
1362 (void)OutUP;
1363#ifdef __MIG_check__Request__mach_port_get_set_status_from_user_t__defined
1364 kern_return_t check_result;
1365#endif /* __MIG_check__Request__mach_port_get_set_status_from_user_t__defined */
1366
1367#if __MigKernelSpecificCode
1368#if UseStaticTemplates
1369 const static mach_msg_ool_descriptor_t membersTemplate = {
1370 /* addr = */ (void *)0,
1371 /* size = */ 0,
1372 /* deal = */ FALSE,
1373 /* copy = */ MACH_MSG_VIRTUAL_COPY,
1374 /* pad2 = */ 0,
1375 /* type = */ MACH_MSG_OOL_DESCRIPTOR,
1376 };
1377#endif /* UseStaticTemplates */
1378
1379#else
1380#if UseStaticTemplates
1381 const static mach_msg_ool_descriptor_t membersTemplate = {
1382 /* addr = */ (void *)0,
1383 /* size = */ 0,
1384 /* deal = */ FALSE,
1385 /* copy = */ MACH_MSG_VIRTUAL_COPY,
1386 /* pad2 = */ 0,
1387 /* type = */ MACH_MSG_OOL_DESCRIPTOR,
1388 };
1389#endif /* UseStaticTemplates */
1390
1391#endif /* __MigKernelSpecificCode */
1392 kern_return_t RetCode;
1393 __DeclareRcvRpc(3211, "mach_port_get_set_status_from_user")
1394 __BeforeRcvRpc(3211, "mach_port_get_set_status_from_user")
1395
1396#if defined(__MIG_check__Request__mach_port_get_set_status_from_user_t__defined)
1397 check_result = __MIG_check__Request__mach_port_get_set_status_from_user_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
1398 if (check_result != MACH_MSG_SUCCESS)
1399 { MIG_RETURN_ERROR(OutKP, check_result); }
1400#endif /* defined(__MIG_check__Request__mach_port_get_set_status_from_user_t__defined) */
1401
1402#if UseStaticTemplates
1403 OutKP->members = membersTemplate;
1404#else /* UseStaticTemplates */
1405 OutKP->members.deallocate = FALSE;
1406 OutKP->members.copy = MACH_MSG_VIRTUAL_COPY;
1407 OutKP->members.pad1 = 0;
1408 OutKP->members.type = MACH_MSG_OOL_DESCRIPTOR;
1409#if defined(KERNEL) && !defined(__LP64__)
1410 OutKP->members.pad_end = 0;
1411#endif
1412#endif /* UseStaticTemplates */
1413
1414
1415 OutUP->membersCnt = 0;
1416
1417 RetCode = mach_port_get_set_status_from_user(port: InKP->Head.msgh_request_port, name: In0UP->name, members: (mach_port_name_array_t *)&(OutKP->members.address), membersCnt: &OutUP->membersCnt);
1418 if (RetCode != KERN_SUCCESS) {
1419 MIG_RETURN_ERROR(OutKP, RetCode);
1420 }
1421#if __MigKernelSpecificCode
1422#endif /* __MigKernelSpecificCode */
1423 OutKP->members.size = OutUP->membersCnt * 4;
1424
1425
1426 OutUP->NDR = NDR_record;
1427
1428
1429 OutKP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
1430 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
1431 OutKP->msgh_body.msgh_descriptor_count = 1;
1432 __AfterRcvRpc(3211, "mach_port_get_set_status_from_user")
1433}
1434
1435#if ( __MigTypeCheck )
1436#if __MIG_check__Request__mach_port_subsystem__
1437#if !defined(__MIG_check__Request__mach_port_move_member_t__defined)
1438#define __MIG_check__Request__mach_port_move_member_t__defined
1439
1440mig_internal kern_return_t __MIG_check__Request__mach_port_move_member_t(
1441 __attribute__((__unused__)) __RequestKData__mach_port_move_member_t *InKP,
1442 __attribute__((__unused__)) __RequestUData__mach_port_move_member_t *In0UP,
1443 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
1444{
1445
1446 typedef __Request__mach_port_move_member_t __Request;
1447 typedef __RequestUData__mach_port_move_member_t __RequestU __attribute__((unused));
1448#if __MigTypeCheck
1449 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
1450 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
1451 return MIG_BAD_ARGUMENTS;
1452#endif /* __MigTypeCheck */
1453
1454 return MACH_MSG_SUCCESS;
1455}
1456#endif /* !defined(__MIG_check__Request__mach_port_move_member_t__defined) */
1457#endif /* __MIG_check__Request__mach_port_subsystem__ */
1458#endif /* ( __MigTypeCheck ) */
1459
1460
1461/* Routine mach_port_move_member */
1462mig_internal novalue _Xmach_port_move_member
1463 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
1464 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
1465 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
1466{
1467
1468#ifdef __MigPackStructs
1469#pragma pack(push, 4)
1470#endif
1471 typedef struct {
1472 NDR_record_t NDR;
1473 mach_port_name_t member;
1474 mach_port_name_t after;
1475 mach_msg_trailer_t trailer;
1476 char padding[0]; /* Avoid generating empty UData structs */
1477 } RequestU __attribute__((unused));
1478#ifdef __MigPackStructs
1479#pragma pack(pop)
1480#endif
1481 typedef __RequestKData__mach_port_move_member_t RequestK;
1482 typedef __RequestUData__mach_port_move_member_t __RequestU;
1483 typedef __ReplyKData__mach_port_move_member_t ReplyK __attribute__((unused));
1484 typedef __ReplyUData__mach_port_move_member_t ReplyU __attribute__((unused));
1485 typedef __Reply__mach_port_move_member_t Reply __attribute__((unused));
1486 typedef __Request__mach_port_move_member_t __Request __attribute__((unused));
1487
1488 /*
1489 * typedef struct {
1490 * mach_msg_header_t Head;
1491 * NDR_record_t NDR;
1492 * kern_return_t RetCode;
1493 * } mig_reply_error_t;
1494 */
1495
1496 RequestK *InKP = (RequestK *) InHeadP;
1497 RequestU *In0UP = (RequestU *) InDataP;
1498 ReplyK *OutKP = (ReplyK *) OutHeadP;
1499 ReplyU *OutUP = (ReplyU *) OutDataP;
1500 (void)OutUP;
1501#ifdef __MIG_check__Request__mach_port_move_member_t__defined
1502 kern_return_t check_result;
1503#endif /* __MIG_check__Request__mach_port_move_member_t__defined */
1504
1505#if __MigKernelSpecificCode
1506#else
1507#endif /* __MigKernelSpecificCode */
1508 ipc_space_t task;
1509
1510 __DeclareRcvRpc(3212, "mach_port_move_member")
1511 __BeforeRcvRpc(3212, "mach_port_move_member")
1512
1513#if defined(__MIG_check__Request__mach_port_move_member_t__defined)
1514 check_result = __MIG_check__Request__mach_port_move_member_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
1515 if (check_result != MACH_MSG_SUCCESS)
1516 { MIG_RETURN_ERROR(OutKP, check_result); }
1517#endif /* defined(__MIG_check__Request__mach_port_move_member_t__defined) */
1518
1519 task = convert_port_to_space(port: InKP->Head.msgh_request_port);
1520
1521 OutUP->RetCode = mach_port_move_member(task, member: In0UP->member, after: In0UP->after);
1522 space_deallocate(space: task);
1523#if __MigKernelSpecificCode
1524#endif /* __MigKernelSpecificCode */
1525
1526 OutUP->NDR = NDR_record;
1527
1528
1529 __AfterRcvRpc(3212, "mach_port_move_member")
1530}
1531
1532#if ( __MigTypeCheck )
1533#if __MIG_check__Request__mach_port_subsystem__
1534#if !defined(__MIG_check__Request__mach_port_request_notification_t__defined)
1535#define __MIG_check__Request__mach_port_request_notification_t__defined
1536
1537mig_internal kern_return_t __MIG_check__Request__mach_port_request_notification_t(
1538 __attribute__((__unused__)) __RequestKData__mach_port_request_notification_t *InKP,
1539 __attribute__((__unused__)) __RequestUData__mach_port_request_notification_t *In0UP,
1540 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
1541{
1542
1543 typedef __Request__mach_port_request_notification_t __Request;
1544 typedef __RequestUData__mach_port_request_notification_t __RequestU __attribute__((unused));
1545#if __MigTypeCheck
1546 if (!(InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
1547 (InKP->msgh_body.msgh_descriptor_count != 1) ||
1548 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
1549 return MIG_BAD_ARGUMENTS;
1550#endif /* __MigTypeCheck */
1551
1552#if __MigTypeCheck
1553 if (InKP->notify.type != MACH_MSG_PORT_DESCRIPTOR || (
1554 InKP->notify.disposition != MACH_MSG_TYPE_MOVE_SEND_ONCE &&
1555 InKP->notify.disposition != MACH_MSG_TYPE_MAKE_SEND_ONCE))
1556 return MIG_TYPE_ERROR;
1557#endif /* __MigTypeCheck */
1558
1559 return MACH_MSG_SUCCESS;
1560}
1561#endif /* !defined(__MIG_check__Request__mach_port_request_notification_t__defined) */
1562#endif /* __MIG_check__Request__mach_port_subsystem__ */
1563#endif /* ( __MigTypeCheck ) */
1564
1565
1566/* Routine mach_port_request_notification */
1567mig_internal novalue _Xmach_port_request_notification
1568 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
1569 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
1570 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
1571{
1572
1573#ifdef __MigPackStructs
1574#pragma pack(push, 4)
1575#endif
1576 typedef struct {
1577 NDR_record_t NDR;
1578 mach_port_name_t name;
1579 mach_msg_id_t msgid;
1580 mach_port_mscount_t sync;
1581 mach_msg_trailer_t trailer;
1582 char padding[0]; /* Avoid generating empty UData structs */
1583 } RequestU __attribute__((unused));
1584#ifdef __MigPackStructs
1585#pragma pack(pop)
1586#endif
1587 typedef __RequestKData__mach_port_request_notification_t RequestK;
1588 typedef __RequestUData__mach_port_request_notification_t __RequestU;
1589 typedef __ReplyKData__mach_port_request_notification_t ReplyK __attribute__((unused));
1590 typedef __ReplyUData__mach_port_request_notification_t ReplyU __attribute__((unused));
1591 typedef __Reply__mach_port_request_notification_t Reply __attribute__((unused));
1592 typedef __Request__mach_port_request_notification_t __Request __attribute__((unused));
1593
1594 /*
1595 * typedef struct {
1596 * mach_msg_header_t Head;
1597 * NDR_record_t NDR;
1598 * kern_return_t RetCode;
1599 * } mig_reply_error_t;
1600 */
1601
1602 RequestK *InKP = (RequestK *) InHeadP;
1603 RequestU *In0UP = (RequestU *) InDataP;
1604 ReplyK *OutKP = (ReplyK *) OutHeadP;
1605 ReplyU *OutUP = (ReplyU *) OutDataP;
1606 (void)OutUP;
1607#ifdef __MIG_check__Request__mach_port_request_notification_t__defined
1608 kern_return_t check_result;
1609#endif /* __MIG_check__Request__mach_port_request_notification_t__defined */
1610
1611#if __MigKernelSpecificCode
1612#if UseStaticTemplates
1613 const static mach_msg_port_descriptor_t previousTemplate = {
1614 /* name = */ MACH_PORT_NULL,
1615 /* pad1 = */ 0,
1616 /* pad2 = */ 0,
1617 /* disp = */ 18,
1618 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
1619 };
1620#endif /* UseStaticTemplates */
1621
1622#else
1623#if UseStaticTemplates
1624 const static mach_msg_port_descriptor_t previousTemplate = {
1625 /* name = */ MACH_PORT_NULL,
1626 /* pad1 = */ 0,
1627 /* pad2 = */ 0,
1628 /* disp = */ 18,
1629 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
1630 };
1631#endif /* UseStaticTemplates */
1632
1633#endif /* __MigKernelSpecificCode */
1634 kern_return_t RetCode;
1635 ipc_space_t task;
1636
1637 __DeclareRcvRpc(3213, "mach_port_request_notification")
1638 __BeforeRcvRpc(3213, "mach_port_request_notification")
1639
1640#if defined(__MIG_check__Request__mach_port_request_notification_t__defined)
1641 check_result = __MIG_check__Request__mach_port_request_notification_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
1642 if (check_result != MACH_MSG_SUCCESS)
1643 { MIG_RETURN_ERROR(OutKP, check_result); }
1644#endif /* defined(__MIG_check__Request__mach_port_request_notification_t__defined) */
1645
1646#if UseStaticTemplates
1647 OutKP->previous = previousTemplate;
1648#else /* UseStaticTemplates */
1649#if __MigKernelSpecificCode
1650 OutKP->previous.disposition = 18;
1651#else
1652 OutKP->previous.disposition = 18;
1653#endif /* __MigKernelSpecificCode */
1654#if !(defined(KERNEL) && defined(__LP64__))
1655 OutKP->previous.pad1 = 0;
1656#endif
1657 OutKP->previous.pad2 = 0;
1658 OutKP->previous.type = MACH_MSG_PORT_DESCRIPTOR;
1659#if defined(KERNEL)
1660 OutKP->previous.pad_end = 0;
1661#endif
1662#endif /* UseStaticTemplates */
1663
1664
1665 task = convert_port_to_space(port: InKP->Head.msgh_request_port);
1666
1667 RetCode = mach_port_request_notification(task, name: In0UP->name, msgid: In0UP->msgid, sync: In0UP->sync, notify: InKP->notify.name, previous: &OutKP->previous.name);
1668 space_deallocate(space: task);
1669 if (RetCode != KERN_SUCCESS) {
1670 MIG_RETURN_ERROR(OutKP, RetCode);
1671 }
1672#if __MigKernelSpecificCode
1673#endif /* __MigKernelSpecificCode */
1674
1675 OutKP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
1676 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
1677 OutKP->msgh_body.msgh_descriptor_count = 1;
1678 __AfterRcvRpc(3213, "mach_port_request_notification")
1679}
1680
1681#if ( __MigTypeCheck )
1682#if __MIG_check__Request__mach_port_subsystem__
1683#if !defined(__MIG_check__Request__mach_port_insert_right_t__defined)
1684#define __MIG_check__Request__mach_port_insert_right_t__defined
1685
1686mig_internal kern_return_t __MIG_check__Request__mach_port_insert_right_t(
1687 __attribute__((__unused__)) __RequestKData__mach_port_insert_right_t *InKP,
1688 __attribute__((__unused__)) __RequestUData__mach_port_insert_right_t *In0UP,
1689 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
1690{
1691
1692 typedef __Request__mach_port_insert_right_t __Request;
1693 typedef __RequestUData__mach_port_insert_right_t __RequestU __attribute__((unused));
1694#if __MigTypeCheck
1695 if (!(InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
1696 (InKP->msgh_body.msgh_descriptor_count != 1) ||
1697 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
1698 return MIG_BAD_ARGUMENTS;
1699#endif /* __MigTypeCheck */
1700
1701#if __MigTypeCheck
1702 if (InKP->poly.type != MACH_MSG_PORT_DESCRIPTOR)
1703 return MIG_TYPE_ERROR;
1704#endif /* __MigTypeCheck */
1705
1706 return MACH_MSG_SUCCESS;
1707}
1708#endif /* !defined(__MIG_check__Request__mach_port_insert_right_t__defined) */
1709#endif /* __MIG_check__Request__mach_port_subsystem__ */
1710#endif /* ( __MigTypeCheck ) */
1711
1712
1713/* Routine mach_port_insert_right */
1714mig_internal novalue _Xmach_port_insert_right
1715 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
1716 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
1717 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
1718{
1719
1720#ifdef __MigPackStructs
1721#pragma pack(push, 4)
1722#endif
1723 typedef struct {
1724 NDR_record_t NDR;
1725 mach_port_name_t name;
1726 mach_msg_trailer_t trailer;
1727 char padding[0]; /* Avoid generating empty UData structs */
1728 } RequestU __attribute__((unused));
1729#ifdef __MigPackStructs
1730#pragma pack(pop)
1731#endif
1732 typedef __RequestKData__mach_port_insert_right_t RequestK;
1733 typedef __RequestUData__mach_port_insert_right_t __RequestU;
1734 typedef __ReplyKData__mach_port_insert_right_t ReplyK __attribute__((unused));
1735 typedef __ReplyUData__mach_port_insert_right_t ReplyU __attribute__((unused));
1736 typedef __Reply__mach_port_insert_right_t Reply __attribute__((unused));
1737 typedef __Request__mach_port_insert_right_t __Request __attribute__((unused));
1738
1739 /*
1740 * typedef struct {
1741 * mach_msg_header_t Head;
1742 * NDR_record_t NDR;
1743 * kern_return_t RetCode;
1744 * } mig_reply_error_t;
1745 */
1746
1747 RequestK *InKP = (RequestK *) InHeadP;
1748 RequestU *In0UP = (RequestU *) InDataP;
1749 ReplyK *OutKP = (ReplyK *) OutHeadP;
1750 ReplyU *OutUP = (ReplyU *) OutDataP;
1751 (void)OutUP;
1752#ifdef __MIG_check__Request__mach_port_insert_right_t__defined
1753 kern_return_t check_result;
1754#endif /* __MIG_check__Request__mach_port_insert_right_t__defined */
1755
1756#if __MigKernelSpecificCode
1757#else
1758#endif /* __MigKernelSpecificCode */
1759 ipc_space_t task;
1760
1761 __DeclareRcvRpc(3214, "mach_port_insert_right")
1762 __BeforeRcvRpc(3214, "mach_port_insert_right")
1763
1764#if defined(__MIG_check__Request__mach_port_insert_right_t__defined)
1765 check_result = __MIG_check__Request__mach_port_insert_right_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
1766 if (check_result != MACH_MSG_SUCCESS)
1767 { MIG_RETURN_ERROR(OutKP, check_result); }
1768#endif /* defined(__MIG_check__Request__mach_port_insert_right_t__defined) */
1769
1770 task = convert_port_to_space(port: InKP->Head.msgh_request_port);
1771
1772 OutUP->RetCode = mach_port_insert_right(task, name: In0UP->name, poly: InKP->poly.name, polyPoly: InKP->poly.disposition);
1773 space_deallocate(space: task);
1774#if __MigKernelSpecificCode
1775#endif /* __MigKernelSpecificCode */
1776
1777 OutUP->NDR = NDR_record;
1778
1779
1780 __AfterRcvRpc(3214, "mach_port_insert_right")
1781}
1782
1783#if ( __MigTypeCheck )
1784#if __MIG_check__Request__mach_port_subsystem__
1785#if !defined(__MIG_check__Request__mach_port_extract_right_t__defined)
1786#define __MIG_check__Request__mach_port_extract_right_t__defined
1787
1788mig_internal kern_return_t __MIG_check__Request__mach_port_extract_right_t(
1789 __attribute__((__unused__)) __RequestKData__mach_port_extract_right_t *InKP,
1790 __attribute__((__unused__)) __RequestUData__mach_port_extract_right_t *In0UP,
1791 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
1792{
1793
1794 typedef __Request__mach_port_extract_right_t __Request;
1795 typedef __RequestUData__mach_port_extract_right_t __RequestU __attribute__((unused));
1796#if __MigTypeCheck
1797 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
1798 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
1799 return MIG_BAD_ARGUMENTS;
1800#endif /* __MigTypeCheck */
1801
1802 return MACH_MSG_SUCCESS;
1803}
1804#endif /* !defined(__MIG_check__Request__mach_port_extract_right_t__defined) */
1805#endif /* __MIG_check__Request__mach_port_subsystem__ */
1806#endif /* ( __MigTypeCheck ) */
1807
1808
1809/* Routine mach_port_extract_right */
1810mig_internal novalue _Xmach_port_extract_right
1811 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
1812 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
1813 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
1814{
1815
1816#ifdef __MigPackStructs
1817#pragma pack(push, 4)
1818#endif
1819 typedef struct {
1820 NDR_record_t NDR;
1821 mach_port_name_t name;
1822 mach_msg_type_name_t msgt_name;
1823 mach_msg_trailer_t trailer;
1824 char padding[0]; /* Avoid generating empty UData structs */
1825 } RequestU __attribute__((unused));
1826#ifdef __MigPackStructs
1827#pragma pack(pop)
1828#endif
1829 typedef __RequestKData__mach_port_extract_right_t RequestK;
1830 typedef __RequestUData__mach_port_extract_right_t __RequestU;
1831 typedef __ReplyKData__mach_port_extract_right_t ReplyK __attribute__((unused));
1832 typedef __ReplyUData__mach_port_extract_right_t ReplyU __attribute__((unused));
1833 typedef __Reply__mach_port_extract_right_t Reply __attribute__((unused));
1834 typedef __Request__mach_port_extract_right_t __Request __attribute__((unused));
1835
1836 /*
1837 * typedef struct {
1838 * mach_msg_header_t Head;
1839 * NDR_record_t NDR;
1840 * kern_return_t RetCode;
1841 * } mig_reply_error_t;
1842 */
1843
1844 RequestK *InKP = (RequestK *) InHeadP;
1845 RequestU *In0UP = (RequestU *) InDataP;
1846 ReplyK *OutKP = (ReplyK *) OutHeadP;
1847 ReplyU *OutUP = (ReplyU *) OutDataP;
1848 (void)OutUP;
1849#ifdef __MIG_check__Request__mach_port_extract_right_t__defined
1850 kern_return_t check_result;
1851#endif /* __MIG_check__Request__mach_port_extract_right_t__defined */
1852
1853#if __MigKernelSpecificCode
1854#if UseStaticTemplates
1855 const static mach_msg_port_descriptor_t polyTemplate = {
1856 /* name = */ MACH_PORT_NULL,
1857 /* pad1 = */ 0,
1858 /* pad2 = */ 0,
1859 /* disp = */ ((mach_msg_type_name_t) -1),
1860 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
1861 };
1862#endif /* UseStaticTemplates */
1863
1864#else
1865#if UseStaticTemplates
1866 const static mach_msg_port_descriptor_t polyTemplate = {
1867 /* name = */ MACH_PORT_NULL,
1868 /* pad1 = */ 0,
1869 /* pad2 = */ 0,
1870 /* disp = */ ((mach_msg_type_name_t) -1),
1871 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
1872 };
1873#endif /* UseStaticTemplates */
1874
1875#endif /* __MigKernelSpecificCode */
1876 kern_return_t RetCode;
1877 ipc_space_t task;
1878 mach_msg_type_name_t polyPoly;
1879
1880 __DeclareRcvRpc(3215, "mach_port_extract_right")
1881 __BeforeRcvRpc(3215, "mach_port_extract_right")
1882
1883#if defined(__MIG_check__Request__mach_port_extract_right_t__defined)
1884 check_result = __MIG_check__Request__mach_port_extract_right_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
1885 if (check_result != MACH_MSG_SUCCESS)
1886 { MIG_RETURN_ERROR(OutKP, check_result); }
1887#endif /* defined(__MIG_check__Request__mach_port_extract_right_t__defined) */
1888
1889#if UseStaticTemplates
1890 OutKP->poly = polyTemplate;
1891#else /* UseStaticTemplates */
1892#if !(defined(KERNEL) && defined(__LP64__))
1893 OutKP->poly.pad1 = 0;
1894#endif
1895 OutKP->poly.pad2 = 0;
1896 OutKP->poly.type = MACH_MSG_PORT_DESCRIPTOR;
1897#if defined(KERNEL)
1898 OutKP->poly.pad_end = 0;
1899#endif
1900#endif /* UseStaticTemplates */
1901
1902
1903 task = convert_port_to_space(port: InKP->Head.msgh_request_port);
1904
1905 RetCode = mach_port_extract_right(task, name: In0UP->name, msgt_name: In0UP->msgt_name, poly: &OutKP->poly.name, polyPoly: &polyPoly);
1906 space_deallocate(space: task);
1907 if (RetCode != KERN_SUCCESS) {
1908 MIG_RETURN_ERROR(OutKP, RetCode);
1909 }
1910#if __MigKernelSpecificCode
1911#endif /* __MigKernelSpecificCode */
1912 OutKP->poly.disposition = polyPoly;
1913
1914#if __MigKernelSpecificCode
1915 if (polyPoly == MACH_MSG_TYPE_PORT_RECEIVE)
1916 if (IP_VALID((ipc_port_t) InKP->Head.msgh_reply_port) &&
1917 IP_VALID((ipc_port_t) OutKP->poly.name) &&
1918 ipc_port_check_circularity(port: (ipc_port_t) OutKP->poly.name, dest: (ipc_port_t) InKP->Head.msgh_reply_port))
1919 OutKP->Head.msgh_bits |= MACH_MSGH_BITS_CIRCULAR;
1920#endif /* __MigKernelSpecificCode */
1921
1922 OutKP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
1923 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
1924 OutKP->msgh_body.msgh_descriptor_count = 1;
1925 __AfterRcvRpc(3215, "mach_port_extract_right")
1926}
1927
1928#if ( __MigTypeCheck )
1929#if __MIG_check__Request__mach_port_subsystem__
1930#if !defined(__MIG_check__Request__mach_port_set_seqno_t__defined)
1931#define __MIG_check__Request__mach_port_set_seqno_t__defined
1932
1933mig_internal kern_return_t __MIG_check__Request__mach_port_set_seqno_t(
1934 __attribute__((__unused__)) __RequestKData__mach_port_set_seqno_t *InKP,
1935 __attribute__((__unused__)) __RequestUData__mach_port_set_seqno_t *In0UP,
1936 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
1937{
1938
1939 typedef __Request__mach_port_set_seqno_t __Request;
1940 typedef __RequestUData__mach_port_set_seqno_t __RequestU __attribute__((unused));
1941#if __MigTypeCheck
1942 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
1943 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
1944 return MIG_BAD_ARGUMENTS;
1945#endif /* __MigTypeCheck */
1946
1947 return MACH_MSG_SUCCESS;
1948}
1949#endif /* !defined(__MIG_check__Request__mach_port_set_seqno_t__defined) */
1950#endif /* __MIG_check__Request__mach_port_subsystem__ */
1951#endif /* ( __MigTypeCheck ) */
1952
1953
1954/* Routine mach_port_set_seqno */
1955mig_internal novalue _Xmach_port_set_seqno
1956 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
1957 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
1958 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
1959{
1960
1961#ifdef __MigPackStructs
1962#pragma pack(push, 4)
1963#endif
1964 typedef struct {
1965 NDR_record_t NDR;
1966 mach_port_name_t name;
1967 mach_port_seqno_t seqno;
1968 mach_msg_trailer_t trailer;
1969 char padding[0]; /* Avoid generating empty UData structs */
1970 } RequestU __attribute__((unused));
1971#ifdef __MigPackStructs
1972#pragma pack(pop)
1973#endif
1974 typedef __RequestKData__mach_port_set_seqno_t RequestK;
1975 typedef __RequestUData__mach_port_set_seqno_t __RequestU;
1976 typedef __ReplyKData__mach_port_set_seqno_t ReplyK __attribute__((unused));
1977 typedef __ReplyUData__mach_port_set_seqno_t ReplyU __attribute__((unused));
1978 typedef __Reply__mach_port_set_seqno_t Reply __attribute__((unused));
1979 typedef __Request__mach_port_set_seqno_t __Request __attribute__((unused));
1980
1981 /*
1982 * typedef struct {
1983 * mach_msg_header_t Head;
1984 * NDR_record_t NDR;
1985 * kern_return_t RetCode;
1986 * } mig_reply_error_t;
1987 */
1988
1989 RequestK *InKP = (RequestK *) InHeadP;
1990 RequestU *In0UP = (RequestU *) InDataP;
1991 ReplyK *OutKP = (ReplyK *) OutHeadP;
1992 ReplyU *OutUP = (ReplyU *) OutDataP;
1993 (void)OutUP;
1994#ifdef __MIG_check__Request__mach_port_set_seqno_t__defined
1995 kern_return_t check_result;
1996#endif /* __MIG_check__Request__mach_port_set_seqno_t__defined */
1997
1998#if __MigKernelSpecificCode
1999#else
2000#endif /* __MigKernelSpecificCode */
2001 ipc_space_t task;
2002
2003 __DeclareRcvRpc(3216, "mach_port_set_seqno")
2004 __BeforeRcvRpc(3216, "mach_port_set_seqno")
2005
2006#if defined(__MIG_check__Request__mach_port_set_seqno_t__defined)
2007 check_result = __MIG_check__Request__mach_port_set_seqno_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
2008 if (check_result != MACH_MSG_SUCCESS)
2009 { MIG_RETURN_ERROR(OutKP, check_result); }
2010#endif /* defined(__MIG_check__Request__mach_port_set_seqno_t__defined) */
2011
2012 task = convert_port_to_space(port: InKP->Head.msgh_request_port);
2013
2014 OutUP->RetCode = mach_port_set_seqno(task, name: In0UP->name, seqno: In0UP->seqno);
2015 space_deallocate(space: task);
2016#if __MigKernelSpecificCode
2017#endif /* __MigKernelSpecificCode */
2018
2019 OutUP->NDR = NDR_record;
2020
2021
2022 __AfterRcvRpc(3216, "mach_port_set_seqno")
2023}
2024
2025#if ( __MigTypeCheck )
2026#if __MIG_check__Request__mach_port_subsystem__
2027#if !defined(__MIG_check__Request__mach_port_get_attributes_from_user_t__defined)
2028#define __MIG_check__Request__mach_port_get_attributes_from_user_t__defined
2029
2030mig_internal kern_return_t __MIG_check__Request__mach_port_get_attributes_from_user_t(
2031 __attribute__((__unused__)) __RequestKData__mach_port_get_attributes_from_user_t *InKP,
2032 __attribute__((__unused__)) __RequestUData__mach_port_get_attributes_from_user_t *In0UP,
2033 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
2034{
2035
2036 typedef __Request__mach_port_get_attributes_from_user_t __Request;
2037 typedef __RequestUData__mach_port_get_attributes_from_user_t __RequestU __attribute__((unused));
2038#if __MigTypeCheck
2039 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
2040 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
2041 return MIG_BAD_ARGUMENTS;
2042#endif /* __MigTypeCheck */
2043
2044 return MACH_MSG_SUCCESS;
2045}
2046#endif /* !defined(__MIG_check__Request__mach_port_get_attributes_from_user_t__defined) */
2047#endif /* __MIG_check__Request__mach_port_subsystem__ */
2048#endif /* ( __MigTypeCheck ) */
2049
2050
2051/* Routine mach_port_get_attributes_from_user */
2052mig_internal novalue _Xmach_port_get_attributes_from_user
2053 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
2054 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
2055 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
2056{
2057
2058#ifdef __MigPackStructs
2059#pragma pack(push, 4)
2060#endif
2061 typedef struct {
2062 NDR_record_t NDR;
2063 mach_port_name_t name;
2064 mach_port_flavor_t flavor;
2065 mach_msg_type_number_t port_info_outCnt;
2066 mach_msg_trailer_t trailer;
2067 char padding[0]; /* Avoid generating empty UData structs */
2068 } RequestU __attribute__((unused));
2069#ifdef __MigPackStructs
2070#pragma pack(pop)
2071#endif
2072 typedef __RequestKData__mach_port_get_attributes_from_user_t RequestK;
2073 typedef __RequestUData__mach_port_get_attributes_from_user_t __RequestU;
2074 typedef __ReplyKData__mach_port_get_attributes_from_user_t ReplyK __attribute__((unused));
2075 typedef __ReplyUData__mach_port_get_attributes_from_user_t ReplyU __attribute__((unused));
2076 typedef __Reply__mach_port_get_attributes_from_user_t Reply __attribute__((unused));
2077 typedef __Request__mach_port_get_attributes_from_user_t __Request __attribute__((unused));
2078
2079 /*
2080 * typedef struct {
2081 * mach_msg_header_t Head;
2082 * NDR_record_t NDR;
2083 * kern_return_t RetCode;
2084 * } mig_reply_error_t;
2085 */
2086
2087 RequestK *InKP = (RequestK *) InHeadP;
2088 RequestU *In0UP = (RequestU *) InDataP;
2089 ReplyK *OutKP = (ReplyK *) OutHeadP;
2090 ReplyU *OutUP = (ReplyU *) OutDataP;
2091 (void)OutUP;
2092#ifdef __MIG_check__Request__mach_port_get_attributes_from_user_t__defined
2093 kern_return_t check_result;
2094#endif /* __MIG_check__Request__mach_port_get_attributes_from_user_t__defined */
2095
2096#if __MigKernelSpecificCode
2097#else
2098#endif /* __MigKernelSpecificCode */
2099 __DeclareRcvRpc(3217, "mach_port_get_attributes_from_user")
2100 __BeforeRcvRpc(3217, "mach_port_get_attributes_from_user")
2101
2102#if defined(__MIG_check__Request__mach_port_get_attributes_from_user_t__defined)
2103 check_result = __MIG_check__Request__mach_port_get_attributes_from_user_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
2104 if (check_result != MACH_MSG_SUCCESS)
2105 { MIG_RETURN_ERROR(OutKP, check_result); }
2106#endif /* defined(__MIG_check__Request__mach_port_get_attributes_from_user_t__defined) */
2107
2108 OutUP->port_info_outCnt = 17;
2109 if (In0UP->port_info_outCnt < OutUP->port_info_outCnt)
2110 OutUP->port_info_outCnt = In0UP->port_info_outCnt;
2111
2112 OutUP->RetCode = mach_port_get_attributes_from_user(port: InKP->Head.msgh_request_port, name: In0UP->name, flavor: In0UP->flavor, port_info_out: OutUP->port_info_out, port_info_outCnt: &OutUP->port_info_outCnt);
2113 if (OutUP->RetCode != KERN_SUCCESS) {
2114 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
2115 }
2116#if __MigKernelSpecificCode
2117#endif /* __MigKernelSpecificCode */
2118
2119 OutUP->NDR = NDR_record;
2120
2121 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply) - 68) + (((4 * OutUP->port_info_outCnt)));
2122
2123 __AfterRcvRpc(3217, "mach_port_get_attributes_from_user")
2124}
2125
2126#if ( __MigTypeCheck )
2127#if __MIG_check__Request__mach_port_subsystem__
2128#if !defined(__MIG_check__Request__mach_port_set_attributes_t__defined)
2129#define __MIG_check__Request__mach_port_set_attributes_t__defined
2130
2131mig_internal kern_return_t __MIG_check__Request__mach_port_set_attributes_t(
2132 __attribute__((__unused__)) __RequestKData__mach_port_set_attributes_t *InKP,
2133 __attribute__((__unused__)) __RequestUData__mach_port_set_attributes_t *In0UP,
2134 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
2135{
2136
2137 typedef __Request__mach_port_set_attributes_t __Request;
2138 typedef __RequestUData__mach_port_set_attributes_t __RequestU __attribute__((unused));
2139#if __MigTypeCheck
2140 unsigned int msgh_size;
2141#endif /* __MigTypeCheck */
2142
2143#if __MigTypeCheck
2144 msgh_size = InKP->Head.msgh_size;
2145 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
2146 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 68)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)))
2147 return MIG_BAD_ARGUMENTS;
2148#endif /* __MigTypeCheck */
2149
2150#if defined(__NDR_convert__int_rep__Request__mach_port_set_attributes_t__port_infoCnt__defined)
2151 if (In0UP->NDR.int_rep != NDR_record.int_rep)
2152 __NDR_convert__int_rep__Request__mach_port_set_attributes_t__port_infoCnt(&In0UP->port_infoCnt, In0UP->NDR.int_rep);
2153#endif /* __NDR_convert__int_rep__Request__mach_port_set_attributes_t__port_infoCnt__defined */
2154#if __MigTypeCheck
2155 if (In0UP->port_infoCnt > 17)
2156 return MIG_BAD_ARGUMENTS;
2157 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 68)) / 4 < In0UP->port_infoCnt) ||
2158 (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 68) + (4 * In0UP->port_infoCnt)))
2159 return MIG_BAD_ARGUMENTS;
2160#endif /* __MigTypeCheck */
2161
2162 return MACH_MSG_SUCCESS;
2163}
2164#endif /* !defined(__MIG_check__Request__mach_port_set_attributes_t__defined) */
2165#endif /* __MIG_check__Request__mach_port_subsystem__ */
2166#endif /* ( __MigTypeCheck ) */
2167
2168
2169/* Routine mach_port_set_attributes */
2170mig_internal novalue _Xmach_port_set_attributes
2171 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
2172 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
2173 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
2174{
2175
2176#ifdef __MigPackStructs
2177#pragma pack(push, 4)
2178#endif
2179 typedef struct {
2180 NDR_record_t NDR;
2181 mach_port_name_t name;
2182 mach_port_flavor_t flavor;
2183 mach_msg_type_number_t port_infoCnt;
2184 integer_t port_info[17];
2185 mach_msg_trailer_t trailer;
2186 char padding[0]; /* Avoid generating empty UData structs */
2187 } RequestU __attribute__((unused));
2188#ifdef __MigPackStructs
2189#pragma pack(pop)
2190#endif
2191 typedef __RequestKData__mach_port_set_attributes_t RequestK;
2192 typedef __RequestUData__mach_port_set_attributes_t __RequestU;
2193 typedef __ReplyKData__mach_port_set_attributes_t ReplyK __attribute__((unused));
2194 typedef __ReplyUData__mach_port_set_attributes_t ReplyU __attribute__((unused));
2195 typedef __Reply__mach_port_set_attributes_t Reply __attribute__((unused));
2196 typedef __Request__mach_port_set_attributes_t __Request __attribute__((unused));
2197
2198 /*
2199 * typedef struct {
2200 * mach_msg_header_t Head;
2201 * NDR_record_t NDR;
2202 * kern_return_t RetCode;
2203 * } mig_reply_error_t;
2204 */
2205
2206 RequestK *InKP = (RequestK *) InHeadP;
2207 RequestU *In0UP = (RequestU *) InDataP;
2208 ReplyK *OutKP = (ReplyK *) OutHeadP;
2209 ReplyU *OutUP = (ReplyU *) OutDataP;
2210 (void)OutUP;
2211#ifdef __MIG_check__Request__mach_port_set_attributes_t__defined
2212 kern_return_t check_result;
2213#endif /* __MIG_check__Request__mach_port_set_attributes_t__defined */
2214
2215#if __MigKernelSpecificCode
2216#else
2217#endif /* __MigKernelSpecificCode */
2218 ipc_space_t task;
2219
2220 __DeclareRcvRpc(3218, "mach_port_set_attributes")
2221 __BeforeRcvRpc(3218, "mach_port_set_attributes")
2222
2223#if defined(__MIG_check__Request__mach_port_set_attributes_t__defined)
2224 check_result = __MIG_check__Request__mach_port_set_attributes_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
2225 if (check_result != MACH_MSG_SUCCESS)
2226 { MIG_RETURN_ERROR(OutKP, check_result); }
2227#endif /* defined(__MIG_check__Request__mach_port_set_attributes_t__defined) */
2228
2229 task = convert_port_to_space(port: InKP->Head.msgh_request_port);
2230
2231 OutUP->RetCode = mach_port_set_attributes(task, name: In0UP->name, flavor: In0UP->flavor, port_info: In0UP->port_info, port_infoCnt: In0UP->port_infoCnt);
2232 space_deallocate(space: task);
2233#if __MigKernelSpecificCode
2234#endif /* __MigKernelSpecificCode */
2235
2236 OutUP->NDR = NDR_record;
2237
2238
2239 __AfterRcvRpc(3218, "mach_port_set_attributes")
2240}
2241
2242#if ( __MigTypeCheck )
2243#if __MIG_check__Request__mach_port_subsystem__
2244#if !defined(__MIG_check__Request__mach_port_allocate_qos_t__defined)
2245#define __MIG_check__Request__mach_port_allocate_qos_t__defined
2246
2247mig_internal kern_return_t __MIG_check__Request__mach_port_allocate_qos_t(
2248 __attribute__((__unused__)) __RequestKData__mach_port_allocate_qos_t *InKP,
2249 __attribute__((__unused__)) __RequestUData__mach_port_allocate_qos_t *In0UP,
2250 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
2251{
2252
2253 typedef __Request__mach_port_allocate_qos_t __Request;
2254 typedef __RequestUData__mach_port_allocate_qos_t __RequestU __attribute__((unused));
2255#if __MigTypeCheck
2256 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
2257 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
2258 return MIG_BAD_ARGUMENTS;
2259#endif /* __MigTypeCheck */
2260
2261 return MACH_MSG_SUCCESS;
2262}
2263#endif /* !defined(__MIG_check__Request__mach_port_allocate_qos_t__defined) */
2264#endif /* __MIG_check__Request__mach_port_subsystem__ */
2265#endif /* ( __MigTypeCheck ) */
2266
2267
2268/* Routine mach_port_allocate_qos */
2269mig_internal novalue _Xmach_port_allocate_qos
2270 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
2271 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
2272 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
2273{
2274
2275#ifdef __MigPackStructs
2276#pragma pack(push, 4)
2277#endif
2278 typedef struct {
2279 NDR_record_t NDR;
2280 mach_port_right_t right;
2281 mach_port_qos_t qos;
2282 mach_msg_trailer_t trailer;
2283 char padding[0]; /* Avoid generating empty UData structs */
2284 } RequestU __attribute__((unused));
2285#ifdef __MigPackStructs
2286#pragma pack(pop)
2287#endif
2288 typedef __RequestKData__mach_port_allocate_qos_t RequestK;
2289 typedef __RequestUData__mach_port_allocate_qos_t __RequestU;
2290 typedef __ReplyKData__mach_port_allocate_qos_t ReplyK __attribute__((unused));
2291 typedef __ReplyUData__mach_port_allocate_qos_t ReplyU __attribute__((unused));
2292 typedef __Reply__mach_port_allocate_qos_t Reply __attribute__((unused));
2293 typedef __Request__mach_port_allocate_qos_t __Request __attribute__((unused));
2294
2295 /*
2296 * typedef struct {
2297 * mach_msg_header_t Head;
2298 * NDR_record_t NDR;
2299 * kern_return_t RetCode;
2300 * } mig_reply_error_t;
2301 */
2302
2303 RequestK *InKP = (RequestK *) InHeadP;
2304 RequestU *In0UP = (RequestU *) InDataP;
2305 ReplyK *OutKP = (ReplyK *) OutHeadP;
2306 ReplyU *OutUP = (ReplyU *) OutDataP;
2307 (void)OutUP;
2308#ifdef __MIG_check__Request__mach_port_allocate_qos_t__defined
2309 kern_return_t check_result;
2310#endif /* __MIG_check__Request__mach_port_allocate_qos_t__defined */
2311
2312#if __MigKernelSpecificCode
2313#else
2314#endif /* __MigKernelSpecificCode */
2315 ipc_space_t task;
2316
2317 __DeclareRcvRpc(3219, "mach_port_allocate_qos")
2318 __BeforeRcvRpc(3219, "mach_port_allocate_qos")
2319
2320#if defined(__MIG_check__Request__mach_port_allocate_qos_t__defined)
2321 check_result = __MIG_check__Request__mach_port_allocate_qos_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
2322 if (check_result != MACH_MSG_SUCCESS)
2323 { MIG_RETURN_ERROR(OutKP, check_result); }
2324#endif /* defined(__MIG_check__Request__mach_port_allocate_qos_t__defined) */
2325
2326 task = convert_port_to_space(port: InKP->Head.msgh_request_port);
2327
2328 OutUP->RetCode = mach_port_allocate_qos(task, right: In0UP->right, qos: &In0UP->qos, name: &OutUP->name);
2329 space_deallocate(space: task);
2330 if (OutUP->RetCode != KERN_SUCCESS) {
2331 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
2332 }
2333#if __MigKernelSpecificCode
2334#endif /* __MigKernelSpecificCode */
2335
2336 OutUP->NDR = NDR_record;
2337
2338
2339 OutUP->qos = In0UP->qos;
2340
2341 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
2342 __AfterRcvRpc(3219, "mach_port_allocate_qos")
2343}
2344
2345#if ( __MigTypeCheck )
2346#if __MIG_check__Request__mach_port_subsystem__
2347#if !defined(__MIG_check__Request__mach_port_allocate_full_t__defined)
2348#define __MIG_check__Request__mach_port_allocate_full_t__defined
2349
2350mig_internal kern_return_t __MIG_check__Request__mach_port_allocate_full_t(
2351 __attribute__((__unused__)) __RequestKData__mach_port_allocate_full_t *InKP,
2352 __attribute__((__unused__)) __RequestUData__mach_port_allocate_full_t *In0UP,
2353 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
2354{
2355
2356 typedef __Request__mach_port_allocate_full_t __Request;
2357 typedef __RequestUData__mach_port_allocate_full_t __RequestU __attribute__((unused));
2358#if __MigTypeCheck
2359 if (!(InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
2360 (InKP->msgh_body.msgh_descriptor_count != 1) ||
2361 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
2362 return MIG_BAD_ARGUMENTS;
2363#endif /* __MigTypeCheck */
2364
2365#if __MigTypeCheck
2366 if (InKP->proto.type != MACH_MSG_PORT_DESCRIPTOR ||
2367 InKP->proto.disposition != 17)
2368 return MIG_TYPE_ERROR;
2369#endif /* __MigTypeCheck */
2370
2371 return MACH_MSG_SUCCESS;
2372}
2373#endif /* !defined(__MIG_check__Request__mach_port_allocate_full_t__defined) */
2374#endif /* __MIG_check__Request__mach_port_subsystem__ */
2375#endif /* ( __MigTypeCheck ) */
2376
2377
2378/* Routine mach_port_allocate_full */
2379mig_internal novalue _Xmach_port_allocate_full
2380 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
2381 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
2382 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
2383{
2384
2385#ifdef __MigPackStructs
2386#pragma pack(push, 4)
2387#endif
2388 typedef struct {
2389 NDR_record_t NDR;
2390 mach_port_right_t right;
2391 mach_port_qos_t qos;
2392 mach_port_name_t name;
2393 mach_msg_trailer_t trailer;
2394 char padding[0]; /* Avoid generating empty UData structs */
2395 } RequestU __attribute__((unused));
2396#ifdef __MigPackStructs
2397#pragma pack(pop)
2398#endif
2399 typedef __RequestKData__mach_port_allocate_full_t RequestK;
2400 typedef __RequestUData__mach_port_allocate_full_t __RequestU;
2401 typedef __ReplyKData__mach_port_allocate_full_t ReplyK __attribute__((unused));
2402 typedef __ReplyUData__mach_port_allocate_full_t ReplyU __attribute__((unused));
2403 typedef __Reply__mach_port_allocate_full_t Reply __attribute__((unused));
2404 typedef __Request__mach_port_allocate_full_t __Request __attribute__((unused));
2405
2406 /*
2407 * typedef struct {
2408 * mach_msg_header_t Head;
2409 * NDR_record_t NDR;
2410 * kern_return_t RetCode;
2411 * } mig_reply_error_t;
2412 */
2413
2414 RequestK *InKP = (RequestK *) InHeadP;
2415 RequestU *In0UP = (RequestU *) InDataP;
2416 ReplyK *OutKP = (ReplyK *) OutHeadP;
2417 ReplyU *OutUP = (ReplyU *) OutDataP;
2418 (void)OutUP;
2419#ifdef __MIG_check__Request__mach_port_allocate_full_t__defined
2420 kern_return_t check_result;
2421#endif /* __MIG_check__Request__mach_port_allocate_full_t__defined */
2422
2423#if __MigKernelSpecificCode
2424#else
2425#endif /* __MigKernelSpecificCode */
2426 ipc_space_t task;
2427
2428 __DeclareRcvRpc(3220, "mach_port_allocate_full")
2429 __BeforeRcvRpc(3220, "mach_port_allocate_full")
2430
2431#if defined(__MIG_check__Request__mach_port_allocate_full_t__defined)
2432 check_result = __MIG_check__Request__mach_port_allocate_full_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
2433 if (check_result != MACH_MSG_SUCCESS)
2434 { MIG_RETURN_ERROR(OutKP, check_result); }
2435#endif /* defined(__MIG_check__Request__mach_port_allocate_full_t__defined) */
2436
2437 task = convert_port_to_space(port: InKP->Head.msgh_request_port);
2438
2439 OutUP->RetCode = mach_port_allocate_full(task, right: In0UP->right, proto: InKP->proto.name, qos: &In0UP->qos, name: &In0UP->name);
2440 space_deallocate(space: task);
2441 if (OutUP->RetCode != KERN_SUCCESS) {
2442 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
2443 }
2444#if __MigKernelSpecificCode
2445#endif /* __MigKernelSpecificCode */
2446
2447 OutUP->NDR = NDR_record;
2448
2449
2450 OutUP->qos = In0UP->qos;
2451
2452 OutUP->name = In0UP->name;
2453
2454 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
2455 __AfterRcvRpc(3220, "mach_port_allocate_full")
2456}
2457
2458#if ( __MigTypeCheck )
2459#if __MIG_check__Request__mach_port_subsystem__
2460#if !defined(__MIG_check__Request__task_set_port_space_t__defined)
2461#define __MIG_check__Request__task_set_port_space_t__defined
2462
2463mig_internal kern_return_t __MIG_check__Request__task_set_port_space_t(
2464 __attribute__((__unused__)) __RequestKData__task_set_port_space_t *InKP,
2465 __attribute__((__unused__)) __RequestUData__task_set_port_space_t *In0UP,
2466 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
2467{
2468
2469 typedef __Request__task_set_port_space_t __Request;
2470 typedef __RequestUData__task_set_port_space_t __RequestU __attribute__((unused));
2471#if __MigTypeCheck
2472 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
2473 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
2474 return MIG_BAD_ARGUMENTS;
2475#endif /* __MigTypeCheck */
2476
2477 return MACH_MSG_SUCCESS;
2478}
2479#endif /* !defined(__MIG_check__Request__task_set_port_space_t__defined) */
2480#endif /* __MIG_check__Request__mach_port_subsystem__ */
2481#endif /* ( __MigTypeCheck ) */
2482
2483
2484/* Routine task_set_port_space */
2485mig_internal novalue _Xtask_set_port_space
2486 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
2487 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
2488 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
2489{
2490
2491#ifdef __MigPackStructs
2492#pragma pack(push, 4)
2493#endif
2494 typedef struct {
2495 NDR_record_t NDR;
2496 int table_entries;
2497 mach_msg_trailer_t trailer;
2498 char padding[0]; /* Avoid generating empty UData structs */
2499 } RequestU __attribute__((unused));
2500#ifdef __MigPackStructs
2501#pragma pack(pop)
2502#endif
2503 typedef __RequestKData__task_set_port_space_t RequestK;
2504 typedef __RequestUData__task_set_port_space_t __RequestU;
2505 typedef __ReplyKData__task_set_port_space_t ReplyK __attribute__((unused));
2506 typedef __ReplyUData__task_set_port_space_t ReplyU __attribute__((unused));
2507 typedef __Reply__task_set_port_space_t Reply __attribute__((unused));
2508 typedef __Request__task_set_port_space_t __Request __attribute__((unused));
2509
2510 /*
2511 * typedef struct {
2512 * mach_msg_header_t Head;
2513 * NDR_record_t NDR;
2514 * kern_return_t RetCode;
2515 * } mig_reply_error_t;
2516 */
2517
2518 RequestK *InKP = (RequestK *) InHeadP;
2519 RequestU *In0UP = (RequestU *) InDataP;
2520 ReplyK *OutKP = (ReplyK *) OutHeadP;
2521 ReplyU *OutUP = (ReplyU *) OutDataP;
2522 (void)OutUP;
2523#ifdef __MIG_check__Request__task_set_port_space_t__defined
2524 kern_return_t check_result;
2525#endif /* __MIG_check__Request__task_set_port_space_t__defined */
2526
2527#if __MigKernelSpecificCode
2528#else
2529#endif /* __MigKernelSpecificCode */
2530 ipc_space_t task;
2531
2532 __DeclareRcvRpc(3221, "task_set_port_space")
2533 __BeforeRcvRpc(3221, "task_set_port_space")
2534
2535#if defined(__MIG_check__Request__task_set_port_space_t__defined)
2536 check_result = __MIG_check__Request__task_set_port_space_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
2537 if (check_result != MACH_MSG_SUCCESS)
2538 { MIG_RETURN_ERROR(OutKP, check_result); }
2539#endif /* defined(__MIG_check__Request__task_set_port_space_t__defined) */
2540
2541 task = convert_port_to_space(port: InKP->Head.msgh_request_port);
2542
2543 OutUP->RetCode = task_set_port_space(task, table_entries: In0UP->table_entries);
2544 space_deallocate(space: task);
2545#if __MigKernelSpecificCode
2546#endif /* __MigKernelSpecificCode */
2547
2548 OutUP->NDR = NDR_record;
2549
2550
2551 __AfterRcvRpc(3221, "task_set_port_space")
2552}
2553
2554#if ( __MigTypeCheck )
2555#if __MIG_check__Request__mach_port_subsystem__
2556#if !defined(__MIG_check__Request__mach_port_get_srights_t__defined)
2557#define __MIG_check__Request__mach_port_get_srights_t__defined
2558
2559mig_internal kern_return_t __MIG_check__Request__mach_port_get_srights_t(
2560 __attribute__((__unused__)) __RequestKData__mach_port_get_srights_t *InKP,
2561 __attribute__((__unused__)) __RequestUData__mach_port_get_srights_t *In0UP,
2562 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
2563{
2564
2565 typedef __Request__mach_port_get_srights_t __Request;
2566 typedef __RequestUData__mach_port_get_srights_t __RequestU __attribute__((unused));
2567#if __MigTypeCheck
2568 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
2569 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
2570 return MIG_BAD_ARGUMENTS;
2571#endif /* __MigTypeCheck */
2572
2573 return MACH_MSG_SUCCESS;
2574}
2575#endif /* !defined(__MIG_check__Request__mach_port_get_srights_t__defined) */
2576#endif /* __MIG_check__Request__mach_port_subsystem__ */
2577#endif /* ( __MigTypeCheck ) */
2578
2579
2580/* Routine mach_port_get_srights */
2581mig_internal novalue _Xmach_port_get_srights
2582 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
2583 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
2584 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
2585{
2586
2587#ifdef __MigPackStructs
2588#pragma pack(push, 4)
2589#endif
2590 typedef struct {
2591 NDR_record_t NDR;
2592 mach_port_name_t name;
2593 mach_msg_trailer_t trailer;
2594 char padding[0]; /* Avoid generating empty UData structs */
2595 } RequestU __attribute__((unused));
2596#ifdef __MigPackStructs
2597#pragma pack(pop)
2598#endif
2599 typedef __RequestKData__mach_port_get_srights_t RequestK;
2600 typedef __RequestUData__mach_port_get_srights_t __RequestU;
2601 typedef __ReplyKData__mach_port_get_srights_t ReplyK __attribute__((unused));
2602 typedef __ReplyUData__mach_port_get_srights_t ReplyU __attribute__((unused));
2603 typedef __Reply__mach_port_get_srights_t Reply __attribute__((unused));
2604 typedef __Request__mach_port_get_srights_t __Request __attribute__((unused));
2605
2606 /*
2607 * typedef struct {
2608 * mach_msg_header_t Head;
2609 * NDR_record_t NDR;
2610 * kern_return_t RetCode;
2611 * } mig_reply_error_t;
2612 */
2613
2614 RequestK *InKP = (RequestK *) InHeadP;
2615 RequestU *In0UP = (RequestU *) InDataP;
2616 ReplyK *OutKP = (ReplyK *) OutHeadP;
2617 ReplyU *OutUP = (ReplyU *) OutDataP;
2618 (void)OutUP;
2619#ifdef __MIG_check__Request__mach_port_get_srights_t__defined
2620 kern_return_t check_result;
2621#endif /* __MIG_check__Request__mach_port_get_srights_t__defined */
2622
2623#if __MigKernelSpecificCode
2624#else
2625#endif /* __MigKernelSpecificCode */
2626 ipc_space_t task;
2627
2628 __DeclareRcvRpc(3222, "mach_port_get_srights")
2629 __BeforeRcvRpc(3222, "mach_port_get_srights")
2630
2631#if defined(__MIG_check__Request__mach_port_get_srights_t__defined)
2632 check_result = __MIG_check__Request__mach_port_get_srights_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
2633 if (check_result != MACH_MSG_SUCCESS)
2634 { MIG_RETURN_ERROR(OutKP, check_result); }
2635#endif /* defined(__MIG_check__Request__mach_port_get_srights_t__defined) */
2636
2637 task = convert_port_to_space(port: InKP->Head.msgh_request_port);
2638
2639 OutUP->RetCode = mach_port_get_srights(task, name: In0UP->name, srights: &OutUP->srights);
2640 space_deallocate(space: task);
2641 if (OutUP->RetCode != KERN_SUCCESS) {
2642 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
2643 }
2644#if __MigKernelSpecificCode
2645#endif /* __MigKernelSpecificCode */
2646
2647 OutUP->NDR = NDR_record;
2648
2649
2650 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
2651 __AfterRcvRpc(3222, "mach_port_get_srights")
2652}
2653
2654#if ( __MigTypeCheck )
2655#if __MIG_check__Request__mach_port_subsystem__
2656#if !defined(__MIG_check__Request__mach_port_space_info_from_user_t__defined)
2657#define __MIG_check__Request__mach_port_space_info_from_user_t__defined
2658
2659mig_internal kern_return_t __MIG_check__Request__mach_port_space_info_from_user_t(
2660 __attribute__((__unused__)) __RequestKData__mach_port_space_info_from_user_t *InKP,
2661 __attribute__((__unused__)) __RequestUData__mach_port_space_info_from_user_t *In0UP,
2662 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
2663{
2664
2665 typedef __Request__mach_port_space_info_from_user_t __Request;
2666 typedef __RequestUData__mach_port_space_info_from_user_t __RequestU __attribute__((unused));
2667#if __MigTypeCheck
2668 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
2669 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
2670 return MIG_BAD_ARGUMENTS;
2671#endif /* __MigTypeCheck */
2672
2673 return MACH_MSG_SUCCESS;
2674}
2675#endif /* !defined(__MIG_check__Request__mach_port_space_info_from_user_t__defined) */
2676#endif /* __MIG_check__Request__mach_port_subsystem__ */
2677#endif /* ( __MigTypeCheck ) */
2678
2679
2680/* Routine mach_port_space_info_from_user */
2681mig_internal novalue _Xmach_port_space_info_from_user
2682 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
2683 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
2684 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
2685{
2686
2687#ifdef __MigPackStructs
2688#pragma pack(push, 4)
2689#endif
2690 typedef struct {
2691 mach_msg_trailer_t trailer;
2692 char padding[0]; /* Avoid generating empty UData structs */
2693 } RequestU __attribute__((unused));
2694#ifdef __MigPackStructs
2695#pragma pack(pop)
2696#endif
2697 typedef __RequestKData__mach_port_space_info_from_user_t RequestK;
2698 typedef __RequestUData__mach_port_space_info_from_user_t __RequestU;
2699 typedef __ReplyKData__mach_port_space_info_from_user_t ReplyK __attribute__((unused));
2700 typedef __ReplyUData__mach_port_space_info_from_user_t ReplyU __attribute__((unused));
2701 typedef __Reply__mach_port_space_info_from_user_t Reply __attribute__((unused));
2702 typedef __Request__mach_port_space_info_from_user_t __Request __attribute__((unused));
2703
2704 /*
2705 * typedef struct {
2706 * mach_msg_header_t Head;
2707 * NDR_record_t NDR;
2708 * kern_return_t RetCode;
2709 * } mig_reply_error_t;
2710 */
2711
2712 RequestK *InKP = (RequestK *) InHeadP;
2713 RequestU *In0UP = (RequestU *) InDataP;
2714 ReplyK *OutKP = (ReplyK *) OutHeadP;
2715 ReplyU *OutUP = (ReplyU *) OutDataP;
2716 (void)OutUP;
2717#ifdef __MIG_check__Request__mach_port_space_info_from_user_t__defined
2718 kern_return_t check_result;
2719#endif /* __MIG_check__Request__mach_port_space_info_from_user_t__defined */
2720
2721#if __MigKernelSpecificCode
2722#if UseStaticTemplates
2723 const static mach_msg_ool_descriptor_t table_infoTemplate = {
2724 /* addr = */ (void *)0,
2725 /* size = */ 0,
2726 /* deal = */ FALSE,
2727 /* copy = */ MACH_MSG_VIRTUAL_COPY,
2728 /* pad2 = */ 0,
2729 /* type = */ MACH_MSG_OOL_DESCRIPTOR,
2730 };
2731#endif /* UseStaticTemplates */
2732
2733#if UseStaticTemplates
2734 const static mach_msg_ool_descriptor_t tree_infoTemplate = {
2735 /* addr = */ (void *)0,
2736 /* size = */ 0,
2737 /* deal = */ FALSE,
2738 /* copy = */ MACH_MSG_VIRTUAL_COPY,
2739 /* pad2 = */ 0,
2740 /* type = */ MACH_MSG_OOL_DESCRIPTOR,
2741 };
2742#endif /* UseStaticTemplates */
2743
2744#else
2745#if UseStaticTemplates
2746 const static mach_msg_ool_descriptor_t table_infoTemplate = {
2747 /* addr = */ (void *)0,
2748 /* size = */ 0,
2749 /* deal = */ FALSE,
2750 /* copy = */ MACH_MSG_VIRTUAL_COPY,
2751 /* pad2 = */ 0,
2752 /* type = */ MACH_MSG_OOL_DESCRIPTOR,
2753 };
2754#endif /* UseStaticTemplates */
2755
2756#if UseStaticTemplates
2757 const static mach_msg_ool_descriptor_t tree_infoTemplate = {
2758 /* addr = */ (void *)0,
2759 /* size = */ 0,
2760 /* deal = */ FALSE,
2761 /* copy = */ MACH_MSG_VIRTUAL_COPY,
2762 /* pad2 = */ 0,
2763 /* type = */ MACH_MSG_OOL_DESCRIPTOR,
2764 };
2765#endif /* UseStaticTemplates */
2766
2767#endif /* __MigKernelSpecificCode */
2768 kern_return_t RetCode;
2769 __DeclareRcvRpc(3223, "mach_port_space_info_from_user")
2770 __BeforeRcvRpc(3223, "mach_port_space_info_from_user")
2771
2772#if defined(__MIG_check__Request__mach_port_space_info_from_user_t__defined)
2773 check_result = __MIG_check__Request__mach_port_space_info_from_user_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
2774 if (check_result != MACH_MSG_SUCCESS)
2775 { MIG_RETURN_ERROR(OutKP, check_result); }
2776#endif /* defined(__MIG_check__Request__mach_port_space_info_from_user_t__defined) */
2777
2778#if UseStaticTemplates
2779 OutKP->table_info = table_infoTemplate;
2780#else /* UseStaticTemplates */
2781 OutKP->table_info.deallocate = FALSE;
2782 OutKP->table_info.copy = MACH_MSG_VIRTUAL_COPY;
2783 OutKP->table_info.pad1 = 0;
2784 OutKP->table_info.type = MACH_MSG_OOL_DESCRIPTOR;
2785#if defined(KERNEL) && !defined(__LP64__)
2786 OutKP->table_info.pad_end = 0;
2787#endif
2788#endif /* UseStaticTemplates */
2789
2790
2791#if UseStaticTemplates
2792 OutKP->tree_info = tree_infoTemplate;
2793#else /* UseStaticTemplates */
2794 OutKP->tree_info.deallocate = FALSE;
2795 OutKP->tree_info.copy = MACH_MSG_VIRTUAL_COPY;
2796 OutKP->tree_info.pad1 = 0;
2797 OutKP->tree_info.type = MACH_MSG_OOL_DESCRIPTOR;
2798#if defined(KERNEL) && !defined(__LP64__)
2799 OutKP->tree_info.pad_end = 0;
2800#endif
2801#endif /* UseStaticTemplates */
2802
2803
2804 OutUP->table_infoCnt = 0;
2805
2806 OutUP->tree_infoCnt = 0;
2807
2808 RetCode = mach_port_space_info_from_user(port: InKP->Head.msgh_request_port, space_info: &OutUP->space_info, table_info: (ipc_info_name_array_t *)&(OutKP->table_info.address), table_infoCnt: &OutUP->table_infoCnt, tree_info: (ipc_info_tree_name_array_t *)&(OutKP->tree_info.address), tree_infoCnt: &OutUP->tree_infoCnt);
2809 if (RetCode != KERN_SUCCESS) {
2810 MIG_RETURN_ERROR(OutKP, RetCode);
2811 }
2812#if __MigKernelSpecificCode
2813#endif /* __MigKernelSpecificCode */
2814 OutKP->table_info.size = OutUP->table_infoCnt * 28;
2815
2816 OutKP->tree_info.size = OutUP->tree_infoCnt * 36;
2817
2818
2819 OutUP->NDR = NDR_record;
2820
2821
2822 OutKP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
2823 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
2824 OutKP->msgh_body.msgh_descriptor_count = 2;
2825 __AfterRcvRpc(3223, "mach_port_space_info_from_user")
2826}
2827
2828#if ( __MigTypeCheck )
2829#if __MIG_check__Request__mach_port_subsystem__
2830#if !defined(__MIG_check__Request__mach_port_dnrequest_info_t__defined)
2831#define __MIG_check__Request__mach_port_dnrequest_info_t__defined
2832
2833mig_internal kern_return_t __MIG_check__Request__mach_port_dnrequest_info_t(
2834 __attribute__((__unused__)) __RequestKData__mach_port_dnrequest_info_t *InKP,
2835 __attribute__((__unused__)) __RequestUData__mach_port_dnrequest_info_t *In0UP,
2836 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
2837{
2838
2839 typedef __Request__mach_port_dnrequest_info_t __Request;
2840 typedef __RequestUData__mach_port_dnrequest_info_t __RequestU __attribute__((unused));
2841#if __MigTypeCheck
2842 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
2843 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
2844 return MIG_BAD_ARGUMENTS;
2845#endif /* __MigTypeCheck */
2846
2847 return MACH_MSG_SUCCESS;
2848}
2849#endif /* !defined(__MIG_check__Request__mach_port_dnrequest_info_t__defined) */
2850#endif /* __MIG_check__Request__mach_port_subsystem__ */
2851#endif /* ( __MigTypeCheck ) */
2852
2853
2854/* Routine mach_port_dnrequest_info */
2855mig_internal novalue _Xmach_port_dnrequest_info
2856 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
2857 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
2858 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
2859{
2860
2861#ifdef __MigPackStructs
2862#pragma pack(push, 4)
2863#endif
2864 typedef struct {
2865 NDR_record_t NDR;
2866 mach_port_name_t name;
2867 mach_msg_trailer_t trailer;
2868 char padding[0]; /* Avoid generating empty UData structs */
2869 } RequestU __attribute__((unused));
2870#ifdef __MigPackStructs
2871#pragma pack(pop)
2872#endif
2873 typedef __RequestKData__mach_port_dnrequest_info_t RequestK;
2874 typedef __RequestUData__mach_port_dnrequest_info_t __RequestU;
2875 typedef __ReplyKData__mach_port_dnrequest_info_t ReplyK __attribute__((unused));
2876 typedef __ReplyUData__mach_port_dnrequest_info_t ReplyU __attribute__((unused));
2877 typedef __Reply__mach_port_dnrequest_info_t Reply __attribute__((unused));
2878 typedef __Request__mach_port_dnrequest_info_t __Request __attribute__((unused));
2879
2880 /*
2881 * typedef struct {
2882 * mach_msg_header_t Head;
2883 * NDR_record_t NDR;
2884 * kern_return_t RetCode;
2885 * } mig_reply_error_t;
2886 */
2887
2888 RequestK *InKP = (RequestK *) InHeadP;
2889 RequestU *In0UP = (RequestU *) InDataP;
2890 ReplyK *OutKP = (ReplyK *) OutHeadP;
2891 ReplyU *OutUP = (ReplyU *) OutDataP;
2892 (void)OutUP;
2893#ifdef __MIG_check__Request__mach_port_dnrequest_info_t__defined
2894 kern_return_t check_result;
2895#endif /* __MIG_check__Request__mach_port_dnrequest_info_t__defined */
2896
2897#if __MigKernelSpecificCode
2898#else
2899#endif /* __MigKernelSpecificCode */
2900 ipc_space_t task;
2901
2902 __DeclareRcvRpc(3224, "mach_port_dnrequest_info")
2903 __BeforeRcvRpc(3224, "mach_port_dnrequest_info")
2904
2905#if defined(__MIG_check__Request__mach_port_dnrequest_info_t__defined)
2906 check_result = __MIG_check__Request__mach_port_dnrequest_info_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
2907 if (check_result != MACH_MSG_SUCCESS)
2908 { MIG_RETURN_ERROR(OutKP, check_result); }
2909#endif /* defined(__MIG_check__Request__mach_port_dnrequest_info_t__defined) */
2910
2911 task = convert_port_to_space(port: InKP->Head.msgh_request_port);
2912
2913 OutUP->RetCode = mach_port_dnrequest_info(task, name: In0UP->name, dnr_total: &OutUP->dnr_total, dnr_used: &OutUP->dnr_used);
2914 space_deallocate(space: task);
2915 if (OutUP->RetCode != KERN_SUCCESS) {
2916 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
2917 }
2918#if __MigKernelSpecificCode
2919#endif /* __MigKernelSpecificCode */
2920
2921 OutUP->NDR = NDR_record;
2922
2923
2924 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
2925 __AfterRcvRpc(3224, "mach_port_dnrequest_info")
2926}
2927
2928#if ( __MigTypeCheck )
2929#if __MIG_check__Request__mach_port_subsystem__
2930#if !defined(__MIG_check__Request__mach_port_insert_member_t__defined)
2931#define __MIG_check__Request__mach_port_insert_member_t__defined
2932
2933mig_internal kern_return_t __MIG_check__Request__mach_port_insert_member_t(
2934 __attribute__((__unused__)) __RequestKData__mach_port_insert_member_t *InKP,
2935 __attribute__((__unused__)) __RequestUData__mach_port_insert_member_t *In0UP,
2936 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
2937{
2938
2939 typedef __Request__mach_port_insert_member_t __Request;
2940 typedef __RequestUData__mach_port_insert_member_t __RequestU __attribute__((unused));
2941#if __MigTypeCheck
2942 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
2943 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
2944 return MIG_BAD_ARGUMENTS;
2945#endif /* __MigTypeCheck */
2946
2947 return MACH_MSG_SUCCESS;
2948}
2949#endif /* !defined(__MIG_check__Request__mach_port_insert_member_t__defined) */
2950#endif /* __MIG_check__Request__mach_port_subsystem__ */
2951#endif /* ( __MigTypeCheck ) */
2952
2953
2954/* Routine mach_port_insert_member */
2955mig_internal novalue _Xmach_port_insert_member
2956 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
2957 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
2958 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
2959{
2960
2961#ifdef __MigPackStructs
2962#pragma pack(push, 4)
2963#endif
2964 typedef struct {
2965 NDR_record_t NDR;
2966 mach_port_name_t name;
2967 mach_port_name_t pset;
2968 mach_msg_trailer_t trailer;
2969 char padding[0]; /* Avoid generating empty UData structs */
2970 } RequestU __attribute__((unused));
2971#ifdef __MigPackStructs
2972#pragma pack(pop)
2973#endif
2974 typedef __RequestKData__mach_port_insert_member_t RequestK;
2975 typedef __RequestUData__mach_port_insert_member_t __RequestU;
2976 typedef __ReplyKData__mach_port_insert_member_t ReplyK __attribute__((unused));
2977 typedef __ReplyUData__mach_port_insert_member_t ReplyU __attribute__((unused));
2978 typedef __Reply__mach_port_insert_member_t Reply __attribute__((unused));
2979 typedef __Request__mach_port_insert_member_t __Request __attribute__((unused));
2980
2981 /*
2982 * typedef struct {
2983 * mach_msg_header_t Head;
2984 * NDR_record_t NDR;
2985 * kern_return_t RetCode;
2986 * } mig_reply_error_t;
2987 */
2988
2989 RequestK *InKP = (RequestK *) InHeadP;
2990 RequestU *In0UP = (RequestU *) InDataP;
2991 ReplyK *OutKP = (ReplyK *) OutHeadP;
2992 ReplyU *OutUP = (ReplyU *) OutDataP;
2993 (void)OutUP;
2994#ifdef __MIG_check__Request__mach_port_insert_member_t__defined
2995 kern_return_t check_result;
2996#endif /* __MIG_check__Request__mach_port_insert_member_t__defined */
2997
2998#if __MigKernelSpecificCode
2999#else
3000#endif /* __MigKernelSpecificCode */
3001 ipc_space_t task;
3002
3003 __DeclareRcvRpc(3226, "mach_port_insert_member")
3004 __BeforeRcvRpc(3226, "mach_port_insert_member")
3005
3006#if defined(__MIG_check__Request__mach_port_insert_member_t__defined)
3007 check_result = __MIG_check__Request__mach_port_insert_member_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
3008 if (check_result != MACH_MSG_SUCCESS)
3009 { MIG_RETURN_ERROR(OutKP, check_result); }
3010#endif /* defined(__MIG_check__Request__mach_port_insert_member_t__defined) */
3011
3012 task = convert_port_to_space(port: InKP->Head.msgh_request_port);
3013
3014 OutUP->RetCode = mach_port_insert_member(task, name: In0UP->name, pset: In0UP->pset);
3015 space_deallocate(space: task);
3016#if __MigKernelSpecificCode
3017#endif /* __MigKernelSpecificCode */
3018
3019 OutUP->NDR = NDR_record;
3020
3021
3022 __AfterRcvRpc(3226, "mach_port_insert_member")
3023}
3024
3025#if ( __MigTypeCheck )
3026#if __MIG_check__Request__mach_port_subsystem__
3027#if !defined(__MIG_check__Request__mach_port_extract_member_t__defined)
3028#define __MIG_check__Request__mach_port_extract_member_t__defined
3029
3030mig_internal kern_return_t __MIG_check__Request__mach_port_extract_member_t(
3031 __attribute__((__unused__)) __RequestKData__mach_port_extract_member_t *InKP,
3032 __attribute__((__unused__)) __RequestUData__mach_port_extract_member_t *In0UP,
3033 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
3034{
3035
3036 typedef __Request__mach_port_extract_member_t __Request;
3037 typedef __RequestUData__mach_port_extract_member_t __RequestU __attribute__((unused));
3038#if __MigTypeCheck
3039 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
3040 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
3041 return MIG_BAD_ARGUMENTS;
3042#endif /* __MigTypeCheck */
3043
3044 return MACH_MSG_SUCCESS;
3045}
3046#endif /* !defined(__MIG_check__Request__mach_port_extract_member_t__defined) */
3047#endif /* __MIG_check__Request__mach_port_subsystem__ */
3048#endif /* ( __MigTypeCheck ) */
3049
3050
3051/* Routine mach_port_extract_member */
3052mig_internal novalue _Xmach_port_extract_member
3053 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
3054 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
3055 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
3056{
3057
3058#ifdef __MigPackStructs
3059#pragma pack(push, 4)
3060#endif
3061 typedef struct {
3062 NDR_record_t NDR;
3063 mach_port_name_t name;
3064 mach_port_name_t pset;
3065 mach_msg_trailer_t trailer;
3066 char padding[0]; /* Avoid generating empty UData structs */
3067 } RequestU __attribute__((unused));
3068#ifdef __MigPackStructs
3069#pragma pack(pop)
3070#endif
3071 typedef __RequestKData__mach_port_extract_member_t RequestK;
3072 typedef __RequestUData__mach_port_extract_member_t __RequestU;
3073 typedef __ReplyKData__mach_port_extract_member_t ReplyK __attribute__((unused));
3074 typedef __ReplyUData__mach_port_extract_member_t ReplyU __attribute__((unused));
3075 typedef __Reply__mach_port_extract_member_t Reply __attribute__((unused));
3076 typedef __Request__mach_port_extract_member_t __Request __attribute__((unused));
3077
3078 /*
3079 * typedef struct {
3080 * mach_msg_header_t Head;
3081 * NDR_record_t NDR;
3082 * kern_return_t RetCode;
3083 * } mig_reply_error_t;
3084 */
3085
3086 RequestK *InKP = (RequestK *) InHeadP;
3087 RequestU *In0UP = (RequestU *) InDataP;
3088 ReplyK *OutKP = (ReplyK *) OutHeadP;
3089 ReplyU *OutUP = (ReplyU *) OutDataP;
3090 (void)OutUP;
3091#ifdef __MIG_check__Request__mach_port_extract_member_t__defined
3092 kern_return_t check_result;
3093#endif /* __MIG_check__Request__mach_port_extract_member_t__defined */
3094
3095#if __MigKernelSpecificCode
3096#else
3097#endif /* __MigKernelSpecificCode */
3098 ipc_space_t task;
3099
3100 __DeclareRcvRpc(3227, "mach_port_extract_member")
3101 __BeforeRcvRpc(3227, "mach_port_extract_member")
3102
3103#if defined(__MIG_check__Request__mach_port_extract_member_t__defined)
3104 check_result = __MIG_check__Request__mach_port_extract_member_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
3105 if (check_result != MACH_MSG_SUCCESS)
3106 { MIG_RETURN_ERROR(OutKP, check_result); }
3107#endif /* defined(__MIG_check__Request__mach_port_extract_member_t__defined) */
3108
3109 task = convert_port_to_space(port: InKP->Head.msgh_request_port);
3110
3111 OutUP->RetCode = mach_port_extract_member(task, name: In0UP->name, pset: In0UP->pset);
3112 space_deallocate(space: task);
3113#if __MigKernelSpecificCode
3114#endif /* __MigKernelSpecificCode */
3115
3116 OutUP->NDR = NDR_record;
3117
3118
3119 __AfterRcvRpc(3227, "mach_port_extract_member")
3120}
3121
3122#if ( __MigTypeCheck )
3123#if __MIG_check__Request__mach_port_subsystem__
3124#if !defined(__MIG_check__Request__mach_port_get_context_from_user_t__defined)
3125#define __MIG_check__Request__mach_port_get_context_from_user_t__defined
3126
3127mig_internal kern_return_t __MIG_check__Request__mach_port_get_context_from_user_t(
3128 __attribute__((__unused__)) __RequestKData__mach_port_get_context_from_user_t *InKP,
3129 __attribute__((__unused__)) __RequestUData__mach_port_get_context_from_user_t *In0UP,
3130 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
3131{
3132
3133 typedef __Request__mach_port_get_context_from_user_t __Request;
3134 typedef __RequestUData__mach_port_get_context_from_user_t __RequestU __attribute__((unused));
3135#if __MigTypeCheck
3136 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
3137 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
3138 return MIG_BAD_ARGUMENTS;
3139#endif /* __MigTypeCheck */
3140
3141 return MACH_MSG_SUCCESS;
3142}
3143#endif /* !defined(__MIG_check__Request__mach_port_get_context_from_user_t__defined) */
3144#endif /* __MIG_check__Request__mach_port_subsystem__ */
3145#endif /* ( __MigTypeCheck ) */
3146
3147
3148/* Routine mach_port_get_context_from_user */
3149mig_internal novalue _Xmach_port_get_context_from_user
3150 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
3151 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
3152 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
3153{
3154
3155#ifdef __MigPackStructs
3156#pragma pack(push, 4)
3157#endif
3158 typedef struct {
3159 NDR_record_t NDR;
3160 mach_port_name_t name;
3161 mach_msg_trailer_t trailer;
3162 char padding[0]; /* Avoid generating empty UData structs */
3163 } RequestU __attribute__((unused));
3164#ifdef __MigPackStructs
3165#pragma pack(pop)
3166#endif
3167 typedef __RequestKData__mach_port_get_context_from_user_t RequestK;
3168 typedef __RequestUData__mach_port_get_context_from_user_t __RequestU;
3169 typedef __ReplyKData__mach_port_get_context_from_user_t ReplyK __attribute__((unused));
3170 typedef __ReplyUData__mach_port_get_context_from_user_t ReplyU __attribute__((unused));
3171 typedef __Reply__mach_port_get_context_from_user_t Reply __attribute__((unused));
3172 typedef __Request__mach_port_get_context_from_user_t __Request __attribute__((unused));
3173
3174 /*
3175 * typedef struct {
3176 * mach_msg_header_t Head;
3177 * NDR_record_t NDR;
3178 * kern_return_t RetCode;
3179 * } mig_reply_error_t;
3180 */
3181
3182 RequestK *InKP = (RequestK *) InHeadP;
3183 RequestU *In0UP = (RequestU *) InDataP;
3184 ReplyK *OutKP = (ReplyK *) OutHeadP;
3185 ReplyU *OutUP = (ReplyU *) OutDataP;
3186 (void)OutUP;
3187#ifdef __MIG_check__Request__mach_port_get_context_from_user_t__defined
3188 kern_return_t check_result;
3189#endif /* __MIG_check__Request__mach_port_get_context_from_user_t__defined */
3190
3191#if __MigKernelSpecificCode
3192#else
3193#endif /* __MigKernelSpecificCode */
3194 __DeclareRcvRpc(3228, "mach_port_get_context_from_user")
3195 __BeforeRcvRpc(3228, "mach_port_get_context_from_user")
3196
3197#if defined(__MIG_check__Request__mach_port_get_context_from_user_t__defined)
3198 check_result = __MIG_check__Request__mach_port_get_context_from_user_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
3199 if (check_result != MACH_MSG_SUCCESS)
3200 { MIG_RETURN_ERROR(OutKP, check_result); }
3201#endif /* defined(__MIG_check__Request__mach_port_get_context_from_user_t__defined) */
3202
3203 OutUP->RetCode = mach_port_get_context_from_user(port: InKP->Head.msgh_request_port, name: In0UP->name, context: &OutUP->context);
3204 if (OutUP->RetCode != KERN_SUCCESS) {
3205 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
3206 }
3207#if __MigKernelSpecificCode
3208#endif /* __MigKernelSpecificCode */
3209
3210 OutUP->NDR = NDR_record;
3211
3212
3213 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
3214 __AfterRcvRpc(3228, "mach_port_get_context_from_user")
3215}
3216
3217#if ( __MigTypeCheck )
3218#if __MIG_check__Request__mach_port_subsystem__
3219#if !defined(__MIG_check__Request__mach_port_set_context_t__defined)
3220#define __MIG_check__Request__mach_port_set_context_t__defined
3221
3222mig_internal kern_return_t __MIG_check__Request__mach_port_set_context_t(
3223 __attribute__((__unused__)) __RequestKData__mach_port_set_context_t *InKP,
3224 __attribute__((__unused__)) __RequestUData__mach_port_set_context_t *In0UP,
3225 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
3226{
3227
3228 typedef __Request__mach_port_set_context_t __Request;
3229 typedef __RequestUData__mach_port_set_context_t __RequestU __attribute__((unused));
3230#if __MigTypeCheck
3231 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
3232 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
3233 return MIG_BAD_ARGUMENTS;
3234#endif /* __MigTypeCheck */
3235
3236 return MACH_MSG_SUCCESS;
3237}
3238#endif /* !defined(__MIG_check__Request__mach_port_set_context_t__defined) */
3239#endif /* __MIG_check__Request__mach_port_subsystem__ */
3240#endif /* ( __MigTypeCheck ) */
3241
3242
3243/* Routine mach_port_set_context */
3244mig_internal novalue _Xmach_port_set_context
3245 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
3246 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
3247 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
3248{
3249
3250#ifdef __MigPackStructs
3251#pragma pack(push, 4)
3252#endif
3253 typedef struct {
3254 NDR_record_t NDR;
3255 mach_port_name_t name;
3256 mach_vm_address_t context;
3257 mach_msg_trailer_t trailer;
3258 char padding[0]; /* Avoid generating empty UData structs */
3259 } RequestU __attribute__((unused));
3260#ifdef __MigPackStructs
3261#pragma pack(pop)
3262#endif
3263 typedef __RequestKData__mach_port_set_context_t RequestK;
3264 typedef __RequestUData__mach_port_set_context_t __RequestU;
3265 typedef __ReplyKData__mach_port_set_context_t ReplyK __attribute__((unused));
3266 typedef __ReplyUData__mach_port_set_context_t ReplyU __attribute__((unused));
3267 typedef __Reply__mach_port_set_context_t Reply __attribute__((unused));
3268 typedef __Request__mach_port_set_context_t __Request __attribute__((unused));
3269
3270 /*
3271 * typedef struct {
3272 * mach_msg_header_t Head;
3273 * NDR_record_t NDR;
3274 * kern_return_t RetCode;
3275 * } mig_reply_error_t;
3276 */
3277
3278 RequestK *InKP = (RequestK *) InHeadP;
3279 RequestU *In0UP = (RequestU *) InDataP;
3280 ReplyK *OutKP = (ReplyK *) OutHeadP;
3281 ReplyU *OutUP = (ReplyU *) OutDataP;
3282 (void)OutUP;
3283#ifdef __MIG_check__Request__mach_port_set_context_t__defined
3284 kern_return_t check_result;
3285#endif /* __MIG_check__Request__mach_port_set_context_t__defined */
3286
3287#if __MigKernelSpecificCode
3288#else
3289#endif /* __MigKernelSpecificCode */
3290 ipc_space_t task;
3291
3292 __DeclareRcvRpc(3229, "mach_port_set_context")
3293 __BeforeRcvRpc(3229, "mach_port_set_context")
3294
3295#if defined(__MIG_check__Request__mach_port_set_context_t__defined)
3296 check_result = __MIG_check__Request__mach_port_set_context_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
3297 if (check_result != MACH_MSG_SUCCESS)
3298 { MIG_RETURN_ERROR(OutKP, check_result); }
3299#endif /* defined(__MIG_check__Request__mach_port_set_context_t__defined) */
3300
3301 task = convert_port_to_space(port: InKP->Head.msgh_request_port);
3302
3303 OutUP->RetCode = mach_port_set_context(task, name: In0UP->name, context: In0UP->context);
3304 space_deallocate(space: task);
3305#if __MigKernelSpecificCode
3306#endif /* __MigKernelSpecificCode */
3307
3308 OutUP->NDR = NDR_record;
3309
3310
3311 __AfterRcvRpc(3229, "mach_port_set_context")
3312}
3313
3314#if ( __MigTypeCheck )
3315#if __MIG_check__Request__mach_port_subsystem__
3316#if !defined(__MIG_check__Request__mach_port_kobject_from_user_t__defined)
3317#define __MIG_check__Request__mach_port_kobject_from_user_t__defined
3318
3319mig_internal kern_return_t __MIG_check__Request__mach_port_kobject_from_user_t(
3320 __attribute__((__unused__)) __RequestKData__mach_port_kobject_from_user_t *InKP,
3321 __attribute__((__unused__)) __RequestUData__mach_port_kobject_from_user_t *In0UP,
3322 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
3323{
3324
3325 typedef __Request__mach_port_kobject_from_user_t __Request;
3326 typedef __RequestUData__mach_port_kobject_from_user_t __RequestU __attribute__((unused));
3327#if __MigTypeCheck
3328 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
3329 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
3330 return MIG_BAD_ARGUMENTS;
3331#endif /* __MigTypeCheck */
3332
3333 return MACH_MSG_SUCCESS;
3334}
3335#endif /* !defined(__MIG_check__Request__mach_port_kobject_from_user_t__defined) */
3336#endif /* __MIG_check__Request__mach_port_subsystem__ */
3337#endif /* ( __MigTypeCheck ) */
3338
3339
3340/* Routine mach_port_kobject_from_user */
3341mig_internal novalue _Xmach_port_kobject_from_user
3342 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
3343 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
3344 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
3345{
3346
3347#ifdef __MigPackStructs
3348#pragma pack(push, 4)
3349#endif
3350 typedef struct {
3351 NDR_record_t NDR;
3352 mach_port_name_t name;
3353 mach_msg_trailer_t trailer;
3354 char padding[0]; /* Avoid generating empty UData structs */
3355 } RequestU __attribute__((unused));
3356#ifdef __MigPackStructs
3357#pragma pack(pop)
3358#endif
3359 typedef __RequestKData__mach_port_kobject_from_user_t RequestK;
3360 typedef __RequestUData__mach_port_kobject_from_user_t __RequestU;
3361 typedef __ReplyKData__mach_port_kobject_from_user_t ReplyK __attribute__((unused));
3362 typedef __ReplyUData__mach_port_kobject_from_user_t ReplyU __attribute__((unused));
3363 typedef __Reply__mach_port_kobject_from_user_t Reply __attribute__((unused));
3364 typedef __Request__mach_port_kobject_from_user_t __Request __attribute__((unused));
3365
3366 /*
3367 * typedef struct {
3368 * mach_msg_header_t Head;
3369 * NDR_record_t NDR;
3370 * kern_return_t RetCode;
3371 * } mig_reply_error_t;
3372 */
3373
3374 RequestK *InKP = (RequestK *) InHeadP;
3375 RequestU *In0UP = (RequestU *) InDataP;
3376 ReplyK *OutKP = (ReplyK *) OutHeadP;
3377 ReplyU *OutUP = (ReplyU *) OutDataP;
3378 (void)OutUP;
3379#ifdef __MIG_check__Request__mach_port_kobject_from_user_t__defined
3380 kern_return_t check_result;
3381#endif /* __MIG_check__Request__mach_port_kobject_from_user_t__defined */
3382
3383#if __MigKernelSpecificCode
3384#else
3385#endif /* __MigKernelSpecificCode */
3386 __DeclareRcvRpc(3230, "mach_port_kobject_from_user")
3387 __BeforeRcvRpc(3230, "mach_port_kobject_from_user")
3388
3389#if defined(__MIG_check__Request__mach_port_kobject_from_user_t__defined)
3390 check_result = __MIG_check__Request__mach_port_kobject_from_user_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
3391 if (check_result != MACH_MSG_SUCCESS)
3392 { MIG_RETURN_ERROR(OutKP, check_result); }
3393#endif /* defined(__MIG_check__Request__mach_port_kobject_from_user_t__defined) */
3394
3395 OutUP->RetCode = mach_port_kobject_from_user(port: InKP->Head.msgh_request_port, name: In0UP->name, object_type: &OutUP->object_type, object_addr: &OutUP->object_addr);
3396 if (OutUP->RetCode != KERN_SUCCESS) {
3397 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
3398 }
3399#if __MigKernelSpecificCode
3400#endif /* __MigKernelSpecificCode */
3401
3402 OutUP->NDR = NDR_record;
3403
3404
3405 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
3406 __AfterRcvRpc(3230, "mach_port_kobject_from_user")
3407}
3408
3409#if ( __MigTypeCheck )
3410#if __MIG_check__Request__mach_port_subsystem__
3411#if !defined(__MIG_check__Request__mach_port_construct_t__defined)
3412#define __MIG_check__Request__mach_port_construct_t__defined
3413
3414mig_internal kern_return_t __MIG_check__Request__mach_port_construct_t(
3415 __attribute__((__unused__)) __RequestKData__mach_port_construct_t *InKP,
3416 __attribute__((__unused__)) __RequestUData__mach_port_construct_t *In0UP,
3417 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
3418{
3419
3420 typedef __Request__mach_port_construct_t __Request;
3421 typedef __RequestUData__mach_port_construct_t __RequestU __attribute__((unused));
3422#if __MigTypeCheck
3423 if (!(InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
3424 (InKP->msgh_body.msgh_descriptor_count != 1) ||
3425 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
3426 return MIG_BAD_ARGUMENTS;
3427#endif /* __MigTypeCheck */
3428
3429#if __MigTypeCheck
3430 if (InKP->options.type != MACH_MSG_OOL_DESCRIPTOR ||
3431 InKP->options.size != 24)
3432 return MIG_TYPE_ERROR;
3433#endif /* __MigTypeCheck */
3434
3435 return MACH_MSG_SUCCESS;
3436}
3437#endif /* !defined(__MIG_check__Request__mach_port_construct_t__defined) */
3438#endif /* __MIG_check__Request__mach_port_subsystem__ */
3439#endif /* ( __MigTypeCheck ) */
3440
3441
3442/* Routine mach_port_construct */
3443mig_internal novalue _Xmach_port_construct
3444 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
3445 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
3446 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
3447{
3448
3449#ifdef __MigPackStructs
3450#pragma pack(push, 4)
3451#endif
3452 typedef struct {
3453 NDR_record_t NDR;
3454 uint64_t context;
3455 mach_msg_trailer_t trailer;
3456 char padding[0]; /* Avoid generating empty UData structs */
3457 } RequestU __attribute__((unused));
3458#ifdef __MigPackStructs
3459#pragma pack(pop)
3460#endif
3461 typedef __RequestKData__mach_port_construct_t RequestK;
3462 typedef __RequestUData__mach_port_construct_t __RequestU;
3463 typedef __ReplyKData__mach_port_construct_t ReplyK __attribute__((unused));
3464 typedef __ReplyUData__mach_port_construct_t ReplyU __attribute__((unused));
3465 typedef __Reply__mach_port_construct_t Reply __attribute__((unused));
3466 typedef __Request__mach_port_construct_t __Request __attribute__((unused));
3467
3468 /*
3469 * typedef struct {
3470 * mach_msg_header_t Head;
3471 * NDR_record_t NDR;
3472 * kern_return_t RetCode;
3473 * } mig_reply_error_t;
3474 */
3475
3476 RequestK *InKP = (RequestK *) InHeadP;
3477 RequestU *In0UP = (RequestU *) InDataP;
3478 ReplyK *OutKP = (ReplyK *) OutHeadP;
3479 ReplyU *OutUP = (ReplyU *) OutDataP;
3480 (void)OutUP;
3481#ifdef __MIG_check__Request__mach_port_construct_t__defined
3482 kern_return_t check_result;
3483#endif /* __MIG_check__Request__mach_port_construct_t__defined */
3484
3485#if __MigKernelSpecificCode
3486#else
3487#endif /* __MigKernelSpecificCode */
3488 ipc_space_t task;
3489
3490 __DeclareRcvRpc(3231, "mach_port_construct")
3491 __BeforeRcvRpc(3231, "mach_port_construct")
3492
3493#if defined(__MIG_check__Request__mach_port_construct_t__defined)
3494 check_result = __MIG_check__Request__mach_port_construct_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
3495 if (check_result != MACH_MSG_SUCCESS)
3496 { MIG_RETURN_ERROR(OutKP, check_result); }
3497#endif /* defined(__MIG_check__Request__mach_port_construct_t__defined) */
3498
3499 task = convert_port_to_space(port: InKP->Head.msgh_request_port);
3500
3501 OutUP->RetCode = mach_port_construct(task, options: (mach_port_options_ptr_t)(InKP->options.address), context: In0UP->context, name: &OutUP->name);
3502 space_deallocate(space: task);
3503 if (OutUP->RetCode != KERN_SUCCESS) {
3504 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
3505 }
3506#if __MigKernelSpecificCode
3507#endif /* __MigKernelSpecificCode */
3508
3509 OutUP->NDR = NDR_record;
3510
3511
3512 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
3513 __AfterRcvRpc(3231, "mach_port_construct")
3514}
3515
3516#if ( __MigTypeCheck )
3517#if __MIG_check__Request__mach_port_subsystem__
3518#if !defined(__MIG_check__Request__mach_port_destruct_t__defined)
3519#define __MIG_check__Request__mach_port_destruct_t__defined
3520
3521mig_internal kern_return_t __MIG_check__Request__mach_port_destruct_t(
3522 __attribute__((__unused__)) __RequestKData__mach_port_destruct_t *InKP,
3523 __attribute__((__unused__)) __RequestUData__mach_port_destruct_t *In0UP,
3524 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
3525{
3526
3527 typedef __Request__mach_port_destruct_t __Request;
3528 typedef __RequestUData__mach_port_destruct_t __RequestU __attribute__((unused));
3529#if __MigTypeCheck
3530 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
3531 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
3532 return MIG_BAD_ARGUMENTS;
3533#endif /* __MigTypeCheck */
3534
3535 return MACH_MSG_SUCCESS;
3536}
3537#endif /* !defined(__MIG_check__Request__mach_port_destruct_t__defined) */
3538#endif /* __MIG_check__Request__mach_port_subsystem__ */
3539#endif /* ( __MigTypeCheck ) */
3540
3541
3542/* Routine mach_port_destruct */
3543mig_internal novalue _Xmach_port_destruct
3544 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
3545 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
3546 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
3547{
3548
3549#ifdef __MigPackStructs
3550#pragma pack(push, 4)
3551#endif
3552 typedef struct {
3553 NDR_record_t NDR;
3554 mach_port_name_t name;
3555 mach_port_delta_t srdelta;
3556 uint64_t guard;
3557 mach_msg_trailer_t trailer;
3558 char padding[0]; /* Avoid generating empty UData structs */
3559 } RequestU __attribute__((unused));
3560#ifdef __MigPackStructs
3561#pragma pack(pop)
3562#endif
3563 typedef __RequestKData__mach_port_destruct_t RequestK;
3564 typedef __RequestUData__mach_port_destruct_t __RequestU;
3565 typedef __ReplyKData__mach_port_destruct_t ReplyK __attribute__((unused));
3566 typedef __ReplyUData__mach_port_destruct_t ReplyU __attribute__((unused));
3567 typedef __Reply__mach_port_destruct_t Reply __attribute__((unused));
3568 typedef __Request__mach_port_destruct_t __Request __attribute__((unused));
3569
3570 /*
3571 * typedef struct {
3572 * mach_msg_header_t Head;
3573 * NDR_record_t NDR;
3574 * kern_return_t RetCode;
3575 * } mig_reply_error_t;
3576 */
3577
3578 RequestK *InKP = (RequestK *) InHeadP;
3579 RequestU *In0UP = (RequestU *) InDataP;
3580 ReplyK *OutKP = (ReplyK *) OutHeadP;
3581 ReplyU *OutUP = (ReplyU *) OutDataP;
3582 (void)OutUP;
3583#ifdef __MIG_check__Request__mach_port_destruct_t__defined
3584 kern_return_t check_result;
3585#endif /* __MIG_check__Request__mach_port_destruct_t__defined */
3586
3587#if __MigKernelSpecificCode
3588#else
3589#endif /* __MigKernelSpecificCode */
3590 ipc_space_t task;
3591
3592 __DeclareRcvRpc(3232, "mach_port_destruct")
3593 __BeforeRcvRpc(3232, "mach_port_destruct")
3594
3595#if defined(__MIG_check__Request__mach_port_destruct_t__defined)
3596 check_result = __MIG_check__Request__mach_port_destruct_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
3597 if (check_result != MACH_MSG_SUCCESS)
3598 { MIG_RETURN_ERROR(OutKP, check_result); }
3599#endif /* defined(__MIG_check__Request__mach_port_destruct_t__defined) */
3600
3601 task = convert_port_to_space(port: InKP->Head.msgh_request_port);
3602
3603 OutUP->RetCode = mach_port_destruct(task, name: In0UP->name, srdelta: In0UP->srdelta, guard: In0UP->guard);
3604 space_deallocate(space: task);
3605#if __MigKernelSpecificCode
3606#endif /* __MigKernelSpecificCode */
3607
3608 OutUP->NDR = NDR_record;
3609
3610
3611 __AfterRcvRpc(3232, "mach_port_destruct")
3612}
3613
3614#if ( __MigTypeCheck )
3615#if __MIG_check__Request__mach_port_subsystem__
3616#if !defined(__MIG_check__Request__mach_port_guard_t__defined)
3617#define __MIG_check__Request__mach_port_guard_t__defined
3618
3619mig_internal kern_return_t __MIG_check__Request__mach_port_guard_t(
3620 __attribute__((__unused__)) __RequestKData__mach_port_guard_t *InKP,
3621 __attribute__((__unused__)) __RequestUData__mach_port_guard_t *In0UP,
3622 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
3623{
3624
3625 typedef __Request__mach_port_guard_t __Request;
3626 typedef __RequestUData__mach_port_guard_t __RequestU __attribute__((unused));
3627#if __MigTypeCheck
3628 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
3629 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
3630 return MIG_BAD_ARGUMENTS;
3631#endif /* __MigTypeCheck */
3632
3633 return MACH_MSG_SUCCESS;
3634}
3635#endif /* !defined(__MIG_check__Request__mach_port_guard_t__defined) */
3636#endif /* __MIG_check__Request__mach_port_subsystem__ */
3637#endif /* ( __MigTypeCheck ) */
3638
3639
3640/* Routine mach_port_guard */
3641mig_internal novalue _Xmach_port_guard
3642 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
3643 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
3644 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
3645{
3646
3647#ifdef __MigPackStructs
3648#pragma pack(push, 4)
3649#endif
3650 typedef struct {
3651 NDR_record_t NDR;
3652 mach_port_name_t name;
3653 uint64_t guard;
3654 boolean_t strict;
3655 mach_msg_trailer_t trailer;
3656 char padding[0]; /* Avoid generating empty UData structs */
3657 } RequestU __attribute__((unused));
3658#ifdef __MigPackStructs
3659#pragma pack(pop)
3660#endif
3661 typedef __RequestKData__mach_port_guard_t RequestK;
3662 typedef __RequestUData__mach_port_guard_t __RequestU;
3663 typedef __ReplyKData__mach_port_guard_t ReplyK __attribute__((unused));
3664 typedef __ReplyUData__mach_port_guard_t ReplyU __attribute__((unused));
3665 typedef __Reply__mach_port_guard_t Reply __attribute__((unused));
3666 typedef __Request__mach_port_guard_t __Request __attribute__((unused));
3667
3668 /*
3669 * typedef struct {
3670 * mach_msg_header_t Head;
3671 * NDR_record_t NDR;
3672 * kern_return_t RetCode;
3673 * } mig_reply_error_t;
3674 */
3675
3676 RequestK *InKP = (RequestK *) InHeadP;
3677 RequestU *In0UP = (RequestU *) InDataP;
3678 ReplyK *OutKP = (ReplyK *) OutHeadP;
3679 ReplyU *OutUP = (ReplyU *) OutDataP;
3680 (void)OutUP;
3681#ifdef __MIG_check__Request__mach_port_guard_t__defined
3682 kern_return_t check_result;
3683#endif /* __MIG_check__Request__mach_port_guard_t__defined */
3684
3685#if __MigKernelSpecificCode
3686#else
3687#endif /* __MigKernelSpecificCode */
3688 ipc_space_t task;
3689
3690 __DeclareRcvRpc(3233, "mach_port_guard")
3691 __BeforeRcvRpc(3233, "mach_port_guard")
3692
3693#if defined(__MIG_check__Request__mach_port_guard_t__defined)
3694 check_result = __MIG_check__Request__mach_port_guard_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
3695 if (check_result != MACH_MSG_SUCCESS)
3696 { MIG_RETURN_ERROR(OutKP, check_result); }
3697#endif /* defined(__MIG_check__Request__mach_port_guard_t__defined) */
3698
3699 task = convert_port_to_space(port: InKP->Head.msgh_request_port);
3700
3701 OutUP->RetCode = mach_port_guard(task, name: In0UP->name, guard: In0UP->guard, strict: In0UP->strict);
3702 space_deallocate(space: task);
3703#if __MigKernelSpecificCode
3704#endif /* __MigKernelSpecificCode */
3705
3706 OutUP->NDR = NDR_record;
3707
3708
3709 __AfterRcvRpc(3233, "mach_port_guard")
3710}
3711
3712#if ( __MigTypeCheck )
3713#if __MIG_check__Request__mach_port_subsystem__
3714#if !defined(__MIG_check__Request__mach_port_unguard_t__defined)
3715#define __MIG_check__Request__mach_port_unguard_t__defined
3716
3717mig_internal kern_return_t __MIG_check__Request__mach_port_unguard_t(
3718 __attribute__((__unused__)) __RequestKData__mach_port_unguard_t *InKP,
3719 __attribute__((__unused__)) __RequestUData__mach_port_unguard_t *In0UP,
3720 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
3721{
3722
3723 typedef __Request__mach_port_unguard_t __Request;
3724 typedef __RequestUData__mach_port_unguard_t __RequestU __attribute__((unused));
3725#if __MigTypeCheck
3726 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
3727 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
3728 return MIG_BAD_ARGUMENTS;
3729#endif /* __MigTypeCheck */
3730
3731 return MACH_MSG_SUCCESS;
3732}
3733#endif /* !defined(__MIG_check__Request__mach_port_unguard_t__defined) */
3734#endif /* __MIG_check__Request__mach_port_subsystem__ */
3735#endif /* ( __MigTypeCheck ) */
3736
3737
3738/* Routine mach_port_unguard */
3739mig_internal novalue _Xmach_port_unguard
3740 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
3741 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
3742 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
3743{
3744
3745#ifdef __MigPackStructs
3746#pragma pack(push, 4)
3747#endif
3748 typedef struct {
3749 NDR_record_t NDR;
3750 mach_port_name_t name;
3751 uint64_t guard;
3752 mach_msg_trailer_t trailer;
3753 char padding[0]; /* Avoid generating empty UData structs */
3754 } RequestU __attribute__((unused));
3755#ifdef __MigPackStructs
3756#pragma pack(pop)
3757#endif
3758 typedef __RequestKData__mach_port_unguard_t RequestK;
3759 typedef __RequestUData__mach_port_unguard_t __RequestU;
3760 typedef __ReplyKData__mach_port_unguard_t ReplyK __attribute__((unused));
3761 typedef __ReplyUData__mach_port_unguard_t ReplyU __attribute__((unused));
3762 typedef __Reply__mach_port_unguard_t Reply __attribute__((unused));
3763 typedef __Request__mach_port_unguard_t __Request __attribute__((unused));
3764
3765 /*
3766 * typedef struct {
3767 * mach_msg_header_t Head;
3768 * NDR_record_t NDR;
3769 * kern_return_t RetCode;
3770 * } mig_reply_error_t;
3771 */
3772
3773 RequestK *InKP = (RequestK *) InHeadP;
3774 RequestU *In0UP = (RequestU *) InDataP;
3775 ReplyK *OutKP = (ReplyK *) OutHeadP;
3776 ReplyU *OutUP = (ReplyU *) OutDataP;
3777 (void)OutUP;
3778#ifdef __MIG_check__Request__mach_port_unguard_t__defined
3779 kern_return_t check_result;
3780#endif /* __MIG_check__Request__mach_port_unguard_t__defined */
3781
3782#if __MigKernelSpecificCode
3783#else
3784#endif /* __MigKernelSpecificCode */
3785 ipc_space_t task;
3786
3787 __DeclareRcvRpc(3234, "mach_port_unguard")
3788 __BeforeRcvRpc(3234, "mach_port_unguard")
3789
3790#if defined(__MIG_check__Request__mach_port_unguard_t__defined)
3791 check_result = __MIG_check__Request__mach_port_unguard_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
3792 if (check_result != MACH_MSG_SUCCESS)
3793 { MIG_RETURN_ERROR(OutKP, check_result); }
3794#endif /* defined(__MIG_check__Request__mach_port_unguard_t__defined) */
3795
3796 task = convert_port_to_space(port: InKP->Head.msgh_request_port);
3797
3798 OutUP->RetCode = mach_port_unguard(task, name: In0UP->name, guard: In0UP->guard);
3799 space_deallocate(space: task);
3800#if __MigKernelSpecificCode
3801#endif /* __MigKernelSpecificCode */
3802
3803 OutUP->NDR = NDR_record;
3804
3805
3806 __AfterRcvRpc(3234, "mach_port_unguard")
3807}
3808
3809#if ( __MigTypeCheck )
3810#if __MIG_check__Request__mach_port_subsystem__
3811#if !defined(__MIG_check__Request__mach_port_space_basic_info_t__defined)
3812#define __MIG_check__Request__mach_port_space_basic_info_t__defined
3813
3814mig_internal kern_return_t __MIG_check__Request__mach_port_space_basic_info_t(
3815 __attribute__((__unused__)) __RequestKData__mach_port_space_basic_info_t *InKP,
3816 __attribute__((__unused__)) __RequestUData__mach_port_space_basic_info_t *In0UP,
3817 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
3818{
3819
3820 typedef __Request__mach_port_space_basic_info_t __Request;
3821 typedef __RequestUData__mach_port_space_basic_info_t __RequestU __attribute__((unused));
3822#if __MigTypeCheck
3823 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
3824 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
3825 return MIG_BAD_ARGUMENTS;
3826#endif /* __MigTypeCheck */
3827
3828 return MACH_MSG_SUCCESS;
3829}
3830#endif /* !defined(__MIG_check__Request__mach_port_space_basic_info_t__defined) */
3831#endif /* __MIG_check__Request__mach_port_subsystem__ */
3832#endif /* ( __MigTypeCheck ) */
3833
3834
3835/* Routine mach_port_space_basic_info */
3836mig_internal novalue _Xmach_port_space_basic_info
3837 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
3838 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
3839 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
3840{
3841
3842#ifdef __MigPackStructs
3843#pragma pack(push, 4)
3844#endif
3845 typedef struct {
3846 mach_msg_trailer_t trailer;
3847 char padding[0]; /* Avoid generating empty UData structs */
3848 } RequestU __attribute__((unused));
3849#ifdef __MigPackStructs
3850#pragma pack(pop)
3851#endif
3852 typedef __RequestKData__mach_port_space_basic_info_t RequestK;
3853 typedef __RequestUData__mach_port_space_basic_info_t __RequestU;
3854 typedef __ReplyKData__mach_port_space_basic_info_t ReplyK __attribute__((unused));
3855 typedef __ReplyUData__mach_port_space_basic_info_t ReplyU __attribute__((unused));
3856 typedef __Reply__mach_port_space_basic_info_t Reply __attribute__((unused));
3857 typedef __Request__mach_port_space_basic_info_t __Request __attribute__((unused));
3858
3859 /*
3860 * typedef struct {
3861 * mach_msg_header_t Head;
3862 * NDR_record_t NDR;
3863 * kern_return_t RetCode;
3864 * } mig_reply_error_t;
3865 */
3866
3867 RequestK *InKP = (RequestK *) InHeadP;
3868 RequestU *In0UP = (RequestU *) InDataP;
3869 ReplyK *OutKP = (ReplyK *) OutHeadP;
3870 ReplyU *OutUP = (ReplyU *) OutDataP;
3871 (void)OutUP;
3872#ifdef __MIG_check__Request__mach_port_space_basic_info_t__defined
3873 kern_return_t check_result;
3874#endif /* __MIG_check__Request__mach_port_space_basic_info_t__defined */
3875
3876#if __MigKernelSpecificCode
3877#else
3878#endif /* __MigKernelSpecificCode */
3879 ipc_space_inspect_t task;
3880
3881 __DeclareRcvRpc(3235, "mach_port_space_basic_info")
3882 __BeforeRcvRpc(3235, "mach_port_space_basic_info")
3883
3884#if defined(__MIG_check__Request__mach_port_space_basic_info_t__defined)
3885 check_result = __MIG_check__Request__mach_port_space_basic_info_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
3886 if (check_result != MACH_MSG_SUCCESS)
3887 { MIG_RETURN_ERROR(OutKP, check_result); }
3888#endif /* defined(__MIG_check__Request__mach_port_space_basic_info_t__defined) */
3889
3890 task = convert_port_to_space_inspect(port: InKP->Head.msgh_request_port);
3891
3892 OutUP->RetCode = mach_port_space_basic_info(task, basic_info: &OutUP->basic_info);
3893 space_inspect_deallocate(space: task);
3894 if (OutUP->RetCode != KERN_SUCCESS) {
3895 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
3896 }
3897#if __MigKernelSpecificCode
3898#endif /* __MigKernelSpecificCode */
3899
3900 OutUP->NDR = NDR_record;
3901
3902
3903 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
3904 __AfterRcvRpc(3235, "mach_port_space_basic_info")
3905}
3906
3907#if ( __MigTypeCheck )
3908#if __MIG_check__Request__mach_port_subsystem__
3909#if !defined(__MIG_check__Request__mach_port_special_reply_port_reset_link_t__defined)
3910#define __MIG_check__Request__mach_port_special_reply_port_reset_link_t__defined
3911
3912mig_internal kern_return_t __MIG_check__Request__mach_port_special_reply_port_reset_link_t(
3913 __attribute__((__unused__)) __RequestKData__mach_port_special_reply_port_reset_link_t *InKP,
3914 __attribute__((__unused__)) __RequestUData__mach_port_special_reply_port_reset_link_t *In0UP,
3915 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
3916{
3917
3918 typedef __Request__mach_port_special_reply_port_reset_link_t __Request;
3919 typedef __RequestUData__mach_port_special_reply_port_reset_link_t __RequestU __attribute__((unused));
3920#if __MigTypeCheck
3921 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
3922 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
3923 return MIG_BAD_ARGUMENTS;
3924#endif /* __MigTypeCheck */
3925
3926 return MACH_MSG_SUCCESS;
3927}
3928#endif /* !defined(__MIG_check__Request__mach_port_special_reply_port_reset_link_t__defined) */
3929#endif /* __MIG_check__Request__mach_port_subsystem__ */
3930#endif /* ( __MigTypeCheck ) */
3931
3932
3933/* Routine mach_port_special_reply_port_reset_link */
3934mig_internal novalue _Xmach_port_special_reply_port_reset_link
3935 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
3936 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
3937 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
3938{
3939
3940#ifdef __MigPackStructs
3941#pragma pack(push, 4)
3942#endif
3943 typedef struct {
3944 NDR_record_t NDR;
3945 mach_port_name_t name;
3946 mach_msg_trailer_t trailer;
3947 char padding[0]; /* Avoid generating empty UData structs */
3948 } RequestU __attribute__((unused));
3949#ifdef __MigPackStructs
3950#pragma pack(pop)
3951#endif
3952 typedef __RequestKData__mach_port_special_reply_port_reset_link_t RequestK;
3953 typedef __RequestUData__mach_port_special_reply_port_reset_link_t __RequestU;
3954 typedef __ReplyKData__mach_port_special_reply_port_reset_link_t ReplyK __attribute__((unused));
3955 typedef __ReplyUData__mach_port_special_reply_port_reset_link_t ReplyU __attribute__((unused));
3956 typedef __Reply__mach_port_special_reply_port_reset_link_t Reply __attribute__((unused));
3957 typedef __Request__mach_port_special_reply_port_reset_link_t __Request __attribute__((unused));
3958
3959 /*
3960 * typedef struct {
3961 * mach_msg_header_t Head;
3962 * NDR_record_t NDR;
3963 * kern_return_t RetCode;
3964 * } mig_reply_error_t;
3965 */
3966
3967 RequestK *InKP = (RequestK *) InHeadP;
3968 RequestU *In0UP = (RequestU *) InDataP;
3969 ReplyK *OutKP = (ReplyK *) OutHeadP;
3970 ReplyU *OutUP = (ReplyU *) OutDataP;
3971 (void)OutUP;
3972#ifdef __MIG_check__Request__mach_port_special_reply_port_reset_link_t__defined
3973 kern_return_t check_result;
3974#endif /* __MIG_check__Request__mach_port_special_reply_port_reset_link_t__defined */
3975
3976#if __MigKernelSpecificCode
3977#else
3978#endif /* __MigKernelSpecificCode */
3979 ipc_space_t task;
3980
3981 __DeclareRcvRpc(3236, "mach_port_special_reply_port_reset_link")
3982 __BeforeRcvRpc(3236, "mach_port_special_reply_port_reset_link")
3983
3984#if defined(__MIG_check__Request__mach_port_special_reply_port_reset_link_t__defined)
3985 check_result = __MIG_check__Request__mach_port_special_reply_port_reset_link_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
3986 if (check_result != MACH_MSG_SUCCESS)
3987 { MIG_RETURN_ERROR(OutKP, check_result); }
3988#endif /* defined(__MIG_check__Request__mach_port_special_reply_port_reset_link_t__defined) */
3989
3990 task = convert_port_to_space(port: InKP->Head.msgh_request_port);
3991
3992 OutUP->RetCode = mach_port_special_reply_port_reset_link(task, name: In0UP->name, srp_lost_link: &OutUP->srp_lost_link);
3993 space_deallocate(space: task);
3994 if (OutUP->RetCode != KERN_SUCCESS) {
3995 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
3996 }
3997#if __MigKernelSpecificCode
3998#endif /* __MigKernelSpecificCode */
3999
4000 OutUP->NDR = NDR_record;
4001
4002
4003 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
4004 __AfterRcvRpc(3236, "mach_port_special_reply_port_reset_link")
4005}
4006
4007#if ( __MigTypeCheck )
4008#if __MIG_check__Request__mach_port_subsystem__
4009#if !defined(__MIG_check__Request__mach_port_guard_with_flags_t__defined)
4010#define __MIG_check__Request__mach_port_guard_with_flags_t__defined
4011
4012mig_internal kern_return_t __MIG_check__Request__mach_port_guard_with_flags_t(
4013 __attribute__((__unused__)) __RequestKData__mach_port_guard_with_flags_t *InKP,
4014 __attribute__((__unused__)) __RequestUData__mach_port_guard_with_flags_t *In0UP,
4015 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
4016{
4017
4018 typedef __Request__mach_port_guard_with_flags_t __Request;
4019 typedef __RequestUData__mach_port_guard_with_flags_t __RequestU __attribute__((unused));
4020#if __MigTypeCheck
4021 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
4022 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
4023 return MIG_BAD_ARGUMENTS;
4024#endif /* __MigTypeCheck */
4025
4026 return MACH_MSG_SUCCESS;
4027}
4028#endif /* !defined(__MIG_check__Request__mach_port_guard_with_flags_t__defined) */
4029#endif /* __MIG_check__Request__mach_port_subsystem__ */
4030#endif /* ( __MigTypeCheck ) */
4031
4032
4033/* Routine mach_port_guard_with_flags */
4034mig_internal novalue _Xmach_port_guard_with_flags
4035 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
4036 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
4037 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
4038{
4039
4040#ifdef __MigPackStructs
4041#pragma pack(push, 4)
4042#endif
4043 typedef struct {
4044 NDR_record_t NDR;
4045 mach_port_name_t name;
4046 uint64_t guard;
4047 uint64_t flags;
4048 mach_msg_trailer_t trailer;
4049 char padding[0]; /* Avoid generating empty UData structs */
4050 } RequestU __attribute__((unused));
4051#ifdef __MigPackStructs
4052#pragma pack(pop)
4053#endif
4054 typedef __RequestKData__mach_port_guard_with_flags_t RequestK;
4055 typedef __RequestUData__mach_port_guard_with_flags_t __RequestU;
4056 typedef __ReplyKData__mach_port_guard_with_flags_t ReplyK __attribute__((unused));
4057 typedef __ReplyUData__mach_port_guard_with_flags_t ReplyU __attribute__((unused));
4058 typedef __Reply__mach_port_guard_with_flags_t Reply __attribute__((unused));
4059 typedef __Request__mach_port_guard_with_flags_t __Request __attribute__((unused));
4060
4061 /*
4062 * typedef struct {
4063 * mach_msg_header_t Head;
4064 * NDR_record_t NDR;
4065 * kern_return_t RetCode;
4066 * } mig_reply_error_t;
4067 */
4068
4069 RequestK *InKP = (RequestK *) InHeadP;
4070 RequestU *In0UP = (RequestU *) InDataP;
4071 ReplyK *OutKP = (ReplyK *) OutHeadP;
4072 ReplyU *OutUP = (ReplyU *) OutDataP;
4073 (void)OutUP;
4074#ifdef __MIG_check__Request__mach_port_guard_with_flags_t__defined
4075 kern_return_t check_result;
4076#endif /* __MIG_check__Request__mach_port_guard_with_flags_t__defined */
4077
4078#if __MigKernelSpecificCode
4079#else
4080#endif /* __MigKernelSpecificCode */
4081 ipc_space_t task;
4082
4083 __DeclareRcvRpc(3237, "mach_port_guard_with_flags")
4084 __BeforeRcvRpc(3237, "mach_port_guard_with_flags")
4085
4086#if defined(__MIG_check__Request__mach_port_guard_with_flags_t__defined)
4087 check_result = __MIG_check__Request__mach_port_guard_with_flags_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
4088 if (check_result != MACH_MSG_SUCCESS)
4089 { MIG_RETURN_ERROR(OutKP, check_result); }
4090#endif /* defined(__MIG_check__Request__mach_port_guard_with_flags_t__defined) */
4091
4092 task = convert_port_to_space(port: InKP->Head.msgh_request_port);
4093
4094 OutUP->RetCode = mach_port_guard_with_flags(task, name: In0UP->name, guard: In0UP->guard, flags: In0UP->flags);
4095 space_deallocate(space: task);
4096#if __MigKernelSpecificCode
4097#endif /* __MigKernelSpecificCode */
4098
4099 OutUP->NDR = NDR_record;
4100
4101
4102 __AfterRcvRpc(3237, "mach_port_guard_with_flags")
4103}
4104
4105#if ( __MigTypeCheck )
4106#if __MIG_check__Request__mach_port_subsystem__
4107#if !defined(__MIG_check__Request__mach_port_swap_guard_t__defined)
4108#define __MIG_check__Request__mach_port_swap_guard_t__defined
4109
4110mig_internal kern_return_t __MIG_check__Request__mach_port_swap_guard_t(
4111 __attribute__((__unused__)) __RequestKData__mach_port_swap_guard_t *InKP,
4112 __attribute__((__unused__)) __RequestUData__mach_port_swap_guard_t *In0UP,
4113 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
4114{
4115
4116 typedef __Request__mach_port_swap_guard_t __Request;
4117 typedef __RequestUData__mach_port_swap_guard_t __RequestU __attribute__((unused));
4118#if __MigTypeCheck
4119 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
4120 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
4121 return MIG_BAD_ARGUMENTS;
4122#endif /* __MigTypeCheck */
4123
4124 return MACH_MSG_SUCCESS;
4125}
4126#endif /* !defined(__MIG_check__Request__mach_port_swap_guard_t__defined) */
4127#endif /* __MIG_check__Request__mach_port_subsystem__ */
4128#endif /* ( __MigTypeCheck ) */
4129
4130
4131/* Routine mach_port_swap_guard */
4132mig_internal novalue _Xmach_port_swap_guard
4133 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
4134 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
4135 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
4136{
4137
4138#ifdef __MigPackStructs
4139#pragma pack(push, 4)
4140#endif
4141 typedef struct {
4142 NDR_record_t NDR;
4143 mach_port_name_t name;
4144 uint64_t old_guard;
4145 uint64_t new_guard;
4146 mach_msg_trailer_t trailer;
4147 char padding[0]; /* Avoid generating empty UData structs */
4148 } RequestU __attribute__((unused));
4149#ifdef __MigPackStructs
4150#pragma pack(pop)
4151#endif
4152 typedef __RequestKData__mach_port_swap_guard_t RequestK;
4153 typedef __RequestUData__mach_port_swap_guard_t __RequestU;
4154 typedef __ReplyKData__mach_port_swap_guard_t ReplyK __attribute__((unused));
4155 typedef __ReplyUData__mach_port_swap_guard_t ReplyU __attribute__((unused));
4156 typedef __Reply__mach_port_swap_guard_t Reply __attribute__((unused));
4157 typedef __Request__mach_port_swap_guard_t __Request __attribute__((unused));
4158
4159 /*
4160 * typedef struct {
4161 * mach_msg_header_t Head;
4162 * NDR_record_t NDR;
4163 * kern_return_t RetCode;
4164 * } mig_reply_error_t;
4165 */
4166
4167 RequestK *InKP = (RequestK *) InHeadP;
4168 RequestU *In0UP = (RequestU *) InDataP;
4169 ReplyK *OutKP = (ReplyK *) OutHeadP;
4170 ReplyU *OutUP = (ReplyU *) OutDataP;
4171 (void)OutUP;
4172#ifdef __MIG_check__Request__mach_port_swap_guard_t__defined
4173 kern_return_t check_result;
4174#endif /* __MIG_check__Request__mach_port_swap_guard_t__defined */
4175
4176#if __MigKernelSpecificCode
4177#else
4178#endif /* __MigKernelSpecificCode */
4179 ipc_space_t task;
4180
4181 __DeclareRcvRpc(3238, "mach_port_swap_guard")
4182 __BeforeRcvRpc(3238, "mach_port_swap_guard")
4183
4184#if defined(__MIG_check__Request__mach_port_swap_guard_t__defined)
4185 check_result = __MIG_check__Request__mach_port_swap_guard_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
4186 if (check_result != MACH_MSG_SUCCESS)
4187 { MIG_RETURN_ERROR(OutKP, check_result); }
4188#endif /* defined(__MIG_check__Request__mach_port_swap_guard_t__defined) */
4189
4190 task = convert_port_to_space(port: InKP->Head.msgh_request_port);
4191
4192 OutUP->RetCode = mach_port_swap_guard(task, name: In0UP->name, old_guard: In0UP->old_guard, new_guard: In0UP->new_guard);
4193 space_deallocate(space: task);
4194#if __MigKernelSpecificCode
4195#endif /* __MigKernelSpecificCode */
4196
4197 OutUP->NDR = NDR_record;
4198
4199
4200 __AfterRcvRpc(3238, "mach_port_swap_guard")
4201}
4202
4203#if ( __MigTypeCheck )
4204#if __MIG_check__Request__mach_port_subsystem__
4205#if !defined(__MIG_check__Request__mach_port_kobject_description_from_user_t__defined)
4206#define __MIG_check__Request__mach_port_kobject_description_from_user_t__defined
4207
4208mig_internal kern_return_t __MIG_check__Request__mach_port_kobject_description_from_user_t(
4209 __attribute__((__unused__)) __RequestKData__mach_port_kobject_description_from_user_t *InKP,
4210 __attribute__((__unused__)) __RequestUData__mach_port_kobject_description_from_user_t *In0UP,
4211 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
4212{
4213
4214 typedef __Request__mach_port_kobject_description_from_user_t __Request;
4215 typedef __RequestUData__mach_port_kobject_description_from_user_t __RequestU __attribute__((unused));
4216#if __MigTypeCheck
4217 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
4218 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
4219 return MIG_BAD_ARGUMENTS;
4220#endif /* __MigTypeCheck */
4221
4222 return MACH_MSG_SUCCESS;
4223}
4224#endif /* !defined(__MIG_check__Request__mach_port_kobject_description_from_user_t__defined) */
4225#endif /* __MIG_check__Request__mach_port_subsystem__ */
4226#endif /* ( __MigTypeCheck ) */
4227
4228
4229/* Routine mach_port_kobject_description_from_user */
4230mig_internal novalue _Xmach_port_kobject_description_from_user
4231 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
4232 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
4233 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
4234{
4235
4236#ifdef __MigPackStructs
4237#pragma pack(push, 4)
4238#endif
4239 typedef struct {
4240 NDR_record_t NDR;
4241 mach_port_name_t name;
4242 mach_msg_trailer_t trailer;
4243 char padding[0]; /* Avoid generating empty UData structs */
4244 } RequestU __attribute__((unused));
4245#ifdef __MigPackStructs
4246#pragma pack(pop)
4247#endif
4248 typedef __RequestKData__mach_port_kobject_description_from_user_t RequestK;
4249 typedef __RequestUData__mach_port_kobject_description_from_user_t __RequestU;
4250 typedef __ReplyKData__mach_port_kobject_description_from_user_t ReplyK __attribute__((unused));
4251 typedef __ReplyUData__mach_port_kobject_description_from_user_t ReplyU __attribute__((unused));
4252 typedef __Reply__mach_port_kobject_description_from_user_t Reply __attribute__((unused));
4253 typedef __Request__mach_port_kobject_description_from_user_t __Request __attribute__((unused));
4254
4255 /*
4256 * typedef struct {
4257 * mach_msg_header_t Head;
4258 * NDR_record_t NDR;
4259 * kern_return_t RetCode;
4260 * } mig_reply_error_t;
4261 */
4262
4263 RequestK *InKP = (RequestK *) InHeadP;
4264 RequestU *In0UP = (RequestU *) InDataP;
4265 ReplyK *OutKP = (ReplyK *) OutHeadP;
4266 ReplyU *OutUP = (ReplyU *) OutDataP;
4267 (void)OutUP;
4268#ifdef __MIG_check__Request__mach_port_kobject_description_from_user_t__defined
4269 kern_return_t check_result;
4270#endif /* __MIG_check__Request__mach_port_kobject_description_from_user_t__defined */
4271
4272#if __MigKernelSpecificCode
4273#else
4274#endif /* __MigKernelSpecificCode */
4275 __DeclareRcvRpc(3239, "mach_port_kobject_description_from_user")
4276 __BeforeRcvRpc(3239, "mach_port_kobject_description_from_user")
4277
4278#if defined(__MIG_check__Request__mach_port_kobject_description_from_user_t__defined)
4279 check_result = __MIG_check__Request__mach_port_kobject_description_from_user_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
4280 if (check_result != MACH_MSG_SUCCESS)
4281 { MIG_RETURN_ERROR(OutKP, check_result); }
4282#endif /* defined(__MIG_check__Request__mach_port_kobject_description_from_user_t__defined) */
4283
4284 OutUP->RetCode = mach_port_kobject_description_from_user(port: InKP->Head.msgh_request_port, name: In0UP->name, object_type: &OutUP->object_type, object_addr: &OutUP->object_addr, description: OutUP->description);
4285 if (OutUP->RetCode != KERN_SUCCESS) {
4286 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
4287 }
4288#if __MigKernelSpecificCode
4289#endif /* __MigKernelSpecificCode */
4290
4291 OutUP->NDR = NDR_record;
4292
4293#ifdef __LP64__
4294 {
4295 size_t strLength = strlen(s: OutUP->description) + 1;
4296 if (strLength > 0xffffffff)
4297 MIG_RETURN_ERROR(OutKP, MIG_BAD_ARGUMENTS);
4298 OutUP->descriptionCnt = (mach_msg_type_number_t) strLength;
4299 }
4300#else
4301 OutUP->descriptionCnt = (mach_msg_type_number_t) strlen(OutUP->description) + 1;
4302#endif /* __LP64__ */
4303 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply) - 512) + (_WALIGN_((OutUP->descriptionCnt + 3) & ~3));
4304
4305 __AfterRcvRpc(3239, "mach_port_kobject_description_from_user")
4306}
4307
4308#if ( __MigTypeCheck )
4309#if __MIG_check__Request__mach_port_subsystem__
4310#if !defined(__MIG_check__Request__mach_port_is_connection_for_service_t__defined)
4311#define __MIG_check__Request__mach_port_is_connection_for_service_t__defined
4312
4313mig_internal kern_return_t __MIG_check__Request__mach_port_is_connection_for_service_t(
4314 __attribute__((__unused__)) __RequestKData__mach_port_is_connection_for_service_t *InKP,
4315 __attribute__((__unused__)) __RequestUData__mach_port_is_connection_for_service_t *In0UP,
4316 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
4317{
4318
4319 typedef __Request__mach_port_is_connection_for_service_t __Request;
4320 typedef __RequestUData__mach_port_is_connection_for_service_t __RequestU __attribute__((unused));
4321#if __MigTypeCheck
4322 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
4323 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
4324 return MIG_BAD_ARGUMENTS;
4325#endif /* __MigTypeCheck */
4326
4327 return MACH_MSG_SUCCESS;
4328}
4329#endif /* !defined(__MIG_check__Request__mach_port_is_connection_for_service_t__defined) */
4330#endif /* __MIG_check__Request__mach_port_subsystem__ */
4331#endif /* ( __MigTypeCheck ) */
4332
4333
4334/* Routine mach_port_is_connection_for_service */
4335mig_internal novalue _Xmach_port_is_connection_for_service
4336 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
4337 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
4338 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
4339{
4340
4341#ifdef __MigPackStructs
4342#pragma pack(push, 4)
4343#endif
4344 typedef struct {
4345 NDR_record_t NDR;
4346 mach_port_name_t connection_port;
4347 mach_port_name_t service_port;
4348 mach_msg_trailer_t trailer;
4349 char padding[0]; /* Avoid generating empty UData structs */
4350 } RequestU __attribute__((unused));
4351#ifdef __MigPackStructs
4352#pragma pack(pop)
4353#endif
4354 typedef __RequestKData__mach_port_is_connection_for_service_t RequestK;
4355 typedef __RequestUData__mach_port_is_connection_for_service_t __RequestU;
4356 typedef __ReplyKData__mach_port_is_connection_for_service_t ReplyK __attribute__((unused));
4357 typedef __ReplyUData__mach_port_is_connection_for_service_t ReplyU __attribute__((unused));
4358 typedef __Reply__mach_port_is_connection_for_service_t Reply __attribute__((unused));
4359 typedef __Request__mach_port_is_connection_for_service_t __Request __attribute__((unused));
4360
4361 /*
4362 * typedef struct {
4363 * mach_msg_header_t Head;
4364 * NDR_record_t NDR;
4365 * kern_return_t RetCode;
4366 * } mig_reply_error_t;
4367 */
4368
4369 RequestK *InKP = (RequestK *) InHeadP;
4370 RequestU *In0UP = (RequestU *) InDataP;
4371 ReplyK *OutKP = (ReplyK *) OutHeadP;
4372 ReplyU *OutUP = (ReplyU *) OutDataP;
4373 (void)OutUP;
4374#ifdef __MIG_check__Request__mach_port_is_connection_for_service_t__defined
4375 kern_return_t check_result;
4376#endif /* __MIG_check__Request__mach_port_is_connection_for_service_t__defined */
4377
4378#if __MigKernelSpecificCode
4379#else
4380#endif /* __MigKernelSpecificCode */
4381 ipc_space_t task;
4382
4383 __DeclareRcvRpc(3240, "mach_port_is_connection_for_service")
4384 __BeforeRcvRpc(3240, "mach_port_is_connection_for_service")
4385
4386#if defined(__MIG_check__Request__mach_port_is_connection_for_service_t__defined)
4387 check_result = __MIG_check__Request__mach_port_is_connection_for_service_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
4388 if (check_result != MACH_MSG_SUCCESS)
4389 { MIG_RETURN_ERROR(OutKP, check_result); }
4390#endif /* defined(__MIG_check__Request__mach_port_is_connection_for_service_t__defined) */
4391
4392 task = convert_port_to_space(port: InKP->Head.msgh_request_port);
4393
4394 OutUP->RetCode = mach_port_is_connection_for_service(task, connection_port: In0UP->connection_port, service_port: In0UP->service_port, filter_policy_id: &OutUP->filter_policy_id);
4395 space_deallocate(space: task);
4396 if (OutUP->RetCode != KERN_SUCCESS) {
4397 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
4398 }
4399#if __MigKernelSpecificCode
4400#endif /* __MigKernelSpecificCode */
4401
4402 OutUP->NDR = NDR_record;
4403
4404
4405 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
4406 __AfterRcvRpc(3240, "mach_port_is_connection_for_service")
4407}
4408
4409#if ( __MigTypeCheck )
4410#if __MIG_check__Request__mach_port_subsystem__
4411#if !defined(__MIG_check__Request__mach_port_get_service_port_info_t__defined)
4412#define __MIG_check__Request__mach_port_get_service_port_info_t__defined
4413
4414mig_internal kern_return_t __MIG_check__Request__mach_port_get_service_port_info_t(
4415 __attribute__((__unused__)) __RequestKData__mach_port_get_service_port_info_t *InKP,
4416 __attribute__((__unused__)) __RequestUData__mach_port_get_service_port_info_t *In0UP,
4417 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
4418{
4419
4420 typedef __Request__mach_port_get_service_port_info_t __Request;
4421 typedef __RequestUData__mach_port_get_service_port_info_t __RequestU __attribute__((unused));
4422#if __MigTypeCheck
4423 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
4424 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
4425 return MIG_BAD_ARGUMENTS;
4426#endif /* __MigTypeCheck */
4427
4428 return MACH_MSG_SUCCESS;
4429}
4430#endif /* !defined(__MIG_check__Request__mach_port_get_service_port_info_t__defined) */
4431#endif /* __MIG_check__Request__mach_port_subsystem__ */
4432#endif /* ( __MigTypeCheck ) */
4433
4434
4435/* Routine mach_port_get_service_port_info */
4436mig_internal novalue _Xmach_port_get_service_port_info
4437 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
4438 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
4439 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
4440{
4441
4442#ifdef __MigPackStructs
4443#pragma pack(push, 4)
4444#endif
4445 typedef struct {
4446 NDR_record_t NDR;
4447 mach_port_name_t name;
4448 mach_msg_trailer_t trailer;
4449 char padding[0]; /* Avoid generating empty UData structs */
4450 } RequestU __attribute__((unused));
4451#ifdef __MigPackStructs
4452#pragma pack(pop)
4453#endif
4454 typedef __RequestKData__mach_port_get_service_port_info_t RequestK;
4455 typedef __RequestUData__mach_port_get_service_port_info_t __RequestU;
4456 typedef __ReplyKData__mach_port_get_service_port_info_t ReplyK __attribute__((unused));
4457 typedef __ReplyUData__mach_port_get_service_port_info_t ReplyU __attribute__((unused));
4458 typedef __Reply__mach_port_get_service_port_info_t Reply __attribute__((unused));
4459 typedef __Request__mach_port_get_service_port_info_t __Request __attribute__((unused));
4460
4461 /*
4462 * typedef struct {
4463 * mach_msg_header_t Head;
4464 * NDR_record_t NDR;
4465 * kern_return_t RetCode;
4466 * } mig_reply_error_t;
4467 */
4468
4469 RequestK *InKP = (RequestK *) InHeadP;
4470 RequestU *In0UP = (RequestU *) InDataP;
4471 ReplyK *OutKP = (ReplyK *) OutHeadP;
4472 ReplyU *OutUP = (ReplyU *) OutDataP;
4473 (void)OutUP;
4474#ifdef __MIG_check__Request__mach_port_get_service_port_info_t__defined
4475 kern_return_t check_result;
4476#endif /* __MIG_check__Request__mach_port_get_service_port_info_t__defined */
4477
4478#if __MigKernelSpecificCode
4479#else
4480#endif /* __MigKernelSpecificCode */
4481 ipc_space_read_t task;
4482
4483 __DeclareRcvRpc(3241, "mach_port_get_service_port_info")
4484 __BeforeRcvRpc(3241, "mach_port_get_service_port_info")
4485
4486#if defined(__MIG_check__Request__mach_port_get_service_port_info_t__defined)
4487 check_result = __MIG_check__Request__mach_port_get_service_port_info_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
4488 if (check_result != MACH_MSG_SUCCESS)
4489 { MIG_RETURN_ERROR(OutKP, check_result); }
4490#endif /* defined(__MIG_check__Request__mach_port_get_service_port_info_t__defined) */
4491
4492 task = convert_port_to_space_read(port: InKP->Head.msgh_request_port);
4493
4494 OutUP->RetCode = mach_port_get_service_port_info(task, name: In0UP->name, sp_info_out: &OutUP->sp_info_out);
4495 space_read_deallocate(space: task);
4496 if (OutUP->RetCode != KERN_SUCCESS) {
4497 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
4498 }
4499#if __MigKernelSpecificCode
4500#endif /* __MigKernelSpecificCode */
4501
4502 OutUP->NDR = NDR_record;
4503
4504
4505 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
4506 __AfterRcvRpc(3241, "mach_port_get_service_port_info")
4507}
4508
4509#if ( __MigTypeCheck )
4510#if __MIG_check__Request__mach_port_subsystem__
4511#if !defined(__MIG_check__Request__mach_port_assert_attributes_t__defined)
4512#define __MIG_check__Request__mach_port_assert_attributes_t__defined
4513
4514mig_internal kern_return_t __MIG_check__Request__mach_port_assert_attributes_t(
4515 __attribute__((__unused__)) __RequestKData__mach_port_assert_attributes_t *InKP,
4516 __attribute__((__unused__)) __RequestUData__mach_port_assert_attributes_t *In0UP,
4517 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
4518{
4519
4520 typedef __Request__mach_port_assert_attributes_t __Request;
4521 typedef __RequestUData__mach_port_assert_attributes_t __RequestU __attribute__((unused));
4522#if __MigTypeCheck
4523 unsigned int msgh_size;
4524#endif /* __MigTypeCheck */
4525
4526#if __MigTypeCheck
4527 msgh_size = InKP->Head.msgh_size;
4528 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
4529 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 68)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)))
4530 return MIG_BAD_ARGUMENTS;
4531#endif /* __MigTypeCheck */
4532
4533#if defined(__NDR_convert__int_rep__Request__mach_port_assert_attributes_t__infoCnt__defined)
4534 if (In0UP->NDR.int_rep != NDR_record.int_rep)
4535 __NDR_convert__int_rep__Request__mach_port_assert_attributes_t__infoCnt(&In0UP->infoCnt, In0UP->NDR.int_rep);
4536#endif /* __NDR_convert__int_rep__Request__mach_port_assert_attributes_t__infoCnt__defined */
4537#if __MigTypeCheck
4538 if (In0UP->infoCnt > 17)
4539 return MIG_BAD_ARGUMENTS;
4540 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 68)) / 4 < In0UP->infoCnt) ||
4541 (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 68) + (4 * In0UP->infoCnt)))
4542 return MIG_BAD_ARGUMENTS;
4543#endif /* __MigTypeCheck */
4544
4545 return MACH_MSG_SUCCESS;
4546}
4547#endif /* !defined(__MIG_check__Request__mach_port_assert_attributes_t__defined) */
4548#endif /* __MIG_check__Request__mach_port_subsystem__ */
4549#endif /* ( __MigTypeCheck ) */
4550
4551
4552/* Routine mach_port_assert_attributes */
4553mig_internal novalue _Xmach_port_assert_attributes
4554 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
4555 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
4556 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
4557{
4558
4559#ifdef __MigPackStructs
4560#pragma pack(push, 4)
4561#endif
4562 typedef struct {
4563 NDR_record_t NDR;
4564 mach_port_name_t name;
4565 mach_port_flavor_t flavor;
4566 mach_msg_type_number_t infoCnt;
4567 integer_t info[17];
4568 mach_msg_trailer_t trailer;
4569 char padding[0]; /* Avoid generating empty UData structs */
4570 } RequestU __attribute__((unused));
4571#ifdef __MigPackStructs
4572#pragma pack(pop)
4573#endif
4574 typedef __RequestKData__mach_port_assert_attributes_t RequestK;
4575 typedef __RequestUData__mach_port_assert_attributes_t __RequestU;
4576 typedef __ReplyKData__mach_port_assert_attributes_t ReplyK __attribute__((unused));
4577 typedef __ReplyUData__mach_port_assert_attributes_t ReplyU __attribute__((unused));
4578 typedef __Reply__mach_port_assert_attributes_t Reply __attribute__((unused));
4579 typedef __Request__mach_port_assert_attributes_t __Request __attribute__((unused));
4580
4581 /*
4582 * typedef struct {
4583 * mach_msg_header_t Head;
4584 * NDR_record_t NDR;
4585 * kern_return_t RetCode;
4586 * } mig_reply_error_t;
4587 */
4588
4589 RequestK *InKP = (RequestK *) InHeadP;
4590 RequestU *In0UP = (RequestU *) InDataP;
4591 ReplyK *OutKP = (ReplyK *) OutHeadP;
4592 ReplyU *OutUP = (ReplyU *) OutDataP;
4593 (void)OutUP;
4594#ifdef __MIG_check__Request__mach_port_assert_attributes_t__defined
4595 kern_return_t check_result;
4596#endif /* __MIG_check__Request__mach_port_assert_attributes_t__defined */
4597
4598#if __MigKernelSpecificCode
4599#else
4600#endif /* __MigKernelSpecificCode */
4601 ipc_space_t task;
4602
4603 __DeclareRcvRpc(3242, "mach_port_assert_attributes")
4604 __BeforeRcvRpc(3242, "mach_port_assert_attributes")
4605
4606#if defined(__MIG_check__Request__mach_port_assert_attributes_t__defined)
4607 check_result = __MIG_check__Request__mach_port_assert_attributes_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
4608 if (check_result != MACH_MSG_SUCCESS)
4609 { MIG_RETURN_ERROR(OutKP, check_result); }
4610#endif /* defined(__MIG_check__Request__mach_port_assert_attributes_t__defined) */
4611
4612 task = convert_port_to_space(port: InKP->Head.msgh_request_port);
4613
4614 OutUP->RetCode = mach_port_assert_attributes(task, name: In0UP->name, flavor: In0UP->flavor, info: In0UP->info, infoCnt: In0UP->infoCnt);
4615 space_deallocate(space: task);
4616#if __MigKernelSpecificCode
4617#endif /* __MigKernelSpecificCode */
4618
4619 OutUP->NDR = NDR_record;
4620
4621
4622 __AfterRcvRpc(3242, "mach_port_assert_attributes")
4623}
4624
4625
4626
4627/* Description of this kernel subsystem, for use in direct RPC */
4628const struct mach_port_subsystem mach_port_subsystem = {
4629 mach_port_server_routine,
4630 3200,
4631 3243,
4632 (mach_msg_size_t)sizeof(union __ReplyUnion__mach_port_subsystem),
4633 (vm_address_t)0,
4634 {
4635 { (mig_impl_routine_t) 0,
4636 (mig_stub_kern_routine_t) _Xmach_port_names, 5, 0, 2, (mach_msg_size_t)sizeof(__Reply__mach_port_names_t)},
4637 { .impl_routine: (mig_impl_routine_t) 0,
4638 .kstub_routine: (mig_stub_kern_routine_t) _Xmach_port_type, .argc: 3, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__mach_port_type_t)},
4639 {.impl_routine: 0, .kstub_routine: 0, .argc: 0, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: 0},
4640 { .impl_routine: (mig_impl_routine_t) 0,
4641 .kstub_routine: (mig_stub_kern_routine_t) _Xmach_port_allocate_name, .argc: 3, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__mach_port_allocate_name_t)},
4642 { .impl_routine: (mig_impl_routine_t) 0,
4643 .kstub_routine: (mig_stub_kern_routine_t) _Xmach_port_allocate, .argc: 3, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__mach_port_allocate_t)},
4644 { .impl_routine: (mig_impl_routine_t) 0,
4645 .kstub_routine: (mig_stub_kern_routine_t) _Xmach_port_destroy, .argc: 2, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__mach_port_destroy_t)},
4646 { .impl_routine: (mig_impl_routine_t) 0,
4647 .kstub_routine: (mig_stub_kern_routine_t) _Xmach_port_deallocate, .argc: 2, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__mach_port_deallocate_t)},
4648 { .impl_routine: (mig_impl_routine_t) 0,
4649 .kstub_routine: (mig_stub_kern_routine_t) _Xmach_port_get_refs, .argc: 4, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__mach_port_get_refs_t)},
4650 { .impl_routine: (mig_impl_routine_t) 0,
4651 .kstub_routine: (mig_stub_kern_routine_t) _Xmach_port_mod_refs, .argc: 4, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__mach_port_mod_refs_t)},
4652 { .impl_routine: (mig_impl_routine_t) 0,
4653 .kstub_routine: (mig_stub_kern_routine_t) _Xmach_port_peek, .argc: 8, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__mach_port_peek_t)},
4654 { .impl_routine: (mig_impl_routine_t) 0,
4655 .kstub_routine: (mig_stub_kern_routine_t) _Xmach_port_set_mscount, .argc: 3, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__mach_port_set_mscount_t)},
4656 { .impl_routine: (mig_impl_routine_t) 0,
4657 .kstub_routine: (mig_stub_kern_routine_t) _Xmach_port_get_set_status_from_user, .argc: 4, .descr_count: 0, .reply_descr_count: 1, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__mach_port_get_set_status_from_user_t)},
4658 { .impl_routine: (mig_impl_routine_t) 0,
4659 .kstub_routine: (mig_stub_kern_routine_t) _Xmach_port_move_member, .argc: 3, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__mach_port_move_member_t)},
4660 { .impl_routine: (mig_impl_routine_t) 0,
4661 .kstub_routine: (mig_stub_kern_routine_t) _Xmach_port_request_notification, .argc: 6, .descr_count: 0, .reply_descr_count: 1, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__mach_port_request_notification_t)},
4662 { .impl_routine: (mig_impl_routine_t) 0,
4663 .kstub_routine: (mig_stub_kern_routine_t) _Xmach_port_insert_right, .argc: 4, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__mach_port_insert_right_t)},
4664 { .impl_routine: (mig_impl_routine_t) 0,
4665 .kstub_routine: (mig_stub_kern_routine_t) _Xmach_port_extract_right, .argc: 5, .descr_count: 0, .reply_descr_count: 1, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__mach_port_extract_right_t)},
4666 { .impl_routine: (mig_impl_routine_t) 0,
4667 .kstub_routine: (mig_stub_kern_routine_t) _Xmach_port_set_seqno, .argc: 3, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__mach_port_set_seqno_t)},
4668 { .impl_routine: (mig_impl_routine_t) 0,
4669 .kstub_routine: (mig_stub_kern_routine_t) _Xmach_port_get_attributes_from_user, .argc: 5, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__mach_port_get_attributes_from_user_t)},
4670 { .impl_routine: (mig_impl_routine_t) 0,
4671 .kstub_routine: (mig_stub_kern_routine_t) _Xmach_port_set_attributes, .argc: 5, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__mach_port_set_attributes_t)},
4672 { .impl_routine: (mig_impl_routine_t) 0,
4673 .kstub_routine: (mig_stub_kern_routine_t) _Xmach_port_allocate_qos, .argc: 4, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__mach_port_allocate_qos_t)},
4674 { .impl_routine: (mig_impl_routine_t) 0,
4675 .kstub_routine: (mig_stub_kern_routine_t) _Xmach_port_allocate_full, .argc: 5, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__mach_port_allocate_full_t)},
4676 { .impl_routine: (mig_impl_routine_t) 0,
4677 .kstub_routine: (mig_stub_kern_routine_t) _Xtask_set_port_space, .argc: 2, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__task_set_port_space_t)},
4678 { .impl_routine: (mig_impl_routine_t) 0,
4679 .kstub_routine: (mig_stub_kern_routine_t) _Xmach_port_get_srights, .argc: 3, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__mach_port_get_srights_t)},
4680 { .impl_routine: (mig_impl_routine_t) 0,
4681 .kstub_routine: (mig_stub_kern_routine_t) _Xmach_port_space_info_from_user, .argc: 6, .descr_count: 0, .reply_descr_count: 2, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__mach_port_space_info_from_user_t)},
4682 { .impl_routine: (mig_impl_routine_t) 0,
4683 .kstub_routine: (mig_stub_kern_routine_t) _Xmach_port_dnrequest_info, .argc: 4, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__mach_port_dnrequest_info_t)},
4684 {.impl_routine: 0, .kstub_routine: 0, .argc: 0, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: 0},
4685 { .impl_routine: (mig_impl_routine_t) 0,
4686 .kstub_routine: (mig_stub_kern_routine_t) _Xmach_port_insert_member, .argc: 3, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__mach_port_insert_member_t)},
4687 { .impl_routine: (mig_impl_routine_t) 0,
4688 .kstub_routine: (mig_stub_kern_routine_t) _Xmach_port_extract_member, .argc: 3, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__mach_port_extract_member_t)},
4689 { .impl_routine: (mig_impl_routine_t) 0,
4690 .kstub_routine: (mig_stub_kern_routine_t) _Xmach_port_get_context_from_user, .argc: 3, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__mach_port_get_context_from_user_t)},
4691 { .impl_routine: (mig_impl_routine_t) 0,
4692 .kstub_routine: (mig_stub_kern_routine_t) _Xmach_port_set_context, .argc: 4, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__mach_port_set_context_t)},
4693 { .impl_routine: (mig_impl_routine_t) 0,
4694 .kstub_routine: (mig_stub_kern_routine_t) _Xmach_port_kobject_from_user, .argc: 4, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__mach_port_kobject_from_user_t)},
4695 { .impl_routine: (mig_impl_routine_t) 0,
4696 .kstub_routine: (mig_stub_kern_routine_t) _Xmach_port_construct, .argc: 5, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__mach_port_construct_t)},
4697 { .impl_routine: (mig_impl_routine_t) 0,
4698 .kstub_routine: (mig_stub_kern_routine_t) _Xmach_port_destruct, .argc: 5, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__mach_port_destruct_t)},
4699 { .impl_routine: (mig_impl_routine_t) 0,
4700 .kstub_routine: (mig_stub_kern_routine_t) _Xmach_port_guard, .argc: 5, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__mach_port_guard_t)},
4701 { .impl_routine: (mig_impl_routine_t) 0,
4702 .kstub_routine: (mig_stub_kern_routine_t) _Xmach_port_unguard, .argc: 4, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__mach_port_unguard_t)},
4703 { .impl_routine: (mig_impl_routine_t) 0,
4704 .kstub_routine: (mig_stub_kern_routine_t) _Xmach_port_space_basic_info, .argc: 2, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__mach_port_space_basic_info_t)},
4705 { .impl_routine: (mig_impl_routine_t) 0,
4706 .kstub_routine: (mig_stub_kern_routine_t) _Xmach_port_special_reply_port_reset_link, .argc: 3, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__mach_port_special_reply_port_reset_link_t)},
4707 { .impl_routine: (mig_impl_routine_t) 0,
4708 .kstub_routine: (mig_stub_kern_routine_t) _Xmach_port_guard_with_flags, .argc: 6, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__mach_port_guard_with_flags_t)},
4709 { .impl_routine: (mig_impl_routine_t) 0,
4710 .kstub_routine: (mig_stub_kern_routine_t) _Xmach_port_swap_guard, .argc: 6, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__mach_port_swap_guard_t)},
4711 { .impl_routine: (mig_impl_routine_t) 0,
4712 .kstub_routine: (mig_stub_kern_routine_t) _Xmach_port_kobject_description_from_user, .argc: 5, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__mach_port_kobject_description_from_user_t)},
4713 { .impl_routine: (mig_impl_routine_t) 0,
4714 .kstub_routine: (mig_stub_kern_routine_t) _Xmach_port_is_connection_for_service, .argc: 4, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__mach_port_is_connection_for_service_t)},
4715 { .impl_routine: (mig_impl_routine_t) 0,
4716 .kstub_routine: (mig_stub_kern_routine_t) _Xmach_port_get_service_port_info, .argc: 3, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__mach_port_get_service_port_info_t)},
4717 { .impl_routine: (mig_impl_routine_t) 0,
4718 .kstub_routine: (mig_stub_kern_routine_t) _Xmach_port_assert_attributes, .argc: 5, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__mach_port_assert_attributes_t)},
4719 }
4720};
4721
4722mig_external boolean_t mach_port_server
4723 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP)
4724{
4725 /*
4726 * typedef struct {
4727 * mach_msg_header_t Head;
4728 * NDR_record_t NDR;
4729 * kern_return_t RetCode;
4730 * } mig_reply_error_t;
4731 */
4732
4733 mig_kern_routine_t routine;
4734
4735 OutHeadP->msgh_bits = MACH_MSGH_BITS(MACH_MSGH_BITS_REPLY(InHeadP->msgh_bits), 0);
4736 OutHeadP->msgh_remote_port = InHeadP->msgh_reply_port;
4737 /* Minimal size: routine() will update it if different */
4738 OutHeadP->msgh_size = (mach_msg_size_t)sizeof(mig_reply_error_t);
4739 OutHeadP->msgh_local_port = MACH_PORT_NULL;
4740 OutHeadP->msgh_id = InHeadP->msgh_id + 100;
4741 OutHeadP->msgh_reserved = 0;
4742
4743 if ((InHeadP->msgh_id > 3242) || (InHeadP->msgh_id < 3200) ||
4744 ((routine = mach_port_subsystem.kroutine[InHeadP->msgh_id - 3200].kstub_routine) == 0)) {
4745 ((mig_reply_error_t *)OutHeadP)->NDR = NDR_record;
4746 ((mig_reply_error_t *)OutHeadP)->RetCode = MIG_BAD_ID;
4747 return FALSE;
4748 }
4749 (*routine) (InHeadP, InDataP, InTrailerP, OutHeadP, OutDataP);
4750 return TRUE;
4751}
4752
4753mig_external mig_kern_routine_t mach_port_server_routine
4754 (mach_msg_header_t *InHeadP)
4755{
4756 int msgh_id;
4757
4758 msgh_id = InHeadP->msgh_id - 3200;
4759
4760 if ((msgh_id > 42) || (msgh_id < 0))
4761 return 0;
4762
4763 return mach_port_subsystem.kroutine[msgh_id].kstub_routine;
4764}
4765