File: | obj-scan-build/boot/ioServer.c |
Location: | line 104, column 2 |
Description: | Value stored to 'msgh_simple' is never read |
1 | /* Module io */ |
2 | |
3 | #ifndef _GNU_SOURCE1 |
4 | #define _GNU_SOURCE1 1 |
5 | #endif |
6 | |
7 | #define EXPORT_BOOLEAN |
8 | #include <mach/boolean.h> |
9 | #include <mach/kern_return.h> |
10 | #include <mach/message.h> |
11 | #include <mach/mig_errors.h> |
12 | #include <mach/mig_support.h> |
13 | |
14 | #ifndef mig_internalstatic |
15 | #define mig_internalstatic static |
16 | #endif |
17 | |
18 | #ifndef mig_external |
19 | #define mig_external |
20 | #endif |
21 | |
22 | #ifndef TypeCheck1 |
23 | #define TypeCheck1 1 |
24 | #endif |
25 | |
26 | #ifndef UseExternRCSId1 |
27 | #define UseExternRCSId1 1 |
28 | #endif |
29 | |
30 | #define BAD_TYPECHECK(type, check)({ union { mach_msg_type_t t; unsigned32_t w; } _t, _c; _t.t = *(type); _c.t = *(check); _t.w != _c.w; }) ({\ |
31 | union { mach_msg_type_t t; unsigned32_t w; } _t, _c;\ |
32 | _t.t = *(type); _c.t = *(check); _t.w != _c.w; }) |
33 | #define msgh_request_portmsgh_local_port msgh_local_port |
34 | #define MACH_MSGH_BITS_REQUEST(bits)(((bits) & 0x0000ff00) >> 8) MACH_MSGH_BITS_LOCAL(bits)(((bits) & 0x0000ff00) >> 8) |
35 | #define msgh_reply_portmsgh_remote_port msgh_remote_port |
36 | #define MACH_MSGH_BITS_REPLY(bits)((bits) & 0x000000ff) MACH_MSGH_BITS_REMOTE(bits)((bits) & 0x000000ff) |
37 | |
38 | #include <mach/std_types.h> |
39 | #include <mach/mach_types.h> |
40 | #include <device/device_types.h> |
41 | #include <device/net_status.h> |
42 | #include <sys/types.h> |
43 | #include <sys/stat.h> |
44 | #include <sys/statfs.h> |
45 | #include <sys/resource.h> |
46 | #include <sys/utsname.h> |
47 | #include <hurd/hurd_types.h> |
48 | |
49 | /* Routine io_write */ |
50 | mig_internalstatic void _Xio_write |
51 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
52 | { |
53 | typedef struct { |
54 | mach_msg_header_t Head; |
55 | mach_msg_type_long_t dataType; |
56 | char data[2048]; |
57 | mach_msg_type_t offsetType; |
58 | loff_t offset; |
59 | } Request; |
60 | |
61 | typedef struct { |
62 | mach_msg_header_t Head; |
63 | mach_msg_type_t RetCodeType; |
64 | kern_return_t RetCode; |
65 | mach_msg_type_t amountType; |
66 | vm_size_t amount; |
67 | } Reply; |
68 | |
69 | Request *In0P = (Request *) InHeadP; |
70 | Request *In1P; |
71 | Reply *OutP = (Reply *) OutHeadP; |
72 | mig_external kern_return_t S_io_write |
73 | (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, data_t data, mach_msg_type_number_t dataCnt, loff_t offset, vm_size_t *amount); |
74 | |
75 | #if TypeCheck1 |
76 | boolean_t msgh_simple; |
77 | #endif /* TypeCheck */ |
78 | |
79 | unsigned int msgh_size; |
80 | unsigned int msgh_size_delta; |
81 | |
82 | const mach_msg_type_t offsetCheck = { |
83 | /* msgt_name = */ 11, |
84 | /* msgt_size = */ 64, |
85 | /* msgt_number = */ 1, |
86 | /* msgt_inline = */ TRUE((boolean_t) 1), |
87 | /* msgt_longform = */ FALSE((boolean_t) 0), |
88 | /* msgt_deallocate = */ FALSE((boolean_t) 0), |
89 | /* msgt_unused = */ 0 |
90 | }; |
91 | |
92 | const mach_msg_type_t amountType = { |
93 | /* msgt_name = */ 2, |
94 | /* msgt_size = */ 32, |
95 | /* msgt_number = */ 1, |
96 | /* msgt_inline = */ TRUE((boolean_t) 1), |
97 | /* msgt_longform = */ FALSE((boolean_t) 0), |
98 | /* msgt_deallocate = */ FALSE((boolean_t) 0), |
99 | /* msgt_unused = */ 0 |
100 | }; |
101 | |
102 | #if TypeCheck1 |
103 | msgh_size = In0P->Head.msgh_size; |
104 | msgh_simple = !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX0x80000000U); |
Value stored to 'msgh_simple' is never read | |
105 | if ((msgh_size < 48)) |
106 | { OutP->RetCode = MIG_BAD_ARGUMENTS-304; return; } |
107 | #endif /* TypeCheck */ |
108 | |
109 | #if TypeCheck1 |
110 | if ((In0P->dataType.msgtl_header.msgt_longform != TRUE((boolean_t) 1)) || |
111 | (In0P->dataType.msgtl_name != 8) || |
112 | (In0P->dataType.msgtl_size != 8)) |
113 | { OutP->RetCode = MIG_BAD_ARGUMENTS-304; return; } |
114 | #endif /* TypeCheck */ |
115 | |
116 | msgh_size_delta = (In0P->dataType.msgtl_header.msgt_inline) ? (In0P->dataType.msgtl_number + 3) & ~3 : sizeof(char *); |
117 | #if TypeCheck1 |
118 | if (msgh_size != 48 + msgh_size_delta) |
119 | { OutP->RetCode = MIG_BAD_ARGUMENTS-304; return; } |
120 | #endif /* TypeCheck */ |
121 | |
122 | In1P = (Request *) ((char *) In0P + msgh_size_delta - 2048); |
123 | |
124 | #if TypeCheck1 |
125 | if (BAD_TYPECHECK(&In1P->offsetType, &offsetCheck)({ union { mach_msg_type_t t; unsigned32_t w; } _t, _c; _t.t = *(&In1P->offsetType); _c.t = *(&offsetCheck); _t. w != _c.w; })) |
126 | { OutP->RetCode = MIG_BAD_ARGUMENTS-304; return; } |
127 | #endif /* TypeCheck */ |
128 | |
129 | OutP->RetCode = S_io_write(In0P->Head.msgh_request_portmsgh_local_port, In0P->Head.msgh_reply_portmsgh_remote_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits)((In0P->Head.msgh_bits) & 0x000000ff), (In0P->dataType.msgtl_header.msgt_inline) ? In0P->data : *((char **)In0P->data), In0P->dataType.msgtl_number, In1P->offset, &OutP->amount); |
130 | if (OutP->RetCode == KERN_SUCCESS0) |
131 | if (!In0P->dataType.msgtl_header.msgt_inline) |
132 | __mig_deallocate(* (vm_offset_t *) In0P->data, In0P->dataType.msgtl_number); |
133 | if (OutP->RetCode != KERN_SUCCESS0) |
134 | return; |
135 | |
136 | OutP->Head.msgh_size = 40; |
137 | |
138 | OutP->amountType = amountType; |
139 | } |
140 | |
141 | /* Routine io_read */ |
142 | mig_internalstatic void _Xio_read |
143 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
144 | { |
145 | typedef struct { |
146 | mach_msg_header_t Head; |
147 | mach_msg_type_t offsetType; |
148 | loff_t offset; |
149 | mach_msg_type_t amountType; |
150 | vm_size_t amount; |
151 | } Request; |
152 | |
153 | typedef struct { |
154 | mach_msg_header_t Head; |
155 | mach_msg_type_t RetCodeType; |
156 | kern_return_t RetCode; |
157 | mach_msg_type_long_t dataType; |
158 | char data[2048]; |
159 | } Reply; |
160 | |
161 | Request *In0P = (Request *) InHeadP; |
162 | Reply *OutP = (Reply *) OutHeadP; |
163 | mig_external kern_return_t S_io_read |
164 | (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, data_t *data, mach_msg_type_number_t *dataCnt, loff_t offset, vm_size_t amount); |
165 | |
166 | boolean_t msgh_simple; |
167 | const mach_msg_type_t offsetCheck = { |
168 | /* msgt_name = */ 11, |
169 | /* msgt_size = */ 64, |
170 | /* msgt_number = */ 1, |
171 | /* msgt_inline = */ TRUE((boolean_t) 1), |
172 | /* msgt_longform = */ FALSE((boolean_t) 0), |
173 | /* msgt_deallocate = */ FALSE((boolean_t) 0), |
174 | /* msgt_unused = */ 0 |
175 | }; |
176 | |
177 | const mach_msg_type_t amountCheck = { |
178 | /* msgt_name = */ 2, |
179 | /* msgt_size = */ 32, |
180 | /* msgt_number = */ 1, |
181 | /* msgt_inline = */ TRUE((boolean_t) 1), |
182 | /* msgt_longform = */ FALSE((boolean_t) 0), |
183 | /* msgt_deallocate = */ FALSE((boolean_t) 0), |
184 | /* msgt_unused = */ 0 |
185 | }; |
186 | |
187 | const mach_msg_type_long_t dataType = { |
188 | { |
189 | /* msgt_name = */ 0, |
190 | /* msgt_size = */ 0, |
191 | /* msgt_number = */ 0, |
192 | /* msgt_inline = */ TRUE((boolean_t) 1), |
193 | /* msgt_longform = */ TRUE((boolean_t) 1), |
194 | /* msgt_deallocate = */ FALSE((boolean_t) 0), |
195 | /* msgt_unused = */ 0 |
196 | }, |
197 | /* msgtl_name = */ 8, |
198 | /* msgtl_size = */ 8, |
199 | /* msgtl_number = */ 2048, |
200 | }; |
201 | |
202 | mach_msg_type_number_t dataCnt; |
203 | |
204 | char *dataP; |
205 | |
206 | #if TypeCheck1 |
207 | if ((In0P->Head.msgh_size != 44) || |
208 | (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX0x80000000U)) |
209 | { OutP->RetCode = MIG_BAD_ARGUMENTS-304; return; } |
210 | #endif /* TypeCheck */ |
211 | |
212 | #if TypeCheck1 |
213 | if (BAD_TYPECHECK(&In0P->offsetType, &offsetCheck)({ union { mach_msg_type_t t; unsigned32_t w; } _t, _c; _t.t = *(&In0P->offsetType); _c.t = *(&offsetCheck); _t. w != _c.w; })) |
214 | { OutP->RetCode = MIG_BAD_ARGUMENTS-304; return; } |
215 | #endif /* TypeCheck */ |
216 | |
217 | #if TypeCheck1 |
218 | if (BAD_TYPECHECK(&In0P->amountType, &amountCheck)({ union { mach_msg_type_t t; unsigned32_t w; } _t, _c; _t.t = *(&In0P->amountType); _c.t = *(&amountCheck); _t. w != _c.w; })) |
219 | { OutP->RetCode = MIG_BAD_ARGUMENTS-304; return; } |
220 | #endif /* TypeCheck */ |
221 | |
222 | dataP = OutP->data; |
223 | dataCnt = 2048; |
224 | |
225 | OutP->RetCode = S_io_read(In0P->Head.msgh_request_portmsgh_local_port, In0P->Head.msgh_reply_portmsgh_remote_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits)((In0P->Head.msgh_bits) & 0x000000ff), &dataP, &dataCnt, In0P->offset, In0P->amount); |
226 | if (OutP->RetCode != KERN_SUCCESS0) |
227 | return; |
228 | |
229 | msgh_simple = TRUE((boolean_t) 1); |
230 | |
231 | OutP->dataType = dataType; |
232 | if (dataP != OutP->data) { |
233 | OutP->dataType.msgtl_header.msgt_inline = FALSE((boolean_t) 0); |
234 | OutP->dataType.msgtl_header.msgt_deallocate = TRUE((boolean_t) 1); |
235 | *((char **)OutP->data) = dataP; |
236 | msgh_simple = FALSE((boolean_t) 0); |
237 | } |
238 | |
239 | OutP->dataType.msgtl_number = dataCnt; |
240 | OutP->Head.msgh_size = 44 + ((OutP->dataType.msgtl_header.msgt_inline) ? (dataCnt + 3) & ~3 : sizeof(char *)); |
241 | |
242 | if (!msgh_simple) |
243 | OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX0x80000000U; |
244 | } |
245 | |
246 | /* Routine io_seek */ |
247 | mig_internalstatic void _Xio_seek |
248 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
249 | { |
250 | typedef struct { |
251 | mach_msg_header_t Head; |
252 | mach_msg_type_t offsetType; |
253 | loff_t offset; |
254 | mach_msg_type_t whenceType; |
255 | int whence; |
256 | } Request; |
257 | |
258 | typedef struct { |
259 | mach_msg_header_t Head; |
260 | mach_msg_type_t RetCodeType; |
261 | kern_return_t RetCode; |
262 | mach_msg_type_t newpType; |
263 | loff_t newp; |
264 | } Reply; |
265 | |
266 | Request *In0P = (Request *) InHeadP; |
267 | Reply *OutP = (Reply *) OutHeadP; |
268 | mig_external kern_return_t S_io_seek |
269 | (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, loff_t offset, int whence, loff_t *newp); |
270 | |
271 | const mach_msg_type_t offsetCheck = { |
272 | /* msgt_name = */ 11, |
273 | /* msgt_size = */ 64, |
274 | /* msgt_number = */ 1, |
275 | /* msgt_inline = */ TRUE((boolean_t) 1), |
276 | /* msgt_longform = */ FALSE((boolean_t) 0), |
277 | /* msgt_deallocate = */ FALSE((boolean_t) 0), |
278 | /* msgt_unused = */ 0 |
279 | }; |
280 | |
281 | const mach_msg_type_t whenceCheck = { |
282 | /* msgt_name = */ 2, |
283 | /* msgt_size = */ 32, |
284 | /* msgt_number = */ 1, |
285 | /* msgt_inline = */ TRUE((boolean_t) 1), |
286 | /* msgt_longform = */ FALSE((boolean_t) 0), |
287 | /* msgt_deallocate = */ FALSE((boolean_t) 0), |
288 | /* msgt_unused = */ 0 |
289 | }; |
290 | |
291 | const mach_msg_type_t newpType = { |
292 | /* msgt_name = */ 11, |
293 | /* msgt_size = */ 64, |
294 | /* msgt_number = */ 1, |
295 | /* msgt_inline = */ TRUE((boolean_t) 1), |
296 | /* msgt_longform = */ FALSE((boolean_t) 0), |
297 | /* msgt_deallocate = */ FALSE((boolean_t) 0), |
298 | /* msgt_unused = */ 0 |
299 | }; |
300 | |
301 | #if TypeCheck1 |
302 | if ((In0P->Head.msgh_size != 44) || |
303 | (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX0x80000000U)) |
304 | { OutP->RetCode = MIG_BAD_ARGUMENTS-304; return; } |
305 | #endif /* TypeCheck */ |
306 | |
307 | #if TypeCheck1 |
308 | if (BAD_TYPECHECK(&In0P->offsetType, &offsetCheck)({ union { mach_msg_type_t t; unsigned32_t w; } _t, _c; _t.t = *(&In0P->offsetType); _c.t = *(&offsetCheck); _t. w != _c.w; })) |
309 | { OutP->RetCode = MIG_BAD_ARGUMENTS-304; return; } |
310 | #endif /* TypeCheck */ |
311 | |
312 | #if TypeCheck1 |
313 | if (BAD_TYPECHECK(&In0P->whenceType, &whenceCheck)({ union { mach_msg_type_t t; unsigned32_t w; } _t, _c; _t.t = *(&In0P->whenceType); _c.t = *(&whenceCheck); _t. w != _c.w; })) |
314 | { OutP->RetCode = MIG_BAD_ARGUMENTS-304; return; } |
315 | #endif /* TypeCheck */ |
316 | |
317 | OutP->RetCode = S_io_seek(In0P->Head.msgh_request_portmsgh_local_port, In0P->Head.msgh_reply_portmsgh_remote_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits)((In0P->Head.msgh_bits) & 0x000000ff), In0P->offset, In0P->whence, &OutP->newp); |
318 | if (OutP->RetCode != KERN_SUCCESS0) |
319 | return; |
320 | |
321 | OutP->Head.msgh_size = 44; |
322 | |
323 | OutP->newpType = newpType; |
324 | } |
325 | |
326 | /* Routine io_readable */ |
327 | mig_internalstatic void _Xio_readable |
328 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
329 | { |
330 | typedef struct { |
331 | mach_msg_header_t Head; |
332 | } Request; |
333 | |
334 | typedef struct { |
335 | mach_msg_header_t Head; |
336 | mach_msg_type_t RetCodeType; |
337 | kern_return_t RetCode; |
338 | mach_msg_type_t amountType; |
339 | vm_size_t amount; |
340 | } Reply; |
341 | |
342 | Request *In0P = (Request *) InHeadP; |
343 | Reply *OutP = (Reply *) OutHeadP; |
344 | mig_external kern_return_t S_io_readable |
345 | (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, vm_size_t *amount); |
346 | |
347 | const mach_msg_type_t amountType = { |
348 | /* msgt_name = */ 2, |
349 | /* msgt_size = */ 32, |
350 | /* msgt_number = */ 1, |
351 | /* msgt_inline = */ TRUE((boolean_t) 1), |
352 | /* msgt_longform = */ FALSE((boolean_t) 0), |
353 | /* msgt_deallocate = */ FALSE((boolean_t) 0), |
354 | /* msgt_unused = */ 0 |
355 | }; |
356 | |
357 | #if TypeCheck1 |
358 | if ((In0P->Head.msgh_size != 24) || |
359 | (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX0x80000000U)) |
360 | { OutP->RetCode = MIG_BAD_ARGUMENTS-304; return; } |
361 | #endif /* TypeCheck */ |
362 | |
363 | OutP->RetCode = S_io_readable(In0P->Head.msgh_request_portmsgh_local_port, In0P->Head.msgh_reply_portmsgh_remote_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits)((In0P->Head.msgh_bits) & 0x000000ff), &OutP->amount); |
364 | if (OutP->RetCode != KERN_SUCCESS0) |
365 | return; |
366 | |
367 | OutP->Head.msgh_size = 40; |
368 | |
369 | OutP->amountType = amountType; |
370 | } |
371 | |
372 | /* Routine io_set_all_openmodes */ |
373 | mig_internalstatic void _Xio_set_all_openmodes |
374 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
375 | { |
376 | typedef struct { |
377 | mach_msg_header_t Head; |
378 | mach_msg_type_t newbitsType; |
379 | int newbits; |
380 | } Request; |
381 | |
382 | typedef struct { |
383 | mach_msg_header_t Head; |
384 | mach_msg_type_t RetCodeType; |
385 | kern_return_t RetCode; |
386 | } Reply; |
387 | |
388 | Request *In0P = (Request *) InHeadP; |
389 | Reply *OutP = (Reply *) OutHeadP; |
390 | mig_external kern_return_t S_io_set_all_openmodes |
391 | (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, int newbits); |
392 | |
393 | const mach_msg_type_t newbitsCheck = { |
394 | /* msgt_name = */ 2, |
395 | /* msgt_size = */ 32, |
396 | /* msgt_number = */ 1, |
397 | /* msgt_inline = */ TRUE((boolean_t) 1), |
398 | /* msgt_longform = */ FALSE((boolean_t) 0), |
399 | /* msgt_deallocate = */ FALSE((boolean_t) 0), |
400 | /* msgt_unused = */ 0 |
401 | }; |
402 | |
403 | #if TypeCheck1 |
404 | if ((In0P->Head.msgh_size != 32) || |
405 | (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX0x80000000U)) |
406 | { OutP->RetCode = MIG_BAD_ARGUMENTS-304; return; } |
407 | #endif /* TypeCheck */ |
408 | |
409 | #if TypeCheck1 |
410 | if (BAD_TYPECHECK(&In0P->newbitsType, &newbitsCheck)({ union { mach_msg_type_t t; unsigned32_t w; } _t, _c; _t.t = *(&In0P->newbitsType); _c.t = *(&newbitsCheck); _t .w != _c.w; })) |
411 | { OutP->RetCode = MIG_BAD_ARGUMENTS-304; return; } |
412 | #endif /* TypeCheck */ |
413 | |
414 | OutP->RetCode = S_io_set_all_openmodes(In0P->Head.msgh_request_portmsgh_local_port, In0P->Head.msgh_reply_portmsgh_remote_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits)((In0P->Head.msgh_bits) & 0x000000ff), In0P->newbits); |
415 | } |
416 | |
417 | /* Routine io_get_openmodes */ |
418 | mig_internalstatic void _Xio_get_openmodes |
419 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
420 | { |
421 | typedef struct { |
422 | mach_msg_header_t Head; |
423 | } Request; |
424 | |
425 | typedef struct { |
426 | mach_msg_header_t Head; |
427 | mach_msg_type_t RetCodeType; |
428 | kern_return_t RetCode; |
429 | mach_msg_type_t bitsType; |
430 | int bits; |
431 | } Reply; |
432 | |
433 | Request *In0P = (Request *) InHeadP; |
434 | Reply *OutP = (Reply *) OutHeadP; |
435 | mig_external kern_return_t S_io_get_openmodes |
436 | (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, int *bits); |
437 | |
438 | const mach_msg_type_t bitsType = { |
439 | /* msgt_name = */ 2, |
440 | /* msgt_size = */ 32, |
441 | /* msgt_number = */ 1, |
442 | /* msgt_inline = */ TRUE((boolean_t) 1), |
443 | /* msgt_longform = */ FALSE((boolean_t) 0), |
444 | /* msgt_deallocate = */ FALSE((boolean_t) 0), |
445 | /* msgt_unused = */ 0 |
446 | }; |
447 | |
448 | #if TypeCheck1 |
449 | if ((In0P->Head.msgh_size != 24) || |
450 | (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX0x80000000U)) |
451 | { OutP->RetCode = MIG_BAD_ARGUMENTS-304; return; } |
452 | #endif /* TypeCheck */ |
453 | |
454 | OutP->RetCode = S_io_get_openmodes(In0P->Head.msgh_request_portmsgh_local_port, In0P->Head.msgh_reply_portmsgh_remote_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits)((In0P->Head.msgh_bits) & 0x000000ff), &OutP->bits); |
455 | if (OutP->RetCode != KERN_SUCCESS0) |
456 | return; |
457 | |
458 | OutP->Head.msgh_size = 40; |
459 | |
460 | OutP->bitsType = bitsType; |
461 | } |
462 | |
463 | /* Routine io_set_some_openmodes */ |
464 | mig_internalstatic void _Xio_set_some_openmodes |
465 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
466 | { |
467 | typedef struct { |
468 | mach_msg_header_t Head; |
469 | mach_msg_type_t bits_to_setType; |
470 | int bits_to_set; |
471 | } Request; |
472 | |
473 | typedef struct { |
474 | mach_msg_header_t Head; |
475 | mach_msg_type_t RetCodeType; |
476 | kern_return_t RetCode; |
477 | } Reply; |
478 | |
479 | Request *In0P = (Request *) InHeadP; |
480 | Reply *OutP = (Reply *) OutHeadP; |
481 | mig_external kern_return_t S_io_set_some_openmodes |
482 | (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, int bits_to_set); |
483 | |
484 | const mach_msg_type_t bits_to_setCheck = { |
485 | /* msgt_name = */ 2, |
486 | /* msgt_size = */ 32, |
487 | /* msgt_number = */ 1, |
488 | /* msgt_inline = */ TRUE((boolean_t) 1), |
489 | /* msgt_longform = */ FALSE((boolean_t) 0), |
490 | /* msgt_deallocate = */ FALSE((boolean_t) 0), |
491 | /* msgt_unused = */ 0 |
492 | }; |
493 | |
494 | #if TypeCheck1 |
495 | if ((In0P->Head.msgh_size != 32) || |
496 | (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX0x80000000U)) |
497 | { OutP->RetCode = MIG_BAD_ARGUMENTS-304; return; } |
498 | #endif /* TypeCheck */ |
499 | |
500 | #if TypeCheck1 |
501 | if (BAD_TYPECHECK(&In0P->bits_to_setType, &bits_to_setCheck)({ union { mach_msg_type_t t; unsigned32_t w; } _t, _c; _t.t = *(&In0P->bits_to_setType); _c.t = *(&bits_to_setCheck ); _t.w != _c.w; })) |
502 | { OutP->RetCode = MIG_BAD_ARGUMENTS-304; return; } |
503 | #endif /* TypeCheck */ |
504 | |
505 | OutP->RetCode = S_io_set_some_openmodes(In0P->Head.msgh_request_portmsgh_local_port, In0P->Head.msgh_reply_portmsgh_remote_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits)((In0P->Head.msgh_bits) & 0x000000ff), In0P->bits_to_set); |
506 | } |
507 | |
508 | /* Routine io_clear_some_openmodes */ |
509 | mig_internalstatic void _Xio_clear_some_openmodes |
510 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
511 | { |
512 | typedef struct { |
513 | mach_msg_header_t Head; |
514 | mach_msg_type_t bits_to_clearType; |
515 | int bits_to_clear; |
516 | } Request; |
517 | |
518 | typedef struct { |
519 | mach_msg_header_t Head; |
520 | mach_msg_type_t RetCodeType; |
521 | kern_return_t RetCode; |
522 | } Reply; |
523 | |
524 | Request *In0P = (Request *) InHeadP; |
525 | Reply *OutP = (Reply *) OutHeadP; |
526 | mig_external kern_return_t S_io_clear_some_openmodes |
527 | (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, int bits_to_clear); |
528 | |
529 | const mach_msg_type_t bits_to_clearCheck = { |
530 | /* msgt_name = */ 2, |
531 | /* msgt_size = */ 32, |
532 | /* msgt_number = */ 1, |
533 | /* msgt_inline = */ TRUE((boolean_t) 1), |
534 | /* msgt_longform = */ FALSE((boolean_t) 0), |
535 | /* msgt_deallocate = */ FALSE((boolean_t) 0), |
536 | /* msgt_unused = */ 0 |
537 | }; |
538 | |
539 | #if TypeCheck1 |
540 | if ((In0P->Head.msgh_size != 32) || |
541 | (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX0x80000000U)) |
542 | { OutP->RetCode = MIG_BAD_ARGUMENTS-304; return; } |
543 | #endif /* TypeCheck */ |
544 | |
545 | #if TypeCheck1 |
546 | if (BAD_TYPECHECK(&In0P->bits_to_clearType, &bits_to_clearCheck)({ union { mach_msg_type_t t; unsigned32_t w; } _t, _c; _t.t = *(&In0P->bits_to_clearType); _c.t = *(&bits_to_clearCheck ); _t.w != _c.w; })) |
547 | { OutP->RetCode = MIG_BAD_ARGUMENTS-304; return; } |
548 | #endif /* TypeCheck */ |
549 | |
550 | OutP->RetCode = S_io_clear_some_openmodes(In0P->Head.msgh_request_portmsgh_local_port, In0P->Head.msgh_reply_portmsgh_remote_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits)((In0P->Head.msgh_bits) & 0x000000ff), In0P->bits_to_clear); |
551 | } |
552 | |
553 | /* Routine io_async */ |
554 | mig_internalstatic void _Xio_async |
555 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
556 | { |
557 | typedef struct { |
558 | mach_msg_header_t Head; |
559 | mach_msg_type_t notify_portType; |
560 | mach_port_t notify_port; |
561 | } Request; |
562 | |
563 | typedef struct { |
564 | mach_msg_header_t Head; |
565 | mach_msg_type_t RetCodeType; |
566 | kern_return_t RetCode; |
567 | mach_msg_type_t async_id_portType; |
568 | mach_port_t async_id_port; |
569 | } Reply; |
570 | |
571 | Request *In0P = (Request *) InHeadP; |
572 | Reply *OutP = (Reply *) OutHeadP; |
573 | mig_external kern_return_t S_io_async |
574 | (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, mach_port_t notify_port, mach_port_t *async_id_port, mach_msg_type_name_t *async_id_portPoly); |
575 | |
576 | boolean_t msgh_simple; |
577 | const mach_msg_type_t notify_portCheck = { |
578 | /* msgt_name = */ 17, |
579 | /* msgt_size = */ 32, |
580 | /* msgt_number = */ 1, |
581 | /* msgt_inline = */ TRUE((boolean_t) 1), |
582 | /* msgt_longform = */ FALSE((boolean_t) 0), |
583 | /* msgt_deallocate = */ FALSE((boolean_t) 0), |
584 | /* msgt_unused = */ 0 |
585 | }; |
586 | |
587 | const mach_msg_type_t async_id_portType = { |
588 | /* msgt_name = */ -1, |
589 | /* msgt_size = */ 32, |
590 | /* msgt_number = */ 1, |
591 | /* msgt_inline = */ TRUE((boolean_t) 1), |
592 | /* msgt_longform = */ FALSE((boolean_t) 0), |
593 | /* msgt_deallocate = */ FALSE((boolean_t) 0), |
594 | /* msgt_unused = */ 0 |
595 | }; |
596 | |
597 | mach_msg_type_name_t async_id_portPoly; |
598 | |
599 | #if TypeCheck1 |
600 | if ((In0P->Head.msgh_size != 32) || |
601 | !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX0x80000000U)) |
602 | { OutP->RetCode = MIG_BAD_ARGUMENTS-304; return; } |
603 | #endif /* TypeCheck */ |
604 | |
605 | #if TypeCheck1 |
606 | if (BAD_TYPECHECK(&In0P->notify_portType, ¬ify_portCheck)({ union { mach_msg_type_t t; unsigned32_t w; } _t, _c; _t.t = *(&In0P->notify_portType); _c.t = *(¬ify_portCheck ); _t.w != _c.w; })) |
607 | { OutP->RetCode = MIG_BAD_ARGUMENTS-304; return; } |
608 | #endif /* TypeCheck */ |
609 | |
610 | OutP->RetCode = S_io_async(In0P->Head.msgh_request_portmsgh_local_port, In0P->Head.msgh_reply_portmsgh_remote_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits)((In0P->Head.msgh_bits) & 0x000000ff), In0P->notify_port, &OutP->async_id_port, &async_id_portPoly); |
611 | if (OutP->RetCode != KERN_SUCCESS0) |
612 | return; |
613 | |
614 | msgh_simple = TRUE((boolean_t) 1); |
615 | OutP->Head.msgh_size = 40; |
616 | |
617 | OutP->async_id_portType = async_id_portType; |
618 | |
619 | if (MACH_MSG_TYPE_PORT_ANY(async_id_portPoly)(((async_id_portPoly) >= 16) && ((async_id_portPoly ) <= 21))) |
620 | msgh_simple = FALSE((boolean_t) 0); |
621 | |
622 | OutP->async_id_portType.msgt_name = async_id_portPoly; |
623 | |
624 | if (!msgh_simple) |
625 | OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX0x80000000U; |
626 | } |
627 | |
628 | /* Routine io_mod_owner */ |
629 | mig_internalstatic void _Xio_mod_owner |
630 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
631 | { |
632 | typedef struct { |
633 | mach_msg_header_t Head; |
634 | mach_msg_type_t ownerType; |
635 | pid_t owner; |
636 | } Request; |
637 | |
638 | typedef struct { |
639 | mach_msg_header_t Head; |
640 | mach_msg_type_t RetCodeType; |
641 | kern_return_t RetCode; |
642 | } Reply; |
643 | |
644 | Request *In0P = (Request *) InHeadP; |
645 | Reply *OutP = (Reply *) OutHeadP; |
646 | mig_external kern_return_t S_io_mod_owner |
647 | (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, pid_t owner); |
648 | |
649 | const mach_msg_type_t ownerCheck = { |
650 | /* msgt_name = */ 2, |
651 | /* msgt_size = */ 32, |
652 | /* msgt_number = */ 1, |
653 | /* msgt_inline = */ TRUE((boolean_t) 1), |
654 | /* msgt_longform = */ FALSE((boolean_t) 0), |
655 | /* msgt_deallocate = */ FALSE((boolean_t) 0), |
656 | /* msgt_unused = */ 0 |
657 | }; |
658 | |
659 | #if TypeCheck1 |
660 | if ((In0P->Head.msgh_size != 32) || |
661 | (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX0x80000000U)) |
662 | { OutP->RetCode = MIG_BAD_ARGUMENTS-304; return; } |
663 | #endif /* TypeCheck */ |
664 | |
665 | #if TypeCheck1 |
666 | if (BAD_TYPECHECK(&In0P->ownerType, &ownerCheck)({ union { mach_msg_type_t t; unsigned32_t w; } _t, _c; _t.t = *(&In0P->ownerType); _c.t = *(&ownerCheck); _t.w != _c.w; })) |
667 | { OutP->RetCode = MIG_BAD_ARGUMENTS-304; return; } |
668 | #endif /* TypeCheck */ |
669 | |
670 | OutP->RetCode = S_io_mod_owner(In0P->Head.msgh_request_portmsgh_local_port, In0P->Head.msgh_reply_portmsgh_remote_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits)((In0P->Head.msgh_bits) & 0x000000ff), In0P->owner); |
671 | } |
672 | |
673 | /* Routine io_get_owner */ |
674 | mig_internalstatic void _Xio_get_owner |
675 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
676 | { |
677 | typedef struct { |
678 | mach_msg_header_t Head; |
679 | } Request; |
680 | |
681 | typedef struct { |
682 | mach_msg_header_t Head; |
683 | mach_msg_type_t RetCodeType; |
684 | kern_return_t RetCode; |
685 | mach_msg_type_t ownerType; |
686 | pid_t owner; |
687 | } Reply; |
688 | |
689 | Request *In0P = (Request *) InHeadP; |
690 | Reply *OutP = (Reply *) OutHeadP; |
691 | mig_external kern_return_t S_io_get_owner |
692 | (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, pid_t *owner); |
693 | |
694 | const mach_msg_type_t ownerType = { |
695 | /* msgt_name = */ 2, |
696 | /* msgt_size = */ 32, |
697 | /* msgt_number = */ 1, |
698 | /* msgt_inline = */ TRUE((boolean_t) 1), |
699 | /* msgt_longform = */ FALSE((boolean_t) 0), |
700 | /* msgt_deallocate = */ FALSE((boolean_t) 0), |
701 | /* msgt_unused = */ 0 |
702 | }; |
703 | |
704 | #if TypeCheck1 |
705 | if ((In0P->Head.msgh_size != 24) || |
706 | (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX0x80000000U)) |
707 | { OutP->RetCode = MIG_BAD_ARGUMENTS-304; return; } |
708 | #endif /* TypeCheck */ |
709 | |
710 | OutP->RetCode = S_io_get_owner(In0P->Head.msgh_request_portmsgh_local_port, In0P->Head.msgh_reply_portmsgh_remote_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits)((In0P->Head.msgh_bits) & 0x000000ff), &OutP->owner); |
711 | if (OutP->RetCode != KERN_SUCCESS0) |
712 | return; |
713 | |
714 | OutP->Head.msgh_size = 40; |
715 | |
716 | OutP->ownerType = ownerType; |
717 | } |
718 | |
719 | /* Routine io_get_icky_async_id */ |
720 | mig_internalstatic void _Xio_get_icky_async_id |
721 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
722 | { |
723 | typedef struct { |
724 | mach_msg_header_t Head; |
725 | } Request; |
726 | |
727 | typedef struct { |
728 | mach_msg_header_t Head; |
729 | mach_msg_type_t RetCodeType; |
730 | kern_return_t RetCode; |
731 | mach_msg_type_t icky_async_id_portType; |
732 | mach_port_t icky_async_id_port; |
733 | } Reply; |
734 | |
735 | Request *In0P = (Request *) InHeadP; |
736 | Reply *OutP = (Reply *) OutHeadP; |
737 | mig_external kern_return_t S_io_get_icky_async_id |
738 | (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, mach_port_t *icky_async_id_port, mach_msg_type_name_t *icky_async_id_portPoly); |
739 | |
740 | boolean_t msgh_simple; |
741 | const mach_msg_type_t icky_async_id_portType = { |
742 | /* msgt_name = */ -1, |
743 | /* msgt_size = */ 32, |
744 | /* msgt_number = */ 1, |
745 | /* msgt_inline = */ TRUE((boolean_t) 1), |
746 | /* msgt_longform = */ FALSE((boolean_t) 0), |
747 | /* msgt_deallocate = */ FALSE((boolean_t) 0), |
748 | /* msgt_unused = */ 0 |
749 | }; |
750 | |
751 | mach_msg_type_name_t icky_async_id_portPoly; |
752 | |
753 | #if TypeCheck1 |
754 | if ((In0P->Head.msgh_size != 24) || |
755 | (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX0x80000000U)) |
756 | { OutP->RetCode = MIG_BAD_ARGUMENTS-304; return; } |
757 | #endif /* TypeCheck */ |
758 | |
759 | OutP->RetCode = S_io_get_icky_async_id(In0P->Head.msgh_request_portmsgh_local_port, In0P->Head.msgh_reply_portmsgh_remote_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits)((In0P->Head.msgh_bits) & 0x000000ff), &OutP->icky_async_id_port, &icky_async_id_portPoly); |
760 | if (OutP->RetCode != KERN_SUCCESS0) |
761 | return; |
762 | |
763 | msgh_simple = TRUE((boolean_t) 1); |
764 | OutP->Head.msgh_size = 40; |
765 | |
766 | OutP->icky_async_id_portType = icky_async_id_portType; |
767 | |
768 | if (MACH_MSG_TYPE_PORT_ANY(icky_async_id_portPoly)(((icky_async_id_portPoly) >= 16) && ((icky_async_id_portPoly ) <= 21))) |
769 | msgh_simple = FALSE((boolean_t) 0); |
770 | |
771 | OutP->icky_async_id_portType.msgt_name = icky_async_id_portPoly; |
772 | |
773 | if (!msgh_simple) |
774 | OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX0x80000000U; |
775 | } |
776 | |
777 | /* Routine io_select */ |
778 | mig_internalstatic void _Xio_select |
779 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
780 | { |
781 | typedef struct { |
782 | mach_msg_header_t Head; |
783 | mach_msg_type_t select_typeType; |
784 | int select_type; |
785 | } Request; |
786 | |
787 | typedef struct { |
788 | mach_msg_header_t Head; |
789 | mach_msg_type_t RetCodeType; |
790 | kern_return_t RetCode; |
791 | mach_msg_type_t select_typeType; |
792 | int select_type; |
793 | } Reply; |
794 | |
795 | Request *In0P = (Request *) InHeadP; |
796 | Reply *OutP = (Reply *) OutHeadP; |
797 | mig_external kern_return_t S_io_select |
798 | (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, int *select_type); |
799 | |
800 | const mach_msg_type_t select_typeCheck = { |
801 | /* msgt_name = */ 2, |
802 | /* msgt_size = */ 32, |
803 | /* msgt_number = */ 1, |
804 | /* msgt_inline = */ TRUE((boolean_t) 1), |
805 | /* msgt_longform = */ FALSE((boolean_t) 0), |
806 | /* msgt_deallocate = */ FALSE((boolean_t) 0), |
807 | /* msgt_unused = */ 0 |
808 | }; |
809 | |
810 | const mach_msg_type_t select_typeType = { |
811 | /* msgt_name = */ 2, |
812 | /* msgt_size = */ 32, |
813 | /* msgt_number = */ 1, |
814 | /* msgt_inline = */ TRUE((boolean_t) 1), |
815 | /* msgt_longform = */ FALSE((boolean_t) 0), |
816 | /* msgt_deallocate = */ FALSE((boolean_t) 0), |
817 | /* msgt_unused = */ 0 |
818 | }; |
819 | |
820 | #if TypeCheck1 |
821 | if ((In0P->Head.msgh_size != 32) || |
822 | (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX0x80000000U)) |
823 | { OutP->RetCode = MIG_BAD_ARGUMENTS-304; return; } |
824 | #endif /* TypeCheck */ |
825 | |
826 | #if TypeCheck1 |
827 | if (BAD_TYPECHECK(&In0P->select_typeType, &select_typeCheck)({ union { mach_msg_type_t t; unsigned32_t w; } _t, _c; _t.t = *(&In0P->select_typeType); _c.t = *(&select_typeCheck ); _t.w != _c.w; })) |
828 | { OutP->RetCode = MIG_BAD_ARGUMENTS-304; return; } |
829 | #endif /* TypeCheck */ |
830 | |
831 | OutP->RetCode = S_io_select(In0P->Head.msgh_request_portmsgh_local_port, In0P->Head.msgh_reply_portmsgh_remote_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits)((In0P->Head.msgh_bits) & 0x000000ff), &In0P->select_type); |
832 | if (OutP->RetCode != KERN_SUCCESS0) |
833 | return; |
834 | |
835 | OutP->Head.msgh_size = 40; |
836 | |
837 | OutP->select_typeType = select_typeType; |
838 | |
839 | OutP->select_type = In0P->select_type; |
840 | } |
841 | |
842 | /* Routine io_stat */ |
843 | mig_internalstatic void _Xio_stat |
844 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
845 | { |
846 | typedef struct { |
847 | mach_msg_header_t Head; |
848 | } Request; |
849 | |
850 | typedef struct { |
851 | mach_msg_header_t Head; |
852 | mach_msg_type_t RetCodeType; |
853 | kern_return_t RetCode; |
854 | mach_msg_type_t stat_infoType; |
855 | io_statbuf_t stat_info; |
856 | } Reply; |
857 | |
858 | Request *In0P = (Request *) InHeadP; |
859 | Reply *OutP = (Reply *) OutHeadP; |
860 | mig_external kern_return_t S_io_stat |
861 | (io_t stat_object, mach_port_t reply, mach_msg_type_name_t replyPoly, io_statbuf_t *stat_info); |
862 | |
863 | const mach_msg_type_t stat_infoType = { |
864 | /* msgt_name = */ 2, |
865 | /* msgt_size = */ 32, |
866 | /* msgt_number = */ 32, |
867 | /* msgt_inline = */ TRUE((boolean_t) 1), |
868 | /* msgt_longform = */ FALSE((boolean_t) 0), |
869 | /* msgt_deallocate = */ FALSE((boolean_t) 0), |
870 | /* msgt_unused = */ 0 |
871 | }; |
872 | |
873 | #if TypeCheck1 |
874 | if ((In0P->Head.msgh_size != 24) || |
875 | (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX0x80000000U)) |
876 | { OutP->RetCode = MIG_BAD_ARGUMENTS-304; return; } |
877 | #endif /* TypeCheck */ |
878 | |
879 | OutP->RetCode = S_io_stat(In0P->Head.msgh_request_portmsgh_local_port, In0P->Head.msgh_reply_portmsgh_remote_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits)((In0P->Head.msgh_bits) & 0x000000ff), &OutP->stat_info); |
880 | if (OutP->RetCode != KERN_SUCCESS0) |
881 | return; |
882 | |
883 | OutP->Head.msgh_size = 164; |
884 | |
885 | OutP->stat_infoType = stat_infoType; |
886 | } |
887 | |
888 | /* SimpleRoutine io_reauthenticate */ |
889 | mig_internalstatic void _Xio_reauthenticate |
890 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
891 | { |
892 | typedef struct { |
893 | mach_msg_header_t Head; |
894 | mach_msg_type_t rendezvous2Type; |
895 | mach_port_t rendezvous2; |
896 | } Request; |
897 | |
898 | typedef struct { |
899 | mach_msg_header_t Head; |
900 | mach_msg_type_t RetCodeType; |
901 | kern_return_t RetCode; |
902 | } Reply; |
903 | |
904 | Request *In0P = (Request *) InHeadP; |
905 | Reply *OutP = (Reply *) OutHeadP; |
906 | mig_external kern_return_t S_io_reauthenticate |
907 | (io_t auth_object, mach_port_t reply, mach_msg_type_name_t replyPoly, mach_port_t rendezvous2); |
908 | |
909 | const mach_msg_type_t rendezvous2Check = { |
910 | /* msgt_name = */ 17, |
911 | /* msgt_size = */ 32, |
912 | /* msgt_number = */ 1, |
913 | /* msgt_inline = */ TRUE((boolean_t) 1), |
914 | /* msgt_longform = */ FALSE((boolean_t) 0), |
915 | /* msgt_deallocate = */ FALSE((boolean_t) 0), |
916 | /* msgt_unused = */ 0 |
917 | }; |
918 | |
919 | #if TypeCheck1 |
920 | if ((In0P->Head.msgh_size != 32) || |
921 | !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX0x80000000U)) |
922 | { OutP->RetCode = MIG_BAD_ARGUMENTS-304; return; } |
923 | #endif /* TypeCheck */ |
924 | |
925 | #if TypeCheck1 |
926 | if (BAD_TYPECHECK(&In0P->rendezvous2Type, &rendezvous2Check)({ union { mach_msg_type_t t; unsigned32_t w; } _t, _c; _t.t = *(&In0P->rendezvous2Type); _c.t = *(&rendezvous2Check ); _t.w != _c.w; })) |
927 | { OutP->RetCode = MIG_BAD_ARGUMENTS-304; return; } |
928 | #endif /* TypeCheck */ |
929 | |
930 | OutP->RetCode = S_io_reauthenticate(In0P->Head.msgh_request_portmsgh_local_port, In0P->Head.msgh_reply_portmsgh_remote_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits)((In0P->Head.msgh_bits) & 0x000000ff), In0P->rendezvous2); |
931 | } |
932 | |
933 | /* Routine io_restrict_auth */ |
934 | mig_internalstatic void _Xio_restrict_auth |
935 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
936 | { |
937 | typedef struct { |
938 | mach_msg_header_t Head; |
939 | mach_msg_type_long_t uidsType; |
940 | uid_t uids[512]; |
941 | mach_msg_type_long_t gidsType; |
942 | uid_t gids[512]; |
943 | } Request; |
944 | |
945 | typedef struct { |
946 | mach_msg_header_t Head; |
947 | mach_msg_type_t RetCodeType; |
948 | kern_return_t RetCode; |
949 | mach_msg_type_t new_objectType; |
950 | mach_port_t new_object; |
951 | } Reply; |
952 | |
953 | Request *In0P = (Request *) InHeadP; |
954 | Request *In1P; |
955 | Reply *OutP = (Reply *) OutHeadP; |
956 | mig_external kern_return_t S_io_restrict_auth |
957 | (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, mach_port_t *new_object, mach_msg_type_name_t *new_objectPoly, idarray_t uids, mach_msg_type_number_t uidsCnt, idarray_t gids, mach_msg_type_number_t gidsCnt); |
958 | |
959 | boolean_t msgh_simple; |
960 | unsigned int msgh_size; |
961 | unsigned int msgh_size_delta; |
962 | |
963 | const mach_msg_type_t new_objectType = { |
964 | /* msgt_name = */ -1, |
965 | /* msgt_size = */ 32, |
966 | /* msgt_number = */ 1, |
967 | /* msgt_inline = */ TRUE((boolean_t) 1), |
968 | /* msgt_longform = */ FALSE((boolean_t) 0), |
969 | /* msgt_deallocate = */ FALSE((boolean_t) 0), |
970 | /* msgt_unused = */ 0 |
971 | }; |
972 | |
973 | mach_msg_type_name_t new_objectPoly; |
974 | |
975 | #if TypeCheck1 |
976 | msgh_size = In0P->Head.msgh_size; |
977 | msgh_simple = !(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX0x80000000U); |
978 | if ((msgh_size < 48)) |
979 | { OutP->RetCode = MIG_BAD_ARGUMENTS-304; return; } |
980 | #endif /* TypeCheck */ |
981 | |
982 | #if TypeCheck1 |
983 | if ((In0P->uidsType.msgtl_header.msgt_longform != TRUE((boolean_t) 1)) || |
984 | (In0P->uidsType.msgtl_name != 2) || |
985 | (In0P->uidsType.msgtl_size != 32)) |
986 | { OutP->RetCode = MIG_BAD_ARGUMENTS-304; return; } |
987 | #endif /* TypeCheck */ |
988 | |
989 | msgh_size_delta = (In0P->uidsType.msgtl_header.msgt_inline) ? 4 * In0P->uidsType.msgtl_number : sizeof(uid_t *); |
990 | #if TypeCheck1 |
991 | if (msgh_size < 48 + msgh_size_delta) |
992 | { OutP->RetCode = MIG_BAD_ARGUMENTS-304; return; } |
993 | msgh_size -= msgh_size_delta; |
994 | #endif /* TypeCheck */ |
995 | |
996 | In1P = (Request *) ((char *) In0P + msgh_size_delta - 2048); |
997 | |
998 | #if TypeCheck1 |
999 | if ((In1P->gidsType.msgtl_header.msgt_longform != TRUE((boolean_t) 1)) || |
1000 | (In1P->gidsType.msgtl_name != 2) || |
1001 | (In1P->gidsType.msgtl_size != 32)) |
1002 | { OutP->RetCode = MIG_BAD_ARGUMENTS-304; return; } |
1003 | #endif /* TypeCheck */ |
1004 | |
1005 | #if TypeCheck1 |
1006 | if (msgh_size != 48 + ((In1P->gidsType.msgtl_header.msgt_inline) ? 4 * In1P->gidsType.msgtl_number : sizeof(uid_t *))) |
1007 | { OutP->RetCode = MIG_BAD_ARGUMENTS-304; return; } |
1008 | #endif /* TypeCheck */ |
1009 | |
1010 | OutP->RetCode = S_io_restrict_auth(In0P->Head.msgh_request_portmsgh_local_port, In0P->Head.msgh_reply_portmsgh_remote_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits)((In0P->Head.msgh_bits) & 0x000000ff), &OutP->new_object, &new_objectPoly, (In0P->uidsType.msgtl_header.msgt_inline) ? In0P->uids : *((uid_t **)In0P->uids), In0P->uidsType.msgtl_number, (In1P->gidsType.msgtl_header.msgt_inline) ? In1P->gids : *((uid_t **)In1P->gids), In1P->gidsType.msgtl_number); |
1011 | if (OutP->RetCode == KERN_SUCCESS0) |
1012 | if (!In1P->gidsType.msgtl_header.msgt_inline) |
1013 | __mig_deallocate(* (vm_offset_t *) In1P->gids, 4 * In1P->gidsType.msgtl_number); |
1014 | if (OutP->RetCode == KERN_SUCCESS0) |
1015 | if (!In0P->uidsType.msgtl_header.msgt_inline) |
1016 | __mig_deallocate(* (vm_offset_t *) In0P->uids, 4 * In0P->uidsType.msgtl_number); |
1017 | if (OutP->RetCode != KERN_SUCCESS0) |
1018 | return; |
1019 | |
1020 | msgh_simple = TRUE((boolean_t) 1); |
1021 | OutP->Head.msgh_size = 40; |
1022 | |
1023 | OutP->new_objectType = new_objectType; |
1024 | |
1025 | if (MACH_MSG_TYPE_PORT_ANY(new_objectPoly)(((new_objectPoly) >= 16) && ((new_objectPoly) <= 21))) |
1026 | msgh_simple = FALSE((boolean_t) 0); |
1027 | |
1028 | OutP->new_objectType.msgt_name = new_objectPoly; |
1029 | |
1030 | if (!msgh_simple) |
1031 | OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX0x80000000U; |
1032 | } |
1033 | |
1034 | /* Routine io_duplicate */ |
1035 | mig_internalstatic void _Xio_duplicate |
1036 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
1037 | { |
1038 | typedef struct { |
1039 | mach_msg_header_t Head; |
1040 | } Request; |
1041 | |
1042 | typedef struct { |
1043 | mach_msg_header_t Head; |
1044 | mach_msg_type_t RetCodeType; |
1045 | kern_return_t RetCode; |
1046 | mach_msg_type_t newportType; |
1047 | mach_port_t newport; |
1048 | } Reply; |
1049 | |
1050 | Request *In0P = (Request *) InHeadP; |
1051 | Reply *OutP = (Reply *) OutHeadP; |
1052 | mig_external kern_return_t S_io_duplicate |
1053 | (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, mach_port_t *newport, mach_msg_type_name_t *newportPoly); |
1054 | |
1055 | boolean_t msgh_simple; |
1056 | const mach_msg_type_t newportType = { |
1057 | /* msgt_name = */ -1, |
1058 | /* msgt_size = */ 32, |
1059 | /* msgt_number = */ 1, |
1060 | /* msgt_inline = */ TRUE((boolean_t) 1), |
1061 | /* msgt_longform = */ FALSE((boolean_t) 0), |
1062 | /* msgt_deallocate = */ FALSE((boolean_t) 0), |
1063 | /* msgt_unused = */ 0 |
1064 | }; |
1065 | |
1066 | mach_msg_type_name_t newportPoly; |
1067 | |
1068 | #if TypeCheck1 |
1069 | if ((In0P->Head.msgh_size != 24) || |
1070 | (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX0x80000000U)) |
1071 | { OutP->RetCode = MIG_BAD_ARGUMENTS-304; return; } |
1072 | #endif /* TypeCheck */ |
1073 | |
1074 | OutP->RetCode = S_io_duplicate(In0P->Head.msgh_request_portmsgh_local_port, In0P->Head.msgh_reply_portmsgh_remote_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits)((In0P->Head.msgh_bits) & 0x000000ff), &OutP->newport, &newportPoly); |
1075 | if (OutP->RetCode != KERN_SUCCESS0) |
1076 | return; |
1077 | |
1078 | msgh_simple = TRUE((boolean_t) 1); |
1079 | OutP->Head.msgh_size = 40; |
1080 | |
1081 | OutP->newportType = newportType; |
1082 | |
1083 | if (MACH_MSG_TYPE_PORT_ANY(newportPoly)(((newportPoly) >= 16) && ((newportPoly) <= 21) )) |
1084 | msgh_simple = FALSE((boolean_t) 0); |
1085 | |
1086 | OutP->newportType.msgt_name = newportPoly; |
1087 | |
1088 | if (!msgh_simple) |
1089 | OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX0x80000000U; |
1090 | } |
1091 | |
1092 | /* Routine io_server_version */ |
1093 | mig_internalstatic void _Xio_server_version |
1094 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
1095 | { |
1096 | typedef struct { |
1097 | mach_msg_header_t Head; |
1098 | } Request; |
1099 | |
1100 | typedef struct { |
1101 | mach_msg_header_t Head; |
1102 | mach_msg_type_t RetCodeType; |
1103 | kern_return_t RetCode; |
1104 | mach_msg_type_t server_nameType; |
1105 | string_t server_name; |
1106 | mach_msg_type_t server_major_versionType; |
1107 | int server_major_version; |
1108 | mach_msg_type_t server_minor_versionType; |
1109 | int server_minor_version; |
1110 | mach_msg_type_t server_edit_levelType; |
1111 | int server_edit_level; |
1112 | } Reply; |
1113 | |
1114 | Request *In0P = (Request *) InHeadP; |
1115 | Reply *OutP = (Reply *) OutHeadP; |
1116 | mig_external kern_return_t S_io_server_version |
1117 | (io_t vers_object, mach_port_t reply, mach_msg_type_name_t replyPoly, string_t server_name, int *server_major_version, int *server_minor_version, int *server_edit_level); |
1118 | |
1119 | const mach_msg_type_t server_nameType = { |
1120 | /* msgt_name = */ MACH_MSG_TYPE_STRING_C12, |
1121 | /* msgt_size = */ 8, |
1122 | /* msgt_number = */ 1024, |
1123 | /* msgt_inline = */ TRUE((boolean_t) 1), |
1124 | /* msgt_longform = */ FALSE((boolean_t) 0), |
1125 | /* msgt_deallocate = */ FALSE((boolean_t) 0), |
1126 | /* msgt_unused = */ 0 |
1127 | }; |
1128 | |
1129 | const mach_msg_type_t server_major_versionType = { |
1130 | /* msgt_name = */ 2, |
1131 | /* msgt_size = */ 32, |
1132 | /* msgt_number = */ 1, |
1133 | /* msgt_inline = */ TRUE((boolean_t) 1), |
1134 | /* msgt_longform = */ FALSE((boolean_t) 0), |
1135 | /* msgt_deallocate = */ FALSE((boolean_t) 0), |
1136 | /* msgt_unused = */ 0 |
1137 | }; |
1138 | |
1139 | const mach_msg_type_t server_minor_versionType = { |
1140 | /* msgt_name = */ 2, |
1141 | /* msgt_size = */ 32, |
1142 | /* msgt_number = */ 1, |
1143 | /* msgt_inline = */ TRUE((boolean_t) 1), |
1144 | /* msgt_longform = */ FALSE((boolean_t) 0), |
1145 | /* msgt_deallocate = */ FALSE((boolean_t) 0), |
1146 | /* msgt_unused = */ 0 |
1147 | }; |
1148 | |
1149 | const mach_msg_type_t server_edit_levelType = { |
1150 | /* msgt_name = */ 2, |
1151 | /* msgt_size = */ 32, |
1152 | /* msgt_number = */ 1, |
1153 | /* msgt_inline = */ TRUE((boolean_t) 1), |
1154 | /* msgt_longform = */ FALSE((boolean_t) 0), |
1155 | /* msgt_deallocate = */ FALSE((boolean_t) 0), |
1156 | /* msgt_unused = */ 0 |
1157 | }; |
1158 | |
1159 | #if TypeCheck1 |
1160 | if ((In0P->Head.msgh_size != 24) || |
1161 | (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX0x80000000U)) |
1162 | { OutP->RetCode = MIG_BAD_ARGUMENTS-304; return; } |
1163 | #endif /* TypeCheck */ |
1164 | |
1165 | OutP->RetCode = S_io_server_version(In0P->Head.msgh_request_portmsgh_local_port, In0P->Head.msgh_reply_portmsgh_remote_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits)((In0P->Head.msgh_bits) & 0x000000ff), OutP->server_name, &OutP->server_major_version, &OutP->server_minor_version, &OutP->server_edit_level); |
1166 | if (OutP->RetCode != KERN_SUCCESS0) |
1167 | return; |
1168 | |
1169 | OutP->Head.msgh_size = 1084; |
1170 | |
1171 | OutP->server_nameType = server_nameType; |
1172 | |
1173 | OutP->server_major_versionType = server_major_versionType; |
1174 | |
1175 | OutP->server_minor_versionType = server_minor_versionType; |
1176 | |
1177 | OutP->server_edit_levelType = server_edit_levelType; |
1178 | } |
1179 | |
1180 | /* Routine io_map */ |
1181 | mig_internalstatic void _Xio_map |
1182 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
1183 | { |
1184 | typedef struct { |
1185 | mach_msg_header_t Head; |
1186 | } Request; |
1187 | |
1188 | typedef struct { |
1189 | mach_msg_header_t Head; |
1190 | mach_msg_type_t RetCodeType; |
1191 | kern_return_t RetCode; |
1192 | mach_msg_type_t memobjrdType; |
1193 | mach_port_t memobjrd; |
1194 | mach_msg_type_t memobjwtType; |
1195 | mach_port_t memobjwt; |
1196 | } Reply; |
1197 | |
1198 | Request *In0P = (Request *) InHeadP; |
1199 | Reply *OutP = (Reply *) OutHeadP; |
1200 | mig_external kern_return_t S_io_map |
1201 | (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, mach_port_t *memobjrd, mach_msg_type_name_t *memobjrdPoly, mach_port_t *memobjwt, mach_msg_type_name_t *memobjwtPoly); |
1202 | |
1203 | boolean_t msgh_simple; |
1204 | const mach_msg_type_t memobjrdType = { |
1205 | /* msgt_name = */ -1, |
1206 | /* msgt_size = */ 32, |
1207 | /* msgt_number = */ 1, |
1208 | /* msgt_inline = */ TRUE((boolean_t) 1), |
1209 | /* msgt_longform = */ FALSE((boolean_t) 0), |
1210 | /* msgt_deallocate = */ FALSE((boolean_t) 0), |
1211 | /* msgt_unused = */ 0 |
1212 | }; |
1213 | |
1214 | const mach_msg_type_t memobjwtType = { |
1215 | /* msgt_name = */ -1, |
1216 | /* msgt_size = */ 32, |
1217 | /* msgt_number = */ 1, |
1218 | /* msgt_inline = */ TRUE((boolean_t) 1), |
1219 | /* msgt_longform = */ FALSE((boolean_t) 0), |
1220 | /* msgt_deallocate = */ FALSE((boolean_t) 0), |
1221 | /* msgt_unused = */ 0 |
1222 | }; |
1223 | |
1224 | mach_msg_type_name_t memobjrdPoly; |
1225 | mach_msg_type_name_t memobjwtPoly; |
1226 | |
1227 | #if TypeCheck1 |
1228 | if ((In0P->Head.msgh_size != 24) || |
1229 | (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX0x80000000U)) |
1230 | { OutP->RetCode = MIG_BAD_ARGUMENTS-304; return; } |
1231 | #endif /* TypeCheck */ |
1232 | |
1233 | OutP->RetCode = S_io_map(In0P->Head.msgh_request_portmsgh_local_port, In0P->Head.msgh_reply_portmsgh_remote_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits)((In0P->Head.msgh_bits) & 0x000000ff), &OutP->memobjrd, &memobjrdPoly, &OutP->memobjwt, &memobjwtPoly); |
1234 | if (OutP->RetCode != KERN_SUCCESS0) |
1235 | return; |
1236 | |
1237 | msgh_simple = TRUE((boolean_t) 1); |
1238 | OutP->Head.msgh_size = 48; |
1239 | |
1240 | OutP->memobjrdType = memobjrdType; |
1241 | |
1242 | if (MACH_MSG_TYPE_PORT_ANY(memobjrdPoly)(((memobjrdPoly) >= 16) && ((memobjrdPoly) <= 21 ))) |
1243 | msgh_simple = FALSE((boolean_t) 0); |
1244 | |
1245 | OutP->memobjrdType.msgt_name = memobjrdPoly; |
1246 | |
1247 | OutP->memobjwtType = memobjwtType; |
1248 | |
1249 | if (MACH_MSG_TYPE_PORT_ANY(memobjwtPoly)(((memobjwtPoly) >= 16) && ((memobjwtPoly) <= 21 ))) |
1250 | msgh_simple = FALSE((boolean_t) 0); |
1251 | |
1252 | OutP->memobjwtType.msgt_name = memobjwtPoly; |
1253 | |
1254 | if (!msgh_simple) |
1255 | OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX0x80000000U; |
1256 | } |
1257 | |
1258 | /* Routine io_map_cntl */ |
1259 | mig_internalstatic void _Xio_map_cntl |
1260 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
1261 | { |
1262 | typedef struct { |
1263 | mach_msg_header_t Head; |
1264 | } Request; |
1265 | |
1266 | typedef struct { |
1267 | mach_msg_header_t Head; |
1268 | mach_msg_type_t RetCodeType; |
1269 | kern_return_t RetCode; |
1270 | mach_msg_type_t memobjType; |
1271 | mach_port_t memobj; |
1272 | } Reply; |
1273 | |
1274 | Request *In0P = (Request *) InHeadP; |
1275 | Reply *OutP = (Reply *) OutHeadP; |
1276 | mig_external kern_return_t S_io_map_cntl |
1277 | (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, mach_port_t *memobj, mach_msg_type_name_t *memobjPoly); |
1278 | |
1279 | boolean_t msgh_simple; |
1280 | const mach_msg_type_t memobjType = { |
1281 | /* msgt_name = */ -1, |
1282 | /* msgt_size = */ 32, |
1283 | /* msgt_number = */ 1, |
1284 | /* msgt_inline = */ TRUE((boolean_t) 1), |
1285 | /* msgt_longform = */ FALSE((boolean_t) 0), |
1286 | /* msgt_deallocate = */ FALSE((boolean_t) 0), |
1287 | /* msgt_unused = */ 0 |
1288 | }; |
1289 | |
1290 | mach_msg_type_name_t memobjPoly; |
1291 | |
1292 | #if TypeCheck1 |
1293 | if ((In0P->Head.msgh_size != 24) || |
1294 | (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX0x80000000U)) |
1295 | { OutP->RetCode = MIG_BAD_ARGUMENTS-304; return; } |
1296 | #endif /* TypeCheck */ |
1297 | |
1298 | OutP->RetCode = S_io_map_cntl(In0P->Head.msgh_request_portmsgh_local_port, In0P->Head.msgh_reply_portmsgh_remote_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits)((In0P->Head.msgh_bits) & 0x000000ff), &OutP->memobj, &memobjPoly); |
1299 | if (OutP->RetCode != KERN_SUCCESS0) |
1300 | return; |
1301 | |
1302 | msgh_simple = TRUE((boolean_t) 1); |
1303 | OutP->Head.msgh_size = 40; |
1304 | |
1305 | OutP->memobjType = memobjType; |
1306 | |
1307 | if (MACH_MSG_TYPE_PORT_ANY(memobjPoly)(((memobjPoly) >= 16) && ((memobjPoly) <= 21))) |
1308 | msgh_simple = FALSE((boolean_t) 0); |
1309 | |
1310 | OutP->memobjType.msgt_name = memobjPoly; |
1311 | |
1312 | if (!msgh_simple) |
1313 | OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX0x80000000U; |
1314 | } |
1315 | |
1316 | /* Routine io_get_conch */ |
1317 | mig_internalstatic void _Xio_get_conch |
1318 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
1319 | { |
1320 | typedef struct { |
1321 | mach_msg_header_t Head; |
1322 | } Request; |
1323 | |
1324 | typedef struct { |
1325 | mach_msg_header_t Head; |
1326 | mach_msg_type_t RetCodeType; |
1327 | kern_return_t RetCode; |
1328 | } Reply; |
1329 | |
1330 | Request *In0P = (Request *) InHeadP; |
1331 | Reply *OutP = (Reply *) OutHeadP; |
1332 | mig_external kern_return_t S_io_get_conch |
1333 | (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly); |
1334 | |
1335 | #if TypeCheck1 |
1336 | if ((In0P->Head.msgh_size != 24) || |
1337 | (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX0x80000000U)) |
1338 | { OutP->RetCode = MIG_BAD_ARGUMENTS-304; return; } |
1339 | #endif /* TypeCheck */ |
1340 | |
1341 | OutP->RetCode = S_io_get_conch(In0P->Head.msgh_request_portmsgh_local_port, In0P->Head.msgh_reply_portmsgh_remote_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits)((In0P->Head.msgh_bits) & 0x000000ff)); |
1342 | } |
1343 | |
1344 | /* Routine io_release_conch */ |
1345 | mig_internalstatic void _Xio_release_conch |
1346 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
1347 | { |
1348 | typedef struct { |
1349 | mach_msg_header_t Head; |
1350 | } Request; |
1351 | |
1352 | typedef struct { |
1353 | mach_msg_header_t Head; |
1354 | mach_msg_type_t RetCodeType; |
1355 | kern_return_t RetCode; |
1356 | } Reply; |
1357 | |
1358 | Request *In0P = (Request *) InHeadP; |
1359 | Reply *OutP = (Reply *) OutHeadP; |
1360 | mig_external kern_return_t S_io_release_conch |
1361 | (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly); |
1362 | |
1363 | #if TypeCheck1 |
1364 | if ((In0P->Head.msgh_size != 24) || |
1365 | (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX0x80000000U)) |
1366 | { OutP->RetCode = MIG_BAD_ARGUMENTS-304; return; } |
1367 | #endif /* TypeCheck */ |
1368 | |
1369 | OutP->RetCode = S_io_release_conch(In0P->Head.msgh_request_portmsgh_local_port, In0P->Head.msgh_reply_portmsgh_remote_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits)((In0P->Head.msgh_bits) & 0x000000ff)); |
1370 | } |
1371 | |
1372 | /* Routine io_eofnotify */ |
1373 | mig_internalstatic void _Xio_eofnotify |
1374 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
1375 | { |
1376 | typedef struct { |
1377 | mach_msg_header_t Head; |
1378 | } Request; |
1379 | |
1380 | typedef struct { |
1381 | mach_msg_header_t Head; |
1382 | mach_msg_type_t RetCodeType; |
1383 | kern_return_t RetCode; |
1384 | } Reply; |
1385 | |
1386 | Request *In0P = (Request *) InHeadP; |
1387 | Reply *OutP = (Reply *) OutHeadP; |
1388 | mig_external kern_return_t S_io_eofnotify |
1389 | (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly); |
1390 | |
1391 | #if TypeCheck1 |
1392 | if ((In0P->Head.msgh_size != 24) || |
1393 | (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX0x80000000U)) |
1394 | { OutP->RetCode = MIG_BAD_ARGUMENTS-304; return; } |
1395 | #endif /* TypeCheck */ |
1396 | |
1397 | OutP->RetCode = S_io_eofnotify(In0P->Head.msgh_request_portmsgh_local_port, In0P->Head.msgh_reply_portmsgh_remote_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits)((In0P->Head.msgh_bits) & 0x000000ff)); |
1398 | } |
1399 | |
1400 | /* Routine io_prenotify */ |
1401 | mig_internalstatic void _Xio_prenotify |
1402 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
1403 | { |
1404 | typedef struct { |
1405 | mach_msg_header_t Head; |
1406 | mach_msg_type_t write_startType; |
1407 | vm_offset_t write_start; |
1408 | mach_msg_type_t write_endType; |
1409 | vm_offset_t write_end; |
1410 | } Request; |
1411 | |
1412 | typedef struct { |
1413 | mach_msg_header_t Head; |
1414 | mach_msg_type_t RetCodeType; |
1415 | kern_return_t RetCode; |
1416 | } Reply; |
1417 | |
1418 | Request *In0P = (Request *) InHeadP; |
1419 | Reply *OutP = (Reply *) OutHeadP; |
1420 | mig_external kern_return_t S_io_prenotify |
1421 | (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, vm_offset_t write_start, vm_offset_t write_end); |
1422 | |
1423 | const mach_msg_type_t write_startCheck = { |
1424 | /* msgt_name = */ 2, |
1425 | /* msgt_size = */ 32, |
1426 | /* msgt_number = */ 1, |
1427 | /* msgt_inline = */ TRUE((boolean_t) 1), |
1428 | /* msgt_longform = */ FALSE((boolean_t) 0), |
1429 | /* msgt_deallocate = */ FALSE((boolean_t) 0), |
1430 | /* msgt_unused = */ 0 |
1431 | }; |
1432 | |
1433 | const mach_msg_type_t write_endCheck = { |
1434 | /* msgt_name = */ 2, |
1435 | /* msgt_size = */ 32, |
1436 | /* msgt_number = */ 1, |
1437 | /* msgt_inline = */ TRUE((boolean_t) 1), |
1438 | /* msgt_longform = */ FALSE((boolean_t) 0), |
1439 | /* msgt_deallocate = */ FALSE((boolean_t) 0), |
1440 | /* msgt_unused = */ 0 |
1441 | }; |
1442 | |
1443 | #if TypeCheck1 |
1444 | if ((In0P->Head.msgh_size != 40) || |
1445 | (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX0x80000000U)) |
1446 | { OutP->RetCode = MIG_BAD_ARGUMENTS-304; return; } |
1447 | #endif /* TypeCheck */ |
1448 | |
1449 | #if TypeCheck1 |
1450 | if (BAD_TYPECHECK(&In0P->write_startType, &write_startCheck)({ union { mach_msg_type_t t; unsigned32_t w; } _t, _c; _t.t = *(&In0P->write_startType); _c.t = *(&write_startCheck ); _t.w != _c.w; })) |
1451 | { OutP->RetCode = MIG_BAD_ARGUMENTS-304; return; } |
1452 | #endif /* TypeCheck */ |
1453 | |
1454 | #if TypeCheck1 |
1455 | if (BAD_TYPECHECK(&In0P->write_endType, &write_endCheck)({ union { mach_msg_type_t t; unsigned32_t w; } _t, _c; _t.t = *(&In0P->write_endType); _c.t = *(&write_endCheck ); _t.w != _c.w; })) |
1456 | { OutP->RetCode = MIG_BAD_ARGUMENTS-304; return; } |
1457 | #endif /* TypeCheck */ |
1458 | |
1459 | OutP->RetCode = S_io_prenotify(In0P->Head.msgh_request_portmsgh_local_port, In0P->Head.msgh_reply_portmsgh_remote_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits)((In0P->Head.msgh_bits) & 0x000000ff), In0P->write_start, In0P->write_end); |
1460 | } |
1461 | |
1462 | /* Routine io_postnotify */ |
1463 | mig_internalstatic void _Xio_postnotify |
1464 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
1465 | { |
1466 | typedef struct { |
1467 | mach_msg_header_t Head; |
1468 | mach_msg_type_t write_startType; |
1469 | vm_offset_t write_start; |
1470 | mach_msg_type_t write_endType; |
1471 | vm_offset_t write_end; |
1472 | } Request; |
1473 | |
1474 | typedef struct { |
1475 | mach_msg_header_t Head; |
1476 | mach_msg_type_t RetCodeType; |
1477 | kern_return_t RetCode; |
1478 | } Reply; |
1479 | |
1480 | Request *In0P = (Request *) InHeadP; |
1481 | Reply *OutP = (Reply *) OutHeadP; |
1482 | mig_external kern_return_t S_io_postnotify |
1483 | (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, vm_offset_t write_start, vm_offset_t write_end); |
1484 | |
1485 | const mach_msg_type_t write_startCheck = { |
1486 | /* msgt_name = */ 2, |
1487 | /* msgt_size = */ 32, |
1488 | /* msgt_number = */ 1, |
1489 | /* msgt_inline = */ TRUE((boolean_t) 1), |
1490 | /* msgt_longform = */ FALSE((boolean_t) 0), |
1491 | /* msgt_deallocate = */ FALSE((boolean_t) 0), |
1492 | /* msgt_unused = */ 0 |
1493 | }; |
1494 | |
1495 | const mach_msg_type_t write_endCheck = { |
1496 | /* msgt_name = */ 2, |
1497 | /* msgt_size = */ 32, |
1498 | /* msgt_number = */ 1, |
1499 | /* msgt_inline = */ TRUE((boolean_t) 1), |
1500 | /* msgt_longform = */ FALSE((boolean_t) 0), |
1501 | /* msgt_deallocate = */ FALSE((boolean_t) 0), |
1502 | /* msgt_unused = */ 0 |
1503 | }; |
1504 | |
1505 | #if TypeCheck1 |
1506 | if ((In0P->Head.msgh_size != 40) || |
1507 | (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX0x80000000U)) |
1508 | { OutP->RetCode = MIG_BAD_ARGUMENTS-304; return; } |
1509 | #endif /* TypeCheck */ |
1510 | |
1511 | #if TypeCheck1 |
1512 | if (BAD_TYPECHECK(&In0P->write_startType, &write_startCheck)({ union { mach_msg_type_t t; unsigned32_t w; } _t, _c; _t.t = *(&In0P->write_startType); _c.t = *(&write_startCheck ); _t.w != _c.w; })) |
1513 | { OutP->RetCode = MIG_BAD_ARGUMENTS-304; return; } |
1514 | #endif /* TypeCheck */ |
1515 | |
1516 | #if TypeCheck1 |
1517 | if (BAD_TYPECHECK(&In0P->write_endType, &write_endCheck)({ union { mach_msg_type_t t; unsigned32_t w; } _t, _c; _t.t = *(&In0P->write_endType); _c.t = *(&write_endCheck ); _t.w != _c.w; })) |
1518 | { OutP->RetCode = MIG_BAD_ARGUMENTS-304; return; } |
1519 | #endif /* TypeCheck */ |
1520 | |
1521 | OutP->RetCode = S_io_postnotify(In0P->Head.msgh_request_portmsgh_local_port, In0P->Head.msgh_reply_portmsgh_remote_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits)((In0P->Head.msgh_bits) & 0x000000ff), In0P->write_start, In0P->write_end); |
1522 | } |
1523 | |
1524 | /* Routine io_readnotify */ |
1525 | mig_internalstatic void _Xio_readnotify |
1526 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
1527 | { |
1528 | typedef struct { |
1529 | mach_msg_header_t Head; |
1530 | } Request; |
1531 | |
1532 | typedef struct { |
1533 | mach_msg_header_t Head; |
1534 | mach_msg_type_t RetCodeType; |
1535 | kern_return_t RetCode; |
1536 | } Reply; |
1537 | |
1538 | Request *In0P = (Request *) InHeadP; |
1539 | Reply *OutP = (Reply *) OutHeadP; |
1540 | mig_external kern_return_t S_io_readnotify |
1541 | (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly); |
1542 | |
1543 | #if TypeCheck1 |
1544 | if ((In0P->Head.msgh_size != 24) || |
1545 | (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX0x80000000U)) |
1546 | { OutP->RetCode = MIG_BAD_ARGUMENTS-304; return; } |
1547 | #endif /* TypeCheck */ |
1548 | |
1549 | OutP->RetCode = S_io_readnotify(In0P->Head.msgh_request_portmsgh_local_port, In0P->Head.msgh_reply_portmsgh_remote_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits)((In0P->Head.msgh_bits) & 0x000000ff)); |
1550 | } |
1551 | |
1552 | /* Routine io_readsleep */ |
1553 | mig_internalstatic void _Xio_readsleep |
1554 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
1555 | { |
1556 | typedef struct { |
1557 | mach_msg_header_t Head; |
1558 | } Request; |
1559 | |
1560 | typedef struct { |
1561 | mach_msg_header_t Head; |
1562 | mach_msg_type_t RetCodeType; |
1563 | kern_return_t RetCode; |
1564 | } Reply; |
1565 | |
1566 | Request *In0P = (Request *) InHeadP; |
1567 | Reply *OutP = (Reply *) OutHeadP; |
1568 | mig_external kern_return_t S_io_readsleep |
1569 | (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly); |
1570 | |
1571 | #if TypeCheck1 |
1572 | if ((In0P->Head.msgh_size != 24) || |
1573 | (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX0x80000000U)) |
1574 | { OutP->RetCode = MIG_BAD_ARGUMENTS-304; return; } |
1575 | #endif /* TypeCheck */ |
1576 | |
1577 | OutP->RetCode = S_io_readsleep(In0P->Head.msgh_request_portmsgh_local_port, In0P->Head.msgh_reply_portmsgh_remote_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits)((In0P->Head.msgh_bits) & 0x000000ff)); |
1578 | } |
1579 | |
1580 | /* Routine io_sigio */ |
1581 | mig_internalstatic void _Xio_sigio |
1582 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
1583 | { |
1584 | typedef struct { |
1585 | mach_msg_header_t Head; |
1586 | } Request; |
1587 | |
1588 | typedef struct { |
1589 | mach_msg_header_t Head; |
1590 | mach_msg_type_t RetCodeType; |
1591 | kern_return_t RetCode; |
1592 | } Reply; |
1593 | |
1594 | Request *In0P = (Request *) InHeadP; |
1595 | Reply *OutP = (Reply *) OutHeadP; |
1596 | mig_external kern_return_t S_io_sigio |
1597 | (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly); |
1598 | |
1599 | #if TypeCheck1 |
1600 | if ((In0P->Head.msgh_size != 24) || |
1601 | (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX0x80000000U)) |
1602 | { OutP->RetCode = MIG_BAD_ARGUMENTS-304; return; } |
1603 | #endif /* TypeCheck */ |
1604 | |
1605 | OutP->RetCode = S_io_sigio(In0P->Head.msgh_request_portmsgh_local_port, In0P->Head.msgh_reply_portmsgh_remote_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits)((In0P->Head.msgh_bits) & 0x000000ff)); |
1606 | } |
1607 | |
1608 | /* Routine io_pathconf */ |
1609 | mig_internalstatic void _Xio_pathconf |
1610 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
1611 | { |
1612 | typedef struct { |
1613 | mach_msg_header_t Head; |
1614 | mach_msg_type_t nameType; |
1615 | int name; |
1616 | } Request; |
1617 | |
1618 | typedef struct { |
1619 | mach_msg_header_t Head; |
1620 | mach_msg_type_t RetCodeType; |
1621 | kern_return_t RetCode; |
1622 | mach_msg_type_t valueType; |
1623 | int value; |
1624 | } Reply; |
1625 | |
1626 | Request *In0P = (Request *) InHeadP; |
1627 | Reply *OutP = (Reply *) OutHeadP; |
1628 | mig_external kern_return_t S_io_pathconf |
1629 | (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, int name, int *value); |
1630 | |
1631 | const mach_msg_type_t nameCheck = { |
1632 | /* msgt_name = */ 2, |
1633 | /* msgt_size = */ 32, |
1634 | /* msgt_number = */ 1, |
1635 | /* msgt_inline = */ TRUE((boolean_t) 1), |
1636 | /* msgt_longform = */ FALSE((boolean_t) 0), |
1637 | /* msgt_deallocate = */ FALSE((boolean_t) 0), |
1638 | /* msgt_unused = */ 0 |
1639 | }; |
1640 | |
1641 | const mach_msg_type_t valueType = { |
1642 | /* msgt_name = */ 2, |
1643 | /* msgt_size = */ 32, |
1644 | /* msgt_number = */ 1, |
1645 | /* msgt_inline = */ TRUE((boolean_t) 1), |
1646 | /* msgt_longform = */ FALSE((boolean_t) 0), |
1647 | /* msgt_deallocate = */ FALSE((boolean_t) 0), |
1648 | /* msgt_unused = */ 0 |
1649 | }; |
1650 | |
1651 | #if TypeCheck1 |
1652 | if ((In0P->Head.msgh_size != 32) || |
1653 | (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX0x80000000U)) |
1654 | { OutP->RetCode = MIG_BAD_ARGUMENTS-304; return; } |
1655 | #endif /* TypeCheck */ |
1656 | |
1657 | #if TypeCheck1 |
1658 | if (BAD_TYPECHECK(&In0P->nameType, &nameCheck)({ union { mach_msg_type_t t; unsigned32_t w; } _t, _c; _t.t = *(&In0P->nameType); _c.t = *(&nameCheck); _t.w != _c.w; })) |
1659 | { OutP->RetCode = MIG_BAD_ARGUMENTS-304; return; } |
1660 | #endif /* TypeCheck */ |
1661 | |
1662 | OutP->RetCode = S_io_pathconf(In0P->Head.msgh_request_portmsgh_local_port, In0P->Head.msgh_reply_portmsgh_remote_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits)((In0P->Head.msgh_bits) & 0x000000ff), In0P->name, &OutP->value); |
1663 | if (OutP->RetCode != KERN_SUCCESS0) |
1664 | return; |
1665 | |
1666 | OutP->Head.msgh_size = 40; |
1667 | |
1668 | OutP->valueType = valueType; |
1669 | } |
1670 | |
1671 | /* Routine io_identity */ |
1672 | mig_internalstatic void _Xio_identity |
1673 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
1674 | { |
1675 | typedef struct { |
1676 | mach_msg_header_t Head; |
1677 | } Request; |
1678 | |
1679 | typedef struct { |
1680 | mach_msg_header_t Head; |
1681 | mach_msg_type_t RetCodeType; |
1682 | kern_return_t RetCode; |
1683 | mach_msg_type_t idportType; |
1684 | mach_port_t idport; |
1685 | mach_msg_type_t fsidportType; |
1686 | mach_port_t fsidport; |
1687 | mach_msg_type_t filenoType; |
1688 | ino64_t fileno; |
1689 | } Reply; |
1690 | |
1691 | Request *In0P = (Request *) InHeadP; |
1692 | Reply *OutP = (Reply *) OutHeadP; |
1693 | mig_external kern_return_t S_io_identity |
1694 | (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, mach_port_t *idport, mach_msg_type_name_t *idportPoly, mach_port_t *fsidport, mach_msg_type_name_t *fsidportPoly, ino64_t *fileno); |
1695 | |
1696 | boolean_t msgh_simple; |
1697 | const mach_msg_type_t idportType = { |
1698 | /* msgt_name = */ -1, |
1699 | /* msgt_size = */ 32, |
1700 | /* msgt_number = */ 1, |
1701 | /* msgt_inline = */ TRUE((boolean_t) 1), |
1702 | /* msgt_longform = */ FALSE((boolean_t) 0), |
1703 | /* msgt_deallocate = */ FALSE((boolean_t) 0), |
1704 | /* msgt_unused = */ 0 |
1705 | }; |
1706 | |
1707 | const mach_msg_type_t fsidportType = { |
1708 | /* msgt_name = */ -1, |
1709 | /* msgt_size = */ 32, |
1710 | /* msgt_number = */ 1, |
1711 | /* msgt_inline = */ TRUE((boolean_t) 1), |
1712 | /* msgt_longform = */ FALSE((boolean_t) 0), |
1713 | /* msgt_deallocate = */ FALSE((boolean_t) 0), |
1714 | /* msgt_unused = */ 0 |
1715 | }; |
1716 | |
1717 | const mach_msg_type_t filenoType = { |
1718 | /* msgt_name = */ 11, |
1719 | /* msgt_size = */ 64, |
1720 | /* msgt_number = */ 1, |
1721 | /* msgt_inline = */ TRUE((boolean_t) 1), |
1722 | /* msgt_longform = */ FALSE((boolean_t) 0), |
1723 | /* msgt_deallocate = */ FALSE((boolean_t) 0), |
1724 | /* msgt_unused = */ 0 |
1725 | }; |
1726 | |
1727 | mach_msg_type_name_t idportPoly; |
1728 | mach_msg_type_name_t fsidportPoly; |
1729 | |
1730 | #if TypeCheck1 |
1731 | if ((In0P->Head.msgh_size != 24) || |
1732 | (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX0x80000000U)) |
1733 | { OutP->RetCode = MIG_BAD_ARGUMENTS-304; return; } |
1734 | #endif /* TypeCheck */ |
1735 | |
1736 | OutP->RetCode = S_io_identity(In0P->Head.msgh_request_portmsgh_local_port, In0P->Head.msgh_reply_portmsgh_remote_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits)((In0P->Head.msgh_bits) & 0x000000ff), &OutP->idport, &idportPoly, &OutP->fsidport, &fsidportPoly, &OutP->fileno); |
1737 | if (OutP->RetCode != KERN_SUCCESS0) |
1738 | return; |
1739 | |
1740 | msgh_simple = TRUE((boolean_t) 1); |
1741 | OutP->Head.msgh_size = 60; |
1742 | |
1743 | OutP->idportType = idportType; |
1744 | |
1745 | if (MACH_MSG_TYPE_PORT_ANY(idportPoly)(((idportPoly) >= 16) && ((idportPoly) <= 21))) |
1746 | msgh_simple = FALSE((boolean_t) 0); |
1747 | |
1748 | OutP->idportType.msgt_name = idportPoly; |
1749 | |
1750 | OutP->fsidportType = fsidportType; |
1751 | |
1752 | if (MACH_MSG_TYPE_PORT_ANY(fsidportPoly)(((fsidportPoly) >= 16) && ((fsidportPoly) <= 21 ))) |
1753 | msgh_simple = FALSE((boolean_t) 0); |
1754 | |
1755 | OutP->fsidportType.msgt_name = fsidportPoly; |
1756 | |
1757 | OutP->filenoType = filenoType; |
1758 | |
1759 | if (!msgh_simple) |
1760 | OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX0x80000000U; |
1761 | } |
1762 | |
1763 | /* Routine io_revoke */ |
1764 | mig_internalstatic void _Xio_revoke |
1765 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
1766 | { |
1767 | typedef struct { |
1768 | mach_msg_header_t Head; |
1769 | } Request; |
1770 | |
1771 | typedef struct { |
1772 | mach_msg_header_t Head; |
1773 | mach_msg_type_t RetCodeType; |
1774 | kern_return_t RetCode; |
1775 | } Reply; |
1776 | |
1777 | Request *In0P = (Request *) InHeadP; |
1778 | Reply *OutP = (Reply *) OutHeadP; |
1779 | mig_external kern_return_t S_io_revoke |
1780 | (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly); |
1781 | |
1782 | #if TypeCheck1 |
1783 | if ((In0P->Head.msgh_size != 24) || |
1784 | (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX0x80000000U)) |
1785 | { OutP->RetCode = MIG_BAD_ARGUMENTS-304; return; } |
1786 | #endif /* TypeCheck */ |
1787 | |
1788 | OutP->RetCode = S_io_revoke(In0P->Head.msgh_request_portmsgh_local_port, In0P->Head.msgh_reply_portmsgh_remote_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits)((In0P->Head.msgh_bits) & 0x000000ff)); |
1789 | } |
1790 | |
1791 | /* Routine io_select_timeout */ |
1792 | mig_internalstatic void _Xio_select_timeout |
1793 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
1794 | { |
1795 | typedef struct { |
1796 | mach_msg_header_t Head; |
1797 | mach_msg_type_t timeoutType; |
1798 | timespec_t timeout; |
1799 | mach_msg_type_t select_typeType; |
1800 | int select_type; |
1801 | } Request; |
1802 | |
1803 | typedef struct { |
1804 | mach_msg_header_t Head; |
1805 | mach_msg_type_t RetCodeType; |
1806 | kern_return_t RetCode; |
1807 | mach_msg_type_t select_typeType; |
1808 | int select_type; |
1809 | } Reply; |
1810 | |
1811 | Request *In0P = (Request *) InHeadP; |
1812 | Reply *OutP = (Reply *) OutHeadP; |
1813 | mig_external kern_return_t S_io_select_timeout |
1814 | (io_t io_object, mach_port_t reply, mach_msg_type_name_t replyPoly, timespec_t timeout, int *select_type); |
1815 | |
1816 | const mach_msg_type_t timeoutCheck = { |
1817 | /* msgt_name = */ 2, |
1818 | /* msgt_size = */ 32, |
1819 | /* msgt_number = */ 2, |
1820 | /* msgt_inline = */ TRUE((boolean_t) 1), |
1821 | /* msgt_longform = */ FALSE((boolean_t) 0), |
1822 | /* msgt_deallocate = */ FALSE((boolean_t) 0), |
1823 | /* msgt_unused = */ 0 |
1824 | }; |
1825 | |
1826 | const mach_msg_type_t select_typeCheck = { |
1827 | /* msgt_name = */ 2, |
1828 | /* msgt_size = */ 32, |
1829 | /* msgt_number = */ 1, |
1830 | /* msgt_inline = */ TRUE((boolean_t) 1), |
1831 | /* msgt_longform = */ FALSE((boolean_t) 0), |
1832 | /* msgt_deallocate = */ FALSE((boolean_t) 0), |
1833 | /* msgt_unused = */ 0 |
1834 | }; |
1835 | |
1836 | const mach_msg_type_t select_typeType = { |
1837 | /* msgt_name = */ 2, |
1838 | /* msgt_size = */ 32, |
1839 | /* msgt_number = */ 1, |
1840 | /* msgt_inline = */ TRUE((boolean_t) 1), |
1841 | /* msgt_longform = */ FALSE((boolean_t) 0), |
1842 | /* msgt_deallocate = */ FALSE((boolean_t) 0), |
1843 | /* msgt_unused = */ 0 |
1844 | }; |
1845 | |
1846 | #if TypeCheck1 |
1847 | if ((In0P->Head.msgh_size != 44) || |
1848 | (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX0x80000000U)) |
1849 | { OutP->RetCode = MIG_BAD_ARGUMENTS-304; return; } |
1850 | #endif /* TypeCheck */ |
1851 | |
1852 | #if TypeCheck1 |
1853 | if (BAD_TYPECHECK(&In0P->timeoutType, &timeoutCheck)({ union { mach_msg_type_t t; unsigned32_t w; } _t, _c; _t.t = *(&In0P->timeoutType); _c.t = *(&timeoutCheck); _t .w != _c.w; })) |
1854 | { OutP->RetCode = MIG_BAD_ARGUMENTS-304; return; } |
1855 | #endif /* TypeCheck */ |
1856 | |
1857 | #if TypeCheck1 |
1858 | if (BAD_TYPECHECK(&In0P->select_typeType, &select_typeCheck)({ union { mach_msg_type_t t; unsigned32_t w; } _t, _c; _t.t = *(&In0P->select_typeType); _c.t = *(&select_typeCheck ); _t.w != _c.w; })) |
1859 | { OutP->RetCode = MIG_BAD_ARGUMENTS-304; return; } |
1860 | #endif /* TypeCheck */ |
1861 | |
1862 | OutP->RetCode = S_io_select_timeout(In0P->Head.msgh_request_portmsgh_local_port, In0P->Head.msgh_reply_portmsgh_remote_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits)((In0P->Head.msgh_bits) & 0x000000ff), In0P->timeout, &In0P->select_type); |
1863 | if (OutP->RetCode != KERN_SUCCESS0) |
1864 | return; |
1865 | |
1866 | OutP->Head.msgh_size = 40; |
1867 | |
1868 | OutP->select_typeType = select_typeType; |
1869 | |
1870 | OutP->select_type = In0P->select_type; |
1871 | } |
1872 | |
1873 | static mig_routine_t io_server_routines[] = { |
1874 | _Xio_write, |
1875 | _Xio_read, |
1876 | _Xio_seek, |
1877 | _Xio_readable, |
1878 | _Xio_set_all_openmodes, |
1879 | _Xio_get_openmodes, |
1880 | _Xio_set_some_openmodes, |
1881 | _Xio_clear_some_openmodes, |
1882 | _Xio_async, |
1883 | _Xio_mod_owner, |
1884 | _Xio_get_owner, |
1885 | _Xio_get_icky_async_id, |
1886 | _Xio_select, |
1887 | _Xio_stat, |
1888 | _Xio_reauthenticate, |
1889 | _Xio_restrict_auth, |
1890 | _Xio_duplicate, |
1891 | _Xio_server_version, |
1892 | _Xio_map, |
1893 | _Xio_map_cntl, |
1894 | _Xio_get_conch, |
1895 | _Xio_release_conch, |
1896 | _Xio_eofnotify, |
1897 | _Xio_prenotify, |
1898 | _Xio_postnotify, |
1899 | _Xio_readnotify, |
1900 | _Xio_readsleep, |
1901 | _Xio_sigio, |
1902 | _Xio_pathconf, |
1903 | _Xio_identity, |
1904 | _Xio_revoke, |
1905 | _Xio_select_timeout, |
1906 | }; |
1907 | |
1908 | mig_external boolean_t io_server |
1909 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
1910 | { |
1911 | mach_msg_header_t *InP = InHeadP; |
1912 | mig_reply_header_t *OutP = (mig_reply_header_t *) OutHeadP; |
1913 | |
1914 | const mach_msg_type_t RetCodeType = { |
1915 | /* msgt_name = */ MACH_MSG_TYPE_INTEGER_322, |
1916 | /* msgt_size = */ 32, |
1917 | /* msgt_number = */ 1, |
1918 | /* msgt_inline = */ TRUE((boolean_t) 1), |
1919 | /* msgt_longform = */ FALSE((boolean_t) 0), |
1920 | /* msgt_deallocate = */ FALSE((boolean_t) 0), |
1921 | /* msgt_unused = */ 0 |
1922 | }; |
1923 | |
1924 | mig_routine_t routine; |
1925 | |
1926 | OutP->Head.msgh_bits = MACH_MSGH_BITS(MACH_MSGH_BITS_REPLY(InP->msgh_bits), 0)((((InP->msgh_bits) & 0x000000ff)) | ((0) << 8)); |
1927 | OutP->Head.msgh_size = sizeof *OutP; |
1928 | OutP->Head.msgh_remote_port = InP->msgh_reply_portmsgh_remote_port; |
1929 | OutP->Head.msgh_local_port = MACH_PORT_NULL((mach_port_t) 0); |
1930 | OutP->Head.msgh_seqno = 0; |
1931 | OutP->Head.msgh_id = InP->msgh_id + 100; |
1932 | |
1933 | OutP->RetCodeType = RetCodeType; |
1934 | |
1935 | if ((InP->msgh_id > 21031) || (InP->msgh_id < 21000) || |
1936 | ((routine = io_server_routines[InP->msgh_id - 21000]) == 0)) { |
1937 | OutP->RetCode = MIG_BAD_ID-303; |
1938 | return FALSE((boolean_t) 0); |
1939 | } |
1940 | (*routine) (InP, &OutP->Head); |
1941 | return TRUE((boolean_t) 1); |
1942 | } |
1943 | |
1944 | mig_external mig_routine_t io_server_routine |
1945 | (const mach_msg_header_t *InHeadP) |
1946 | { |
1947 | int msgh_id; |
1948 | |
1949 | msgh_id = InHeadP->msgh_id - 21000; |
1950 | |
1951 | if ((msgh_id > 31) || (msgh_id < 0)) |
1952 | return 0; |
1953 | |
1954 | return io_server_routines[msgh_id]; |
1955 | } |
1956 |